@descope/web-components-ui 1.76.0 → 1.78.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.
- package/dist/cjs/index.cjs.js +49 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +49 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/2739.js +1 -1
- package/dist/umd/2739.js.map +1 -1
- package/dist/umd/7092.js +1 -1
- package/dist/umd/7092.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js.map +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js +2 -2
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +2 -2
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-password-index-js.js +1 -1
- package/dist/umd/descope-password-index-js.js.map +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js.map +1 -1
- package/dist/umd/descope-scopes-list-index-js.js +1 -1
- package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/dist/umd/descope-text-area-index-js.js.map +1 -1
- package/dist/umd/descope-text-field-index-js.js +2 -2
- package/dist/umd/descope-text-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
- package/package.json +6 -6
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +1 -0
- package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +1 -0
- package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +1 -0
- package/src/components/descope-hybrid-field/HybridFieldClass.js +10 -0
- package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +1 -0
- package/src/components/descope-new-password/NewPasswordClass.js +1 -0
- package/src/components/descope-passcode/PasscodeClass.js +1 -0
- package/src/components/descope-password/PasswordClass.js +2 -1
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +4 -0
- package/src/components/descope-text-area/TextAreaClass.js +1 -0
- package/src/components/descope-text-field/textFieldMappings.js +1 -0
- package/src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js +1 -0
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +2 -1
- package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -0
- package/src/theme/components/buttonSelectionGroup/baseButtonSelectionGroup.js +1 -0
- package/src/theme/components/checkbox.js +1 -0
- package/src/theme/components/emailField.js +1 -0
- package/src/theme/components/hybridField.js +1 -0
- package/src/theme/components/inputWrapper.js +1 -0
- package/src/theme/components/multiSelectComboBox.js +1 -0
- package/src/theme/components/newPassword.js +1 -0
- package/src/theme/components/numberField.js +1 -0
- package/src/theme/components/passcode.js +1 -0
- package/src/theme/components/password.js +1 -0
- package/src/theme/components/phoneField.js +1 -0
- package/src/theme/components/phoneInputBoxField.js +1 -0
- package/src/theme/components/radioGroup/radioGroup.js +1 -0
- package/src/theme/components/samlGroupMappings.js +1 -0
- package/src/theme/components/switchToggle.js +1 -0
- package/src/theme/components/textArea.js +1 -0
- package/src/theme/components/textField.js +1 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"descope-new-password-descope-new-password-internal-index-js.js","mappings":"6LASO,MAAMA,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,oGCGhB,MAAMC,GAAgB,QAAiB,aA4GxC,KACJC,EAAI,WACJC,EAAU,aACVC,EAAY,wBACZC,EAA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AAc0B,aAAa,OAAQvC,KAAKC,aAAa,SACrDY,EAAc0B,aAAa,oBAAqB,QAEhDvC,KAAK6N,YAAYhN,EACnB,CAEA,iBAAAD,GAEEZ,KAAK8K,cAAgB9K,KAAK7D,aAAa8F,cAAc,wBACrDjC,KAAKiL,aAAejL,KAAK7D,aAAa8F,cAAc,uBAGpDjC,KAAKgO,2BAA2BhO,KAAK8K,cAAe,2BACpD9K,KAAKgO,2BAA2BhO,KAAKiL,aAAc,yBACrD,IAqB4B,EA8C9B,QAAY,CACVzI,MAAO,GACPC,eAAgB,oBAChBC,MAAO,IAAM,oLASb,QAAuB,IAAcC,g+BA4CrCC,iBAAkB,CAAC,YACnB5G,kB,mCCxNG,MAAMqS,EAAoB,CAACpC,EAAUqC,IAC1CrC,EAAS9B,QAAQ,eAAe,CAACoE,EAAOC,IAAQF,IAASE,IAAQD,G","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-password/PasswordClass.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-policy-validation/PolicyValidationClass.js","webpack://@descope/web-components-ui/./src/components/descope-password/passwordDraggableMixin.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.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/NewPasswordClass.js","webpack://@descope/web-components-ui/./src/components/descope-policy-validation/helpers.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 {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport passwordDraggableMixin from './passwordDraggableMixin';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('password');\n\nconst customMixin = (superclass) =>\n class PasswordFieldMixinClass extends superclass {\n static get observedAttributes() {\n return ['manual-visibility-toggle'];\n }\n\n get manualToggleVisibility() {\n return this.getAttribute('manual-visibility-toggle') === 'true';\n }\n\n init() {\n super.init?.();\n this.handleCaretOnVisibilityChange();\n this.origSetPasswordVisible = this.baseElement._setPasswordVisible;\n this.origSetFocused = this.baseElement._setFocused;\n this.baseElement._setFocused = this.setFocus.bind(this);\n\n this.initExternalInput();\n }\n\n initExternalInput() {\n const externalInput = this.createExternalInput();\n if (externalInput) {\n this.handlePasswordVisibility(externalInput);\n }\n }\n\n get caretPosition() {\n return this.value?.length || 0;\n }\n\n handleCaretOnVisibilityChange() {\n const origTogglePasswordVisibility = this.baseElement._togglePasswordVisibility.bind(\n this.baseElement\n );\n this.baseElement._togglePasswordVisibility = () => {\n setTimeout(() => {\n origTogglePasswordVisibility();\n this.inputElement.setSelectionRange(this.caretPosition, this.caretPosition);\n return false;\n });\n };\n }\n\n // We use `manual-visibility-toggle` to to toggle the password's visibility\n // even if the input field is focused-out. However, on focusout - Vaadin resets\n // password visibility. Since we don't want to override Vaadin's native setFocus\n // function (which is part of their FocusMixin).\n // So, here we override the part of logic that runs within Vaadin's setFocus that reports\n // the password visibility state. This logic is part of our `manual-visibility-toggle` only.\n setFocus(focused) {\n if (this.manualToggleVisibility) {\n this.baseElement._setPasswordVisible = () => {};\n }\n this.origSetFocused.call(this.baseElement, focused);\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible.bind(this.baseElement);\n }\n\n resetPasswordVisibilityToggle() {\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible;\n this.baseElement._setFocused = this.origSetFocus;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n }\n\n // override vaadin's password visibility toggle.\n // we need this override in order to to resolve the external input `focus` race condition,\n // which is caused due to the focus sync between the two inputs.\n handlePasswordVisibility(externalInput) {\n // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener\n const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;\n this.baseElement\n .querySelector('vaadin-password-field-button')\n .removeEventListener('mousedown', origBoundRevealButtonMouseDown);\n\n // disable vaadin's `_passwordVisibleChanged` observer\n this.baseElement._passwordVisibleChanged = () => {};\n\n // override vaadin's `_togglePasswordVisibility`\n this.baseElement._togglePasswordVisibility = () => {\n const currVisibility = externalInput.getAttribute('type');\n if (currVisibility === 'password') {\n this.showPasswordVisibility(externalInput);\n } else {\n this.hidePasswordVisibility(externalInput);\n }\n };\n }\n\n showPasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'text');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'true');\n }\n\n hidePasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'password');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'false');\n }\n };\n\nconst {\n host,\n inputField,\n inputElement,\n inputElementPlaceholder,\n revealButtonContainer,\n revealButtonIcon,\n label,\n requiredIndicator,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n inputField: { selector: '::part(input-field)' },\n inputElement: { selector: '> input' },\n inputElementPlaceholder: { selector: () => ':host input:placeholder-shown' },\n revealButtonContainer: { selector: '::part(reveal-button)' },\n revealButtonIcon: { selector: '::part(reveal-button)::before' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PasswordClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: [{}, host],\n fontFamily: [label, inputField, errorMessage, helperText],\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...inputElement, property: 'padding-left' },\n { ...inputElement, property: 'padding-right' },\n ],\n inputBackgroundColor: { ...inputField, property: 'background-color' },\n\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: '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\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'],\n componentName,\n })\n);\n","import { getComponentName } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('new-password-internal');\n","// eslint-disable-next-line max-classes-per-file\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport { interpolateString } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('policy-validation');\n\nconst overrideAttrs = [\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'data-password-policy-actual-passwordstrength',\n];\nconst dataAttrs = ['data', 'active-policies', 'overrides', ...overrideAttrs];\nconst policyAttrs = ['label', 'value', ...dataAttrs];\n\nclass RawPolicyValidation extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #availablePolicies;\n\n #activePolicies = [];\n\n #overrides;\n\n static get observedAttributes() {\n return policyAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <div class=\"label\"></div>\n <ul></ul>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n `,\n this\n );\n\n this.panel = this.shadowRoot.querySelector(':host > div');\n this.label = this.shadowRoot.querySelector('.label');\n this.list = this.shadowRoot.querySelector('ul');\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (oldValue !== newValue) {\n if (attrName === 'label') {\n this.updateLabel(newValue);\n }\n\n // we're don't know the order in which the attributes are forwarded, so we're trying to render every time\n // once `data` and `active-policies` are populated, the render will be executed.\n // once the `overrides` object is updated, we want to re-render the panel.\n if (dataAttrs.includes(attrName)) {\n if (attrName === 'data') {\n try {\n this.availablePolicies = JSON.parse(newValue);\n } catch {\n // eslint-disable-next-line no-console\n console.error('Failed to set available policies');\n }\n }\n if (attrName === 'active-policies') {\n this.#activePolicies = (newValue || '').split(',');\n }\n\n if (attrName === 'data-password-policy-value-minlength') {\n const ln = Number(newValue);\n if (!Number.isNaN(ln) && ln > 0) {\n this.#overrides = { ...this.#overrides, minlength: { value: `${ln}` } };\n }\n }\n\n if (attrName === 'data-password-policy-value-passwordstrength') {\n const passwordStrength = parseInt(newValue);\n if (!Number.isNaN(passwordStrength) && passwordStrength >= 0) {\n this.#overrides = {\n ...this.#overrides,\n passwordstrength: {\n ...this.#overrides?.passwordstrength,\n expected: passwordStrength,\n },\n };\n }\n }\n\n if (attrName === 'data-password-policy-actual-passwordstrength') {\n const ln = Number(newValue);\n if (!Number.isNaN(ln) && ln >= 0) {\n this.#overrides = {\n ...this.#overrides,\n passwordstrength: { ...this.#overrides?.passwordstrength, actual: ln },\n };\n }\n }\n }\n\n this.renderItems(this.#availablePolicies, this.#activePolicies, this.#overrides);\n }\n }\n\n get availablePolicies() {\n return this.#availablePolicies || [];\n }\n\n set availablePolicies(val) {\n this.#availablePolicies = val;\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n getStrengthScore() {\n return this.value.length;\n }\n\n compareValues(comparison, expected, actual) {\n switch (comparison.toUpperCase()) {\n case 'GTE': // Greater than or equal to\n return actual >= expected;\n case 'GT': // Greater than\n return actual > expected;\n case 'LTE': // Less than or equal to\n return actual <= expected;\n case 'LT': // Less than\n return actual < expected;\n case 'EQ': // Equal to\n return actual === expected;\n case 'NEQ': // Not equal to\n return actual !== expected;\n default:\n throw new Error(`Invalid comparison type: ${comparison}`);\n }\n }\n\n validate() {\n let policies = this.#availablePolicies;\n\n if (this.#overrides) {\n policies = this.#availablePolicies.map((policy) => {\n const data = this.#overrides[policy.id];\n\n if (!data) return policy;\n\n const res = { ...policy, data };\n\n return res;\n });\n }\n\n return this.#activePolicies.reduce((results, id) => {\n const policy = policies.find((p) => p.id === id);\n\n if (!policy) {\n return results;\n }\n\n const { pattern, message, data, compare } = policy;\n\n if ((!pattern && !compare) || !message) {\n return results;\n }\n\n const validationResult = {\n message: interpolateString(message, data),\n id,\n };\n\n if (pattern) {\n const exp = new RegExp(interpolateString(pattern, data));\n validationResult.valid = exp.test(this.value);\n } else if (compare) {\n validationResult.valid = this.compareValues(\n compare,\n data?.expected ?? -1,\n data?.actual ?? -1\n );\n }\n\n results.push(validationResult);\n\n return results;\n }, []);\n }\n\n get isValid() {\n return !this.validate().some(({ valid }) => valid === false);\n }\n\n getValidationItemTemplate({ valid, message }) {\n const status = !this.value ? 'none' : valid;\n return `\n <li class=\"item\" data-valid=\"${status}\">\n <span class=\"message\">${message}</span>\n </li>\n `;\n }\n\n renderItems(availablePolicies, activePolicies) {\n if (!availablePolicies || !activePolicies.length) {\n return;\n }\n\n this.list.innerHTML = this.validate().map(this.getValidationItemTemplate.bind(this)).join('');\n }\n\n updateLabel(val) {\n if (!val) {\n this.classList.add('hide-label');\n this.label.textContent = '';\n } else {\n this.label.textContent = val;\n this.classList.remove('hide-label');\n }\n }\n}\n\nconst { host, item, symbolDefault, symbolSuccess, symbolError } = {\n host: { selector: () => ':host > div' },\n item: { selector: () => '.item' },\n symbolDefault: { selector: () => '.item[data-valid=\"none\"]::before' },\n symbolSuccess: { selector: () => '.item[data-valid=\"true\"]::before' },\n symbolError: { selector: () => '.item[data-valid=\"false\"]::before' },\n};\n\nexport const PolicyValidationClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n padding: {},\n borderWidth: { ...host, property: 'border-width' },\n borderStyle: { ...host, property: 'border-style' },\n borderColor: { ...host, property: 'border-color' },\n borderRadius: { ...host, property: 'border-radius' },\n backgroundColor: { ...host, property: 'background-color' },\n textColor: { property: 'color' },\n labelMargin: { ...host, property: 'gap' },\n itemsSpacing: { ...item, property: 'line-height' },\n itemSymbolSuccessColor: { ...symbolSuccess, property: 'color' },\n itemSymbolErrorColor: { ...symbolError, property: 'color' },\n itemSymbolDefault: { ...symbolDefault, property: 'content' },\n itemSymbolSuccess: { ...symbolSuccess, property: 'content' },\n itemSymbolError: { ...symbolError, property: 'content' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawPolicyValidation);\n","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","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, observeAttributes } from '../../../helpers/componentHelpers';\nimport { NewPasswordClass } from '../NewPasswordClass';\nimport { componentName } from './componentName';\n\nconst passwordAttrPrefixRegex = /^password-/;\nconst confirmAttrPrefixRegex = /^confirm-/;\n\nconst removeAttrPrefix = (attr, prefix) => attr.replace(prefix, '');\n\nconst passwordInputAttrs = ['password-label', 'password-placeholder'];\nconst confirmInputAttrs = ['confirm-label', 'confirm-placeholder'];\nconst policyPanelAttrs = [\n 'has-validation',\n 'policy-label',\n 'available-policies',\n 'active-policies',\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'manual-visibility-toggle',\n];\nconst commonAttrs = [\n 'has-confirm',\n 'disabled',\n 'bordered',\n 'size',\n 'full-width',\n 'maxlength',\n 'invalid',\n 'readonly',\n 'draggable',\n 'autocomplete',\n 'label-type',\n 'manual-visibility-toggle',\n];\n\nconst inputRelatedAttrs = [].concat(\n commonAttrs,\n passwordInputAttrs,\n confirmInputAttrs,\n policyPanelAttrs\n);\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass NewPasswordInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputRelatedAttrs);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\"></div>\n\t\t`;\n\n this.wrapperEle = this.querySelector('.wrapper');\n }\n\n get value() {\n return this.passwordInput?.value || '';\n }\n\n set value(val) {\n if (val === this.value) return;\n this.passwordInput.value = val;\n }\n\n get hasConfirm() {\n return this.getAttribute('has-confirm') === 'true';\n }\n\n onHasConfirmChange(hasConfirm) {\n this.confirmInput.classList.toggle('hidden', !hasConfirm);\n }\n\n onHasValidationChange(hasValidation) {\n this.policyPanel.classList.toggle('hidden', !hasValidation);\n }\n\n get hasValidation() {\n return this.getAttribute('has-validation') === 'true';\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n\n if (this.value && !this.policyPanel.isValid) {\n return { typeMismatch: true };\n }\n\n if (this.hasConfirm && this.confirmInput && this.value !== this.confirmInput.value) {\n return { patternMismatch: true };\n }\n\n const min = this.getAttribute('minlength');\n const minVal = parseInt(min, 10) || 0;\n const minValid = this.value.length >= minVal;\n if (!minValid) {\n return { tooShort: true };\n }\n\n return {};\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n this.passwordInput.focus();\n }\n });\n super.init?.();\n this.renderInputs(this.hasConfirm, this.hasValidation);\n }\n\n renderInputs() {\n const hasExternalInput = this.getAttribute('external-input') === 'true';\n const template = `\n <div class=\"password-input-container\">\n <descope-password\n autocomplete=\"new-password\"\n manual-visibility-toggle=\"true\"\n data-id=\"password\"\n external-input=\"${hasExternalInput}\"\n ></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password\n autocomplete=\"new-password\"\n manual-visibility-toggle=\"true\"\n external-input=\"${hasExternalInput}\"\n data-id=\"confirm\"\n ></descope-password>\n `;\n\n this.wrapperEle.innerHTML = template;\n\n this.passwordInput = this.querySelector('[data-id=\"password\"]');\n this.confirmInput = this.querySelector('[data-id=\"confirm\"]');\n this.policyPanel = this.querySelector('descope-policy-validation');\n this.passwordStrength = this.querySelector('descope-password-strength');\n\n this.inputs = [this.passwordInput, this.confirmInput];\n\n this.initInputs();\n\n // sync input value to policy validation panel\n this.passwordInput.addEventListener('input', (e) => {\n this.passwordStrength?.addEventListener(\n 'score-changed',\n ({ detail }) => {\n this.policyPanel.setAttribute('data-password-policy-actual-passwordstrength', detail);\n },\n { once: true }\n );\n this.passwordStrength?.setAttribute('value', e.target.value);\n this.policyPanel.setAttribute('value', e.target.value);\n });\n\n forwardAttrs(this, this.policyPanel, {\n includeAttrs: policyPanelAttrs,\n mapAttrs: {\n 'policy-label': 'label',\n 'available-policies': 'data',\n },\n });\n }\n\n // the inputs are not required but we still want it to have a required\n // indicator in case the root component is required\n handleIndicatorStyle() {\n this.inputs.forEach((input) => {\n injectStyle(\n `\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${NewPasswordClass.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,\n input\n );\n });\n }\n\n get isInvalid() {\n return this.hasAttribute('invalid') && this.getAttribute('invalid') !== 'false';\n }\n\n // for some reason, Vaadin is removing the invalid attribute on several events,\n // e.g. focus, input, etc..., so we need to make sure the inputs will stay invalid\n // if the root component is invalid\n handleInputsInvalidAttribute() {\n this.inputs.forEach((input) => {\n input &&\n observeAttributes(\n input,\n (changedAttributes) => {\n if (changedAttributes.includes('invalid')) {\n const inputInvalidValue = input.getAttribute('invalid');\n const rootInvalidValue = this.getAttribute('invalid');\n\n if (this.isInvalid && rootInvalidValue !== inputInvalidValue) {\n input.setAttribute('invalid', 'true');\n }\n }\n },\n {}\n );\n });\n }\n\n initInputs() {\n this.handleIndicatorStyle();\n this.handleInputsInvalidAttribute();\n this.handleFocusEventsDispatching(this.inputs);\n }\n\n async togglePasswordStrength() {\n if (this.activePolicies.includes('passwordstrength')) {\n if (!this.passwordStrength) {\n await import('@descope-ui/descope-password-strength');\n this.passwordStrength = document.createElement('descope-password-strength');\n this.passwordStrength.setAttribute('options', 'Very weak,Weak,Average,Strong,Very strong');\n this.passwordStrength.setAttribute('value', this.passwordInput.value || '');\n this.passwordStrength.setAttribute(\n 'st-host-direction',\n this.getAttribute('st-host-direction')\n );\n this.passwordStrength.setAttribute('full-width', 'true');\n this.querySelector('.password-input-container').insertBefore(\n this.passwordStrength,\n this.policyPanel\n );\n }\n } else {\n if (this.passwordStrength) {\n this.passwordStrength.remove();\n this.passwordStrength = null;\n }\n }\n }\n\n get activePolicies() {\n return (this.getAttribute('active-policies') || '').split(',');\n }\n\n // eslint-disable-next-line class-methods-use-this\n toggleBooleanAttribute(ele, name, value) {\n value === null ? ele?.removeAttribute(name) : ele?.setAttribute(name, value);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'has-validation') {\n this.onHasValidationChange(newValue === 'true');\n } else if (attrName === 'has-confirm') {\n this.onHasConfirmChange(newValue === 'true');\n } else if (commonAttrs.includes(attrName)) {\n this.inputs.forEach((input) => this.toggleBooleanAttribute(input, attrName, newValue));\n } else if (passwordInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.passwordInput,\n removeAttrPrefix(attrName, passwordAttrPrefixRegex),\n newValue\n );\n } else if (confirmInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.confirmInput,\n removeAttrPrefix(attrName, confirmAttrPrefixRegex),\n newValue\n );\n }\n if (attrName === 'active-policies') {\n this.togglePasswordStrength();\n }\n }\n }\n}\n\nexport default NewPasswordInternal;\n","import NewPasswordInternal from './NewPasswordInternal';\nimport { componentName } from './componentName';\n\ncustomElements.define(componentName, NewPasswordInternal);\n","import { 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 'draggable',\n 'has-validation',\n 'policy-label',\n 'active-policies',\n 'available-policies',\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'label-type',\n 'manual-visibility-toggle',\n ],\n });\n }\n\n createSlottedExternalInput(node, slotName) {\n const externalInput = node.querySelector('input');\n const slotEle = document.createElement('slot');\n\n const targetSlot = externalInput.getAttribute('slot');\n\n slotEle.setAttribute('name', slotName);\n slotEle.setAttribute('slot', targetSlot);\n\n node.appendChild(slotEle);\n\n // move external input\n externalInput.setAttribute('slot', slotName);\n externalInput.setAttribute('name', this.getAttribute('name'));\n externalInput.setAttribute('data-hidden-input', 'true');\n\n this.appendChild(externalInput);\n }\n\n initExternalInput() {\n // get descope input components\n this.passwordInput = this.inputElement.querySelector('[data-id=\"password\"]');\n this.confirmInput = this.inputElement.querySelector('[data-id=\"confirm\"]');\n\n // create slots for external password input\n this.createSlottedExternalInput(this.passwordInput, 'external-password-input');\n this.createSlottedExternalInput(this.confirmInput, 'external-confirm-input');\n }\n };\n\nconst {\n host,\n label,\n internalInputsWrapper,\n errorMessage,\n helperText,\n passwordInput,\n policyPreview,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n internalInputsWrapper: { selector: 'descope-new-password-internal .wrapper' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n passwordInput: { selector: 'descope-password' },\n policyPreview: { selector: 'descope-policy-validation' },\n};\n\nexport const NewPasswordClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n {},\n {\n selector: PasswordClass.componentName,\n property: PasswordClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: { ...label, property: 'color' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n 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'],\n componentName,\n })\n);\n","export const interpolateString = (template, values) =>\n template.replace(/{{(\\w+)+}}/g, (match, key) => values?.[key] || match);\n"],"names":["createBaseInputClass","args","componentName","host","inputField","inputElement","inputElementPlaceholder","revealButtonContainer","revealButtonIcon","label","requiredIndicator","errorMessage","helperText","selector","PasswordClass","mappings","hostWidth","property","hostMinWidth","hostDirection","fontSize","fontFamily","inputHeight","inputHorizontalPadding","inputBackgroundColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineColor","inputOutlineStyle","inputOutlineOffset","inputOutlineWidth","labelFontSize","labelFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","inputPlaceholderTextColor","inputValueTextColor","revealButtonOffset","revealButtonSize","revealButtonColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","inputType","inputName","includeAttrs","noBlurDispatch","proxyProps","useProxyTargets","superclass","observedAttributes","manualToggleVisibility","this","getAttribute","init","super","handleCaretOnVisibilityChange","origSetPasswordVisible","baseElement","_setPasswordVisible","origSetFocused","_setFocused","setFocus","bind","initExternalInput","externalInput","createExternalInput","handlePasswordVisibility","caretPosition","value","length","origTogglePasswordVisibility","_togglePasswordVisibility","setTimeout","setSelectionRange","focused","call","resetPasswordVisibilityToggle","origSetFocus","attributeChangedCallback","attrName","oldValue","newValue","origBoundRevealButtonMouseDown","__boundRevealButtonMouseDown","querySelector","removeEventListener","_passwordVisibleChanged","showPasswordVisibility","hidePasswordVisibility","input","setAttribute","slots","wrappedEleName","style","cssVarList","excludeAttrsSync","dataAttrs","policyAttrs","RawPolicyValidation","baseSelector","constructor","attachShadow","mode","innerHTML","panel","shadowRoot","list","updateLabel","includes","availablePolicies","JSON","parse","console","error","split","ln","Number","isNaN","minlength","passwordStrength","parseInt","passwordstrength","expected","actual","renderItems","val","getStrengthScore","compareValues","comparison","toUpperCase","Error","validate","policies","map","policy","data","id","reduce","results","find","p","pattern","message","compare","validationResult","exp","RegExp","valid","test","push","isValid","some","getValidationItemTemplate","activePolicies","join","textContent","classList","remove","add","item","symbolDefault","symbolSuccess","symbolError","PolicyValidationClass","componentNameOverride","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textColor","labelMargin","itemsSpacing","itemSymbolSuccessColor","itemSymbolErrorColor","itemSymbolDefault","itemSymbolSuccess","itemSymbolError","isReadOnly","hasAttribute","ele","addEventListener","e","isDraggable","inputEle","target","prevType","focus","onComplete","_","removeAttribute","once","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","passwordAttrPrefixRegex","confirmAttrPrefixRegex","removeAttrPrefix","attr","prefix","replace","passwordInputAttrs","confirmInputAttrs","policyPanelAttrs","commonAttrs","inputRelatedAttrs","concat","BaseInputClass","customElements","define","wrapperEle","passwordInput","hasConfirm","onHasConfirmChange","confirmInput","toggle","onHasValidationChange","hasValidation","policyPanel","getValidity","isRequired","valueMissing","typeMismatch","patternMismatch","min","minVal","tooShort","isTrusted","renderInputs","hasExternalInput","template","inputs","initInputs","detail","mapAttrs","handleIndicatorStyle","forEach","NewPasswordClass","inputsRequiredIndicator","isInvalid","handleInputsInvalidAttribute","changedAttributes","inputInvalidValue","rootInvalidValue","handleFocusEventsDispatching","togglePasswordStrength","document","createElement","insertBefore","toggleBooleanAttribute","policyPreviewVars","internalInputsWrapper","policyPreview","spaceBetweenInputs","policyPreviewBackgroundColor","policyPreviewPadding","valueInputMarginBottom","externalInputAttr","appendChild","content","cloneNode","createSlottedExternalInput","node","slotName","slotEle","targetSlot","interpolateString","values","match","key"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"descope-new-password-descope-new-password-internal-index-js.js","mappings":"6LASO,MAAMA,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,G,oGCGhB,MAAMC,GAAgB,QAAiB,aA4GxC,KACJC,EAAI,WACJC,EAAU,aACVC,EAAY,wBACZC,EAAuB,sBACvBC,EAAqB,iBACrBC,EAAgB,MAChBC,EAAK,kBACLC,EAAiB,aACjBC,EAAY,WACZC,GACE,CACFT,KAAM,CAAEU,SAAU,IAAM,SACxBT,WAAY,CAAES,SAAU,uBACxBR,aAAc,CAAEQ,SAAU,WAC1BP,wBAAyB,CAAEO,SAAU,IAAM,iCAC3CN,sBAAuB,CAAEM,SAAU,yBACnCL,iBAAkB,CAAEK,SAAU,iCAC9BJ,MAAO,CAAEI,SAAU,iBACnBH,kBAAmB,CAAEG,SAAU,+CAC/BD,WAAY,CAAEC,SAAU,uBACxBF,aAAc,CAAEE,SAAU,0BAGfC,GAAgB,SAC3B,QAAiB,CACfC,SAAU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ChBC,MAAO,IAAM,oLASb,QAAuB,IAAcC,g+BA4CrCC,iBAAkB,CAAC,YACnB7G,kB,mCCzNG,MAAMsS,EAAoB,CAACpC,EAAUqC,IAC1CrC,EAAS9B,QAAQ,eAAe,CAACoE,EAAOC,IAAQF,IAASE,IAAQD,G","sources":["webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-password/PasswordClass.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-policy-validation/PolicyValidationClass.js","webpack://@descope/web-components-ui/./src/components/descope-password/passwordDraggableMixin.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.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/NewPasswordClass.js","webpack://@descope/web-components-ui/./src/components/descope-policy-validation/helpers.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 {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport passwordDraggableMixin from './passwordDraggableMixin';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('password');\n\nconst customMixin = (superclass) =>\n class PasswordFieldMixinClass extends superclass {\n static get observedAttributes() {\n return ['manual-visibility-toggle'];\n }\n\n get manualToggleVisibility() {\n return this.getAttribute('manual-visibility-toggle') === 'true';\n }\n\n init() {\n super.init?.();\n this.handleCaretOnVisibilityChange();\n this.origSetPasswordVisible = this.baseElement._setPasswordVisible;\n this.origSetFocused = this.baseElement._setFocused;\n this.baseElement._setFocused = this.setFocus.bind(this);\n\n this.initExternalInput();\n }\n\n initExternalInput() {\n const externalInput = this.createExternalInput();\n if (externalInput) {\n this.handlePasswordVisibility(externalInput);\n }\n }\n\n get caretPosition() {\n return this.value?.length || 0;\n }\n\n handleCaretOnVisibilityChange() {\n const origTogglePasswordVisibility = this.baseElement._togglePasswordVisibility.bind(\n this.baseElement\n );\n this.baseElement._togglePasswordVisibility = () => {\n setTimeout(() => {\n origTogglePasswordVisibility();\n this.inputElement.setSelectionRange(this.caretPosition, this.caretPosition);\n return false;\n });\n };\n }\n\n // We use `manual-visibility-toggle` to to toggle the password's visibility\n // even if the input field is focused-out. However, on focusout - Vaadin resets\n // password visibility. Since we don't want to override Vaadin's native setFocus\n // function (which is part of their FocusMixin).\n // So, here we override the part of logic that runs within Vaadin's setFocus that reports\n // the password visibility state. This logic is part of our `manual-visibility-toggle` only.\n setFocus(focused) {\n if (this.manualToggleVisibility) {\n this.baseElement._setPasswordVisible = () => {};\n }\n this.origSetFocused.call(this.baseElement, focused);\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible.bind(this.baseElement);\n }\n\n resetPasswordVisibilityToggle() {\n this.baseElement._setPasswordVisible = this.origSetPasswordVisible;\n this.baseElement._setFocused = this.origSetFocus;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n }\n\n // override vaadin's password visibility toggle.\n // we need this override in order to to resolve the external input `focus` race condition,\n // which is caused due to the focus sync between the two inputs.\n handlePasswordVisibility(externalInput) {\n // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener\n const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;\n this.baseElement\n .querySelector('vaadin-password-field-button')\n .removeEventListener('mousedown', origBoundRevealButtonMouseDown);\n\n // disable vaadin's `_passwordVisibleChanged` observer\n this.baseElement._passwordVisibleChanged = () => {};\n\n // override vaadin's `_togglePasswordVisibility`\n this.baseElement._togglePasswordVisibility = () => {\n const currVisibility = externalInput.getAttribute('type');\n if (currVisibility === 'password') {\n this.showPasswordVisibility(externalInput);\n } else {\n this.hidePasswordVisibility(externalInput);\n }\n };\n }\n\n showPasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'text');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'true');\n }\n\n hidePasswordVisibility(input) {\n // handle input element's type\n input.setAttribute('type', 'password');\n // handle vaadin's `password-visible` attribute\n this.setAttribute('password-visible', 'false');\n }\n };\n\nconst {\n host,\n inputField,\n inputElement,\n inputElementPlaceholder,\n revealButtonContainer,\n revealButtonIcon,\n label,\n requiredIndicator,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n inputField: { selector: '::part(input-field)' },\n inputElement: { selector: '> input' },\n inputElementPlaceholder: { selector: () => ':host input:placeholder-shown' },\n revealButtonContainer: { selector: '::part(reveal-button)' },\n revealButtonIcon: { selector: '::part(reveal-button)::before' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PasswordClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: [{}, host],\n fontFamily: [label, inputField, errorMessage, helperText],\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...inputElement, property: 'padding-left' },\n { ...inputElement, property: 'padding-right' },\n ],\n inputBackgroundColor: { ...inputField, property: 'background-color' },\n\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: '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'],\n componentName,\n })\n);\n","import { getComponentName } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('new-password-internal');\n","// eslint-disable-next-line max-classes-per-file\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport { interpolateString } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('policy-validation');\n\nconst overrideAttrs = [\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'data-password-policy-actual-passwordstrength',\n];\nconst dataAttrs = ['data', 'active-policies', 'overrides', ...overrideAttrs];\nconst policyAttrs = ['label', 'value', ...dataAttrs];\n\nclass RawPolicyValidation extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #availablePolicies;\n\n #activePolicies = [];\n\n #overrides;\n\n static get observedAttributes() {\n return policyAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <div class=\"label\"></div>\n <ul></ul>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n `,\n this\n );\n\n this.panel = this.shadowRoot.querySelector(':host > div');\n this.label = this.shadowRoot.querySelector('.label');\n this.list = this.shadowRoot.querySelector('ul');\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (oldValue !== newValue) {\n if (attrName === 'label') {\n this.updateLabel(newValue);\n }\n\n // we're don't know the order in which the attributes are forwarded, so we're trying to render every time\n // once `data` and `active-policies` are populated, the render will be executed.\n // once the `overrides` object is updated, we want to re-render the panel.\n if (dataAttrs.includes(attrName)) {\n if (attrName === 'data') {\n try {\n this.availablePolicies = JSON.parse(newValue);\n } catch {\n // eslint-disable-next-line no-console\n console.error('Failed to set available policies');\n }\n }\n if (attrName === 'active-policies') {\n this.#activePolicies = (newValue || '').split(',');\n }\n\n if (attrName === 'data-password-policy-value-minlength') {\n const ln = Number(newValue);\n if (!Number.isNaN(ln) && ln > 0) {\n this.#overrides = { ...this.#overrides, minlength: { value: `${ln}` } };\n }\n }\n\n if (attrName === 'data-password-policy-value-passwordstrength') {\n const passwordStrength = parseInt(newValue);\n if (!Number.isNaN(passwordStrength) && passwordStrength >= 0) {\n this.#overrides = {\n ...this.#overrides,\n passwordstrength: {\n ...this.#overrides?.passwordstrength,\n expected: passwordStrength,\n },\n };\n }\n }\n\n if (attrName === 'data-password-policy-actual-passwordstrength') {\n const ln = Number(newValue);\n if (!Number.isNaN(ln) && ln >= 0) {\n this.#overrides = {\n ...this.#overrides,\n passwordstrength: { ...this.#overrides?.passwordstrength, actual: ln },\n };\n }\n }\n }\n\n this.renderItems(this.#availablePolicies, this.#activePolicies, this.#overrides);\n }\n }\n\n get availablePolicies() {\n return this.#availablePolicies || [];\n }\n\n set availablePolicies(val) {\n this.#availablePolicies = val;\n }\n\n get value() {\n return this.getAttribute('value') || '';\n }\n\n getStrengthScore() {\n return this.value.length;\n }\n\n compareValues(comparison, expected, actual) {\n switch (comparison.toUpperCase()) {\n case 'GTE': // Greater than or equal to\n return actual >= expected;\n case 'GT': // Greater than\n return actual > expected;\n case 'LTE': // Less than or equal to\n return actual <= expected;\n case 'LT': // Less than\n return actual < expected;\n case 'EQ': // Equal to\n return actual === expected;\n case 'NEQ': // Not equal to\n return actual !== expected;\n default:\n throw new Error(`Invalid comparison type: ${comparison}`);\n }\n }\n\n validate() {\n let policies = this.#availablePolicies;\n\n if (this.#overrides) {\n policies = this.#availablePolicies.map((policy) => {\n const data = this.#overrides[policy.id];\n\n if (!data) return policy;\n\n const res = { ...policy, data };\n\n return res;\n });\n }\n\n return this.#activePolicies.reduce((results, id) => {\n const policy = policies.find((p) => p.id === id);\n\n if (!policy) {\n return results;\n }\n\n const { pattern, message, data, compare } = policy;\n\n if ((!pattern && !compare) || !message) {\n return results;\n }\n\n const validationResult = {\n message: interpolateString(message, data),\n id,\n };\n\n if (pattern) {\n const exp = new RegExp(interpolateString(pattern, data));\n validationResult.valid = exp.test(this.value);\n } else if (compare) {\n validationResult.valid = this.compareValues(\n compare,\n data?.expected ?? -1,\n data?.actual ?? -1\n );\n }\n\n results.push(validationResult);\n\n return results;\n }, []);\n }\n\n get isValid() {\n return !this.validate().some(({ valid }) => valid === false);\n }\n\n getValidationItemTemplate({ valid, message }) {\n const status = !this.value ? 'none' : valid;\n return `\n <li class=\"item\" data-valid=\"${status}\">\n <span class=\"message\">${message}</span>\n </li>\n `;\n }\n\n renderItems(availablePolicies, activePolicies) {\n if (!availablePolicies || !activePolicies.length) {\n return;\n }\n\n this.list.innerHTML = this.validate().map(this.getValidationItemTemplate.bind(this)).join('');\n }\n\n updateLabel(val) {\n if (!val) {\n this.classList.add('hide-label');\n this.label.textContent = '';\n } else {\n this.label.textContent = val;\n this.classList.remove('hide-label');\n }\n }\n}\n\nconst { host, item, symbolDefault, symbolSuccess, symbolError } = {\n host: { selector: () => ':host > div' },\n item: { selector: () => '.item' },\n symbolDefault: { selector: () => '.item[data-valid=\"none\"]::before' },\n symbolSuccess: { selector: () => '.item[data-valid=\"true\"]::before' },\n symbolError: { selector: () => '.item[data-valid=\"false\"]::before' },\n};\n\nexport const PolicyValidationClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n padding: {},\n borderWidth: { ...host, property: 'border-width' },\n borderStyle: { ...host, property: 'border-style' },\n borderColor: { ...host, property: 'border-color' },\n borderRadius: { ...host, property: 'border-radius' },\n backgroundColor: { ...host, property: 'background-color' },\n textColor: { property: 'color' },\n labelMargin: { ...host, property: 'gap' },\n itemsSpacing: { ...item, property: 'line-height' },\n itemSymbolSuccessColor: { ...symbolSuccess, property: 'color' },\n itemSymbolErrorColor: { ...symbolError, property: 'color' },\n itemSymbolDefault: { ...symbolDefault, property: 'content' },\n itemSymbolSuccess: { ...symbolSuccess, property: 'content' },\n itemSymbolError: { ...symbolError, property: 'content' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawPolicyValidation);\n","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","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, observeAttributes } from '../../../helpers/componentHelpers';\nimport { NewPasswordClass } from '../NewPasswordClass';\nimport { componentName } from './componentName';\n\nconst passwordAttrPrefixRegex = /^password-/;\nconst confirmAttrPrefixRegex = /^confirm-/;\n\nconst removeAttrPrefix = (attr, prefix) => attr.replace(prefix, '');\n\nconst passwordInputAttrs = ['password-label', 'password-placeholder'];\nconst confirmInputAttrs = ['confirm-label', 'confirm-placeholder'];\nconst policyPanelAttrs = [\n 'has-validation',\n 'policy-label',\n 'available-policies',\n 'active-policies',\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'manual-visibility-toggle',\n];\nconst commonAttrs = [\n 'has-confirm',\n 'disabled',\n 'bordered',\n 'size',\n 'full-width',\n 'maxlength',\n 'invalid',\n 'readonly',\n 'draggable',\n 'autocomplete',\n 'label-type',\n 'manual-visibility-toggle',\n];\n\nconst inputRelatedAttrs = [].concat(\n commonAttrs,\n passwordInputAttrs,\n confirmInputAttrs,\n policyPanelAttrs\n);\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass NewPasswordInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputRelatedAttrs);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\"></div>\n\t\t`;\n\n this.wrapperEle = this.querySelector('.wrapper');\n }\n\n get value() {\n return this.passwordInput?.value || '';\n }\n\n set value(val) {\n if (val === this.value) return;\n this.passwordInput.value = val;\n }\n\n get hasConfirm() {\n return this.getAttribute('has-confirm') === 'true';\n }\n\n onHasConfirmChange(hasConfirm) {\n this.confirmInput.classList.toggle('hidden', !hasConfirm);\n }\n\n onHasValidationChange(hasValidation) {\n this.policyPanel.classList.toggle('hidden', !hasValidation);\n }\n\n get hasValidation() {\n return this.getAttribute('has-validation') === 'true';\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n\n if (this.value && !this.policyPanel.isValid) {\n return { typeMismatch: true };\n }\n\n if (this.hasConfirm && this.confirmInput && this.value !== this.confirmInput.value) {\n return { patternMismatch: true };\n }\n\n const min = this.getAttribute('minlength');\n const minVal = parseInt(min, 10) || 0;\n const minValid = this.value.length >= minVal;\n if (!minValid) {\n return { tooShort: true };\n }\n\n return {};\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n this.passwordInput.focus();\n }\n });\n super.init?.();\n this.renderInputs(this.hasConfirm, this.hasValidation);\n }\n\n renderInputs() {\n const hasExternalInput = this.getAttribute('external-input') === 'true';\n const template = `\n <div class=\"password-input-container\">\n <descope-password\n autocomplete=\"new-password\"\n manual-visibility-toggle=\"true\"\n data-id=\"password\"\n external-input=\"${hasExternalInput}\"\n ></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n <descope-password\n autocomplete=\"new-password\"\n manual-visibility-toggle=\"true\"\n external-input=\"${hasExternalInput}\"\n data-id=\"confirm\"\n ></descope-password>\n `;\n\n this.wrapperEle.innerHTML = template;\n\n this.passwordInput = this.querySelector('[data-id=\"password\"]');\n this.confirmInput = this.querySelector('[data-id=\"confirm\"]');\n this.policyPanel = this.querySelector('descope-policy-validation');\n this.passwordStrength = this.querySelector('descope-password-strength');\n\n this.inputs = [this.passwordInput, this.confirmInput];\n\n this.initInputs();\n\n // sync input value to policy validation panel\n this.passwordInput.addEventListener('input', (e) => {\n this.passwordStrength?.addEventListener(\n 'score-changed',\n ({ detail }) => {\n this.policyPanel.setAttribute('data-password-policy-actual-passwordstrength', detail);\n },\n { once: true }\n );\n this.passwordStrength?.setAttribute('value', e.target.value);\n this.policyPanel.setAttribute('value', e.target.value);\n });\n\n forwardAttrs(this, this.policyPanel, {\n includeAttrs: policyPanelAttrs,\n mapAttrs: {\n 'policy-label': 'label',\n 'available-policies': 'data',\n },\n });\n }\n\n // the inputs are not required but we still want it to have a required\n // indicator in case the root component is required\n handleIndicatorStyle() {\n this.inputs.forEach((input) => {\n injectStyle(\n `\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${NewPasswordClass.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,\n input\n );\n });\n }\n\n get isInvalid() {\n return this.hasAttribute('invalid') && this.getAttribute('invalid') !== 'false';\n }\n\n // for some reason, Vaadin is removing the invalid attribute on several events,\n // e.g. focus, input, etc..., so we need to make sure the inputs will stay invalid\n // if the root component is invalid\n handleInputsInvalidAttribute() {\n this.inputs.forEach((input) => {\n input &&\n observeAttributes(\n input,\n (changedAttributes) => {\n if (changedAttributes.includes('invalid')) {\n const inputInvalidValue = input.getAttribute('invalid');\n const rootInvalidValue = this.getAttribute('invalid');\n\n if (this.isInvalid && rootInvalidValue !== inputInvalidValue) {\n input.setAttribute('invalid', 'true');\n }\n }\n },\n {}\n );\n });\n }\n\n initInputs() {\n this.handleIndicatorStyle();\n this.handleInputsInvalidAttribute();\n this.handleFocusEventsDispatching(this.inputs);\n }\n\n async togglePasswordStrength() {\n if (this.activePolicies.includes('passwordstrength')) {\n if (!this.passwordStrength) {\n await import('@descope-ui/descope-password-strength');\n this.passwordStrength = document.createElement('descope-password-strength');\n this.passwordStrength.setAttribute('options', 'Very weak,Weak,Average,Strong,Very strong');\n this.passwordStrength.setAttribute('value', this.passwordInput.value || '');\n this.passwordStrength.setAttribute(\n 'st-host-direction',\n this.getAttribute('st-host-direction')\n );\n this.passwordStrength.setAttribute('full-width', 'true');\n this.querySelector('.password-input-container').insertBefore(\n this.passwordStrength,\n this.policyPanel\n );\n }\n } else {\n if (this.passwordStrength) {\n this.passwordStrength.remove();\n this.passwordStrength = null;\n }\n }\n }\n\n get activePolicies() {\n return (this.getAttribute('active-policies') || '').split(',');\n }\n\n // eslint-disable-next-line class-methods-use-this\n toggleBooleanAttribute(ele, name, value) {\n value === null ? ele?.removeAttribute(name) : ele?.setAttribute(name, value);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'has-validation') {\n this.onHasValidationChange(newValue === 'true');\n } else if (attrName === 'has-confirm') {\n this.onHasConfirmChange(newValue === 'true');\n } else if (commonAttrs.includes(attrName)) {\n this.inputs.forEach((input) => this.toggleBooleanAttribute(input, attrName, newValue));\n } else if (passwordInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.passwordInput,\n removeAttrPrefix(attrName, passwordAttrPrefixRegex),\n newValue\n );\n } else if (confirmInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.confirmInput,\n removeAttrPrefix(attrName, confirmAttrPrefixRegex),\n newValue\n );\n }\n if (attrName === 'active-policies') {\n this.togglePasswordStrength();\n }\n }\n }\n}\n\nexport default NewPasswordInternal;\n","import NewPasswordInternal from './NewPasswordInternal';\nimport { componentName } from './componentName';\n\ncustomElements.define(componentName, NewPasswordInternal);\n","import { 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 'draggable',\n 'has-validation',\n 'policy-label',\n 'active-policies',\n 'available-policies',\n 'data-password-policy-value-minlength',\n 'data-password-policy-value-passwordstrength',\n 'label-type',\n 'manual-visibility-toggle',\n ],\n });\n }\n\n createSlottedExternalInput(node, slotName) {\n const externalInput = node.querySelector('input');\n const slotEle = document.createElement('slot');\n\n const targetSlot = externalInput.getAttribute('slot');\n\n slotEle.setAttribute('name', slotName);\n slotEle.setAttribute('slot', targetSlot);\n\n node.appendChild(slotEle);\n\n // move external input\n externalInput.setAttribute('slot', slotName);\n externalInput.setAttribute('name', this.getAttribute('name'));\n externalInput.setAttribute('data-hidden-input', 'true');\n\n this.appendChild(externalInput);\n }\n\n initExternalInput() {\n // get descope input components\n this.passwordInput = this.inputElement.querySelector('[data-id=\"password\"]');\n this.confirmInput = this.inputElement.querySelector('[data-id=\"confirm\"]');\n\n // create slots for external password input\n this.createSlottedExternalInput(this.passwordInput, 'external-password-input');\n this.createSlottedExternalInput(this.confirmInput, 'external-confirm-input');\n }\n };\n\nconst {\n host,\n label,\n internalInputsWrapper,\n errorMessage,\n helperText,\n passwordInput,\n policyPreview,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n internalInputsWrapper: { selector: 'descope-new-password-internal .wrapper' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n passwordInput: { selector: 'descope-password' },\n policyPreview: { selector: 'descope-policy-validation' },\n};\n\nexport const NewPasswordClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n {},\n {\n selector: PasswordClass.componentName,\n property: PasswordClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: { ...label, property: 'color' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: [\n { ...host, property: 'direction' },\n { ...passwordInput, property: PasswordClass.cssVarList.hostDirection },\n ],\n inputsRequiredIndicator: { ...host, property: 'content' },\n spaceBetweenInputs: { ...internalInputsWrapper, property: 'gap' },\n policyPreviewBackgroundColor: {\n ...policyPreview,\n property: policyPreviewVars.backgroundColor,\n },\n policyPreviewPadding: { ...policyPreview, property: policyPreviewVars.padding },\n\n valueInputHeight: { ...passwordInput, property: PasswordClass.cssVarList.valueInputHeight },\n valueInputMarginBottom: {\n ...passwordInput,\n property: PasswordClass.cssVarList.valueInputMarginBottom,\n },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${useHostExternalPadding(PasswordClass.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n -webkit-mask-image: none;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t}\n descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n .hidden {\n display: none;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n","export const interpolateString = (template, values) =>\n template.replace(/{{(\\w+)+}}/g, (match, key) => values?.[key] || match);\n"],"names":["createBaseInputClass","args","componentName","host","inputField","inputElement","inputElementPlaceholder","revealButtonContainer","revealButtonIcon","label","requiredIndicator","errorMessage","helperText","selector","PasswordClass","mappings","hostWidth","property","hostMinWidth","hostDirection","fontSize","fontFamily","inputHeight","inputHorizontalPadding","inputBackgroundColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineColor","inputOutlineStyle","inputOutlineOffset","inputOutlineWidth","labelFontSize","labelFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputPlaceholderTextColor","inputValueTextColor","revealButtonOffset","revealButtonSize","revealButtonColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","inputType","inputName","includeAttrs","noBlurDispatch","proxyProps","useProxyTargets","superclass","observedAttributes","manualToggleVisibility","this","getAttribute","init","super","handleCaretOnVisibilityChange","origSetPasswordVisible","baseElement","_setPasswordVisible","origSetFocused","_setFocused","setFocus","bind","initExternalInput","externalInput","createExternalInput","handlePasswordVisibility","caretPosition","value","length","origTogglePasswordVisibility","_togglePasswordVisibility","setTimeout","setSelectionRange","focused","call","resetPasswordVisibilityToggle","origSetFocus","attributeChangedCallback","attrName","oldValue","newValue","origBoundRevealButtonMouseDown","__boundRevealButtonMouseDown","querySelector","removeEventListener","_passwordVisibleChanged","showPasswordVisibility","hidePasswordVisibility","input","setAttribute","slots","wrappedEleName","style","cssVarList","excludeAttrsSync","dataAttrs","policyAttrs","RawPolicyValidation","baseSelector","constructor","attachShadow","mode","innerHTML","panel","shadowRoot","list","updateLabel","includes","availablePolicies","JSON","parse","console","error","split","ln","Number","isNaN","minlength","passwordStrength","parseInt","passwordstrength","expected","actual","renderItems","val","getStrengthScore","compareValues","comparison","toUpperCase","Error","validate","policies","map","policy","data","id","reduce","results","find","p","pattern","message","compare","validationResult","exp","RegExp","valid","test","push","isValid","some","getValidationItemTemplate","activePolicies","join","textContent","classList","remove","add","item","symbolDefault","symbolSuccess","symbolError","PolicyValidationClass","componentNameOverride","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textColor","labelMargin","itemsSpacing","itemSymbolSuccessColor","itemSymbolErrorColor","itemSymbolDefault","itemSymbolSuccess","itemSymbolError","isReadOnly","hasAttribute","ele","addEventListener","e","isDraggable","inputEle","target","prevType","focus","onComplete","_","removeAttribute","once","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","passwordAttrPrefixRegex","confirmAttrPrefixRegex","removeAttrPrefix","attr","prefix","replace","passwordInputAttrs","confirmInputAttrs","policyPanelAttrs","commonAttrs","inputRelatedAttrs","concat","BaseInputClass","customElements","define","wrapperEle","passwordInput","hasConfirm","onHasConfirmChange","confirmInput","toggle","onHasValidationChange","hasValidation","policyPanel","getValidity","isRequired","valueMissing","typeMismatch","patternMismatch","min","minVal","tooShort","isTrusted","renderInputs","hasExternalInput","template","inputs","initInputs","detail","mapAttrs","handleIndicatorStyle","forEach","NewPasswordClass","inputsRequiredIndicator","isInvalid","handleInputsInvalidAttribute","changedAttributes","inputInvalidValue","rootInvalidValue","handleFocusEventsDispatching","togglePasswordStrength","document","createElement","insertBefore","toggleBooleanAttribute","policyPreviewVars","internalInputsWrapper","policyPreview","spaceBetweenInputs","policyPreviewBackgroundColor","policyPreviewPadding","valueInputMarginBottom","externalInputAttr","appendChild","content","cloneNode","createSlottedExternalInput","node","slotName","slotEle","targetSlot","interpolateString","values","match","key"],"sourceRoot":""}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2996,4364,6969,8603],{3393:(t,e,i)=>{i.d(e,{y:()=>s});var r=i(9696),n=i(79365),o=i(81365);const s=(...t)=>(0,r.Zz)(n.XX,n._$,n.yF,n.jd)((0,o.q)(...t))},5810:(t,e,i)=>{i.d(e,{M:()=>v,T:()=>l});var r=i(79365),n=i(9696),o=i(97810),s=i(16616),a=i(73551);const l=(0,o.xE)("password"),{host:p,inputField:d,inputElement:c,inputElementPlaceholder:u,revealButtonContainer:h,revealButtonIcon:b,label:g,requiredIndicator:y,errorMessage:m,helperText:w}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host input:placeholder-shown"},revealButtonContainer:{selector:"::part(reveal-button)"},revealButtonIcon:{selector:"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,n.Zz)((0,r.RF)({mappings:{hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},hostDirection:{...p,property:"direction"},fontSize:[{},p],fontFamily:[g,d,m,w],inputHeight:{...d,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...d,property:"background-color"},inputBorderStyle:{...d,property:"border-style"},inputBorderWidth:{...d,property:"border-width"},inputBorderColor:{...d,property:"border-color"},inputBorderRadius:{...d,property:"border-radius"},inputOutlineColor:{...d,property:"outline-color"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputOutlineWidth:{...d,property:"outline-width"},labelFontSize:{...g,property:"font-size"},labelFontWeight:{...g,property:"font-weight"},labelTextColor:[{...g,property:"color"},{...y,property:"color"}],labelRequiredIndicator:{...y,property:"content"},errorMessageTextColor:{...m,property:"color"},errorMessageIcon:{...m,property:"background-image"},errorMessageIconSize:{...m,property:"background-size"},errorMessageIconPadding:{...m,property:"padding-inline-start"},errorMessageIconRepeat:{...m,property:"background-repeat"},errorMessageIconPosition:{...m,property:"background-position"},inputPlaceholderTextColor:[{...u,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],revealButtonSize:{...h,property:"font-size"},revealButtonColor:{...b,property:"color"},labelPosition:{...g,property:"position"},labelTopPosition:{...g,property:"top"},labelHorizontalPosition:[{...g,property:"left"},{...g,property:"right"}],inputTransformY:{...g,property:"transform"},inputTransition:{...g,property:"transition"},marginInlineStart:{...g,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...c,property:"opacity"}],inputVerticalAlignment:{...d,property:"align-items"},valueInputHeight:{...c,property:"height"}}}),r.VO,(0,r.RV)({inputType:"password",inputName:"password",includeAttrs:["disabled","readonly","pattern","type","autocomplete"],noBlurDispatch:!0}),(0,r.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),r.tQ,s.A,(t=>class extends t{static get observedAttributes(){return["manual-visibility-toggle"]}get manualToggleVisibility(){return"true"===this.getAttribute("manual-visibility-toggle")}init(){super.init?.(),this.handleCaretOnVisibilityChange(),this.origSetPasswordVisible=this.baseElement._setPasswordVisible,this.origSetFocused=this.baseElement._setFocused,this.baseElement._setFocused=this.setFocus.bind(this),this.initExternalInput()}initExternalInput(){const t=this.createExternalInput();t&&this.handlePasswordVisibility(t)}get caretPosition(){return this.value?.length||0}handleCaretOnVisibilityChange(){const t=this.baseElement._togglePasswordVisibility.bind(this.baseElement);this.baseElement._togglePasswordVisibility=()=>{setTimeout((()=>(t(),this.inputElement.setSelectionRange(this.caretPosition,this.caretPosition),!1)))}}setFocus(t){this.manualToggleVisibility&&(this.baseElement._setPasswordVisible=()=>{}),this.origSetFocused.call(this.baseElement,t),this.baseElement._setPasswordVisible=this.origSetPasswordVisible.bind(this.baseElement)}resetPasswordVisibilityToggle(){this.baseElement._setPasswordVisible=this.origSetPasswordVisible,this.baseElement._setFocused=this.origSetFocus}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i)}handlePasswordVisibility(t){const e=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",e),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===t.getAttribute("type")?this.showPasswordVisibility(t):this.hidePasswordVisibility(t)}}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}}))((0,r.tz)({slots:["","suffix"],wrappedEleName:"vaadin-password-field",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${(0,a.cy)(v.cssVarList)}\n\t\t\t${(0,a.I4)("vaadin-password-field")}\n ${(0,a.$J)("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(${v.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${(0,a.Kl)()}\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`,excludeAttrsSync:["tabindex"],componentName:l}))},6424:(t,e,i)=>{i.d(e,{A:()=>v});const{host:r,label:n,placeholder:o,requiredIndicator:s,inputField:a,input:l,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:g,externalInputDisabled:y,externalPlaceholder:m,externalDisabledPlaceholder:w}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},v={fontSize:[{},r],fontFamily:[n,a,d,c],labelFontSize:{...n,property:"font-size"},labelFontWeight:{...n,property:"font-weight"},labelTextColor:[{...n,property:"color"},{...s,property:"color"},{...n,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputDirection:{...l,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...y,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...s,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"},{...w,property:"-webkit-text-fill-color"}],labelPosition:{...n,property:"position"},labelTopPosition:{...n,property:"top"},labelHorizontalPosition:[{...n,property:"left"},{...n,property:"right"}],inputTransformY:{...n,property:"transform"},inputTransition:{...n,property:"transition"},marginInlineStart:{...n,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},8877:(t,e,i)=>{i.d(e,{T:()=>r});const r=(0,i(97810).xE)("new-password-internal")},10777:(t,e,i)=>{i.d(e,{T:()=>p,w:()=>w});var r=i(79365),n=i(81365),o=i(9696),s=i(97810),a=i(88191),l=i(25964);const p=(0,s.xE)("policy-validation"),d=["data","active-policies","overrides","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-actual-passwordstrength"],c=["label","value",...d];class u extends((0,n.q)({componentName:p,baseSelector:":host > div"})){#t;#e=[];#i;static get observedAttributes(){return c}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n\t\t',(0,l.fz)("\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 ",this),this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback?.(t,e,i),e!==i){if("label"===t&&this.updateLabel(i),d.includes(t)){if("data"===t)try{this.availablePolicies=JSON.parse(i)}catch{console.error("Failed to set available policies")}if("active-policies"===t&&(this.#e=(i||"").split(",")),"data-password-policy-value-minlength"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,minlength:{value:`${t}`}})}if("data-password-policy-value-passwordstrength"===t){const t=parseInt(i);!Number.isNaN(t)&&t>=0&&(this.#i={...this.#i,passwordstrength:{...this.#i?.passwordstrength,expected:t}})}if("data-password-policy-actual-passwordstrength"===t){const t=Number(i);!Number.isNaN(t)&&t>=0&&(this.#i={...this.#i,passwordstrength:{...this.#i?.passwordstrength,actual:t}})}}this.renderItems(this.#t,this.#e,this.#i)}}get availablePolicies(){return this.#t||[]}set availablePolicies(t){this.#t=t}get value(){return this.getAttribute("value")||""}getStrengthScore(){return this.value.length}compareValues(t,e,i){switch(t.toUpperCase()){case"GTE":return i>=e;case"GT":return i>e;case"LTE":return i<=e;case"LT":return i<e;case"EQ":return i===e;case"NEQ":return i!==e;default:throw new Error(`Invalid comparison type: ${t}`)}}validate(){let t=this.#t;return this.#i&&(t=this.#t.map((t=>{const e=this.#i[t.id];return e?{...t,data:e}:t}))),this.#e.reduce(((e,i)=>{const r=t.find((t=>t.id===i));if(!r)return e;const{pattern:n,message:o,data:s,compare:l}=r;if(!n&&!l||!o)return e;const p={message:(0,a.z)(o,s),id:i};if(n){const t=new RegExp((0,a.z)(n,s));p.valid=t.test(this.value)}else l&&(p.valid=this.compareValues(l,s?.expected??-1,s?.actual??-1));return e.push(p),e}),[])}get isValid(){return!this.validate().some((({valid:t})=>!1===t))}getValidationItemTemplate({valid:t,message:e}){return`\n <li class="item" data-valid="${this.value?t:"none"}">\n <span class="message">${e}</span>\n </li>\n `}renderItems(t,e){t&&e.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(t){t?(this.label.textContent=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.textContent="")}}const{host:h,item:b,symbolDefault:g,symbolSuccess:y,symbolError:m}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},w=(0,o.Zz)((0,r.RF)({componentNameOverride:(0,s.xE)("input-wrapper")}),(0,r.RF)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...h,property:"border-width"},borderStyle:{...h,property:"border-style"},borderColor:{...h,property:"border-color"},borderRadius:{...h,property:"border-radius"},backgroundColor:{...h,property:"background-color"},textColor:{property:"color"},labelMargin:{...h,property:"gap"},itemsSpacing:{...b,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...m,property:"color"},itemSymbolDefault:{...g,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...m,property:"content"}}}),r.VO,r.tQ)(u)},11284:(t,e,i)=>{i(52733),i(27136)},16616:(t,e,i)=>{i.d(e,{A:()=>r});const r=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const t=this.querySelector("input");t?.addEventListener("mousedown",(e=>{if(this.isDraggable&&this.isReadOnly){t.setAttribute("inert","true");const i=e.target,r=i.getAttribute("type");i.setAttribute("type","text"),setTimeout((()=>{i.focus()}));const n=e=>{i.setAttribute("type",r),t.removeAttribute("inert"),this.removeEventListener("mouseup",n),this.removeEventListener("dragend",n)};this.addEventListener("dragend",n,{once:!0}),this.addEventListener("mouseup",n,{once:!0})}}))}}},19169:(t,e,i)=>{i.r(e),i.d(e,{PasswordClass:()=>r.M,componentName:()=>r.T}),i(51899);var r=i(5810);customElements.define(r.T,r.M)},21374:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>r.w,componentName:()=>r.T}),i(11284),i(37182),i(95260);var r=i(79275);customElements.define(r.T,r.w)},26782:(t,e,i)=>{i.r(e),i.d(e,{PolicyValidationClass:()=>r.w,componentName:()=>r.T});var r=i(10777);customElements.define(r.T,r.w)},72788:(t,e,i)=>{i.r(e),i.d(e,{NewPasswordClass:()=>r.M,componentName:()=>r.T});var r=i(87455);i(21374),i(19169),i(26782),i(78844),customElements.define(r.T,r.M)},73551:(t,e,i)=>{i.d(e,{$J:()=>u,I4:()=>s,Kl:()=>h,LJ:()=>c,Qv:()=>o,X6:()=>l,cy:()=>r,fu:()=>p,kG:()=>d,lS:()=>a,zm:()=>n});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,n=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,c=(t,e)=>`\n ${n(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},78844:(t,e,i)=>{var r=i(25964),n=i(3393),o=i(97810),s=i(87455),a=i(8877);const l=/^password-/,p=/^confirm-/,d=(t,e)=>t.replace(e,""),c=["password-label","password-placeholder"],u=["confirm-label","confirm-placeholder"],h=["has-validation","policy-label","available-policies","active-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","manual-visibility-toggle"],b=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type","manual-visibility-toggle"],g=[].concat(b,c,u,h),y=(0,n.y)({componentName:a.T,baseSelector:"div"});customElements.define(a.T,class extends y{static get observedAttributes(){return[].concat(y.observedAttributes||[],g)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(t){t!==this.value&&(this.passwordInput.value=t)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}onHasConfirmChange(t){this.confirmInput.classList.toggle("hidden",!t)}onHasValidationChange(t){this.policyPanel.classList.toggle("hidden",!t)}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.value&&!this.policyPanel.isValid)return{typeMismatch:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const t=this.getAttribute("minlength"),e=parseInt(t,10)||0;return this.value.length>=e?{}:{tooShort:!0}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.passwordInput.focus()})),super.init?.(),this.renderInputs(this.hasConfirm,this.hasValidation)}renderInputs(){const t="true"===this.getAttribute("external-input"),e=`\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="${t}"\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="${t}"\n data-id="confirm"\n ></descope-password>\n `;this.wrapperEle.innerHTML=e,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.passwordStrength=this.querySelector("descope-password-strength"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),this.passwordInput.addEventListener("input",(t=>{this.passwordStrength?.addEventListener("score-changed",(({detail:t})=>{this.policyPanel.setAttribute("data-password-policy-actual-passwordstrength",t)}),{once:!0}),this.passwordStrength?.setAttribute("value",t.target.value),this.policyPanel.setAttribute("value",t.target.value)})),(0,o.EA)(this,this.policyPanel,{includeAttrs:h,mapAttrs:{"policy-label":"label","available-policies":"data"}})}handleIndicatorStyle(){this.inputs.forEach((t=>{(0,r.fz)(`\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${s.M.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`,t)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,o.mx)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}async togglePasswordStrength(){this.activePolicies.includes("passwordstrength")?this.passwordStrength||(await Promise.all([i.e(8961),i.e(3241)]).then(i.bind(i,13241)),this.passwordStrength=document.createElement("descope-password-strength"),this.passwordStrength.setAttribute("options","Very weak,Weak,Average,Strong,Very strong"),this.passwordStrength.setAttribute("value",this.passwordInput.value||""),this.passwordStrength.setAttribute("st-host-direction",this.getAttribute("st-host-direction")),this.passwordStrength.setAttribute("full-width","true"),this.querySelector(".password-input-container").insertBefore(this.passwordStrength,this.policyPanel)):this.passwordStrength&&(this.passwordStrength.remove(),this.passwordStrength=null)}get activePolicies(){return(this.getAttribute("active-policies")||"").split(",")}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-validation"===t?this.onHasValidationChange("true"===i):"has-confirm"===t?this.onHasConfirmChange("true"===i):b.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):c.includes(t)?this.toggleBooleanAttribute(this.passwordInput,d(t,l),i):u.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,d(t,p),i),"active-policies"===t&&this.togglePasswordStrength())}})},79275:(t,e,i)=>{i.d(e,{T:()=>l,w:()=>d});var r=i(79365),n=i(6424),o=i(9696),s=i(97810),a=i(73551);const l=(0,s.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,r.RF)({mappings:n.A}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),r.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i),e!==i&&("label-type"===t?"floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===i))}}))((0,r.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\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 ${(0,a.$J)("vaadin-text-field")}\n\t\t\t${(0,a.cy)(d.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,a.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:l}))},87455:(t,e,i)=>{i.d(e,{M:()=>v,T:()=>d});var r=i(97810),n=i(9696),o=i(79365),s=i(8877),a=i(5810),l=i(73551),p=i(10777);const d=(0,r.xE)("new-password"),c=p.w.cssVarList,{host:u,label:h,internalInputsWrapper:b,errorMessage:g,helperText:y,passwordInput:m,policyPreview:w}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},v=(0,n.Zz)((0,o.RF)({mappings:{fontSize:[u,{},{selector:a.M.componentName,property:a.M.cssVarList.fontSize}],fontFamily:[h,g,y],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},hostWidth:{...u,property:"width"},hostMinWidth:{...u,property:"min-width"},hostDirection:[{...u,property:"direction"},{...m,property:a.M.cssVarList.hostDirection}],inputsRequiredIndicator:{...u,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...w,property:c.backgroundColor},policyPreviewPadding:{...w,property:c.padding},valueInputHeight:{...m,property:a.M.cssVarList.valueInputHeight},valueInputMarginBottom:{...m,property:a.M.cssVarList.valueInputMarginBottom}}}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{init(){super.init?.();const t=document.createElement("template"),e=this.getAttribute("external-input");t.innerHTML=`\n\t\t\t<${s.T}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n external-input="${e}"\n\t\t\t>\n </${s.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(s.T),"true"===this.getAttribute("external-input")&&this.initExternalInput(),(0,r.EA)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","label-type","manual-visibility-toggle"]})}createSlottedExternalInput(t,e){const i=t.querySelector("input"),r=document.createElement("slot"),n=i.getAttribute("slot");r.setAttribute("name",e),r.setAttribute("slot",n),t.appendChild(r),i.setAttribute("slot",e),i.setAttribute("name",this.getAttribute("name")),i.setAttribute("data-hidden-input","true"),this.appendChild(i)}initExternalInput(){this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createSlottedExternalInput(this.passwordInput,"external-password-input"),this.createSlottedExternalInput(this.confirmInput,"external-confirm-input")}}))((0,o.tz)({slots:[],wrappedEleName:"vaadin-text-field",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${(0,l.cy)(a.M.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`,excludeAttrsSync:["tabindex"],componentName:d}))},88191:(t,e,i)=>{i.d(e,{z:()=>r});const r=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2996,4364,6969,8603],{3393:(t,e,i)=>{i.d(e,{y:()=>s});var r=i(9696),n=i(79365),o=i(81365);const s=(...t)=>(0,r.Zz)(n.XX,n._$,n.yF,n.jd)((0,o.q)(...t))},5810:(t,e,i)=>{i.d(e,{M:()=>v,T:()=>l});var r=i(79365),n=i(9696),o=i(97810),s=i(16616),a=i(73551);const l=(0,o.xE)("password"),{host:p,inputField:d,inputElement:c,inputElementPlaceholder:u,revealButtonContainer:h,revealButtonIcon:b,label:g,requiredIndicator:y,errorMessage:m,helperText:w}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:()=>":host input:placeholder-shown"},revealButtonContainer:{selector:"::part(reveal-button)"},revealButtonIcon:{selector:"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,n.Zz)((0,r.RF)({mappings:{hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},hostDirection:{...p,property:"direction"},fontSize:[{},p],fontFamily:[g,d,m,w],inputHeight:{...d,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...d,property:"background-color"},inputBorderStyle:{...d,property:"border-style"},inputBorderWidth:{...d,property:"border-width"},inputBorderColor:{...d,property:"border-color"},inputBorderRadius:{...d,property:"border-radius"},inputOutlineColor:{...d,property:"outline-color"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputOutlineWidth:{...d,property:"outline-width"},labelFontSize:{...g,property:"font-size"},labelFontWeight:{...g,property:"font-weight"},labelTextColor:[{...g,property:"color"},{...y,property:"color"}],labelRequiredIndicator:{...y,property:"content"},errorMessageTextColor:{...m,property:"color"},errorMessageIcon:{...m,property:"background-image"},errorMessageIconSize:{...m,property:"background-size"},errorMessageIconPadding:{...m,property:"padding-inline-start"},errorMessageIconRepeat:{...m,property:"background-repeat"},errorMessageIconPosition:{...m,property:"background-position"},errorMessageFontSize:{...m,property:"font-size"},inputPlaceholderTextColor:[{...u,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],revealButtonSize:{...h,property:"font-size"},revealButtonColor:{...b,property:"color"},labelPosition:{...g,property:"position"},labelTopPosition:{...g,property:"top"},labelHorizontalPosition:[{...g,property:"left"},{...g,property:"right"}],inputTransformY:{...g,property:"transform"},inputTransition:{...g,property:"transition"},marginInlineStart:{...g,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...c,property:"opacity"}],inputVerticalAlignment:{...d,property:"align-items"},valueInputHeight:{...c,property:"height"}}}),r.VO,(0,r.RV)({inputType:"password",inputName:"password",includeAttrs:["disabled","readonly","pattern","type","autocomplete"],noBlurDispatch:!0}),(0,r.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),r.tQ,s.A,(t=>class extends t{static get observedAttributes(){return["manual-visibility-toggle"]}get manualToggleVisibility(){return"true"===this.getAttribute("manual-visibility-toggle")}init(){super.init?.(),this.handleCaretOnVisibilityChange(),this.origSetPasswordVisible=this.baseElement._setPasswordVisible,this.origSetFocused=this.baseElement._setFocused,this.baseElement._setFocused=this.setFocus.bind(this),this.initExternalInput()}initExternalInput(){const t=this.createExternalInput();t&&this.handlePasswordVisibility(t)}get caretPosition(){return this.value?.length||0}handleCaretOnVisibilityChange(){const t=this.baseElement._togglePasswordVisibility.bind(this.baseElement);this.baseElement._togglePasswordVisibility=()=>{setTimeout((()=>(t(),this.inputElement.setSelectionRange(this.caretPosition,this.caretPosition),!1)))}}setFocus(t){this.manualToggleVisibility&&(this.baseElement._setPasswordVisible=()=>{}),this.origSetFocused.call(this.baseElement,t),this.baseElement._setPasswordVisible=this.origSetPasswordVisible.bind(this.baseElement)}resetPasswordVisibilityToggle(){this.baseElement._setPasswordVisible=this.origSetPasswordVisible,this.baseElement._setFocused=this.origSetFocus}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i)}handlePasswordVisibility(t){const e=this.baseElement.__boundRevealButtonMouseDown;this.baseElement.querySelector("vaadin-password-field-button").removeEventListener("mousedown",e),this.baseElement._passwordVisibleChanged=()=>{},this.baseElement._togglePasswordVisibility=()=>{"password"===t.getAttribute("type")?this.showPasswordVisibility(t):this.hidePasswordVisibility(t)}}showPasswordVisibility(t){t.setAttribute("type","text"),this.setAttribute("password-visible","true")}hidePasswordVisibility(t){t.setAttribute("type","password"),this.setAttribute("password-visible","false")}}))((0,r.tz)({slots:["","suffix"],wrappedEleName:"vaadin-password-field",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${(0,a.cy)(v.cssVarList)}\n\t\t\t${(0,a.I4)("vaadin-password-field")}\n ${(0,a.$J)("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(${v.cssVarList.inputOutlineColor});\n\t\t\t}\n\n ${(0,a.Kl)()}\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`,excludeAttrsSync:["tabindex"],componentName:l}))},6424:(t,e,i)=>{i.d(e,{A:()=>v});const{host:r,label:n,placeholder:o,requiredIndicator:s,inputField:a,input:l,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:g,externalInputDisabled:y,externalPlaceholder:m,externalDisabledPlaceholder:w}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},v={fontSize:[{},r],fontFamily:[n,a,d,c],labelFontSize:{...n,property:"font-size"},labelFontWeight:{...n,property:"font-weight"},labelTextColor:[{...n,property:"color"},{...s,property:"color"},{...n,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputDirection:{...l,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},errorMessageFontSize:{...c,property:"font-size"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...y,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...s,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"},{...w,property:"-webkit-text-fill-color"}],labelPosition:{...n,property:"position"},labelTopPosition:{...n,property:"top"},labelHorizontalPosition:[{...n,property:"left"},{...n,property:"right"}],inputTransformY:{...n,property:"transform"},inputTransition:{...n,property:"transition"},marginInlineStart:{...n,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},8877:(t,e,i)=>{i.d(e,{T:()=>r});const r=(0,i(97810).xE)("new-password-internal")},10777:(t,e,i)=>{i.d(e,{T:()=>p,w:()=>w});var r=i(79365),n=i(81365),o=i(9696),s=i(97810),a=i(88191),l=i(25964);const p=(0,s.xE)("policy-validation"),d=["data","active-policies","overrides","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-actual-passwordstrength"],c=["label","value",...d];class u extends((0,n.q)({componentName:p,baseSelector:":host > div"})){#t;#e=[];#i;static get observedAttributes(){return c}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n\t\t',(0,l.fz)("\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 ",this),this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback?.(t,e,i),e!==i){if("label"===t&&this.updateLabel(i),d.includes(t)){if("data"===t)try{this.availablePolicies=JSON.parse(i)}catch{console.error("Failed to set available policies")}if("active-policies"===t&&(this.#e=(i||"").split(",")),"data-password-policy-value-minlength"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,minlength:{value:`${t}`}})}if("data-password-policy-value-passwordstrength"===t){const t=parseInt(i);!Number.isNaN(t)&&t>=0&&(this.#i={...this.#i,passwordstrength:{...this.#i?.passwordstrength,expected:t}})}if("data-password-policy-actual-passwordstrength"===t){const t=Number(i);!Number.isNaN(t)&&t>=0&&(this.#i={...this.#i,passwordstrength:{...this.#i?.passwordstrength,actual:t}})}}this.renderItems(this.#t,this.#e,this.#i)}}get availablePolicies(){return this.#t||[]}set availablePolicies(t){this.#t=t}get value(){return this.getAttribute("value")||""}getStrengthScore(){return this.value.length}compareValues(t,e,i){switch(t.toUpperCase()){case"GTE":return i>=e;case"GT":return i>e;case"LTE":return i<=e;case"LT":return i<e;case"EQ":return i===e;case"NEQ":return i!==e;default:throw new Error(`Invalid comparison type: ${t}`)}}validate(){let t=this.#t;return this.#i&&(t=this.#t.map((t=>{const e=this.#i[t.id];return e?{...t,data:e}:t}))),this.#e.reduce(((e,i)=>{const r=t.find((t=>t.id===i));if(!r)return e;const{pattern:n,message:o,data:s,compare:l}=r;if(!n&&!l||!o)return e;const p={message:(0,a.z)(o,s),id:i};if(n){const t=new RegExp((0,a.z)(n,s));p.valid=t.test(this.value)}else l&&(p.valid=this.compareValues(l,s?.expected??-1,s?.actual??-1));return e.push(p),e}),[])}get isValid(){return!this.validate().some((({valid:t})=>!1===t))}getValidationItemTemplate({valid:t,message:e}){return`\n <li class="item" data-valid="${this.value?t:"none"}">\n <span class="message">${e}</span>\n </li>\n `}renderItems(t,e){t&&e.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(t){t?(this.label.textContent=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.textContent="")}}const{host:h,item:b,symbolDefault:g,symbolSuccess:y,symbolError:m}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},w=(0,o.Zz)((0,r.RF)({componentNameOverride:(0,s.xE)("input-wrapper")}),(0,r.RF)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...h,property:"border-width"},borderStyle:{...h,property:"border-style"},borderColor:{...h,property:"border-color"},borderRadius:{...h,property:"border-radius"},backgroundColor:{...h,property:"background-color"},textColor:{property:"color"},labelMargin:{...h,property:"gap"},itemsSpacing:{...b,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...m,property:"color"},itemSymbolDefault:{...g,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...m,property:"content"}}}),r.VO,r.tQ)(u)},11284:(t,e,i)=>{i(52733),i(27136)},16616:(t,e,i)=>{i.d(e,{A:()=>r});const r=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){super.init?.();const t=this.querySelector("input");t?.addEventListener("mousedown",(e=>{if(this.isDraggable&&this.isReadOnly){t.setAttribute("inert","true");const i=e.target,r=i.getAttribute("type");i.setAttribute("type","text"),setTimeout((()=>{i.focus()}));const n=e=>{i.setAttribute("type",r),t.removeAttribute("inert"),this.removeEventListener("mouseup",n),this.removeEventListener("dragend",n)};this.addEventListener("dragend",n,{once:!0}),this.addEventListener("mouseup",n,{once:!0})}}))}}},19169:(t,e,i)=>{i.r(e),i.d(e,{PasswordClass:()=>r.M,componentName:()=>r.T}),i(51899);var r=i(5810);customElements.define(r.T,r.M)},21374:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>r.w,componentName:()=>r.T}),i(11284),i(37182),i(95260);var r=i(79275);customElements.define(r.T,r.w)},26782:(t,e,i)=>{i.r(e),i.d(e,{PolicyValidationClass:()=>r.w,componentName:()=>r.T});var r=i(10777);customElements.define(r.T,r.w)},72788:(t,e,i)=>{i.r(e),i.d(e,{NewPasswordClass:()=>r.M,componentName:()=>r.T});var r=i(87455);i(21374),i(19169),i(26782),i(78844),customElements.define(r.T,r.M)},73551:(t,e,i)=>{i.d(e,{$J:()=>u,I4:()=>s,Kl:()=>h,LJ:()=>c,Qv:()=>o,X6:()=>l,cy:()=>r,fu:()=>p,kG:()=>d,lS:()=>a,zm:()=>n});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,n=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,c=(t,e)=>`\n ${n(t)}\n ${s(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},78844:(t,e,i)=>{var r=i(25964),n=i(3393),o=i(97810),s=i(87455),a=i(8877);const l=/^password-/,p=/^confirm-/,d=(t,e)=>t.replace(e,""),c=["password-label","password-placeholder"],u=["confirm-label","confirm-placeholder"],h=["has-validation","policy-label","available-policies","active-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","manual-visibility-toggle"],b=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type","manual-visibility-toggle"],g=[].concat(b,c,u,h),y=(0,n.y)({componentName:a.T,baseSelector:"div"});customElements.define(a.T,class extends y{static get observedAttributes(){return[].concat(y.observedAttributes||[],g)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(t){t!==this.value&&(this.passwordInput.value=t)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}onHasConfirmChange(t){this.confirmInput.classList.toggle("hidden",!t)}onHasValidationChange(t){this.policyPanel.classList.toggle("hidden",!t)}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.value&&!this.policyPanel.isValid)return{typeMismatch:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const t=this.getAttribute("minlength"),e=parseInt(t,10)||0;return this.value.length>=e?{}:{tooShort:!0}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.passwordInput.focus()})),super.init?.(),this.renderInputs(this.hasConfirm,this.hasValidation)}renderInputs(){const t="true"===this.getAttribute("external-input"),e=`\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="${t}"\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="${t}"\n data-id="confirm"\n ></descope-password>\n `;this.wrapperEle.innerHTML=e,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.passwordStrength=this.querySelector("descope-password-strength"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),this.passwordInput.addEventListener("input",(t=>{this.passwordStrength?.addEventListener("score-changed",(({detail:t})=>{this.policyPanel.setAttribute("data-password-policy-actual-passwordstrength",t)}),{once:!0}),this.passwordStrength?.setAttribute("value",t.target.value),this.policyPanel.setAttribute("value",t.target.value)})),(0,o.EA)(this,this.policyPanel,{includeAttrs:h,mapAttrs:{"policy-label":"label","available-policies":"data"}})}handleIndicatorStyle(){this.inputs.forEach((t=>{(0,r.fz)(`\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${s.M.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`,t)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,o.mx)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}async togglePasswordStrength(){this.activePolicies.includes("passwordstrength")?this.passwordStrength||(await Promise.all([i.e(8961),i.e(3241)]).then(i.bind(i,13241)),this.passwordStrength=document.createElement("descope-password-strength"),this.passwordStrength.setAttribute("options","Very weak,Weak,Average,Strong,Very strong"),this.passwordStrength.setAttribute("value",this.passwordInput.value||""),this.passwordStrength.setAttribute("st-host-direction",this.getAttribute("st-host-direction")),this.passwordStrength.setAttribute("full-width","true"),this.querySelector(".password-input-container").insertBefore(this.passwordStrength,this.policyPanel)):this.passwordStrength&&(this.passwordStrength.remove(),this.passwordStrength=null)}get activePolicies(){return(this.getAttribute("active-policies")||"").split(",")}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-validation"===t?this.onHasValidationChange("true"===i):"has-confirm"===t?this.onHasConfirmChange("true"===i):b.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):c.includes(t)?this.toggleBooleanAttribute(this.passwordInput,d(t,l),i):u.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,d(t,p),i),"active-policies"===t&&this.togglePasswordStrength())}})},79275:(t,e,i)=>{i.d(e,{T:()=>l,w:()=>d});var r=i(79365),n=i(6424),o=i(9696),s=i(97810),a=i(73551);const l=(0,s.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,r.RF)({mappings:n.A}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),r.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i),e!==i&&("label-type"===t?"floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===i))}}))((0,r.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\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 ${(0,a.$J)("vaadin-text-field")}\n\t\t\t${(0,a.cy)(d.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,a.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:l}))},87455:(t,e,i)=>{i.d(e,{M:()=>v,T:()=>d});var r=i(97810),n=i(9696),o=i(79365),s=i(8877),a=i(5810),l=i(73551),p=i(10777);const d=(0,r.xE)("new-password"),c=p.w.cssVarList,{host:u,label:h,internalInputsWrapper:b,errorMessage:g,helperText:y,passwordInput:m,policyPreview:w}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},v=(0,n.Zz)((0,o.RF)({mappings:{fontSize:[u,{},{selector:a.M.componentName,property:a.M.cssVarList.fontSize}],fontFamily:[h,g,y],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...g,property:"color"},errorMessageIcon:{...g,property:"background-image"},errorMessageIconSize:{...g,property:"background-size"},errorMessageIconPadding:{...g,property:"padding-inline-start"},errorMessageIconRepeat:{...g,property:"background-repeat"},errorMessageIconPosition:{...g,property:"background-position"},errorMessageFontSize:{...g,property:"font-size"},hostWidth:{...u,property:"width"},hostMinWidth:{...u,property:"min-width"},hostDirection:[{...u,property:"direction"},{...m,property:a.M.cssVarList.hostDirection}],inputsRequiredIndicator:{...u,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...w,property:c.backgroundColor},policyPreviewPadding:{...w,property:c.padding},valueInputHeight:{...m,property:a.M.cssVarList.valueInputHeight},valueInputMarginBottom:{...m,property:a.M.cssVarList.valueInputMarginBottom}}}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{init(){super.init?.();const t=document.createElement("template"),e=this.getAttribute("external-input");t.innerHTML=`\n\t\t\t<${s.T}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n external-input="${e}"\n\t\t\t>\n </${s.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(s.T),"true"===this.getAttribute("external-input")&&this.initExternalInput(),(0,r.EA)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","label-type","manual-visibility-toggle"]})}createSlottedExternalInput(t,e){const i=t.querySelector("input"),r=document.createElement("slot"),n=i.getAttribute("slot");r.setAttribute("name",e),r.setAttribute("slot",n),t.appendChild(r),i.setAttribute("slot",e),i.setAttribute("name",this.getAttribute("name")),i.setAttribute("data-hidden-input","true"),this.appendChild(i)}initExternalInput(){this.passwordInput=this.inputElement.querySelector('[data-id="password"]'),this.confirmInput=this.inputElement.querySelector('[data-id="confirm"]'),this.createSlottedExternalInput(this.passwordInput,"external-password-input"),this.createSlottedExternalInput(this.confirmInput,"external-confirm-input")}}))((0,o.tz)({slots:[],wrappedEleName:"vaadin-text-field",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${(0,l.cy)(a.M.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`,excludeAttrsSync:["tabindex"],componentName:d}))},88191:(t,e,i)=>{i.d(e,{z:()=>r});const r=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))}}]);
|
2
2
|
//# sourceMappingURL=descope-new-password-index-js.js.map
|