@descope/web-components-ui 2.3.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/dist/cjs/index.cjs.js +16884 -16946
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +5291 -5373
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/9365.js +1 -1
  6. package/dist/umd/9365.js.map +1 -1
  7. package/dist/umd/DescopeDev.js +1 -1
  8. package/dist/umd/DescopeDev.js.map +1 -1
  9. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
  10. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js.map +1 -1
  11. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
  12. package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js.map +1 -1
  13. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  14. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
  15. package/dist/umd/descope-alert-index-js.js +1 -1
  16. package/dist/umd/descope-alert-index-js.js.map +1 -1
  17. package/dist/umd/descope-code-snippet-index-js.js +1 -1
  18. package/dist/umd/descope-code-snippet-index-js.js.map +1 -1
  19. package/dist/umd/descope-container-index-js.js +1 -1
  20. package/dist/umd/descope-container-index-js.js.map +1 -1
  21. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  22. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  23. package/dist/umd/descope-date-field-index-js.js +1 -1
  24. package/dist/umd/descope-date-field-index-js.js.map +1 -1
  25. package/dist/umd/descope-divider-index-js.js +1 -1
  26. package/dist/umd/descope-divider-index-js.js.map +1 -1
  27. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -1
  28. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -1
  29. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
  30. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -1
  31. package/dist/umd/descope-grid-index-js.js +1 -1
  32. package/dist/umd/descope-grid-index-js.js.map +1 -1
  33. package/dist/umd/descope-hybrid-field-index-js.js +1 -1
  34. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
  35. package/dist/umd/descope-loader-linear-index-js.js +1 -1
  36. package/dist/umd/descope-loader-linear-index-js.js.map +1 -1
  37. package/dist/umd/descope-loader-radial-index-js.js +1 -1
  38. package/dist/umd/descope-loader-radial-index-js.js.map +1 -1
  39. package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
  40. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  41. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
  42. package/dist/umd/descope-new-password-index-js.js +1 -1
  43. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  44. package/dist/umd/descope-notification-index-js.js.map +1 -1
  45. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  46. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js.map +1 -1
  47. package/dist/umd/descope-passcode-index-js.js +1 -1
  48. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  49. package/dist/umd/descope-policy-validation-index-js.js +1 -1
  50. package/dist/umd/descope-policy-validation-index-js.js.map +1 -1
  51. package/dist/umd/descope-radio-group-index-js.js.map +1 -1
  52. package/dist/umd/descope-recaptcha-index-js.js +1 -1
  53. package/dist/umd/descope-recaptcha-index-js.js.map +1 -1
  54. package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
  55. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  56. package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
  57. package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
  58. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
  59. package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
  60. package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -1
  61. package/dist/umd/descope-upload-file-index-js.js +1 -1
  62. package/dist/umd/descope-upload-file-index-js.js.map +1 -1
  63. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  64. package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
  65. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  66. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
  67. package/dist/umd/index.js.map +1 -1
  68. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js.map +1 -1
  69. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  70. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
  71. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  72. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
  73. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  74. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
  75. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  76. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
  77. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
  78. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
  79. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  80. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  81. package/package.json +32 -32
  82. package/src/baseClasses/createBaseClass.js +1 -1
  83. package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +0 -2
  84. package/src/components/button-selection-group-fields/createBaseButtonSelectionGroupInternalClass.js +1 -3
  85. package/src/components/button-selection-group-fields/descope-button-multi-selection-group-internal/ButtonMultiSelectionGroupInternalClass.js +0 -1
  86. package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +2 -2
  87. package/src/components/descope-alert/AlertClass.js +2 -2
  88. package/src/components/descope-code-snippet/CodeSnippetClass.js +1 -1
  89. package/src/components/descope-code-snippet/helpers.js +1 -3
  90. package/src/components/descope-container/ContainerClass.js +1 -1
  91. package/src/components/descope-date-field/DateCounterClass.js +1 -1
  92. package/src/components/descope-date-field/DateFieldClass.js +4 -5
  93. package/src/components/descope-date-field/descope-calendar/CalendarClass.js +2 -2
  94. package/src/components/descope-date-field/descope-calendar/helpers.js +1 -3
  95. package/src/components/descope-divider/DividerClass.js +2 -2
  96. package/src/components/descope-grid/GridClass.js +15 -19
  97. package/src/components/descope-grid/descope-grid-custom-column/GridCustomColumnClass.js +0 -1
  98. package/src/components/descope-grid/descope-grid-custom-column/index.js +0 -1
  99. package/src/components/descope-grid/descope-grid-item-details-column/GridItemDetailsColumnClass.js +0 -2
  100. package/src/components/descope-grid/descope-grid-selection-column/GridSelectionColumnClass.js +0 -3
  101. package/src/components/descope-grid/descope-grid-text-column/GridTextColumnClass.js +0 -1
  102. package/src/components/descope-grid/helpers.js +1 -3
  103. package/src/components/descope-hybrid-field/HybridFieldClass.js +1 -1
  104. package/src/components/descope-loader-linear/LoaderLinearClass.js +1 -1
  105. package/src/components/descope-loader-radial/LoaderRadialClass.js +1 -1
  106. package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +3 -9
  107. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +3 -6
  108. package/src/components/descope-notification/NotificationClass.js +0 -2
  109. package/src/components/descope-passcode/PasscodeClass.js +1 -1
  110. package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +1 -3
  111. package/src/components/descope-passcode/descope-passcode-internal/helpers.js +1 -3
  112. package/src/components/descope-policy-validation/PolicyValidationClass.js +1 -2
  113. package/src/components/descope-radio-group/RadioGroupClass.js +3 -8
  114. package/src/components/descope-recaptcha/RecaptchaClass.js +1 -1
  115. package/src/components/descope-scopes-list/ScopesListClass.js +0 -3
  116. package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +5 -8
  117. package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +3 -4
  118. package/src/components/descope-third-party-app-logo/ThirdPartyAppLogoClass.js +1 -1
  119. package/src/components/descope-upload-file/UploadFileClass.js +2 -2
  120. package/src/components/descope-upload-file/helpers.js +3 -6
  121. package/src/components/descope-user-attribute/UserAttributeClass.js +4 -4
  122. package/src/components/descope-user-auth-method/UserAuthMethodClass.js +5 -5
  123. package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +1 -1
  124. package/src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/MappingsFieldInternal.js +0 -1
  125. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -1
  126. package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +1 -1
  127. package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -1
  128. package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js +1 -1
  129. package/src/components/phone-fields/helpers.js +2 -3
  130. package/src/helpers/componentHelpers.js +0 -1
  131. package/src/helpers/themeHelpers/colorsHelpers.js +2 -3
  132. package/src/helpers/themeHelpers/index.js +4 -6
  133. package/src/helpers/themeHelpers/resetHelpers.js +1 -3
  134. package/src/index.umd.js +0 -1
  135. package/src/mixins/createDynamicDataMixin.js +0 -1
  136. package/src/mixins/createStyleMixin/helpers.js +1 -1
  137. package/src/mixins/createStyleMixin/index.js +1 -2
  138. package/src/mixins/externalInputHelpers.js +0 -2
  139. package/src/mixins/externalInputMixin.js +1 -1
  140. package/src/mixins/inputValidationMixin.js +0 -4
  141. package/src/mixins/normalizeBooleanAttributesMixin.js +1 -3
  142. package/src/mixins/portalMixin.js +0 -1
  143. package/src/mixins/proxyInputMixin.js +0 -1
  144. package/src/theme/components/alert.js +1 -1
  145. package/src/theme/components/index.js +22 -22
