TP_JO2024/home/dist/component/display/display.nomodule.js.map

1 line
5.2 KiB
Text
Raw Normal View History

2024-03-27 17:19:37 +01:00
{"version":3,"file":"display.nomodule.js","sources":["../../../.config/config.js","../../../src/core/api.js","../../../src/component/display/script/display/display-selector.js","../../../src/component/display/script/display/display.js","../../../src/component/display/index.js","../../../src/component/display/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 DisplaySelector = {\n DISPLAY: api.internals.ns.selector('display'),\n RADIO_BUTTONS: `input[name=\"${api.internals.ns('radios-theme')}\"]`,\n FIELDSET: api.internals.ns.selector('fieldset')\n};\n","import api from '../../api.js';\nimport { DisplaySelector } from './display-selector.js';\n\nclass Display extends api.core.Instance {\n static get instanceClassName () {\n return 'Display';\n }\n\n init () {\n this.radios = this.querySelectorAll(DisplaySelector.RADIO_BUTTONS);\n\n if (api.scheme) {\n this.changing = this.change.bind(this);\n for (const radio of this.radios) radio.addEventListener('change', this.changing);\n this.addDescent(api.scheme.SchemeEmission.SCHEME, this.apply.bind(this));\n this.ascend(api.scheme.SchemeEmission.ASK);\n } else {\n this.querySelector(DisplaySelector.FIELDSET).setAttribute('disabled', '');\n }\n }\n\n get scheme () {\n return this._scheme;\n }\n\n set scheme (value) {\n if (this._scheme === value || !api.scheme) return;\n switch (value) {\n case api.scheme.SchemeValue.SYSTEM:\n case api.scheme.SchemeValue.LIGHT:\n case api.scheme.SchemeValue.DARK:\n this._scheme = value;\n for (const radio of this.radios) {\n radio.checked = radio.value === value;\n }\n this.ascend(api.scheme.SchemeEmission.SCHEME, value);\n break;\n }\n }\n\n change () {\n for (const radio of this.radios) {\n if (radio.checked) {\n this.scheme = radio.value;\n return;\n }\n }\n }\n\n apply (value) {\n this.scheme = value;\n }\n\n dispose () {\n for (const radio of this.radios) radio.removeEventListener('change', this.changing);\n }\n}\n\nexport { Display };\n","import api from './api.js';\nimport { Display } from './script/display/display.js';\nimport { DisplaySelector } from './script/display/display-selector.js';\n\napi.display = {\n Display: Display,\n DisplaySelector: DisplaySelector\n};\n\nexport default api;\n","import api from './index.js';\n\napi.internals.register(api.display.DisplaySelector.DISPLAY, api.display.Display);\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,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;;ECC7BA,IAAM,eAAe,GAAG;EAC/B,EAAE,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;EAC/C,EAAE,aAAa,sBAAiB,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,cAAc,EAAC,SAAI;EACpE,EAAE,QAAQ,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;EACjD,CAAC;;ECHD,IAAM,OAAO;;;;;;;;;;;;IACX,gBAAW,oCAAqB;EAClC,IAAI,OAAO,SAAS,CAAC;EACrB,IAAG;AACH;EACA,oBAAE,wBAAQ;EACV,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;AACvE;EACA,IAAI,IAAI,GAAG,CAAC,MAAM,EAAE;EACpB,MAAM,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;EAC7C,MAAM,uBAAoB,IAAI,CAAC,+BAAM;UAA1BA,IAAM;;UAAsB,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CA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