@descope/web-components-ui 1.0.298 → 1.0.300
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 +9 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +18 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/text-components-descope-enriched-text-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +9 -5
- package/src/components/text-components/descope-enriched-text/EnrichedTextClass.js +9 -1
package/dist/index.esm.js
CHANGED
@@ -3392,7 +3392,7 @@ const BaseEnrichedTextClass = createBaseTextClass(componentName$z);
|
|
3392
3392
|
const EnrichedTextMixin = (superclass) =>
|
3393
3393
|
class EnrichedTextMixinClass extends superclass {
|
3394
3394
|
static get observedAttributes() {
|
3395
|
-
return ['disabled-rules', 'line-break'];
|
3395
|
+
return ['disabled-rules', 'line-break', 'readonly'];
|
3396
3396
|
}
|
3397
3397
|
|
3398
3398
|
get lineBreak() {
|
@@ -3418,6 +3418,10 @@ const EnrichedTextMixin = (superclass) =>
|
|
3418
3418
|
this.#parseChildren();
|
3419
3419
|
}
|
3420
3420
|
}
|
3421
|
+
|
3422
|
+
if (attrName === 'readonly') {
|
3423
|
+
this.onReadOnlyChange(newValue !== null);
|
3424
|
+
}
|
3421
3425
|
}
|
3422
3426
|
|
3423
3427
|
#initProcessor() {
|
@@ -3443,6 +3447,10 @@ const EnrichedTextMixin = (superclass) =>
|
|
3443
3447
|
}
|
3444
3448
|
}
|
3445
3449
|
}
|
3450
|
+
|
3451
|
+
onReadOnlyChange(val) {
|
3452
|
+
this.setAttribute('inert', val);
|
3453
|
+
}
|
3446
3454
|
};
|
3447
3455
|
|
3448
3456
|
const EnrichedTextClass = compose(
|
@@ -6444,14 +6452,16 @@ class NewPasswordInternal extends BaseInputClass$4 {
|
|
6444
6452
|
});
|
6445
6453
|
|
6446
6454
|
super.init?.();
|
6447
|
-
this.renderInputs(this.hasConfirm);
|
6455
|
+
this.renderInputs(this.hasConfirm, this.hasValidation);
|
6448
6456
|
}
|
6449
6457
|
|
6450
|
-
renderInputs(shouldRenderConfirm) {
|
6458
|
+
renderInputs(shouldRenderConfirm, shouldRenderValidation) {
|
6451
6459
|
let template = `
|
6452
6460
|
<div>
|
6453
6461
|
<descope-password data-id="password"></descope-password>
|
6454
|
-
<descope-policy-validation
|
6462
|
+
<descope-policy-validation class="${
|
6463
|
+
shouldRenderValidation ? 'hidden' : ''
|
6464
|
+
}"></descope-policy-validation>
|
6455
6465
|
</div>
|
6456
6466
|
`;
|
6457
6467
|
|
@@ -6562,8 +6572,10 @@ class NewPasswordInternal extends BaseInputClass$4 {
|
|
6562
6572
|
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
6563
6573
|
|
6564
6574
|
if (oldValue !== newValue) {
|
6565
|
-
if (attrName === 'has-
|
6566
|
-
this.renderInputs(
|
6575
|
+
if (attrName === 'has-validation') {
|
6576
|
+
this.renderInputs(this.hasConfirm, newValue === 'true');
|
6577
|
+
} else if (attrName === 'has-confirm') {
|
6578
|
+
this.renderInputs(newValue !== null && newValue !== 'false', this.hasValidation);
|
6567
6579
|
} else if (commonAttrs.includes(attrName)) {
|
6568
6580
|
this.inputs.forEach((input) => this.toggleBooleanAttribute(input, attrName, newValue));
|
6569
6581
|
} else if (passwordInputAttrs.includes(attrName)) {
|