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

1 line
No EOL
8.1 KiB
Text

{"version":3,"file":"password.module.min.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":["api","window","PasswordEmission","TOGGLE","internals","ns","emission","ADJUST","PasswordToggle","core","Instance","instanceClassName","init","this","listenClick","ascend","width","isSwappingFont","_isChecked","isChecked","style","getComputedStyle","node","parentNode","parseInt","checked","value","handleClick","swapFont","families","Password","addAscent","toggle","bind","adjust","descend","PasswordSelector","PASSWORD","selector","INPUT","LABEL","TOOGLE","PasswordInput","addDescent","_isRevealed","hasAttribute","listen","capslock","isRevealed","setAttribute","event","getModifierState","attr","removeAttribute","PasswordLabel","valueREM","Math","ceil","paddingRight","password","register"],"mappings":";AAAA,MCCMA,EAAMC,OAAuB,KCCtBC,EAAmB,CAC9BC,OAAQH,EAAII,UAAUC,GAAGC,SAAS,WAAY,UAC9CC,OAAQP,EAAII,UAAUC,GAAGC,SAAS,WAAY,WCDhD,MAAME,UAAuBR,EAAIS,KAAKC,SACzBC,+BACT,MAAO,iBAGTC,OACEC,KAAKC,cACLD,KAAKE,OAAOb,EAAiBK,OAAQM,KAAKG,OAC1CH,KAAKI,gBAAiB,EACtBJ,KAAKK,WAAaL,KAAKM,UAGrBH,YACF,MAAMI,EAAQC,iBAAiBR,KAAKS,KAAKC,YACzC,OAAOC,SAASJ,EAAMJ,OAGpBG,gBACF,OAAON,KAAKS,KAAKG,QAGfN,cAAWO,GACbb,KAAKK,WAAaQ,EAClBb,KAAKE,OAAOb,EAAiBC,OAAQuB,GAGvCC,cACEd,KAAKM,WAAaN,KAAKK,WAGzB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