@descope/web-components-ui 1.0.375 → 1.0.377
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 +8 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +11 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/4978.js +1 -1
- package/dist/umd/DescopeDev.js +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-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js +3 -3
- package/src/mixins/externalInputHelpers.js +8 -2
package/dist/index.esm.js
CHANGED
@@ -1404,13 +1404,19 @@ const inputEventsDispatchingMixin = (superclass) =>
|
|
1404
1404
|
// since on load we can only sample the color of the placeholder,
|
1405
1405
|
// we need to temporarily populate the input in order to sample the value color
|
1406
1406
|
const getValueColor = (ele, computedStyle) => {
|
1407
|
+
// to support setting dynamic values, we have to store the existing value
|
1408
|
+
// and re-set it if we are returning from this hack
|
1409
|
+
const origVal = ele.value;
|
1410
|
+
|
1407
1411
|
// eslint-disable-next-line no-param-reassign
|
1408
1412
|
ele.value = '_';
|
1409
1413
|
|
1410
1414
|
const valueColor = computedStyle.getPropertyValue('color');
|
1411
1415
|
|
1412
|
-
|
1413
|
-
|
1416
|
+
if (ele.value === '_') {
|
1417
|
+
// eslint-disable-next-line no-param-reassign
|
1418
|
+
ele.value = origVal;
|
1419
|
+
}
|
1414
1420
|
|
1415
1421
|
return valueColor;
|
1416
1422
|
};
|
@@ -6247,9 +6253,9 @@ let PhoneFieldInternal$1 = class PhoneFieldInternal extends BaseInputClass$6 {
|
|
6247
6253
|
}
|
6248
6254
|
|
6249
6255
|
set value(val) {
|
6250
|
-
const parsed = parsePhone(val);
|
6251
|
-
const countryCode = `+${parsed.countryCallingCode}
|
6252
|
-
const phoneNumber = parsed
|
6256
|
+
const parsed = parsePhone(val || '');
|
6257
|
+
const countryCode = parsed?.countryCallingCode ? `+${parsed.countryCallingCode}` : '';
|
6258
|
+
const phoneNumber = parsed?.nationalNumber || '';
|
6253
6259
|
|
6254
6260
|
if (countryCode) {
|
6255
6261
|
const countryCodeItem = this.getCountryByDialCode(countryCode);
|