@descope/web-components-ui 1.0.350 → 1.0.352
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 +41 -3
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +43 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-grid-index-js.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/descope-password-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-grid/GridClass.js +8 -0
- package/src/components/descope-new-password/NewPasswordClass.js +1 -0
- package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +2 -0
- package/src/components/descope-password/PasswordClass.js +32 -3
package/dist/cjs/index.cjs.js
CHANGED
@@ -3550,10 +3550,20 @@ const componentName$O = getComponentName('password');
|
|
3550
3550
|
|
3551
3551
|
const customMixin$9 = (superclass) =>
|
3552
3552
|
class PasswordFieldMixinClass extends superclass {
|
3553
|
+
static get observedAttributes() {
|
3554
|
+
return ['manual-visibility-toggle'];
|
3555
|
+
}
|
3556
|
+
|
3557
|
+
get manualToggleVisibility() {
|
3558
|
+
return this.getAttribute('manual-visibility-toggle') === 'true';
|
3559
|
+
}
|
3560
|
+
|
3553
3561
|
init() {
|
3554
3562
|
super.init?.();
|
3555
|
-
|
3556
3563
|
this.handleCaretOnVisibilityChange();
|
3564
|
+
this.origSetPasswordVisible = this.baseElement._setPasswordVisible;
|
3565
|
+
this.origSetFocused = this.baseElement._setFocused;
|
3566
|
+
this.baseElement._setFocused = this.setFocus.bind(this);
|
3557
3567
|
}
|
3558
3568
|
|
3559
3569
|
get caretPosition() {
|
@@ -3572,8 +3582,27 @@ const customMixin$9 = (superclass) =>
|
|
3572
3582
|
};
|
3573
3583
|
}
|
3574
3584
|
|
3575
|
-
|
3576
|
-
|
3585
|
+
// We use `manual-visibility-toggle` to to toggle the password's visibility
|
3586
|
+
// even if the input field is focused-out. However, on focusout - Vaadin resets
|
3587
|
+
// password visibility. Since we don't want to override Vaadin's native setFocus
|
3588
|
+
// function (which is part of their FocusMixin).
|
3589
|
+
// So, here we override the part of logic that runs within Vaadin's setFocus that reports
|
3590
|
+
// the password visibility state. This logic is part of our `manual-visibility-toggle` only.
|
3591
|
+
setFocus(focused) {
|
3592
|
+
if (this.manualToggleVisibility) {
|
3593
|
+
this.baseElement._setPasswordVisible = () => {};
|
3594
|
+
}
|
3595
|
+
this.origSetFocused.call(this.baseElement, focused);
|
3596
|
+
this.baseElement._setPasswordVisible = this.origSetPasswordVisible.bind(this.baseElement);
|
3597
|
+
}
|
3598
|
+
|
3599
|
+
resetPasswordVisibilityToggle() {
|
3600
|
+
this.baseElement._setPasswordVisible = this.origSetPasswordVisible;
|
3601
|
+
this.baseElement._setFocused = this.origSetFocus;
|
3602
|
+
}
|
3603
|
+
|
3604
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
3605
|
+
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
3577
3606
|
}
|
3578
3607
|
};
|
3579
3608
|
|
@@ -8571,6 +8600,7 @@ const customMixin$4 = (superclass) =>
|
|
8571
8600
|
'available-policies',
|
8572
8601
|
'data-password-policy-value-minlength',
|
8573
8602
|
'label-type',
|
8603
|
+
'manual-visibility-toggle',
|
8574
8604
|
],
|
8575
8605
|
});
|
8576
8606
|
}
|
@@ -9954,6 +9984,14 @@ const GridMixin = (superclass) =>
|
|
9954
9984
|
// disable the grid sort
|
9955
9985
|
this.baseElement._mapSorters = () => {};
|
9956
9986
|
|
9987
|
+
// there is an issue in vaadin that on some cases when trying to render the details panel, the row is null and this fn throwing
|
9988
|
+
// so we override it to prevent the error
|
9989
|
+
const origUpdateDetailsCellHeight = this.baseElement._updateDetailsCellHeight;
|
9990
|
+
this.baseElement._updateDetailsCellHeight = (row) => {
|
9991
|
+
if (!row) return;
|
9992
|
+
origUpdateDetailsCellHeight.call(this.baseElement, row);
|
9993
|
+
};
|
9994
|
+
|
9957
9995
|
this.baseElement.rowDetailsRenderer = this.#rowDetailsRenderer.bind(this);
|
9958
9996
|
}
|
9959
9997
|
|