@descope/web-components-ui 1.31.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +481 -364
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +524 -438
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1408.js +382 -0
- package/dist/umd/1408.js.LICENSE.txt +17 -0
- package/dist/umd/1408.js.map +1 -0
- package/dist/umd/{9243.js → 1519.js} +7 -6
- package/dist/umd/1519.js.map +1 -0
- package/dist/umd/189.js +109 -276
- package/dist/umd/189.js.LICENSE.txt +12 -0
- package/dist/umd/189.js.map +1 -0
- package/dist/umd/{7979.js → 1899.js} +11 -10
- package/dist/umd/1899.js.map +1 -0
- package/dist/umd/{1172.js → 1995.js} +10 -9
- package/dist/umd/1995.js.map +1 -0
- package/dist/umd/2540.js +2 -1
- package/dist/umd/2540.js.map +1 -0
- package/dist/umd/2672.js +2 -0
- package/dist/umd/2672.js.map +1 -0
- package/dist/umd/2739.js +2 -0
- package/dist/umd/2739.js.map +1 -0
- package/dist/umd/{2570.js → 2894.js} +6 -5
- package/dist/umd/2894.js.map +1 -0
- package/dist/umd/{404.js → 3620.js} +9 -8
- package/dist/umd/3620.js.map +1 -0
- package/dist/umd/{4455.js → 384.js} +8 -7
- package/dist/umd/384.js.map +1 -0
- package/dist/umd/4467.js +3 -0
- package/dist/umd/4467.js.map +1 -0
- package/dist/umd/{4127.js → 4518.js} +11 -10
- package/dist/umd/4518.js.map +1 -0
- package/dist/umd/{1902.js → 4550.js} +7 -6
- package/dist/umd/4550.js.map +1 -0
- package/dist/umd/{4554.js → 4623.js} +7 -6
- package/dist/umd/4623.js.map +1 -0
- package/dist/umd/{742.js → 4914.js} +3 -2
- package/dist/umd/4914.js.map +1 -0
- package/dist/umd/{9478.js → 513.js} +6 -5
- package/dist/umd/513.js.map +1 -0
- package/dist/umd/{201.js → 5260.js} +6 -5
- package/dist/umd/5260.js.map +1 -0
- package/dist/umd/5414.js +2 -1
- package/dist/umd/5414.js.map +1 -0
- package/dist/umd/5648.js +110 -0
- package/dist/umd/5648.js.map +1 -0
- package/dist/umd/5780.js +2 -0
- package/dist/umd/5780.js.map +1 -0
- package/dist/umd/{5563.js → 6227.js} +6 -5
- package/dist/umd/6227.js.map +1 -0
- package/dist/umd/6424.js +149 -0
- package/dist/umd/6424.js.map +1 -0
- package/dist/umd/{7097.js → 6649.js} +6 -5
- package/dist/umd/6649.js.map +1 -0
- package/dist/umd/676.js +3 -0
- package/dist/umd/676.js.map +1 -0
- package/dist/umd/{1738.js → 7092.js} +2 -1
- package/dist/umd/7092.js.map +1 -0
- package/dist/umd/{3638.js → 7182.js} +3 -2
- package/dist/umd/7182.js.map +1 -0
- package/dist/umd/{507.js → 7291.js} +6 -5
- package/dist/umd/7291.js.map +1 -0
- package/dist/umd/{4187.js → 7565.js} +3 -2
- package/dist/umd/7565.js.map +1 -0
- package/dist/umd/{3191.js → 7620.js} +11 -7
- package/dist/umd/7620.js.map +1 -0
- package/dist/umd/{6050.js → 7774.js} +10 -9
- package/dist/umd/7774.js.map +1 -0
- package/dist/umd/{2666.js → 7939.js} +5 -4
- package/dist/umd/7939.js.map +1 -0
- package/dist/umd/{4114.js → 8618.js} +5 -4
- package/dist/umd/8618.js.map +1 -0
- package/dist/umd/8961.js +2 -0
- package/dist/umd/8961.js.map +1 -0
- package/dist/umd/{4574.js → 8983.js} +6 -5
- package/dist/umd/8983.js.map +1 -0
- package/dist/umd/9030.js +265 -307
- package/dist/umd/9030.js.LICENSE.txt +0 -6
- package/dist/umd/9030.js.map +1 -0
- package/dist/umd/9365.js +2 -0
- package/dist/umd/9365.js.map +1 -0
- package/dist/umd/{4218.js → 9380.js} +5 -4
- package/dist/umd/9380.js.map +1 -0
- package/dist/umd/9871.js +276 -0
- package/dist/umd/9871.js.map +1 -0
- package/dist/umd/9970.js +833 -0
- package/dist/umd/9970.js.map +1 -0
- package/dist/umd/DescopeDev.js +2 -1
- package/dist/umd/DescopeDev.js.map +1 -0
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +2 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js.map +1 -0
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +2 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -0
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +2 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -0
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +2 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -0
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js +2 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js.map +1 -0
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +2 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -0
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js +2 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js.map +1 -0
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +2 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -0
- package/dist/umd/descope-address-field.js +2 -1
- package/dist/umd/descope-address-field.js.map +1 -0
- package/dist/umd/descope-alert-index-js.js +2 -1
- package/dist/umd/descope-alert-index-js.js.map +1 -0
- package/dist/umd/descope-apps-list-index-js.js +2 -1
- package/dist/umd/descope-apps-list-index-js.js.map +1 -0
- package/dist/umd/descope-autocomplete-field.js +2 -1
- package/dist/umd/descope-autocomplete-field.js.map +1 -0
- package/dist/umd/descope-avatar.js +2 -1
- package/dist/umd/descope-avatar.js.map +1 -0
- package/dist/umd/descope-badge-index-js.js +2 -1
- package/dist/umd/descope-badge-index-js.js.map +1 -0
- package/dist/umd/descope-button-index-js.js +5 -4
- package/dist/umd/descope-button-index-js.js.map +1 -0
- package/dist/umd/descope-code-snippet-index-js.js +2 -1
- package/dist/umd/descope-code-snippet-index-js.js.map +1 -0
- package/dist/umd/descope-combo-box.js +7 -6
- package/dist/umd/descope-combo-box.js.map +1 -0
- package/dist/umd/descope-container-index-js.js +2 -1
- package/dist/umd/descope-container-index-js.js.map +1 -0
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +2 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -0
- package/dist/umd/descope-date-field-index-js.js +2 -1
- package/dist/umd/descope-date-field-index-js.js.map +1 -0
- package/dist/umd/descope-divider-index-js.js +2 -1
- package/dist/umd/descope-divider-index-js.js.map +1 -0
- package/dist/umd/descope-email-field-index-js.js +5 -4
- package/dist/umd/descope-email-field-index-js.js.map +1 -0
- package/dist/umd/descope-enriched-text-index-js.js +2 -1
- package/dist/umd/descope-enriched-text-index-js.js.map +1 -0
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +5 -4
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -0
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +6 -5
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -0
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +2 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -0
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +5 -4
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -0
- package/dist/umd/descope-grid-index-js.js +2 -1
- package/dist/umd/descope-grid-index-js.js.map +1 -0
- package/dist/umd/descope-hybrid-field-index-js.js +4 -3
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -0
- package/dist/umd/descope-icon-index-js.js +2 -1
- package/dist/umd/descope-icon-index-js.js.map +1 -0
- package/dist/umd/descope-image-index-js.js +2 -1
- package/dist/umd/descope-image-index-js.js.map +1 -0
- package/dist/umd/descope-link-index-js.js +2 -1
- package/dist/umd/descope-link-index-js.js.map +1 -0
- package/dist/umd/descope-list-index-js.js +2 -1
- package/dist/umd/descope-list-index-js.js.map +1 -0
- package/dist/umd/descope-loader-linear-index-js.js +2 -1
- package/dist/umd/descope-loader-linear-index-js.js.map +1 -0
- package/dist/umd/descope-loader-radial-index-js.js +2 -1
- package/dist/umd/descope-loader-radial-index-js.js.map +1 -0
- package/dist/umd/descope-logo-index-js.js +2 -1
- package/dist/umd/descope-logo-index-js.js.map +1 -0
- package/dist/umd/descope-modal-index-js.js +2 -1
- package/dist/umd/descope-modal-index-js.js.map +1 -0
- package/dist/umd/descope-multi-select-combo-box-index-js.js +2 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -0
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +2 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -0
- package/dist/umd/descope-new-password-index-js.js +2 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -0
- package/dist/umd/descope-notification-descope-notification-card-index-js.js +2 -1
- package/dist/umd/descope-notification-descope-notification-card-index-js.js.map +1 -0
- package/dist/umd/descope-notification-index-js.js +2 -1
- package/dist/umd/descope-notification-index-js.js.map +1 -0
- package/dist/umd/descope-notp-image-index-js.js +2 -1
- package/dist/umd/descope-notp-image-index-js.js.map +1 -0
- package/dist/umd/descope-number-field-index-js.js +2 -1
- package/dist/umd/descope-number-field-index-js.js.map +1 -0
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +2 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js.map +1 -0
- package/dist/umd/descope-passcode-index-js.js +3 -2
- package/dist/umd/descope-passcode-index-js.js.map +1 -0
- package/dist/umd/descope-password-index-js.js +2 -1
- package/dist/umd/descope-password-index-js.js.map +1 -0
- package/dist/umd/descope-policy-validation-index-js.js +2 -1
- package/dist/umd/descope-policy-validation-index-js.js.map +1 -0
- package/dist/umd/descope-radio-group-index-js.js +2 -1
- package/dist/umd/descope-radio-group-index-js.js.map +1 -0
- package/dist/umd/descope-recaptcha-index-js.js +2 -1
- package/dist/umd/descope-recaptcha-index-js.js.map +1 -0
- package/dist/umd/descope-scopes-list-index-js.js +2 -1
- package/dist/umd/descope-scopes-list-index-js.js.map +1 -0
- package/dist/umd/descope-security-questions-setup-index-js.js +2 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -0
- package/dist/umd/descope-security-questions-verify-index-js.js +3 -2
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -0
- package/dist/umd/descope-text-area-index-js.js +2 -1
- package/dist/umd/descope-text-area-index-js.js.map +1 -0
- package/dist/umd/descope-text-field-index-js.js +3 -2
- package/dist/umd/descope-text-field-index-js.js.map +1 -0
- package/dist/umd/descope-text.js +2 -1
- package/dist/umd/descope-text.js.map +1 -0
- package/dist/umd/descope-third-party-app-logo-index-js.js +2 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -0
- package/dist/umd/descope-totp-image-index-js.js +2 -1
- package/dist/umd/descope-totp-image-index-js.js.map +1 -0
- package/dist/umd/descope-upload-file-index-js.js +2 -1
- package/dist/umd/descope-upload-file-index-js.js.map +1 -0
- package/dist/umd/descope-user-attribute-index-js.js +2 -1
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -0
- package/dist/umd/descope-user-auth-method-index-js.js +2 -1
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -0
- package/dist/umd/fonts/font-1364590020.woff +0 -0
- package/dist/umd/fonts/font-1949233557.woff +0 -0
- package/dist/umd/index.js +2 -1
- package/dist/umd/index.js.map +1 -0
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +2 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js.map +1 -0
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +2 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js.map +1 -0
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +2 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -0
- package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +2 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js.map +1 -0
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +2 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -0
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +2 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -0
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +2 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -0
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +3 -2
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -0
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +8 -7
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -0
- package/package.json +10 -8
- package/src/baseClasses/createCssVarImageClass.js +10 -5
- package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +7 -0
- package/src/components/button-selection-group-fields/createBaseButtonSelectionGroupInternalClass.js +1 -8
- package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +11 -6
- package/src/components/descope-alert/AlertClass.js +16 -12
- package/src/components/descope-badge/BadgeClass.js +11 -6
- package/src/components/descope-code-snippet/CodeSnippetClass.js +9 -4
- package/src/components/descope-container/ContainerClass.js +9 -4
- package/src/components/descope-date-field/DateFieldClass.js +22 -17
- package/src/components/descope-date-field/descope-calendar/CalendarClass.js +28 -18
- package/src/components/descope-date-field/descope-calendar/helpers.js +1 -2
- package/src/components/descope-divider/DividerClass.js +14 -9
- package/src/components/descope-enriched-text/EnrichedTextClass.js +9 -4
- package/src/components/descope-grid/GridClass.js +1 -1
- package/src/components/descope-hybrid-field/HybridFieldClass.js +15 -10
- package/src/components/descope-icon/IconClass.js +9 -4
- package/src/components/descope-image/ImageClass.js +10 -5
- package/src/components/descope-link/LinkClass.js +14 -9
- package/src/components/descope-list/ListClass.js +15 -13
- package/src/components/descope-list/ListItemClass.js +16 -14
- package/src/components/descope-loader-linear/LoaderLinearClass.js +10 -5
- package/src/components/descope-loader-radial/LoaderRadialClass.js +10 -5
- package/src/components/descope-modal/ModalClass.js +16 -4
- package/src/components/descope-new-password/NewPasswordClass.js +1 -1
- package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +8 -6
- package/src/components/descope-passcode/PasscodeClass.js +28 -1
- package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +26 -23
- package/src/components/descope-passcode/descope-passcode-internal/helpers.js +3 -22
- package/src/components/descope-policy-validation/PolicyValidationClass.js +8 -3
- package/src/components/descope-recaptcha/RecaptchaClass.js +13 -8
- package/src/components/descope-scopes-list/ScopesListClass.js +9 -5
- package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +9 -5
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +9 -5
- package/src/components/descope-text-field/TextFieldClass.js +1 -1
- package/src/components/descope-third-party-app-logo/ThirdPartyAppLogoClass.js +20 -16
- package/src/components/descope-upload-file/UploadFileClass.js +20 -15
- package/src/components/descope-user-attribute/UserAttributeClass.js +25 -22
- package/src/components/descope-user-auth-method/UserAuthMethodClass.js +25 -22
- package/src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js +15 -9
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -0
- package/src/components/phone-fields/descope-phone-field/helpers.js +0 -1
- package/src/mixins/createProxy.js +3 -1
- package/src/mixins/createStyleMixin/index.js +9 -22
- package/src/mixins/draggableMixin.js +3 -2
- package/dist/umd/1402.js +0 -1
- package/dist/umd/1484.js +0 -148
- package/dist/umd/3110.js +0 -275
- package/dist/umd/3437.js +0 -2
- package/dist/umd/4619.js +0 -1
- package/dist/umd/4902.js +0 -170
- package/dist/umd/4902.js.LICENSE.txt +0 -23
- package/dist/umd/5096.js +0 -109
- package/dist/umd/5318.js +0 -1
- package/dist/umd/5459.js +0 -1
- package/dist/umd/7150.js +0 -2
- package/dist/umd/731.js +0 -832
- package/dist/umd/8823.js +0 -1
- /package/dist/umd/{9243.js.LICENSE.txt → 1519.js.LICENSE.txt} +0 -0
- /package/dist/umd/{1902.js.LICENSE.txt → 1899.js.LICENSE.txt} +0 -0
- /package/dist/umd/{1172.js.LICENSE.txt → 1995.js.LICENSE.txt} +0 -0
- /package/dist/umd/{2570.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
- /package/dist/umd/{1484.js.LICENSE.txt → 3620.js.LICENSE.txt} +0 -0
- /package/dist/umd/{2666.js.LICENSE.txt → 384.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3437.js.LICENSE.txt → 4467.js.LICENSE.txt} +0 -0
- /package/dist/umd/{404.js.LICENSE.txt → 4518.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4455.js.LICENSE.txt → 4550.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4554.js.LICENSE.txt → 4623.js.LICENSE.txt} +0 -0
- /package/dist/umd/{742.js.LICENSE.txt → 4914.js.LICENSE.txt} +0 -0
- /package/dist/umd/{507.js.LICENSE.txt → 513.js.LICENSE.txt} +0 -0
- /package/dist/umd/{201.js.LICENSE.txt → 5260.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5096.js.LICENSE.txt → 5648.js.LICENSE.txt} +0 -0
- /package/dist/umd/{5563.js.LICENSE.txt → 6227.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4127.js.LICENSE.txt → 6424.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7097.js.LICENSE.txt → 6649.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7150.js.LICENSE.txt → 676.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3638.js.LICENSE.txt → 7182.js.LICENSE.txt} +0 -0
- /package/dist/umd/{7979.js.LICENSE.txt → 7291.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4187.js.LICENSE.txt → 7565.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3191.js.LICENSE.txt → 7620.js.LICENSE.txt} +0 -0
- /package/dist/umd/{6050.js.LICENSE.txt → 7774.js.LICENSE.txt} +0 -0
- /package/dist/umd/{9478.js.LICENSE.txt → 7939.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4114.js.LICENSE.txt → 8618.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4574.js.LICENSE.txt → 8983.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4218.js.LICENSE.txt → 9380.js.LICENSE.txt} +0 -0
- /package/dist/umd/{3110.js.LICENSE.txt → 9871.js.LICENSE.txt} +0 -0
- /package/dist/umd/{731.js.LICENSE.txt → 9970.js.LICENSE.txt} +0 -0
- /package/dist/umd/{bcdfe87ae253c2cf789c9a737f8d8c22.woff → fonts/font-38673212.woff} +0 -0
@@ -1 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9257],{66509:(e,t,i)=>{i.r(t),i.d(t,{DateFieldClass:()=>T,componentName:()=>y}),i(35354),i(18562),i(89348);var r=i(25827),n=i(94619),o=i(14944),a=i(7138),s=i(92386),l=i(3591);const p={MM:"(0?[1-9]|1[0-2])",DD:"(0?[1-9]|[12][0-9]|3[01])",YYYY:"([0-9]{4})"},d=e=>{const t=(e=>`^${e.split(l.eT).map((e=>p[e])).join("\\D")}$`)(e),i=(e=>{const t=e.split(l.eT);return e=>{const i={};return t.forEach(((t,r)=>{i[t]=e[r+1]})),[i.YYYY,i.MM,i.DD]}})(e),r=new RegExp(t);return{pattern:t,validate:e=>r.test(e),getDate:e=>((e,t,i)=>{const r=t.exec(e);if(!r)return null;const[n,o,a]=i(r);return(0,s.Nq)([n,o,a].join(l.eT))})(e,r,i)}},u=Object.fromEntries(l.SP.map((e=>[e,d(e)])));var h=i(23193);class c{constructor({id:e,min:t,max:i,placeholder:r}){this.id=e,this.data=[],this.min=t,this.max=i,this.placeholder=r}get#e(){return this.data.length?this.numberValue:0}get numberValue(){return Number(this.stringValue)}get stringValue(){return(this.data.join("")||this.placeholder).padStart(this.length,"0")}get isFull(){return 10*this.numberValue>this.max||this.data.length===this.length}get isEmpty(){return this.stringValue===this.placeholder}get length(){return this.max.toString().length}set(e){this.data=e.toString().split("")}add(e){return this.data.push(e),this.numberValue>this.max?(this.data.length=0,this.data.push(e)):this.length<this.data.length&&this.data.shift(),e}del(){this.data.filter((e=>"0"!==e)).filter(Boolean).length?this.data.pop():this.data.length=0}clear(){this.data=[]}inc(e){this.replaceValue(this.#e+(e||1))}dec(e){this.replaceValue(this.#e-(e||1))}isInRange(e){return e>=this.min&&e<=this.max}replaceValue(e){this.isInRange(e)&&(this.data=e.toString().padStart(this.length,0).split(""))}}var g=i(69473);const y=(0,o.xE)("date-field"),m=(0,r.y)({componentName:y,baseSelector:"vaadin-popover"}),v=["format","opened","initial-value","readonly"],b=["years-range","calendar-months","calendar-weekdays"],C=[...v,...b],f=g.w.cssVarList,{host:x,input:E,inputEleRTL:w,toggleButton:k,overlay:P,backdrop:I}={host:{selector:()=>":host"},input:{selector:()=>"descope-text-field"},inputEleRTL:{selector:()=>':host([st-host-direction="rtl"]) descope-text-field'},toggleButton:{selector:()=>".toggle-calendar"},overlay:{selector:"vaadin-popover-overlay::part(overlay)"},backdrop:{selector:"vaadin-popover-overlay::part(backdrop)"}},T=(0,a.Zz)((0,n.RF)({componentNameOverride:(0,o.xE)("input-wrapper")}),(0,n.RF)({mappings:{iconMargin:{...k,property:"margin-inline-end"},hostWidth:{...x,property:"width"},hostDirection:{...x,property:"direction"},textAlign:{...E,property:"text-align"},rtlInputDirection:{...w,property:f.inputDirection},rtlInputAlignment:{...w,property:f.inputTextAlign},overlayGap:{property:()=>T.cssVarList.overlayGap},overlayBackgroundColor:{property:()=>T.cssVarList.overlayBackgroundColor},overlayPadding:{property:()=>T.cssVarList.overlayPadding},overlayBoxShadow:{property:()=>T.overlayBoxShadow},overlayOutlineWidth:{property:()=>T.cssVarList.overlayOutlineWidth},overlayOutlineColor:{property:()=>T.cssVarList.overlayOutlineColor},overlayOutlineStyle:{property:()=>T.cssVarList.overlayOutlineStyle}}}),(0,n.mA)({name:"overlay",selector:"",mappings:{marginTop:{...P,property:"margin-top"},backgroundColor:{...P},backdropBackgroundColor:{...I,property:"background-color"},backdropPointerEvents:{...I,property:"pointer-events"},padding:{...P},boxShadow:{...P},outlineWidth:{...P},outlineColor:{...P},outlineStyle:{...P}}}),n.VO,n.tQ)(class extends m{timestamp="";format=l.ui;selectedCounterIdx=0;dateCounters=[new c(l.rR.MONTH),new c(l.rR.DAY),new c(l.rR.YEAR)];static get observedAttributes(){return[].concat(m.observedAttributes||[],C)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <style>\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n .toggle-calendar {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n height: 100%;\n align-items: center; \n }\n\n :host([readonly="true"]) .toggle-calendar {\n pointer-events: none;\n }\n </style>\n <div>\n <descope-text-field>\n <span slot="suffix" class="toggle-calendar">\n ${h.ki}\n </span>\n </descope-text-field>\n <vaadin-popover></vaadin-popover>\n </div>\n `,this.inputElement=this.shadowRoot.querySelector("descope-text-field"),this.popoverToggleButton=this.inputElement.querySelector(".toggle-calendar"),this.oninvalid=()=>{this.inputElement.setAttribute("invalid","true"),this.inputElement.focus()}}get opened(){return"true"===this.getAttribute("opened")}get inputValueTimestamp(){const e=u[this.format].getDate(this.inputElement.value);return(0,s.xP)(e?.getTime())?e.getTime():null}get sortedCounters(){return this.format.split(l.eT).map((e=>this.dateCounters.find((t=>t.placeholder===e))))}get activeCounter(){return this.sortedCounters[this.selectedCounterIdx]}get countersValue(){return this.sortedCounters.map((e=>e.stringValue)).join(l.eT)}get overlay(){return this.baseElement.shadowRoot?.querySelector("vaadin-popover-overlay")}get backdrop(){return this.overlay.shadowRoot?.querySelector("#backdrop")}get calendar(){return this.overlay?.querySelector("descope-calendar")}get isRTL(){const e=getComputedStyle(this.baseElement).getPropertyValue("direction");return e?"rtl"===e:"rtl"===this.getAttribute("st-host-direction")}get value(){return this.timestamp}set value(e){if(!e)return;const t=Number(e);let i,r;Number.isNaN(t)?(i=(0,s.Nq)(e),r=i.getTime()):(i=(0,s.Nq)(t),r=t),(0,s.xP)(r)&&r!==this.timestamp&&(this.timestamp=r,this.updateInputDisplay(),this.updateDateCounters(i),this.dispatchEvent(new Event("input")))}updateInputDisplay(){this.inputElement.value=(0,s.Ey)((0,s.Nq)(this.value).getTime(),this.format)}init(){super.init?.(),this.updateFormatPattern(),this.initPopover(),this.initInputElement(),setTimeout((()=>{this.#t()}),0)}initInputElement(){this.popoverToggleButton.addEventListener("click",this.onPopoverToggle.bind(this)),this.inputElement.addEventListener("focus",this.onFocus.bind(this)),this.inputElement.addEventListener("blur",this.onBlur.bind(this)),this.inputElement.addEventListener("input",this.onInput.bind(this)),this.inputElement.addEventListener("click",this.handleMouseCaretPositionChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleKeyDownValueChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleKeydownCaretPositionChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleValueChange.bind(this)),(0,o.EA)(this,this.inputElement,{includeAttrs:["label","label-type","placeholder","disabled","readonly","bordered","required","full-width","st-host-direction","pattern","invalid","bordered"]})}initPopover(){this.baseElement.trigger=["click"],this.baseElement.withBackdrop=!0,this.baseElement.renderer=this.#i.bind(this),this.baseElement.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation()}))}#r;#i(e){e.firstChild||(this.overlay.positionTarget=this.shadowRoot.querySelector(".toggle-calendar"),e.appendChild(this.#n()),(0,s.Xs)(this.baseElement),this.backdrop.addEventListener("click",this.closePopover.bind(this))),e.style.setProperty("visibility","hidden"),setTimeout((()=>{this.#o(e),e.style.setProperty("visibility","visible"),this.updateCalendarView(e)}),100)}#o(){const e=this.shadowRoot.querySelector("vaadin-popover").shadowRoot;this.#r?.remove();const t=document.body.getBoundingClientRect(),i=this.getBoundingClientRect(),r=this.calendar.getBoundingClientRect(),n=this.isRTL?"right":"left",o=i[n]-r[n],a=r.left,s=t.width-r.right;let l;l=o>0?Math.min(o,s):-1*Math.min(Math.abs(o),a),this.#r=document.createElement("style"),this.#r.innerHTML=`\n vaadin-popover-overlay::part(overlay) {\n transform: translateX(${l}px);\n }\n `,e.appendChild(this.#r)}#n(){const e=document.createElement("span");e.innerHTML="<descope-calendar></descope-calendar>";const t=e.querySelector("descope-calendar");return t.addEventListener("date-submit",this.onCalendarSubmit.bind(this)),t.addEventListener("cancel",this.closePopover.bind(this)),e}#t(){this.overlay._attachOverlay=()=>this.overlay.bringToFront(),this.overlay._detachOverlay=()=>{},this.overlay._enterModalState=()=>{}}onPopoverToggle(){this.opened?this.closePopover():this.openPopover()}openPopover(){this.setAttribute("opened","true")}closePopover(){this.removeAttribute("opened"),this.inputElement.focus()}getCounterById(e){return this.dateCounters.find((t=>t.id===e))}onCalendarSubmit(){if(!this.isReadOnly){if(!this.calendar.value)return;const e=(0,s.Nq)(this.calendar.value);this.value=e.getTime(),this.getCounterById("year").replaceValue(e.getFullYear()),this.getCounterById("month").replaceValue(e.getMonth()+1),this.getCounterById("day").replaceValue(e.getDate()),this.dispatchEvent(new Event("input"))}this.closePopover()}updateCalendarView(){const e=(0,s.xP)((0,s.Nq)(this.inputElement.value||"").getTime())&&u[this.format].validate(this.inputElement.value);this.inputValueTimestamp||e?this.calendar.setAttribute("initial-value",(0,s.Ey)(this.inputValueTimestamp||this.timestamp,l.wJ)):(this.calendar.clearValue(),this.calendar.setAttribute("preview",(0,s.Ey)((0,s.Ln)(),l.wJ))),(0,o.EA)(this,this.calendar,{includeAttrs:["st-host-direction","readonly","initial-month","initial-year","years-range","calendar-label-submit","calendar-label-cancel","calendar-months","calendar-weekdays","calendar-weekdays-short"]})}onInput(e){e.target.value||(this.calendar?.clear(),this.calendar?.renderCalendar())}onFocus(){this.isReadOnly||this.inputElement.value||(this.inputElement.value=this.format,this.setInputSelectionRange())}clearInputValue(){this.inputElement.value="",this.resetDateCounters()}onBlur(){this.inputValueTimestamp?this.value=this.inputValueTimestamp:this.opened||this.countersValue!==this.format||this.clearInputValue()}onFormatUpdate(e){Object.keys(u).includes(e)&&(this.format=e,this.updateFormatPattern())}updateFormatPattern(){const e=this.getAttribute("format")||this.format||l.ui;this.setAttribute("type","date"),this.setAttribute("pattern",u[e].pattern)}handleValueChange(e){(0,s.Et)(e.key)&&(e.preventDefault(),this.handleCountersValue(e.key),this.activeCounter.isFull&&this.selectNextCounter(),this.setInputSelectionRange())}getCounterIdx(e){const[t,i]=this.sortedCounters.map((e=>e.length));return[e<=t,e>=t&&e<=t+i+1,e>=t+i+2].indexOf(!0)}handleCountersValue(e){this.activeCounter.add(e),this.inputElement.value=this.countersValue}setSelectedCounterByCaretPosition(e){this.selectedCounterIdx=this.getCounterIdx(e.target.selectionStart)}selectNextCounter(){this.selectedCounterIdx<this.dateCounters.length&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx+1,2))}selectPrevCounter(){this.selectedCounterIdx>0&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx-1,1))}setInputSelectionRange(){if(this.selectedCounterIdx<0)return;const e=this.sortedCounters.slice(0,this.selectedCounterIdx).reduce(((e,t)=>e+t.length),this.selectedCounterIdx);this.inputElement.setSelectionRange(e,e+this.sortedCounters[this.selectedCounterIdx].length)}resetDateCounters(){this.dateCounters.forEach((e=>e.clear()))}updateDateCounters(e){this.dateCounters.forEach((t=>{switch(t.id){case l.rR.MONTH.id:t.set(e.getMonth()+1);break;case l.rR.YEAR.id:t.set(e.getFullYear());break;case l.rR.DAY.id:t.set(e.getDate())}}))}handleKeyDownValueChange(e){if(this.isReadOnly)return;const{key:t,shiftKey:i,metaKey:r}=e,n=(0,s.y4)(t,i,r),o=n.refresh||n.tab||n.shiftTab;if(this.opened&&this.closePopover(),(0,s.KQ)(t)){e.preventDefault();const t=this.activeCounter;if(!t)return;const i=Object.values(l.rR).find((e=>e.id===t.id)),{count:r,shiftCount:o}=i;n.backspace?this.handleBackspace():n.arrowUp?t.inc():n.arrowDown?t.dec():n.shiftArrowUp?t.inc(r):n.shiftArrowDown?t.dec(r):n.pageUp?t.inc(r):n.pageDown?t.dec(r):n.shiftPageUp?t.inc(o):n.shiftPageDown&&t.dec(o),this.inputElement.value=this.countersValue,this.setInputSelectionRange()}else o||e.preventDefault()}handleBackspace(){const e=this.activeCounter;e.isEmpty?(this.selectPrevCounter(),this.setInputSelectionRange()):e.del()}handleKeydownCaretPositionChange(e){if(this.opened)return;const{key:t}=e;if((0,s.KQ)(t)){e.preventDefault();const i=(0,s.y4)(t,!1);i.arrowRight?this.selectNextCounter():i.arrowLeft&&this.selectPrevCounter(),this.setInputSelectionRange()}}handleMouseCaretPositionChange(e){this.opened||(e.preventDefault(),this.setSelectedCounterByCaretPosition(e),this.setInputSelectionRange())}onInitialValueChange(e){this.value||setTimeout((()=>{this.value=e}))}attributeChangedCallback(e,t,i){super.attributeChangedCallback?.(e,t,i),t!==i&&(v.includes(e)?(i&&"format"===e&&this.onFormatUpdate(i),"initial-value"===e&&this.onInitialValueChange(i)):b.includes(e)&&(i?this.calendar?.setAttribute(e,i):this.calendar?.removeAttribute(e)))}getValidity(){return this.isRequired&&!this.inputElement.value?{valueMissing:!0}:{}}});customElements.define(y,T)},69473:(e,t,i)=>{i.d(t,{T:()=>l,w:()=>d});var r=i(94619),n=i(93826),o=i(7138),a=i(14944),s=i(33177);const l=(0,a.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,r.RF)({mappings:n.A}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),r.tQ,(e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,t)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(e,t,i){super.attributeChangeCallback?.(e,t,i),"type"===e&&this.baseElement._setType(i),t!==i&&("label-type"===e?"floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===i))}}))((0,r.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(d.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},89348:(e,t,i)=>{i.r(t),i.d(t,{TextFieldClass:()=>r.w,componentName:()=>r.T}),i(63970),i(23638),i(80201);var r=i(69473);customElements.define(r.T,r.w)},93826:(e,t,i)=>{i.d(t,{A:()=>C});const{host:r,label:n,placeholder:o,requiredIndicator:a,inputField:s,input:l,inputMask:p,helperText:d,errorMessage:u,disabledPlaceholder:h,inputDisabled:c,inputIcon:g,externalInput:y,externalInputDisabled:m,externalPlaceholder:v,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},C={fontSize:[{},r],fontFamily:[n,s,d,u],labelFontSize:{...n,property:"font-size"},labelFontWeight:{...n,property:"font-weight"},labelTextColor:[{...n,property:"color"},{...a,property:"color"},{...n,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputDirection:{...l,property:"direction"},inputBackgroundColor:[{...s,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},errorMessageIcon:{...u,property:"background-image"},errorMessageIconSize:{...u,property:"background-size"},errorMessageIconPadding:{...u,property:"padding-inline-start"},errorMessageIconRepeat:{...u,property:"background-repeat"},errorMessageIconPosition:{...u,property:"background-position"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...s,property:"color"},{...c,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...s,property:"border-color"},inputBorderWidth:{...s,property:"border-width"},inputBorderStyle:{...s,property:"border-style"},inputBorderRadius:{...s,property:"border-radius"},inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineWidth:{...s,property:"outline-width"},inputOutlineOffset:{...s,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...v,property:"color"},{...o,property:"color"},{...h,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...n,property:"position"},labelTopPosition:{...n,property:"top"},labelHorizontalPosition:[{...n,property:"left"},{...n,property:"right"}],inputTransformY:{...n,property:"transform"},inputTransition:{...n,property:"transition"},marginInlineStart:{...n,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...v,property:"opacity"}],inputVerticalAlignment:[{...s,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...g,property:"margin-right"},{...g,property:"margin-left"}],inputIconSize:{...g,property:"font-size"},inputIconColor:{...g,property:"color"}}}}]);
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9257],{64609:(e,t,i)=>{i.r(t),i.d(t,{DateFieldClass:()=>V,componentName:()=>m}),i(45992),i(88350),i(21374);var r=i(3393),n=i(79365),o=i(97810),a=i(9696),s=i(49224),l=i(64101);const p={MM:"(0?[1-9]|1[0-2])",DD:"(0?[1-9]|[12][0-9]|3[01])",YYYY:"([0-9]{4})"},d=e=>{const t=(e=>`^${e.split(l.eT).map((e=>p[e])).join("\\D")}$`)(e),i=(e=>{const t=e.split(l.eT);return e=>{const i={};return t.forEach(((t,r)=>{i[t]=e[r+1]})),[i.YYYY,i.MM,i.DD]}})(e),r=new RegExp(t);return{pattern:t,validate:e=>r.test(e),getDate:e=>((e,t,i)=>{const r=t.exec(e);if(!r)return null;const[n,o,a]=i(r);return(0,s.Nq)([n,o,a].join(l.eT))})(e,r,i)}},u=Object.fromEntries(l.SP.map((e=>[e,d(e)])));var h=i(80071);class c{constructor({id:e,min:t,max:i,placeholder:r}){this.id=e,this.data=[],this.min=t,this.max=i,this.placeholder=r}get#e(){return this.data.length?this.numberValue:0}get numberValue(){return Number(this.stringValue)}get stringValue(){return(this.data.join("")||this.placeholder).padStart(this.length,"0")}get isFull(){return 10*this.numberValue>this.max||this.data.length===this.length}get isEmpty(){return this.stringValue===this.placeholder}get length(){return this.max.toString().length}set(e){this.data=e.toString().split("")}add(e){return this.data.push(e),this.numberValue>this.max?(this.data.length=0,this.data.push(e)):this.length<this.data.length&&this.data.shift(),e}del(){this.data.filter((e=>"0"!==e)).filter(Boolean).length?this.data.pop():this.data.length=0}clear(){this.data=[]}inc(e){this.replaceValue(this.#e+(e||1))}dec(e){this.replaceValue(this.#e-(e||1))}isInRange(e){return e>=this.min&&e<=this.max}replaceValue(e){this.isInRange(e)&&(this.data=e.toString().padStart(this.length,0).split(""))}}var g=i(79275),y=i(25964);const m=(0,o.xE)("date-field"),v=(0,r.y)({componentName:m,baseSelector:"vaadin-popover"}),b=["format","opened","initial-value","readonly"],f=["years-range","calendar-months","calendar-weekdays"],C=[...b,...f],x=g.w.cssVarList,{host:E,input:w,inputEleRTL:k,toggleButton:I,overlay:P,backdrop:T}={host:{selector:()=>":host"},input:{selector:()=>"descope-text-field"},inputEleRTL:{selector:()=>':host([st-host-direction="rtl"]) descope-text-field'},toggleButton:{selector:()=>".toggle-calendar"},overlay:{selector:"vaadin-popover-overlay::part(overlay)"},backdrop:{selector:"vaadin-popover-overlay::part(backdrop)"}},V=(0,a.Zz)((0,n.RF)({componentNameOverride:(0,o.xE)("input-wrapper")}),(0,n.RF)({mappings:{iconMargin:{...I,property:"margin-inline-end"},hostWidth:{...E,property:"width"},hostDirection:{...E,property:"direction"},textAlign:{...w,property:"text-align"},rtlInputDirection:{...k,property:x.inputDirection},rtlInputAlignment:{...k,property:x.inputTextAlign},overlayGap:{property:()=>V.cssVarList.overlayGap},overlayBackgroundColor:{property:()=>V.cssVarList.overlayBackgroundColor},overlayPadding:{property:()=>V.cssVarList.overlayPadding},overlayBoxShadow:{property:()=>V.overlayBoxShadow},overlayOutlineWidth:{property:()=>V.cssVarList.overlayOutlineWidth},overlayOutlineColor:{property:()=>V.cssVarList.overlayOutlineColor},overlayOutlineStyle:{property:()=>V.cssVarList.overlayOutlineStyle}}}),(0,n.mA)({name:"overlay",selector:"",mappings:{marginTop:{...P,property:"margin-top"},backgroundColor:{...P},backdropBackgroundColor:{...T,property:"background-color"},backdropPointerEvents:{...T,property:"pointer-events"},padding:{...P},boxShadow:{...P},outlineWidth:{...P},outlineColor:{...P},outlineStyle:{...P}}}),n.VO,n.tQ)(class extends v{timestamp="";format=l.ui;selectedCounterIdx=0;dateCounters=[new c(l.rR.MONTH),new c(l.rR.DAY),new c(l.rR.YEAR)];static get observedAttributes(){return[].concat(v.observedAttributes||[],C)}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div>\n <descope-text-field>\n <span slot="suffix" class="toggle-calendar">\n ${h.ki}\n </span>\n </descope-text-field>\n <vaadin-popover></vaadin-popover>\n </div>\n `,(0,y.fz)('\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n .toggle-calendar {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n height: 100%;\n align-items: center;\n }\n\n :host([readonly="true"]) .toggle-calendar {\n pointer-events: none;\n }\n ',this),this.inputElement=this.shadowRoot.querySelector("descope-text-field"),this.popoverToggleButton=this.inputElement.querySelector(".toggle-calendar"),this.oninvalid=()=>{this.inputElement.setAttribute("invalid","true"),this.inputElement.focus()}}get opened(){return"true"===this.getAttribute("opened")}get inputValueTimestamp(){const e=u[this.format].getDate(this.inputElement.value);return(0,s.xP)(e?.getTime())?e.getTime():null}get sortedCounters(){return this.format.split(l.eT).map((e=>this.dateCounters.find((t=>t.placeholder===e))))}get activeCounter(){return this.sortedCounters[this.selectedCounterIdx]}get countersValue(){return this.sortedCounters.map((e=>e.stringValue)).join(l.eT)}get overlay(){return this.baseElement.shadowRoot?.querySelector("vaadin-popover-overlay")}get backdrop(){return this.overlay.shadowRoot?.querySelector("#backdrop")}get calendar(){return this.overlay?.querySelector("descope-calendar")}get isRTL(){const e=getComputedStyle(this.baseElement).getPropertyValue("direction");return e?"rtl"===e:"rtl"===this.getAttribute("st-host-direction")}get value(){return this.timestamp}set value(e){if(!e)return;const t=Number(e);let i,r;Number.isNaN(t)?(i=(0,s.Nq)(e),r=i.getTime()):(i=(0,s.Nq)(t),r=t),(0,s.xP)(r)&&r!==this.timestamp&&(this.timestamp=r,this.updateInputDisplay(),this.updateDateCounters(i),this.dispatchEvent(new Event("input")))}updateInputDisplay(){this.inputElement.value=(0,s.Ey)((0,s.Nq)(this.value).getTime(),this.format)}init(){super.init?.(),this.updateFormatPattern(),this.initPopover(),this.initInputElement(),setTimeout((()=>{this.#t()}),0)}initInputElement(){this.popoverToggleButton.addEventListener("click",this.onPopoverToggle.bind(this)),this.inputElement.addEventListener("focus",this.onFocus.bind(this)),this.inputElement.addEventListener("blur",this.onBlur.bind(this)),this.inputElement.addEventListener("input",this.onInput.bind(this)),this.inputElement.addEventListener("click",this.handleMouseCaretPositionChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleKeyDownValueChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleKeydownCaretPositionChange.bind(this)),this.inputElement.addEventListener("keydown",this.handleValueChange.bind(this)),(0,o.EA)(this,this.inputElement,{includeAttrs:["label","label-type","placeholder","disabled","readonly","bordered","required","full-width","st-host-direction","pattern","invalid","bordered"]})}initPopover(){this.baseElement.trigger=["click"],this.baseElement.withBackdrop=!0,this.baseElement.renderer=this.#i.bind(this),this.baseElement.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation()}))}#r;#i(e){e.firstChild||(this.overlay.positionTarget=this.shadowRoot.querySelector(".toggle-calendar"),e.appendChild(this.#n()),(0,s.Xs)(this.baseElement),this.backdrop.addEventListener("click",this.closePopover.bind(this))),e.style.setProperty("visibility","hidden"),setTimeout((()=>{this.#o(e),e.style.setProperty("visibility","visible"),this.updateCalendarView(e)}),100)}#o(){const e=this.shadowRoot.querySelector("vaadin-popover").shadowRoot;this.#r?.remove();const t=document.body.getBoundingClientRect(),i=this.getBoundingClientRect(),r=this.calendar.getBoundingClientRect(),n=this.isRTL?"right":"left",o=i[n]-r[n],a=r.left,s=t.width-r.right;let l;l=o>0?Math.min(o,s):-1*Math.min(Math.abs(o),a),(0,y.fz)(`\n vaadin-popover-overlay::part(overlay) {\n transform: translateX(${l}px);\n }\n `,e)}#n(){const e=document.createElement("span");e.innerHTML="<descope-calendar></descope-calendar>";const t=e.querySelector("descope-calendar");return t.addEventListener("date-submit",this.onCalendarSubmit.bind(this)),t.addEventListener("cancel",this.closePopover.bind(this)),e}#t(){this.overlay._attachOverlay=()=>this.overlay.bringToFront(),this.overlay._detachOverlay=()=>{},this.overlay._enterModalState=()=>{}}onPopoverToggle(){this.opened?this.closePopover():this.openPopover()}openPopover(){this.setAttribute("opened","true")}closePopover(){this.removeAttribute("opened"),this.inputElement.focus()}getCounterById(e){return this.dateCounters.find((t=>t.id===e))}onCalendarSubmit(){if(!this.isReadOnly){if(!this.calendar.value)return;const e=(0,s.Nq)(this.calendar.value);this.value=e.getTime(),this.getCounterById("year").replaceValue(e.getFullYear()),this.getCounterById("month").replaceValue(e.getMonth()+1),this.getCounterById("day").replaceValue(e.getDate()),this.dispatchEvent(new Event("input"))}this.closePopover()}updateCalendarView(){const e=(0,s.xP)((0,s.Nq)(this.inputElement.value||"").getTime())&&u[this.format].validate(this.inputElement.value);this.inputValueTimestamp||e?this.calendar.setAttribute("initial-value",(0,s.Ey)(this.inputValueTimestamp||this.timestamp,l.wJ)):(this.calendar.clearValue(),this.calendar.setAttribute("preview",(0,s.Ey)((0,s.Ln)(),l.wJ))),(0,o.EA)(this,this.calendar,{includeAttrs:["st-host-direction","readonly","initial-month","initial-year","years-range","calendar-label-submit","calendar-label-cancel","calendar-months","calendar-weekdays","calendar-weekdays-short"]})}onInput(e){e.target.value||(this.calendar?.clear(),this.calendar?.renderCalendar())}onFocus(){this.isReadOnly||this.inputElement.value||(this.inputElement.value=this.format,this.setInputSelectionRange())}clearInputValue(){this.inputElement.value="",this.resetDateCounters()}onBlur(){this.inputValueTimestamp?this.value=this.inputValueTimestamp:this.opened||this.countersValue!==this.format||this.clearInputValue()}onFormatUpdate(e){Object.keys(u).includes(e)&&(this.format=e,this.updateFormatPattern())}updateFormatPattern(){const e=this.getAttribute("format")||this.format||l.ui;this.setAttribute("type","date"),this.setAttribute("pattern",u[e].pattern)}handleValueChange(e){(0,s.Et)(e.key)&&(e.preventDefault(),this.handleCountersValue(e.key),this.activeCounter.isFull&&this.selectNextCounter(),this.setInputSelectionRange())}getCounterIdx(e){const[t,i]=this.sortedCounters.map((e=>e.length));return[e<=t,e>=t&&e<=t+i+1,e>=t+i+2].indexOf(!0)}handleCountersValue(e){this.activeCounter.add(e),this.inputElement.value=this.countersValue}setSelectedCounterByCaretPosition(e){this.selectedCounterIdx=this.getCounterIdx(e.target.selectionStart)}selectNextCounter(){this.selectedCounterIdx<this.dateCounters.length&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx+1,2))}selectPrevCounter(){this.selectedCounterIdx>0&&(this.selectedCounterIdx=Math.min(this.selectedCounterIdx-1,1))}setInputSelectionRange(){if(this.selectedCounterIdx<0)return;const e=this.sortedCounters.slice(0,this.selectedCounterIdx).reduce(((e,t)=>e+t.length),this.selectedCounterIdx);this.inputElement.setSelectionRange(e,e+this.sortedCounters[this.selectedCounterIdx].length)}resetDateCounters(){this.dateCounters.forEach((e=>e.clear()))}updateDateCounters(e){this.dateCounters.forEach((t=>{switch(t.id){case l.rR.MONTH.id:t.set(e.getMonth()+1);break;case l.rR.YEAR.id:t.set(e.getFullYear());break;case l.rR.DAY.id:t.set(e.getDate())}}))}handleKeyDownValueChange(e){if(this.isReadOnly)return;const{key:t,shiftKey:i,metaKey:r}=e,n=(0,s.y4)(t,i,r),o=n.refresh||n.tab||n.shiftTab;if(this.opened&&this.closePopover(),(0,s.KQ)(t)){e.preventDefault();const t=this.activeCounter;if(!t)return;const i=Object.values(l.rR).find((e=>e.id===t.id)),{count:r,shiftCount:o}=i;n.backspace?this.handleBackspace():n.arrowUp?t.inc():n.arrowDown?t.dec():n.shiftArrowUp?t.inc(r):n.shiftArrowDown?t.dec(r):n.pageUp?t.inc(r):n.pageDown?t.dec(r):n.shiftPageUp?t.inc(o):n.shiftPageDown&&t.dec(o),this.inputElement.value=this.countersValue,this.setInputSelectionRange()}else o||e.preventDefault()}handleBackspace(){const e=this.activeCounter;e.isEmpty?(this.selectPrevCounter(),this.setInputSelectionRange()):e.del()}handleKeydownCaretPositionChange(e){if(this.opened)return;const{key:t}=e;if((0,s.KQ)(t)){e.preventDefault();const i=(0,s.y4)(t,!1);i.arrowRight?this.selectNextCounter():i.arrowLeft&&this.selectPrevCounter(),this.setInputSelectionRange()}}handleMouseCaretPositionChange(e){this.opened||(e.preventDefault(),this.setSelectedCounterByCaretPosition(e),this.setInputSelectionRange())}onInitialValueChange(e){this.value||setTimeout((()=>{this.value=e}))}attributeChangedCallback(e,t,i){super.attributeChangedCallback?.(e,t,i),t!==i&&(b.includes(e)?(i&&"format"===e&&this.onFormatUpdate(i),"initial-value"===e&&this.onInitialValueChange(i)):f.includes(e)&&(i?this.calendar?.setAttribute(e,i):this.calendar?.removeAttribute(e)))}getValidity(){return this.isRequired&&!this.inputElement.value?{valueMissing:!0}:{}}});customElements.define(m,V)},79275:(e,t,i)=>{i.d(t,{T:()=>l,w:()=>d});var r=i(79365),n=i(6424),o=i(9696),a=i(97810),s=i(73551);const l=(0,a.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,o.Zz)((0,r.RF)({mappings:n.A}),r.VO,(0,r.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),r.tQ,(e=>class extends e{static get observedAttributes(){return p.concat(e.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(e){if(!e)return void this.icon?.remove();const t={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...t}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,t)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(e,t,i){super.attributeChangeCallback?.(e,t,i),"type"===e&&this.baseElement._setType(i),t!==i&&("label-type"===e?"floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===e&&this.renderCopyToClipboard("true"===i))}}))((0,r.tz)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(d.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:l}))},21374:(e,t,i)=>{i.r(t),i.d(t,{TextFieldClass:()=>r.w,componentName:()=>r.T}),i(11284),i(37182),i(95260);var r=i(79275);customElements.define(r.T,r.w)},6424:(e,t,i)=>{i.d(t,{A:()=>f});const{host:r,label:n,placeholder:o,requiredIndicator:a,inputField:s,input:l,inputMask:p,helperText:d,errorMessage:u,disabledPlaceholder:h,inputDisabled:c,inputIcon:g,externalInput:y,externalInputDisabled:m,externalPlaceholder:v,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},f={fontSize:[{},r],fontFamily:[n,s,d,u],labelFontSize:{...n,property:"font-size"},labelFontWeight:{...n,property:"font-weight"},labelTextColor:[{...n,property:"color"},{...a,property:"color"},{...n,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputDirection:{...l,property:"direction"},inputBackgroundColor:[{...s,property:"background-color"},{...p,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},errorMessageIcon:{...u,property:"background-image"},errorMessageIconSize:{...u,property:"background-size"},errorMessageIconPadding:{...u,property:"padding-inline-start"},errorMessageIconRepeat:{...u,property:"background-repeat"},errorMessageIconPosition:{...u,property:"background-position"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...s,property:"color"},{...c,property:"-webkit-text-fill-color"},{...m,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...l,property:"caret-color"},{...y,property:"caret-color"}],labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...s,property:"border-color"},inputBorderWidth:{...s,property:"border-width"},inputBorderStyle:{...s,property:"border-style"},inputBorderRadius:{...s,property:"border-radius"},inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"},{...y,property:"padding-left"},{...y,property:"padding-right"}],inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineWidth:{...s,property:"outline-width"},inputOutlineOffset:{...s,property:"outline-offset"},textAlign:{},inputTextAlign:[{...l,property:"text-align"},{...y,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...v,property:"color"},{...o,property:"color"},{...h,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...n,property:"position"},labelTopPosition:{...n,property:"top"},labelHorizontalPosition:[{...n,property:"left"},{...n,property:"right"}],inputTransformY:{...n,property:"transform"},inputTransition:{...n,property:"transition"},marginInlineStart:{...n,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...v,property:"opacity"}],inputVerticalAlignment:[{...s,property:"align-items"},{...y,property:"align-items"}],valueInputHeight:[{...l,property:"height"},{...y,property:"height"}],valueInputMarginBottom:[{...l,property:"margin-bottom"},{...y,property:"margin-bottom"}],inputIconOffset:[{...g,property:"margin-right"},{...g,property:"margin-left"}],inputIconSize:{...g,property:"font-size"},inputIconColor:{...g,property:"color"}}}}]);
|
2
|
+
//# sourceMappingURL=descope-date-field-index-js.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"descope-date-field-index-js.js","mappings":"iSAGA,MAAMA,EAAW,CACfC,GAAI,mBACJC,GAAI,4BACJC,KAAM,cA8BFC,EAAgBC,IACpB,MAAMC,EA5Bc,CAACD,GAMd,IALSA,EACbE,MAAM,MACNC,KAAKC,GAAST,EAASS,KACvBC,KAAK,UAwBQC,CAAcN,GACxBO,EApBiB,CAACP,IACxB,MAAMQ,EAAQR,EAAOE,MAAM,MAC3B,OAAQO,IACN,MAAMC,EAAS,CAAC,EAIhB,OAHAF,EAAMG,SAAQ,CAACP,EAAMQ,KACnBF,EAAON,GAAQK,EAAMG,EAAQ,EAAE,IAE1B,CAACF,EAAOZ,KAAMY,EAAOd,GAAIc,EAAOb,GAAG,CAC3C,EAYkBgB,CAAiBb,GAC9Bc,EAAS,IAAIC,OAAOd,GAE1B,MAAO,CACLA,UACAe,SAAWC,GAAQH,EAAOI,KAAKD,GAC/BE,QAAUF,GAfK,EAACA,EAAKH,EAAQP,KAC/B,MAAME,EAAQK,EAAOM,KAAKH,GAC1B,IAAKR,EAAO,OAAO,KACnB,MAAOY,EAAMC,EAAOC,GAAOhB,EAAWE,GACtC,OAAO,QAAQ,CAACY,EAAMC,EAAOC,GAAKlB,KAAK,MAAS,EAW5BmB,CAAWP,EAAKH,EAAQP,GAC3C,EAGUkB,EAAUC,OAAOC,YAAY,KAAkBxB,KAAKyB,GAAM,CAACA,EAAG7B,EAAa6B,O,eC7CjF,MAAMC,EACX,WAAAC,EAAY,GAAEC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AU,IAAM,gCAAiCK,SAAU,SAC7D,IAAKgO,EAAqBhO,SAAU,SACpC,IAAKhD,EAAagD,SAAU,SAC5B,IAAK2N,EAAqB3N,SAAU,2BACpC,IAAKiO,EAA6BjO,SAAU,4BAG9C4P,cAAe,IAAKvC,EAAOrN,SAAU,YACrC6P,iBAAkB,IAAKxC,EAAOrN,SAAU,OACxC8P,wBAAyB,CACvB,IAAKzC,EAAOrN,SAAU,QACtB,IAAKqN,EAAOrN,SAAU,UAExB+P,gBAAiB,IAAK1C,EAAOrN,SAAU,aACvCgQ,gBAAiB,IAAK3C,EAAOrN,SAAU,cACvCiQ,kBAAmB,IAAK5C,EAAOrN,SAAU,uBACzCkQ,mBAAoB,CAClB,CAAEvQ,SAAU,4BAA6BK,SAAU,WACnD,IAAKgO,EAAqBhO,SAAU,YAEtCmQ,uBAAwB,CACtB,IAAK5C,EAAYvN,SAAU,eAC3B,IAAK8N,EAAe9N,SAAU,gBAEhCoQ,iBAAkB,CAChB,IAAK9Q,EAAOU,SAAU,UACtB,IAAK8N,EAAe9N,SAAU,WAEhCqQ,uBAAwB,CACtB,IAAK/Q,EAAOU,SAAU,iBACtB,IAAK8N,EAAe9N,SAAU,kBAGhCsQ,gBAAiB,CACf,IAAKzC,EAAW7N,SAAU,gBAC1B,IAAK6N,EAAW7N,SAAU,gBAE5BuQ,cAAe,IAAK1C,EAAW7N,SAAU,aACzCwQ,eAAgB,IAAK3C,EAAW7N,SAAU,S","sources":["webpack://@descope/web-components-ui/./src/components/descope-date-field/formats.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/DateCounterClass.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/DateFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-date-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js"],"sourcesContent":["import { DIVIDER, SUPPORTED_FORMATS } from './consts';\nimport { newDate } from './helpers';\n\nconst patterns = {\n MM: '(0?[1-9]|1[0-2])',\n DD: '(0?[1-9]|[12][0-9]|3[01])',\n YYYY: '([0-9]{4})',\n};\n\nconst createPattern = (format) => {\n const pattern = format\n .split(DIVIDER)\n .map((part) => patterns[part])\n .join('\\\\D');\n\n return `^${pattern}$`;\n};\n\nconst createToValuesFn = (format) => {\n const order = format.split(DIVIDER);\n return (match) => {\n const values = {};\n order.forEach((part, index) => {\n values[part] = match[index + 1];\n });\n return [values.YYYY, values.MM, values.DD];\n };\n};\n\nconst createDate = (val, regexp, toValuesFn) => {\n const match = regexp.exec(val);\n if (!match) return null;\n const [year, month, day] = toValuesFn(match);\n return newDate([year, month, day].join(DIVIDER));\n};\n\nconst createFormat = (format) => {\n const pattern = createPattern(format);\n const toValuesFn = createToValuesFn(format);\n const regexp = new RegExp(pattern);\n\n return {\n pattern,\n validate: (val) => regexp.test(val),\n getDate: (val) => createDate(val, regexp, toValuesFn),\n };\n};\n\nexport const formats = Object.fromEntries(SUPPORTED_FORMATS.map((f) => [f, createFormat(f)]));\n","// DateCounterClass allows us to add several counters to the input, and use them seperately.\n// For examele, we have a DayCounter, MonthCounter and YearCounter, which can each separately navigate\n// between different ranges.\nexport class DateCounter {\n constructor({ id, min, max, placeholder }) {\n this.id = id;\n this.data = [];\n this.min = min;\n this.max = max;\n this.placeholder = placeholder;\n }\n\n get #initialNumValue() {\n return this.data.length ? this.numberValue : 0;\n }\n\n get numberValue() {\n return Number(this.stringValue);\n }\n\n get stringValue() {\n return (this.data.join('') || this.placeholder).padStart(this.length, '0');\n }\n\n get isFull() {\n return this.numberValue * 10 > this.max || this.data.length === this.length;\n }\n\n get isEmpty() {\n return this.stringValue === this.placeholder;\n }\n\n get length() {\n return this.max.toString().length;\n }\n\n set(val) {\n this.data = val.toString().split('');\n }\n\n add(num) {\n this.data.push(num);\n\n if (this.numberValue > this.max) {\n this.data.length = 0;\n this.data.push(num);\n } else if (this.length < this.data.length) {\n this.data.shift();\n }\n\n return num;\n }\n\n del() {\n if (!this.data.filter((d) => d !== '0').filter(Boolean).length) {\n this.data.length = 0;\n } else {\n this.data.pop();\n }\n }\n\n clear() {\n this.data = [];\n }\n\n inc(gap) {\n this.replaceValue(this.#initialNumValue + (gap || 1));\n }\n\n dec(gap) {\n this.replaceValue(this.#initialNumValue - (gap || 1));\n }\n\n isInRange(val) {\n return val >= this.min && val <= this.max;\n }\n\n replaceValue(val) {\n if (this.isInRange(val)) {\n this.data = val.toString().padStart(this.length, 0).split('');\n }\n }\n}\n","import { createBaseInputClass } from '../../baseClasses/createBaseInputClass';\nimport {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n portalMixin,\n} from '../../mixins';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { compose } from '../../helpers';\nimport {\n newDate,\n isValidTimestamp,\n formatTimestamp,\n isSupportedKey,\n isNumber,\n getKeyMap,\n getCurrentTime,\n overrideConstructedStylesheet,\n} from './helpers';\nimport { formats } from './formats';\nimport { calendarIcon } from './icons';\nimport { counterConfig, DEFAULT_FORMAT, DIVIDER, NATIVE_FORMAT } from './consts';\nimport { DateCounter } from './DateCounterClass';\nimport { TextFieldClass } from '../descope-text-field/TextFieldClass';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('date-field');\n\n// we set baseSelector to `vaadin-popover` as a temporary hack, so our portalMixin will\n// be able to process this component's overlay. The whole process needs refactoring as soon as possible.\nconst BASE_SELECTOR = 'vaadin-popover';\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: BASE_SELECTOR });\n\nconst dateFieldAttrs = ['format', 'opened', 'initial-value', 'readonly'];\nconst calendarAttrs = ['years-range', 'calendar-months', 'calendar-weekdays'];\nconst observedAttrs = [...dateFieldAttrs, ...calendarAttrs];\n\nclass RawDateFieldClass extends BaseInputClass {\n timestamp = '';\n\n format = DEFAULT_FORMAT;\n\n selectedCounterIdx = 0;\n\n dateCounters = [\n new DateCounter(counterConfig.MONTH),\n new DateCounter(counterConfig.DAY),\n new DateCounter(counterConfig.YEAR),\n ];\n\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], observedAttrs);\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div>\n <descope-text-field>\n <span slot=\"suffix\" class=\"toggle-calendar\">\n ${calendarIcon}\n </span>\n </descope-text-field>\n <vaadin-popover></vaadin-popover>\n </div>\n `;\n\n injectStyle(\n `\n :host {\n display: inline-block;\n box-sizing: border-box;\n user-select: none;\n max-width: 100%;\n }\n\n :host ::slotted {\n padding: 0;\n }\n\n .toggle-calendar {\n cursor: pointer;\n display: flex;\n align-self: center;\n z-index: 1;\n height: 100%;\n align-items: center;\n }\n\n :host([readonly=\"true\"]) .toggle-calendar {\n pointer-events: none;\n }\n `,\n this\n );\n\n this.inputElement = this.shadowRoot.querySelector('descope-text-field');\n this.popoverToggleButton = this.inputElement.querySelector('.toggle-calendar');\n\n this.oninvalid = () => {\n this.inputElement.setAttribute('invalid', 'true');\n this.inputElement.focus();\n };\n }\n\n get opened() {\n return this.getAttribute('opened') === 'true';\n }\n\n // returns the input's value as a timestamp\n get inputValueTimestamp() {\n const date = formats[this.format].getDate(this.inputElement.value);\n\n if (!isValidTimestamp(date?.getTime())) {\n return null;\n }\n\n return date.getTime();\n }\n\n get sortedCounters() {\n return this.format\n .split(DIVIDER)\n .map((placeholder) => this.dateCounters.find((dc) => dc.placeholder === placeholder));\n }\n\n get activeCounter() {\n return this.sortedCounters[this.selectedCounterIdx];\n }\n\n get countersValue() {\n return this.sortedCounters.map((dc) => dc.stringValue).join(DIVIDER);\n }\n\n get overlay() {\n return this.baseElement.shadowRoot?.querySelector('vaadin-popover-overlay');\n }\n\n get backdrop() {\n return this.overlay.shadowRoot?.querySelector('#backdrop');\n }\n\n get calendar() {\n return this.overlay?.querySelector('descope-calendar');\n }\n\n get isRTL() {\n const computedStyleDirection = getComputedStyle(this.baseElement).getPropertyValue('direction');\n\n if (computedStyleDirection) {\n return computedStyleDirection === 'rtl';\n }\n\n // Fallback: If for some reason computed style was not calculated in time, fallback to check on attribute\n return this.getAttribute('st-host-direction') === 'rtl';\n }\n\n get value() {\n return this.timestamp;\n }\n\n set value(val) {\n if (!val) return;\n\n const numVal = Number(val);\n const isValTimestamp = !Number.isNaN(numVal);\n\n let date;\n let timestamp;\n\n if (isValTimestamp) {\n date = newDate(numVal);\n timestamp = numVal;\n } else {\n date = newDate(val);\n timestamp = date.getTime();\n }\n\n if (!isValidTimestamp(timestamp) || timestamp === this.timestamp) {\n return;\n }\n\n this.timestamp = timestamp;\n\n this.updateInputDisplay();\n this.updateDateCounters(date);\n\n // since baseElement is set to vaadin-popover, we need to manually dispatch an input event to trigger getValidity\n this.dispatchEvent(new Event('input'));\n }\n\n updateInputDisplay() {\n this.inputElement.value = formatTimestamp(newDate(this.value).getTime(), this.format);\n }\n\n init() {\n super.init?.();\n\n this.updateFormatPattern();\n this.initPopover();\n this.initInputElement();\n\n setTimeout(() => {\n this.#overrideOverlaySettings();\n }, 0);\n }\n\n initInputElement() {\n this.popoverToggleButton.addEventListener('click', this.onPopoverToggle.bind(this));\n\n this.inputElement.addEventListener('focus', this.onFocus.bind(this));\n this.inputElement.addEventListener('blur', this.onBlur.bind(this));\n this.inputElement.addEventListener('input', this.onInput.bind(this));\n this.inputElement.addEventListener('click', this.handleMouseCaretPositionChange.bind(this));\n this.inputElement.addEventListener('keydown', this.handleKeyDownValueChange.bind(this));\n this.inputElement.addEventListener('keydown', this.handleKeydownCaretPositionChange.bind(this));\n this.inputElement.addEventListener('keydown', this.handleValueChange.bind(this));\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'label',\n 'label-type',\n 'placeholder',\n 'disabled',\n 'readonly',\n 'bordered',\n 'required',\n 'full-width',\n 'st-host-direction',\n 'pattern',\n 'invalid',\n 'bordered',\n ],\n });\n }\n\n initPopover() {\n this.baseElement.trigger = ['click'];\n this.baseElement.withBackdrop = true;\n this.baseElement.renderer = this.#popoverRenderer.bind(this);\n\n // block popover events from focusing/blurring the text-field\n this.baseElement.addEventListener('click', (e) => {\n e.preventDefault();\n e.stopPropagation();\n });\n }\n\n #popoverPosStylesheet;\n\n #popoverRenderer(root) {\n // popoverRenderer should run only once, when the popover is first rendering.\n if (!root.firstChild) {\n this.overlay.positionTarget = this.shadowRoot.querySelector('.toggle-calendar');\n\n root.appendChild(this.#getPopoverContent());\n\n // override vaadin's constructed stylesheet which hides the host element\n overrideConstructedStylesheet(this.baseElement);\n\n this.backdrop.addEventListener('click', this.closePopover.bind(this));\n }\n\n // Hide overlay before adjusting position to prevent flickering\n root.style.setProperty('visibility', 'hidden');\n\n // Wait until overlay is ready\n setTimeout(() => {\n this.#adjustPopoverPosition(root);\n\n // Show adjusted overlay\n root.style.setProperty('visibility', 'visible');\n this.updateCalendarView(root);\n }, 100);\n }\n\n #adjustPopoverPosition() {\n const popover = this.shadowRoot.querySelector('vaadin-popover').shadowRoot;\n\n // Remove previously added stylesheets\n this.#popoverPosStylesheet?.remove();\n\n const windowRect = document.body.getBoundingClientRect();\n const inputRect = this.getBoundingClientRect();\n const calendarRect = this.calendar.getBoundingClientRect();\n\n const side = this.isRTL ? 'right' : 'left';\n const offset = inputRect[side] - calendarRect[side];\n const availableLeft = calendarRect.left;\n const availableRight = windowRect.width - calendarRect.right;\n\n let newOffset;\n if (offset > 0) {\n newOffset = Math.min(offset, availableRight);\n } else {\n newOffset = Math.min(Math.abs(offset), availableLeft) * -1;\n }\n\n injectStyle(\n `\n vaadin-popover-overlay::part(overlay) {\n transform: translateX(${newOffset}px);\n }\n `,\n popover\n );\n }\n\n #getPopoverContent() {\n const ele = document.createElement('span');\n\n ele.innerHTML = `<descope-calendar></descope-calendar>`;\n\n const calendar = ele.querySelector('descope-calendar');\n\n calendar.addEventListener('date-submit', this.onCalendarSubmit.bind(this));\n calendar.addEventListener('cancel', this.closePopover.bind(this));\n\n return ele;\n }\n\n // the default vaadin behavior is to attach the overlay to the body when opened\n // we do not want that because it's difficult to style the overlay in this way\n // so we override it to open inside the shadow DOM\n #overrideOverlaySettings() {\n this.overlay._attachOverlay = () => this.overlay.bringToFront();\n this.overlay._detachOverlay = () => {};\n this.overlay._enterModalState = () => {};\n }\n\n onPopoverToggle() {\n this.opened ? this.closePopover() : this.openPopover();\n }\n\n openPopover() {\n this.setAttribute('opened', 'true');\n }\n\n closePopover() {\n this.removeAttribute('opened');\n this.inputElement.focus();\n }\n\n getCounterById(id) {\n return this.dateCounters.find((dc) => dc.id === id);\n }\n\n onCalendarSubmit() {\n if (!this.isReadOnly) {\n if (!this.calendar.value) return;\n\n const calendarDate = newDate(this.calendar.value);\n\n this.value = calendarDate.getTime();\n\n this.getCounterById('year').replaceValue(calendarDate.getFullYear());\n this.getCounterById('month').replaceValue(calendarDate.getMonth() + 1);\n this.getCounterById('day').replaceValue(calendarDate.getDate());\n\n this.dispatchEvent(new Event('input'));\n }\n\n this.closePopover();\n }\n\n updateCalendarView() {\n const validInputVal =\n isValidTimestamp(newDate(this.inputElement.value || '').getTime()) &&\n formats[this.format].validate(this.inputElement.value);\n\n if (this.inputValueTimestamp || validInputVal) {\n this.calendar.setAttribute(\n 'initial-value',\n formatTimestamp(this.inputValueTimestamp || this.timestamp, NATIVE_FORMAT)\n );\n } else {\n this.calendar.clearValue();\n this.calendar.setAttribute('preview', formatTimestamp(getCurrentTime(), NATIVE_FORMAT));\n }\n\n forwardAttrs(this, this.calendar, {\n includeAttrs: [\n 'st-host-direction',\n 'readonly',\n 'initial-month',\n 'initial-year',\n 'years-range',\n 'calendar-label-submit',\n 'calendar-label-cancel',\n 'calendar-months',\n 'calendar-weekdays',\n 'calendar-weekdays-short',\n ],\n });\n }\n\n onInput(e) {\n if (!e.target.value) {\n this.calendar?.clear();\n this.calendar?.renderCalendar();\n }\n }\n\n onFocus() {\n if (this.isReadOnly) {\n return;\n }\n\n if (!this.inputElement.value) {\n this.inputElement.value = this.format;\n this.setInputSelectionRange();\n }\n }\n\n clearInputValue() {\n this.inputElement.value = '';\n this.resetDateCounters();\n }\n\n onBlur() {\n if (this.inputValueTimestamp) {\n this.value = this.inputValueTimestamp;\n } else if (!this.opened && this.countersValue === this.format) {\n this.clearInputValue();\n }\n }\n\n onFormatUpdate(format) {\n if (Object.keys(formats).includes(format)) {\n this.format = format;\n this.updateFormatPattern();\n }\n }\n\n updateFormatPattern() {\n const format = this.getAttribute('format') || this.format || DEFAULT_FORMAT;\n this.setAttribute('type', 'date');\n this.setAttribute('pattern', formats[format].pattern);\n }\n\n handleValueChange(e) {\n if (isNumber(e.key)) {\n e.preventDefault();\n\n this.handleCountersValue(e.key);\n\n if (this.activeCounter.isFull) {\n this.selectNextCounter();\n }\n\n this.setInputSelectionRange();\n }\n }\n\n getCounterIdx(caretPos) {\n const [counter1ln, counter2ln] = this.sortedCounters.map((dc) => dc.length);\n\n const c1 = caretPos <= counter1ln;\n const c2 = caretPos >= counter1ln && caretPos <= counter1ln + counter2ln + 1;\n const c3 = caretPos >= counter1ln + counter2ln + 2;\n\n return [c1, c2, c3].indexOf(true);\n }\n\n handleCountersValue(val) {\n this.activeCounter.add(val);\n this.inputElement.value = this.countersValue;\n }\n\n setSelectedCounterByCaretPosition(e) {\n this.selectedCounterIdx = this.getCounterIdx(e.target.selectionStart);\n }\n\n selectNextCounter() {\n if (this.selectedCounterIdx < this.dateCounters.length) {\n this.selectedCounterIdx = Math.min(this.selectedCounterIdx + 1, 2);\n }\n }\n\n selectPrevCounter() {\n if (this.selectedCounterIdx > 0) {\n this.selectedCounterIdx = Math.min(this.selectedCounterIdx - 1, 1);\n }\n }\n\n // Sets the text selection range in the input element based on the selected counter.\n // The function calculates the starting position of the selection by summing the lengths\n // of all counters before the currently selected counter (`selectedCounterIdx`).\n // It then selects the entire length of the current counter in the input element.\n setInputSelectionRange() {\n // For preview/readonly state we don't have a caret or a caretIdx, so we skip setting input selection range\n if (this.selectedCounterIdx < 0) {\n return;\n }\n\n const caretStart = this.sortedCounters\n .slice(0, this.selectedCounterIdx)\n .reduce((acc, counter) => acc + counter.length, this.selectedCounterIdx);\n\n this.inputElement.setSelectionRange(\n caretStart,\n caretStart + this.sortedCounters[this.selectedCounterIdx].length\n );\n }\n\n resetDateCounters() {\n this.dateCounters.forEach((dc) => dc.clear());\n }\n\n // in case value is set from external source we need to update date counters\n updateDateCounters(date) {\n this.dateCounters.forEach((dc) => {\n switch (dc.id) {\n case counterConfig.MONTH.id:\n dc.set(date.getMonth() + 1);\n break;\n case counterConfig.YEAR.id:\n dc.set(date.getFullYear());\n break;\n case counterConfig.DAY.id:\n dc.set(date.getDate());\n break;\n default:\n break;\n }\n });\n }\n\n handleKeyDownValueChange(e) {\n if (this.isReadOnly) {\n return;\n }\n\n const { key, shiftKey, metaKey } = e;\n const keys = getKeyMap(key, shiftKey, metaKey);\n const allowedOperations = keys.refresh || keys.tab || keys.shiftTab;\n\n if (this.opened) {\n this.closePopover();\n }\n\n if (isSupportedKey(key)) {\n e.preventDefault();\n const counter = this.activeCounter;\n\n if (!counter) return;\n\n const counterData = Object.values(counterConfig).find((config) => config.id === counter.id);\n const { count, shiftCount } = counterData;\n\n if (keys.backspace) this.handleBackspace();\n else if (keys.arrowUp) counter.inc();\n else if (keys.arrowDown) counter.dec();\n else if (keys.shiftArrowUp) counter.inc(count);\n else if (keys.shiftArrowDown) counter.dec(count);\n else if (keys.pageUp) counter.inc(count);\n else if (keys.pageDown) counter.dec(count);\n else if (keys.shiftPageUp) counter.inc(shiftCount);\n else if (keys.shiftPageDown) counter.dec(shiftCount);\n\n this.inputElement.value = this.countersValue;\n\n this.setInputSelectionRange();\n } else if (!allowedOperations) {\n e.preventDefault();\n }\n }\n\n handleBackspace() {\n const counter = this.activeCounter;\n\n if (counter.isEmpty) {\n this.selectPrevCounter();\n this.setInputSelectionRange();\n } else {\n counter.del();\n }\n }\n\n handleKeydownCaretPositionChange(e) {\n if (this.opened) {\n return;\n }\n\n const { key } = e;\n\n if (isSupportedKey(key)) {\n e.preventDefault();\n\n const keys = getKeyMap(key, false);\n\n if (keys.arrowRight) this.selectNextCounter();\n else if (keys.arrowLeft) this.selectPrevCounter();\n\n this.setInputSelectionRange();\n }\n }\n\n handleMouseCaretPositionChange(e) {\n if (this.opened) {\n return;\n }\n e.preventDefault();\n this.setSelectedCounterByCaretPosition(e);\n this.setInputSelectionRange();\n }\n\n onInitialValueChange(val) {\n // if component already has a value don't re-set value\n if (this.value) return;\n\n // we need to wait for the text-field to init\n setTimeout(() => {\n this.value = val;\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (dateFieldAttrs.includes(attrName)) {\n if (newValue && attrName === 'format') {\n this.onFormatUpdate(newValue);\n }\n if (attrName === 'initial-value') {\n this.onInitialValueChange(newValue);\n }\n } else if (calendarAttrs.includes(attrName)) {\n if (newValue) {\n this.calendar?.setAttribute(attrName, newValue);\n } else {\n this.calendar?.removeAttribute(attrName);\n }\n }\n }\n }\n\n getValidity() {\n if (this.isRequired && !this.inputElement.value) {\n return { valueMissing: true };\n }\n\n return {};\n }\n}\n\nconst textVars = TextFieldClass.cssVarList;\nconst { host, input, inputEleRTL, toggleButton, overlay, backdrop } = {\n host: { selector: () => ':host' },\n input: { selector: () => 'descope-text-field' },\n inputEleRTL: { selector: () => ':host([st-host-direction=\"rtl\"]) descope-text-field' },\n toggleButton: { selector: () => '.toggle-calendar' },\n overlay: { selector: 'vaadin-popover-overlay::part(overlay)' },\n backdrop: { selector: 'vaadin-popover-overlay::part(backdrop)' },\n};\n\nexport const DateFieldClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n iconMargin: { ...toggleButton, property: 'margin-inline-end' },\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n textAlign: { ...input, property: 'text-align' },\n rtlInputDirection: { ...inputEleRTL, property: textVars.inputDirection },\n rtlInputAlignment: { ...inputEleRTL, property: textVars.inputTextAlign },\n overlayGap: {\n property: () => DateFieldClass.cssVarList.overlayGap,\n },\n overlayBackgroundColor: {\n property: () => DateFieldClass.cssVarList.overlayBackgroundColor,\n },\n overlayPadding: {\n property: () => DateFieldClass.cssVarList.overlayPadding,\n },\n overlayBoxShadow: { property: () => DateFieldClass.overlayBoxShadow },\n overlayOutlineWidth: {\n property: () => DateFieldClass.cssVarList.overlayOutlineWidth,\n },\n overlayOutlineColor: {\n property: () => DateFieldClass.cssVarList.overlayOutlineColor,\n },\n overlayOutlineStyle: {\n property: () => DateFieldClass.cssVarList.overlayOutlineStyle,\n },\n },\n }),\n portalMixin({\n name: 'overlay',\n selector: '',\n mappings: {\n marginTop: { ...overlay, property: 'margin-top' },\n backgroundColor: { ...overlay },\n backdropBackgroundColor: { ...backdrop, property: 'background-color' },\n backdropPointerEvents: { ...backdrop, property: 'pointer-events' },\n padding: { ...overlay },\n boxShadow: { ...overlay },\n outlineWidth: { ...overlay },\n outlineColor: { ...overlay },\n outlineStyle: { ...overlay },\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawDateFieldClass);\n","import '@vaadin/popover/src/vaadin-popover';\nimport './descope-calendar';\nimport '../descope-text-field';\n\nimport { componentName, DateFieldClass } from './DateFieldClass';\n\ncustomElements.define(componentName, DateFieldClass);\n\nexport { DateFieldClass, componentName };\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n 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\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"],"names":["patterns","MM","DD","YYYY","createFormat","format","pattern","split","map","part","join","createPattern","toValuesFn","order","match","values","forEach","index","createToValuesFn","regexp","RegExp","validate","val","test","getDate","exec","year","month","day","createDate","formats","Object","fromEntries","f","DateCounter","constructor","id","min","max","placeholder","this","data","length","numberValue","Number","stringValue","padStart","isFull","isEmpty","toString","set","add","num","push","shift","del","filter","d","Boolean","pop","clear","inc","gap","replaceValue","dec","isInRange","componentName","BaseInputClass","createBaseInputClass","baseSelector","dateFieldAttrs","calendarAttrs","observedAttrs","textVars","TextFieldClass","cssVarList","host","input","inputEleRTL","toggleButton","overlay","backdrop","selector","DateFieldClass","componentNameOverride","mappings","iconMargin","property","hostWidth","hostDirection","textAlign","rtlInputDirection","inputDirection","rtlInputAlignment","inputTextAlign","overlayGap","overlayBackgroundColor","overlayPadding","overlayBoxShadow","overlayOutlineWidth","overlayOutlineColor","overlayOutlineStyle","name","marginTop","backgroundColor","backdropBackgroundColor","backdropPointerEvents","padding","boxShadow","outlineWidth","outlineColor","outlineStyle","timestamp","selectedCounterIdx","dateCounters","MONTH","DAY","YEAR","observedAttributes","concat","super","attachShadow","mode","innerHTML","inputElement","shadowRoot","querySelector","popoverToggleButton","oninvalid","setAttribute","focus","opened","getAttribute","inputValueTimestamp","date","value","getTime","sortedCounters","find","dc","activeCounter","countersValue","baseElement","calendar","isRTL","computedStyleDirection","getComputedStyle","getPropertyValue","numVal","isNaN","updateInputDisplay","updateDateCounters","dispatchEvent","Event","init","updateFormatPattern","initPopover","initInputElement","setTimeout","addEventListener","onPopoverToggle","bind","onFocus","onBlur","onInput","handleMouseCaretPositionChange","handleKeyDownValueChange","handleKeydownCaretPositionChange","handleValueChange","includeAttrs","trigger","withBackdrop","renderer","e","preventDefault","stopPropagation","root","firstChild","positionTarget","appendChild","closePopover","style","setProperty","updateCalendarView","popover","remove","windowRect","document","body","getBoundingClientRect","inputRect","calendarRect","side","offset","availableLeft","left","availableRight","width","right","newOffset","Math","abs","ele","createElement","onCalendarSubmit","_attachOverlay","bringToFront","_detachOverlay","_enterModalState","openPopover","removeAttribute","getCounterById","isReadOnly","calendarDate","getFullYear","getMonth","validInputVal","clearValue","target","renderCalendar","setInputSelectionRange","clearInputValue","resetDateCounters","onFormatUpdate","keys","includes","key","handleCountersValue","selectNextCounter","getCounterIdx","caretPos","counter1ln","counter2ln","indexOf","setSelectedCounterByCaretPosition","selectionStart","selectPrevCounter","caretStart","slice","reduce","acc","counter","setSelectionRange","shiftKey","metaKey","allowedOperations","refresh","tab","shiftTab","counterData","config","count","shiftCount","backspace","handleBackspace","arrowUp","arrowDown","shiftArrowUp","shiftArrowDown","pageUp","pageDown","shiftPageUp","shiftPageDown","arrowRight","arrowLeft","onInitialValueChange","attributeChangedCallback","attrName","oldValue","newValue","getValidity","isRequired","valueMissing","customElements","define","proxyProps","useProxyTargets","superclass","icon","renderCopyToClipboard","shouldRender","iconInitConfig","title","iconCopiedConfig","assign","slot","navigator","clipboard","writeText","onLabelClick","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","slots","wrappedEleName","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","label","requiredIndicator","inputField","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","fontSize","fontFamily","labelFontSize","labelFontWeight","labelTextColor","hostMinWidth","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor"],"sourceRoot":""}
|
@@ -1 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,8819],{
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2294,8819],{66434:(t,e,o)=>{o.d(e,{T:()=>p,s:()=>l});var n=o(88961),i=o(63200),r=o(25964),s=o(72270);const p=(0,r.xE)("text");class h extends((0,s.qu)({componentName:p,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <slot part="text-wrapper"></slot>\n ',(0,r.fz)("\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n ",this)}get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,r.Ge)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}const l=(0,i.Zz)((0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),n.VO,n.tQ)(h)},63595:(t,e,o)=>{o.r(e),o.d(e,{TextClass:()=>n.s,componentName:()=>n.T});var n=o(66434);customElements.define(n.T,n.s)},48995:(t,e,o)=>{o.r(e),o.d(e,{DividerClass:()=>m,componentName:()=>l});var n=o(79365),i=o(81365),r=o(9696),s=o(97810),p=o(66434),h=o(25964);const l=(0,s.xE)("divider");class d extends((0,i.q)({componentName:l,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t\t<div>\n\t\t\t\t<descope-text>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</descope-text>\n\t\t\t</div>\n\t\t",(0,h.fz)("\n \t:host {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t\t:host > div::before,\n\t\t\t\t:host > div::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t\tdescope-text {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t}\n\t\t\t\t:host(:empty) descope-text {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t\t:host([vertical=\"true\"]) div {\n\t\t\t\t\twidth: fit-content;\n\t\t\t\t}\n ",this),this.textComponent=this.shadowRoot.querySelector("descope-text"),(0,s.EA)(this,this.textComponent,{includeAttrs:["mode","variant","italic"]})}}const c=p.s.cssVarList,{host:a,before:y,after:x,text:g}={host:{selector:()=>":host"},before:{selector:"::before"},after:{selector:"::after"},text:{selector:"descope-text"}},m=(0,r.Zz)((0,n.RF)({mappings:{hostWidth:{...a,property:"width"},hostPadding:{...a,property:"padding"},hostDirection:{...g,property:"direction"},minHeight:{},alignItems:{},alignSelf:{},flexDirection:{},textAlign:{...g,property:c.textAlign},labelTextWidth:{...g,property:"width"},labelTextMaxWidth:{...g,property:"max-width"},labelTextVerticalSpacing:[{...g,property:"padding-top"},{...g,property:"padding-bottom"}],labelTextHorizontalSpacing:[{...g,property:"padding-right"},{...g,property:"padding-left"}],stripeColor:[{...y,property:"background-color"},{...x,property:"background-color"}],stripeHorizontalThickness:[{...y,property:"height"},{...x,property:"height"}],stripeVerticalThickness:[{...y,property:"width"},{...x,property:"width"}],stripeColorOpacity:[{...y,property:"opacity"},{...x,property:"opacity"}]}}),n.VO,n.tQ)(d);o(63595),customElements.define(l,m)}}]);
|
2
|
+
//# sourceMappingURL=descope-divider-index-js.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"descope-divider-index-js.js","mappings":"uNAaO,MAAMA,GAAgB,QAAiB,QAE9C,MAAMC,WAAgB,QAAgB,CACpCD,gBACAE,aAAc,kBAEd,WAAAC,GACEC,QA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MAAO,CAAE5B,SAAU,WACnB6B,KAAM,CAAE7B,SAAU,iBAGP8B,GAAe,SAC1B,QAAiB,CACfhC,SAAU,CACRC,UAAW,IAAK2B,EAAMzB,SAAU,SAChC8B,YAAa,IAAKL,EAAMzB,SAAU,WAClCC,cAAe,IAAK,EAAMD,SAAU,aAEpC+B,UAAW,CAAC,EACZC,WAAY,CAAC,EACbC,UAAW,CAAC,EACZC,cAAe,CAAC,EAChB3B,UAAW,IAAK,EAAMP,SAAUuB,EAAShB,WAEzC4B,eAAgB,IAAK,EAAMnC,SAAU,SACrCoC,kBAAmB,IAAK,EAAMpC,SAAU,aACxCqC,yBAA0B,CACxB,IAAK,EAAMrC,SAAU,eACrB,IAAK,EAAMA,SAAU,mBAEvBsC,2BAA4B,CAC1B,IAAK,EAAMtC,SAAU,iBACrB,IAAK,EAAMA,SAAU,iBAGvBuC,YAAa,CACX,IAAKb,EAAQ1B,SAAU,oBACvB,IAAK2B,EAAO3B,SAAU,qBAExBwC,0BAA2B,CACzB,IAAKd,EAAQ1B,SAAU,UACvB,IAAK2B,EAAO3B,SAAU,WAExByC,wBAAyB,CACvB,IAAKf,EAAQ1B,SAAU,SACvB,IAAK2B,EAAO3B,SAAU,UAExB0C,mBAAoB,CAClB,IAAKhB,EAAQ1B,SAAU,WACvB,IAAK2B,EAAO3B,SAAU,eAI5B,KACA,KA3C0B,CA4C1BiB,G,SC1GFF,eAAeC,OAAOrC,EAAekD,E","sources":["webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/./src/components/descope-divider/DividerClass.js","webpack://@descope/web-components-ui/./src/components/descope-divider/index.js"],"sourcesContent":["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\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n textColor: { property: 'color' },\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 { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { TextClass } from '@descope-ui/descope-text/class';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('divider');\nclass RawDivider extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t\t<div>\n\t\t\t\t<descope-text>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</descope-text>\n\t\t\t</div>\n\t\t`;\n\n injectStyle(\n `\n \t:host {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\t\t\t\t:host > div::before,\n\t\t\t\t:host > div::after {\n\t\t\t\t\tcontent: '';\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t\tdescope-text {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t}\n\t\t\t\t:host(:empty) descope-text {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t\t:host([vertical=\"true\"]) div {\n\t\t\t\t\twidth: fit-content;\n\t\t\t\t}\n `,\n this\n );\n\n this.textComponent = this.shadowRoot.querySelector('descope-text');\n\n forwardAttrs(this, this.textComponent, {\n includeAttrs: ['mode', 'variant', 'italic'],\n });\n }\n}\n\nconst textVars = TextClass.cssVarList;\nconst { host, before, after, text } = {\n host: { selector: () => ':host' },\n before: { selector: '::before' },\n after: { selector: '::after' },\n text: { selector: 'descope-text' },\n};\n\nexport const DividerClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostPadding: { ...host, property: 'padding' },\n hostDirection: { ...text, property: 'direction' },\n\n minHeight: {},\n alignItems: {},\n alignSelf: {},\n flexDirection: {},\n textAlign: { ...text, property: textVars.textAlign },\n\n labelTextWidth: { ...text, property: 'width' },\n labelTextMaxWidth: { ...text, property: 'max-width' },\n labelTextVerticalSpacing: [\n { ...text, property: 'padding-top' },\n { ...text, property: 'padding-bottom' },\n ],\n labelTextHorizontalSpacing: [\n { ...text, property: 'padding-right' },\n { ...text, property: 'padding-left' },\n ],\n\n stripeColor: [\n { ...before, property: 'background-color' },\n { ...after, property: 'background-color' },\n ],\n stripeHorizontalThickness: [\n { ...before, property: 'height' },\n { ...after, property: 'height' },\n ],\n stripeVerticalThickness: [\n { ...before, property: 'width' },\n { ...after, property: 'width' },\n ],\n stripeColorOpacity: [\n { ...before, property: 'opacity' },\n { ...after, property: 'opacity' },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawDivider);\n","import { componentName, DividerClass } from './DividerClass';\nimport '@descope-ui/descope-text';\n\ncustomElements.define(componentName, DividerClass);\n\nexport { DividerClass, componentName };\n"],"names":["componentName","RawText","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","hideWhenEmpty","getAttribute","init","hasChildren","childNodes","length","style","display","TextClass","mappings","hostWidth","selector","property","hostDirection","fontSize","textColor","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontFamily","fontStyle","fontWeight","borderWidth","borderStyle","borderColor","customElements","define","RawDivider","createBaseClass","textComponent","shadowRoot","querySelector","includeAttrs","textVars","cssVarList","host","before","after","text","DividerClass","hostPadding","minHeight","alignItems","alignSelf","flexDirection","labelTextWidth","labelTextMaxWidth","labelTextVerticalSpacing","labelTextHorizontalSpacing","stripeColor","stripeHorizontalThickness","stripeVerticalThickness","stripeColorOpacity"],"sourceRoot":""}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see descope-email-field-index-js.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5695],{
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5695],{54316:(t,e,r)=>{r.r(e),r.d(e,{EmailFieldClass:()=>f,componentName:()=>g}),r(52733);var n=r(47642),i=r(87550);const o=i.AH`
|
3
3
|
:host([dir='rtl']) [part='input-field'] ::slotted(input) {
|
4
4
|
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
5
5
|
}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
8
8
|
--_lumo-text-field-overflow-mask-image: none;
|
9
9
|
}
|
10
|
-
`;(0,i.SF)("vaadin-email-field",[n.k,o],{moduleId:"lumo-email-field"});var l=r(
|
10
|
+
`;(0,i.SF)("vaadin-email-field",[n.k,o],{moduleId:"lumo-email-field"});var l=r(82901),a=r(27136);const p=r(51450).AH`
|
11
11
|
:host([dir='rtl']) [part='input-field'] {
|
12
12
|
direction: ltr;
|
13
13
|
}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
direction: rtl;
|
17
17
|
text-align: left;
|
18
18
|
}
|
19
|
-
`;(0,i.SF)("vaadin-email-field",p,{moduleId:"vaadin-email-field-styles"});class s extends a.A{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,l.X)(s);var d=r(94619),u=r(93826),c=r(7138),h=r(14944),y=r(33177);const g=(0,h.xE)("email-field"),f=(0,c.Zz)((0,d.RF)({mappings:u.A}),d.VO,(0,d.RV)({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(0,d.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),d.tQ,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}}))((0,d.tz)({slots:["","suffix"],wrappedEleName:"vaadin-email-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(${f.cssVarList.inputOutlineWidth}) + var(${f.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,y.$J)("vaadin-email-field")}\n\t\t\t${(0,y.cy)(f.cssVarList)}\n\t\t\t${(0,y.LJ)("vaadin-email-field",f.cssVarList)}\n ${(0,y.Kl)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:g}));customElements.define(g,f)},93826:(t,e,r)=>{r.d(e,{A:()=>x});const{host:n,label:i,placeholder:o,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:f,externalPlaceholder:m,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},n],fontFamily:[i,a,d,u],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...l,property:"color"},{...i,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},errorMessageIcon:{...u,property:"background-image"},errorMessageIconSize:{...u,property:"background-size"},errorMessageIconPadding:{...u,property:"padding-inline-start"},errorMessageIconRepeat:{...u,property:"background-repeat"},errorMessageIconPosition:{...u,property:"background-position"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...f,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...o,property:"color"},{...c,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}},33177:(t,e,r)=>{r.d(e,{$J:()=>c,I4:()=>l,Kl:()=>h,LJ:()=>u,Qv:()=>o,X6:()=>p,cy:()=>n,fu:()=>s,kG:()=>d,lS:()=>a,zm:()=>i});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${i(t)}\n ${l(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},21860:(t,e,r)=>{r.d(e,{f:()=>i});var n=r(95925);class i extends n.r{constructor(t,e){super(t,"input","input",{initializer:(t,r)=>{r.value&&(t.value=r.value),r.type&&t.setAttribute("type",r.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},60978:(t,e,r)=>{r.d(e,{a:()=>i});var n=r(60354);const i=t=>class extends((0,n.R)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},10056:(t,e,r)=>{r.d(e,{A:()=>h}),r(94009);var n=r(98633),i=r(65211),o=r(27150),l=r(83798),a=r(9685),p=r(57224),s=r(21860),d=r(60978),u=r(19074);const c=t=>class extends((0,d.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.f(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.q(this.inputElement,this._labelController))}};(0,p.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.cp)((0,o.q)(n.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return n.qy`
|
19
|
+
`;(0,i.SF)("vaadin-email-field",p,{moduleId:"vaadin-email-field-styles"});class s extends a.A{static get is(){return"vaadin-email-field"}constructor(){super(),this._setType("email"),this.pattern="^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9\\-.]+\\.[a-zA-Z0-9\\-]{2,}$"}ready(){super.ready(),this.inputElement&&(this.inputElement.autocapitalize="off")}}(0,l.X)(s);var d=r(79365),u=r(6424),c=r(9696),h=r(97810),y=r(73551);const g=(0,h.xE)("email-field"),f=(0,c.Zz)((0,d.RF)({mappings:u.A}),d.VO,(0,d.RV)({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(0,d.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),d.tQ,(t=>class extends t{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}}))((0,d.tz)({slots:["","suffix"],wrappedEleName:"vaadin-email-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(${f.cssVarList.inputOutlineWidth}) + var(${f.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,y.$J)("vaadin-email-field")}\n\t\t\t${(0,y.cy)(f.cssVarList)}\n\t\t\t${(0,y.LJ)("vaadin-email-field",f.cssVarList)}\n ${(0,y.Kl)()}\n\n vaadin-email-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input="true"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:g}));customElements.define(g,f)},6424:(t,e,r)=>{r.d(e,{A:()=>x});const{host:n,label:i,placeholder:o,requiredIndicator:l,inputField:a,input:p,inputMask:s,helperText:d,errorMessage:u,disabledPlaceholder:c,inputDisabled:h,inputIcon:y,externalInput:g,externalInputDisabled:f,externalPlaceholder:m,externalDisabledPlaceholder:b}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:[{selector:"> input:placeholder-shown"},{selector:()=>":host::slotted(input:placeholder-shown)"}],disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputMask:{selector:"::part(input-field)::before"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},inputIcon:{selector:"vaadin-icon"},externalInput:{selector:()=>"::slotted(input)"},externalInputDisabled:{selector:()=>"::slotted(input:disabled)"},externalPlaceholder:{selector:()=>"::slotted(input:placeholder-shown)"},externalDisabledPlaceholder:{selector:()=>"::slotted(input:disabled::placeholder)"}},x={fontSize:[{},n],fontFamily:[i,a,d,u],labelFontSize:{...i,property:"font-size"},labelFontWeight:{...i,property:"font-weight"},labelTextColor:[{...i,property:"color"},{...l,property:"color"},{...i,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputDirection:{...p,property:"direction"},inputBackgroundColor:[{...a,property:"background-color"},{...s,property:"background-color"}],errorMessageTextColor:{...u,property:"color"},errorMessageIcon:{...u,property:"background-image"},errorMessageIconSize:{...u,property:"background-size"},errorMessageIconPadding:{...u,property:"padding-inline-start"},errorMessageIconRepeat:{...u,property:"background-repeat"},errorMessageIconPosition:{...u,property:"background-position"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...a,property:"color"},{...h,property:"-webkit-text-fill-color"},{...f,property:"-webkit-text-fill-color"}],inputCaretTextColor:[{...p,property:"caret-color"},{...g,property:"caret-color"}],labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...a,property:"border-color"},inputBorderWidth:{...a,property:"border-width"},inputBorderStyle:{...a,property:"border-style"},inputBorderRadius:{...a,property:"border-radius"},inputHeight:{...a,property:"height"},inputHorizontalPadding:[{...p,property:"padding-left"},{...p,property:"padding-right"},{...g,property:"padding-left"},{...g,property:"padding-right"}],inputOutlineColor:{...a,property:"outline-color"},inputOutlineStyle:{...a,property:"outline-style"},inputOutlineWidth:{...a,property:"outline-width"},inputOutlineOffset:{...a,property:"outline-offset"},textAlign:{},inputTextAlign:[{...p,property:"text-align"},{...g,property:"text-align"}],inputPlaceholderColor:[{selector:()=>":host input:placeholder-shown",property:"color"},{...m,property:"color"},{...o,property:"color"},{...c,property:"-webkit-text-fill-color"},{...b,property:"-webkit-text-fill-color"}],labelPosition:{...i,property:"position"},labelTopPosition:{...i,property:"top"},labelHorizontalPosition:[{...i,property:"left"},{...i,property:"right"}],inputTransformY:{...i,property:"transform"},inputTransition:{...i,property:"transition"},marginInlineStart:{...i,property:"margin-inline-start"},placeholderOpacity:[{selector:"> input:placeholder-shown",property:"opacity"},{...m,property:"opacity"}],inputVerticalAlignment:[{...a,property:"align-items"},{...g,property:"align-items"}],valueInputHeight:[{...p,property:"height"},{...g,property:"height"}],valueInputMarginBottom:[{...p,property:"margin-bottom"},{...g,property:"margin-bottom"}],inputIconOffset:[{...y,property:"margin-right"},{...y,property:"margin-left"}],inputIconSize:{...y,property:"font-size"},inputIconColor:{...y,property:"color"}}},73551:(t,e,r)=>{r.d(e,{$J:()=>c,I4:()=>l,Kl:()=>h,LJ:()=>u,Qv:()=>o,X6:()=>p,cy:()=>n,fu:()=>s,kG:()=>d,lS:()=>a,zm:()=>i});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,p=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",s=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,d=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${i(t)}\n ${l(t)}\n ${a(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${d(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`,h=()=>'\n :host([label-type="floating"]) {\n position: relative;\n }\n :host([label-type="floating"][has-label]) [slot="label"] {\n padding: 0;\n }\n :host([label-type="floating"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n '},18330:(t,e,r)=>{r.d(e,{f:()=>i});var n=r(44099);class i extends n.r{constructor(t,e){super(t,"input","input",{initializer:(t,r)=>{r.value&&(t.value=r.value),r.type&&t.setAttribute("type",r.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},37436:(t,e,r)=>{r.d(e,{a:()=>i});var n=r(44218);const i=t=>class extends((0,n.R)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},27136:(t,e,r)=>{r.d(e,{A:()=>h}),r(86689);var n=r(13256),i=r(82901),o=r(90676),l=r(81488),a=r(86314),p=r(87550),s=r(18330),d=r(37436),u=r(37720);const c=t=>class extends((0,d.a)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new s.f(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.q(this.inputElement,this._labelController))}};(0,p.SF)("vaadin-text-field",a.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,p.cp)((0,o.q)(n.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return n.qy`
|
20
20
|
<style>
|
21
21
|
[part='input-field'] {
|
22
22
|
flex-grow: 0;
|
@@ -51,4 +51,5 @@
|
|
51
51
|
</div>
|
52
52
|
</div>
|
53
53
|
<slot name="tooltip"></slot>
|
54
|
-
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new l.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,i.X)(h)},
|
54
|
+
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new l.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,i.X)(h)},52733:(t,e,r)=>{r(27397);var n=r(47642);(0,r(87550).SF)("vaadin-text-field",n.k,{moduleId:"lumo-text-field-styles"}),r(27136)}}]);
|
55
|
+
//# sourceMappingURL=descope-email-field-index-js.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"descope-email-field-index-js.js","mappings":";sOAQA,MAAMA,EAAa,IAAG;;;;;;;;GAUtB,QAAe,qBAAsB,CAAC,IAAkBA,GAAa,CACnEC,SAAU,+CCXL,MAAMC,WAAmB,EAAG;;;;;;;;;GCE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-field/theme/lumo/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/email-field/src/vaadin-email-field-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/email-field/src/vaadin-email-field.js","webpack://@descope/web-components-ui/./src/components/descope-email-field/EmailFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-email-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-controller.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/field-base/src/input-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/src/vaadin-text-field.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js"],"sourcesContent":["/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst emailField = css`\n :host([dir='rtl']) [part='input-field'] ::slotted(input) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n`;\n\nregisterStyles('vaadin-email-field', [inputFieldShared, emailField], {\n moduleId: 'lumo-email-field',\n});\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\n// See https://github.com/vaadin/vaadin-text-field/issues/466\nexport const emailFieldStyles = css`\n :host([dir='rtl']) [part='input-field'] {\n direction: ltr;\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { emailFieldStyles } from './vaadin-email-field-styles.js';\n\nregisterStyles('vaadin-email-field', emailFieldStyles, { moduleId: 'vaadin-email-field-styles' });\n\n/**\n * `<vaadin-email-field>` is a Web Component for email field control in forms.\n *\n * ```html\n * <vaadin-email-field label=\"Email\"></vaadin-email-field>\n * ```\n *\n * ### Styling\n *\n * `<vaadin-email-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends TextField\n */\nexport class EmailField extends TextField {\n static get is() {\n return 'vaadin-email-field';\n }\n\n constructor() {\n super();\n this._setType('email');\n this.pattern = '^([a-zA-Z0-9_\\\\.\\\\-+])+@[a-zA-Z0-9\\\\-.]+\\\\.[a-zA-Z0-9\\\\-]{2,}$';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n if (this.inputElement) {\n this.inputElement.autocapitalize = 'off';\n }\n }\n}\n\ndefineCustomElement(EmailField);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n externalInputMixin,\n} from '../../mixins';\nimport textFieldMappings from '../descope-text-field/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('email-field');\n\nconst defaultPattern = \"^[\\\\w\\\\.\\\\%\\\\+\\\\-']+@[\\\\w\\\\.\\\\-]+\\\\.[A-Za-z]{2,}$\";\nconst defaultAutocomplete = 'username';\n\nconst customMixin = (superclass) =>\n class EmailFieldMixinClass extends superclass {\n init() {\n super.init?.();\n\n // we need to set the pattern on the base element because vaadin-email-field is overriding it\n this.baseElement.setAttribute('pattern', defaultPattern);\n\n if (!this.getAttribute('autocomplete')) {\n this.setAttribute('autocomplete', defaultAutocomplete);\n }\n\n this.createExternalInput();\n }\n };\n\nexport const EmailFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n externalInputMixin({\n inputType: 'email',\n inputName: 'email',\n autocompleteType: 'username',\n includeAttrs: ['disabled', 'readonly', 'pattern'],\n }),\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['', 'suffix'],\n wrappedEleName: 'vaadin-email-field',\n style: () => `\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${EmailFieldClass.cssVarList.inputOutlineWidth}) + var(${\n EmailFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n ${resetInputLabelPosition('vaadin-email-field')}\n\t\t\t${useHostExternalPadding(EmailFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-email-field', EmailFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-email-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-email-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n :host ::slotted(*) {\n -webkit-mask-image: none;\n }\n\n vaadin-email-field[external-input=\"true\"] > input:not(:placeholder-shown) {\n opacity: 0;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n","import '@vaadin/email-field';\nimport { componentName, EmailFieldClass } from './EmailFieldClass';\n\ncustomElements.define(componentName, EmailFieldClass);\n\nexport { EmailFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n 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\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","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputControlMixin } from './input-control-mixin.js';\n\n/**\n * A mixin to provide logic for vaadin-text-field and related components.\n *\n * @polymerMixin\n * @mixes InputControlMixin\n */\nexport const InputFieldMixin = (superclass) =>\n class InputFieldMixinClass extends InputControlMixin(superclass) {\n static get properties() {\n return {\n /**\n * Whether the value of the control can be automatically completed by the browser.\n * List of available options at:\n * https://developer.mozilla.org/en/docs/Web/HTML/Element/input#attr-autocomplete\n */\n autocomplete: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari that is used to control whether\n * autocorrection should be enabled when the user is entering/editing the text.\n * Possible values are:\n * on: Enable autocorrection.\n * off: Disable autocorrection.\n */\n autocorrect: {\n type: String,\n },\n\n /**\n * This is a property supported by Safari and Chrome that is used to control whether\n * autocapitalization should be enabled when the user is entering/editing the text.\n * Possible values are:\n * characters: Characters capitalization.\n * words: Words capitalization.\n * sentences: Sentences capitalization.\n * none: No capitalization.\n */\n autocapitalize: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'autocapitalize', 'autocomplete', 'autocorrect'];\n }\n\n // Workaround for https://github.com/Polymer/polymer/issues/5259\n get __data() {\n return this.__dataValue || {};\n }\n\n set __data(value) {\n this.__dataValue = value;\n }\n\n /**\n * @param {HTMLElement} input\n * @protected\n * @override\n */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n\n if (input) {\n // Discard value set on the custom slotted input.\n if (input.value && input.value !== this.value) {\n console.warn(`Please define value on the <${this.localName}> component!`);\n input.value = '';\n }\n\n if (this.value) {\n input.value = this.value;\n }\n }\n }\n\n /**\n * Override an event listener from `FocusMixin`.\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (!focused && document.hasFocus()) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `InputMixin`\n * to mark as valid after user started typing.\n * @param {Event} event\n * @protected\n * @override\n */\n _onInput(event) {\n super._onInput(event);\n\n if (this.invalid) {\n this.validate();\n }\n }\n\n /**\n * Override an observer from `InputMixin` to validate the field\n * when a new value is set programmatically.\n *\n * @param {string | undefined} newValue\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(newValue, oldValue) {\n super._valueChanged(newValue, oldValue);\n\n if (oldValue === undefined) {\n return;\n }\n\n if (this.invalid) {\n this.validate();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { InputFieldMixin } from '@vaadin/field-base/src/input-field-mixin.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\n\n/**\n * A mixin providing common text field functionality.\n *\n * @polymerMixin\n * @mixes InputFieldMixin\n */\nexport const TextFieldMixin = (superClass) =>\n class TextFieldMixinClass extends InputFieldMixin(superClass) {\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n\n /**\n * A regular expression that the value is checked against.\n * The pattern must match the entire value, not just some subset.\n */\n pattern: {\n type: String,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'maxlength', 'minlength', 'pattern'];\n }\n\n static get constraints() {\n return [...super.constraints, 'maxlength', 'minlength', 'pattern'];\n }\n\n constructor() {\n super();\n this._setType('text');\n }\n\n /** @protected */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { TextFieldMixin } from './vaadin-text-field-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, { moduleId: 'vaadin-text-field-styles' });\n\n/**\n * `<vaadin-text-field>` is a web component that allows the user to input and edit text.\n *\n * ```html\n * <vaadin-text-field label=\"First Name\"></vaadin-text-field>\n * ```\n *\n * ### Prefixes and suffixes\n *\n * These are child elements of a `<vaadin-text-field>` that are displayed\n * inline with the input, before or after.\n * In order for an element to be considered as a prefix, it must have the slot\n * attribute set to `prefix` (and similarly for `suffix`).\n *\n * ```html\n * <vaadin-text-field label=\"Email address\">\n * <div slot=\"prefix\">Sent to:</div>\n * <div slot=\"suffix\">@vaadin.com</div>\n * </vaadin-text-field>\n * ```\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ---------------------|----------------\n * `label` | The label element\n * `input-field` | The element that wraps prefix, value and suffix\n * `clear-button` | The clear button\n * `error-message` | The error message element\n * `helper-text` | The helper text element wrapper\n * `required-indicator` | The `required` state indicator element\n *\n * The following state attributes are available for styling:\n *\n * Attribute | Description | Part name\n * --------------------|-------------|------------\n * `disabled` | Set to a disabled text field | :host\n * `has-value` | Set when the element has a value | :host\n * `has-label` | Set when the element has a label | :host\n * `has-helper` | Set when the element has helper text or slot | :host\n * `has-error-message` | Set when the element has an error message | :host\n * `invalid` | Set when the element is invalid | :host\n * `input-prevented` | Temporarily set when invalid input is prevented | :host\n * `focused` | Set when the element is focused | :host\n * `focus-ring` | Set when the element is keyboard focused | :host\n * `readonly` | Set to a readonly text field | :host\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} input - Fired when the value is changed by the user: on every typing keystroke, and the value is cleared using the clear button.\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes TextFieldMixin\n */\nexport class TextField extends TextFieldMixin(ThemableMixin(ElementMixin(PolymerElement))) {\n static get is() {\n return 'vaadin-text-field';\n }\n\n static get template() {\n return html`\n <style>\n [part='input-field'] {\n flex-grow: 0;\n }\n </style>\n\n <div class=\"vaadin-field-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <slot name=\"suffix\" slot=\"suffix\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * Maximum number of characters (in Unicode code points) that the user can enter.\n */\n maxlength: {\n type: Number,\n },\n\n /**\n * Minimum number of characters (in Unicode code points) that the user can enter.\n */\n minlength: {\n type: Number,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(TextField);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles('vaadin-text-field', inputFieldShared, {\n moduleId: 'lumo-text-field-styles',\n});\n"],"names":["emailField","moduleId","emailFieldStyles","EmailField","is","constructor","super","this","_setType","pattern","ready","inputElement","autocapitalize","componentName","EmailFieldClass","mappings","textFieldMappings","inputType","inputName","autocompleteType","includeAttrs","proxyProps","useProxyTargets","superclass","init","baseElement","setAttribute","getAttribute","createExternalInput","slots","wrappedEleName","style","cssVarList","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","customElements","define","host","label","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","selector","fontSize","fontFamily","labelFontSize","property","labelFontWeight","labelTextColor","hostWidth","hostMinWidth","hostDirection","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","textAlign","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","ele","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle","InputController","callback","initializer","node","value","type","id","defaultId","useUniqueId","InputFieldMixin","properties","autocomplete","String","autocorrect","reflectToAttribute","delegateAttrs","__data","__dataValue","_inputElementChanged","console","warn","localName","_setFocused","focused","document","hasFocus","validate","_onInput","event","invalid","_valueChanged","newValue","oldValue","undefined","TextFieldMixin","superClass","maxlength","Number","minlength","constraints","clearElement","$","clearButton","addController","_setInputElement","_setFocusElement","stateTarget","ariaTarget","_labelController","TextField","template","_tooltipController","setPosition","setAriaTarget"],"sourceRoot":""}
|
@@ -1 +1,2 @@
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5710],{
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[5710],{30521:(e,t,r)=>{r.d(t,{T:()=>d,m:()=>u});var n=r(92540),o=r(79365),s=r(9696),i=r(97810),c=r(610),l=r(81365),h=r(39449),a=r(25964);const d=(0,i.xE)("enriched-text");class p extends((0,l.q)({componentName:d,baseSelector:":host > div"})){#e;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div class="content"></div>\n ',(0,a.fz)("\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n ",this),this.#r(),(0,i.Ge)(this,this.#n.bind(this))}static get observedAttributes(){return["readonly","link-target-blank"]}attributeChangedCallback(e,t,r){super.attributeChangedCallback?.(e,t,r),r!==t&&("readonly"===e&&this.onReadOnlyChange("true"===r),"link-target-blank"===e&&this.#r())}customUnderlineRenderer(){this.processor.renderer.rules.em_open=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o)),this.processor.renderer.rules.em_close=(e,t,r,n,o)=>("_"===e[t].markup&&(e[t].tag="u"),this.#t(e,t,r,n,o))}#o(){this.linkTargetBlank?this.processor.renderer.rules.link_open=(e,t,r,n,o)=>(e[t].attrSet("target","_blank"),this.#e(e,t,r,n,o)):this.processor.renderer.rules.link_open=this.#e}#s(){this.processor&&this.processor.disable(c.M)}#i(){this.#s()}#c(){this.#e=this.processor.renderer.rules.link_open||((e,t,r,n,o)=>o.renderToken(e,t,r)),this.#t=this.processor.renderer.rules.em_open||((e,t,r,n,o)=>o.renderToken(e,t,r))}#r(){this.processor=new n.A("commonmark",{html:!0}),this.#c(),this.#i(),this.#o(),this.customUnderlineRenderer()}get linkTargetBlank(){return"true"===this.getAttribute("link-target-blank")}get contentNode(){return this.shadowRoot.querySelector(".content")}#n(){if(!this.processor)return;let e=(0,h.G)(this.innerHTML);!e?.trim()&&this.isConnected?this.setAttribute("empty","true"):this.removeAttribute("empty");try{const t=this.processor.parse(e,{references:void 0});e=this.processor.renderer.render(t,{html:!0,breaks:!0})}catch(e){console.warn("Not parsing invalid markdown token")}this.contentNode.innerHTML=e}onReadOnlyChange(e){e?this.contentNode.setAttribute("inert",e):this.contentNode.removeAttribute("inert")}}const u=(0,s.Zz)((0,o.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDisplay:{selector:()=>":host",property:"display",fallback:"inline-block"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},fontWeight:{},fontWeightBold:[{selector:()=>":host strong",property:"font-weight"},{selector:()=>":host b",property:"font-weight"}],textColor:{property:"color"},textLineHeight:{property:"line-height"},textAlign:{},linkColor:{selector:"a",property:"color"},linkTextDecoration:{selector:"a",property:"text-decoration"},linkHoverTextDecoration:{selector:"a:hover",property:"text-decoration"},minHeight:{},minWidth:{}}}),(0,o.RF)({componentNameOverride:(0,i.xE)("link")}),(0,o.RF)({componentNameOverride:(0,i.xE)("text")}),o.VO,o.tQ)(p)},610:(e,t,r)=>{r.d(t,{M:()=>n});const n=["blockquote","list","image","table","code","hr","backticks","fence","reference","heading","lheading","html_block"]},39449:(e,t,r)=>{r.d(t,{G:()=>n});const n=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value}},63196:(e,t,r)=>{r.r(t),r.d(t,{EnrichedTextClass:()=>n.m,componentName:()=>n.T});var n=r(30521);customElements.define(n.T,n.m)}}]);
|
2
|
+
//# sourceMappingURL=descope-enriched-text-index-js.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"descope-enriched-text-index-js.js","mappings":"2PAWO,MAAMA,GAAgB,QAAiB,iBAE9C,MAAMC,WAAqB,OAAgB,CAAED,gBAAeE,aAAc,iBACxE,GAEA,GAEA,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,2CAIhD,QACE,6iBAkCAH,MAGFA,MAAK,KAEL,QAAgBA,KAAMA,MAAK,EAAeI,KAAKJ,MACjD,CAEA,6BAAWK,GACT,MAAO,CAAC,WAAY,oBACtB,CAEA,wBAAAC,CAAyBC,EAAUC,EAAUC,GAC3CV,MAAMO,2BAA2BC,EAAUC,EAAUC,GAEjDA,IAAaD,IACE,aAAbD,GACFP,KAAKU,iBAA8B,SAAbD,GAGP,sBAAbF,GACFP,MAAK,IAGX,CAGA,uBAAAW,GACEX,KAAKY,UAAUC,SAASC,MAAMC,QAAU,CAACC,EAAQC,EAAKC,EAASC,EAAKC,KACvC,MAAvBJ,EAAOC,GAAKI,SAAgBL,EAAOC,GAAKK,IAAM,KAC3CtB,MAAK,EAAgBgB,EAAQC,EAAKC,EAASC,EAAKC,IAEzDpB,KAAKY,UAAUC,SAASC,MAAMS,SAAW,CAACP,EAAQC,EAAKC,EAASC,EAAKC,KACxC,MAAvBJ,EAAOC,GAAKI,SAAgBL,EAAOC,GAAKK,IAAM,KAC3CtB,MAAK,EAAgBgB,EAAQC,EAAKC,EAASC,EAAKC,GAE3D,CAEA,KACMpB,KAAKwB,gBACPxB,KAAKY,UAAUC,SAASC,MAAMW,UAAY,CAACT,EAAQC,EAAKC,EAASC,EAAKC,KAEpEJ,EAAOC,GAAKS,Q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B,CACfC,SAAU,CACRC,UAAW,CAAEC,SAAU,IAAM,QAASC,SAAU,SAChDC,YAAa,CAAEF,SAAU,IAAM,QAASC,SAAU,UAAWE,SAAU,gBACvEC,cAAe,CAAEJ,SAAU,IAAM,QAASC,SAAU,aACpDI,SAAU,CAAC,EACXC,WAAY,CAAC,EACbC,WAAY,CAAC,EACbC,eAAgB,CACd,CAAER,SAAU,IAAM,eAAgBC,SAAU,eAC5C,CAAED,SAAU,IAAM,UAAWC,SAAU,gBAEzCQ,UAAW,CAAER,SAAU,SACvBS,eAAgB,CAAET,SAAU,eAC5BU,UAAW,CAAC,EACZC,UAAW,CAAEZ,SAAU,IAAKC,SAAU,SACtCY,mBAAoB,CAAEb,SAAU,IAAKC,SAAU,mBAC/Ca,wBAAyB,CAAEd,SAAU,UAAWC,SAAU,mBAC1Dc,UAAW,CAAC,EACZC,SAAU,CAAC,MAGf,QAAiB,CAAEC,uBAAuB,QAAiB,WAC3D,QAAiB,CAAEA,uBAAuB,QAAiB,UAC3D,KACA,KA1B+B,CA2B/BxE,E,iCChNK,MAAMyE,EAAe,CAC1B,aACA,OACA,QACA,QACA,OACA,KACA,YACA,QACA,YACA,UACA,WACA,a,mCCZK,MAAMC,EAAcxC,IACzB,MAAMyC,EAAWC,SAASC,cAAc,YAExC,OADAF,EAASpE,UAAY2B,EACdyC,EAASG,KAAK,C,iGCDvBC,eAAeC,OAAO,IAAe,I","sources":["webpack://@descope/web-components-ui/./src/components/descope-enriched-text/EnrichedTextClass.js","webpack://@descope/web-components-ui/./src/components/descope-enriched-text/consts.js","webpack://@descope/web-components-ui/./src/components/descope-enriched-text/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-enriched-text/index.js"],"sourcesContent":["/* eslint-disable no-param-reassign */\n\nimport MarkdownIt from 'markdown-it';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { compose } from '../../helpers';\nimport { getComponentName, observeChildren } from '../../helpers/componentHelpers';\nimport { disableRules } from './consts';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { decodeHTML } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('enriched-text');\n\nclass EnrichedText extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n #origLinkRenderer;\n\n #origEmRenderer;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"content\"></div>\n `;\n\n injectStyle(\n `\n :host {\n line-height: 1em;\n word-break: break-word;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n *, *:last-child {\n margin: 0;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n p {\n margin-bottom: 1em;\n }\n a {\n cursor: pointer;\n }\n blockquote {\n padding: 0 2em;\n }\n u {\n text-decoration: underline\n }\n s {\n color: currentColor;\n }\n `,\n this\n );\n\n this.#initProcessor();\n\n observeChildren(this, this.#parseChildren.bind(this));\n }\n\n static get observedAttributes() {\n return ['readonly', 'link-target-blank'];\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (newValue !== oldValue) {\n if (attrName === 'readonly') {\n this.onReadOnlyChange(newValue === 'true');\n }\n\n if (attrName === 'link-target-blank') {\n this.#initProcessor();\n }\n }\n }\n\n // We're overriding the rule for em with single underscore to perform as underline. (_underline_)\n customUnderlineRenderer() {\n this.processor.renderer.rules.em_open = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n this.processor.renderer.rules.em_close = (tokens, idx, options, env, self) => {\n if (tokens[idx].markup === '_') tokens[idx].tag = 'u';\n return this.#origEmRenderer(tokens, idx, options, env, self);\n };\n }\n\n #customizeLinkRenderer() {\n if (this.linkTargetBlank) {\n this.processor.renderer.rules.link_open = (tokens, idx, options, env, self) => {\n // Add a new `target` attribute, or replace the value of the existing one.\n tokens[idx].attrSet('target', '_blank');\n // Pass the token to the default renderer.\n return this.#origLinkRenderer(tokens, idx, options, env, self);\n };\n } else {\n this.processor.renderer.rules.link_open = this.#origLinkRenderer;\n }\n }\n\n #disableCustomRules() {\n if (!this.processor) {\n return;\n }\n this.processor.disable(disableRules);\n }\n\n #updateProcessorRules() {\n this.#disableCustomRules();\n }\n\n #storeOrigRenderers() {\n const defaultLinkRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origLinkRenderer = this.processor.renderer.rules.link_open || defaultLinkRenderer;\n\n const defaultStrongRenderer = (tokens, idx, options, _, self) =>\n self.renderToken(tokens, idx, options);\n this.#origEmRenderer = this.processor.renderer.rules.em_open || defaultStrongRenderer;\n }\n\n #initProcessor() {\n this.processor = new MarkdownIt('commonmark', { html: true });\n this.#storeOrigRenderers();\n this.#updateProcessorRules();\n this.#customizeLinkRenderer();\n this.customUnderlineRenderer();\n }\n\n get linkTargetBlank() {\n return this.getAttribute('link-target-blank') === 'true';\n }\n\n get contentNode() {\n return this.shadowRoot.querySelector('.content');\n }\n\n #parseChildren() {\n if (!this.processor) {\n return;\n }\n\n let html = decodeHTML(this.innerHTML);\n\n if (!html?.trim() && this.isConnected) {\n this.setAttribute('empty', 'true');\n } else {\n this.removeAttribute('empty');\n }\n\n try {\n const tokens = this.processor.parse(html, { references: undefined });\n html = this.processor.renderer.render(tokens, { html: true, breaks: true });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Not parsing invalid markdown token');\n }\n\n this.contentNode.innerHTML = html;\n }\n\n onReadOnlyChange(isReadOnly) {\n if (isReadOnly) {\n this.contentNode.setAttribute('inert', isReadOnly);\n } else {\n this.contentNode.removeAttribute('inert');\n }\n }\n}\n\nexport const EnrichedTextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n fontFamily: {},\n fontWeight: {},\n fontWeightBold: [\n { selector: () => ':host strong', property: 'font-weight' },\n { selector: () => ':host b', property: 'font-weight' },\n ],\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textAlign: {},\n linkColor: { selector: 'a', property: 'color' },\n linkTextDecoration: { selector: 'a', property: 'text-decoration' },\n linkHoverTextDecoration: { selector: 'a:hover', property: 'text-decoration' },\n minHeight: {},\n minWidth: {},\n },\n }),\n createStyleMixin({ componentNameOverride: getComponentName('link') }),\n createStyleMixin({ componentNameOverride: getComponentName('text') }),\n draggableMixin,\n componentNameValidationMixin\n)(EnrichedText);\n","export const disableRules = [\n 'blockquote',\n 'list',\n 'image',\n 'table',\n 'code',\n 'hr',\n 'backticks',\n 'fence',\n 'reference',\n 'heading',\n 'lheading',\n 'html_block',\n];\n","export const decodeHTML = (html) => {\n const textArea = document.createElement('textarea');\n textArea.innerHTML = html;\n return textArea.value;\n};\n","import { componentName, EnrichedTextClass } from './EnrichedTextClass';\n\ncustomElements.define(componentName, EnrichedTextClass);\n\nexport { EnrichedTextClass, componentName };\n"],"names":["componentName","EnrichedText","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","bind","observedAttributes","attributeChangedCallback","attrName","oldValue","newValue","onReadOnlyChange","customUnderlineRenderer","processor","renderer","rules","em_open","tokens","idx","options","env","self","markup","tag","em_close","linkTargetBlank","link_open","attrSet","disable","_","renderToken","html","getAttribute","contentNode","shadowRoot","querySelector","trim","isConnected","setAttribute","removeAttribute","parse","references","undefined","render","breaks","e","console","warn","isReadOnly","EnrichedTextClass","mappings","hostWidth","selector","property","hostDisplay","fallback","hostDirection","fontSize","fontFamily","fontWeight","fontWeightBold","textColor","textLineHeight","textAlign","linkColor","linkTextDecoration","linkHoverTextDecoration","minHeight","minWidth","componentNameOverride","disableRules","decodeHTML","textArea","document","createElement","value","customElements","define"],"sourceRoot":""}
|