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

1 line
No EOL
9.9 KiB
Text

{"version":3,"file":"password.nomodule.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":["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,gBAAgB,GAAG;EAChC,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;EACzD,EAAE,MAAM,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;EACzD,CAAC;;ECFD,IAAM,cAAc;;;;;;;;;;;;IAClB,gBAAW,oCAAqB;EAClC,IAAI,OAAO,gBAAgB,CAAC;EAC5B,IAAG;AACH;EACA,2BAAE,wBAAQ;EACV,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;EACvB,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;EACrD,IAAI,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;EAC/B,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC;EACrC,IAAG;AACH;EACA,EAAE,mBAAI,wBAAS;EAC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