TP_JO2024/home/dist/component/breadcrumb/breadcrumb.nomodule.js.map
2024-03-27 17:19:37 +01:00

1 line
No EOL
6.5 KiB
Text

{"version":3,"file":"breadcrumb.nomodule.js","sources":["../../../.config/config.js","../../../src/core/api.js","../../../src/component/breadcrumb/script/breadcrumb/breadcrumb-selector.js","../../../src/component/breadcrumb/script/breadcrumb/breadcrumb.js","../../../src/component/breadcrumb/index.js","../../../src/component/breadcrumb/main.js"],"sourcesContent":["const config = {\r\n prefix: 'fr',\r\n namespace: 'dsfr',\r\n organisation: '@gouvfr',\r\n version: '1.11.2'\r\n};\r\n\r\nexport default config;\r\n","import config from './config.js';\nconst api = window[config.namespace];\nexport default api;\n","import api from '../../api.js';\n\nexport const BreadcrumbSelector = {\n BREADCRUMB: api.internals.ns.selector('breadcrumb'),\n BUTTON: api.internals.ns.selector('breadcrumb__button')\n};\n","import api from '../../api.js';\nimport { BreadcrumbSelector } from './breadcrumb-selector.js';\n\nclass Breadcrumb extends api.core.Instance {\n constructor () {\n super();\n this.count = 0;\n this.focusing = this.focus.bind(this);\n }\n\n static get instanceClassName () {\n return 'Breadcrumb';\n }\n\n init () {\n this.getCollapse();\n this.isResizing = true;\n }\n\n get proxy () {\n const scope = this;\n return Object.assign(super.proxy, {\n focus: scope.focus.bind(scope),\n disclose: scope.collapse.disclose.bind(scope.collapse)\n });\n }\n\n getCollapse () {\n const collapse = this.collapse;\n if (collapse) {\n collapse.listen(api.core.DisclosureEvent.DISCLOSE, this.focusing);\n } else {\n this.addAscent(api.core.DisclosureEmission.ADDED, this.getCollapse.bind(this));\n }\n }\n\n resize () {\n const collapse = this.collapse;\n const links = this.links;\n if (!collapse || !links.length) return;\n\n if (this.isBreakpoint(api.core.Breakpoints.MD)) {\n if (collapse.buttonHasFocus) links[0].focus();\n } else {\n if (links.indexOf(document.activeElement) > -1) collapse.focus();\n }\n }\n\n get links () {\n return [...this.querySelectorAll('a[href]')];\n }\n\n get collapse () {\n return this.element.getDescendantInstances(api.core.Collapse.instanceClassName, null, true)[0];\n }\n\n focus () {\n this.count = 0;\n this._focus();\n }\n\n _focus () {\n const link = this.links[0];\n if (!link) return;\n link.focus();\n this.request(this.verify.bind(this));\n }\n\n verify () {\n this.count++;\n if (this.count > 100) return;\n const link = this.links[0];\n if (!link) return;\n if (document.activeElement !== link) this._focus();\n }\n\n get collapsePrimary () {\n const buttons = this.element.children.map(child => child.getInstance('CollapseButton')).filter(button => button !== null && button.hasClass(BreadcrumbSelector.BUTTON));\n return buttons[0];\n }\n}\n\nexport { Breadcrumb };\n","import api from './api.js';\nimport { Breadcrumb } from './script/breadcrumb/breadcrumb.js';\nimport { BreadcrumbSelector } from './script/breadcrumb/breadcrumb-selector.js';\n\napi.breadcrumb = {\n BreadcrumbSelector: BreadcrumbSelector,\n Breadcrumb: Breadcrumb\n};\n\nexport default api;\n","import api from './index.js';\n\napi.internals.register(api.breadcrumb.BreadcrumbSelector.BREADCRUMB, api.breadcrumb.Breadcrumb);\n\nexport default api;\n"],"names":["const","super"],"mappings":";;;;;EAAAA,IAAM,MAAM,GAAG;EACf,EAAE,MAAM,EAAE,IAAI;EACd,EAAE,SAAS,EAAE,MAAM;EACnB,EAAE,YAAY,EAAE,SAAS;EACzB,EAAE,OAAO,EAAE,QAAQ;EACnB,CAAC;;ECJDA,IAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;;ECC7BA,IAAM,kBAAkB,GAAG;EAClC,EAAE,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;EACrD,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;EACzD,CAAC;;ECFD,IAAM,UAAU;IACd,mBAAW,IAAI;EACjB,IAAIC,eAAK,KAAC,CAAC,CAAC;EACZ,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;EACnB,IAAI,IAAI,CAAC,QAAQ,GAAG,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