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

1 line
No EOL
10 KiB
Text

{"version":3,"file":"password.module.js","sources":["../../../.config/config.js","../../../src/core/api.js","../../../src/component/password/script/password/password-emission.js","../../../src/component/password/script/password/password-toggle.js","../../../src/component/password/script/password/password.js","../../../src/component/password/script/password/password-selector.js","../../../src/component/password/script/password/password-input.js","../../../src/component/password/script/password/password-label.js","../../../src/component/password/index.js","../../../src/component/password/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 PasswordEmission = {\n TOGGLE: api.internals.ns.emission('password', 'toggle'),\n ADJUST: api.internals.ns.emission('password', 'adjust')\n};\n","import api from '../../api.js';\nimport { PasswordEmission } from './password-emission.js';\n\nclass PasswordToggle extends api.core.Instance {\n static get instanceClassName () {\n return 'PasswordToggle';\n }\n\n init () {\n this.listenClick();\n this.ascend(PasswordEmission.ADJUST, this.width);\n this.isSwappingFont = true;\n this._isChecked = this.isChecked;\n }\n\n get width () {\n const style = getComputedStyle(this.node.parentNode);\n return parseInt(style.width);\n }\n\n get isChecked () {\n return this.node.checked;\n }\n\n set isChecked (value) {\n this._isChecked = value;\n this.ascend(PasswordEmission.TOGGLE, value);\n }\n\n handleClick () {\n this.isChecked = !this._isChecked;\n }\n\n swapFont (families) {\n this.ascend(PasswordEmission.ADJUST, this.width);\n }\n}\n\nexport { PasswordToggle };\n","import api from '../../api.js';\nimport { PasswordEmission } from './password-emission.js';\n\nclass Password extends api.core.Instance {\n static get instanceClassName () {\n return 'Password';\n }\n\n init () {\n this.addAscent(PasswordEmission.TOGGLE, this.toggle.bind(this));\n this.addAscent(PasswordEmission.ADJUST, this.adjust.bind(this));\n }\n\n toggle (value) {\n this.descend(PasswordEmission.TOGGLE, value);\n }\n\n adjust (value) {\n this.descend(PasswordEmission.ADJUST, value);\n }\n}\n\nexport { Password };\n","import api from '../../api.js';\n\nexport const PasswordSelector = {\n PASSWORD: api.internals.ns.selector('password'),\n INPUT: api.internals.ns.selector('password__input'),\n LABEL: api.internals.ns.selector('password__label'),\n TOOGLE: `${api.internals.ns.selector('password__checkbox')} input[type=\"checkbox\"]`\n};\n","import api from '../../api.js';\nimport { PasswordEmission } from './password-emission.js';\n\nclass PasswordInput extends api.core.Instance {\n static get instanceClassName () {\n return 'PasswordInput';\n }\n\n init () {\n this.addDescent(PasswordEmission.TOGGLE, this.toggle.bind(this));\n this._isRevealed = this.hasAttribute('type') === 'password';\n this.listen('keydown', this.capslock.bind(this)); // for capslock enabled\n this.listen('keyup', this.capslock.bind(this)); // for capslock desabled\n }\n\n toggle (value) {\n this.isRevealed = value;\n this.setAttribute('type', value ? 'text' : 'password');\n }\n\n get isRevealed () {\n return this._isRevealed;\n }\n\n capslock (event) {\n if (event && typeof event.getModifierState !== 'function') return;\n if (event.getModifierState('CapsLock')) {\n this.node.parentNode.setAttribute(api.internals.ns.attr('capslock'), '');\n } else {\n this.node.parentNode.removeAttribute(api.internals.ns.attr('capslock'));\n }\n }\n\n set isRevealed (value) {\n this._isRevealed = value;\n this.setAttribute('type', value ? 'text' : 'password');\n }\n}\n\nexport { PasswordInput };\n","import api from '../../api.js';\nimport { PasswordEmission } from './password-emission.js';\n\nclass PasswordLabel extends api.core.Instance {\n static get instanceClassName () {\n return 'PasswordLabel';\n }\n\n init () {\n this.addDescent(PasswordEmission.ADJUST, this.adjust.bind(this));\n }\n\n adjust (value) {\n const valueREM = Math.ceil(value / 16);\n this.node.style.paddingRight = valueREM + 'rem';\n }\n}\n\nexport { PasswordLabel };\n","import api from './api.js';\nimport { PasswordToggle } from './script/password/password-toggle.js';\nimport { Password } from './script/password/password.js';\nimport { PasswordSelector } from './script/password/password-selector.js';\nimport { PasswordInput } from './script/password/password-input.js';\nimport { PasswordLabel } from './script/password/password-label.js';\n\napi.password = {\n Password: Password,\n PasswordToggle: PasswordToggle,\n PasswordSelector: PasswordSelector,\n PasswordInput: PasswordInput,\n PasswordLabel: PasswordLabel\n};\n\nexport default api;\n","import api from './index.js';\n\napi.internals.register(api.password.PasswordSelector.INPUT, api.password.PasswordInput);\napi.internals.register(api.password.PasswordSelector.PASSWORD, api.password.Password);\napi.internals.register(api.password.PasswordSelector.TOOGLE, api.password.PasswordToggle);\napi.internals.register(api.password.PasswordSelector.LABEL, api.password.PasswordLabel);\n\nexport default api;\n"],"names":[],"mappings":";;AAAA,MAAM,MAAM,GAAG;AACf,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,YAAY,EAAE,SAAS;AACzB,EAAE,OAAO,EAAE,QAAQ;AACnB,CAAC;;ACJD,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;;ACC7B,MAAM,gBAAgB,GAAG;AAChC,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;AACzD,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;AACzD,CAAC;;ACFD,MAAM,cAAc,SAAS,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC/C,EAAE,WAAW,iBAAiB,CAAC,GAAG;AAClC,IAAI,OAAO,gBAAgB,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,CAAC,GAAG;AACV,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;AACvB,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;AACrD,IAAI,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;AAC/B,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,G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