@descope/web-components-ui 1.45.0 → 1.46.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.map +1 -1
- package/dist/index.esm.js +22 -24
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.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/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 +2 -2
- 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 +1 -1
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +9 -10
- package/src/components/phone-fields/descope-phone-input-box-field/descope-phone-input-box-internal/PhoneFieldInternalInputBox.js +14 -15
    
        package/dist/index.esm.js
    CHANGED
    
    | @@ -10359,22 +10359,21 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$8 { | |
| 10359 10359 | 
             
                const countryCode = this.comboBox.value;
         | 
| 10360 10360 | 
             
                const nationalNumer = this.textField.value;
         | 
| 10361 10361 |  | 
| 10362 | 
            -
                const  | 
| 10363 | 
            -
                const  | 
| 10364 | 
            -
             | 
| 10365 | 
            -
                const isEmpty = !hasCountryCode || !hasNationalNumber;
         | 
| 10366 | 
            -
                const isValidLength = hasNationalNumber && nationalNumer.length >= this.minLength;
         | 
| 10362 | 
            +
                const isEmpty = !countryCode || !nationalNumer;
         | 
| 10363 | 
            +
                const isValidLength = nationalNumer && nationalNumer.length >= this.minLength;
         | 
| 10367 10364 |  | 
| 10368 10365 | 
             
                if (this.isRequired && isEmpty) {
         | 
| 10369 10366 | 
             
                  return { valueMissing: true };
         | 
| 10370 10367 | 
             
                }
         | 
| 10371 10368 |  | 
| 10372 | 
            -
                if ( | 
| 10373 | 
            -
                   | 
| 10374 | 
            -
             | 
| 10369 | 
            +
                if (this.value) {
         | 
| 10370 | 
            +
                  if (!isValidLength) {
         | 
| 10371 | 
            +
                    return { tooShort: true };
         | 
| 10372 | 
            +
                  }
         | 
| 10375 10373 |  | 
| 10376 | 
            -
             | 
| 10377 | 
            -
             | 
| 10374 | 
            +
                  if (this.isStrictValidation && !this.#isValidParsedValue()) {
         | 
| 10375 | 
            +
                    return { patternMismatch: true };
         | 
| 10376 | 
            +
                  }
         | 
| 10378 10377 | 
             
                }
         | 
| 10379 10378 |  | 
| 10380 10379 | 
             
                return {};
         | 
| @@ -10916,6 +10915,7 @@ const observedAttributes$3 = [ | |
| 10916 10915 | 
             
              'readonly',
         | 
| 10917 10916 | 
             
              'phone-input-placeholder',
         | 
| 10918 10917 | 
             
              'name',
         | 
| 10918 | 
            +
              'maxlength',
         | 
| 10919 10919 | 
             
              'autocomplete',
         | 
| 10920 10920 | 
             
              'label-type',
         | 
| 10921 10921 | 
             
            ];
         | 
| @@ -11022,21 +11022,19 @@ class PhoneFieldInternal extends BaseInputClass$7 { | |
| 11022 11022 | 
             
                  return { valueMissing: true };
         | 
| 11023 11023 | 
             
                }
         | 
| 11024 11024 |  | 
| 11025 | 
            -
                if ( | 
| 11026 | 
            -
                   | 
| 11027 | 
            -
             | 
| 11028 | 
            -
             | 
| 11029 | 
            -
                if (stripValue.length > this.maxLength) {
         | 
| 11030 | 
            -
                  return { tooLong: true };
         | 
| 11031 | 
            -
                }
         | 
| 11025 | 
            +
                if (this.textField.value) {
         | 
| 11026 | 
            +
                  if (stripValue.length < this.minLength) {
         | 
| 11027 | 
            +
                    return { tooShort: true };
         | 
| 11028 | 
            +
                  }
         | 
| 11032 11029 |  | 
| 11033 | 
            -
             | 
| 11034 | 
            -
             | 
| 11035 | 
            -
             | 
| 11036 | 
            -
             | 
| 11037 | 
            -
             | 
| 11038 | 
            -
             | 
| 11039 | 
            -
             | 
| 11030 | 
            +
                  if (
         | 
| 11031 | 
            +
                    // has `strict-validation` and not properly parsed
         | 
| 11032 | 
            +
                    (this.isStrictValidation && this.textField.value && !this.#isValidParsedValue()) ||
         | 
| 11033 | 
            +
                    // if no `strict-validation` then conform with naive pattern
         | 
| 11034 | 
            +
                    (!this.isStrictValidation && this.textField.value && !validPhonePattern.test(this.value))
         | 
| 11035 | 
            +
                  ) {
         | 
| 11036 | 
            +
                    return { patternMismatch: true };
         | 
| 11037 | 
            +
                  }
         | 
| 11040 11038 | 
             
                }
         | 
| 11041 11039 |  | 
| 11042 11040 | 
             
                return {};
         |