@descope/web-components-ui 3.12.1 → 3.13.1
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 +4121 -2426
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3165 -1468
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/6618.js +591 -0
- package/dist/umd/{7387.js.LICENSE.txt → 6618.js.LICENSE.txt} +6 -0
- package/dist/umd/6618.js.map +1 -0
- package/dist/umd/8350.js +2 -0
- package/dist/umd/8350.js.map +1 -0
- package/dist/umd/9265.js +2 -0
- package/dist/umd/9265.js.map +1 -0
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +449 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js.map +1 -1
- package/dist/umd/descope-email-field-index-js.js +2 -2
- package/dist/umd/descope-email-field-index-js.js.map +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-month-day-field-picker.js +114 -0
- package/dist/umd/descope-month-day-field-picker.js.LICENSE.txt +11 -0
- package/dist/umd/descope-month-day-field-picker.js.map +1 -0
- package/dist/umd/descope-month-day-field.js +2 -0
- package/dist/umd/descope-month-day-field.js.map +1 -0
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-text-field.js +38 -0
- package/dist/umd/descope-text-field.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
- package/package.json +39 -36
- package/src/components/descope-date-field/DateFieldClass.js +1 -1
- package/src/components/descope-date-field/index.js +1 -1
- package/src/components/descope-email-field/EmailFieldClass.js +1 -1
- package/src/components/descope-new-password/index.js +1 -1
- package/src/components/descope-number-field/NumberFieldClass.js +1 -1
- package/src/components/descope-passcode/PasscodeClass.js +1 -1
- package/src/components/descope-passcode/index.js +1 -1
- package/src/components/descope-radio-group/RadioGroupClass.js +1 -1
- package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +1 -1
- package/src/components/descope-security-questions-setup/index.js +1 -1
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +1 -1
- package/src/components/descope-security-questions-verify/index.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
- package/src/components/mapping-fields/descope-saml-group-mappings/index.js +1 -1
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -1
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/index.js +1 -1
- package/src/components/phone-fields/descope-phone-field/index.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/index.js +1 -1
- package/src/index.cjs.js +2 -2
- package/src/index.js +0 -1
- package/src/theme/components/index.js +5 -1
- package/stories/descope-text-field.stories.js +1 -1
- package/dist/umd/3685.js +0 -2
- package/dist/umd/3685.js.map +0 -1
- package/dist/umd/4518.js +0 -450
- package/dist/umd/4518.js.map +0 -1
- package/dist/umd/7387.js +0 -144
- package/dist/umd/7387.js.map +0 -1
- package/dist/umd/descope-text-field-index-js.js +0 -38
- package/dist/umd/descope-text-field-index-js.js.map +0 -1
- package/src/components/descope-text-field/TextFieldClass.js +0 -142
- package/src/components/descope-text-field/index.js +0 -9
- package/src/components/descope-text-field/textFieldMappings.js +0 -169
- package/src/theme/components/textField.js +0 -71
- /package/dist/umd/{4518.js.LICENSE.txt → descope-date-field-descope-calendar-index-js.js.LICENSE.txt} +0 -0
- /package/dist/umd/{descope-text-field-index-js.js.LICENSE.txt → descope-text-field.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-radio-group-index-js.js","mappings":"yPASO,MAAMA,GAAgB,QAAiB,gBAoCjCC,GAAmB,SAC9B,QAAiB,CACfC,SAAU,CACRC,OAAQ,CAAC,CAAC,EAAG,CAAEC,SAAU,UACzBC,SAAU,CAAC,CAAED,SAAU,SAAW,CAAC,GACnCE,eAAgB,CAAEF,SAA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IAAM,gCAAiCG,SAAU,SAC7D,IAAKsG,EAAqBtG,SAAU,SACpC,IAAK0F,EAAa1F,SAAU,SAC5B,IAAKiG,EAAqBjG,SAAU,2BACpC,IAAKuG,EAA6BvG,SAAU,4BAG9C2I,cAAe,IAAKhG,EAAO3C,SAAU,YACrC4I,iBAAkB,IAAKjG,EAAO3C,SAAU,OACxC6I,wBAAyB,CACvB,IAAKlG,EAAO3C,SAAU,QACtB,IAAK2C,EAAO3C,SAAU,UAExB8I,gBAAiB,IAAKnG,EAAO3C,SAAU,aACvC+I,gBAAiB,IAAKpG,EAAO3C,SAAU,cACvCgJ,kBAAmB,IAAKrG,EAAO3C,SAAU,uBACzCiJ,mBAAoB,CAClB,CAAEpJ,SAAU,4BAA6BG,SAAU,WACnD,IAAKsG,EAAqBtG,SAAU,YAEtCkJ,uBAAwB,CACtB,IAAKtD,EAAY5F,SAAU,eAC3B,IAAKoG,EAAepG,SAAU,gBAEhCmJ,iBAAkB,CAChB,IAAKtD,EAAO7F,SAAU,UACtB,IAAKoG,EAAepG,SAAU,WAEhCoJ,uBAAwB,CACtB,IAAKvD,EAAO7F,SAAU,iBACtB,IAAKoG,EAAepG,SAAU,kBAGhCqJ,gBAAiB,CACf,IAAKlD,EAAWnG,SAAU,gBAC1B,IAAKmG,EAAWnG,SAAU,gBAE5BsJ,cAAe,IAAKnD,EAAWnG,SAAU,aACzCuJ,eAAgB,IAAKpD,EAAWnG,SAAU,SAC1CwJ,kBAAmB,CACjB,IAAK3D,EAAO7F,SAAU,yBACtB,IAAK6F,EAAO7F,SAAU,iBACtB,IAAKoG,EAAepG,SAAU,yBAC9B,IAAKoG,EAAepG,SAAU,kB","sources":["webpack://@descope/web-components-ui/./src/components/descope-radio-group/RadioButtonClass.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/RadioGroupClass.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js"],"sourcesContent":["import { compose } from '../../helpers';\nimport { getComponentName, observeChildren } from '../../helpers/componentHelpers';\nimport {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n proxyInputMixin,\n} from '../../mixins';\n\nexport const componentName = getComponentName('radio-button');\n\nconst customMixin = (superclass) =>\n class CustomMixin extends superclass {\n constructor() {\n super();\n\n this.baseElement.checkValidity = () => {};\n }\n\n init() {\n // we are forwarding vaadin checked-changed event\n this.baseElement.addEventListener('checked-changed', (e) => {\n this.dispatchEvent(\n new CustomEvent(\n 'checked-changed',\n { detail: e.detail },\n { bubbles: true, composed: true }\n )\n );\n });\n\n super.init?.();\n\n observeChildren(this, this.renderLabel.bind(this));\n }\n\n renderLabel() {\n this.baseElement.setAttribute('label', this.textContent);\n }\n\n get value() {\n return this.getAttribute('value');\n }\n };\n\nexport const RadioButtonClass = compose(\n createStyleMixin({\n mappings: {\n cursor: [{}, { selector: 'label' }],\n fontSize: [{ selector: 'label' }, {}],\n labelTextColor: { selector: 'label', property: 'color' },\n fontFamily: { selector: 'label' },\n radioSize: [\n { selector: '::part(radio)', property: 'height' },\n { selector: '::part(radio)', property: 'width' },\n ],\n radioBackgroundColor: { selector: '::part(radio)', property: 'background-color' },\n radioMargin: { selector: '::part(radio)', property: 'margin' },\n radioCheckedSize: { selector: '::part(radio)::after', property: 'border-width' },\n radioCheckedColor: { selector: '::part(radio)::after', property: 'border-color' },\n radioBorderColor: { selector: '::part(radio)', property: 'border-color', fallback: 'none' },\n radioBorderWidth: { selector: '::part(radio)', property: 'border-width', fallback: 0 },\n radioBorderStyle: { selector: '::part(radio)', property: 'border-style', fallback: 'solid' },\n },\n }),\n proxyInputMixin({ proxyProps: ['setSelectionRange'] }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [''],\n wrappedEleName: 'vaadin-radio-button',\n excludeAttrsSync: ['tabindex', 'data', 'style'],\n includeForwardProps: ['checked', 'name', 'disabled'],\n componentName,\n })\n);\n","import { compose } from '../../helpers';\nimport {\n forwardAttrs,\n getComponentName,\n observeAttributes,\n observeChildren,\n} from '../../helpers/componentHelpers';\nimport { resetInputLabelPosition } from '../../helpers/themeHelpers/resetHelpers';\nimport {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n proxyInputMixin,\n} from '../../mixins';\nimport textFieldMappings from '../descope-text-field/textFieldMappings';\nimport { componentName as childNodeName, RadioButtonClass } from './RadioButtonClass';\n\nexport const componentName = getComponentName('radio-group');\n\nconst RadioGroupMixin = (superclass) =>\n class RadioGroupMixinClass extends superclass {\n #renderItem = ({ value, label }) =>\n `<descope-radio-button value=\"${value}\">${label}</descope-radio-button>`;\n\n #data;\n\n constructor() {\n super();\n\n // we are overriding vaadin children getter so it will run on our custom elements\n Object.defineProperty(this.baseElement, 'children', {\n get: () => this.querySelectorAll(childNodeName),\n });\n\n // we are overriding vaadin __filterRadioButtons so it will run on our custom elements\n this.baseElement.__filterRadioButtons = (nodes) =>\n nodes.filter((node) => node.localName === childNodeName);\n\n // vaadin radio group missing some input properties\n this.baseElement.setCustomValidity = () => {};\n }\n\n get items() {\n return this.shadowRoot.querySelector('slot').assignedElements();\n }\n\n get size() {\n return this.getAttribute('size');\n }\n\n get data() {\n if (this.#data) return this.#data;\n\n const dataAttr = this.getAttribute('data');\n\n if (dataAttr) {\n try {\n const data = JSON.parse(dataAttr);\n if (this.isValidDataType(data)) {\n return data;\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"data\" - ', e.message);\n }\n }\n\n return [];\n }\n\n set data(data) {\n if (this.isValidDataType(data)) {\n this.#data = data;\n this.renderItems();\n }\n }\n\n get defaultValue() {\n return this.getAttribute('default-value');\n }\n\n isValidDataType(data) {\n const isValid = Array.isArray(data);\n if (!isValid) {\n // eslint-disable-next-line no-console\n console.error('data must be an array, received:', data);\n }\n\n return isValid;\n }\n\n getItemsTemplate() {\n return this.data?.reduce?.((acc, item) => acc + (this.#renderItem?.(item || {}) || ''), '');\n }\n\n renderItems() {\n const template = this.getItemsTemplate();\n if (template) this.innerHTML = template;\n }\n\n init() {\n super.init?.();\n\n this.inputElement = this.baseElement;\n\n this.renderItems();\n\n observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });\n\n Object.defineProperty(this.baseElement, 'validity', {\n get: () => ({ valueMissing: !this.baseElement.checkValidity() }),\n });\n\n forwardAttrs(this, this.baseElement, {\n includeAttrs: ['layout'],\n mapAttrs: { layout: 'theme' },\n });\n\n setTimeout(() => {\n if (this.defaultValue) {\n this.value = this.defaultValue;\n }\n });\n\n // we want new items to get the size\n observeChildren(this, ({ addedNodes }) => {\n addedNodes.forEach((node) => {\n node.setAttribute('size', this.size);\n });\n });\n\n observeAttributes(\n this,\n () => {\n this.items.forEach((item) => {\n item.setAttribute('size', this.size);\n });\n },\n {\n includeAttrs: ['size'],\n }\n );\n }\n };\n\nexport const RadioGroupClass = compose(\n createStyleMixin({\n mappings: {\n ...textFieldMappings,\n buttonsSpacing: { selector: '::part(group-field)', property: 'justify-content' },\n buttonsRowGap: { selector: '::part(group-field)', property: 'row-gap' },\n buttonsColumnGap: { selector: '::part(group-field)', property: 'column-gap' },\n itemsLabelColor: {\n selector: () => `::slotted(${RadioButtonClass.componentName})`,\n property: RadioButtonClass.cssVarList.labelTextColor,\n },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['setSelectionRange'] }),\n componentNameValidationMixin,\n RadioGroupMixin\n)(\n createProxy({\n slots: ['', 'prefix'],\n wrappedEleName: 'vaadin-radio-group',\n style: () => `\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${resetInputLabelPosition('vaadin-radio-group')}\n `,\n\n excludeAttrsSync: ['tabindex', 'size', 'data', 'direction', 'style'],\n componentName,\n includeForwardProps: ['value'],\n })\n);\n","import { componentName as groupComponentName, RadioGroupClass } from './RadioGroupClass';\nimport { componentName as buttonComponentName, RadioButtonClass } from './RadioButtonClass';\nimport '@vaadin/radio-group';\n\ncustomElements.define(groupComponentName, RadioGroupClass);\ncustomElements.define(buttonComponentName, RadioButtonClass);\n\nexport { RadioGroupClass, groupComponentName as componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n { selector: () => ':host input:placeholder-shown', property: 'font-weight' },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n};\n"],"names":["componentName","RadioButtonClass","mappings","cursor","selector","fontSize","labelTextColor","property","fontFamily","radioSize","radioBackgroundColor","radioMargin","radioCheckedSize","radioCheckedColor","radioBorderColor","fallback","radioBorderWidth","radioBorderStyle","proxyProps","superclass","constructor","super","this","baseElement","checkValidity","init","addEventListener","e","dispatchEvent","CustomEvent","detail","bubbles","composed","renderLabel","bind","setAttribute","textContent","value","getAttribute","slots","wrappedEleName","excludeAttrsSync","includeForwardProps","RadioGroupClass","textFieldMappings","buttonsSpacing","buttonsRowGap","buttonsColumnGap","itemsLabelColor","cssVarList","label","Object","defineProperty","get","querySelectorAll","__filterRadioButtons","nodes","filter","node","localName","setCustomValidity","items","shadowRoot","querySelector","assignedElements","size","data","dataAttr","JSON","parse","isValidDataType","console","error","message","renderItems","defaultValue","isValid","Array","isArray","getItemsTemplate","reduce","acc","item","template","innerHTML","inputElement","includeAttrs","valueMissing","mapAttrs","layout","setTimeout","addedNodes","forEach","style","customElements","define","host","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","labelFontSize","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","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"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-radio-group-index-js.js","mappings":"uJAAA,MAAM,KACJA,EAAI,MACJC,EAAK,YACLC,EAAW,kBACXC,EAAiB,WACjBC,EAAU,MACVC,EAAK,UACLC,EAAS,WACTC,EAAU,aACVC,EAAY,oBACZC,EAAmB,cACnBC,EAAa,UACbC,EAAS,cACTC,EAAa,sBACbC,EAAqB,oBACrBC,EAAmB,4BACnBC,GACE,CACFf,KAAM,CAA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D,KAAKwD,mBAClBI,IAAU5D,KAAK6D,UAAYD,EACjC,CAEA,IAAAzD,GACEJ,MAAMI,SAENH,KAAK8D,aAAe9D,KAAKC,YAEzBD,KAAKmD,eAEL,QAAkBnD,KAAMA,KAAKmD,YAAYvC,KAAKZ,MAAO,CAAE+D,aAAc,CAAC,UAEtEnC,OAAOC,eAAe7B,KAAKC,YAAa,WAAY,CAClD6B,IAAK,KAAM,CAAGkC,cAAehE,KAAKC,YAAYC,qBAGhD,QAAaF,KAAMA,KAAKC,YAAa,CACnC8D,aAAc,CAAC,UACfE,SAAU,CAAEC,OAAQ,WAGtBC,WAAW,KACLnE,KAAKoD,eACPpD,KAAKe,MAAQf,KAAKoD,iBAKtB,QAAgBpD,KAAM,EAAGoE,iBACvBA,EAAWC,QAASlC,IAClBA,EAAKtB,aAAa,OAAQb,KAAK0C,WAInC,QACE1C,KACA,KACEA,KAAKsC,MAAM+B,QAASV,IAClBA,EAAK9C,aAAa,OAAQb,KAAK0C,SAGnC,CACEqB,aAAc,CAAC,SAGrB,GAG2B,EAkB7B,QAAY,CACV9C,MAAO,CAAC,GAAI,UACZC,eAAgB,qBAChBoD,MAAO,IAAM,+LAYX,QAAwB,8BAG1BnD,iBAAkB,CAAC,WAAY,OAAQ,OAAQ,YAAa,SAC5DpC,cAAa,EACbqC,oBAAqB,CAAC,Y,SCpL1BmD,eAAeC,OAAO,EAAoBnD,GAC1CkD,eAAeC,OAAO,EAAqBxF,E","sources":["webpack://@descope/web-components-ui/../components/descope-text-field/src/component/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/RadioButtonClass.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/RadioGroupClass.js","webpack://@descope/web-components-ui/./src/components/descope-radio-group/index.js"],"sourcesContent":["const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\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 default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n {\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: { ...errorMessage, property: 'background-repeat' },\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","import { compose } from '../../helpers';\nimport { getComponentName, observeChildren } from '../../helpers/componentHelpers';\nimport {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n proxyInputMixin,\n} from '../../mixins';\n\nexport const componentName = getComponentName('radio-button');\n\nconst customMixin = (superclass) =>\n class CustomMixin extends superclass {\n constructor() {\n super();\n\n this.baseElement.checkValidity = () => {};\n }\n\n init() {\n // we are forwarding vaadin checked-changed event\n this.baseElement.addEventListener('checked-changed', (e) => {\n this.dispatchEvent(\n new CustomEvent(\n 'checked-changed',\n { detail: e.detail },\n { bubbles: true, composed: true }\n )\n );\n });\n\n super.init?.();\n\n observeChildren(this, this.renderLabel.bind(this));\n }\n\n renderLabel() {\n this.baseElement.setAttribute('label', this.textContent);\n }\n\n get value() {\n return this.getAttribute('value');\n }\n };\n\nexport const RadioButtonClass = compose(\n createStyleMixin({\n mappings: {\n cursor: [{}, { selector: 'label' }],\n fontSize: [{ selector: 'label' }, {}],\n labelTextColor: { selector: 'label', property: 'color' },\n fontFamily: { selector: 'label' },\n radioSize: [\n { selector: '::part(radio)', property: 'height' },\n { selector: '::part(radio)', property: 'width' },\n ],\n radioBackgroundColor: { selector: '::part(radio)', property: 'background-color' },\n radioMargin: { selector: '::part(radio)', property: 'margin' },\n radioCheckedSize: { selector: '::part(radio)::after', property: 'border-width' },\n radioCheckedColor: { selector: '::part(radio)::after', property: 'border-color' },\n radioBorderColor: { selector: '::part(radio)', property: 'border-color', fallback: 'none' },\n radioBorderWidth: { selector: '::part(radio)', property: 'border-width', fallback: 0 },\n radioBorderStyle: { selector: '::part(radio)', property: 'border-style', fallback: 'solid' },\n },\n }),\n proxyInputMixin({ proxyProps: ['setSelectionRange'] }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [''],\n wrappedEleName: 'vaadin-radio-button',\n excludeAttrsSync: ['tabindex', 'data', 'style'],\n includeForwardProps: ['checked', 'name', 'disabled'],\n componentName,\n })\n);\n","import textFieldMappings from '@descope-ui/descope-text-field/mappings';\nimport { compose } from '../../helpers';\nimport {\n forwardAttrs,\n getComponentName,\n observeAttributes,\n observeChildren,\n} from '../../helpers/componentHelpers';\nimport { resetInputLabelPosition } from '../../helpers/themeHelpers/resetHelpers';\nimport {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n proxyInputMixin,\n} from '../../mixins';\nimport { componentName as childNodeName, RadioButtonClass } from './RadioButtonClass';\n\nexport const componentName = getComponentName('radio-group');\n\nconst RadioGroupMixin = (superclass) =>\n class RadioGroupMixinClass extends superclass {\n #renderItem = ({ value, label }) =>\n `<descope-radio-button value=\"${value}\">${label}</descope-radio-button>`;\n\n #data;\n\n constructor() {\n super();\n\n // we are overriding vaadin children getter so it will run on our custom elements\n Object.defineProperty(this.baseElement, 'children', {\n get: () => this.querySelectorAll(childNodeName),\n });\n\n // we are overriding vaadin __filterRadioButtons so it will run on our custom elements\n this.baseElement.__filterRadioButtons = (nodes) =>\n nodes.filter((node) => node.localName === childNodeName);\n\n // vaadin radio group missing some input properties\n this.baseElement.setCustomValidity = () => {};\n }\n\n get items() {\n return this.shadowRoot.querySelector('slot').assignedElements();\n }\n\n get size() {\n return this.getAttribute('size');\n }\n\n get data() {\n if (this.#data) return this.#data;\n\n const dataAttr = this.getAttribute('data');\n\n if (dataAttr) {\n try {\n const data = JSON.parse(dataAttr);\n if (this.isValidDataType(data)) {\n return data;\n }\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"data\" - ', e.message);\n }\n }\n\n return [];\n }\n\n set data(data) {\n if (this.isValidDataType(data)) {\n this.#data = data;\n this.renderItems();\n }\n }\n\n get defaultValue() {\n return this.getAttribute('default-value');\n }\n\n isValidDataType(data) {\n const isValid = Array.isArray(data);\n if (!isValid) {\n // eslint-disable-next-line no-console\n console.error('data must be an array, received:', data);\n }\n\n return isValid;\n }\n\n getItemsTemplate() {\n return this.data?.reduce?.((acc, item) => acc + (this.#renderItem?.(item || {}) || ''), '');\n }\n\n renderItems() {\n const template = this.getItemsTemplate();\n if (template) this.innerHTML = template;\n }\n\n init() {\n super.init?.();\n\n this.inputElement = this.baseElement;\n\n this.renderItems();\n\n observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });\n\n Object.defineProperty(this.baseElement, 'validity', {\n get: () => ({ valueMissing: !this.baseElement.checkValidity() }),\n });\n\n forwardAttrs(this, this.baseElement, {\n includeAttrs: ['layout'],\n mapAttrs: { layout: 'theme' },\n });\n\n setTimeout(() => {\n if (this.defaultValue) {\n this.value = this.defaultValue;\n }\n });\n\n // we want new items to get the size\n observeChildren(this, ({ addedNodes }) => {\n addedNodes.forEach((node) => {\n node.setAttribute('size', this.size);\n });\n });\n\n observeAttributes(\n this,\n () => {\n this.items.forEach((item) => {\n item.setAttribute('size', this.size);\n });\n },\n {\n includeAttrs: ['size'],\n }\n );\n }\n };\n\nexport const RadioGroupClass = compose(\n createStyleMixin({\n mappings: {\n ...textFieldMappings,\n buttonsSpacing: { selector: '::part(group-field)', property: 'justify-content' },\n buttonsRowGap: { selector: '::part(group-field)', property: 'row-gap' },\n buttonsColumnGap: { selector: '::part(group-field)', property: 'column-gap' },\n itemsLabelColor: {\n selector: () => `::slotted(${RadioButtonClass.componentName})`,\n property: RadioButtonClass.cssVarList.labelTextColor,\n },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['setSelectionRange'] }),\n componentNameValidationMixin,\n RadioGroupMixin\n)(\n createProxy({\n slots: ['', 'prefix'],\n wrappedEleName: 'vaadin-radio-group',\n style: () => `\n :host {\n display: inline-block;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n vaadin-radio-group {\n padding: 0;\n width: 100%;\n }\n\n ${resetInputLabelPosition('vaadin-radio-group')}\n `,\n\n excludeAttrsSync: ['tabindex', 'size', 'data', 'direction', 'style'],\n componentName,\n includeForwardProps: ['value'],\n })\n);\n","import { componentName as groupComponentName, RadioGroupClass } from './RadioGroupClass';\nimport { componentName as buttonComponentName, RadioButtonClass } from './RadioButtonClass';\nimport '@vaadin/radio-group';\n\ncustomElements.define(groupComponentName, RadioGroupClass);\ncustomElements.define(buttonComponentName, RadioButtonClass);\n\nexport { RadioGroupClass, groupComponentName as componentName };\n"],"names":["host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","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","componentName","RadioButtonClass","mappings","cursor","radioSize","radioBackgroundColor","radioMargin","radioCheckedSize","radioCheckedColor","radioBorderColor","fallback","radioBorderWidth","radioBorderStyle","proxyProps","superclass","constructor","super","this","baseElement","checkValidity","init","addEventListener","e","dispatchEvent","CustomEvent","detail","bubbles","composed","renderLabel","bind","setAttribute","textContent","value","getAttribute","slots","wrappedEleName","excludeAttrsSync","includeForwardProps","RadioGroupClass","textFieldMappings","buttonsSpacing","buttonsRowGap","buttonsColumnGap","itemsLabelColor","cssVarList","Object","defineProperty","get","querySelectorAll","__filterRadioButtons","nodes","filter","node","localName","setCustomValidity","items","shadowRoot","querySelector","assignedElements","size","data","dataAttr","JSON","parse","isValidDataType","console","error","message","renderItems","defaultValue","isValid","Array","isArray","getItemsTemplate","reduce","acc","item","template","innerHTML","inputElement","includeAttrs","valueMissing","mapAttrs","layout","setTimeout","addedNodes","forEach","style","customElements","define"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3594],{74460(e,t,r){r.r(t),r.d(t,{SecurityQuestionsSetupClass:()=>y,componentName:()=>c});var o=r(86365),i=r(25964),n=r(81365),s=r(9696),l=r(97810),a=r(79365),p=r(79275);const c=(0,l.xE)("security-questions-setup"),d=["full-width","readonly","size","label-type","question-label","question-placeholder","question-data-errormessage-value-missing","answer-label","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],u=["count","questions"];class h extends((0,n.q)({componentName:c,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,i.fz)("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get count(){return Number(this.getAttribute("count"))||0}#e(){const e=Array.from({length:this.count}).map((e,t)=>`\n <div class="question-wrapper">\n <descope-combo-box\n data-id="${t}"\n item-label-path="data-name"\n item-value-path="data-id"\n bordered="true"\n required="true"\n clear-button-visible="true"\n ></descope-combo-box>\n\n <descope-text-field\n data-id="${t}"\n required="true"\n bordered="true"\n minlength="2"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.comboBoxes.forEach(e=>{e.addEventListener("change",e=>{this.updateRemainingCombosData(e.target),this.getAttachedTextField(e.target).value=""}),e.data=this.data}),this.#t(d)}getAttachedTextField(e){const t=`descope-text-field[data-id="${e.getAttribute("data-id")}"]`;return this.baseElement.querySelector(t)}filterData(e){return this.data.filter(t=>t.value===e||!this.selectedQuestionIds.includes(t.value))}reportValidity(){return this.inputs.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return[...this.comboBoxes,...this.textFields].every(e=>e.checkValidity())}updateRemainingCombosData(e){this.comboBoxes.filter(t=>t!==e).forEach(e=>{e.data=this.filterData(e.value)})}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(c,"Error parsing questions attribute",e),[]}}get data(){return this.questions.map(({id:e,text:t})=>({value:e,label:t}))}get comboBoxes(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get inputs(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box, descope-text-field"))}get selectedQuestionIds(){return this.comboBoxes.map(e=>e.value)}get value(){return this.comboBoxes.map(e=>({id:e.value,answer:this.getAttachedTextField(e).value}))}set value(e=[]){e.forEach((e,t)=>{const r=this.comboBoxes[t],o=this.getAttachedTextField(r);r.value=e.id,o.value=e.answer})}#r(e,t,r){null===r?e.removeAttribute(t):e.setAttribute(t,r)}#t(e){const t={question:this.comboBoxes,answer:this.textFields};e.forEach(e=>{const[r,...o]=e.split("-"),i=t[r]||this.inputs,n=t[r]?o.join("-"):e;i.forEach(t=>{this.#r(t,n,this.getAttribute(e))})})}init(){super.init?.(),(0,l.mx)(this,()=>{this.#e()},{includeAttrs:u}),(0,l.mx)(this,this.#t.bind(this),{includeAttrs:d})}}const y=(0,s.Zz)((0,a.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>o.C.componentName,property:o.C.cssVarList.hostDirection},{selector:()=>p.w.componentName,property:p.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"}}}),a.VO,a.tQ)(h);r(21374),r(27092),customElements.define(c,y)},79275(e,t,r){r.d(t,{T:()=>a,w:()=>c});var o=r(79365),i=r(6424),n=r(9696),s=r(97810),l=r(73551);const a=(0,s.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],c=(0,n.Zz)((0,o.RF)({mappings:i.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),o.tQ,e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},r={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,r),setTimeout(()=>{Object.assign(this.icon,t)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(e,t,r){super.attributeChangeCallback?.(e,t,r),"type"===e&&this.baseElement._setType(r),t!==r&&("label-type"===e?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===r))}})((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${c.cssVarList.inputOutlineWidth}) + var(${c.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,l.$J)("vaadin-text-field")}\n\t\t\t${(0,l.cy)(c.cssVarList)}\n\t\t\t${(0,l.LJ)("vaadin-text-field",c.cssVarList)}\n ${(0,l.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:a}))},21374(e,t,r){r.r(t),r.d(t,{TextFieldClass:()=>o.w,componentName:()=>o.T}),r(11284),r(37182),r(95260);var o=r(79275);customElements.define(o.T,o.w)},6424(e,t,r){r.d(t,{A:()=>f});const{host:o,label:i,placeholder:n,requiredIndicator:s,inputField:l,input:a,inputMask:p,helperText:c,errorMessage:d,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:b,externalInputDisabled:g,externalPlaceholder:m,externalDisabledPlaceholder:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},f={fontSize:[{},o],fontFamily:[i,l,c,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},inputValueFontWeight:[{...a,property:"font-weight"},{...b,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...m,property:"font-weight"}],helperTextFontWeight:{...c,property:"font-weight"},errorMessageFontWeight:{...d,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...s,property:"color"},{...i,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...a,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...d,property:"color"},errorMessageIcon:{...d,property:"background-image"},errorMessageIconSize:{...d,property:"background-size"},errorMessageIconPadding:{...d,property:"padding-inline-start"},errorMessageIconRepeat:{...d,property:"background-repeat"},errorMessageIconPosition:{...d,property:"background-position"},errorMessageFontSize:{...d,property:"font-size"},helperTextColor:{...c,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...a,property:"caret-color"},{...b,property:"caret-color"}],labelRequiredIndicator:{...s,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...a,property:"padding-left"},{...a,property:"padding-right"},{...b,property:"padding-left"},{...b,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},textAlign:{},inputTextAlign:[{...a,property:"text-align"},{...b,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...x,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...b,property:"align-items"}],valueInputHeight:[{...a,property:"height"},{...b,property:"height"}],valueInputMarginBottom:[{...a,property:"margin-bottom"},{...b,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"},inputTextSecurity:[{...a,property:"-webkit-text-security"},{...a,property:"text-security"},{...b,property:"-webkit-text-security"},{...b,property:"text-security"}]}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3594],{28027(e,t,r){r.d(t,{T:()=>a,w:()=>c});var o=r(88961),i=r(63200),n=r(25964),s=r(79673),l=r(47656);const a=(0,n.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],c=(0,i.Zz)((0,o.RF)({mappings:l.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart","selectionEnd"],useProxyTargets:!0}),o.tQ,e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},r={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,r),setTimeout(()=>{Object.assign(this.icon,t)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(e,t,r){super.attributeChangeCallback?.(e,t,r),"type"===e&&this.baseElement._setType(r),t!==r&&("label-type"===e?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===r))}})((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${c.cssVarList.inputOutlineWidth}) + var(${c.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(c.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",c.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:a}))},64014(e,t,r){r.r(t),r.d(t,{TextFieldClass:()=>o.w,componentName:()=>o.T}),r(11284),r(37182),r(95260);var o=r(28027);customElements.define(o.T,o.w)},47656(e,t,r){r.d(t,{A:()=>f});const{host:o,label:i,placeholder:n,requiredIndicator:s,inputField:l,input:a,inputMask:p,helperText:c,errorMessage:d,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:b,externalInputDisabled:g,externalPlaceholder:m,externalDisabledPlaceholder:x}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},f={fontSize:[{},o],fontFamily:[i,l,c,d],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},inputValueFontWeight:[{...a,property:"font-weight"},{...b,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...m,property:"font-weight"}],helperTextFontWeight:{...c,property:"font-weight"},errorMessageFontWeight:{...d,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...s,property:"color"},{...i,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...a,property:"direction"},inputBackgroundColor:[{...l,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...d,property:"color"},errorMessageIcon:{...d,property:"background-image"},errorMessageIconSize:{...d,property:"background-size"},errorMessageIconPadding:{...d,property:"padding-inline-start"},errorMessageIconRepeat:{...d,property:"background-repeat"},errorMessageIconPosition:{...d,property:"background-position"},errorMessageFontSize:{...d,property:"font-size"},helperTextColor:{...c,property:"-webkit-text-fill-color"},inputValueTextColor:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...a,property:"caret-color"},{...b,property:"caret-color"}],labelRequiredIndicator:{...s,property:"content"},inputBorderColor:{...l,property:"border-color"},inputBorderWidth:{...l,property:"border-width"},inputBorderStyle:{...l,property:"border-style"},inputBorderRadius:{...l,property:"border-radius"},inputHeight:{...l,property:"height"},inputHorizontalPadding:[{...a,property:"padding-left"},{...a,property:"padding-right"},{...b,property:"padding-left"},{...b,property:"padding-right"}],inputOutlineColor:{...l,property:"outline-color"},inputOutlineStyle:{...l,property:"outline-style"},inputOutlineWidth:{...l,property:"outline-width"},inputOutlineOffset:{...l,property:"outline-offset"},textAlign:{},inputTextAlign:[{...a,property:"text-align"},{...b,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...x,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...l,property:"align-items"},{...b,property:"align-items"}],valueInputHeight:[{...a,property:"height"},{...b,property:"height"}],valueInputMarginBottom:[{...a,property:"margin-bottom"},{...b,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"},inputTextSecurity:[{...a,property:"-webkit-text-security"},{...a,property:"text-security"},{...b,property:"-webkit-text-security"},{...b,property:"text-security"}]}},74460(e,t,r){r.r(t),r.d(t,{SecurityQuestionsSetupClass:()=>y,componentName:()=>c});var o=r(86365),i=r(25964),n=r(28027),s=r(81365),l=r(9696),a=r(97810),p=r(79365);const c=(0,a.xE)("security-questions-setup"),d=["full-width","readonly","size","label-type","question-label","question-placeholder","question-data-errormessage-value-missing","answer-label","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],u=["count","questions"];class h extends((0,s.q)({componentName:c,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,i.fz)("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}get count(){return Number(this.getAttribute("count"))||0}#e(){const e=Array.from({length:this.count}).map((e,t)=>`\n <div class="question-wrapper">\n <descope-combo-box\n data-id="${t}"\n item-label-path="data-name"\n item-value-path="data-id"\n bordered="true"\n required="true"\n clear-button-visible="true"\n ></descope-combo-box>\n\n <descope-text-field\n data-id="${t}"\n required="true"\n bordered="true"\n minlength="2"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.comboBoxes.forEach(e=>{e.addEventListener("change",e=>{this.updateRemainingCombosData(e.target),this.getAttachedTextField(e.target).value=""}),e.data=this.data}),this.#t(d)}getAttachedTextField(e){const t=`descope-text-field[data-id="${e.getAttribute("data-id")}"]`;return this.baseElement.querySelector(t)}filterData(e){return this.data.filter(t=>t.value===e||!this.selectedQuestionIds.includes(t.value))}reportValidity(){return this.inputs.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return[...this.comboBoxes,...this.textFields].every(e=>e.checkValidity())}updateRemainingCombosData(e){this.comboBoxes.filter(t=>t!==e).forEach(e=>{e.data=this.filterData(e.value)})}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(c,"Error parsing questions attribute",e),[]}}get data(){return this.questions.map(({id:e,text:t})=>({value:e,label:t}))}get comboBoxes(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get inputs(){return Array.from(this.baseElement.querySelectorAll("descope-combo-box, descope-text-field"))}get selectedQuestionIds(){return this.comboBoxes.map(e=>e.value)}get value(){return this.comboBoxes.map(e=>({id:e.value,answer:this.getAttachedTextField(e).value}))}set value(e=[]){e.forEach((e,t)=>{const r=this.comboBoxes[t],o=this.getAttachedTextField(r);r.value=e.id,o.value=e.answer})}#r(e,t,r){null===r?e.removeAttribute(t):e.setAttribute(t,r)}#t(e){const t={question:this.comboBoxes,answer:this.textFields};e.forEach(e=>{const[r,...o]=e.split("-"),i=t[r]||this.inputs,n=t[r]?o.join("-"):e;i.forEach(t=>{this.#r(t,n,this.getAttribute(e))})})}init(){super.init?.(),(0,a.mx)(this,()=>{this.#e()},{includeAttrs:u}),(0,a.mx)(this,this.#t.bind(this),{includeAttrs:d})}}const y=(0,l.Zz)((0,p.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>o.C.componentName,property:o.C.cssVarList.hostDirection},{selector:()=>n.w.componentName,property:n.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"}}}),p.VO,p.tQ)(h);r(64014),r(27092),customElements.define(c,y)}}]);
|
|
2
2
|
//# sourceMappingURL=descope-security-questions-setup-index-js.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-security-questions-setup-index-js.js","mappings":"4RAQO,MAAMA,GAAgB,QAAiB,4BAExCC,EAAc,CAClB,aACA,WACA,OACA,aACA,iBACA,uBACA,2CACA,eACA,qBACA,yCACA,wBACA,6BACA,iCAGIC,EAAkB,CAAC,QAAS,aAClC,MAAMC,WAAkC,EAAAC,EAAA,GAAgB,CAAEJ,gBAAeK,aAAc,SACrF,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,2BAIhD,QACE,i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AKzH,EAAOuB,SAAU,aACvCmG,gBAAiB,IAAK1H,EAAOuB,SAAU,cACvCoG,kBAAmB,IAAK3H,EAAOuB,SAAU,uBACzCqG,mBAAoB,CAClB,CAAElJ,SAAU,4BAA6B6C,SAAU,WACnD,IAAK2D,EAAqB3D,SAAU,YAEtCsG,uBAAwB,CACtB,IAAKrD,EAAYjD,SAAU,eAC3B,IAAKyD,EAAezD,SAAU,gBAEhCuG,iBAAkB,CAChB,IAAKrD,EAAOlD,SAAU,UACtB,IAAKyD,EAAezD,SAAU,WAEhCwG,uBAAwB,CACtB,IAAKtD,EAAOlD,SAAU,iBACtB,IAAKyD,EAAezD,SAAU,kBAGhCyG,gBAAiB,CACf,IAAKjD,EAAWxD,SAAU,gBAC1B,IAAKwD,EAAWxD,SAAU,gBAE5B0G,cAAe,IAAKlD,EAAWxD,SAAU,aACzC2G,eAAgB,IAAKnD,EAAWxD,SAAU,SAC1C4G,kBAAmB,CACjB,IAAK1D,EAAOlD,SAAU,yBACtB,IAAKkD,EAAOlD,SAAU,iBACtB,IAAKyD,EAAezD,SAAU,yBAC9B,IAAKyD,EAAezD,SAAU,kB","sources":["webpack://@descope/web-components-ui/./src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js","webpack://@descope/web-components-ui/./src/components/descope-security-questions-setup/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js"],"sourcesContent":["import { ComboBoxClass } from '@descope-ui/descope-combo-box/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName, observeAttributes } from '../../helpers/componentHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';\nimport { TextFieldClass } from '../descope-text-field/TextFieldClass';\n\nexport const componentName = getComponentName('security-questions-setup');\n\nconst attrsToSync = [\n 'full-width',\n 'readonly',\n 'size',\n 'label-type',\n 'question-label',\n 'question-placeholder',\n 'question-data-errormessage-value-missing',\n 'answer-label',\n 'answer-placeholder',\n 'answer-data-errormessage-value-missing',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n];\n\nconst attrsToReRender = ['count', 'questions'];\nclass RawSecurityQuestionsSetup extends createBaseClass({ componentName, baseSelector: 'div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div></div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n `,\n this\n );\n }\n\n get count() {\n return Number(this.getAttribute('count')) || 0;\n }\n\n #renderQuestions() {\n const res = Array.from({ length: this.count }).map(\n (_, index) =>\n // <!--html-->\n `\n <div class=\"question-wrapper\">\n <descope-combo-box\n data-id=\"${index}\"\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n bordered=\"true\"\n required=\"true\"\n clear-button-visible=\"true\"\n ></descope-combo-box>\n\n <descope-text-field\n data-id=\"${index}\"\n required=\"true\"\n bordered=\"true\"\n minlength=\"2\"\n ></descope-text-field>\n </div>\n `\n // <!--!html-->\n );\n\n this.baseElement.innerHTML = res.join(\n '<spacer></spacer><descope-divider></descope-divider><spacer></spacer>'\n );\n\n this.comboBoxes.forEach((el) => {\n el.addEventListener('change', (e) => {\n this.updateRemainingCombosData(e.target);\n const AttachedTextField = this.getAttachedTextField(e.target);\n\n AttachedTextField.value = '';\n });\n\n el.data = this.data;\n });\n\n this.#syncAttrs(attrsToSync);\n }\n\n getAttachedTextField(combo) {\n const selector = `descope-text-field[data-id=\"${combo.getAttribute('data-id')}\"]`;\n\n return this.baseElement.querySelector(selector);\n }\n\n filterData(comboValue) {\n const res = this.data.filter(\n (item) => item.value === comboValue || !this.selectedQuestionIds.includes(item.value)\n );\n\n return res;\n }\n\n reportValidity() {\n this.inputs.reverse().forEach((el) => el.reportValidity());\n\n return this.checkValidity();\n }\n\n checkValidity() {\n return [...this.comboBoxes, ...this.textFields].every((el) => el.checkValidity());\n }\n\n updateRemainingCombosData(sourceCombo) {\n this.comboBoxes\n .filter((combo) => combo !== sourceCombo)\n .forEach((combo) => {\n combo.data = this.filterData(combo.value);\n });\n }\n\n get questions() {\n try {\n return JSON.parse(this.getAttribute('questions')) || [];\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(componentName, 'Error parsing questions attribute', e);\n return [];\n }\n }\n\n // this returns the structure expected by the combo box\n get data() {\n return this.questions.map(({ id, text }) => ({ value: id, label: text }));\n }\n\n get comboBoxes() {\n return Array.from(this.baseElement.querySelectorAll('descope-combo-box'));\n }\n\n get textFields() {\n return Array.from(this.baseElement.querySelectorAll('descope-text-field'));\n }\n\n get inputs() {\n return Array.from(this.baseElement.querySelectorAll('descope-combo-box, descope-text-field'));\n }\n\n get selectedQuestionIds() {\n return this.comboBoxes.map((el) => el.value);\n }\n\n get value() {\n return this.comboBoxes.map((combo) => {\n const id = combo.value;\n const answer = this.getAttachedTextField(combo).value;\n\n return { id, answer };\n });\n }\n\n set value(val = []) {\n val.forEach((item, index) => {\n const combo = this.comboBoxes[index];\n const textField = this.getAttachedTextField(combo);\n\n combo.value = item.id;\n textField.value = item.answer;\n });\n }\n\n #updateAttribute(ele, attrName, value) {\n if (value === null) ele.removeAttribute(attrName);\n else ele.setAttribute(attrName, value);\n }\n\n #syncAttrs(attrs) {\n const componentMap = {\n question: this.comboBoxes,\n answer: this.textFields,\n };\n\n attrs.forEach((attr) => {\n const [maybeComponentType, ...rest] = attr.split('-');\n const elements = componentMap[maybeComponentType] || this.inputs;\n const attrName = componentMap[maybeComponentType] ? rest.join('-') : attr;\n\n elements.forEach((el) => {\n this.#updateAttribute(el, attrName, this.getAttribute(attr));\n });\n });\n }\n\n init() {\n super.init?.();\n // render new components\n observeAttributes(\n this,\n () => {\n this.#renderQuestions();\n },\n { includeAttrs: attrsToReRender }\n );\n\n // update existing components\n observeAttributes(this, this.#syncAttrs.bind(this), {\n includeAttrs: attrsToSync,\n });\n }\n}\n\nexport const SecurityQuestionsSetupClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }, { property: 'width' }],\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => ComboBoxClass.componentName,\n property: ComboBoxClass.cssVarList.hostDirection,\n },\n {\n selector: () => TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.hostDirection,\n },\n ],\n gap: { selector: () => 'div', property: 'gap' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawSecurityQuestionsSetup);\n","import { componentName, SecurityQuestionsSetupClass } from './SecurityQuestionsSetupClass';\nimport '../descope-text-field';\nimport '@descope-ui/descope-combo-box';\n\ncustomElements.define(componentName, SecurityQuestionsSetupClass);\n\nexport { SecurityQuestionsSetupClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n { selector: () => ':host input:placeholder-shown', property: 'font-weight' },\n { ...externalPlaceholder, property: 'font-weight' },\n ],\n helperTextFontWeight: { ...helperText, property: 'font-weight' },\n errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n inputTextSecurity: [\n { ...input, property: '-webkit-text-security' },\n { ...input, property: 'text-security' },\n { ...externalInput, property: '-webkit-text-security' },\n { ...externalInput, property: 'text-security' },\n ],\n};\n"],"names":["componentName","attrsToSync","attrsToReRender","RawSecurityQuestionsSetup","createBaseClass","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","count","Number","getAttribute","res","Array","from","length","map","_","index","baseElement","join","comboBoxes","forEach","el","addEventListener","e","updateRemainingCombosData","target","getAttachedTextField","value","data","combo","selector","querySelector","filterData","comboValue","filter","item","selectedQuestionIds","includes","reportValidity","inputs","reverse","checkValidity","textFields","every","sourceCombo","questions","JSON","parse","console","error","id","text","label","querySelectorAll","answer","val","textField","ele","attrName","removeAttribute","setAttribute","attrs","componentMap","question","attr","maybeComponentType","rest","split","elements","init","includeAttrs","bind","SecurityQuestionsSetupClass","mappings","hostWidth","property","hostDirection","ComboBoxClass","C","cssVarList","TextFieldClass","gap","customElements","define","observedAttrs","proxyProps","useProxyTargets","superclass","observedAttributes","concat","icon","renderCopyToClipboard","shouldRender","remove","iconInitConfig","title","style","iconCopiedConfig","Object","assign","document","createElement","slot","appendChild","navigator","clipboard","writeText","setTimeout","onLabelClick","focus","attributeChangedCallback","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","slots","wrappedEleName","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","host","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","fontSize","fontFamily","labelFontSize","labelFontWeight","inputValueFontWeight","inputPlaceholderFontWeight","helperTextFontWeight","errorMessageFontWeight","labelTextColor","hostMinWidth","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"descope-security-questions-setup-index-js.js","mappings":"0NAiBO,MAAMA,GAAgB,QAAiB,cAExCC,EAAgB,CAAC,OAAQ,aAAc,qBA+EhCC,GAAiB,SAC5B,QAAiB,CACfC,SAAU,MAEZ,MACA,QAAgB,CACdC,WAAY,CAAC,QAAS,iBAAkB,gBACxCC,iBAAiB,IAEnB,KAtFmBC,GACnB,cAA6BA,EAC3B,6BAAWC,GACT,OAAON,EAAcO,OAAOF,EAAWC,oBAAsB,GAC/D,CAEAE,KAEA,IAAAC,GACEC,MAAMD,QACR,CAEA,qBAAAE,CAAsBC,GACpB,IAAKA,EAEH,YADAC,KAAKL,MAAMM,SAIb,MAAMC,EAAiB,CACrBP,KAAM,gBACNQ,MAAO,OACPC,MAAO,mBAGHC,EAAmB,CACvBV,KAAM,wBACNQ,MAAO,SACPC,MAAO,mBAGTJ,KAAKL,KAAOW,OAAOC,OAAOC,SAASC,cAAc,eAAgB,CAC/DC,KAAM,YACHR,IAGLF,KAAKW,YAAYC,YAAYZ,KAAKL,MAClCK,KAAKL,KAAKkB,iBAAiB,QAAS,KAClCC,UAAUC,UAAUC,UAAUhB,KAAKiB,OACnCX,OAAOC,OAAOP,KAAKL,KAAMU,GAGzBa,WAAW,KACTZ,OAAOC,OAAOP,KAAKL,KAAMO,IACxB,MAEP,CAEA,YAAAiB,GACEnB,KAAKoB,OACP,CAEA,wBAAAC,CAAyBC,EAAUC,EAAQC,GACzC3B,MAAM4B,0BAA0BH,EAAUC,EAAQC,GAOjC,SAAbF,GACFtB,KAAKW,YAAYe,SAASF,GAGxBD,IAAWC,IACI,eAAbF,EACa,aAAXE,EACFxB,KAAKa,iBAAiB,QAASb,KAAKmB,cAEpCnB,KAAK2B,oBAAoB,QAAS3B,KAAKmB,cAEnB,sBAAbG,GACTtB,KAAKF,sBAAiC,SAA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H,EAAKkB,QAE3B,CAEA,GAAiBG,EAAKxI,EAAUL,GAChB,OAAVA,EAAgB6I,EAAIC,gBAAgBzI,GACnCwI,EAAIE,aAAa1I,EAAUL,EAClC,CAEA,GAAWgJ,GACT,MAAMC,EAAe,CACnBC,SAAUnK,KAAK4H,WACf+B,OAAQ3J,KAAKgJ,YAGfiB,EAAMpC,QAASuC,IACb,MAAOC,KAAuBC,GAAQF,EAAKG,MAAM,KAC3CC,EAAWN,EAAaG,IAAuBrK,KAAK6I,OACpDvH,EAAW4I,EAAaG,GAAsBC,EAAK3C,KAAK,KAAOyC,EAErEI,EAAS3C,QAASC,IAChB9H,MAAK,EAAiB8H,EAAIxG,EAAUtB,KAAKmH,aAAaiD,OAG5D,CAEA,IAAAxK,GACEC,MAAMD,UAEN,QACEI,KACA,KACEA,MAAK,KAEP,CAAEyK,aAAchE,KAIlB,QAAkBzG,KAAMA,MAAK,EAAW0K,KAAK1K,MAAO,CAClDyK,aAAcjE,GAElB,EAGK,MAAMmE,GAA8B,SACzC,QAAiB,CACftL,SAAU,CACR0E,UAAW,CAAC,CAAEX,SAAU,IAAM,QAASI,SAAU,SAAW,CAAEA,SAAU,UACxES,cAAe,CACb,CAAEb,SAAU,IAAM,QAASI,SAAU,aACrC,CACEJ,SAAU,IAAMwH,EAAAC,EAAc3L,cAC9BsE,SAAUoH,EAAAC,EAAc/I,WAAWmC,eAErC,CACEb,SAAU,IAAMhE,EAAA,EAAeF,cAC/BsE,SAAUpE,EAAA,EAAe0C,WAAWmC,gBAGxC6G,IAAK,CAAE1H,SAAU,IAAM,MAAOI,SAAU,UAG5C,KACA,KAnByC,CAoBzCkD,G,kBC5OFxE,eAAeC,OAAOjD,EAAeyL,E","sources":["webpack://@descope/web-components-ui/../components/descope-text-field/src/component/TextFieldClass.js","webpack://@descope/web-components-ui/../components/descope-text-field/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text-field/src/component/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js","webpack://@descope/web-components-ui/./src/components/descope-security-questions-setup/index.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '@descope-ui/common/theme-helpers';\nimport textFieldMappings from './textFieldMappings';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart', 'selectionEnd'],\n useProxyTargets: true,\n }),\n componentNameValidationMixin,\n customMixin,\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n }),\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: {\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 default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n inputValueFontWeight: [\n { ...input, property: 'font-weight' },\n { ...externalInput, property: 'font-weight' },\n ],\n inputPlaceholderFontWeight: [\n {\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: { ...errorMessage, property: 'background-repeat' },\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","import { ComboBoxClass } from '@descope-ui/descope-combo-box/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { TextFieldClass } from '@descope-ui/descope-text-field/class';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName, observeAttributes } from '../../helpers/componentHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';\n\nexport const componentName = getComponentName('security-questions-setup');\n\nconst attrsToSync = [\n 'full-width',\n 'readonly',\n 'size',\n 'label-type',\n 'question-label',\n 'question-placeholder',\n 'question-data-errormessage-value-missing',\n 'answer-label',\n 'answer-placeholder',\n 'answer-data-errormessage-value-missing',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n];\n\nconst attrsToReRender = ['count', 'questions'];\nclass RawSecurityQuestionsSetup extends createBaseClass({ componentName, baseSelector: 'div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div></div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n `,\n this\n );\n }\n\n get count() {\n return Number(this.getAttribute('count')) || 0;\n }\n\n #renderQuestions() {\n const res = Array.from({ length: this.count }).map(\n (_, index) =>\n // <!--html-->\n `\n <div class=\"question-wrapper\">\n <descope-combo-box\n data-id=\"${index}\"\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n bordered=\"true\"\n required=\"true\"\n clear-button-visible=\"true\"\n ></descope-combo-box>\n\n <descope-text-field\n data-id=\"${index}\"\n required=\"true\"\n bordered=\"true\"\n minlength=\"2\"\n ></descope-text-field>\n </div>\n `\n // <!--!html-->\n );\n\n this.baseElement.innerHTML = res.join(\n '<spacer></spacer><descope-divider></descope-divider><spacer></spacer>'\n );\n\n this.comboBoxes.forEach((el) => {\n el.addEventListener('change', (e) => {\n this.updateRemainingCombosData(e.target);\n const AttachedTextField = this.getAttachedTextField(e.target);\n\n AttachedTextField.value = '';\n });\n\n el.data = this.data;\n });\n\n this.#syncAttrs(attrsToSync);\n }\n\n getAttachedTextField(combo) {\n const selector = `descope-text-field[data-id=\"${combo.getAttribute('data-id')}\"]`;\n\n return this.baseElement.querySelector(selector);\n }\n\n filterData(comboValue) {\n const res = this.data.filter(\n (item) => item.value === comboValue || !this.selectedQuestionIds.includes(item.value)\n );\n\n return res;\n }\n\n reportValidity() {\n this.inputs.reverse().forEach((el) => el.reportValidity());\n\n return this.checkValidity();\n }\n\n checkValidity() {\n return [...this.comboBoxes, ...this.textFields].every((el) => el.checkValidity());\n }\n\n updateRemainingCombosData(sourceCombo) {\n this.comboBoxes\n .filter((combo) => combo !== sourceCombo)\n .forEach((combo) => {\n combo.data = this.filterData(combo.value);\n });\n }\n\n get questions() {\n try {\n return JSON.parse(this.getAttribute('questions')) || [];\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(componentName, 'Error parsing questions attribute', e);\n return [];\n }\n }\n\n // this returns the structure expected by the combo box\n get data() {\n return this.questions.map(({ id, text }) => ({ value: id, label: text }));\n }\n\n get comboBoxes() {\n return Array.from(this.baseElement.querySelectorAll('descope-combo-box'));\n }\n\n get textFields() {\n return Array.from(this.baseElement.querySelectorAll('descope-text-field'));\n }\n\n get inputs() {\n return Array.from(this.baseElement.querySelectorAll('descope-combo-box, descope-text-field'));\n }\n\n get selectedQuestionIds() {\n return this.comboBoxes.map((el) => el.value);\n }\n\n get value() {\n return this.comboBoxes.map((combo) => {\n const id = combo.value;\n const answer = this.getAttachedTextField(combo).value;\n\n return { id, answer };\n });\n }\n\n set value(val = []) {\n val.forEach((item, index) => {\n const combo = this.comboBoxes[index];\n const textField = this.getAttachedTextField(combo);\n\n combo.value = item.id;\n textField.value = item.answer;\n });\n }\n\n #updateAttribute(ele, attrName, value) {\n if (value === null) ele.removeAttribute(attrName);\n else ele.setAttribute(attrName, value);\n }\n\n #syncAttrs(attrs) {\n const componentMap = {\n question: this.comboBoxes,\n answer: this.textFields,\n };\n\n attrs.forEach((attr) => {\n const [maybeComponentType, ...rest] = attr.split('-');\n const elements = componentMap[maybeComponentType] || this.inputs;\n const attrName = componentMap[maybeComponentType] ? rest.join('-') : attr;\n\n elements.forEach((el) => {\n this.#updateAttribute(el, attrName, this.getAttribute(attr));\n });\n });\n }\n\n init() {\n super.init?.();\n // render new components\n observeAttributes(\n this,\n () => {\n this.#renderQuestions();\n },\n { includeAttrs: attrsToReRender }\n );\n\n // update existing components\n observeAttributes(this, this.#syncAttrs.bind(this), {\n includeAttrs: attrsToSync,\n });\n }\n}\n\nexport const SecurityQuestionsSetupClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: [{ selector: () => ':host', property: 'width' }, { property: 'width' }],\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => ComboBoxClass.componentName,\n property: ComboBoxClass.cssVarList.hostDirection,\n },\n {\n selector: () => TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.hostDirection,\n },\n ],\n gap: { selector: () => 'div', property: 'gap' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawSecurityQuestionsSetup);\n","import { componentName, SecurityQuestionsSetupClass } from './SecurityQuestionsSetupClass';\nimport '@descope-ui/descope-text-field';\nimport '@descope-ui/descope-combo-box';\n\ncustomElements.define(componentName, SecurityQuestionsSetupClass);\n\nexport { SecurityQuestionsSetupClass, componentName };\n"],"names":["componentName","observedAttrs","TextFieldClass","mappings","proxyProps","useProxyTargets","superclass","observedAttributes","concat","icon","init","super","renderCopyToClipboard","shouldRender","this","remove","iconInitConfig","title","style","iconCopiedConfig","Object","assign","document","createElement","slot","baseElement","appendChild","addEventListener","navigator","clipboard","writeText","value","setTimeout","onLabelClick","focus","attributeChangedCallback","attrName","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","slots","wrappedEleName","cssVarList","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","customElements","define","host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","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","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputTextSecurity","attrsToSync","attrsToReRender","RawSecurityQuestionsSetup","createBaseClass","baseSelector","constructor","attachShadow","mode","innerHTML","count","Number","getAttribute","res","Array","from","length","map","_","index","join","comboBoxes","forEach","el","e","updateRemainingCombosData","target","getAttachedTextField","data","combo","querySelector","filterData","comboValue","filter","item","selectedQuestionIds","includes","reportValidity","inputs","reverse","checkValidity","textFields","every","sourceCombo","questions","JSON","parse","console","error","id","text","querySelectorAll","answer","val","textField","ele","removeAttribute","setAttribute","attrs","componentMap","question","attr","maybeComponentType","rest","split","elements","includeAttrs","bind","SecurityQuestionsSetupClass","ComboBoxClass","C","gap"],"sourceRoot":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! For license information please see descope-security-questions-verify-index-js.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,4838,5166,9446],{66434(e,t,r){r.d(t,{T:()=>a,s:()=>d});var o=r(88961),i=r(63200),s=r(25964),n=r(72270);const a=(0,s.xE)("text");class l extends((0,n.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,()=>{const e=!!this.childNodes.length;this.style.display=!e&&this.hideWhenEmpty?"none":""})}}const{host:p}={host:{selector:()=>":host"}},d=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),(0,o.DM)({triggers:[{attr:"full-width",value:"true"}]}),o.VO,o.tQ)(l)},63595(e,t,r){r.r(t),r.d(t,{TextClass:()=>o.s,componentName:()=>o.T});var o=r(66434);customElements.define(o.T,o.s)},38479(e,t,r){r.r(t),r.d(t,{SecurityQuestionsVerifyClass:()=>f,componentName:()=>d});var o=r(66434),i=r(25964),s=r(81365),n=r(9696),a=r(97810),l=r(79365),p=r(79275);const d=(0,a.xE)("security-questions-verify"),c=["full-width","readonly","size","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],u=["question-mode"],h={"answer-placeholder":"placeholder","answer-data-errormessage-value-missing":"data-errormessage-value-missing","question-mode":"mode"},y=[...c,...u],g=["questions"];class m extends((0,s.q)({componentName:d,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,i.fz)("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}#e(){const e=this.questions.map(({id:e,text:t})=>`\n <div class="question-wrapper">\n <descope-text\n data-id="${e}"\n >${t}</descope-text>\n\n <descope-text-field\n data-id="${e}"\n required="true"\n bordered="true"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.#t(y),this.texts.forEach(e=>{const t=this.textFields.find(t=>t.getAttribute("data-id")===e.getAttribute("data-id"));t&&(e.onclick=t.focus.bind(t))})}reportValidity(){return this.textFields.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return this.textFields.every(e=>e.checkValidity())}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(d,"Error parsing questions attribute",e),[]}}get texts(){return Array.from(this.baseElement.querySelectorAll("descope-text"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get elements(){return Array.from(this.baseElement.querySelectorAll("descope-text, descope-text-field"))}get value(){return this.textFields.map(e=>({id:e.getAttribute("data-id"),answer:e.value}))}set value(e=[]){e.forEach(({id:e,answer:t})=>{const r=this.textFields.find(t=>t.getAttribute("data-id")===e);r&&(r.value=t)})}#r(e,t,r){null===r?e.removeAttribute(t):e.setAttribute(t,r)}#o(e){switch(!0){case c.includes(e):return this.textFields;case u.includes(e):return this.texts;default:return[]}}#t(e){e.forEach(e=>{this.#o(e).forEach(t=>{this.#r(t,h[e]||e,this.getAttribute(e))})})}init(){super.init?.(),(0,a.mx)(this,()=>{this.#e()},{includeAttrs:g}),(0,a.mx)(this,this.#t.bind(this),{includeAttrs:y})}}const f=(0,n.Zz)((0,l.RF)({componentNameOverride:(0,a.xE)("input-wrapper")}),(0,l.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>o.s.componentName,property:o.s.cssVarList.hostDirection},{selector:()=>p.w.componentName,property:p.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},questionTextAlign:{selector:()=>o.s.componentName,property:o.s.cssVarList.textAlign},questionFontSize:{selector:()=>o.s.componentName,property:o.s.cssVarList.fontSize},questionFontFamily:{selector:()=>o.s.componentName,property:o.s.cssVarList.fontFamily},questionCursor:{selector:()=>o.s.componentName,property:"cursor"},errorMessageIcon:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessageSize},errorMessageIconPadding:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessagePadding},errorMessageIconRepeat:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessageRepeat},errorMessageIconPosition:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessagePosition},errorMessageFontSize:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessageFontSize}}}),l.VO,l.tQ)(m);r(63595),r(21374),customElements.define(d,f)},79275(e,t,r){r.d(t,{T:()=>l,w:()=>d});var o=r(79365),i=r(6424),s=r(9696),n=r(97810),a=r(73551);const l=(0,n.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,s.Zz)((0,o.RF)({mappings:i.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),o.tQ,e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},r={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,r),setTimeout(()=>{Object.assign(this.icon,t)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(e,t,r){super.attributeChangeCallback?.(e,t,r),"type"===e&&this.baseElement._setType(r),t!==r&&("label-type"===e?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===r))}})((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,a.$J)("vaadin-text-field")}\n\t\t\t${(0,a.cy)(d.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,a.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:l}))},21374(e,t,r){r.r(t),r.d(t,{TextFieldClass:()=>o.w,componentName:()=>o.T}),r(11284),r(37182),r(95260);var o=r(79275);customElements.define(o.T,o.w)},6424(e,t,r){r.d(t,{A:()=>x});const{host:o,label:i,placeholder:s,requiredIndicator:n,inputField:a,input:l,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:m,externalPlaceholder:f,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},o],fontFamily:[i,a,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},inputValueFontWeight:[{...l,property:"font-weight"},{...g,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...f,property:"font-weight"}],helperTextFontWeight:{...d,property:"font-weight"},errorMessageFontWeight:{...c,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...n,property:"color"},{...i,property:"-webkit-text-fill-color"},{...n,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...l,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},errorMessageFontSize:{...c,property:"font-size"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...n,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...s,property:"color"},{...u,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"},inputTextSecurity:[{...l,property:"-webkit-text-security"},{...l,property:"text-security"},{...g,property:"-webkit-text-security"},{...g,property:"text-security"}]}},18330(e,t,r){r.d(t,{f:()=>i});var o=r(44099);class i extends o.r{constructor(e,t){super(e,"input","input",{initializer:(e,r)=>{r.value&&(e.value=r.value),r.type&&e.setAttribute("type",r.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},37436(e,t,r){r.d(t,{a:()=>i});var o=r(44218);const i=e=>class extends((0,o.R)(e)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(e){this.__dataValue=e}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}_onInput(e){super._onInput(e),this.invalid&&this.validate()}_valueChanged(e,t){super._valueChanged(e,t),void 0!==t&&this.invalid&&this.validate()}}},27136(e,t,r){r.d(t,{A:()=>h}),r(86689);var o=r(13256),i=r(82901),s=r(72562),n=r(81488),a=r(86314),l=r(87550),p=r(18330),d=r(37436),c=r(37720);const u=e=>class extends((0,d.a)(e)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new p.f(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new c.q(this.inputElement,this._labelController))}};(0,l.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(u((0,l.cp)((0,s.q)(o.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return o.qy`
|
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[77,2294,4838,9446],{28027(e,t,r){r.d(t,{T:()=>l,w:()=>d});var o=r(88961),i=r(63200),s=r(25964),n=r(79673),a=r(47656);const l=(0,s.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,i.Zz)((0,o.RF)({mappings:a.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart","selectionEnd"],useProxyTargets:!0}),o.tQ,e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},r={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,r),setTimeout(()=>{Object.assign(this.icon,t)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(e,t,r){super.attributeChangeCallback?.(e,t,r),"type"===e&&this.baseElement._setType(r),t!==r&&("label-type"===e?"floating"===r?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===r))}})((0,o.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,n.$J)("vaadin-text-field")}\n\t\t\t${(0,n.cy)(d.cssVarList)}\n\t\t\t${(0,n.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,n.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:l}))},64014(e,t,r){r.r(t),r.d(t,{TextFieldClass:()=>o.w,componentName:()=>o.T}),r(11284),r(37182),r(95260);var o=r(28027);customElements.define(o.T,o.w)},47656(e,t,r){r.d(t,{A:()=>x});const{host:o,label:i,placeholder:s,requiredIndicator:n,inputField:a,input:l,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:m,externalPlaceholder:f,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},o],fontFamily:[i,a,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},inputValueFontWeight:[{...l,property:"font-weight"},{...g,property:"font-weight"}],inputPlaceholderFontWeight:[{selector:()=>":host input:placeholder-shown",property:"font-weight"},{...f,property:"font-weight"}],helperTextFontWeight:{...d,property:"font-weight"},errorMessageFontWeight:{...c,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...n,property:"color"},{...i,property:"-webkit-text-fill-color"},{...n,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...l,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...c,property:"color"},errorMessageIcon:{...c,property:"background-image"},errorMessageIconSize:{...c,property:"background-size"},errorMessageIconPadding:{...c,property:"padding-inline-start"},errorMessageIconRepeat:{...c,property:"background-repeat"},errorMessageIconPosition:{...c,property:"background-position"},errorMessageFontSize:{...c,property:"font-size"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...n,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...s,property:"color"},{...u,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...f,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"},inputTextSecurity:[{...l,property:"-webkit-text-security"},{...l,property:"text-security"},{...g,property:"-webkit-text-security"},{...g,property:"text-security"}]}},66434(e,t,r){r.d(t,{T:()=>a,s:()=>d});var o=r(88961),i=r(63200),s=r(25964),n=r(72270);const a=(0,s.xE)("text");class l extends((0,n.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,s.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,s.Ge)(this,()=>{const e=!!this.childNodes.length;this.style.display=!e&&this.hideWhenEmpty?"none":""})}}const{host:p}={host:{selector:()=>":host"}},d=(0,i.Zz)((0,o.RF)({mappings:{hostWidth:{...p,property:"width"},hostDirection:{...p,property:"direction"},fontSize:{},textColor:[{property:"color"}],textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),(0,o.DM)({triggers:[{attr:"full-width",value:"true"}]}),o.VO,o.tQ)(l)},63595(e,t,r){r.r(t),r.d(t,{TextClass:()=>o.s,componentName:()=>o.T});var o=r(66434);customElements.define(o.T,o.s)},38479(e,t,r){r.r(t),r.d(t,{SecurityQuestionsVerifyClass:()=>f,componentName:()=>d});var o=r(66434),i=r(25964),s=r(28027),n=r(81365),a=r(9696),l=r(97810),p=r(79365);const d=(0,l.xE)("security-questions-verify"),c=["full-width","readonly","size","answer-placeholder","answer-data-errormessage-value-missing","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],u=["question-mode"],h={"answer-placeholder":"placeholder","answer-data-errormessage-value-missing":"data-errormessage-value-missing","question-mode":"mode"},y=[...c,...u],g=["questions"];class m extends((0,n.q)({componentName:d,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,i.fz)("\n :host {\n display: inline-flex;\n }\n\n div {\n display: flex;\n flex-direction: column;\n }\n ",this)}#e(){const e=this.questions.map(({id:e,text:t})=>`\n <div class="question-wrapper">\n <descope-text\n data-id="${e}"\n >${t}</descope-text>\n\n <descope-text-field\n data-id="${e}"\n required="true"\n bordered="true"\n ></descope-text-field>\n </div>\n `);this.baseElement.innerHTML=e.join("<spacer></spacer><descope-divider></descope-divider><spacer></spacer>"),this.#t(y),this.texts.forEach(e=>{const t=this.textFields.find(t=>t.getAttribute("data-id")===e.getAttribute("data-id"));t&&(e.onclick=t.focus.bind(t))})}reportValidity(){return this.textFields.reverse().forEach(e=>e.reportValidity()),this.checkValidity()}checkValidity(){return this.textFields.every(e=>e.checkValidity())}get questions(){try{return JSON.parse(this.getAttribute("questions"))||[]}catch(e){return console.error(d,"Error parsing questions attribute",e),[]}}get texts(){return Array.from(this.baseElement.querySelectorAll("descope-text"))}get textFields(){return Array.from(this.baseElement.querySelectorAll("descope-text-field"))}get elements(){return Array.from(this.baseElement.querySelectorAll("descope-text, descope-text-field"))}get value(){return this.textFields.map(e=>({id:e.getAttribute("data-id"),answer:e.value}))}set value(e=[]){e.forEach(({id:e,answer:t})=>{const r=this.textFields.find(t=>t.getAttribute("data-id")===e);r&&(r.value=t)})}#r(e,t,r){null===r?e.removeAttribute(t):e.setAttribute(t,r)}#o(e){switch(!0){case c.includes(e):return this.textFields;case u.includes(e):return this.texts;default:return[]}}#t(e){e.forEach(e=>{this.#o(e).forEach(t=>{this.#r(t,h[e]||e,this.getAttribute(e))})})}init(){super.init?.(),(0,l.mx)(this,()=>{this.#e()},{includeAttrs:g}),(0,l.mx)(this,this.#t.bind(this),{includeAttrs:y})}}const f=(0,a.Zz)((0,p.RF)({componentNameOverride:(0,l.xE)("input-wrapper")}),(0,p.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>o.s.componentName,property:o.s.cssVarList.hostDirection},{selector:()=>s.w.componentName,property:s.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},questionTextAlign:{selector:()=>o.s.componentName,property:o.s.cssVarList.textAlign},questionFontSize:{selector:()=>o.s.componentName,property:o.s.cssVarList.fontSize},questionFontFamily:{selector:()=>o.s.componentName,property:o.s.cssVarList.fontFamily},questionCursor:{selector:()=>o.s.componentName,property:"cursor"},errorMessageIcon:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessageSize},errorMessageIconPadding:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessagePadding},errorMessageIconRepeat:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessageRepeat},errorMessageIconPosition:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessagePosition},errorMessageFontSize:{selector:()=>o.s.componentName,property:o.s.cssVarList.errorMessageFontSize}}}),p.VO,p.tQ)(m);r(63595),r(64014),customElements.define(d,f)},18330(e,t,r){r.d(t,{f:()=>i});var o=r(44099);class i extends o.r{constructor(e,t){super(e,"input","input",{initializer:(e,r)=>{r.value&&(e.value=r.value),r.type&&e.setAttribute("type",r.type),e.id=this.defaultId,"function"==typeof t&&t(e)},useUniqueId:!0})}}},37436(e,t,r){r.d(t,{a:()=>i});var o=r(44218);const i=e=>class extends((0,o.R)(e)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(e){this.__dataValue=e}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value))}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate()}_onInput(e){super._onInput(e),this.invalid&&this.validate()}_valueChanged(e,t){super._valueChanged(e,t),void 0!==t&&this.invalid&&this.validate()}}},27136(e,t,r){r.d(t,{A:()=>h}),r(86689);var o=r(13256),i=r(82901),s=r(72562),n=r(81488),a=r(86314),l=r(87550),p=r(18330),d=r(37436),c=r(37720);const u=e=>class extends((0,d.a)(e)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new p.f(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e})),this.addController(new c.q(this.inputElement,this._labelController))}};(0,l.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(u((0,l.cp)((0,s.q)(o.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return o.qy`
|
|
3
3
|
<style>
|
|
4
4
|
[part='input-field'] {
|
|
5
5
|
flex-grow: 0;
|