{"version":3,"sources":["components/Avatar.js","components/UserStatus.js","content/logo.svg","components/NavMenu.js","API.js","UserSessionService.js","components/Error.js","components/Layout.js","components/Loading.js","components/Books.js","components/Menu.js","components/MarkdownViewer.js","components/TocHeaderList.js","components/InteractiveToc.js","components/ArticleBreadcrumb.js","components/ArticleBanner.js","components/ArticleActions.js","components/ArticleFeedback.js","components/ArticleNav.js","components/Article.js","components/GoToArticle.js","components/Search.js","App.js","registerServiceWorker.js","index.js"],"names":["Avatar","className","alt","src","this","props","user","id","title","name","Component","displayName","UserStatus","state","darkmode","initDarkMode","isDarkMode","setState","document","documentElement","classList","add","remove","window","localStorage","getItem","e","stopPropagation","preventDefault","removeItem","setItem","login","onClick","toggleDarkmode","style","color","href","NavMenu","toggleNavbar","bind","search","URLSearchParams","location","get","collapsed","isSearch","extSearch","matchPath","pathname","path","getIsSearch","event","target","value","service","history","push","encodeURIComponent","Navbar","dark","Container","fluid","NavbarBrand","tag","Link","to","logo","NavbarToggler","Collapse","isOpen","navbar","onSubmit","placeholder","autoFocus","onChange","type","clear","withRouter","createError","status","message","error","getResult","url","options","a","fetch","response","ok","json","data","API","getUserSession","undefined","getBooks","getArticleById","getArticleBySlug","query","offset","limit","params","set","length","toString","getLastArticles","count","createArticleFeeback","articleId","isPositive","comments","method","headers","body","JSON","stringify","createEvent","UserSessionService","Error","renderErrorMessage","Layout","result","children","Loading","Spinner","Books","books","loading","populateData","populateLastArticlesData","lastArticles","map","book","slug","borderLeftColor","teaser","article","width","renderBooks","Menu","menuAutoScrollTopOffset","renderMenu","menu","child","node","open","indexOf","setTimeout","scrollMenuToSelectedNode","scrollContainer","querySelector","active","targetTop","getBoundingClientRect","top","containerTop","containerScrollTop","scrollTop","Math","max","scrollTo","MarkdownViewer","dangerouslySetInnerHTML","__html","html","TocHeaderList","items","item","label","InteractiveToc","_isMounted","showGoTop","handleScroll","addEventListener","currentScrollPos","pageYOffset","$","scrollspy","removeEventListener","toc","gotop","ArticleBreadcrumb","breadcrumb","segment","ArticleBanner","words","split","ceil","mTime","Date","toLocaleDateString","precision","round","views","toLocaleString","readTime","getReadTime","viewsCount","getViewsCount","getMTime","ArticleActions","toastHandle","showToast","toastMessage","hideAfter","clearTimeout","substring","navigator","clipboard","writeText","alert","print","copyUrl","isXelya","editUrl","rel","Toast","ToastBody","ArticleFeedback","showForm","submited","upvote","onCommentsChange","rows","abort","submit","ArticleNav","previous","next","Article","root","match","ensureUrlReplaced","hash","getElementById","scrollIntoView","replace","breadCrumb","slice","previousArticle","nextArticle","renderArticle","GoToArticle","Search","pageSize","pageIndex","selectedService","unListenHistory","results","setParams","listen","action","parseInt","refreshUrl","hitCount","serviceNames","services","forEach","o","servicesAggs","key","docCount","aggregations","sumOtherDocCount","buckets","took","bucket","changeService","source","highlight","disabled","renderResults","App","exact","component","Boolean","hostname","rootElement","ReactDOM","render","basename","process","serviceWorker","ready","then","registration","unregister"],"mappings":"ylBAGaA,EAAb,4JAGI,WACI,OAAO,qBAAKC,UAAU,SAASC,IAAI,GAAGC,IAAG,8BAAyBC,KAAKC,MAAMC,KAAKC,IAAMC,MAAQJ,KAAKC,MAAMC,KAAKG,WAJxH,GAA4BC,aAAfV,EACFW,YAAcX,EAAOS,K,UCCnBG,EAAb,kDAGI,WAAYP,GAAQ,IAAD,8BACf,cAAMA,IACDQ,MAAQ,CAAEC,UAAU,GAFV,EAHvB,qDAQI,WACIV,KAAKW,iBATb,0BAYI,WACI,IAAIC,EAAaZ,KAAKY,aACtBZ,KAAKa,SAAS,CAAEH,SAAUE,IACtBA,GACAE,SAASC,gBAAgBC,UAAUC,IAAI,YACvCH,SAASC,gBAAgBC,UAAUE,OAAO,eAE1CJ,SAASC,gBAAgBC,UAAUE,OAAO,YAC1CJ,SAASC,gBAAgBC,UAAUC,IAAI,gBApBnD,wBAwBI,WACI,MAAmD,SAA5CE,OAAOC,aAAaC,QAAQ,cAzB3C,4BA4BI,SAAeC,GAcX,OAbAA,EAAEC,kBACFD,EAAEE,iBACExB,KAA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ACE,cAAC,GAAD,MAEFJ,IDuFI,kBAAmBtE,WACrBA,UAAU2E,cAAcC,MAAMC,MAAK,SAAAC,GACjCA,EAAaC,kB","file":"static/js/main.faf4103b.chunk.js","sourcesContent":["import React, { Component } from 'react';\r\nimport './Avatar.scss';\r\n\r\nexport class Avatar extends Component {\r\n static displayName = Avatar.name;\r\n\r\n render() {\r\n return \"\";\r\n }\r\n}","import React, { Component } from 'react';\r\nimport { Avatar } from './Avatar';\r\n\r\nimport './UserStatus.scss';\r\n\r\nexport class UserStatus extends Component {\r\n static displayName = UserStatus.name;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { darkmode: false };\r\n }\r\n\r\n componentDidMount() {\r\n this.initDarkMode();\r\n }\r\n\r\n initDarkMode() {\r\n var isDarkMode = this.isDarkMode();\r\n this.setState({ darkmode: isDarkMode });\r\n if (isDarkMode) {\r\n document.documentElement.classList.add('darkmode');\r\n document.documentElement.classList.remove('lightmode');\r\n } else {\r\n document.documentElement.classList.remove('darkmode');\r\n document.documentElement.classList.add('lightmode');\r\n }\r\n }\r\n\r\n isDarkMode() {\r\n return window.localStorage.getItem('darkmode') === 'true';\r\n }\r\n\r\n toggleDarkmode(e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n if (this.isDarkMode()) {\r\n this.setState({ darkmode: false });\r\n document.documentElement.classList.remove('darkmode');\r\n document.documentElement.classList.add('lightmode');\r\n window.localStorage.removeItem('darkmode');\r\n } else {\r\n this.setState({ darkmode: true });\r\n document.documentElement.classList.add('darkmode');\r\n document.documentElement.classList.remove('lightmode');\r\n window.localStorage.setItem('darkmode', true);\r\n }\r\n return false;\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
{ this.props.user.name }
\r\n
{this.props.user.login}
\r\n
\r\n
\r\n
\r\n
this.toggleDarkmode(e)}>\r\n {this.state.darkmode ?\r\n :\r\n \r\n }\r\n Mode sombre\r\n
\r\n
\r\n
\r\n \r\n Déconnexion\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n","export default __webpack_public_path__ + \"static/media/logo.99f9c583.svg\";","import React, { Component } from 'react';\r\nimport { Collapse, Container, Navbar, NavbarBrand, NavbarToggler } from 'reactstrap';\r\nimport { Link } from 'react-router-dom';\r\nimport { matchPath, withRouter } from \"react-router\";\r\nimport { UserStatus } from './UserStatus';\r\nimport logo from './../content/logo.svg';\r\nimport './NavMenu.scss';\r\n\r\nclass NavMenu extends Component {\r\n static displayName = NavMenu.name;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.toggleNavbar = this.toggleNavbar.bind(this);\r\n\r\n const search = new URLSearchParams(window.location.search).get(\"q\") || '';\r\n this.state = { collapsed: true, isSearch: false, search, extSearch: '' };\r\n }\r\n\r\n getIsSearch() {\r\n return !!matchPath(this.props.location.pathname, { path: '/search' });\r\n }\r\n\r\n componentDidMount() {\r\n this.setState({ isSearch: this.getIsSearch() });\r\n if (this.state.isSearch) {\r\n const search = new URLSearchParams(window.location.search).get(\"q\") || '';\r\n this.setState({ search });\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n var isSearch = this.getIsSearch();\r\n if (this.state.isSearch !== isSearch) {\r\n this.setState({ isSearch });\r\n if (isSearch) {\r\n const search = new URLSearchParams(window.location.search).get(\"q\") || '';\r\n this.setState({ extSearch: '', search });\r\n } else {\r\n this.setState({ search: '' });\r\n }\r\n }\r\n }\r\n\r\n toggleNavbar() {\r\n this.setState({ collapsed: !this.state.collapsed });\r\n }\r\n\r\n onChange(event) {\r\n if (this.state.isSearch) {\r\n this.setState({ search: event.target.value });\r\n } else {\r\n this.setState({ extSearch: event.target.value });\r\n }\r\n }\r\n\r\n search(event) {\r\n event.preventDefault();\r\n\r\n if (this.state.isSearch) {\r\n var service = new URLSearchParams(window.location.search).get(\"s\") ?? \"\"; \r\n this.props.history.push('/search?q=' + encodeURIComponent(this.state.search) + '&s=' + encodeURIComponent(service));\r\n } else {\r\n this.props.history.push(\"/search?q=\" + encodeURIComponent(this.state.extSearch));\r\n }\r\n }\r\n\r\n clear(event) {\r\n this.setState({ search: '', extSearch: '' });\r\n if (this.getIsSearch()) this.props.history.push(\"/search\");\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n \r\n \r\n \"Xelya\r\n | Docs\r\n \r\n \r\n \r\n \r\n
this.search(event)} className=\"w-50 w-lg-25 mx-auto\" style={{ 'maxWidth': '400px' }}>\r\n
\r\n this.onChange(event)} />\r\n
\r\n {(this.state.isSearch ? this.state.search : this.state.extSearch) &&\r\n \r\n }\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default withRouter(NavMenu);","function createError(status, message) {\r\n return { error: { status, message } };\r\n}\r\n\r\nasync function getResult(url, options) {\r\n const response = await fetch(url, options);\r\n if (response.ok) {\r\n const data = await response.json();\r\n return { data: data };\r\n } else {\r\n return createError(response.status);\r\n }\r\n}\r\n\r\nexport const API = {\r\n getUserSession: async () => {\r\n try {\r\n return await getResult('/api/session');\r\n } catch (e) {\r\n return createError(undefined, \"Impossible d'identifier l'utilisateur connecté\");\r\n }\r\n },\r\n getBooks: async () => {\r\n try {\r\n return await getResult('/api/books');\r\n } catch (e) {\r\n return createError(undefined, \"Impossible de récupérer la liste des livres\");\r\n }\r\n },\r\n getArticleById: async (id) => {\r\n try {\r\n return await getResult('/api/articles/' + encodeURIComponent(id));\r\n } catch (e) {\r\n return createError(undefined, \"Impossible de récupérer l'article\");\r\n }\r\n },\r\n getArticleBySlug: async (path) => {\r\n try {\r\n return await getResult('/api/articlesBySlug?slug=' + encodeURIComponent(path));\r\n } catch (e) {\r\n return createError(undefined, \"Impossible de récupérer l'article\");\r\n }\r\n },\r\n search: async (query, offset, limit, service) => {\r\n try {\r\n\r\n var params = new URLSearchParams('');\r\n params.set('query', query);\r\n params.set('offset', offset);\r\n params.set('limit', limit);\r\n if (service && service.length) params.set('services', [service]); \r\n\r\n return await getResult('/api/search?' + params.toString());\r\n } catch (e) {\r\n return createError(undefined, \"Impossible d'effectuer la recherche\");\r\n }\r\n },\r\n getLastArticles: async (count) => {\r\n try {\r\n return await getResult('/api/lastArticles?count=' + encodeURIComponent(count));\r\n } catch (e) {\r\n return createError(undefined, \"Impossible de récupérer les articles\");\r\n }\r\n },\r\n createArticleFeeback: async (articleId, isPositive, comments) => {\r\n try {\r\n return await getResult('/api/articles/' + encodeURIComponent(articleId) + '/feedbacks/', {\r\n method: 'post',\r\n headers: {\r\n 'Accept': 'application/json',\r\n 'Content-Type': 'application/json'\r\n },\r\n body: JSON.stringify({ isPositive, comments })\r\n });\r\n } catch (e) {\r\n return createError(undefined, \"Impossible d'enregistrer l'évaluation\");\r\n }\r\n },\r\n createEvent: async (type, articleId) => {\r\n try {\r\n return await getResult('/api/articles/' + encodeURIComponent(articleId) + '/events/' + encodeURIComponent(type), {\r\n method: 'post',\r\n headers: {\r\n 'Accept': 'application/json',\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n } catch (e) {\r\n return createError(undefined, \"Impossible d'enregistrer l'évènement\");\r\n }\r\n }\r\n};","var user = null;\r\n\r\nexport const UserSessionService = {\r\n set: value => user = value,\r\n clear: () => user = null,\r\n get: () => user\r\n};","import React, { Component } from 'react';\r\nimport { withRouter } from \"react-router\";\r\nimport { UserSessionService } from './../UserSessionService';\r\n\r\nclass Error extends Component {\r\n static displayName = Error.name;\r\n\r\n renderErrorMessage(message) {\r\n return

{message}

;\r\n }\r\n\r\n render() {\r\n var error = this.props.error;\r\n if (error && error.status) {\r\n switch (error.status) {\r\n case 401:\r\n window.location.href = \"/users/login?redirect=\" + encodeURIComponent(this.props.location.pathname);\r\n return null;\r\n case 403:\r\n var user = UserSessionService.get();\r\n return this.renderErrorMessage(\"Accès à la ressource interdit (Utilisateur: \" + user?.login + \")\");\r\n case 404:\r\n return this.renderErrorMessage(\"Ressource introuvable\");\r\n default:\r\n return this.renderErrorMessage(\"Une erreur inattendue est survenue (\" + error.status + \")\");\r\n }\r\n } else if (error && error.message && error.message.length) {\r\n return this.renderErrorMessage(error.message);\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n\r\nexport default withRouter(Error);","import React, { Component } from 'react';\r\nimport { Container } from 'reactstrap';\r\nimport NavMenu from './NavMenu';\r\nimport { API } from './../API';\r\nimport { UserSessionService } from './../UserSessionService';\r\nimport Error from './Error';\r\n\r\nexport class Layout extends Component {\r\n static displayName = Layout.name;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n async componentDidMount() {\r\n var result = await API.getUserSession();\r\n if (result.error) {\r\n this.setState({ error: result.error });\r\n } else {\r\n UserSessionService.set(result.data);\r\n this.setState({ user: result.data, error: null });\r\n }\r\n }\r\n\r\n render() {\r\n if (this.state.error) {\r\n return ;\r\n } else if (this.state.user) {\r\n return (\r\n
\r\n \r\n \r\n {this.props.children}\r\n \r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { Spinner } from 'reactstrap';\r\n\r\nexport class Loading extends Component {\r\n static displayName = Loading.name;\r\n\r\n render() {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n}","import React, { Component } from 'react';\r\nimport { Link } from \"react-router-dom\";\r\nimport { Loading } from './Loading';\r\nimport { API } from './../API';\r\nimport Error from './Error';\r\n\r\nimport './Books.scss';\r\n\r\nexport class Books extends Component {\r\n static displayName = Books.name;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { books: [], loading: true };\r\n }\r\n\r\n async componentDidMount() {\r\n document.title = \"Aide Xelya\";\r\n await this.populateData();\r\n await this.populateLastArticlesData();\r\n }\r\n\r\n async populateData() {\r\n var result = await API.getBooks();\r\n if (result.error) {\r\n this.setState({ error: result.error });\r\n } else {\r\n this.setState({ books: result.data, loading: false, error: null });\r\n }\r\n }\r\n\r\n async populateLastArticlesData() {\r\n var result = await API.getLastArticles(9);\r\n if (result.error) {\r\n this.setState({ error: result.error });\r\n } else {\r\n this.setState({ lastArticles: result.data, loading: false, error: null });\r\n }\r\n }\r\n\r\n renderBooks() {\r\n return
\r\n {this.state.books && this.state.books.length > 0 &&\r\n
\r\n

Livres

\r\n
\r\n {this.state.books.map(book =>\r\n
\r\n \r\n
\r\n
\r\n
{book.title}
\r\n

{book.teaser}

\r\n
\r\n
\r\n \r\n
\r\n )}\r\n
\r\n
\r\n }\r\n {/*{this.state.lastArticles && this.state.lastArticles.length > 0 &&*/}\r\n {/*
*/}\r\n {/*

Articles recommandés

*/}\r\n {/*
*/}\r\n {/* {this.state.lastArticles.map(article =>*/}\r\n {/*
*/}\r\n {/* */}\r\n {/*
*/}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/* */}\r\n {/*
*/}\r\n {/* */}\r\n {/* */}\r\n {/*
{article.title}
*/}\r\n {/* {article.slug}*/}\r\n {/*
*/}\r\n {/*
*/}\r\n {/* */}\r\n {/*
*/}\r\n {/* )}*/}\r\n {/*
*/}\r\n {/*
*/}\r\n {/*}*/}\r\n {this.state.lastArticles && this.state.lastArticles.length > 0 &&\r\n
\r\n

Derniers articles

\r\n
\r\n {this.state.lastArticles.map(article =>\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
{article.title}
\r\n
{article.slug}
\r\n
\r\n
\r\n \r\n
\r\n )}\r\n
\r\n
\r\n }\r\n
;\r\n }\r\n\r\n render() {\r\n if (this.state.error) return ;\r\n else if (this.state.loading) return ;\r\n else return
{this.renderBooks()}
;\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { Link } from \"react-router-dom\";\r\nimport { Loading } from './Loading';\r\n\r\nexport class Menu extends Component {\r\n static displayName = Menu.name;\r\n menuAutoScrollTopOffset = 150;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { menu: {}, loading: true };\r\n }\r\n\r\n componentDidMount() {\r\n const { menu } = this.props;\r\n this.setState({ menu: menu, loading: false });\r\n\r\n setTimeout(() => this.scrollMenuToSelectedNode());\r\n }\r\n\r\n componentDidUpdate() {\r\n setTimeout(() => this.scrollMenuToSelectedNode());\r\n }\r\n\r\n scrollMenuToSelectedNode() {\r\n const { path } = this.props;\r\n\r\n var scrollContainer = document.querySelector(\".menu-scrollable\");\r\n var target = document.querySelector(\".menu-scrollable li[menu-article-id=\\\"\" + path + \"\\\"]\");\r\n var active = document.querySelector(\".menu-scrollable li.active\");\r\n\r\n if (target && scrollContainer && target !== active) {\r\n\r\n if (active) active.classList.remove(\"active\");\r\n target.classList.add(\"active\");\r\n\r\n var targetTop = target.getBoundingClientRect().top;\r\n var containerTop = scrollContainer.getBoundingClientRect().top;\r\n var containerScrollTop = scrollContainer.scrollTop;\r\n var scrollTop = Math.max(0, targetTop + containerScrollTop - containerTop - this.menuAutoScrollTopOffset);\r\n scrollContainer.scrollTo(0, scrollTop);\r\n }\r\n }\r\n\r\n renderMenu = function (menu, path) {\r\n return
    \r\n {menu.children.map(child => {\r\n if (child.node.type === 2) {\r\n return
  • \r\n {child.node.title}\r\n
  • \r\n } else if (child.node.type === 1 && child.children) {\r\n var open = path.indexOf(child.node.slug) === 0;\r\n return
    \r\n {child.node.title}\r\n {this.renderMenu(child, path)}\r\n
    \r\n } else {\r\n return null;\r\n }\r\n }\r\n )}\r\n
;\r\n }\r\n\r\n render() {\r\n const { path } = this.props;\r\n\r\n if (this.state.loading) {\r\n return ;\r\n } else if (this.state.menu) {\r\n return (\r\n
\r\n {this.renderMenu(this.state.menu, path)}\r\n
\r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n}","import React, { Component } from 'react';\r\nimport './MarkdownViewer.scss';\r\n\r\nexport class MarkdownViewer extends Component {\r\n static displayName = MarkdownViewer.name;\r\n\r\n render() {\r\n return (\r\n
\r\n );\r\n }\r\n}","import React, { Component } from 'react';\r\n\r\nexport class TocHeaderList extends Component {\r\n static displayName = TocHeaderList.name;\r\n\r\n render() {\r\n return (\r\n
    \r\n {this.props.items && this.props.items.map(item =>\r\n
  • \r\n {item.label}\r\n {item.children && item.children.length > 0 &&\r\n \r\n }\r\n
  • \r\n )}\r\n
\r\n );\r\n }\r\n}","import React, { Component } from 'react';\r\nimport { TocHeaderList } from './TocHeaderList';\r\nimport $ from 'jquery';\r\n\r\nimport './InteractiveToc.scss'\r\n\r\nexport class InteractiveToc extends Component {\r\n static displayName = InteractiveToc.name;\r\n _isMounted = false;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { showGoTop: false };\r\n this.handleScroll = this.handleScroll.bind(this);\r\n }\r\n\r\n componentDidMount() {\r\n this._isMounted = true;\r\n if (window) {\r\n window.addEventListener('scroll', this.handleScroll);\r\n }\r\n }\r\n\r\n handleScroll() {\r\n if (this._isMounted) {\r\n let currentScrollPos = window.pageYOffset;\r\n if (!this.state.showGoTop && currentScrollPos > 70) {\r\n this.setState({ showGoTop: true });\r\n } else if (this.state.showGoTop && currentScrollPos < 70) {\r\n this.setState({ showGoTop: false });\r\n }\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n $('body').scrollspy({ target: '.table-of-contents-wrapper nav.nav-scroll-spy', offset: 30 });\r\n }\r\n\r\n componentWillUnmount() {\r\n this._isMounted = false;\r\n $('body').scrollspy('dispose');\r\n window.removeEventListener('scroll', this.handleScroll);\r\n }\r\n\r\n gotop() {\r\n window.location.href = '#';\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n Sur cette page\r\n \r\n \r\n
\r\n );\r\n }\r\n}","import React, { Component } from 'react';\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport './ArticleBreadcrumb.scss';\r\n\r\nexport class ArticleBreadcrumb extends Component {\r\n static displayName = ArticleBreadcrumb.name;\r\n\r\n render() {\r\n if (this.props.breadcrumb && this.props.breadcrumb.length) {\r\n return (
    \r\n {this.props.breadcrumb.map(segment =>\r\n
  • {segment.title}
  • \r\n )}\r\n
);\r\n } else {\r\n return null;\r\n }\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport './ArticleBanner.scss';\r\n\r\nexport class ArticleBanner extends Component {\r\n static displayName = ArticleBanner.name;\r\n\r\n getReadTime() {\r\n if (this.props.article && this.props.article.body) {\r\n var words = this.props.article.body.split(' ').length;\r\n return Math.ceil(words / 200);\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n getMTime() {\r\n if (this.props.article && this.props.article.mTime) {\r\n return new Date(this.props.article.mTime).toLocaleDateString();\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n round(value, precision) {\r\n return +(Math.round(value + \"e+\" + precision) + \"e-\" + precision);\r\n }\r\n\r\n getViewsCount() {\r\n if (this.props.article) {\r\n var views = this.props.article.views;\r\n if (views > 1000000) {\r\n return this.round(views / 1000000.0, 2).toLocaleString() + \"M\";\r\n } else if (views > 1000) {\r\n return this.round(views / 1000.0, 2).toLocaleString() + \"K\";\r\n } else {\r\n return views;\r\n }\r\n } else {\r\n return 0;\r\n }\r\n }\r\n\r\n render() {\r\n\r\n let readTime = this.getReadTime();\r\n let viewsCount = this.getViewsCount();\r\n\r\n return (\r\n
\r\n \r\n \r\n Dernière modification le {this.getMTime()}\r\n \r\n \r\n \r\n {readTime} {readTime > 1 ? \"minutes\" : \"minute\"} de lecture\r\n \r\n \r\n \r\n {viewsCount} {viewsCount > 1 ? \"vues\" : \"vue\"}\r\n \r\n \r\n
\r\n );\r\n }\r\n}","import React, { Component } from 'react';\r\nimport { Toast, ToastBody } from 'reactstrap';\r\nimport { UserSessionService } from './../UserSessionService';\r\nimport { API } from './../API';\r\n\r\nimport './ArticleActions.scss';\r\n\r\nexport class ArticleActions extends Component {\r\n static displayName = ArticleActions.name;\r\n\r\n toastHandle = null;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { showToast: false, toastMessage: '' };\r\n }\r\n\r\n showToast(message, hideAfter = 3000) {\r\n clearTimeout(this.toastHandle);\r\n this.setState({ showToast: true, toastMessage: message });\r\n this.toastHandle = setTimeout(() => {\r\n this.setState({ showToast: false, toastMessage: '' });\r\n }, hideAfter);\r\n }\r\n\r\n async copyUrl() {\r\n if (this.props.article) {\r\n var href = window.location.href;\r\n var url = href.substring(0, href.indexOf('/articles/')) + '/share/' + this.props.article.id;\r\n navigator.clipboard.writeText(url);\r\n this.showToast(\"Lien copié dans le presse papier !\");\r\n await API.createEvent(\"share\", this.props.article.id);\r\n } else {\r\n alert(\"Impossible de partager l'article\");\r\n }\r\n }\r\n\r\n async print() {\r\n if (this.props.article) {\r\n window.print();\r\n await API.createEvent(\"print\", this.props.article.id);\r\n } else {\r\n alert(\"Impossible d'imprimer l'article\");\r\n }\r\n }\r\n\r\n render() {\r\n var user = UserSessionService.get();\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n {user && user.isXelya &&\r\n \r\n \r\n \r\n Modifier\r\n \r\n \r\n }\r\n
\r\n {this.state.showToast && this.state.toastMessage &&\r\n
\r\n \r\n {this.state.toastMessage}\r\n \r\n
\r\n }\r\n
\r\n );\r\n }\r\n}","import React, { Component } from 'react';\r\nimport { API } from './../API';\r\nimport Error from './Error';\r\n\r\nimport './ArticleFeedback.scss';\r\n\r\nexport class ArticleFeedback extends Component {\r\n static displayName = ArticleFeedback.name;\r\n\r\n article = null;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { showForm: false, comments: '', submited: false, upvote: false };\r\n }\r\n\r\n async componentDidMount() {\r\n const { article } = this.props;\r\n this.article = article;\r\n }\r\n\r\n async componentDidUpdate() {\r\n const { article } = this.props;\r\n if (this.article && article && article.id !== this.article.id) {\r\n this.article = article;\r\n this.setState({ showForm: false, comments: '', submited: false, upvote: false, error: null });\r\n }\r\n }\r\n\r\n showForm(upvote) {\r\n this.setState({ showForm: true, upvote: upvote });\r\n }\r\n\r\n onCommentsChange(event) {\r\n this.setState({ comments: event.target.value });\r\n }\r\n\r\n async submit(event) {\r\n event.preventDefault();\r\n if (this.props.article) {\r\n var result = await API.createArticleFeeback(this.props.article.id, this.state.upvote, this.state.comments);\r\n if (result.error) {\r\n this.setState({ submited: false, error: result.error });\r\n } else {\r\n this.setState({ showForm: false, comments: '', submited: true, error: null });\r\n }\r\n } else {\r\n this.setState({ submited: false, error: { message: \"Impossible de partager l'article\"} });\r\n }\r\n }\r\n\r\n abort(event) {\r\n this.setState({ showForm: false, comments: '', submited: false, upvote: false });\r\n event.preventDefault();\r\n }\r\n\r\n render() {\r\n return (\r\n
\r\n
\r\n
\r\n

Avez-vous trouvé cet article utile ?

\r\n

Vos commentaires nous aident à améliorer notre documentation.

\r\n
\r\n
\r\n {this.state.showForm ?\r\n (\r\n
\r\n {this.state.error && }\r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n )\r\n :\r\n this.state.submited ?\r\n (\r\n
\r\n Merci\r\n {this.state.upvote ?\r\n :\r\n \r\n }\r\n
\r\n )\r\n :\r\n (\r\n\r\n
\r\n this.showForm(true)} title=\"Oui\">\r\n this.showForm(false)} title=\"Non\">\r\n
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}","import React, { Component } from 'react';\r\nimport { Link } from \"react-router-dom\";\r\n\r\nimport './ArticleNav.scss';\r\n\r\nexport class ArticleNav extends Component {\r\n static displayName = ArticleNav.name;\r\n\r\n render() {\r\n const { previous, next } = this.props;\r\n if (!previous && !next) return null;\r\n\r\n return (\r\n
\r\n {previous &&\r\n \r\n
\r\n \r\n Précédent\r\n
\r\n
{previous.title}
\r\n \r\n }\r\n {next &&\r\n \r\n
\r\n Suivant\r\n \r\n
\r\n
{next.title}
\r\n \r\n }\r\n
\r\n
\r\n );\r\n }\r\n}","import React, { Component } from 'react';\r\nimport { Menu } from './Menu';\r\nimport { Loading } from './Loading';\r\nimport { MarkdownViewer } from './MarkdownViewer';\r\nimport { InteractiveToc } from './InteractiveToc';\r\nimport { ArticleBreadcrumb } from './ArticleBreadcrumb';\r\nimport { ArticleBanner } from './ArticleBanner';\r\nimport { ArticleActions } from './ArticleActions';\r\nimport { ArticleFeedback } from './ArticleFeedback';\r\nimport { ArticleNav } from './ArticleNav';\r\nimport { Link } from \"react-router-dom\";\r\nimport { API } from './../API';\r\nimport Error from './Error';\r\n\r\nimport './Article.scss';\r\n\r\nexport class Article extends Component {\r\n static displayName = Article.name;\r\n path = '';\r\n root = '';\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { article: {}, loading: true };\r\n }\r\n\r\n async componentDidMount() {\r\n const { path } = this.props.match.params;\r\n this.path = path;\r\n this.root = path.split('/')[0];\r\n await this.populateData();\r\n this.ensureUrlReplaced();\r\n }\r\n\r\n async componentDidUpdate() {\r\n const { path } = this.props.match.params;\r\n\r\n if (this.path !== path && path !== this.state.article.article.slug) {\r\n this.path = path;\r\n await this.populateData();\r\n this.ensureUrlReplaced();\r\n window.scrollTo(0, 0);\r\n }\r\n\r\n // browser is not scrolling to the anchor probably because we load content asynchronously\r\n const hash = window.location.hash.substring(1);\r\n if (hash && hash.length && hash !== document['data-hash-scrolled']) {\r\n setTimeout(function () {\r\n document['data-hash-scrolled'] = hash;\r\n var target = document.getElementById(hash);\r\n if (target) target.scrollIntoView();\r\n });\r\n }\r\n }\r\n\r\n ensureUrlReplaced() {\r\n if (this.state.article && this.state.article.article) {\r\n var url = \"/articles/\" + this.state.article.article.slug;\r\n if (this.props.location.pathname !== url) {\r\n this.path = this.state.article.article.slug;\r\n this.props.history.replace(url);\r\n }\r\n }\r\n } \r\n\r\n renderArticle() {\r\n if (this.state.article) {\r\n document.title = this.state.article.article.title + \" | Aide Xelya\";\r\n }\r\n\r\n var breadCrumb = [];\r\n if (this.state.article.breadcrumb && this.state.article.breadcrumb.length) {\r\n breadCrumb = this.state.article.breadcrumb.slice(0, -1);\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n {this.path && this.path.length > 0 && this.state.article.menu &&\r\n \r\n }\r\n
\r\n
\r\n

{this.state.article.article.title}

\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n\r\n render() {\r\n if (this.state.error) return ;\r\n else if (this.state.loading) return ;\r\n else if (this.state.article) return this.renderArticle();\r\n else return null;\r\n }\r\n\r\n async populateData() {\r\n var result = await API.getArticleBySlug(this.path);\r\n if (result.error) {\r\n this.setState({ error: result.error });\r\n } else {\r\n this.setState({ article: result.data, loading: false, error: null });\r\n await API.createEvent(\"view\", result.data.article.id);\r\n }\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { Loading } from './Loading';\r\nimport { API } from './../API';\r\nimport Error from './Error';\r\n\r\nexport class GoToArticle extends Component {\r\n static displayName = GoToArticle.name;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { loading: true };\r\n }\r\n\r\n async componentDidMount() {\r\n const { id } = this.props.match.params;\r\n\r\n var result = await API.getArticleById(id);\r\n if (result.error) {\r\n this.setState({ error: result.error });\r\n } else {\r\n // FIXME: we should pass data to Article component instead of doing twice the job\r\n this.props.history.replace('/articles/' + result.data.article.slug);\r\n }\r\n }\r\n\r\n render() {\r\n if (this.state.error) return ;\r\n else if (this.state.loading) return ;\r\n else return null;\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { Container } from 'reactstrap';\r\nimport { Link } from \"react-router-dom\";\r\nimport { Loading } from './Loading';\r\nimport { API } from './../API';\r\nimport { UserSessionService } from './../UserSessionService';\r\nimport Error from './Error';\r\n\r\nimport './Search.scss';\r\n\r\nexport class Search extends Component {\r\n static displayName = Search.name;\r\n\r\n query = '';\r\n pageSize = 10;\r\n pageIndex = 0;\r\n selectedService = '';\r\n unListenHistory = null;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.state = { results: [], loading: true };\r\n }\r\n\r\n async componentDidMount() {\r\n this.setParams(this.props.location);\r\n await this.search();\r\n\r\n this.unListenHistory = this.props.history.listen(async (location, action) => {\r\n this.setParams(location);\r\n await this.search();\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n this.unListenHistory();\r\n }\r\n\r\n setParams(location) {\r\n var params = new URLSearchParams(location.search);\r\n this.query = params.get(\"q\") ?? \"\";\r\n this.pageIndex = parseInt(params.get(\"p\") ?? \"0\", 10);\r\n this.selectedService = params.get(\"s\") ?? \"\";\r\n }\r\n\r\n refreshUrl() {\r\n this.props.history.replace('/search?q=' + encodeURIComponent(this.query) + '&s=' + encodeURIComponent(this.selectedService) + '&p=' + encodeURIComponent(this.pageIndex));\r\n }\r\n\r\n async previous(event) {\r\n this.pageIndex = this.pageIndex - 1;\r\n this.refreshUrl();\r\n }\r\n\r\n async next(event) {\r\n this.pageIndex = this.pageIndex + 1;\r\n this.refreshUrl();\r\n }\r\n\r\n async changeService(service) {\r\n this.pageIndex = 0;\r\n this.selectedService = service;\r\n this.refreshUrl();\r\n }\r\n\r\n async search() {\r\n document.title = \"Recherche \\\"\" + this.query + \"\\\" | Aide Xelya\";\r\n\r\n if (!this.query || !this.query.length) {\r\n this.setState({ hitCount: 0, results: [], loading: false });\r\n } else {\r\n\r\n var result = await API.search(this.query, this.pageIndex * this.pageSize, this.pageSize, this.selectedService);\r\n if (result.error) {\r\n this.setState({ error: result.error });\r\n } else {\r\n\r\n var user = UserSessionService.get();\r\n var serviceNames = {};\r\n if (user && user.services) {\r\n user.services.forEach((o) => {\r\n serviceNames[o.id] = o.displayName;\r\n });\r\n }\r\n\r\n var servicesAggs = [{\r\n key: '',\r\n label: 'Tous',\r\n docCount: result.data.aggregations.services.sumOtherDocCount\r\n }];\r\n\r\n result.data.aggregations.services.buckets.forEach((o) => {\r\n servicesAggs.push({ key: o.key, label: serviceNames[o.key] ?? 'N/A', docCount: o.docCount });\r\n servicesAggs[0].docCount += o.docCount;\r\n });\r\n\r\n this.setState({\r\n hitCount: result.data.hitCount,\r\n took: result.data.took,\r\n results: result.data.results,\r\n aggregations: { services: servicesAggs },\r\n loading: false,\r\n error: null\r\n });\r\n }\r\n }\r\n }\r\n\r\n renderResults() {\r\n var filterItemCssClass = 'list-group-item list-group-item-action d-flex justify-content-between align-items-center search-filter-item';\r\n var filterItemActiveCssClass = 'list-group-item list-group-item-action d-flex justify-content-between align-items-center active search-filter-item';\r\n var filterBadgeCssClass = 'badge badge-primary badge-pill';\r\n var filterBadgeActiveCssClass = 'badge badge-light badge-pill';\r\n\r\n if (this.state.hitCount === 0) {\r\n return \r\n
\r\n
\r\n

\r\n

Aucun résultat pour \"{this.query}\"

\r\n
Désolé, nous n'avons rien trouvé qui corresponde à votre recherche
\r\n
\r\n
\r\n
;\r\n } else {\r\n return \r\n
\r\n
\r\n
\r\n
Service
\r\n
\r\n {this.state.aggregations.services.map(bucket =>\r\n \r\n )}\r\n
\r\n
\r\n
\r\n {this.pageIndex * this.pageSize + 1}-{(((this.pageIndex + 1) * this.pageSize) > this.state.hitCount ? this.state.hitCount : (this.pageIndex + 1) * this.pageSize)} sur {this.state.hitCount} résultats\r\n ({this.state.took / 1000} secondes)\r\n
\r\n {this.state.results.map(result =>\r\n
\r\n {result.source.title}
\r\n
\r\n
{result.source.slug}
\r\n {result.highlight && result.highlight['bodySearchable'] && result.highlight['bodySearchable'].length > 0 &&\r\n \r\n }\r\n
\r\n
\r\n )}\r\n
\r\n {this.state.hitCount > this.pageSize &&\r\n
\r\n \r\n \r\n
\r\n }\r\n
\r\n
\r\n
\r\n
;\r\n }\r\n }\r\n\r\n render() {\r\n if (this.state.error) return ;\r\n else if (this.state.loading) return ;\r\n else return
{this.renderResults()}
;\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { Route, Switch } from 'react-router';\r\nimport { Layout } from './components/Layout';\r\nimport { Books } from './components/Books';\r\nimport { Article } from './components/Article';\r\nimport { GoToArticle } from './components/GoToArticle';\r\nimport { Search } from './components/Search';\r\nimport Error from './components/Error';\r\n\r\nimport './App.scss'\r\nimport './dark-mode.scss'\r\n\r\nexport default class App extends Component {\r\n static displayName = App.name;\r\n\r\n render() {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}","// In production, we register a service worker to serve assets from local cache.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\r\n// cached resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\r\n// This link also includes instructions on opting out of this behavior.\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport default function register () {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Lets check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl);\r\n } else {\r\n // Is not local host. Just register service worker\r\n registerValidSW(swUrl);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW (swUrl) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and\r\n // the fresh content will have been added to the cache.\r\n // It's the perfect time to display a \"New content is\r\n // available; please refresh.\" message in your web app.\r\n console.log('New content is available; please refresh.');\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker (swUrl) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n if (\r\n response.status === 404 ||\r\n response.headers.get('content-type').indexOf('javascript') === -1\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister () {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import 'bootstrap/dist/css/bootstrap.css';\r\nimport 'bootstrap-icons/font/bootstrap-icons.css';\r\nimport 'bootstrap/dist/js/bootstrap.bundle.min';\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { BrowserRouter } from 'react-router-dom';\r\nimport App from './App';\r\nimport { unregister as unregisterServiceWorker } from './registerServiceWorker';\r\n\r\nconst rootElement = document.getElementById('root');\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n rootElement);\r\n\r\n// don't register service worker because it breaks navigation to MVC controller action in production stage.\r\nunregisterServiceWorker();\r\n\r\n"],"sourceRoot":""}