@descope/web-components-ui 3.10.2 → 3.11.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 (31) hide show
  1. package/dist/cjs/index.cjs.js +1466 -757
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +1720 -1014
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/9582.js +1 -1
  6. package/dist/umd/9582.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/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  10. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  11. package/dist/umd/descope-alert-index-js.js +1 -1
  12. package/dist/umd/descope-alert-index-js.js.map +1 -1
  13. package/dist/umd/descope-enriched-text.js +1 -1
  14. package/dist/umd/descope-enriched-text.js.map +1 -1
  15. package/dist/umd/descope-link.js +1 -1
  16. package/dist/umd/descope-link.js.map +1 -1
  17. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
  18. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  19. package/dist/umd/descope-policy-validation-index-js.js.map +1 -1
  20. package/dist/umd/descope-tooltip.js +1 -1
  21. package/dist/umd/descope-tooltip.js.map +1 -1
  22. package/dist/umd/descope-trusted-devices.js +1 -1
  23. package/dist/umd/descope-trusted-devices.js.map +1 -1
  24. package/dist/umd/descope-user-passkeys.js +339 -0
  25. package/dist/umd/descope-user-passkeys.js.LICENSE.txt +5 -0
  26. package/dist/umd/descope-user-passkeys.js.map +1 -0
  27. package/dist/umd/index.js +1 -1
  28. package/dist/umd/index.js.map +1 -1
  29. package/package.json +36 -35
  30. package/src/components/descope-policy-validation/PolicyValidationClass.js +1 -3
  31. package/src/theme/components/index.js +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"descope-new-password-index-js.js","mappings":"yMASO,MAAMA,EAAuB,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ClB,CAAEvK,SAAU,4BAA6BI,SAAU,WACnD,IAAKyT,EAAqBzT,SAAU,YAEtCoK,uBAAwB,CACtB,IAAK9B,EAAYtI,SAAU,eAC3B,IAAKkD,EAAelD,SAAU,gBAEhCyB,iBAAkB,CAChB,IAAKuF,EAAOhH,SAAU,UACtB,IAAKkD,EAAelD,SAAU,WAEhC0B,uBAAwB,CACtB,IAAKsF,EAAOhH,SAAU,iBACtB,IAAKkD,EAAelD,SAAU,kBAGhCiU,gBAAiB,CACf,IAAKV,EAAWvT,SAAU,gBAC1B,IAAKuT,EAAWvT,SAAU,gBAE5BkU,cAAe,IAAKX,EAAWvT,SAAU,aACzCmU,eAAgB,IAAKZ,EAAWvT,SAAU,SAC1CoU,kBAAmB,CACjB,IAAKpN,EAAOhH,SAAU,yBACtB,IAAKgH,EAAOhH,SAAU,iBACtB,IAAKkD,EAAelD,SAAU,yBAC9B,IAAKkD,EAAelD,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 'data-password-policy-value-disallowedchars',\n 'data-password-policy-value-email',\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 inputValueFontWeight: {\n ...passwordInput,\n property: PasswordClass.cssVarList.inputValueFontWeight,\n },\n inputPlaceholderFontWeight: {\n ...passwordInput,\n property: PasswordClass.cssVarList.inputPlaceholderFontWeight,\n },\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, 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 'data-password-policy-value-disallowedchars',\n 'data-password-policy-value-email',\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 inputValueFontWeight: [\n { ...inputElement, property: 'font-weight' },\n { selector: () => ':host ::slotted(input)', property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n { ...inputElementPlaceholder, property: 'font-weight' },\n { selector: () => ':host ::slotted(input:placeholder-shown)', property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, 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 'data-password-policy-value-disallowedchars',\n 'data-password-policy-value-email',\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 // disallowedchars: this stores the configured char list in\n // overrides.disallowedchars.value so the message can interpolate\n // `{{value}}`. The regex pattern itself is built upstream (orchestrator\n // or caller) and shipped on the policy entry — it is not derived from\n // this override. When the attribute is cleared, drop the override so\n // the panel doesn't keep stale data.\n if (attrName === 'data-password-policy-value-disallowedchars') {\n if (newValue) {\n this.#overrides = {\n ...this.#overrides,\n disallowedchars: {\n ...this.#overrides?.disallowedchars,\n value: newValue,\n },\n };\n } else if (this.#overrides?.disallowedchars) {\n const { disallowedchars: _drop, ...rest } = this.#overrides;\n this.#overrides = rest;\n }\n }\n\n // disallowemail: stash the user's email so the STR_NEQ_CI comparator\n // has an `expected` to compare against the live password value. Clear\n // the override when the attribute is removed/empty so we don't keep\n // blocking against a previous user's email.\n if (attrName === 'data-password-policy-value-email') {\n if (newValue) {\n this.#overrides = {\n ...this.#overrides,\n disallowemail: {\n ...this.#overrides?.disallowemail,\n expected: newValue,\n },\n };\n } else if (this.#overrides?.disallowemail) {\n const { disallowemail: _drop, ...rest } = this.#overrides;\n this.#overrides = rest;\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 const normalizedCompare = typeof compare === 'string' ? compare.toUpperCase() : compare;\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 (normalizedCompare === 'STR_NEQ_CI') {\n // Compare the live password against the configured string AND its\n // local-part (before '@'), case-insensitively. Used by the\n // disallowemail policy.\n const expected = (data?.expected ?? '').toLowerCase();\n const actual = (this.value ?? '').toLowerCase();\n if (!expected || !actual) {\n // nothing to compare → mark valid so we don't block the flow\n validationResult.valid = true;\n } else {\n const at = expected.indexOf('@');\n const localPart = at > 0 ? expected.slice(0, at) : expected;\n validationResult.valid = actual !== expected && actual !== localPart;\n }\n } else if (compare) {\n validationResult.valid = this.compareValues(\n normalizedCompare,\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 buildValidationItem({ valid, message }) {\n const status = !this.value ? 'none' : valid;\n const li = document.createElement('li');\n li.className = 'item';\n li.dataset.valid = status;\n const span = document.createElement('span');\n span.className = 'message';\n // `textContent` handles any tenant-configured string in `message` safely\n // (e.g. the disallowedchars list) without needing to escape HTML.\n span.textContent = message ?? '';\n li.appendChild(span);\n return li;\n }\n\n renderItems(availablePolicies, activePolicies) {\n if (!availablePolicies || !activePolicies.length) {\n return;\n }\n\n this.list.replaceChildren(\n ...this.validate().map(this.buildValidationItem.bind(this)),\n );\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 inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n { selector: () => ':host input:placeholder-shown', property: 'font-weight' },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, 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","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","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","disallowedchars","_drop","rest","disallowemail","renderItems","getStrengthScore","compareValues","comparison","toUpperCase","Error","validate","policies","map","policy","data","id","reduce","results","find","p","pattern","message","compare","normalizedCompare","validationResult","exp","RegExp","valid","test","toLowerCase","at","indexOf","localPart","slice","push","some","buildValidationItem","status","li","className","dataset","span","textContent","replaceChildren","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,YAwF1C,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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kD,EAAelD,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 'data-password-policy-value-disallowedchars',\n 'data-password-policy-value-email',\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 inputValueFontWeight: {\n ...passwordInput,\n property: PasswordClass.cssVarList.inputValueFontWeight,\n },\n inputPlaceholderFontWeight: {\n ...passwordInput,\n property: PasswordClass.cssVarList.inputPlaceholderFontWeight,\n },\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, 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 'data-password-policy-value-disallowedchars',\n 'data-password-policy-value-email',\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 inputValueFontWeight: [\n { ...inputElement, property: 'font-weight' },\n { selector: () => ':host ::slotted(input)', property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n { ...inputElementPlaceholder, property: 'font-weight' },\n { selector: () => ':host ::slotted(input:placeholder-shown)', property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, 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 'data-password-policy-value-disallowedchars',\n 'data-password-policy-value-email',\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 // disallowedchars: this stores the configured char list in\n // overrides.disallowedchars.value so the message can interpolate\n // `{{value}}`. The regex pattern itself is built upstream (orchestrator\n // or caller) and shipped on the policy entry — it is not derived from\n // this override. When the attribute is cleared, drop the override so\n // the panel doesn't keep stale data.\n if (attrName === 'data-password-policy-value-disallowedchars') {\n if (newValue) {\n this.#overrides = {\n ...this.#overrides,\n disallowedchars: {\n ...this.#overrides?.disallowedchars,\n value: newValue,\n },\n };\n } else if (this.#overrides?.disallowedchars) {\n const { disallowedchars: _drop, ...rest } = this.#overrides;\n this.#overrides = rest;\n }\n }\n\n // disallowemail: stash the user's email so the STR_NEQ_CI comparator\n // has an `expected` to compare against the live password value. Clear\n // the override when the attribute is removed/empty so we don't keep\n // blocking against a previous user's email.\n if (attrName === 'data-password-policy-value-email') {\n if (newValue) {\n this.#overrides = {\n ...this.#overrides,\n disallowemail: {\n ...this.#overrides?.disallowemail,\n expected: newValue,\n },\n };\n } else if (this.#overrides?.disallowemail) {\n const { disallowemail: _drop, ...rest } = this.#overrides;\n this.#overrides = rest;\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 const normalizedCompare = typeof compare === 'string' ? compare.toUpperCase() : compare;\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 (normalizedCompare === 'STR_NEQ_CI') {\n // Compare the live password against the configured string AND its\n // local-part (before '@'), case-insensitively. Used by the\n // disallowemail policy.\n const expected = (data?.expected ?? '').toLowerCase();\n const actual = (this.value ?? '').toLowerCase();\n if (!expected || !actual) {\n // nothing to compare → mark valid so we don't block the flow\n validationResult.valid = true;\n } else {\n const at = expected.indexOf('@');\n const localPart = at > 0 ? expected.slice(0, at) : expected;\n validationResult.valid = actual !== expected && actual !== localPart;\n }\n } else if (compare) {\n validationResult.valid = this.compareValues(\n normalizedCompare,\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 buildValidationItem({ valid, message }) {\n const status = !this.value ? 'none' : valid;\n const li = document.createElement('li');\n li.className = 'item';\n li.dataset.valid = status;\n const span = document.createElement('span');\n span.className = 'message';\n // `textContent` handles any tenant-configured string in `message` safely\n // (e.g. the disallowedchars list) without needing to escape HTML.\n span.textContent = message ?? '';\n li.appendChild(span);\n return li;\n }\n\n renderItems(availablePolicies, activePolicies) {\n if (!availablePolicies || !activePolicies.length) {\n return;\n }\n\n this.list.replaceChildren(...this.validate().map(this.buildValidationItem.bind(this)));\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 inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n { selector: () => ':host input:placeholder-shown', property: 'font-weight' },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, 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","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","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","disallowedchars","_drop","rest","disallowemail","renderItems","getStrengthScore","compareValues","comparison","toUpperCase","Error","validate","policies","map","policy","data","id","reduce","results","find","p","pattern","message","compare","normalizedCompare","validationResult","exp","RegExp","valid","test","toLowerCase","at","indexOf","localPart","slice","push","some","buildValidationItem","status","li","className","dataset","span","textContent","replaceChildren","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","inputIconS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pB,EAAMS,SAAU,eACnCY,uBAAwB,IAAKnB,EAAeO,SAAU,SACtDa,qBAAsB,IAAKnB,EAAaM,SAAU,SAClDc,kBAAmB,IAAKtB,EAAeQ,SAAU,WACjDe,kBAAmB,IAAKtB,EAAeO,SAAU,WACjDgB,gBAAiB,IAAKtB,EAAaM,SAAU,cAGjD,KACA,KAxBmC,CAyBnCtG,E,gCC/VK,MAAMuH,EAAoB,CAACC,EAAUC,IAC1CD,EAASE,QAAQ,cAAe,CAACC,EAAOC,IAAQH,IAASG,IAAQD,E,kGCCnEE,eAAeC,OAAO,IAAe,I","sources":["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"],"sourcesContent":["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 'data-password-policy-value-disallowedchars',\n 'data-password-policy-value-email',\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 // disallowedchars: this stores the configured char list in\n // overrides.disallowedchars.value so the message can interpolate\n // `{{value}}`. The regex pattern itself is built upstream (orchestrator\n // or caller) and shipped on the policy entry — it is not derived from\n // this override. When the attribute is cleared, drop the override so\n // the panel doesn't keep stale data.\n if (attrName === 'data-password-policy-value-disallowedchars') {\n if (newValue) {\n this.#overrides = {\n ...this.#overrides,\n disallowedchars: {\n ...this.#overrides?.disallowedchars,\n value: newValue,\n },\n };\n } else if (this.#overrides?.disallowedchars) {\n const { disallowedchars: _drop, ...rest } = this.#overrides;\n this.#overrides = rest;\n }\n }\n\n // disallowemail: stash the user's email so the STR_NEQ_CI comparator\n // has an `expected` to compare against the live password value. Clear\n // the override when the attribute is removed/empty so we don't keep\n // blocking against a previous user's email.\n if (attrName === 'data-password-policy-value-email') {\n if (newValue) {\n this.#overrides = {\n ...this.#overrides,\n disallowemail: {\n ...this.#overrides?.disallowemail,\n expected: newValue,\n },\n };\n } else if (this.#overrides?.disallowemail) {\n const { disallowemail: _drop, ...rest } = this.#overrides;\n this.#overrides = rest;\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 const normalizedCompare = typeof compare === 'string' ? compare.toUpperCase() : compare;\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 (normalizedCompare === 'STR_NEQ_CI') {\n // Compare the live password against the configured string AND its\n // local-part (before '@'), case-insensitively. Used by the\n // disallowemail policy.\n const expected = (data?.expected ?? '').toLowerCase();\n const actual = (this.value ?? '').toLowerCase();\n if (!expected || !actual) {\n // nothing to compare → mark valid so we don't block the flow\n validationResult.valid = true;\n } else {\n const at = expected.indexOf('@');\n const localPart = at > 0 ? expected.slice(0, at) : expected;\n validationResult.valid = actual !== expected && actual !== localPart;\n }\n } else if (compare) {\n validationResult.valid = this.compareValues(\n normalizedCompare,\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 buildValidationItem({ valid, message }) {\n const status = !this.value ? 'none' : valid;\n const li = document.createElement('li');\n li.className = 'item';\n li.dataset.valid = status;\n const span = document.createElement('span');\n span.className = 'message';\n // `textContent` handles any tenant-configured string in `message` safely\n // (e.g. the disallowedchars list) without needing to escape HTML.\n span.textContent = message ?? '';\n li.appendChild(span);\n return li;\n }\n\n renderItems(availablePolicies, activePolicies) {\n if (!availablePolicies || !activePolicies.length) {\n return;\n }\n\n this.list.replaceChildren(\n ...this.validate().map(this.buildValidationItem.bind(this)),\n );\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"],"names":["componentName","dataAttrs","policyAttrs","RawPolicyValidation","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","panel","shadowRoot","querySelector","label","list","attributeChangedCallback","attrName","oldValue","newValue","updateLabel","includes","availablePolicies","JSON","parse","console","error","split","ln","Number","isNaN","minlength","value","passwordStrength","parseInt","passwordstrength","expected","actual","disallowedchars","_drop","rest","disallowemail","renderItems","val","getAttribute","getStrengthScore","length","compareValues","comparison","toUpperCase","Error","validate","policies","map","policy","data","id","reduce","results","find","p","pattern","message","compare","normalizedCompare","validationResult","exp","RegExp","valid","test","toLowerCase","at","indexOf","localPart","slice","push","isValid","some","buildValidationItem","status","li","document","createElement","className","dataset","span","textContent","appendChild","activePolicies","replaceChildren","bind","classList","remove","add","host","item","symbolDefault","symbolSuccess","symbolError","selector","PolicyValidationClass","componentNameOverride","mappings","hostDirection","property","fontSize","fontFamily","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textColor","labelMargin","itemsSpacing","itemSymbolSuccessColor","itemSymbolErrorColor","itemSymbolDefault","itemSymbolSuccess","itemSymbolError","interpolateString","template","values","replace","match","key","customElements","define"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-policy-validation-index-js.js","mappings":"oOAOO,MAAMA,GAAgB,QAAiB,qBASxCC,EAAY,CAAC,OAAQ,kBAAmB,YAN5C,uCACA,8CACA,+CACA,6CACA,oCAGIC,EAAc,CAAC,QAAS,WAAYD,GAE1C,MAAME,WAA4B,OAAgB,CAAEH,gBAAeI,aAAc,iBAC/E,GAEA,GAAkB,GAElB,GAEA,6BAAWC,GACT,OAAOH,CACT,CAEA,WAAAI,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,mFAOhD,QACE,4oBAgCAH,MAGFA,KAAKI,MAAQJ,KAAKK,WAAWC,cAAc,eAC3CN,KAAKO,MAAQP,KAAKK,WAAWC,cAAc,UAC3CN,KAAKQ,KAAOR,KAAKK,WAAWC,cAAc,KAC5C,CAEA,wBAAAG,CAAyBC,EAAUC,EAAUC,GAE3C,GADAb,MAAMU,2BAA2BC,EAAUC,EAAUC,GACjDD,IAAaC,EAAU,CAQzB,GAPiB,UAAbF,GACFV,KAAKa,YAAYD,GAMfnB,EAAUqB,SAASJ,GAAW,CAChC,GAAiB,SAAbA,EACF,IACEV,KAAKe,kBAAoBC,KAAKC,MAAML,EACtC,CAAE,MAEAM,QAAQC,MAAM,mCAChB,CAMF,GAJiB,oBAAbT,IACFV,MAAK,GAAmBY,GAAY,IAAIQ,MAAM,MAG/B,yCA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,QAASK,SAAU,aACpDC,SAAU,CAAC,EACXC,WAAY,CAAC,EACbC,QAAS,CAAC,EACVC,YAAa,IAAKd,EAAMU,SAAU,gBAClCK,YAAa,IAAKf,EAAMU,SAAU,gBAClCM,YAAa,IAAKhB,EAAMU,SAAU,gBAClCO,aAAc,IAAKjB,EAAMU,SAAU,iBACnCQ,gBAAiB,IAAKlB,EAAMU,SAAU,oBACtCS,UAAW,CAAET,SAAU,SACvBU,YAAa,IAAKpB,EAAMU,SAAU,OAClCW,aAAc,IAAKpB,EAAMS,SAAU,eACnCY,uBAAwB,IAAKnB,EAAeO,SAAU,SACtDa,qBAAsB,IAAKnB,EAAaM,SAAU,SAClDc,kBAAmB,IAAKtB,EAAeQ,SAAU,WACjDe,kBAAmB,IAAKtB,EAAeO,SAAU,WACjDgB,gBAAiB,IAAKtB,EAAaM,SAAU,cAGjD,KACA,KAxBmC,CAyBnCtG,E,gCC7VK,MAAMuH,EAAoB,CAACC,EAAUC,IAC1CD,EAASE,QAAQ,cAAe,CAACC,EAAOC,IAAQH,IAASG,IAAQD,E,kGCCnEE,eAAeC,OAAO,IAAe,I","sources":["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"],"sourcesContent":["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 'data-password-policy-value-disallowedchars',\n 'data-password-policy-value-email',\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 // disallowedchars: this stores the configured char list in\n // overrides.disallowedchars.value so the message can interpolate\n // `{{value}}`. The regex pattern itself is built upstream (orchestrator\n // or caller) and shipped on the policy entry — it is not derived from\n // this override. When the attribute is cleared, drop the override so\n // the panel doesn't keep stale data.\n if (attrName === 'data-password-policy-value-disallowedchars') {\n if (newValue) {\n this.#overrides = {\n ...this.#overrides,\n disallowedchars: {\n ...this.#overrides?.disallowedchars,\n value: newValue,\n },\n };\n } else if (this.#overrides?.disallowedchars) {\n const { disallowedchars: _drop, ...rest } = this.#overrides;\n this.#overrides = rest;\n }\n }\n\n // disallowemail: stash the user's email so the STR_NEQ_CI comparator\n // has an `expected` to compare against the live password value. Clear\n // the override when the attribute is removed/empty so we don't keep\n // blocking against a previous user's email.\n if (attrName === 'data-password-policy-value-email') {\n if (newValue) {\n this.#overrides = {\n ...this.#overrides,\n disallowemail: {\n ...this.#overrides?.disallowemail,\n expected: newValue,\n },\n };\n } else if (this.#overrides?.disallowemail) {\n const { disallowemail: _drop, ...rest } = this.#overrides;\n this.#overrides = rest;\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 const normalizedCompare = typeof compare === 'string' ? compare.toUpperCase() : compare;\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 (normalizedCompare === 'STR_NEQ_CI') {\n // Compare the live password against the configured string AND its\n // local-part (before '@'), case-insensitively. Used by the\n // disallowemail policy.\n const expected = (data?.expected ?? '').toLowerCase();\n const actual = (this.value ?? '').toLowerCase();\n if (!expected || !actual) {\n // nothing to compare → mark valid so we don't block the flow\n validationResult.valid = true;\n } else {\n const at = expected.indexOf('@');\n const localPart = at > 0 ? expected.slice(0, at) : expected;\n validationResult.valid = actual !== expected && actual !== localPart;\n }\n } else if (compare) {\n validationResult.valid = this.compareValues(\n normalizedCompare,\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 buildValidationItem({ valid, message }) {\n const status = !this.value ? 'none' : valid;\n const li = document.createElement('li');\n li.className = 'item';\n li.dataset.valid = status;\n const span = document.createElement('span');\n span.className = 'message';\n // `textContent` handles any tenant-configured string in `message` safely\n // (e.g. the disallowedchars list) without needing to escape HTML.\n span.textContent = message ?? '';\n li.appendChild(span);\n return li;\n }\n\n renderItems(availablePolicies, activePolicies) {\n if (!availablePolicies || !activePolicies.length) {\n return;\n }\n\n this.list.replaceChildren(...this.validate().map(this.buildValidationItem.bind(this)));\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"],"names":["componentName","dataAttrs","policyAttrs","RawPolicyValidation","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","panel","shadowRoot","querySelector","label","list","attributeChangedCallback","attrName","oldValue","newValue","updateLabel","includes","availablePolicies","JSON","parse","console","error","split","ln","Number","isNaN","minlength","value","passwordStrength","parseInt","passwordstrength","expected","actual","disallowedchars","_drop","rest","disallowemail","renderItems","val","getAttribute","getStrengthScore","length","compareValues","comparison","toUpperCase","Error","validate","policies","map","policy","data","id","reduce","results","find","p","pattern","message","compare","normalizedCompare","validationResult","exp","RegExp","valid","test","toLowerCase","at","indexOf","localPart","slice","push","isValid","some","buildValidationItem","status","li","document","createElement","className","dataset","span","textContent","appendChild","activePolicies","replaceChildren","bind","classList","remove","add","host","item","symbolDefault","symbolSuccess","symbolError","selector","PolicyValidationClass","componentNameOverride","mappings","hostDirection","property","fontSize","fontFamily","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textColor","labelMargin","itemsSpacing","itemSymbolSuccessColor","itemSymbolErrorColor","itemSymbolDefault","itemSymbolSuccess","itemSymbolError","interpolateString","template","values","replace","match","key","customElements","define"],"sourceRoot":""}