@@ -1 +1 @@
1
- {"version":3,"file":"descope-new-password-index-js.js","mappings":"yMASO,MAAMA,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,sHCPhB,MAAMC,GAAgB,QAAiB,gBAExCC,EAAoB,IAAsBC,YAsF1C,KACJC,EAAI,MACJC,EAAK,sBACLC,EAAqB,aACrBC,EAAY,WACZC,EAAU,cACVC,EAAa,cACbC,GACE,CACFN,KAAM,CAAEO,SAAU,IAAM,SACxBN,MAAO,CAAEM,SAAU,iBACnBL,sBAAuB,CAAEK,SAAU,0CACnCH,WAAY,CAAEG,SAAU,uBACxBJ,aAAc,CAAEI,SAAU,yBAC1BF,cAAe,CAAEE,SAAU,oBAC3BD,cAAe,CAAEC,SAAU,8BAGhBC,GAAmB,SAC9B,QAAiB,CACfC,SAAU,CACRC,SAAU,CACRV,EACA,CAAC,EACD,CACEO,SAAU,IAAcV,cACxBc,SAAU,IAAcZ,WAAWW,WAGvCE,WAAY,CAACX,EAAOE,EAAcC,GAClCS,cAAe,IAAKZ,EAAOU,SAAU,aACrCG,gBAAiB,IAAKb,EAAOU,SAAU,eACvCI,eAAgB,IAAKd,EAAOU,SAAU,SACtCK,sBAAuB,IAAKb,EAAcQ,SAAU,SACpDM,iBAAkB,IAAKd,EAAcQ,SAAU,oBAC/CO,qBAAsB,IAAKf,EAAcQ,SAAU,mBACnDQ,wBAAyB,IAAKhB,EAAcQ,SAAU,wBACtDS,uBAAwB,IAAKjB,EAAcQ,SAAU,qBACrDU,yBAA0B,IAAKlB,EAAcQ,SAAU,uBACvDW,qBAAsB,IAAKnB,EAAcQ,SAAU,aACnDY,UAAW,IAAKvB,EAAMW,SAAU,SAChCa,aAAc,IAAKxB,EAAMW,SAAU,aACnCc,cAAe,CACb,IAAKzB,EAAMW,SAAU,aACrB,IAAKN,EAAeM,SAAU,IAAcZ,WAAW0B,gB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S,SAAU,aACzCgT,eAAgB,IAAKZ,EAAWpS,SAAU,SAC1CiT,kBAAmB,CACjB,IAAKrM,EAAO5G,SAAU,yBACtB,IAAK4G,EAAO5G,SAAU,iBACtB,IAAK8C,EAAe9C,SAAU,yBAC9B,IAAK8C,EAAe9C,SAAU,kB","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/NewPasswordClass.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/descope-new-password-internal/componentName.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/descope-new-password-internal/index.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/index.js","webpack://@descope/web-components-ui/./src/components/descope-password/PasswordClass.js","webpack://@descope/web-components-ui/./src/components/descope-password/index.js","webpack://@descope/web-components-ui/./src/components/descope-password/passwordDraggableMixin.js","webpack://@descope/web-components-ui/./src/components/descope-policy-validation/PolicyValidationClass.js","webpack://@descope/web-components-ui/./src/components/descope-policy-validation/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-policy-validation/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js"],"sourcesContent":["import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { compose } from '../../helpers';\nimport { createStyleMixin, proxyInputMixin, draggableMixin, createProxy } from '../../mixins';\nimport { componentName as descopeInternalComponentName } from './descope-new-password-internal/componentName';\nimport { PasswordClass } from '../descope-password/PasswordClass';\nimport { useHostExternalPadding } from '../../helpers/themeHelpers/resetHelpers';\nimport { PolicyValidationClass } from '../descope-policy-validation/PolicyValidationClass';\n\nexport const componentName = getComponentName('new-password');\n\nconst policyPreviewVars = PolicyValidationClass.cssVarList;\n\nconst customMixin = (superclass) =>\n class NewPasswordMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n const externalInputAttr = this.getAttribute('external-input');\n\n template.innerHTML = `\n\t\t\t<${descopeInternalComponentName}\n\t\t\t\tname=\"new-password\"\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\tslot=\"input\"\n external-input=\"${externalInputAttr}\"\n\t\t\t>\n </${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n if (this.getAttribute('external-input') === 'true') {\n this.initExternalInput();\n }\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'password-label',\n 'password-placeholder',\n 'confirm-label',\n 'confirm-placeholder',\n 'full-width',\n 'size',\n 'bordered',\n 'label',\n 'has-confirm',\n 'invalid',\n 'readonly',\n 'disabled',\n 'draggable',\n 'has-validation',\n 'policy-label',\n 'active-policies',\n 'available-policies',\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'label-type',\n 'manual-visibility-toggle',\n ],\n });\n }\n\n createSlottedExternalInput(node, slotName) {\n const externalInput = node.querySelector('input');\n const slotEle = document.createElement('slot');\n\n const targetSlot = externalInput.getAttribute('slot');\n\n slotEle.setAttribute('name', slotName);\n slotEle.setAttribute('slot', targetSlot);\n\n node.appendChild(slotEle);\n\n // move external input\n externalInput.setAttribute('slot', slotName);\n externalInput.setAttribute('name', this.getAttribute('name'));\n externalInput.setAttribute('data-hidden-input', 'true');\n\n this.appendChild(externalInput);\n }\n\n initExternalInput() {\n // get descope input components\n this.passwordInput = this.inputElement.querySelector('[data-id=\"password\"]');\n this.confirmInput = this.inputElement.querySelector('[data-id=\"confirm\"]');\n\n // create slots for external password input\n this.createSlottedExternalInput(this.passwordInput, 'external-password-input');\n this.createSlottedExternalInput(this.confirmInput, 'external-confirm-input');\n }\n };\n\nconst {\n host,\n label,\n internalInputsWrapper,\n errorMessage,\n helperText,\n passwordInput,\n policyPreview,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n internalInputsWrapper: { selector: 'descope-new-password-internal .wrapper' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n passwordInput: { selector: 'descope-password' },\n policyPreview: { selector: 'descope-policy-validation' },\n};\n\nexport const NewPasswordClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n {},\n {\n selector: PasswordClass.componentName,\n property: PasswordClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: { ...label, property: 'color' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: [\n { ...host, property: 'direction' },\n { ...passwordInput, property: PasswordClass.cssVarList.hostDirection },\n ],\n inputsRequiredIndicator: { ...host, property: 'content' },\n spaceBetweenInputs: { ...internalInputsWrapper, property: 'gap' },\n policyPreviewBackgroundColor: {\n ...policyPreview,\n property: policyPreviewVars.backgroundColor,\n },\n policyPreviewPadding: { ...policyPreview, property: policyPreviewVars.padding },\n\n valueInputHeight: { ...passwordInput, property: PasswordClass.cssVarList.valueInputHeight },\n valueInputMarginBottom: {\n ...passwordInput,\n property: PasswordClass.cssVarList.valueInputMarginBottom,\n },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${useHostExternalPadding(PasswordClass.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t}\n descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n .hidden {\n display: none;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import { getComponentName } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('new-password-internal');\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, observeAttributes } from '../../../helpers/componentHelpers';\nimport { NewPasswordClass } from '../NewPasswordClass';\nimport { componentName } from './componentName';\n\nconst passwordAttrPrefixRegex = /^password-/;\nconst confirmAttrPrefixRegex = /^confirm-/;\n\nconst removeAttrPrefix = (attr, prefix) => attr.replace(prefix, '');\n\nconst passwordInputAttrs = ['password-label', 'password-placeholder'];\nconst confirmInputAttrs = ['confirm-label', 'confirm-placeholder'];\nconst policyPanelAttrs = [\n 'has-validation',\n 'policy-label',\n 'available-policies',\n 'active-policies',\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'manual-visibility-toggle',\n];\nconst commonAttrs = [\n 'has-confirm',\n 'disabled',\n 'bordered',\n 'size',\n 'full-width',\n 'maxlength',\n 'invalid',\n 'readonly',\n 'draggable',\n 'autocomplete',\n 'label-type',\n 'manual-visibility-toggle',\n];\n\nconst inputRelatedAttrs = [].concat(\n commonAttrs,\n passwordInputAttrs,\n confirmInputAttrs,\n policyPanelAttrs\n);\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass NewPasswordInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputRelatedAttrs);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\"></div>\n\t\t`;\n\n this.wrapperEle = this.querySelector('.wrapper');\n }\n\n get value() {\n return this.passwordInput?.value || '';\n }\n\n set value(val) {\n if (val === this.value) return;\n this.passwordInput.value = val;\n }\n\n get hasConfirm() {\n return this.getAttribute('has-confirm') === 'true';\n }\n\n onHasConfirmChange(hasConfirm) {\n this.confirmInput.classList.toggle('hidden', !hasConfirm);\n }\n\n onHasValidationChange(hasValidation) {\n this.policyPanel.classList.toggle('hidden', !hasValidation);\n }\n\n get hasValidation() {\n return this.getAttribute('has-validation') === 'true';\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n\n if (this.value && !this.policyPanel.isValid) {\n return { typeMismatch: true };\n }\n\n if (this.hasConfirm && this.confirmInput && this.value !== this.confirmInput.value) {\n return { patternMismatch: true };\n }\n\n const min = this.getAttribute('minlength');\n const minVal = parseInt(min, 10) || 0;\n const minValid = this.value.length >= minVal;\n if (!minValid) {\n return { tooShort: true };\n }\n\n return {};\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n this.passwordInput.focus();\n }\n });\n super.init?.();\n this.renderInputs(this.hasConfirm, this.hasValidation);\n }\n\n renderInputs() {\n const hasExternalInput = this.getAttribute('external-input') === 'true';\n const template = `\n <div class=\"password-input-container\">\n <descope-password\n autocomplete=\"new-password\"\n manual-visibility-toggle=\"true\"\n data-id=\"password\"\n external-input=\"${hasExternalInput}\"\n ></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password\n autocomplete=\"new-password\"\n manual-visibility-toggle=\"true\"\n external-input=\"${hasExternalInput}\"\n data-id=\"confirm\"\n ></descope-password>\n `;\n\n this.wrapperEle.innerHTML = template;\n\n this.passwordInput = this.querySelector('[data-id=\"password\"]');\n this.confirmInput = this.querySelector('[data-id=\"confirm\"]');\n this.policyPanel = this.querySelector('descope-policy-validation');\n this.passwordStrength = this.querySelector('descope-password-strength');\n\n this.inputs = [this.passwordInput, this.confirmInput];\n\n this.initInputs();\n\n // sync input value to policy validation panel\n this.passwordInput.addEventListener('input', (e) => {\n this.passwordStrength?.addEventListener(\n 'score-changed',\n ({ detail }) => {\n this.policyPanel.setAttribute('data-password-policy-actual-passwordstrength', detail);\n },\n { once: true }\n );\n this.passwordStrength?.setAttribute('value', e.target.value);\n this.policyPanel.setAttribute('value', e.target.value);\n });\n\n forwardAttrs(this, this.policyPanel, {\n includeAttrs: policyPanelAttrs,\n mapAttrs: {\n 'policy-label': 'label',\n 'available-policies': 'data',\n },\n });\n }\n\n // the inputs are not required but we still want it to have a required\n // indicator in case the root component is required\n handleIndicatorStyle() {\n this.inputs.forEach((input) => {\n injectStyle(\n `\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${NewPasswordClass.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,\n input\n );\n });\n }\n\n get isInvalid() {\n return this.hasAttribute('invalid') && this.getAttribute('invalid') !== 'false';\n }\n\n // for some reason, Vaadin is removing the invalid attribute on several events,\n // e.g. focus, input, etc..., so we need to make sure the inputs will stay invalid\n // if the root component is invalid\n handleInputsInvalidAttribute() {\n this.inputs.forEach((input) => {\n input &&\n observeAttributes(\n input,\n (changedAttributes) => {\n if (changedAttributes.includes('invalid')) {\n const inputInvalidValue = input.getAttribute('invalid');\n const rootInvalidValue = this.getAttribute('invalid');\n\n if (this.isInvalid && rootInvalidValue !== inputInvalidValue) {\n input.setAttribute('invalid', 'true');\n }\n }\n },\n {}\n );\n });\n }\n\n initInputs() {\n this.handleIndicatorStyle();\n this.handleInputsInvalidAttribute();\n this.handleFocusEventsDispatching(this.inputs);\n }\n\n async togglePasswordStrength() {\n if (this.activePolicies.includes('passwordstrength')) {\n if (!this.passwordStrength) {\n await import('@descope-ui/descope-password-strength');\n this.passwordStrength = document.createElement('descope-password-strength');\n this.passwordStrength.setAttribute('options', 'Very weak,Weak,Average,Strong,Very strong');\n this.passwordStrength.setAttribute('value', this.passwordInput.value || '');\n this.passwordStrength.setAttribute(\n 'st-host-direction',\n this.getAttribute('st-host-direction')\n );\n this.passwordStrength.setAttribute('full-width', 'true');\n this.querySelector('.password-input-container').insertBefore(\n this.passwordStrength,\n this.policyPanel\n );\n }\n } else {\n if (this.passwordStrength) {\n this.passwordStrength.remove();\n this.passwordStrength = null;\n }\n }\n }\n\n get activePolicies() {\n return (this.getAttribute('active-policies') || '').split(',');\n }\n\n // eslint-disable-next-line class-methods-use-this\n toggleBooleanAttribute(ele, name, value) {\n value === null ? ele?.removeAttribute(name) : ele?.setAttribute(name, value);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'has-validation') {\n this.onHasValidationChange(newValue === 'true');\n } else if (attrName === 'has-confirm') {\n this.onHasConfirmChange(newValue === 'true');\n } else if (commonAttrs.includes(attrName)) {\n this.inputs.forEach((input) => this.toggleBooleanAttribute(input, attrName, newValue));\n } else if (passwordInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.passwordInput,\n removeAttrPrefix(attrName, passwordAttrPrefixRegex),\n newValue\n );\n } else if (confirmInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.confirmInput,\n removeAttrPrefix(attrName, confirmAttrPrefixRegex),\n newValue\n );\n }\n if (attrName === 'active-policies') {\n this.togglePasswordStrength();\n }\n }\n }\n}\n\nexport default NewPasswordInternal;\n","import NewPasswordInternal from './NewPasswordInternal';\nimport { componentName } from './componentName';\n\ncustomElements.define(componentName, NewPasswordInternal);\n","import { componentName, NewPasswordClass } from './NewPasswordClass';\nimport '../descope-text-field';\nimport '../descope-password';\nimport '../descope-policy-validation';\nimport './descope-new-password-internal';\n\ncustomElements.define(componentName, NewPasswordClass);\n\nexport { NewPasswordClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport passwordDraggableMixin from './passwordDraggableMixin';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('password');\n\nconst customMixin = (superclass) =>\n class PasswordFieldMixinClass extends superclass {\n static get observedAttributes() {\n return ['manual-visibility-toggle'];\n }\n\n get manualToggleVisibility() {\n return this.getAttribute('manual-visibility-toggle') === 'true';\n }\n\n init() {\n super.init?.();\n this.handleCaretOnVisibilityChange();\n this.origSetPasswordVisible = this.baseElement._setPasswordVisible;\n this.origSetFocused = this.baseElement._setFocused;\n this.baseElement._setFocused = this.setFocus.bind(this);\n\n this.initExternalInput();\n }\n\n initExternalInput() {\n const externalInput = this.createExternalInput();\n if (externalInput) {\n this.handlePasswordVisibility(externalInput);\n }\n }\n\n get caretPosition() {\n return this.value?.length || 0;\n }\n\n handleCaretOnVisibilityChange() {\n const origTogglePasswordVisibility = this.baseElement._togglePasswordVisibility.bind(\n this.baseElement\n );\n this.baseElement._togglePasswordVisibility = () => {\n setTimeout(() => {\n origTogglePasswordVisibility();\n this.inputElement.setSelectionRange(this.caretPosition, this.caretPosition);\n return false;\n });\n };\n }\n\n // We use `manual-visibility-toggle` to to toggle the password's visibility\n // even if the input field is focused-out. However, on focusout - Vaadin resets\n // password visibility. Since we don't want to override Vaadin's native setFocus\n // function (which is part of their FocusMixin).\n // So, here we override the part of logic that runs within Vaadin's setFocus that reports\n // the password visibility state. This logic is part of our `manual-visibility-toggle` only.\n setFocus(focused) {\n if (this.manualToggleVisibility) {\n this.baseElement._setPasswordVisible = () => {};\n }\n this.origSetFocused.call(this.baseElement, focused);\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible.bind(this.baseElement);\n }\n\n resetPasswordVisibilityToggle() {\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible;\n this.baseElement._setFocused = this.origSetFocus;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n }\n\n // override vaadin's password visibility toggle.\n // we need this override in order to to resolve the external input `focus` race condition,\n // which is caused due to the focus sync between the two inputs.\n handlePasswordVisibility(externalInput) {\n // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener\n const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;\n this.baseElement\n .querySelector('vaadin-password-field-button')\n .removeEventListener('mousedown', origBoundRevealButtonMouseDown);\n\n // disable vaadin's `_passwordVisibleChanged` observer\n this.baseElement._passwordVisibleChanged = () => {};\n\n // override vaadin's `_togglePasswordVisibility`\n this.baseElement._togglePasswordVisibility = () => {\n const currVisibility = externalInput.getAttribute('type');\n if (currVisibility === 'password') {\n this.showPasswordVisibility(externalInput);\n } else {\n this.hidePasswordVisibility(externalInput);\n }\n };\n }\n\n showPasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'text');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'true');\n }\n\n hidePasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'password');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'false');\n }\n };\n\nconst {\n host,\n inputField,\n inputElement,\n inputElementPlaceholder,\n revealButtonContainer,\n revealButtonIcon,\n label,\n requiredIndicator,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n inputField: { selector: '::part(input-field)' },\n inputElement: { selector: '> input' },\n inputElementPlaceholder: { selector: () => ':host input:placeholder-shown' },\n revealButtonContainer: { selector: '::part(reveal-button)' },\n revealButtonIcon: { selector: '::part(reveal-button)::before' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PasswordClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: [{}, host],\n fontFamily: [label, inputField, errorMessage, helperText],\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...inputElement, property: 'padding-left' },\n { ...inputElement, property: 'padding-right' },\n ],\n inputBackgroundColor: { ...inputField, property: 'background-color' },\n\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: 'color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n inputPlaceholderTextColor: [\n { ...inputElementPlaceholder, property: 'color' },\n { selector: () => ':host ::slotted(input:placeholder-shown)', property: 'color' },\n ],\n inputValueTextColor: [\n { ...inputElement, property: 'color' },\n { selector: () => ':host ::slotted(input)', property: 'color' },\n ],\n\n revealButtonOffset: [\n { ...revealButtonContainer, property: 'margin-right' },\n { ...revealButtonContainer, property: 'margin-left' },\n ],\n revealButtonSize: { ...revealButtonContainer, property: 'font-size' },\n revealButtonColor: { ...revealButtonIcon, property: 'color' },\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...inputElement, property: 'opacity' },\n ],\n inputVerticalAlignment: { ...inputField, property: 'align-items' },\n valueInputHeight: { ...inputElement, property: 'height' },\n },\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'password',\n inputName: 'password',\n includeAttrs: ['disabled', 'readonly', 'pattern', 'type', 'autocomplete'],\n noBlurDispatch: true,\n }),\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n passwordDraggableMixin,\n customMixin\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-password-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${useHostExternalPadding(PasswordClass.cssVarList)}\n\t\t\t${resetInputCursor('vaadin-password-field')}\n ${resetInputLabelPosition('vaadin-password-field')}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${PasswordClass.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${inputFloatingLabelStyle()}\n\n ::part(reveal-button) {\n align-self: center;\n }\n\n vaadin-password-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/password-field';\nimport { componentName, PasswordClass } from './PasswordClass';\n\ncustomElements.define(componentName, PasswordClass);\n\nexport { PasswordClass, componentName };\n","const passwordDraggableMixin = (superclass) =>\n class PasswordDraggableMixinClass extends superclass {\n get isReadOnly() {\n return this.hasAttribute('readonly') && this.getAttribute('readonly') !== 'false';\n }\n\n init() {\n // there is an issue in Chrome that input field with type password cannot be D&D\n // so in case the input is draggable & readonly, we are changing the input type to \"text\" before dragging\n // and return the original type when done\n super.init?.();\n\n const ele = this.querySelector('input');\n\n ele?.addEventListener('mousedown', (e) => {\n if (this.isDraggable && this.isReadOnly) {\n ele.setAttribute('inert', 'true');\n\n const inputEle = e.target;\n const prevType = inputEle.getAttribute('type');\n inputEle.setAttribute('type', 'text');\n setTimeout(() => {\n inputEle.focus();\n });\n\n const onComplete = (_) => {\n inputEle.setAttribute('type', prevType);\n ele.removeAttribute('inert');\n this.removeEventListener('mouseup', onComplete);\n this.removeEventListener('dragend', onComplete);\n };\n\n this.addEventListener('dragend', onComplete, { once: true });\n this.addEventListener('mouseup', onComplete, { once: true });\n }\n });\n }\n };\n\nexport default passwordDraggableMixin;\n","// eslint-disable-next-line max-classes-per-file\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport { interpolateString } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('policy-validation');\n\nconst overrideAttrs = [\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'data-password-policy-actual-passwordstrength',\n];\nconst dataAttrs = ['data', 'active-policies', 'overrides', ...overrideAttrs];\nconst policyAttrs = ['label', 'value', ...dataAttrs];\n\nclass RawPolicyValidation extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #availablePolicies;\n\n #activePolicies = [];\n\n #overrides;\n\n static get observedAttributes() {\n return policyAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <div class=\"label\"></div>\n <ul></ul>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n `,\n this\n );\n\n this.panel = this.shadowRoot.querySelector(':host > div');\n this.label = this.shadowRoot.querySelector('.label');\n this.list = this.shadowRoot.querySelector('ul');\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (oldValue !== newValue) {\n if (attrName === 'label') {\n this.updateLabel(newValue);\n }\n\n // we're don't know the order in which the attributes are forwarded, so we're trying to render every time\n // once `data` and `active-policies` are populated, the render will be executed.\n // once the `overrides` object is updated, we want to re-render the panel.\n if (dataAttrs.includes(attrName)) {\n if (attrName === 'data') {\n try {\n this.availablePolicies = JSON.parse(newValue);\n } catch {\n // eslint-disable-next-line no-console\n console.error('Failed to set available policies');\n }\n }\n if (attrName === 'active-policies') {\n this.#activePolicies = (newValue || '').split(',');\n }\n\n if (attrName === 'data-password-policy-value-minlength') {\n const ln = Number(newValue);\n if (!Number.isNaN(ln) && ln > 0) {\n this.#overrides = { ...this.#overrides, minlength: { value: `${ln}` } };\n }\n }\n\n if (attrName === 'data-password-policy-value-passwordstrength') {\n const passwordStrength = parseInt(newValue);\n if (!Number.isNaN(passwordStrength) && passwordStrength >= 0) {\n this.#overrides = {\n ...this.#overrides,\n passwordstrength: {\n ...this.#overrides?.passwordstrength,\n expected: passwordStrength,\n },\n };\n }\n }\n\n if (attrName === 'data-password-policy-actual-passwordstrength') {\n const ln = Number(newValue);\n if (!Number.isNaN(ln) && ln >= 0) {\n this.#overrides = {\n ...this.#overrides,\n passwordstrength: { ...this.#overrides?.passwordstrength, actual: ln },\n };\n }\n }\n }\n\n this.renderItems(this.#availablePolicies, this.#activePolicies, this.#overrides);\n }\n }\n\n get availablePolicies() {\n return this.#availablePolicies || [];\n }\n\n set availablePolicies(val) {\n this.#availablePolicies = val;\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n getStrengthScore() {\n return this.value.length;\n }\n\n compareValues(comparison, expected, actual) {\n switch (comparison.toUpperCase()) {\n case 'GTE': // Greater than or equal to\n return actual >= expected;\n case 'GT': // Greater than\n return actual > expected;\n case 'LTE': // Less than or equal to\n return actual <= expected;\n case 'LT': // Less than\n return actual < expected;\n case 'EQ': // Equal to\n return actual === expected;\n case 'NEQ': // Not equal to\n return actual !== expected;\n default:\n throw new Error(`Invalid comparison type: ${comparison}`);\n }\n }\n\n validate() {\n let policies = this.#availablePolicies;\n\n if (this.#overrides) {\n policies = this.#availablePolicies.map((policy) => {\n const data = this.#overrides[policy.id];\n\n if (!data) return policy;\n\n const res = { ...policy, data };\n\n return res;\n });\n }\n\n return this.#activePolicies.reduce((results, id) => {\n const policy = policies.find((p) => p.id === id);\n\n if (!policy) {\n return results;\n }\n\n const { pattern, message, data, compare } = policy;\n\n if ((!pattern && !compare) || !message) {\n return results;\n }\n\n const validationResult = {\n message: interpolateString(message, data),\n id,\n };\n\n if (pattern) {\n const exp = new RegExp(interpolateString(pattern, data));\n validationResult.valid = exp.test(this.value);\n } else if (compare) {\n validationResult.valid = this.compareValues(\n compare,\n data?.expected ?? -1,\n data?.actual ?? -1\n );\n }\n\n results.push(validationResult);\n\n return results;\n }, []);\n }\n\n get isValid() {\n return !this.validate().some(({ valid }) => valid === false);\n }\n\n getValidationItemTemplate({ valid, message }) {\n const status = !this.value ? 'none' : valid;\n return `\n <li class=\"item\" data-valid=\"${status}\">\n <span class=\"message\">${message}</span>\n </li>\n `;\n }\n\n renderItems(availablePolicies, activePolicies) {\n if (!availablePolicies || !activePolicies.length) {\n return;\n }\n\n this.list.innerHTML = this.validate().map(this.getValidationItemTemplate.bind(this)).join('');\n }\n\n updateLabel(val) {\n if (!val) {\n this.classList.add('hide-label');\n this.label.textContent = '';\n } else {\n this.label.textContent = val;\n this.classList.remove('hide-label');\n }\n }\n}\n\nconst { host, item, symbolDefault, symbolSuccess, symbolError } = {\n host: { selector: () => ':host > div' },\n item: { selector: () => '.item' },\n symbolDefault: { selector: () => '.item[data-valid=\"none\"]::before' },\n symbolSuccess: { selector: () => '.item[data-valid=\"true\"]::before' },\n symbolError: { selector: () => '.item[data-valid=\"false\"]::before' },\n};\n\nexport const PolicyValidationClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n padding: {},\n borderWidth: { ...host, property: 'border-width' },\n borderStyle: { ...host, property: 'border-style' },\n borderColor: { ...host, property: 'border-color' },\n borderRadius: { ...host, property: 'border-radius' },\n backgroundColor: { ...host, property: 'background-color' },\n textColor: { property: 'color' },\n labelMargin: { ...host, property: 'gap' },\n itemsSpacing: { ...item, property: 'line-height' },\n itemSymbolSuccessColor: { ...symbolSuccess, property: 'color' },\n itemSymbolErrorColor: { ...symbolError, property: 'color' },\n itemSymbolDefault: { ...symbolDefault, property: 'content' },\n itemSymbolSuccess: { ...symbolSuccess, property: 'content' },\n itemSymbolError: { ...symbolError, property: 'content' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawPolicyValidation);\n","export const interpolateString = (template, values) =>\n template.replace(/{{(\\w+)+}}/g, (match, key) => values?.[key] || match);\n","import { componentName, PolicyValidationClass } from './PolicyValidationClass';\n\ncustomElements.define(componentName, PolicyValidationClass);\n\nexport { PolicyValidationClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n};\n"],"names":["createBaseInputClass","args","componentName","policyPreviewVars","cssVarList","host","label","internalInputsWrapper","errorMessage","helperText","passwordInput","policyPreview","selector","NewPasswordClass","mappings","fontSize","property","fontFamily","labelFontSize","labelFontWeight","labelTextColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","hostWidth","hostMinWidth","hostDirection","inputsRequiredIndicator","spaceBetweenInputs","policyPreviewBackgroundColor","backgroundColor","policyPreviewPadding","padding","valueInputHeight","valueInputMarginBottom","proxyProps","superclass","init","super","template","document","createElement","externalInputAttr","this","getAttribute","innerHTML","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","initExternalInput","includeAttrs","createSlottedExternalInput","node","slotName","externalInput","slotEle","targetSlot","setAttribute","confirmInput","slots","wrappedEleName","style","excludeAttrsSync","passwordAttrPrefixRegex","confirmAttrPrefixRegex","removeAttrPrefix","attr","prefix","replace","passwordInputAttrs","confirmInputAttrs","policyPanelAttrs","commonAttrs","inputRelatedAttrs","concat","BaseInputClass","customElements","define","observedAttributes","constructor","wrapperEle","value","val","hasConfirm","onHasConfirmChange","classList","toggle","onHasValidationChange","hasValidation","policyPanel","getValidity","isRequired","valueMissing","isValid","typeMismatch","patternMismatch","min","minVal","parseInt","length","tooShort","addEventListener","e","isTrusted","focus","renderInputs","hasExternalInput","passwordStrength","inputs","initInputs","detail","once","target","mapAttrs","handleIndicatorStyle","forEach","input","isInvalid","hasAttribute","handleInputsInvalidAttribute","changedAttributes","includes","inputInvalidValue","rootInvalidValue","handleFocusEventsDispatching","togglePasswordStrength","activePolicies","insertBefore","remove","split","toggleBooleanAttribute","ele","name","removeAttribute","attributeChangedCallback","attrName","oldValue","newValue","inputField","inputElementPlaceholder","revealButtonContainer","revealButtonIcon","requiredIndicator","PasswordClass","inputHeight","inputHorizontalPadding","inputBackgroundColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineColor","inputOutlineStyle","inputOutlineOffset","inputOutlineWidth","labelRequiredIndicator","inputPlaceholderTextColor","inputValueTextColor","revealButtonOffset","revealButtonSize","revealButtonColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","inputType","inputName","noBlurDispatch","useProxyTargets","manualToggleVisibility","handleCaretOnVisibilityChange","origSetPasswordVisible","_setPasswordVisible","origSetFocused","_setFocused","setFocus","bind","createExternalInput","handlePasswordVisibility","caretPosition","origTogglePasswordVisibility","_togglePasswordVisibility","setTimeout","setSelectionRange","focused","call","resetPasswordVisibilityToggle","origSetFocus","origBoundRevealButtonMouseDown","__boundRevealButtonMouseDown","removeEventListener","_passwordVisibleChanged","showPasswordVisibility","hidePasswordVisibility","isReadOnly","isDraggable","inputEle","prevType","onComplete","_","dataAttrs","policyAttrs","RawPolicyValidation","baseSelector","attachShadow","mode","panel","list","updateLabel","availablePolicies","JSON","parse","console","error","ln","Number","isNaN","minlength","passwordstrength","expected","actual","renderItems","getStrengthScore","compareValues","comparison","toUpperCase","Error","validate","policies","map","policy","data","id","reduce","results","find","p","pattern","message","compare","validationResult","exp","RegExp","valid","test","push","some","getValidationItemTemplate","join","textContent","add","item","symbolDefault","symbolSuccess","symbolError","PolicyValidationClass","componentNameOverride","borderWidth","borderStyle","borderColor","borderRadius","textColor","labelMargin","itemsSpacing","itemSymbolSuccessColor","itemSymbolErrorColor","itemSymbolDefault","itemSymbolSuccess","itemSymbolError","interpolateString","values","match","key","observedAttrs","TextFieldClass","icon","renderCopyToClipboard","shouldRender","iconInitConfig","title","iconCopiedConfig","Object","assign","slot","navigator","clipboard","writeText","onLabelClick","oldVal","newVal","attributeChangeCallback","_setType","placeholder","inputMask","disabledPlaceholder","inputDisabled","inputIcon","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","inputDirection","helperTextColor","inputCaretTextColor","textAlign","inputTextAlign","inputPlaceholderColor","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-new-password-index-js.js","mappings":"yMASO,MAAMA,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,sHCPhB,MAAMC,GAAgB,QAAiB,gBAExCC,EAAoB,IAAsBC,YAsF1C,KACJC,EAAI,MACJC,EAAK,sBACLC,EAAqB,aACrBC,EAAY,WACZC,EAAU,cACVC,EAAa,cACbC,GACE,CACFN,KAAM,CAAEO,SAAU,IAAM,SACxBN,MAAO,CAAEM,SAAU,iBACnBL,sBAAuB,CAAEK,SAAU,0CACnCH,WAAY,CAAEG,SAAU,uBACxBJ,aAAc,CAAEI,SAAU,yBAC1BF,cAAe,CAAEE,SAAU,oBAC3BD,cAAe,CAAEC,SAAU,8BAGhBC,GAAmB,SAC9B,QAAiB,CACfC,SAAU,CACRC,SAAU,CACRV,EACA,CAAC,EACD,CACEO,SAAU,IAAcV,cACxBc,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B,CACvB,IAAKrK,EAAOU,SAAU,QACtB,IAAKV,EAAOU,SAAU,UAExB4J,gBAAiB,IAAKtK,EAAOU,SAAU,aACvC6J,gBAAiB,IAAKvK,EAAOU,SAAU,cACvC8J,kBAAmB,IAAKxK,EAAOU,SAAU,uBACzC+J,mBAAoB,CAClB,CAAEnK,SAAU,4BAA6BI,SAAU,WACnD,IAAKsS,EAAqBtS,SAAU,YAEtCgK,uBAAwB,CACtB,IAAK9B,EAAYlI,SAAU,eAC3B,IAAK8C,EAAe9C,SAAU,gBAEhCqB,iBAAkB,CAChB,IAAKuF,EAAO5G,SAAU,UACtB,IAAK8C,EAAe9C,SAAU,WAEhCsB,uBAAwB,CACtB,IAAKsF,EAAO5G,SAAU,iBACtB,IAAK8C,EAAe9C,SAAU,kBAGhC8S,gBAAiB,CACf,IAAKV,EAAWpS,SAAU,gBAC1B,IAAKoS,EAAWpS,SAAU,gBAE5B+S,cAAe,IAAKX,EAAWpS,SAAU,aACzCgT,eAAgB,IAAKZ,EAAWpS,SAAU,SAC1CiT,kBAAmB,CACjB,IAAKrM,EAAO5G,SAAU,yBACtB,IAAK4G,EAAO5G,SAAU,iBACtB,IAAK8C,EAAe9C,SAAU,yBAC9B,IAAK8C,EAAe9C,SAAU,kB","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/NewPasswordClass.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/descope-new-password-internal/componentName.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/descope-new-password-internal/index.js","webpack://@descope/web-components-ui/./src/components/descope-new-password/index.js","webpack://@descope/web-components-ui/./src/components/descope-password/PasswordClass.js","webpack://@descope/web-components-ui/./src/components/descope-password/index.js","webpack://@descope/web-components-ui/./src/components/descope-password/passwordDraggableMixin.js","webpack://@descope/web-components-ui/./src/components/descope-policy-validation/PolicyValidationClass.js","webpack://@descope/web-components-ui/./src/components/descope-policy-validation/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-policy-validation/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js"],"sourcesContent":["import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { compose } from '../../helpers';\nimport { createStyleMixin, proxyInputMixin, draggableMixin, createProxy } from '../../mixins';\nimport { componentName as descopeInternalComponentName } from './descope-new-password-internal/componentName';\nimport { PasswordClass } from '../descope-password/PasswordClass';\nimport { useHostExternalPadding } from '../../helpers/themeHelpers/resetHelpers';\nimport { PolicyValidationClass } from '../descope-policy-validation/PolicyValidationClass';\n\nexport const componentName = getComponentName('new-password');\n\nconst policyPreviewVars = PolicyValidationClass.cssVarList;\n\nconst customMixin = (superclass) =>\n class NewPasswordMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n const externalInputAttr = this.getAttribute('external-input');\n\n template.innerHTML = `\n\t\t\t<${descopeInternalComponentName}\n\t\t\t\tname=\"new-password\"\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\tslot=\"input\"\n external-input=\"${externalInputAttr}\"\n\t\t\t>\n </${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n if (this.getAttribute('external-input') === 'true') {\n this.initExternalInput();\n }\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'password-label',\n 'password-placeholder',\n 'confirm-label',\n 'confirm-placeholder',\n 'full-width',\n 'size',\n 'bordered',\n 'label',\n 'has-confirm',\n 'invalid',\n 'readonly',\n 'disabled',\n 'draggable',\n 'has-validation',\n 'policy-label',\n 'active-policies',\n 'available-policies',\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'label-type',\n 'manual-visibility-toggle',\n ],\n });\n }\n\n createSlottedExternalInput(node, slotName) {\n const externalInput = node.querySelector('input');\n const slotEle = document.createElement('slot');\n\n const targetSlot = externalInput.getAttribute('slot');\n\n slotEle.setAttribute('name', slotName);\n slotEle.setAttribute('slot', targetSlot);\n\n node.appendChild(slotEle);\n\n // move external input\n externalInput.setAttribute('slot', slotName);\n externalInput.setAttribute('name', this.getAttribute('name'));\n externalInput.setAttribute('data-hidden-input', 'true');\n\n this.appendChild(externalInput);\n }\n\n initExternalInput() {\n // get descope input components\n this.passwordInput = this.inputElement.querySelector('[data-id=\"password\"]');\n this.confirmInput = this.inputElement.querySelector('[data-id=\"confirm\"]');\n\n // create slots for external password input\n this.createSlottedExternalInput(this.passwordInput, 'external-password-input');\n this.createSlottedExternalInput(this.confirmInput, 'external-confirm-input');\n }\n };\n\nconst {\n host,\n label,\n internalInputsWrapper,\n errorMessage,\n helperText,\n passwordInput,\n policyPreview,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n internalInputsWrapper: { selector: 'descope-new-password-internal .wrapper' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n passwordInput: { selector: 'descope-password' },\n policyPreview: { selector: 'descope-policy-validation' },\n};\n\nexport const NewPasswordClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n {},\n {\n selector: PasswordClass.componentName,\n property: PasswordClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: { ...label, property: 'color' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: [\n { ...host, property: 'direction' },\n { ...passwordInput, property: PasswordClass.cssVarList.hostDirection },\n ],\n inputsRequiredIndicator: { ...host, property: 'content' },\n spaceBetweenInputs: { ...internalInputsWrapper, property: 'gap' },\n policyPreviewBackgroundColor: {\n ...policyPreview,\n property: policyPreviewVars.backgroundColor,\n },\n policyPreviewPadding: { ...policyPreview, property: policyPreviewVars.padding },\n\n valueInputHeight: { ...passwordInput, property: PasswordClass.cssVarList.valueInputHeight },\n valueInputMarginBottom: {\n ...passwordInput,\n property: PasswordClass.cssVarList.valueInputMarginBottom,\n },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${useHostExternalPadding(PasswordClass.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t}\n descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n .hidden {\n display: none;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import { getComponentName } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('new-password-internal');\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, observeAttributes } from '../../../helpers/componentHelpers';\nimport { NewPasswordClass } from '../NewPasswordClass';\nimport { componentName } from './componentName';\n\nconst passwordAttrPrefixRegex = /^password-/;\nconst confirmAttrPrefixRegex = /^confirm-/;\n\nconst removeAttrPrefix = (attr, prefix) => attr.replace(prefix, '');\n\nconst passwordInputAttrs = ['password-label', 'password-placeholder'];\nconst confirmInputAttrs = ['confirm-label', 'confirm-placeholder'];\nconst policyPanelAttrs = [\n 'has-validation',\n 'policy-label',\n 'available-policies',\n 'active-policies',\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'manual-visibility-toggle',\n];\nconst commonAttrs = [\n 'has-confirm',\n 'disabled',\n 'bordered',\n 'size',\n 'full-width',\n 'maxlength',\n 'invalid',\n 'readonly',\n 'draggable',\n 'autocomplete',\n 'label-type',\n 'manual-visibility-toggle',\n];\n\nconst inputRelatedAttrs = [].concat(\n commonAttrs,\n passwordInputAttrs,\n confirmInputAttrs,\n policyPanelAttrs\n);\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass NewPasswordInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputRelatedAttrs);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\"></div>\n\t\t`;\n\n this.wrapperEle = this.querySelector('.wrapper');\n }\n\n get value() {\n return this.passwordInput?.value || '';\n }\n\n set value(val) {\n if (val === this.value) return;\n this.passwordInput.value = val;\n }\n\n get hasConfirm() {\n return this.getAttribute('has-confirm') === 'true';\n }\n\n onHasConfirmChange(hasConfirm) {\n this.confirmInput.classList.toggle('hidden', !hasConfirm);\n }\n\n onHasValidationChange(hasValidation) {\n this.policyPanel.classList.toggle('hidden', !hasValidation);\n }\n\n get hasValidation() {\n return this.getAttribute('has-validation') === 'true';\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n\n if (this.value && !this.policyPanel.isValid) {\n return { typeMismatch: true };\n }\n\n if (this.hasConfirm && this.confirmInput && this.value !== this.confirmInput.value) {\n return { patternMismatch: true };\n }\n\n const min = this.getAttribute('minlength');\n const minVal = parseInt(min, 10) || 0;\n const minValid = this.value.length >= minVal;\n if (!minValid) {\n return { tooShort: true };\n }\n\n return {};\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n this.passwordInput.focus();\n }\n });\n super.init?.();\n this.renderInputs(this.hasConfirm, this.hasValidation);\n }\n\n renderInputs() {\n const hasExternalInput = this.getAttribute('external-input') === 'true';\n const template = `\n <div class=\"password-input-container\">\n <descope-password\n autocomplete=\"new-password\"\n manual-visibility-toggle=\"true\"\n data-id=\"password\"\n external-input=\"${hasExternalInput}\"\n ></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password\n autocomplete=\"new-password\"\n manual-visibility-toggle=\"true\"\n external-input=\"${hasExternalInput}\"\n data-id=\"confirm\"\n ></descope-password>\n `;\n\n this.wrapperEle.innerHTML = template;\n\n this.passwordInput = this.querySelector('[data-id=\"password\"]');\n this.confirmInput = this.querySelector('[data-id=\"confirm\"]');\n this.policyPanel = this.querySelector('descope-policy-validation');\n this.passwordStrength = this.querySelector('descope-password-strength');\n\n this.inputs = [this.passwordInput, this.confirmInput];\n\n this.initInputs();\n\n // sync input value to policy validation panel\n this.passwordInput.addEventListener('input', (e) => {\n this.passwordStrength?.addEventListener(\n 'score-changed',\n ({ detail }) => {\n this.policyPanel.setAttribute('data-password-policy-actual-passwordstrength', detail);\n },\n { once: true }\n );\n this.passwordStrength?.setAttribute('value', e.target.value);\n this.policyPanel.setAttribute('value', e.target.value);\n });\n\n forwardAttrs(this, this.policyPanel, {\n includeAttrs: policyPanelAttrs,\n mapAttrs: {\n 'policy-label': 'label',\n 'available-policies': 'data',\n },\n });\n }\n\n // the inputs are not required but we still want it to have a required\n // indicator in case the root component is required\n handleIndicatorStyle() {\n this.inputs.forEach((input) => {\n injectStyle(\n `\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${NewPasswordClass.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,\n input\n );\n });\n }\n\n get isInvalid() {\n return this.hasAttribute('invalid') && this.getAttribute('invalid') !== 'false';\n }\n\n // for some reason, Vaadin is removing the invalid attribute on several events,\n // e.g. focus, input, etc..., so we need to make sure the inputs will stay invalid\n // if the root component is invalid\n handleInputsInvalidAttribute() {\n this.inputs.forEach((input) => {\n input &&\n observeAttributes(\n input,\n (changedAttributes) => {\n if (changedAttributes.includes('invalid')) {\n const inputInvalidValue = input.getAttribute('invalid');\n const rootInvalidValue = this.getAttribute('invalid');\n\n if (this.isInvalid && rootInvalidValue !== inputInvalidValue) {\n input.setAttribute('invalid', 'true');\n }\n }\n },\n {}\n );\n });\n }\n\n initInputs() {\n this.handleIndicatorStyle();\n this.handleInputsInvalidAttribute();\n this.handleFocusEventsDispatching(this.inputs);\n }\n\n async togglePasswordStrength() {\n if (this.activePolicies.includes('passwordstrength')) {\n if (!this.passwordStrength) {\n await import('@descope-ui/descope-password-strength');\n this.passwordStrength = document.createElement('descope-password-strength');\n this.passwordStrength.setAttribute('options', 'Very weak,Weak,Average,Strong,Very strong');\n this.passwordStrength.setAttribute('value', this.passwordInput.value || '');\n this.passwordStrength.setAttribute(\n 'st-host-direction',\n this.getAttribute('st-host-direction')\n );\n this.passwordStrength.setAttribute('full-width', 'true');\n this.querySelector('.password-input-container').insertBefore(\n this.passwordStrength,\n this.policyPanel\n );\n }\n } else if (this.passwordStrength) {\n this.passwordStrength.remove();\n this.passwordStrength = null;\n }\n }\n\n get activePolicies() {\n return (this.getAttribute('active-policies') || '').split(',');\n }\n\n toggleBooleanAttribute(ele, name, value) {\n value === null ? ele?.removeAttribute(name) : ele?.setAttribute(name, value);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'has-validation') {\n this.onHasValidationChange(newValue === 'true');\n } else if (attrName === 'has-confirm') {\n this.onHasConfirmChange(newValue === 'true');\n } else if (commonAttrs.includes(attrName)) {\n this.inputs.forEach((input) => this.toggleBooleanAttribute(input, attrName, newValue));\n } else if (passwordInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.passwordInput,\n removeAttrPrefix(attrName, passwordAttrPrefixRegex),\n newValue\n );\n } else if (confirmInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.confirmInput,\n removeAttrPrefix(attrName, confirmAttrPrefixRegex),\n newValue\n );\n }\n if (attrName === 'active-policies') {\n this.togglePasswordStrength();\n }\n }\n }\n}\n\nexport default NewPasswordInternal;\n","import NewPasswordInternal from './NewPasswordInternal';\nimport { componentName } from './componentName';\n\ncustomElements.define(componentName, NewPasswordInternal);\n","import { componentName, NewPasswordClass } from './NewPasswordClass';\nimport '../descope-text-field';\nimport '../descope-password';\nimport '../descope-policy-validation';\nimport './descope-new-password-internal';\n\ncustomElements.define(componentName, NewPasswordClass);\n\nexport { NewPasswordClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport passwordDraggableMixin from './passwordDraggableMixin';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('password');\n\nconst customMixin = (superclass) =>\n class PasswordFieldMixinClass extends superclass {\n static get observedAttributes() {\n return ['manual-visibility-toggle'];\n }\n\n get manualToggleVisibility() {\n return this.getAttribute('manual-visibility-toggle') === 'true';\n }\n\n init() {\n super.init?.();\n this.handleCaretOnVisibilityChange();\n this.origSetPasswordVisible = this.baseElement._setPasswordVisible;\n this.origSetFocused = this.baseElement._setFocused;\n this.baseElement._setFocused = this.setFocus.bind(this);\n\n this.initExternalInput();\n }\n\n initExternalInput() {\n const externalInput = this.createExternalInput();\n if (externalInput) {\n this.handlePasswordVisibility(externalInput);\n }\n }\n\n get caretPosition() {\n return this.value?.length || 0;\n }\n\n handleCaretOnVisibilityChange() {\n const origTogglePasswordVisibility = this.baseElement._togglePasswordVisibility.bind(\n this.baseElement\n );\n this.baseElement._togglePasswordVisibility = () => {\n setTimeout(() => {\n origTogglePasswordVisibility();\n this.inputElement.setSelectionRange(this.caretPosition, this.caretPosition);\n return false;\n });\n };\n }\n\n // We use `manual-visibility-toggle` to to toggle the password's visibility\n // even if the input field is focused-out. However, on focusout - Vaadin resets\n // password visibility. Since we don't want to override Vaadin's native setFocus\n // function (which is part of their FocusMixin).\n // So, here we override the part of logic that runs within Vaadin's setFocus that reports\n // the password visibility state. This logic is part of our `manual-visibility-toggle` only.\n setFocus(focused) {\n if (this.manualToggleVisibility) {\n this.baseElement._setPasswordVisible = () => {};\n }\n this.origSetFocused.call(this.baseElement, focused);\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible.bind(this.baseElement);\n }\n\n resetPasswordVisibilityToggle() {\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible;\n this.baseElement._setFocused = this.origSetFocus;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n }\n\n // override vaadin's password visibility toggle.\n // we need this override in order to to resolve the external input `focus` race condition,\n // which is caused due to the focus sync between the two inputs.\n handlePasswordVisibility(externalInput) {\n // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener\n const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;\n this.baseElement\n .querySelector('vaadin-password-field-button')\n .removeEventListener('mousedown', origBoundRevealButtonMouseDown);\n\n // disable vaadin's `_passwordVisibleChanged` observer\n this.baseElement._passwordVisibleChanged = () => {};\n\n // override vaadin's `_togglePasswordVisibility`\n this.baseElement._togglePasswordVisibility = () => {\n const currVisibility = externalInput.getAttribute('type');\n if (currVisibility === 'password') {\n this.showPasswordVisibility(externalInput);\n } else {\n this.hidePasswordVisibility(externalInput);\n }\n };\n }\n\n showPasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'text');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'true');\n }\n\n hidePasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'password');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'false');\n }\n };\n\nconst {\n host,\n inputField,\n inputElement,\n inputElementPlaceholder,\n revealButtonContainer,\n revealButtonIcon,\n label,\n requiredIndicator,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n inputField: { selector: '::part(input-field)' },\n inputElement: { selector: '> input' },\n inputElementPlaceholder: { selector: () => ':host input:placeholder-shown' },\n revealButtonContainer: { selector: '::part(reveal-button)' },\n revealButtonIcon: { selector: '::part(reveal-button)::before' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PasswordClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: [{}, host],\n fontFamily: [label, inputField, errorMessage, helperText],\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...inputElement, property: 'padding-left' },\n { ...inputElement, property: 'padding-right' },\n ],\n inputBackgroundColor: { ...inputField, property: 'background-color' },\n\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: 'color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n inputPlaceholderTextColor: [\n { ...inputElementPlaceholder, property: 'color' },\n { selector: () => ':host ::slotted(input:placeholder-shown)', property: 'color' },\n ],\n inputValueTextColor: [\n { ...inputElement, property: 'color' },\n { selector: () => ':host ::slotted(input)', property: 'color' },\n ],\n\n revealButtonOffset: [\n { ...revealButtonContainer, property: 'margin-right' },\n { ...revealButtonContainer, property: 'margin-left' },\n ],\n revealButtonSize: { ...revealButtonContainer, property: 'font-size' },\n revealButtonColor: { ...revealButtonIcon, property: 'color' },\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...inputElement, property: 'opacity' },\n ],\n inputVerticalAlignment: { ...inputField, property: 'align-items' },\n valueInputHeight: { ...inputElement, property: 'height' },\n },\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'password',\n inputName: 'password',\n includeAttrs: ['disabled', 'readonly', 'pattern', 'type', 'autocomplete'],\n noBlurDispatch: true,\n }),\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n passwordDraggableMixin,\n customMixin\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-password-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n position: relative;\n\t\t\t}\n\t\t\t${useHostExternalPadding(PasswordClass.cssVarList)}\n\t\t\t${resetInputCursor('vaadin-password-field')}\n ${resetInputLabelPosition('vaadin-password-field')}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n -webkit-mask-image: none;\n\t\t\t\tbox-sizing: border-box;\n opacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n :host ::slotted(input) {\n\t\t\t\tmin-height: 0;\n }\n :host([readonly]) ::slotted(input:placeholder-shown) {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t\t:host([readonly]) vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${PasswordClass.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${inputFloatingLabelStyle()}\n\n ::part(reveal-button) {\n align-self: center;\n }\n\n vaadin-password-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/password-field';\nimport { componentName, PasswordClass } from './PasswordClass';\n\ncustomElements.define(componentName, PasswordClass);\n\nexport { PasswordClass, componentName };\n","const passwordDraggableMixin = (superclass) =>\n class PasswordDraggableMixinClass extends superclass {\n get isReadOnly() {\n return this.hasAttribute('readonly') && this.getAttribute('readonly') !== 'false';\n }\n\n init() {\n // there is an issue in Chrome that input field with type password cannot be D&D\n // so in case the input is draggable & readonly, we are changing the input type to \"text\" before dragging\n // and return the original type when done\n super.init?.();\n\n const ele = this.querySelector('input');\n\n ele?.addEventListener('mousedown', (e) => {\n if (this.isDraggable && this.isReadOnly) {\n ele.setAttribute('inert', 'true');\n\n const inputEle = e.target;\n const prevType = inputEle.getAttribute('type');\n inputEle.setAttribute('type', 'text');\n setTimeout(() => {\n inputEle.focus();\n });\n\n const onComplete = (_) => {\n inputEle.setAttribute('type', prevType);\n ele.removeAttribute('inert');\n this.removeEventListener('mouseup', onComplete);\n this.removeEventListener('dragend', onComplete);\n };\n\n this.addEventListener('dragend', onComplete, { once: true });\n this.addEventListener('mouseup', onComplete, { once: true });\n }\n });\n }\n };\n\nexport default passwordDraggableMixin;\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport { interpolateString } from './helpers';\n\nexport const componentName = getComponentName('policy-validation');\n\nconst overrideAttrs = [\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'data-password-policy-actual-passwordstrength',\n];\nconst dataAttrs = ['data', 'active-policies', 'overrides', ...overrideAttrs];\nconst policyAttrs = ['label', 'value', ...dataAttrs];\n\nclass RawPolicyValidation extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #availablePolicies;\n\n #activePolicies = [];\n\n #overrides;\n\n static get observedAttributes() {\n return policyAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <div class=\"label\"></div>\n <ul></ul>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n `,\n this\n );\n\n this.panel = this.shadowRoot.querySelector(':host > div');\n this.label = this.shadowRoot.querySelector('.label');\n this.list = this.shadowRoot.querySelector('ul');\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (oldValue !== newValue) {\n if (attrName === 'label') {\n this.updateLabel(newValue);\n }\n\n // we're don't know the order in which the attributes are forwarded, so we're trying to render every time\n // once `data` and `active-policies` are populated, the render will be executed.\n // once the `overrides` object is updated, we want to re-render the panel.\n if (dataAttrs.includes(attrName)) {\n if (attrName === 'data') {\n try {\n this.availablePolicies = JSON.parse(newValue);\n } catch {\n // eslint-disable-next-line no-console\n console.error('Failed to set available policies');\n }\n }\n if (attrName === 'active-policies') {\n this.#activePolicies = (newValue || '').split(',');\n }\n\n if (attrName === 'data-password-policy-value-minlength') {\n const ln = Number(newValue);\n if (!Number.isNaN(ln) && ln > 0) {\n this.#overrides = { ...this.#overrides, minlength: { value: `${ln}` } };\n }\n }\n\n if (attrName === 'data-password-policy-value-passwordstrength') {\n const passwordStrength = parseInt(newValue);\n if (!Number.isNaN(passwordStrength) && passwordStrength >= 0) {\n this.#overrides = {\n ...this.#overrides,\n passwordstrength: {\n ...this.#overrides?.passwordstrength,\n expected: passwordStrength,\n },\n };\n }\n }\n\n if (attrName === 'data-password-policy-actual-passwordstrength') {\n const ln = Number(newValue);\n if (!Number.isNaN(ln) && ln >= 0) {\n this.#overrides = {\n ...this.#overrides,\n passwordstrength: { ...this.#overrides?.passwordstrength, actual: ln },\n };\n }\n }\n }\n\n this.renderItems(this.#availablePolicies, this.#activePolicies, this.#overrides);\n }\n }\n\n get availablePolicies() {\n return this.#availablePolicies || [];\n }\n\n set availablePolicies(val) {\n this.#availablePolicies = val;\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n getStrengthScore() {\n return this.value.length;\n }\n\n compareValues(comparison, expected, actual) {\n switch (comparison.toUpperCase()) {\n case 'GTE': // Greater than or equal to\n return actual >= expected;\n case 'GT': // Greater than\n return actual > expected;\n case 'LTE': // Less than or equal to\n return actual <= expected;\n case 'LT': // Less than\n return actual < expected;\n case 'EQ': // Equal to\n return actual === expected;\n case 'NEQ': // Not equal to\n return actual !== expected;\n default:\n throw new Error(`Invalid comparison type: ${comparison}`);\n }\n }\n\n validate() {\n let policies = this.#availablePolicies;\n\n if (this.#overrides) {\n policies = this.#availablePolicies.map((policy) => {\n const data = this.#overrides[policy.id];\n\n if (!data) return policy;\n\n const res = { ...policy, data };\n\n return res;\n });\n }\n\n return this.#activePolicies.reduce((results, id) => {\n const policy = policies.find((p) => p.id === id);\n\n if (!policy) {\n return results;\n }\n\n const { pattern, message, data, compare } = policy;\n\n if ((!pattern && !compare) || !message) {\n return results;\n }\n\n const validationResult = {\n message: interpolateString(message, data),\n id,\n };\n\n if (pattern) {\n const exp = new RegExp(interpolateString(pattern, data));\n validationResult.valid = exp.test(this.value);\n } else if (compare) {\n validationResult.valid = this.compareValues(\n compare,\n data?.expected ?? -1,\n data?.actual ?? -1\n );\n }\n\n results.push(validationResult);\n\n return results;\n }, []);\n }\n\n get isValid() {\n return !this.validate().some(({ valid }) => valid === false);\n }\n\n getValidationItemTemplate({ valid, message }) {\n const status = !this.value ? 'none' : valid;\n return `\n <li class=\"item\" data-valid=\"${status}\">\n <span class=\"message\">${message}</span>\n </li>\n `;\n }\n\n renderItems(availablePolicies, activePolicies) {\n if (!availablePolicies || !activePolicies.length) {\n return;\n }\n\n this.list.innerHTML = this.validate().map(this.getValidationItemTemplate.bind(this)).join('');\n }\n\n updateLabel(val) {\n if (!val) {\n this.classList.add('hide-label');\n this.label.textContent = '';\n } else {\n this.label.textContent = val;\n this.classList.remove('hide-label');\n }\n }\n}\n\nconst { host, item, symbolDefault, symbolSuccess, symbolError } = {\n host: { selector: () => ':host > div' },\n item: { selector: () => '.item' },\n symbolDefault: { selector: () => '.item[data-valid=\"none\"]::before' },\n symbolSuccess: { selector: () => '.item[data-valid=\"true\"]::before' },\n symbolError: { selector: () => '.item[data-valid=\"false\"]::before' },\n};\n\nexport const PolicyValidationClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n padding: {},\n borderWidth: { ...host, property: 'border-width' },\n borderStyle: { ...host, property: 'border-style' },\n borderColor: { ...host, property: 'border-color' },\n borderRadius: { ...host, property: 'border-radius' },\n backgroundColor: { ...host, property: 'background-color' },\n textColor: { property: 'color' },\n labelMargin: { ...host, property: 'gap' },\n itemsSpacing: { ...item, property: 'line-height' },\n itemSymbolSuccessColor: { ...symbolSuccess, property: 'color' },\n itemSymbolErrorColor: { ...symbolError, property: 'color' },\n itemSymbolDefault: { ...symbolDefault, property: 'content' },\n itemSymbolSuccess: { ...symbolSuccess, property: 'content' },\n itemSymbolError: { ...symbolError, property: 'content' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawPolicyValidation);\n","export const interpolateString = (template, values) =>\n template.replace(/{{(\\w+)+}}/g, (match, key) => values?.[key] || match);\n","import { componentName, PolicyValidationClass } from './PolicyValidationClass';\n\ncustomElements.define(componentName, PolicyValidationClass);\n\nexport { PolicyValidationClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n};\n"],"names":["createBaseInputClass","args","componentName","policyPreviewVars","cssVarList","host","label","internalInputsWrapper","errorMessage","helperText","passwordInput","policyPreview","selector","NewPasswordClass","mappings","fontSize","property","fontFamily","labelFontSize","labelFontWeight","labelTextColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","hostWidth","hostMinWidth","hostDirection","inputsRequiredIndicator","spaceBetweenInputs","policyPreviewBackgroundColor","backgroundColor","policyPreviewPadding","padding","valueInputHeight","valueInputMarginBottom","proxyProps","superclass","init","super","template","document","createElement","externalInputAttr","this","getAttribute","innerHTML","baseElement","appendChild","content","cloneNode","inputElement","shadowRoot","querySelector","initExternalInput","includeAttrs","createSlottedExternalInput","node","slotName","externalInput","slotEle","targetSlot","setAttribute","confirmInput","slots","wrappedEleName","style","excludeAttrsSync","passwordAttrPrefixRegex","confirmAttrPrefixRegex","removeAttrPrefix","attr","prefix","replace","passwordInputAttrs","confirmInputAttrs","policyPanelAttrs","commonAttrs","inputRelatedAttrs","concat","BaseInputClass","customElements","define","observedAttributes","constructor","wrapperEle","value","val","hasConfirm","onHasConfirmChange","classList","toggle","onHasValidationChange","hasValidation","policyPanel","getValidity","isRequired","valueMissing","isValid","typeMismatch","patternMismatch","min","minVal","parseInt","length","tooShort","addEventListener","e","isTrusted","focus","renderInputs","hasExternalInput","passwordStrength","inputs","initInputs","detail","once","target","mapAttrs","handleIndicatorStyle","forEach","input","isInvalid","hasAttribute","handleInputsInvalidAttribute","changedAttributes","includes","inputInvalidValue","rootInvalidValue","handleFocusEventsDispatching","togglePasswordStrength","activePolicies","insertBefore","remove","split","toggleBooleanAttribute","ele","name","removeAttribute","attributeChangedCallback","attrName","oldValue","newValue","inputField","inputElementPlaceholder","revealButtonContainer","revealButtonIcon","requiredIndicator","PasswordClass","inputHeight","inputHorizontalPadding","inputBackgroundColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineColor","inputOutlineStyle","inputOutlineOffset","inputOutlineWidth","labelRequiredIndicator","inputPlaceholderTextColor","inputValueTextColor","revealButtonOffset","revealButtonSize","revealButtonColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","inputType","inputName","noBlurDispatch","useProxyTargets","manualToggleVisibility","handleCaretOnVisibilityChange","origSetPasswordVisible","_setPasswordVisible","origSetFocused","_setFocused","setFocus","bind","createExternalInput","handlePasswordVisibility","caretPosition","origTogglePasswordVisibility","_togglePasswordVisibility","setTimeout","setSelectionRange","focused","call","resetPasswordVisibilityToggle","origSetFocus","origBoundRevealButtonMouseDown","__boundRevealButtonMouseDown","removeEventListener","_passwordVisibleChanged","showPasswordVisibility","hidePasswordVisibility","isReadOnly","isDraggable","inputEle","prevType","onComplete","_","dataAttrs","policyAttrs","RawPolicyValidation","baseSelector","attachShadow","mode","panel","list","updateLabel","availablePolicies","JSON","parse","console","error","ln","Number","isNaN","minlength","passwordstrength","expected","actual","renderItems","getStrengthScore","compareValues","comparison","toUpperCase","Error","validate","policies","map","policy","data","id","reduce","results","find","p","pattern","message","compare","validationResult","exp","RegExp","valid","test","push","some","getValidationItemTemplate","join","textContent","add","item","symbolDefault","symbolSuccess","symbolError","PolicyValidationClass","componentNameOverride","borderWidth","borderStyle","borderColor","borderRadius","textColor","labelMargin","itemsSpacing","itemSymbolSuccessColor","itemSymbolErrorColor","itemSymbolDefault","itemSymbolSuccess","itemSymbolError","interpolateString","values","match","key","observedAttrs","TextFieldClass","icon","renderCopyToClipboard","shouldRender","iconInitConfig","title","iconCopiedConfig","Object","assign","slot","navigator","clipboard","writeText","onLabelClick","oldVal","newVal","attributeChangeCallback","_setType","placeholder","inputMask","disabledPlaceholder","inputDisabled","inputIcon","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","inputDirection","helperTextColor","inputCaretTextColor","textAlign","inputTextAlign","inputPlaceholderColor","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"descope-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E,GAG6B,EAM/B,QAAY,CACVgB,eAAgB,sBAChBE,iBAAkB,CAAC,WAAY,SAC/BxC,mBCnGJyC,eAAeC,OAAO1C,EAAe+C,E","sources":["webpack://@descope/web-components-ui/./src/components/descope-notification/descope-notification-card/NotificationCardClass.js","webpack://@descope/web-components-ui/./src/components/descope-notification/descope-notification-card/index.js","webpack://@descope/web-components-ui/./src/components/descope-notification/descope-notification-container.js","webpack://@descope/web-components-ui/./src/components/descope-notification/NotificationClass.js","webpack://@descope/web-components-ui/./src/components/descope-notification/index.js"],"sourcesContent":["import { compose } from '../../../helpers';\nimport { getComponentName } from '../../../helpers/componentHelpers';\nimport { createStyleMixin, createProxy } from '../../../mixins';\n\nexport const componentName = getComponentName('notification-card');\n\nconst notificationCardMixin = (superclass) =>\n class NotificationCardMixinClass extends superclass {\n close() {\n // if animation is not applied to the element, the node will not be removed\n // from the DOM. We should avoid that. So, if in any case we allow\n // customizing the animation - we should check if animation is applied\n // and if it's not applied - remove the element from the DOM and dispatch\n // `card-closed` event.\n this.baseElement.addEventListener('animationend', () => {\n this.remove();\n this.dispatchEvent(new Event('card-closed'));\n });\n\n this.setAttribute('opened', 'false');\n }\n\n constructor() {\n super();\n\n this.baseElement.innerHTML = `\n <div part=\"root\">\n <div part=\"content\">\n <slot></slot>\n </div>\n <div part=\"close\">\n <slot name=\"close\"></slot>\n </div>\n </div>\n `;\n\n this.closeEle = this.shadowRoot.querySelector('[part=\"close\"]');\n }\n\n init() {\n super.init?.();\n\n this.closeEle.onclick = () => {\n this.close();\n };\n }\n };\n\nconst selectors = {\n content: () => 'vaadin-notification-card::part(content)',\n overlay: () => 'vaadin-notification-card::part(overlay)',\n};\n\nexport const NotificationCardClass = compose(\n createStyleMixin({\n mappings: {\n hostMinWidth: { selector: selectors.content, property: 'min-width' },\n fontFamily: {},\n fontSize: {},\n backgroundColor: { selector: selectors.content },\n textColor: { property: 'color' },\n boxShadow: {},\n borderWidth: { selector: selectors.content, property: 'border-width' },\n borderColor: { selector: selectors.content, property: 'border-color' },\n borderStyle: { selector: selectors.content, property: 'border-style' },\n borderRadius: [\n { selector: selectors.content, property: 'border-radius' },\n { selector: selectors.overlay, property: 'border-radius' },\n ],\n verticalPadding: [\n { selector: selectors.content, property: 'padding-top' },\n { selector: selectors.content, property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { selector: selectors.content, property: 'padding-right' },\n { selector: selectors.content, property: 'padding-left' },\n ],\n },\n }),\n notificationCardMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-notification-card',\n style: () => `\n vaadin-notification-card {\n box-shadow: none;\n }\n ::part(overlay) {\n box-shadow: none;\n background: none;\n }\n\n [part=\"close\"] {\n cursor: pointer;\n display: flex;\n }\n\n [part=\"content\"] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n [part=\"root\"] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/notification';\nimport { componentName, NotificationCardClass } from './NotificationCardClass';\n\ncustomElements.define(componentName, NotificationCardClass);\n\nexport { NotificationCardClass };\n","import '@vaadin/notification';\nimport { getComponentName } from '../../helpers/componentHelpers';\n\nconst vaadinContainerClass = window.customElements.get('vaadin-notification-container');\n\nif (!vaadinContainerClass) {\n throw new Error('could not get vaadin-notification-container class');\n}\n\nclass NotificationContainerClass extends vaadinContainerClass {}\ncustomElements.define(getComponentName('notification-container'), NotificationContainerClass);\n\nexport { NotificationContainerClass };\n","import { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../helpers/componentHelpers';\nimport {\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n hoverableMixin,\n} from '../../mixins';\n\nexport const componentName = getComponentName('notification');\n\nconst NotificationMixin = (superclass) =>\n class NotificationMixinClass extends superclass {\n #card;\n\n constructor() {\n super();\n\n const that = this;\n\n Object.defineProperty(this.baseElement, '_container', {\n get() {\n if (!NotificationMixinClass._container) {\n NotificationMixinClass._container = document.createElement(\n 'descope-notification-container'\n );\n\n // we are overriding the container position to be absolute because we want to keep in inside the flow/widget boundaries\n NotificationMixinClass._container.style.position = 'absolute';\n\n // we're adding the container to body to avoid Vaadin's container's `openChanged`\n // from breaking when trying to remove it directly from the body.\n document.body.appendChild(NotificationMixinClass._container);\n }\n\n if (!NotificationMixinClass._container.isConnected) {\n // Then, we're adding the container to the parentNode, which is the desired location\n // for us on the DOM\n setTimeout(() => that.parentNode.appendChild(NotificationMixinClass._container));\n }\n\n return NotificationMixinClass._container;\n },\n });\n\n Object.defineProperty(this.baseElement, '_card', {\n get() {\n return that.#card;\n },\n });\n\n // we want to replace the card with vaadin's remove notification so it will not throw\n this.baseElement._removeNotificationCard = this.close.bind(this);\n }\n\n close() {\n this.#card.close();\n }\n\n init() {\n super.init?.();\n\n this.createCard();\n\n forwardAttrs(this, this.#card);\n syncAttrs(this.#card, this, { includeAttrs: ['opened'] });\n\n this.baseElement.renderer = (cardRoot) => {\n Array.from(this.childNodes).forEach((child) => cardRoot.appendChild(child));\n };\n }\n\n // eslint-disable-next-line class-methods-use-this\n get isContainerEmpty() {\n return !NotificationMixinClass._container.children.length;\n }\n\n // eslint-disable-next-line class-methods-use-this\n removeContainer() {\n NotificationMixinClass._container.remove();\n }\n\n removeNotification() {\n // remove descope-notification from the DOM\n this.remove();\n // if needed, remove descope-notification-container\n if (this.isContainerEmpty) this.removeContainer();\n }\n\n createCard() {\n this.#card = document.createElement('descope-notification-card');\n this.#card.addEventListener('card-closed', this.removeNotification.bind(this));\n }\n };\n\nexport const NotificationClass = compose(\n draggableMixin,\n componentNameValidationMixin,\n hoverableMixin,\n NotificationMixin\n)(\n createProxy({\n wrappedEleName: 'vaadin-notification',\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/notification';\nimport './descope-notification-container';\nimport './descope-notification-card';\nimport { componentName, NotificationClass } from './NotificationClass';\n\ncustomElements.define(componentName, NotificationClass);\n\nexport { NotificationClass, componentName };\n"],"names":["componentName","selectors","content","overlay","NotificationCardClass","mappings","hostMinWidth","selector","property","fontFamily","fontSize","backgroundColor","textColor","boxShadow","borderWidth","borderColor","borderStyle","borderRadius","verticalPadding","horizontalPadding","superclass","close","this","baseElement","addEventListener","remove","dispatchEvent","Event","setAttribute","constructor","super","innerHTML","closeEle","shadowRoot","querySelector","init","onclick","slots","wrappedEleName","style","excludeAttrsSync","customElements","define","vaadinContainerClass","window","get","Error","NotificationClass","NotificationMixinClass","that","Object","defineProperty","_container","document","createElement","position","body","appendChild","isConnected","setTimeout","parentNode","_removeNotificationCard","bind","createCard","includeAttrs","renderer","cardRoot","Array","from","childNodes","forEach","child","isContainerEmpty","children","length","removeContainer","removeNotification"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-notification-index-js.js","mappings":"oOAIO,MAAMA,GAAgB,QAAiB,qBA4CxCC,EAAY,CAChBC,QAAS,IAAM,0CACfC,QAAS,IAAM,2CAGJC,GAAwB,SACnC,QAAiB,CACfC,SAAU,CACRC,aAAc,CAAEC,SAAUN,EAAUC,QAASM,SAAU,aACvDC,WAAY,CAAC,EACbC,SAAU,CAAC,EACXC,gBAAiB,CAAEJ,SAAUN,EAAUC,SACvCU,UAAW,CAAEJ,SAAU,SACvBK,UAAW,CAAC,EACZC,YAAa,CAAEP,SAAUN,EAAUC,QAASM,SAAU,gBACtDO,YAAa,CAAER,SAAUN,EAAUC,QAASM,SAAU,gBACtDQ,YAAa,CAAET,SAAUN,EAAUC,QAASM,SAAU,gBACtDS,aAAc,CACZ,CAAEV,SAAUN,EAAUC,QAASM,SAAU,iBACzC,CAAED,SAAUN,EAAUE,QAASK,SAAU,kBAE3CU,gBAAiB,CACf,CAAEX,SAAUN,EAAUC,QAASM,SAAU,eACzC,CAAED,SAAUN,EAAUC,QAASM,SAAU,mBAE3CW,kBAAmB,CACjB,CAAEZ,SAAUN,EAAUC,QAASM,SAAU,iBACzC,CAAED,SAAUN,EA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,IAAAc,GACEL,MAAMK,SAENb,KAAKyC,cAEL,QAAazC,KAAMA,MAAK,IACxB,QAAUA,MAAK,EAAOA,KAAM,CAAE0C,aAAc,CAAC,YAE7C1C,KAAKC,YAAY0C,SAAYC,IAC3BC,MAAMC,KAAK9C,KAAK+C,YAAYC,QAASC,GAAUL,EAAST,YAAYc,IAExE,CAEA,oBAAIC,GACF,OAAQxB,EAAuBI,WAAWqB,SAASC,MACrD,CAEA,eAAAC,GACE3B,EAAuBI,WAAW3B,QACpC,CAEA,kBAAAmD,GAEEtD,KAAKG,SAEDH,KAAKkD,kBAAkBlD,KAAKqD,iBAClC,CAEA,UAAAZ,GACEzC,MAAK,EAAQ+B,SAASC,cAAc,6BACpChC,MAAK,EAAME,iBAAiB,cAAeF,KAAKsD,mBAAmBd,KAAKxC,MAC1E,GAG6B,EAM/B,QAAY,CACVgB,eAAgB,sBAChBE,iBAAkB,CAAC,WAAY,SAC/BxC,mBCjGJyC,eAAeC,OAAO1C,EAAe+C,E","sources":["webpack://@descope/web-components-ui/./src/components/descope-notification/descope-notification-card/NotificationCardClass.js","webpack://@descope/web-components-ui/./src/components/descope-notification/descope-notification-card/index.js","webpack://@descope/web-components-ui/./src/components/descope-notification/descope-notification-container.js","webpack://@descope/web-components-ui/./src/components/descope-notification/NotificationClass.js","webpack://@descope/web-components-ui/./src/components/descope-notification/index.js"],"sourcesContent":["import { compose } from '../../../helpers';\nimport { getComponentName } from '../../../helpers/componentHelpers';\nimport { createStyleMixin, createProxy } from '../../../mixins';\n\nexport const componentName = getComponentName('notification-card');\n\nconst notificationCardMixin = (superclass) =>\n class NotificationCardMixinClass extends superclass {\n close() {\n // if animation is not applied to the element, the node will not be removed\n // from the DOM. We should avoid that. So, if in any case we allow\n // customizing the animation - we should check if animation is applied\n // and if it's not applied - remove the element from the DOM and dispatch\n // `card-closed` event.\n this.baseElement.addEventListener('animationend', () => {\n this.remove();\n this.dispatchEvent(new Event('card-closed'));\n });\n\n this.setAttribute('opened', 'false');\n }\n\n constructor() {\n super();\n\n this.baseElement.innerHTML = `\n <div part=\"root\">\n <div part=\"content\">\n <slot></slot>\n </div>\n <div part=\"close\">\n <slot name=\"close\"></slot>\n </div>\n </div>\n `;\n\n this.closeEle = this.shadowRoot.querySelector('[part=\"close\"]');\n }\n\n init() {\n super.init?.();\n\n this.closeEle.onclick = () => {\n this.close();\n };\n }\n };\n\nconst selectors = {\n content: () => 'vaadin-notification-card::part(content)',\n overlay: () => 'vaadin-notification-card::part(overlay)',\n};\n\nexport const NotificationCardClass = compose(\n createStyleMixin({\n mappings: {\n hostMinWidth: { selector: selectors.content, property: 'min-width' },\n fontFamily: {},\n fontSize: {},\n backgroundColor: { selector: selectors.content },\n textColor: { property: 'color' },\n boxShadow: {},\n borderWidth: { selector: selectors.content, property: 'border-width' },\n borderColor: { selector: selectors.content, property: 'border-color' },\n borderStyle: { selector: selectors.content, property: 'border-style' },\n borderRadius: [\n { selector: selectors.content, property: 'border-radius' },\n { selector: selectors.overlay, property: 'border-radius' },\n ],\n verticalPadding: [\n { selector: selectors.content, property: 'padding-top' },\n { selector: selectors.content, property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { selector: selectors.content, property: 'padding-right' },\n { selector: selectors.content, property: 'padding-left' },\n ],\n },\n }),\n notificationCardMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-notification-card',\n style: () => `\n vaadin-notification-card {\n box-shadow: none;\n }\n ::part(overlay) {\n box-shadow: none;\n background: none;\n }\n\n [part=\"close\"] {\n cursor: pointer;\n display: flex;\n }\n\n [part=\"content\"] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n [part=\"root\"] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n `,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/notification';\nimport { componentName, NotificationCardClass } from './NotificationCardClass';\n\ncustomElements.define(componentName, NotificationCardClass);\n\nexport { NotificationCardClass };\n","import '@vaadin/notification';\nimport { getComponentName } from '../../helpers/componentHelpers';\n\nconst vaadinContainerClass = window.customElements.get('vaadin-notification-container');\n\nif (!vaadinContainerClass) {\n throw new Error('could not get vaadin-notification-container class');\n}\n\nclass NotificationContainerClass extends vaadinContainerClass {}\ncustomElements.define(getComponentName('notification-container'), NotificationContainerClass);\n\nexport { NotificationContainerClass };\n","import { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../helpers/componentHelpers';\nimport {\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n hoverableMixin,\n} from '../../mixins';\n\nexport const componentName = getComponentName('notification');\n\nconst NotificationMixin = (superclass) =>\n class NotificationMixinClass extends superclass {\n #card;\n\n constructor() {\n super();\n\n const that = this;\n\n Object.defineProperty(this.baseElement, '_container', {\n get() {\n if (!NotificationMixinClass._container) {\n NotificationMixinClass._container = document.createElement(\n 'descope-notification-container'\n );\n\n // we are overriding the container position to be absolute because we want to keep in inside the flow/widget boundaries\n NotificationMixinClass._container.style.position = 'absolute';\n\n // we're adding the container to body to avoid Vaadin's container's `openChanged`\n // from breaking when trying to remove it directly from the body.\n document.body.appendChild(NotificationMixinClass._container);\n }\n\n if (!NotificationMixinClass._container.isConnected) {\n // Then, we're adding the container to the parentNode, which is the desired location\n // for us on the DOM\n setTimeout(() => that.parentNode.appendChild(NotificationMixinClass._container));\n }\n\n return NotificationMixinClass._container;\n },\n });\n\n Object.defineProperty(this.baseElement, '_card', {\n get() {\n return that.#card;\n },\n });\n\n // we want to replace the card with vaadin's remove notification so it will not throw\n this.baseElement._removeNotificationCard = this.close.bind(this);\n }\n\n close() {\n this.#card.close();\n }\n\n init() {\n super.init?.();\n\n this.createCard();\n\n forwardAttrs(this, this.#card);\n syncAttrs(this.#card, this, { includeAttrs: ['opened'] });\n\n this.baseElement.renderer = (cardRoot) => {\n Array.from(this.childNodes).forEach((child) => cardRoot.appendChild(child));\n };\n }\n\n get isContainerEmpty() {\n return !NotificationMixinClass._container.children.length;\n }\n\n removeContainer() {\n NotificationMixinClass._container.remove();\n }\n\n removeNotification() {\n // remove descope-notification from the DOM\n this.remove();\n // if needed, remove descope-notification-container\n if (this.isContainerEmpty) this.removeContainer();\n }\n\n createCard() {\n this.#card = document.createElement('descope-notification-card');\n this.#card.addEventListener('card-closed', this.removeNotification.bind(this));\n }\n };\n\nexport const NotificationClass = compose(\n draggableMixin,\n componentNameValidationMixin,\n hoverableMixin,\n NotificationMixin\n)(\n createProxy({\n wrappedEleName: 'vaadin-notification',\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/notification';\nimport './descope-notification-container';\nimport './descope-notification-card';\nimport { componentName, NotificationClass } from './NotificationClass';\n\ncustomElements.define(componentName, NotificationClass);\n\nexport { NotificationClass, componentName };\n"],"names":["componentName","selectors","content","overlay","NotificationCardClass","mappings","hostMinWidth","selector","property","fontFamily","fontSize","backgroundColor","textColor","boxShadow","borderWidth","borderColor","borderStyle","borderRadius","verticalPadding","horizontalPadding","superclass","close","this","baseElement","addEventListener","remove","dispatchEvent","Event","setAttribute","constructor","super","innerHTML","closeEle","shadowRoot","querySelector","init","onclick","slots","wrappedEleName","style","excludeAttrsSync","customElements","define","vaadinContainerClass","window","get","Error","NotificationClass","NotificationMixinClass","that","Object","defineProperty","_container","document","createElement","position","body","appendChild","isConnected","setTimeout","parentNode","_removeNotificationCard","bind","createCard","includeAttrs","renderer","cardRoot","Array","from","childNodes","forEach","child","isContainerEmpty","children","length","removeContainer","removeNotification"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3359],{3393(t,e,i){i.d(e,{y:()=>a});var n=i(9696),s=i(79365),r=i(81365);const a=(...t)=>(0,n.Zz)(s.XX,s._$,s.yF,s.jd)((0,r.q)(...t))},47168(t,e,i){i.d(e,{A:()=>h,T:()=>p});var n=i(68049),s=i.n(n),r=i(3393),a=i(97810),u=i(18280),l=i(25964);const p=(0,a.xE)("passcode-internal"),d=["digits","loading"],o=["disabled","bordered","size","invalid","readonly","aria-labelledby"],c=(0,r.y)({componentName:p,baseSelector:"div"}),h=class extends c{static get observedAttributes(){return d.concat(c.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map(t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`);this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map(({value:t})=>t).join("")||""}set value(t){t!==this.value&&this.parseInputValue(this.inputs[0],(0,u.zj)(t))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",t=>{t.isTrusted&&this.inputs[0].focus()}),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),i=Math.min(e+1,this.inputs.length-1);return this.inputs[i]}getPrevInput(t){const e=this.getInputIdx(t),i=Math.max(e-1,0);return this.inputs[i]}fillDigits(t,e){for(let i=0;i<t.length;i+=1){e.value=t[i]??"";const n=this.getNextInput(e);if(n===e)break;e=n}(0,u.pW)(e)}parseInputValue(t,e=""){const i=e.split("");i.length?this.fillDigits(i,t):t.value=""}initInputs(){this.inputs.forEach(t=>{(0,l.fz)(`\n vaadin-text-field::part(input-field)::before {\n ${u.vz}: '';\n content: var(${u._B}, var(${u.vz}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${u.n6}, none);\n align-items: center;\n justify-content: center;\n }`,t);const e=s()(e=>{this.parseInputValue(t,e),(0,u.Z)(t)},0,{trailing:!0});t.addEventListener("input",i=>{t.value=(0,u.zj)(t.value),t.value&&(0,u.Z)(t,t.value[0]),setTimeout(()=>{"deleteContentBackward"===i?.inputType&&(0,u.pW)(this.getPrevInput(t))}),e(t.value)}),t.onkeydown=({key:e})=>{"Backspace"===e?t.value?t.setSelectionRange(1,1):setTimeout(()=>(0,u.pW)(this.getPrevInput(t)),0):1===e.length&&(t.value="")},(0,a.EA)(this,t,{includeAttrs:o}),t.shadowRoot.querySelector("input").setAttribute("aria-label","passcode digit")}),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&d.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===i))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},18280(t,e,i){i.d(e,{Z:()=>l,_B:()=>n,n6:()=>s,pW:()=>a,vz:()=>r,zj:()=>u});const n="--descope-input-mask-content",s="--descope-input-mask-display",r="--descope-input-mask-fallback",a=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},u=t=>t.replace(/\D/g,"")||"",l=(t,e)=>{e?(t.style.setProperty(n,`"${e}"`),t.style.setProperty(s,"flex")):(t.style.removeProperty(n),t.style.removeProperty(s))}},59053(t,e,i){i.r(e);var n=i(47168);customElements.define(n.T,n.A)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3359],{3393(t,e,i){i.d(e,{y:()=>a});var n=i(9696),s=i(79365),r=i(81365);const a=(...t)=>(0,n.Zz)(s.XX,s._$,s.yF,s.jd)((0,r.q)(...t))},47168(t,e,i){i.d(e,{A:()=>h,T:()=>p});var n=i(68049),s=i.n(n),r=i(25964),a=i(3393),u=i(97810),l=i(18280);const p=(0,u.xE)("passcode-internal"),d=["digits","loading"],o=["disabled","bordered","size","invalid","readonly","aria-labelledby"],c=(0,a.y)({componentName:p,baseSelector:"div"}),h=class extends c{static get observedAttributes(){return d.concat(c.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map(t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`);this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map(({value:t})=>t).join("")||""}set value(t){t!==this.value&&this.parseInputValue(this.inputs[0],(0,l.zj)(t))}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",t=>{t.isTrusted&&this.inputs[0].focus()}),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),i=Math.min(e+1,this.inputs.length-1);return this.inputs[i]}getPrevInput(t){const e=this.getInputIdx(t),i=Math.max(e-1,0);return this.inputs[i]}fillDigits(t,e){for(let i=0;i<t.length;i+=1){e.value=t[i]??"";const n=this.getNextInput(e);if(n===e)break;e=n}(0,l.pW)(e)}parseInputValue(t,e=""){const i=e.split("");i.length?this.fillDigits(i,t):t.value=""}initInputs(){this.inputs.forEach(t=>{(0,r.fz)(`\n vaadin-text-field::part(input-field)::before {\n ${l.vz}: '';\n content: var(${l._B}, var(${l.vz}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${l.n6}, none);\n align-items: center;\n justify-content: center;\n }`,t);const e=s()(e=>{this.parseInputValue(t,e),(0,l.Z)(t)},0,{trailing:!0});t.addEventListener("input",i=>{t.value=(0,l.zj)(t.value),t.value&&(0,l.Z)(t,t.value[0]),setTimeout(()=>{"deleteContentBackward"===i?.inputType&&(0,l.pW)(this.getPrevInput(t))}),e(t.value)}),t.onkeydown=({key:e})=>{"Backspace"===e?t.value?t.setSelectionRange(1,1):setTimeout(()=>(0,l.pW)(this.getPrevInput(t)),0):1===e.length&&(t.value="")},(0,u.EA)(this,t,{includeAttrs:o}),t.shadowRoot.querySelector("input").setAttribute("aria-label","passcode digit")}),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&d.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===i))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},18280(t,e,i){i.d(e,{Z:()=>l,_B:()=>n,n6:()=>s,pW:()=>a,vz:()=>r,zj:()=>u});const n="--descope-input-mask-content",s="--descope-input-mask-display",r="--descope-input-mask-fallback",a=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},u=t=>t.replace(/\D/g,"")||"",l=(t,e)=>{e?(t.style.setProperty(n,`"${e}"`),t.style.setProperty(s,"flex")):(t.style.removeProperty(n),t.style.removeProperty(s))}},59053(t,e,i){i.r(e);var n=i(47168);customElements.define(n.T,n.A)}}]);
2
2
  //# sourceMappingURL=descope-passcode-descope-passcode-internal-index-js.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"descope-passcode-descope-passcode-internal-index-js.js","mappings":"0LASO,MAAMA,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,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,EAIGR,EAAM/B,MAGT+B,EAAMS,kBAAkB,EAAG,GAF3BJ,WAAW,KAAM,QAAa3D,KAAK+C,aAAaO,IAAS,GAInC,IAAfQ,EAAIhB,SAEbQ,EAAM/B,MAAQ,MAIlB,QAAavB,KAAMsD,EAAO,CAAEU,aAActE,IAC1C4D,EAAMW,WAAW9D,cAAc,SAASe,aAAa,aAAc,oBAGrElB,KAAKkE,6BAA6BlE,KAAKM,QACvCN,KAAKmE,6BACP,CAEA,wBAAAC,CAAyBC,EAAUC,EAAUC,GAC3CxE,MAAMqE,2BAA2BC,EAAUC,EAAUC,GAGjDD,IAAaC,GACX9E,EAAmB+E,SAASH,KACb,WAAbA,GACFrE,KAAKK,eAEU,YAAbgE,GACFrE,KAAKgB,mBAAgC,SAAbuD,GAIhC,CAEA,WAAI1C,GACF,MAAO,WAAW7B,KAAKQ,WACzB,E,6EC9OK,MAAMiE,EAAuB,+BACvBC,EAA0B,+BAC1BC,EAA2B,gCAE3BC,EAAgBC,IAC3BA,GAAKxC,QACLwC,GAAKd,oBAAoB,EAAG,IAGjBe,EAAeC,GACnBA,EAAIC,QAAQ,MAAO,KAAO,GAGtBC,EAAuB,CAAC3B,EAAO/B,KACtCA,GACF+B,EAAM4B,MAAMC,YAAYV,EAAsB,IAAIlD,MAClD+B,EAAM4B,MAAMC,YAAYT,EAAyB,UAEjDpB,EAAM4B,MAAME,eAAeX,GAC3BnB,EAAM4B,MAAME,eAAeV,I,qCCjB/BW,eAAeC,OAAO,IAAe,I","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js","webpack://@descope/web-components-ui/./src/components/descope-passcode/descope-passcode-internal/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-passcode/descope-passcode-internal/index.js"],"sourcesContent":["import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","/* eslint-disable no-param-reassign */\nimport debounce from 'lodash.debounce';\nimport { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport {\n sanitizeStr,\n focusElement,\n toggleMaskVisibility,\n INPUT_MASK_FALLBACK_PROP,\n INPUT_MASK_TEXT_PROP,\n INPUT_MASK_DISPLAY_PROP,\n} from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('passcode-internal');\n\nconst observedAttributes = ['digits', 'loading'];\n\nconst forwardAttributes = [\n 'disabled',\n 'bordered',\n 'size',\n 'invalid',\n 'readonly',\n 'aria-labelledby',\n];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass PasscodeInternal extends BaseInputClass {\n static get observedAttributes() {\n return observedAttributes.concat(BaseInputClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n\t\t<div class=\"wrapper\"></div>\n\t\t<div class=\"loader-container\">\n <descope-loader-radial size=\"xs\" mode=\"primary\"></descope-loader-radial>\n </div>\n\t\t`;\n\n this.wrapperEle = this.querySelector('.wrapper');\n this.loaderContainer = this.querySelector('.loader-container');\n }\n\n renderInputs() {\n const inputs = [...Array(this.digits).keys()].map(\n (idx) => `\n\t\t<descope-text-field\n\t\t\tdata-id=${idx}\n\t\t\ttype=\"tel\"\n\t\t\tautocomplete=\"one-time-code\"\n\t\t\tinputMode=\"numeric\"\n\t\t></descope-text-field>\n\t`\n );\n\n this.wrapperEle.innerHTML = inputs.join('');\n\n this.inputs = Array.from(this.querySelectorAll('descope-text-field'));\n\n this.initInputs();\n }\n\n handleLoadingState(isLoading) {\n if (isLoading) {\n this.setAttribute('inert', 'true');\n } else {\n this.removeAttribute('inert');\n }\n }\n\n get digits() {\n return Number.parseInt(this.getAttribute('digits'), 10) || 6;\n }\n\n get value() {\n return this.inputs?.map(({ value }) => value).join('') || '';\n }\n\n set value(val) {\n if (val === this.value) return;\n\n this.parseInputValue(this.inputs[0], sanitizeStr(val));\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n if (this.pattern && !new RegExp(this.pattern).test(this.value)) {\n return { patternMismatch: true };\n }\n\n return {};\n }\n\n init() {\n // we are adding listeners before calling to super because it's stopping the events\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) this.inputs[0].focus();\n });\n\n super.init?.();\n\n this.renderInputs();\n }\n\n // eslint-disable-next-line class-methods-use-this\n getInputIdx(inputEle) {\n return Number.parseInt(inputEle.getAttribute('data-id'), 10);\n }\n\n getNextInput(currInput) {\n const currentIdx = this.getInputIdx(currInput);\n const newIdx = Math.min(currentIdx + 1, this.inputs.length - 1);\n return this.inputs[newIdx];\n }\n\n getPrevInput(currInput) {\n const currentIdx = this.getInputIdx(currInput);\n const newIdx = Math.max(currentIdx - 1, 0);\n return this.inputs[newIdx];\n }\n\n fillDigits(charArr, currentInput) {\n for (let i = 0; i < charArr.length; i += 1) {\n currentInput.value = charArr[i] ?? '';\n\n const nextInput = this.getNextInput(currentInput);\n\n if (nextInput === currentInput) break;\n currentInput = nextInput;\n }\n\n focusElement(currentInput);\n }\n\n parseInputValue(input, value = '') {\n const charArr = value.split('');\n\n if (!charArr.length) {\n // if we got an invalid value we want to clear the input\n input.value = '';\n } else this.fillDigits(charArr, input);\n }\n\n initInputs() {\n this.inputs.forEach((input) => {\n // During debounced input we hide the value with a mask.\n // This allows us to hide the multiple population of the first input\n // in case of an automated input (e.g. Safari OTP Autofill or paste).\n injectStyle(\n `\n vaadin-text-field::part(input-field)::before {\n ${INPUT_MASK_FALLBACK_PROP}: '';\n content: var(${INPUT_MASK_TEXT_PROP}, var(${INPUT_MASK_FALLBACK_PROP}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${INPUT_MASK_DISPLAY_PROP}, none);\n align-items: center;\n justify-content: center;\n }`,\n input\n );\n\n const handleParseInput = (val) => {\n this.parseInputValue(input, val);\n toggleMaskVisibility(input);\n };\n\n const debouncedHandleParseInput = debounce(handleParseInput, 0, { trailing: true });\n\n // sanitize the input\n input.addEventListener('input', (e) => {\n input.value = sanitizeStr(input.value);\n\n if (input.value) {\n toggleMaskVisibility(input, input.value[0]);\n }\n\n setTimeout(() => {\n if (e?.inputType === 'deleteContentBackward') {\n focusElement(this.getPrevInput(input));\n }\n });\n debouncedHandleParseInput(input.value);\n });\n\n // we want backspace to focus on the previous digit\n input.onkeydown = ({ key }) => {\n // when user deletes a digit, we want to focus the previous digit\n if (key === 'Backspace') {\n // if value is empty then the input element does not fire `input` event\n // if this is the case, we focus the element here.\n // otherwise, the focusElement occurs as part of the `input` event listener\n if (!input.value) {\n setTimeout(() => focusElement(this.getPrevInput(input)), 0);\n } else {\n input.setSelectionRange(1, 1);\n }\n } else if (key.length === 1) {\n // we want only characters and not command keys\n input.value = ''; // we are clearing the previous value so we can override it with the new value\n }\n };\n\n forwardAttrs(this, input, { includeAttrs: forwardAttributes });\n input.shadowRoot.querySelector('input').setAttribute('aria-label', 'passcode digit');\n });\n\n this.handleFocusEventsDispatching(this.inputs);\n this.handleInputEventDispatching();\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n // sync attributes to inputs\n if (oldValue !== newValue) {\n if (observedAttributes.includes(attrName)) {\n if (attrName === 'digits') {\n this.renderInputs();\n }\n if (attrName === 'loading') {\n this.handleLoadingState(newValue === 'true');\n }\n }\n }\n }\n\n get pattern() {\n return `^$|^\\\\d{${this.digits},}$`;\n }\n}\n\nexport default PasscodeInternal;\n","export const INPUT_MASK_TEXT_PROP = '--descope-input-mask-content';\nexport const INPUT_MASK_DISPLAY_PROP = '--descope-input-mask-display';\nexport const INPUT_MASK_FALLBACK_PROP = '--descope-input-mask-fallback';\n\nexport const focusElement = (ele) => {\n ele?.focus();\n ele?.setSelectionRange?.(1, 1);\n};\n\nexport const sanitizeStr = (str) => {\n return str.replace(/\\D/g, '') || '';\n};\n\nexport const toggleMaskVisibility = (input, value) => {\n if (value) {\n input.style.setProperty(INPUT_MASK_TEXT_PROP, `\"${value}\"`);\n input.style.setProperty(INPUT_MASK_DISPLAY_PROP, 'flex');\n } else {\n input.style.removeProperty(INPUT_MASK_TEXT_PROP);\n input.style.removeProperty(INPUT_MASK_DISPLAY_PROP);\n }\n};\n","import PasscodeInternal, { componentName } from './PasscodeInternal';\n\ncustomElements.define(componentName, PasscodeInternal);\n"],"names":["createBaseInputClass","args","componentName","observedAttributes","forwardAttributes","BaseInputClass","baseSelector","concat","constructor","super","this","innerHTML","wrapperEle","querySelector","loaderContainer","renderInputs","inputs","Array","digits","keys","map","idx","join","from","querySelectorAll","initInputs","handleLoadingState","isLoading","setAttribute","removeAttribute","Number","parseInt","getAttribute","value","val","parseInputValue","getValidity","isRequired","valueMissing","pattern","RegExp","test","patternMismatch","init","addEventListener","e","isTrusted","focus","getInputIdx","inputEle","getNextInput","currInput","currentIdx","newIdx","Math","min","length","getPrevInput","max","fillDigits","charArr","currentInput","i","nextInput","input","split","forEach","debouncedHandleParseInput","trailing","setTimeout","inputType","onkeydown","key","setSelectionRange","includeAttrs","shadowRoot","handleFocusEventsDispatching","handleInputEventDispatching","attributeChangedCallback","attrName","oldValue","newValue","includes","INPUT_MASK_TEXT_PROP","INPUT_MASK_DISPLAY_PROP","INPUT_MASK_FALLBACK_PROP","focusElement","ele","sanitizeStr","str","replace","toggleMaskVisibility","style","setProperty","removeProperty","customElements","define"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-passcode-descope-passcode-internal-index-js.js","mappings":"0LASO,MAAMA,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,U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EP,cAARA,EAIGR,EAAM/B,MAGT+B,EAAMS,kBAAkB,EAAG,GAF3BJ,WAAW,KAAM,QAAa3D,KAAK+C,aAAaO,IAAS,GAInC,IAAfQ,EAAIhB,SAEbQ,EAAM/B,MAAQ,MAIlB,QAAavB,KAAMsD,EAAO,CAAEU,aAActE,IAC1C4D,EAAMW,WAAW9D,cAAc,SAASe,aAAa,aAAc,oBAGrElB,KAAKkE,6BAA6BlE,KAAKM,QACvCN,KAAKmE,6BACP,CAEA,wBAAAC,CAAyBC,EAAUC,EAAUC,GAC3CxE,MAAMqE,2BAA2BC,EAAUC,EAAUC,GAGjDD,IAAaC,GACX9E,EAAmB+E,SAASH,KACb,WAAbA,GACFrE,KAAKK,eAEU,YAAbgE,GACFrE,KAAKgB,mBAAgC,SAAbuD,GAIhC,CAEA,WAAI1C,GACF,MAAO,WAAW7B,KAAKQ,WACzB,E,6EC5OK,MAAMiE,EAAuB,+BACvBC,EAA0B,+BAC1BC,EAA2B,gCAE3BC,EAAgBC,IAC3BA,GAAKxC,QACLwC,GAAKd,oBAAoB,EAAG,IAGjBe,EAAeC,GAAQA,EAAIC,QAAQ,MAAO,KAAO,GAEjDC,EAAuB,CAAC3B,EAAO/B,KACtCA,GACF+B,EAAM4B,MAAMC,YAAYV,EAAsB,IAAIlD,MAClD+B,EAAM4B,MAAMC,YAAYT,EAAyB,UAEjDpB,EAAM4B,MAAME,eAAeX,GAC3BnB,EAAM4B,MAAME,eAAeV,I,qCCf/BW,eAAeC,OAAO,IAAe,I","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js","webpack://@descope/web-components-ui/./src/components/descope-passcode/descope-passcode-internal/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-passcode/descope-passcode-internal/index.js"],"sourcesContent":["import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import debounce from 'lodash.debounce';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport {\n sanitizeStr,\n focusElement,\n toggleMaskVisibility,\n INPUT_MASK_FALLBACK_PROP,\n INPUT_MASK_TEXT_PROP,\n INPUT_MASK_DISPLAY_PROP,\n} from './helpers';\n\nexport const componentName = getComponentName('passcode-internal');\n\nconst observedAttributes = ['digits', 'loading'];\n\nconst forwardAttributes = [\n 'disabled',\n 'bordered',\n 'size',\n 'invalid',\n 'readonly',\n 'aria-labelledby',\n];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass PasscodeInternal extends BaseInputClass {\n static get observedAttributes() {\n return observedAttributes.concat(BaseInputClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n\t\t<div class=\"wrapper\"></div>\n\t\t<div class=\"loader-container\">\n <descope-loader-radial size=\"xs\" mode=\"primary\"></descope-loader-radial>\n </div>\n\t\t`;\n\n this.wrapperEle = this.querySelector('.wrapper');\n this.loaderContainer = this.querySelector('.loader-container');\n }\n\n renderInputs() {\n const inputs = [...Array(this.digits).keys()].map(\n (idx) => `\n\t\t<descope-text-field\n\t\t\tdata-id=${idx}\n\t\t\ttype=\"tel\"\n\t\t\tautocomplete=\"one-time-code\"\n\t\t\tinputMode=\"numeric\"\n\t\t></descope-text-field>\n\t`\n );\n\n this.wrapperEle.innerHTML = inputs.join('');\n\n this.inputs = Array.from(this.querySelectorAll('descope-text-field'));\n\n this.initInputs();\n }\n\n handleLoadingState(isLoading) {\n if (isLoading) {\n this.setAttribute('inert', 'true');\n } else {\n this.removeAttribute('inert');\n }\n }\n\n get digits() {\n return Number.parseInt(this.getAttribute('digits'), 10) || 6;\n }\n\n get value() {\n return this.inputs?.map(({ value }) => value).join('') || '';\n }\n\n set value(val) {\n if (val === this.value) return;\n\n this.parseInputValue(this.inputs[0], sanitizeStr(val));\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n if (this.pattern && !new RegExp(this.pattern).test(this.value)) {\n return { patternMismatch: true };\n }\n\n return {};\n }\n\n init() {\n // we are adding listeners before calling to super because it's stopping the events\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) this.inputs[0].focus();\n });\n\n super.init?.();\n\n this.renderInputs();\n }\n\n getInputIdx(inputEle) {\n return Number.parseInt(inputEle.getAttribute('data-id'), 10);\n }\n\n getNextInput(currInput) {\n const currentIdx = this.getInputIdx(currInput);\n const newIdx = Math.min(currentIdx + 1, this.inputs.length - 1);\n return this.inputs[newIdx];\n }\n\n getPrevInput(currInput) {\n const currentIdx = this.getInputIdx(currInput);\n const newIdx = Math.max(currentIdx - 1, 0);\n return this.inputs[newIdx];\n }\n\n fillDigits(charArr, currentInput) {\n for (let i = 0; i < charArr.length; i += 1) {\n currentInput.value = charArr[i] ?? '';\n\n const nextInput = this.getNextInput(currentInput);\n\n if (nextInput === currentInput) break;\n currentInput = nextInput;\n }\n\n focusElement(currentInput);\n }\n\n parseInputValue(input, value = '') {\n const charArr = value.split('');\n\n if (!charArr.length) {\n // if we got an invalid value we want to clear the input\n input.value = '';\n } else this.fillDigits(charArr, input);\n }\n\n initInputs() {\n this.inputs.forEach((input) => {\n // During debounced input we hide the value with a mask.\n // This allows us to hide the multiple population of the first input\n // in case of an automated input (e.g. Safari OTP Autofill or paste).\n injectStyle(\n `\n vaadin-text-field::part(input-field)::before {\n ${INPUT_MASK_FALLBACK_PROP}: '';\n content: var(${INPUT_MASK_TEXT_PROP}, var(${INPUT_MASK_FALLBACK_PROP}));\n position: absolute;\n width: 100%;\n height: 100%;\n display: var(${INPUT_MASK_DISPLAY_PROP}, none);\n align-items: center;\n justify-content: center;\n }`,\n input\n );\n\n const handleParseInput = (val) => {\n this.parseInputValue(input, val);\n toggleMaskVisibility(input);\n };\n\n const debouncedHandleParseInput = debounce(handleParseInput, 0, { trailing: true });\n\n // sanitize the input\n input.addEventListener('input', (e) => {\n input.value = sanitizeStr(input.value);\n\n if (input.value) {\n toggleMaskVisibility(input, input.value[0]);\n }\n\n setTimeout(() => {\n if (e?.inputType === 'deleteContentBackward') {\n focusElement(this.getPrevInput(input));\n }\n });\n debouncedHandleParseInput(input.value);\n });\n\n // we want backspace to focus on the previous digit\n input.onkeydown = ({ key }) => {\n // when user deletes a digit, we want to focus the previous digit\n if (key === 'Backspace') {\n // if value is empty then the input element does not fire `input` event\n // if this is the case, we focus the element here.\n // otherwise, the focusElement occurs as part of the `input` event listener\n if (!input.value) {\n setTimeout(() => focusElement(this.getPrevInput(input)), 0);\n } else {\n input.setSelectionRange(1, 1);\n }\n } else if (key.length === 1) {\n // we want only characters and not command keys\n input.value = ''; // we are clearing the previous value so we can override it with the new value\n }\n };\n\n forwardAttrs(this, input, { includeAttrs: forwardAttributes });\n input.shadowRoot.querySelector('input').setAttribute('aria-label', 'passcode digit');\n });\n\n this.handleFocusEventsDispatching(this.inputs);\n this.handleInputEventDispatching();\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n // sync attributes to inputs\n if (oldValue !== newValue) {\n if (observedAttributes.includes(attrName)) {\n if (attrName === 'digits') {\n this.renderInputs();\n }\n if (attrName === 'loading') {\n this.handleLoadingState(newValue === 'true');\n }\n }\n }\n }\n\n get pattern() {\n return `^$|^\\\\d{${this.digits},}$`;\n }\n}\n\nexport default PasscodeInternal;\n","export const INPUT_MASK_TEXT_PROP = '--descope-input-mask-content';\nexport const INPUT_MASK_DISPLAY_PROP = '--descope-input-mask-display';\nexport const INPUT_MASK_FALLBACK_PROP = '--descope-input-mask-fallback';\n\nexport const focusElement = (ele) => {\n ele?.focus();\n ele?.setSelectionRange?.(1, 1);\n};\n\nexport const sanitizeStr = (str) => str.replace(/\\D/g, '') || '';\n\nexport const toggleMaskVisibility = (input, value) => {\n if (value) {\n input.style.setProperty(INPUT_MASK_TEXT_PROP, `\"${value}\"`);\n input.style.setProperty(INPUT_MASK_DISPLAY_PROP, 'flex');\n } else {\n input.style.removeProperty(INPUT_MASK_TEXT_PROP);\n input.style.removeProperty(INPUT_MASK_DISPLAY_PROP);\n }\n};\n","import PasscodeInternal, { componentName } from './PasscodeInternal';\n\ncustomElements.define(componentName, PasscodeInternal);\n"],"names":["createBaseInputClass","args","componentName","observedAttributes","forwardAttributes","BaseInputClass","baseSelector","concat","constructor","super","this","innerHTML","wrapperEle","querySelector","loaderContainer","renderInputs","inputs","Array","digits","keys","map","idx","join","from","querySelectorAll","initInputs","handleLoadingState","isLoading","setAttribute","removeAttribute","Number","parseInt","getAttribute","value","val","parseInputValue","getValidity","isRequired","valueMissing","pattern","RegExp","test","patternMismatch","init","addEventListener","e","isTrusted","focus","getInputIdx","inputEle","getNextInput","currInput","currentIdx","newIdx","Math","min","length","getPrevInput","max","fillDigits","charArr","currentInput","i","nextInput","input","split","forEach","debouncedHandleParseInput","trailing","setTimeout","inputType","onkeydown","key","setSelectionRange","includeAttrs","shadowRoot","handleFocusEventsDispatching","handleInputEventDispatching","attributeChangedCallback","attrName","oldValue","newValue","includes","INPUT_MASK_TEXT_PROP","INPUT_MASK_DISPLAY_PROP","INPUT_MASK_FALLBACK_PROP","focusElement","ele","sanitizeStr","str","replace","toggleMaskVisibility","style","setProperty","removeProperty","customElements","define"],"sourceRoot":""}