@onecx/angular-accelerator 4.11.0

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.
Files changed (130) hide show
  1. package/README.md +7 -0
  2. package/assets/i18n/de.json +130 -0
  3. package/assets/i18n/en.json +130 -0
  4. package/assets/images/placeholder.png +0 -0
  5. package/assets/styles.scss +8 -0
  6. package/esm2020/index.mjs +49 -0
  7. package/esm2020/lib/angular-accelerator-primeng.module.mjs +83 -0
  8. package/esm2020/lib/angular-accelerator.module.mjs +209 -0
  9. package/esm2020/lib/components/column-group-selection/column-group-selection.component.mjs +72 -0
  10. package/esm2020/lib/components/custom-group-column-selector/custom-group-column-selector.component.mjs +108 -0
  11. package/esm2020/lib/components/data-layout-selection/data-layout-selection.component.mjs +45 -0
  12. package/esm2020/lib/components/data-list-grid/data-list-grid.component.mjs +358 -0
  13. package/esm2020/lib/components/data-list-grid-sorting/data-list-grid-sorting.component.mjs +92 -0
  14. package/esm2020/lib/components/data-sort-base/data-sort-base.mjs +110 -0
  15. package/esm2020/lib/components/data-table/data-table.component.mjs +350 -0
  16. package/esm2020/lib/components/data-view/data-view.component.mjs +355 -0
  17. package/esm2020/lib/components/diagram/diagram.component.mjs +136 -0
  18. package/esm2020/lib/components/group-by-count-diagram/group-by-count-diagram.component.mjs +109 -0
  19. package/esm2020/lib/components/interactive-data-view/interactive-data-view.component.mjs +342 -0
  20. package/esm2020/lib/components/page-header/page-header.component.mjs +189 -0
  21. package/esm2020/lib/components/search-config/search-config.component.mjs +34 -0
  22. package/esm2020/lib/components/search-header/search-header.component.mjs +136 -0
  23. package/esm2020/lib/directives/if-breakpoint.directive.mjs +39 -0
  24. package/esm2020/lib/directives/if-permission.directive.mjs +53 -0
  25. package/esm2020/lib/functions/flatten-object.mjs +20 -0
  26. package/esm2020/lib/model/breadcrumb-menu-item.model.mjs +2 -0
  27. package/esm2020/lib/model/column-type.model.mjs +9 -0
  28. package/esm2020/lib/model/data-action.mjs +2 -0
  29. package/esm2020/lib/model/data-column-name-id.model.mjs +2 -0
  30. package/esm2020/lib/model/data-sort-direction.mjs +2 -0
  31. package/esm2020/lib/model/data-table-column.model.mjs +2 -0
  32. package/esm2020/lib/model/diagram-column.mjs +2 -0
  33. package/esm2020/lib/model/diagram-data.mjs +2 -0
  34. package/esm2020/lib/model/diagram-type.mjs +2 -0
  35. package/esm2020/lib/model/search-config-info.mjs +2 -0
  36. package/esm2020/lib/pipes/dynamic.pipe.mjs +58 -0
  37. package/esm2020/lib/pipes/ocxtimeago.pipe.mjs +15 -0
  38. package/esm2020/lib/services/breadcrumb.service.mjs +79 -0
  39. package/esm2020/lib/services/translation-cache.service.mjs +54 -0
  40. package/esm2020/lib/utils/async-translate-loader.utils.mjs +12 -0
  41. package/esm2020/lib/utils/caching-translate-loader.utils.mjs +15 -0
  42. package/esm2020/lib/utils/colorutils.mjs +19 -0
  43. package/esm2020/lib/utils/create-translate-loader.utils.mjs +23 -0
  44. package/esm2020/lib/utils/dateutils.mjs +32 -0
  45. package/esm2020/lib/utils/objectutils.mjs +30 -0
  46. package/esm2020/lib/utils/ocxtimeagointl.utils.mjs +34 -0
  47. package/esm2020/lib/utils/primeicon.utils.mjs +2 -0
  48. package/esm2020/lib/utils/translate.combined.loader.mjs +36 -0
  49. package/esm2020/onecx-angular-accelerator.mjs +5 -0
  50. package/esm2020/testing/column-group-selection.harness.mjs +10 -0
  51. package/esm2020/testing/custom-group-column-selector.harness.mjs +31 -0
  52. package/esm2020/testing/data-layout-selection.harness.mjs +33 -0
  53. package/esm2020/testing/data-list-grid.harness.mjs +47 -0
  54. package/esm2020/testing/data-table.harness.mjs +57 -0
  55. package/esm2020/testing/data-view.harness.mjs +12 -0
  56. package/esm2020/testing/default-grid-item.harness.mjs +24 -0
  57. package/esm2020/testing/default-list-item.harness.mjs +24 -0
  58. package/esm2020/testing/diagram.harness.mjs +22 -0
  59. package/esm2020/testing/index.mjs +17 -0
  60. package/esm2020/testing/interactive-data-view.harness.mjs +19 -0
  61. package/esm2020/testing/more-actions-menu-button.harness.mjs +35 -0
  62. package/esm2020/testing/onecx-angular-accelerator-testing.mjs +5 -0
  63. package/esm2020/testing/page-header.harness.mjs +36 -0
  64. package/esm2020/testing/search-config.harness.mjs +10 -0
  65. package/fesm2015/onecx-angular-accelerator-testing.mjs +430 -0
  66. package/fesm2015/onecx-angular-accelerator-testing.mjs.map +1 -0
  67. package/fesm2015/onecx-angular-accelerator.mjs +3118 -0
  68. package/fesm2015/onecx-angular-accelerator.mjs.map +1 -0
  69. package/fesm2020/onecx-angular-accelerator-testing.mjs +338 -0
  70. package/fesm2020/onecx-angular-accelerator-testing.mjs.map +1 -0
  71. package/fesm2020/onecx-angular-accelerator.mjs +3085 -0
  72. package/fesm2020/onecx-angular-accelerator.mjs.map +1 -0
  73. package/index.d.ts +38 -0
  74. package/lib/angular-accelerator-primeng.module.d.ts +16 -0
  75. package/lib/angular-accelerator.module.d.ts +32 -0
  76. package/lib/components/column-group-selection/column-group-selection.component.d.ts +28 -0
  77. package/lib/components/custom-group-column-selector/custom-group-column-selector.component.d.ts +45 -0
  78. package/lib/components/data-layout-selection/data-layout-selection.component.d.ts +25 -0
  79. package/lib/components/data-list-grid/data-list-grid.component.d.ts +120 -0
  80. package/lib/components/data-list-grid-sorting/data-list-grid-sorting.component.d.ts +30 -0
  81. package/lib/components/data-sort-base/data-sort-base.d.ts +32 -0
  82. package/lib/components/data-table/data-table.component.d.ts +124 -0
  83. package/lib/components/data-view/data-view.component.d.ts +112 -0
  84. package/lib/components/diagram/diagram.component.d.ts +43 -0
  85. package/lib/components/group-by-count-diagram/group-by-count-diagram.component.d.ts +39 -0
  86. package/lib/components/interactive-data-view/interactive-data-view.component.d.ts +108 -0
  87. package/lib/components/page-header/page-header.component.d.ts +90 -0
  88. package/lib/components/search-config/search-config.component.d.ts +16 -0
  89. package/lib/components/search-header/search-header.component.d.ts +46 -0
  90. package/lib/directives/if-breakpoint.directive.d.ts +12 -0
  91. package/lib/directives/if-permission.directive.d.ts +18 -0
  92. package/lib/functions/flatten-object.d.ts +14 -0
  93. package/lib/model/breadcrumb-menu-item.model.d.ts +60 -0
  94. package/lib/model/column-type.model.d.ts +7 -0
  95. package/lib/model/data-action.d.ts +9 -0
  96. package/lib/model/data-column-name-id.model.d.ts +4 -0
  97. package/lib/model/data-sort-direction.d.ts +5 -0
  98. package/lib/model/data-table-column.model.d.ts +9 -0
  99. package/lib/model/diagram-column.d.ts +5 -0
  100. package/lib/model/diagram-data.d.ts +4 -0
  101. package/lib/model/diagram-type.d.ts +5 -0
  102. package/lib/model/search-config-info.d.ts +4 -0
  103. package/lib/pipes/dynamic.pipe.d.ts +13 -0
  104. package/lib/pipes/ocxtimeago.pipe.d.ts +6 -0
  105. package/lib/services/breadcrumb.service.d.ts +20 -0
  106. package/lib/services/translation-cache.service.d.ts +12 -0
  107. package/lib/utils/async-translate-loader.utils.d.ts +9 -0
  108. package/lib/utils/caching-translate-loader.utils.d.ts +13 -0
  109. package/lib/utils/colorutils.d.ts +12 -0
  110. package/lib/utils/create-translate-loader.utils.d.ts +5 -0
  111. package/lib/utils/dateutils.d.ts +9 -0
  112. package/lib/utils/objectutils.d.ts +4 -0
  113. package/lib/utils/ocxtimeagointl.utils.d.ts +9 -0
  114. package/lib/utils/primeicon.utils.d.ts +5 -0
  115. package/lib/utils/translate.combined.loader.d.ts +9 -0
  116. package/package.json +55 -0
  117. package/testing/column-group-selection.harness.d.ts +6 -0
  118. package/testing/custom-group-column-selector.harness.d.ts +14 -0
  119. package/testing/data-layout-selection.harness.d.ts +11 -0
  120. package/testing/data-list-grid.harness.d.ts +15 -0
  121. package/testing/data-table.harness.d.ts +17 -0
  122. package/testing/data-view.harness.d.ts +8 -0
  123. package/testing/default-grid-item.harness.d.ts +11 -0
  124. package/testing/default-list-item.harness.d.ts +12 -0
  125. package/testing/diagram.harness.d.ts +10 -0
  126. package/testing/index.d.ts +16 -0
  127. package/testing/interactive-data-view.harness.d.ts +15 -0
  128. package/testing/more-actions-menu-button.harness.d.ts +10 -0
  129. package/testing/page-header.harness.d.ts +13 -0
  130. package/testing/search-config.harness.d.ts +6 -0
