@everymatrix/pam-forgot-password 1.99.74 → 1.99.76
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.
|
@@ -14202,6 +14202,38 @@ const SelectInput = class {
|
|
|
14202
14202
|
this.errorMessage = this.setErrorMessage();
|
|
14203
14203
|
this.emitValueHandler(true);
|
|
14204
14204
|
};
|
|
14205
|
+
this.handleComboInputFocusout = (event) => {
|
|
14206
|
+
var _a, _b;
|
|
14207
|
+
if (!this.isComboOpen() || event.relatedTarget)
|
|
14208
|
+
return;
|
|
14209
|
+
event.stopImmediatePropagation();
|
|
14210
|
+
// A full match is highlighted: closing commits it, like Enter does.
|
|
14211
|
+
if (this.getHighlightedIndex() > -1) {
|
|
14212
|
+
(_b = (_a = this.vaadinCombo).close) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
14213
|
+
}
|
|
14214
|
+
};
|
|
14215
|
+
this.handleComboInputKeydown = (event) => {
|
|
14216
|
+
var _a;
|
|
14217
|
+
if (event.key !== 'Enter' || event.isComposing || !this.isComboOpen())
|
|
14218
|
+
return;
|
|
14219
|
+
if (this.getHighlightedIndex() > -1)
|
|
14220
|
+
return;
|
|
14221
|
+
event.preventDefault();
|
|
14222
|
+
event.stopImmediatePropagation();
|
|
14223
|
+
(_a = this.blurGuardInput) === null || _a === void 0 ? void 0 : _a.blur();
|
|
14224
|
+
};
|
|
14225
|
+
this.handleComboOpenedChanged = (event) => {
|
|
14226
|
+
var _a;
|
|
14227
|
+
if (event.detail.value || document.activeElement === this.blurGuardInput)
|
|
14228
|
+
return;
|
|
14229
|
+
const combo = event.currentTarget;
|
|
14230
|
+
(_a = combo.validate) === null || _a === void 0 ? void 0 : _a.call(combo);
|
|
14231
|
+
this.touched = true;
|
|
14232
|
+
this.value = (combo === null || combo === void 0 ? void 0 : combo.value) || '';
|
|
14233
|
+
this.isValid = this.setValidity();
|
|
14234
|
+
this.errorMessage = this.setErrorMessage();
|
|
14235
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
14236
|
+
};
|
|
14205
14237
|
this.handleBlur = (event) => {
|
|
14206
14238
|
const field = event.currentTarget;
|
|
14207
14239
|
if (field.opened)
|
|
@@ -14340,6 +14372,33 @@ const SelectInput = class {
|
|
|
14340
14372
|
});
|
|
14341
14373
|
});
|
|
14342
14374
|
}
|
|
14375
|
+
isComboOpen() {
|
|
14376
|
+
var _a;
|
|
14377
|
+
return !!((_a = this.vaadinCombo) === null || _a === void 0 ? void 0 : _a.opened);
|
|
14378
|
+
}
|
|
14379
|
+
// _focusedIndex is vaadin's private highlighted-item index (-1 = none); it may change in future vaadin versions.
|
|
14380
|
+
getHighlightedIndex() {
|
|
14381
|
+
var _a, _b;
|
|
14382
|
+
return (_b = (_a = this.vaadinCombo) === null || _a === void 0 ? void 0 : _a._focusedIndex) !== null && _b !== void 0 ? _b : -1;
|
|
14383
|
+
}
|
|
14384
|
+
attachBlurGuard(el) {
|
|
14385
|
+
const input = el === null || el === void 0 ? void 0 : el.inputElement;
|
|
14386
|
+
if (!input || input === this.blurGuardInput)
|
|
14387
|
+
return;
|
|
14388
|
+
this.detachBlurGuard();
|
|
14389
|
+
input.addEventListener('focusout', this.handleComboInputFocusout);
|
|
14390
|
+
input.addEventListener('keydown', this.handleComboInputKeydown);
|
|
14391
|
+
this.blurGuardInput = input;
|
|
14392
|
+
}
|
|
14393
|
+
detachBlurGuard() {
|
|
14394
|
+
var _a, _b;
|
|
14395
|
+
(_a = this.blurGuardInput) === null || _a === void 0 ? void 0 : _a.removeEventListener('focusout', this.handleComboInputFocusout);
|
|
14396
|
+
(_b = this.blurGuardInput) === null || _b === void 0 ? void 0 : _b.removeEventListener('keydown', this.handleComboInputKeydown);
|
|
14397
|
+
this.blurGuardInput = undefined;
|
|
14398
|
+
}
|
|
14399
|
+
disconnectedCallback() {
|
|
14400
|
+
this.detachBlurGuard();
|
|
14401
|
+
}
|
|
14343
14402
|
setValidity() {
|
|
14344
14403
|
var _a;
|
|
14345
14404
|
if ((_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory) {
|
|
@@ -14365,10 +14424,10 @@ const SelectInput = class {
|
|
|
14365
14424
|
if (this.touched) {
|
|
14366
14425
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
14367
14426
|
}
|
|
14368
|
-
return index.h("div", { key: '
|
|
14369
|
-
index.h("img", { key: '
|
|
14427
|
+
return index.h("div", { key: '5cfd3a0d2630a31ee8fccfe35672238086e17600', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, index.h("div", { key: '3dfae7aa91098a88fe6bd5ae88d7159dce4314b4', class: 'select__wrapper--flex' }, index.h("label", { key: '9255ee7c839659607dc100a61bc5f4d0041caaa2', class: 'select__label', htmlFor: `${this.name}__input` }, this.displayName, index.h("span", { key: '99f8b6de1b652bf8ac99ad8316797b92ac1c3d95', class: this.validation.mandatory ? 'select__label--required' : '' })), index.h("div", { key: '8f43647f1caace501b465d305d34be9393f1c7e3', class: 'select__wrapper--relative' }, this.tooltip &&
|
|
14428
|
+
index.h("img", { key: '8f504f912fcb52fd0aab8435dfe6461b08a33c99', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? index.h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, onFocusin: () => this.attachBlurGuard(this.vaadinCombo), "onOpened-changed": this.handleComboOpenedChanged, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur })
|
|
14370
14429
|
:
|
|
14371
|
-
index.h("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), index.h("small", { key: '
|
|
14430
|
+
index.h("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), index.h("small", { key: '90de512d3b2f59a4b9083ed7cb0c5c7278268f2e', class: 'select__error-message' }, this.errorMessage));
|
|
14372
14431
|
}
|
|
14373
14432
|
static get watchers() { return {
|
|
14374
14433
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -14199,6 +14199,38 @@ const SelectInput = class {
|
|
|
14199
14199
|
this.errorMessage = this.setErrorMessage();
|
|
14200
14200
|
this.emitValueHandler(true);
|
|
14201
14201
|
};
|
|
14202
|
+
this.handleComboInputFocusout = (event) => {
|
|
14203
|
+
var _a, _b;
|
|
14204
|
+
if (!this.isComboOpen() || event.relatedTarget)
|
|
14205
|
+
return;
|
|
14206
|
+
event.stopImmediatePropagation();
|
|
14207
|
+
// A full match is highlighted: closing commits it, like Enter does.
|
|
14208
|
+
if (this.getHighlightedIndex() > -1) {
|
|
14209
|
+
(_b = (_a = this.vaadinCombo).close) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
14210
|
+
}
|
|
14211
|
+
};
|
|
14212
|
+
this.handleComboInputKeydown = (event) => {
|
|
14213
|
+
var _a;
|
|
14214
|
+
if (event.key !== 'Enter' || event.isComposing || !this.isComboOpen())
|
|
14215
|
+
return;
|
|
14216
|
+
if (this.getHighlightedIndex() > -1)
|
|
14217
|
+
return;
|
|
14218
|
+
event.preventDefault();
|
|
14219
|
+
event.stopImmediatePropagation();
|
|
14220
|
+
(_a = this.blurGuardInput) === null || _a === void 0 ? void 0 : _a.blur();
|
|
14221
|
+
};
|
|
14222
|
+
this.handleComboOpenedChanged = (event) => {
|
|
14223
|
+
var _a;
|
|
14224
|
+
if (event.detail.value || document.activeElement === this.blurGuardInput)
|
|
14225
|
+
return;
|
|
14226
|
+
const combo = event.currentTarget;
|
|
14227
|
+
(_a = combo.validate) === null || _a === void 0 ? void 0 : _a.call(combo);
|
|
14228
|
+
this.touched = true;
|
|
14229
|
+
this.value = (combo === null || combo === void 0 ? void 0 : combo.value) || '';
|
|
14230
|
+
this.isValid = this.setValidity();
|
|
14231
|
+
this.errorMessage = this.setErrorMessage();
|
|
14232
|
+
this.validityStateHandler({ valid: this.isValid, name: this.name });
|
|
14233
|
+
};
|
|
14202
14234
|
this.handleBlur = (event) => {
|
|
14203
14235
|
const field = event.currentTarget;
|
|
14204
14236
|
if (field.opened)
|
|
@@ -14337,6 +14369,33 @@ const SelectInput = class {
|
|
|
14337
14369
|
});
|
|
14338
14370
|
});
|
|
14339
14371
|
}
|
|
14372
|
+
isComboOpen() {
|
|
14373
|
+
var _a;
|
|
14374
|
+
return !!((_a = this.vaadinCombo) === null || _a === void 0 ? void 0 : _a.opened);
|
|
14375
|
+
}
|
|
14376
|
+
// _focusedIndex is vaadin's private highlighted-item index (-1 = none); it may change in future vaadin versions.
|
|
14377
|
+
getHighlightedIndex() {
|
|
14378
|
+
var _a, _b;
|
|
14379
|
+
return (_b = (_a = this.vaadinCombo) === null || _a === void 0 ? void 0 : _a._focusedIndex) !== null && _b !== void 0 ? _b : -1;
|
|
14380
|
+
}
|
|
14381
|
+
attachBlurGuard(el) {
|
|
14382
|
+
const input = el === null || el === void 0 ? void 0 : el.inputElement;
|
|
14383
|
+
if (!input || input === this.blurGuardInput)
|
|
14384
|
+
return;
|
|
14385
|
+
this.detachBlurGuard();
|
|
14386
|
+
input.addEventListener('focusout', this.handleComboInputFocusout);
|
|
14387
|
+
input.addEventListener('keydown', this.handleComboInputKeydown);
|
|
14388
|
+
this.blurGuardInput = input;
|
|
14389
|
+
}
|
|
14390
|
+
detachBlurGuard() {
|
|
14391
|
+
var _a, _b;
|
|
14392
|
+
(_a = this.blurGuardInput) === null || _a === void 0 ? void 0 : _a.removeEventListener('focusout', this.handleComboInputFocusout);
|
|
14393
|
+
(_b = this.blurGuardInput) === null || _b === void 0 ? void 0 : _b.removeEventListener('keydown', this.handleComboInputKeydown);
|
|
14394
|
+
this.blurGuardInput = undefined;
|
|
14395
|
+
}
|
|
14396
|
+
disconnectedCallback() {
|
|
14397
|
+
this.detachBlurGuard();
|
|
14398
|
+
}
|
|
14340
14399
|
setValidity() {
|
|
14341
14400
|
var _a;
|
|
14342
14401
|
if ((_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory) {
|
|
@@ -14362,10 +14421,10 @@ const SelectInput = class {
|
|
|
14362
14421
|
if (this.touched) {
|
|
14363
14422
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
14364
14423
|
}
|
|
14365
|
-
return h("div", { key: '
|
|
14366
|
-
h("img", { key: '
|
|
14424
|
+
return h("div", { key: '5cfd3a0d2630a31ee8fccfe35672238086e17600', class: `select__wrapper ${this.autofilled ? 'select__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("div", { key: '3dfae7aa91098a88fe6bd5ae88d7159dce4314b4', class: 'select__wrapper--flex' }, h("label", { key: '9255ee7c839659607dc100a61bc5f4d0041caaa2', class: 'select__label', htmlFor: `${this.name}__input` }, this.displayName, h("span", { key: '99f8b6de1b652bf8ac99ad8316797b92ac1c3d95', class: this.validation.mandatory ? 'select__label--required' : '' })), h("div", { key: '8f43647f1caace501b465d305d34be9393f1c7e3', class: 'select__wrapper--relative' }, this.tooltip &&
|
|
14425
|
+
h("img", { key: '8f504f912fcb52fd0aab8435dfe6461b08a33c99', class: 'select__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), this.isComboBox ? h("vaadin-combo-box", { name: this.name, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, onFocusin: () => this.attachBlurGuard(this.vaadinCombo), "onOpened-changed": this.handleComboOpenedChanged, readOnly: this.autofilled, required: (_a = this.validation) === null || _a === void 0 ? void 0 : _a.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleComboChange, onBlur: this.handleBlur })
|
|
14367
14426
|
:
|
|
14368
|
-
h("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), h("small", { key: '
|
|
14427
|
+
h("vaadin-select", { name: this.name, popover: false, id: `${this.name}__input`, class: `select__input ${invalidClass} ${this.autofilled ? 'select__input--autofilled' : ''}`, "item-label-path": "label", "item-value-path": "value", ref: (el) => this.vaadinCombo = el, readOnly: this.autofilled, required: (_b = this.validation) === null || _b === void 0 ? void 0 : _b.mandatory, value: this.value, placeholder: `${this.placeholder}`, items: this.displayedOptions, onChange: this.handleSelectChange, "no-vertical-overlap": true, noVerticalOverlap: true }), h("small", { key: '90de512d3b2f59a4b9083ed7cb0c5c7278268f2e', class: 'select__error-message' }, this.errorMessage));
|
|
14369
14428
|
}
|
|
14370
14429
|
static get watchers() { return {
|
|
14371
14430
|
"clientStyling": ["handleClientStylingChange"],
|