@energycap/components 0.47.1-ECAP-33113.20261008-1419 → 0.47.1
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.
|
@@ -4086,6 +4086,7 @@ var PopupContainerDirective = class PopupContainerDirective {
|
|
|
4086
4086
|
this.hide();
|
|
4087
4087
|
}
|
|
4088
4088
|
show() {
|
|
4089
|
+
this.cancelFocusRestore();
|
|
4089
4090
|
if (PopupContainerDirective.GlobalPopupRef) {
|
|
4090
4091
|
if (PopupContainerDirective.GlobalPopupRef != this) {
|
|
4091
4092
|
PopupContainerDirective.GlobalPopupRef.hide();
|
|
@@ -4113,11 +4114,27 @@ var PopupContainerDirective = class PopupContainerDirective {
|
|
|
4113
4114
|
}
|
|
4114
4115
|
if (this.popperRef && this.popupViewRef) {
|
|
4115
4116
|
const shouldRestoreFocus = this.isFocusInsidePopup() || this.document.activeElement === this.document.body;
|
|
4117
|
+
const popupNodes = [...this.popupViewRef.rootNodes];
|
|
4116
4118
|
this.popupViewRef.destroy();
|
|
4117
4119
|
this.popperRef.destroy();
|
|
4118
4120
|
this.popperRef = void 0;
|
|
4119
4121
|
this.popperStatusChange.emit("hidden");
|
|
4120
|
-
if (shouldRestoreFocus && this.previouslyFocusedElement?.focus) this.previouslyFocusedElement
|
|
4122
|
+
if (shouldRestoreFocus && this.previouslyFocusedElement?.focus) this.restoreFocusAfterHide(this.previouslyFocusedElement, popupNodes);
|
|
4123
|
+
}
|
|
4124
|
+
}
|
|
4125
|
+
restoreFocusAfterHide(target, popupNodes) {
|
|
4126
|
+
this.cancelFocusRestore();
|
|
4127
|
+
this.focusRestoreTimeout = setTimeout(() => {
|
|
4128
|
+
this.focusRestoreTimeout = void 0;
|
|
4129
|
+
const activeElement = this.document.activeElement;
|
|
4130
|
+
const focusIsUnclaimed = !activeElement || activeElement === this.document.body || popupNodes.some((node) => node.contains && node.contains(activeElement));
|
|
4131
|
+
if (target.isConnected && focusIsUnclaimed) target.focus();
|
|
4132
|
+
});
|
|
4133
|
+
}
|
|
4134
|
+
cancelFocusRestore() {
|
|
4135
|
+
if (this.focusRestoreTimeout !== void 0) {
|
|
4136
|
+
clearTimeout(this.focusRestoreTimeout);
|
|
4137
|
+
this.focusRestoreTimeout = void 0;
|
|
4121
4138
|
}
|
|
4122
4139
|
}
|
|
4123
4140
|
isFocusInsidePopup() {
|
|
@@ -14344,8 +14361,8 @@ var WizardProgressComponent = class WizardProgressComponent {
|
|
|
14344
14361
|
currentTab: "currentTab"
|
|
14345
14362
|
},
|
|
14346
14363
|
ngImport: i0,
|
|
14347
|
-
template: "@for (tab of tabGroup?.items; track tab; let index = $index; let isFirst = $first; let isLast = $last) {\n <div\n class=\"progress-tab\"\n [class.ml-2]=\"!isFirst\"\n [class.is-active]=\"currentTab?.id === tab.id\">\n @if (tab.completed) {\n <i\n class=\"ec-icon icon-check-circle mr-1 font-color-success\"
|
|
14348
|
-
styles: [":host{display:flex;align-items:center;padding:0 1rem}.progress-tab{display:flex;align-items:center}.progress-tab.is-active{font-weight:700}
|
|
14364
|
+
template: "@for (tab of tabGroup?.items; track tab; let index = $index; let isFirst = $first; let isLast = $last) {\n <div\n class=\"progress-tab\"\n [class.ml-2]=\"!isFirst\"\n [class.is-active]=\"currentTab?.id === tab.id\">\n @if (tab.completed) {\n <i\n class=\"ec-icon icon-check-circle mr-1 font-color-success\"></i>\n }\n @if (!tab.completed) {\n <span>{{index+1}}. </span>\n }\n <span>{{tab.label | translate}}</span>\n @if (!isLast) {\n <i\n class=\"ec-icon icon-angle-down rotate-270 ml-2\"></i>\n }\n </div>\n}",
|
|
14365
|
+
styles: [":host{display:flex;align-items:center;padding:0 1rem}.progress-tab{display:flex;align-items:center}.progress-tab.is-active{font-weight:700}\n"],
|
|
14349
14366
|
dependencies: [{
|
|
14350
14367
|
kind: "pipe",
|
|
14351
14368
|
type: i2.TranslatePipe,
|
|
@@ -14366,8 +14383,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
14366
14383
|
selector: "ec-wizard-progress",
|
|
14367
14384
|
changeDetection: ChangeDetectionStrategy.Eager,
|
|
14368
14385
|
standalone: false,
|
|
14369
|
-
template: "@for (tab of tabGroup?.items; track tab; let index = $index; let isFirst = $first; let isLast = $last) {\n <div\n class=\"progress-tab\"\n [class.ml-2]=\"!isFirst\"\n [class.is-active]=\"currentTab?.id === tab.id\">\n @if (tab.completed) {\n <i\n class=\"ec-icon icon-check-circle mr-1 font-color-success\"
|
|
14370
|
-
styles: [":host{display:flex;align-items:center;padding:0 1rem}.progress-tab{display:flex;align-items:center}.progress-tab.is-active{font-weight:700}
|
|
14386
|
+
template: "@for (tab of tabGroup?.items; track tab; let index = $index; let isFirst = $first; let isLast = $last) {\n <div\n class=\"progress-tab\"\n [class.ml-2]=\"!isFirst\"\n [class.is-active]=\"currentTab?.id === tab.id\">\n @if (tab.completed) {\n <i\n class=\"ec-icon icon-check-circle mr-1 font-color-success\"></i>\n }\n @if (!tab.completed) {\n <span>{{index+1}}. </span>\n }\n <span>{{tab.label | translate}}</span>\n @if (!isLast) {\n <i\n class=\"ec-icon icon-angle-down rotate-270 ml-2\"></i>\n }\n </div>\n}",
|
|
14387
|
+
styles: [":host{display:flex;align-items:center;padding:0 1rem}.progress-tab{display:flex;align-items:center}.progress-tab.is-active{font-weight:700}\n"]
|
|
14371
14388
|
}]
|
|
14372
14389
|
}],
|
|
14373
14390
|
ctorParameters: () => [],
|