@energycap/components 0.41.0 → 0.41.1-ECAP-27592-angular-17.20241219-1718
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/{esm2020 → esm2022}/energycap-components.mjs +4 -4
- package/{esm2020 → esm2022}/lib/components.module.mjs +418 -418
- package/{esm2020 → esm2022}/lib/controls/banner/banner.component.mjs +109 -109
- package/{esm2020 → esm2022}/lib/controls/button/button.component.mjs +106 -106
- package/{esm2020 → esm2022}/lib/controls/button/copy-button-base.directive.mjs +67 -67
- package/{esm2020 → esm2022}/lib/controls/button/copy-button.directive.mjs +28 -28
- package/{esm2020 → esm2022}/lib/controls/button/copy-table-button.directive.mjs +43 -43
- package/{esm2020 → esm2022}/lib/controls/calendar/calendar-item.component.mjs +59 -59
- package/{esm2020 → esm2022}/lib/controls/calendar/calendar.component.mjs +200 -200
- package/{esm2020 → esm2022}/lib/controls/calendar/calendar.types.mjs +3 -3
- package/{esm2020 → esm2022}/lib/controls/checkbox/checkbox.component.mjs +140 -140
- package/{esm2020 → esm2022}/lib/controls/collapsible-toggle/collapsible-toggle.component.mjs +38 -38
- package/{esm2020 → esm2022}/lib/controls/combobox/combobox.component.mjs +879 -879
- package/{esm2020 → esm2022}/lib/controls/date-input/date-input.component.mjs +256 -256
- package/{esm2020 → esm2022}/lib/controls/dropdown/dropdown.component.mjs +243 -243
- package/{esm2020 → esm2022}/lib/controls/file-upload/file-upload.component.mjs +261 -261
- package/{esm2020 → esm2022}/lib/controls/form-control/form-control.component.mjs +104 -104
- package/{esm2020 → esm2022}/lib/controls/form-control-base.mjs +151 -151
- package/{esm2020 → esm2022}/lib/controls/form-control-label/form-control-label.component.mjs +136 -136
- package/{esm2020 → esm2022}/lib/controls/form-group/form-group.component.mjs +261 -261
- package/{esm2020 → esm2022}/lib/controls/help-popover/help-popover.component.mjs +31 -31
- package/{esm2020 → esm2022}/lib/controls/item-picker/item-picker.component.mjs +329 -329
- package/{esm2020 → esm2022}/lib/controls/link-button/link-button.component.mjs +11 -11
- package/{esm2020 → esm2022}/lib/controls/menu/menu.component.mjs +485 -485
- package/{esm2020 → esm2022}/lib/controls/navigation/link-item.mjs +1 -1
- package/{esm2020 → esm2022}/lib/controls/navigation/nav-group.mjs +38 -38
- package/{esm2020 → esm2022}/lib/controls/navigation/nav-item-active.directive.mjs +92 -92
- package/{esm2020 → esm2022}/lib/controls/navigation/nav-item.mjs +1 -1
- package/{esm2020 → esm2022}/lib/controls/numericbox/numericbox.component.mjs +372 -372
- package/{esm2020 → esm2022}/lib/controls/popover/popover.component.mjs +117 -117
- package/{esm2020 → esm2022}/lib/controls/radio-button/radio-button-option.mjs +2 -2
- package/{esm2020 → esm2022}/lib/controls/radio-button/radio-button.component.mjs +82 -82
- package/{esm2020 → esm2022}/lib/controls/select/select.component.mjs +88 -88
- package/{esm2020 → esm2022}/lib/controls/tabs/tabs.component.mjs +47 -47
- package/{esm2020 → esm2022}/lib/controls/textbox/textbox.component.mjs +155 -155
- package/{esm2020 → esm2022}/lib/core/cache.service.mjs +105 -105
- package/esm2022/lib/core/custom-validators.mjs +29 -0
- package/esm2022/lib/core/date-time-helper.mjs +220 -0
- package/{esm2020 → esm2022}/lib/core/error.service.mjs +61 -61
- package/{esm2020 → esm2022}/lib/core/router-helper.service.mjs +111 -111
- package/{esm2020 → esm2022}/lib/core/scroll.service.mjs +89 -89
- package/{esm2020 → esm2022}/lib/core/telemetry-tracker.service.mjs +16 -16
- package/{esm2020 → esm2022}/lib/core/telemetry.service.mjs +38 -38
- package/{esm2020 → esm2022}/lib/core/validation-message.service.mjs +185 -185
- package/{esm2020 → esm2022}/lib/core/validation-patterns.mjs +30 -30
- package/{esm2020 → esm2022}/lib/core/window.service.mjs +186 -186
- package/{esm2020 → esm2022}/lib/display/app-bar/app-bar.component.mjs +46 -46
- package/esm2022/lib/display/avatar/avatar.component.mjs +67 -0
- package/{esm2020 → esm2022}/lib/display/avatar/avatar.service.mjs +64 -64
- package/{esm2020 → esm2022}/lib/display/confirm/confirm.component.mjs +168 -168
- package/{esm2020 → esm2022}/lib/display/dialog/dialog-content.mjs +1 -1
- package/{esm2020 → esm2022}/lib/display/dialog/dialog-group/dialog-group.component.mjs +63 -63
- package/{esm2020 → esm2022}/lib/display/dialog/dialog-types.mjs +76 -76
- package/{esm2020 → esm2022}/lib/display/dialog/dialog.component.mjs +281 -281
- package/{esm2020 → esm2022}/lib/display/dialog/dialog.service.mjs +71 -71
- package/{esm2020 → esm2022}/lib/display/help/help-types.mjs +1 -1
- package/{esm2020 → esm2022}/lib/display/hierarchy/hierarchy-base.mjs +111 -111
- package/{esm2020 → esm2022}/lib/display/hierarchy/hierarchy-mocks.spec.mjs +53 -53
- package/{esm2020 → esm2022}/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.mjs +61 -61
- package/{esm2020 → esm2022}/lib/display/item-display/item-display.component.mjs +81 -81
- package/{esm2020 → esm2022}/lib/display/json-display/json-display.component.mjs +47 -47
- package/{esm2020 → esm2022}/lib/display/resizable/resizable-base.mjs +120 -120
- package/{esm2020 → esm2022}/lib/display/resizable/resizable.component.mjs +52 -52
- package/{esm2020 → esm2022}/lib/display/spinner/spinner.component.mjs +12 -12
- package/{esm2020 → esm2022}/lib/display/splash/splash.component.mjs +42 -42
- package/{esm2020 → esm2022}/lib/display/splash/splash.service.mjs +35 -35
- package/{esm2020 → esm2022}/lib/display/table/resizable-column.component.mjs +20 -20
- package/{esm2020 → esm2022}/lib/display/table/resizable-table.directive.mjs +227 -227
- package/{esm2020 → esm2022}/lib/display/table/searchable-table.component.mjs +342 -342
- package/{esm2020 → esm2022}/lib/display/table/table-detail-row.component.mjs +19 -19
- package/{esm2020 → esm2022}/lib/display/table/table-locked-column.component.mjs +58 -58
- package/{esm2020 → esm2022}/lib/display/table/table-master-header-row.component.mjs +14 -14
- package/{esm2020 → esm2022}/lib/display/table/table-master-row.component.mjs +163 -163
- package/{esm2020 → esm2022}/lib/display/table/table-pagination.component.mjs +155 -155
- package/{esm2020 → esm2022}/lib/display/table/table-selectable-row.component.mjs +235 -235
- package/{esm2020 → esm2022}/lib/display/table/table.component.mjs +249 -249
- package/{esm2020 → esm2022}/lib/display/tags/tag.mjs +17 -17
- package/{esm2020 → esm2022}/lib/display/tags/tags.component.mjs +77 -77
- package/{esm2020 → esm2022}/lib/display/toast/toast/toast.component.mjs +77 -77
- package/{esm2020 → esm2022}/lib/display/toast/toast-types.mjs +7 -7
- package/{esm2020 → esm2022}/lib/display/toast/toast.service.mjs +35 -35
- package/{esm2020 → esm2022}/lib/display/toast/toaster/toaster.component.mjs +114 -114
- package/{esm2020 → esm2022}/lib/display/tooltip/tooltip.component.mjs +28 -28
- package/{esm2020 → esm2022}/lib/display/tooltip/tooltip.service.mjs +78 -78
- package/{esm2020 → esm2022}/lib/display/tooltip-directive/tooltip.directive.mjs +173 -173
- package/{esm2020 → esm2022}/lib/display/tour/tour-types.mjs +33 -33
- package/{esm2020 → esm2022}/lib/display/tour/tour.component.mjs +398 -398
- package/{esm2020 → esm2022}/lib/display/tour/tour.service.mjs +75 -75
- package/{esm2020 → esm2022}/lib/display/tree/tree.component.mjs +135 -135
- package/{esm2020 → esm2022}/lib/display/view-overlay/view-overlay.component.mjs +58 -58
- package/{esm2020 → esm2022}/lib/shared/directives/click-area-for/click-area-for.directive.mjs +32 -32
- package/{esm2020 → esm2022}/lib/shared/directives/if-viewport-width/if-viewport-width.directive.mjs +111 -111
- package/esm2022/lib/shared/directives/popup/popup-container.directive.mjs +166 -0
- package/{esm2020 → esm2022}/lib/shared/display/pipes/date-display.pipe.mjs +50 -50
- package/{esm2020 → esm2022}/lib/shared/display/pipes/highlight-text.pipe.mjs +30 -30
- package/{esm2020 → esm2022}/lib/shared/display/pipes/relative-date.pipe.mjs +62 -62
- package/{esm2020 → esm2022}/lib/shared/display/pipes/row-count.pipe.mjs +48 -48
- package/{esm2020 → esm2022}/lib/shared/display/pipes/time-display.pipe.mjs +41 -41
- package/esm2022/lib/shared/display.mjs +6 -0
- package/esm2022/lib/shared/form-group.helper.mjs +67 -0
- package/{esm2020 → esm2022}/lib/shared/json-helper.mjs +18 -18
- package/esm2022/lib/shared/lodash-helper.mjs +52 -0
- package/{esm2020 → esm2022}/lib/shared/page/page-base/page-base.component.mjs +387 -387
- package/{esm2020 → esm2022}/lib/shared/page/page-statuses.mjs +22 -22
- package/{esm2020 → esm2022}/lib/shared/page/page-title/page-title.component.mjs +23 -23
- package/{esm2020 → esm2022}/lib/shared/page/page-view/page-view.component.mjs +147 -147
- package/{esm2020 → esm2022}/lib/shared/testing/copy-button-base-test-injector-factory.spec.mjs +16 -16
- package/{esm2020 → esm2022}/lib/shared/testing/hierarchy-base-test-injector-factory.spec.mjs +16 -16
- package/{esm2020 → esm2022}/lib/shared/testing/page-base-component-test-helper.spec.mjs +37 -37
- package/esm2022/lib/shared/testing/page-base-component-test-injector-factory.spec.mjs +98 -0
- package/{esm2020 → esm2022}/lib/shared/testing/public-mocks.spec.mjs +148 -148
- package/{esm2020 → esm2022}/lib/shared/testing/spy-factory.spec.mjs +39 -39
- package/{esm2020 → esm2022}/lib/shared/testing/translation-mocks.spec.mjs +56 -56
- package/{esm2020 → esm2022}/lib/shared/user-preference.service.mjs +17 -17
- package/{esm2020 → esm2022}/lib/shared/wizard/wizard-base/wizard-base.component.mjs +246 -246
- package/{esm2020 → esm2022}/lib/shared/wizard/wizard-buttons/wizard-buttons.component.mjs +68 -68
- package/{esm2020 → esm2022}/lib/shared/wizard/wizard-progress/wizard-progress.component.mjs +18 -18
- package/{esm2020 → esm2022}/public-api.mjs +114 -114
- package/{fesm2020 → fesm2022}/energycap-components.mjs +11797 -11793
- package/fesm2022/energycap-components.mjs.map +1 -0
- package/index.d.ts +5 -5
- package/lib/components.module.d.ts +91 -91
- package/lib/controls/banner/banner.component.d.ts +50 -50
- package/lib/controls/button/button.component.d.ts +78 -78
- package/lib/controls/button/copy-button-base.directive.d.ts +20 -20
- package/lib/controls/button/copy-button.directive.d.ts +14 -14
- package/lib/controls/button/copy-table-button.directive.d.ts +19 -19
- package/lib/controls/calendar/calendar-item.component.d.ts +17 -17
- package/lib/controls/calendar/calendar.component.d.ts +54 -54
- package/lib/controls/calendar/calendar.types.d.ts +7 -7
- package/lib/controls/checkbox/checkbox.component.d.ts +65 -65
- package/lib/controls/collapsible-toggle/collapsible-toggle.component.d.ts +25 -25
- package/lib/controls/combobox/combobox.component.d.ts +418 -418
- package/lib/controls/date-input/date-input.component.d.ts +80 -80
- package/lib/controls/dropdown/dropdown.component.d.ts +161 -161
- package/lib/controls/file-upload/file-upload.component.d.ts +124 -124
- package/lib/controls/form-control/form-control.component.d.ts +30 -30
- package/lib/controls/form-control-base.d.ts +110 -110
- package/lib/controls/form-control-label/form-control-label.component.d.ts +73 -73
- package/lib/controls/form-group/form-group.component.d.ts +105 -105
- package/lib/controls/help-popover/help-popover.component.d.ts +11 -11
- package/lib/controls/item-picker/item-picker.component.d.ts +164 -164
- package/lib/controls/link-button/link-button.component.d.ts +5 -5
- package/lib/controls/menu/menu.component.d.ts +255 -255
- package/lib/controls/navigation/link-item.d.ts +32 -32
- package/lib/controls/navigation/nav-group.d.ts +18 -18
- package/lib/controls/navigation/nav-item-active.directive.d.ts +42 -42
- package/lib/controls/navigation/nav-item.d.ts +31 -31
- package/lib/controls/numericbox/numericbox.component.d.ts +148 -148
- package/lib/controls/popover/popover.component.d.ts +51 -51
- package/lib/controls/radio-button/radio-button-option.d.ts +19 -19
- package/lib/controls/radio-button/radio-button.component.d.ts +53 -53
- package/lib/controls/select/select.component.d.ts +44 -44
- package/lib/controls/tabs/tabs.component.d.ts +30 -30
- package/lib/controls/textbox/textbox.component.d.ts +107 -107
- package/lib/core/cache.service.d.ts +33 -33
- package/lib/core/custom-validators.d.ts +20 -20
- package/lib/core/date-time-helper.d.ts +101 -101
- package/lib/core/error.service.d.ts +20 -20
- package/lib/core/router-helper.service.d.ts +48 -48
- package/lib/core/scroll.service.d.ts +36 -36
- package/lib/core/telemetry-tracker.service.d.ts +13 -13
- package/lib/core/telemetry.service.d.ts +31 -31
- package/lib/core/validation-message.service.d.ts +26 -26
- package/lib/core/validation-patterns.d.ts +22 -22
- package/lib/core/window.service.d.ts +116 -116
- package/lib/display/app-bar/app-bar.component.d.ts +20 -20
- package/lib/display/avatar/avatar.component.d.ts +35 -35
- package/lib/display/avatar/avatar.service.d.ts +24 -24
- package/lib/display/confirm/confirm.component.d.ts +123 -123
- package/lib/display/dialog/dialog-content.d.ts +19 -19
- package/lib/display/dialog/dialog-group/dialog-group.component.d.ts +32 -32
- package/lib/display/dialog/dialog-types.d.ts +130 -130
- package/lib/display/dialog/dialog.component.d.ts +120 -120
- package/lib/display/dialog/dialog.service.d.ts +48 -48
- package/lib/display/help/help-types.d.ts +33 -33
- package/lib/display/hierarchy/hierarchy-base.d.ts +97 -97
- package/lib/display/hierarchy/hierarchy-mocks.spec.d.ts +53 -53
- package/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.d.ts +34 -34
- package/lib/display/item-display/item-display.component.d.ts +43 -43
- package/lib/display/json-display/json-display.component.d.ts +16 -16
- package/lib/display/resizable/resizable-base.d.ts +67 -67
- package/lib/display/resizable/resizable.component.d.ts +31 -31
- package/lib/display/spinner/spinner.component.d.ts +5 -5
- package/lib/display/splash/splash.component.d.ts +16 -16
- package/lib/display/splash/splash.service.d.ts +22 -22
- package/lib/display/table/resizable-column.component.d.ts +10 -10
- package/lib/display/table/resizable-table.directive.d.ts +93 -93
- package/lib/display/table/searchable-table.component.d.ts +206 -206
- package/lib/display/table/table-detail-row.component.d.ts +8 -8
- package/lib/display/table/table-locked-column.component.d.ts +20 -20
- package/lib/display/table/table-master-header-row.component.d.ts +9 -9
- package/lib/display/table/table-master-row.component.d.ts +113 -113
- package/lib/display/table/table-pagination.component.d.ts +91 -91
- package/lib/display/table/table-selectable-row.component.d.ts +102 -102
- package/lib/display/table/table.component.d.ts +121 -121
- package/lib/display/tags/tag.d.ts +18 -18
- package/lib/display/tags/tags.component.d.ts +48 -48
- package/lib/display/toast/toast/toast.component.d.ts +23 -23
- package/lib/display/toast/toast-types.d.ts +24 -24
- package/lib/display/toast/toast.service.d.ts +20 -20
- package/lib/display/toast/toaster/toaster.component.d.ts +35 -35
- package/lib/display/tooltip/tooltip.component.d.ts +70 -70
- package/lib/display/tooltip/tooltip.service.d.ts +16 -16
- package/lib/display/tooltip-directive/tooltip.directive.d.ts +44 -44
- package/lib/display/tour/tour-types.d.ts +70 -70
- package/lib/display/tour/tour.component.d.ts +147 -147
- package/lib/display/tour/tour.service.d.ts +38 -38
- package/lib/display/tree/tree.component.d.ts +75 -75
- package/lib/display/view-overlay/view-overlay.component.d.ts +38 -38
- package/lib/shared/directives/click-area-for/click-area-for.directive.d.ts +14 -14
- package/lib/shared/directives/if-viewport-width/if-viewport-width.directive.d.ts +60 -60
- package/lib/shared/directives/popup/popup-container.directive.d.ts +101 -101
- package/lib/shared/display/pipes/date-display.pipe.d.ts +21 -21
- package/lib/shared/display/pipes/highlight-text.pipe.d.ts +9 -9
- package/lib/shared/display/pipes/relative-date.pipe.d.ts +36 -36
- package/lib/shared/display/pipes/row-count.pipe.d.ts +23 -23
- package/lib/shared/display/pipes/time-display.pipe.d.ts +18 -18
- package/lib/shared/display.d.ts +42 -42
- package/lib/shared/form-group.helper.d.ts +31 -31
- package/lib/shared/json-helper.d.ts +7 -7
- package/lib/shared/lodash-helper.d.ts +18 -18
- package/lib/shared/page/page-base/page-base.component.d.ts +259 -259
- package/lib/shared/page/page-statuses.d.ts +13 -13
- package/lib/shared/page/page-title/page-title.component.d.ts +9 -9
- package/lib/shared/page/page-view/page-view.component.d.ts +102 -102
- package/lib/shared/testing/copy-button-base-test-injector-factory.spec.d.ts +4 -4
- package/lib/shared/testing/hierarchy-base-test-injector-factory.spec.d.ts +4 -4
- package/lib/shared/testing/page-base-component-test-helper.spec.d.ts +30 -30
- package/lib/shared/testing/page-base-component-test-injector-factory.spec.d.ts +28 -28
- package/lib/shared/testing/public-mocks.spec.d.ts +90 -90
- package/lib/shared/testing/spy-factory.spec.d.ts +27 -27
- package/lib/shared/testing/translation-mocks.spec.d.ts +30 -30
- package/lib/shared/user-preference.service.d.ts +13 -13
- package/lib/shared/wizard/wizard-base/wizard-base.component.d.ts +134 -134
- package/lib/shared/wizard/wizard-buttons/wizard-buttons.component.d.ts +27 -27
- package/lib/shared/wizard/wizard-progress/wizard-progress.component.d.ts +10 -10
- package/package.json +12 -18
- package/public-api.d.ts +111 -111
- package/schematics/rxjs-7-upgrade/index.d.ts +3 -3
- package/schematics/rxjs-7-upgrade/index.js +67 -67
- package/schematics/rxjs-7-upgrade/schema.d.ts +4 -4
- package/schematics/rxjs-7-upgrade/schema.js +2 -2
- package/schematics/utilities/typescript.d.ts +7 -7
- package/schematics/utilities/typescript.js +41 -41
- package/schematics/utilities/workspace.d.ts +8 -8
- package/schematics/utilities/workspace.js +71 -71
- package/esm2020/lib/core/custom-validators.mjs +0 -29
- package/esm2020/lib/core/date-time-helper.mjs +0 -220
- package/esm2020/lib/display/avatar/avatar.component.mjs +0 -67
- package/esm2020/lib/shared/directives/popup/popup-container.directive.mjs +0 -163
- package/esm2020/lib/shared/display.mjs +0 -6
- package/esm2020/lib/shared/form-group.helper.mjs +0 -67
- package/esm2020/lib/shared/lodash-helper.mjs +0 -51
- package/esm2020/lib/shared/testing/page-base-component-test-injector-factory.spec.mjs +0 -98
- package/fesm2015/energycap-components.mjs +0 -12211
- package/fesm2015/energycap-components.mjs.map +0 -1
- package/fesm2020/energycap-components.mjs.map +0 -1
@@ -1,63 +1,63 @@
|
|
1
|
-
import { Component } from '@angular/core';
|
2
|
-
import { Subject } from 'rxjs';
|
3
|
-
import { filter, takeUntil } from 'rxjs/operators';
|
4
|
-
import { DialogCloseEvent, DialogCloseLatestEvent, DialogOpenStartEvent } from '../dialog-types';
|
5
|
-
import * as i0 from "@angular/core";
|
6
|
-
import * as i1 from "../dialog.service";
|
7
|
-
import * as i2 from "@angular/common";
|
8
|
-
import * as i3 from "../dialog.component";
|
9
|
-
export class DialogGroupComponent {
|
10
|
-
constructor(dialogService) {
|
11
|
-
this.dialogService = dialogService;
|
12
|
-
this.activeDialogEvents = [];
|
13
|
-
this.destroyed = new Subject();
|
14
|
-
}
|
15
|
-
/**When the group component is created, start watching for any DialogOpenStart events
|
16
|
-
* so that the group can react and make the matching dialog. New dialogs get assigned unique
|
17
|
-
* eventIds so that when they close we know exactly which one is done and we can take it
|
18
|
-
* out of the list of active dialogs
|
19
|
-
*/
|
20
|
-
ngOnInit() {
|
21
|
-
this.dialogService.events.pipe(filter(event => event instanceof DialogOpenStartEvent || event instanceof DialogCloseLatestEvent), takeUntil(this.destroyed)).subscribe(event => {
|
22
|
-
if (event instanceof DialogOpenStartEvent) {
|
23
|
-
this.activeDialogEvents.push(event);
|
24
|
-
}
|
25
|
-
else if (event instanceof DialogCloseLatestEvent && this.activeDialogEvents.length > 0) {
|
26
|
-
let sourceEvent = this.activeDialogEvents[this.activeDialogEvents.length - 1];
|
27
|
-
this.dialogService.triggerEvent(new DialogCloseEvent(sourceEvent.eventId, sourceEvent.dialogId, event.dialogResult?.save, event.dialogResult?.context));
|
28
|
-
this.dialogClosed(sourceEvent);
|
29
|
-
}
|
30
|
-
});
|
31
|
-
}
|
32
|
-
/** When the dialog group is destroyed we no longer want to listen for any open events. */
|
33
|
-
ngOnDestroy() {
|
34
|
-
this.destroyed.next();
|
35
|
-
this.destroyed.unsubscribe();
|
36
|
-
}
|
37
|
-
/**The dialog component completed opening (including animation delay) and
|
38
|
-
* emits an event that tells us it is ready. The group can then pump out a dialog
|
39
|
-
* openEnd event (kinda NavigationEnd in the router) to tell anybody who cares that
|
40
|
-
* the dialog is now ready.
|
41
|
-
*/
|
42
|
-
dialogOpened(dialogOpenEvent, dialogId) {
|
43
|
-
dialogOpenEvent.dialogId = dialogId;
|
44
|
-
}
|
45
|
-
/** The dialog has closed (after animation delay) and emitted an event to tell the hosting component.
|
46
|
-
* We handle the event and pump a matching DialogCloseEvent so that anybody who cares can know that the
|
47
|
-
* dialog instance referenced by dialogOpenEvent.eventId is gone now. We remove it from our list of
|
48
|
-
* active dialogs which pulls it out of the DOM too
|
49
|
-
*/
|
50
|
-
dialogClosed(dialogOpenEvent) {
|
51
|
-
const index = this.activeDialogEvents.findIndex(d => d === dialogOpenEvent);
|
52
|
-
if (index >= 0) {
|
53
|
-
this.activeDialogEvents.splice(index, 1);
|
54
|
-
}
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
60
|
-
type: Component,
|
61
|
-
args: [{ selector: 'ec-dialog-group', template: "<ec-dialog *ngFor=\"let dialog of activeDialogEvents\"\r\n [dialogOpenStartEventId]=\"dialog.eventId\"\r\n [size]=\"dialog.options?.size\"\r\n [content]=\"dialog.content\"\r\n [context]=\"dialog.context\"\r\n [options]=\"dialog.options\"\r\n (opened)=\"dialogOpened(dialog, $event)\"\r\n (closed)=\"dialogClosed(dialog)\">\r\n</ec-dialog>", styles: ["ec-dialog:not(:only-child){--ec-dialog-background-color: transparent}ec-dialog:not(:only-child):last-child,ec-dialog:not(:only-child):nth-last-child(2){--ec-dialog-background-color: var(--ec-background-color-dialog-stacked)}\n"] }]
|
62
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }]; } });
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { Component } from '@angular/core';
|
2
|
+
import { Subject } from 'rxjs';
|
3
|
+
import { filter, takeUntil } from 'rxjs/operators';
|
4
|
+
import { DialogCloseEvent, DialogCloseLatestEvent, DialogOpenStartEvent } from '../dialog-types';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "../dialog.service";
|
7
|
+
import * as i2 from "@angular/common";
|
8
|
+
import * as i3 from "../dialog.component";
|
9
|
+
export class DialogGroupComponent {
|
10
|
+
constructor(dialogService) {
|
11
|
+
this.dialogService = dialogService;
|
12
|
+
this.activeDialogEvents = [];
|
13
|
+
this.destroyed = new Subject();
|
14
|
+
}
|
15
|
+
/**When the group component is created, start watching for any DialogOpenStart events
|
16
|
+
* so that the group can react and make the matching dialog. New dialogs get assigned unique
|
17
|
+
* eventIds so that when they close we know exactly which one is done and we can take it
|
18
|
+
* out of the list of active dialogs
|
19
|
+
*/
|
20
|
+
ngOnInit() {
|
21
|
+
this.dialogService.events.pipe(filter(event => event instanceof DialogOpenStartEvent || event instanceof DialogCloseLatestEvent), takeUntil(this.destroyed)).subscribe(event => {
|
22
|
+
if (event instanceof DialogOpenStartEvent) {
|
23
|
+
this.activeDialogEvents.push(event);
|
24
|
+
}
|
25
|
+
else if (event instanceof DialogCloseLatestEvent && this.activeDialogEvents.length > 0) {
|
26
|
+
let sourceEvent = this.activeDialogEvents[this.activeDialogEvents.length - 1];
|
27
|
+
this.dialogService.triggerEvent(new DialogCloseEvent(sourceEvent.eventId, sourceEvent.dialogId, event.dialogResult?.save, event.dialogResult?.context));
|
28
|
+
this.dialogClosed(sourceEvent);
|
29
|
+
}
|
30
|
+
});
|
31
|
+
}
|
32
|
+
/** When the dialog group is destroyed we no longer want to listen for any open events. */
|
33
|
+
ngOnDestroy() {
|
34
|
+
this.destroyed.next();
|
35
|
+
this.destroyed.unsubscribe();
|
36
|
+
}
|
37
|
+
/**The dialog component completed opening (including animation delay) and
|
38
|
+
* emits an event that tells us it is ready. The group can then pump out a dialog
|
39
|
+
* openEnd event (kinda NavigationEnd in the router) to tell anybody who cares that
|
40
|
+
* the dialog is now ready.
|
41
|
+
*/
|
42
|
+
dialogOpened(dialogOpenEvent, dialogId) {
|
43
|
+
dialogOpenEvent.dialogId = dialogId;
|
44
|
+
}
|
45
|
+
/** The dialog has closed (after animation delay) and emitted an event to tell the hosting component.
|
46
|
+
* We handle the event and pump a matching DialogCloseEvent so that anybody who cares can know that the
|
47
|
+
* dialog instance referenced by dialogOpenEvent.eventId is gone now. We remove it from our list of
|
48
|
+
* active dialogs which pulls it out of the DOM too
|
49
|
+
*/
|
50
|
+
dialogClosed(dialogOpenEvent) {
|
51
|
+
const index = this.activeDialogEvents.findIndex(d => d === dialogOpenEvent);
|
52
|
+
if (index >= 0) {
|
53
|
+
this.activeDialogEvents.splice(index, 1);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogGroupComponent, deps: [{ token: i1.DialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DialogGroupComponent, selector: "ec-dialog-group", ngImport: i0, template: "<ec-dialog *ngFor=\"let dialog of activeDialogEvents\"\r\n [dialogOpenStartEventId]=\"dialog.eventId\"\r\n [size]=\"dialog.options?.size\"\r\n [content]=\"dialog.content\"\r\n [context]=\"dialog.context\"\r\n [options]=\"dialog.options\"\r\n (opened)=\"dialogOpened(dialog, $event)\"\r\n (closed)=\"dialogClosed(dialog)\">\r\n</ec-dialog>", styles: ["ec-dialog:not(:only-child){--ec-dialog-background-color: transparent}ec-dialog:not(:only-child):last-child,ec-dialog:not(:only-child):nth-last-child(2){--ec-dialog-background-color: var(--ec-background-color-dialog-stacked)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3.DialogComponent, selector: "ec-dialog", inputs: ["size", "content", "context", "options", "dialogOpenStartEventId"], outputs: ["opened", "closed"] }] }); }
|
58
|
+
}
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DialogGroupComponent, decorators: [{
|
60
|
+
type: Component,
|
61
|
+
args: [{ selector: 'ec-dialog-group', template: "<ec-dialog *ngFor=\"let dialog of activeDialogEvents\"\r\n [dialogOpenStartEventId]=\"dialog.eventId\"\r\n [size]=\"dialog.options?.size\"\r\n [content]=\"dialog.content\"\r\n [context]=\"dialog.context\"\r\n [options]=\"dialog.options\"\r\n (opened)=\"dialogOpened(dialog, $event)\"\r\n (closed)=\"dialogClosed(dialog)\">\r\n</ec-dialog>", styles: ["ec-dialog:not(:only-child){--ec-dialog-background-color: transparent}ec-dialog:not(:only-child):last-child,ec-dialog:not(:only-child):nth-last-child(2){--ec-dialog-background-color: var(--ec-background-color-dialog-stacked)}\n"] }]
|
62
|
+
}], ctorParameters: function () { return [{ type: i1.DialogService }]; } });
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLWdyb3VwLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvbXBvbmVudHMvc3JjL2xpYi9kaXNwbGF5L2RpYWxvZy9kaWFsb2ctZ3JvdXAvZGlhbG9nLWdyb3VwLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvbXBvbmVudHMvc3JjL2xpYi9kaXNwbGF5L2RpYWxvZy9kaWFsb2ctZ3JvdXAvZGlhbG9nLWdyb3VwLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQXFCLE1BQU0sZUFBZSxDQUFDO0FBQzdELE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDL0IsT0FBTyxFQUFFLE1BQU0sRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUNuRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsc0JBQXNCLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQzs7Ozs7QUFRakcsTUFBTSxPQUFPLG9CQUFvQjtJQUsvQ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CJkaWFsb2dPcGVuZWQoZGlhbG9nLCAkZXZlbnQpXCJcclxuICAgICAgICAgICAoY2xvc2VkKT1cImRpYWxvZ0Nsb3NlZChkaWFsb2cpXCI+XHJcbjwvZWMtZGlhbG9nPiJdfQ==
|
@@ -1,77 +1,77 @@
|
|
1
|
-
import { uniqueId } from 'lodash';
|
2
|
-
/**A base class from which all dialog events extend. This class models the dialog actions very much
|
3
|
-
* like the Angular RouterEvents.
|
4
|
-
*/
|
5
|
-
export class DialogEvent {
|
6
|
-
constructor(
|
7
|
-
/**A unique value representing this particular instance of the event, used to match open and close events together */
|
8
|
-
eventId,
|
9
|
-
/**The ID of the dialog itself, typically matching the DialogContent. Something like "DeleteConfirmation" or "EditReading" etc.
|
10
|
-
* Useful for telemetry logging to track users opening and closing dialogs
|
11
|
-
*/
|
12
|
-
dialogId = '',
|
13
|
-
/** The action the dialog event represents. Can also be determined by using the class of the event with the
|
14
|
-
* instanceof operator.
|
15
|
-
*/
|
16
|
-
dialogAction = 'openStart') {
|
17
|
-
this.eventId = eventId;
|
18
|
-
this.dialogId = dialogId;
|
19
|
-
this.dialogAction = dialogAction;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
/**Emitted when the dialog open has been triggered, but the dialog itself hasn't initialized yet.
|
23
|
-
* This event creates its own unique identifier so that that particular instance of the dialog can be found
|
24
|
-
* when closed later on. The context is used to fill the dialog itself, and may include state or callbacks.
|
25
|
-
* Various options are available to change the dialog appearance. These events are generally created
|
26
|
-
* by the @see DialogService.open() call
|
27
|
-
*/
|
28
|
-
export class DialogOpenStartEvent extends DialogEvent {
|
29
|
-
constructor(content, context, options) {
|
30
|
-
super(uniqueId());
|
31
|
-
this.content = content;
|
32
|
-
this.context = context;
|
33
|
-
this.options = options;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
/**Emitted when the dialog has finished opening and been properly initialized. It includes
|
37
|
-
* the eventId, which uniquely identifies the particular instance of the dialog open event so that we can
|
38
|
-
* close that specific dialog later on. The dialogId can be used for telemetry, and may be set to something
|
39
|
-
* like "Confirm Delete" or "Edit Reading" etc.
|
40
|
-
*/
|
41
|
-
export class DialogOpenEndEvent extends DialogEvent {
|
42
|
-
constructor(eventId, dialogId) {
|
43
|
-
super(eventId, dialogId, 'open');
|
44
|
-
}
|
45
|
-
}
|
46
|
-
/**Emitted when the dialog close has completed and a result is available. Check result.save to know if the dialog change
|
47
|
-
* was committed (true) or cancelled (false). Cancel can be set if the dialog was automatically closed by clicking in the
|
48
|
-
* background or resizing the window when using the panel view or closeOnResize.
|
49
|
-
*/
|
50
|
-
export class DialogCloseEvent extends DialogEvent {
|
51
|
-
constructor(eventId, dialogId, save = false, context) {
|
52
|
-
super(eventId, dialogId, 'close');
|
53
|
-
this.dialogResult = new DialogResult(save, context);
|
54
|
-
}
|
55
|
-
}
|
56
|
-
/**Used to tell the dialog group to close whatever dialog was opened most recently with the given result
|
57
|
-
* This allows a TemplateRef based panel (that's not coming from DialogComponent) to close itself or
|
58
|
-
* an external process to close a dialog that is open
|
59
|
-
*/
|
60
|
-
export class DialogCloseLatestEvent extends DialogEvent {
|
61
|
-
constructor(result) {
|
62
|
-
super('latest', 'latest', 'closeLatest');
|
63
|
-
this.dialogResult = result;
|
64
|
-
}
|
65
|
-
}
|
66
|
-
/**
|
67
|
-
* Returned when a dialog is closed.
|
68
|
-
* Specifies if the dialog was saved and contains an optional context.
|
69
|
-
*/
|
70
|
-
export class DialogResult {
|
71
|
-
constructor(save, context) {
|
72
|
-
this.save = save;
|
73
|
-
this.context = context;
|
74
|
-
}
|
75
|
-
}
|
76
|
-
;
|
1
|
+
import { uniqueId } from 'lodash';
|
2
|
+
/**A base class from which all dialog events extend. This class models the dialog actions very much
|
3
|
+
* like the Angular RouterEvents.
|
4
|
+
*/
|
5
|
+
export class DialogEvent {
|
6
|
+
constructor(
|
7
|
+
/**A unique value representing this particular instance of the event, used to match open and close events together */
|
8
|
+
eventId,
|
9
|
+
/**The ID of the dialog itself, typically matching the DialogContent. Something like "DeleteConfirmation" or "EditReading" etc.
|
10
|
+
* Useful for telemetry logging to track users opening and closing dialogs
|
11
|
+
*/
|
12
|
+
dialogId = '',
|
13
|
+
/** The action the dialog event represents. Can also be determined by using the class of the event with the
|
14
|
+
* instanceof operator.
|
15
|
+
*/
|
16
|
+
dialogAction = 'openStart') {
|
17
|
+
this.eventId = eventId;
|
18
|
+
this.dialogId = dialogId;
|
19
|
+
this.dialogAction = dialogAction;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
/**Emitted when the dialog open has been triggered, but the dialog itself hasn't initialized yet.
|
23
|
+
* This event creates its own unique identifier so that that particular instance of the dialog can be found
|
24
|
+
* when closed later on. The context is used to fill the dialog itself, and may include state or callbacks.
|
25
|
+
* Various options are available to change the dialog appearance. These events are generally created
|
26
|
+
* by the @see DialogService.open() call
|
27
|
+
*/
|
28
|
+
export class DialogOpenStartEvent extends DialogEvent {
|
29
|
+
constructor(content, context, options) {
|
30
|
+
super(uniqueId());
|
31
|
+
this.content = content;
|
32
|
+
this.context = context;
|
33
|
+
this.options = options;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
/**Emitted when the dialog has finished opening and been properly initialized. It includes
|
37
|
+
* the eventId, which uniquely identifies the particular instance of the dialog open event so that we can
|
38
|
+
* close that specific dialog later on. The dialogId can be used for telemetry, and may be set to something
|
39
|
+
* like "Confirm Delete" or "Edit Reading" etc.
|
40
|
+
*/
|
41
|
+
export class DialogOpenEndEvent extends DialogEvent {
|
42
|
+
constructor(eventId, dialogId) {
|
43
|
+
super(eventId, dialogId, 'open');
|
44
|
+
}
|
45
|
+
}
|
46
|
+
/**Emitted when the dialog close has completed and a result is available. Check result.save to know if the dialog change
|
47
|
+
* was committed (true) or cancelled (false). Cancel can be set if the dialog was automatically closed by clicking in the
|
48
|
+
* background or resizing the window when using the panel view or closeOnResize.
|
49
|
+
*/
|
50
|
+
export class DialogCloseEvent extends DialogEvent {
|
51
|
+
constructor(eventId, dialogId, save = false, context) {
|
52
|
+
super(eventId, dialogId, 'close');
|
53
|
+
this.dialogResult = new DialogResult(save, context);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
/**Used to tell the dialog group to close whatever dialog was opened most recently with the given result
|
57
|
+
* This allows a TemplateRef based panel (that's not coming from DialogComponent) to close itself or
|
58
|
+
* an external process to close a dialog that is open
|
59
|
+
*/
|
60
|
+
export class DialogCloseLatestEvent extends DialogEvent {
|
61
|
+
constructor(result) {
|
62
|
+
super('latest', 'latest', 'closeLatest');
|
63
|
+
this.dialogResult = result;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
/**
|
67
|
+
* Returned when a dialog is closed.
|
68
|
+
* Specifies if the dialog was saved and contains an optional context.
|
69
|
+
*/
|
70
|
+
export class DialogResult {
|
71
|
+
constructor(save, context) {
|
72
|
+
this.save = save;
|
73
|
+
this.context = context;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
;
|
77
77
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLXR5cGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy9zcmMvbGliL2Rpc3BsYXkvZGlhbG9nL2RpYWxvZy10eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sUUFBUSxDQUFDO0FBR2xDOztHQUVHO0FBQ0YsTUFBTSxPQUFPLFdBQVc7SUFDdkI7SUFDRSxxSEFBcUg7SUFDOUcsT0FBZ0I7SUFFdkI7O01BRUU7SUFDSyxXQUFtQixFQUFFO0lBRTVCOztPQUVHO0lBQ0ksZUFBOEQsV0FBVztRQVZ6RSxZQUFPLEdBQVAsT0FBTyxDQUFTO1FBS2hCLGFBQVEsR0FBUixRQUFRLENBQWE7UUFLckIsaUJBQVksR0FBWixZQUFZLENBQTZEO0lBQy9FLENBQUM7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