@@ -0,0 +1,3118 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Optional, Input, HostListener, EventEmitter, Component, Output, LOCALE_ID, Inject, ContentChild, Pipe, ViewChild, Injectable, Injector, ViewEncapsulation, NgModule, inject, importProvidersFrom, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
+ import * as i2 from '@onecx/angular-integration-interface';
4
+ import { UserService, AppStateService } from '@onecx/angular-integration-interface';
5
+ import { BehaviorSubject, combineLatest, map, of, mergeMap, filter, concat, withLatestFrom, tap, race, first, defaultIfEmpty, forkJoin } from 'rxjs';
6
+ import * as i3 from '@angular/common';
7
+ import { CurrencyPipe, DecimalPipe, DatePipe, Location, CommonModule } from '@angular/common';
8
+ import * as i2$1 from 'primeng/dropdown';
9
+ import { DropdownModule } from 'primeng/dropdown';
10
+ import * as i2$2 from 'primeng/api';
11
+ import { PrimeIcons } from 'primeng/api';
12
+ import * as i3$1 from '@angular/forms';
13
+ import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
14
+ import * as i1 from '@ngx-translate/core';
15
+ import { TranslateModule, TranslateLoader, MissingTranslationHandler } from '@ngx-translate/core';
16
+ import * as i5 from 'primeng/button';
17
+ import { ButtonModule } from 'primeng/button';
18
+ import * as i4 from 'primeng/dialog';
19
+ import { DialogModule } from 'primeng/dialog';
20
+ import * as i5$1 from 'primeng/picklist';
21
+ import { PickListModule } from 'primeng/picklist';
22
+ import * as i6 from 'primeng/selectbutton';
23
+ import { SelectButtonModule } from 'primeng/selectbutton';
24
+ import * as i1$1 from '@angular/router';
25
+ import { NavigationEnd, RouterModule } from '@angular/router';
26
+ import * as i7 from 'primeng/dataview';
27
+ import { DataViewModule } from 'primeng/dataview';
28
+ import * as i8 from 'primeng/menu';
29
+ import { MenuModule } from 'primeng/menu';
30
+ import * as i6$1 from 'primeng/table';
31
+ import { TableModule } from 'primeng/table';
32
+ import * as i7$1 from 'primeng/multiselect';
33
+ import { MultiSelectModule } from 'primeng/multiselect';
34
+ import { TimeagoPipe, TimeagoIntl, TimeagoModule, TimeagoFormatter, TimeagoCustomFormatter, TimeagoClock, TimeagoDefaultClock } from 'ngx-timeago';
35
+ import * as d3 from 'd3-scale-chromatic';
36
+ import * as i5$2 from 'primeng/chart';
37
+ import { ChartModule } from 'primeng/chart';
38
+ import { SyncableTopic } from '@onecx/accelerator';
39
+ import { HttpClient } from '@angular/common/http';
40
+ import { strings } from 'ngx-timeago/language-strings/en';
41
+ import { strings as strings$1 } from 'ngx-timeago/language-strings/de';
42
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
43
+
44
+ class IfPermissionDirective {
45
+ set notPermission(value) {
46
+ this.permission = value;
47
+ this.negate = true;
48
+ }
49
+ constructor(renderer, el, viewContainer, userService, templateRef) {
50
+ this.renderer = renderer;
51
+ this.el = el;
52
+ this.viewContainer = viewContainer;
53
+ this.userService = userService;
54
+ this.templateRef = templateRef;
55
+ this.onMissingPermission = 'hide';
56
+ this.negate = false;
57
+ }
58
+ ngOnInit() {
59
+ if (this.permission) {
60
+ if (this.negate === this.userService.hasPermission(this.permission)) {
61
+ if (this.onMissingPermission === 'disable') {
62
+ this.renderer.setAttribute(this.el.nativeElement, 'disabled', 'disabled');
63
+ }
64
+ else {
65
+ this.viewContainer.clear();
66
+ }
67
+ }
68
+ else {
69
+ if (this.templateRef) {
70
+ this.viewContainer.createEmbeddedView(this.templateRef);
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ IfPermissionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IfPermissionDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i2.UserService }, { token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
77
+ IfPermissionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: IfPermissionDirective, selector: "[ocxIfPermission], [ocxIfNotPermission]", inputs: { permission: ["ocxIfPermission", "permission"], notPermission: ["ocxIfNotPermission", "notPermission"], onMissingPermission: "onMissingPermission" }, ngImport: i0 });
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IfPermissionDirective, decorators: [{
79
+ type: Directive,
80
+ args: [{ selector: '[ocxIfPermission], [ocxIfNotPermission]' }]
81
+ }], ctorParameters: function () {
82
+ return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i2.UserService }, { type: i0.TemplateRef, decorators: [{
83
+ type: Optional
84
+ }] }];
85
+ }, propDecorators: { permission: [{
86
+ type: Input,
87
+ args: ['ocxIfPermission']
88
+ }], notPermission: [{
89
+ type: Input,
90
+ args: ['ocxIfNotPermission']
91
+ }], onMissingPermission: [{
92
+ type: Input
93
+ }] } });
94
+
95
+ class IfBreakpointDirective {
96
+ constructor(viewContainer, templateRef) {
97
+ this.viewContainer = viewContainer;
98
+ this.templateRef = templateRef;
99
+ }
100
+ ngOnInit() {
101
+ this.onResize();
102
+ }
103
+ onResize() {
104
+ const mobileBreakpointVar = getComputedStyle(document.documentElement).getPropertyValue('--mobile-break-point');
105
+ const isMobile = window.matchMedia(`(max-width: ${mobileBreakpointVar})`).matches;
106
+ const isDesktop = !isMobile;
107
+ if ((this.breakpoint === 'mobile' && isMobile) || (this.breakpoint === 'desktop' && isDesktop)) {
108
+ if (this.templateRef && !this.viewContainer.length) {
109
+ this.viewContainer.createEmbeddedView(this.templateRef);
110
+ }
111
+ }
112
+ else {
113
+ this.viewContainer.clear();
114
+ }
115
+ }
116
+ }
117
+ IfBreakpointDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IfBreakpointDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
118
+ IfBreakpointDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: IfBreakpointDirective, selector: "[ocxIfBreakpoint]", inputs: { breakpoint: ["ocxIfBreakpoint", "breakpoint"] }, host: { listeners: { "window:resize": "onResize()" } }, ngImport: i0 });
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IfBreakpointDirective, decorators: [{
120
+ type: Directive,
121
+ args: [{ selector: '[ocxIfBreakpoint]' }]
122
+ }], ctorParameters: function () {
123
+ return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef, decorators: [{
124
+ type: Optional
125
+ }] }];
126
+ }, propDecorators: { breakpoint: [{
127
+ type: Input,
128
+ args: ['ocxIfBreakpoint']
129
+ }], onResize: [{
130
+ type: HostListener,
131
+ args: ['window:resize']
132
+ }] } });
133
+
134
+ class ColumnGroupSelectionComponent {
135
+ constructor() {
136
+ this.selectedGroupKey$ = new BehaviorSubject('');
137
+ this.columns$ = new BehaviorSubject([]);
138
+ this.placeholderKey = '';
139
+ this.defaultGroupKey = '';
140
+ this.customGroupKey = '';
141
+ this.groupSelectionChanged = new EventEmitter();
142
+ }
143
+ get selectedGroupKey() {
144
+ return this.selectedGroupKey$.getValue();
145
+ }
146
+ set selectedGroupKey(value) {
147
+ this.selectedGroupKey$.next(value);
148
+ }
149
+ get columns() {
150
+ return this.columns$.getValue();
151
+ }
152
+ set columns(value) {
153
+ this.columns$.next(value);
154
+ }
155
+ ngOnInit() {
156
+ this.allGroupKeys$ = combineLatest([this.columns$, this.selectedGroupKey$]).pipe(map(([columns, selectedGroupKey]) => columns
157
+ .map((keys) => keys.predefinedGroupKeys || [])
158
+ .flat()
159
+ .concat([this.defaultGroupKey])
160
+ .concat([selectedGroupKey])
161
+ .filter((value) => !!value)
162
+ .filter((value, index, self) => self.indexOf(value) === index && value != null)));
163
+ }
164
+ changeGroupSelection(event) {
165
+ if (event.value === this.customGroupKey) {
166
+ return;
167
+ }
168
+ const activeColumns = this.columns.filter((c) => { var _a; return (_a = c.predefinedGroupKeys) === null || _a === void 0 ? void 0 : _a.includes(event.value); });
169
+ this.groupSelectionChanged.emit({ activeColumns, groupKey: event.value });
170
+ }
171
+ clearGroupSelection() {
172
+ let activeColumns = this.columns;
173
+ if (this.defaultGroupKey) {
174
+ activeColumns = this.columns.filter((column) => { var _a; return (_a = column.predefinedGroupKeys) === null || _a === void 0 ? void 0 : _a.includes(this.defaultGroupKey); });
175
+ }
176
+ this.groupSelectionChanged.emit({ activeColumns, groupKey: this.defaultGroupKey });
177
+ }
178
+ }
179
+ ColumnGroupSelectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColumnGroupSelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
180
+ ColumnGroupSelectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ColumnGroupSelectionComponent, selector: "ocx-column-group-selection", inputs: { selectedGroupKey: "selectedGroupKey", columns: "columns", placeholderKey: "placeholderKey", defaultGroupKey: "defaultGroupKey", customGroupKey: "customGroupKey" }, outputs: { groupSelectionChanged: "groupSelectionChanged" }, ngImport: i0, template: "<span class=\"p-float-label\">\n <p-dropdown\n id=\"columnGroupSelectionDropdown\"\n *ngIf=\"(allGroupKeys$ | async)?.length\"\n (onClear)=\"clearGroupSelection()\"\n (onChange)=\"changeGroupSelection($event)\"\n [options]=\"(allGroupKeys$ | async) || []\"\n [placeholder]=\"placeholderKey | translate\"\n [showClear]=\"selectedGroupKey !== defaultGroupKey\"\n [(ngModel)]=\"selectedGroupKey\"\n >\n <ng-template let-item pTemplate=\"item\"> {{ item ? (item | translate) : ''}} </ng-template>\n <ng-template let-item pTemplate=\"selectedItem\"> {{ item ? (item | translate) : ''}} </ng-template>\n </p-dropdown>\n <label *ngIf=\"(allGroupKeys$ | async)?.length\" for=\"columnGroupSelectionDropdown\"\n >{{ (\"OCX_CUSTOM_GROUP_COLUMN_SELECTOR.DROPDOWN_LABEL\" | translate) }}</label\n >\n</span>\n", styles: [":host ::ng-deep .p-dropdown{min-width:12rem}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColumnGroupSelectionComponent, decorators: [{
182
+ type: Component,
183
+ args: [{ selector: 'ocx-column-group-selection', template: "<span class=\"p-float-label\">\n <p-dropdown\n id=\"columnGroupSelectionDropdown\"\n *ngIf=\"(allGroupKeys$ | async)?.length\"\n (onClear)=\"clearGroupSelection()\"\n (onChange)=\"changeGroupSelection($event)\"\n [options]=\"(allGroupKeys$ | async) || []\"\n [placeholder]=\"placeholderKey | translate\"\n [showClear]=\"selectedGroupKey !== defaultGroupKey\"\n [(ngModel)]=\"selectedGroupKey\"\n >\n <ng-template let-item pTemplate=\"item\"> {{ item ? (item | translate) : ''}} </ng-template>\n <ng-template let-item pTemplate=\"selectedItem\"> {{ item ? (item | translate) : ''}} </ng-template>\n </p-dropdown>\n <label *ngIf=\"(allGroupKeys$ | async)?.length\" for=\"columnGroupSelectionDropdown\"\n >{{ (\"OCX_CUSTOM_GROUP_COLUMN_SELECTOR.DROPDOWN_LABEL\" | translate) }}</label\n >\n</span>\n", styles: [":host ::ng-deep .p-dropdown{min-width:12rem}\n"] }]
184
+ }], propDecorators: { selectedGroupKey: [{
185
+ type: Input
186
+ }], columns: [{
187
+ type: Input
188
+ }], placeholderKey: [{
189
+ type: Input
190
+ }], defaultGroupKey: [{
191
+ type: Input
192
+ }], customGroupKey: [{
193
+ type: Input
194
+ }], groupSelectionChanged: [{
195
+ type: Output
196
+ }] } });
197
+
198
+ class CustomGroupColumnSelectorComponent {
199
+ constructor(translate) {
200
+ this.translate = translate;
201
+ this.columns = [];
202
+ this.displayedColumns = [];
203
+ this.dialogTitle = '';
204
+ this.openButtonTitle = '';
205
+ this.saveButtonLabel = '';
206
+ this.cancelButtonLabel = '';
207
+ this.activeColumnsLabel = '';
208
+ this.inactiveColumnsLabel = '';
209
+ this.frozenActionColumn = false;
210
+ this.actionColumnPosition = 'right';
211
+ this.columnSelectionChanged = new EventEmitter();
212
+ this.actionColumnConfigChanged = new EventEmitter();
213
+ this.hiddenColumnsModel = [];
214
+ this.displayedColumnsModel = [];
215
+ this.frozenActionColumnModel = false;
216
+ this.actionColumnPositionModel = 'right';
217
+ this.visible = false;
218
+ this.alignmentOptions = [
219
+ {
220
+ label: 'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.LEFT',
221
+ value: 'left',
222
+ },
223
+ {
224
+ label: 'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.RIGHT',
225
+ value: 'right',
226
+ },
227
+ ];
228
+ this.frozenOptions = [
229
+ {
230
+ label: 'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.YES',
231
+ value: true,
232
+ },
233
+ {
234
+ label: 'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.NO',
235
+ value: false,
236
+ },
237
+ ];
238
+ }
239
+ onOpenCustomGroupColumnSelectionDialogClick() {
240
+ this.displayedColumnsModel = [...this.displayedColumns];
241
+ this.hiddenColumnsModel = this.columns.filter((column) => !this.displayedColumnsModel.map((c) => c.id).includes(column.id));
242
+ this.frozenActionColumnModel = this.frozenActionColumn;
243
+ this.actionColumnPositionModel = this.actionColumnPosition;
244
+ this.visible = true;
245
+ }
246
+ onSaveClick() {
247
+ this.visible = false;
248
+ const colIdsBefore = this.displayedColumns.map((column) => column.id);
249
+ const colIdsAfter = this.displayedColumnsModel.map((column) => column.id);
250
+ if (!colIdsAfter.every((colId, i) => colId === colIdsBefore[i])) {
251
+ this.columnSelectionChanged.emit({ activeColumns: [...this.displayedColumnsModel] });
252
+ }
253
+ if (this.frozenActionColumn != this.frozenActionColumnModel ||
254
+ this.actionColumnPosition != this.actionColumnPositionModel) {
255
+ this.actionColumnConfigChanged.emit({
256
+ frozenActionColumn: this.frozenActionColumnModel,
257
+ actionColumnPosition: this.actionColumnPositionModel,
258
+ });
259
+ }
260
+ }
261
+ onCancelClick() {
262
+ this.visible = false;
263
+ }
264
+ }
265
+ CustomGroupColumnSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomGroupColumnSelectorComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
266
+ CustomGroupColumnSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomGroupColumnSelectorComponent, selector: "ocx-custom-group-column-selector", inputs: { columns: "columns", displayedColumns: "displayedColumns", dialogTitle: "dialogTitle", openButtonTitle: "openButtonTitle", saveButtonLabel: "saveButtonLabel", cancelButtonLabel: "cancelButtonLabel", activeColumnsLabel: "activeColumnsLabel", inactiveColumnsLabel: "inactiveColumnsLabel", frozenActionColumn: "frozenActionColumn", actionColumnPosition: "actionColumnPosition" }, outputs: { columnSelectionChanged: "columnSelectionChanged", actionColumnConfigChanged: "actionColumnConfigChanged" }, ngImport: i0, template: "<p-button\n id=\"customGroupColumnSelectorButton\"\n type=\"button\"\n (click)=\"onOpenCustomGroupColumnSelectionDialogClick()\"\n [title]=\"openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)\"\n icon=\"pi pi-cog\"\n styleClass=\"p-button\"\n [ariaLabel]=\"openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)\"\n></p-button>\n\n<p-dialog header=\"Header\" [(visible)]=\"visible\" [style]=\"{ width: '70%' }\" [modal]=\"true\" [closeAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.CLOSE' | translate)\">\n <ng-template pTemplate=\"header\">\n <span class=\"text-xl font-bold\"\n >{{ dialogTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.DIALOG_TITLE' | translate) }}</span\n >\n </ng-template>\n\n <p-pickList\n [source]=\"displayedColumnsModel\"\n [target]=\"hiddenColumnsModel\"\n [sourceHeader]=\"activeColumnsLabel || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ACTIVE_COLUMNS_LABEL' | translate)\"\n [targetHeader]=\"inactiveColumnsLabel || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.INACTIVE_COLUMNS_LABEL' | translate)\"\n [dragdrop]=\"true\"\n [responsive]=\"false\"\n [sourceStyle]=\"{ height: '300px' }\"\n [targetStyle]=\"{ height: '300px' }\"\n [upButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.UP' | translate)\"\n [topButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.TOP' | translate)\"\n [downButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.DOWN' | translate)\"\n [bottomButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.BOTTOM' | translate)\"\n [rightButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.RIGHT' | translate)\"\n [allRightButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.ALL_RIGHT' | translate)\"\n [leftButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.LEFT' | translate)\"\n [allLeftButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.ALL_LEFT' | translate)\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div>{{ item.nameKey | translate }}</div>\n </ng-template>\n </p-pickList>\n\n <div class=\"pt-4\">\n <p class=\"text-xl font-bold\">{{'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.TITLE' | translate}}</p>\n <div class=\"flex gap-6 px-3\">\n <div>\n <p class=\"mb-1\">{{'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.FREEZE' | translate}}</p>\n <p-selectButton\n [options]=\"frozenOptions\"\n [(ngModel)]=\"frozenActionColumnModel\"\n optionLabel=\"label\"\n optionValue=\"value\"\n id=\"frozenActionColumn\"\n name=\"frozen-action-column-select-button\"\n >\n <ng-template let-option pTemplate> {{option.label | translate}} </ng-template>\n </p-selectButton>\n </div>\n <div>\n <p class=\"mb-1\">{{'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.POSITION' | translate}}</p>\n <p-selectButton\n [options]=\"alignmentOptions\"\n [(ngModel)]=\"actionColumnPositionModel\"\n optionLabel=\"label\"\n optionValue=\"value\"\n id=\"actionColumnPosition\"\n class=\"mt-2\"\n name=\"action-column-position-select-button\"\n >\n <ng-template let-option pTemplate> {{option.label | translate}} </ng-template>\n </p-selectButton>\n </div>\n </div>\n </div>\n\n <ng-template pTemplate=\"footer\">\n <p-button\n id=\"cancelButton\"\n (onClick)=\"onCancelClick()\"\n [label]=\"cancelButtonLabel || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CANCEL_BUTTON_LABEL' | translate)\"\n styleClass=\"p-button\"\n ></p-button>\n <p-button\n id=\"saveButton\"\n (onClick)=\"onSaveClick()\"\n [label]=\"saveButtonLabel || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.SAVE_BUTTON_LABEL' | translate)\"\n ></p-button>\n </ng-template>\n</p-dialog>\n", styles: ["::ng-deep .p-buttonset .p-button{min-width:auto}::ng-deep .p-buttonset{display:flex}::ng-deep .p-picklist-item.cdk-drag-preview{z-index:2000!important}.p-button{height:100%}\n"], dependencies: [{ kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i5$1.PickList, selector: "p-pickList", inputs: ["source", "target", "sourceHeader", "rightButtonAriaLabel", "leftButtonAriaLabel", "allRightButtonAriaLabel", "allLeftButtonAriaLabel", "upButtonAriaLabel", "downButtonAriaLabel", "topButtonAriaLabel", "bottomButtonAriaLabel", "targetHeader", "responsive", "filterBy", "filterLocale", "trackBy", "sourceTrackBy", "targetTrackBy", "showSourceFilter", "showTargetFilter", "metaKeySelection", "dragdrop", "style", "styleClass", "sourceStyle", "targetStyle", "showSourceControls", "showTargetControls", "sourceFilterPlaceholder", "targetFilterPlaceholder", "disabled", "ariaSourceFilterLabel", "ariaTargetFilterLabel", "filterMatchMode", "breakpoint", "stripedRows", "keepSelection"], outputs: ["onMoveToSource", "onMoveAllToSource", "onMoveAllToTarget", "onMoveToTarget", "onSourceReorder", "onTargetReorder", "onSourceSelect", "onTargetSelect", "onSourceFilter", "onTargetFilter"] }, { kind: "component", type: i6.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "tabindex", "multiple", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey"], outputs: ["onOptionClick", "onChange"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomGroupColumnSelectorComponent, decorators: [{
268
+ type: Component,
269
+ args: [{ selector: 'ocx-custom-group-column-selector', template: "<p-button\n id=\"customGroupColumnSelectorButton\"\n type=\"button\"\n (click)=\"onOpenCustomGroupColumnSelectionDialogClick()\"\n [title]=\"openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)\"\n icon=\"pi pi-cog\"\n styleClass=\"p-button\"\n [ariaLabel]=\"openButtonTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)\"\n></p-button>\n\n<p-dialog header=\"Header\" [(visible)]=\"visible\" [style]=\"{ width: '70%' }\" [modal]=\"true\" [closeAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.CLOSE' | translate)\">\n <ng-template pTemplate=\"header\">\n <span class=\"text-xl font-bold\"\n >{{ dialogTitle || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.DIALOG_TITLE' | translate) }}</span\n >\n </ng-template>\n\n <p-pickList\n [source]=\"displayedColumnsModel\"\n [target]=\"hiddenColumnsModel\"\n [sourceHeader]=\"activeColumnsLabel || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ACTIVE_COLUMNS_LABEL' | translate)\"\n [targetHeader]=\"inactiveColumnsLabel || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.INACTIVE_COLUMNS_LABEL' | translate)\"\n [dragdrop]=\"true\"\n [responsive]=\"false\"\n [sourceStyle]=\"{ height: '300px' }\"\n [targetStyle]=\"{ height: '300px' }\"\n [upButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.UP' | translate)\"\n [topButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.TOP' | translate)\"\n [downButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.DOWN' | translate)\"\n [bottomButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.BOTTOM' | translate)\"\n [rightButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.RIGHT' | translate)\"\n [allRightButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.ALL_RIGHT' | translate)\"\n [leftButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.LEFT' | translate)\"\n [allLeftButtonAriaLabel]=\"('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.ARIA_LABELS.ALL_LEFT' | translate)\"\n >\n <ng-template let-item pTemplate=\"item\">\n <div>{{ item.nameKey | translate }}</div>\n </ng-template>\n </p-pickList>\n\n <div class=\"pt-4\">\n <p class=\"text-xl font-bold\">{{'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.TITLE' | translate}}</p>\n <div class=\"flex gap-6 px-3\">\n <div>\n <p class=\"mb-1\">{{'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.FREEZE' | translate}}</p>\n <p-selectButton\n [options]=\"frozenOptions\"\n [(ngModel)]=\"frozenActionColumnModel\"\n optionLabel=\"label\"\n optionValue=\"value\"\n id=\"frozenActionColumn\"\n name=\"frozen-action-column-select-button\"\n >\n <ng-template let-option pTemplate> {{option.label | translate}} </ng-template>\n </p-selectButton>\n </div>\n <div>\n <p class=\"mb-1\">{{'OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CONFIGURE_ACTION_COLUMN.POSITION' | translate}}</p>\n <p-selectButton\n [options]=\"alignmentOptions\"\n [(ngModel)]=\"actionColumnPositionModel\"\n optionLabel=\"label\"\n optionValue=\"value\"\n id=\"actionColumnPosition\"\n class=\"mt-2\"\n name=\"action-column-position-select-button\"\n >\n <ng-template let-option pTemplate> {{option.label | translate}} </ng-template>\n </p-selectButton>\n </div>\n </div>\n </div>\n\n <ng-template pTemplate=\"footer\">\n <p-button\n id=\"cancelButton\"\n (onClick)=\"onCancelClick()\"\n [label]=\"cancelButtonLabel || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.CANCEL_BUTTON_LABEL' | translate)\"\n styleClass=\"p-button\"\n ></p-button>\n <p-button\n id=\"saveButton\"\n (onClick)=\"onSaveClick()\"\n [label]=\"saveButtonLabel || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.SAVE_BUTTON_LABEL' | translate)\"\n ></p-button>\n </ng-template>\n</p-dialog>\n", styles: ["::ng-deep .p-buttonset .p-button{min-width:auto}::ng-deep .p-buttonset{display:flex}::ng-deep .p-picklist-item.cdk-drag-preview{z-index:2000!important}.p-button{height:100%}\n"] }]
270
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { columns: [{
271
+ type: Input
272
+ }], displayedColumns: [{
273
+ type: Input
274
+ }], dialogTitle: [{
275
+ type: Input
276
+ }], openButtonTitle: [{
277
+ type: Input
278
+ }], saveButtonLabel: [{
279
+ type: Input
280
+ }], cancelButtonLabel: [{
281
+ type: Input
282
+ }], activeColumnsLabel: [{
283
+ type: Input
284
+ }], inactiveColumnsLabel: [{
285
+ type: Input
286
+ }], frozenActionColumn: [{
287
+ type: Input
288
+ }], actionColumnPosition: [{
289
+ type: Input
290
+ }], columnSelectionChanged: [{
291
+ type: Output
292
+ }], actionColumnConfigChanged: [{
293
+ type: Output
294
+ }] } });
295
+
296
+ const ALL_VIEW_LAYOUTS = [
297
+ { icon: PrimeIcons.LIST, layout: 'list', titleKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.LIST' },
298
+ { icon: PrimeIcons.TH_LARGE, layout: 'grid', titleKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.GRID' },
299
+ { icon: PrimeIcons.TABLE, layout: 'table', titleKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.TABLE' },
300
+ ];
301
+ class DataLayoutSelectionComponent {
302
+ constructor() {
303
+ this.supportedViewLayouts = [];
304
+ this.dataViewLayoutChange = new EventEmitter();
305
+ this.viewingLayouts = [];
306
+ }
307
+ set layout(value) {
308
+ this.selectedViewLayout = this.viewingLayouts.find((v) => v.layout === value);
309
+ }
310
+ get layout() {
311
+ var _a;
312
+ return ((_a = this.selectedViewLayout) === null || _a === void 0 ? void 0 : _a.layout) || 'table';
313
+ }
314
+ ngOnInit() {
315
+ this.viewingLayouts = ALL_VIEW_LAYOUTS.filter((vl) => this.supportedViewLayouts.includes(vl.layout));
316
+ this.layout = 'table';
317
+ }
318
+ onDataViewLayoutChange(event) {
319
+ this.dataViewLayoutChange.emit(event.layout);
320
+ }
321
+ }
322
+ DataLayoutSelectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataLayoutSelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
323
+ DataLayoutSelectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DataLayoutSelectionComponent, selector: "ocx-data-layout-selection", inputs: { supportedViewLayouts: "supportedViewLayouts", layout: "layout" }, outputs: { dataViewLayoutChange: "dataViewLayoutChange" }, ngImport: i0, template: "<div class=\"flex flex-wrap justify-content-between align-items-center py-1 gap-2\">\n <p-selectButton\n *ngIf=\"viewingLayouts.length > 1\"\n [options]=\"viewingLayouts\"\n [(ngModel)]=\"selectedViewLayout\"\n optionLabel=\"icon\"\n (onChange)=\"onDataViewLayoutChange($event.value)\"\n >\n <ng-template let-item>\n <i [class]=\"item.icon\" [title]=\"item.title || (item.titleKey | translate)\"></i>\n </ng-template>\n </p-selectButton>\n</div>\n", styles: ["::ng-deep .p-buttonset .p-button{min-width:auto}::ng-deep .p-buttonset{display:flex}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "tabindex", "multiple", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey"], outputs: ["onOptionClick", "onChange"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataLayoutSelectionComponent, decorators: [{
325
+ type: Component,
326
+ args: [{ selector: 'ocx-data-layout-selection', template: "<div class=\"flex flex-wrap justify-content-between align-items-center py-1 gap-2\">\n <p-selectButton\n *ngIf=\"viewingLayouts.length > 1\"\n [options]=\"viewingLayouts\"\n [(ngModel)]=\"selectedViewLayout\"\n optionLabel=\"icon\"\n (onChange)=\"onDataViewLayoutChange($event.value)\"\n >\n <ng-template let-item>\n <i [class]=\"item.icon\" [title]=\"item.title || (item.titleKey | translate)\"></i>\n </ng-template>\n </p-selectButton>\n</div>\n", styles: ["::ng-deep .p-buttonset .p-button{min-width:auto}::ng-deep .p-buttonset{display:flex}\n"] }]
327
+ }], propDecorators: { supportedViewLayouts: [{
328
+ type: Input
329
+ }], layout: [{
330
+ type: Input
331
+ }], dataViewLayoutChange: [{
332
+ type: Output
333
+ }] } });
334
+
335
+ class ObjectUtils {
336
+ static resolveFieldData(data, field) {
337
+ if (data && field) {
338
+ if (this.isFunction(field)) {
339
+ return field(data);
340
+ }
341
+ else if (field.indexOf('.') == -1) {
342
+ return data[field];
343
+ }
344
+ else {
345
+ const fields = field.split('.');
346
+ let value = data;
347
+ for (let i = 0, len = fields.length; i < len; ++i) {
348
+ if (value == null) {
349
+ return null;
350
+ }
351
+ value = value[fields[i]];
352
+ }
353
+ return value;
354
+ }
355
+ }
356
+ else {
357
+ return null;
358
+ }
359
+ }
360
+ static isFunction(obj) {
361
+ return !!(obj && obj.constructor && obj.call && obj.apply);
362
+ }
363
+ }
364
+
365
+ function flattenObject(ob) {
366
+ const toReturn = {};
367
+ for (const i in ob) {
368
+ if (!Object.prototype.hasOwnProperty.call(ob, i))
369
+ continue;
370
+ if (!!ob[i] && typeof ob[i] == 'object' && !(ob[i] instanceof Date) && !Array.isArray(ob[i])) {
371
+ const flatObject = flattenObject(ob[i]);
372
+ for (const x in flatObject) {
373
+ if (!Object.prototype.hasOwnProperty.call(flatObject, x))
374
+ continue;
375
+ toReturn[i + '.' + x] = flatObject[x];
376
+ }
377
+ }
378
+ else {
379
+ toReturn[i] = ob[i];
380
+ }
381
+ }
382
+ return toReturn;
383
+ }
384
+
385
+ var ColumnType;
386
+ (function (ColumnType) {
387
+ ColumnType["STRING"] = "STRING";
388
+ ColumnType["NUMBER"] = "NUMBER";
389
+ ColumnType["DATE"] = "DATE";
390
+ ColumnType["RELATIVE_DATE"] = "RELATIVE_DATE";
391
+ ColumnType["TRANSLATION_KEY"] = "TRANSLATION_KEY";
392
+ })(ColumnType || (ColumnType = {}));
393
+
394
+ class DataSortBase {
395
+ constructor(locale, translateService) {
396
+ this.locale = locale;
397
+ this.translateService = translateService;
398
+ }
399
+ translateItems([items, filters, sortColumn, sortDirection], columns, clientSideFiltering, clientSideSorting) {
400
+ if (clientSideFiltering || clientSideSorting) {
401
+ let translationKeys = [];
402
+ const translatedColumns = columns.filter((c) => c.columnType === ColumnType.TRANSLATION_KEY);
403
+ translatedColumns.forEach((c) => {
404
+ translationKeys = [...translationKeys, ...items.map((i) => { var _a; return (_a = ObjectUtils.resolveFieldData(i, c.id)) === null || _a === void 0 ? void 0 : _a.toString(); })];
405
+ });
406
+ if (translationKeys.length) {
407
+ return this.translateService.get(translationKeys).pipe(map((translatedValues) => {
408
+ const translations = {};
409
+ translatedColumns.forEach((c) => {
410
+ translations[c.id] = Object.fromEntries(items.map((i) => {
411
+ var _a, _b;
412
+ return [
413
+ ((_a = ObjectUtils.resolveFieldData(i, c.id)) === null || _a === void 0 ? void 0 : _a.toString()) || '',
414
+ translatedValues[(_b = ObjectUtils.resolveFieldData(i, c.id)) === null || _b === void 0 ? void 0 : _b.toString()],
415
+ ];
416
+ }));
417
+ });
418
+ return [items, filters, sortColumn, sortDirection, translations];
419
+ }));
420
+ }
421
+ }
422
+ return of([items, filters, sortColumn, sortDirection, {}]);
423
+ }
424
+ filterItems([items, filters, sortColumn, sortDirection, translations], clientSideFiltering) {
425
+ if (!clientSideFiltering) {
426
+ return [items, filters, sortColumn, sortDirection, translations];
427
+ }
428
+ return [
429
+ items.filter((item) => filters
430
+ .map((filter) => filter.columnId)
431
+ .filter((value, index, self) => self.indexOf(value) === index && value != null)
432
+ .every((filterColumnId) => filters
433
+ .filter((filter) => filter.columnId === filterColumnId)
434
+ .some((filter) => {
435
+ var _a;
436
+ return (((_a = translations[filter.columnId]) === null || _a === void 0 ? void 0 : _a[ObjectUtils.resolveFieldData(item, filter.columnId).toString()]) ||
437
+ ObjectUtils.resolveFieldData(item, filter.columnId)).toString() === filter.value.toString();
438
+ }))),
439
+ filters,
440
+ sortColumn,
441
+ sortDirection,
442
+ translations,
443
+ ];
444
+ }
445
+ sortItems([items, filters, sortColumn, sortDirection, translations], columns, clientSideSorting) {
446
+ var _a;
447
+ if (!clientSideSorting || sortColumn === '') {
448
+ return [items, filters, sortColumn, sortDirection, translations];
449
+ }
450
+ let translatedColValues = Object.fromEntries(items.map((i) => {
451
+ var _a, _b;
452
+ return [
453
+ (_a = ObjectUtils.resolveFieldData(i, sortColumn)) === null || _a === void 0 ? void 0 : _a.toString(),
454
+ (_b = ObjectUtils.resolveFieldData(i, sortColumn)) === null || _b === void 0 ? void 0 : _b.toString(),
455
+ ];
456
+ }));
457
+ if (((_a = columns.find((h) => h.id === sortColumn)) === null || _a === void 0 ? void 0 : _a.columnType) === ColumnType.TRANSLATION_KEY) {
458
+ translatedColValues = translations[sortColumn];
459
+ }
460
+ return [
461
+ [...items].sort(this.createCompareFunction(translatedColValues, sortColumn, sortDirection)),
462
+ filters,
463
+ sortColumn,
464
+ sortDirection,
465
+ translations,
466
+ ];
467
+ }
468
+ flattenItems(items) {
469
+ return items.map((i) => flattenObject(i));
470
+ }
471
+ createCompareFunction(translatedColValues, sortColumn, sortDirection) {
472
+ let direction = 0;
473
+ if (sortDirection === "ASCENDING" /* DataSortDirection.ASCENDING */) {
474
+ direction = 1;
475
+ }
476
+ else if (sortDirection === "DESCENDING" /* DataSortDirection.DESCENDING */) {
477
+ direction = -1;
478
+ }
479
+ return (data1, data2) => {
480
+ if (direction === 0) {
481
+ return 0;
482
+ }
483
+ let result;
484
+ const value1 = translatedColValues[ObjectUtils.resolveFieldData(data1, sortColumn)];
485
+ const value2 = translatedColValues[ObjectUtils.resolveFieldData(data2, sortColumn)];
486
+ if (value1 == null && value2 != null)
487
+ result = -1;
488
+ else if (value1 != null && value2 == null)
489
+ result = 1;
490
+ else if (value1 == null && value2 == null)
491
+ result = 0;
492
+ else if (typeof value1 === 'string' && typeof value2 === 'string')
493
+ result = value1.localeCompare(value2, [this.locale, 'en', 'de'], { numeric: true });
494
+ else {
495
+ if (value1 < value2) {
496
+ result = -1;
497
+ }
498
+ else if (value1 > value2) {
499
+ result = 1;
500
+ }
501
+ else {
502
+ result = 0;
503
+ }
504
+ }
505
+ return direction * result;
506
+ };
507
+ }
508
+ }
509
+
510
+ class DataListGridComponent extends DataSortBase {
511
+ get totalRecordsOnServer() {
512
+ return this.params['totalRecordsOnServer'] ? Number(this.params['totalRecordsOnServer']) : undefined;
513
+ }
514
+ set totalRecordsOnServer(value) {
515
+ var _a;
516
+ this.params['totalRecordsOnServer'] = (_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : '0';
517
+ }
518
+ get data() {
519
+ return this._data$.getValue();
520
+ }
521
+ set data(value) {
522
+ this._originalData = [...value];
523
+ this._data$.next([...value]);
524
+ }
525
+ get filters() {
526
+ return this._filters$.getValue();
527
+ }
528
+ set filters(value) {
529
+ this._filters$.next(value);
530
+ }
531
+ get sortDirection() {
532
+ return this._sortDirection$.getValue();
533
+ }
534
+ set sortDirection(value) {
535
+ if (value === "NONE" /* DataSortDirection.NONE */) {
536
+ this._data$.next([...this._originalData]);
537
+ }
538
+ this._sortDirection$.next(value);
539
+ }
540
+ get sortField() {
541
+ return this === null || this === void 0 ? void 0 : this._sortField$.getValue();
542
+ }
543
+ set sortField(value) {
544
+ this._sortField$.next(value);
545
+ }
546
+ get _gridItemSubtitleLines() {
547
+ return this.gridItemSubtitleLinesTemplate || this.gridItemSubtitleLinesChildTemplate;
548
+ }
549
+ get _listItemSubtitleLines() {
550
+ return this.listItemSubtitleLinesTemplate || this.listItemSubtitleLinesChildTemplate;
551
+ }
552
+ get _listItem() {
553
+ return this.listItemTemplate || this.listItemChildTemplate;
554
+ }
555
+ get _gridItem() {
556
+ return this.gridItemTemplate || this.gridItemChildTemplate;
557
+ }
558
+ get additionalActions() {
559
+ return this._additionalActions;
560
+ }
561
+ set additionalActions(value) {
562
+ this._additionalActions = value;
563
+ this.updateGridMenuItems();
564
+ }
565
+ get viewItemObserved() {
566
+ const dv = this.injector.get('DataViewComponent', null);
567
+ return (dv === null || dv === void 0 ? void 0 : dv.viewItemObserved) || (dv === null || dv === void 0 ? void 0 : dv.viewItem.observed) || this.viewItem.observed;
568
+ }
569
+ get editItemObserved() {
570
+ const dv = this.injector.get('DataViewComponent', null);
571
+ return (dv === null || dv === void 0 ? void 0 : dv.editItemObserved) || (dv === null || dv === void 0 ? void 0 : dv.editItem.observed) || this.editItem.observed;
572
+ }
573
+ get deleteItemObserved() {
574
+ const dv = this.injector.get('DataViewComponent', null);
575
+ return (dv === null || dv === void 0 ? void 0 : dv.deleteItemObserved) || (dv === null || dv === void 0 ? void 0 : dv.deleteItem.observed) || this.deleteItem.observed;
576
+ }
577
+ get sortDirectionNumber() {
578
+ if (this.sortDirection === "ASCENDING" /* DataSortDirection.ASCENDING */)
579
+ return 1;
580
+ if (this.sortDirection === "DESCENDING" /* DataSortDirection.DESCENDING */)
581
+ return -1;
582
+ return 0;
583
+ }
584
+ constructor(locale, translateService, userService, router, injector, appStateService) {
585
+ super(locale, translateService);
586
+ this.userService = userService;
587
+ this.router = router;
588
+ this.injector = injector;
589
+ this.appStateService = appStateService;
590
+ this.subtitleLineIds = [];
591
+ this.clientSideSorting = true;
592
+ this.clientSideFiltering = true;
593
+ this.sortStates = [];
594
+ this.pageSizes = [10, 25, 50];
595
+ this.pageSize = this.pageSizes[0] || 50;
596
+ this.fallbackImage = 'placeholder.png';
597
+ this.layout = 'grid';
598
+ this.paginator = true;
599
+ this.page = 0;
600
+ this.columns = [];
601
+ this.name = '';
602
+ this.currentPageShowingKey = 'OCX_DATA_TABLE.SHOWING';
603
+ this.currentPageShowingWithTotalOnServerKey = 'OCX_DATA_TABLE.SHOWING_WITH_TOTAL_ON_SERVER';
604
+ this.params = {
605
+ currentPage: '{currentPage}',
606
+ totalPages: '{totalPages}',
607
+ rows: '{rows}',
608
+ first: '{first}',
609
+ last: '{last}',
610
+ totalRecords: '{totalRecords}',
611
+ };
612
+ this._data$ = new BehaviorSubject([]);
613
+ this._filters$ = new BehaviorSubject([]);
614
+ this._originalData = [];
615
+ this._sortDirection$ = new BehaviorSubject("NONE" /* DataSortDirection.NONE */);
616
+ this._sortField$ = new BehaviorSubject('');
617
+ this._additionalActions = [];
618
+ this.viewItem = new EventEmitter();
619
+ this.editItem = new EventEmitter();
620
+ this.deleteItem = new EventEmitter();
621
+ this.pageChanged = new EventEmitter();
622
+ this.showMenu = false;
623
+ this.gridMenuItems = [];
624
+ this.observedOutputs = 0;
625
+ this.name = this.name || this.router.url.replace(/[^A-Za-z0-9]/, '_');
626
+ this.fallbackImagePath$ = this.appStateService.currentMfe$.pipe(map((currentMfe) => this.getFallbackImagePath(currentMfe)));
627
+ }
628
+ ngDoCheck() {
629
+ const observedOutputs = this.viewItem.observed + this.deleteItem.observed + this.editItem.observed;
630
+ if (this.observedOutputs !== observedOutputs) {
631
+ this.updateGridMenuItems();
632
+ this.observedOutputs = observedOutputs;
633
+ }
634
+ }
635
+ ngOnInit() {
636
+ this.displayedItems$ = combineLatest([this._data$, this._filters$, this._sortField$, this._sortDirection$]).pipe(mergeMap((params) => this.translateItems(params, this.columns, this.clientSideFiltering, this.clientSideSorting)), map((params) => this.filterItems(params, this.clientSideFiltering)), map((params) => this.sortItems(params, this.columns, this.clientSideSorting)), map(([items]) => items));
637
+ this.showMenu =
638
+ (!!this.viewPermission && this.userService.hasPermission(this.viewPermission)) ||
639
+ (!!this.editPermission && this.userService.hasPermission(this.editPermission)) ||
640
+ (!!this.deletePermission && this.userService.hasPermission(this.deletePermission));
641
+ }
642
+ onDeleteRow(element) {
643
+ this.deleteItem.emit(element);
644
+ }
645
+ onViewRow(element) {
646
+ if (!!this.viewPermission && this.userService.hasPermission(this.viewPermission)) {
647
+ this.viewItem.emit(element);
648
+ }
649
+ }
650
+ onEditRow(element) {
651
+ this.editItem.emit(element);
652
+ }
653
+ imgError(item) {
654
+ item.imagePath = '';
655
+ }
656
+ getFallbackImagePath(mfeInfo) {
657
+ return (mfeInfo === null || mfeInfo === void 0 ? void 0 : mfeInfo.remoteBaseUrl)
658
+ ? `${mfeInfo.remoteBaseUrl}/onecx-portal-lib/assets/images/${this.fallbackImage}`
659
+ : `./onecx-portal-lib/assets/images/${this.fallbackImage}`;
660
+ }
661
+ updateGridMenuItems(useSelectedItem = false) {
662
+ let deleteDisabled = false;
663
+ let editDisabled = false;
664
+ let viewDisabled = false;
665
+ let deleteVisible = true;
666
+ let editVisible = true;
667
+ let viewVisible = true;
668
+ if (useSelectedItem && this.selectedItem) {
669
+ viewDisabled = !!this.viewActionEnabledField && !this.fieldIsTruthy(this.selectedItem, this.viewActionEnabledField);
670
+ editDisabled = !!this.editActionEnabledField && !this.fieldIsTruthy(this.selectedItem, this.editActionEnabledField);
671
+ deleteDisabled = !!this.deleteActionEnabledField && !this.fieldIsTruthy(this.selectedItem, this.deleteActionEnabledField);
672
+ viewVisible = (!this.viewActionVisibleField || this.fieldIsTruthy(this.selectedItem, this.viewActionVisibleField));
673
+ editVisible = (!this.editActionVisibleField || this.fieldIsTruthy(this.selectedItem, this.editActionVisibleField));
674
+ deleteVisible = (!this.deleteActionVisibleField || this.fieldIsTruthy(this.selectedItem, this.deleteActionVisibleField));
675
+ }
676
+ this.translateService
677
+ .get([
678
+ this.viewMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.VIEW',
679
+ this.editMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.EDIT',
680
+ this.deleteMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.DELETE',
681
+ ...this.additionalActions.map((a) => a.labelKey || ''),
682
+ ])
683
+ .subscribe((translations) => {
684
+ let menuItems = [];
685
+ const automationId = 'data-grid-action-button';
686
+ const automationIdHidden = 'data-grid-action-button-hidden';
687
+ if (this.viewItem.observed && this.userService.hasPermission(this.viewPermission || '')) {
688
+ menuItems.push({
689
+ label: translations[this.viewMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.VIEW'],
690
+ icon: PrimeIcons.EYE,
691
+ command: () => this.viewItem.emit(this.selectedItem),
692
+ disabled: viewDisabled,
693
+ visible: viewVisible,
694
+ automationId: viewVisible ? automationId : automationIdHidden
695
+ });
696
+ }
697
+ if (this.editItem.observed && this.userService.hasPermission(this.editPermission || '')) {
698
+ menuItems.push({
699
+ label: translations[this.editMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.EDIT'],
700
+ icon: PrimeIcons.PENCIL,
701
+ command: () => this.editItem.emit(this.selectedItem),
702
+ disabled: editDisabled,
703
+ visible: editVisible,
704
+ automationId: editVisible ? automationId : automationIdHidden
705
+ });
706
+ }
707
+ if (this.deleteItem.observed && this.userService.hasPermission(this.deletePermission || '')) {
708
+ menuItems.push({
709
+ label: translations[this.deleteMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.DELETE'],
710
+ icon: PrimeIcons.TRASH,
711
+ command: () => this.deleteItem.emit(this.selectedItem),
712
+ disabled: deleteDisabled,
713
+ visible: deleteVisible,
714
+ automationId: deleteVisible ? automationId : automationIdHidden
715
+ });
716
+ }
717
+ menuItems = menuItems.concat(this.additionalActions
718
+ .filter((a) => this.userService.hasPermission(a.permission))
719
+ .map((a) => ({
720
+ label: translations[a.labelKey || ''],
721
+ icon: a.icon,
722
+ styleClass: (a.classes || []).join(' '),
723
+ disabled: a.disabled,
724
+ command: () => a.callback(this.selectedItem),
725
+ })));
726
+ this.gridMenuItems = menuItems;
727
+ });
728
+ }
729
+ setSelectedItem(item) {
730
+ this.selectedItem = item;
731
+ }
732
+ resolveFieldData(object, key) {
733
+ return ObjectUtils.resolveFieldData(object, key);
734
+ }
735
+ onPageChange(event) {
736
+ const page = event.first / event.rows;
737
+ this.page = page;
738
+ this.pageChanged.emit(page);
739
+ }
740
+ fieldIsTruthy(object, key) {
741
+ return !!this.resolveFieldData(object, key);
742
+ }
743
+ }
744
+ DataListGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataListGridComponent, deps: [{ token: LOCALE_ID }, { token: i1.TranslateService }, { token: i2.UserService }, { token: i1$1.Router }, { token: i0.Injector }, { token: i2.AppStateService }], target: i0.ɵɵFactoryTarget.Component });
745
+ DataListGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DataListGridComponent, selector: "ocx-data-list-grid", inputs: { titleLineId: "titleLineId", subtitleLineIds: "subtitleLineIds", clientSideSorting: "clientSideSorting", clientSideFiltering: "clientSideFiltering", sortStates: "sortStates", pageSizes: "pageSizes", pageSize: "pageSize", emptyResultsMessage: "emptyResultsMessage", fallbackImage: "fallbackImage", layout: "layout", viewPermission: "viewPermission", editPermission: "editPermission", deletePermission: "deletePermission", deleteActionVisibleField: "deleteActionVisibleField", deleteActionEnabledField: "deleteActionEnabledField", viewActionVisibleField: "viewActionVisibleField", viewActionEnabledField: "viewActionEnabledField", editActionVisibleField: "editActionVisibleField", editActionEnabledField: "editActionEnabledField", viewMenuItemKey: "viewMenuItemKey", editMenuItemKey: "editMenuItemKey", deleteMenuItemKey: "deleteMenuItemKey", paginator: "paginator", page: "page", columns: "columns", name: "name", totalRecordsOnServer: "totalRecordsOnServer", currentPageShowingKey: "currentPageShowingKey", currentPageShowingWithTotalOnServerKey: "currentPageShowingWithTotalOnServerKey", data: "data", filters: "filters", sortDirection: "sortDirection", sortField: "sortField", gridItemSubtitleLinesTemplate: "gridItemSubtitleLinesTemplate", listItemSubtitleLinesTemplate: "listItemSubtitleLinesTemplate", listItemTemplate: "listItemTemplate", gridItemTemplate: "gridItemTemplate", additionalActions: "additionalActions" }, outputs: { viewItem: "viewItem", editItem: "editItem", deleteItem: "deleteItem", pageChanged: "pageChanged" }, queries: [{ propertyName: "gridItemSubtitleLinesChildTemplate", first: true, predicate: ["gridItemSubtitleLines"], descendants: true }, { propertyName: "listItemSubtitleLinesChildTemplate", first: true, predicate: ["listItemSubtitleLines"], descendants: true }, { propertyName: "listItemChildTemplate", first: true, predicate: ["listItem"], descendants: true }, { propertyName: "gridItemChildTemplate", first: true, predicate: ["gridItem"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<p-dataView\n [value]=\"(displayedItems$ | async) || []\"\n [paginator]=\"paginator\"\n [first]=\"page * pageSize\"\n (onPage)=\"onPageChange($event)\"\n [rows]=\"pageSize\"\n [layout]=\"layout\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{{ (totalRecordsOnServer ? currentPageShowingWithTotalOnServerKey : currentPageShowingKey) | translate:params }}\"\n [rowsPerPageOptions]=\"[10, 25, 50, data?.length]\"\n id=\"dataListGrid_{{name}}\"\n>\n <ng-template let-item pTemplate=\"paginatordropdownitem\">\n {{ item.value === data?.length ? (\"OCX_DATA_TABLE.ALL\" | translate) : item.value }}\n </ng-template>\n <ng-template #gridItem let-item pTemplate=\"gridItem\">\n <ng-container\n [ngTemplateOutlet]=\"_gridItem ? _gridItem : defaultGridItem\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n ></ng-container>\n </ng-template>\n\n <ng-template #listItem let-item pTemplate=\"listItem\">\n <ng-container\n [ngTemplateOutlet]=\"_listItem ? _listItem : defaultListItem\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n ></ng-container>\n </ng-template>\n <ng-template pTemplate=\"empty\">\n <span>{{ emptyResultsMessage || (\"OCX_DATA_LIST_GRID.EMPTY_RESULT\" | translate) }}</span>\n </ng-template>\n</p-dataView>\n\n<ng-template #defaultGridItem let-item>\n <div class=\"col-12 lg:col-6 xl:col-4 flex\">\n <div class=\"data-grid-item card flex flex-column justify-content-between w-12 lg:w-11 mb-4 mt-4 align-self-stretch\">\n <div class=\"flex justify-content-center mb-3\">\n <img\n class=\"image\"\n src=\"{{ item.imagePath || (fallbackImagePath$ | async) }}\"\n (error)=\"imgError(item)\"\n alt=\"{{resolveFieldData(item, titleLineId)|| ''}}\"\n />\n </div>\n <div class=\"flex flex-row justify-content-between align-items-center\">\n <div class=\"data-grid-items flex-row\">\n <div class=\"item-name font-medium mr-3 text-2xl\">\n <a [routerLink]=\"\" (click)=\"onViewRow\">{{ resolveFieldData(item, titleLineId) || '' }}</a>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"_gridItemSubtitleLines ? _gridItemSubtitleLines : defaultGridItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n ></ng-container>\n </div>\n <div>\n <p-menu #menu [model]=\"gridMenuItems\" [popup]=\"true\" appendTo=\"body\"></p-menu>\n <button\n pButton\n (click)=\"setSelectedItem(item); updateGridMenuItems(true); menu.toggle($event)\"\n icon=\"pi pi-ellipsis-v\"\n [ariaLabel]=\"'OCX_DATA_LIST_GRID.MORE_ACTIONS' | translate\"\n class=\"more-actions-menu-button menu-btn\"\n [attr.name]=\"'data-grid-item-menu-button'\"\n ></button>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n<ng-template #defaultGridItemSubtitleLines let-item>\n <div *ngFor=\"let subtitleLineId of subtitleLineIds\" class=\"subtitleLine edit-time text-xl my-3\">\n {{ resolveFieldData(item, subtitleLineId) }}\n </div>\n</ng-template>\n<ng-template #defaultListItem let-item>\n <div class=\"col-12\">\n <div class=\"flex flex-1 align-items-center p-3 w-full\">\n <div class=\"data-list-items flex-1\">\n <div class=\"item-name-row flex flex-row justify-content-between\">\n <div class=\"item-name mr-3 text-2xl font-medium\">\n <a [routerLink]=\"\" (click)=\"onViewRow(item)\">{{ resolveFieldData(item, titleLineId) || '' }}</a>\n </div>\n <div class=\"flex flex-column md:flex-row md:justify-content-between\">\n <ng-container *ngIf=\"viewItemObserved && (!viewActionVisibleField || fieldIsTruthy(item, viewActionVisibleField))\">\n <button\n type=\"button\"\n icon=\"pi pi-eye\"\n pButton\n class=\"p-button-rounded p-button-text mb-1 mr-2 viewListItemButton\"\n title=\"{{ (viewMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.VIEW') | translate }}\"\n [attr.aria-label]=\"(viewMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.VIEW') | translate\"\n (click)=\"onViewRow(item)\"\n *ocxIfPermission=\"viewPermission\"\n [disabled]=\"!!viewActionEnabledField && !fieldIsTruthy(item, viewActionEnabledField)\"\n [attr.name]=\"'data-list-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"editItemObserved && (!editActionVisibleField || fieldIsTruthy(item, editActionVisibleField))\">\n <button\n type=\"button\"\n class=\"p-button-rounded p-button-text mb-1 mr-2 editListItemButton\"\n icon=\"pi pi-pencil\"\n pButton\n title=\"{{ (editMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.EDIT') | translate }}\"\n [attr.aria-label]=\"(editMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.EDIT') | translate\"\n (click)=\"onEditRow(item)\"\n *ocxIfPermission=\"editPermission\"\n [disabled]=\"!!editActionEnabledField && !fieldIsTruthy(item, editActionEnabledField)\"\n [attr.name]=\"'data-list-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"deleteItemObserved && (!deleteActionVisibleField || fieldIsTruthy(item, deleteActionVisibleField))\">\n <button\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-text p-button-danger mb-1 mr-2 deleteListItemButton\"\n pButton\n title=\"{{ (deleteMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.DELETE') | translate }}\"\n [attr.aria-label]=\"(deleteMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.DELETE') | translate\"\n (click)=\"onDeleteRow(item)\"\n *ocxIfPermission=\"deletePermission\"\n [disabled]=\"!!deleteActionEnabledField && !fieldIsTruthy(item, deleteActionEnabledField)\"\n [attr.name]=\"'data-list-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngFor=\"let action of additionalActions\">\n <button\n *ocxIfPermission=\"action.permission\"\n pButton\n class=\"p-button-rounded p-button-text\"\n [ngClass]=\"action.classes\"\n [icon]=\"action.icon || ''\"\n (click)=\"action.callback(item)\"\n [title]=\"action.labelKey ? (action.labelKey | translate) : ''\"\n [attr.aria-label]=\"action.labelKey ? (action.labelKey | translate) : ''\"\n [disabled]=\"action.disabled\"\n ></button>\n </ng-container>\n </div>\n </div>\n <div class=\"text-base font-light my-1\">\n <ng-container\n [ngTemplateOutlet]=\"_listItemSubtitleLines ? _listItemSubtitleLines : defaultListItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n ></ng-container>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n<ng-template #defaultListItemSubtitleLines let-item=\"$implicit\">\n <div *ngFor=\"let subtitleLineId of subtitleLineIds\" class=\"subtitleLine text-xl my-3\">{{ resolveFieldData(item, subtitleLineId) }}</div>\n</ng-template>\n", styles: [".image{width:100%;height:100%}.menu-btn{color:var(--primary-text-color);background-color:var(--primary-color);border:var(--button-border);border-radius:var(--border-radius);padding:var(--button-padding);cursor:pointer;min-width:4rem}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i7.DataView, selector: "p-dataView", inputs: ["paginator", "rows", "totalRecords", "pageLinks", "rowsPerPageOptions", "paginatorPosition", "alwaysShowPaginator", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "lazy", "emptyMessage", "style", "styleClass", "gridStyleClass", "trackBy", "filterBy", "filterLocale", "loading", "loadingIcon", "first", "sortField", "sortOrder", "value", "layout"], outputs: ["onLazyLoad", "onPage", "onSort", "onChangeLayout"] }, { kind: "component", type: i8.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: IfPermissionDirective, selector: "[ocxIfPermission], [ocxIfNotPermission]", inputs: ["ocxIfPermission", "ocxIfNotPermission", "onMissingPermission"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
746
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataListGridComponent, decorators: [{
747
+ type: Component,
748
+ args: [{ selector: 'ocx-data-list-grid', template: "<p-dataView\n [value]=\"(displayedItems$ | async) || []\"\n [paginator]=\"paginator\"\n [first]=\"page * pageSize\"\n (onPage)=\"onPageChange($event)\"\n [rows]=\"pageSize\"\n [layout]=\"layout\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{{ (totalRecordsOnServer ? currentPageShowingWithTotalOnServerKey : currentPageShowingKey) | translate:params }}\"\n [rowsPerPageOptions]=\"[10, 25, 50, data?.length]\"\n id=\"dataListGrid_{{name}}\"\n>\n <ng-template let-item pTemplate=\"paginatordropdownitem\">\n {{ item.value === data?.length ? (\"OCX_DATA_TABLE.ALL\" | translate) : item.value }}\n </ng-template>\n <ng-template #gridItem let-item pTemplate=\"gridItem\">\n <ng-container\n [ngTemplateOutlet]=\"_gridItem ? _gridItem : defaultGridItem\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n ></ng-container>\n </ng-template>\n\n <ng-template #listItem let-item pTemplate=\"listItem\">\n <ng-container\n [ngTemplateOutlet]=\"_listItem ? _listItem : defaultListItem\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n ></ng-container>\n </ng-template>\n <ng-template pTemplate=\"empty\">\n <span>{{ emptyResultsMessage || (\"OCX_DATA_LIST_GRID.EMPTY_RESULT\" | translate) }}</span>\n </ng-template>\n</p-dataView>\n\n<ng-template #defaultGridItem let-item>\n <div class=\"col-12 lg:col-6 xl:col-4 flex\">\n <div class=\"data-grid-item card flex flex-column justify-content-between w-12 lg:w-11 mb-4 mt-4 align-self-stretch\">\n <div class=\"flex justify-content-center mb-3\">\n <img\n class=\"image\"\n src=\"{{ item.imagePath || (fallbackImagePath$ | async) }}\"\n (error)=\"imgError(item)\"\n alt=\"{{resolveFieldData(item, titleLineId)|| ''}}\"\n />\n </div>\n <div class=\"flex flex-row justify-content-between align-items-center\">\n <div class=\"data-grid-items flex-row\">\n <div class=\"item-name font-medium mr-3 text-2xl\">\n <a [routerLink]=\"\" (click)=\"onViewRow\">{{ resolveFieldData(item, titleLineId) || '' }}</a>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"_gridItemSubtitleLines ? _gridItemSubtitleLines : defaultGridItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n ></ng-container>\n </div>\n <div>\n <p-menu #menu [model]=\"gridMenuItems\" [popup]=\"true\" appendTo=\"body\"></p-menu>\n <button\n pButton\n (click)=\"setSelectedItem(item); updateGridMenuItems(true); menu.toggle($event)\"\n icon=\"pi pi-ellipsis-v\"\n [ariaLabel]=\"'OCX_DATA_LIST_GRID.MORE_ACTIONS' | translate\"\n class=\"more-actions-menu-button menu-btn\"\n [attr.name]=\"'data-grid-item-menu-button'\"\n ></button>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n<ng-template #defaultGridItemSubtitleLines let-item>\n <div *ngFor=\"let subtitleLineId of subtitleLineIds\" class=\"subtitleLine edit-time text-xl my-3\">\n {{ resolveFieldData(item, subtitleLineId) }}\n </div>\n</ng-template>\n<ng-template #defaultListItem let-item>\n <div class=\"col-12\">\n <div class=\"flex flex-1 align-items-center p-3 w-full\">\n <div class=\"data-list-items flex-1\">\n <div class=\"item-name-row flex flex-row justify-content-between\">\n <div class=\"item-name mr-3 text-2xl font-medium\">\n <a [routerLink]=\"\" (click)=\"onViewRow(item)\">{{ resolveFieldData(item, titleLineId) || '' }}</a>\n </div>\n <div class=\"flex flex-column md:flex-row md:justify-content-between\">\n <ng-container *ngIf=\"viewItemObserved && (!viewActionVisibleField || fieldIsTruthy(item, viewActionVisibleField))\">\n <button\n type=\"button\"\n icon=\"pi pi-eye\"\n pButton\n class=\"p-button-rounded p-button-text mb-1 mr-2 viewListItemButton\"\n title=\"{{ (viewMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.VIEW') | translate }}\"\n [attr.aria-label]=\"(viewMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.VIEW') | translate\"\n (click)=\"onViewRow(item)\"\n *ocxIfPermission=\"viewPermission\"\n [disabled]=\"!!viewActionEnabledField && !fieldIsTruthy(item, viewActionEnabledField)\"\n [attr.name]=\"'data-list-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"editItemObserved && (!editActionVisibleField || fieldIsTruthy(item, editActionVisibleField))\">\n <button\n type=\"button\"\n class=\"p-button-rounded p-button-text mb-1 mr-2 editListItemButton\"\n icon=\"pi pi-pencil\"\n pButton\n title=\"{{ (editMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.EDIT') | translate }}\"\n [attr.aria-label]=\"(editMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.EDIT') | translate\"\n (click)=\"onEditRow(item)\"\n *ocxIfPermission=\"editPermission\"\n [disabled]=\"!!editActionEnabledField && !fieldIsTruthy(item, editActionEnabledField)\"\n [attr.name]=\"'data-list-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"deleteItemObserved && (!deleteActionVisibleField || fieldIsTruthy(item, deleteActionVisibleField))\">\n <button\n type=\"button\"\n icon=\"pi pi-trash\"\n class=\"p-button-rounded p-button-text p-button-danger mb-1 mr-2 deleteListItemButton\"\n pButton\n title=\"{{ (deleteMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.DELETE') | translate }}\"\n [attr.aria-label]=\"(deleteMenuItemKey || 'OCX_DATA_LIST_GRID.MENU.DELETE') | translate\"\n (click)=\"onDeleteRow(item)\"\n *ocxIfPermission=\"deletePermission\"\n [disabled]=\"!!deleteActionEnabledField && !fieldIsTruthy(item, deleteActionEnabledField)\"\n [attr.name]=\"'data-list-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngFor=\"let action of additionalActions\">\n <button\n *ocxIfPermission=\"action.permission\"\n pButton\n class=\"p-button-rounded p-button-text\"\n [ngClass]=\"action.classes\"\n [icon]=\"action.icon || ''\"\n (click)=\"action.callback(item)\"\n [title]=\"action.labelKey ? (action.labelKey | translate) : ''\"\n [attr.aria-label]=\"action.labelKey ? (action.labelKey | translate) : ''\"\n [disabled]=\"action.disabled\"\n ></button>\n </ng-container>\n </div>\n </div>\n <div class=\"text-base font-light my-1\">\n <ng-container\n [ngTemplateOutlet]=\"_listItemSubtitleLines ? _listItemSubtitleLines : defaultListItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n ></ng-container>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n<ng-template #defaultListItemSubtitleLines let-item=\"$implicit\">\n <div *ngFor=\"let subtitleLineId of subtitleLineIds\" class=\"subtitleLine text-xl my-3\">{{ resolveFieldData(item, subtitleLineId) }}</div>\n</ng-template>\n", styles: [".image{width:100%;height:100%}.menu-btn{color:var(--primary-text-color);background-color:var(--primary-color);border:var(--button-border);border-radius:var(--border-radius);padding:var(--button-padding);cursor:pointer;min-width:4rem}\n"] }]
749
+ }], ctorParameters: function () {
750
+ return [{ type: undefined, decorators: [{
751
+ type: Inject,
752
+ args: [LOCALE_ID]
753
+ }] }, { type: i1.TranslateService }, { type: i2.UserService }, { type: i1$1.Router }, { type: i0.Injector }, { type: i2.AppStateService }];
754
+ }, propDecorators: { titleLineId: [{
755
+ type: Input
756
+ }], subtitleLineIds: [{
757
+ type: Input
758
+ }], clientSideSorting: [{
759
+ type: Input
760
+ }], clientSideFiltering: [{
761
+ type: Input
762
+ }], sortStates: [{
763
+ type: Input
764
+ }], pageSizes: [{
765
+ type: Input
766
+ }], pageSize: [{
767
+ type: Input
768
+ }], emptyResultsMessage: [{
769
+ type: Input
770
+ }], fallbackImage: [{
771
+ type: Input
772
+ }], layout: [{
773
+ type: Input
774
+ }], viewPermission: [{
775
+ type: Input
776
+ }], editPermission: [{
777
+ type: Input
778
+ }], deletePermission: [{
779
+ type: Input
780
+ }], deleteActionVisibleField: [{
781
+ type: Input
782
+ }], deleteActionEnabledField: [{
783
+ type: Input
784
+ }], viewActionVisibleField: [{
785
+ type: Input
786
+ }], viewActionEnabledField: [{
787
+ type: Input
788
+ }], editActionVisibleField: [{
789
+ type: Input
790
+ }], editActionEnabledField: [{
791
+ type: Input
792
+ }], viewMenuItemKey: [{
793
+ type: Input
794
+ }], editMenuItemKey: [{
795
+ type: Input
796
+ }], deleteMenuItemKey: [{
797
+ type: Input
798
+ }], paginator: [{
799
+ type: Input
800
+ }], page: [{
801
+ type: Input
802
+ }], columns: [{
803
+ type: Input
804
+ }], name: [{
805
+ type: Input
806
+ }], totalRecordsOnServer: [{
807
+ type: Input
808
+ }], currentPageShowingKey: [{
809
+ type: Input
810
+ }], currentPageShowingWithTotalOnServerKey: [{
811
+ type: Input
812
+ }], data: [{
813
+ type: Input
814
+ }], filters: [{
815
+ type: Input
816
+ }], sortDirection: [{
817
+ type: Input
818
+ }], sortField: [{
819
+ type: Input
820
+ }], gridItemSubtitleLinesTemplate: [{
821
+ type: Input
822
+ }], gridItemSubtitleLinesChildTemplate: [{
823
+ type: ContentChild,
824
+ args: ['gridItemSubtitleLines']
825
+ }], listItemSubtitleLinesTemplate: [{
826
+ type: Input
827
+ }], listItemSubtitleLinesChildTemplate: [{
828
+ type: ContentChild,
829
+ args: ['listItemSubtitleLines']
830
+ }], listItemTemplate: [{
831
+ type: Input
832
+ }], listItemChildTemplate: [{
833
+ type: ContentChild,
834
+ args: ['listItem']
835
+ }], gridItemTemplate: [{
836
+ type: Input
837
+ }], gridItemChildTemplate: [{
838
+ type: ContentChild,
839
+ args: ['gridItem']
840
+ }], additionalActions: [{
841
+ type: Input
842
+ }], viewItem: [{
843
+ type: Output
844
+ }], editItem: [{
845
+ type: Output
846
+ }], deleteItem: [{
847
+ type: Output
848
+ }], pageChanged: [{
849
+ type: Output
850
+ }] } });
851
+
852
+ class DataListGridSortingComponent {
853
+ constructor() {
854
+ this.columns = [];
855
+ this.sortStates = ["ASCENDING" /* DataSortDirection.ASCENDING */, "DESCENDING" /* DataSortDirection.DESCENDING */];
856
+ this._sortDirection$ = new BehaviorSubject("NONE" /* DataSortDirection.NONE */);
857
+ this._sortField$ = new BehaviorSubject('');
858
+ this.sortChange = new EventEmitter();
859
+ this.sortDirectionChange = new EventEmitter();
860
+ this.columnsChange = new EventEmitter();
861
+ this.dropdownOptions = [];
862
+ }
863
+ get sortDirection() {
864
+ return this._sortDirection$.getValue();
865
+ }
866
+ set sortDirection(value) {
867
+ this._sortDirection$.next(value);
868
+ }
869
+ get sortField() {
870
+ return this === null || this === void 0 ? void 0 : this._sortField$.getValue();
871
+ }
872
+ set sortField(value) {
873
+ this._sortField$.next(value);
874
+ }
875
+ ngOnInit() {
876
+ this.columns.forEach((element) => this.dropdownOptions.push({ columnId: element.id, columnName: element.nameKey }));
877
+ this.selectedSortingOption = this.dropdownOptions.find((e) => e.columnId === (this === null || this === void 0 ? void 0 : this.sortField));
878
+ }
879
+ selectSorting(event) {
880
+ this._sortField$.next(event.value);
881
+ this.sortChange.emit(event.value.columnId);
882
+ }
883
+ sortDirectionChanged() {
884
+ const newSortDirection = this.nextSortDirection();
885
+ this._sortDirection$.next(newSortDirection);
886
+ this.sortDirectionChange.emit(newSortDirection);
887
+ }
888
+ nextSortDirection() {
889
+ return this.sortStates[(this.sortStates.indexOf(this.sortDirection) + 1) % this.sortStates.length];
890
+ }
891
+ sortIcon() {
892
+ switch (this.sortDirection) {
893
+ case "ASCENDING" /* DataSortDirection.ASCENDING */:
894
+ return 'pi-sort-amount-up';
895
+ case "DESCENDING" /* DataSortDirection.DESCENDING */:
896
+ return 'pi-sort-amount-down';
897
+ default:
898
+ return 'pi-sort-alt-slash';
899
+ }
900
+ }
901
+ sortIconTitle() {
902
+ return this.sortDirectionToTitle(this.sortDirection);
903
+ }
904
+ sortDirectionToTitle(sortDirection) {
905
+ switch (sortDirection) {
906
+ case "ASCENDING" /* DataSortDirection.ASCENDING */:
907
+ return 'OCX_LIST_GRID_SORT.TOGGLE_BUTTON.ASCENDING_TITLE';
908
+ case "DESCENDING" /* DataSortDirection.DESCENDING */:
909
+ return 'OCX_LIST_GRID_SORT.TOGGLE_BUTTON.DESCENDING_TITLE';
910
+ default:
911
+ return 'OCX_LIST_GRID_SORT.TOGGLE_BUTTON.DEFAULT_TITLE';
912
+ }
913
+ }
914
+ }
915
+ DataListGridSortingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataListGridSortingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
916
+ DataListGridSortingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DataListGridSortingComponent, selector: "ocx-data-list-grid-sorting", inputs: { columns: "columns", sortStates: "sortStates", sortDirection: "sortDirection", sortField: "sortField" }, outputs: { sortChange: "sortChange", sortDirectionChange: "sortDirectionChange", columnsChange: "columnsChange" }, ngImport: i0, template: "<div class=\"flex align-items-center gap-2\">\n <p-dropdown\n id=\"dataListGridSortingDropdown\"\n [(ngModel)]=\"selectedSortingOption\"\n class=\"sort-dropdown\"\n [options]=\"dropdownOptions\"\n [placeholder]=\"('OCX_LIST_GRID_SORT.DROPDOWN.PLACEHOLDER' | translate)\"\n (onChange)=\"selectSorting($event)\"\n [title]=\"('OCX_LIST_GRID_SORT.DROPDOWN.TITLE' | translate)\"\n >\n <ng-template let-item pTemplate=\"item\"> {{ item?.columnName ? (item.columnName | translate) : ''}} </ng-template>\n <ng-template let-item pTemplate=\"selectedItem\">\n {{ item?.columnName ? (item.columnName | translate) : ''}}\n </ng-template></p-dropdown\n >\n <p-button\n id=\"dataListGridSortingButton\"\n icon=\"pi {{sortIcon()}}\"\n styleClass=\"p-button-outlined\"\n (onClick)=\"sortDirectionChanged()\"\n [title]=\"(sortIconTitle() | translate)\"\n [ariaLabel]=\"('OCX_LIST_GRID_SORT.SORTING_BUTTON_ARIA_LABEL' | translate:{direction: (sortDirectionToTitle(nextSortDirection())) | translate})\"\n ></p-button>\n</div>\n", styles: [".pi{border-radius:var(--border-radius);border-width:thin;background:none;cursor:pointer}\n"], dependencies: [{ kind: "component", type: i2$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataListGridSortingComponent, decorators: [{
918
+ type: Component,
919
+ args: [{ selector: 'ocx-data-list-grid-sorting', template: "<div class=\"flex align-items-center gap-2\">\n <p-dropdown\n id=\"dataListGridSortingDropdown\"\n [(ngModel)]=\"selectedSortingOption\"\n class=\"sort-dropdown\"\n [options]=\"dropdownOptions\"\n [placeholder]=\"('OCX_LIST_GRID_SORT.DROPDOWN.PLACEHOLDER' | translate)\"\n (onChange)=\"selectSorting($event)\"\n [title]=\"('OCX_LIST_GRID_SORT.DROPDOWN.TITLE' | translate)\"\n >\n <ng-template let-item pTemplate=\"item\"> {{ item?.columnName ? (item.columnName | translate) : ''}} </ng-template>\n <ng-template let-item pTemplate=\"selectedItem\">\n {{ item?.columnName ? (item.columnName | translate) : ''}}\n </ng-template></p-dropdown\n >\n <p-button\n id=\"dataListGridSortingButton\"\n icon=\"pi {{sortIcon()}}\"\n styleClass=\"p-button-outlined\"\n (onClick)=\"sortDirectionChanged()\"\n [title]=\"(sortIconTitle() | translate)\"\n [ariaLabel]=\"('OCX_LIST_GRID_SORT.SORTING_BUTTON_ARIA_LABEL' | translate:{direction: (sortDirectionToTitle(nextSortDirection())) | translate})\"\n ></p-button>\n</div>\n", styles: [".pi{border-radius:var(--border-radius);border-width:thin;background:none;cursor:pointer}\n"] }]
920
+ }], propDecorators: { columns: [{
921
+ type: Input
922
+ }], sortStates: [{
923
+ type: Input
924
+ }], sortDirection: [{
925
+ type: Input
926
+ }], sortField: [{
927
+ type: Input
928
+ }], sortChange: [{
929
+ type: Output
930
+ }], sortDirectionChange: [{
931
+ type: Output
932
+ }], columnsChange: [{
933
+ type: Output
934
+ }] } });
935
+
936
+ // eslint-disable-next-line @angular-eslint/use-pipe-transform-interface
937
+ class OcxTimeAgoPipe extends TimeagoPipe {
938
+ }
939
+ OcxTimeAgoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OcxTimeAgoPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe });
940
+ OcxTimeAgoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: OcxTimeAgoPipe, name: "timeago" });
941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OcxTimeAgoPipe, decorators: [{
942
+ type: Pipe,
943
+ args: [{
944
+ name: 'timeago',
945
+ }]
946
+ }] });
947
+
948
+ class DataTableComponent extends DataSortBase {
949
+ get rows() {
950
+ return this._rows$.getValue();
951
+ }
952
+ set rows(value) {
953
+ this._rows$.next(value);
954
+ }
955
+ get selectedRows() {
956
+ return this._selection$.getValue();
957
+ }
958
+ set selectedRows(value) {
959
+ this._selection$.next(value);
960
+ }
961
+ get filters() {
962
+ return this._filters$.getValue();
963
+ }
964
+ set filters(value) {
965
+ this._filters$.next(value);
966
+ }
967
+ get sortDirection() {
968
+ return this._sortDirection$.getValue();
969
+ }
970
+ set sortDirection(value) {
971
+ this._sortDirection$.next(value);
972
+ }
973
+ get sortColumn() {
974
+ return this === null || this === void 0 ? void 0 : this._sortColumn$.getValue();
975
+ }
976
+ set sortColumn(value) {
977
+ this === null || this === void 0 ? void 0 : this._sortColumn$.next(value);
978
+ }
979
+ get totalRecordsOnServer() {
980
+ return this.params['totalRecordsOnServer'] ? Number(this.params['totalRecordsOnServer']) : undefined;
981
+ }
982
+ set totalRecordsOnServer(value) {
983
+ var _a;
984
+ this.params['totalRecordsOnServer'] = (_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : '0';
985
+ }
986
+ get _stringCell() {
987
+ return this.stringCellTemplate || this.stringCellChildTemplate;
988
+ }
989
+ get _numberCell() {
990
+ return this.numberCellTemplate || this.numberCellChildTemplate;
991
+ }
992
+ get _dateCell() {
993
+ return this.dateCellTemplate || this.dateCellChildTemplate;
994
+ }
995
+ get _relativeDateCell() {
996
+ return this.relativeDateCellTemplate || this.relativeDateCellChildTemplate;
997
+ }
998
+ get _cell() {
999
+ return this.cellTemplate || this.cellChildTemplate;
1000
+ }
1001
+ get _translationKeyCell() {
1002
+ return this.translationKeyCellTemplate || this.translationKeyCellChildTemplate;
1003
+ }
1004
+ get viewTableRowObserved() {
1005
+ const dv = this.injector.get('DataViewComponent', null);
1006
+ return (dv === null || dv === void 0 ? void 0 : dv.viewItemObserved) || (dv === null || dv === void 0 ? void 0 : dv.viewItem.observed) || this.viewTableRow.observed;
1007
+ }
1008
+ get editTableRowObserved() {
1009
+ const dv = this.injector.get('DataViewComponent', null);
1010
+ return (dv === null || dv === void 0 ? void 0 : dv.editItemObserved) || (dv === null || dv === void 0 ? void 0 : dv.editItem.observed) || this.editTableRow.observed;
1011
+ }
1012
+ get deleteTableRowObserved() {
1013
+ const dv = this.injector.get('DataViewComponent', null);
1014
+ return (dv === null || dv === void 0 ? void 0 : dv.deleteItemObserved) || (dv === null || dv === void 0 ? void 0 : dv.deleteItem.observed) || this.deleteTableRow.observed;
1015
+ }
1016
+ get anyRowActionObserved() {
1017
+ return this.viewTableRowObserved || this.editTableRowObserved || this.deleteTableRowObserved;
1018
+ }
1019
+ get selectionChangedObserved() {
1020
+ const dv = this.injector.get('DataViewComponent', null);
1021
+ return (dv === null || dv === void 0 ? void 0 : dv.selectionChangedObserved) || (dv === null || dv === void 0 ? void 0 : dv.selectionChanged.observed) || this.selectionChanged.observed;
1022
+ }
1023
+ constructor(locale, translateService, router, injector) {
1024
+ super(locale, translateService);
1025
+ this.router = router;
1026
+ this.injector = injector;
1027
+ this._rows$ = new BehaviorSubject([]);
1028
+ this._selection$ = new BehaviorSubject([]);
1029
+ this._filters$ = new BehaviorSubject([]);
1030
+ this._sortDirection$ = new BehaviorSubject("NONE" /* DataSortDirection.NONE */);
1031
+ this._sortColumn$ = new BehaviorSubject('');
1032
+ this.columns = [];
1033
+ this.clientSideFiltering = true;
1034
+ this.clientSideSorting = true;
1035
+ this.sortStates = ["ASCENDING" /* DataSortDirection.ASCENDING */, "DESCENDING" /* DataSortDirection.DESCENDING */];
1036
+ this.pageSizes = [10, 25, 50];
1037
+ this.pageSize = this.pageSizes[0] || 50;
1038
+ this.name = '';
1039
+ this.paginator = true;
1040
+ this.page = 0;
1041
+ this.currentPageShowingKey = 'OCX_DATA_TABLE.SHOWING';
1042
+ this.currentPageShowingWithTotalOnServerKey = 'OCX_DATA_TABLE.SHOWING_WITH_TOTAL_ON_SERVER';
1043
+ this.params = {
1044
+ currentPage: '{currentPage}',
1045
+ totalPages: '{totalPages}',
1046
+ rows: '{rows}',
1047
+ first: '{first}',
1048
+ last: '{last}',
1049
+ totalRecords: '{totalRecords}',
1050
+ };
1051
+ this.additionalActions = [];
1052
+ this.frozenActionColumn = false;
1053
+ this.actionColumnPosition = 'right';
1054
+ this.filtered = new EventEmitter();
1055
+ this.sorted = new EventEmitter();
1056
+ this.viewTableRow = new EventEmitter();
1057
+ this.editTableRow = new EventEmitter();
1058
+ this.deleteTableRow = new EventEmitter();
1059
+ this.selectionChanged = new EventEmitter();
1060
+ this.pageChanged = new EventEmitter();
1061
+ this.currentFilterColumn$ = new BehaviorSubject(null);
1062
+ this.name = this.name || this.router.url.replace(/[^A-Za-z0-9]/, '_');
1063
+ }
1064
+ ngOnInit() {
1065
+ this.displayedRows$ = combineLatest([this._rows$, this._filters$, this._sortColumn$, this._sortDirection$]).pipe(mergeMap((params) => this.translateItems(params, this.columns, this.clientSideFiltering, this.clientSideSorting)), map((params) => this.filterItems(params, this.clientSideFiltering)), map((params) => this.sortItems(params, this.columns, this.clientSideSorting)), map(([rows]) => this.flattenItems(rows)));
1066
+ this.currentSelectedFilters$ = combineLatest([this._filters$, this.currentFilterColumn$]).pipe(map(([filters, currentFilterColumn]) => {
1067
+ return filters.filter((filter) => filter.columnId === (currentFilterColumn === null || currentFilterColumn === void 0 ? void 0 : currentFilterColumn.id)).map((filter) => filter.value);
1068
+ }));
1069
+ this.currentFilterOptions$ = combineLatest([this._rows$, this.currentFilterColumn$, this._filters$]).pipe(mergeMap(([rows, currentFilterColumn, filters]) => {
1070
+ var _a;
1071
+ if (!(currentFilterColumn === null || currentFilterColumn === void 0 ? void 0 : currentFilterColumn.id)) {
1072
+ return of([]);
1073
+ }
1074
+ const currentFilters = filters
1075
+ .filter((filter) => filter.columnId === (currentFilterColumn === null || currentFilterColumn === void 0 ? void 0 : currentFilterColumn.id))
1076
+ .map((filter) => filter.value);
1077
+ const columnValues = rows.map((row) => row[currentFilterColumn === null || currentFilterColumn === void 0 ? void 0 : currentFilterColumn.id]);
1078
+ const translateObservable = ((_a = this.columns.find((c) => c.id === (currentFilterColumn === null || currentFilterColumn === void 0 ? void 0 : currentFilterColumn.id))) === null || _a === void 0 ? void 0 : _a.columnType) === ColumnType.TRANSLATION_KEY
1079
+ ? this.translateService.get(columnValues)
1080
+ : of(Object.fromEntries(columnValues.map((cv) => [cv, cv])));
1081
+ return translateObservable.pipe(map((translatedValues) => {
1082
+ return Object.values(translatedValues)
1083
+ .concat(currentFilters)
1084
+ .filter((value, index, self) => self.indexOf(value) === index && value != null)
1085
+ .map((filterOption) => ({
1086
+ label: filterOption,
1087
+ value: filterOption,
1088
+ }));
1089
+ }));
1090
+ }));
1091
+ this.filterAmounts$ = this._filters$.pipe(map((filters) => filters
1092
+ .map((filter) => filter.columnId)
1093
+ .map((columnId) => [columnId, filters.filter((filter) => filter.columnId === columnId).length])), map((amounts) => Object.fromEntries(amounts)));
1094
+ this.mapSelectionToRows();
1095
+ }
1096
+ onSortColumnClick(sortColumn) {
1097
+ const newSortDirection = this.columnNextSortDirection(sortColumn);
1098
+ this._sortColumn$.next(sortColumn);
1099
+ this._sortDirection$.next(newSortDirection);
1100
+ this.sorted.emit({ sortColumn: sortColumn, sortDirection: newSortDirection });
1101
+ }
1102
+ columnNextSortDirection(sortColumn) {
1103
+ return sortColumn !== this.sortColumn
1104
+ ? this.sortStates[0]
1105
+ : this.sortStates[(this.sortStates.indexOf(this.sortDirection) + 1) % this.sortStates.length];
1106
+ }
1107
+ onDeleteRow(selectedTableRow) {
1108
+ this.deleteTableRow.emit(selectedTableRow);
1109
+ }
1110
+ onViewRow(selectedTableRow) {
1111
+ this.viewTableRow.emit(selectedTableRow);
1112
+ }
1113
+ onEditRow(selectedTableRow) {
1114
+ this.editTableRow.emit(selectedTableRow);
1115
+ }
1116
+ onFilterClick(column) {
1117
+ this.currentFilterColumn$.next(column);
1118
+ }
1119
+ onFilterChange(column, event) {
1120
+ const filters = this.filters
1121
+ .filter((filter) => filter.columnId !== column.id)
1122
+ .concat(event.value.map((value) => ({
1123
+ columnId: column.id,
1124
+ value,
1125
+ })));
1126
+ if (this.clientSideFiltering) {
1127
+ this.filters = filters;
1128
+ }
1129
+ this.filtered.emit(filters);
1130
+ }
1131
+ getSelectedFilters(columnId) {
1132
+ return this.filters.filter((filter) => filter.columnId === columnId).map((filter) => filter.value);
1133
+ }
1134
+ sortIconTitle(sortColumn) {
1135
+ return this.sortDirectionToTitle(sortColumn !== this.sortDirection
1136
+ ? "NONE" /* DataSortDirection.NONE */
1137
+ : this.sortStates[this.sortStates.indexOf(this.sortDirection) % this.sortStates.length]);
1138
+ }
1139
+ sortDirectionToTitle(sortDirection) {
1140
+ switch (sortDirection) {
1141
+ case "ASCENDING" /* DataSortDirection.ASCENDING */:
1142
+ return 'OCX_DATA_TABLE.TOGGLE_BUTTON.ASCENDING_TITLE';
1143
+ case "DESCENDING" /* DataSortDirection.DESCENDING */:
1144
+ return 'OCX_DATA_TABLE.TOGGLE_BUTTON.DESCENDING_TITLE';
1145
+ default:
1146
+ return 'OCX_DATA_TABLE.TOGGLE_BUTTON.DEFAULT_TITLE';
1147
+ }
1148
+ }
1149
+ mapSelectionToRows() {
1150
+ this.selectedRows$ = combineLatest([this._selection$, this._rows$]).pipe(map(([selectedRows, rows]) => {
1151
+ return selectedRows.map((row) => {
1152
+ return rows.find((r) => r.id === row.id);
1153
+ });
1154
+ }));
1155
+ }
1156
+ onSelectionChange(event) {
1157
+ this.selectionChanged.emit(event);
1158
+ }
1159
+ onPageChange(event) {
1160
+ const page = event.first / event.rows;
1161
+ this.page = page;
1162
+ this.pageChanged.emit(page);
1163
+ }
1164
+ fieldIsTruthy(object, key) {
1165
+ return !!(ObjectUtils.resolveFieldData(object, key));
1166
+ }
1167
+ }
1168
+ DataTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataTableComponent, deps: [{ token: LOCALE_ID }, { token: i1.TranslateService }, { token: i1$1.Router }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1169
+ DataTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DataTableComponent, selector: "ocx-data-table", inputs: { rows: "rows", selectedRows: "selectedRows", filters: "filters", sortDirection: "sortDirection", sortColumn: "sortColumn", columns: "columns", clientSideFiltering: "clientSideFiltering", clientSideSorting: "clientSideSorting", sortStates: "sortStates", pageSizes: "pageSizes", pageSize: "pageSize", emptyResultsMessage: "emptyResultsMessage", name: "name", deletePermission: "deletePermission", viewPermission: "viewPermission", editPermission: "editPermission", deleteActionVisibleField: "deleteActionVisibleField", deleteActionEnabledField: "deleteActionEnabledField", viewActionVisibleField: "viewActionVisibleField", viewActionEnabledField: "viewActionEnabledField", editActionVisibleField: "editActionVisibleField", editActionEnabledField: "editActionEnabledField", paginator: "paginator", page: "page", totalRecordsOnServer: "totalRecordsOnServer", currentPageShowingKey: "currentPageShowingKey", currentPageShowingWithTotalOnServerKey: "currentPageShowingWithTotalOnServerKey", stringCellTemplate: "stringCellTemplate", numberCellTemplate: "numberCellTemplate", dateCellTemplate: "dateCellTemplate", relativeDateCellTemplate: "relativeDateCellTemplate", cellTemplate: "cellTemplate", translationKeyCellTemplate: "translationKeyCellTemplate", additionalActions: "additionalActions", frozenActionColumn: "frozenActionColumn", actionColumnPosition: "actionColumnPosition" }, outputs: { filtered: "filtered", sorted: "sorted", viewTableRow: "viewTableRow", editTableRow: "editTableRow", deleteTableRow: "deleteTableRow", selectionChanged: "selectionChanged", pageChanged: "pageChanged" }, queries: [{ propertyName: "stringCellChildTemplate", first: true, predicate: ["stringCell"], descendants: true }, { propertyName: "numberCellChildTemplate", first: true, predicate: ["numberCell"], descendants: true }, { propertyName: "dateCellChildTemplate", first: true, predicate: ["dateCell"], descendants: true }, { propertyName: "relativeDateCellChildTemplate", first: true, predicate: ["relativeDateCell"], descendants: true }, { propertyName: "cellChildTemplate", first: true, predicate: ["cell"], descendants: true }, { propertyName: "translationKeyCellChildTemplate", first: true, predicate: ["translationKeyCell"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #actionColumn let-rowObject=\"localRowObject\">\n <ng-container *ngIf=\"anyRowActionObserved\">\n <td\n class=\"actions\"\n pFrozenColumn\n [frozen]=\"frozenActionColumn\"\n [alignFrozen]=\"actionColumnPosition\"\n [attr.name]=\"actionColumnPosition === 'left' ? 'action-column-left' : 'action-column-right'\"\n [ngClass]=\"(frozenActionColumn && actionColumnPosition === 'left') ? 'border-right-1' : (frozenActionColumn && actionColumnPosition === 'right') ? 'border-left-1' : ''\"\n >\n <div class=\"icon-button-row-wrapper\">\n <ng-container *ngIf=\"viewTableRowObserved && (!viewActionVisibleField || fieldIsTruthy(rowObject, viewActionVisibleField))\">\n <button\n *ocxIfPermission=\"viewPermission\"\n [disabled]=\"!!viewActionEnabledField && !fieldIsTruthy(rowObject, viewActionEnabledField)\"\n pButton\n class=\"p-button-rounded p-button-text viewTableRowButton\"\n title=\"{{ 'OCX_DATA_TABLE.ACTIONS.VIEW' | translate }}\"\n [attr.aria-label]=\"'OCX_DATA_TABLE.ACTIONS.VIEW' | translate\"\n icon=\"pi pi-eye\"\n (click)=\"onViewRow(rowObject)\"\n [attr.name]=\"'data-table-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"editTableRowObserved && (!editActionVisibleField || fieldIsTruthy(rowObject, editActionVisibleField))\">\n <button\n *ocxIfPermission=\"editPermission\"\n [disabled]=\"!!editActionEnabledField && !fieldIsTruthy(rowObject, editActionEnabledField)\"\n pButton\n class=\"p-button-rounded p-button-text editTableRowButton\"\n title=\"{{ 'OCX_DATA_TABLE.ACTIONS.EDIT' | translate }}\"\n [attr.aria-label]=\"'OCX_DATA_TABLE.ACTIONS.EDIT' | translate\"\n icon=\"pi pi-pencil\"\n (click)=\"onEditRow(rowObject)\"\n [attr.name]=\"'data-table-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"deleteTableRowObserved && (!deleteActionVisibleField || fieldIsTruthy(rowObject, deleteActionVisibleField))\">\n <button\n *ocxIfPermission=\"deletePermission\"\n [disabled]=\"!!deleteActionEnabledField && !fieldIsTruthy(rowObject, deleteActionEnabledField)\"\n pButton\n class=\"p-button-rounded p-button-text p-button-danger deleteTableRowButton\"\n title=\"{{ 'OCX_DATA_TABLE.ACTIONS.DELETE' | translate }}\"\n [attr.aria-label]=\"'OCX_DATA_TABLE.ACTIONS.DELETE' | translate\"\n icon=\"pi pi-trash\"\n (click)=\"onDeleteRow(rowObject)\"\n [attr.name]=\"'data-table-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngFor=\"let action of additionalActions\">\n <button\n *ocxIfPermission=\"action.permission\"\n pButton\n class=\"p-button-rounded p-button-text\"\n [ngClass]=\"action.classes\"\n [icon]=\"action.icon || ''\"\n (click)=\"action.callback(rowObject)\"\n [title]=\"action.labelKey ? (action.labelKey | translate) : ''\"\n [attr.aria-label]=\"action.labelKey ? (action.labelKey | translate) : ''\"\n [disabled]=\"action.disabled\"\n ></button>\n </ng-container>\n </div>\n </td>\n </ng-container>\n</ng-template>\n\n<ng-template #actionColumnHeader>\n <ng-container *ngIf=\"anyRowActionObserved\">\n <th\n pFrozenColumn\n [frozen]=\"frozenActionColumn\"\n [alignFrozen]=\"actionColumnPosition\"\n [ngClass]=\"(frozenActionColumn && actionColumnPosition === 'left') ? 'border-right-1' : (frozenActionColumn && actionColumnPosition === 'right') ? 'border-left-1' : ''\"\n [attr.name]=\"actionColumnPosition === 'left' ? 'action-column-header-left' : 'action-column-header-right'\"\n >\n {{ 'OCX_DATA_TABLE.ACTIONS_COLUMN_NAME' | translate }}\n </th>\n </ng-container>\n</ng-template>\n\n<p-table\n [value]=\"(displayedRows$ | async) || []\"\n responsiveLayout=\"scroll\"\n [paginator]=\"paginator\"\n [first]=\"page * pageSize\"\n (onPage)=\"onPageChange($event)\"\n [rows]=\"pageSize\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{{ (totalRecordsOnServer ? currentPageShowingWithTotalOnServerKey : currentPageShowingKey) | translate:params }}\"\n [rowsPerPageOptions]=\"[10, 25, 50, rows?.length]\"\n id=\"dataTable_{{name}}\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selection]=\"(selectedRows$ | async) || []\"\n [scrollable]=\"true\"\n>\n <ng-template let-item pTemplate=\"paginatordropdownitem\">\n {{ item.value === rows?.length ? (\"OCX_DATA_TABLE.ALL\" | translate) : item.value }}\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th style=\"width: 4rem\" scope=\"col\" *ngIf=\"selectionChangedObserved\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngIf=\"actionColumnPosition === 'left';\">\n <ng-container *ngTemplateOutlet=\"actionColumnHeader\"></ng-container>\n </ng-container>\n <ng-container *ngFor=\"let column of columns\">\n <th *ngIf=\"column.sortable || column.filterable; else simpleHeader\" scope=\"col\">\n <div class=\"table-header-wrapper\">\n <span id=\"{{column.id}}-header-name\">{{ column.nameKey | translate }}</span>\n <span class=\"icon-button-header-wrapper\">\n <button\n *ngIf=\"column.sortable\"\n class=\"pi sortButton\"\n [class.pi-sort-alt-slash]=\"(column?.id === sortColumn && sortDirection === 'NONE') || column?.id !== sortColumn\"\n [class.pi-sort-amount-up]=\"column?.id === sortColumn && sortDirection === 'ASCENDING'\"\n [class.pi-sort-amount-down]=\"column?.id === sortColumn && sortDirection === 'DESCENDING'\"\n (click)=\"onSortColumnClick(column.id)\"\n [title]=\"(sortIconTitle(column.id) | translate)\"\n [attr.aria-label]=\"('OCX_DATA_TABLE.TOGGLE_BUTTON.ARIA_LABEL' | translate: { column: (column.nameKey | translate), direction: (sortDirectionToTitle(columnNextSortDirection(column.id)) | translate)})\"\n ></button>\n <p-multiSelect\n class=\"filterMultiSelect\"\n *ngIf=\"column.filterable\"\n [options]=\"(currentFilterOptions$ | async) || []\"\n [ngModel]=\"(currentSelectedFilters$ | async) || []\"\n [showToggleAll]=\"true\"\n emptyFilterMessage=\"{{ 'OCX_DATA_TABLE.EMPTY_FILTER_MESSAGE' | translate }}\"\n [displaySelectedLabel]=\"false\"\n [resetFilterOnHide]=\"true\"\n (onChange)=\"onFilterChange(column, $event)\"\n placeholder=\"Icon\"\n appendTo=\"body\"\n (onClick)=\"onFilterClick(column)\"\n [title]=\"'OCX_DATA_TABLE.FILTER_TITLE' | translate\"\n aria-label=\"{{('OCX_DATA_TABLE.FILTER_ARIA_LABEL' | translate: { column: column.nameKey | translate})}}\"\n >\n <ng-template pTemplate=\"selectedItems\" let-value>\n <div\n class=\"pi\"\n [class.pi-filter]=\"!((filterAmounts$ | async) || {})[column.id]\"\n [class.pi-filter-fill]=\"((filterAmounts$ | async) || {})[column.id] > 0\"\n ></div>\n </ng-template>\n <ng-template pTemplate=\"item\" let-value>\n <ng-container [ngSwitch]=\"(currentFilterColumn$ | async)?.columnType\">\n <span *ngSwitchCase=\"'DATE'\">{{ value.label | date }}</span>\n <span *ngSwitchDefault> {{ value.label }} </span>\n </ng-container>\n </ng-template>\n </p-multiSelect>\n </span>\n </div>\n </th>\n <ng-template #simpleHeader>\n <th scope=\"col\">{{ column.nameKey | translate }}</th>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"actionColumnPosition === 'right';\">\n <ng-container *ngTemplateOutlet=\"actionColumnHeader\"></ng-container>\n </ng-container>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowObject>\n <tr>\n <td *ngIf=\"selectionChangedObserved\">\n <p-tableCheckbox [value]=\"rowObject\"></p-tableCheckbox>\n </td>\n <ng-container *ngIf=\"actionColumnPosition === 'left';\">\n <ng-container *ngTemplateOutlet=\"actionColumn; context: {localRowObject: rowObject}\"></ng-container>\n </ng-container>\n <td *ngFor=\"let column of columns\">\n <ng-container\n [ngTemplateOutlet]=\"\n _cell ? _cell: defaultCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n ></ng-container>\n </td>\n <ng-container *ngIf=\"actionColumnPosition === 'right';\">\n <ng-container *ngTemplateOutlet=\"actionColumn; context: {localRowObject: rowObject}\"></ng-container>\n </ng-container>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td [colSpan]=\"columns.length + ((anyRowActionObserved) ? 1 : 0)\">{{ emptyResultsMessage || (\"OCX_DATA_TABLE.EMPTY_RESULT\" | translate) }}</td>\n </tr>\n </ng-template>\n</p-table>\n\n<ng-template #defaultCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container [ngSwitch]=\"column.columnType\">\n <ng-container *ngSwitchCase=\"'DATE'\">\n <ng-container\n [ngTemplateOutlet]=\"\n _dateCell ? _dateCell : defaultDateCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'RELATIVE_DATE'\">\n <ng-container\n [ngTemplateOutlet]=\"\n _relativeDateCell ? _relativeDateCell : defaultRelativeDateCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'TRANSLATION_KEY'\">\n <ng-container\n [ngTemplateOutlet]=\"\n _translationKeyCell ? _translationKeyCell: defaultTranslationKeyCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'NUMBER'\">\n <ng-container\n [ngTemplateOutlet]=\"\n _numberCell ? _numberCell: defaultNumberCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container\n [ngTemplateOutlet]=\"\n _stringCell ? _stringCell: defaultStringCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #defaultStringCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ rowObject[column.id] }} </ng-container>\n</ng-template>\n\n<ng-template #defaultNumberCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ rowObject[column.id] | number }} </ng-container>\n</ng-template>\n\n<ng-template #defaultDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ rowObject[column.id] | date: 'medium' }} </ng-container>\n</ng-template>\n\n<ng-template #defaultRelativeDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ 'OCX_DATA_TABLE.EDITED' | translate }} {{ rowObject[column.id] | timeago }} </ng-container>\n</ng-template>\n\n<ng-template #defaultTranslationKeyCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ rowObject[column.id] | translate }} </ng-container>\n</ng-template>\n", styles: [":host ::ng-deep .p-multiselect{padding:0;background:#f7f7f7;border:none}:host ::ng-deep .p-multiselect .p-multiselect-container{height:20px;width:20px}:host ::ng-deep .p-multiselect .p-multiselect-trigger{display:none}:host ::ng-deep .p-multiselect .p-multiselect-label.p-placeholder{color:#262626;font-size:.9rem;font-family:Bold,sans-serif;font-weight:700;padding:0}:host ::ng-deep .p-multiselect:focus-within{box-shadow:none;background:#979797}.pi{border:none;background:none;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i6$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "virtualRowHeight", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i6$1.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "component", type: i6$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i6$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i7$1.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "label", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IfPermissionDirective, selector: "[ocxIfPermission], [ocxIfNotPermission]", inputs: ["ocxIfPermission", "ocxIfNotPermission", "onMissingPermission"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }, { kind: "pipe", type: i3.DatePipe, name: "date" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: OcxTimeAgoPipe, name: "timeago" }] });
1170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataTableComponent, decorators: [{
1171
+ type: Component,
1172
+ args: [{ selector: 'ocx-data-table', template: "<ng-template #actionColumn let-rowObject=\"localRowObject\">\n <ng-container *ngIf=\"anyRowActionObserved\">\n <td\n class=\"actions\"\n pFrozenColumn\n [frozen]=\"frozenActionColumn\"\n [alignFrozen]=\"actionColumnPosition\"\n [attr.name]=\"actionColumnPosition === 'left' ? 'action-column-left' : 'action-column-right'\"\n [ngClass]=\"(frozenActionColumn && actionColumnPosition === 'left') ? 'border-right-1' : (frozenActionColumn && actionColumnPosition === 'right') ? 'border-left-1' : ''\"\n >\n <div class=\"icon-button-row-wrapper\">\n <ng-container *ngIf=\"viewTableRowObserved && (!viewActionVisibleField || fieldIsTruthy(rowObject, viewActionVisibleField))\">\n <button\n *ocxIfPermission=\"viewPermission\"\n [disabled]=\"!!viewActionEnabledField && !fieldIsTruthy(rowObject, viewActionEnabledField)\"\n pButton\n class=\"p-button-rounded p-button-text viewTableRowButton\"\n title=\"{{ 'OCX_DATA_TABLE.ACTIONS.VIEW' | translate }}\"\n [attr.aria-label]=\"'OCX_DATA_TABLE.ACTIONS.VIEW' | translate\"\n icon=\"pi pi-eye\"\n (click)=\"onViewRow(rowObject)\"\n [attr.name]=\"'data-table-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"editTableRowObserved && (!editActionVisibleField || fieldIsTruthy(rowObject, editActionVisibleField))\">\n <button\n *ocxIfPermission=\"editPermission\"\n [disabled]=\"!!editActionEnabledField && !fieldIsTruthy(rowObject, editActionEnabledField)\"\n pButton\n class=\"p-button-rounded p-button-text editTableRowButton\"\n title=\"{{ 'OCX_DATA_TABLE.ACTIONS.EDIT' | translate }}\"\n [attr.aria-label]=\"'OCX_DATA_TABLE.ACTIONS.EDIT' | translate\"\n icon=\"pi pi-pencil\"\n (click)=\"onEditRow(rowObject)\"\n [attr.name]=\"'data-table-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"deleteTableRowObserved && (!deleteActionVisibleField || fieldIsTruthy(rowObject, deleteActionVisibleField))\">\n <button\n *ocxIfPermission=\"deletePermission\"\n [disabled]=\"!!deleteActionEnabledField && !fieldIsTruthy(rowObject, deleteActionEnabledField)\"\n pButton\n class=\"p-button-rounded p-button-text p-button-danger deleteTableRowButton\"\n title=\"{{ 'OCX_DATA_TABLE.ACTIONS.DELETE' | translate }}\"\n [attr.aria-label]=\"'OCX_DATA_TABLE.ACTIONS.DELETE' | translate\"\n icon=\"pi pi-trash\"\n (click)=\"onDeleteRow(rowObject)\"\n [attr.name]=\"'data-table-action-button'\"\n ></button>\n </ng-container>\n <ng-container *ngFor=\"let action of additionalActions\">\n <button\n *ocxIfPermission=\"action.permission\"\n pButton\n class=\"p-button-rounded p-button-text\"\n [ngClass]=\"action.classes\"\n [icon]=\"action.icon || ''\"\n (click)=\"action.callback(rowObject)\"\n [title]=\"action.labelKey ? (action.labelKey | translate) : ''\"\n [attr.aria-label]=\"action.labelKey ? (action.labelKey | translate) : ''\"\n [disabled]=\"action.disabled\"\n ></button>\n </ng-container>\n </div>\n </td>\n </ng-container>\n</ng-template>\n\n<ng-template #actionColumnHeader>\n <ng-container *ngIf=\"anyRowActionObserved\">\n <th\n pFrozenColumn\n [frozen]=\"frozenActionColumn\"\n [alignFrozen]=\"actionColumnPosition\"\n [ngClass]=\"(frozenActionColumn && actionColumnPosition === 'left') ? 'border-right-1' : (frozenActionColumn && actionColumnPosition === 'right') ? 'border-left-1' : ''\"\n [attr.name]=\"actionColumnPosition === 'left' ? 'action-column-header-left' : 'action-column-header-right'\"\n >\n {{ 'OCX_DATA_TABLE.ACTIONS_COLUMN_NAME' | translate }}\n </th>\n </ng-container>\n</ng-template>\n\n<p-table\n [value]=\"(displayedRows$ | async) || []\"\n responsiveLayout=\"scroll\"\n [paginator]=\"paginator\"\n [first]=\"page * pageSize\"\n (onPage)=\"onPageChange($event)\"\n [rows]=\"pageSize\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{{ (totalRecordsOnServer ? currentPageShowingWithTotalOnServerKey : currentPageShowingKey) | translate:params }}\"\n [rowsPerPageOptions]=\"[10, 25, 50, rows?.length]\"\n id=\"dataTable_{{name}}\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selection]=\"(selectedRows$ | async) || []\"\n [scrollable]=\"true\"\n>\n <ng-template let-item pTemplate=\"paginatordropdownitem\">\n {{ item.value === rows?.length ? (\"OCX_DATA_TABLE.ALL\" | translate) : item.value }}\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th style=\"width: 4rem\" scope=\"col\" *ngIf=\"selectionChangedObserved\">\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n <ng-container *ngIf=\"actionColumnPosition === 'left';\">\n <ng-container *ngTemplateOutlet=\"actionColumnHeader\"></ng-container>\n </ng-container>\n <ng-container *ngFor=\"let column of columns\">\n <th *ngIf=\"column.sortable || column.filterable; else simpleHeader\" scope=\"col\">\n <div class=\"table-header-wrapper\">\n <span id=\"{{column.id}}-header-name\">{{ column.nameKey | translate }}</span>\n <span class=\"icon-button-header-wrapper\">\n <button\n *ngIf=\"column.sortable\"\n class=\"pi sortButton\"\n [class.pi-sort-alt-slash]=\"(column?.id === sortColumn && sortDirection === 'NONE') || column?.id !== sortColumn\"\n [class.pi-sort-amount-up]=\"column?.id === sortColumn && sortDirection === 'ASCENDING'\"\n [class.pi-sort-amount-down]=\"column?.id === sortColumn && sortDirection === 'DESCENDING'\"\n (click)=\"onSortColumnClick(column.id)\"\n [title]=\"(sortIconTitle(column.id) | translate)\"\n [attr.aria-label]=\"('OCX_DATA_TABLE.TOGGLE_BUTTON.ARIA_LABEL' | translate: { column: (column.nameKey | translate), direction: (sortDirectionToTitle(columnNextSortDirection(column.id)) | translate)})\"\n ></button>\n <p-multiSelect\n class=\"filterMultiSelect\"\n *ngIf=\"column.filterable\"\n [options]=\"(currentFilterOptions$ | async) || []\"\n [ngModel]=\"(currentSelectedFilters$ | async) || []\"\n [showToggleAll]=\"true\"\n emptyFilterMessage=\"{{ 'OCX_DATA_TABLE.EMPTY_FILTER_MESSAGE' | translate }}\"\n [displaySelectedLabel]=\"false\"\n [resetFilterOnHide]=\"true\"\n (onChange)=\"onFilterChange(column, $event)\"\n placeholder=\"Icon\"\n appendTo=\"body\"\n (onClick)=\"onFilterClick(column)\"\n [title]=\"'OCX_DATA_TABLE.FILTER_TITLE' | translate\"\n aria-label=\"{{('OCX_DATA_TABLE.FILTER_ARIA_LABEL' | translate: { column: column.nameKey | translate})}}\"\n >\n <ng-template pTemplate=\"selectedItems\" let-value>\n <div\n class=\"pi\"\n [class.pi-filter]=\"!((filterAmounts$ | async) || {})[column.id]\"\n [class.pi-filter-fill]=\"((filterAmounts$ | async) || {})[column.id] > 0\"\n ></div>\n </ng-template>\n <ng-template pTemplate=\"item\" let-value>\n <ng-container [ngSwitch]=\"(currentFilterColumn$ | async)?.columnType\">\n <span *ngSwitchCase=\"'DATE'\">{{ value.label | date }}</span>\n <span *ngSwitchDefault> {{ value.label }} </span>\n </ng-container>\n </ng-template>\n </p-multiSelect>\n </span>\n </div>\n </th>\n <ng-template #simpleHeader>\n <th scope=\"col\">{{ column.nameKey | translate }}</th>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"actionColumnPosition === 'right';\">\n <ng-container *ngTemplateOutlet=\"actionColumnHeader\"></ng-container>\n </ng-container>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowObject>\n <tr>\n <td *ngIf=\"selectionChangedObserved\">\n <p-tableCheckbox [value]=\"rowObject\"></p-tableCheckbox>\n </td>\n <ng-container *ngIf=\"actionColumnPosition === 'left';\">\n <ng-container *ngTemplateOutlet=\"actionColumn; context: {localRowObject: rowObject}\"></ng-container>\n </ng-container>\n <td *ngFor=\"let column of columns\">\n <ng-container\n [ngTemplateOutlet]=\"\n _cell ? _cell: defaultCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n ></ng-container>\n </td>\n <ng-container *ngIf=\"actionColumnPosition === 'right';\">\n <ng-container *ngTemplateOutlet=\"actionColumn; context: {localRowObject: rowObject}\"></ng-container>\n </ng-container>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td [colSpan]=\"columns.length + ((anyRowActionObserved) ? 1 : 0)\">{{ emptyResultsMessage || (\"OCX_DATA_TABLE.EMPTY_RESULT\" | translate) }}</td>\n </tr>\n </ng-template>\n</p-table>\n\n<ng-template #defaultCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container [ngSwitch]=\"column.columnType\">\n <ng-container *ngSwitchCase=\"'DATE'\">\n <ng-container\n [ngTemplateOutlet]=\"\n _dateCell ? _dateCell : defaultDateCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'RELATIVE_DATE'\">\n <ng-container\n [ngTemplateOutlet]=\"\n _relativeDateCell ? _relativeDateCell : defaultRelativeDateCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'TRANSLATION_KEY'\">\n <ng-container\n [ngTemplateOutlet]=\"\n _translationKeyCell ? _translationKeyCell: defaultTranslationKeyCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'NUMBER'\">\n <ng-container\n [ngTemplateOutlet]=\"\n _numberCell ? _numberCell: defaultNumberCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container\n [ngTemplateOutlet]=\"\n _stringCell ? _stringCell: defaultStringCell\n \"\n [ngTemplateOutletContext]=\"{\n rowObject: rowObject,\n column: column\n }\"\n >\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n\n<ng-template #defaultStringCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ rowObject[column.id] }} </ng-container>\n</ng-template>\n\n<ng-template #defaultNumberCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ rowObject[column.id] | number }} </ng-container>\n</ng-template>\n\n<ng-template #defaultDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ rowObject[column.id] | date: 'medium' }} </ng-container>\n</ng-template>\n\n<ng-template #defaultRelativeDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ 'OCX_DATA_TABLE.EDITED' | translate }} {{ rowObject[column.id] | timeago }} </ng-container>\n</ng-template>\n\n<ng-template #defaultTranslationKeyCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container> {{ rowObject[column.id] | translate }} </ng-container>\n</ng-template>\n", styles: [":host ::ng-deep .p-multiselect{padding:0;background:#f7f7f7;border:none}:host ::ng-deep .p-multiselect .p-multiselect-container{height:20px;width:20px}:host ::ng-deep .p-multiselect .p-multiselect-trigger{display:none}:host ::ng-deep .p-multiselect .p-multiselect-label.p-placeholder{color:#262626;font-size:.9rem;font-family:Bold,sans-serif;font-weight:700;padding:0}:host ::ng-deep .p-multiselect:focus-within{box-shadow:none;background:#979797}.pi{border:none;background:none;cursor:pointer}\n"] }]
1173
+ }], ctorParameters: function () {
1174
+ return [{ type: undefined, decorators: [{
1175
+ type: Inject,
1176
+ args: [LOCALE_ID]
1177
+ }] }, { type: i1.TranslateService }, { type: i1$1.Router }, { type: i0.Injector }];
1178
+ }, propDecorators: { rows: [{
1179
+ type: Input
1180
+ }], selectedRows: [{
1181
+ type: Input
1182
+ }], filters: [{
1183
+ type: Input
1184
+ }], sortDirection: [{
1185
+ type: Input
1186
+ }], sortColumn: [{
1187
+ type: Input
1188
+ }], columns: [{
1189
+ type: Input
1190
+ }], clientSideFiltering: [{
1191
+ type: Input
1192
+ }], clientSideSorting: [{
1193
+ type: Input
1194
+ }], sortStates: [{
1195
+ type: Input
1196
+ }], pageSizes: [{
1197
+ type: Input
1198
+ }], pageSize: [{
1199
+ type: Input
1200
+ }], emptyResultsMessage: [{
1201
+ type: Input
1202
+ }], name: [{
1203
+ type: Input
1204
+ }], deletePermission: [{
1205
+ type: Input
1206
+ }], viewPermission: [{
1207
+ type: Input
1208
+ }], editPermission: [{
1209
+ type: Input
1210
+ }], deleteActionVisibleField: [{
1211
+ type: Input
1212
+ }], deleteActionEnabledField: [{
1213
+ type: Input
1214
+ }], viewActionVisibleField: [{
1215
+ type: Input
1216
+ }], viewActionEnabledField: [{
1217
+ type: Input
1218
+ }], editActionVisibleField: [{
1219
+ type: Input
1220
+ }], editActionEnabledField: [{
1221
+ type: Input
1222
+ }], paginator: [{
1223
+ type: Input
1224
+ }], page: [{
1225
+ type: Input
1226
+ }], totalRecordsOnServer: [{
1227
+ type: Input
1228
+ }], currentPageShowingKey: [{
1229
+ type: Input
1230
+ }], currentPageShowingWithTotalOnServerKey: [{
1231
+ type: Input
1232
+ }], stringCellTemplate: [{
1233
+ type: Input
1234
+ }], stringCellChildTemplate: [{
1235
+ type: ContentChild,
1236
+ args: ['stringCell']
1237
+ }], numberCellTemplate: [{
1238
+ type: Input
1239
+ }], numberCellChildTemplate: [{
1240
+ type: ContentChild,
1241
+ args: ['numberCell']
1242
+ }], dateCellTemplate: [{
1243
+ type: Input
1244
+ }], dateCellChildTemplate: [{
1245
+ type: ContentChild,
1246
+ args: ['dateCell']
1247
+ }], relativeDateCellTemplate: [{
1248
+ type: Input
1249
+ }], relativeDateCellChildTemplate: [{
1250
+ type: ContentChild,
1251
+ args: ['relativeDateCell']
1252
+ }], cellTemplate: [{
1253
+ type: Input
1254
+ }], cellChildTemplate: [{
1255
+ type: ContentChild,
1256
+ args: ['cell']
1257
+ }], translationKeyCellTemplate: [{
1258
+ type: Input
1259
+ }], translationKeyCellChildTemplate: [{
1260
+ type: ContentChild,
1261
+ args: ['translationKeyCell']
1262
+ }], additionalActions: [{
1263
+ type: Input
1264
+ }], frozenActionColumn: [{
1265
+ type: Input
1266
+ }], actionColumnPosition: [{
1267
+ type: Input
1268
+ }], filtered: [{
1269
+ type: Output
1270
+ }], sorted: [{
1271
+ type: Output
1272
+ }], viewTableRow: [{
1273
+ type: Output
1274
+ }], editTableRow: [{
1275
+ type: Output
1276
+ }], deleteTableRow: [{
1277
+ type: Output
1278
+ }], selectionChanged: [{
1279
+ type: Output
1280
+ }], pageChanged: [{
1281
+ type: Output
1282
+ }] } });
1283
+
1284
+ class DataViewComponent {
1285
+ set listGrid(ref) {
1286
+ this._dataListGridComponent = ref;
1287
+ this.registerEventListenerForListGrid();
1288
+ }
1289
+ get listGrid() {
1290
+ return this._dataListGridComponent;
1291
+ }
1292
+ set dataTable(ref) {
1293
+ this._dataTableComponent = ref;
1294
+ this.registerEventListenerForDataTable();
1295
+ }
1296
+ get dataTable() {
1297
+ return this._dataTableComponent;
1298
+ }
1299
+ get paginator() {
1300
+ return this.listGridPaginator && this.tablePaginator;
1301
+ }
1302
+ set paginator(value) {
1303
+ this.listGridPaginator = value;
1304
+ this.tablePaginator = value;
1305
+ }
1306
+ get _stringTableCell() {
1307
+ return this.stringTableCellTemplate || this.stringTableCellChildTemplate;
1308
+ }
1309
+ get _numberTableCell() {
1310
+ return this.numberTableCellTemplate || this.numberTableCellChildTemplate;
1311
+ }
1312
+ get _tableDateCell() {
1313
+ return this.tableDateCellTemplate || this.tableDateCellChildTemplate;
1314
+ }
1315
+ get _tableCell() {
1316
+ return this.tableCellTemplate || this.tableCellChildTemplate;
1317
+ }
1318
+ get _tableTranslationKeyCell() {
1319
+ return this.tableTranslationKeyCellTemplate || this.tableTranslationKeyCellChildTemplate;
1320
+ }
1321
+ get _gridItemSubtitleLines() {
1322
+ return this.gridItemSubtitleLinesTemplate || this.gridItemSubtitleLinesChildTemplate;
1323
+ }
1324
+ get _listItemSubtitleLines() {
1325
+ return this.listItemSubtitleLinesTemplate || this.listItemSubtitleLinesChildTemplate;
1326
+ }
1327
+ get _gridItem() {
1328
+ return this.gridItemTemplate || this.gridItemChildTemplate;
1329
+ }
1330
+ get _listItem() {
1331
+ return this.listItemTemplate || this.listItemChildTemplate;
1332
+ }
1333
+ get _tableRelativeDateCell() {
1334
+ return this.tableRelativeDateCellTemplate || this.tableRelativeDateCellChildTemplate;
1335
+ }
1336
+ get viewItemObserved() {
1337
+ var _a;
1338
+ return ((_a = this.injector.get('InteractiveDataViewComponent', null)) === null || _a === void 0 ? void 0 : _a.viewItem.observed) || this.viewItem.observed;
1339
+ }
1340
+ get editItemObserved() {
1341
+ var _a;
1342
+ return ((_a = this.injector.get('InteractiveDataViewComponent', null)) === null || _a === void 0 ? void 0 : _a.editItem.observed) || this.editItem.observed;
1343
+ }
1344
+ get deleteItemObserved() {
1345
+ var _a;
1346
+ return ((_a = this.injector.get('InteractiveDataViewComponent', null)) === null || _a === void 0 ? void 0 : _a.deleteItem.observed) || this.deleteItem.observed;
1347
+ }
1348
+ get selectionChangedObserved() {
1349
+ var _a;
1350
+ return (((_a = this.injector.get('InteractiveDataViewComponent', null)) === null || _a === void 0 ? void 0 : _a.selectionChanged.observed) ||
1351
+ this.selectionChanged.observed);
1352
+ }
1353
+ constructor(injector) {
1354
+ var _a;
1355
+ this.injector = injector;
1356
+ this.data = [];
1357
+ this.name = 'Data table';
1358
+ this.subtitleLineIds = [];
1359
+ this.layout = ['grid', 'list', 'table'];
1360
+ this.columns = [];
1361
+ this.clientSideFiltering = true;
1362
+ this.fallbackImage = 'placeholder.png';
1363
+ this.filters = [];
1364
+ this.sortField = '';
1365
+ this.sortDirection = "NONE" /* DataSortDirection.NONE */;
1366
+ this.listGridPaginator = true;
1367
+ this.tablePaginator = true;
1368
+ this.page = 0;
1369
+ this.currentPageShowingKey = 'OCX_DATA_TABLE.SHOWING';
1370
+ this.currentPageShowingWithTotalOnServerKey = 'OCX_DATA_TABLE.SHOWING_WITH_TOTAL_ON_SERVER';
1371
+ this.selectedRows = [];
1372
+ this.frozenActionColumn = false;
1373
+ this.actionColumnPosition = 'right';
1374
+ this.sortStates = ["ASCENDING" /* DataSortDirection.ASCENDING */, "DESCENDING" /* DataSortDirection.DESCENDING */];
1375
+ this.pageSizes = [10, 25, 50];
1376
+ this.pageSize = ((_a = this.pageSizes) === null || _a === void 0 ? void 0 : _a[0]) || 50;
1377
+ this.additionalActions = [];
1378
+ this.filtered = new EventEmitter();
1379
+ this.sorted = new EventEmitter();
1380
+ this.deleteItem = new EventEmitter();
1381
+ this.viewItem = new EventEmitter();
1382
+ this.editItem = new EventEmitter();
1383
+ this.selectionChanged = new EventEmitter();
1384
+ this.pageChanged = new EventEmitter();
1385
+ }
1386
+ ngOnInit() {
1387
+ var _a;
1388
+ this.firstColumnId = (_a = this.columns[0]) === null || _a === void 0 ? void 0 : _a.id;
1389
+ }
1390
+ ngDoCheck() {
1391
+ this.registerEventListenerForDataTable();
1392
+ this.registerEventListenerForListGrid();
1393
+ }
1394
+ registerEventListenerForListGrid() {
1395
+ var _a, _b, _c, _d, _e, _f;
1396
+ if (this.layout !== 'table') {
1397
+ if (this.deleteItem.observed) {
1398
+ this.isDeleteItemObserved = true;
1399
+ if (!((_a = this._dataListGridComponent) === null || _a === void 0 ? void 0 : _a.deleteItem.observed)) {
1400
+ (_b = this._dataListGridComponent) === null || _b === void 0 ? void 0 : _b.deleteItem.subscribe((event) => {
1401
+ this.deletingElement(event);
1402
+ });
1403
+ }
1404
+ }
1405
+ if (this.viewItem.observed) {
1406
+ this.isViewItemObserved = true;
1407
+ if (!((_c = this._dataListGridComponent) === null || _c === void 0 ? void 0 : _c.viewItem.observed)) {
1408
+ (_d = this._dataListGridComponent) === null || _d === void 0 ? void 0 : _d.viewItem.subscribe((event) => {
1409
+ this.viewingElement(event);
1410
+ });
1411
+ }
1412
+ }
1413
+ if (this.editItem.observed) {
1414
+ this.IsEditItemObserved = true;
1415
+ if (!((_e = this._dataListGridComponent) === null || _e === void 0 ? void 0 : _e.editItem.observed)) {
1416
+ (_f = this._dataListGridComponent) === null || _f === void 0 ? void 0 : _f.editItem.subscribe((event) => {
1417
+ this.editingElement(event);
1418
+ });
1419
+ }
1420
+ }
1421
+ }
1422
+ }
1423
+ registerEventListenerForDataTable() {
1424
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1425
+ if (this.layout === 'table') {
1426
+ if (this.deleteItem.observed) {
1427
+ this.isDeleteItemObserved = true;
1428
+ if (!((_a = this._dataTableComponent) === null || _a === void 0 ? void 0 : _a.deleteTableRow.observed)) {
1429
+ (_b = this._dataTableComponent) === null || _b === void 0 ? void 0 : _b.deleteTableRow.subscribe((event) => {
1430
+ this.deletingElement(event);
1431
+ });
1432
+ }
1433
+ }
1434
+ if (this.viewItem.observed) {
1435
+ this.isViewItemObserved = true;
1436
+ if (!((_c = this._dataTableComponent) === null || _c === void 0 ? void 0 : _c.viewTableRow.observed)) {
1437
+ (_d = this._dataTableComponent) === null || _d === void 0 ? void 0 : _d.viewTableRow.subscribe((event) => {
1438
+ this.viewingElement(event);
1439
+ });
1440
+ }
1441
+ }
1442
+ if (this.editItem.observed) {
1443
+ this.IsEditItemObserved = true;
1444
+ if (!((_e = this._dataTableComponent) === null || _e === void 0 ? void 0 : _e.editTableRow.observed)) {
1445
+ (_f = this._dataTableComponent) === null || _f === void 0 ? void 0 : _f.editTableRow.subscribe((event) => {
1446
+ this.editingElement(event);
1447
+ });
1448
+ }
1449
+ }
1450
+ if (this.selectionChangedObserved) {
1451
+ if (!((_g = this._dataTableComponent) === null || _g === void 0 ? void 0 : _g.selectionChanged.observed)) {
1452
+ (_h = this._dataTableComponent) === null || _h === void 0 ? void 0 : _h.selectionChanged.subscribe((event) => {
1453
+ this.onRowSelectionChange(event);
1454
+ });
1455
+ }
1456
+ }
1457
+ }
1458
+ }
1459
+ filtering(event) {
1460
+ this.filters = event;
1461
+ this.filtered.emit(event);
1462
+ }
1463
+ sorting(event) {
1464
+ this.sortDirection = event.sortDirection;
1465
+ this.sortField = event.sortColumn;
1466
+ this.sorted.emit(event);
1467
+ }
1468
+ deletingElement(event) {
1469
+ if (this.isDeleteItemObserved) {
1470
+ this.deleteItem.emit(event);
1471
+ }
1472
+ }
1473
+ viewingElement(event) {
1474
+ if (this.isViewItemObserved) {
1475
+ this.viewItem.emit(event);
1476
+ }
1477
+ }
1478
+ editingElement(event) {
1479
+ if (this.IsEditItemObserved) {
1480
+ this.editItem.emit(event);
1481
+ }
1482
+ }
1483
+ onRowSelectionChange(event) {
1484
+ if (this.selectionChangedObserved) {
1485
+ this.selectionChanged.emit(event);
1486
+ }
1487
+ }
1488
+ onPageChange(event) {
1489
+ this.page = event;
1490
+ this.pageChanged.emit(event);
1491
+ }
1492
+ }
1493
+ DataViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataViewComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1494
+ DataViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DataViewComponent, selector: "ocx-data-view", inputs: { deletePermission: "deletePermission", editPermission: "editPermission", viewPermission: "viewPermission", deleteActionVisibleField: "deleteActionVisibleField", deleteActionEnabledField: "deleteActionEnabledField", viewActionVisibleField: "viewActionVisibleField", viewActionEnabledField: "viewActionEnabledField", editActionVisibleField: "editActionVisibleField", editActionEnabledField: "editActionEnabledField", data: "data", name: "name", titleLineId: "titleLineId", subtitleLineIds: "subtitleLineIds", layout: "layout", columns: "columns", emptyResultsMessage: "emptyResultsMessage", clientSideFiltering: "clientSideFiltering", fallbackImage: "fallbackImage", filters: "filters", sortField: "sortField", sortDirection: "sortDirection", listGridPaginator: "listGridPaginator", tablePaginator: "tablePaginator", page: "page", totalRecordsOnServer: "totalRecordsOnServer", currentPageShowingKey: "currentPageShowingKey", currentPageShowingWithTotalOnServerKey: "currentPageShowingWithTotalOnServerKey", selectedRows: "selectedRows", frozenActionColumn: "frozenActionColumn", actionColumnPosition: "actionColumnPosition", paginator: "paginator", sortStates: "sortStates", pageSizes: "pageSizes", pageSize: "pageSize", stringTableCellTemplate: "stringTableCellTemplate", numberTableCellTemplate: "numberTableCellTemplate", tableDateCellTemplate: "tableDateCellTemplate", tableCellTemplate: "tableCellTemplate", tableTranslationKeyCellTemplate: "tableTranslationKeyCellTemplate", gridItemSubtitleLinesTemplate: "gridItemSubtitleLinesTemplate", listItemSubtitleLinesTemplate: "listItemSubtitleLinesTemplate", gridItemTemplate: "gridItemTemplate", listItemTemplate: "listItemTemplate", tableRelativeDateCellTemplate: "tableRelativeDateCellTemplate", additionalActions: "additionalActions" }, outputs: { filtered: "filtered", sorted: "sorted", deleteItem: "deleteItem", viewItem: "viewItem", editItem: "editItem", selectionChanged: "selectionChanged", pageChanged: "pageChanged" }, providers: [{ provide: 'DataViewComponent', useExisting: DataViewComponent }], queries: [{ propertyName: "stringTableCellChildTemplate", first: true, predicate: ["stringTableCell"], descendants: true }, { propertyName: "numberTableCellChildTemplate", first: true, predicate: ["numberTableCell"], descendants: true }, { propertyName: "tableDateCellChildTemplate", first: true, predicate: ["tableDateCell"], descendants: true }, { propertyName: "tableCellChildTemplate", first: true, predicate: ["tableCell"], descendants: true }, { propertyName: "tableTranslationKeyCellChildTemplate", first: true, predicate: ["tableTranslationKeyCell"], descendants: true }, { propertyName: "gridItemSubtitleLinesChildTemplate", first: true, predicate: ["gridItemSubtitleLines"], descendants: true }, { propertyName: "listItemSubtitleLinesChildTemplate", first: true, predicate: ["listItemSubtitleLines"], descendants: true }, { propertyName: "gridItemChildTemplate", first: true, predicate: ["gridItem"], descendants: true }, { propertyName: "listItemChildTemplate", first: true, predicate: ["listItem"], descendants: true }, { propertyName: "tableRelativeDateCellChildTemplate", first: true, predicate: ["tableRelativeDateCell"], descendants: true }], viewQueries: [{ propertyName: "listGrid", first: true, predicate: DataListGridComponent, descendants: true }, { propertyName: "dataTable", first: true, predicate: DataTableComponent, descendants: true }], ngImport: i0, template: "<div *ngIf=\"layout !== 'table'\">\n <ocx-data-list-grid\n #ocxdatalistgrid\n [name]=\"name\"\n [data]=\"data\"\n [columns]=\"columns\"\n [filters]=\"filters\"\n [sortDirection]=\"sortDirection\"\n [sortField]=\"sortField\"\n [sortStates]=\"sortStates\"\n [titleLineId]=\"titleLineId || firstColumnId\"\n [subtitleLineIds]=\"subtitleLineIds\"\n [clientSideSorting]=\"true\"\n [pageSizes]=\"pageSizes\"\n [pageSize]=\"pageSize\"\n [paginator]=\"listGridPaginator\"\n [page]=\"page\"\n (pageChanged)=\"onPageChange($event)\"\n [emptyResultsMessage]=\"emptyResultsMessage\"\n [layout]=\"layout\"\n [deletePermission]=\"deletePermission\"\n [editPermission]=\"editPermission\"\n [viewPermission]=\"viewPermission\"\n [deleteActionEnabledField]=\"deleteActionEnabledField\"\n [deleteActionVisibleField]=\"deleteActionVisibleField\"\n [editActionEnabledField]=\"editActionEnabledField\"\n [editActionVisibleField]=\"editActionVisibleField\"\n [viewActionEnabledField]=\"viewActionEnabledField\"\n [viewActionVisibleField]=\"viewActionVisibleField\"\n [additionalActions]=\"additionalActions\"\n [gridItemSubtitleLinesTemplate]=\"_gridItemSubtitleLines ? gridItemSubtitleLines : undefined\"\n [listItemSubtitleLinesTemplate]=\"_listItemSubtitleLines ? listItemSubtitleLines : undefined\"\n [listItemTemplate]=\"_listItem ? listItem : undefined\"\n [gridItemTemplate]=\"_gridItem ? gridItem : undefined\"\n [totalRecordsOnServer]=\"totalRecordsOnServer\"\n >\n </ocx-data-list-grid>\n <ng-template #listItemSubtitleLines let-item>\n <ng-container\n *ngIf=\"_listItemSubtitleLines\"\n [ngTemplateOutlet]=\"_listItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #gridItemSubtitleLines let-item>\n <ng-container\n *ngIf=\"_gridItemSubtitleLines\"\n [ngTemplateOutlet]=\"_gridItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #gridItem let-item>\n <ng-container *ngIf=\"_gridItem\" [ngTemplateOutlet]=\"_gridItem\" [ngTemplateOutletContext]=\"{$implicit:item}\">\n </ng-container\n ></ng-template>\n <ng-template #listItem let-item>\n <ng-container *ngIf=\"_listItem\" [ngTemplateOutlet]=\"_listItem\" [ngTemplateOutletContext]=\"{$implicit:item}\">\n </ng-container\n ></ng-template>\n</div>\n\n<div *ngIf=\"layout === 'table'\">\n <ocx-data-table\n #ocxdatatable\n [rows]=\"data\"\n [columns]=\"columns\"\n [filters]=\"filters\"\n [sortDirection]=\"sortDirection\"\n [sortColumn]=\"sortField\"\n [sortStates]=\"sortStates\"\n [clientSideFiltering]=\"true\"\n [clientSideSorting]=\"true\"\n [pageSizes]=\"pageSizes\"\n [pageSize]=\"pageSize\"\n [paginator]=\"tablePaginator\"\n [page]=\"page\"\n (pageChanged)=\"onPageChange($event)\"\n [selectedRows]=\"selectedRows\"\n [frozenActionColumn]=\"frozenActionColumn\"\n [actionColumnPosition]=\"actionColumnPosition\"\n [emptyResultsMessage]=\"emptyResultsMessage\"\n [name]=\"name\"\n [deletePermission]=\"deletePermission\"\n [editPermission]=\"editPermission\"\n [viewPermission]=\"viewPermission\"\n [deleteActionEnabledField]=\"deleteActionEnabledField\"\n [deleteActionVisibleField]=\"deleteActionVisibleField\"\n [editActionEnabledField]=\"editActionEnabledField\"\n [editActionVisibleField]=\"editActionVisibleField\"\n [viewActionEnabledField]=\"viewActionEnabledField\"\n [viewActionVisibleField]=\"viewActionVisibleField\"\n [additionalActions]=\"additionalActions\"\n [stringCellTemplate]=\"_stringTableCell ? stringCell : undefined\"\n [numberCellTemplate]=\"_numberTableCell ? numberCell : undefined\"\n [dateCellTemplate]=\"_tableDateCell ? dateCell : undefined\"\n [relativeDateCellTemplate]=\"_tableRelativeDateCell ? relativeDateCell : undefined\"\n [cellTemplate]=\"_tableCell ? cell : undefined\"\n [translationKeyCellTemplate]=\"_tableTranslationKeyCell ? translationKeyCell : undefined\"\n (sorted)=\"sorting($event)\"\n (filtered)=\"filtering($event)\"\n [totalRecordsOnServer]=\"totalRecordsOnServer\"\n [currentPageShowingKey]=\"currentPageShowingKey\"\n [currentPageShowingWithTotalOnServerKey]=\"currentPageShowingWithTotalOnServerKey\"\n >\n </ocx-data-table>\n <ng-template #stringCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_stringTableCell\"\n [ngTemplateOutlet]=\"_stringTableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #numberCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_numberTableCell\"\n [ngTemplateOutlet]=\"_numberTableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #dateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableDateCell\"\n [ngTemplateOutlet]=\"_tableDateCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #relativeDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableRelativeDateCell\"\n [ngTemplateOutlet]=\"_tableRelativeDateCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #cell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableCell\"\n [ngTemplateOutlet]=\"_tableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #translationKeyCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableTranslationKeyCell\"\n [ngTemplateOutlet]=\"_tableTranslationKeyCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DataListGridComponent, selector: "ocx-data-list-grid", inputs: ["titleLineId", "subtitleLineIds", "clientSideSorting", "clientSideFiltering", "sortStates", "pageSizes", "pageSize", "emptyResultsMessage", "fallbackImage", "layout", "viewPermission", "editPermission", "deletePermission", "deleteActionVisibleField", "deleteActionEnabledField", "viewActionVisibleField", "viewActionEnabledField", "editActionVisibleField", "editActionEnabledField", "viewMenuItemKey", "editMenuItemKey", "deleteMenuItemKey", "paginator", "page", "columns", "name", "totalRecordsOnServer", "currentPageShowingKey", "currentPageShowingWithTotalOnServerKey", "data", "filters", "sortDirection", "sortField", "gridItemSubtitleLinesTemplate", "listItemSubtitleLinesTemplate", "listItemTemplate", "gridItemTemplate", "additionalActions"], outputs: ["viewItem", "editItem", "deleteItem", "pageChanged"] }, { kind: "component", type: DataTableComponent, selector: "ocx-data-table", inputs: ["rows", "selectedRows", "filters", "sortDirection", "sortColumn", "columns", "clientSideFiltering", "clientSideSorting", "sortStates", "pageSizes", "pageSize", "emptyResultsMessage", "name", "deletePermission", "viewPermission", "editPermission", "deleteActionVisibleField", "deleteActionEnabledField", "viewActionVisibleField", "viewActionEnabledField", "editActionVisibleField", "editActionEnabledField", "paginator", "page", "totalRecordsOnServer", "currentPageShowingKey", "currentPageShowingWithTotalOnServerKey", "stringCellTemplate", "numberCellTemplate", "dateCellTemplate", "relativeDateCellTemplate", "cellTemplate", "translationKeyCellTemplate", "additionalActions", "frozenActionColumn", "actionColumnPosition"], outputs: ["filtered", "sorted", "viewTableRow", "editTableRow", "deleteTableRow", "selectionChanged", "pageChanged"] }] });
1495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataViewComponent, decorators: [{
1496
+ type: Component,
1497
+ args: [{ selector: 'ocx-data-view', providers: [{ provide: 'DataViewComponent', useExisting: DataViewComponent }], template: "<div *ngIf=\"layout !== 'table'\">\n <ocx-data-list-grid\n #ocxdatalistgrid\n [name]=\"name\"\n [data]=\"data\"\n [columns]=\"columns\"\n [filters]=\"filters\"\n [sortDirection]=\"sortDirection\"\n [sortField]=\"sortField\"\n [sortStates]=\"sortStates\"\n [titleLineId]=\"titleLineId || firstColumnId\"\n [subtitleLineIds]=\"subtitleLineIds\"\n [clientSideSorting]=\"true\"\n [pageSizes]=\"pageSizes\"\n [pageSize]=\"pageSize\"\n [paginator]=\"listGridPaginator\"\n [page]=\"page\"\n (pageChanged)=\"onPageChange($event)\"\n [emptyResultsMessage]=\"emptyResultsMessage\"\n [layout]=\"layout\"\n [deletePermission]=\"deletePermission\"\n [editPermission]=\"editPermission\"\n [viewPermission]=\"viewPermission\"\n [deleteActionEnabledField]=\"deleteActionEnabledField\"\n [deleteActionVisibleField]=\"deleteActionVisibleField\"\n [editActionEnabledField]=\"editActionEnabledField\"\n [editActionVisibleField]=\"editActionVisibleField\"\n [viewActionEnabledField]=\"viewActionEnabledField\"\n [viewActionVisibleField]=\"viewActionVisibleField\"\n [additionalActions]=\"additionalActions\"\n [gridItemSubtitleLinesTemplate]=\"_gridItemSubtitleLines ? gridItemSubtitleLines : undefined\"\n [listItemSubtitleLinesTemplate]=\"_listItemSubtitleLines ? listItemSubtitleLines : undefined\"\n [listItemTemplate]=\"_listItem ? listItem : undefined\"\n [gridItemTemplate]=\"_gridItem ? gridItem : undefined\"\n [totalRecordsOnServer]=\"totalRecordsOnServer\"\n >\n </ocx-data-list-grid>\n <ng-template #listItemSubtitleLines let-item>\n <ng-container\n *ngIf=\"_listItemSubtitleLines\"\n [ngTemplateOutlet]=\"_listItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #gridItemSubtitleLines let-item>\n <ng-container\n *ngIf=\"_gridItemSubtitleLines\"\n [ngTemplateOutlet]=\"_gridItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #gridItem let-item>\n <ng-container *ngIf=\"_gridItem\" [ngTemplateOutlet]=\"_gridItem\" [ngTemplateOutletContext]=\"{$implicit:item}\">\n </ng-container\n ></ng-template>\n <ng-template #listItem let-item>\n <ng-container *ngIf=\"_listItem\" [ngTemplateOutlet]=\"_listItem\" [ngTemplateOutletContext]=\"{$implicit:item}\">\n </ng-container\n ></ng-template>\n</div>\n\n<div *ngIf=\"layout === 'table'\">\n <ocx-data-table\n #ocxdatatable\n [rows]=\"data\"\n [columns]=\"columns\"\n [filters]=\"filters\"\n [sortDirection]=\"sortDirection\"\n [sortColumn]=\"sortField\"\n [sortStates]=\"sortStates\"\n [clientSideFiltering]=\"true\"\n [clientSideSorting]=\"true\"\n [pageSizes]=\"pageSizes\"\n [pageSize]=\"pageSize\"\n [paginator]=\"tablePaginator\"\n [page]=\"page\"\n (pageChanged)=\"onPageChange($event)\"\n [selectedRows]=\"selectedRows\"\n [frozenActionColumn]=\"frozenActionColumn\"\n [actionColumnPosition]=\"actionColumnPosition\"\n [emptyResultsMessage]=\"emptyResultsMessage\"\n [name]=\"name\"\n [deletePermission]=\"deletePermission\"\n [editPermission]=\"editPermission\"\n [viewPermission]=\"viewPermission\"\n [deleteActionEnabledField]=\"deleteActionEnabledField\"\n [deleteActionVisibleField]=\"deleteActionVisibleField\"\n [editActionEnabledField]=\"editActionEnabledField\"\n [editActionVisibleField]=\"editActionVisibleField\"\n [viewActionEnabledField]=\"viewActionEnabledField\"\n [viewActionVisibleField]=\"viewActionVisibleField\"\n [additionalActions]=\"additionalActions\"\n [stringCellTemplate]=\"_stringTableCell ? stringCell : undefined\"\n [numberCellTemplate]=\"_numberTableCell ? numberCell : undefined\"\n [dateCellTemplate]=\"_tableDateCell ? dateCell : undefined\"\n [relativeDateCellTemplate]=\"_tableRelativeDateCell ? relativeDateCell : undefined\"\n [cellTemplate]=\"_tableCell ? cell : undefined\"\n [translationKeyCellTemplate]=\"_tableTranslationKeyCell ? translationKeyCell : undefined\"\n (sorted)=\"sorting($event)\"\n (filtered)=\"filtering($event)\"\n [totalRecordsOnServer]=\"totalRecordsOnServer\"\n [currentPageShowingKey]=\"currentPageShowingKey\"\n [currentPageShowingWithTotalOnServerKey]=\"currentPageShowingWithTotalOnServerKey\"\n >\n </ocx-data-table>\n <ng-template #stringCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_stringTableCell\"\n [ngTemplateOutlet]=\"_stringTableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #numberCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_numberTableCell\"\n [ngTemplateOutlet]=\"_numberTableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #dateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableDateCell\"\n [ngTemplateOutlet]=\"_tableDateCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #relativeDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableRelativeDateCell\"\n [ngTemplateOutlet]=\"_tableRelativeDateCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #cell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableCell\"\n [ngTemplateOutlet]=\"_tableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n <ng-template #translationKeyCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableTranslationKeyCell\"\n [ngTemplateOutlet]=\"_tableTranslationKeyCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n ></ng-template>\n</div>\n" }]
1498
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { listGrid: [{
1499
+ type: ViewChild,
1500
+ args: [DataListGridComponent]
1501
+ }], dataTable: [{
1502
+ type: ViewChild,
1503
+ args: [DataTableComponent]
1504
+ }], deletePermission: [{
1505
+ type: Input
1506
+ }], editPermission: [{
1507
+ type: Input
1508
+ }], viewPermission: [{
1509
+ type: Input
1510
+ }], deleteActionVisibleField: [{
1511
+ type: Input
1512
+ }], deleteActionEnabledField: [{
1513
+ type: Input
1514
+ }], viewActionVisibleField: [{
1515
+ type: Input
1516
+ }], viewActionEnabledField: [{
1517
+ type: Input
1518
+ }], editActionVisibleField: [{
1519
+ type: Input
1520
+ }], editActionEnabledField: [{
1521
+ type: Input
1522
+ }], data: [{
1523
+ type: Input
1524
+ }], name: [{
1525
+ type: Input
1526
+ }], titleLineId: [{
1527
+ type: Input
1528
+ }], subtitleLineIds: [{
1529
+ type: Input
1530
+ }], layout: [{
1531
+ type: Input
1532
+ }], columns: [{
1533
+ type: Input
1534
+ }], emptyResultsMessage: [{
1535
+ type: Input
1536
+ }], clientSideFiltering: [{
1537
+ type: Input
1538
+ }], fallbackImage: [{
1539
+ type: Input
1540
+ }], filters: [{
1541
+ type: Input
1542
+ }], sortField: [{
1543
+ type: Input
1544
+ }], sortDirection: [{
1545
+ type: Input
1546
+ }], listGridPaginator: [{
1547
+ type: Input
1548
+ }], tablePaginator: [{
1549
+ type: Input
1550
+ }], page: [{
1551
+ type: Input
1552
+ }], totalRecordsOnServer: [{
1553
+ type: Input
1554
+ }], currentPageShowingKey: [{
1555
+ type: Input
1556
+ }], currentPageShowingWithTotalOnServerKey: [{
1557
+ type: Input
1558
+ }], selectedRows: [{
1559
+ type: Input
1560
+ }], frozenActionColumn: [{
1561
+ type: Input
1562
+ }], actionColumnPosition: [{
1563
+ type: Input
1564
+ }], paginator: [{
1565
+ type: Input
1566
+ }], sortStates: [{
1567
+ type: Input
1568
+ }], pageSizes: [{
1569
+ type: Input
1570
+ }], pageSize: [{
1571
+ type: Input
1572
+ }], stringTableCellTemplate: [{
1573
+ type: Input
1574
+ }], stringTableCellChildTemplate: [{
1575
+ type: ContentChild,
1576
+ args: ['stringTableCell']
1577
+ }], numberTableCellTemplate: [{
1578
+ type: Input
1579
+ }], numberTableCellChildTemplate: [{
1580
+ type: ContentChild,
1581
+ args: ['numberTableCell']
1582
+ }], tableDateCellTemplate: [{
1583
+ type: Input
1584
+ }], tableDateCellChildTemplate: [{
1585
+ type: ContentChild,
1586
+ args: ['tableDateCell']
1587
+ }], tableCellTemplate: [{
1588
+ type: Input
1589
+ }], tableCellChildTemplate: [{
1590
+ type: ContentChild,
1591
+ args: ['tableCell']
1592
+ }], tableTranslationKeyCellTemplate: [{
1593
+ type: Input
1594
+ }], tableTranslationKeyCellChildTemplate: [{
1595
+ type: ContentChild,
1596
+ args: ['tableTranslationKeyCell']
1597
+ }], gridItemSubtitleLinesTemplate: [{
1598
+ type: Input
1599
+ }], gridItemSubtitleLinesChildTemplate: [{
1600
+ type: ContentChild,
1601
+ args: ['gridItemSubtitleLines']
1602
+ }], listItemSubtitleLinesTemplate: [{
1603
+ type: Input
1604
+ }], listItemSubtitleLinesChildTemplate: [{
1605
+ type: ContentChild,
1606
+ args: ['listItemSubtitleLines']
1607
+ }], gridItemTemplate: [{
1608
+ type: Input
1609
+ }], gridItemChildTemplate: [{
1610
+ type: ContentChild,
1611
+ args: ['gridItem']
1612
+ }], listItemTemplate: [{
1613
+ type: Input
1614
+ }], listItemChildTemplate: [{
1615
+ type: ContentChild,
1616
+ args: ['listItem']
1617
+ }], tableRelativeDateCellTemplate: [{
1618
+ type: Input
1619
+ }], tableRelativeDateCellChildTemplate: [{
1620
+ type: ContentChild,
1621
+ args: ['tableRelativeDateCell']
1622
+ }], additionalActions: [{
1623
+ type: Input
1624
+ }], filtered: [{
1625
+ type: Output
1626
+ }], sorted: [{
1627
+ type: Output
1628
+ }], deleteItem: [{
1629
+ type: Output
1630
+ }], viewItem: [{
1631
+ type: Output
1632
+ }], editItem: [{
1633
+ type: Output
1634
+ }], selectionChanged: [{
1635
+ type: Output
1636
+ }], pageChanged: [{
1637
+ type: Output
1638
+ }] } });
1639
+
1640
+ class ColorUtils {
1641
+ static calculatePoint(i, intervalSize, colorRangeInfo) {
1642
+ const { colorStart, colorEnd, useEndAsStart } = colorRangeInfo;
1643
+ return useEndAsStart ? colorEnd - i * intervalSize : colorStart + i * intervalSize;
1644
+ }
1645
+ static interpolateColors(dataLength, colorScale, colorRangeInfo) {
1646
+ const { colorStart, colorEnd } = colorRangeInfo;
1647
+ const colorRange = colorEnd - colorStart;
1648
+ const intervalSize = colorRange / dataLength;
1649
+ let i, colorPoint;
1650
+ const colorArray = [];
1651
+ for (i = 0; i < dataLength; i++) {
1652
+ colorPoint = this.calculatePoint(i, intervalSize, colorRangeInfo);
1653
+ colorArray.push(colorScale(colorPoint));
1654
+ }
1655
+ return colorArray;
1656
+ }
1657
+ }
1658
+
1659
+ const allDiagramTypes = [
1660
+ { icon: PrimeIcons.CHART_PIE, layout: "PIE" /* DiagramType.PIE */, titleKey: 'OCX_DIAGRAM.SWITCH_DIAGRAM_TYPE.PIE' },
1661
+ {
1662
+ icon: PrimeIcons.BARS,
1663
+ layout: "HORIZONTAL_BAR" /* DiagramType.HORIZONTAL_BAR */,
1664
+ titleKey: 'OCX_DIAGRAM.SWITCH_DIAGRAM_TYPE.HORIZONTAL_BAR',
1665
+ },
1666
+ {
1667
+ icon: PrimeIcons.CHART_BAR,
1668
+ layout: "VERTICAL_BAR" /* DiagramType.VERTICAL_BAR */,
1669
+ titleKey: 'OCX_DIAGRAM.SWITCH_DIAGRAM_TYPE.VERTICAL_BAR',
1670
+ },
1671
+ ];
1672
+ class DiagramComponent {
1673
+ get diagramType() {
1674
+ return this._diagramType;
1675
+ }
1676
+ set diagramType(value) {
1677
+ this._diagramType = value;
1678
+ this.selectedDiagramType = allDiagramTypes.find((v) => v.layout === value);
1679
+ this.chartType = this.diagramTypeToChartType(value);
1680
+ }
1681
+ get supportedDiagramTypes() {
1682
+ return this._supportedDiagramTypes;
1683
+ }
1684
+ set supportedDiagramTypes(value) {
1685
+ this._supportedDiagramTypes = value;
1686
+ this.shownDiagramTypes = allDiagramTypes.filter((vl) => this.supportedDiagramTypes.includes(vl.layout));
1687
+ }
1688
+ constructor(translateService) {
1689
+ this.translateService = translateService;
1690
+ this.sumKey = 'OCX_DIAGRAM.SUM';
1691
+ this._diagramType = "PIE" /* DiagramType.PIE */;
1692
+ this.chartType = 'pie';
1693
+ this._supportedDiagramTypes = [];
1694
+ this.dataSelected = new EventEmitter();
1695
+ this.diagramTypeChanged = new EventEmitter();
1696
+ this.shownDiagramTypes = [];
1697
+ // Changing the colorRangeInfo, will change the range of the color palette of the diagram.
1698
+ this.colorRangeInfo = {
1699
+ colorStart: 0,
1700
+ colorEnd: 1,
1701
+ useEndAsStart: false,
1702
+ };
1703
+ // Changing the colorScale, will change the thematic color appearance of the diagram.
1704
+ this.colorScale = d3.interpolateCool;
1705
+ }
1706
+ ngOnChanges() {
1707
+ this.generateChart(this.colorScale, this.colorRangeInfo);
1708
+ }
1709
+ ngOnInit() {
1710
+ this.generateChart(this.colorScale, this.colorRangeInfo);
1711
+ }
1712
+ generateChart(colorScale, colorRangeInfo) {
1713
+ if (this.data) {
1714
+ const inputData = this.data.map((diagramData) => diagramData.value);
1715
+ this.amountOfData = this.data.reduce((acc, current) => acc + current.value, 0);
1716
+ const COLORS = interpolateColors(this.data.length, colorScale, colorRangeInfo);
1717
+ this.chartData = {
1718
+ labels: this.data.map((data) => data.label),
1719
+ datasets: [
1720
+ {
1721
+ data: inputData,
1722
+ backgroundColor: COLORS,
1723
+ },
1724
+ ],
1725
+ };
1726
+ }
1727
+ this.chartOptions = Object.assign(Object.assign({ plugins: {
1728
+ legend: {
1729
+ position: 'bottom',
1730
+ },
1731
+ }, maintainAspectRatio: false }, (this._diagramType === "VERTICAL_BAR" /* DiagramType.VERTICAL_BAR */ && {
1732
+ plugins: { legend: { display: false } },
1733
+ scales: { y: { ticks: { precision: 0 } } },
1734
+ })), (this._diagramType === "HORIZONTAL_BAR" /* DiagramType.HORIZONTAL_BAR */ && {
1735
+ indexAxis: 'y',
1736
+ plugins: { legend: { display: false } },
1737
+ scales: { x: { ticks: { precision: 0 } } },
1738
+ }));
1739
+ }
1740
+ diagramTypeToChartType(value) {
1741
+ if (value === "PIE" /* DiagramType.PIE */)
1742
+ return 'pie';
1743
+ else if (value === "HORIZONTAL_BAR" /* DiagramType.HORIZONTAL_BAR */ || value === "VERTICAL_BAR" /* DiagramType.VERTICAL_BAR */)
1744
+ return 'bar';
1745
+ return 'pie';
1746
+ }
1747
+ dataClicked(event) {
1748
+ this.dataSelected.emit(event.length);
1749
+ }
1750
+ onDiagramTypeChanged(event) {
1751
+ this.diagramType = event.value.layout;
1752
+ this.generateChart(this.colorScale, this.colorRangeInfo);
1753
+ this.diagramTypeChanged.emit(event.value.layout);
1754
+ }
1755
+ }
1756
+ DiagramComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DiagramComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
1757
+ DiagramComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DiagramComponent, selector: "ocx-diagram", inputs: { data: "data", sumKey: "sumKey", diagramType: "diagramType", supportedDiagramTypes: "supportedDiagramTypes" }, outputs: { dataSelected: "dataSelected", diagramTypeChanged: "diagramTypeChanged" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"this.data\">\n <div class=\"flex justify-content-center pb-2\" *ngIf=\"shownDiagramTypes.length > 1\">\n <p-selectButton\n [options]=\"shownDiagramTypes\"\n [(ngModel)]=\"selectedDiagramType\"\n optionLabel=\"icon\"\n (onChange)=\"onDiagramTypeChanged($event)\"\n name=\"diagram-type-select-button\"\n >\n <ng-template let-item pTemplate>\n <i [class]=\"item.icon\" [title]=\"item.title || (item.titleKey | translate)\"></i>\n </ng-template>\n </p-selectButton>\n </div>\n <div class=\"w-full flex justify-content-center\">\n <p-chart\n id=\"diagram\"\n [type]=\"chartType\"\n [data]=\"chartData\"\n [responsive]=\"false\"\n [options]=\"chartOptions\"\n (onDataSelect)=\"dataClicked($event)\"\n ></p-chart>\n </div>\n <div class=\"w-full flex justify-content-center mt-2 sumKey\">\n <p class=\"text-md font-medium text-700\">\n <span name=\"sumLabel\"> {{ sumKey | translate }}</span> : <span name=\"amountOfData\">{{ amountOfData}}</span>\n </p>\n </div>\n</ng-container>\n\n<div *ngIf=\"!this.data\" class=\"w-full flex justify-content-center\">\n <p-message severity=\"info\" text=\"{{ 'OCX_DIAGRAM.NO_DATA' | translate }}\"></p-message>\n</div>\n", styles: ["::ng-deep .p-buttonset .p-button{min-width:auto}::ng-deep .p-buttonset{display:flex}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i6.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "tabindex", "multiple", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey"], outputs: ["onOptionClick", "onChange"] }, { kind: "component", type: i5$2.UIChart, selector: "p-chart", inputs: ["type", "plugins", "width", "height", "responsive", "data", "options"], outputs: ["onDataSelect"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
1758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DiagramComponent, decorators: [{
1759
+ type: Component,
1760
+ args: [{ selector: 'ocx-diagram', template: "<ng-container *ngIf=\"this.data\">\n <div class=\"flex justify-content-center pb-2\" *ngIf=\"shownDiagramTypes.length > 1\">\n <p-selectButton\n [options]=\"shownDiagramTypes\"\n [(ngModel)]=\"selectedDiagramType\"\n optionLabel=\"icon\"\n (onChange)=\"onDiagramTypeChanged($event)\"\n name=\"diagram-type-select-button\"\n >\n <ng-template let-item pTemplate>\n <i [class]=\"item.icon\" [title]=\"item.title || (item.titleKey | translate)\"></i>\n </ng-template>\n </p-selectButton>\n </div>\n <div class=\"w-full flex justify-content-center\">\n <p-chart\n id=\"diagram\"\n [type]=\"chartType\"\n [data]=\"chartData\"\n [responsive]=\"false\"\n [options]=\"chartOptions\"\n (onDataSelect)=\"dataClicked($event)\"\n ></p-chart>\n </div>\n <div class=\"w-full flex justify-content-center mt-2 sumKey\">\n <p class=\"text-md font-medium text-700\">\n <span name=\"sumLabel\"> {{ sumKey | translate }}</span> : <span name=\"amountOfData\">{{ amountOfData}}</span>\n </p>\n </div>\n</ng-container>\n\n<div *ngIf=\"!this.data\" class=\"w-full flex justify-content-center\">\n <p-message severity=\"info\" text=\"{{ 'OCX_DIAGRAM.NO_DATA' | translate }}\"></p-message>\n</div>\n", styles: ["::ng-deep .p-buttonset .p-button{min-width:auto}::ng-deep .p-buttonset{display:flex}\n"] }]
1761
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { data: [{
1762
+ type: Input
1763
+ }], sumKey: [{
1764
+ type: Input
1765
+ }], diagramType: [{
1766
+ type: Input
1767
+ }], supportedDiagramTypes: [{
1768
+ type: Input
1769
+ }], dataSelected: [{
1770
+ type: Output
1771
+ }], diagramTypeChanged: [{
1772
+ type: Output
1773
+ }] } });
1774
+ function interpolateColors(amountOfData, colorScale, colorRangeInfo) {
1775
+ return ColorUtils.interpolateColors(amountOfData, colorScale, colorRangeInfo);
1776
+ }
1777
+
1778
+ class GroupByCountDiagramComponent {
1779
+ /**
1780
+ * @deprecated Will be replaced by diagramType
1781
+ */
1782
+ get type() {
1783
+ return this.diagramType;
1784
+ }
1785
+ set type(value) {
1786
+ this.diagramType = value;
1787
+ }
1788
+ get data() {
1789
+ return this._data$.getValue();
1790
+ }
1791
+ set data(value) {
1792
+ this._data$.next(value);
1793
+ }
1794
+ get columnType() {
1795
+ return this._columnType$.getValue();
1796
+ }
1797
+ set columnType(value) {
1798
+ this._columnType$.next(value);
1799
+ }
1800
+ get columnField() {
1801
+ return this._columnField$.getValue();
1802
+ }
1803
+ set columnField(value) {
1804
+ this._columnField$.next(value);
1805
+ }
1806
+ get column() {
1807
+ return { columnType: this.columnType, id: this.columnField };
1808
+ }
1809
+ set column(value) {
1810
+ this.columnType = value.columnType;
1811
+ this.columnField = value.id;
1812
+ }
1813
+ constructor(translateService) {
1814
+ this.translateService = translateService;
1815
+ this.sumKey = 'SEARCH.SUMMARY_TITLE';
1816
+ this.diagramType = "PIE" /* DiagramType.PIE */;
1817
+ this.supportedDiagramTypes = [];
1818
+ this._data$ = new BehaviorSubject([]);
1819
+ this._columnType$ = new BehaviorSubject(ColumnType.STRING);
1820
+ this._columnField$ = new BehaviorSubject('');
1821
+ this.dataSelected = new EventEmitter();
1822
+ this.diagramTypeChanged = new EventEmitter();
1823
+ }
1824
+ ngOnInit() {
1825
+ this.diagramData$ = combineLatest([this._data$, this._columnField$, this._columnType$]).pipe(mergeMap(([data, columnField, columnType]) => {
1826
+ const columnData = data.map((d) => ObjectUtils.resolveFieldData(d, columnField));
1827
+ const occurrences = columnData.reduce((acc, current) => {
1828
+ return acc.some((e) => e.label === current)
1829
+ ? (acc.find((e) => e.label === current).value++, acc)
1830
+ : [...acc, { label: current, value: 1 }];
1831
+ }, []);
1832
+ if (columnType === ColumnType.TRANSLATION_KEY && occurrences.length > 0) {
1833
+ return this.translateService.get(occurrences.map((o) => o.label)).pipe(map((translations) => occurrences.map((o) => ({
1834
+ label: translations[o.label],
1835
+ value: o.value,
1836
+ }))));
1837
+ }
1838
+ else {
1839
+ return of(occurrences);
1840
+ }
1841
+ }));
1842
+ }
1843
+ dataClicked(event) {
1844
+ this.dataSelected.emit(event);
1845
+ }
1846
+ onDiagramTypeChanged(newDiagramType) {
1847
+ this.diagramType = newDiagramType;
1848
+ this.diagramTypeChanged.emit(newDiagramType);
1849
+ }
1850
+ }
1851
+ GroupByCountDiagramComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GroupByCountDiagramComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
1852
+ GroupByCountDiagramComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GroupByCountDiagramComponent, selector: "ocx-group-by-count-diagram", inputs: { sumKey: "sumKey", diagramType: "diagramType", type: "type", supportedDiagramTypes: "supportedDiagramTypes", data: "data", columnType: "columnType", columnField: "columnField", column: "column" }, outputs: { dataSelected: "dataSelected", diagramTypeChanged: "diagramTypeChanged" }, ngImport: i0, template: "<ocx-diagram\n [data]=\"(diagramData$ | async) || []\"\n [sumKey]=\"sumKey\"\n [diagramType]=\"diagramType\"\n (onDataSelect)=\"dataClicked($event)\"\n [supportedDiagramTypes]=\"supportedDiagramTypes\"\n (diagramTypeChanged)=\"onDiagramTypeChanged($event)\"\n></ocx-diagram>\n", dependencies: [{ kind: "component", type: DiagramComponent, selector: "ocx-diagram", inputs: ["data", "sumKey", "diagramType", "supportedDiagramTypes"], outputs: ["dataSelected", "diagramTypeChanged"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }] });
1853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GroupByCountDiagramComponent, decorators: [{
1854
+ type: Component,
1855
+ args: [{ selector: 'ocx-group-by-count-diagram', template: "<ocx-diagram\n [data]=\"(diagramData$ | async) || []\"\n [sumKey]=\"sumKey\"\n [diagramType]=\"diagramType\"\n (onDataSelect)=\"dataClicked($event)\"\n [supportedDiagramTypes]=\"supportedDiagramTypes\"\n (diagramTypeChanged)=\"onDiagramTypeChanged($event)\"\n></ocx-diagram>\n" }]
1856
+ }], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { sumKey: [{
1857
+ type: Input
1858
+ }], diagramType: [{
1859
+ type: Input
1860
+ }], type: [{
1861
+ type: Input
1862
+ }], supportedDiagramTypes: [{
1863
+ type: Input
1864
+ }], data: [{
1865
+ type: Input
1866
+ }], columnType: [{
1867
+ type: Input
1868
+ }], columnField: [{
1869
+ type: Input
1870
+ }], column: [{
1871
+ type: Input
1872
+ }], dataSelected: [{
1873
+ type: Output
1874
+ }], diagramTypeChanged: [{
1875
+ type: Output
1876
+ }] } });
1877
+
1878
+ class InteractiveDataViewComponent {
1879
+ constructor() {
1880
+ this.name = 'Data';
1881
+ this.subtitleLineIds = [];
1882
+ this.supportedViewLayouts = ['grid', 'list', 'table'];
1883
+ this.columns = [];
1884
+ this.clientSideFiltering = true;
1885
+ this.fallbackImage = 'placeholder.png';
1886
+ this.filters = [];
1887
+ this.sortDirection = "NONE" /* DataSortDirection.NONE */;
1888
+ this.sortField = '';
1889
+ this.sortStates = [
1890
+ "ASCENDING" /* DataSortDirection.ASCENDING */,
1891
+ "DESCENDING" /* DataSortDirection.DESCENDING */,
1892
+ "NONE" /* DataSortDirection.NONE */,
1893
+ ];
1894
+ this.pageSizes = [10, 25, 50];
1895
+ this.pageSize = this.pageSizes[0] || 50;
1896
+ this.layout = 'table';
1897
+ this.defaultGroupKey = '';
1898
+ this.customGroupKey = 'OCX_INTERACTIVE_DATA_VIEW.CUSTOM_GROUP';
1899
+ this.groupSelectionNoGroupSelectedKey = 'OCX_INTERACTIVE_DATA_VIEW.NO_GROUP_SELECTED';
1900
+ this.currentPageShowingKey = 'OCX_DATA_TABLE.SHOWING';
1901
+ this.currentPageShowingWithTotalOnServerKey = 'OCX_DATA_TABLE.SHOWING_WITH_TOTAL_ON_SERVER';
1902
+ this.additionalActions = [];
1903
+ this.listGridPaginator = true;
1904
+ this.tablePaginator = true;
1905
+ this.page = 0;
1906
+ this.selectedRows = [];
1907
+ this.displayedColumns = [];
1908
+ this.filtered = new EventEmitter();
1909
+ this.sorted = new EventEmitter();
1910
+ this.deleteItem = new EventEmitter();
1911
+ this.viewItem = new EventEmitter();
1912
+ this.editItem = new EventEmitter();
1913
+ this.dataViewLayoutChange = new EventEmitter();
1914
+ this.displayedColumnsChange = new EventEmitter();
1915
+ this.selectionChanged = new EventEmitter();
1916
+ this.pageChanged = new EventEmitter();
1917
+ this.selectedGroupKey = '';
1918
+ this.frozenActionColumn = false;
1919
+ this.actionColumnPosition = 'right';
1920
+ this._data = [];
1921
+ }
1922
+ set dataView(ref) {
1923
+ this._dataViewComponent = ref;
1924
+ this.registerEventListenerForDataView();
1925
+ }
1926
+ get dataView() {
1927
+ return this._dataViewComponent;
1928
+ }
1929
+ get paginator() {
1930
+ return this.listGridPaginator && this.tablePaginator;
1931
+ }
1932
+ set paginator(value) {
1933
+ this.listGridPaginator = value;
1934
+ this.tablePaginator = value;
1935
+ }
1936
+ get _gridItemSubtitleLines() {
1937
+ return this.gridItemSubtitleLines;
1938
+ }
1939
+ get _listItemSubtitleLines() {
1940
+ return this.listItemSubtitleLines;
1941
+ }
1942
+ get _tableCell() {
1943
+ return this.tableCell;
1944
+ }
1945
+ get _stringTableCell() {
1946
+ return this.stringTableCell;
1947
+ }
1948
+ get _numberTableCell() {
1949
+ return this.numberTableCell;
1950
+ }
1951
+ get _tableDateCell() {
1952
+ return this.tableDateCell;
1953
+ }
1954
+ get _tableRelativeDateCell() {
1955
+ return this.tableRelativeDateCell;
1956
+ }
1957
+ get _tableTranslationKeyCell() {
1958
+ return this.tableTranslationKeyCell;
1959
+ }
1960
+ get _gridItem() {
1961
+ return this.gridItem;
1962
+ }
1963
+ get _listItem() {
1964
+ return this.listItem;
1965
+ }
1966
+ get data() {
1967
+ return this._data;
1968
+ }
1969
+ set data(value) {
1970
+ this._data = value;
1971
+ }
1972
+ ngOnInit() {
1973
+ var _a;
1974
+ this.selectedGroupKey = this.defaultGroupKey;
1975
+ this.displayedColumns = this.columns;
1976
+ if (this.defaultGroupKey) {
1977
+ this.displayedColumns = this.columns.filter((column) => { var _a; return (_a = column.predefinedGroupKeys) === null || _a === void 0 ? void 0 : _a.includes(this.defaultGroupKey); });
1978
+ }
1979
+ this.displayedColumnsChange.emit(this.displayedColumns);
1980
+ if (!this.groupSelectionNoGroupSelectedKey) {
1981
+ this.groupSelectionNoGroupSelectedKey = 'OCX_INTERACTIVE_DATA_VIEW.NO_GROUP_SELECTED';
1982
+ }
1983
+ this.firstColumnId = (_a = this.columns[0]) === null || _a === void 0 ? void 0 : _a.id;
1984
+ }
1985
+ filtering(event) {
1986
+ this.filters = event;
1987
+ this.filtered.emit(event);
1988
+ }
1989
+ sorting(event) {
1990
+ this.sortDirection = event.sortDirection;
1991
+ this.sortField = event.sortColumn;
1992
+ this.sorted.emit(event);
1993
+ }
1994
+ onDeleteElement(element) {
1995
+ if (this.isDeleteItemObserved) {
1996
+ this.deleteItem.emit(element);
1997
+ }
1998
+ }
1999
+ onViewElement(element) {
2000
+ if (this.isViewItemObserved) {
2001
+ this.viewItem.emit(element);
2002
+ }
2003
+ }
2004
+ onEditElement(element) {
2005
+ if (this.isEditItemObserved) {
2006
+ this.editItem.emit(element);
2007
+ }
2008
+ }
2009
+ onDataViewLayoutChange(layout) {
2010
+ this.layout = layout;
2011
+ this.dataViewLayoutChange.emit(layout);
2012
+ }
2013
+ onSortChange($event) {
2014
+ this.sortField = $event;
2015
+ this.sorted.emit({ sortColumn: this.sortField, sortDirection: this.sortDirection });
2016
+ }
2017
+ onSortDirectionChange($event) {
2018
+ this.sortDirection = $event;
2019
+ this.sorted.emit({ sortColumn: this.sortField, sortDirection: this.sortDirection });
2020
+ }
2021
+ onColumnGroupSelectionChange(event) {
2022
+ this.displayedColumns = event.activeColumns;
2023
+ this.selectedGroupKey = event.groupKey;
2024
+ this.displayedColumnsChange.emit(this.displayedColumns);
2025
+ }
2026
+ registerEventListenerForDataView() {
2027
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2028
+ if (this.deleteItem.observed) {
2029
+ this.isDeleteItemObserved = true;
2030
+ if (!((_a = this._dataViewComponent) === null || _a === void 0 ? void 0 : _a.deleteItem.observed)) {
2031
+ (_b = this._dataViewComponent) === null || _b === void 0 ? void 0 : _b.deleteItem.subscribe((event) => {
2032
+ this.onDeleteElement(event);
2033
+ });
2034
+ }
2035
+ }
2036
+ if (this.viewItem.observed) {
2037
+ this.isViewItemObserved = true;
2038
+ if (!((_c = this._dataViewComponent) === null || _c === void 0 ? void 0 : _c.viewItem.observed)) {
2039
+ (_d = this._dataViewComponent) === null || _d === void 0 ? void 0 : _d.viewItem.subscribe((event) => {
2040
+ this.onViewElement(event);
2041
+ });
2042
+ }
2043
+ }
2044
+ if (this.editItem.observed) {
2045
+ this.isEditItemObserved = true;
2046
+ if (!((_e = this._dataViewComponent) === null || _e === void 0 ? void 0 : _e.editItem.observed)) {
2047
+ (_f = this._dataViewComponent) === null || _f === void 0 ? void 0 : _f.editItem.subscribe((event) => {
2048
+ this.onEditElement(event);
2049
+ });
2050
+ }
2051
+ }
2052
+ if (this.selectionChanged.observed) {
2053
+ if (!((_g = this._dataViewComponent) === null || _g === void 0 ? void 0 : _g.selectionChanged.observed)) {
2054
+ (_h = this._dataViewComponent) === null || _h === void 0 ? void 0 : _h.selectionChanged.subscribe((event) => {
2055
+ this.onRowSelectionChange(event);
2056
+ });
2057
+ }
2058
+ }
2059
+ }
2060
+ onColumnSelectionChange(event) {
2061
+ this.displayedColumns = event.activeColumns;
2062
+ this.selectedGroupKey = this.customGroupKey;
2063
+ this.displayedColumnsChange.emit(this.displayedColumns);
2064
+ }
2065
+ onActionColumnConfigChange(event) {
2066
+ this.frozenActionColumn = event.frozenActionColumn;
2067
+ this.actionColumnPosition = event.actionColumnPosition;
2068
+ }
2069
+ onRowSelectionChange(event) {
2070
+ if (this.selectionChanged.observed) {
2071
+ this.selectionChanged.emit(event);
2072
+ }
2073
+ }
2074
+ onPageChange(event) {
2075
+ this.page = event;
2076
+ this.pageChanged.emit(event);
2077
+ }
2078
+ }
2079
+ InteractiveDataViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InteractiveDataViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2080
+ InteractiveDataViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: InteractiveDataViewComponent, selector: "ocx-interactive-data-view", inputs: { deletePermission: "deletePermission", editPermission: "editPermission", viewPermission: "viewPermission", deleteActionVisibleField: "deleteActionVisibleField", deleteActionEnabledField: "deleteActionEnabledField", viewActionVisibleField: "viewActionVisibleField", viewActionEnabledField: "viewActionEnabledField", editActionVisibleField: "editActionVisibleField", editActionEnabledField: "editActionEnabledField", name: "name", titleLineId: "titleLineId", subtitleLineIds: "subtitleLineIds", supportedViewLayouts: "supportedViewLayouts", columns: "columns", emptyResultsMessage: "emptyResultsMessage", clientSideFiltering: "clientSideFiltering", fallbackImage: "fallbackImage", filters: "filters", sortDirection: "sortDirection", sortField: "sortField", sortStates: "sortStates", pageSizes: "pageSizes", pageSize: "pageSize", totalRecordsOnServer: "totalRecordsOnServer", layout: "layout", defaultGroupKey: "defaultGroupKey", customGroupKey: "customGroupKey", groupSelectionNoGroupSelectedKey: "groupSelectionNoGroupSelectedKey", currentPageShowingKey: "currentPageShowingKey", currentPageShowingWithTotalOnServerKey: "currentPageShowingWithTotalOnServerKey", additionalActions: "additionalActions", listGridPaginator: "listGridPaginator", tablePaginator: "tablePaginator", page: "page", selectedRows: "selectedRows", displayedColumns: "displayedColumns", paginator: "paginator", data: "data" }, outputs: { filtered: "filtered", sorted: "sorted", deleteItem: "deleteItem", viewItem: "viewItem", editItem: "editItem", dataViewLayoutChange: "dataViewLayoutChange", displayedColumnsChange: "displayedColumnsChange", selectionChanged: "selectionChanged", pageChanged: "pageChanged" }, providers: [{ provide: 'InteractiveDataViewComponent', useExisting: InteractiveDataViewComponent }], queries: [{ propertyName: "tableCell", first: true, predicate: ["tableCell"], descendants: true }, { propertyName: "tableDateCell", first: true, predicate: ["tableDateCell"], descendants: true }, { propertyName: "tableRelativeDateCell", first: true, predicate: ["tableRelativeDateCell"], descendants: true }, { propertyName: "tableTranslationKeyCell", first: true, predicate: ["tableTranslationKeyCell"], descendants: true }, { propertyName: "gridItemSubtitleLines", first: true, predicate: ["gridItemSubtitleLines"], descendants: true }, { propertyName: "listItemSubtitleLines", first: true, predicate: ["listItemSubtitleLines"], descendants: true }, { propertyName: "stringTableCell", first: true, predicate: ["stringTableCell"], descendants: true }, { propertyName: "numberTableCell", first: true, predicate: ["numberTableCell"], descendants: true }, { propertyName: "gridItem", first: true, predicate: ["gridItem"], descendants: true }, { propertyName: "listItem", first: true, predicate: ["listItem"], descendants: true }], viewQueries: [{ propertyName: "dataView", first: true, predicate: DataViewComponent, descendants: true }], ngImport: i0, template: "<div class=\"p-3 border-bottom-1 surface-border\">\n <div class=\"flex flex-wrap justify-content-between align-items-center py-1 gap-2\">\n <ocx-data-layout-selection\n [supportedViewLayouts]=\"supportedViewLayouts\"\n [layout]=\"layout\"\n (dataViewLayoutChange)=\"onDataViewLayoutChange($event)\"\n ></ocx-data-layout-selection>\n\n <div *ngIf=\"layout !== 'table'\" class=\"flex align-items-center gap-2\">\n <ocx-data-list-grid-sorting\n [sortDirection]=\"sortDirection\"\n [sortField]=\"sortField\"\n [columns]=\"columns\"\n [sortStates]=\"sortStates\"\n (sortChange)=\"onSortChange($event)\"\n (sortDirectionChange)=\"onSortDirectionChange($event)\"\n ></ocx-data-list-grid-sorting>\n </div>\n\n <div *ngIf=\"layout === 'table'\" class=\"flex flex-wrap justify-content-between align-items-center gap-2\">\n <ocx-column-group-selection\n [selectedGroupKey]=\"selectedGroupKey\"\n [columns]=\"columns\"\n [defaultGroupKey]=\"defaultGroupKey\"\n [customGroupKey]=\"customGroupKey\"\n [placeholderKey]=\"groupSelectionNoGroupSelectedKey\"\n (groupSelectionChanged)=\"onColumnGroupSelectionChange($event)\"\n ></ocx-column-group-selection>\n\n <ocx-custom-group-column-selector\n [columns]=\"columns\"\n [displayedColumns]=\"displayedColumns\"\n (columnSelectionChanged)=\"onColumnSelectionChange($event)\"\n [frozenActionColumn]=\"frozenActionColumn\"\n [actionColumnPosition]=\"actionColumnPosition\"\n (actionColumnConfigChanged)=\"onActionColumnConfigChange($event)\"\n ></ocx-custom-group-column-selector>\n </div>\n </div>\n</div>\n<div class=\"p-3\">\n <ocx-data-view\n [columns]=\"displayedColumns\"\n [sortStates]=\"sortStates\"\n [sortField]=\"sortField\"\n [filters]=\"filters\"\n [data]=\"data\"\n [sortDirection]=\"sortDirection\"\n [titleLineId]=\"titleLineId || firstColumnId\"\n [subtitleLineIds]=\"subtitleLineIds\"\n [clientSideSorting]=\"true\"\n [clientSideFiltering]=\"true\"\n [pageSizes]=\"pageSizes\"\n [pageSize]=\"pageSize\"\n [emptyResultsMessage]=\"emptyResultsMessage\"\n [layout]=\"layout\"\n [name]=\"name\"\n [deletePermission]=\"deletePermission\"\n [editPermission]=\"editPermission\"\n [viewPermission]=\"viewPermission\"\n [deleteActionEnabledField]=\"deleteActionEnabledField\"\n [deleteActionVisibleField]=\"deleteActionVisibleField\"\n [editActionEnabledField]=\"editActionEnabledField\"\n [editActionVisibleField]=\"editActionVisibleField\"\n [viewActionEnabledField]=\"viewActionEnabledField\"\n [viewActionVisibleField]=\"viewActionVisibleField\"\n [additionalActions]=\"additionalActions\"\n [listGridPaginator]=\"listGridPaginator\"\n [tablePaginator]=\"tablePaginator\"\n [page]=\"page\"\n (pageChanged)=\"onPageChange($event)\"\n [selectedRows]=\"selectedRows\"\n [frozenActionColumn]=\"frozenActionColumn\"\n [actionColumnPosition]=\"actionColumnPosition\"\n [stringTableCellTemplate]=\"_stringTableCell ? stringTableCell : undefined\"\n [numberTableCellTemplate]=\"_numberTableCell ? numberTableCell : undefined\"\n [tableDateCellTemplate]=\"_tableDateCell ? tableDateCell : undefined\"\n [tableRelativeDateTemplate]=\"_tableRelativeDateCell ? tableRelativeDateCell : undefined\"\n [tableCellTemplate]=\"_tableCell ? tableCell : undefined\"\n [tableTranslationKeyCellTemplate]=\"_tableTranslationKeyCell ? tableTranslationKeyCell : undefined\"\n [gridItemSubtitleLinesTemplate]=\"_gridItemSubtitleLines ? gridItemSubtitleLines : undefined\"\n [listItemSubtitleLinesTemplate]=\"_listItemSubtitleLines ? listItemSubtitleLines : undefined\"\n [listItemTemplate]=\"_listItem? listItem : undefined\"\n [gridItemTemplate]=\"_gridItem? gridItem : undefined\"\n (sorted)=\"sorting($event)\"\n (filtered)=\"filtering($event)\"\n [totalRecordsOnServer]=\"totalRecordsOnServer\"\n [currentPageShowingKey]=\"currentPageShowingKey\"\n [currentPageShowingWithTotalOnServerKey]=\"currentPageShowingWithTotalOnServerKey\"\n >\n </ocx-data-view>\n</div>\n<ng-template #stringTableCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_stringTableCell\"\n [ngTemplateOutlet]=\"_stringTableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #tableDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableDateCell\"\n [ngTemplateOutlet]=\"_tableDateCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #tableRelativeDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableRelativeDateCell\"\n [ngTemplateOutlet]=\"_tableRelativeDateCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #tableCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableCell\"\n [ngTemplateOutlet]=\"_tableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #tableTranslationKeyCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableTranslationKeyCell\"\n [ngTemplateOutlet]=\"_tableTranslationKeyCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #gridItemSubtitleLines let-item>\n <ng-container\n *ngIf=\"_gridItemSubtitleLines\"\n [ngTemplateOutlet]=\"_gridItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n >\n </ng-container>\n</ng-template>\n<ng-template #listItemSubtitleLines let-item>\n <ng-container\n *ngIf=\"_listItemSubtitleLines\"\n [ngTemplateOutlet]=\"_listItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n >\n </ng-container\n></ng-template>\n<ng-template #gridItem let-item>\n <ng-container *ngIf=\"_gridItem\" [ngTemplateOutlet]=\"_gridItem\" [ngTemplateOutletContext]=\"{$implicit:item}\">\n </ng-container\n></ng-template>\n<ng-template #listItem let-item>\n <ng-container *ngIf=\"_listItem\" [ngTemplateOutlet]=\"_listItem\" [ngTemplateOutletContext]=\"{$implicit:item}\">\n </ng-container\n></ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ColumnGroupSelectionComponent, selector: "ocx-column-group-selection", inputs: ["selectedGroupKey", "columns", "placeholderKey", "defaultGroupKey", "customGroupKey"], outputs: ["groupSelectionChanged"] }, { kind: "component", type: CustomGroupColumnSelectorComponent, selector: "ocx-custom-group-column-selector", inputs: ["columns", "displayedColumns", "dialogTitle", "openButtonTitle", "saveButtonLabel", "cancelButtonLabel", "activeColumnsLabel", "inactiveColumnsLabel", "frozenActionColumn", "actionColumnPosition"], outputs: ["columnSelectionChanged", "actionColumnConfigChanged"] }, { kind: "component", type: DataLayoutSelectionComponent, selector: "ocx-data-layout-selection", inputs: ["supportedViewLayouts", "layout"], outputs: ["dataViewLayoutChange"] }, { kind: "component", type: DataListGridSortingComponent, selector: "ocx-data-list-grid-sorting", inputs: ["columns", "sortStates", "sortDirection", "sortField"], outputs: ["sortChange", "sortDirectionChange", "columnsChange"] }, { kind: "component", type: DataViewComponent, selector: "ocx-data-view", inputs: ["deletePermission", "editPermission", "viewPermission", "deleteActionVisibleField", "deleteActionEnabledField", "viewActionVisibleField", "viewActionEnabledField", "editActionVisibleField", "editActionEnabledField", "data", "name", "titleLineId", "subtitleLineIds", "layout", "columns", "emptyResultsMessage", "clientSideFiltering", "fallbackImage", "filters", "sortField", "sortDirection", "listGridPaginator", "tablePaginator", "page", "totalRecordsOnServer", "currentPageShowingKey", "currentPageShowingWithTotalOnServerKey", "selectedRows", "frozenActionColumn", "actionColumnPosition", "paginator", "sortStates", "pageSizes", "pageSize", "stringTableCellTemplate", "numberTableCellTemplate", "tableDateCellTemplate", "tableCellTemplate", "tableTranslationKeyCellTemplate", "gridItemSubtitleLinesTemplate", "listItemSubtitleLinesTemplate", "gridItemTemplate", "listItemTemplate", "tableRelativeDateCellTemplate", "additionalActions"], outputs: ["filtered", "sorted", "deleteItem", "viewItem", "editItem", "selectionChanged", "pageChanged"] }] });
2081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: InteractiveDataViewComponent, decorators: [{
2082
+ type: Component,
2083
+ args: [{ selector: 'ocx-interactive-data-view', providers: [{ provide: 'InteractiveDataViewComponent', useExisting: InteractiveDataViewComponent }], template: "<div class=\"p-3 border-bottom-1 surface-border\">\n <div class=\"flex flex-wrap justify-content-between align-items-center py-1 gap-2\">\n <ocx-data-layout-selection\n [supportedViewLayouts]=\"supportedViewLayouts\"\n [layout]=\"layout\"\n (dataViewLayoutChange)=\"onDataViewLayoutChange($event)\"\n ></ocx-data-layout-selection>\n\n <div *ngIf=\"layout !== 'table'\" class=\"flex align-items-center gap-2\">\n <ocx-data-list-grid-sorting\n [sortDirection]=\"sortDirection\"\n [sortField]=\"sortField\"\n [columns]=\"columns\"\n [sortStates]=\"sortStates\"\n (sortChange)=\"onSortChange($event)\"\n (sortDirectionChange)=\"onSortDirectionChange($event)\"\n ></ocx-data-list-grid-sorting>\n </div>\n\n <div *ngIf=\"layout === 'table'\" class=\"flex flex-wrap justify-content-between align-items-center gap-2\">\n <ocx-column-group-selection\n [selectedGroupKey]=\"selectedGroupKey\"\n [columns]=\"columns\"\n [defaultGroupKey]=\"defaultGroupKey\"\n [customGroupKey]=\"customGroupKey\"\n [placeholderKey]=\"groupSelectionNoGroupSelectedKey\"\n (groupSelectionChanged)=\"onColumnGroupSelectionChange($event)\"\n ></ocx-column-group-selection>\n\n <ocx-custom-group-column-selector\n [columns]=\"columns\"\n [displayedColumns]=\"displayedColumns\"\n (columnSelectionChanged)=\"onColumnSelectionChange($event)\"\n [frozenActionColumn]=\"frozenActionColumn\"\n [actionColumnPosition]=\"actionColumnPosition\"\n (actionColumnConfigChanged)=\"onActionColumnConfigChange($event)\"\n ></ocx-custom-group-column-selector>\n </div>\n </div>\n</div>\n<div class=\"p-3\">\n <ocx-data-view\n [columns]=\"displayedColumns\"\n [sortStates]=\"sortStates\"\n [sortField]=\"sortField\"\n [filters]=\"filters\"\n [data]=\"data\"\n [sortDirection]=\"sortDirection\"\n [titleLineId]=\"titleLineId || firstColumnId\"\n [subtitleLineIds]=\"subtitleLineIds\"\n [clientSideSorting]=\"true\"\n [clientSideFiltering]=\"true\"\n [pageSizes]=\"pageSizes\"\n [pageSize]=\"pageSize\"\n [emptyResultsMessage]=\"emptyResultsMessage\"\n [layout]=\"layout\"\n [name]=\"name\"\n [deletePermission]=\"deletePermission\"\n [editPermission]=\"editPermission\"\n [viewPermission]=\"viewPermission\"\n [deleteActionEnabledField]=\"deleteActionEnabledField\"\n [deleteActionVisibleField]=\"deleteActionVisibleField\"\n [editActionEnabledField]=\"editActionEnabledField\"\n [editActionVisibleField]=\"editActionVisibleField\"\n [viewActionEnabledField]=\"viewActionEnabledField\"\n [viewActionVisibleField]=\"viewActionVisibleField\"\n [additionalActions]=\"additionalActions\"\n [listGridPaginator]=\"listGridPaginator\"\n [tablePaginator]=\"tablePaginator\"\n [page]=\"page\"\n (pageChanged)=\"onPageChange($event)\"\n [selectedRows]=\"selectedRows\"\n [frozenActionColumn]=\"frozenActionColumn\"\n [actionColumnPosition]=\"actionColumnPosition\"\n [stringTableCellTemplate]=\"_stringTableCell ? stringTableCell : undefined\"\n [numberTableCellTemplate]=\"_numberTableCell ? numberTableCell : undefined\"\n [tableDateCellTemplate]=\"_tableDateCell ? tableDateCell : undefined\"\n [tableRelativeDateTemplate]=\"_tableRelativeDateCell ? tableRelativeDateCell : undefined\"\n [tableCellTemplate]=\"_tableCell ? tableCell : undefined\"\n [tableTranslationKeyCellTemplate]=\"_tableTranslationKeyCell ? tableTranslationKeyCell : undefined\"\n [gridItemSubtitleLinesTemplate]=\"_gridItemSubtitleLines ? gridItemSubtitleLines : undefined\"\n [listItemSubtitleLinesTemplate]=\"_listItemSubtitleLines ? listItemSubtitleLines : undefined\"\n [listItemTemplate]=\"_listItem? listItem : undefined\"\n [gridItemTemplate]=\"_gridItem? gridItem : undefined\"\n (sorted)=\"sorting($event)\"\n (filtered)=\"filtering($event)\"\n [totalRecordsOnServer]=\"totalRecordsOnServer\"\n [currentPageShowingKey]=\"currentPageShowingKey\"\n [currentPageShowingWithTotalOnServerKey]=\"currentPageShowingWithTotalOnServerKey\"\n >\n </ocx-data-view>\n</div>\n<ng-template #stringTableCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_stringTableCell\"\n [ngTemplateOutlet]=\"_stringTableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #tableDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableDateCell\"\n [ngTemplateOutlet]=\"_tableDateCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #tableRelativeDateCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableRelativeDateCell\"\n [ngTemplateOutlet]=\"_tableRelativeDateCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #tableCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableCell\"\n [ngTemplateOutlet]=\"_tableCell\"\n [ngTemplateOutletContext]=\"{rowObject: rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #tableTranslationKeyCell let-rowObject=\"rowObject\" let-column=\"column\">\n <ng-container\n *ngIf=\"_tableTranslationKeyCell\"\n [ngTemplateOutlet]=\"_tableTranslationKeyCell\"\n [ngTemplateOutletContext]=\"{rowObject:rowObject, column:column}\"\n >\n </ng-container\n></ng-template>\n<ng-template #gridItemSubtitleLines let-item>\n <ng-container\n *ngIf=\"_gridItemSubtitleLines\"\n [ngTemplateOutlet]=\"_gridItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n >\n </ng-container>\n</ng-template>\n<ng-template #listItemSubtitleLines let-item>\n <ng-container\n *ngIf=\"_listItemSubtitleLines\"\n [ngTemplateOutlet]=\"_listItemSubtitleLines\"\n [ngTemplateOutletContext]=\"{$implicit:item}\"\n >\n </ng-container\n></ng-template>\n<ng-template #gridItem let-item>\n <ng-container *ngIf=\"_gridItem\" [ngTemplateOutlet]=\"_gridItem\" [ngTemplateOutletContext]=\"{$implicit:item}\">\n </ng-container\n></ng-template>\n<ng-template #listItem let-item>\n <ng-container *ngIf=\"_listItem\" [ngTemplateOutlet]=\"_listItem\" [ngTemplateOutletContext]=\"{$implicit:item}\">\n </ng-container\n></ng-template>\n" }]
2084
+ }], propDecorators: { dataView: [{
2085
+ type: ViewChild,
2086
+ args: [DataViewComponent]
2087
+ }], deletePermission: [{
2088
+ type: Input
2089
+ }], editPermission: [{
2090
+ type: Input
2091
+ }], viewPermission: [{
2092
+ type: Input
2093
+ }], deleteActionVisibleField: [{
2094
+ type: Input
2095
+ }], deleteActionEnabledField: [{
2096
+ type: Input
2097
+ }], viewActionVisibleField: [{
2098
+ type: Input
2099
+ }], viewActionEnabledField: [{
2100
+ type: Input
2101
+ }], editActionVisibleField: [{
2102
+ type: Input
2103
+ }], editActionEnabledField: [{
2104
+ type: Input
2105
+ }], name: [{
2106
+ type: Input
2107
+ }], titleLineId: [{
2108
+ type: Input
2109
+ }], subtitleLineIds: [{
2110
+ type: Input
2111
+ }], supportedViewLayouts: [{
2112
+ type: Input
2113
+ }], columns: [{
2114
+ type: Input
2115
+ }], emptyResultsMessage: [{
2116
+ type: Input
2117
+ }], clientSideFiltering: [{
2118
+ type: Input
2119
+ }], fallbackImage: [{
2120
+ type: Input
2121
+ }], filters: [{
2122
+ type: Input
2123
+ }], sortDirection: [{
2124
+ type: Input
2125
+ }], sortField: [{
2126
+ type: Input
2127
+ }], sortStates: [{
2128
+ type: Input
2129
+ }], pageSizes: [{
2130
+ type: Input
2131
+ }], pageSize: [{
2132
+ type: Input
2133
+ }], totalRecordsOnServer: [{
2134
+ type: Input
2135
+ }], layout: [{
2136
+ type: Input
2137
+ }], defaultGroupKey: [{
2138
+ type: Input
2139
+ }], customGroupKey: [{
2140
+ type: Input
2141
+ }], groupSelectionNoGroupSelectedKey: [{
2142
+ type: Input
2143
+ }], currentPageShowingKey: [{
2144
+ type: Input
2145
+ }], currentPageShowingWithTotalOnServerKey: [{
2146
+ type: Input
2147
+ }], additionalActions: [{
2148
+ type: Input
2149
+ }], listGridPaginator: [{
2150
+ type: Input
2151
+ }], tablePaginator: [{
2152
+ type: Input
2153
+ }], page: [{
2154
+ type: Input
2155
+ }], selectedRows: [{
2156
+ type: Input
2157
+ }], displayedColumns: [{
2158
+ type: Input
2159
+ }], tableCell: [{
2160
+ type: ContentChild,
2161
+ args: ['tableCell']
2162
+ }], tableDateCell: [{
2163
+ type: ContentChild,
2164
+ args: ['tableDateCell']
2165
+ }], tableRelativeDateCell: [{
2166
+ type: ContentChild,
2167
+ args: ['tableRelativeDateCell']
2168
+ }], tableTranslationKeyCell: [{
2169
+ type: ContentChild,
2170
+ args: ['tableTranslationKeyCell']
2171
+ }], gridItemSubtitleLines: [{
2172
+ type: ContentChild,
2173
+ args: ['gridItemSubtitleLines']
2174
+ }], listItemSubtitleLines: [{
2175
+ type: ContentChild,
2176
+ args: ['listItemSubtitleLines']
2177
+ }], stringTableCell: [{
2178
+ type: ContentChild,
2179
+ args: ['stringTableCell']
2180
+ }], numberTableCell: [{
2181
+ type: ContentChild,
2182
+ args: ['numberTableCell']
2183
+ }], gridItem: [{
2184
+ type: ContentChild,
2185
+ args: ['gridItem']
2186
+ }], listItem: [{
2187
+ type: ContentChild,
2188
+ args: ['listItem']
2189
+ }], filtered: [{
2190
+ type: Output
2191
+ }], sorted: [{
2192
+ type: Output
2193
+ }], deleteItem: [{
2194
+ type: Output
2195
+ }], viewItem: [{
2196
+ type: Output
2197
+ }], editItem: [{
2198
+ type: Output
2199
+ }], dataViewLayoutChange: [{
2200
+ type: Output
2201
+ }], displayedColumnsChange: [{
2202
+ type: Output
2203
+ }], selectionChanged: [{
2204
+ type: Output
2205
+ }], pageChanged: [{
2206
+ type: Output
2207
+ }], paginator: [{
2208
+ type: Input
2209
+ }], data: [{
2210
+ type: Input
2211
+ }] } });
2212
+
2213
+ class BreadcrumbService {
2214
+ constructor(router, activeRoute, translateService) {
2215
+ this.router = router;
2216
+ this.activeRoute = activeRoute;
2217
+ this.translateService = translateService;
2218
+ this.itemsSource = new BehaviorSubject([]);
2219
+ this.generatedItemsSource = new BehaviorSubject([]);
2220
+ this.itemsHandler = this.itemsSource.asObservable();
2221
+ const breadcrumbs = [];
2222
+ this.addBreadcrumb(this.activeRoute.snapshot, [], breadcrumbs);
2223
+ this.generatedItemsSource.next(breadcrumbs);
2224
+ this.router.events.pipe(filter((e) => e instanceof NavigationEnd)).subscribe(() => {
2225
+ const root = this.router.routerState.snapshot.root;
2226
+ const breadcrumbs = [];
2227
+ this.addBreadcrumb(root, [], breadcrumbs);
2228
+ this.generatedItemsSource.next(breadcrumbs);
2229
+ });
2230
+ }
2231
+ addBreadcrumb(route, parentUrl, breadcrumbs) {
2232
+ var _a;
2233
+ if (route && route.url) {
2234
+ const routeUrl = parentUrl.concat(route.url.map((url) => url.path));
2235
+ if ((_a = route.routeConfig) === null || _a === void 0 ? void 0 : _a.path) {
2236
+ if (route.data['breadcrumb']) {
2237
+ const breadcrumb = {
2238
+ label: this.getLabel(route.data, route.paramMap),
2239
+ routerLink: '/' + routeUrl.join('/'),
2240
+ };
2241
+ breadcrumbs.push(breadcrumb);
2242
+ }
2243
+ else {
2244
+ const breadcrumb = {
2245
+ label: 'NA',
2246
+ routerLink: '/' + routeUrl.join('/'),
2247
+ };
2248
+ breadcrumbs.push(breadcrumb);
2249
+ }
2250
+ }
2251
+ this.addBreadcrumb(route.firstChild, routeUrl, breadcrumbs);
2252
+ }
2253
+ }
2254
+ getLabel(data, params) {
2255
+ if (typeof data['breadcrumbFn'] === 'function') {
2256
+ return data['breadcrumbFn'](data, params);
2257
+ }
2258
+ return data['breadcrumb'];
2259
+ }
2260
+ setItems(items) {
2261
+ const translationKeys = [
2262
+ ...items.map((i) => i.labelKey || '').filter((l) => !!l),
2263
+ ...items.map((i) => i.titleKey || '').filter((l) => !!l),
2264
+ ];
2265
+ if (translationKeys.length) {
2266
+ this.translateService.get(translationKeys).subscribe((translations) => {
2267
+ this.itemsSource.next(items.map((i) => (Object.assign(Object.assign({}, i), { label: translations[i.labelKey || ''] || i.label, title: translations[i.titleKey || ''] || i.title }))));
2268
+ });
2269
+ }
2270
+ else {
2271
+ this.itemsSource.next(items);
2272
+ }
2273
+ }
2274
+ }
2275
+ BreadcrumbService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadcrumbService, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
2276
+ BreadcrumbService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadcrumbService, providedIn: 'any' });
2277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: BreadcrumbService, decorators: [{
2278
+ type: Injectable,
2279
+ args: [{ providedIn: 'any' }]
2280
+ }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i1.TranslateService }]; } });
2281
+
2282
+ class DynamicPipe {
2283
+ constructor(locale, injector) {
2284
+ this.injector = injector;
2285
+ this.knownPipes = {};
2286
+ this.knownPipes = {
2287
+ currency: new CurrencyPipe(locale),
2288
+ decimal: new DecimalPipe(locale),
2289
+ date: new DatePipe(locale),
2290
+ };
2291
+ }
2292
+ transform(value, requiredPipe, pipeArgs) {
2293
+ if (!requiredPipe) {
2294
+ return value;
2295
+ }
2296
+ const injector = Injector.create({
2297
+ name: 'DynamicPipe',
2298
+ parent: this.injector,
2299
+ providers: [{ provide: requiredPipe }],
2300
+ });
2301
+ const pipe = injector.get(requiredPipe);
2302
+ return pipe.transform(value, pipeArgs);
2303
+ }
2304
+ transform2(value, pipeToken, ...pipeArgs) {
2305
+ if (!pipeToken) {
2306
+ return value;
2307
+ }
2308
+ else {
2309
+ // eslint-disable-next-line no-prototype-builtins
2310
+ if (pipeToken && this.knownPipes.hasOwnProperty(pipeToken)) {
2311
+ const pipe = this.knownPipes[pipeToken];
2312
+ if (Array.isArray(pipeArgs)) {
2313
+ return pipe.transform(value, ...pipeArgs);
2314
+ }
2315
+ else {
2316
+ return pipe.transform(value, pipeArgs);
2317
+ }
2318
+ }
2319
+ else {
2320
+ return value;
2321
+ }
2322
+ }
2323
+ }
2324
+ }
2325
+ DynamicPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicPipe, deps: [{ token: LOCALE_ID }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Pipe });
2326
+ DynamicPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: DynamicPipe, name: "dynamicPipe" });
2327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DynamicPipe, decorators: [{
2328
+ type: Pipe,
2329
+ args: [{
2330
+ name: 'dynamicPipe',
2331
+ }]
2332
+ }], ctorParameters: function () {
2333
+ return [{ type: undefined, decorators: [{
2334
+ type: Inject,
2335
+ args: [LOCALE_ID]
2336
+ }] }, { type: i0.Injector }];
2337
+ } });
2338
+
2339
+ class PageHeaderComponent {
2340
+ get actions() {
2341
+ return this._actions;
2342
+ }
2343
+ set actions(value) {
2344
+ this._actions = value;
2345
+ this.generateInlineActions();
2346
+ this.generateOverflowActions();
2347
+ }
2348
+ constructor(breadcrumbs, translateService, appStateService, userService) {
2349
+ this.translateService = translateService;
2350
+ this.appStateService = appStateService;
2351
+ this.userService = userService;
2352
+ this.loading = false;
2353
+ this.figureBackground = true;
2354
+ this.showFigure = true;
2355
+ this.disableDefaultActions = false;
2356
+ this.showBreadcrumbs = true;
2357
+ this.manualBreadcrumbs = false;
2358
+ this.save = new EventEmitter();
2359
+ this.overflowActions = [];
2360
+ this.dd = new Date();
2361
+ this.breadcrumbs = breadcrumbs;
2362
+ this.home$ = concat(of({ menuItem: { icon: PrimeIcons.HOME, routerLink: '/' } }), this.appStateService.currentPortal$.pipe(map((portal) => ({
2363
+ menuItem: {
2364
+ icon: PrimeIcons.HOME,
2365
+ routerLink: portal.baseUrl,
2366
+ },
2367
+ page: portal.portalName,
2368
+ }))));
2369
+ }
2370
+ ngOnChanges(changes) {
2371
+ if (changes['actions']) {
2372
+ this.generateInlineActions();
2373
+ this.generateOverflowActions();
2374
+ }
2375
+ }
2376
+ ngOnInit() {
2377
+ if (!this.manualBreadcrumbs) {
2378
+ this.breadcrumbs$ = this.breadcrumbs.generatedItemsSource;
2379
+ }
2380
+ else {
2381
+ this.breadcrumbs$ = this.breadcrumbs.itemsHandler;
2382
+ }
2383
+ this.generateInlineActions();
2384
+ this.generateOverflowActions();
2385
+ }
2386
+ onAction(action) {
2387
+ switch (action) {
2388
+ case 'save':
2389
+ this.save.emit();
2390
+ break;
2391
+ default:
2392
+ break;
2393
+ }
2394
+ }
2395
+ /**
2396
+ * Generates a list of actions that should be rendered in an overflow menu
2397
+ */
2398
+ generateOverflowActions() {
2399
+ if (this.actions) {
2400
+ const translationKeys = [
2401
+ ...this.actions.map((a) => a.labelKey || '').filter((a) => !!a),
2402
+ ...this.actions.map((a) => a.titleKey || '').filter((a) => !!a),
2403
+ ];
2404
+ const translations$ = translationKeys.length ? this.translateService.get(translationKeys) : of([]);
2405
+ translations$.subscribe((translations) => {
2406
+ const allowedActions = [];
2407
+ if (this.actions) {
2408
+ this.actions
2409
+ .filter((a) => a.show === 'asOverflow')
2410
+ .filter((a) => {
2411
+ if (a.conditional) {
2412
+ if (a.showCondition)
2413
+ return a;
2414
+ return null;
2415
+ }
2416
+ else
2417
+ return a;
2418
+ })
2419
+ .forEach((action) => {
2420
+ this.checkActionPermission(allowedActions, action);
2421
+ });
2422
+ this.overflowActions = [
2423
+ ...allowedActions.map((a) => ({
2424
+ label: a.labelKey ? translations[a.labelKey] : a.label,
2425
+ icon: a.icon,
2426
+ title: (a.titleKey ? translations[a.titleKey] : a.title) || (a.labelKey ? translations[a.labelKey] : a.label),
2427
+ command: a.actionCallback,
2428
+ disabled: a.disabled,
2429
+ })),
2430
+ ];
2431
+ }
2432
+ });
2433
+ }
2434
+ }
2435
+ /**
2436
+ * Generates a list of actions that should be rendered as inline buttons
2437
+ */
2438
+ generateInlineActions() {
2439
+ if (this.actions) {
2440
+ // Temp array to hold all inline actions that should be visible to the current user
2441
+ const allowedActions = [];
2442
+ // Check permissions for all actions that should be rendered 'always'
2443
+ this.actions
2444
+ .filter((a) => a.show === 'always')
2445
+ .filter((a) => {
2446
+ if (a.conditional) {
2447
+ return a.showCondition ? a : null;
2448
+ }
2449
+ else
2450
+ return a;
2451
+ })
2452
+ .forEach((action) => {
2453
+ this.checkActionPermission(allowedActions, action);
2454
+ });
2455
+ this.inlineActions = [...allowedActions];
2456
+ }
2457
+ }
2458
+ /**
2459
+ * Adds a given action to a given array if the current user is allowed to see it
2460
+ * @param allowedActions Array that the action should be added to if the current user is allowed to see it
2461
+ * @param action Action for which a permission check should be executed
2462
+ */
2463
+ checkActionPermission(allowedActions, action) {
2464
+ if (action.permission) {
2465
+ if (this.userService.hasPermission(action.permission)) {
2466
+ // Push action to allowed array if user has sufficient permissions
2467
+ allowedActions.push(action);
2468
+ }
2469
+ }
2470
+ else {
2471
+ // Push action to allowed array if no permission was specified
2472
+ allowedActions.push(action);
2473
+ }
2474
+ }
2475
+ }
2476
+ PageHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PageHeaderComponent, deps: [{ token: BreadcrumbService }, { token: i1.TranslateService }, { token: i2.AppStateService }, { token: i2.UserService }], target: i0.ɵɵFactoryTarget.Component });
2477
+ PageHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: PageHeaderComponent, selector: "ocx-page-header", inputs: { header: "header", loading: "loading", figureBackground: "figureBackground", showFigure: "showFigure", figureImage: "figureImage", disableDefaultActions: "disableDefaultActions", subheader: "subheader", actions: "actions", objectDetails: "objectDetails", showBreadcrumbs: "showBreadcrumbs", manualBreadcrumbs: "manualBreadcrumbs" }, outputs: { save: "save" }, queries: [{ propertyName: "additionalToolbarContent", first: true, predicate: ["additionalToolbarContent"], descendants: true }, { propertyName: "additionalToolbarContentLeft", first: true, predicate: ["additionalToolbarContentLeft"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"onecx-page-header\" name=\"ocx-page-header-wrapper\">\n <ng-container *ngIf=\"showBreadcrumbs\">\n <p-breadcrumb\n [model]=\"items\"\n *ngIf=\"breadcrumbs$ | async as items\"\n [home]=\"(home$ | async)?.menuItem ?? {}\"\n [homeAriaLabel]=\"(home$ | async)?.page ? ('OCX_PAGE_HEADER.HOME_ARIA_LABEL' | translate: { page: (home$ | async)?.page}) : ('OCX_PAGE_HEADER.HOME_DEFAULT_ARIA_LABEL' | translate)\"\n [attr.manual]=\"manualBreadcrumbs\"\n ></p-breadcrumb>\n </ng-container>\n <div class=\"title-bar flex flex-row md:justify-content-between p-2 md:p-3\">\n <div class=\"title-wrap\">\n <div class=\"figure flex h-2rem w-2rem md:h-3rem md:w-3rem\" *ngIf=\"showFigure\">\n <div #previewImage class=\"figure-image absolute top-0 left-0 right-0 bottom-0\">\n <ng-content select=\"[figureImage]\"></ng-content>\n <img *ngIf=\"figureImage\" [src]=\"figureImage\" alt=\"Figure image\" class=\"w-full\" />\n </div>\n <div class=\"colorblob flex-1 border-round\" *ngIf=\"previewImage.children.length === 0\"></div>\n </div>\n <ng-template #skeletonBar>\n <div class=\"header justify-content-evenly\">\n <p-skeleton width=\"10rem\"></p-skeleton>\n <p-skeleton width=\"10rem\"></p-skeleton>\n </div>\n </ng-template>\n <div class=\"header\" *ngIf=\"!loading; else skeletonBar\">\n <h1 *ngIf=\"!!header\">{{ header }}</h1>\n <h2 *ngIf=\"!!subheader\">{{ subheader }}</h2>\n </div>\n </div>\n <div class=\"action-items-wrap mt-2 md:mt-0\">\n <ng-container *ngIf=\"additionalToolbarContentLeft\" [ngTemplateOutlet]=\"additionalToolbarContentLeft\"> </ng-container>\n\n <ng-container *ngIf=\"!disableDefaultActions\"> </ng-container>\n <ng-template #skeletonActions>\n <div class=\"flex\">\n <p-skeleton width=\"5rem\" height=\"2rem\" styleClass=\"mr-2\"></p-skeleton>\n <p-skeleton width=\"2rem\" height=\"2rem\" styleClass=\"mb-2\"></p-skeleton>\n </div>\n </ng-template>\n <ng-container *ngIf=\"!loading; else skeletonActions\">\n <div *ngIf=\"inlineActions && inlineActions.length > 0\" class=\"toolbar flex flex-wrap gap-1 sm:gap-2\">\n <ng-container *ngFor=\"let action of inlineActions\">\n <p-button\n id=\"{{ action.id }}\"\n [icon]=\"action.icon ?? ''\"\n type=\"button\"\n class=\"action-button\"\n [label]=\"action.labelKey ? (action.labelKey | translate) : action.label\"\n (onClick)=\"action.actionCallback()\"\n [title]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n [disabled]=\"action.disabled ? action.disabled : false\"\n [attr.name]=\"action.icon ? 'ocx-page-header-inline-action-icon-button' : 'ocx-page-header-inline-action-button'\"\n [ariaLabel]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n ></p-button>\n </ng-container>\n </div>\n <ng-content select=\"[toolbarItems]\"></ng-content>\n <ng-container>\n <div *ngIf=\"overflowActions.length !== 0\">\n <button\n id=\"pageHeaderMenuButton\"\n type=\"button\"\n pButton\n icon=\"pi pi-ellipsis-v\"\n title=\"{{ 'OCX_PAGE_HEADER.MORE_ACTIONS' | translate }}\"\n class=\"more-actions-menu-button action-button ml-2\"\n (click)=\"menu.toggle($event)\"\n name=\"ocx-page-header-overflow-action-button\"\n [ariaLabel]=\"('OCX_PAGE_HEADER.MORE_ACTIONS' | translate)\"\n ></button>\n <p-menu #menu [popup]=\"true\" [model]=\"overflowActions\" appendTo=\"body\"></p-menu>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"additionalToolbarContent\" [ngTemplateOutlet]=\"additionalToolbarContent\"> </ng-container>\n </div>\n </div>\n\n <div\n class=\"object-panel flex-column md:flex-row\"\n [class.justify-content-evenly]=\"objectDetails\"\n [class.justify-content-start]=\"!objectDetails\"\n >\n <ng-container *ngIf=\"objectDetails\">\n <div\n class=\"object-info flex flex-row md:flex-column align-items-baseline md:align-items-center justify-content-between\"\n *ngFor=\"let item of objectDetails\"\n >\n <label class=\"flex font-medium text-600\" name=\"object-detail-label\">{{ item.label | dynamicPipe:item.labelPipe }}</label>\n <span\n *ngIf=\"item.icon || item.value\"\n class=\"flex text-900 mt-2\"\n [ngClass]=\"item.icon ? 'gap-1 align-items-center' : null\"\n [title]=\"item.tooltip || ''\"\n name=\"object-detail-value\"\n >\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\" name=\"object-detail-icon\"></i>\n {{ item.value | dynamicPipe:item.valuePipe:item.valuePipeArgs}}</span\n >\n </div>\n </ng-container>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host(.p-button-label){font-weight:400}:host ::ng-deep .action-button{padding:.5rem;font-weight:400}.onecx-page-header{display:flex;flex-flow:column;border-radius:.25rem;overflow:hidden;background:#fff;box-shadow:0 2px 2px #0000001a;border:1px solid #cdd0d3}.onecx-page-header .title-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;background-color:#f8f9fa;border-top-right-radius:inherit;border-top-left-radius:inherit}.onecx-page-header .title-bar .figure{width:3rem;height:3rem;margin-right:.5rem;position:relative}.onecx-page-header .title-bar .figure .figure-image img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.onecx-page-header .title-bar .figure .colorblob{background-color:var(--primary-color);position:absolute;inset:0}.onecx-page-header .title-bar .title-wrap{display:flex;flex-flow:row;align-items:center;gap:.25rem}.onecx-page-header .title-bar .title-wrap .header{display:flex;align-items:flex-start;justify-content:center;flex-direction:column}.onecx-page-header .title-bar .title-wrap h1{font-size:1em;font-weight:700;margin:0;padding:0}.onecx-page-header .title-bar .title-wrap h2{font-size:1em;font-weight:400;margin:0;padding:0}.onecx-page-header .title-bar .action-items-wrap{display:flex;height:-moz-fit-content;height:fit-content;gap:.5rem;align-items:center;justify-content:space-between}.onecx-page-header .title-bar .action-items-wrap button{padding:.5rem}.onecx-page-header .object-panel{border-top:1px solid #cdd0d3;padding:1rem;display:flex}.onecx-page-header .object-panel:empty{display:none}.badge-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.scale{transform:scale(2)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i5.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: DynamicPipe, name: "dynamicPipe" }], encapsulation: i0.ViewEncapsulation.None });
2478
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PageHeaderComponent, decorators: [{
2479
+ type: Component,
2480
+ args: [{ selector: 'ocx-page-header', encapsulation: ViewEncapsulation.None, template: "<div class=\"onecx-page-header\" name=\"ocx-page-header-wrapper\">\n <ng-container *ngIf=\"showBreadcrumbs\">\n <p-breadcrumb\n [model]=\"items\"\n *ngIf=\"breadcrumbs$ | async as items\"\n [home]=\"(home$ | async)?.menuItem ?? {}\"\n [homeAriaLabel]=\"(home$ | async)?.page ? ('OCX_PAGE_HEADER.HOME_ARIA_LABEL' | translate: { page: (home$ | async)?.page}) : ('OCX_PAGE_HEADER.HOME_DEFAULT_ARIA_LABEL' | translate)\"\n [attr.manual]=\"manualBreadcrumbs\"\n ></p-breadcrumb>\n </ng-container>\n <div class=\"title-bar flex flex-row md:justify-content-between p-2 md:p-3\">\n <div class=\"title-wrap\">\n <div class=\"figure flex h-2rem w-2rem md:h-3rem md:w-3rem\" *ngIf=\"showFigure\">\n <div #previewImage class=\"figure-image absolute top-0 left-0 right-0 bottom-0\">\n <ng-content select=\"[figureImage]\"></ng-content>\n <img *ngIf=\"figureImage\" [src]=\"figureImage\" alt=\"Figure image\" class=\"w-full\" />\n </div>\n <div class=\"colorblob flex-1 border-round\" *ngIf=\"previewImage.children.length === 0\"></div>\n </div>\n <ng-template #skeletonBar>\n <div class=\"header justify-content-evenly\">\n <p-skeleton width=\"10rem\"></p-skeleton>\n <p-skeleton width=\"10rem\"></p-skeleton>\n </div>\n </ng-template>\n <div class=\"header\" *ngIf=\"!loading; else skeletonBar\">\n <h1 *ngIf=\"!!header\">{{ header }}</h1>\n <h2 *ngIf=\"!!subheader\">{{ subheader }}</h2>\n </div>\n </div>\n <div class=\"action-items-wrap mt-2 md:mt-0\">\n <ng-container *ngIf=\"additionalToolbarContentLeft\" [ngTemplateOutlet]=\"additionalToolbarContentLeft\"> </ng-container>\n\n <ng-container *ngIf=\"!disableDefaultActions\"> </ng-container>\n <ng-template #skeletonActions>\n <div class=\"flex\">\n <p-skeleton width=\"5rem\" height=\"2rem\" styleClass=\"mr-2\"></p-skeleton>\n <p-skeleton width=\"2rem\" height=\"2rem\" styleClass=\"mb-2\"></p-skeleton>\n </div>\n </ng-template>\n <ng-container *ngIf=\"!loading; else skeletonActions\">\n <div *ngIf=\"inlineActions && inlineActions.length > 0\" class=\"toolbar flex flex-wrap gap-1 sm:gap-2\">\n <ng-container *ngFor=\"let action of inlineActions\">\n <p-button\n id=\"{{ action.id }}\"\n [icon]=\"action.icon ?? ''\"\n type=\"button\"\n class=\"action-button\"\n [label]=\"action.labelKey ? (action.labelKey | translate) : action.label\"\n (onClick)=\"action.actionCallback()\"\n [title]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n [disabled]=\"action.disabled ? action.disabled : false\"\n [attr.name]=\"action.icon ? 'ocx-page-header-inline-action-icon-button' : 'ocx-page-header-inline-action-button'\"\n [ariaLabel]=\"(action.titleKey ? (action.titleKey | translate) : action.title) || (action.labelKey ? (action.labelKey | translate) : action.label)\"\n ></p-button>\n </ng-container>\n </div>\n <ng-content select=\"[toolbarItems]\"></ng-content>\n <ng-container>\n <div *ngIf=\"overflowActions.length !== 0\">\n <button\n id=\"pageHeaderMenuButton\"\n type=\"button\"\n pButton\n icon=\"pi pi-ellipsis-v\"\n title=\"{{ 'OCX_PAGE_HEADER.MORE_ACTIONS' | translate }}\"\n class=\"more-actions-menu-button action-button ml-2\"\n (click)=\"menu.toggle($event)\"\n name=\"ocx-page-header-overflow-action-button\"\n [ariaLabel]=\"('OCX_PAGE_HEADER.MORE_ACTIONS' | translate)\"\n ></button>\n <p-menu #menu [popup]=\"true\" [model]=\"overflowActions\" appendTo=\"body\"></p-menu>\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"additionalToolbarContent\" [ngTemplateOutlet]=\"additionalToolbarContent\"> </ng-container>\n </div>\n </div>\n\n <div\n class=\"object-panel flex-column md:flex-row\"\n [class.justify-content-evenly]=\"objectDetails\"\n [class.justify-content-start]=\"!objectDetails\"\n >\n <ng-container *ngIf=\"objectDetails\">\n <div\n class=\"object-info flex flex-row md:flex-column align-items-baseline md:align-items-center justify-content-between\"\n *ngFor=\"let item of objectDetails\"\n >\n <label class=\"flex font-medium text-600\" name=\"object-detail-label\">{{ item.label | dynamicPipe:item.labelPipe }}</label>\n <span\n *ngIf=\"item.icon || item.value\"\n class=\"flex text-900 mt-2\"\n [ngClass]=\"item.icon ? 'gap-1 align-items-center' : null\"\n [title]=\"item.tooltip || ''\"\n name=\"object-detail-value\"\n >\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\" name=\"object-detail-icon\"></i>\n {{ item.value | dynamicPipe:item.valuePipe:item.valuePipeArgs}}</span\n >\n </div>\n </ng-container>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host(.p-button-label){font-weight:400}:host ::ng-deep .action-button{padding:.5rem;font-weight:400}.onecx-page-header{display:flex;flex-flow:column;border-radius:.25rem;overflow:hidden;background:#fff;box-shadow:0 2px 2px #0000001a;border:1px solid #cdd0d3}.onecx-page-header .title-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;background-color:#f8f9fa;border-top-right-radius:inherit;border-top-left-radius:inherit}.onecx-page-header .title-bar .figure{width:3rem;height:3rem;margin-right:.5rem;position:relative}.onecx-page-header .title-bar .figure .figure-image img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.onecx-page-header .title-bar .figure .colorblob{background-color:var(--primary-color);position:absolute;inset:0}.onecx-page-header .title-bar .title-wrap{display:flex;flex-flow:row;align-items:center;gap:.25rem}.onecx-page-header .title-bar .title-wrap .header{display:flex;align-items:flex-start;justify-content:center;flex-direction:column}.onecx-page-header .title-bar .title-wrap h1{font-size:1em;font-weight:700;margin:0;padding:0}.onecx-page-header .title-bar .title-wrap h2{font-size:1em;font-weight:400;margin:0;padding:0}.onecx-page-header .title-bar .action-items-wrap{display:flex;height:-moz-fit-content;height:fit-content;gap:.5rem;align-items:center;justify-content:space-between}.onecx-page-header .title-bar .action-items-wrap button{padding:.5rem}.onecx-page-header .object-panel{border-top:1px solid #cdd0d3;padding:1rem;display:flex}.onecx-page-header .object-panel:empty{display:none}.badge-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.scale{transform:scale(2)}\n"] }]
2481
+ }], ctorParameters: function () { return [{ type: BreadcrumbService }, { type: i1.TranslateService }, { type: i2.AppStateService }, { type: i2.UserService }]; }, propDecorators: { header: [{
2482
+ type: Input
2483
+ }], loading: [{
2484
+ type: Input
2485
+ }], figureBackground: [{
2486
+ type: Input
2487
+ }], showFigure: [{
2488
+ type: Input
2489
+ }], figureImage: [{
2490
+ type: Input
2491
+ }], disableDefaultActions: [{
2492
+ type: Input
2493
+ }], subheader: [{
2494
+ type: Input
2495
+ }], actions: [{
2496
+ type: Input
2497
+ }], objectDetails: [{
2498
+ type: Input
2499
+ }], showBreadcrumbs: [{
2500
+ type: Input
2501
+ }], manualBreadcrumbs: [{
2502
+ type: Input
2503
+ }], save: [{
2504
+ type: Output
2505
+ }], additionalToolbarContent: [{
2506
+ type: ContentChild,
2507
+ args: ['additionalToolbarContent']
2508
+ }], additionalToolbarContentLeft: [{
2509
+ type: ContentChild,
2510
+ args: ['additionalToolbarContentLeft']
2511
+ }] } });
2512
+
2513
+ class SearchConfigComponent {
2514
+ constructor() {
2515
+ this.placeholderKey = 'OCX_SEARCH_HEADER.OCX_SEARCH_CONFIG.DROPDOWN_DEFAULT';
2516
+ this.selectedSearchConfigChanged = new EventEmitter();
2517
+ }
2518
+ ngOnInit() {
2519
+ this.formGroup = new FormGroup({
2520
+ searchConfigForm: new FormControl(null),
2521
+ });
2522
+ }
2523
+ onSearchConfigChange(event) {
2524
+ var _a;
2525
+ (_a = this.selectedSearchConfigChanged) === null || _a === void 0 ? void 0 : _a.emit(event.value);
2526
+ }
2527
+ }
2528
+ SearchConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SearchConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2529
+ SearchConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SearchConfigComponent, selector: "ocx-search-config", inputs: { searchConfigs: "searchConfigs", placeholderKey: "placeholderKey" }, outputs: { selectedSearchConfigChanged: "selectedSearchConfigChanged" }, ngImport: i0, template: "<div *ngIf=\"formGroup\">\n <form [formGroup]=\"formGroup\">\n <div *ngIf=\"searchConfigs !== undefined\">\n <div *ngIf=\"searchConfigs.length > 0\">\n <p-dropdown\n id=\"searchConfig\"\n formControlName=\"searchConfigForm\"\n [options]=\"searchConfigs\"\n optionLabel=\"name\"\n [placeholder]=\"placeholderKey | translate\"\n [showClear]=\"true\"\n (onChange)=\"onSearchConfigChange($event)\"\n ></p-dropdown>\n </div>\n </div>\n </form>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
2530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SearchConfigComponent, decorators: [{
2531
+ type: Component,
2532
+ args: [{ selector: 'ocx-search-config', template: "<div *ngIf=\"formGroup\">\n <form [formGroup]=\"formGroup\">\n <div *ngIf=\"searchConfigs !== undefined\">\n <div *ngIf=\"searchConfigs.length > 0\">\n <p-dropdown\n id=\"searchConfig\"\n formControlName=\"searchConfigForm\"\n [options]=\"searchConfigs\"\n optionLabel=\"name\"\n [placeholder]=\"placeholderKey | translate\"\n [showClear]=\"true\"\n (onChange)=\"onSearchConfigChange($event)\"\n ></p-dropdown>\n </div>\n </div>\n </form>\n</div>\n" }]
2533
+ }], propDecorators: { searchConfigs: [{
2534
+ type: Input
2535
+ }], placeholderKey: [{
2536
+ type: Input
2537
+ }], selectedSearchConfigChanged: [{
2538
+ type: Output
2539
+ }] } });
2540
+
2541
+ /**
2542
+ * To trigger the search when Enter key is pressed inside a search parameter field,
2543
+ * an EventListener for keyup enter event is added for HTML elements which have an input.
2544
+ * Please add the EventListener yourself manually, if you want to have that functionality for some other elements
2545
+ * which do not have an input element.
2546
+ */
2547
+ class SearchHeaderComponent {
2548
+ constructor() {
2549
+ this.header = '';
2550
+ this.viewMode = 'basic';
2551
+ this.manualBreadcrumbs = false;
2552
+ this._actions = [];
2553
+ this.searched = new EventEmitter();
2554
+ this.resetted = new EventEmitter();
2555
+ this.selectedSearchConfigChanged = new EventEmitter();
2556
+ this.viewModeChanged = new EventEmitter();
2557
+ this.hasAdvanced = false;
2558
+ this.headerActions = [];
2559
+ }
2560
+ /**
2561
+ * @deprecated Will be replaced by header
2562
+ */
2563
+ get headline() {
2564
+ return this.header;
2565
+ }
2566
+ set headline(value) {
2567
+ this.header = value;
2568
+ }
2569
+ get actions() {
2570
+ return this._actions;
2571
+ }
2572
+ set actions(value) {
2573
+ this._actions = value;
2574
+ this.updateHeaderActions();
2575
+ }
2576
+ get _additionalToolbarContent() {
2577
+ return this.additionalToolbarContent;
2578
+ }
2579
+ get _additionalToolbarContentLeft() {
2580
+ return this.additionalToolbarContentLeft;
2581
+ }
2582
+ ngAfterViewInit() {
2583
+ this.addKeyUpEventListener();
2584
+ }
2585
+ toggleViewMode() {
2586
+ var _a;
2587
+ this.viewMode = this.viewMode === 'basic' ? 'advanced' : 'basic';
2588
+ (_a = this.viewModeChanged) === null || _a === void 0 ? void 0 : _a.emit(this.viewMode);
2589
+ this.updateHeaderActions();
2590
+ setTimeout(() => this.addKeyUpEventListener());
2591
+ }
2592
+ onResetClicked() {
2593
+ this.resetted.emit();
2594
+ }
2595
+ onSearchClicked() {
2596
+ this.searched.emit();
2597
+ }
2598
+ updateHeaderActions() {
2599
+ const headerActions = [];
2600
+ if (this.hasAdvanced) {
2601
+ headerActions.push({
2602
+ id: 'simpleAdvancedButton',
2603
+ labelKey: this.viewMode === 'basic'
2604
+ ? 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.ADVANCED.TEXT'
2605
+ : 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.SIMPLE.TEXT',
2606
+ actionCallback: () => this.toggleViewMode(),
2607
+ show: 'always',
2608
+ titleKey: this.viewMode === 'basic'
2609
+ ? 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.ADVANCED.DETAIL'
2610
+ : 'OCX_SEARCH_HEADER.TOGGLE_BUTTON.SIMPLE.DETAIL',
2611
+ });
2612
+ }
2613
+ this.headerActions = headerActions.concat(this.actions);
2614
+ }
2615
+ addKeyUpEventListener() {
2616
+ var _a;
2617
+ const inputElements = (_a = this.searchParameterFields) === null || _a === void 0 ? void 0 : _a.nativeElement.querySelectorAll('input');
2618
+ inputElements.forEach((inputElement) => {
2619
+ if (!inputElement.listenerAdded) {
2620
+ inputElement.addEventListener('keyup', (event) => this.onSearchKeyup(event));
2621
+ inputElement.listenerAdded = true;
2622
+ }
2623
+ });
2624
+ }
2625
+ onSearchKeyup(event) {
2626
+ if (event.code === 'Enter') {
2627
+ this.onSearchClicked();
2628
+ }
2629
+ }
2630
+ confirmSearchConfig(searchConfig) {
2631
+ var _a;
2632
+ (_a = this.selectedSearchConfigChanged) === null || _a === void 0 ? void 0 : _a.emit(searchConfig);
2633
+ }
2634
+ }
2635
+ SearchHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SearchHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2636
+ SearchHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SearchHeaderComponent, selector: "ocx-search-header", inputs: { searchConfigs: "searchConfigs", header: "header", headline: "headline", subheader: "subheader", viewMode: "viewMode", manualBreadcrumbs: "manualBreadcrumbs", actions: "actions" }, outputs: { searched: "searched", resetted: "resetted", selectedSearchConfigChanged: "selectedSearchConfigChanged", viewModeChanged: "viewModeChanged" }, queries: [{ propertyName: "additionalToolbarContent", first: true, predicate: ["additionalToolbarContent"], descendants: true }, { propertyName: "additionalToolbarContentLeft", first: true, predicate: ["additionalToolbarContentLeft"], descendants: true }], viewQueries: [{ propertyName: "searchParameterFields", first: true, predicate: ["searchParameterFields"], descendants: true }], ngImport: i0, template: "<ocx-page-header\n [header]=\"header || ('OCX_SEARCH_HEADER.HEADER' | translate)\"\n [subheader]=\"subheader\"\n [manualBreadcrumbs]=\"manualBreadcrumbs\"\n [actions]=\"headerActions\"\n>\n <ng-template #additionalToolbarContentLeft>\n <ocx-search-config [searchConfigs]=\"searchConfigs\" (selectedSearchConfigChanged)=\"confirmSearchConfig($event)\">\n </ocx-search-config>\n <ng-container *ngIf=\"_additionalToolbarContentLeft\" [ngTemplateOutlet]=\"_additionalToolbarContentLeft\"></ng-container>\n </ng-template>\n <ng-template #additionalToolbarContent>\n <ng-container *ngIf=\"_additionalToolbarContent\" [ngTemplateOutlet]=\"_additionalToolbarContent\"></ng-container>\n </ng-template>\n <div class=\"search-criteria-container\">\n <div #searchParameterFields>\n <ng-content></ng-content>\n <div class=\"search-criteria-buttons\">\n <p-button\n id=\"resetButton\"\n *ngIf=\"resetted.observed\"\n (onClick)=\"onResetClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-eraser\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n\n <p-button\n id=\"searchButton\"\n (onClick)=\"onSearchClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-search\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n </div>\n </div>\n </div>\n</ocx-page-header>\n", styles: [".search-criteria-buttons{display:flex;flex-flow:row;align-items:flex-start;gap:.5rem;margin-top:.5rem}.search-criteria-container{width:100%;display:flex}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SearchConfigComponent, selector: "ocx-search-config", inputs: ["searchConfigs", "placeholderKey"], outputs: ["selectedSearchConfigChanged"] }, { kind: "component", type: PageHeaderComponent, selector: "ocx-page-header", inputs: ["header", "loading", "figureBackground", "showFigure", "figureImage", "disableDefaultActions", "subheader", "actions", "objectDetails", "showBreadcrumbs", "manualBreadcrumbs"], outputs: ["save"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
2637
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SearchHeaderComponent, decorators: [{
2638
+ type: Component,
2639
+ args: [{ selector: 'ocx-search-header', template: "<ocx-page-header\n [header]=\"header || ('OCX_SEARCH_HEADER.HEADER' | translate)\"\n [subheader]=\"subheader\"\n [manualBreadcrumbs]=\"manualBreadcrumbs\"\n [actions]=\"headerActions\"\n>\n <ng-template #additionalToolbarContentLeft>\n <ocx-search-config [searchConfigs]=\"searchConfigs\" (selectedSearchConfigChanged)=\"confirmSearchConfig($event)\">\n </ocx-search-config>\n <ng-container *ngIf=\"_additionalToolbarContentLeft\" [ngTemplateOutlet]=\"_additionalToolbarContentLeft\"></ng-container>\n </ng-template>\n <ng-template #additionalToolbarContent>\n <ng-container *ngIf=\"_additionalToolbarContent\" [ngTemplateOutlet]=\"_additionalToolbarContent\"></ng-container>\n </ng-template>\n <div class=\"search-criteria-container\">\n <div #searchParameterFields>\n <ng-content></ng-content>\n <div class=\"search-criteria-buttons\">\n <p-button\n id=\"resetButton\"\n *ngIf=\"resetted.observed\"\n (onClick)=\"onResetClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-eraser\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.RESET_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n\n <p-button\n id=\"searchButton\"\n (onClick)=\"onSearchClicked()\"\n label=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.TEXT' | translate }}\"\n icon=\"pi pi-search\"\n [ariaLabel]=\"'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate\"\n title=\"{{ 'OCX_SEARCH_HEADER.SEARCH_BUTTON.DETAIL' | translate }}\"\n >\n </p-button>\n </div>\n </div>\n </div>\n</ocx-page-header>\n", styles: [".search-criteria-buttons{display:flex;flex-flow:row;align-items:flex-start;gap:.5rem;margin-top:.5rem}.search-criteria-container{width:100%;display:flex}\n"] }]
2640
+ }], propDecorators: { searchConfigs: [{
2641
+ type: Input
2642
+ }], header: [{
2643
+ type: Input
2644
+ }], headline: [{
2645
+ type: Input
2646
+ }], subheader: [{
2647
+ type: Input
2648
+ }], viewMode: [{
2649
+ type: Input
2650
+ }], manualBreadcrumbs: [{
2651
+ type: Input
2652
+ }], actions: [{
2653
+ type: Input
2654
+ }], searched: [{
2655
+ type: Output
2656
+ }], resetted: [{
2657
+ type: Output
2658
+ }], selectedSearchConfigChanged: [{
2659
+ type: Output
2660
+ }], viewModeChanged: [{
2661
+ type: Output
2662
+ }], additionalToolbarContent: [{
2663
+ type: ContentChild,
2664
+ args: ['additionalToolbarContent']
2665
+ }], additionalToolbarContentLeft: [{
2666
+ type: ContentChild,
2667
+ args: ['additionalToolbarContentLeft']
2668
+ }], searchParameterFields: [{
2669
+ type: ViewChild,
2670
+ args: ['searchParameterFields']
2671
+ }] } });
2672
+
2673
+ // This topic is defined here and not in integration-interface, because
2674
+ // it is not used as framework independent integration but for improving
2675
+ // angular specific things
2676
+ class TranslationCacheTopic extends SyncableTopic {
2677
+ constructor() {
2678
+ super('translationCache', 1);
2679
+ }
2680
+ }
2681
+ class TranslationCacheService {
2682
+ constructor() {
2683
+ this.translationTopic$ = new TranslationCacheTopic();
2684
+ this.translations$ = new BehaviorSubject({});
2685
+ this.translationTopic$
2686
+ .pipe(withLatestFrom(this.translations$), map(([topicTranslations, translations]) => {
2687
+ let foundValueOthersDoNotKnow = false;
2688
+ const newTranslations = Object.assign({}, translations);
2689
+ Object.keys(topicTranslations).forEach((k) => {
2690
+ var _a;
2691
+ if (!topicTranslations[k] && translations[k]) {
2692
+ foundValueOthersDoNotKnow = true;
2693
+ }
2694
+ (_a = newTranslations[k]) !== null && _a !== void 0 ? _a : (newTranslations[k] = topicTranslations[k]);
2695
+ });
2696
+ return [newTranslations, foundValueOthersDoNotKnow];
2697
+ }), tap(([newTranslations, foundValueOthersDoNotKnow]) => {
2698
+ if (foundValueOthersDoNotKnow) {
2699
+ this.translationTopic$.publish(newTranslations);
2700
+ }
2701
+ }), map(([newTranslations]) => newTranslations))
2702
+ .subscribe(this.translations$);
2703
+ }
2704
+ ngOnDestroy() {
2705
+ this.translationTopic$.destroy();
2706
+ }
2707
+ getTranslationFile(url, cacheMissFunction) {
2708
+ if (this.translations$.value[url]) {
2709
+ return of(this.translations$.value[url]);
2710
+ }
2711
+ this.translationTopic$.publish(Object.assign(Object.assign({}, this.translations$.value), { [url]: null }));
2712
+ return race(this.translations$.pipe(filter((t) => t[url]), map((t) => t[url])), cacheMissFunction().pipe(tap((t) => {
2713
+ this.translationTopic$.publish(Object.assign(Object.assign({}, this.translations$.value), { [url]: t }));
2714
+ }))).pipe(first());
2715
+ }
2716
+ }
2717
+ TranslationCacheService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TranslationCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2718
+ TranslationCacheService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TranslationCacheService, providedIn: 'root' });
2719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TranslationCacheService, decorators: [{
2720
+ type: Injectable,
2721
+ args: [{ providedIn: 'root' }]
2722
+ }], ctorParameters: function () { return []; } });
2723
+
2724
+ class AngularAcceleratorPrimeNgModule {
2725
+ }
2726
+ AngularAcceleratorPrimeNgModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorPrimeNgModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2727
+ AngularAcceleratorPrimeNgModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorPrimeNgModule, imports: [DropdownModule,
2728
+ ButtonModule,
2729
+ DialogModule,
2730
+ PickListModule,
2731
+ SelectButtonModule,
2732
+ DataViewModule,
2733
+ TableModule,
2734
+ MenuModule,
2735
+ ChartModule,
2736
+ MultiSelectModule], exports: [DropdownModule,
2737
+ ButtonModule,
2738
+ DialogModule,
2739
+ PickListModule,
2740
+ SelectButtonModule,
2741
+ DataViewModule,
2742
+ TableModule,
2743
+ MenuModule,
2744
+ ChartModule,
2745
+ MultiSelectModule] });
2746
+ AngularAcceleratorPrimeNgModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorPrimeNgModule, imports: [DropdownModule,
2747
+ ButtonModule,
2748
+ DialogModule,
2749
+ PickListModule,
2750
+ SelectButtonModule,
2751
+ DataViewModule,
2752
+ TableModule,
2753
+ MenuModule,
2754
+ ChartModule,
2755
+ MultiSelectModule, DropdownModule,
2756
+ ButtonModule,
2757
+ DialogModule,
2758
+ PickListModule,
2759
+ SelectButtonModule,
2760
+ DataViewModule,
2761
+ TableModule,
2762
+ MenuModule,
2763
+ ChartModule,
2764
+ MultiSelectModule] });
2765
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorPrimeNgModule, decorators: [{
2766
+ type: NgModule,
2767
+ args: [{
2768
+ imports: [
2769
+ DropdownModule,
2770
+ ButtonModule,
2771
+ DialogModule,
2772
+ PickListModule,
2773
+ SelectButtonModule,
2774
+ DataViewModule,
2775
+ TableModule,
2776
+ MenuModule,
2777
+ ChartModule,
2778
+ MultiSelectModule,
2779
+ ],
2780
+ exports: [
2781
+ DropdownModule,
2782
+ ButtonModule,
2783
+ DialogModule,
2784
+ PickListModule,
2785
+ SelectButtonModule,
2786
+ DataViewModule,
2787
+ TableModule,
2788
+ MenuModule,
2789
+ ChartModule,
2790
+ MultiSelectModule,
2791
+ ],
2792
+ }]
2793
+ }] });
2794
+
2795
+ class OcxTimeagoIntl extends TimeagoIntl {
2796
+ constructor(userService) {
2797
+ super();
2798
+ this.userService = userService;
2799
+ this.LANG_TO_STRINGS = {
2800
+ en: strings,
2801
+ de: strings$1,
2802
+ };
2803
+ this.DEFAULT_LANG = 'en';
2804
+ this.strings = strings;
2805
+ userService.lang$
2806
+ .pipe(map((lang) => {
2807
+ return this.getBestMatchLanguage(lang);
2808
+ }))
2809
+ .subscribe((lang) => {
2810
+ this.strings = this.LANG_TO_STRINGS[lang];
2811
+ this.changes.next();
2812
+ });
2813
+ }
2814
+ getBestMatchLanguage(lang) {
2815
+ if (Object.keys(this.LANG_TO_STRINGS).includes(lang)) {
2816
+ return lang;
2817
+ }
2818
+ else {
2819
+ console.log(`${lang} is not supported. Using ${this.DEFAULT_LANG} as a fallback.`);
2820
+ }
2821
+ return this.DEFAULT_LANG;
2822
+ }
2823
+ }
2824
+
2825
+ class AsyncTranslateLoader {
2826
+ constructor(translateLoader$) {
2827
+ this.translateLoader$ = translateLoader$;
2828
+ this.timerId = AsyncTranslateLoader.lastTimerId++;
2829
+ }
2830
+ getTranslation(lang) {
2831
+ return this.translateLoader$.pipe(tap(() => console.time('AsyncTranslateLoader_' + this.timerId)), defaultIfEmpty(undefined), first(), mergeMap((translateLoader) => { var _a; return (_a = translateLoader === null || translateLoader === void 0 ? void 0 : translateLoader.getTranslation(lang)) !== null && _a !== void 0 ? _a : of({}); }), tap(() => console.timeEnd('AsyncTranslateLoader_' + this.timerId)));
2832
+ }
2833
+ }
2834
+ AsyncTranslateLoader.lastTimerId = 0;
2835
+
2836
+ class CachingTranslateLoader {
2837
+ constructor(translationCache, http, prefix, suffix) {
2838
+ this.translationCache = translationCache;
2839
+ this.http = http;
2840
+ this.prefix = prefix;
2841
+ this.suffix = suffix;
2842
+ this.translateLoader = new TranslateHttpLoader(this.http, this.prefix, this.suffix);
2843
+ }
2844
+ getTranslation(lang) {
2845
+ const url = `${this.prefix}${lang}${this.suffix}`;
2846
+ return this.translationCache.getTranslationFile(url, () => this.translateLoader.getTranslation(lang));
2847
+ }
2848
+ }
2849
+
2850
+ class TranslateCombinedLoader {
2851
+ constructor(...loaders) {
2852
+ this._loaders = loaders;
2853
+ }
2854
+ getTranslation(lang) {
2855
+ return forkJoin(this._loaders.map((l) => l.getTranslation(lang))).pipe(map((allTranslations) => {
2856
+ let result = {};
2857
+ allTranslations.forEach((translations) => {
2858
+ result = this.mergeDeep(result, translations);
2859
+ });
2860
+ return result;
2861
+ }));
2862
+ }
2863
+ isObject(item) {
2864
+ return item && typeof item === 'object' && !Array.isArray(item);
2865
+ }
2866
+ mergeDeep(target, source) {
2867
+ const output = Object.assign({}, target);
2868
+ if (this.isObject(target) && this.isObject(source)) {
2869
+ Object.keys(source).forEach((key) => {
2870
+ if (this.isObject(source[key])) {
2871
+ if (!(key in target))
2872
+ Object.assign(output, { [key]: source[key] });
2873
+ else
2874
+ output[key] = this.mergeDeep(target[key], source[key]);
2875
+ }
2876
+ else {
2877
+ Object.assign(output, { [key]: source[key] });
2878
+ }
2879
+ });
2880
+ }
2881
+ return output;
2882
+ }
2883
+ }
2884
+
2885
+ let lastTranslateLoaderTimerId = 0;
2886
+ function createTranslateLoader(http, appStateService, translationCacheService) {
2887
+ const ts = translationCacheService !== null && translationCacheService !== void 0 ? translationCacheService : inject(TranslationCacheService);
2888
+ const timerId = lastTranslateLoaderTimerId++;
2889
+ console.time('createTranslateLoader_' + timerId);
2890
+ return new AsyncTranslateLoader(combineLatest([appStateService.currentMfe$.asObservable(), appStateService.globalLoading$.asObservable()]).pipe(filter(([, isLoading]) => !isLoading), map(([currentMfe]) => {
2891
+ return new TranslateCombinedLoader(
2892
+ // translations of shell or of app in standalone mode
2893
+ new CachingTranslateLoader(ts, http, `./assets/i18n/`, '.json'),
2894
+ // translations of portal-integration-angular of app
2895
+ new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `onecx-portal-lib/assets/i18n/`), '.json'),
2896
+ // translations of the app
2897
+ new CachingTranslateLoader(ts, http, Location.joinWithSlash(currentMfe.remoteBaseUrl, `assets/i18n/`), '.json'));
2898
+ }), tap(() => console.timeEnd('createTranslateLoader_' + timerId))));
2899
+ }
2900
+
2901
+ class AngularAcceleratorMissingTranslationHandler {
2902
+ handle(params) {
2903
+ console.log(`Missing translation for ${params.key}`, params);
2904
+ return params.key;
2905
+ }
2906
+ }
2907
+ class AngularAcceleratorModule {
2908
+ }
2909
+ AngularAcceleratorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2910
+ AngularAcceleratorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorModule, declarations: [ColumnGroupSelectionComponent,
2911
+ CustomGroupColumnSelectorComponent,
2912
+ DataLayoutSelectionComponent,
2913
+ DataListGridSortingComponent,
2914
+ DataListGridComponent,
2915
+ DataTableComponent,
2916
+ DataViewComponent,
2917
+ InteractiveDataViewComponent,
2918
+ SearchConfigComponent,
2919
+ PageHeaderComponent,
2920
+ DynamicPipe,
2921
+ SearchHeaderComponent,
2922
+ DiagramComponent,
2923
+ GroupByCountDiagramComponent,
2924
+ IfPermissionDirective,
2925
+ IfBreakpointDirective,
2926
+ OcxTimeAgoPipe], imports: [CommonModule,
2927
+ AngularAcceleratorPrimeNgModule, i1.TranslateModule, FormsModule,
2928
+ RouterModule,
2929
+ ReactiveFormsModule], exports: [ColumnGroupSelectionComponent,
2930
+ CustomGroupColumnSelectorComponent,
2931
+ DataLayoutSelectionComponent,
2932
+ DataListGridComponent,
2933
+ DataTableComponent,
2934
+ DataViewComponent,
2935
+ InteractiveDataViewComponent,
2936
+ SearchConfigComponent,
2937
+ PageHeaderComponent,
2938
+ SearchHeaderComponent,
2939
+ DiagramComponent,
2940
+ GroupByCountDiagramComponent,
2941
+ IfPermissionDirective,
2942
+ IfBreakpointDirective,
2943
+ OcxTimeAgoPipe] });
2944
+ AngularAcceleratorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorModule, providers: [
2945
+ {
2946
+ provide: LOCALE_ID,
2947
+ useFactory: (UserService) => {
2948
+ return UserService.lang$.getValue();
2949
+ },
2950
+ deps: [UserService],
2951
+ },
2952
+ {
2953
+ provide: TimeagoIntl,
2954
+ useFactory: (userService) => {
2955
+ return new OcxTimeagoIntl(userService);
2956
+ },
2957
+ deps: [UserService],
2958
+ },
2959
+ importProvidersFrom(TimeagoModule),
2960
+ {
2961
+ provide: TimeagoFormatter,
2962
+ useFactory: (TimeagoIntl) => {
2963
+ return new TimeagoCustomFormatter(TimeagoIntl);
2964
+ },
2965
+ deps: [TimeagoIntl],
2966
+ },
2967
+ {
2968
+ provide: TimeagoClock,
2969
+ useClass: TimeagoDefaultClock,
2970
+ },
2971
+ ], imports: [CommonModule,
2972
+ AngularAcceleratorPrimeNgModule,
2973
+ TranslateModule.forRoot({
2974
+ isolate: true,
2975
+ loader: {
2976
+ provide: TranslateLoader,
2977
+ useFactory: createTranslateLoader,
2978
+ deps: [HttpClient, AppStateService, TranslationCacheService],
2979
+ },
2980
+ missingTranslationHandler: {
2981
+ provide: MissingTranslationHandler,
2982
+ useClass: AngularAcceleratorMissingTranslationHandler,
2983
+ },
2984
+ }),
2985
+ FormsModule,
2986
+ RouterModule,
2987
+ ReactiveFormsModule] });
2988
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AngularAcceleratorModule, decorators: [{
2989
+ type: NgModule,
2990
+ args: [{
2991
+ imports: [
2992
+ CommonModule,
2993
+ AngularAcceleratorPrimeNgModule,
2994
+ TranslateModule.forRoot({
2995
+ isolate: true,
2996
+ loader: {
2997
+ provide: TranslateLoader,
2998
+ useFactory: createTranslateLoader,
2999
+ deps: [HttpClient, AppStateService, TranslationCacheService],
3000
+ },
3001
+ missingTranslationHandler: {
3002
+ provide: MissingTranslationHandler,
3003
+ useClass: AngularAcceleratorMissingTranslationHandler,
3004
+ },
3005
+ }),
3006
+ FormsModule,
3007
+ RouterModule,
3008
+ ReactiveFormsModule,
3009
+ ],
3010
+ declarations: [
3011
+ ColumnGroupSelectionComponent,
3012
+ CustomGroupColumnSelectorComponent,
3013
+ DataLayoutSelectionComponent,
3014
+ DataListGridSortingComponent,
3015
+ DataListGridComponent,
3016
+ DataTableComponent,
3017
+ DataViewComponent,
3018
+ InteractiveDataViewComponent,
3019
+ SearchConfigComponent,
3020
+ PageHeaderComponent,
3021
+ DynamicPipe,
3022
+ SearchHeaderComponent,
3023
+ DiagramComponent,
3024
+ GroupByCountDiagramComponent,
3025
+ IfPermissionDirective,
3026
+ IfBreakpointDirective,
3027
+ OcxTimeAgoPipe,
3028
+ ],
3029
+ providers: [
3030
+ {
3031
+ provide: LOCALE_ID,
3032
+ useFactory: (UserService) => {
3033
+ return UserService.lang$.getValue();
3034
+ },
3035
+ deps: [UserService],
3036
+ },
3037
+ {
3038
+ provide: TimeagoIntl,
3039
+ useFactory: (userService) => {
3040
+ return new OcxTimeagoIntl(userService);
3041
+ },
3042
+ deps: [UserService],
3043
+ },
3044
+ importProvidersFrom(TimeagoModule),
3045
+ {
3046
+ provide: TimeagoFormatter,
3047
+ useFactory: (TimeagoIntl) => {
3048
+ return new TimeagoCustomFormatter(TimeagoIntl);
3049
+ },
3050
+ deps: [TimeagoIntl],
3051
+ },
3052
+ {
3053
+ provide: TimeagoClock,
3054
+ useClass: TimeagoDefaultClock,
3055
+ },
3056
+ ],
3057
+ exports: [
3058
+ ColumnGroupSelectionComponent,
3059
+ CustomGroupColumnSelectorComponent,
3060
+ DataLayoutSelectionComponent,
3061
+ DataListGridComponent,
3062
+ DataTableComponent,
3063
+ DataViewComponent,
3064
+ InteractiveDataViewComponent,
3065
+ SearchConfigComponent,
3066
+ PageHeaderComponent,
3067
+ SearchHeaderComponent,
3068
+ DiagramComponent,
3069
+ GroupByCountDiagramComponent,
3070
+ IfPermissionDirective,
3071
+ IfBreakpointDirective,
3072
+ OcxTimeAgoPipe,
3073
+ // DataListGridSortingComponent,
3074
+ ],
3075
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
3076
+ }]
3077
+ }] });
3078
+
3079
+ class DateUtils {
3080
+ constructor(locale) {
3081
+ this.locale = locale;
3082
+ this.options = {
3083
+ month: 'short',
3084
+ day: '2-digit',
3085
+ year: 'numeric',
3086
+ hour: 'numeric',
3087
+ minute: '2-digit',
3088
+ second: '2-digit',
3089
+ };
3090
+ }
3091
+ localizedDate(date) {
3092
+ return date
3093
+ ? new Intl.DateTimeFormat(this.locale, this.options).format(date instanceof Date ? date : new Date(date))
3094
+ : '';
3095
+ }
3096
+ }
3097
+ DateUtils.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateUtils, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
3098
+ DateUtils.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateUtils, providedIn: 'root' });
3099
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DateUtils, decorators: [{
3100
+ type: Injectable,
3101
+ args: [{
3102
+ providedIn: 'root',
3103
+ }]
3104
+ }], ctorParameters: function () {
3105
+ return [{ type: undefined, decorators: [{
3106
+ type: Inject,
3107
+ args: [LOCALE_ID]
3108
+ }] }];
3109
+ } });
3110
+
3111
+ // directives
3112
+
3113
+ /**
3114
+ * Generated bundle index. Do not edit.
3115
+ */
3116
+
3117
+ export { AngularAcceleratorMissingTranslationHandler, AngularAcceleratorModule, AngularAcceleratorPrimeNgModule, AsyncTranslateLoader, BreadcrumbService, CachingTranslateLoader, ColorUtils, ColumnGroupSelectionComponent, ColumnType, CustomGroupColumnSelectorComponent, DataLayoutSelectionComponent, DataListGridComponent, DataListGridSortingComponent, DataTableComponent, DataViewComponent, DateUtils, DiagramComponent, DynamicPipe, GroupByCountDiagramComponent, IfBreakpointDirective, IfPermissionDirective, InteractiveDataViewComponent, ObjectUtils, OcxTimeAgoPipe, PageHeaderComponent, SearchConfigComponent, SearchHeaderComponent, TranslateCombinedLoader, TranslationCacheService, createTranslateLoader, flattenObject };
3118
+ //# sourceMappingURL=onecx-angular-accelerator.mjs.map