@descope/web-components-ui 1.134.0 → 1.136.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/cjs/index.cjs.js +360 -308
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +358 -321
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/{2739.js → 3685.js} +2 -2
  6. package/dist/umd/3685.js.map +1 -0
  7. package/dist/umd/8961.js +1 -1
  8. package/dist/umd/8961.js.map +1 -1
  9. package/dist/umd/9365.js +1 -1
  10. package/dist/umd/9365.js.map +1 -1
  11. package/dist/umd/DescopeDev.js +1 -1
  12. package/dist/umd/DescopeDev.js.map +1 -1
  13. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  14. package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
  15. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  16. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  17. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  18. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
  19. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  20. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
  21. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  22. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  23. package/dist/umd/descope-date-field-index-js.js +1 -1
  24. package/dist/umd/descope-date-field-index-js.js.map +1 -1
  25. package/dist/umd/descope-email-field-index-js.js +4 -4
  26. package/dist/umd/descope-email-field-index-js.js.map +1 -1
  27. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  28. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
  29. package/dist/umd/descope-grid-index-js.js +1 -1
  30. package/dist/umd/descope-grid-index-js.js.map +1 -1
  31. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  32. package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
  33. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  34. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
  35. package/dist/umd/descope-new-password-index-js.js +1 -1
  36. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  37. package/dist/umd/descope-number-field-index-js.js +1 -1
  38. package/dist/umd/descope-number-field-index-js.js.map +1 -1
  39. package/dist/umd/descope-passcode-index-js.js +2 -2
  40. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  41. package/dist/umd/descope-password-index-js.js +1 -1
  42. package/dist/umd/descope-password-index-js.js.map +1 -1
  43. package/dist/umd/descope-radio-group-index-js.js +1 -1
  44. package/dist/umd/descope-radio-group-index-js.js.map +1 -1
  45. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  46. package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
  47. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  48. package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
  49. package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
  50. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
  51. package/dist/umd/descope-text-area-index-js.js +1 -1
  52. package/dist/umd/descope-text-area-index-js.js.map +1 -1
  53. package/dist/umd/descope-text-field-index-js.js +2 -2
  54. package/dist/umd/descope-text-field-index-js.js.map +1 -1
  55. package/dist/umd/index.js +1 -1
  56. package/dist/umd/index.js.map +1 -1
  57. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  58. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
  59. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  60. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
  61. package/package.json +24 -24
  62. package/src/components/descope-date-field/DateFieldClass.js +1 -1
  63. package/src/components/descope-date-field/date-utils.js +24 -0
  64. package/src/components/descope-date-field/descope-calendar/CalendarClass.js +1 -1
  65. package/src/components/descope-date-field/descope-calendar/helpers.js +2 -1
  66. package/src/components/descope-date-field/formats.js +1 -1
  67. package/src/components/descope-date-field/helpers.js +1 -25
  68. package/src/constants.js +1 -1
  69. package/src/helpers/themeHelpers/index.js +33 -4
  70. package/src/mixins/createStyleMixin/helpers.js +1 -1
  71. package/src/mixins/createStyleMixin/index.js +7 -1
  72. package/src/theme/components/container.js +2 -1
  73. package/dist/umd/2739.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"descope-scopes-list-index-js.js","mappings":";sLAEAA,eAAeC,OAAO,IAAe,0ECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,wGCDhB,MAAMC,GAAgB,QAAiB,QAE9C,MAAMC,WAAgB,QAAgB,CACpCD,gBACAE,aAAc,cAEd,6BAAWC,GACT,MAAO,CAAC,UAAW,WACrB,CAEA,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,gIAShD,QACE,8kBA6BAH,KAEJ,CAEA,SAAII,GACF,OAAOJ,KAAKK,WAAWC,cAAc,QAAQC,kBAC/C,CAEA,KAC4B,IAAtBP,KAAKI,MAAMI,OACbR,KAAKS,aAAa,QAAS,QAE3BT,KAAKU,gBAAgB,QAEzB,CAEA,WAAIC,GACF,OAAOX,KAAKY,aAAa,YAAc,MACzC,CAEA,KACEZ,KAAKI,MAAMS,SAASC,IAClB,IAAIC,EAAWD,EACXC,EAASC,YAAc,IAActB,gBACvCqB,EAAWD,EAAKR,cAAc,IAAcZ,gBAG9C,MAAMuB,EAAmC,UAAjBjB,KAAKW,QAAsB,OAAS,MAC5DI,GAAUN,aAAa,UAAWQ,EAAgB,GAEtD,CAEA,IAAAC,GACEnB,MAAMmB,UAGN,QAAgBlB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B,QAAiB,aA4BjCiN,GAAgB,SAC3B,QAAiB,CACflL,SAAU,CACRM,gBAAiB,CACf,CAAEH,SAAU,eACZ,CAAEA,SAAU,mBAEdI,kBAAmB,CACjB,CAAEJ,SAAU,gBACZ,CAAEA,SAAU,kBAEdQ,gBAAiB,CAAC,EAClBE,YAAa,CAAC,EACdC,YAAa,CAAC,EACdC,YAAa,CAAC,EACdH,aAAc,CAAC,EACfuK,QAAS,CAAC,EACVC,OAAQ,CAAC,EACT1K,IAAK,CAAC,EACN2K,SAAU,CAAEnL,SAAU,IAAM,SAC5BoL,WAAY,CAAC,EACbC,cAAe,CAAC,EAChBC,WAAY,CAAC,KAGjB,KACA,MApDmB5H,GACnB,cAAiCA,EAC/B,WAAAvF,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,+BAIhD,QACE,uMAWAH,KAEJ,IA+BF,IA5B2B,EA6B3B,QAAgB,CAAEN,gBAAeE,aAAc","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/../components/descope-list/src/component/ListClass.js","webpack://@descope/web-components-ui/./src/mixins/createDynamicDataMixin.js","webpack://@descope/web-components-ui/./src/components/descope-scopes-list/ScopesListClass.js","webpack://@descope/web-components-ui/./src/components/descope-scopes-list/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/booleanFieldMixin.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/index.js","webpack://@descope/web-components-ui/../components/descope-list-item/src/component/index.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js","webpack://@descope/web-components-ui/../components/descope-list/src/component/index.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/commonStyles.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-checkbox/index.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-checkbox/CheckboxClass.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js","webpack://@descope/web-components-ui/../components/descope-list-item/src/component/ListItemClass.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { ListItemClass } from '@descope-ui/descope-list-item/class';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('list');\n\nclass RawList extends createBaseClass({\n componentName,\n baseSelector: '.wrapper',\n}) {\n static get observedAttributes() {\n return ['variant', 'readonly'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <slot></slot>\n <slot name=\"empty-state\">\n No item...\n </slot>\n </div>\n\t`;\n\n injectStyle(\n `\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name=\"empty-state\"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name=\"empty-state\"] {\n display: none;\n }\n :host([empty]) slot[name=\"empty-state\"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n `,\n this,\n );\n }\n\n get items() {\n return this.shadowRoot.querySelector('slot').assignedElements();\n }\n\n #handleEmptyState() {\n if (this.items.length === 0) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n }\n\n get variant() {\n return this.getAttribute('variant') || 'list';\n }\n\n #handleItemsVariant() {\n this.items.forEach((item) => {\n let listItem = item;\n if (listItem.localName !== ListItemClass.componentName) {\n listItem = item.querySelector(ListItemClass.componentName);\n }\n\n const listItemVariant = this.variant === 'tiles' ? 'tile' : 'row';\n listItem?.setAttribute('variant', listItemVariant);\n });\n }\n\n init() {\n super.init?.();\n\n // we want new items to get the size\n observeChildren(this, () => {\n this.#handleEmptyState();\n this.#handleItemsVariant();\n this.#handleReadOnly();\n });\n }\n\n get isReadOnly() {\n return this.getAttribute('readonly') === 'true';\n }\n\n #handleReadOnly() {\n this.items.forEach((item) => {\n if (this.isReadOnly) item.setAttribute('inert', '');\n else item.removeAttribute('inert');\n });\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n\n if (newValue === oldValue) return;\n\n if (name === 'variant') {\n this.#handleItemsVariant();\n } else if (name === 'readonly') {\n this.#handleReadOnly();\n }\n }\n}\n\nexport const ListClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n maxHeight: { selector: () => ':host' },\n minHeight: {},\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-left' },\n { property: 'padding-right' },\n ],\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontFamily: {},\n gap: {},\n\n backgroundColor: {},\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n boxShadow: {},\n gridTemplateColumns: {},\n maxItemsWidth: {\n selector: () => '::slotted(:not([slot]))',\n property: 'max-width',\n },\n minItemsWidth: {\n selector: () => '::slotted(:not([slot]))',\n property: 'min-width',\n },\n itemsHorizontalAlign: {\n selector: () => '::slotted(*)',\n property: 'justify-self',\n },\n emptyStateTextColor: {\n selector: () => 'slot[name=\"empty-state\"]',\n property: 'color',\n },\n emptyStateTextFontFamily: {\n selector: () => 'slot[name=\"empty-state\"]',\n property: 'font-family',\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawList);\n","import { observeAttributes } from '../helpers/componentHelpers';\n\nconst defaultValidateSchema = () => true;\nconst defaultItemRenderer = (item) => `<pre>${JSON.stringify(item, null, 4)}</pre>`;\n\nconst createTemplate = (templateString) => {\n const template = document.createElement('template');\n template.innerHTML = templateString;\n\n return template;\n};\n\nconst getTemplateContent = (templateOrString) => {\n if (typeof templateOrString === 'string') {\n return createTemplate(templateOrString).content;\n }\n\n if (templateOrString instanceof HTMLTemplateElement) {\n return templateOrString.content;\n }\n\n // eslint-disable-next-line no-console\n console.error('Invalid template', templateOrString);\n return null;\n};\n\nexport const createDynamicDataMixin =\n ({\n itemRenderer = defaultItemRenderer,\n validateSchema = defaultValidateSchema,\n slotName,\n rerenderAttrsList = [],\n }) =>\n (superclass) =>\n class DynamicDataMixinClass extends superclass {\n #data = [];\n\n // eslint-disable-next-line class-methods-use-this\n #validateSchema(data) {\n if (!validateSchema) return true;\n\n const validation = validateSchema(data);\n if (validation === true) return true;\n\n // eslint-disable-next-line no-console\n console.error('Data schema validation failed', validation || '');\n\n return false;\n }\n\n #removeOldItems() {\n const selector = slotName ? `*[slot=\"${slotName}\"]` : ':not([slot])';\n this.baseElement.querySelectorAll(selector).forEach((item) => item.remove());\n }\n\n #renderItems() {\n this.#removeOldItems();\n this.data.forEach((item, index) => {\n const content = getTemplateContent(itemRenderer(item, index, this));\n this.baseElement.appendChild(content?.cloneNode(true));\n });\n }\n\n set data(value) {\n if (this.#validateSchema(value)) {\n this.#data = value;\n this.#renderItems();\n }\n }\n\n get data() {\n return this.#data;\n }\n\n init() {\n super.init?.();\n\n observeAttributes(\n this,\n (attrs) => {\n if (attrs.includes('data')) this.#handleDataAttr();\n else this.#renderItems();\n },\n { includeAttrs: [...rerenderAttrsList, 'data'] }\n );\n }\n\n #handleDataAttr() {\n const dataAttr = this.getAttribute('data');\n\n if (!dataAttr) return;\n\n try {\n this.data = JSON.parse(dataAttr);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Invalid JSON data', dataAttr);\n }\n }\n };\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';\nimport { createDynamicDataMixin } from '../../mixins/createDynamicDataMixin';\nimport { CheckboxClass } from '../boolean-fields/descope-checkbox/CheckboxClass';\nimport { SwitchToggleClass } from '../boolean-fields/descope-switch-toggle/SwitchToggleClass';\n\nexport const componentName = getComponentName('scopes-list');\nconst variants = ['checkbox', 'switch'];\n\nconst itemRenderer = ({ id, desc, required = false }, _, ref) => {\n const ComponentClass = ref.variant === 'checkbox' ? CheckboxClass : SwitchToggleClass;\n\n return `\n <${ComponentClass.componentName}\n bordered=\"true\"\n size=${ref.size}\n label=\"${desc}\"\n data-id=\"${id}\"\n readonly=\"${required || ref.isReadOnly}\"\n required=\"${required}\"\n checked=\"true\"\n ></${ComponentClass.componentName}>\n`;\n};\n\nclass RawScopesList 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 isReadOnly() {\n return this.getAttribute('readonly') === 'true';\n }\n\n get size() {\n return this.getAttribute('size') || 'sm';\n }\n\n #getChildNodes() {\n return Array.from(this.shadowRoot.querySelector('div').children);\n }\n\n // eslint-disable-next-line class-methods-use-this\n reportValidity() {\n this.checkValidity();\n }\n\n // eslint-disable-next-line class-methods-use-this\n checkValidity() {\n return this.data.every((item) => !item.required || this.value.includes(item.id));\n }\n\n get value() {\n return this.#getChildNodes()\n .filter((node) => node.checked)\n .map((node) => node.getAttribute('data-id'));\n }\n\n set value(val = []) {\n this.#getChildNodes().forEach((node) => {\n // eslint-disable-next-line no-param-reassign\n node.checked = val.includes(node.getAttribute('data-id'));\n });\n }\n\n get variant() {\n const variant = this.getAttribute('variant');\n\n return variants.includes(variant) ? variant : variants[0];\n }\n}\n\nexport const ScopesListClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => CheckboxClass.componentName,\n property: CheckboxClass.cssVarList.hostDirection,\n },\n {\n selector: () => SwitchToggleClass.componentName,\n property: SwitchToggleClass.cssVarList.hostDirection,\n },\n ],\n gap: { selector: () => 'div', property: 'gap' },\n requiredInputBorderColor: [\n {\n selector: `${CheckboxClass.componentName}[required=\"true\"]`,\n property: CheckboxClass.cssVarList.inputBorderColor,\n },\n {\n selector: `${SwitchToggleClass.componentName}[required=\"true\"]`,\n property: SwitchToggleClass.cssVarList.inputBorderColor,\n },\n ],\n requiredInputValueTextColor: [\n {\n selector: `${CheckboxClass.componentName}[required=\"true\"]`,\n property: CheckboxClass.cssVarList.inputValueTextColor,\n },\n {\n selector: `${SwitchToggleClass.componentName}[required=\"true\"]`,\n property: SwitchToggleClass.cssVarList.knobColor,\n },\n ],\n },\n }),\n createDynamicDataMixin({ itemRenderer, rerenderAttrsList: ['size', 'variant'] }),\n draggableMixin,\n componentNameValidationMixin\n)(RawScopesList);\n","import { componentName, ScopesListClass } from './ScopesListClass';\nimport '@descope-ui/descope-list';\nimport '../boolean-fields/descope-checkbox';\nimport '../boolean-fields/descope-switch-toggle';\n\ncustomElements.define(componentName, ScopesListClass);\n\nexport { ScopesListClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import { forwardAttrs, forwardProps, syncAttrs } from '../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-boolean-field-internal/BooleanFieldInternal';\n\nexport const booleanFieldMixin = (superclass) =>\n class BooleanFieldMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n this.checkbox = this.inputElement.querySelector('vaadin-checkbox');\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'required',\n 'full-width',\n 'size',\n 'label',\n 'invalid',\n 'disabled',\n 'readonly',\n ],\n });\n\n forwardProps(this.inputElement, this, ['checked']);\n syncAttrs(this, this.inputElement, { includeAttrs: ['checked'] });\n }\n };\n","import { componentName, SwitchToggleClass } from './SwitchToggleClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, SwitchToggleClass);\n\nexport { SwitchToggleClass, componentName };\n","import { componentName, ListItemClass } from './ListItemClass';\n\ncustomElements.define(componentName, ListItemClass);\n\nexport { ListItemClass, componentName };\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'label', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n","import '@descope-ui/descope-list-item';\n\nimport { componentName, ListClass } from './ListClass';\n\ncustomElements.define(componentName, ListClass);\n\nexport { ListClass, componentName };\n","import { resetInputFieldDefaultWidth } from '../../helpers/themeHelpers/resetHelpers';\n\nexport default `\n:host {\n\tdisplay: inline-flex;\n}\n\n${resetInputFieldDefaultWidth()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot=\"label\"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot=\"label\"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`;\n","import { componentName, CheckboxClass } from './CheckboxClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, CheckboxClass);\n\nexport { CheckboxClass, componentName };\n","import { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('checkbox');\n\nconst {\n host,\n component,\n checkboxElement,\n checkboxSurface,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: { selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::after' },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const CheckboxClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [host, checkboxElement, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: { ...checkboxLabel, property: 'color' },\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\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 inputValueTextColor: { ...checkboxSurface, property: 'color' },\n inputBackgroundColor: { ...checkboxElement, property: 'background-color' },\n\n inputBorderRadius: { ...checkboxElement, property: 'border-radius' },\n inputBorderWidth: { ...checkboxElement, property: 'border-width' },\n inputBorderOffset: { ...checkboxElement, property: 'border-offset' },\n inputBorderColor: { ...checkboxElement, property: 'border-color' },\n inputBorderStyle: { ...checkboxElement, property: 'border-style' },\n\n inputOutlineWidth: { ...checkboxElement, property: 'outline-width' },\n inputOutlineOffset: { ...checkboxElement, property: 'outline-offset' },\n inputOutlineColor: { ...checkboxElement, property: 'outline-color' },\n inputOutlineStyle: { ...checkboxElement, property: 'outline-style' },\n\n inputSize: [\n { ...checkboxElement, property: 'width' },\n { ...checkboxElement, property: 'height' },\n { ...checkboxSurface, property: 'font-size' },\n { ...component, property: 'font-size' },\n ],\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles}\n ${useHostExternalPadding(CheckboxClass.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n margin: 1px;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,\n excludeAttrsSync: ['label', 'tabindex'],\n componentName,\n })\n);\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n","import { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('switch-toggle');\n\nconst {\n host,\n component,\n checkboxElement: track,\n checkboxSurface: knob,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: { selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::after' },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SwitchToggleClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [component, checkboxLabel, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: [\n { ...checkboxLabel, property: 'color' },\n { ...checkboxLabel, property: '-webkit-text-fill-color' },\n ],\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\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 trackBorderWidth: { ...track, property: 'border-width' },\n trackBorderStyle: { ...track, property: 'border-style' },\n trackBorderColor: { ...track, property: 'border-color' },\n trackBackgroundColor: { ...track, property: 'background-color' },\n trackBorderRadius: { ...track, property: 'border-radius' },\n trackWidth: [{ ...track, property: 'width' }],\n trackHeight: [\n { ...knob, property: 'font-size' },\n { ...track, property: 'height' },\n ],\n\n knobSize: [\n { ...knob, property: 'width' },\n { ...knob, property: 'height' },\n ],\n knobTextColor: { ...knob, property: 'color' },\n knobRadius: { ...knob, property: 'border-radius' },\n knobTransitionDuration: { ...knob, property: 'transition' },\n knobColor: { ...knob, property: 'background-color' },\n knobTopOffset: { ...knob, property: 'top' },\n knobLeftOffset: { ...knob, property: 'left' },\n\n inputOutlineWidth: { ...track, property: 'outline-width' },\n inputOutlineOffset: { ...track, property: 'outline-offset' },\n inputOutlineColor: { ...track, property: 'outline-color' },\n inputOutlineStyle: { ...track, property: 'outline-style' },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles}\n\t\t\t${useHostExternalPadding(SwitchToggleClass.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot=\"label\"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['label', 'tabindex'],\n componentName,\n })\n);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n activeableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('list-item');\n\nconst customMixin = (superclass) =>\n class ListItemMixinClass extends superclass {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot></slot>\n `;\n\n injectStyle(\n `\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n `,\n this,\n );\n }\n };\n\nexport const ListItemClass = compose(\n createStyleMixin({\n mappings: {\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-left' },\n { property: 'padding-right' },\n ],\n backgroundColor: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n borderRadius: {},\n outline: {},\n cursor: {},\n gap: {},\n maxWidth: { selector: () => ':host' },\n alignItems: {},\n flexDirection: {},\n transition: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n customMixin,\n activeableMixin,\n)(createBaseClass({ componentName, baseSelector: 'slot' }));\n"],"names":["customElements","define","createBaseInputClass","args","componentName","RawList","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","items","shadowRoot","querySelector","assignedElements","length","setAttribute","removeAttribute","variant","getAttribute","forEach","item","listItem","localName","listItemVariant","init","isReadOnly","attributeChangedCallback","name","oldValue","newValue","ListClass","mappings","hostWidth","selector","property","maxHeight","minHeight","verticalPadding","horizontalPadding","hostDirection","fontFamily","gap","backgroundColor","borderRadius","borderColor","borderStyle","borderWidth","boxShadow","gridTemplateColumns","maxItemsWidth","minItemsWidth","itemsHorizontalAlign","emptyStateTextColor","emptyStateTextFontFamily","defaultValidateSchema","defaultItemRenderer","JSON","stringify","variants","RawScopesList","createBaseClass","size","Array","from","children","reportValidity","checkValidity","data","every","required","value","includes","id","filter","node","checked","map","val","ScopesListClass","CheckboxClass","cssVarList","SwitchToggleClass","requiredInputBorderColor","inputBorderColor","requiredInputValueTextColor","inputValueTextColor","knobColor","itemRenderer","validateSchema","slotName","rerenderAttrsList","superclass","validation","console","error","baseElement","querySelectorAll","remove","index","content","templateOrString","templateString","template","document","createElement","createTemplate","HTMLTemplateElement","appendChild","cloneNode","attrs","includeAttrs","dataAttr","parse","e","warn","createDynamicDataMixin","desc","_","ref","ComponentClass","InputController","host","callback","initializer","type","defaultId","useUniqueId","booleanFieldMixin","inputElement","checkbox","forwardAttributes","BaseInputClass","wrapperEle","addEventListener","isTrusted","focus","handleFocusEventsDispatching","attrName","onReadOnlyChange","getValidity","isRequired","valueMissing","component","checkboxElement","checkboxSurface","checkboxLabel","requiredIndicator","helperText","errorMessage","fontSize","labelTextColor","labelSpacing","labelLineHeight","labelFontWeight","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputBackgroundColor","inputBorderRadius","inputBorderWidth","inputBorderOffset","inputBorderStyle","inputOutlineWidth","inputOutlineOffset","inputOutlineColor","inputOutlineStyle","inputSize","proxyProps","slots","wrappedEleName","style","excludeAttrsSync","useHostExternalPadding","resetInputContainer","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","inputHeight","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","track","knob","trackBorderWidth","trackBorderStyle","trackBorderColor","trackBackgroundColor","trackBorderRadius","trackWidth","trackHeight","knobSize","knobTextColor","knobRadius","knobTransitionDuration","knobTopOffset","knobLeftOffset","ListItemClass","outline","cursor","maxWidth","alignItems","flexDirection","transition"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-scopes-list-index-js.js","mappings":";sLAEAA,eAAeC,OAAO,IAAe,0ECO9B,MAAMC,EAAuB,IAAIC,KACtC,QACE,KACA,KACA,KACA,KAJF,EAKE,UAAmBA,wGCDhB,MAAMC,GAAgB,QAAiB,QAE9C,MAAMC,WAAgB,QAAgB,CACpCD,gBACAE,aAAc,cAEd,6BAAWC,GACT,MAAO,CAAC,UAAW,WACrB,CAEA,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,gIAShD,QACE,8kBA6BAH,KAEJ,CAEA,SAAII,GACF,OAAOJ,KAAKK,WAAWC,cAAc,QAAQC,kBAC/C,CAEA,KAC4B,IAAtBP,KAAKI,MAAMI,OACbR,KAAKS,aAAa,QAAS,QAE3BT,KAAKU,gBAAgB,QAEzB,CAEA,WAAIC,GACF,OAAOX,KAAKY,aAAa,YAAc,MACzC,CAEA,KACEZ,KAAKI,MAAMS,SAASC,IAClB,IAAIC,EAAWD,EACXC,EAASC,YAAc,IAActB,gBACvCqB,EAAWD,EAAKR,cAAc,IAAcZ,gBAG9C,MAAMuB,EAAmC,UAAjBjB,KAAKW,QAAsB,OAAS,MAC5DI,GAAUN,aAAa,UAAWQ,EAAgB,GAEtD,CAEA,IAAAC,GACEnB,MAAMmB,UAGN,QAAgBl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IAAKb,EAAMhJ,SAAU,QAErCqI,kBAAmB,IAAKU,EAAO/I,SAAU,iBACzCsI,mBAAoB,IAAKS,EAAO/I,SAAU,kBAC1CuI,kBAAmB,IAAKQ,EAAO/I,SAAU,iBACzCwI,kBAAmB,IAAKO,EAAO/I,SAAU,oBAG7C,MACA,QAAgB,CAAE0I,WAAY,CAAC,QAAS,oBACxC,KACA,IA1D+B,EA4D/B,QAAY,CACVC,MAAO,GACPC,eAAgB,oBAChBC,MAAO,IAAM,WACZ,eACA,QAAuB9F,EAAkBD,+/BAsD1CgG,iBAAkB,CAAC,QAAS,YAC5BhL,6GChJG,MAAMA,GAAgB,QAAiB,aA4BjCgM,GAAgB,SAC3B,QAAiB,CACfjK,SAAU,CACRM,gBAAiB,CACf,CAAEH,SAAU,eACZ,CAAEA,SAAU,mBAEdI,kBAAmB,CACjB,CAAEJ,SAAU,gBACZ,CAAEA,SAAU,kBAEdQ,gBAAiB,CAAC,EAClBE,YAAa,CAAC,EACdC,YAAa,CAAC,EACdC,YAAa,CAAC,EACdH,aAAc,CAAC,EACfsJ,QAAS,CAAC,EACVC,OAAQ,CAAC,EACTzJ,IAAK,CAAC,EACN0J,SAAU,CAAElK,SAAU,IAAM,SAC5BmK,WAAY,CAAC,EACbC,cAAe,CAAC,EAChBC,WAAY,CAAC,KAGjB,KACA,MApDmB3G,GACnB,cAAiCA,EAC/B,WAAAvF,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,+BAIhD,QACE,uMAWAH,KAEJ,IA+BF,IA5B2B,EA6B3B,QAAgB,CAAEN,gBAAeE,aAAc","sources":["webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/../components/descope-list/src/component/ListClass.js","webpack://@descope/web-components-ui/./src/mixins/createDynamicDataMixin.js","webpack://@descope/web-components-ui/./src/components/descope-scopes-list/ScopesListClass.js","webpack://@descope/web-components-ui/./src/components/descope-scopes-list/index.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/booleanFieldMixin.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/index.js","webpack://@descope/web-components-ui/../components/descope-list-item/src/component/index.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js","webpack://@descope/web-components-ui/../components/descope-list/src/component/index.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/commonStyles.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-checkbox/index.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-checkbox/CheckboxClass.js","webpack://@descope/web-components-ui/./src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js","webpack://@descope/web-components-ui/../components/descope-list-item/src/component/ListItemClass.js"],"sourcesContent":["import BooleanFieldInternal, { componentName } from './BooleanFieldInternal';\n\ncustomElements.define(componentName, BooleanFieldInternal);\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { ListItemClass } from '@descope-ui/descope-list-item/class';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('list');\n\nclass RawList extends createBaseClass({\n componentName,\n baseSelector: '.wrapper',\n}) {\n static get observedAttributes() {\n return ['variant', 'readonly'];\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <slot></slot>\n <slot name=\"empty-state\">\n No item...\n </slot>\n </div>\n\t`;\n\n injectStyle(\n `\n .wrapper {\n overflow: auto;\n display: grid;\n max-height: 100%;\n width: 100%;\n }\n\n :host {\n display: inline-flex;\n width: 100%;\n }\n slot[name=\"empty-state\"] {\n justify-content: center;\n align-items: center;\n display: flex;\n flex-grow: 1;\n }\n\n :host slot[name=\"empty-state\"] {\n display: none;\n }\n :host([empty]) slot[name=\"empty-state\"] {\n display: flex;\n }\n ::slotted(:not([slot])) {\n width: 100%;\n }\n `,\n this,\n );\n }\n\n get items() {\n return this.shadowRoot.querySelector('slot').assignedElements();\n }\n\n #handleEmptyState() {\n if (this.items.length === 0) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n }\n\n get variant() {\n return this.getAttribute('variant') || 'list';\n }\n\n #handleItemsVariant() {\n this.items.forEach((item) => {\n let listItem = item;\n if (listItem.localName !== ListItemClass.componentName) {\n listItem = item.querySelector(ListItemClass.componentName);\n }\n\n const listItemVariant = this.variant === 'tiles' ? 'tile' : 'row';\n listItem?.setAttribute('variant', listItemVariant);\n });\n }\n\n init() {\n super.init?.();\n\n // we want new items to get the size\n observeChildren(this, () => {\n this.#handleEmptyState();\n this.#handleItemsVariant();\n this.#handleReadOnly();\n });\n }\n\n get isReadOnly() {\n return this.getAttribute('readonly') === 'true';\n }\n\n #handleReadOnly() {\n this.items.forEach((item) => {\n if (this.isReadOnly) item.setAttribute('inert', '');\n else item.removeAttribute('inert');\n });\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback?.(name, oldValue, newValue);\n\n if (newValue === oldValue) return;\n\n if (name === 'variant') {\n this.#handleItemsVariant();\n } else if (name === 'readonly') {\n this.#handleReadOnly();\n }\n }\n}\n\nexport const ListClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n maxHeight: { selector: () => ':host' },\n minHeight: {},\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-left' },\n { property: 'padding-right' },\n ],\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontFamily: {},\n gap: {},\n\n backgroundColor: {},\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n boxShadow: {},\n gridTemplateColumns: {},\n maxItemsWidth: {\n selector: () => '::slotted(:not([slot]))',\n property: 'max-width',\n },\n minItemsWidth: {\n selector: () => '::slotted(:not([slot]))',\n property: 'min-width',\n },\n itemsHorizontalAlign: {\n selector: () => '::slotted(*)',\n property: 'justify-self',\n },\n emptyStateTextColor: {\n selector: () => 'slot[name=\"empty-state\"]',\n property: 'color',\n },\n emptyStateTextFontFamily: {\n selector: () => 'slot[name=\"empty-state\"]',\n property: 'font-family',\n },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawList);\n","import { observeAttributes } from '../helpers/componentHelpers';\n\nconst defaultValidateSchema = () => true;\nconst defaultItemRenderer = (item) => `<pre>${JSON.stringify(item, null, 4)}</pre>`;\n\nconst createTemplate = (templateString) => {\n const template = document.createElement('template');\n template.innerHTML = templateString;\n\n return template;\n};\n\nconst getTemplateContent = (templateOrString) => {\n if (typeof templateOrString === 'string') {\n return createTemplate(templateOrString).content;\n }\n\n if (templateOrString instanceof HTMLTemplateElement) {\n return templateOrString.content;\n }\n\n // eslint-disable-next-line no-console\n console.error('Invalid template', templateOrString);\n return null;\n};\n\nexport const createDynamicDataMixin =\n ({\n itemRenderer = defaultItemRenderer,\n validateSchema = defaultValidateSchema,\n slotName,\n rerenderAttrsList = [],\n }) =>\n (superclass) =>\n class DynamicDataMixinClass extends superclass {\n #data = [];\n\n // eslint-disable-next-line class-methods-use-this\n #validateSchema(data) {\n if (!validateSchema) return true;\n\n const validation = validateSchema(data);\n if (validation === true) return true;\n\n // eslint-disable-next-line no-console\n console.error('Data schema validation failed', validation || '');\n\n return false;\n }\n\n #removeOldItems() {\n const selector = slotName ? `*[slot=\"${slotName}\"]` : ':not([slot])';\n this.baseElement.querySelectorAll(selector).forEach((item) => item.remove());\n }\n\n #renderItems() {\n this.#removeOldItems();\n this.data.forEach((item, index) => {\n const content = getTemplateContent(itemRenderer(item, index, this));\n this.baseElement.appendChild(content?.cloneNode(true));\n });\n }\n\n set data(value) {\n if (this.#validateSchema(value)) {\n this.#data = value;\n this.#renderItems();\n }\n }\n\n get data() {\n return this.#data;\n }\n\n init() {\n super.init?.();\n\n observeAttributes(\n this,\n (attrs) => {\n if (attrs.includes('data')) this.#handleDataAttr();\n else this.#renderItems();\n },\n { includeAttrs: [...rerenderAttrsList, 'data'] }\n );\n }\n\n #handleDataAttr() {\n const dataAttr = this.getAttribute('data');\n\n if (!dataAttr) return;\n\n try {\n this.data = JSON.parse(dataAttr);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Invalid JSON data', dataAttr);\n }\n }\n };\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';\nimport { createDynamicDataMixin } from '../../mixins/createDynamicDataMixin';\nimport { CheckboxClass } from '../boolean-fields/descope-checkbox/CheckboxClass';\nimport { SwitchToggleClass } from '../boolean-fields/descope-switch-toggle/SwitchToggleClass';\n\nexport const componentName = getComponentName('scopes-list');\nconst variants = ['checkbox', 'switch'];\n\nconst itemRenderer = ({ id, desc, required = false }, _, ref) => {\n const ComponentClass = ref.variant === 'checkbox' ? CheckboxClass : SwitchToggleClass;\n\n return `\n <${ComponentClass.componentName}\n bordered=\"true\"\n size=${ref.size}\n label=\"${desc}\"\n data-id=\"${id}\"\n readonly=\"${required || ref.isReadOnly}\"\n required=\"${required}\"\n checked=\"true\"\n ></${ComponentClass.componentName}>\n`;\n};\n\nclass RawScopesList 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 isReadOnly() {\n return this.getAttribute('readonly') === 'true';\n }\n\n get size() {\n return this.getAttribute('size') || 'sm';\n }\n\n #getChildNodes() {\n return Array.from(this.shadowRoot.querySelector('div').children);\n }\n\n // eslint-disable-next-line class-methods-use-this\n reportValidity() {\n this.checkValidity();\n }\n\n // eslint-disable-next-line class-methods-use-this\n checkValidity() {\n return this.data.every((item) => !item.required || this.value.includes(item.id));\n }\n\n get value() {\n return this.#getChildNodes()\n .filter((node) => node.checked)\n .map((node) => node.getAttribute('data-id'));\n }\n\n set value(val = []) {\n this.#getChildNodes().forEach((node) => {\n // eslint-disable-next-line no-param-reassign\n node.checked = val.includes(node.getAttribute('data-id'));\n });\n }\n\n get variant() {\n const variant = this.getAttribute('variant');\n\n return variants.includes(variant) ? variant : variants[0];\n }\n}\n\nexport const ScopesListClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: [\n { selector: () => ':host', property: 'direction' },\n {\n selector: () => CheckboxClass.componentName,\n property: CheckboxClass.cssVarList.hostDirection,\n },\n {\n selector: () => SwitchToggleClass.componentName,\n property: SwitchToggleClass.cssVarList.hostDirection,\n },\n ],\n gap: { selector: () => 'div', property: 'gap' },\n requiredInputBorderColor: [\n {\n selector: `${CheckboxClass.componentName}[required=\"true\"]`,\n property: CheckboxClass.cssVarList.inputBorderColor,\n },\n {\n selector: `${SwitchToggleClass.componentName}[required=\"true\"]`,\n property: SwitchToggleClass.cssVarList.inputBorderColor,\n },\n ],\n requiredInputValueTextColor: [\n {\n selector: `${CheckboxClass.componentName}[required=\"true\"]`,\n property: CheckboxClass.cssVarList.inputValueTextColor,\n },\n {\n selector: `${SwitchToggleClass.componentName}[required=\"true\"]`,\n property: SwitchToggleClass.cssVarList.knobColor,\n },\n ],\n },\n }),\n createDynamicDataMixin({ itemRenderer, rerenderAttrsList: ['size', 'variant'] }),\n draggableMixin,\n componentNameValidationMixin\n)(RawScopesList);\n","import { componentName, ScopesListClass } from './ScopesListClass';\nimport '@descope-ui/descope-list';\nimport '../boolean-fields/descope-checkbox';\nimport '../boolean-fields/descope-switch-toggle';\n\ncustomElements.define(componentName, ScopesListClass);\n\nexport { ScopesListClass, componentName };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","import { forwardAttrs, forwardProps, syncAttrs } from '../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-boolean-field-internal/BooleanFieldInternal';\n\nexport const booleanFieldMixin = (superclass) =>\n class BooleanFieldMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n\t\t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n this.checkbox = this.inputElement.querySelector('vaadin-checkbox');\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'required',\n 'full-width',\n 'size',\n 'label',\n 'invalid',\n 'disabled',\n 'readonly',\n ],\n });\n\n forwardProps(this.inputElement, this, ['checked']);\n syncAttrs(this, this.inputElement, { includeAttrs: ['checked'] });\n }\n };\n","import { componentName, SwitchToggleClass } from './SwitchToggleClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, SwitchToggleClass);\n\nexport { SwitchToggleClass, componentName };\n","import { componentName, ListItemClass } from './ListItemClass';\n\ncustomElements.define(componentName, ListItemClass);\n\nexport { ListItemClass, componentName };\n","import { createBaseInputClass } from '../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('boolean-field-internal');\n\nconst forwardAttributes = ['disabled', 'label', 'invalid', 'readonly'];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass BooleanInputInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['readonly'];\n }\n\n constructor() {\n super();\n this.innerHTML = `\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t`;\n this.wrapperEle = this.querySelector('div');\n this.checkbox = this.querySelector('vaadin-checkbox');\n }\n\n get value() {\n return this.checkbox?.checked;\n }\n\n set value(val) {\n this.checkbox.checked = val;\n }\n\n get checked() {\n return this.value;\n }\n\n set checked(val) {\n this.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n if (e.isTrusted) {\n this.checkbox.focus();\n }\n });\n super.init?.();\n\n forwardAttrs(this, this.checkbox, { includeAttrs: forwardAttributes });\n syncAttrs(this, this.checkbox, { includeAttrs: ['checked'] });\n\n // we need it in order to set the focus ring and trigger validation on descope-checkbox\n this.handleFocusEventsDispatching([this.checkbox]);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue !== null);\n }\n }\n\n onReadOnlyChange(val) {\n this.baseElement.setAttribute('inert', val);\n }\n\n getValidity() {\n if (this.isRequired && !this.value) {\n return { valueMissing: true };\n }\n return {};\n }\n}\n\nexport default BooleanInputInternal;\n","import '@descope-ui/descope-list-item';\n\nimport { componentName, ListClass } from './ListClass';\n\ncustomElements.define(componentName, ListClass);\n\nexport { ListClass, componentName };\n","import { resetInputFieldDefaultWidth } from '../../helpers/themeHelpers/resetHelpers';\n\nexport default `\n:host {\n\tdisplay: inline-flex;\n}\n\n${resetInputFieldDefaultWidth()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n content: unset;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot=\"label\"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot=\"label\"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`;\n","import { componentName, CheckboxClass } from './CheckboxClass';\nimport '@vaadin/checkbox';\nimport '@vaadin/text-field';\nimport '../descope-boolean-field-internal';\n\ncustomElements.define(componentName, CheckboxClass);\n\nexport { CheckboxClass, componentName };\n","import { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('checkbox');\n\nconst {\n host,\n component,\n checkboxElement,\n checkboxSurface,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: { selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::after' },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const CheckboxClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [host, checkboxElement, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: { ...checkboxLabel, property: 'color' },\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\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 inputValueTextColor: { ...checkboxSurface, property: 'color' },\n inputBackgroundColor: { ...checkboxElement, property: 'background-color' },\n\n inputBorderRadius: { ...checkboxElement, property: 'border-radius' },\n inputBorderWidth: { ...checkboxElement, property: 'border-width' },\n inputBorderOffset: { ...checkboxElement, property: 'border-offset' },\n inputBorderColor: { ...checkboxElement, property: 'border-color' },\n inputBorderStyle: { ...checkboxElement, property: 'border-style' },\n\n inputOutlineWidth: { ...checkboxElement, property: 'outline-width' },\n inputOutlineOffset: { ...checkboxElement, property: 'outline-offset' },\n inputOutlineColor: { ...checkboxElement, property: 'outline-color' },\n inputOutlineStyle: { ...checkboxElement, property: 'outline-style' },\n\n inputSize: [\n { ...checkboxElement, property: 'width' },\n { ...checkboxElement, property: 'height' },\n { ...checkboxSurface, property: 'font-size' },\n { ...component, property: 'font-size' },\n ],\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles}\n ${useHostExternalPadding(CheckboxClass.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n margin: 1px;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n -webkit-text-fill-color: initial;\n }\n\n vaadin-checkbox label {\n -webkit-text-fill-color: initial;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,\n excludeAttrsSync: ['label', 'tabindex'],\n componentName,\n })\n);\n","import { getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createStyleMixin,\n proxyInputMixin,\n draggableMixin,\n componentNameValidationMixin,\n createProxy,\n} from '../../../mixins';\nimport { booleanFieldMixin } from '../booleanFieldMixin';\nimport commonStyles from '../commonStyles';\nimport { useHostExternalPadding } from '../../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('switch-toggle');\n\nconst {\n host,\n component,\n checkboxElement: track,\n checkboxSurface: knob,\n checkboxLabel,\n requiredIndicator,\n helperText,\n errorMessage,\n} = {\n host: { selector: () => ':host' },\n requiredIndicator: { selector: '[required] vaadin-checkbox [slot=\"label\"]:not(:empty)::after' },\n component: { selector: 'vaadin-checkbox' },\n checkboxElement: { selector: 'vaadin-checkbox::part(checkbox)' },\n checkboxSurface: { selector: 'vaadin-checkbox::part(checkbox)::after' },\n checkboxLabel: { selector: 'vaadin-checkbox [slot=\"label\"]:not(:empty)' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SwitchToggleClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n\n fontSize: [component, checkboxLabel, checkboxLabel],\n fontFamily: [checkboxLabel, helperText, errorMessage],\n\n labelTextColor: [\n { ...checkboxLabel, property: 'color' },\n { ...checkboxLabel, property: '-webkit-text-fill-color' },\n ],\n labelSpacing: { ...checkboxLabel, property: 'padding-inline-start' },\n labelLineHeight: { ...checkboxLabel, property: 'line-height' },\n labelFontWeight: { ...checkboxLabel, property: 'font-weight' },\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\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 trackBorderWidth: { ...track, property: 'border-width' },\n trackBorderStyle: { ...track, property: 'border-style' },\n trackBorderColor: { ...track, property: 'border-color' },\n trackBackgroundColor: { ...track, property: 'background-color' },\n trackBorderRadius: { ...track, property: 'border-radius' },\n trackWidth: [{ ...track, property: 'width' }],\n trackHeight: [\n { ...knob, property: 'font-size' },\n { ...track, property: 'height' },\n ],\n\n knobSize: [\n { ...knob, property: 'width' },\n { ...knob, property: 'height' },\n ],\n knobTextColor: { ...knob, property: 'color' },\n knobRadius: { ...knob, property: 'border-radius' },\n knobTransitionDuration: { ...knob, property: 'transition' },\n knobColor: { ...knob, property: 'background-color' },\n knobTopOffset: { ...knob, property: 'top' },\n knobLeftOffset: { ...knob, property: 'left' },\n\n inputOutlineWidth: { ...track, property: 'outline-width' },\n inputOutlineOffset: { ...track, property: 'outline-offset' },\n inputOutlineColor: { ...track, property: 'outline-color' },\n inputOutlineStyle: { ...track, property: 'outline-style' },\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n componentNameValidationMixin,\n booleanFieldMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t${commonStyles}\n\t\t\t${useHostExternalPadding(SwitchToggleClass.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n width: 100%;\n }\n\n vaadin-text-field::part(input-field) {\n cursor: pointer;\n }\n\n vaadin-checkbox {\n cursor: pointer;\n }\n\n vaadin-checkbox [slot=\"label\"]:not(:empty) {\n cursor: pointer;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::before {\n content: '';\n\t\t\t}\n\n vaadin-checkbox[active]::part(checkbox) {\n\t\t\t\ttransform: none;\n\t\t\t}\n\n vaadin-checkbox::part(checkbox)::after {\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 1;\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['label', 'tabindex'],\n componentName,\n })\n);\n","import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n activeableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('list-item');\n\nconst customMixin = (superclass) =>\n class ListItemMixinClass extends superclass {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot></slot>\n `;\n\n injectStyle(\n `\n slot {\n width: 100%;\n display: flex;\n overflow: hidden;\n box-sizing: border-box;\n }\n :host {\n display: block;\n }\n `,\n this,\n );\n }\n };\n\nexport const ListItemClass = compose(\n createStyleMixin({\n mappings: {\n verticalPadding: [\n { property: 'padding-top' },\n { property: 'padding-bottom' },\n ],\n horizontalPadding: [\n { property: 'padding-left' },\n { property: 'padding-right' },\n ],\n backgroundColor: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n borderRadius: {},\n outline: {},\n cursor: {},\n gap: {},\n maxWidth: { selector: () => ':host' },\n alignItems: {},\n flexDirection: {},\n transition: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n customMixin,\n activeableMixin,\n)(createBaseClass({ componentName, baseSelector: 'slot' }));\n"],"names":["customElements","define","createBaseInputClass","args","componentName","RawList","baseSelector","observedAttributes","constructor","super","this","attachShadow","mode","innerHTML","items","shadowRoot","querySelector","assignedElements","length","setAttribute","removeAttribute","variant","getAttribute","forEach","item","listItem","localName","listItemVariant","init","isReadOnly","attributeChangedCallback","name","oldValue","newValue","ListClass","mappings","hostWidth","selector","property","maxHeight","minHeight","verticalPadding","horizontalPadding","hostDirection","fontFamily","gap","backgroundColor","borderRadius","borderColor","borderStyle","borderWidth","boxShadow","gridTemplateColumns","maxItemsWidth","minItemsWidth","itemsHorizontalAlign","emptyStateTextColor","emptyStateTextFontFamily","defaultValidateSchema","defaultItemRenderer","JSON","stringify","variants","RawScopesList","createBaseClass","size","Array","from","children","reportValidity","checkValidity","data","every","required","value","includes","id","filter","node","checked","map","val","ScopesListClass","CheckboxClass","cssVarList","SwitchToggleClass","requiredInputBorderColor","inputBorderColor","requiredInputValueTextColor","inputValueTextColor","knobColor","itemRenderer","validateSchema","slotName","rerenderAttrsList","superclass","validation","console","error","baseElement","querySelectorAll","remove","index","content","templateOrString","templateString","template","document","createElement","createTemplate","HTMLTemplateElement","appendChild","cloneNode","attrs","includeAttrs","dataAttr","parse","e","warn","createDynamicDataMixin","desc","_","ref","ComponentClass","InputController","host","callback","initializer","type","defaultId","useUniqueId","booleanFieldMixin","inputElement","checkbox","forwardAttributes","BaseInputClass","wrapperEle","addEventListener","isTrusted","focus","handleFocusEventsDispatching","attrName","onReadOnlyChange","getValidity","isRequired","valueMissing","component","checkboxElement","checkboxSurface","checkboxLabel","requiredIndicator","helperText","errorMessage","fontSize","labelTextColor","labelSpacing","labelLineHeight","labelFontWeight","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","inputBackgroundColor","inputBorderRadius","inputBorderWidth","inputBorderOffset","inputBorderStyle","inputOutlineWidth","inputOutlineOffset","inputOutlineColor","inputOutlineStyle","inputSize","proxyProps","slots","wrappedEleName","style","excludeAttrsSync","track","knob","trackBorderWidth","trackBorderStyle","trackBorderColor","trackBackgroundColor","trackBorderRadius","trackWidth","trackHeight","knobSize","knobTextColor","knobRadius","knobTransitionDuration","knobTopOffset","knobLeftOffset","ListItemClass","outline","cursor","maxWidth","alignItems","flexDirection","transition"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3594],{6424:(e,t,r)=>{r.d(t,{A:()=>x});const{host:o,label:i,placeholder:n,requiredIndicator:a,inputField:l,input:s,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:b,externalInput:y,externalInputDisabled:g,externalPlaceholder:f,externalDisabledPlaceholder:m}={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,l,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...a,property:"color"},{...i,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputDirection:{...s,property:"direction"},inputBackgroundColor:[{...l,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:[{...l,property:"color"},{...h,property:"-webkit-text-fill-color"},{...g,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...s,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...a,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:[{...s,property:"padding-left"},{...s,property:"padding-right"},{...y,property:"padding-left"},{...y,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:[{...s,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...f,property:"color"},{...n,property:"color"},{...u,property:"-webkit-text-fill-color"},{...m,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:[{...l,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...s,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...s,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...b,property:"margin-right"},{...b,property:"margin-left"}],inputIconSize:{...b,property:"font-size"},inputIconColor:{...b,property:"color"}}},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)},73551:(e,t,r)=>{r.d(t,{$J:()=>u,I4:()=>a,Kl:()=>h,LJ:()=>c,Qv:()=>n,X6:()=>s,cy:()=>o,fu:()=>p,kG:()=>d,lS:()=>l,zm:()=>i});const o=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,n=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,d=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${i(e)}\n ${a(e)}\n ${l(e)}\n ${n(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${d(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,u=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},74460:(e,t,r)=>{r.r(t),r.d(t,{SecurityQuestionsSetupClass:()=>b,componentName:()=>d});var o=r(81365),i=r(9696),n=r(97810),a=r(79365),l=r(86365),s=r(79275),p=r(25964);const d=(0,n.xE)("security-questions-setup"),c=["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,o.q)({componentName:d,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,p.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(c)}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(d,"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,n.mx)(this,(()=>{this.#e()}),{includeAttrs:u}),(0,n.mx)(this,this.#t.bind(this),{includeAttrs:c})}}const b=(0,i.Zz)((0,a.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>l.C.componentName,property:l.C.cssVarList.hostDirection},{selector:()=>s.w.componentName,property:s.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"}}}),a.VO,a.tQ)(h);r(21374),r(27092),customElements.define(d,b)},79275:(e,t,r)=>{r.d(t,{T:()=>s,w:()=>d});var o=r(79365),i=r(6424),n=r(9696),a=r(97810),l=r(73551);const s=(0,a.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(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(${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,l.$J)("vaadin-text-field")}\n\t\t\t${(0,l.cy)(d.cssVarList)}\n\t\t\t${(0,l.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,l.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:s}))}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3594],{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"},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"}}},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)},74460:(e,t,r)=>{r.r(t),r.d(t,{SecurityQuestionsSetupClass:()=>y,componentName:()=>c});var o=r(81365),i=r(9696),n=r(97810),s=r(79365),l=r(86365),a=r(79275),p=r(25964);const c=(0,n.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,o.q)({componentName:c,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,p.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,n.mx)(this,(()=>{this.#e()}),{includeAttrs:u}),(0,n.mx)(this,this.#t.bind(this),{includeAttrs:d})}}const y=(0,i.Zz)((0,s.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>l.C.componentName,property:l.C.cssVarList.hostDirection},{selector:()=>a.w.componentName,property:a.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"}}}),s.VO,s.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}))}}]);
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":"yJAAA,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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AOF,EAAWC,oBAAsB,GAC/D,CAEAE,KAEA,IAAAf,GACEhE,MAAMgE,QACR,CAEA,qBAAAgB,CAAsBC,GACpB,IAAKA,EAEH,YADAhF,KAAK8E,MAAMG,SAIb,MAAMC,EAAiB,CACrBJ,KAAM,gBACNK,MAAO,OACPC,MAAO,mBAGHC,EAAmB,CACvBP,KAAM,wBACNK,MAAO,SACPC,MAAO,mBAGTpF,KAAK8E,KAAOQ,OAAOC,OAAOC,SAASC,cAAc,eAAgB,CAC/DC,KAAM,YACHR,IAGLlF,KAAKc,YAAY6E,YAAY3F,KAAK8E,MAClC9E,KAAK8E,KAAK3D,iBAAiB,SAAS,KAClCyE,UAAUC,UAAUC,UAAU9F,KAAKwB,OACnC8D,OAAOC,OAAOvF,KAAK8E,KAAMO,GAGzBU,YAAW,KACTT,OAAOC,OAAOvF,KAAK8E,KAAMI,EAAe,GACvC,IAAK,GAEZ,CAEA,YAAAc,GACEhG,KAAKiG,OACP,CAEA,wBAAAC,CAAyB9C,EAAU+C,EAAQC,GACzCrG,MAAMsG,0BAA0BjD,EAAU+C,EAAQC,GAOjC,SAAbhD,GACFpD,KAAKc,YAAYwF,SAASF,GAGxBD,IAAWC,IACI,eAAbhD,EACa,aAAXgD,EACFpG,KAAKmB,iBAAiB,QAASnB,KAAKgG,cAEpChG,KAAKuG,oBAAoB,QAASvG,KAAKgG,cAEnB,sBAAb5C,GACTpD,KAAK+E,sBAAiC,SAAXqB,GAGjC,IAG0B,EAS5B,QAAY,CACVI,MAAO,CAAC,SAAU,UAClBC,eAAgB,oBAChBrB,MAAO,IAAM,wGAIOd,EAAe/F,WAAWrB,4BACxCoH,EAAe/F,WAAWpB,+cAc5B,QAAwB,gCAC3B,QAAuBmH,EAAe/F,uBACtC,QAAoB,oBAAqB+F,EAAe/F,uBACrD,iGAMJmI,iBAAkB,CAAC,WAAY,SAC/BlH,kB","sources":["webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.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","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.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: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n};\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","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n","import { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName, observeAttributes } from '../../helpers/componentHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';\nimport { ComboBoxClass } from '@descope-ui/descope-combo-box/class';\nimport { TextFieldClass } from '../descope-text-field/TextFieldClass';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\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 // eslint-disable-next-line no-param-reassign\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((item) => {\n return 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 // eslint-disable-next-line no-param-reassign\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 // eslint-disable-next-line class-methods-use-this\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"],"names":["host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","fontSize","fontFamily","labelFontSize","property","labelFontWeight","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","customElements","define","useHostExternalPadding","cssVarList","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","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","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","attrName","removeAttribute","setAttribute","attrs","componentMap","question","attr","maybeComponentType","rest","split","elements","init","includeAttrs","bind","SecurityQuestionsSetupClass","mappings","ComboBoxClass","C","TextFieldClass","gap","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","excludeAttrsSync"],"sourceRoot":""}
1
+ {"version":3,"file":"descope-security-questions-setup-index-js.js","mappings":"yJAAA,MAAM,KACJA,EAAI,MACJC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wBAAAC,CAAyB/C,EAAUgD,EAAQC,GACzCvG,MAAMwG,0BAA0BlD,EAAUgD,EAAQC,GAOjC,SAAbjD,GACFrD,KAAKc,YAAY0F,SAASF,GAGxBD,IAAWC,IACI,eAAbjD,EACa,aAAXiD,EACFtG,KAAKmB,iBAAiB,QAASnB,KAAKkG,cAEpClG,KAAKyG,oBAAoB,QAASzG,KAAKkG,cAEnB,sBAAb7C,GACTrD,KAAKiF,sBAAiC,SAAXqB,GAGjC,IAG0B,EAS5B,QAAY,CACVI,MAAO,CAAC,SAAU,UAClBC,eAAgB,oBAChBrB,MAAO,IAAM,wGAIOd,EAAeD,WAAWnG,4BACxCoG,EAAeD,WAAWlG,+cAc5B,QAAwB,gCAC3B,QAAuBmG,EAAeD,uBACtC,QAAoB,oBAAqBC,EAAeD,uBACrD,iGAMJqC,iBAAkB,CAAC,WAAY,SAC/BpH,kB","sources":["webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.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","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.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: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n};\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","import { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName, observeAttributes } from '../../helpers/componentHelpers';\nimport { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';\nimport { ComboBoxClass } from '@descope-ui/descope-combo-box/class';\nimport { TextFieldClass } from '../descope-text-field/TextFieldClass';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\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 // eslint-disable-next-line no-param-reassign\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((item) => {\n return 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 // eslint-disable-next-line no-param-reassign\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 // eslint-disable-next-line class-methods-use-this\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"],"names":["host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","fontSize","fontFamily","labelFontSize","property","labelFontWeight","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","customElements","define","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","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","attrName","removeAttribute","setAttribute","attrs","componentMap","question","attr","maybeComponentType","rest","split","elements","init","includeAttrs","bind","SecurityQuestionsSetupClass","mappings","ComboBoxClass","C","cssVarList","TextFieldClass","gap","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","excludeAttrsSync"],"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,5166,9446],{6424:(e,t,r)=>{r.d(t,{A:()=>x});const{host:n,label:i,placeholder:o,requiredIndicator:s,inputField:a,input:l,inputMask:p,helperText:d,errorMessage:c,disabledPlaceholder:u,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:m,externalPlaceholder:b,externalDisabledPlaceholder:f}={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:[{},n],fontFamily:[i,a,d,c],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...s,property:"color"},{...i,property:"-webkit-text-fill-color"},{...s,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,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:{...s,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...b,property:"color"},{...o,property:"color"},{...u,property:"-webkit-text-fill-color"},{...f,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"},{...b,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"}}},11284:(e,t,r)=>{r(52733),r(27136)},18330:(e,t,r)=>{r.d(t,{f:()=>i});var n=r(44099);class i extends n.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})}}},21374:(e,t,r)=>{r.r(t),r.d(t,{TextFieldClass:()=>n.w,componentName:()=>n.T}),r(11284),r(37182),r(95260);var n=r(79275);customElements.define(n.T,n.w)},27136:(e,t,r)=>{r.d(t,{A:()=>h}),r(86689);var n=r(13256),i=r(82901),o=r(90676),s=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,o.q)(n.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return n.qy`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,5166,9446],{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:b,externalDisabledPlaceholder:f}={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"},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"},{...b,property:"color"},{...s,property:"color"},{...u,property:"-webkit-text-fill-color"},{...f,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"},{...b,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"}}},11284:(e,t,r)=>{r(52733),r(27136)},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})}}},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)},27136:(e,t,r)=>{r.d(t,{A:()=>h}),r(86689);var o=r(13256),i=r(82901),s=r(90676),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;
@@ -34,5 +34,5 @@
34
34
  </div>
35
35
  </div>
36
36
  <slot name="tooltip"></slot>
37
- `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new s.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,i.X)(h)},37436:(e,t,r)=>{r.d(t,{a:()=>i});var n=r(44218);const i=e=>class extends((0,n.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()}}},38479:(e,t,r)=>{r.r(t),r.d(t,{SecurityQuestionsVerifyClass:()=>b,componentName:()=>d});var n=r(81365),i=r(9696),o=r(97810),s=r(79365),a=r(66434),l=r(79275),p=r(25964);const d=(0,o.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,p.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)}#n(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.#n(e).forEach((t=>{this.#r(t,h[e]||e,this.getAttribute(e))}))}))}init(){super.init?.(),(0,o.mx)(this,(()=>{this.#e()}),{includeAttrs:g}),(0,o.mx)(this,this.#t.bind(this),{includeAttrs:y})}}const b=(0,i.Zz)((0,s.RF)({componentNameOverride:(0,o.xE)("input-wrapper")}),(0,s.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>a.s.componentName,property:a.s.cssVarList.hostDirection},{selector:()=>l.w.componentName,property:l.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},questionTextAlign:{selector:()=>a.s.componentName,property:a.s.cssVarList.textAlign},questionFontSize:{selector:()=>a.s.componentName,property:a.s.cssVarList.fontSize},questionFontFamily:{selector:()=>a.s.componentName,property:a.s.cssVarList.fontFamily},questionCursor:{selector:()=>a.s.componentName,property:"cursor"},errorMessageIcon:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessageSize},errorMessageIconPadding:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessagePadding},errorMessageIconRepeat:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessageRepeat},errorMessageIconPosition:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessagePosition},errorMessageFontSize:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessageFontSize}}}),s.VO,s.tQ)(m);r(63595),r(21374),customElements.define(d,b)},52733:(e,t,r)=>{r(27397);var n=r(47642);(0,r(87550).SF)("vaadin-text-field",n.k,{moduleId:"lumo-text-field-styles"}),r(27136)},63595:(e,t,r)=>{r.r(t),r.d(t,{TextClass:()=>n.s,componentName:()=>n.T});var n=r(66434);customElements.define(n.T,n.s)},66434:(e,t,r)=>{r.d(t,{T:()=>a,s:()=>d});var n=r(88961),i=r(63200),o=r(25964),s=r(72270);const a=(0,o.xE)("text");class l extends((0,s.qu)({componentName:a,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,o.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,o.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,n.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:{}}}),n.VO,n.tQ)(l)},73551:(e,t,r)=>{r.d(t,{$J:()=>u,I4:()=>s,Kl:()=>h,LJ:()=>c,Qv:()=>o,X6:()=>l,cy:()=>n,fu:()=>p,kG:()=>d,lS:()=>a,zm:()=>i});const n=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,d=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,c=(e,t)=>`\n ${i(e)}\n ${s(e)}\n ${a(e)}\n ${o(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${d(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,u=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},79275:(e,t,r)=>{r.d(t,{T:()=>l,w:()=>d});var n=r(79365),i=r(6424),o=r(9696),s=r(97810),a=r(73551);const l=(0,s.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,n.RF)({mappings:i.A}),n.VO,(0,n.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.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,n.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}))}}]);
37
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new n.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,i.X)(h)},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()}}},38479:(e,t,r)=>{r.r(t),r.d(t,{SecurityQuestionsVerifyClass:()=>b,componentName:()=>d});var o=r(81365),i=r(9696),s=r(97810),n=r(79365),a=r(66434),l=r(79275),p=r(25964);const d=(0,s.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,o.q)({componentName:d,baseSelector:"div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n <div></div>\n\t\t",(0,p.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,s.mx)(this,(()=>{this.#e()}),{includeAttrs:g}),(0,s.mx)(this,this.#t.bind(this),{includeAttrs:y})}}const b=(0,i.Zz)((0,n.RF)({componentNameOverride:(0,s.xE)("input-wrapper")}),(0,n.RF)({mappings:{hostWidth:[{selector:()=>":host",property:"width"},{property:"width"}],hostDirection:[{selector:()=>":host",property:"direction"},{selector:()=>a.s.componentName,property:a.s.cssVarList.hostDirection},{selector:()=>l.w.componentName,property:l.w.cssVarList.hostDirection}],gap:{selector:()=>"div",property:"gap"},questionTextAlign:{selector:()=>a.s.componentName,property:a.s.cssVarList.textAlign},questionFontSize:{selector:()=>a.s.componentName,property:a.s.cssVarList.fontSize},questionFontFamily:{selector:()=>a.s.componentName,property:a.s.cssVarList.fontFamily},questionCursor:{selector:()=>a.s.componentName,property:"cursor"},errorMessageIcon:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessageIcon},errorMessageIconSize:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessageSize},errorMessageIconPadding:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessagePadding},errorMessageIconRepeat:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessageRepeat},errorMessageIconPosition:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessagePosition},errorMessageFontSize:{selector:()=>a.s.componentName,property:a.s.cssVarList.errorMessageFontSize}}}),n.VO,n.tQ)(m);r(63595),r(21374),customElements.define(d,b)},52733:(e,t,r)=>{r(27397);var o=r(47642);(0,r(87550).SF)("vaadin-text-field",o.k,{moduleId:"lumo-text-field-styles"}),r(27136)},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)},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:{}}}),o.VO,o.tQ)(l)},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}))}}]);
38
38
  //# sourceMappingURL=descope-security-questions-verify-index-js.js.map