@energycap/components 0.41.0 → 0.41.1-ECAP-27592-angular-17.20241220-1140
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,58 +1,58 @@
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
import * as i1 from "@angular/common";
|
4
|
-
import * as i2 from "../../controls/button/button.component";
|
5
|
-
import * as i3 from "../spinner/spinner.component";
|
6
|
-
import * as i4 from "@ngx-translate/core";
|
7
|
-
export class Overlay {
|
8
|
-
constructor(status, message) {
|
9
|
-
this.status = 'hasData';
|
10
|
-
this.message = '';
|
11
|
-
this.setStatus(status, message);
|
12
|
-
}
|
13
|
-
setStatus(status, message, action, noDataTemplate, overlayClassList) {
|
14
|
-
this.status = status;
|
15
|
-
this.message = message || '';
|
16
|
-
this.action = action || undefined;
|
17
|
-
this.noDataTemplate = noDataTemplate || undefined;
|
18
|
-
this.overlayClassList = overlayClassList || '';
|
19
|
-
}
|
20
|
-
}
|
21
|
-
/**
|
22
|
-
* Wraps content in order to show pending, error, and no data states with an optional message/noDataTemplate
|
23
|
-
*/
|
24
|
-
export class ViewOverlayComponent {
|
25
|
-
constructor() {
|
26
|
-
this.status = 'hasData';
|
27
|
-
}
|
28
|
-
setStatus(status, message, action, noDataTemplate) {
|
29
|
-
this.status = status;
|
30
|
-
this.message = message || '';
|
31
|
-
this.action = action || undefined;
|
32
|
-
this.noDataTemplate = noDataTemplate || undefined;
|
33
|
-
}
|
34
|
-
actionClicked(event) {
|
35
|
-
if (this.action && this.action.onClick) {
|
36
|
-
this.action.onClick(event);
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
43
|
-
type: Component,
|
44
|
-
args: [{ selector: '[ecOverlay]', template: "<!-- Transcluded Content -->\r\n<ng-content *ngIf=\"displayAsMask || (!displayAsMask && status === 'hasData')\"></ng-content>\r\n<!--Used by GI tests to know the overlay status whether we use ngIf or mask version. No visual impact-->\r\n<span [hidden]=\"true\"\r\n\t class=\"overlay-status-{{status}}\"></span>\r\n<!-- Overlay goes last so it is rendered on top of preceding content due to source order -->\r\n<div *ngIf=\"status !== 'hasData'\"\r\n\t class=\"overlay flex-grow {{overlayClassList}}\"\r\n\t [ngClass]=\"{'not-mask': !displayAsMask,\r\n\t\t\t\t'overlay-error': status === 'error',\r\n\t\t\t\t'overlay-nodata': status === 'noData',\r\n\t\t\t\t'overlay-pending': status === 'pending'}\">\r\n\r\n\t<!--Pending Spinner-->\r\n\t<ec-spinner [hidden]=\"status !== 'pending'\"></ec-spinner>\r\n\r\n\t<ng-template [ngIf]=\"status === 'noData' && noDataTemplate\">\r\n\t\t<ng-container *ngTemplateOutlet=\"noDataTemplate\"></ng-container>\r\n\t</ng-template>\r\n\r\n\t<ng-container *ngIf=\"(status === 'noData' && !noDataTemplate) || status !== 'noData'\">\r\n\t\t<!--Status Message-->\r\n\t\t<div id=\"statusMessage\"\r\n\t\t\t class=\"message\"\r\n\t\t\t *ngIf=\"message\"\r\n\t\t\t [ngClass]=\"{'error': status === 'error', 'mt-1': status === 'pending'}\"\r\n\t\t\t [innerHtml]=\"message | translate\">\r\n\t\t</div>\r\n\r\n\t\t<!-- Action -->\r\n\t\t<ec-button type=\"common\"\r\n\t\t\t\t class=\"mt-3\"\r\n\t\t\t\t *ngIf=\"action?.onClick\"\r\n\t\t\t\t [icon]=\"action?.icon\"\r\n\t\t\t\t (clicked)=\"actionClicked($event)\"\r\n\t\t\t\t [label]=\"action?.label\"\r\n\t\t\t\t [hidden]=\"status === 'pending'\">\r\n\t\t</ec-button>\r\n\t</ng-container>\r\n\r\n</div>", styles: [":host{position:relative}:host(.bg-body)>.overlay{background-color:var(--ec-background-color-body)}:host(.bg-body).is-translucent>.overlay{background-color:var(--ec-background-color-overlay)}:host(.bg-content)>.overlay{background-color:var(--ec-background-color)}:host(.bg-content).is-translucent>.overlay{background-color:var(--ec-background-color-overlay)}.overlay{align-items:center;background-color:var(--ec-overlay-background-color, var(--ec-background-color));display:flex;flex-direction:column;justify-content:center;padding:3rem 4rem;z-index:var(--ec-z-index-overlay);position:absolute;inset:0}.overlay.not-mask{position:relative;min-height:100%}.message{color:var(--ec-color-secondary-dark);font-size:var(--ec-font-size-title)}.message.error{color:var(--ec-color-danger);font-size:var(--ec-font-size-title)}\n"] }]
|
45
|
-
}], propDecorators: { status: [{
|
46
|
-
type: Input
|
47
|
-
}], message: [{
|
48
|
-
type: Input
|
49
|
-
}], action: [{
|
50
|
-
type: Input
|
51
|
-
}], noDataTemplate: [{
|
52
|
-
type: Input
|
53
|
-
}], displayAsMask: [{
|
54
|
-
type: Input
|
55
|
-
}], overlayClassList: [{
|
56
|
-
type: Input
|
57
|
-
}] } });
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { Component, Input } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "@angular/common";
|
4
|
+
import * as i2 from "../../controls/button/button.component";
|
5
|
+
import * as i3 from "../spinner/spinner.component";
|
6
|
+
import * as i4 from "@ngx-translate/core";
|
7
|
+
export class Overlay {
|
8
|
+
constructor(status, message) {
|
9
|
+
this.status = 'hasData';
|
10
|
+
this.message = '';
|
11
|
+
this.setStatus(status, message);
|
12
|
+
}
|
13
|
+
setStatus(status, message, action, noDataTemplate, overlayClassList) {
|
14
|
+
this.status = status;
|
15
|
+
this.message = message || '';
|
16
|
+
this.action = action || undefined;
|
17
|
+
this.noDataTemplate = noDataTemplate || undefined;
|
18
|
+
this.overlayClassList = overlayClassList || '';
|
19
|
+
}
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* Wraps content in order to show pending, error, and no data states with an optional message/noDataTemplate
|
23
|
+
*/
|
24
|
+
export class ViewOverlayComponent {
|
25
|
+
constructor() {
|
26
|
+
this.status = 'hasData';
|
27
|
+
}
|
28
|
+
setStatus(status, message, action, noDataTemplate) {
|
29
|
+
this.status = status;
|
30
|
+
this.message = message || '';
|
31
|
+
this.action = action || undefined;
|
32
|
+
this.noDataTemplate = noDataTemplate || undefined;
|
33
|
+
}
|
34
|
+
actionClicked(event) {
|
35
|
+
if (this.action && this.action.onClick) {
|
36
|
+
this.action.onClick(event);
|
37
|
+
}
|
38
|
+
}
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
40
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ViewOverlayComponent, selector: "[ecOverlay]", inputs: { status: "status", message: "message", action: "action", noDataTemplate: "noDataTemplate", displayAsMask: "displayAsMask", overlayClassList: "overlayClassList" }, ngImport: i0, template: "<!-- Transcluded Content -->\r\n<ng-content *ngIf=\"displayAsMask || (!displayAsMask && status === 'hasData')\"></ng-content>\r\n<!--Used by GI tests to know the overlay status whether we use ngIf or mask version. No visual impact-->\r\n<span [hidden]=\"true\"\r\n\t class=\"overlay-status-{{status}}\"></span>\r\n<!-- Overlay goes last so it is rendered on top of preceding content due to source order -->\r\n<div *ngIf=\"status !== 'hasData'\"\r\n\t class=\"overlay flex-grow {{overlayClassList}}\"\r\n\t [ngClass]=\"{'not-mask': !displayAsMask,\r\n\t\t\t\t'overlay-error': status === 'error',\r\n\t\t\t\t'overlay-nodata': status === 'noData',\r\n\t\t\t\t'overlay-pending': status === 'pending'}\">\r\n\r\n\t<!--Pending Spinner-->\r\n\t<ec-spinner [hidden]=\"status !== 'pending'\"></ec-spinner>\r\n\r\n\t<ng-template [ngIf]=\"status === 'noData' && noDataTemplate\">\r\n\t\t<ng-container *ngTemplateOutlet=\"noDataTemplate\"></ng-container>\r\n\t</ng-template>\r\n\r\n\t<ng-container *ngIf=\"(status === 'noData' && !noDataTemplate) || status !== 'noData'\">\r\n\t\t<!--Status Message-->\r\n\t\t<div id=\"statusMessage\"\r\n\t\t\t class=\"message\"\r\n\t\t\t *ngIf=\"message\"\r\n\t\t\t [ngClass]=\"{'error': status === 'error', 'mt-1': status === 'pending'}\"\r\n\t\t\t [innerHtml]=\"message | translate\">\r\n\t\t</div>\r\n\r\n\t\t<!-- Action -->\r\n\t\t<ec-button type=\"common\"\r\n\t\t\t\t class=\"mt-3\"\r\n\t\t\t\t *ngIf=\"action?.onClick\"\r\n\t\t\t\t [icon]=\"action?.icon\"\r\n\t\t\t\t (clicked)=\"actionClicked($event)\"\r\n\t\t\t\t [label]=\"action?.label\"\r\n\t\t\t\t [hidden]=\"status === 'pending'\">\r\n\t\t</ec-button>\r\n\t</ng-container>\r\n\r\n</div>", styles: [":host{position:relative}:host(.bg-body)>.overlay{background-color:var(--ec-background-color-body)}:host(.bg-body).is-translucent>.overlay{background-color:var(--ec-background-color-overlay)}:host(.bg-content)>.overlay{background-color:var(--ec-background-color)}:host(.bg-content).is-translucent>.overlay{background-color:var(--ec-background-color-overlay)}.overlay{align-items:center;background-color:var(--ec-overlay-background-color, var(--ec-background-color));display:flex;flex-direction:column;justify-content:center;padding:3rem 4rem;z-index:var(--ec-z-index-overlay);position:absolute;inset:0}.overlay.not-mask{position:relative;min-height:100%}.message{color:var(--ec-color-secondary-dark);font-size:var(--ec-font-size-title)}.message.error{color:var(--ec-color-danger);font-size:var(--ec-font-size-title)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.ButtonComponent, selector: "ec-button", inputs: ["id", "disabled", "icon", "label", "badge", "tabindex", "type", "pending", "pendingIcon", "customTemplate", "isSubmit", "autofocus"], outputs: ["clicked"] }, { kind: "component", type: i3.SpinnerComponent, selector: "ec-spinner" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] }); }
|
41
|
+
}
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ViewOverlayComponent, decorators: [{
|
43
|
+
type: Component,
|
44
|
+
args: [{ selector: '[ecOverlay]', template: "<!-- Transcluded Content -->\r\n<ng-content *ngIf=\"displayAsMask || (!displayAsMask && status === 'hasData')\"></ng-content>\r\n<!--Used by GI tests to know the overlay status whether we use ngIf or mask version. No visual impact-->\r\n<span [hidden]=\"true\"\r\n\t class=\"overlay-status-{{status}}\"></span>\r\n<!-- Overlay goes last so it is rendered on top of preceding content due to source order -->\r\n<div *ngIf=\"status !== 'hasData'\"\r\n\t class=\"overlay flex-grow {{overlayClassList}}\"\r\n\t [ngClass]=\"{'not-mask': !displayAsMask,\r\n\t\t\t\t'overlay-error': status === 'error',\r\n\t\t\t\t'overlay-nodata': status === 'noData',\r\n\t\t\t\t'overlay-pending': status === 'pending'}\">\r\n\r\n\t<!--Pending Spinner-->\r\n\t<ec-spinner [hidden]=\"status !== 'pending'\"></ec-spinner>\r\n\r\n\t<ng-template [ngIf]=\"status === 'noData' && noDataTemplate\">\r\n\t\t<ng-container *ngTemplateOutlet=\"noDataTemplate\"></ng-container>\r\n\t</ng-template>\r\n\r\n\t<ng-container *ngIf=\"(status === 'noData' && !noDataTemplate) || status !== 'noData'\">\r\n\t\t<!--Status Message-->\r\n\t\t<div id=\"statusMessage\"\r\n\t\t\t class=\"message\"\r\n\t\t\t *ngIf=\"message\"\r\n\t\t\t [ngClass]=\"{'error': status === 'error', 'mt-1': status === 'pending'}\"\r\n\t\t\t [innerHtml]=\"message | translate\">\r\n\t\t</div>\r\n\r\n\t\t<!-- Action -->\r\n\t\t<ec-button type=\"common\"\r\n\t\t\t\t class=\"mt-3\"\r\n\t\t\t\t *ngIf=\"action?.onClick\"\r\n\t\t\t\t [icon]=\"action?.icon\"\r\n\t\t\t\t (clicked)=\"actionClicked($event)\"\r\n\t\t\t\t [label]=\"action?.label\"\r\n\t\t\t\t [hidden]=\"status === 'pending'\">\r\n\t\t</ec-button>\r\n\t</ng-container>\r\n\r\n</div>", styles: [":host{position:relative}:host(.bg-body)>.overlay{background-color:var(--ec-background-color-body)}:host(.bg-body).is-translucent>.overlay{background-color:var(--ec-background-color-overlay)}:host(.bg-content)>.overlay{background-color:var(--ec-background-color)}:host(.bg-content).is-translucent>.overlay{background-color:var(--ec-background-color-overlay)}.overlay{align-items:center;background-color:var(--ec-overlay-background-color, var(--ec-background-color));display:flex;flex-direction:column;justify-content:center;padding:3rem 4rem;z-index:var(--ec-z-index-overlay);position:absolute;inset:0}.overlay.not-mask{position:relative;min-height:100%}.message{color:var(--ec-color-secondary-dark);font-size:var(--ec-font-size-title)}.message.error{color:var(--ec-color-danger);font-size:var(--ec-font-size-title)}\n"] }]
|
45
|
+
}], propDecorators: { status: [{
|
46
|
+
type: Input
|
47
|
+
}], message: [{
|
48
|
+
type: Input
|
49
|
+
}], action: [{
|
50
|
+
type: Input
|
51
|
+
}], noDataTemplate: [{
|
52
|
+
type: Input
|
53
|
+
}], displayAsMask: [{
|
54
|
+
type: Input
|
55
|
+
}], overlayClassList: [{
|
56
|
+
type: Input
|
57
|
+
}] } });
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlldy1vdmVybGF5LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvbXBvbmVudHMvc3JjL2xpYi9kaXNwbGF5L3ZpZXctb3ZlcmxheS92aWV3LW92ZXJsYXkuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy9zcmMvbGliL2Rpc3BsYXkvdmlldy1vdmVybGF5L3ZpZXctb3ZlcmxheS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBZSxNQUFNLGVBQWUsQ0FBQzs7Ozs7O0FBSTlELE1BQU0sT0FBTyxPQUFPO0lBV2xCLFlBQVksTUFBa0IsRUFBRSxPQUFnQjtRQU5oRCxXQUFNLEdBQWUsU0FBUyxDQUFDO1FBQy9CLFlBQU8sR0FBWSxFQUFFLENBQUM7UUFNcEIsSUFBSSxDQUFDLFNBQVMsQ0FBQyxNQUFNLE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LT5cclxuXHRcdDxlYy1idXR0b24gdHlwZT1cImNvbW1vblwiXHJcblx0XHRcdFx0ICAgY2xhc3M9XCJtdC0zXCJcclxuXHRcdFx0XHQgICAqbmdJZj1cImFjdGlvbj8ub25DbGlja1wiXHJcblx0XHRcdFx0ICAgW2ljb25dPVwiYWN0aW9uPy5pY29uXCJcclxuXHRcdFx0XHQgICAoY2xpY2tlZCk9XCJhY3Rpb25DbGlja2VkKCRldmVudClcIlxyXG5cdFx0XHRcdCAgIFtsYWJlbF09XCJhY3Rpb24/LmxhYmVsXCJcclxuXHRcdFx0XHQgICBbaGlkZGVuXT1cInN0YXR1cyA9PT0gJ3BlbmRpbmcnXCI+XHJcblx0XHQ8L2VjLWJ1dHRvbj5cclxuXHQ8L25nLWNvbnRhaW5lcj5cclxuXHJcbjwvZGl2PiJdfQ==
|
package/{esm2020 → esm2022}/lib/shared/directives/click-area-for/click-area-for.directive.mjs
RENAMED
@@ -1,32 +1,32 @@
|
|
1
|
-
import { Directive, Input, HostListener, HostBinding } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class ClickAreaForDirective {
|
4
|
-
constructor() { }
|
5
|
-
ngOnInit() {
|
6
|
-
this.isTargetClickable = typeof this.targetEl?.dispatchEvent === 'function';
|
7
|
-
}
|
8
|
-
onClick(event) {
|
9
|
-
if (this.isTargetClickable) {
|
10
|
-
event.preventDefault();
|
11
|
-
this.targetEl.dispatchEvent(new Event('click'));
|
12
|
-
}
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
18
|
-
type: Directive,
|
19
|
-
args: [{
|
20
|
-
selector: '[ecClickAreaFor]'
|
21
|
-
}]
|
22
|
-
}], ctorParameters: function () { return []; }, propDecorators: { targetEl: [{
|
23
|
-
type: HostBinding,
|
24
|
-
args: ['class.cursor-pointer']
|
25
|
-
}, {
|
26
|
-
type: Input,
|
27
|
-
args: ['ecClickAreaFor']
|
28
|
-
}], onClick: [{
|
29
|
-
type: HostListener,
|
30
|
-
args: ['click', ['$event']]
|
31
|
-
}] } });
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { Directive, Input, HostListener, HostBinding } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export class ClickAreaForDirective {
|
4
|
+
constructor() { }
|
5
|
+
ngOnInit() {
|
6
|
+
this.isTargetClickable = typeof this.targetEl?.dispatchEvent === 'function';
|
7
|
+
}
|
8
|
+
onClick(event) {
|
9
|
+
if (this.isTargetClickable) {
|
10
|
+
event.preventDefault();
|
11
|
+
this.targetEl.dispatchEvent(new Event('click'));
|
12
|
+
}
|
13
|
+
}
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ClickAreaForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
15
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ClickAreaForDirective, selector: "[ecClickAreaFor]", inputs: { targetEl: ["ecClickAreaFor", "targetEl"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.cursor-pointer": "this.targetEl" } }, ngImport: i0 }); }
|
16
|
+
}
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ClickAreaForDirective, decorators: [{
|
18
|
+
type: Directive,
|
19
|
+
args: [{
|
20
|
+
selector: '[ecClickAreaFor]'
|
21
|
+
}]
|
22
|
+
}], ctorParameters: function () { return []; }, propDecorators: { targetEl: [{
|
23
|
+
type: HostBinding,
|
24
|
+
args: ['class.cursor-pointer']
|
25
|
+
}, {
|
26
|
+
type: Input,
|
27
|
+
args: ['ecClickAreaFor']
|
28
|
+
}], onClick: [{
|
29
|
+
type: HostListener,
|
30
|
+
args: ['click', ['$event']]
|
31
|
+
}] } });
|
32
|
+
//#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gRXZlbnQoJ2NsaWNrJykpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iXX0=
|
package/{esm2020 → esm2022}/lib/shared/directives/if-viewport-width/if-viewport-width.directive.mjs
RENAMED
@@ -1,111 +1,111 @@
|
|
1
|
-
import { Directive, Input } from '@angular/core';
|
2
|
-
import { Subject } from 'rxjs';
|
3
|
-
import { debounceTime, takeUntil } from 'rxjs/operators';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
import * as i1 from "../../../core/window.service";
|
6
|
-
/**
|
7
|
-
* Conditionally include content in the DOM based on the width of the viewport. Use to programmatically implement reponsive layouts and prevent duplicate markup and listeners.
|
8
|
-
* In most scenarios CSS media queries is sufficient to hide/show elements responsively. However, in some cases media queries would result in duplicate markup and listeners
|
9
|
-
* that could cause undesired side effects and it is preferred to us programmatic elements to achieve the layout.
|
10
|
-
*/
|
11
|
-
export class IfViewportWidthDirective {
|
12
|
-
constructor(viewContainer, templateRef, windowService) {
|
13
|
-
this.viewContainer = viewContainer;
|
14
|
-
this.templateRef = templateRef;
|
15
|
-
this.windowService = windowService;
|
16
|
-
/**
|
17
|
-
* Used to unsubscribe when the directive is removed from the DOM
|
18
|
-
*/
|
19
|
-
this.destroyed = new Subject();
|
20
|
-
/**
|
21
|
-
* Internally tracks whether the directive and its content is included in the DOM
|
22
|
-
*/
|
23
|
-
this.isVisible = false;
|
24
|
-
}
|
25
|
-
ngOnInit() {
|
26
|
-
// Window may not available if this code is not being run on a browser platform.
|
27
|
-
// If there is no window or innerWidth abort initialization
|
28
|
-
if (this.windowService.innerWidth === undefined) {
|
29
|
-
return;
|
30
|
-
}
|
31
|
-
// Check for required values. If none are set, log error and abort initialization
|
32
|
-
if (!this.width) {
|
33
|
-
console.error(`A min or max width was not provided. Provide a value for 'min' or 'max' by assigning a single value or object to the directive. E.g. *ecIfViewportWidth="800" (assigned to min) or *ecIfViewportWidth="{min: 800, max: 1280}"`);
|
34
|
-
return;
|
35
|
-
}
|
36
|
-
else if (typeof this.width === 'number') {
|
37
|
-
this.minWidth = this.width;
|
38
|
-
}
|
39
|
-
else if (this.width !== undefined) {
|
40
|
-
this.minWidth = this.width.min;
|
41
|
-
this.maxWidth = this.width.max;
|
42
|
-
}
|
43
|
-
if (this.windowService.resized) {
|
44
|
-
this.windowService.resized.pipe(debounceTime(100), takeUntil(this.destroyed)).subscribe(() => {
|
45
|
-
this.updateVisibility();
|
46
|
-
});
|
47
|
-
}
|
48
|
-
this.updateVisibility();
|
49
|
-
}
|
50
|
-
/**
|
51
|
-
* Get the current viewport width and determin if the directive's content should be
|
52
|
-
* included in the DOM based on the min and max width settings
|
53
|
-
*/
|
54
|
-
updateVisibility() {
|
55
|
-
const viewportWidth = this.windowService.innerWidth;
|
56
|
-
if (this.minWidth !== undefined && this.maxWidth !== undefined) {
|
57
|
-
if (viewportWidth >= this.minWidth && viewportWidth <= this.maxWidth) {
|
58
|
-
this.show();
|
59
|
-
}
|
60
|
-
else {
|
61
|
-
this.hide();
|
62
|
-
}
|
63
|
-
}
|
64
|
-
else if (this.minWidth !== undefined) {
|
65
|
-
if (viewportWidth >= this.minWidth) {
|
66
|
-
this.show();
|
67
|
-
}
|
68
|
-
else {
|
69
|
-
this.hide();
|
70
|
-
}
|
71
|
-
}
|
72
|
-
else if (this.maxWidth !== undefined) {
|
73
|
-
if (viewportWidth <= this.maxWidth) {
|
74
|
-
this.show();
|
75
|
-
}
|
76
|
-
else {
|
77
|
-
this.hide();
|
78
|
-
}
|
79
|
-
}
|
80
|
-
}
|
81
|
-
/**
|
82
|
-
* Add the directive's content to the DOM
|
83
|
-
*/
|
84
|
-
show() {
|
85
|
-
if (!this.isVisible) {
|
86
|
-
this.viewContainer.createEmbeddedView(this.templateRef);
|
87
|
-
this.isVisible = true;
|
88
|
-
}
|
89
|
-
}
|
90
|
-
/**
|
91
|
-
* Remove the directive's content from the DOM
|
92
|
-
*/
|
93
|
-
hide() {
|
94
|
-
if (this.isVisible) {
|
95
|
-
this.viewContainer.clear();
|
96
|
-
this.isVisible = false;
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}
|
100
|
-
|
101
|
-
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
103
|
-
type: Directive,
|
104
|
-
args: [{
|
105
|
-
selector: '[ecIfViewportWidth]'
|
106
|
-
}]
|
107
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1.WindowService }]; }, propDecorators: { width: [{
|
108
|
-
type: Input,
|
109
|
-
args: ['ecIfViewportWidth']
|
110
|
-
}] } });
|
111
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { Directive, Input } from '@angular/core';
|
2
|
+
import { Subject } from 'rxjs';
|
3
|
+
import { debounceTime, takeUntil } from 'rxjs/operators';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
import * as i1 from "../../../core/window.service";
|
6
|
+
/**
|
7
|
+
* Conditionally include content in the DOM based on the width of the viewport. Use to programmatically implement reponsive layouts and prevent duplicate markup and listeners.
|
8
|
+
* In most scenarios CSS media queries is sufficient to hide/show elements responsively. However, in some cases media queries would result in duplicate markup and listeners
|
9
|
+
* that could cause undesired side effects and it is preferred to us programmatic elements to achieve the layout.
|
10
|
+
*/
|
11
|
+
export class IfViewportWidthDirective {
|
12
|
+
constructor(viewContainer, templateRef, windowService) {
|
13
|
+
this.viewContainer = viewContainer;
|
14
|
+
this.templateRef = templateRef;
|
15
|
+
this.windowService = windowService;
|
16
|
+
/**
|
17
|
+
* Used to unsubscribe when the directive is removed from the DOM
|
18
|
+
*/
|
19
|
+
this.destroyed = new Subject();
|
20
|
+
/**
|
21
|
+
* Internally tracks whether the directive and its content is included in the DOM
|
22
|
+
*/
|
23
|
+
this.isVisible = false;
|
24
|
+
}
|
25
|
+
ngOnInit() {
|
26
|
+
// Window may not available if this code is not being run on a browser platform.
|
27
|
+
// If there is no window or innerWidth abort initialization
|
28
|
+
if (this.windowService.innerWidth === undefined) {
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
// Check for required values. If none are set, log error and abort initialization
|
32
|
+
if (!this.width) {
|
33
|
+
console.error(`A min or max width was not provided. Provide a value for 'min' or 'max' by assigning a single value or object to the directive. E.g. *ecIfViewportWidth="800" (assigned to min) or *ecIfViewportWidth="{min: 800, max: 1280}"`);
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
else if (typeof this.width === 'number') {
|
37
|
+
this.minWidth = this.width;
|
38
|
+
}
|
39
|
+
else if (this.width !== undefined) {
|
40
|
+
this.minWidth = this.width.min;
|
41
|
+
this.maxWidth = this.width.max;
|
42
|
+
}
|
43
|
+
if (this.windowService.resized) {
|
44
|
+
this.windowService.resized.pipe(debounceTime(100), takeUntil(this.destroyed)).subscribe(() => {
|
45
|
+
this.updateVisibility();
|
46
|
+
});
|
47
|
+
}
|
48
|
+
this.updateVisibility();
|
49
|
+
}
|
50
|
+
/**
|
51
|
+
* Get the current viewport width and determin if the directive's content should be
|
52
|
+
* included in the DOM based on the min and max width settings
|
53
|
+
*/
|
54
|
+
updateVisibility() {
|
55
|
+
const viewportWidth = this.windowService.innerWidth;
|
56
|
+
if (this.minWidth !== undefined && this.maxWidth !== undefined) {
|
57
|
+
if (viewportWidth >= this.minWidth && viewportWidth <= this.maxWidth) {
|
58
|
+
this.show();
|
59
|
+
}
|
60
|
+
else {
|
61
|
+
this.hide();
|
62
|
+
}
|
63
|
+
}
|
64
|
+
else if (this.minWidth !== undefined) {
|
65
|
+
if (viewportWidth >= this.minWidth) {
|
66
|
+
this.show();
|
67
|
+
}
|
68
|
+
else {
|
69
|
+
this.hide();
|
70
|
+
}
|
71
|
+
}
|
72
|
+
else if (this.maxWidth !== undefined) {
|
73
|
+
if (viewportWidth <= this.maxWidth) {
|
74
|
+
this.show();
|
75
|
+
}
|
76
|
+
else {
|
77
|
+
this.hide();
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
/**
|
82
|
+
* Add the directive's content to the DOM
|
83
|
+
*/
|
84
|
+
show() {
|
85
|
+
if (!this.isVisible) {
|
86
|
+
this.viewContainer.createEmbeddedView(this.templateRef);
|
87
|
+
this.isVisible = true;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
/**
|
91
|
+
* Remove the directive's content from the DOM
|
92
|
+
*/
|
93
|
+
hide() {
|
94
|
+
if (this.isVisible) {
|
95
|
+
this.viewContainer.clear();
|
96
|
+
this.isVisible = false;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IfViewportWidthDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i1.WindowService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
100
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: IfViewportWidthDirective, selector: "[ecIfViewportWidth]", inputs: { width: ["ecIfViewportWidth", "width"] }, ngImport: i0 }); }
|
101
|
+
}
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IfViewportWidthDirective, decorators: [{
|
103
|
+
type: Directive,
|
104
|
+
args: [{
|
105
|
+
selector: '[ecIfViewportWidth]'
|
106
|
+
}]
|
107
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1.WindowService }]; }, propDecorators: { width: [{
|
108
|
+
type: Input,
|
109
|
+
args: ['ecIfViewportWidth']
|
110
|
+
}] } });
|
111
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWYtdmlld3BvcnQtd2lkdGguZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy9zcmMvbGliL3NoYXJlZC9kaXJlY3RpdmVzL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