@descope/web-components-ui 2.1.15 → 2.1.16

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 (108) hide show
  1. package/dist/cjs/index.cjs.js +25 -23
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +25 -23
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/7092.js +1 -1
  6. package/dist/umd/7092.js.map +1 -1
  7. package/dist/umd/DescopeDev.js +1 -1
  8. package/dist/umd/DescopeDev.js.map +1 -1
  9. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  10. package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -1
  11. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  12. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -1
  13. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  14. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
  15. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  16. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
  17. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +2 -2
  18. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
  19. package/dist/umd/descope-address-field.js +1 -1
  20. package/dist/umd/descope-address-field.js.map +1 -1
  21. package/dist/umd/descope-apps-list.js +1 -1
  22. package/dist/umd/descope-apps-list.js.map +1 -1
  23. package/dist/umd/descope-autocomplete-field.js +1 -1
  24. package/dist/umd/descope-autocomplete-field.js.map +1 -1
  25. package/dist/umd/descope-button.js +2 -2
  26. package/dist/umd/descope-button.js.map +1 -1
  27. package/dist/umd/descope-collapsible-container.js +1 -1
  28. package/dist/umd/descope-collapsible-container.js.map +1 -1
  29. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  30. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
  31. package/dist/umd/descope-email-field-index-js.js +1 -1
  32. package/dist/umd/descope-email-field-index-js.js.map +1 -1
  33. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  34. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
  35. package/dist/umd/descope-grid-index-js.js +1 -1
  36. package/dist/umd/descope-grid-index-js.js.map +1 -1
  37. package/dist/umd/descope-hybrid-field-index-js.js +2 -2
  38. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
  39. package/dist/umd/descope-icon.js +1 -1
  40. package/dist/umd/descope-icon.js.map +1 -1
  41. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  42. package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
  43. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  44. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
  45. package/dist/umd/descope-new-password-index-js.js +1 -1
  46. package/dist/umd/descope-new-password-index-js.js.map +1 -1
  47. package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
  48. package/dist/umd/descope-notification-descope-notification-card-index-js.js.map +1 -1
  49. package/dist/umd/descope-notification-index-js.js +1 -1
  50. package/dist/umd/descope-notification-index-js.js.map +1 -1
  51. package/dist/umd/descope-number-field-index-js.js +1 -1
  52. package/dist/umd/descope-number-field-index-js.js.map +1 -1
  53. package/dist/umd/descope-outbound-app-button.js +2 -2
  54. package/dist/umd/descope-outbound-app-button.js.map +1 -1
  55. package/dist/umd/descope-outbound-apps.js +2 -2
  56. package/dist/umd/descope-outbound-apps.js.map +1 -1
  57. package/dist/umd/descope-passcode-index-js.js +1 -1
  58. package/dist/umd/descope-passcode-index-js.js.map +1 -1
  59. package/dist/umd/descope-password-index-js.js +1 -1
  60. package/dist/umd/descope-password-index-js.js.map +1 -1
  61. package/dist/umd/descope-radio-group-index-js.js +1 -1
  62. package/dist/umd/descope-radio-group-index-js.js.map +1 -1
  63. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  64. package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
  65. package/dist/umd/descope-text-area-index-js.js +1 -1
  66. package/dist/umd/descope-text-area-index-js.js.map +1 -1
  67. package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
  68. package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -1
  69. package/dist/umd/descope-timer-button.js +2 -2
  70. package/dist/umd/descope-timer-button.js.map +1 -1
  71. package/dist/umd/descope-timer.js +1 -1
  72. package/dist/umd/descope-timer.js.map +1 -1
  73. package/dist/umd/descope-trusted-devices.js +1 -1
  74. package/dist/umd/descope-trusted-devices.js.map +1 -1
  75. package/dist/umd/descope-upload-file-index-js.js +2 -2
  76. package/dist/umd/descope-upload-file-index-js.js.map +1 -1
  77. package/dist/umd/descope-user-attribute-index-js.js +2 -2
  78. package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
  79. package/dist/umd/descope-user-auth-method-index-js.js +2 -2
  80. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
  81. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  82. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
  83. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  84. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
  85. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  86. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
  87. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  88. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
  89. package/package.json +28 -28
  90. package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +1 -1
  91. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +1 -1
  92. package/src/components/button-selection-group-fields/descope-button-multi-selection-group/ButtonMultiSelectionGroupClass.js +1 -1
  93. package/src/components/button-selection-group-fields/descope-button-selection-group/ButtonSelectionGroupClass.js +1 -1
  94. package/src/components/descope-email-field/EmailFieldClass.js +1 -1
  95. package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +1 -1
  96. package/src/components/descope-new-password/NewPasswordClass.js +1 -1
  97. package/src/components/descope-notification/NotificationClass.js +1 -1
  98. package/src/components/descope-notification/descope-notification-card/NotificationCardClass.js +1 -1
  99. package/src/components/descope-number-field/NumberFieldClass.js +1 -1
  100. package/src/components/descope-passcode/PasscodeClass.js +1 -1
  101. package/src/components/descope-password/PasswordClass.js +1 -1
  102. package/src/components/descope-radio-group/RadioButtonClass.js +1 -1
  103. package/src/components/descope-radio-group/RadioGroupClass.js +1 -1
  104. package/src/components/descope-text-area/TextAreaClass.js +1 -1
  105. package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +1 -0
  106. package/src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js +1 -0
  107. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -1
  108. package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mapping-fields-descope-saml-group-mappings-index-js.js","mappings":"mNAOO,MAAMA,GAAgB,QAAiB,2BAExCC,GAAiB,OAAqB,CAAED,gBAAeE,aAAc,QAuP3E,EArPA,cAAoCD,EAClC,GAEA,6BAAWE,GACT,MAAO,GAAGC,OAAOH,EAAeE,oBAAsB,GAAI,CACxD,cACA,aACA,eACA,UACA,WACA,WACA,wBACA,6BACA,iCAEJ,CAGA,eAAAE,CAAgBC,GACd,IACE,OAAOA,EAAKC,MACTC,GACgB,iBAARA,IACNC,MAAMC,QAAQF,IAC4B,IAA3CG,OAAOC,oBAAoBJ,GAAKK,QACI,iBAA7BL,EAAIG,OAAOG,KAAKN,GAAK,KACQ,KAApCA,EAAIG,OAAOG,KAAKN,GA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BI,SAAUhC,KAAKoT,gBAAgBxR,MAEnC,CAEA,SAAIA,CAAMA,GACJA,GAAO8R,OAAgC,iBAAhB9R,EAAM8R,QAC/B1T,KAAKmT,kBAAkBvR,MAAQA,EAAM8R,OAEnCnU,MAAMC,QAAQoC,GAAOI,YACvBhC,KAAKoT,gBAAgBxR,MAAQA,EAAMI,SAEvC,CAEA,WAAA6B,GACE,OAAK7D,KAAKmT,kBAAkBzP,gBAGvB1D,KAAKoT,gBAAgB1P,gBAInB,CAAC,EAHC1D,KAAKoT,gBAAgBpP,SAHrBhE,KAAKmT,kBAAkBnP,QAOlC,CAEA,GAAoBC,GAClB,GAAIA,EAAW,CACb,IAAKjE,KAAKmT,kBAAkBzP,gBAE1B,YADA1D,KAAKmT,kBAAkBzS,aAAa,UAAW,QAI5CV,KAAKoT,gBAAgB1P,iBACxB1D,KAAKoT,gBAAgB1S,aAAa,UAAW,OAEjD,CACF,CAEA,wBAAAyD,CAAyBC,EAAUC,EAAUC,GAC3C3B,MAAMwB,2BAA2BC,EAAUC,EAAUC,GACpC,YAAbF,GACFpE,MAAK,EAAiC,SAAbsE,EAE7B,E,0FC1HK,MAAMxF,GAAgB,QAAiB,QAEjC6U,GAAY,SACvB,QAAiB,CACf3R,SAAU,CACR+H,KAAM,CAAC,CAAC,EAAG,CAAEjE,SAAU,IAAWgE,WAAWC,UAGjD,KACA,KAPuB,EASvB,QAAY,CACV4D,MAAO,GACPC,eAAgB,gBAChBvK,MAAO,IAAM,kEAKbwK,iBAAkB,CAAC,WAAY,SAC/B/O,kB","sources":["webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/MappingsFieldInternal.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mapping-item/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/SamlGroupMappingsInternal.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport {\n getComponentName,\n forwardAttrs,\n observeChildren,\n} from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('mappings-field-internal');\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass MappingsFieldInternal extends BaseInputClass {\n #errorItem;\n\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], [\n 'label-value',\n 'label-attr',\n 'button-label',\n 'invalid',\n 'readonly',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ]);\n }\n\n // eslint-disable-next-line class-methods-use-this\n isValidDataType(data) {\n try {\n return data.every(\n (obj) =>\n typeof obj === 'object' &&\n !Array.isArray(obj) &&\n Object.getOwnPropertyNames(obj).length === 1 &&\n typeof obj[Object.keys(obj)[0]] === 'string' &&\n obj[Object.keys(obj)[0]].trim() !== ''\n );\n } catch (e) {\n return false;\n }\n }\n\n get labelValue() {\n return this.getAttribute('label-value') || 'Value';\n }\n\n get labelAttr() {\n return this.getAttribute('label-attr') || 'Attribute';\n }\n\n get buttonLabel() {\n return this.getAttribute('button-label') || 'Add mapping';\n }\n\n get options() {\n return this.getAttribute('options') || [];\n }\n\n addNewMappingItem(focusNewItem) {\n const newMappingItem = document.createElement('descope-mapping-item');\n newMappingItem.setAttribute('bordered', 'true');\n this.mappingsContainerEle.appendChild(newMappingItem);\n forwardAttrs(this, newMappingItem, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'separator',\n 'options',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n });\n // This needs to be done with the timeout, otherwise the validation is performed\n // before the new item is added and thus returns a wrong result\n setTimeout(() => {\n this.setCustomValidity('');\n newMappingItem.addEventListener('mapping-item-removed', () => {\n // If the removed item was the one that was invalid, we need to reset the invalid indication for the internal\n if (newMappingItem === this.#errorItem) {\n this.resetInvalidIndication();\n this.#errorItem = undefined;\n }\n newMappingItem.remove();\n this.setCustomValidity('');\n });\n this.dispatchEvent(new CustomEvent('mapping-item-added', { bubbles: true, composed: true }));\n if (focusNewItem) {\n newMappingItem.focus();\n }\n }, 0);\n return newMappingItem;\n }\n\n get items() {\n return Array.from(this.mappingsContainerEle.querySelectorAll('descope-mapping-item'));\n }\n\n get value() {\n return this.items.reduce((acc, item) => {\n if (!item.value) {\n return acc;\n }\n\n return [...acc, item.value];\n }, []);\n }\n\n set value(mappings) {\n if (!this.isValidDataType(mappings)) {\n // eslint-disable-next-line no-console\n console.error(\n 'received invalid value to set - should be an array of objects with one key-value pair'\n );\n return;\n }\n\n const currentItems = this.items;\n\n // Remove extra mapping items we don't need\n if (currentItems.length > mappings.length) {\n for (let i = mappings.length; i < currentItems.length; i++) {\n this.mappingsContainerEle.removeChild(currentItems[i]);\n }\n }\n\n // Add or update items\n mappings.forEach((mapping, index) => {\n const mappingItem = currentItems[index];\n if (mappingItem) {\n // Set existing item value\n mappingItem.value = mapping;\n } else {\n // Add new item\n const newMappingItem = this.addNewMappingItem(false);\n // Setting the new item value needs to be done with the timeout,\n // otherwise the value is not set correctly\n setTimeout(() => {\n newMappingItem.value = mapping;\n }, 0);\n }\n });\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div class=\"labels-container\" part=\"labels\"></div>\n <div class=\"mappings-container\"></div>\n <div class=\"button-container\"></div>\n `;\n\n this.labelsEle = this.querySelector('.labels-container');\n this.mappingsContainerEle = this.querySelector('.mappings-container');\n this.buttonContainer = this.querySelector('.button-container');\n }\n\n initLabels() {\n this.labelsEle.innerHTML = `\n <descope-text variant=\"body2\" part=\"value-label\">${this.labelValue}</descope-text>\n <descope-text variant=\"body2\" part=\"attr-label\">${this.labelAttr}</descope-text>\n `;\n }\n\n initAddButton() {\n this.buttonContainer.innerHTML = `\n <descope-button variant=\"link\" mode=\"primary\" disabled=\"${this.isDisabled}\">\n <vaadin-icon icon=\"vaadin:plus\"></vaadin-icon>\n ${this.buttonLabel}\n </descope-button>\n `;\n const button = this.querySelector('descope-button');\n button.onclick = () => {\n this.addNewMappingItem(true);\n };\n forwardAttrs(this, button, {\n includeAttrs: ['disabled'],\n });\n }\n\n #onMappingsContainerChildrenChange() {\n this.labelsEle.style.display = this.items.length ? 'grid' : 'none';\n }\n\n init() {\n // This event listener needs to be placed before the super.init() call\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n const focusedElement =\n this.#errorItem || this.items[0] || this.querySelector('descope-button');\n focusedElement.focus();\n }\n });\n\n super.init?.();\n this.initLabels();\n this.initAddButton();\n\n // This event listener is responsible for removing the invalid attribute\n // from the internal once the invalid item turns valid\n this.addEventListener('input', () => {\n const isErrorItemMounted = this.mappingsContainerEle.contains(this.#errorItem);\n if (isErrorItemMounted && this.#errorItem?.checkValidity()) {\n // Item has changed, it was invalid before and now it's valid\n this.resetInvalidIndication();\n this.#errorItem.removeAttribute('invalid');\n this.#errorItem = undefined;\n }\n });\n\n observeChildren(this.mappingsContainerEle, this.#onMappingsContainerChildrenChange.bind(this));\n }\n\n resetInvalidIndication() {\n this.removeAttribute('invalid');\n }\n\n getValidity() {\n const errorItem = this.items.find((item) => !item.checkValidity());\n if (errorItem) {\n return errorItem.validity;\n }\n\n return {};\n }\n\n #handleInvalidMappings(isInvalid) {\n if (isInvalid) {\n this.#errorItem = this.items.find((item) => !item.checkValidity());\n this.#errorItem?.reportValidity();\n this.#errorItem?.setAttribute('invalid', 'true');\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (attrName === 'label-value' || attrName === 'label-attr') {\n this.initLabels();\n }\n if (attrName === 'button-label') {\n this.initAddButton();\n }\n if (attrName === 'invalid') {\n this.#handleInvalidMappings(newValue === 'true');\n }\n if (attrName === 'readonly') {\n this.toggleAttribute('inert', newValue === 'true');\n }\n }\n}\n\nexport default MappingsFieldInternal;\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","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","/* eslint-disable no-use-before-define */\nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.src);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get src() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n // eslint-disable-next-line class-methods-use-this\n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.src);\n\n createImage(this.src, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.src === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import SamlGroupMappingsInternal, { componentName } from './SamlGroupMappingsInternal';\n\ncustomElements.define(componentName, SamlGroupMappingsInternal);\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n\t\tselector: () => `::slotted(*)`,\n\t\tproperty: IconClass.cssVarList.fill\n\t },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class'],\n componentName,\n })\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\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 { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName } from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('mapping-item');\n\nconst inputAttrs = [\n 'size',\n 'bordered',\n 'readonly',\n 'full-width',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass MappingItem extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputAttrs, [\n 'separator',\n 'options',\n 'invalid',\n 'disabled',\n ]);\n }\n\n get separator() {\n return this.getAttribute('separator') || 'map to';\n }\n\n get value() {\n const attributeValue = this.attributeInput.value;\n const inputValue = this.valueInput.value;\n if (attributeValue && inputValue) {\n return { [attributeValue]: inputValue };\n }\n return null;\n }\n\n set value(mapping) {\n if (Object.entries(mapping).length !== 1) {\n // eslint-disable-next-line no-console\n console.error(\n 'descope-mapping item expected expects only one key-value pair in the value but received: ',\n mapping\n );\n return;\n }\n const [attribute, value] = Object.entries(mapping)[0];\n this.valueInput.value = value;\n this.attributeInput.value = attribute;\n // The event needs to be dispatched to trigger the validation if setting the value externally\n this.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true }));\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\" part=\"wrapper\">\n <descope-text-field required=\"true\"></descope-text-field>\n <div class=\"separator\" part=\"separator\">${this.separator}</div>\n <descope-combo-box\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n required=\"true\"\n >\n </descope-combo-box>\n <descope-button variant=\"link\" mode=\"primary\">\n <vaadin-icon icon=\"vaadin:minus\"></vaadin-icon>\n </descope-button>\n </div>\n\t`;\n\n injectStyle(\n `\n .wrapper {\n display: flex;\n }\n .separator {\n text-align: center;\n flex-shrink: 0;\n }\n `,\n this\n );\n\n this.valueInput = this.shadowRoot.querySelector('descope-text-field');\n this.attributeInput = this.shadowRoot.querySelector('descope-combo-box');\n this.inputs = [this.valueInput, this.attributeInput];\n this.removeButton = this.shadowRoot.querySelector('descope-button');\n\n forwardAttrs(this, this.valueInput, {\n includeAttrs: inputAttrs,\n });\n forwardAttrs(this, this.attributeInput, {\n includeAttrs: [...inputAttrs, 'options'],\n mapAttrs: { options: 'data' },\n });\n forwardAttrs(this, this.removeButton, {\n includeAttrs: ['disabled'],\n });\n }\n\n initRemoveButton() {\n this.removeButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('mapping-item-removed', { bubbles: true, composed: true }))\n );\n }\n\n init() {\n super.init?.();\n this.initRemoveButton();\n }\n\n getValidity() {\n const attributeValue = this.attributeInput.value;\n const inputValue = this.valueInput.value;\n if (!attributeValue || !inputValue) {\n return { badInput: true };\n }\n return {};\n }\n\n reportValidity() {\n this.inputs.forEach((input) => input.reportValidity());\n }\n\n focus() {\n const focusedElement =\n this.checkValidity() || !this.valueInput.checkValidity()\n ? this.valueInput\n : this.attributeInput;\n focusedElement.focus();\n }\n\n handleSeparatorChange() {\n this.shadowRoot.querySelector('.separator').textContent = this.separator;\n }\n\n #handleInvalidMapping(invalid) {\n if (invalid === 'true') {\n const inputValue = this.valueInput.value;\n if (!inputValue) {\n this.valueInput.setAttribute('invalid', 'true');\n this.valueInput.setAttribute('error-message', this.defaultErrorMsgValueMissing);\n }\n\n const attributeValue = this.attributeInput.value;\n if (!attributeValue) {\n this.attributeInput.setAttribute('invalid', 'true');\n this.attributeInput.setAttribute('error-message', this.defaultErrorMsgValueMissing);\n }\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'separator') {\n this.handleSeparatorChange();\n }\n\n if (attrName === 'invalid') {\n this.#handleInvalidMapping(newValue);\n }\n }\n}\n\nexport default MappingItem;\n","import MappingItem, { componentName } from './MappingItem';\n\ncustomElements.define(componentName, MappingItem);\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import MappingsFieldInternal, { componentName } from './MappingsFieldInternal';\n\ncustomElements.define(componentName, MappingsFieldInternal);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-saml-group-mappings-internal/SamlGroupMappingsInternal';\n\nexport const componentName = getComponentName('saml-group-mappings');\n\nconst customMixin = (superclass) =>\n class SamlGroupMappingsMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n template.innerHTML = `\n <${descopeInternalComponentName}\n tabindex=\"-1\"\n ></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-group',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'readonly',\n 'disabled',\n ],\n });\n\n syncAttrs(this, this.inputElement, { includeAttrs: ['invalid'] });\n }\n };\n\nconst { host, groupInput, errorMessage } = {\n host: { selector: () => ':host' },\n groupInput: { selector: 'descope-text-field' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SamlGroupMappingsClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n groupNameInputMarginBottom: { ...groupInput, property: 'margin-bottom' },\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 }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart'],\n inputEvent: 'input',\n triggerValidationEvents: ['mapping-item-added', 'mapping-item-removed'],\n proxyParentValidation: true,\n }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-custom-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-text-field {\n width: auto;\n }\n\n descope-mappings-field {\n display: block;\n }\n `,\n excludeAttrsSync: [\n 'tabindex',\n 'label-group',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'error-message',\n ],\n componentName,\n })\n);\n\nexport default SamlGroupMappingsClass;\n","import '@vaadin/custom-field';\n\nimport { componentName, SamlGroupMappingsClass } from './SamlGroupMappingsClass';\nimport '../../descope-text-field';\nimport '../descope-mappings-field';\nimport './descope-saml-group-mappings-internal';\n\ncustomElements.define(componentName, SamlGroupMappingsClass);\n\nexport { SamlGroupMappingsClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\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 injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { TextClass } from '@descope-ui/descope-text/class';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-mappings-field-internal/MappingsFieldInternal';\n\nexport const componentName = getComponentName('mappings-field');\n\nconst customMixin = (superclass) =>\n class MappingsFieldMixinClass extends superclass {\n get defaultValues() {\n const defaultValuesAttr = this.getAttribute('default-values');\n if (defaultValuesAttr) {\n try {\n return JSON.parse(defaultValuesAttr);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"default-values\" -', e.message);\n }\n }\n return [];\n }\n\n setDefaultValues() {\n const initialDefaultValues = this.defaultValues;\n if (Object.keys(initialDefaultValues).length > 0) {\n this.inputElement.value = initialDefaultValues;\n }\n }\n\n init() {\n super.init?.();\n const template = document.createElement('template');\n\n template.innerHTML = `\n <${descopeInternalComponentName}\n tabindex=\"-1\"\n ></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'default-values',\n 'invalid',\n 'readonly',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n });\n\n // This is required since when we remove the invalid attribute from the internal mappings field,\n // we want to reflect the change in the parent component\n syncAttrs(this, this.inputElement, { includeAttrs: ['invalid'] });\n\n this.setDefaultValues();\n }\n };\n\nconst {\n host,\n helperText,\n errorMessage,\n mappingItem,\n labels,\n labelsText,\n valueLabel,\n attrLabel,\n separator,\n labelsContainer,\n} = {\n host: { selector: () => ':host' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n mappingItem: { selector: 'descope-mapping-item::part(wrapper)' },\n labels: { selector: 'descope-mappings-field-internal [part=\"labels\"] descope-text' },\n labelsText: {\n selector: 'descope-mappings-field-internal [part=\"labels\"] descope-text::part(text-wrapper)',\n },\n valueLabel: { selector: 'descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"]' },\n attrLabel: { selector: 'descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"]' },\n separator: { selector: 'descope-mapping-item::part(separator)' },\n labelsContainer: { selector: 'descope-mappings-field-internal [part=\"labels\"]' },\n};\n\nexport const MappingsFieldClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host, { ...separator, property: 'margin-top' }],\n fontFamily: [helperText, errorMessage, labels],\n separatorFontSize: { ...separator, property: 'font-size' },\n labelsFontSize: { ...labelsText, property: 'font-size' },\n labelsLineHeight: [\n { ...labelsText, property: 'line-height' },\n { ...labels, property: 'line-height' },\n ],\n labelTextColor: [\n { ...labels, property: TextClass.cssVarList.textColor },\n { ...separator, property: 'color' },\n ],\n itemMarginBottom: { ...mappingItem, property: 'margin-bottom' },\n valueLabelMinWidth: { ...valueLabel, property: 'min-width' },\n attrLabelMinWidth: { ...attrLabel, property: 'min-width' },\n labelsMarginBottom: { ...labelsContainer, property: 'margin-bottom' },\n separatorWidth: {},\n removeButtonWidth: {},\n },\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart'],\n inputEvent: 'input',\n proxyParentValidation: true,\n }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-custom-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-mappings-field-internal [part=\"labels\"] {\n display: none;\n grid-template-columns: 1fr var(${MappingsFieldClass.cssVarList.separatorWidth}) 1fr var(${MappingsFieldClass.cssVarList.removeButtonWidth});\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"],\n descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"] {\n ${TextClass.cssVarList.fontWeight}: 500;\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"] {\n grid-column: 1 / span 1;\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"] {\n grid-column: 3 / span 1;\n }\n\n descope-mapping-item::part(wrapper) {\n display: grid;\n grid-template-columns: 1fr var(${MappingsFieldClass.cssVarList.separatorWidth}) 1fr var(${MappingsFieldClass.cssVarList.removeButtonWidth});\n }\n `,\n excludeAttrsSync: [\n 'tabindex',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'options',\n 'error-message',\n ],\n componentName,\n })\n);\n\nexport default MappingsFieldClass;\n","import '@vaadin/custom-field';\nimport '@vaadin/icon';\nimport '@vaadin/icons';\nimport { componentName, MappingsFieldClass } from './MappingsFieldClass';\nimport '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '../../descope-text-field';\nimport '@descope-ui/descope-combo-box';\nimport './descope-mappings-field-internal';\nimport './descope-mapping-item';\n\ncustomElements.define(componentName, MappingsFieldClass);\n\nexport { MappingsFieldClass, componentName };\n","import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport {\n getComponentName,\n forwardAttrs,\n observeAttributes,\n} from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('saml-group-mappings-internal');\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: '' });\n\nclass SamlGroupMappingsInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['invalid'].concat(BaseInputClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n <descope-text-field variant=\"body2\" bordered=\"true\"></descope-text-field>\n <descope-mappings-field></descope-mappings-field>\n `;\n\n this.groupInputElement = this.querySelector('descope-text-field');\n this.mappingsElement = this.querySelector('descope-mappings-field');\n }\n\n resetInvalidIndication() {\n this.removeAttribute('invalid');\n }\n\n handleMappingsInvalidChange(changedAttributes) {\n if (changedAttributes.includes('invalid')) {\n if (!this.mappingsElement.hasAttribute('invalid')) {\n this.resetInvalidIndication();\n }\n }\n }\n\n initFocusHandler() {\n // This event listener needs to be placed before the super.init() call\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n const focusedElement = this.mappingsElement.checkValidity()\n ? this.groupInputElement\n : this.mappingsElement;\n focusedElement.focus();\n }\n });\n }\n\n init() {\n // This needs to be placed before the super.init() call to work\n this.initFocusHandler();\n\n super.init?.();\n\n forwardAttrs(this, this.groupInputElement, {\n mapAttrs: { 'label-group': 'label' },\n includeAttrs: ['size', 'label-group', 'readonly', 'disabled'],\n });\n\n forwardAttrs(this, this.mappingsElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'readonly',\n 'disabled',\n 'data-errormessage-pattern-mismatch',\n ],\n });\n\n // Observing the invalid attribute of the mappings field to reset the invalid state for this component.\n // When an invalid item turns valid, the mappings field will remove the invalid attribute, and at this component\n // level, we need to remove the invalid attribute as well to be able to mark the component as invalid the next time\n observeAttributes(this.mappingsElement, this.handleMappingsInvalidChange.bind(this), {\n includeAttrs: ['invalid'],\n });\n }\n\n get value() {\n return {\n group: this.groupInputElement.value,\n mappings: this.mappingsElement.value,\n };\n }\n\n set value(value) {\n if (value?.group && typeof value.group === 'string') {\n this.groupInputElement.value = value.group;\n }\n if (Array.isArray(value?.mappings)) {\n this.mappingsElement.value = value.mappings;\n }\n }\n\n getValidity() {\n if (!this.groupInputElement.checkValidity()) {\n return this.groupInputElement.validity;\n }\n if (!this.mappingsElement.checkValidity()) {\n return this.mappingsElement.validity;\n }\n\n return {};\n }\n\n #handleInvalidState(isInvalid) {\n if (isInvalid) {\n if (!this.groupInputElement.checkValidity()) {\n this.groupInputElement.setAttribute('invalid', 'true');\n return;\n }\n\n if (!this.mappingsElement.checkValidity()) {\n this.mappingsElement.setAttribute('invalid', 'true');\n }\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (attrName === 'invalid') {\n this.#handleInvalidState(newValue === 'true');\n }\n }\n}\n\nexport default SamlGroupMappingsInternal;\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class'],\n componentName,\n }),\n);\n"],"names":["componentName","BaseInputClass","baseSelector","observedAttributes","concat","isValidDataType","data","every","obj","Array","isArray","Object","getOwnPropertyNames","length","keys","trim","e","labelValue","this","getAttribute","labelAttr","buttonLabel","options","addNewMappingItem","focusNewItem","newMappingItem","document","createElement","setAttribute","mappingsContainerEle","appendChild","includeAttrs","setTimeout","setCustomValidity","addEventListener","resetInvalidIndication","undefined","remove","dispatchEvent","CustomEvent","bubbles","composed","focus","items","from","querySelectorAll","value","reduce","acc","item","mappings","console","error","currentItems","i","removeChild","forEach","mapping","index","mappingItem","constructor","super","innerHTML","labelsEle","querySelector","buttonContainer","initLabels","initAddButton","isDisabled","button","onclick","style","display","init","isTrusted","contains","checkValidity","removeAttribute","bind","getValidity","errorItem","find","validity","isInvalid","reportValidity","attributeChangedCallback","attrName","oldValue","newValue","toggleAttribute","createBaseInputClass","args","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","srcAttrs","RawImage","attachShadow","mode","toggleVisibility","src","onThemeChange","renderImage","isVisible","classList","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","ele","ImageClass","cssVarList","fill","then","res","shouldRender","srcVal","height","width","customElements","define","clickableMixin","superclass","isLoading","click","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","createImgEle","setProperty","slottedIcon","loadingIndicatorStyles","ButtonClass","hostHeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","iconColor","labelTextDecoration","labelSpacing","iconSize","slots","wrappedEleName","excludeAttrsSync","color","inputAttrs","separator","attributeValue","attributeInput","inputValue","valueInput","entries","attribute","InputEvent","shadowRoot","inputs","removeButton","mapAttrs","initRemoveButton","badInput","handleSeparatorChange","textContent","invalid","defaultErrorMsgValueMissing","groupInput","SamlGroupMappingsClass","groupNameInputMarginBottom","proxyProps","inputEvent","triggerValidationEvents","proxyParentValidation","template","baseElement","content","cloneNode","inputElement","RawText","hideWhenEmpty","hasChildren","childNodes","TextClass","textColor","textLineHeight","textLetterSpacing","textShadow","textTransform","fontStyle","fontWeight","observedAttrs","TextFieldClass","useProxyTargets","icon","renderCopyToClipboard","iconInitConfig","title","iconCopiedConfig","assign","slot","navigator","clipboard","writeText","onLabelClick","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","labels","labelsText","valueLabel","attrLabel","labelsContainer","MappingsFieldClass","separatorFontSize","labelsFontSize","labelsLineHeight","itemMarginBottom","valueLabelMinWidth","attrLabelMinWidth","labelsMarginBottom","separatorWidth","removeButtonWidth","defaultValues","defaultValuesAttr","JSON","parse","message","setDefaultValues","initialDefaultValues","groupInputElement","mappingsElement","handleMappingsInvalidChange","changedAttributes","includes","hasAttribute","initFocusHandler","group","IconClass"],"sourceRoot":""}
1
+ {"version":3,"file":"mapping-fields-descope-saml-group-mappings-index-js.js","mappings":"mNAOO,MAAMA,GAAgB,QAAiB,2BAExCC,GAAiB,OAAqB,CAAED,gBAAeE,aAAc,QAuP3E,EArPA,cAAoCD,EAClC,GAEA,6BAAWE,GACT,MAAO,GAAGC,OAAOH,EAAeE,oBAAsB,GAAI,CACxD,cACA,aACA,eACA,UACA,WACA,WACA,wBACA,6BACA,iCAEJ,CAGA,eAAAE,CAAgBC,GACd,IACE,OAAOA,EAAKC,MACTC,GACgB,iBAARA,IACNC,MAAMC,QAAQF,IAC4B,IAA3CG,OAAOC,oBAAoBJ,GAAKK,QACI,iBAA7BL,EAAIG,OAAOG,KAAKN,GAAK,KACQ,K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AAO,CACL8R,MAAO1T,KAAKmT,kBAAkBvR,MAC9BI,SAAUhC,KAAKoT,gBAAgBxR,MAEnC,CAEA,SAAIA,CAAMA,GACJA,GAAO8R,OAAgC,iBAAhB9R,EAAM8R,QAC/B1T,KAAKmT,kBAAkBvR,MAAQA,EAAM8R,OAEnCnU,MAAMC,QAAQoC,GAAOI,YACvBhC,KAAKoT,gBAAgBxR,MAAQA,EAAMI,SAEvC,CAEA,WAAA6B,GACE,OAAK7D,KAAKmT,kBAAkBzP,gBAGvB1D,KAAKoT,gBAAgB1P,gBAInB,CAAC,EAHC1D,KAAKoT,gBAAgBpP,SAHrBhE,KAAKmT,kBAAkBnP,QAOlC,CAEA,GAAoBC,GAClB,GAAIA,EAAW,CACb,IAAKjE,KAAKmT,kBAAkBzP,gBAE1B,YADA1D,KAAKmT,kBAAkBzS,aAAa,UAAW,QAI5CV,KAAKoT,gBAAgB1P,iBACxB1D,KAAKoT,gBAAgB1S,aAAa,UAAW,OAEjD,CACF,CAEA,wBAAAyD,CAAyBC,EAAUC,EAAUC,GAC3C3B,MAAMwB,2BAA2BC,EAAUC,EAAUC,GACpC,YAAbF,GACFpE,MAAK,EAAiC,SAAbsE,EAE7B,E,0FC1HK,MAAMxF,GAAgB,QAAiB,QAEjC6U,GAAY,SACvB,QAAiB,CACf3R,SAAU,CACR+H,KAAM,CAAC,CAAC,EAAG,CAAEjE,SAAU,IAAWgE,WAAWC,UAGjD,KACA,KAPuB,EASvB,QAAY,CACV4D,MAAO,GACPC,eAAgB,gBAChBvK,MAAO,IAAM,kEAKbwK,iBAAkB,CAAC,WAAY,QAAS,SACxC/O,kB","sources":["webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/MappingsFieldInternal.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/ImageClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/clickableMixin.js","webpack://@descope/web-components-ui/../components/descope-image/src/component/helpers.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/ButtonClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mapping-item/index.js","webpack://@descope/web-components-ui/../components/descope-button/src/component/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/SamlGroupMappingsInternal.js","webpack://@descope/web-components-ui/../components/descope-icon/src/component/IconClass.js"],"sourcesContent":["import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport {\n getComponentName,\n forwardAttrs,\n observeChildren,\n} from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('mappings-field-internal');\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass MappingsFieldInternal extends BaseInputClass {\n #errorItem;\n\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], [\n 'label-value',\n 'label-attr',\n 'button-label',\n 'invalid',\n 'readonly',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ]);\n }\n\n // eslint-disable-next-line class-methods-use-this\n isValidDataType(data) {\n try {\n return data.every(\n (obj) =>\n typeof obj === 'object' &&\n !Array.isArray(obj) &&\n Object.getOwnPropertyNames(obj).length === 1 &&\n typeof obj[Object.keys(obj)[0]] === 'string' &&\n obj[Object.keys(obj)[0]].trim() !== ''\n );\n } catch (e) {\n return false;\n }\n }\n\n get labelValue() {\n return this.getAttribute('label-value') || 'Value';\n }\n\n get labelAttr() {\n return this.getAttribute('label-attr') || 'Attribute';\n }\n\n get buttonLabel() {\n return this.getAttribute('button-label') || 'Add mapping';\n }\n\n get options() {\n return this.getAttribute('options') || [];\n }\n\n addNewMappingItem(focusNewItem) {\n const newMappingItem = document.createElement('descope-mapping-item');\n newMappingItem.setAttribute('bordered', 'true');\n this.mappingsContainerEle.appendChild(newMappingItem);\n forwardAttrs(this, newMappingItem, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'separator',\n 'options',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n });\n // This needs to be done with the timeout, otherwise the validation is performed\n // before the new item is added and thus returns a wrong result\n setTimeout(() => {\n this.setCustomValidity('');\n newMappingItem.addEventListener('mapping-item-removed', () => {\n // If the removed item was the one that was invalid, we need to reset the invalid indication for the internal\n if (newMappingItem === this.#errorItem) {\n this.resetInvalidIndication();\n this.#errorItem = undefined;\n }\n newMappingItem.remove();\n this.setCustomValidity('');\n });\n this.dispatchEvent(new CustomEvent('mapping-item-added', { bubbles: true, composed: true }));\n if (focusNewItem) {\n newMappingItem.focus();\n }\n }, 0);\n return newMappingItem;\n }\n\n get items() {\n return Array.from(this.mappingsContainerEle.querySelectorAll('descope-mapping-item'));\n }\n\n get value() {\n return this.items.reduce((acc, item) => {\n if (!item.value) {\n return acc;\n }\n\n return [...acc, item.value];\n }, []);\n }\n\n set value(mappings) {\n if (!this.isValidDataType(mappings)) {\n // eslint-disable-next-line no-console\n console.error(\n 'received invalid value to set - should be an array of objects with one key-value pair'\n );\n return;\n }\n\n const currentItems = this.items;\n\n // Remove extra mapping items we don't need\n if (currentItems.length > mappings.length) {\n for (let i = mappings.length; i < currentItems.length; i++) {\n this.mappingsContainerEle.removeChild(currentItems[i]);\n }\n }\n\n // Add or update items\n mappings.forEach((mapping, index) => {\n const mappingItem = currentItems[index];\n if (mappingItem) {\n // Set existing item value\n mappingItem.value = mapping;\n } else {\n // Add new item\n const newMappingItem = this.addNewMappingItem(false);\n // Setting the new item value needs to be done with the timeout,\n // otherwise the value is not set correctly\n setTimeout(() => {\n newMappingItem.value = mapping;\n }, 0);\n }\n });\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div class=\"labels-container\" part=\"labels\"></div>\n <div class=\"mappings-container\"></div>\n <div class=\"button-container\"></div>\n `;\n\n this.labelsEle = this.querySelector('.labels-container');\n this.mappingsContainerEle = this.querySelector('.mappings-container');\n this.buttonContainer = this.querySelector('.button-container');\n }\n\n initLabels() {\n this.labelsEle.innerHTML = `\n <descope-text variant=\"body2\" part=\"value-label\">${this.labelValue}</descope-text>\n <descope-text variant=\"body2\" part=\"attr-label\">${this.labelAttr}</descope-text>\n `;\n }\n\n initAddButton() {\n this.buttonContainer.innerHTML = `\n <descope-button variant=\"link\" mode=\"primary\" disabled=\"${this.isDisabled}\">\n <vaadin-icon icon=\"vaadin:plus\"></vaadin-icon>\n ${this.buttonLabel}\n </descope-button>\n `;\n const button = this.querySelector('descope-button');\n button.onclick = () => {\n this.addNewMappingItem(true);\n };\n forwardAttrs(this, button, {\n includeAttrs: ['disabled'],\n });\n }\n\n #onMappingsContainerChildrenChange() {\n this.labelsEle.style.display = this.items.length ? 'grid' : 'none';\n }\n\n init() {\n // This event listener needs to be placed before the super.init() call\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n const focusedElement =\n this.#errorItem || this.items[0] || this.querySelector('descope-button');\n focusedElement.focus();\n }\n });\n\n super.init?.();\n this.initLabels();\n this.initAddButton();\n\n // This event listener is responsible for removing the invalid attribute\n // from the internal once the invalid item turns valid\n this.addEventListener('input', () => {\n const isErrorItemMounted = this.mappingsContainerEle.contains(this.#errorItem);\n if (isErrorItemMounted && this.#errorItem?.checkValidity()) {\n // Item has changed, it was invalid before and now it's valid\n this.resetInvalidIndication();\n this.#errorItem.removeAttribute('invalid');\n this.#errorItem = undefined;\n }\n });\n\n observeChildren(this.mappingsContainerEle, this.#onMappingsContainerChildrenChange.bind(this));\n }\n\n resetInvalidIndication() {\n this.removeAttribute('invalid');\n }\n\n getValidity() {\n const errorItem = this.items.find((item) => !item.checkValidity());\n if (errorItem) {\n return errorItem.validity;\n }\n\n return {};\n }\n\n #handleInvalidMappings(isInvalid) {\n if (isInvalid) {\n this.#errorItem = this.items.find((item) => !item.checkValidity());\n this.#errorItem?.reportValidity();\n this.#errorItem?.setAttribute('invalid', 'true');\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (attrName === 'label-value' || attrName === 'label-attr') {\n this.initLabels();\n }\n if (attrName === 'button-label') {\n this.initAddButton();\n }\n if (attrName === 'invalid') {\n this.#handleInvalidMappings(newValue === 'true');\n }\n if (attrName === 'readonly') {\n this.toggleAttribute('inert', newValue === 'true');\n }\n }\n}\n\nexport default MappingsFieldInternal;\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","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","/* eslint-disable no-use-before-define */\nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\nimport { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { createImage } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('image');\n\nconst srcAttrs = ['src', 'src-dark'];\n\nclass RawImage extends createBaseClass({\n componentName,\n baseSelector: 'slot',\n}) {\n static get observedAttributes() {\n return srcAttrs;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n :host > slot {\n width: 100%;\n height: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n ::slotted(*) {\n width: 100%;\n\t\t\t}\n\n .hidden {\n display: none;\n }\n `,\n this,\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.src);\n }\n\n onThemeChange() {\n this.renderImage();\n }\n\n toggleVisibility(isVisible) {\n if (isVisible) {\n this.classList.remove('hidden');\n } else {\n this.classList.add('hidden');\n }\n }\n\n get altText() {\n return this.getAttribute('alt') || '';\n }\n\n get legacySrc() {\n return this.getAttribute('src');\n }\n\n get themeSrc() {\n return this.getAttribute(`src-${this.currentThemeName}`);\n }\n\n get src() {\n return this.themeSrc || this.legacySrc;\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n // eslint-disable-next-line class-methods-use-this\n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${ImageClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`,\n );\n });\n }\n\n renderImage() {\n this.toggleVisibility(this.src);\n\n createImage(this.src, this.altText).then((res) => {\n this.innerHTML = '';\n if (res) {\n this.updateFillColor(res);\n this.appendChild(res);\n }\n });\n }\n\n // render only when src attribute matches current theme\n shouldRender(src) {\n const srcVal = this.getAttribute(src);\n return this.src === srcVal;\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (this.shouldRender(attrName)) {\n this.renderImage();\n }\n }\n}\n\nexport const ImageClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n height: { selector: () => ':host' },\n width: { selector: () => ':host' },\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawImage);\n","import SamlGroupMappingsInternal, { componentName } from './SamlGroupMappingsInternal';\n\ncustomElements.define(componentName, SamlGroupMappingsInternal);\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src, altText) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n ele.setAttribute('alt', altText);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, {\n USE_PROFILES: { svg: true, svgFilters: true },\n // allow image to render\n ADD_TAGS: ['image'],\n // forbid interactiviy via `use` tags (which are sanitized by default)\n FORBID_TAGS: ['defs']\n });\n\n const parser = new DOMParser();\n const ele = parser\n .parseFromString(clean, 'image/svg+xml')\n .querySelector('svg');\n return ele;\n};\n\nexport const createImage = async (src, altText) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src, altText);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import { compose } from '@descope-ui/common/utils';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { IconClass } from '@descope-ui/descope-icon/class';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n\t\tselector: () => `::slotted(*)`,\n\t\tproperty: IconClass.cssVarList.fill\n\t },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n })\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"]) ::part(prefix),\n\t:host([loading=\"true\"]) ::part(label) {\n\t\tvisibility: hidden;\n\t}\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 { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName } from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('mapping-item');\n\nconst inputAttrs = [\n 'size',\n 'bordered',\n 'readonly',\n 'full-width',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass MappingItem extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputAttrs, [\n 'separator',\n 'options',\n 'invalid',\n 'disabled',\n ]);\n }\n\n get separator() {\n return this.getAttribute('separator') || 'map to';\n }\n\n get value() {\n const attributeValue = this.attributeInput.value;\n const inputValue = this.valueInput.value;\n if (attributeValue && inputValue) {\n return { [attributeValue]: inputValue };\n }\n return null;\n }\n\n set value(mapping) {\n if (Object.entries(mapping).length !== 1) {\n // eslint-disable-next-line no-console\n console.error(\n 'descope-mapping item expected expects only one key-value pair in the value but received: ',\n mapping\n );\n return;\n }\n const [attribute, value] = Object.entries(mapping)[0];\n this.valueInput.value = value;\n this.attributeInput.value = attribute;\n // The event needs to be dispatched to trigger the validation if setting the value externally\n this.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true }));\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\" part=\"wrapper\">\n <descope-text-field required=\"true\"></descope-text-field>\n <div class=\"separator\" part=\"separator\">${this.separator}</div>\n <descope-combo-box\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n required=\"true\"\n >\n </descope-combo-box>\n <descope-button variant=\"link\" mode=\"primary\">\n <vaadin-icon icon=\"vaadin:minus\"></vaadin-icon>\n </descope-button>\n </div>\n\t`;\n\n injectStyle(\n `\n .wrapper {\n display: flex;\n }\n .separator {\n text-align: center;\n flex-shrink: 0;\n }\n `,\n this\n );\n\n this.valueInput = this.shadowRoot.querySelector('descope-text-field');\n this.attributeInput = this.shadowRoot.querySelector('descope-combo-box');\n this.inputs = [this.valueInput, this.attributeInput];\n this.removeButton = this.shadowRoot.querySelector('descope-button');\n\n forwardAttrs(this, this.valueInput, {\n includeAttrs: inputAttrs,\n });\n forwardAttrs(this, this.attributeInput, {\n includeAttrs: [...inputAttrs, 'options'],\n mapAttrs: { options: 'data' },\n });\n forwardAttrs(this, this.removeButton, {\n includeAttrs: ['disabled'],\n });\n }\n\n initRemoveButton() {\n this.removeButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('mapping-item-removed', { bubbles: true, composed: true }))\n );\n }\n\n init() {\n super.init?.();\n this.initRemoveButton();\n }\n\n getValidity() {\n const attributeValue = this.attributeInput.value;\n const inputValue = this.valueInput.value;\n if (!attributeValue || !inputValue) {\n return { badInput: true };\n }\n return {};\n }\n\n reportValidity() {\n this.inputs.forEach((input) => input.reportValidity());\n }\n\n focus() {\n const focusedElement =\n this.checkValidity() || !this.valueInput.checkValidity()\n ? this.valueInput\n : this.attributeInput;\n focusedElement.focus();\n }\n\n handleSeparatorChange() {\n this.shadowRoot.querySelector('.separator').textContent = this.separator;\n }\n\n #handleInvalidMapping(invalid) {\n if (invalid === 'true') {\n const inputValue = this.valueInput.value;\n if (!inputValue) {\n this.valueInput.setAttribute('invalid', 'true');\n this.valueInput.setAttribute('error-message', this.defaultErrorMsgValueMissing);\n }\n\n const attributeValue = this.attributeInput.value;\n if (!attributeValue) {\n this.attributeInput.setAttribute('invalid', 'true');\n this.attributeInput.setAttribute('error-message', this.defaultErrorMsgValueMissing);\n }\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'separator') {\n this.handleSeparatorChange();\n }\n\n if (attrName === 'invalid') {\n this.#handleInvalidMapping(newValue);\n }\n }\n}\n\nexport default MappingItem;\n","import MappingItem, { componentName } from './MappingItem';\n\ncustomElements.define(componentName, MappingItem);\n","import { componentName, ButtonClass } from './ButtonClass';\nimport '@vaadin/button';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","import MappingsFieldInternal, { componentName } from './MappingsFieldInternal';\n\ncustomElements.define(componentName, MappingsFieldInternal);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-saml-group-mappings-internal/SamlGroupMappingsInternal';\n\nexport const componentName = getComponentName('saml-group-mappings');\n\nconst customMixin = (superclass) =>\n class SamlGroupMappingsMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n template.innerHTML = `\n <${descopeInternalComponentName}\n tabindex=\"-1\"\n ></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-group',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'readonly',\n 'disabled',\n ],\n });\n\n syncAttrs(this, this.inputElement, { includeAttrs: ['invalid'] });\n }\n };\n\nconst { host, groupInput, errorMessage } = {\n host: { selector: () => ':host' },\n groupInput: { selector: 'descope-text-field' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SamlGroupMappingsClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n groupNameInputMarginBottom: { ...groupInput, property: 'margin-bottom' },\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 }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart'],\n inputEvent: 'input',\n triggerValidationEvents: ['mapping-item-added', 'mapping-item-removed'],\n proxyParentValidation: true,\n }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-custom-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-text-field {\n width: auto;\n }\n\n descope-mappings-field {\n display: block;\n }\n `,\n excludeAttrsSync: [\n 'tabindex',\n 'label-group',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'error-message',\n 'style',\n ],\n componentName,\n })\n);\n\nexport default SamlGroupMappingsClass;\n","import '@vaadin/custom-field';\n\nimport { componentName, SamlGroupMappingsClass } from './SamlGroupMappingsClass';\nimport '../../descope-text-field';\nimport '../descope-mappings-field';\nimport './descope-saml-group-mappings-internal';\n\ncustomElements.define(componentName, SamlGroupMappingsClass);\n\nexport { SamlGroupMappingsClass, componentName };\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\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 injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nconst { host } = {\n host: { selector: () => ':host' }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n textColor: [\n { property: 'color' }\n ],\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { TextClass } from '@descope-ui/descope-text/class';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-mappings-field-internal/MappingsFieldInternal';\n\nexport const componentName = getComponentName('mappings-field');\n\nconst customMixin = (superclass) =>\n class MappingsFieldMixinClass extends superclass {\n get defaultValues() {\n const defaultValuesAttr = this.getAttribute('default-values');\n if (defaultValuesAttr) {\n try {\n return JSON.parse(defaultValuesAttr);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"default-values\" -', e.message);\n }\n }\n return [];\n }\n\n setDefaultValues() {\n const initialDefaultValues = this.defaultValues;\n if (Object.keys(initialDefaultValues).length > 0) {\n this.inputElement.value = initialDefaultValues;\n }\n }\n\n init() {\n super.init?.();\n const template = document.createElement('template');\n\n template.innerHTML = `\n <${descopeInternalComponentName}\n tabindex=\"-1\"\n ></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'default-values',\n 'invalid',\n 'readonly',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n });\n\n // This is required since when we remove the invalid attribute from the internal mappings field,\n // we want to reflect the change in the parent component\n syncAttrs(this, this.inputElement, { includeAttrs: ['invalid'] });\n\n this.setDefaultValues();\n }\n };\n\nconst {\n host,\n helperText,\n errorMessage,\n mappingItem,\n labels,\n labelsText,\n valueLabel,\n attrLabel,\n separator,\n labelsContainer,\n} = {\n host: { selector: () => ':host' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n mappingItem: { selector: 'descope-mapping-item::part(wrapper)' },\n labels: { selector: 'descope-mappings-field-internal [part=\"labels\"] descope-text' },\n labelsText: {\n selector: 'descope-mappings-field-internal [part=\"labels\"] descope-text::part(text-wrapper)',\n },\n valueLabel: { selector: 'descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"]' },\n attrLabel: { selector: 'descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"]' },\n separator: { selector: 'descope-mapping-item::part(separator)' },\n labelsContainer: { selector: 'descope-mappings-field-internal [part=\"labels\"]' },\n};\n\nexport const MappingsFieldClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host, { ...separator, property: 'margin-top' }],\n fontFamily: [helperText, errorMessage, labels],\n separatorFontSize: { ...separator, property: 'font-size' },\n labelsFontSize: { ...labelsText, property: 'font-size' },\n labelsLineHeight: [\n { ...labelsText, property: 'line-height' },\n { ...labels, property: 'line-height' },\n ],\n labelTextColor: [\n { ...labels, property: TextClass.cssVarList.textColor },\n { ...separator, property: 'color' },\n ],\n itemMarginBottom: { ...mappingItem, property: 'margin-bottom' },\n valueLabelMinWidth: { ...valueLabel, property: 'min-width' },\n attrLabelMinWidth: { ...attrLabel, property: 'min-width' },\n labelsMarginBottom: { ...labelsContainer, property: 'margin-bottom' },\n separatorWidth: {},\n removeButtonWidth: {},\n },\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart'],\n inputEvent: 'input',\n proxyParentValidation: true,\n }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-custom-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-mappings-field-internal [part=\"labels\"] {\n display: none;\n grid-template-columns: 1fr var(${MappingsFieldClass.cssVarList.separatorWidth}) 1fr var(${MappingsFieldClass.cssVarList.removeButtonWidth});\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"],\n descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"] {\n ${TextClass.cssVarList.fontWeight}: 500;\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"] {\n grid-column: 1 / span 1;\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"] {\n grid-column: 3 / span 1;\n }\n\n descope-mapping-item::part(wrapper) {\n display: grid;\n grid-template-columns: 1fr var(${MappingsFieldClass.cssVarList.separatorWidth}) 1fr var(${MappingsFieldClass.cssVarList.removeButtonWidth});\n }\n `,\n excludeAttrsSync: [\n 'tabindex',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'options',\n 'error-message',\n 'style',\n ],\n componentName,\n })\n);\n\nexport default MappingsFieldClass;\n","import '@vaadin/custom-field';\nimport '@vaadin/icon';\nimport '@vaadin/icons';\nimport { componentName, MappingsFieldClass } from './MappingsFieldClass';\nimport '@descope-ui/descope-text';\nimport '@descope-ui/descope-button';\nimport '../../descope-text-field';\nimport '@descope-ui/descope-combo-box';\nimport './descope-mappings-field-internal';\nimport './descope-mapping-item';\n\ncustomElements.define(componentName, MappingsFieldClass);\n\nexport { MappingsFieldClass, componentName };\n","import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport {\n getComponentName,\n forwardAttrs,\n observeAttributes,\n} from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('saml-group-mappings-internal');\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: '' });\n\nclass SamlGroupMappingsInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['invalid'].concat(BaseInputClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n <descope-text-field variant=\"body2\" bordered=\"true\"></descope-text-field>\n <descope-mappings-field></descope-mappings-field>\n `;\n\n this.groupInputElement = this.querySelector('descope-text-field');\n this.mappingsElement = this.querySelector('descope-mappings-field');\n }\n\n resetInvalidIndication() {\n this.removeAttribute('invalid');\n }\n\n handleMappingsInvalidChange(changedAttributes) {\n if (changedAttributes.includes('invalid')) {\n if (!this.mappingsElement.hasAttribute('invalid')) {\n this.resetInvalidIndication();\n }\n }\n }\n\n initFocusHandler() {\n // This event listener needs to be placed before the super.init() call\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n const focusedElement = this.mappingsElement.checkValidity()\n ? this.groupInputElement\n : this.mappingsElement;\n focusedElement.focus();\n }\n });\n }\n\n init() {\n // This needs to be placed before the super.init() call to work\n this.initFocusHandler();\n\n super.init?.();\n\n forwardAttrs(this, this.groupInputElement, {\n mapAttrs: { 'label-group': 'label' },\n includeAttrs: ['size', 'label-group', 'readonly', 'disabled'],\n });\n\n forwardAttrs(this, this.mappingsElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'readonly',\n 'disabled',\n 'data-errormessage-pattern-mismatch',\n ],\n });\n\n // Observing the invalid attribute of the mappings field to reset the invalid state for this component.\n // When an invalid item turns valid, the mappings field will remove the invalid attribute, and at this component\n // level, we need to remove the invalid attribute as well to be able to mark the component as invalid the next time\n observeAttributes(this.mappingsElement, this.handleMappingsInvalidChange.bind(this), {\n includeAttrs: ['invalid'],\n });\n }\n\n get value() {\n return {\n group: this.groupInputElement.value,\n mappings: this.mappingsElement.value,\n };\n }\n\n set value(value) {\n if (value?.group && typeof value.group === 'string') {\n this.groupInputElement.value = value.group;\n }\n if (Array.isArray(value?.mappings)) {\n this.mappingsElement.value = value.mappings;\n }\n }\n\n getValidity() {\n if (!this.groupInputElement.checkValidity()) {\n return this.groupInputElement.validity;\n }\n if (!this.mappingsElement.checkValidity()) {\n return this.mappingsElement.validity;\n }\n\n return {};\n }\n\n #handleInvalidState(isInvalid) {\n if (isInvalid) {\n if (!this.groupInputElement.checkValidity()) {\n this.groupInputElement.setAttribute('invalid', 'true');\n return;\n }\n\n if (!this.mappingsElement.checkValidity()) {\n this.mappingsElement.setAttribute('invalid', 'true');\n }\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (attrName === 'invalid') {\n this.#handleInvalidState(newValue === 'true');\n }\n }\n}\n\nexport default SamlGroupMappingsInternal;\n","import {\n componentNameValidationMixin,\n createProxy,\n createStyleMixin,\n draggableMixin,\n} from '@descope-ui/common/components-mixins';\nimport { getComponentName } from '@descope-ui/common/components-helpers';\nimport { ImageClass } from '@descope-ui/descope-image/class';\nimport { compose } from '@descope-ui/common/utils';\n\nexport const componentName = getComponentName('icon');\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: [{}, { property: ImageClass.cssVarList.fill }],\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'descope-image',\n style: () => `\n :host {\n display: inline-flex;\n }\n `,\n excludeAttrsSync: ['tabindex', 'class', 'style'],\n componentName,\n }),\n);\n"],"names":["componentName","BaseInputClass","baseSelector","observedAttributes","concat","isValidDataType","data","every","obj","Array","isArray","Object","getOwnPropertyNames","length","keys","trim","e","labelValue","this","getAttribute","labelAttr","buttonLabel","options","addNewMappingItem","focusNewItem","newMappingItem","document","createElement","setAttribute","mappingsContainerEle","appendChild","includeAttrs","setTimeout","setCustomValidity","addEventListener","resetInvalidIndication","undefined","remove","dispatchEvent","CustomEvent","bubbles","composed","focus","items","from","querySelectorAll","value","reduce","acc","item","mappings","console","error","currentItems","i","removeChild","forEach","mapping","index","mappingItem","constructor","super","innerHTML","labelsEle","querySelector","buttonContainer","initLabels","initAddButton","isDisabled","button","onclick","style","display","init","isTrusted","contains","checkValidity","removeAttribute","bind","getValidity","errorItem","find","validity","isInvalid","reportValidity","attributeChangedCallback","attrName","oldValue","newValue","toggleAttribute","createBaseInputClass","args","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","srcAttrs","RawImage","attachShadow","mode","toggleVisibility","src","onThemeChange","renderImage","isVisible","classList","add","altText","legacySrc","themeSrc","currentThemeName","updateFillColor","node","ele","ImageClass","cssVarList","fill","then","res","shouldRender","srcVal","height","width","customElements","define","clickableMixin","superclass","isLoading","click","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","ADD_TAGS","FORBID_TAGS","DOMParser","parseFromString","createImage","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","createImgEle","setProperty","slottedIcon","loadingIndicatorStyles","ButtonClass","hostHeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","borderColor","borderStyle","borderWidth","verticalPadding","horizontalPadding","fallback","iconColor","labelTextDecoration","labelSpacing","iconSize","slots","wrappedEleName","excludeAttrsSync","color","inputAttrs","separator","attributeValue","attributeInput","inputValue","valueInput","entries","attribute","InputEvent","shadowRoot","inputs","removeButton","mapAttrs","initRemoveButton","badInput","handleSeparatorChange","textContent","invalid","defaultErrorMsgValueMissing","groupInput","SamlGroupMappingsClass","groupNameInputMarginBottom","proxyProps","inputEvent","triggerValidationEvents","proxyParentValidation","template","baseElement","content","cloneNode","inputElement","RawText","hideWhenEmpty","hasChildren","childNodes","TextClass","textColor","textLineHeight","textLetterSpacing","textShadow","textTransform","fontStyle","fontWeight","observedAttrs","TextFieldClass","useProxyTargets","icon","renderCopyToClipboard","iconInitConfig","title","iconCopiedConfig","assign","slot","navigator","clipboard","writeText","onLabelClick","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","labels","labelsText","valueLabel","attrLabel","labelsContainer","MappingsFieldClass","separatorFontSize","labelsFontSize","labelsLineHeight","itemMarginBottom","valueLabelMinWidth","attrLabelMinWidth","labelsMarginBottom","separatorWidth","removeButtonWidth","defaultValues","defaultValuesAttr","JSON","parse","message","setDefaultValues","initialDefaultValues","groupInputElement","mappingsElement","handleMappingsInvalidChange","changedAttributes","includes","hasAttribute","initFocusHandler","group","IconClass"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878,9894],{21374:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.w,componentName:()=>i.T}),n(11284),n(37182),n(95260);var i=n(79275);customElements.define(i.T,i.w)},49157:(t,e,n)=>{n.d(e,{$B:()=>o,lq:()=>r});var i=n(10473);const o=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=t=>{const e=t||"";let n="",o="";const r=(0,i.l)(e);if(r)r.countryCallingCode&&(n=`+${r.countryCallingCode}`),r.nationalNumber&&(o=r.nationalNumber);else{const[t,i]=e.split("-");n=t||"",o=i||""}return[n,o]}},79275:(t,e,n)=>{n.d(e,{T:()=>l,w:()=>u});var i=n(79365),o=n(6424),r=n(9696),s=n(97810),a=n(73551);const l=(0,s.xE)("text-field"),d=["type","label-type","copy-to-clipboard"],u=(0,r.Zz)((0,i.RF)({mappings:o.A}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),i.tQ,t=>class extends t{static get observedAttributes(){return d.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout(()=>{Object.assign(this.icon,e)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}})((0,i.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(${u.cssVarList.inputOutlineWidth}) + var(${u.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)(u.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",u.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}))},81808:(t,e,n)=>{n.d(e,{NF:()=>B,TQ:()=>h});var i=n(84015),o=n(97810),r=n(9696),s=n(79365),a=n(79275),l=n(86365),d=n(51680),u=n(73551);const p=a.w.cssVarList,c=l.C.cssVarList,h=(0,o.xE)("phone-field"),{host:b,label:y,requiredIndicator:m,inputField:g,internalAfter:f,countryCodeInput:x,phoneInput:C,separator:v,errorMessage:w,helperText:A}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},B=(0,r.Zz)((0,s.RF)({mappings:{fontSize:[b,g,{selector:a.w.componentName,property:a.w.cssVarList.fontSize},{selector:l.C.componentName,property:l.C.cssVarList.fontSize}],fontFamily:[y,w,A,{...x,property:l.C.cssVarList.overlay.fontFamily}],hostWidth:[{...b,property:"width"},{...C,property:"width"},{...x,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...b,property:"direction"},inputBorderStyle:[{...f,property:"border-style"},{...v,property:"border-left-style"}],inputBorderWidth:[{...f,property:"border-width"},{...v,property:"border-left-width"}],inputBorderColor:[{...f,property:"border-color"},{...v,property:"border-left-color"}],inputBorderRadius:[{...g,property:"border-radius"},{...f,property:"border-radius"}],countryCodeInputWidth:{...x,property:c.hostWidth},countryCodeDropdownWidth:{...x,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...C,property:"width"},horizontalPadding:[{...C,property:"padding-left"},{...C,property:"padding-right"},{...x,property:"padding-left"},{...x,property:"padding-right"}],labelTextColor:[{...y,property:"color"},{...y,property:"-webkit-text-fill-color"},{...m,property:"color"}],labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...w,property:"color"},errorMessageIcon:{...w,property:"background-image"},errorMessageIconSize:{...w,property:"background-size"},errorMessageIconPadding:{...w,property:"padding-inline-start"},errorMessageIconRepeat:{...w,property:"background-repeat"},errorMessageIconPosition:{...w,property:"background-position"},errorMessageFontSize:{...w,property:"font-size"},inputValueTextColor:[{...C,property:p.inputValueTextColor},{...x,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...C,property:p.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...g,property:"outline-style"},inputOutlineColor:{...g,property:"outline-color"},inputOutlineWidth:{...g,property:"outline-width"},inputOutlineOffset:{...g,property:"outline-offset"},valueInputHeight:[{...x,property:c.valueInputHeight}],valueInputMarginBottom:[{...C,property:p.valueInputMarginBottom}],marginInlineStart:[{...C,property:p.marginInlineStart},{...x,property:c.marginInlineStart}]}}),s.VO,s.Yg,(0,s.OZ)({proxyProps:["value","selectionStart"]}),t=>class extends t{static get CountryCodes(){return d.A}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${i.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${i.T}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(i.T),(0,o.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input","format-value","strict-validation"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map(t=>t.getAttribute("data-country-code"))}})((0,s.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,u.cy)(B.cssVarList)}\n\t\t\t${(0,u.I4)("vaadin-text-field")}\n\t\t\t${(0,u.kG)("vaadin-text-field")}\n\t\t\t${(0,u.X6)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${B.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${p.inputOutlineWidth}: 0;\n\t\t\t\t${p.inputOutlineOffset}: 0;\n\t\t\t\t${p.inputBorderWidth}: 0;\n\t\t\t\t${p.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${(0,u.$J)("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:h}))},84015:(t,e,n)=>{n.d(e,{A:()=>g,T:()=>d});var i=n(3393),o=n(97810),r=n(51680),s=n(49157),a=n(10473),l=n(23530);const d=(0,o.xE)("phone-field-internal"),u=["disabled","size","bordered","readonly"],p=["country-input-placeholder","default-code","restrict-countries"],c=["phone-input-placeholder","maxlength","autocomplete","name"],h=["label-type","country-input-label","label"],b={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},y=[].concat(u,p,c,h),m=(0,i.y)({componentName:d,baseSelector:"div"}),g=class extends m{static get observedAttributes(){return[].concat(m.observedAttributes||[],y)}#t;constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${r.A.map(t=>(0,s.$B)(t)).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.comboBox=this.querySelector("descope-combo-box"),this.textField=this.querySelector("descope-text-field"),this.inputs=[this.comboBox,this.textField],(0,o.EA)(this,this.comboBox,{includeAttrs:["label-type"]}),(0,o.EA)(this,this.textField,{includeAttrs:["label-type","required"]}),this.comboBox.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get countryCodeInputData(){return this.comboBox.items}get countryCodeValue(){return this.comboBox.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.textField.shadowRoot.querySelector("input")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get defaultCode(){return this.getAttribute("default-code")}get selectionStart(){return this.textField.selectionStart}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get selectedCountryCode(){return this.comboBox?.selectedItem?.getAttribute("data-country-code")}get restrictCountries(){const t=this.getAttribute("restrict-countries");return t?.split(",").filter(Boolean)||[]}get isFormatValue(){return"true"===this.getAttribute("format-value")}get isStrictValidation(){return"true"===this.getAttribute("strict-validation")}get value(){if(!this.comboBox.value||!this.textField.value)return"";const[t,e]=(0,s.lq)(`${this.comboBox.value}-${this.textField.value}`);return`${t||this.comboBox.value}-${e||this.textField.value}`}set value(t){const[e,n]=(0,s.lq)(t);this.#e(e),this.#n(n)}init(){this.addEventListener("focus",t=>{t.isTrusted&&this.inputs[1].focus()}),super.init?.(),this.#i()}getValidity(){const t=this.comboBox.value,e=this.textField.value,n=!t||!e,i=e&&e.length>=this.minLength;if(this.isRequired&&n)return{valueMissing:!0};if(this.value){if(!i)return{tooShort:!0};if(this.isStrictValidation&&!this.#o())return{patternMismatch:!0}}return{}}setSelectionRange(...t){this.textField.setSelectionRange(...t)}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.#r(n);else if(y.includes(t)){const e=b[t]||t;u.includes(t)?this.inputs.forEach(t=>t.setAttribute(e,n)):p.includes(t)?this.comboBox.setAttribute(e,n):c.includes(t)&&this.textField.setAttribute(e,n)}h.includes(t)&&this.#s(t,n),"restrict-countries"===t&&this.#a(this.restrictCountries)}}#i(){this.textField.addEventListener("input",t=>{if(!this.allowAlphanumericInput){const e=/^\d$/,n=t.target.value.split("").filter(t=>e.test(t)).join("");t.target.value=n}}),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching(),this.addEventListener("input",this.#l.bind(this))}#e(t){if(!t||t===this.selectedCountryCode)return;let e;if(this.value){const n=this.#d(`${t}-${this.textField.value}`);e=this.#u(n)}e||(e=this.#p(t)),this.comboBox.selectedItem=e}#n(t){this.isFormatValue&&(t=this.#c(t)),this.textField.value!==t&&(this.textField.value=t)}#c(t=""){return this.#t&&this.#t.country===this.selectedCountryCode||(this.#t=new l.Q(this.selectedCountryCode)),this.#t.reset(),this.#t.input(t)||t}#o(){const t=(0,a.l)(this.value);return!!(t&&t.isValid?.()&&t.country&&this.#h(t.country))}#h(t){return!this.restrictCountries.length||this.restrictCountries.includes(t)}#p(t){return this.comboBox.items?.find(e=>e.getAttribute("data-id")===t)||void 0}#u(t){return this.comboBox.items?.find(e=>e.getAttribute("data-country-code")===t)}#d(t){if(!t)return;const e=(0,a.l)(t);if(!e?.country)return;const n=this.#u(e.country);return n?.getAttribute("data-country-code")}#a(t){const e=t.length?r.A.filter(e=>t.includes(e.code)):r.A;this.querySelector("descope-combo-box").innerHTML=e.map(t=>(0,s.$B)(t)).join("")}#r(t){if(!this.comboBox.value){const e=this.#u(t);e&&setTimeout(()=>{this.comboBox.selectedItem=e})}}#l(){if(!this.value)return;const t=this.#d(this.value);if(t&&this.selectedCountryCode!==t){const e=this.#u(t);e&&(this.comboBox.selectedItem=e)}}#s(t,e){const n=b[t]||t;"label-type"===t?this.#b(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.comboBox.setAttribute(n,e):"label"===t&&this.textField.setAttribute(n,e))}#b(t){"floating"===t?(this.comboBox.setAttribute("label",this.getAttribute("country-input-label")||""),this.comboBox.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.textField.setAttribute("label",this.getAttribute("label")||""),this.textField.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach(t=>t.removeAttribute("label"))}}},92132:(t,e,n)=>{n.r(e),n(27092),n(21374);var i=n(84015);customElements.define(i.T,i.A)},98136:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>i.NF,componentName:()=>i.TQ}),n(92132),n(27092),n(21374);var i=n(81808);customElements.define(i.TQ,i.NF)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878,9894],{21374:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.w,componentName:()=>i.T}),n(11284),n(37182),n(95260);var i=n(79275);customElements.define(i.T,i.w)},49157:(t,e,n)=>{n.d(e,{$B:()=>o,lq:()=>r});var i=n(10473);const o=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=t=>{const e=t||"";let n="",o="";const r=(0,i.l)(e);if(r)r.countryCallingCode&&(n=`+${r.countryCallingCode}`),r.nationalNumber&&(o=r.nationalNumber);else{const[t,i]=e.split("-");n=t||"",o=i||""}return[n,o]}},79275:(t,e,n)=>{n.d(e,{T:()=>l,w:()=>u});var i=n(79365),o=n(6424),r=n(9696),s=n(97810),a=n(73551);const l=(0,s.xE)("text-field"),d=["type","label-type","copy-to-clipboard"],u=(0,r.Zz)((0,i.RF)({mappings:o.A}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),i.tQ,t=>class extends t{static get observedAttributes(){return d.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout(()=>{Object.assign(this.icon,e)},5e3)})}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}})((0,i.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(${u.cssVarList.inputOutlineWidth}) + var(${u.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)(u.cssVarList)}\n\t\t\t${(0,a.LJ)("vaadin-text-field",u.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}))},81808:(t,e,n)=>{n.d(e,{NF:()=>B,TQ:()=>h});var i=n(84015),o=n(97810),r=n(9696),s=n(79365),a=n(79275),l=n(86365),d=n(51680),u=n(73551);const p=a.w.cssVarList,c=l.C.cssVarList,h=(0,o.xE)("phone-field"),{host:b,label:y,requiredIndicator:m,inputField:g,internalAfter:f,countryCodeInput:x,phoneInput:C,separator:v,errorMessage:w,helperText:A}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},B=(0,r.Zz)((0,s.RF)({mappings:{fontSize:[b,g,{selector:a.w.componentName,property:a.w.cssVarList.fontSize},{selector:l.C.componentName,property:l.C.cssVarList.fontSize}],fontFamily:[y,w,A,{...x,property:l.C.cssVarList.overlay.fontFamily}],hostWidth:[{...b,property:"width"},{...C,property:"width"},{...x,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...b,property:"direction"},inputBorderStyle:[{...f,property:"border-style"},{...v,property:"border-left-style"}],inputBorderWidth:[{...f,property:"border-width"},{...v,property:"border-left-width"}],inputBorderColor:[{...f,property:"border-color"},{...v,property:"border-left-color"}],inputBorderRadius:[{...g,property:"border-radius"},{...f,property:"border-radius"}],countryCodeInputWidth:{...x,property:c.hostWidth},countryCodeDropdownWidth:{...x,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...C,property:"width"},horizontalPadding:[{...C,property:"padding-left"},{...C,property:"padding-right"},{...x,property:"padding-left"},{...x,property:"padding-right"}],labelTextColor:[{...y,property:"color"},{...y,property:"-webkit-text-fill-color"},{...m,property:"color"}],labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...w,property:"color"},errorMessageIcon:{...w,property:"background-image"},errorMessageIconSize:{...w,property:"background-size"},errorMessageIconPadding:{...w,property:"padding-inline-start"},errorMessageIconRepeat:{...w,property:"background-repeat"},errorMessageIconPosition:{...w,property:"background-position"},errorMessageFontSize:{...w,property:"font-size"},inputValueTextColor:[{...C,property:p.inputValueTextColor},{...x,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...C,property:p.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...g,property:"outline-style"},inputOutlineColor:{...g,property:"outline-color"},inputOutlineWidth:{...g,property:"outline-width"},inputOutlineOffset:{...g,property:"outline-offset"},valueInputHeight:[{...x,property:c.valueInputHeight}],valueInputMarginBottom:[{...C,property:p.valueInputMarginBottom}],marginInlineStart:[{...C,property:p.marginInlineStart},{...x,property:c.marginInlineStart}]}}),s.VO,s.Yg,(0,s.OZ)({proxyProps:["value","selectionStart"]}),t=>class extends t{static get CountryCodes(){return d.A}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${i.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${i.T}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(i.T),(0,o.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input","format-value","strict-validation"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map(t=>t.getAttribute("data-country-code"))}})((0,s.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,u.cy)(B.cssVarList)}\n\t\t\t${(0,u.I4)("vaadin-text-field")}\n\t\t\t${(0,u.kG)("vaadin-text-field")}\n\t\t\t${(0,u.X6)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${B.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${p.inputOutlineWidth}: 0;\n\t\t\t\t${p.inputOutlineOffset}: 0;\n\t\t\t\t${p.inputBorderWidth}: 0;\n\t\t\t\t${p.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${(0,u.$J)("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:h}))},84015:(t,e,n)=>{n.d(e,{A:()=>g,T:()=>d});var i=n(3393),o=n(97810),r=n(51680),s=n(49157),a=n(10473),l=n(23530);const d=(0,o.xE)("phone-field-internal"),u=["disabled","size","bordered","readonly"],p=["country-input-placeholder","default-code","restrict-countries"],c=["phone-input-placeholder","maxlength","autocomplete","name"],h=["label-type","country-input-label","label"],b={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},y=[].concat(u,p,c,h),m=(0,i.y)({componentName:d,baseSelector:"div"}),g=class extends m{static get observedAttributes(){return[].concat(m.observedAttributes||[],y)}#t;constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${r.A.map(t=>(0,s.$B)(t)).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.comboBox=this.querySelector("descope-combo-box"),this.textField=this.querySelector("descope-text-field"),this.inputs=[this.comboBox,this.textField],(0,o.EA)(this,this.comboBox,{includeAttrs:["label-type"]}),(0,o.EA)(this,this.textField,{includeAttrs:["label-type","required"]}),this.comboBox.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get countryCodeInputData(){return this.comboBox.items}get countryCodeValue(){return this.comboBox.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.textField.shadowRoot.querySelector("input")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get defaultCode(){return this.getAttribute("default-code")}get selectionStart(){return this.textField.selectionStart}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get selectedCountryCode(){return this.comboBox?.selectedItem?.getAttribute("data-country-code")}get restrictCountries(){const t=this.getAttribute("restrict-countries");return t?.split(",").filter(Boolean)||[]}get isFormatValue(){return"true"===this.getAttribute("format-value")}get isStrictValidation(){return"true"===this.getAttribute("strict-validation")}get value(){if(!this.comboBox.value||!this.textField.value)return"";const[t,e]=(0,s.lq)(`${this.comboBox.value}-${this.textField.value}`);return`${t||this.comboBox.value}-${e||this.textField.value}`}set value(t){const[e,n]=(0,s.lq)(t);this.#e(e),this.#n(n)}init(){this.addEventListener("focus",t=>{t.isTrusted&&this.inputs[1].focus()}),super.init?.(),this.#i()}getValidity(){const t=this.comboBox.value,e=this.textField.value,n=!t||!e,i=e&&e.length>=this.minLength;if(this.isRequired&&n)return{valueMissing:!0};if(this.value){if(!i)return{tooShort:!0};if(this.isStrictValidation&&!this.#o())return{patternMismatch:!0}}return{}}setSelectionRange(...t){this.textField.setSelectionRange(...t)}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.#r(n);else if(y.includes(t)){const e=b[t]||t;u.includes(t)?this.inputs.forEach(t=>t.setAttribute(e,n)):p.includes(t)?this.comboBox.setAttribute(e,n):c.includes(t)&&this.textField.setAttribute(e,n)}h.includes(t)&&this.#s(t,n),"restrict-countries"===t&&this.#a(this.restrictCountries)}}#i(){this.textField.addEventListener("input",t=>{if(!this.allowAlphanumericInput){const e=/^\d$/,n=t.target.value.split("").filter(t=>e.test(t)).join("");t.target.value=n}}),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching(),this.addEventListener("input",this.#l.bind(this))}#e(t){if(!t||t===this.selectedCountryCode)return;let e;if(this.value){const n=this.#d(`${t}-${this.textField.value}`);e=this.#u(n)}e||(e=this.#p(t)),this.comboBox.selectedItem=e}#n(t){this.isFormatValue&&(t=this.#c(t)),this.textField.value!==t&&(this.textField.value=t)}#c(t=""){return this.#t&&this.#t.country===this.selectedCountryCode||(this.#t=new l.Q(this.selectedCountryCode)),this.#t.reset(),this.#t.input(t)||t}#o(){const t=(0,a.l)(this.value);return!!(t&&t.isValid?.()&&t.country&&this.#h(t.country))}#h(t){return!this.restrictCountries.length||this.restrictCountries.includes(t)}#p(t){return this.comboBox.items?.find(e=>e.getAttribute("data-id")===t)||void 0}#u(t){return this.comboBox.items?.find(e=>e.getAttribute("data-country-code")===t)}#d(t){if(!t)return;const e=(0,a.l)(t);if(!e?.country)return;const n=this.#u(e.country);return n?.getAttribute("data-country-code")}#a(t){const e=t.length?r.A.filter(e=>t.includes(e.code)):r.A;this.querySelector("descope-combo-box").innerHTML=e.map(t=>(0,s.$B)(t)).join("")}#r(t){if(!this.comboBox.value){const e=this.#u(t);e&&setTimeout(()=>{this.comboBox.selectedItem=e})}}#l(){if(!this.value)return;const t=this.#d(this.value);if(t&&this.selectedCountryCode!==t){const e=this.#u(t);e&&(this.comboBox.selectedItem=e)}}#s(t,e){const n=b[t]||t;"label-type"===t?this.#b(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.comboBox.setAttribute(n,e):"label"===t&&this.textField.setAttribute(n,e))}#b(t){"floating"===t?(this.comboBox.setAttribute("label",this.getAttribute("country-input-label")||""),this.comboBox.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.textField.setAttribute("label",this.getAttribute("label")||""),this.textField.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach(t=>t.removeAttribute("label"))}}},92132:(t,e,n)=>{n.r(e),n(27092),n(21374);var i=n(84015);customElements.define(i.T,i.A)},98136:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>i.NF,componentName:()=>i.TQ}),n(92132),n(27092),n(21374);var i=n(81808);customElements.define(i.TQ,i.NF)}}]);
2
2
  //# sourceMappingURL=phone-fields-descope-phone-field-index-js.js.map