@descope/web-components-ui 3.24.0 → 3.26.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 +2134 -1370
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3057 -2083
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/8961.js +1 -1
- package/dist/umd/8961.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/descope-email-field.js +55 -0
- package/dist/umd/descope-email-field.js.map +1 -0
- package/dist/umd/descope-hybrid-field-index-js.js +3 -3
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-new-email.js +55 -0
- package/dist/umd/descope-new-email.js.LICENSE.txt +11 -0
- package/dist/umd/descope-new-email.js.map +1 -0
- 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-policy-validation-index-js.js +1 -1
- package/dist/umd/descope-policy-validation-index-js.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +45 -43
- package/src/components/descope-hybrid-field/index.js +1 -1
- package/src/components/descope-new-password/NewPasswordClass.js +1 -0
- package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +1 -0
- package/src/components/descope-policy-validation/PolicyValidationClass.js +21 -6
- package/src/index.cjs.js +0 -1
- package/src/index.js +0 -1
- package/src/theme/components/index.js +3 -1
- package/stories/descope-email-field.stories.js +1 -1
- package/stories/descope-policy-validation.stories.js +21 -1
- package/dist/umd/descope-email-field-index-js.js +0 -55
- package/dist/umd/descope-email-field-index-js.js.map +0 -1
- package/src/components/descope-email-field/EmailFieldClass.js +0 -138
- package/src/components/descope-email-field/emailPattern.js +0 -7
- package/src/components/descope-email-field/index.js +0 -6
- package/src/theme/components/emailField.js +0 -55
- /package/dist/umd/{descope-email-field-index-js.js.LICENSE.txt → descope-email-field.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descope-new-email.js","mappings":";oOAkBO,MAAAA,GAAsB,EAAAC,EAAAC,IAAgB,eAG7CC,EAAA,SAyFAC,KACAA,EAAAC,MACAA,EAAAC,YACAA,EAAAC,kBACAA,EAAAC,WACAA,EAAAC,MACAA,EAAAC,UACAA,EAAAC,WACAA,EAAAC,aACAA,EAAAC,oBACAA,EAAAC,cACAA,EAAAC,UACAA,EAAAC,cACAA,EAAAC,sBACAA,EAAAC,oBACAA,EAAAC,4BACAA,GACE,CACFf,KAAA,CAAUgB,SAAA,aACVf,MAAA,CAAWe,SAAA,iBACXb,kBAAA,CACAa,SAAA,+CAEAd,YAAA,CACA,CAAMc,SAAA,6BACN,CAAMA,SAAA,gDAENP,oBAAA,CAAyBO,SAAA,iCACzBZ,WAAA,CAAgBY,SAAA,uBAChBX,MAAA,CAAWW,SAAA,SACXV,UAAA,CAAeU,SAAA,+BACfN,cAAA,CAAmBM,SAAA,kBACnBT,WAAA,CAAgBS,SAAA,uBAChBR,aAAA,CAAkBQ,SAAA,yBAClBL,UAAA,CAAeK,SAAA,eACfJ,cAAA,CAAmBI,SAAA,wBACnBH,sBAAA,CAA2BG,SAAA,iCAC3BF,oBAAA,CAAyBE,SAAA,0CACzBD,4BAAA,CACAC,SAAA,+CAIOC,GAAwB,EAAAC,EAAAC,KAC7B,EAAAC,EAAAC,IAAgB,CAClBC,SAAA,CAEAC,SAAA,IAAmBvB,GACnBwB,WAAA,CAAAvB,EAAAG,EAAAG,EAAAC,GAEAiB,cAAA,IAAuBxB,EAAAyB,SAAA,aACvBC,gBAAA,IAAyB1B,EAAAyB,SAAA,eAEzBE,qBAAA,CACA,IAAUvB,EAAAqB,SAAA,eACV,I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C,KAAA4I,QAGA,CAEA,wBAAAG,GACA,UAAAjK,MAAAiK,cAAA,kCACA,CAEA,sBAAAsB,GACA,UAAAvL,MAAAuL,YAAA,kCACA,CAEA,WAAAlI,GACArD,QACAJ,KAAAqB,SAAA,OACA,CAGA,gBAAAuK,GACA,OAAA5L,KAAA6L,EAAAC,WACA,CAGA,KAAAnI,GACAvD,MAAAuD,QAEA3D,KAAA+L,cACA,IAAYC,EAAAC,EAAejM,KAAAnF,IAC3BmF,KAAAkM,iBAAArR,GACAmF,KAAAmM,iBAAAtR,GACAmF,KAAAoM,YAAAvR,EACAmF,KAAAqM,WAAAxR,KAGAmF,KAAA+L,cAAA,IAA6BO,EAAAC,EAAuBvM,KAAAU,aAAAV,KAAAwM,kBACpD,IC5DA,EAAA1J,EAAAE,IAAc,oBAAsByJ,EAAAvJ,EAAgB,CAAIC,SAAA,6BAuEjD,MAAAuJ,UAAwBrB,GAAe,EAAAvI,EAAA6J,KAAc,EAAAC,EAAAL,GAAaM,EAAAC,OACzE,aAAAtJ,GACA,yBACA,CAEA,mBAAAqB,GACA,OAAWgI,EAAAE,EAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoCf,CAEA,qBAAA/C,GACA,OAIAwB,UAAA,CACAlK,KAAAmK,QAMAC,UAAA,CACApK,KAAAmK,QAGA,CAGA,KAAA9H,GACAvD,MAAAuD,QAEA3D,KAAAgN,mBAAA,IAAkCC,EAAAC,EAAiBlN,MACnDA,KAAAgN,mBAAAG,YAAA,OACAnN,KAAAgN,mBAAAI,cAAApN,KAAAU,cACAV,KAAA+L,cAAA/L,KAAAgN,mBACA,GAGA,EAAAnJ,EAAAC,GAAmB4I,0CCrJnB,WAAA1J,IAAc,oBAAsBC,EAAAC,EAAgB,CACpDC,SAAA","sources":["webpack://@descope/web-components-ui/../components/descope-email-field/src/component/EmailFieldClass.js","webpack://@descope/web-components-ui/../components/descope-email-field/src/component/emailPattern.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/theme/lumo/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/src/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/email-field/src/vaadin-email-field.js","webpack://@descope/web-components-ui/../components/descope-email-field/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-new-email/src/component/descope-new-email-internal/componentName.js","webpack://@descope/web-components-ui/../components/descope-new-email/src/component/NewEmailClass.js","webpack://@descope/web-components-ui/../components/descope-new-email/src/component/descope-new-email-internal/NewEmailInternal.js","webpack://@descope/web-components-ui/../components/descope-new-email/src/component/descope-new-email-internal/index.js","webpack://@descope/web-components-ui/../components/descope-new-email/src/component/index.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/javascript/libs/webpack-extract-font-loader/node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { asciiPattern, unicodePattern } from './emailPattern';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '@descope-ui/common/theme-helpers';\n\nexport const componentName = getComponentName('email-field');\n\nconst defaultAutocomplete = 'username';\nconst defaultInputMode = 'email';\n\nconst customMixin = (superclass) =>\n class EmailFieldMixinClass extends superclass {\n // On by default - `accept-unicode=\"false\"` restores the pre-unicode field:\n // native `type=\"email\"` validation and the ASCII pattern.\n //\n // Read once, in `init`. Changing the attribute afterwards has no effect; it\n // is static configuration, which is how every consumer sets it.\n get acceptsUnicode() {\n return this.getAttribute('accept-unicode') !== 'false';\n }\n\n // On by default - `validate-format=\"false\"` drops the field's own format\n // check (the pattern and native `type=\"email\"`), for composites that check\n // the format themselves (descope-new-email). Read once, in `init`.\n get validatesFormat() {\n return this.getAttribute('validate-format') !== 'false';\n }\n\n init() {\n super.init?.();\n\n // we need to set the pattern on the base element because vaadin-email-field is overriding it\n this.baseElement.setAttribute('pattern', asciiPattern);\n\n if (!this.getAttribute('autocomplete')) {\n this.setAttribute('autocomplete', defaultAutocomplete);\n }\n\n this.createExternalInput();\n\n [this.inputElement, this.externalInput]\n .filter(Boolean)\n .forEach((input) => {\n input.addEventListener('change', this.stripSurroundingWhitespace);\n });\n\n if (this.acceptsUnicode) {\n this.enableUnicode();\n }\n\n if (!this.validatesFormat) {\n this.disableFormatValidation();\n }\n }\n\n enableUnicode() {\n this.baseElement.setAttribute('pattern', unicodePattern);\n this.useTextType();\n }\n\n disableFormatValidation() {\n // removed rather than left unset: vaadin-email-field has a default pattern\n this.baseElement.removeAttribute('pattern');\n this.useTextType();\n }\n\n useTextType() {\n // native `type=\"email\"` validation is ASCII only and sets typeMismatch\n // before `pattern` is consulted, so `text` is what lets the pattern decide.\n // Through vaadin's `_setType` because `type` is a readOnly property bound\n // to the inner input - assigning `input.type` is re-applied over.\n this.baseElement._setType('text');\n\n if (this.externalInput) {\n this.externalInput.type = 'text';\n }\n\n // `type=\"text\"` loses the email keyboard on mobile\n if (!this.getAttribute('inputmode')) {\n this.setAttribute('inputmode', defaultInputMode);\n }\n\n this.externalInput?.setAttribute('inputmode', defaultInputMode);\n }\n\n stripSurroundingWhitespace = (e) => {\n const trimmed = e.target.value.trim();\n if (trimmed === e.target.value) return;\n this.value = trimmed;\n\n // validity is cached and was computed against the untrimmed value\n this.inputElement.dispatchEvent(\n new Event('input', { bubbles: true, composed: true }),\n );\n };\n };\n\nconst {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\n selector: '[required]::part(required-indicator)::after',\n },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: {\n selector: () => '::slotted(input:disabled::placeholder)',\n },\n};\n\nexport const EmailFieldClass = compose(\n createStyleMixin({\n mappings: {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n {\n selector: () => ':host input:placeholder-shown',\n property: 'font-weight',\n },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: {\n ...errorMessage,\n property: 'padding-inline-start',\n },\n errorMessageIconRepeat: {\n ...errorMessage,\n property: 'background-repeat',\n },\n errorMessageIconPosition: {\n ...errorMessage,\n property: 'background-position',\n },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n },\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'email',\n inputName: 'email',\n autocompleteType: 'username',\n includeAttrs: ['disabled', 'readonly', 'pattern'],\n }),\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart'],\n useProxyTargets: true,\n }),\n componentNameValidationMixin,\n customMixin,\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-email-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${EmailFieldClass.cssVarList.inputOutlineWidth}) + var(${\n EmailFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n ${resetInputLabelPosition('vaadin-email-field')}\n\t\t\t${useHostExternalPadding(EmailFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-email-field', EmailFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-email-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n }),\n);\n","// Kept in its own module (with no imports) so it can be unit tested without\n// pulling in the whole component / vaadin dependency chain.\n\n// domain: dot-separated labels, each starting and ending with a letter or digit\n// (no empty labels, no leading/trailing hyphen), then the TLD\nexport const asciiPattern =\n \"^[\\\\w\\\\.\\\\%\\\\+\\\\-']+@(?:[A-Za-z0-9](?:[A-Za-z0-9\\\\-]*[A-Za-z0-9])?\\\\.)+[A-Za-z]{2,}$\";\n\nexport const unicodePattern =\n \"^[\\\\p{L}\\\\p{M}\\\\p{N}._%+'\\\\-]+@(?:[\\\\p{L}\\\\p{M}\\\\p{N}](?:[\\\\p{L}\\\\p{M}\\\\p{N}\\\\-]*[\\\\p{L}\\\\p{M}\\\\p{N}])?\\\\.)+[\\\\p{L}\\\\p{M}][\\\\p{L}\\\\p{M}\\\\p{N}\\\\-]+$\";\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst emailField = css`\n :host([dir='rtl']) [part='input-field'] ::slotted(input) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n`;\n\nregisterStyles('vaadin-email-field', [inputFieldShared, emailField], {\n moduleId: 'lumo-email-field',\n});\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\n// See https://github.com/vaadin/vaadin-text-field/issues/466\nexport const emailFieldStyles = css`\n :host([dir='rtl']) [part='input-field'] {\n direction: ltr;\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { emailFieldStyles } from './vaadin-email-field-styles.js';\n\nregisterStyles('vaadin-email-field', emailFieldStyles, { moduleId: 'vaadin-email-field-styles' });\n\n/**\n * `<vaadin-email-field>` is a Web Component for email field control in forms.\n *\n * ```html\n * <vaadin-email-field label=\"Email\"></vaadin-email-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends TextField\n */\nexport class EmailField extends TextField {\n static get is() {\n return 'vaadin-email-field';\n }\n\n constructor() {\n super();\n this._setType('email');\n this.pattern = '^([a-zA-Z0-9_\\\\.\\\\-+])+@[a-zA-Z0-9\\\\-.]+\\\\.[a-zA-Z0-9\\\\-]{2,}$';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n if (this.inputElement) {\n this.inputElement.autocapitalize = 'off';\n }\n }\n}\n\ndefineCustomElement(EmailField);\n","import '@vaadin/email-field';\nimport { componentName, EmailFieldClass } from './EmailFieldClass';\n\ncustomElements.define(componentName, EmailFieldClass);\n\nexport { EmailFieldClass, componentName };\n","import { getComponentName } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('new-email-internal');\n","import {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n createProxy,\n inputOverrideValidConstraintsMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n forwardAttrs,\n getComponentName,\n} from '@descope-ui/common/components-helpers';\nimport { useHostExternalPadding } from '@descope-ui/common/theme-helpers';\nimport { EmailFieldClass } from '@descope-ui/descope-email-field/class';\nimport { componentName as descopeInternalComponentName } from './descope-new-email-internal/componentName';\n\nexport const componentName = getComponentName('new-email');\n\nconst customMixin = (superclass) =>\n class NewEmailMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n const externalInputAttr = this.getAttribute('external-input') === 'true';\n const acceptUnicodeAttr = this.getAttribute('accept-unicode') !== 'false';\n\n template.innerHTML = `\n\t\t\t<${descopeInternalComponentName}\n\t\t\t\tname=\"new-email\"\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\tslot=\"input\"\n external-input=\"${externalInputAttr}\"\n accept-unicode=\"${acceptUnicodeAttr}\"\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(\n descopeInternalComponentName,\n );\n\n if (externalInputAttr) {\n this.initExternalInput();\n }\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'email-label',\n 'email-placeholder',\n 'confirm-label',\n 'confirm-placeholder',\n 'full-width',\n 'size',\n 'bordered',\n 'invalid',\n 'readonly',\n 'disabled',\n 'draggable',\n 'label-type',\n ],\n });\n }\n\n createSlottedExternalInput(node, slotName, name) {\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', name);\n externalInput.setAttribute('data-hidden-input', 'true');\n\n this.appendChild(externalInput);\n\n return externalInput;\n }\n\n initExternalInput() {\n // get descope input components\n this.emailInput = this.inputElement.querySelector('[data-id=\"email\"]');\n this.confirmInput = this.inputElement.querySelector(\n '[data-id=\"confirm\"]',\n );\n\n // create slots for external email input\n // distinct names, so password managers can tell the inputs apart\n this.createSlottedExternalInput(\n this.emailInput,\n 'external-email-input',\n this.getAttribute('name'),\n );\n const confirmExternalInput = this.createSlottedExternalInput(\n this.confirmInput,\n 'external-confirm-input',\n `${this.getAttribute('name')}-confirm`,\n );\n\n // keep the confirm value out of the submitted form data (descope-js\n // collects named inputs that don't have `data-exclude-field`)\n confirmExternalInput.setAttribute('data-exclude-field', 'true');\n }\n };\n\nconst {\n host,\n label,\n internalInputsWrapper,\n errorMessage,\n helperText,\n emailInput,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n internalInputsWrapper: { selector: 'descope-new-email-internal .wrapper' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n emailInput: { selector: 'descope-email-field' },\n};\n\nexport const NewEmailClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n {},\n {\n selector: EmailFieldClass.componentName,\n property: EmailFieldClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n inputValueFontWeight: {\n ...emailInput,\n property: EmailFieldClass.cssVarList.inputValueFontWeight,\n },\n inputPlaceholderFontWeight: {\n ...emailInput,\n property: EmailFieldClass.cssVarList.inputPlaceholderFontWeight,\n },\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },\n labelTextColor: { ...label, property: 'color' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: {\n ...errorMessage,\n property: 'padding-inline-start',\n },\n errorMessageIconRepeat: {\n ...errorMessage,\n property: 'background-repeat',\n },\n errorMessageIconPosition: {\n ...errorMessage,\n property: 'background-position',\n },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: [\n { ...host, property: 'direction' },\n { ...emailInput, property: EmailFieldClass.cssVarList.hostDirection },\n ],\n inputsRequiredIndicator: { ...host, property: 'content' },\n spaceBetweenInputs: { ...internalInputsWrapper, property: 'gap' },\n\n valueInputHeight: {\n ...emailInput,\n property: EmailFieldClass.cssVarList.valueInputHeight,\n },\n valueInputMarginBottom: {\n ...emailInput,\n property: EmailFieldClass.cssVarList.valueInputMarginBottom,\n },\n },\n }),\n draggableMixin,\n inputOverrideValidConstraintsMixin,\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(EmailFieldClass.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-email-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-email-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-email-field {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n }),\n);\n","import {\n injectStyle,\n observeAttributes,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '@descope-ui/common/base-classes';\nimport {\n asciiPattern,\n unicodePattern,\n} from '@descope-ui/descope-email-field/pattern';\nimport { NewEmailClass } from '../NewEmailClass';\nimport { componentName } from './componentName';\n\nconst emailAttrPrefixRegex = /^email-/;\nconst confirmAttrPrefixRegex = /^confirm-/;\n\nconst removeAttrPrefix = (attr, prefix) => attr.replace(prefix, '');\n\nconst emailInputAttrs = ['email-label', 'email-placeholder'];\nconst confirmInputAttrs = ['confirm-label', 'confirm-placeholder'];\nconst commonAttrs = [\n 'disabled',\n 'bordered',\n 'size',\n 'full-width',\n 'invalid',\n 'readonly',\n 'draggable',\n 'label-type',\n];\n\nconst inputRelatedAttrs = [].concat(\n commonAttrs,\n emailInputAttrs,\n confirmInputAttrs,\n);\n\nconst BaseInputClass = createBaseInputClass({\n componentName,\n baseSelector: 'div',\n});\n\nclass NewEmailInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(\n BaseInputClass.observedAttributes || [],\n inputRelatedAttrs,\n );\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.emailInput?.value || '';\n }\n\n set value(val) {\n if (val === this.value) return;\n this.emailInput.value = val;\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n\n // the inner email fields don't validate the format (`validate-format=\"false\"`),\n // so they never show their own message; the root shows the only one.\n // a bad format is a patternMismatch, as in email-field\n if (this.value && !this.emailFormat.test(this.value)) {\n return { patternMismatch: true };\n }\n\n if (this.value !== (this.confirmInput?.value || '')) {\n return { typeMismatch: 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.emailInput.focus();\n }\n });\n super.init?.();\n this.renderInputs();\n }\n\n renderInputs() {\n const hasExternalInput = this.getAttribute('external-input') === 'true';\n // email-field reads `accept-unicode` only in init, so it must be in the template\n const acceptUnicode = this.getAttribute('accept-unicode') !== 'false';\n this.emailFormat = acceptUnicode\n ? new RegExp(unicodePattern, 'u')\n : new RegExp(asciiPattern);\n // confirm is `autocomplete=\"off\"`: autofilling it would defeat the typo check\n const template = `\n <descope-email-field\n data-id=\"email\"\n external-input=\"${hasExternalInput}\"\n accept-unicode=\"${acceptUnicode}\"\n validate-format=\"false\"\n ></descope-email-field>\n <descope-email-field\n data-id=\"confirm\"\n external-input=\"${hasExternalInput}\"\n accept-unicode=\"${acceptUnicode}\"\n validate-format=\"false\"\n autocomplete=\"off\"\n ></descope-email-field>\n `;\n\n this.wrapperEle.innerHTML = template;\n\n this.emailInput = this.querySelector('[data-id=\"email\"]');\n this.confirmInput = this.querySelector('[data-id=\"confirm\"]');\n\n this.inputs = [this.emailInput, this.confirmInput];\n\n this.initInputs();\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(${NewEmailClass.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 (\n this.hasAttribute('invalid') && this.getAttribute('invalid') !== 'false'\n );\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 if (!input) return;\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 // eslint-disable-next-line class-methods-use-this\n toggleBooleanAttribute(ele, name, value) {\n if (value === null) ele?.removeAttribute(name);\n else ele?.setAttribute(name, value);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (commonAttrs.includes(attrName)) {\n this.inputs?.forEach((input) =>\n this.toggleBooleanAttribute(input, attrName, newValue),\n );\n } else if (emailInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.emailInput,\n removeAttrPrefix(attrName, emailAttrPrefixRegex),\n newValue,\n );\n } else if (confirmInputAttrs.includes(attrName)) {\n this.toggleBooleanAttribute(\n this.confirmInput,\n removeAttrPrefix(attrName, confirmAttrPrefixRegex),\n newValue,\n );\n }\n }\n}\n\nexport default NewEmailInternal;\n","import NewEmailInternal from './NewEmailInternal';\nimport { componentName } from './componentName';\n\ncustomElements.define(componentName, NewEmailInternal);\n","import '@vaadin/text-field';\nimport '@descope-ui/descope-email-field';\nimport './descope-new-email-internal';\n\nimport { componentName, NewEmailClass } from './NewEmailClass';\n\ncustomElements.define(componentName, NewEmailClass);\n\nexport { NewEmailClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n"],"names":["componentName","_descope_ui_common_components_helpers__WEBPACK_IMPORTED_MODULE_3__","xE","defaultInputMode","host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","EmailFieldClass","_descope_ui_common_utils__WEBPACK_IMPORTED_MODULE_1__","Zz","_descope_ui_common_components_mixins__WEBPACK_IMPORTED_MODULE_0__","RF","mappings","fontSize","fontFamily","labelFontSize","property","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","labelTextColor","hostWidth","hostMinWidth","hostDirection","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","inputOutlineWidth","inputOutlineOffset","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity","VO","RV","inputType","inputName","autocompleteType","includeAttrs","OZ","proxyProps","useProxyTargets","tQ","superclass","acceptsUnicode","this","getAttribute","validatesFormat","init","super","baseElement","setAttribute","_emailPattern__WEBPACK_IMPORTED_MODULE_2__","a","createExternalInput","inputElement","filter","Boolean","forEach","addEventListener","stripSurroundingWhitespace","enableUnicode","disableFormatValidation","g","useTextType","removeAttribute","_setType","type","e","trimmed","target","value","trim","dispatchEvent","Event","bubbles","composed","tz","slots","wrappedEleName","style","cssVarList","_descope_ui_common_theme_helpers__WEBPACK_IMPORTED_MODULE_4__","$J","cy","LJ","Kl","excludeAttrsSync","asciiPattern","unicodePattern","emailField","vaadin_themable_mixin","AH","SF","input_field_shared","k","moduleId","emailFieldStyles","EmailField","src_vaadin_text_field","A","is","constructor","pattern","ready","autocapitalize","src_define","X","customElements","define","T","v","componentsHelpers","NewEmailClass_componentName","internalInputsWrapper","emailInput","NewEmailClass","utils","componentsMixins","inputsRequiredIndicator","spaceBetweenInputs","Yg","template","document","createElement","externalInputAttr","acceptUnicodeAttr","innerHTML","appendChild","content","cloneNode","shadowRoot","querySelector","initExternalInput","EA","createSlottedExternalInput","node","slotName","name","slotEle","targetSlot","confirmInput","themeHelpers","emailAttrPrefixRegex","confirmAttrPrefixRegex","removeAttrPrefix","attr","prefix","replace","emailInputAttrs","confirmInputAttrs","commonAttrs","inputRelatedAttrs","concat","BaseInputClass","baseClasses","yc","baseSelector","observedAttributes","wrapperEle","val","getValidity","isRequired","valueMissing","emailFormat","test","patternMismatch","typeMismatch","isTrusted","focus","renderInputs","hasExternalInput","acceptUnicode","RegExp","emailPattern","inputs","initInputs","handleIndicatorStyle","fz","isInvalid","hasAttribute","handleInputsInvalidAttribute","mx","changedAttributes","includes","inputInvalidValue","rootInvalidValue","handleFocusEventsDispatching","toggleBooleanAttribute","ele","attributeChangedCallback","attrName","oldValue","newValue","InputController","_vaadin_component_base_src_slot_controller_js__WEBPACK_IMPORTED_MODULE_0__","r","callback","initializer","id","defaultId","useUniqueId","InputFieldMixin","_input_control_mixin_js__WEBPACK_IMPORTED_MODULE_0__","R","properties","autocomplete","String","autocorrect","reflectToAttribute","delegateAttrs","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","hasFocus","validate","_onInput","event","invalid","_valueChanged","undefined","TextFieldMixin","superClass","input_field_mixin","maxlength","Number","minlength","constraints","clearElement","$","clearButton","addController","input_controller","f","_setInputElement","_setFocusElement","stateTarget","ariaTarget","labelled_input_controller","q","_labelController","input_field_shared_styles","TextField","cp","element_mixin","polymer_element","Pu","qy","_tooltipController","tooltip_controller","I","setPosition","setAriaTarget"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8603],{3393(t,e,i){i.d(e,{y:()=>n});var r=i(9696),s=i(79365),o=i(81365);const n=(...t)=>(0,r.Zz)(s.XX,s._$,s.yF,s.jd)((0,o.q)(...t))},87455(t,e,i){i.d(e,{M:()=>m,T:()=>d});var r=i(97810),s=i(9696),o=i(79365),n=i(8877),a=i(5810),l=i(73551),p=i(10777);const d=(0,r.xE)("new-password"),c=p.w.cssVarList,{host:h,label:u,internalInputsWrapper:g,errorMessage:b,helperText:y,passwordInput:w,policyPreview:v}={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"}},m=(0,s.Zz)((0,o.RF)({mappings:{fontSize:[h,{},{selector:a.M.componentName,property:a.M.cssVarList.fontSize}],fontFamily:[u,b,y],labelFontSize:{...u,property:"font-size"},labelFontWeight:{...u,property:"font-weight"},inputValueFontWeight:{...w,property:a.M.cssVarList.inputValueFontWeight},inputPlaceholderFontWeight:{...w,property:a.M.cssVarList.inputPlaceholderFontWeight},helperTextFontWeight:{...y,property:"font-weight"},errorMessageFontWeight:{...b,property:"font-weight"},labelTextColor:{...u,property:"color"},errorMessageTextColor:{...b,property:"color"},errorMessageIcon:{...b,property:"background-image"},errorMessageIconSize:{...b,property:"background-size"},errorMessageIconPadding:{...b,property:"padding-inline-start"},errorMessageIconRepeat:{...b,property:"background-repeat"},errorMessageIconPosition:{...b,property:"background-position"},errorMessageFontSize:{...b,property:"font-size"},hostWidth:{...h,property:"width"},hostMinWidth:{...h,property:"min-width"},hostDirection:[{...h,property:"direction"},{...w,property:a.M.cssVarList.hostDirection}],inputsRequiredIndicator:{...h,property:"content"},spaceBetweenInputs:{...g,property:"gap"},policyPreviewBackgroundColor:{...v,property:c.backgroundColor},policyPreviewPadding:{...v,property:c.padding},valueInputHeight:{...w,property:a.M.cssVarList.valueInputHeight},valueInputMarginBottom:{...w,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<${n.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 </${n.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(n.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","disabled","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email","label-type","manual-visibility-toggle"]})}createSlottedExternalInput(t,e){const i=t.querySelector("input"),r=document.createElement("slot"),s=i.getAttribute("slot");r.setAttribute("name",e),r.setAttribute("slot",s),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","style"],componentName:d}))},8877(t,e,i){i.d(e,{T:()=>r});const r=(0,i(97810).xE)("new-password-internal")},78844(t,e,i){var r=i(25964),s=i(3393),o=i(97810),n=i(87455),a=i(8877);const l=/^password-/,p=/^confirm-/,d=(t,e)=>t.replace(e,""),c=["password-label","password-placeholder"],h=["confirm-label","confirm-placeholder"],u=["has-validation","policy-label","available-policies","active-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email","manual-visibility-toggle"],g=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type","manual-visibility-toggle"],b=[].concat(g,c,h,u),y=(0,s.y)({componentName:a.T,baseSelector:"div"});customElements.define(a.T,class extends y{static get observedAttributes(){return[].concat(y.observedAttributes||[],b)}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:u,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(${n.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):g.includes(t)?this.inputs.forEach(e=>this.toggleBooleanAttribute(e,t,i)):c.includes(t)?this.toggleBooleanAttribute(this.passwordInput,d(t,l),i):h.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,d(t,p),i),"active-policies"===t&&this.togglePasswordStrength())}})},5810(t,e,i){i.d(e,{M:()=>m,T:()=>l});var r=i(79365),s=i(9696),o=i(97810),n=i(16616),a=i(73551);const l=(0,o.xE)("password"),{host:p,inputField:d,inputElement:c,inputElementPlaceholder:h,revealButtonContainer:u,revealButtonIcon:g,label:b,requiredIndicator:y,errorMessage:w,helperText:v}={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)"}},m=(0,s.Zz)((0,r.RF)({mappings:{hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},hostDirection:{...p,property:"direction"},fontSize:[{},p],fontFamily:[b,d,w,v],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:{...b,property:"font-size"},labelFontWeight:{...b,property:"font-weight"},inputValueFontWeight:[{...c,property:"font-weight"},{selector:()=>":host ::slotted(input)",property:"font-weight"}],inputPlaceholderFontWeight:[{...h,property:"font-weight"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"font-weight"}],helperTextFontWeight:{...v,property:"font-weight"},errorMessageFontWeight:{...w,property:"font-weight"},labelTextColor:[{...b,property:"color"},{...b,property:"-webkit-text-fill-color"},{...y,property:"color"},{...y,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...y,property:"content"},errorMessageTextColor:{...w,property:"color"},errorMessageIcon:{...w,property:"background-image"},errorMessageIconSize:{...w,property:"background-size"},errorMessageIconPadding:{...w,property:"padding-inline-start"},errorMessageIconRepeat:{...w,property:"background-repeat"},errorMessageIconPosition:{...w,property:"background-position"},errorMessageFontSize:{...w,property:"font-size"},inputPlaceholderTextColor:[{...h,property:"color"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"color"}],inputValueTextColor:[{...c,property:"color"},{selector:()=>":host ::slotted(input)",property:"color"}],revealButtonOffset:[{...u,property:"margin-right"},{...u,property:"margin-left"}],revealButtonSize:{...u,property:"font-size"},revealButtonColor:{...g,property:"color"},labelPosition:{...b,property:"position"},labelTopPosition:{...b,property:"top"},labelHorizontalPosition:[{...b,property:"left"},{...b,property:"right"}],inputTransformY:{...b,property:"transform"},inputTransition:{...b,property:"transition"},marginInlineStart:{...b,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,n.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(),this.stopRevealButtonEnterPropagation()}stopRevealButtonEnterPropagation(){this.revealButton?.addEventListener("keydown",t=>{"Enter"===t.key&&t.stopPropagation()})}get revealButton(){return this.baseElement.querySelector("vaadin-password-field-button")}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.revealButton?.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)(m.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(${m.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","style"],componentName:l}))},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 s=e=>{i.setAttribute("type",r),t.removeAttribute("inert"),this.removeEventListener("mouseup",s),this.removeEventListener("dragend",s)};this.addEventListener("dragend",s,{once:!0}),this.addEventListener("mouseup",s,{once:!0})}})}}},10777(t,e,i){i.d(e,{T:()=>p,w:()=>v});var r=i(25964),s=i(79365),o=i(81365),n=i(9696),a=i(97810),l=i(88191);const p=(0,a.xE)("policy-validation"),d=["data","active-policies","overrides","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-actual-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email"],c=["label","value",...d];class h extends((0,o.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,r.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}})}if("data-password-policy-value-disallowedchars"===t)if(i)this.#i={...this.#i,disallowedchars:{...this.#i?.disallowedchars,value:i}};else if(this.#i?.disallowedchars){const{disallowedchars:t,...e}=this.#i;this.#i=e}if("data-password-policy-value-email"===t)if(i)this.#i={...this.#i,disallowemail:{...this.#i?.disallowemail,expected:i}};else if(this.#i?.disallowemail){const{disallowemail:t,...e}=this.#i;this.#i=e}}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:s,message:o,data:n,compare:a}=r,p="string"==typeof a?a.toUpperCase():a;if(!s&&!a||!o)return e;const d={message:(0,l.z)(o,n),id:i};if(s){const t=new RegExp((0,l.z)(s,n));d.valid=t.test(this.value)}else if("STR_NEQ_CI"===p){const t=(n?.expected??"").toLowerCase(),e=(this.value??"").toLowerCase();if(t&&e){const i=t.indexOf("@"),r=i>0?t.slice(0,i):t;d.valid=e!==t&&e!==r}else d.valid=!0}else a&&(d.valid=this.compareValues(p,n?.expected??-1,n?.actual??-1));return e.push(d),e},[])}get isValid(){return!this.validate().some(({valid:t})=>!1===t)}buildValidationItem({valid:t,message:e}){const i=this.value?t:"none",r=document.createElement("li");r.className="item",r.dataset.valid=i;const s=document.createElement("span");return s.className="message",s.textContent=e??"",r.appendChild(s),r}renderItems(t,e){t&&e.length&&this.list.replaceChildren(...this.validate().map(this.buildValidationItem.bind(this)))}updateLabel(t){t?(this.label.textContent=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.textContent="")}}const{host:u,item:g,symbolDefault:b,symbolSuccess:y,symbolError:w}={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'}},v=(0,n.Zz)((0,s.RF)({componentNameOverride:(0,a.xE)("input-wrapper")}),(0,s.RF)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...u,property:"border-width"},borderStyle:{...u,property:"border-style"},borderColor:{...u,property:"border-color"},borderRadius:{...u,property:"border-radius"},backgroundColor:{...u,property:"background-color"},textColor:{property:"color"},labelMargin:{...u,property:"gap"},itemsSpacing:{...g,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...w,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...w,property:"content"}}}),s.VO,s.tQ)(h)},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([[8603],{3393(t,e,i){i.d(e,{y:()=>n});var r=i(9696),s=i(79365),o=i(81365);const n=(...t)=>(0,r.Zz)(s.XX,s._$,s.yF,s.jd)((0,o.q)(...t))},87455(t,e,i){i.d(e,{M:()=>m,T:()=>d});var r=i(97810),s=i(9696),o=i(79365),n=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:g,errorMessage:b,helperText:y,passwordInput:w,policyPreview:v}={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"}},m=(0,s.Zz)((0,o.RF)({mappings:{fontSize:[u,{},{selector:a.M.componentName,property:a.M.cssVarList.fontSize}],fontFamily:[h,b,y],labelFontSize:{...h,property:"font-size"},labelFontWeight:{...h,property:"font-weight"},inputValueFontWeight:{...w,property:a.M.cssVarList.inputValueFontWeight},inputPlaceholderFontWeight:{...w,property:a.M.cssVarList.inputPlaceholderFontWeight},helperTextFontWeight:{...y,property:"font-weight"},errorMessageFontWeight:{...b,property:"font-weight"},labelTextColor:{...h,property:"color"},errorMessageTextColor:{...b,property:"color"},errorMessageIcon:{...b,property:"background-image"},errorMessageIconSize:{...b,property:"background-size"},errorMessageIconPadding:{...b,property:"padding-inline-start"},errorMessageIconRepeat:{...b,property:"background-repeat"},errorMessageIconPosition:{...b,property:"background-position"},errorMessageFontSize:{...b,property:"font-size"},hostWidth:{...u,property:"width"},hostMinWidth:{...u,property:"min-width"},hostDirection:[{...u,property:"direction"},{...w,property:a.M.cssVarList.hostDirection}],inputsRequiredIndicator:{...u,property:"content"},spaceBetweenInputs:{...g,property:"gap"},policyPreviewBackgroundColor:{...v,property:c.backgroundColor},policyPreviewPadding:{...v,property:c.padding},valueInputHeight:{...w,property:a.M.cssVarList.valueInputHeight},valueInputMarginBottom:{...w,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<${n.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 </${n.T}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(n.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","disabled","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email","data-password-policy-value-reuse","label-type","manual-visibility-toggle"]})}createSlottedExternalInput(t,e){const i=t.querySelector("input"),r=document.createElement("slot"),s=i.getAttribute("slot");r.setAttribute("name",e),r.setAttribute("slot",s),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","style"],componentName:d}))},8877(t,e,i){i.d(e,{T:()=>r});const r=(0,i(97810).xE)("new-password-internal")},78844(t,e,i){var r=i(25964),s=i(3393),o=i(97810),n=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","data-password-policy-value-disallowedchars","data-password-policy-value-email","data-password-policy-value-reuse","manual-visibility-toggle"],g=["has-confirm","disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete","label-type","manual-visibility-toggle"],b=[].concat(g,c,u,h),y=(0,s.y)({componentName:a.T,baseSelector:"div"});customElements.define(a.T,class extends y{static get observedAttributes(){return[].concat(y.observedAttributes||[],b)}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(${n.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):g.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())}})},5810(t,e,i){i.d(e,{M:()=>m,T:()=>l});var r=i(79365),s=i(9696),o=i(97810),n=i(16616),a=i(73551);const l=(0,o.xE)("password"),{host:p,inputField:d,inputElement:c,inputElementPlaceholder:u,revealButtonContainer:h,revealButtonIcon:g,label:b,requiredIndicator:y,errorMessage:w,helperText:v}={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)"}},m=(0,s.Zz)((0,r.RF)({mappings:{hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},hostDirection:{...p,property:"direction"},fontSize:[{},p],fontFamily:[b,d,w,v],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:{...b,property:"font-size"},labelFontWeight:{...b,property:"font-weight"},inputValueFontWeight:[{...c,property:"font-weight"},{selector:()=>":host ::slotted(input)",property:"font-weight"}],inputPlaceholderFontWeight:[{...u,property:"font-weight"},{selector:()=>":host ::slotted(input:placeholder-shown)",property:"font-weight"}],helperTextFontWeight:{...v,property:"font-weight"},errorMessageFontWeight:{...w,property:"font-weight"},labelTextColor:[{...b,property:"color"},{...b,property:"-webkit-text-fill-color"},{...y,property:"color"},{...y,property:"-webkit-text-fill-color"}],labelRequiredIndicator:{...y,property:"content"},errorMessageTextColor:{...w,property:"color"},errorMessageIcon:{...w,property:"background-image"},errorMessageIconSize:{...w,property:"background-size"},errorMessageIconPadding:{...w,property:"padding-inline-start"},errorMessageIconRepeat:{...w,property:"background-repeat"},errorMessageIconPosition:{...w,property:"background-position"},errorMessageFontSize:{...w,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:{...g,property:"color"},labelPosition:{...b,property:"position"},labelTopPosition:{...b,property:"top"},labelHorizontalPosition:[{...b,property:"left"},{...b,property:"right"}],inputTransformY:{...b,property:"transform"},inputTransition:{...b,property:"transition"},marginInlineStart:{...b,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,n.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(),this.stopRevealButtonEnterPropagation()}stopRevealButtonEnterPropagation(){this.revealButton?.addEventListener("keydown",t=>{"Enter"===t.key&&t.stopPropagation()})}get revealButton(){return this.baseElement.querySelector("vaadin-password-field-button")}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.revealButton?.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)(m.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(${m.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","style"],componentName:l}))},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 s=e=>{i.setAttribute("type",r),t.removeAttribute("inert"),this.removeEventListener("mouseup",s),this.removeEventListener("dragend",s)};this.addEventListener("dragend",s,{once:!0}),this.addEventListener("mouseup",s,{once:!0})}})}}},10777(t,e,i){i.d(e,{T:()=>p,w:()=>v});var r=i(25964),s=i(79365),o=i(81365),n=i(9696),a=i(97810),l=i(88191);const p=(0,a.xE)("policy-validation"),d=["data","active-policies","overrides","data-password-policy-value-minlength","data-password-policy-value-passwordstrength","data-password-policy-actual-passwordstrength","data-password-policy-value-disallowedchars","data-password-policy-value-email","data-password-policy-value-reuse"],c=["label","value",...d];class u extends((0,o.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,r.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-reuse"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,reuse:{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}})}if("data-password-policy-value-disallowedchars"===t)if(i)this.#i={...this.#i,disallowedchars:{...this.#i?.disallowedchars,value:i}};else if(this.#i?.disallowedchars){const{disallowedchars:t,...e}=this.#i;this.#i=e}if("data-password-policy-value-email"===t)if(i)this.#i={...this.#i,disallowemail:{...this.#i?.disallowemail,expected:i}};else if(this.#i?.disallowemail){const{disallowemail:t,...e}=this.#i;this.#i=e}}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:s,message:o,data:n,compare:a,info:p}=r,d="string"==typeof a?a.toUpperCase():a;if(!s&&!a&&!p||!o)return e;const c={message:(0,l.z)(o,n),id:i};if(p)c.info=!0;else if(s){const t=new RegExp((0,l.z)(s,n));c.valid=t.test(this.value)}else if("STR_NEQ_CI"===d){const t=(n?.expected??"").toLowerCase(),e=(this.value??"").toLowerCase();if(t&&e){const i=t.indexOf("@"),r=i>0?t.slice(0,i):t;c.valid=e!==t&&e!==r}else c.valid=!0}else a&&(c.valid=this.compareValues(d,n?.expected??-1,n?.actual??-1));return e.push(c),e},[]).sort((t,e)=>Number(!!t.info)-Number(!!e.info))}get isValid(){return!this.validate().some(({valid:t})=>!1===t)}buildValidationItem({valid:t,message:e,info:i}){const r=!this.value||i?"none":t,s=document.createElement("li");s.className="item",s.dataset.valid=r;const o=document.createElement("span");return o.className="message",o.textContent=e??"",s.appendChild(o),s}renderItems(t,e){t&&e.length&&this.list.replaceChildren(...this.validate().map(this.buildValidationItem.bind(this)))}updateLabel(t){t?(this.label.textContent=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.textContent="")}}const{host:h,item:g,symbolDefault:b,symbolSuccess:y,symbolError:w}={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'}},v=(0,n.Zz)((0,s.RF)({componentNameOverride:(0,a.xE)("input-wrapper")}),(0,s.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:{...g,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...w,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...w,property:"content"}}}),s.VO,s.tQ)(u)},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-descope-new-password-internal-index-js.js.map
|