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

1 line
No EOL
6.9 KiB
Text

{"version":3,"file":"segmented.nomodule.js","sources":["../../../.config/config.js","../../../src/core/api.js","../../../src/component/segmented/script/segmented/segmented-selector.js","../../../src/component/segmented/script/segmented/segmented-emission.js","../../../src/component/segmented/script/segmented/segmented.js","../../../src/component/segmented/script/segmented/segmented-element.js","../../../src/component/segmented/index.js","../../../src/component/segmented/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 SegmentedSelector = {\n SEGMENTED: api.internals.ns.selector('segmented'),\n SEGMENTED_ELEMENTS: api.internals.ns.selector('segmented__elements'),\n SEGMENTED_ELEMENT: api.internals.ns.selector('segmented__element input'),\n SEGMENTED_LEGEND: api.internals.ns.selector('segmented__legend')\n};\n","import api from '../../api.js';\n\nconst SegmentedEmission = {\n ADDED: api.internals.ns.emission('segmented', 'added'),\n REMOVED: api.internals.ns.emission('segmented', 'removed')\n};\n\nexport { SegmentedEmission };\n","import api from '../../api.js';\nimport { SegmentedSelector } from './segmented-selector.js';\nimport { SegmentedEmission } from './segmented-emission.js';\n\nclass Segmented extends api.core.Instance {\n static get instanceClassName () {\n return 'Segmented';\n }\n\n init () {\n this.elements = this.node.querySelector(SegmentedSelector.SEGMENTED_ELEMENTS);\n this.legend = this.node.querySelector(SegmentedSelector.SEGMENTED_LEGEND);\n this.addAscent(SegmentedEmission.ADDED, this.resize.bind(this));\n this.addAscent(SegmentedEmission.REMOVED, this.resize.bind(this));\n this._isLegendInline = this.legend && this.legend.classList.contains(`${api.prefix}-segmented__legend--inline`);\n this.isResizing = true;\n }\n\n resize () {\n const SEGMENTED_VERTICAL = `${api.prefix}-segmented--vertical`;\n const LEGEND_INLINE = `${api.prefix}-segmented__legend--inline`;\n const gapOffset = 16;\n\n this.removeClass(SEGMENTED_VERTICAL);\n\n if (this._isLegendInline) {\n this.legend.classList.add(LEGEND_INLINE);\n\n if (this.node.offsetWidth > this.node.parentNode.offsetWidth || (this.elements.scrollWidth + this.legend.offsetWidth + gapOffset) > this.node.parentNode.offsetWidth) {\n this.legend.classList.remove(LEGEND_INLINE);\n }\n }\n\n if (this.elements.offsetWidth > this.node.parentNode.offsetWidth || this.elements.scrollWidth > this.node.parentNode.offsetWidth) {\n this.addClass(SEGMENTED_VERTICAL);\n } else {\n this.removeClass(SEGMENTED_VERTICAL);\n }\n }\n}\n\nexport { Segmented };\n","import api from '../../api.js';\nimport { SegmentedEmission } from './segmented-emission.js';\n\nclass SegmentedElement extends api.core.Instance {\n static get instanceClassName () {\n return 'SegmentedElement';\n }\n\n init () {\n this.ascend(SegmentedEmission.ADDED);\n }\n\n dispose () {\n this.ascend(SegmentedEmission.REMOVED);\n }\n}\n\nexport { SegmentedElement };\n","import api from './api.js';\nimport { Segmented } from './script/segmented/segmented.js';\nimport { SegmentedElement } from './script/segmented/segmented-element.js';\nimport { SegmentedSelector } from './script/segmented/segmented-selector.js';\nimport { SegmentedEmission } from './script/segmented/segmented-emission.js';\n\napi.segmented = {\n SegmentedSelector: SegmentedSelector,\n SegmentedEmission: SegmentedEmission,\n SegmentedElement: SegmentedElement,\n Segmented: Segmented\n};\n\nexport default api;\n","import api from './index.js';\n\napi.internals.register(api.segmented.SegmentedSelector.SEGMENTED, api.segmented.Segmented);\napi.internals.register(api.segmented.SegmentedSelector.SEGMENTED_ELEMENT, api.segmented.SegmentedElement);\n\nexport default api;\n"],"names":["const"],"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,M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