@descope/web-components-ui 2.3.2 → 3.0.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 +16884 -16946
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5291 -5373
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/5414.js +1 -1
- package/dist/umd/5414.js.LICENSE.txt +1 -1
- package/dist/umd/5414.js.map +1 -1
- package/dist/umd/9365.js +1 -1
- package/dist/umd/9365.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/DescopeDev.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js.map +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
- package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -1
- package/dist/umd/descope-alert-index-js.js +1 -1
- package/dist/umd/descope-alert-index-js.js.map +1 -1
- package/dist/umd/descope-code-snippet-index-js.js +1 -1
- package/dist/umd/descope-code-snippet-index-js.js.map +1 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/dist/umd/descope-container-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
- package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -1
- package/dist/umd/descope-date-field-index-js.js +1 -1
- package/dist/umd/descope-date-field-index-js.js.map +1 -1
- package/dist/umd/descope-divider-index-js.js +1 -1
- package/dist/umd/descope-divider-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js.map +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js +1 -1
- package/dist/umd/descope-hybrid-field-index-js.js.map +1 -1
- package/dist/umd/descope-loader-linear-index-js.js +1 -1
- package/dist/umd/descope-loader-linear-index-js.js.map +1 -1
- package/dist/umd/descope-loader-radial-index-js.js +1 -1
- package/dist/umd/descope-loader-radial-index-js.js.map +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js.map +1 -1
- package/dist/umd/descope-notification-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
- package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js.map +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js.map +1 -1
- package/dist/umd/descope-policy-validation-index-js.js +1 -1
- package/dist/umd/descope-policy-validation-index-js.js.map +1 -1
- package/dist/umd/descope-radio-group-index-js.js.map +1 -1
- package/dist/umd/descope-recaptcha-index-js.js +1 -1
- package/dist/umd/descope-recaptcha-index-js.js.map +1 -1
- package/dist/umd/descope-scopes-list-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
- package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js +1 -1
- package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
- package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -1
- package/dist/umd/descope-upload-file-index-js.js +1 -1
- package/dist/umd/descope-upload-file-index-js.js.map +1 -1
- package/dist/umd/descope-user-attribute-index-js.js +1 -1
- package/dist/umd/descope-user-attribute-index-js.js.map +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js +1 -1
- package/dist/umd/descope-user-auth-method-index-js.js.map +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
- package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -1
- package/package.json +32 -32
- package/src/baseClasses/createBaseClass.js +1 -1
- package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +0 -2
- package/src/components/button-selection-group-fields/createBaseButtonSelectionGroupInternalClass.js +1 -3
- package/src/components/button-selection-group-fields/descope-button-multi-selection-group-internal/ButtonMultiSelectionGroupInternalClass.js +0 -1
- package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +2 -2
- package/src/components/descope-alert/AlertClass.js +2 -2
- package/src/components/descope-code-snippet/CodeSnippetClass.js +1 -1
- package/src/components/descope-code-snippet/helpers.js +1 -3
- package/src/components/descope-container/ContainerClass.js +1 -1
- package/src/components/descope-date-field/DateCounterClass.js +1 -1
- package/src/components/descope-date-field/DateFieldClass.js +4 -5
- package/src/components/descope-date-field/descope-calendar/CalendarClass.js +2 -2
- package/src/components/descope-date-field/descope-calendar/helpers.js +1 -3
- package/src/components/descope-divider/DividerClass.js +2 -2
- package/src/components/descope-grid/GridClass.js +15 -19
- package/src/components/descope-grid/descope-grid-custom-column/GridCustomColumnClass.js +0 -1
- package/src/components/descope-grid/descope-grid-custom-column/index.js +0 -1
- package/src/components/descope-grid/descope-grid-item-details-column/GridItemDetailsColumnClass.js +0 -2
- package/src/components/descope-grid/descope-grid-selection-column/GridSelectionColumnClass.js +0 -3
- package/src/components/descope-grid/descope-grid-text-column/GridTextColumnClass.js +0 -1
- package/src/components/descope-grid/helpers.js +1 -3
- package/src/components/descope-hybrid-field/HybridFieldClass.js +1 -1
- package/src/components/descope-loader-linear/LoaderLinearClass.js +1 -1
- package/src/components/descope-loader-radial/LoaderRadialClass.js +1 -1
- package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +3 -9
- package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +3 -6
- package/src/components/descope-notification/NotificationClass.js +0 -2
- package/src/components/descope-passcode/PasscodeClass.js +1 -1
- package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +1 -3
- package/src/components/descope-passcode/descope-passcode-internal/helpers.js +1 -3
- package/src/components/descope-policy-validation/PolicyValidationClass.js +1 -2
- package/src/components/descope-radio-group/RadioGroupClass.js +3 -8
- package/src/components/descope-recaptcha/RecaptchaClass.js +1 -1
- package/src/components/descope-scopes-list/ScopesListClass.js +0 -3
- package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +5 -8
- package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +3 -4
- package/src/components/descope-third-party-app-logo/ThirdPartyAppLogoClass.js +1 -1
- package/src/components/descope-upload-file/UploadFileClass.js +2 -2
- package/src/components/descope-upload-file/helpers.js +3 -6
- package/src/components/descope-user-attribute/UserAttributeClass.js +4 -4
- package/src/components/descope-user-auth-method/UserAuthMethodClass.js +5 -5
- package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +1 -1
- package/src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/MappingsFieldInternal.js +0 -1
- package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -1
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js +1 -1
- package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js +1 -1
- package/src/components/phone-fields/helpers.js +2 -3
- package/src/helpers/componentHelpers.js +0 -1
- package/src/helpers/themeHelpers/colorsHelpers.js +2 -3
- package/src/helpers/themeHelpers/index.js +4 -6
- package/src/helpers/themeHelpers/resetHelpers.js +1 -3
- package/src/index.umd.js +0 -1
- package/src/mixins/createDynamicDataMixin.js +0 -1
- package/src/mixins/createStyleMixin/helpers.js +1 -1
- package/src/mixins/createStyleMixin/index.js +1 -2
- package/src/mixins/externalInputHelpers.js +0 -2
- package/src/mixins/externalInputMixin.js +1 -1
- package/src/mixins/inputValidationMixin.js +0 -4
- package/src/mixins/normalizeBooleanAttributesMixin.js +1 -3
- package/src/mixins/portalMixin.js +0 -1
- package/src/mixins/proxyInputMixin.js +0 -1
- package/src/theme/components/alert.js +1 -1
- package/src/theme/components/index.js +22 -22
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
direction: rtl;
|
|
17
17
|
text-align: left;
|
|
18
18
|
}
|
|
19
|
-
`;(0,r.SF)("vaadin-email-field",l,{moduleId:"vaadin-email-field-styles"});class p 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,s.X)(p);var u=i(79365),d=i(6424),h=i(9696),c=i(97810),m=i(73551);const g=(0,c.xE)("email-field"),f=(0,h.Zz)((0,u.RF)({mappings:d.A}),u.VO,(0,u.RV)({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(0,u.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),u.tQ,e=>class extends e{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}})((0,u.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,m.$J)("vaadin-email-field")}\n\t\t\t${(0,m.cy)(f.cssVarList)}\n\t\t\t${(0,m.LJ)("vaadin-email-field",f.cssVarList)}\n ${(0,m.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","style"],componentName:g}));customElements.define(g,f)},44966(e,t,i){i.r(t),i.d(t,{HybridFieldClass:()=>f,componentName:()=>d}),i(54316),i(98136),i(30057);var n=i(79365),r=i(81365),o=i(9696),s=i(97810);const a=/[^\d\s+\-()]/;var l=i(81808),p=i(16306),u=i(25964);const d=(0,s.xE)("hybrid-field"),h={shared:["label","bordered","full-width","label-type","size","disabled","readonly","required","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],email:["placeholder","data-errormessage-value-missing-email","data-errormessage-pattern-mismatch-email","external-input"],phone:{countryCode:["phone-input-label","country-input-label","country-input-placeholder","restrict-countries","default-code","phone-minlength","phone-format-value","phone-strict-validation","data-errormessage-value-missing-phone"],inputBox:["restrict-countries","default-code","phone-minlength","phone-format-value","phone-strict-validation","data-errormessage-value-missing-phone"]}},c={email:{"data-errormessage-value-missing-email":"data-errormessage-value-missing","data-errormessage-pattern-mismatch-email":"data-errormessage-pattern-mismatch"},phone:{"phone-input-label":"label","phone-minlength":"minlength","phone-format-value":"format-value","phone-strict-validation":"strict-validation","data-errormessage-value-missing-phone":"data-errormessage-value-missing"}},m="descope-phone-field",g=(0,r.q)({componentName:d,baseSelector:"div"}),f=(0,o.Zz)((0,n.RF)({componentNameOverride:(0,s.xE)("input-wrapper")}),(0,n.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>"descope-email-field",property:"direction"},{selector:()=>"descope-phone-field",property:"direction"},{selector:()=>"descope-phone-input-box-field",property:"direction"}],errorMessageIcon:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIcon},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIcon}],errorMessageIconSize:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIconSize},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIconSize}],errorMessageIconPadding:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIconPadding},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIconPadding}],errorMessageIconRepeat:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIconRepeat},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIconRepeat}],errorMessageIconPosition:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageIconPosition},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageIconPosition}],errorMessageFontSize:[{selector:()=>l.NF.componentName,property:l.NF.cssVarList.errorMessageFontSize},{selector:()=>p.Ul.componentName,property:p.Ul.cssVarList.errorMessageFontSize}]}}),n.VO,n.tQ)(class extends g{#e=!1;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="wrapper">\n <descope-email-field external-input="${this.isExternalInput}"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input="true"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input="true"></descope-phone-input-box-field>\n </div>\n\t\t`,(0,u.fz)("\n :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n }\n ",this)}get isExternalInput(){return"true"===this.getAttribute("external-input")}get emailInputEle(){return this.isExternalInput?this.emailInput.externalInput:this.emailInput.inputElement}get phoneVariant(){return"inputBox"===this.getAttribute("phone-variant")?this.phoneInputBoxInput:this.phoneCountryCodeInput}get defaultCode(){const e=this.phoneCountryCodeInput.countryCodes?.[0]||"";return this.getAttribute("default-code")||e}get activeInputEle(){return this.activeInput===this.emailInput?this.emailInputEle:this.phoneVariant.phoneNumberInputEle}get value(){return this.activeInput?.value||""}set value(e){this.handleActiveInput(e),setTimeout(()=>{this.activeInput.value=e})}async init(){super.init?.(),this.initInputs(),this.updateAttrs(),this.toggleInputVisibility(),await this.waitForInputs(),this.initInputEles(),this.overrideEmailInputType(),this.overrideEmailSetAttribute()}waitForInputs(){return new Promise(e=>{const t=setInterval(()=>{this.emailInputEle&&(clearInterval(t),e())})})}initInputs(){this.emailInput=this.shadowRoot.querySelector("descope-email-field"),this.phoneCountryCodeInput=this.shadowRoot.querySelector(m),this.phoneInputBoxInput=this.shadowRoot.querySelector("descope-phone-input-box-field"),this.inputs=[this.emailInput,this.phoneCountryCodeInput,this.phoneInputBoxInput],this.activeInput=this.emailInput}initInputEles(){[this.emailInputEle,this.phoneCountryCodeInput.phoneNumberInputEle,this.phoneInputBoxInput.phoneNumberInputEle].forEach(e=>{e.addEventListener("input",this.onValueChange.bind(this))})}overrideEmailInputType(){this.emailInputEle.addEventListener("focus",()=>{this.emailInputEle.setAttribute("type","text")}),this.emailInputEle.addEventListener("blur",()=>{setTimeout(()=>{this.emailInputEle.setAttribute("type","email")})})}overrideEmailSetAttribute(){const e=this.emailInput.setAttribute.bind(this.emailInputEle);this.emailInputEle.setAttribute=(t,i)=>("type"!==t||"email"!==i||!this.emailInput.hasAttribute("focused"))&&e(t,i)}updateAttrs(){(0,s.EA)(this,this.emailInput,{includeAttrs:h.email,mapAttrs:c.email}),(0,s.EA)(this,this.phoneCountryCodeInput,{includeAttrs:h.phone.countryCode,mapAttrs:c.phone}),(0,s.EA)(this,this.phoneInputBoxInput,{includeAttrs:h.phone.inputBox,mapAttrs:c.phone}),this.inputs.forEach(e=>(0,s.EA)(this,e,{includeAttrs:h.shared})),setTimeout(()=>this.phoneCountryCodeInput.setAttribute("default-code",this.defaultCode))}onValueChange(){this.#t=this.activeInputEle.selectionStart,this.handleActiveInput(this.activeInput.value)}handleActiveInput(e){const t=(e=>!!e&&!a.test(e))(e)?this.phoneVariant:this.emailInput;this.activeInput!==t&&this.setActiveInput(t)}setActiveInput(e){const t=this.activeInput.value;this.activeInput=e,this.setActiveInputValue(t),this.#e&&this.activeInput.reportValidity(),this.setActiveInputSelectionStart(),this.toggleInputVisibility()}setActiveInputSelectionStart(){setTimeout(()=>{this.activeInputEle.focus(),this.activeInputEle.setSelectionRange?.(this.#t,this.#t)})}setActiveInputValue(e){const t=(e=>e.replace(/\+\d+-/,""))(e),i=this.activeInput.localName===m?`${this.phoneCountryCodeInput.countryCodeItems}-${t}`:t;this.activeInput.value=i}toggleInputVisibility(){this.inputs.forEach(e=>{e!==this.activeInput?e.classList.add("hidden"):e.classList.remove("hidden")})}reportValidity(){this.#e=!0;const e=this.activeInputEle,t=e.type;return e.setAttribute("type","text"),setTimeout(()=>{e.setSelectionRange?.(e.value.length,e.value.length),e.setAttribute("type",t)}),this.activeInput.reportValidity()}checkValidity(){return this.activeInput.checkValidity()}});customElements.define(d,f)},16306(e,t,i){i.d(t,{TQ:()=>h,Ul:()=>A});var n=i(9035),r=i(97810),o=i(9696),s=i(79365),a=i(79275),l=i(51680),p=i(73551),u=i(25964);const d=a.w.cssVarList,h=(0,r.xE)("phone-input-box-field"),{host:c,label:m,inputElement:g,requiredIndicator:f,inputField:y,internalComponent:v,internalComponentAfter:b,phoneInput:I,errorMessage:x,helperText:C}={host:{selector:()=>":host"},label:{selector:"::part(label)"},placeholder:{selector:"> input:placeholder-shown"},inputElement:{selector:"input"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:()=>"vaadin-text-field::part(input-field)"},internalComponent:{selector:"descope-phone-field-internal-input-box"},internalComponentAfter:{selector:"descope-phone-field-internal-input-box::after"},phoneInput:{selector:()=>"descope-text-field"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},A=(0,o.Zz)((0,s.RF)({mappings:{fontSize:[c,y,{selector:a.w.componentName,property:a.w.cssVarList.fontSize}],fontFamily:[m,x,C],hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:{...c,property:"direction"},inputHorizontalPadding:[{...I,property:"padding-left"},{...I,property:"padding-right"}],labelFontSize:{...m,property:"font-size"},labelFontWeight:{...m,property:"font-weight"},labelTextColor:[{...m,property:"color"},{...m,property:"-webkit-text-fill-color"},{...f,property:"color"}],labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...x,property:"color"},errorMessageIcon:{...x,property:"background-image"},errorMessageIconSize:{...x,property:"background-size"},errorMessageIconPadding:{...x,property:"padding-inline-start"},errorMessageIconRepeat:{...x,property:"background-repeat"},errorMessageIconPosition:{...x,property:"background-position"},errorMessageFontSize:{...x,property:"font-size"},inputValueTextColor:{...I,property:d.inputValueTextColor},inputPlaceholderTextColor:{...I,property:d.inputPlaceholderColor},inputBorderStyle:{...b,property:"border-style"},inputBorderWidth:{...b,property:"border-width"},inputBorderColor:{...b,property:"border-color"},inputBorderRadius:[{...v,property:"border-radius"},{...b,property:"border-radius"}],inputOutlineStyle:{...v,property:"outline-style"},inputOutlineColor:{...v,property:"outline-color"},inputOutlineWidth:{...v,property:"outline-width"},inputOutlineOffset:{...v,property:"outline-offset"},labelPosition:{...m,property:"position"},labelTopPosition:{...m,property:"top"},labelHorizontalPosition:[{...m,property:"left"},{...m,property:"right"}],inputTransformY:{...m,property:"transform"},inputTransition:{...m,property:"transition"},marginInlineStart:{...m,property:"margin-inline-start"},valueInputHeight:{...g,property:"height"},valueInputMarginBottom:{selector:a.w.componentName,property:d.valueInputMarginBottom}}}),s.VO,s.Yg,(0,s.OZ)({proxyProps:["value","selectionStart"]}),e=>class extends e{static get CountryCodes(){return l.A}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${n.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${n.T}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(n.T),(0,u.Gh)(this,this.inputElement,{includeAttrs:["has-value"]}),(0,r.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","minlength","maxlength","default-code","disabled","phone-input-placeholder","label","label-type","allow-alphanumeric-input","restrict-countries","format-value","strict-validation","data-errormessage-type-mismatch"]})}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}})((0,s.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${(0,p.cy)(A.cssVarList)}\n ${(0,p.I4)("vaadin-text-field")}\n ${(0,p.kG)("vaadin-text-field")}\n ${(0,p.X6)()}\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${d.inputOutlineWidth}: 0;\n ${d.inputOutlineOffset}: 0;\n }\n descope-phone-field-internal-input-box::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n pointer-events: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\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\n ${(0,p.$J)("vaadin-text-field")}\n ${(0,p.Kl)()}\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:h}))},9035(e,t,i){i.d(t,{A:()=>c,T:()=>p});var n=i(25964),r=i(3393),o=i(97810),s=i(92259),a=i(10473),l=i(23530);const p=(0,o.xE)("phone-field-internal-input-box"),u=["disabled","size","readonly","phone-input-placeholder","name","maxlength","autocomplete","label-type"],d={"phone-input-placeholder":"placeholder"},h=(0,r.y)({componentName:p,baseSelector:"div"}),c=class extends h{static get observedAttributes(){return[].concat(h.observedAttributes||[],u)}#i;constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1" type="tel" bordered="false"></descope-text-field>\n </div>\n ',this.textField=this.querySelector("descope-text-field")}get phoneNumberInputEle(){return this.textField.shadowRoot.querySelector("input")}get defaultDialCode(){return(0,s.Q)(this.getAttribute("default-code"))}get defaultCode(){return this.getAttribute("default-code")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}get restrictCountries(){return this.getAttribute("restrict-countries")?.split(",").filter(Boolean)||[]}get isFormatValue(){return"true"===this.getAttribute("format-value")}get isStrictValidation(){return"true"===this.getAttribute("strict-validation")}get value(){if(!this.textField.value)return"";if(!this.isStrictValidation)return this.#n();const e=this.#r();return e?.country&&e?.countryCallingCode&&e?.nationalNumber?`+${[e?.countryCallingCode,e?.nationalNumber].join("-")}`:this.textField.value}set value(e){this.textField.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.textField.focus()}),super.init?.(),this.textField.addEventListener("input",this.#o.bind(this)),this.handleFocusEventsDispatching([this.textField]),(0,n.EA)(this.textField,this,{includeAttrs:["has-value"]})}getValidity(){const e=/^\+?\d{1,4}-?(?:\d-?){1,15}$/,t=this.#s(this.textField.value||"");if(this.isRequired&&!this.textField.value)return{valueMissing:!0};if(this.textField.value){if(t.length<this.minLength)return{tooShort:!0};if(this.isStrictValidation&&this.textField.value&&!this.#a()||!this.isStrictValidation&&this.textField.value&&!e.test(this.value))return{patternMismatch:!0}}return{}}setSelectionRange(...e){this.textField.setSelectionRange(...e)}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),t!==i&&u.includes(e)){const t=d[e]||e;this.textField.setAttribute(t,i)}}#o(e){let t=this.#l(e.target.value);this.isFormatValue&&this.#p(t)&&(t=this.#u(t)),e.target.value=t}#n(){if(!this.defaultDialCode)return this.textField.value;const e=this.#d(this.textField.value),t=this.#s(e);return[this.defaultDialCode,t].join("-")}#r(){return this.defaultDialCode?(0,a.l)([this.defaultDialCode,this.#s(this.textField.value)].filter(Boolean).join("")):(0,a.l)(this.textField.value)}#s(e){return e.replace(/\D/g,"")}#d(e){if("+"===this.textField.value?.[0]){const t=new RegExp(`^\\${this.defaultDialCode}`);return e.replace(t,"")}return e}#a(){const e=(0,a.l)(this.value);return!(!e||!e.isValid?.()||!e.country||!this.#h(e.country)||this.defaultCode&&this.defaultCode!==e.country)}#h(e){return!this.restrictCountries.length||this.restrictCountries.includes(e)}#l(e){if(e=e.replace(/^-+/,"").replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+"),!this.allowAlphanumericInput){const t=/^[+\d-\(\)]+$/;e=e.split("").filter(e=>t.test(e)).join("")}return e}#u(e=""){const t=this.defaultCode||this.#c(e);return t?(this.#i&&this.#i.country===t||(this.#i=new l.Q(t)),this.#i.reset(),this.#i.input(e)||e):e}#c(e){const t=(0,a.l)(e);return t?.country||""}#p(e){return!!(0,s.W)(e)}}},78343(e,t,i){i.r(t),i(21374);var n=i(9035);customElements.define(n.T,n.A)},30057(e,t,i){i.r(t),i.d(t,{PhoneFieldInputBoxClass:()=>n.Ul,componentName:()=>n.TQ}),i(78343),i(21374);var n=i(16306);customElements.define(n.TQ,n.Ul)},92259(e,t,i){i.d(t,{Q:()=>r,W:()=>o});var n=i(51680);const r=e=>n.A.find(t=>t.code===e)?.dialCode,o=e=>{const t=e.match(/\(/g),i=e.match(/\)/g);return t?.length===i?.length}}}]);
|
|
19
|
+
`;(0,r.SF)("vaadin-email-field",l,{moduleId:"vaadin-email-field-styles"});class p 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,s.X)(p);var u=i(79365),d=i(6424),h=i(9696),c=i(97810),m=i(73551);const g=(0,c.xE)("email-field"),f=(0,h.Zz)((0,u.RF)({mappings:d.A}),u.VO,(0,u.RV)({inputType:"email",inputName:"email",autocompleteType:"username",includeAttrs:["disabled","readonly","pattern"]}),(0,u.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),u.tQ,e=>class extends e{init(){super.init?.(),this.baseElement.setAttribute("pattern","^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$"),this.getAttribute("autocomplete")||this.setAttribute("autocomplete","username"),this.createExternalInput()}})((0,u.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,m.$J)("vaadin-email-field")}\n\t\t\t${(0,m.cy)(f.cssVarList)}\n\t\t\t${(0,m.LJ)("vaadin-email-field",f.cssVarList)}\n ${(0,m.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","style"],componentName:g}));customElements.define(g,f)},44966(e,t,i){i.r(t),i.d(t,{HybridFieldClass:()=>f,componentName:()=>d}),i(54316),i(98136),i(30057);var n=i(25964),r=i(79365),o=i(81365),s=i(9696),a=i(97810);const l=/[^\d\s+\-()]/;var p=i(81808),u=i(16306);const d=(0,a.xE)("hybrid-field"),h={shared:["label","bordered","full-width","label-type","size","disabled","readonly","required","st-host-direction","st-error-message-icon","st-error-message-icon-size","st-error-message-icon-padding"],email:["placeholder","data-errormessage-value-missing-email","data-errormessage-pattern-mismatch-email","external-input"],phone:{countryCode:["phone-input-label","country-input-label","country-input-placeholder","restrict-countries","default-code","phone-minlength","phone-format-value","phone-strict-validation","data-errormessage-value-missing-phone"],inputBox:["restrict-countries","default-code","phone-minlength","phone-format-value","phone-strict-validation","data-errormessage-value-missing-phone"]}},c={email:{"data-errormessage-value-missing-email":"data-errormessage-value-missing","data-errormessage-pattern-mismatch-email":"data-errormessage-pattern-mismatch"},phone:{"phone-input-label":"label","phone-minlength":"minlength","phone-format-value":"format-value","phone-strict-validation":"strict-validation","data-errormessage-value-missing-phone":"data-errormessage-value-missing"}},m="descope-phone-field",g=(0,o.q)({componentName:d,baseSelector:"div"}),f=(0,s.Zz)((0,r.RF)({componentNameOverride:(0,a.xE)("input-wrapper")}),(0,r.RF)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:[{selector:()=>"descope-email-field",property:"direction"},{selector:()=>"descope-phone-field",property:"direction"},{selector:()=>"descope-phone-input-box-field",property:"direction"}],errorMessageIcon:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIcon},{selector:()=>u.Ul.componentName,property:u.Ul.cssVarList.errorMessageIcon}],errorMessageIconSize:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIconSize},{selector:()=>u.Ul.componentName,property:u.Ul.cssVarList.errorMessageIconSize}],errorMessageIconPadding:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIconPadding},{selector:()=>u.Ul.componentName,property:u.Ul.cssVarList.errorMessageIconPadding}],errorMessageIconRepeat:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIconRepeat},{selector:()=>u.Ul.componentName,property:u.Ul.cssVarList.errorMessageIconRepeat}],errorMessageIconPosition:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageIconPosition},{selector:()=>u.Ul.componentName,property:u.Ul.cssVarList.errorMessageIconPosition}],errorMessageFontSize:[{selector:()=>p.NF.componentName,property:p.NF.cssVarList.errorMessageFontSize},{selector:()=>u.Ul.componentName,property:u.Ul.cssVarList.errorMessageFontSize}]}}),r.VO,r.tQ)(class extends g{#e=!1;#t;constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n <div class="wrapper">\n <descope-email-field external-input="${this.isExternalInput}"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input="true"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input="true"></descope-phone-input-box-field>\n </div>\n\t\t`,(0,n.fz)("\n :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n }\n ",this)}get isExternalInput(){return"true"===this.getAttribute("external-input")}get emailInputEle(){return this.isExternalInput?this.emailInput.externalInput:this.emailInput.inputElement}get phoneVariant(){return"inputBox"===this.getAttribute("phone-variant")?this.phoneInputBoxInput:this.phoneCountryCodeInput}get defaultCode(){const e=this.phoneCountryCodeInput.countryCodes?.[0]||"";return this.getAttribute("default-code")||e}get activeInputEle(){return this.activeInput===this.emailInput?this.emailInputEle:this.phoneVariant.phoneNumberInputEle}get value(){return this.activeInput?.value||""}set value(e){this.handleActiveInput(e),setTimeout(()=>{this.activeInput.value=e})}async init(){super.init?.(),this.initInputs(),this.updateAttrs(),this.toggleInputVisibility(),await this.waitForInputs(),this.initInputEles(),this.overrideEmailInputType(),this.overrideEmailSetAttribute()}waitForInputs(){return new Promise(e=>{const t=setInterval(()=>{this.emailInputEle&&(clearInterval(t),e())})})}initInputs(){this.emailInput=this.shadowRoot.querySelector("descope-email-field"),this.phoneCountryCodeInput=this.shadowRoot.querySelector(m),this.phoneInputBoxInput=this.shadowRoot.querySelector("descope-phone-input-box-field"),this.inputs=[this.emailInput,this.phoneCountryCodeInput,this.phoneInputBoxInput],this.activeInput=this.emailInput}initInputEles(){[this.emailInputEle,this.phoneCountryCodeInput.phoneNumberInputEle,this.phoneInputBoxInput.phoneNumberInputEle].forEach(e=>{e.addEventListener("input",this.onValueChange.bind(this))})}overrideEmailInputType(){this.emailInputEle.addEventListener("focus",()=>{this.emailInputEle.setAttribute("type","text")}),this.emailInputEle.addEventListener("blur",()=>{setTimeout(()=>{this.emailInputEle.setAttribute("type","email")})})}overrideEmailSetAttribute(){const e=this.emailInput.setAttribute.bind(this.emailInputEle);this.emailInputEle.setAttribute=(t,i)=>("type"!==t||"email"!==i||!this.emailInput.hasAttribute("focused"))&&e(t,i)}updateAttrs(){(0,a.EA)(this,this.emailInput,{includeAttrs:h.email,mapAttrs:c.email}),(0,a.EA)(this,this.phoneCountryCodeInput,{includeAttrs:h.phone.countryCode,mapAttrs:c.phone}),(0,a.EA)(this,this.phoneInputBoxInput,{includeAttrs:h.phone.inputBox,mapAttrs:c.phone}),this.inputs.forEach(e=>(0,a.EA)(this,e,{includeAttrs:h.shared})),setTimeout(()=>this.phoneCountryCodeInput.setAttribute("default-code",this.defaultCode))}onValueChange(){this.#t=this.activeInputEle.selectionStart,this.handleActiveInput(this.activeInput.value)}handleActiveInput(e){const t=(e=>!!e&&!l.test(e))(e)?this.phoneVariant:this.emailInput;this.activeInput!==t&&this.setActiveInput(t)}setActiveInput(e){const t=this.activeInput.value;this.activeInput=e,this.setActiveInputValue(t),this.#e&&this.activeInput.reportValidity(),this.setActiveInputSelectionStart(),this.toggleInputVisibility()}setActiveInputSelectionStart(){setTimeout(()=>{this.activeInputEle.focus(),this.activeInputEle.setSelectionRange?.(this.#t,this.#t)})}setActiveInputValue(e){const t=(e=>e.replace(/\+\d+-/,""))(e),i=this.activeInput.localName===m?`${this.phoneCountryCodeInput.countryCodeItems}-${t}`:t;this.activeInput.value=i}toggleInputVisibility(){this.inputs.forEach(e=>{e!==this.activeInput?e.classList.add("hidden"):e.classList.remove("hidden")})}reportValidity(){this.#e=!0;const e=this.activeInputEle,t=e.type;return e.setAttribute("type","text"),setTimeout(()=>{e.setSelectionRange?.(e.value.length,e.value.length),e.setAttribute("type",t)}),this.activeInput.reportValidity()}checkValidity(){return this.activeInput.checkValidity()}});customElements.define(d,f)},16306(e,t,i){i.d(t,{TQ:()=>h,Ul:()=>A});var n=i(25964),r=i(9035),o=i(97810),s=i(9696),a=i(79365),l=i(79275),p=i(51680),u=i(73551);const d=l.w.cssVarList,h=(0,o.xE)("phone-input-box-field"),{host:c,label:m,inputElement:g,requiredIndicator:f,inputField:y,internalComponent:v,internalComponentAfter:b,phoneInput:I,errorMessage:x,helperText:C}={host:{selector:()=>":host"},label:{selector:"::part(label)"},placeholder:{selector:"> input:placeholder-shown"},inputElement:{selector:"input"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:()=>"vaadin-text-field::part(input-field)"},internalComponent:{selector:"descope-phone-field-internal-input-box"},internalComponentAfter:{selector:"descope-phone-field-internal-input-box::after"},phoneInput:{selector:()=>"descope-text-field"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},A=(0,s.Zz)((0,a.RF)({mappings:{fontSize:[c,y,{selector:l.w.componentName,property:l.w.cssVarList.fontSize}],fontFamily:[m,x,C],hostWidth:{...c,property:"width"},hostMinWidth:{...c,property:"min-width"},hostDirection:{...c,property:"direction"},inputHorizontalPadding:[{...I,property:"padding-left"},{...I,property:"padding-right"}],labelFontSize:{...m,property:"font-size"},labelFontWeight:{...m,property:"font-weight"},labelTextColor:[{...m,property:"color"},{...m,property:"-webkit-text-fill-color"},{...f,property:"color"}],labelRequiredIndicator:{...f,property:"content"},errorMessageTextColor:{...x,property:"color"},errorMessageIcon:{...x,property:"background-image"},errorMessageIconSize:{...x,property:"background-size"},errorMessageIconPadding:{...x,property:"padding-inline-start"},errorMessageIconRepeat:{...x,property:"background-repeat"},errorMessageIconPosition:{...x,property:"background-position"},errorMessageFontSize:{...x,property:"font-size"},inputValueTextColor:{...I,property:d.inputValueTextColor},inputPlaceholderTextColor:{...I,property:d.inputPlaceholderColor},inputBorderStyle:{...b,property:"border-style"},inputBorderWidth:{...b,property:"border-width"},inputBorderColor:{...b,property:"border-color"},inputBorderRadius:[{...v,property:"border-radius"},{...b,property:"border-radius"}],inputOutlineStyle:{...v,property:"outline-style"},inputOutlineColor:{...v,property:"outline-color"},inputOutlineWidth:{...v,property:"outline-width"},inputOutlineOffset:{...v,property:"outline-offset"},labelPosition:{...m,property:"position"},labelTopPosition:{...m,property:"top"},labelHorizontalPosition:[{...m,property:"left"},{...m,property:"right"}],inputTransformY:{...m,property:"transform"},inputTransition:{...m,property:"transition"},marginInlineStart:{...m,property:"margin-inline-start"},valueInputHeight:{...g,property:"height"},valueInputMarginBottom:{selector:l.w.componentName,property:d.valueInputMarginBottom}}}),a.VO,a.Yg,(0,a.OZ)({proxyProps:["value","selectionStart"]}),e=>class extends e{static get CountryCodes(){return p.A}init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${r.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${r.T}>\n `,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.T),(0,n.Gh)(this,this.inputElement,{includeAttrs:["has-value"]}),(0,o.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","minlength","maxlength","default-code","disabled","phone-input-placeholder","label","label-type","allow-alphanumeric-input","restrict-countries","format-value","strict-validation","data-errormessage-type-mismatch"]})}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}})((0,a.tz)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${(0,u.cy)(A.cssVarList)}\n ${(0,u.I4)("vaadin-text-field")}\n ${(0,u.kG)("vaadin-text-field")}\n ${(0,u.X6)()}\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${d.inputOutlineWidth}: 0;\n ${d.inputOutlineOffset}: 0;\n }\n descope-phone-field-internal-input-box::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n pointer-events: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\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\n ${(0,u.$J)("vaadin-text-field")}\n ${(0,u.Kl)()}\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:h}))},9035(e,t,i){i.d(t,{A:()=>c,T:()=>p});var n=i(25964),r=i(10473),o=i(23530),s=i(3393),a=i(97810),l=i(92259);const p=(0,a.xE)("phone-field-internal-input-box"),u=["disabled","size","readonly","phone-input-placeholder","name","maxlength","autocomplete","label-type"],d={"phone-input-placeholder":"placeholder"},h=(0,s.y)({componentName:p,baseSelector:"div"}),c=class extends h{static get observedAttributes(){return[].concat(h.observedAttributes||[],u)}#i;constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1" type="tel" bordered="false"></descope-text-field>\n </div>\n ',this.textField=this.querySelector("descope-text-field")}get phoneNumberInputEle(){return this.textField.shadowRoot.querySelector("input")}get defaultDialCode(){return(0,l.Q)(this.getAttribute("default-code"))}get defaultCode(){return this.getAttribute("default-code")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}get restrictCountries(){return this.getAttribute("restrict-countries")?.split(",").filter(Boolean)||[]}get isFormatValue(){return"true"===this.getAttribute("format-value")}get isStrictValidation(){return"true"===this.getAttribute("strict-validation")}get value(){if(!this.textField.value)return"";if(!this.isStrictValidation)return this.#n();const e=this.#r();return e?.country&&e?.countryCallingCode&&e?.nationalNumber?`+${[e?.countryCallingCode,e?.nationalNumber].join("-")}`:this.textField.value}set value(e){this.textField.value=e}init(){this.addEventListener("focus",e=>{e.isTrusted&&this.textField.focus()}),super.init?.(),this.textField.addEventListener("input",this.#o.bind(this)),this.handleFocusEventsDispatching([this.textField]),(0,n.EA)(this.textField,this,{includeAttrs:["has-value"]})}getValidity(){const e=/^\+?\d{1,4}-?(?:\d-?){1,15}$/,t=this.#s(this.textField.value||"");if(this.isRequired&&!this.textField.value)return{valueMissing:!0};if(this.textField.value){if(t.length<this.minLength)return{tooShort:!0};if(this.isStrictValidation&&this.textField.value&&!this.#a()||!this.isStrictValidation&&this.textField.value&&!e.test(this.value))return{patternMismatch:!0}}return{}}setSelectionRange(...e){this.textField.setSelectionRange(...e)}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),t!==i&&u.includes(e)){const t=d[e]||e;this.textField.setAttribute(t,i)}}#o(e){let t=this.#l(e.target.value);this.isFormatValue&&this.#p(t)&&(t=this.#u(t)),e.target.value=t}#n(){if(!this.defaultDialCode)return this.textField.value;const e=this.#d(this.textField.value),t=this.#s(e);return[this.defaultDialCode,t].join("-")}#r(){return this.defaultDialCode?(0,r.l)([this.defaultDialCode,this.#s(this.textField.value)].filter(Boolean).join("")):(0,r.l)(this.textField.value)}#s(e){return e.replace(/\D/g,"")}#d(e){if("+"===this.textField.value?.[0]){const t=new RegExp(`^\\${this.defaultDialCode}`);return e.replace(t,"")}return e}#a(){const e=(0,r.l)(this.value);return!(!e||!e.isValid?.()||!e.country||!this.#h(e.country)||this.defaultCode&&this.defaultCode!==e.country)}#h(e){return!this.restrictCountries.length||this.restrictCountries.includes(e)}#l(e){if(e=e.replace(/^-+/,"").replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+"),!this.allowAlphanumericInput){const t=/^[+\d-\(\)]+$/;e=e.split("").filter(e=>t.test(e)).join("")}return e}#u(e=""){const t=this.defaultCode||this.#c(e);return t?(this.#i&&this.#i.country===t||(this.#i=new o.Q(t)),this.#i.reset(),this.#i.input(e)||e):e}#c(e){const t=(0,r.l)(e);return t?.country||""}#p(e){return!!(0,l.W)(e)}}},78343(e,t,i){i.r(t),i(21374);var n=i(9035);customElements.define(n.T,n.A)},30057(e,t,i){i.r(t),i.d(t,{PhoneFieldInputBoxClass:()=>n.Ul,componentName:()=>n.TQ}),i(78343),i(21374);var n=i(16306);customElements.define(n.TQ,n.Ul)},92259(e,t,i){i.d(t,{Q:()=>r,W:()=>o});var n=i(51680);const r=e=>n.A.find(t=>t.code===e)?.dialCode,o=e=>{const t=e.match(/\(/g),i=e.match(/\)/g);return t?.length===i?.length}}}]);
|
|
20
20
|
//# sourceMappingURL=descope-hybrid-field-index-js.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-hybrid-field-index-js.js","mappings":";mOAQA,MAAMA,EAAa,IAAG;;;;;;;;GAUtB,QAAe,qBAAsB,CAAC,IAAkBA,GAAa,CACnEC,SAAU,qB,0BCXL,MAAMC,E,SAAmB,EAAG;;;;;;;;;GCEnC,QAAe,qBAAsBA,EAAkB,CAAED,SAAU,8BAyB5D,MAAME,UAAmB,IAC9B,aAAWC,GACT,MAAO,oBACT,CAEA,WAAAC,GACEC,QACAC,KAAKC,SAAS,SACdD,KAAKE,QAAU,gEACjB,CAGA,KAAAC,GACEJ,MAAMI,QAEFH,KAAKI,eACPJ,KAAKI,aAAaC,eAAiB,MAEvC,GAGF,OAAoBT,G,yDCtCb,MAAMU,GAAgB,QAAiB,eAqBjCC,GAAkB,SAC7B,QAAiB,CACfC,SAAUC,EAAA,I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umo/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-hybrid-field/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/HybridFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/helpers.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', 'style'],\n componentName,\n })\n);\n","import '@vaadin/email-field';\nimport { componentName, EmailFieldClass } from './EmailFieldClass';\n\ncustomElements.define(componentName, EmailFieldClass);\n\nexport { EmailFieldClass, componentName };\n","// Matches any character that is not a digit, whitespace, or phone formatting character (+, -, (, ))\nconst INVALID_PHONE_CHARS_RE = /[^\\d\\s+\\-()]/;\n\nexport const isNumericValue = (val) => !!val && !INVALID_PHONE_CHARS_RE.test(val);\n\nexport const sanitizeCountryCodePrefix = (val) => val.replace(/\\+\\d+-/, '');\n","import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { isNumericValue, sanitizeCountryCodePrefix as sanitizeValue } from './helpers';\nimport { PhoneFieldClass } from '../phone-fields/descope-phone-field/PhoneFieldClass';\nimport { PhoneFieldInputBoxClass } from '../phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('hybrid-field');\n\nconst attrs = {\n shared: [\n 'label',\n 'bordered',\n 'full-width',\n 'label-type',\n 'size',\n 'disabled',\n 'readonly',\n 'required',\n 'st-host-direction',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n email: [\n 'placeholder',\n 'data-errormessage-value-missing-email',\n 'data-errormessage-pattern-mismatch-email',\n 'external-input',\n ],\n phone: {\n countryCode: [\n 'phone-input-label',\n 'country-input-label',\n 'country-input-placeholder',\n 'restrict-countries',\n 'default-code',\n 'phone-minlength',\n 'phone-format-value',\n 'phone-strict-validation',\n 'data-errormessage-value-missing-phone',\n ],\n inputBox: [\n 'restrict-countries',\n 'default-code',\n 'phone-minlength',\n 'phone-format-value',\n 'phone-strict-validation',\n 'data-errormessage-value-missing-phone',\n ],\n },\n};\n\nconst attrMap = {\n email: {\n 'data-errormessage-value-missing-email': 'data-errormessage-value-missing',\n 'data-errormessage-pattern-mismatch-email': 'data-errormessage-pattern-mismatch',\n },\n phone: {\n 'phone-input-label': 'label',\n 'phone-minlength': 'minlength',\n 'phone-format-value': 'format-value',\n 'phone-strict-validation': 'strict-validation',\n 'data-errormessage-value-missing-phone': 'data-errormessage-value-missing',\n },\n};\n\nconst EMAIL_FIELD = 'descope-email-field';\nconst PHONE_FIELD = 'descope-phone-field';\nconst PHONE_INPUT_BOX_FIELD = 'descope-phone-input-box-field';\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: 'div',\n});\n\nclass RawHybridField extends BaseClass {\n #isReportedValidity = false;\n\n #selectionStart;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-email-field external-input=\"${this.isExternalInput}\"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input=\"true\"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input=\"true\"></descope-phone-input-box-field>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n }\n `,\n this\n );\n }\n\n get isExternalInput() {\n return this.getAttribute('external-input') === 'true';\n }\n\n get emailInputEle() {\n return this.isExternalInput ? this.emailInput.externalInput : this.emailInput.inputElement;\n }\n\n get phoneVariant() {\n const isInputBox = this.getAttribute('phone-variant') === 'inputBox';\n return isInputBox ? this.phoneInputBoxInput : this.phoneCountryCodeInput;\n }\n\n get defaultCode() {\n const firstItem = this.phoneCountryCodeInput.countryCodes?.[0] || '';\n return this.getAttribute('default-code') || firstItem;\n }\n\n get activeInputEle() {\n if (this.activeInput === this.emailInput) {\n return this.emailInputEle;\n }\n return this.phoneVariant.phoneNumberInputEle;\n }\n\n get value() {\n return this.activeInput?.value || '';\n }\n\n set value(val) {\n this.handleActiveInput(val);\n setTimeout(() => {\n this.activeInput.value = val;\n });\n }\n\n async init() {\n super.init?.();\n\n this.initInputs();\n this.updateAttrs();\n this.toggleInputVisibility();\n\n await this.waitForInputs();\n\n this.initInputEles();\n this.overrideEmailInputType();\n this.overrideEmailSetAttribute();\n }\n\n waitForInputs() {\n return new Promise((resolve) => {\n const check = setInterval(() => {\n if (this.emailInputEle) {\n clearInterval(check);\n resolve();\n }\n });\n });\n }\n\n initInputs() {\n this.emailInput = this.shadowRoot.querySelector(EMAIL_FIELD);\n this.phoneCountryCodeInput = this.shadowRoot.querySelector(PHONE_FIELD);\n this.phoneInputBoxInput = this.shadowRoot.querySelector(PHONE_INPUT_BOX_FIELD);\n\n this.inputs = [this.emailInput, this.phoneCountryCodeInput, this.phoneInputBoxInput];\n\n this.activeInput = this.emailInput;\n }\n\n // we need to listen on the inner `input` element itself, otherwise we don't always get an `input` event\n initInputEles() {\n const inputEles = [\n this.emailInputEle,\n this.phoneCountryCodeInput.phoneNumberInputEle,\n this.phoneInputBoxInput.phoneNumberInputEle,\n ];\n\n inputEles.forEach((ele) => {\n ele.addEventListener('input', this.onValueChange.bind(this));\n });\n }\n\n overrideEmailInputType() {\n this.emailInputEle.addEventListener('focus', () => {\n this.emailInputEle.setAttribute('type', 'text');\n });\n this.emailInputEle.addEventListener('blur', () => {\n setTimeout(() => {\n this.emailInputEle.setAttribute('type', 'email');\n });\n });\n }\n\n // We want to prevent Vaadin from changing the input type to `email`\n // otherwise, we cannot get the selectionStart from the input.\n overrideEmailSetAttribute() {\n const origEmailSetAttr = this.emailInput.setAttribute.bind(this.emailInputEle);\n this.emailInputEle.setAttribute = (name, value) => {\n if (name !== 'type' || value !== 'email' || !this.emailInput.hasAttribute('focused')) {\n return origEmailSetAttr(name, value);\n }\n return false;\n };\n }\n\n updateAttrs() {\n forwardAttrs(this, this.emailInput, { includeAttrs: attrs.email, mapAttrs: attrMap.email });\n\n forwardAttrs(this, this.phoneCountryCodeInput, {\n includeAttrs: attrs.phone.countryCode,\n mapAttrs: attrMap.phone,\n });\n\n forwardAttrs(this, this.phoneInputBoxInput, {\n includeAttrs: attrs.phone.inputBox,\n mapAttrs: attrMap.phone,\n });\n\n this.inputs.forEach((input) => forwardAttrs(this, input, { includeAttrs: attrs.shared }));\n\n setTimeout(() => this.phoneCountryCodeInput.setAttribute('default-code', this.defaultCode));\n }\n\n onValueChange() {\n this.#selectionStart = this.activeInputEle.selectionStart;\n this.handleActiveInput(this.activeInput.value);\n }\n\n handleActiveInput(val) {\n const expectedActiveInput = isNumericValue(val) ? this.phoneVariant : this.emailInput;\n\n if (this.activeInput !== expectedActiveInput) {\n this.setActiveInput(expectedActiveInput);\n }\n }\n\n setActiveInput(expectedActiveInput) {\n const val = this.activeInput.value;\n this.activeInput = expectedActiveInput;\n this.setActiveInputValue(val);\n if (this.#isReportedValidity) this.activeInput.reportValidity();\n this.setActiveInputSelectionStart();\n this.toggleInputVisibility();\n }\n\n setActiveInputSelectionStart() {\n setTimeout(() => {\n this.activeInputEle.focus();\n this.activeInputEle.setSelectionRange?.(this.#selectionStart, this.#selectionStart);\n });\n }\n\n setActiveInputValue(val) {\n const sanitizedVal = sanitizeValue(val);\n const isPhoneField = this.activeInput.localName === PHONE_FIELD;\n const value = isPhoneField\n ? `${this.phoneCountryCodeInput.countryCodeItems}-${sanitizedVal}`\n : sanitizedVal;\n this.activeInput.value = value;\n }\n\n toggleInputVisibility() {\n this.inputs.forEach((input) => {\n input !== this.activeInput ? input.classList.add('hidden') : input.classList.remove('hidden');\n });\n }\n\n reportValidity() {\n this.#isReportedValidity = true;\n\n const ele = this.activeInputEle;\n\n // On reportValidity we want to set the caret at the end of the input value.\n // Since checkValidity triggers `focus` on the input, it sets the caret at the start of the input,\n // regardless the existing value.\n const origInputType = ele.type;\n ele.setAttribute('type', 'text');\n setTimeout(() => {\n ele.setSelectionRange?.(ele.value.length, ele.value.length);\n ele.setAttribute('type', origInputType);\n });\n\n return this.activeInput.reportValidity();\n }\n\n checkValidity() {\n return this.activeInput.checkValidity();\n }\n}\n\nexport const HybridFieldClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: [\n { selector: () => 'descope-email-field', property: 'direction' },\n { selector: () => 'descope-phone-field', property: 'direction' },\n { selector: () => 'descope-phone-input-box-field', property: 'direction' },\n ],\n errorMessageIcon: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIcon,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIcon,\n },\n ],\n errorMessageIconSize: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconSize,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconSize,\n },\n ],\n errorMessageIconPadding: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconPadding,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPadding,\n },\n ],\n errorMessageIconRepeat: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconRepeat,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconRepeat,\n },\n ],\n errorMessageIconPosition: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconPosition,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPosition,\n },\n ],\n errorMessageFontSize: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageFontSize,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageFontSize,\n },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawHybridField);\n","import '../descope-email-field';\nimport '../phone-fields/descope-phone-field';\nimport '../phone-fields/descope-phone-input-box-field';\n\nimport { componentName, HybridFieldClass } from './HybridFieldClass';\n\ncustomElements.define(componentName, HybridFieldClass);\n\nexport { HybridFieldClass, componentName };\n","import { componentName as descopeInternalComponentName } from './descope-phone-input-box-internal/PhoneFieldInternalInputBox';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createProxy,\n createStyleMixin,\n draggableMixin,\n inputOverrideValidConstraintsMixin,\n proxyInputMixin,\n} from '../../../mixins';\nimport { TextFieldClass } from '../../descope-text-field/TextFieldClass';\nimport CountryCodes from '../CountryCodes';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n resetInputFieldDefaultWidth,\n resetInputFieldInvalidBackgroundColor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../../helpers/themeHelpers/resetHelpers';\nimport { syncAttrs } from '@descope-ui/common/components-helpers';\n\nconst textVars = TextFieldClass.cssVarList;\n\nexport const componentName = getComponentName('phone-input-box-field');\n\nconst customMixin = (superclass) =>\n class PhoneFieldInputBoxMixinClass extends superclass {\n static get CountryCodes() {\n return CountryCodes;\n }\n\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n syncAttrs(this, this.inputElement, { includeAttrs: ['has-value'] });\n\n forwardAttrs(this.shadowRoot.host, this.inputElement, {\n includeAttrs: [\n 'size',\n 'minlength',\n 'maxlength',\n 'default-code',\n 'disabled',\n 'phone-input-placeholder',\n 'label',\n 'label-type',\n 'allow-alphanumeric-input',\n 'restrict-countries',\n 'format-value',\n 'strict-validation',\n 'data-errormessage-type-mismatch',\n ],\n });\n }\n\n get phoneNumberInputEle() {\n return this.inputElement?.phoneNumberInputEle;\n }\n };\n\nconst {\n host,\n label,\n inputElement,\n requiredIndicator,\n inputField,\n internalComponent,\n internalComponentAfter,\n phoneInput,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n placeholder: { selector: '> input:placeholder-shown' },\n inputElement: { selector: 'input' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n inputField: { selector: () => 'vaadin-text-field::part(input-field)' },\n internalComponent: {\n selector: 'descope-phone-field-internal-input-box',\n },\n internalComponentAfter: {\n selector: 'descope-phone-field-internal-input-box::after',\n },\n phoneInput: { selector: () => 'descope-text-field' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PhoneFieldInputBoxClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n inputField,\n {\n selector: TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n\n inputHorizontalPadding: [\n { ...phoneInput, property: 'padding-left' },\n { ...phoneInput, property: 'padding-right' },\n ],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n inputValueTextColor: { ...phoneInput, property: textVars.inputValueTextColor },\n\n inputPlaceholderTextColor: { ...phoneInput, property: textVars.inputPlaceholderColor },\n\n inputBorderStyle: { ...internalComponentAfter, property: 'border-style' },\n inputBorderWidth: { ...internalComponentAfter, property: 'border-width' },\n inputBorderColor: { ...internalComponentAfter, property: 'border-color' },\n inputBorderRadius: [\n { ...internalComponent, property: 'border-radius' },\n { ...internalComponentAfter, property: 'border-radius' },\n ],\n\n inputOutlineStyle: { ...internalComponent, property: 'outline-style' },\n inputOutlineColor: { ...internalComponent, property: 'outline-color' },\n inputOutlineWidth: { ...internalComponent, property: 'outline-width' },\n inputOutlineOffset: { ...internalComponent, property: 'outline-offset' },\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 valueInputHeight: { ...inputElement, property: 'height' },\n valueInputMarginBottom: {\n selector: TextFieldClass.componentName,\n property: textVars.valueInputMarginBottom,\n },\n },\n }),\n draggableMixin,\n inputOverrideValidConstraintsMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${useHostExternalPadding(PhoneFieldInputBoxClass.cssVarList)}\n ${resetInputCursor('vaadin-text-field')}\n ${resetInputFieldInvalidBackgroundColor('vaadin-text-field')}\n ${resetInputFieldDefaultWidth()}\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${textVars.inputOutlineWidth}: 0;\n ${textVars.inputOutlineOffset}: 0;\n }\n descope-phone-field-internal-input-box::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n pointer-events: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\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\n ${resetInputLabelPosition('vaadin-text-field')}\n ${inputFloatingLabelStyle()}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n\nexport default PhoneFieldInputBoxClass;\n","import { forwardAttrs } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { getComponentName } from '../../../../helpers/componentHelpers';\nimport { getCountryByCodeId, matchingParenthesis } from '../../helpers';\nimport parsePhoneNumberFromString, { AsYouType } from 'libphonenumber-js/min';\n\nexport const componentName = getComponentName('phone-field-internal-input-box');\n\nconst observedAttributes = [\n 'disabled',\n 'size',\n 'readonly',\n 'phone-input-placeholder',\n 'name',\n 'maxlength',\n 'autocomplete',\n 'label-type',\n];\nconst mapAttrs = {\n 'phone-input-placeholder': 'placeholder',\n};\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass PhoneFieldInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], observedAttributes);\n }\n\n #ayt;\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div>\n <descope-text-field tabindex=\"1\" type=\"tel\" bordered=\"false\"></descope-text-field>\n </div>\n `;\n\n this.textField = this.querySelector('descope-text-field');\n }\n\n // notice: this function is exposed in parent component\n get phoneNumberInputEle() {\n return this.textField.shadowRoot.querySelector('input');\n }\n\n get defaultDialCode() {\n return getCountryByCodeId(this.getAttribute('default-code'));\n }\n\n get defaultCode() {\n return this.getAttribute('default-code');\n }\n\n get allowAlphanumericInput() {\n return this.getAttribute('allow-alphanumeric-input') === 'true';\n }\n\n get minLength() {\n return parseInt(this.getAttribute('minlength'), 10) || 0;\n }\n\n get maxLength() {\n return parseInt(this.getAttribute('maxlength'), 10) || 50;\n }\n\n get restrictCountries() {\n return this.getAttribute('restrict-countries')?.split(',').filter(Boolean) || [];\n }\n\n get isFormatValue() {\n return this.getAttribute('format-value') === 'true';\n }\n\n get isStrictValidation() {\n return this.getAttribute('strict-validation') === 'true';\n }\n\n get value() {\n if (!this.textField.value) return '';\n\n if (!this.isStrictValidation) {\n return this.#nonParsedValue();\n }\n\n const parsedVal = this.#parseWithCountryCode();\n\n if (parsedVal?.country && parsedVal?.countryCallingCode && parsedVal?.nationalNumber) {\n return `+${[parsedVal?.countryCallingCode, parsedVal?.nationalNumber].join('-')}`;\n }\n\n // if failed to parse or to find country code return text field value\n return this.textField.value;\n }\n\n set value(val) {\n this.textField.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // We want to ignore focus events we are dispatching\n if (e.isTrusted) this.textField.focus();\n });\n\n super.init?.();\n\n this.textField.addEventListener('input', this.#onInput.bind(this));\n this.handleFocusEventsDispatching([this.textField]);\n\n forwardAttrs(this.textField, this, { includeAttrs: ['has-value'] });\n }\n\n getValidity() {\n const validPhonePattern = /^\\+?\\d{1,4}-?(?:\\d-?){1,15}$/;\n const stripValue = this.#sanitizeVal(this.textField.value || '');\n\n if (this.isRequired && !this.textField.value) {\n return { valueMissing: true };\n }\n\n if (this.textField.value) {\n if (stripValue.length < this.minLength) {\n return { tooShort: true };\n }\n\n if (\n // has `strict-validation` and not properly parsed\n (this.isStrictValidation && this.textField.value && !this.#isValidParsedValue()) ||\n // if no `strict-validation` then conform with naive pattern\n (!this.isStrictValidation && this.textField.value && !validPhonePattern.test(this.value))\n ) {\n return { patternMismatch: true };\n }\n }\n\n return {};\n }\n\n setSelectionRange(...args) {\n this.textField.setSelectionRange(...args);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n\n if (oldValue !== newValue && observedAttributes.includes(attrName)) {\n const attr = mapAttrs[attrName] || attrName;\n this.textField.setAttribute(attr, newValue);\n }\n }\n\n #onInput(e) {\n let sanitizedInput = this.#sanitizeInput(e.target.value);\n\n if (this.isFormatValue && this.#canFormat(sanitizedInput)) {\n sanitizedInput = this.#formatPhoneNumber(sanitizedInput);\n }\n\n e.target.value = sanitizedInput;\n }\n\n #nonParsedValue() {\n if (!this.defaultDialCode) {\n return this.textField.value;\n }\n\n const nationalNumber = this.#trimDuplicateCountryCode(this.textField.value);\n const sanitizedVal = this.#sanitizeVal(nationalNumber);\n\n return [this.defaultDialCode, sanitizedVal].join('-');\n }\n\n #parseWithCountryCode() {\n if (this.defaultDialCode) {\n return parsePhoneNumberFromString(\n [this.defaultDialCode, this.#sanitizeVal(this.textField.value)].filter(Boolean).join('')\n );\n }\n\n // if default-code or not parsed - try to extract country code from value\n return parsePhoneNumberFromString(this.textField.value);\n }\n\n #sanitizeVal(val) {\n return val.replace(/\\D/g, '');\n }\n\n #trimDuplicateCountryCode(val) {\n if (this.textField.value?.[0] === '+') {\n const dialCodePrefixPattern = new RegExp(`^\\\\${this.defaultDialCode}`);\n const trimmed = val.replace(dialCodePrefixPattern, '');\n return trimmed;\n }\n return val;\n }\n\n #isValidParsedValue() {\n const parsed = parsePhoneNumberFromString(this.value);\n return (\n !!parsed && // parsed successfully (not undefined)\n !!parsed.isValid?.() && // Parsed object is valid\n !!parsed.country && // Parsed object with a country code\n !!this.#isAllowedCountry(parsed.country) && // Parsed with allowed country code\n (this.defaultCode ? this.defaultCode === parsed.country : true) // In case default country code is set validate parsed country matches it\n );\n }\n\n #isAllowedCountry(countryCode) {\n if (!this.restrictCountries.length) {\n return true;\n }\n\n return this.restrictCountries.includes(countryCode);\n }\n\n #sanitizeInput(val) {\n val = val\n .replace(/^-+/, '') // dash as first char\n .replace(/(?!^)\\+/g, '') // multiple plus symbols\n .replace('--', '-') // consecutive dashes\n .replace('+-', '+'); // dash following plus symbol\n\n if (!this.allowAlphanumericInput) {\n const telDigitsRegExp = /^[+\\d-\\(\\)]+$/;\n val = val\n .split('')\n .filter((char) => telDigitsRegExp.test(char))\n .join('');\n }\n\n return val;\n }\n\n #formatPhoneNumber(phoneNumber = '') {\n // Get country code from `default-code or` from phone number\n const countryCode = this.defaultCode || this.#getCountryCodeFromValue(phoneNumber);\n\n // Skip formatting if no country code is available\n if (!countryCode) {\n return phoneNumber;\n }\n\n // Update AsYouType country code if needed\n if (!this.#ayt || this.#ayt.country !== countryCode) {\n this.#ayt = new AsYouType(countryCode);\n }\n\n // We need to reset AsYouType instance before setting new input\n this.#ayt.reset();\n\n // Set AsYouType input\n const formattedVal = this.#ayt.input(phoneNumber) || phoneNumber;\n\n return formattedVal;\n }\n\n #getCountryCodeFromValue(val) {\n const parsed = parsePhoneNumberFromString(val);\n return parsed?.country || '';\n }\n\n #canFormat(val) {\n if (!matchingParenthesis(val)) return false;\n return true;\n }\n}\n\nexport default PhoneFieldInternal;\n","import '../../../descope-text-field';\n\nimport PhoneFieldInternalInputBox, { componentName } from './PhoneFieldInternalInputBox';\n\ncustomElements.define(componentName, PhoneFieldInternalInputBox);\n","import './descope-phone-input-box-internal';\nimport '../../descope-text-field';\n\nimport { componentName, PhoneFieldInputBoxClass } from './PhoneFieldInputBoxClass';\n\ncustomElements.define(componentName, PhoneFieldInputBoxClass);\n\nexport { PhoneFieldInputBoxClass, componentName };\n","import parsePhoneNumberFromString from 'libphonenumber-js/min';\nimport CountryCodes from './CountryCodes';\n\nexport const getCountryByCodeId = (countryCode) => {\n return CountryCodes.find((c) => c.code === countryCode)?.dialCode;\n};\n\nexport const matchingParenthesis = (val) => {\n const openParenMatches = val.match(/\\(/g);\n const closeParenMatches = val.match(/\\)/g);\n return openParenMatches?.length === closeParenMatches?.length;\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","INVALID_PHONE_CHARS_RE","attrs","shared","email","phone","countryCode","inputBox","attrMap","PHONE_FIELD","BaseClass","createBaseClass","baseSelector","HybridFieldClass","componentNameOverride","hostWidth","selector","property","hostDirection","errorMessageIcon","PhoneFieldClass","PhoneFieldInputBoxClass","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","attachShadow","mode","innerHTML","isExternalInput","emailInputEle","emailInput","externalInput","phoneVariant","phoneInputBoxInput","phoneCountryCodeInput","defaultCode","firstItem","countryCodes","activeInputEle","activeInput","phoneNumberInputEle","value","val","handleActiveInput","setTimeout","initInputs","updateAttrs","toggleInputVisibility","waitForInputs","initInputEles","overrideEmailInputType","overrideEmailSetAttribute","Promise","resolve","check","setInterval","clearInterval","shadowRoot","querySelector","inputs","forEach","ele","addEventListener","onValueChange","bind","origEmailSetAttr","name","hasAttribute","mapAttrs","input","selectionStart","expectedActiveInput","test","isNumericValue","setActiveInput","setActiveInputValue","reportValidity","setActiveInputSelectionStart","focus","setSelectionRange","sanitizedVal","replace","localName","countryCodeItems","classList","add","remove","origInputType","type","length","checkValidity","textVars","host","label","requiredIndicator","inputField","internalComponent","internalComponentAfter","phoneInput","errorMessage","helperText","placeholder","fontSize","fontFamily","hostMinWidth","inputHorizontalPadding","labelFontSize","labelFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","inputValueTextColor","inputPlaceholderTextColor","inputPlaceholderColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineStyle","inputOutlineColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","valueInputHeight","valueInputMarginBottom","CountryCodes","template","document","createElement","appendChild","content","cloneNode","observedAttributes","BaseInputClass","concat","textField","defaultDialCode","allowAlphanumericInput","minLength","parseInt","maxLength","restrictCountries","split","filter","Boolean","isFormatValue","isStrictValidation","parsedVal","country","countryCallingCode","nationalNumber","join","e","isTrusted","handleFocusEventsDispatching","getValidity","validPhonePattern","stripValue","isRequired","valueMissing","tooShort","patternMismatch","args","attributeChangedCallback","attrName","oldValue","newValue","includes","attr","sanitizedInput","target","dialCodePrefixPattern","RegExp","parsed","isValid","telDigitsRegExp","char","phoneNumber","reset","getCountryByCodeId","find","c","code","dialCode","matchingParenthesis","openParenMatches","match","closeParenMatches"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file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AK,EAAKqG,MAAM+G,IAAgBA,GAZ5CA,CAeX,CAEA,GAAyB1I,GACvB,MAAMsI,GAAS,OAA2BtI,GAC1C,OAAOsI,GAAQzB,SAAW,EAC5B,CAEA,GAAW7G,GACT,SAAK,OAAoBA,EAE3B,E,6CCvQF7C,eAAeC,OAAO,IAAe,I,wHCCrCD,eAAeC,OAAO,KAAe,K,uDCF9B,MAAMwL,EAAsBlL,GACjC,IAAamL,KAAMC,GAAMA,EAAEC,OAASrL,IAAcsL,SAEvCC,EAAuBjJ,IAClC,MAAMkJ,EAAmBlJ,EAAImJ,MAAM,OAC7BC,EAAoBpJ,EAAImJ,MAAM,OACpC,OAAOD,GAAkBnG,SAAWqG,GAAmBrG,O","sources":["webpack://@descope/web-components-ui/../../../node_modules/@vaadin/email-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-hybrid-field/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/HybridFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-hybrid-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-input-box-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/helpers.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', 'style'],\n componentName,\n })\n);\n","import '@vaadin/email-field';\nimport { componentName, EmailFieldClass } from './EmailFieldClass';\n\ncustomElements.define(componentName, EmailFieldClass);\n\nexport { EmailFieldClass, componentName };\n","// Matches any character that is not a digit, whitespace, or phone formatting character (+, -, (, ))\nconst INVALID_PHONE_CHARS_RE = /[^\\d\\s+\\-()]/;\n\nexport const isNumericValue = (val) => !!val && !INVALID_PHONE_CHARS_RE.test(val);\n\nexport const sanitizeCountryCodePrefix = (val) => val.replace(/\\+\\d+-/, '');\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';\nimport { isNumericValue, sanitizeCountryCodePrefix as sanitizeValue } from './helpers';\nimport { PhoneFieldClass } from '../phone-fields/descope-phone-field/PhoneFieldClass';\nimport { PhoneFieldInputBoxClass } from '../phone-fields/descope-phone-input-box-field/PhoneFieldInputBoxClass';\n\nexport const componentName = getComponentName('hybrid-field');\n\nconst attrs = {\n shared: [\n 'label',\n 'bordered',\n 'full-width',\n 'label-type',\n 'size',\n 'disabled',\n 'readonly',\n 'required',\n 'st-host-direction',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n email: [\n 'placeholder',\n 'data-errormessage-value-missing-email',\n 'data-errormessage-pattern-mismatch-email',\n 'external-input',\n ],\n phone: {\n countryCode: [\n 'phone-input-label',\n 'country-input-label',\n 'country-input-placeholder',\n 'restrict-countries',\n 'default-code',\n 'phone-minlength',\n 'phone-format-value',\n 'phone-strict-validation',\n 'data-errormessage-value-missing-phone',\n ],\n inputBox: [\n 'restrict-countries',\n 'default-code',\n 'phone-minlength',\n 'phone-format-value',\n 'phone-strict-validation',\n 'data-errormessage-value-missing-phone',\n ],\n },\n};\n\nconst attrMap = {\n email: {\n 'data-errormessage-value-missing-email': 'data-errormessage-value-missing',\n 'data-errormessage-pattern-mismatch-email': 'data-errormessage-pattern-mismatch',\n },\n phone: {\n 'phone-input-label': 'label',\n 'phone-minlength': 'minlength',\n 'phone-format-value': 'format-value',\n 'phone-strict-validation': 'strict-validation',\n 'data-errormessage-value-missing-phone': 'data-errormessage-value-missing',\n },\n};\n\nconst EMAIL_FIELD = 'descope-email-field';\nconst PHONE_FIELD = 'descope-phone-field';\nconst PHONE_INPUT_BOX_FIELD = 'descope-phone-input-box-field';\n\nconst BaseClass = createBaseClass({\n componentName,\n baseSelector: 'div',\n});\n\nclass RawHybridField extends BaseClass {\n #isReportedValidity = false;\n\n #selectionStart;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\">\n <descope-email-field external-input=\"${this.isExternalInput}\"></descope-email-field>\n <descope-phone-field allow-alphanumeric-input=\"true\"></descope-phone-field>\n <descope-phone-input-box-field allow-alphanumeric-input=\"true\"></descope-phone-input-box-field>\n </div>\n\t\t`;\n\n injectStyle(\n `\n :host {\n display: inline-flex;\n box-sizing: border-box;\n padding: 0;\n gap: 0;\n }\n .wrapper {\n display: grid;\n width: 100%;\n }\n descope-email-field,\n descope-phone-field,\n descope-phone-input-box-field {\n grid-area: 1/1;\n width: 100%;\n height: 100%;\n }\n .hidden {\n visibility: hidden;\n }\n `,\n this\n );\n }\n\n get isExternalInput() {\n return this.getAttribute('external-input') === 'true';\n }\n\n get emailInputEle() {\n return this.isExternalInput ? this.emailInput.externalInput : this.emailInput.inputElement;\n }\n\n get phoneVariant() {\n const isInputBox = this.getAttribute('phone-variant') === 'inputBox';\n return isInputBox ? this.phoneInputBoxInput : this.phoneCountryCodeInput;\n }\n\n get defaultCode() {\n const firstItem = this.phoneCountryCodeInput.countryCodes?.[0] || '';\n return this.getAttribute('default-code') || firstItem;\n }\n\n get activeInputEle() {\n if (this.activeInput === this.emailInput) {\n return this.emailInputEle;\n }\n return this.phoneVariant.phoneNumberInputEle;\n }\n\n get value() {\n return this.activeInput?.value || '';\n }\n\n set value(val) {\n this.handleActiveInput(val);\n setTimeout(() => {\n this.activeInput.value = val;\n });\n }\n\n async init() {\n super.init?.();\n\n this.initInputs();\n this.updateAttrs();\n this.toggleInputVisibility();\n\n await this.waitForInputs();\n\n this.initInputEles();\n this.overrideEmailInputType();\n this.overrideEmailSetAttribute();\n }\n\n waitForInputs() {\n return new Promise((resolve) => {\n const check = setInterval(() => {\n if (this.emailInputEle) {\n clearInterval(check);\n resolve();\n }\n });\n });\n }\n\n initInputs() {\n this.emailInput = this.shadowRoot.querySelector(EMAIL_FIELD);\n this.phoneCountryCodeInput = this.shadowRoot.querySelector(PHONE_FIELD);\n this.phoneInputBoxInput = this.shadowRoot.querySelector(PHONE_INPUT_BOX_FIELD);\n\n this.inputs = [this.emailInput, this.phoneCountryCodeInput, this.phoneInputBoxInput];\n\n this.activeInput = this.emailInput;\n }\n\n // we need to listen on the inner `input` element itself, otherwise we don't always get an `input` event\n initInputEles() {\n const inputEles = [\n this.emailInputEle,\n this.phoneCountryCodeInput.phoneNumberInputEle,\n this.phoneInputBoxInput.phoneNumberInputEle,\n ];\n\n inputEles.forEach((ele) => {\n ele.addEventListener('input', this.onValueChange.bind(this));\n });\n }\n\n overrideEmailInputType() {\n this.emailInputEle.addEventListener('focus', () => {\n this.emailInputEle.setAttribute('type', 'text');\n });\n this.emailInputEle.addEventListener('blur', () => {\n setTimeout(() => {\n this.emailInputEle.setAttribute('type', 'email');\n });\n });\n }\n\n // We want to prevent Vaadin from changing the input type to `email`\n // otherwise, we cannot get the selectionStart from the input.\n overrideEmailSetAttribute() {\n const origEmailSetAttr = this.emailInput.setAttribute.bind(this.emailInputEle);\n this.emailInputEle.setAttribute = (name, value) => {\n if (name !== 'type' || value !== 'email' || !this.emailInput.hasAttribute('focused')) {\n return origEmailSetAttr(name, value);\n }\n return false;\n };\n }\n\n updateAttrs() {\n forwardAttrs(this, this.emailInput, { includeAttrs: attrs.email, mapAttrs: attrMap.email });\n\n forwardAttrs(this, this.phoneCountryCodeInput, {\n includeAttrs: attrs.phone.countryCode,\n mapAttrs: attrMap.phone,\n });\n\n forwardAttrs(this, this.phoneInputBoxInput, {\n includeAttrs: attrs.phone.inputBox,\n mapAttrs: attrMap.phone,\n });\n\n this.inputs.forEach((input) => forwardAttrs(this, input, { includeAttrs: attrs.shared }));\n\n setTimeout(() => this.phoneCountryCodeInput.setAttribute('default-code', this.defaultCode));\n }\n\n onValueChange() {\n this.#selectionStart = this.activeInputEle.selectionStart;\n this.handleActiveInput(this.activeInput.value);\n }\n\n handleActiveInput(val) {\n const expectedActiveInput = isNumericValue(val) ? this.phoneVariant : this.emailInput;\n\n if (this.activeInput !== expectedActiveInput) {\n this.setActiveInput(expectedActiveInput);\n }\n }\n\n setActiveInput(expectedActiveInput) {\n const val = this.activeInput.value;\n this.activeInput = expectedActiveInput;\n this.setActiveInputValue(val);\n if (this.#isReportedValidity) this.activeInput.reportValidity();\n this.setActiveInputSelectionStart();\n this.toggleInputVisibility();\n }\n\n setActiveInputSelectionStart() {\n setTimeout(() => {\n this.activeInputEle.focus();\n this.activeInputEle.setSelectionRange?.(this.#selectionStart, this.#selectionStart);\n });\n }\n\n setActiveInputValue(val) {\n const sanitizedVal = sanitizeValue(val);\n const isPhoneField = this.activeInput.localName === PHONE_FIELD;\n const value = isPhoneField\n ? `${this.phoneCountryCodeInput.countryCodeItems}-${sanitizedVal}`\n : sanitizedVal;\n this.activeInput.value = value;\n }\n\n toggleInputVisibility() {\n this.inputs.forEach((input) => {\n input !== this.activeInput ? input.classList.add('hidden') : input.classList.remove('hidden');\n });\n }\n\n reportValidity() {\n this.#isReportedValidity = true;\n\n const ele = this.activeInputEle;\n\n // On reportValidity we want to set the caret at the end of the input value.\n // Since checkValidity triggers `focus` on the input, it sets the caret at the start of the input,\n // regardless the existing value.\n const origInputType = ele.type;\n ele.setAttribute('type', 'text');\n setTimeout(() => {\n ele.setSelectionRange?.(ele.value.length, ele.value.length);\n ele.setAttribute('type', origInputType);\n });\n\n return this.activeInput.reportValidity();\n }\n\n checkValidity() {\n return this.activeInput.checkValidity();\n }\n}\n\nexport const HybridFieldClass = compose(\n createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: [\n { selector: () => 'descope-email-field', property: 'direction' },\n { selector: () => 'descope-phone-field', property: 'direction' },\n { selector: () => 'descope-phone-input-box-field', property: 'direction' },\n ],\n errorMessageIcon: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIcon,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIcon,\n },\n ],\n errorMessageIconSize: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconSize,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconSize,\n },\n ],\n errorMessageIconPadding: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconPadding,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPadding,\n },\n ],\n errorMessageIconRepeat: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconRepeat,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconRepeat,\n },\n ],\n errorMessageIconPosition: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageIconPosition,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageIconPosition,\n },\n ],\n errorMessageFontSize: [\n {\n selector: () => PhoneFieldClass.componentName,\n property: PhoneFieldClass.cssVarList.errorMessageFontSize,\n },\n {\n selector: () => PhoneFieldInputBoxClass.componentName,\n property: PhoneFieldInputBoxClass.cssVarList.errorMessageFontSize,\n },\n ],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawHybridField);\n","import '../descope-email-field';\nimport '../phone-fields/descope-phone-field';\nimport '../phone-fields/descope-phone-input-box-field';\n\nimport { componentName, HybridFieldClass } from './HybridFieldClass';\n\ncustomElements.define(componentName, HybridFieldClass);\n\nexport { HybridFieldClass, componentName };\n","import { syncAttrs } from '@descope-ui/common/components-helpers';\nimport { componentName as descopeInternalComponentName } from './descope-phone-input-box-internal/PhoneFieldInternalInputBox';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport {\n createProxy,\n createStyleMixin,\n draggableMixin,\n inputOverrideValidConstraintsMixin,\n proxyInputMixin,\n} from '../../../mixins';\nimport { TextFieldClass } from '../../descope-text-field/TextFieldClass';\nimport CountryCodes from '../CountryCodes';\nimport {\n resetInputLabelPosition,\n resetInputCursor,\n resetInputFieldDefaultWidth,\n resetInputFieldInvalidBackgroundColor,\n useHostExternalPadding,\n inputFloatingLabelStyle,\n} from '../../../helpers/themeHelpers/resetHelpers';\n\nconst textVars = TextFieldClass.cssVarList;\n\nexport const componentName = getComponentName('phone-input-box-field');\n\nconst customMixin = (superclass) =>\n class PhoneFieldInputBoxMixinClass extends superclass {\n static get CountryCodes() {\n return CountryCodes;\n }\n\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n syncAttrs(this, this.inputElement, { includeAttrs: ['has-value'] });\n\n forwardAttrs(this.shadowRoot.host, this.inputElement, {\n includeAttrs: [\n 'size',\n 'minlength',\n 'maxlength',\n 'default-code',\n 'disabled',\n 'phone-input-placeholder',\n 'label',\n 'label-type',\n 'allow-alphanumeric-input',\n 'restrict-countries',\n 'format-value',\n 'strict-validation',\n 'data-errormessage-type-mismatch',\n ],\n });\n }\n\n get phoneNumberInputEle() {\n return this.inputElement?.phoneNumberInputEle;\n }\n };\n\nconst {\n host,\n label,\n inputElement,\n requiredIndicator,\n inputField,\n internalComponent,\n internalComponentAfter,\n phoneInput,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n placeholder: { selector: '> input:placeholder-shown' },\n inputElement: { selector: 'input' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n inputField: { selector: () => 'vaadin-text-field::part(input-field)' },\n internalComponent: {\n selector: 'descope-phone-field-internal-input-box',\n },\n internalComponentAfter: {\n selector: 'descope-phone-field-internal-input-box::after',\n },\n phoneInput: { selector: () => 'descope-text-field' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PhoneFieldInputBoxClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n inputField,\n {\n selector: TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [label, errorMessage, helperText],\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n\n inputHorizontalPadding: [\n { ...phoneInput, property: 'padding-left' },\n { ...phoneInput, property: 'padding-right' },\n ],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n labelTextColor: [\n { ...label, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n errorMessageFontSize: { ...errorMessage, property: 'font-size' },\n\n inputValueTextColor: { ...phoneInput, property: textVars.inputValueTextColor },\n\n inputPlaceholderTextColor: { ...phoneInput, property: textVars.inputPlaceholderColor },\n\n inputBorderStyle: { ...internalComponentAfter, property: 'border-style' },\n inputBorderWidth: { ...internalComponentAfter, property: 'border-width' },\n inputBorderColor: { ...internalComponentAfter, property: 'border-color' },\n inputBorderRadius: [\n { ...internalComponent, property: 'border-radius' },\n { ...internalComponentAfter, property: 'border-radius' },\n ],\n\n inputOutlineStyle: { ...internalComponent, property: 'outline-style' },\n inputOutlineColor: { ...internalComponent, property: 'outline-color' },\n inputOutlineWidth: { ...internalComponent, property: 'outline-width' },\n inputOutlineOffset: { ...internalComponent, property: 'outline-offset' },\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 valueInputHeight: { ...inputElement, property: 'height' },\n valueInputMarginBottom: {\n selector: TextFieldClass.componentName,\n property: textVars.valueInputMarginBottom,\n },\n },\n }),\n draggableMixin,\n inputOverrideValidConstraintsMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n box-sizing: border-box;\n }\n ${useHostExternalPadding(PhoneFieldInputBoxClass.cssVarList)}\n ${resetInputCursor('vaadin-text-field')}\n ${resetInputFieldInvalidBackgroundColor('vaadin-text-field')}\n ${resetInputFieldDefaultWidth()}\n\n vaadin-text-field {\n width: 100%;\n box-sizing: border-box;\n padding: 0;\n }\n vaadin-text-field[focus-ring]::part(input-field) {\n box-shadow: none;\n }\n vaadin-text-field::before {\n height: 0;\n }\n vaadin-text-field::part(input-field) {\n padding: 0;\n background: transparent;\n -webkit-mask-image: none;\n }\n descope-phone-field-internal-input-box {\n -webkit-mask-image: none;\n padding: 0;\n width: 100%;\n }\n descope-phone-field-internal-input-box > div {\n width: 100%;\n }\n descope-phone-field-internal-input-box descope-text-field {\n ${textVars.inputOutlineWidth}: 0;\n ${textVars.inputOutlineOffset}: 0;\n }\n descope-phone-field-internal-input-box::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n pointer-events: none;\n }\n descope-text-field {\n flex-grow: 1;\n width: 100%;\n direction: ltr;\n }\n vaadin-text-field[readonly] > input:placeholder-shown {\n opacity: 1;\n }\n vaadin-text-field::part(input-field)::after {\n border: none;\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\n ${resetInputLabelPosition('vaadin-text-field')}\n ${inputFloatingLabelStyle()}\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n\nexport default PhoneFieldInputBoxClass;\n","import { forwardAttrs } from '@descope-ui/common/components-helpers';\nimport parsePhoneNumberFromString, { AsYouType } from 'libphonenumber-js/min';\nimport { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { getComponentName } from '../../../../helpers/componentHelpers';\nimport { getCountryByCodeId, matchingParenthesis } from '../../helpers';\n\nexport const componentName = getComponentName('phone-field-internal-input-box');\n\nconst observedAttributes = [\n 'disabled',\n 'size',\n 'readonly',\n 'phone-input-placeholder',\n 'name',\n 'maxlength',\n 'autocomplete',\n 'label-type',\n];\nconst mapAttrs = {\n 'phone-input-placeholder': 'placeholder',\n};\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass PhoneFieldInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], observedAttributes);\n }\n\n #ayt;\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div>\n <descope-text-field tabindex=\"1\" type=\"tel\" bordered=\"false\"></descope-text-field>\n </div>\n `;\n\n this.textField = this.querySelector('descope-text-field');\n }\n\n // notice: this function is exposed in parent component\n get phoneNumberInputEle() {\n return this.textField.shadowRoot.querySelector('input');\n }\n\n get defaultDialCode() {\n return getCountryByCodeId(this.getAttribute('default-code'));\n }\n\n get defaultCode() {\n return this.getAttribute('default-code');\n }\n\n get allowAlphanumericInput() {\n return this.getAttribute('allow-alphanumeric-input') === 'true';\n }\n\n get minLength() {\n return parseInt(this.getAttribute('minlength'), 10) || 0;\n }\n\n get maxLength() {\n return parseInt(this.getAttribute('maxlength'), 10) || 50;\n }\n\n get restrictCountries() {\n return this.getAttribute('restrict-countries')?.split(',').filter(Boolean) || [];\n }\n\n get isFormatValue() {\n return this.getAttribute('format-value') === 'true';\n }\n\n get isStrictValidation() {\n return this.getAttribute('strict-validation') === 'true';\n }\n\n get value() {\n if (!this.textField.value) return '';\n\n if (!this.isStrictValidation) {\n return this.#nonParsedValue();\n }\n\n const parsedVal = this.#parseWithCountryCode();\n\n if (parsedVal?.country && parsedVal?.countryCallingCode && parsedVal?.nationalNumber) {\n return `+${[parsedVal?.countryCallingCode, parsedVal?.nationalNumber].join('-')}`;\n }\n\n // if failed to parse or to find country code return text field value\n return this.textField.value;\n }\n\n set value(val) {\n this.textField.value = val;\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // We want to ignore focus events we are dispatching\n if (e.isTrusted) this.textField.focus();\n });\n\n super.init?.();\n\n this.textField.addEventListener('input', this.#onInput.bind(this));\n this.handleFocusEventsDispatching([this.textField]);\n\n forwardAttrs(this.textField, this, { includeAttrs: ['has-value'] });\n }\n\n getValidity() {\n const validPhonePattern = /^\\+?\\d{1,4}-?(?:\\d-?){1,15}$/;\n const stripValue = this.#sanitizeVal(this.textField.value || '');\n\n if (this.isRequired && !this.textField.value) {\n return { valueMissing: true };\n }\n\n if (this.textField.value) {\n if (stripValue.length < this.minLength) {\n return { tooShort: true };\n }\n\n if (\n // has `strict-validation` and not properly parsed\n (this.isStrictValidation && this.textField.value && !this.#isValidParsedValue()) ||\n // if no `strict-validation` then conform with naive pattern\n (!this.isStrictValidation && this.textField.value && !validPhonePattern.test(this.value))\n ) {\n return { patternMismatch: true };\n }\n }\n\n return {};\n }\n\n setSelectionRange(...args) {\n this.textField.setSelectionRange(...args);\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n\n if (oldValue !== newValue && observedAttributes.includes(attrName)) {\n const attr = mapAttrs[attrName] || attrName;\n this.textField.setAttribute(attr, newValue);\n }\n }\n\n #onInput(e) {\n let sanitizedInput = this.#sanitizeInput(e.target.value);\n\n if (this.isFormatValue && this.#canFormat(sanitizedInput)) {\n sanitizedInput = this.#formatPhoneNumber(sanitizedInput);\n }\n\n e.target.value = sanitizedInput;\n }\n\n #nonParsedValue() {\n if (!this.defaultDialCode) {\n return this.textField.value;\n }\n\n const nationalNumber = this.#trimDuplicateCountryCode(this.textField.value);\n const sanitizedVal = this.#sanitizeVal(nationalNumber);\n\n return [this.defaultDialCode, sanitizedVal].join('-');\n }\n\n #parseWithCountryCode() {\n if (this.defaultDialCode) {\n return parsePhoneNumberFromString(\n [this.defaultDialCode, this.#sanitizeVal(this.textField.value)].filter(Boolean).join('')\n );\n }\n\n // if default-code or not parsed - try to extract country code from value\n return parsePhoneNumberFromString(this.textField.value);\n }\n\n #sanitizeVal(val) {\n return val.replace(/\\D/g, '');\n }\n\n #trimDuplicateCountryCode(val) {\n if (this.textField.value?.[0] === '+') {\n const dialCodePrefixPattern = new RegExp(`^\\\\${this.defaultDialCode}`);\n const trimmed = val.replace(dialCodePrefixPattern, '');\n return trimmed;\n }\n return val;\n }\n\n #isValidParsedValue() {\n const parsed = parsePhoneNumberFromString(this.value);\n return (\n !!parsed && // parsed successfully (not undefined)\n !!parsed.isValid?.() && // Parsed object is valid\n !!parsed.country && // Parsed object with a country code\n !!this.#isAllowedCountry(parsed.country) && // Parsed with allowed country code\n (this.defaultCode ? this.defaultCode === parsed.country : true) // In case default country code is set validate parsed country matches it\n );\n }\n\n #isAllowedCountry(countryCode) {\n if (!this.restrictCountries.length) {\n return true;\n }\n\n return this.restrictCountries.includes(countryCode);\n }\n\n #sanitizeInput(val) {\n val = val\n .replace(/^-+/, '') // dash as first char\n .replace(/(?!^)\\+/g, '') // multiple plus symbols\n .replace('--', '-') // consecutive dashes\n .replace('+-', '+'); // dash following plus symbol\n\n if (!this.allowAlphanumericInput) {\n const telDigitsRegExp = /^[+\\d-\\(\\)]+$/;\n val = val\n .split('')\n .filter((char) => telDigitsRegExp.test(char))\n .join('');\n }\n\n return val;\n }\n\n #formatPhoneNumber(phoneNumber = '') {\n // Get country code from `default-code or` from phone number\n const countryCode = this.defaultCode || this.#getCountryCodeFromValue(phoneNumber);\n\n // Skip formatting if no country code is available\n if (!countryCode) {\n return phoneNumber;\n }\n\n // Update AsYouType country code if needed\n if (!this.#ayt || this.#ayt.country !== countryCode) {\n this.#ayt = new AsYouType(countryCode);\n }\n\n // We need to reset AsYouType instance before setting new input\n this.#ayt.reset();\n\n // Set AsYouType input\n const formattedVal = this.#ayt.input(phoneNumber) || phoneNumber;\n\n return formattedVal;\n }\n\n #getCountryCodeFromValue(val) {\n const parsed = parsePhoneNumberFromString(val);\n return parsed?.country || '';\n }\n\n #canFormat(val) {\n if (!matchingParenthesis(val)) return false;\n return true;\n }\n}\n\nexport default PhoneFieldInternal;\n","import '../../../descope-text-field';\n\nimport PhoneFieldInternalInputBox, { componentName } from './PhoneFieldInternalInputBox';\n\ncustomElements.define(componentName, PhoneFieldInternalInputBox);\n","import './descope-phone-input-box-internal';\nimport '../../descope-text-field';\n\nimport { componentName, PhoneFieldInputBoxClass } from './PhoneFieldInputBoxClass';\n\ncustomElements.define(componentName, PhoneFieldInputBoxClass);\n\nexport { PhoneFieldInputBoxClass, componentName };\n","import parsePhoneNumberFromString from 'libphonenumber-js/min';\nimport CountryCodes from './CountryCodes';\n\nexport const getCountryByCodeId = (countryCode) =>\n CountryCodes.find((c) => c.code === countryCode)?.dialCode;\n\nexport const matchingParenthesis = (val) => {\n const openParenMatches = val.match(/\\(/g);\n const closeParenMatches = val.match(/\\)/g);\n return openParenMatches?.length === closeParenMatches?.length;\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","INVALID_PHONE_CHARS_RE","attrs","shared","email","phone","countryCode","inputBox","attrMap","PHONE_FIELD","BaseClass","createBaseClass","baseSelector","HybridFieldClass","componentNameOverride","hostWidth","selector","property","hostDirection","errorMessageIcon","PhoneFieldClass","PhoneFieldInputBoxClass","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","errorMessageFontSize","attachShadow","mode","innerHTML","isExternalInput","emailInputEle","emailInput","externalInput","phoneVariant","phoneInputBoxInput","phoneCountryCodeInput","defaultCode","firstItem","countryCodes","activeInputEle","activeInput","phoneNumberInputEle","value","val","handleActiveInput","setTimeout","initInputs","updateAttrs","toggleInputVisibility","waitForInputs","initInputEles","overrideEmailInputType","overrideEmailSetAttribute","Promise","resolve","check","setInterval","clearInterval","shadowRoot","querySelector","inputs","forEach","ele","addEventListener","onValueChange","bind","origEmailSetAttr","name","hasAttribute","mapAttrs","input","selectionStart","expectedActiveInput","test","isNumericValue","setActiveInput","setActiveInputValue","reportValidity","setActiveInputSelectionStart","focus","setSelectionRange","sanitizedVal","replace","localName","countryCodeItems","classList","add","remove","origInputType","type","length","checkValidity","textVars","host","label","requiredIndicator","inputField","internalComponent","internalComponentAfter","phoneInput","errorMessage","helperText","placeholder","fontSize","fontFamily","hostMinWidth","inputHorizontalPadding","labelFontSize","labelFontWeight","labelTextColor","labelRequiredIndicator","errorMessageTextColor","inputValueTextColor","inputPlaceholderTextColor","inputPlaceholderColor","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","inputOutlineStyle","inputOutlineColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","valueInputHeight","valueInputMarginBottom","CountryCodes","template","document","createElement","appendChild","content","cloneNode","observedAttributes","BaseInputClass","concat","textField","defaultDialCode","allowAlphanumericInput","minLength","parseInt","maxLength","restrictCountries","split","filter","Boolean","isFormatValue","isStrictValidation","parsedVal","country","countryCallingCode","nationalNumber","join","e","isTrusted","handleFocusEventsDispatching","getValidity","validPhonePattern","stripValue","isRequired","valueMissing","tooShort","patternMismatch","args","attributeChangedCallback","attrName","oldValue","newValue","includes","attr","sanitizedInput","target","dialCodePrefixPattern","RegExp","parsed","isValid","telDigitsRegExp","char","phoneNumber","reset","getCountryByCodeId","find","c","code","dialCode","matchingParenthesis","openParenMatches","match","closeParenMatches"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8009],{63581(t,o,e){e.r(o),e.d(o,{LoaderLinearClass:()=>
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8009],{63581(t,o,e){e.r(o),e.d(o,{LoaderLinearClass:()=>h,componentName:()=>s});var n=e(25964),r=e(79365),a=e(81365),i=e(9696);const s=(0,e(97810).xE)("loader-linear");class p extends((0,a.q)({componentName:s,baseSelector:":host > div"})){static get componentName(){return s}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div></div>\n\t",(0,n.fz)("\n @keyframes tilt {\n\t\t\t\t0% { transform: translateX(0); }\n\t\t\t\t50% { transform: translateX(400%); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\tdiv::after {\n\t\t\t\tcontent: '';\n\t\t\t\tanimation-name: tilt;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\twidth: 100%;\n\t\t\t}\n ",this)}}const{after:d,host:c}={after:{selector:"::after"},host:{selector:()=>":host"}},h=(0,i.Zz)((0,r.RF)({mappings:{hostDisplay:{},hostWidth:{...c,property:"width"},barHeight:[{property:"height"},{...d,property:"height"}],barBorderRadius:[{property:"border-radius"},{...d,property:"border-radius"}],verticalPadding:[{...c,property:"padding-top"},{...c,property:"padding-bottom"}],barBackgroundColor:{property:"background-color"},barColor:{...d,property:"background-color"},barWidth:{...d,property:"width"},animationDuration:[{},d],animationTimingFunction:[{},d],animationIterationCount:[{},d]}}),r.VO,r.tQ)(p);customElements.define(s,h)}}]);
|
|
2
2
|
//# sourceMappingURL=descope-loader-linear-index-js.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-loader-linear-index-js.js","mappings":"
|
|
1
|
+
{"version":3,"file":"descope-loader-linear-index-js.js","mappings":"iPAMO,MAAMA,GAAgB,E,SAAA,IAAiB,iBAE9C,MAAMC,WAAwB,EAAAC,EAAA,GAAgB,CAAEF,gBAAeG,aAAc,iBAC3E,wBAAWH,GACT,OAAOA,CACT,CAEA,WAAAI,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,yBAIhD,QACE,uYAmBAH,KAEJ,EAGF,MAKM,MAAEI,EAAK,KAAEC,GALG,CAChBD,MAAO,CAAEE,SAAU,WACnBD,KAAM,CAAEC,SAAU,IAAM,UAKbC,GAAoB,SAC/B,QAAiB,CACfC,SAAU,CACRC,YAAa,CAAC,EACdC,UAAW,IAAKL,EAAMM,SAAU,SAChCC,UAAW,CAAC,CAAED,SAAU,UAAY,IAAKP,EAAOO,SAAU,WAC1DE,gBAAiB,CAAC,CAAEF,SAAU,iBAAmB,IAAKP,EAAOO,SAAU,kBACvEG,gBAAiB,CACf,IAAKT,EAAMM,SAAU,eACrB,IAAKN,EAAMM,SAAU,mBAEvBI,mBAAoB,CAAEJ,SAAU,oBAChCK,SAAU,IAAKZ,EAAOO,SAAU,oBAChCM,SAAU,IAAKb,EAAOO,SAAU,SAChCO,kBAAmB,CAAC,CAAC,EAAGd,GACxBe,wBAAyB,CAAC,CAAC,EAAGf,GAC9BgB,wBAAyB,CAAC,CAAC,EAAGhB,MAGlC,KACA,KApB+B,CAqB/BT,GCvEF0B,eAAeC,OAAO5B,EAAea,E","sources":["webpack://@descope/web-components-ui/./src/components/descope-loader-linear/LoaderLinearClass.js","webpack://@descope/web-components-ui/./src/components/descope-loader-linear/index.js"],"sourcesContent":["import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('loader-linear');\n\nclass RawLoaderLinear extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n static get componentName() {\n return componentName;\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div></div>\n\t`;\n\n injectStyle(\n `\n @keyframes tilt {\n\t\t\t\t0% { transform: translateX(0); }\n\t\t\t\t50% { transform: translateX(400%); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\tdiv::after {\n\t\t\t\tcontent: '';\n\t\t\t\tanimation-name: tilt;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\twidth: 100%;\n\t\t\t}\n `,\n this\n );\n }\n}\n\nconst selectors = {\n after: { selector: '::after' },\n host: { selector: () => ':host' },\n};\n\nconst { after, host } = selectors;\n\nexport const LoaderLinearClass = compose(\n createStyleMixin({\n mappings: {\n hostDisplay: {},\n hostWidth: { ...host, property: 'width' },\n barHeight: [{ property: 'height' }, { ...after, property: 'height' }],\n barBorderRadius: [{ property: 'border-radius' }, { ...after, property: 'border-radius' }],\n verticalPadding: [\n { ...host, property: 'padding-top' },\n { ...host, property: 'padding-bottom' },\n ],\n barBackgroundColor: { property: 'background-color' },\n barColor: { ...after, property: 'background-color' },\n barWidth: { ...after, property: 'width' },\n animationDuration: [{}, after],\n animationTimingFunction: [{}, after],\n animationIterationCount: [{}, after],\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLoaderLinear);\n","import { componentName, LoaderLinearClass } from './LoaderLinearClass';\n\ncustomElements.define(componentName, LoaderLinearClass);\n\nexport { LoaderLinearClass, componentName };\n"],"names":["componentName","RawLoaderLinear","createBaseClass","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","after","host","selector","LoaderLinearClass","mappings","hostDisplay","hostWidth","property","barHeight","barBorderRadius","verticalPadding","barBackgroundColor","barColor","barWidth","animationDuration","animationTimingFunction","animationIterationCount","customElements","define"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7163],{74713(t,r,o){o.d(r,{T:()=>
|
|
1
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7163],{74713(t,r,o){o.d(r,{T:()=>p,l:()=>d});var e=o(25964),n=o(79365),i=o(81365),a=o(9696);const p=(0,o(97810).xE)("loader-radial");class s extends((0,i.q)({componentName:p,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<div></div>\n\t",(0,e.fz)("\n @keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n ",this)}}const d=(0,a.Zz)((0,n.RF)({mappings:{hostDisplay:{property:"display"},spinnerSize:[{property:"width"},{property:"height"}],spinnerBorderWidth:{property:"border-width"},spinnerBorderStyle:{property:"border-style"},spinnerBorderRadius:{property:"border-radius"},spinnerQuadrant1Color:{property:"border-top-color"},spinnerQuadrant2Color:{property:"border-bottom-color"},spinnerQuadrant3Color:{property:"border-right-color"},spinnerQuadrant4Color:{property:"border-left-color"},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),n.VO,n.tQ)(s)},54249(t,r,o){o.r(r),o.d(r,{LoaderRadialClass:()=>e.l,componentName:()=>e.T});var e=o(74713);customElements.define(e.T,e.l)}}]);
|
|
2
2
|
//# sourceMappingURL=descope-loader-radial-index-js.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descope-loader-radial-index-js.js","mappings":"
|
|
1
|
+
{"version":3,"file":"descope-loader-radial-index-js.js","mappings":"8MAMO,MAAMA,GAAgB,E,SAAA,IAAiB,iBAE9C,MAAMC,WAAwB,OAAgB,CAAED,gBAAeE,aAAc,iBAC3E,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,yBAIhD,QACE,oRAaAH,KAEJ,EAGK,MAAMI,GAAoB,SAC/B,QAAiB,CACfC,SAAU,CACRC,YAAa,CAAEC,SAAU,WACzBC,YAAa,CAAC,CAAED,SAAU,SAAW,CAAEA,SAAU,WACjDE,mBAAoB,CAAEF,SAAU,gBAChCG,mBAAoB,CAAEH,SAAU,gBAChCI,oBAAqB,CAAEJ,SAAU,iBACjCK,sBAAuB,CAAEL,SAAU,oBACnCM,sBAAuB,CAAEN,SAAU,uBACnCO,sBAAuB,CAAEP,SAAU,sBACnCQ,sBAAuB,CAAER,SAAU,qBACnCS,kBAAmB,CAAC,EACpBC,wBAAyB,CAAC,EAC1BC,wBAAyB,CAAC,KAG9B,KACA,KAlB+B,CAmB/BtB,E,8FCpDFuB,eAAeC,OAAO,IAAe,I","sources":["webpack://@descope/web-components-ui/./src/components/descope-loader-radial/LoaderRadialClass.js","webpack://@descope/web-components-ui/./src/components/descope-loader-radial/index.js"],"sourcesContent":["import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('loader-radial');\n\nclass RawLoaderRadial extends createBaseClass({ componentName, baseSelector: ':host > div' }) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<div></div>\n\t`;\n\n injectStyle(\n `\n @keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n `,\n this\n );\n }\n}\n\nexport const LoaderRadialClass = compose(\n createStyleMixin({\n mappings: {\n hostDisplay: { property: 'display' },\n spinnerSize: [{ property: 'width' }, { property: 'height' }],\n spinnerBorderWidth: { property: 'border-width' },\n spinnerBorderStyle: { property: 'border-style' },\n spinnerBorderRadius: { property: 'border-radius' },\n spinnerQuadrant1Color: { property: 'border-top-color' },\n spinnerQuadrant2Color: { property: 'border-bottom-color' },\n spinnerQuadrant3Color: { property: 'border-right-color' },\n spinnerQuadrant4Color: { property: 'border-left-color' },\n animationDuration: {},\n animationTimingFunction: {},\n animationIterationCount: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawLoaderRadial);\n","import { componentName, LoaderRadialClass } from './LoaderRadialClass';\n\ncustomElements.define(componentName, LoaderRadialClass);\n\nexport { LoaderRadialClass, componentName };\n"],"names":["componentName","RawLoaderRadial","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","LoaderRadialClass","mappings","hostDisplay","property","spinnerSize","spinnerBorderWidth","spinnerBorderStyle","spinnerBorderRadius","spinnerQuadrant1Color","spinnerQuadrant2Color","spinnerQuadrant3Color","spinnerQuadrant4Color","animationDuration","animationTimingFunction","animationIterationCount","customElements","define"],"sourceRoot":""}
|