@pepperi-addons/ngx-composite-lib 0.4.1-beta.12 → 0.4.1-beta.13

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 (127) hide show
  1. package/color-settings/color-settings.component.d.ts +25 -25
  2. package/color-settings/color-settings.model.d.ts +6 -6
  3. package/color-settings/color-settings.module.d.ts +12 -12
  4. package/color-settings/index.d.ts +5 -5
  5. package/color-settings/public-api.d.ts +3 -3
  6. package/core/common/directives/index.d.ts +1 -1
  7. package/core/common/directives/public-api.d.ts +1 -1
  8. package/core/common/directives/reset-configuration-field.directive.d.ts +39 -39
  9. package/core/common/index.d.ts +1 -1
  10. package/core/common/public-api.d.ts +2 -2
  11. package/core/common/services/dimx.service.d.ts +46 -46
  12. package/core/common/services/index.d.ts +1 -1
  13. package/core/common/services/public-api.d.ts +2 -2
  14. package/core/common/services/utilities.service.d.ts +6 -6
  15. package/core/index.d.ts +1 -1
  16. package/core/public-api.d.ts +1 -1
  17. package/data-view-builder/data-view-builder.component.d.ts +35 -35
  18. package/data-view-builder/data-view-builder.model.d.ts +1 -1
  19. package/data-view-builder/data-view-builder.module.d.ts +23 -23
  20. package/data-view-builder/data-view-builder.service.d.ts +14 -14
  21. package/data-view-builder/index.d.ts +5 -5
  22. package/data-view-builder/menu-data-view/menu-data-view.component.d.ts +36 -36
  23. package/data-view-builder/public-api.d.ts +3 -3
  24. package/esm2020/color-settings/color-settings.component.mjs +86 -86
  25. package/esm2020/color-settings/color-settings.model.mjs +8 -8
  26. package/esm2020/color-settings/color-settings.module.mjs +37 -37
  27. package/esm2020/color-settings/pepperi-addons-ngx-composite-lib-color-settings.mjs +4 -4
  28. package/esm2020/color-settings/public-api.mjs +6 -6
  29. package/esm2020/core/common/directives/index.mjs +4 -4
  30. package/esm2020/core/common/directives/public-api.mjs +4 -4
  31. package/esm2020/core/common/directives/reset-configuration-field.directive.mjs +135 -135
  32. package/esm2020/core/common/index.mjs +4 -4
  33. package/esm2020/core/common/public-api.mjs +5 -5
  34. package/esm2020/core/common/services/dimx.service.mjs +63 -63
  35. package/esm2020/core/common/services/index.mjs +4 -4
  36. package/esm2020/core/common/services/public-api.mjs +5 -5
  37. package/esm2020/core/common/services/utilities.service.mjs +18 -18
  38. package/esm2020/core/index.mjs +4 -4
  39. package/esm2020/core/public-api.mjs +4 -4
  40. package/esm2020/data-view-builder/data-view-builder.component.mjs +116 -116
  41. package/esm2020/data-view-builder/data-view-builder.model.mjs +1 -1
  42. package/esm2020/data-view-builder/data-view-builder.module.mjs +79 -79
  43. package/esm2020/data-view-builder/data-view-builder.service.mjs +38 -38
  44. package/esm2020/data-view-builder/menu-data-view/menu-data-view.component.mjs +116 -116
  45. package/esm2020/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.mjs +4 -4
  46. package/esm2020/data-view-builder/public-api.mjs +6 -6
  47. package/esm2020/file-status-panel/file-status-panel.component.mjs +34 -34
  48. package/esm2020/file-status-panel/file-status-panel.model.mjs +8 -8
  49. package/esm2020/file-status-panel/file-status-panel.module.mjs +53 -53
  50. package/esm2020/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +4 -4
  51. package/esm2020/file-status-panel/public-api.mjs +6 -6
  52. package/esm2020/generic-form/generic-form.component.mjs +189 -189
  53. package/esm2020/generic-form/generic-form.model.mjs +1 -1
  54. package/esm2020/generic-form/generic-form.module.mjs +67 -67
  55. package/esm2020/generic-form/generic-form.service.mjs +58 -59
  56. package/esm2020/generic-form/pepperi-addons-ngx-composite-lib-generic-form.mjs +4 -4
  57. package/esm2020/generic-form/public-api.mjs +7 -7
  58. package/esm2020/generic-list/generic-list.component.mjs +458 -458
  59. package/esm2020/generic-list/generic-list.model.mjs +1 -1
  60. package/esm2020/generic-list/generic-list.module.mjs +106 -106
  61. package/esm2020/generic-list/generic-list.service.mjs +136 -136
  62. package/esm2020/generic-list/pepperi-addons-ngx-composite-lib-generic-list.mjs +4 -4
  63. package/esm2020/generic-list/public-api.mjs +7 -7
  64. package/esm2020/group-buttons-settings/group-buttons-settings.component.mjs +129 -129
  65. package/esm2020/group-buttons-settings/group-buttons-settings.model.mjs +1 -1
  66. package/esm2020/group-buttons-settings/group-buttons-settings.module.mjs +47 -47
  67. package/esm2020/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +4 -4
  68. package/esm2020/group-buttons-settings/public-api.mjs +6 -6
  69. package/esm2020/ngx-composite-lib.module.mjs +53 -53
  70. package/esm2020/pepperi-addons-ngx-composite-lib.mjs +4 -4
  71. package/esm2020/public-api.mjs +5 -5
  72. package/esm2020/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +4 -4
  73. package/esm2020/shadow-settings/public-api.mjs +6 -6
  74. package/esm2020/shadow-settings/shadow-settings.component.mjs +68 -68
  75. package/esm2020/shadow-settings/shadow-settings.model.mjs +7 -7
  76. package/esm2020/shadow-settings/shadow-settings.module.mjs +41 -41
  77. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.mjs +116 -116
  78. package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.mjs +309 -309
  79. package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.mjs.map +1 -1
  80. package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +80 -80
  81. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.mjs +285 -286
  82. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.mjs.map +1 -1
  83. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.mjs +674 -674
  84. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +164 -164
  85. package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +101 -101
  86. package/fesm2015/pepperi-addons-ngx-composite-lib.mjs +271 -271
  87. package/fesm2020/pepperi-addons-ngx-composite-lib-color-settings.mjs +116 -116
  88. package/fesm2020/pepperi-addons-ngx-composite-lib-data-view-builder.mjs +307 -307
  89. package/fesm2020/pepperi-addons-ngx-composite-lib-data-view-builder.mjs.map +1 -1
  90. package/fesm2020/pepperi-addons-ngx-composite-lib-file-status-panel.mjs +78 -78
  91. package/fesm2020/pepperi-addons-ngx-composite-lib-generic-form.mjs +287 -288
  92. package/fesm2020/pepperi-addons-ngx-composite-lib-generic-form.mjs.map +1 -1
  93. package/fesm2020/pepperi-addons-ngx-composite-lib-generic-list.mjs +656 -656
  94. package/fesm2020/pepperi-addons-ngx-composite-lib-group-buttons-settings.mjs +163 -163
  95. package/fesm2020/pepperi-addons-ngx-composite-lib-shadow-settings.mjs +101 -101
  96. package/fesm2020/pepperi-addons-ngx-composite-lib.mjs +264 -264
  97. package/file-status-panel/file-status-panel.component.d.ts +14 -14
  98. package/file-status-panel/file-status-panel.model.d.ts +7 -7
  99. package/file-status-panel/file-status-panel.module.d.ts +17 -17
  100. package/file-status-panel/index.d.ts +5 -5
  101. package/file-status-panel/public-api.d.ts +3 -3
  102. package/generic-form/generic-form.component.d.ts +43 -43
  103. package/generic-form/generic-form.model.d.ts +42 -42
  104. package/generic-form/generic-form.module.d.ts +13 -13
  105. package/generic-form/generic-form.service.d.ts +15 -15
  106. package/generic-form/index.d.ts +5 -5
  107. package/generic-form/public-api.d.ts +4 -4
  108. package/generic-list/generic-list.component.d.ts +109 -109
  109. package/generic-list/generic-list.model.d.ts +66 -66
  110. package/generic-list/generic-list.module.d.ts +25 -25
  111. package/generic-list/generic-list.service.d.ts +44 -44
  112. package/generic-list/index.d.ts +5 -5
  113. package/generic-list/public-api.d.ts +4 -4
  114. package/group-buttons-settings/group-buttons-settings.component.d.ts +33 -33
  115. package/group-buttons-settings/group-buttons-settings.model.d.ts +1 -1
  116. package/group-buttons-settings/group-buttons-settings.module.d.ts +15 -15
  117. package/group-buttons-settings/index.d.ts +5 -5
  118. package/group-buttons-settings/public-api.d.ts +3 -3
  119. package/index.d.ts +5 -5
  120. package/ngx-composite-lib.module.d.ts +13 -13
  121. package/package.json +1 -1
  122. package/public-api.d.ts +2 -2
  123. package/shadow-settings/index.d.ts +5 -5
  124. package/shadow-settings/public-api.d.ts +3 -3
  125. package/shadow-settings/shadow-settings.component.d.ts +23 -23
  126. package/shadow-settings/shadow-settings.model.d.ts +8 -8
  127. package/shadow-settings/shadow-settings.module.d.ts +13 -13
@@ -31,688 +31,688 @@ import { MatIconModule } from '@angular/material/icon';
31
31
  import { PepFormModule } from '@pepperi-addons/ngx-lib/form';
32
32
  import { PepMenuModule } from '@pepperi-addons/ngx-lib/menu';
33
33
 
34
- class PepGenericListService {
35
- constructor(_translate, _queryBuilderService) {
36
- this._translate = _translate;
37
- this._queryBuilderService = _queryBuilderService;
38
- //
39
- }
40
- /**
41
- * checks if the object contains property
42
- * @param obj object
43
- * @param prop property name
44
- * @returns true if contains, false otherwise
45
- */
46
- hasProperty(obj, prop) {
47
- return Object.prototype.hasOwnProperty.call(obj, prop);
48
- }
49
- getListViewType(dataViewType) {
50
- switch (dataViewType) {
51
- case 'Grid':
52
- return 'table';
53
- case 'Card':
54
- return 'cards';
55
- case 'Line':
56
- return 'lines';
57
- default:
58
- return 'table';
59
- }
60
- }
61
- convertToPepRowData(item, dataView, uuidMapping) {
62
- var _a;
63
- const row = new PepRowData();
64
- let itemFields;
65
- if (this.hasProperty(item, 'fields') && typeof item.fields === 'object') {
66
- itemFields = item.fields;
67
- if (item.isEditable === false) {
68
- row.IsEditable = false;
69
- }
70
- if (item.isSelectableForActions === false) {
71
- row.IsSelectableForActions = false;
72
- }
73
- if (item.isEditable && item.isSelectableForActions && item.isSelected) {
74
- row.IsSelected = true;
75
- }
76
- }
77
- else {
78
- itemFields = item;
79
- }
80
- row.UUID = itemFields[uuidMapping] || undefined;
81
- row.Fields = [];
82
- if ((dataView === null || dataView === void 0 ? void 0 : dataView.Fields) && dataView.Columns) {
83
- for (let index = 0; index < dataView.Fields.length; index++) {
84
- const field = dataView.Fields[index];
85
- row.Fields.push({
86
- ApiName: field.FieldID,
87
- Title: field.Title ? this._translate.instant(field.Title) : '',
88
- XAlignment: 1,
89
- FormattedValue: (itemFields[field.FieldID] || '').toString(),
90
- Value: (itemFields[field.FieldID] || '').toString(),
91
- ColumnWidth: ((_a = dataView.Columns[index]) === null || _a === void 0 ? void 0 : _a.Width) || undefined,
92
- AdditionalValue: '',
93
- OptionalValues: field.OptionalValues || [],
94
- FieldType: DataViewFieldTypes[field.Type],
95
- ReadOnly: field.ReadOnly,
96
- Enabled: !field.ReadOnly
97
- });
98
- }
99
- }
100
- return row;
101
- }
102
- convertToUiControlField(field) {
103
- return {
104
- ApiName: field.ApiName,
105
- FieldType: field.FieldType,
106
- Title: field.Title,
107
- ReadOnly: field.ReadOnlyField,
108
- ColumnWidth: field.ColumnWidth,
109
- ColumnWidthType: 1,
110
- Layout: {
111
- X: field.Layout.X,
112
- Y: field.Layout.Y,
113
- Width: field.Layout.Width,
114
- Height: field.Layout.Field_Height,
115
- XAlignment: field.Layout.xAlignment,
116
- YAlignment: field.Layout.yAlignment,
117
- }
118
- };
119
- }
120
- convertToSmartFilter(smartFilter) {
121
- var _a;
122
- let convertedFields = [];
123
- let filterData = [];
124
- if (smartFilter === null || smartFilter === void 0 ? void 0 : smartFilter.dataView) {
125
- convertedFields = this.createSmartFilterFields(smartFilter.dataView);
126
- if ((_a = smartFilter.data) === null || _a === void 0 ? void 0 : _a.length) {
127
- filterData = smartFilter.data;
128
- }
129
- }
130
- return {
131
- fields: convertedFields,
132
- data: filterData
133
- };
134
- }
135
- createSmartFilterFields(dataView) {
136
- let smartFields = [];
137
- const fields = dataView.Fields.map((field) => {
138
- return {
139
- FieldID: field.FieldID,
140
- FieldType: field.Type,
141
- Title: field.Title,
142
- OptionalValues: field.OptionalValues
143
- };
144
- });
145
- const smartFilterfields = this._queryBuilderService.convertToSmartFilterFields(fields);
146
- if (smartFilterfields === null || smartFilterfields === void 0 ? void 0 : smartFilterfields.length) {
147
- smartFields = smartFilterfields.map((field => field.smart));
148
- }
149
- return smartFields;
150
- }
151
- getSelectedItems(items) {
152
- let selectedItems = [];
153
- for (let i = 0; i < items.length; i++) {
154
- if (items[i].IsSelected) {
155
- selectedItems.push(items[i].UID);
156
- }
157
- }
158
- return selectedItems;
159
- }
160
- }
161
- PepGenericListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListService, deps: [{ token: i1.TranslateService }, { token: i2.PepQueryBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
162
- PepGenericListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListService });
163
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListService, decorators: [{
164
- type: Injectable
34
+ class PepGenericListService {
35
+ constructor(_translate, _queryBuilderService) {
36
+ this._translate = _translate;
37
+ this._queryBuilderService = _queryBuilderService;
38
+ //
39
+ }
40
+ /**
41
+ * checks if the object contains property
42
+ * @param obj object
43
+ * @param prop property name
44
+ * @returns true if contains, false otherwise
45
+ */
46
+ hasProperty(obj, prop) {
47
+ return Object.prototype.hasOwnProperty.call(obj, prop);
48
+ }
49
+ getListViewType(dataViewType) {
50
+ switch (dataViewType) {
51
+ case 'Grid':
52
+ return 'table';
53
+ case 'Card':
54
+ return 'cards';
55
+ case 'Line':
56
+ return 'lines';
57
+ default:
58
+ return 'table';
59
+ }
60
+ }
61
+ convertToPepRowData(item, dataView, uuidMapping) {
62
+ var _a;
63
+ const row = new PepRowData();
64
+ let itemFields;
65
+ if (this.hasProperty(item, 'fields') && typeof item.fields === 'object') {
66
+ itemFields = item.fields;
67
+ if (item.isEditable === false) {
68
+ row.IsEditable = false;
69
+ }
70
+ if (item.isSelectableForActions === false) {
71
+ row.IsSelectableForActions = false;
72
+ }
73
+ if (item.isEditable && item.isSelectableForActions && item.isSelected) {
74
+ row.IsSelected = true;
75
+ }
76
+ }
77
+ else {
78
+ itemFields = item;
79
+ }
80
+ row.UUID = itemFields[uuidMapping] || undefined;
81
+ row.Fields = [];
82
+ if ((dataView === null || dataView === void 0 ? void 0 : dataView.Fields) && dataView.Columns) {
83
+ for (let index = 0; index < dataView.Fields.length; index++) {
84
+ const field = dataView.Fields[index];
85
+ row.Fields.push({
86
+ ApiName: field.FieldID,
87
+ Title: field.Title ? this._translate.instant(field.Title) : '',
88
+ XAlignment: 1,
89
+ FormattedValue: (itemFields[field.FieldID] || '').toString(),
90
+ Value: (itemFields[field.FieldID] || '').toString(),
91
+ ColumnWidth: ((_a = dataView.Columns[index]) === null || _a === void 0 ? void 0 : _a.Width) || undefined,
92
+ AdditionalValue: '',
93
+ OptionalValues: field.OptionalValues || [],
94
+ FieldType: DataViewFieldTypes[field.Type],
95
+ ReadOnly: field.ReadOnly,
96
+ Enabled: !field.ReadOnly
97
+ });
98
+ }
99
+ }
100
+ return row;
101
+ }
102
+ convertToUiControlField(field) {
103
+ return {
104
+ ApiName: field.ApiName,
105
+ FieldType: field.FieldType,
106
+ Title: field.Title,
107
+ ReadOnly: field.ReadOnlyField,
108
+ ColumnWidth: field.ColumnWidth,
109
+ ColumnWidthType: 1,
110
+ Layout: {
111
+ X: field.Layout.X,
112
+ Y: field.Layout.Y,
113
+ Width: field.Layout.Width,
114
+ Height: field.Layout.Field_Height,
115
+ XAlignment: field.Layout.xAlignment,
116
+ YAlignment: field.Layout.yAlignment,
117
+ }
118
+ };
119
+ }
120
+ convertToSmartFilter(smartFilter) {
121
+ var _a;
122
+ let convertedFields = [];
123
+ let filterData = [];
124
+ if (smartFilter === null || smartFilter === void 0 ? void 0 : smartFilter.dataView) {
125
+ convertedFields = this.createSmartFilterFields(smartFilter.dataView);
126
+ if ((_a = smartFilter.data) === null || _a === void 0 ? void 0 : _a.length) {
127
+ filterData = smartFilter.data;
128
+ }
129
+ }
130
+ return {
131
+ fields: convertedFields,
132
+ data: filterData
133
+ };
134
+ }
135
+ createSmartFilterFields(dataView) {
136
+ let smartFields = [];
137
+ const fields = dataView.Fields.map((field) => {
138
+ return {
139
+ FieldID: field.FieldID,
140
+ FieldType: field.Type,
141
+ Title: field.Title,
142
+ OptionalValues: field.OptionalValues
143
+ };
144
+ });
145
+ const smartFilterfields = this._queryBuilderService.convertToSmartFilterFields(fields);
146
+ if (smartFilterfields === null || smartFilterfields === void 0 ? void 0 : smartFilterfields.length) {
147
+ smartFields = smartFilterfields.map((field => field.smart));
148
+ }
149
+ return smartFields;
150
+ }
151
+ getSelectedItems(items) {
152
+ let selectedItems = [];
153
+ for (let i = 0; i < items.length; i++) {
154
+ if (items[i].IsSelected) {
155
+ selectedItems.push(items[i].UID);
156
+ }
157
+ }
158
+ return selectedItems;
159
+ }
160
+ }
161
+ PepGenericListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListService, deps: [{ token: i1.TranslateService }, { token: i2.PepQueryBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
162
+ PepGenericListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListService });
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListService, decorators: [{
164
+ type: Injectable
165
165
  }], ctorParameters: function () { return [{ type: i1.TranslateService }, { type: i2.PepQueryBuilderService }]; } });
166
166
 
167
- class GenericListComponent {
168
- constructor(_dataConvertorService, _layoutService, _loaderService, _translate, _genericListService) {
169
- this._dataConvertorService = _dataConvertorService;
170
- this._layoutService = _layoutService;
171
- this._loaderService = _loaderService;
172
- this._translate = _translate;
173
- this._genericListService = _genericListService;
174
- this._dataSource = {
175
- init: (params) => __awaiter(this, void 0, void 0, function* () {
176
- return {
177
- dataView: {
178
- Type: 'Grid'
179
- },
180
- totalCount: -1,
181
- items: []
182
- };
183
- })
184
- };
185
- this.actions = {
186
- get: (data) => __awaiter(this, void 0, void 0, function* () {
187
- return [];
188
- })
189
- };
190
- this.uuidMapping = 'key';
191
- this.disabled = false;
192
- this.addPadding = false;
193
- this.title = '';
194
- this.description = '';
195
- this.inline = false;
196
- this.showSearch = false;
197
- this.noDataFoundMsg = '';
198
- this.selectionType = 'multi';
199
- this.supportSorting = false;
200
- this.pager = {
201
- type: 'scroll'
202
- };
203
- this.tableViewType = 'regular';
204
- this.zebraStripes = false;
205
- this.showTopBar = false;
206
- this.breadCrumbsItems = new Array();
207
- this.fieldClick = new EventEmitter();
208
- this.valueChange = new EventEmitter();
209
- this.breadCrumbItemClick = new EventEmitter();
210
- this._resize$ = new Subscription();
211
- this._loader$ = new Subscription();
212
- this._dataView = {
213
- Type: 'Grid'
214
- };
215
- this.onLoad = true;
216
- this.totalRowCount = -1;
217
- this.searchString = '';
218
- this.showSmartFilter = false;
219
- this.showEmptyState = false;
220
- this.internalSmartFilter = {
221
- fields: [],
222
- data: []
223
- };
224
- this._appliedFilters = [];
225
- this._sorting = undefined;
226
- this.menuHandlers = {};
227
- this.menuActions = [];
228
- this._resize$ = this._layoutService.onResize$.pipe().subscribe((size) => {
229
- //
230
- });
231
- this._loader$ = this._loaderService.onChanged$.subscribe((status) => {
232
- //
233
- });
234
- }
235
- set pepListContainer(val) {
236
- this._pepListContainer = val;
237
- }
238
- set dataSource(val) {
239
- this._dataSource = val;
240
- this._sorting = undefined;
241
- this.initSearch();
242
- this.initList();
243
- }
244
- set smartFilter(val) {
245
- this.internalSmartFilter = this._genericListService.convertToSmartFilter(val);
246
- this.showSmartFilter = this.internalSmartFilter.fields.length > 0;
247
- }
248
- set pepList(val) {
249
- this._pepList = val;
250
- }
251
- get pepList() {
252
- return this._pepList;
253
- }
254
- ngOnInit() {
255
- //
256
- }
257
- initList() {
258
- return __awaiter(this, void 0, void 0, function* () {
259
- this.onLoad = true;
260
- setTimeout(() => __awaiter(this, void 0, void 0, function* () {
261
- var _a, _b;
262
- if (this._dataSource) {
263
- //merge selector inputs with callback inputs
264
- this.loadTableInputs();
265
- let fromIndex = 0;
266
- let toIndex = 0;
267
- if (this.listInputs.pager.type === 'pages') {
268
- fromIndex = this.listInputs.pager.size * this.listInputs.pager.index;
269
- toIndex = fromIndex + (this.listInputs.pager.size || DEFAULT_PAGE_SIZE) - 1;
270
- }
271
- else {
272
- toIndex = 100; //TO DO - get value from - this.customList.getTopItems()
273
- }
274
- const data = yield this.loadData(fromIndex, toIndex);
275
- this.totalRowCount = (data === null || data === void 0 ? void 0 : data.length) || 0;
276
- if (((_b = (_a = this.listInputs) === null || _a === void 0 ? void 0 : _a.emptyState) === null || _b === void 0 ? void 0 : _b.show) === true) {
277
- this.setEmptyState();
278
- }
279
- this.onLoad = false;
280
- //show empty state
281
- if (this.showEmptyState) {
282
- if (!this.listInputs.emptyState.title) {
283
- this.listInputs.emptyState.title = this._translate.instant('GENERIC_LIST.EMPTY_STATE.TITLE');
284
- }
285
- if (!this.listInputs.emptyState.description) {
286
- this.listInputs.emptyState.description = this._translate.instant('GENERIC_LIST.EMPTY_STATE.DESCRIPTION');
287
- }
288
- return;
289
- }
290
- setTimeout(() => __awaiter(this, void 0, void 0, function* () {
291
- var _c, _d;
292
- if (this._pepListContainer) {
293
- if (this._pepListContainer.length > 0) {
294
- this._pepListContainer.remove();
295
- }
296
- const { PepListComponent } = yield import('@pepperi-addons/ngx-lib/list');
297
- const componentRef = this._pepListContainer.createComponent(PepListComponent);
298
- this.pepList = componentRef.instance;
299
- componentRef.instance.viewType = this._genericListService.getListViewType(this._dataView.Type);
300
- componentRef.instance.tableViewType = this.listInputs.tableViewType;
301
- componentRef.instance.zebraStripes = this.listInputs.zebraStripes;
302
- if (this.disabled) {
303
- componentRef.instance.disabled = true;
304
- componentRef.instance.lockItemInnerEvents = true;
305
- }
306
- componentRef.instance.supportSorting = this.listInputs.supportSorting;
307
- componentRef.instance.selectionTypeForActions = this.listInputs.selectionType;
308
- componentRef.instance.showCardSelection = this.listInputs.selectionType !== 'none';
309
- componentRef.instance.pagerType = this.listInputs.pager.type;
310
- if (this.listInputs.pager.type === 'pages') {
311
- componentRef.instance.pageSize = ((_c = this.listInputs.pager) === null || _c === void 0 ? void 0 : _c.size) || DEFAULT_PAGE_SIZE;
312
- componentRef.instance.pageIndex = ((_d = this.listInputs.pager) === null || _d === void 0 ? void 0 : _d.index) || 0;
313
- }
314
- componentRef.instance.noDataFoundMsg = this.listInputs.noDataFoundMsg;
315
- componentRef.instance.fieldClick.subscribe(($event) => {
316
- this.onCustomizeFieldClick($event);
317
- });
318
- componentRef.instance.selectedItemsChange.subscribe(($event) => {
319
- this.onSelectedItemsChanged($event);
320
- });
321
- componentRef.instance.loadItems.subscribe(($event) => {
322
- this.onLoadItems($event);
323
- });
324
- componentRef.instance.loadPage.subscribe(($event) => {
325
- this.onLoadPage($event);
326
- });
327
- componentRef.instance.valueChange.subscribe(($event) => {
328
- this.onValueChanged($event);
329
- });
330
- componentRef.instance.sortingChange.subscribe(($event) => {
331
- this.onSortingChange($event);
332
- });
333
- let convertedList = [];
334
- if (data) {
335
- if (data === null || data === void 0 ? void 0 : data.length) {
336
- convertedList = this._dataConvertorService.convertListData(data);
337
- }
338
- const uiControl = this.getUiControl(DataViewConverter.toUIControlData(this._dataView));
339
- const selectedItems = this._genericListService.getSelectedItems(convertedList);
340
- if (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) {
341
- componentRef.instance.setSelectedIds(selectedItems);
342
- }
343
- componentRef.instance.initListData(uiControl, convertedList.length, convertedList);
344
- }
345
- }
346
- }), 0);
347
- }
348
- }), 0);
349
- });
350
- }
351
- /**
352
- * loads inputs in case they are provided and merge with selector inputs
353
- * @returns merged pep-list inputs
354
- */
355
- loadTableInputs() {
356
- this.listInputs = {
357
- supportSorting: this.supportSorting,
358
- selectionType: this.selectionType,
359
- pager: this.pager,
360
- noDataFoundMsg: this.noDataFoundMsg,
361
- tableViewType: this.tableViewType,
362
- zebraStripes: this.zebraStripes,
363
- emptyState: this.emptyState
364
- };
365
- if (this._dataSource.inputs) {
366
- Object.entries(this._dataSource.inputs).forEach((item) => {
367
- if (this._genericListService.hasProperty(this.listInputs, item[0])) {
368
- this.listInputs[item[0]] = item[1];
369
- }
370
- });
371
- }
372
- }
373
- /**
374
- * detemines whether empty state is to be displayed
375
- */
376
- setEmptyState() {
377
- this.showEmptyState = this.totalRowCount === 0 &&
378
- this.searchString === '' &&
379
- this._appliedFilters.length === 0;
380
- }
381
- getUiControl(data) {
382
- const uiControl = new UIControl();
383
- uiControl.ControlFields = [];
384
- if (data === null || data === void 0 ? void 0 : data.ControlFields) {
385
- uiControl.ControlFields = data.ControlFields.map((field) => this._genericListService.convertToUiControlField(field));
386
- }
387
- return uiControl;
388
- }
389
- loadMenuItems() {
390
- if (this.listInputs.selectionType !== 'none') {
391
- this.getMenuActions().then(x => this.menuActions = x);
392
- }
393
- }
394
- getMenuActions() {
395
- return __awaiter(this, void 0, void 0, function* () {
396
- const res = [];
397
- const result = this.getMenuObjects();
398
- if (result.success) {
399
- const actions = yield this.actions.get(result.data);
400
- this.menuHandlers = {};
401
- actions === null || actions === void 0 ? void 0 : actions.forEach(item => {
402
- const uuid = PepGuid.newGuid();
403
- this.menuHandlers[uuid] = item.handler;
404
- res.push({
405
- key: uuid,
406
- text: item.title
407
- });
408
- });
409
- }
410
- return res;
411
- });
412
- }
413
- getMenuObjects() {
414
- const menuObjects = {
415
- success: false,
416
- data: new PepSelectionData()
417
- };
418
- if (this.pepList) {
419
- menuObjects.success = true;
420
- menuObjects.data = this.pepList.getSelectedItemsData();
421
- }
422
- return menuObjects;
423
- }
424
- initSearch() {
425
- var _a;
426
- this.searchString = '';
427
- (_a = this.search) === null || _a === void 0 ? void 0 : _a.initSearch();
428
- }
429
- loadData(fromIndex, toIndex) {
430
- var _a;
431
- return __awaiter(this, void 0, void 0, function* () {
432
- this._loaderService.show();
433
- let converedData = [];
434
- const data = yield this._dataSource.init({
435
- searchString: this.searchString || undefined,
436
- filters: this._appliedFilters.length ? this._appliedFilters : undefined,
437
- sorting: this._sorting || undefined,
438
- fromIndex: fromIndex,
439
- toIndex: toIndex
440
- });
441
- this._loaderService.hide();
442
- if (data) {
443
- this._dataView = data.dataView;
444
- if (((_a = data.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && !data.isPepRowData) {
445
- converedData = data.items.map(item => this._genericListService.convertToPepRowData(item, data.dataView, this.uuidMapping));
446
- }
447
- }
448
- return converedData;
449
- });
450
- }
451
- updateDataList(fromIndex, toIndex, pageIndex = undefined) {
452
- return __awaiter(this, void 0, void 0, function* () {
453
- if (this._dataSource.update) {
454
- this._loaderService.show();
455
- let converedData = [];
456
- const dataList = yield this._dataSource.update({
457
- searchString: this.searchString || undefined,
458
- filters: this._appliedFilters.length ? this._appliedFilters : undefined,
459
- sorting: this._sorting || undefined,
460
- fromIndex: fromIndex,
461
- toIndex: toIndex,
462
- pageIndex: pageIndex
463
- });
464
- this._loaderService.hide();
465
- if ((dataList === null || dataList === void 0 ? void 0 : dataList.length) > 0) {
466
- converedData = dataList.map(item => this._genericListService.convertToPepRowData(item, this._dataView, this.uuidMapping));
467
- }
468
- return converedData;
469
- }
470
- else {
471
- return [];
472
- }
473
- });
474
- }
475
- /**
476
- * loads virtual scroll items from api
477
- */
478
- onLoadItems(event) {
479
- return __awaiter(this, void 0, void 0, function* () {
480
- const list = yield this.updateDataList(event.fromIndex, event.toIndex);
481
- const convertedList = this._dataConvertorService.convertListData(list);
482
- const selectedItems = this._genericListService.getSelectedItems(convertedList);
483
- if (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) {
484
- this.pepList.setSelectedIds(selectedItems);
485
- }
486
- this.pepList.updateItems(convertedList, event);
487
- });
488
- }
489
- /**
490
- * loads paging bulk from api
491
- */
492
- onLoadPage(event) {
493
- return __awaiter(this, void 0, void 0, function* () {
494
- const fromIndex = event.pageIndex * event.pageSize;
495
- const toIndex = Math.min(fromIndex + event.pageSize - 1, this.totalRowCount - 1);
496
- const list = yield this.updateDataList(fromIndex, toIndex, event.pageIndex);
497
- const convertedList = this._dataConvertorService.convertListData(list);
498
- const selectedItems = this._genericListService.getSelectedItems(convertedList);
499
- if (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) {
500
- this.pepList.setSelectedIds(selectedItems);
501
- }
502
- this.pepList.updatePage(convertedList, event);
503
- });
504
- }
505
- getItemById(id) {
506
- if (this.pepList) {
507
- return this._pepList.getItemDataByID(id);
508
- }
509
- else {
510
- return null;
511
- }
512
- }
513
- getSelectedItems() {
514
- if (this.pepList) {
515
- return this._pepList.getSelectedItemsData();
516
- }
517
- else {
518
- return null;
519
- }
520
- }
521
- getPageIndex() {
522
- return this.pepList.pageIndex;
523
- }
524
- onActionItemClicked(action) {
525
- const result = this.getMenuObjects();
526
- if (result.success) {
527
- this.menuHandlers[action.source.key](result.data);
528
- }
529
- }
530
- onSearchChanged(event) {
531
- this.searchString = event.value;
532
- this.initList();
533
- }
534
- onSelectedItemsChanged(selectedRowsCount) {
535
- //loading menu items after pep-list selected items are updated
536
- setTimeout(() => {
537
- this.loadMenuItems();
538
- }, 0);
539
- }
540
- onCustomizeFieldClick(fieldClickEvent) {
541
- this.fieldClick.emit(fieldClickEvent);
542
- }
543
- onBreadCrumbItemClick(event) {
544
- this.breadCrumbItemClick.emit(event);
545
- }
546
- onValueChanged(event) {
547
- this.valueChange.emit(event);
548
- }
549
- onSortingChange(event) {
550
- this._sorting = event;
551
- this.initList();
552
- }
553
- onFiltersChange(filters) {
554
- this._appliedFilters = filters;
555
- this.initList();
556
- }
557
- ngOnDestroy() {
558
- if (this._resize$) {
559
- this._resize$.unsubscribe();
560
- }
561
- if (this._loader$) {
562
- this._loader$.unsubscribe();
563
- }
564
- }
565
- }
566
- GenericListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: GenericListComponent, deps: [{ token: i1$1.PepDataConvertorService }, { token: i1$1.PepLayoutService }, { token: i1$1.PepLoaderService }, { token: i1.TranslateService }, { token: PepGenericListService }], target: i0.ɵɵFactoryTarget.Component });
567
- GenericListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: GenericListComponent, selector: "pep-generic-list", inputs: { dataSource: "dataSource", actions: "actions", uuidMapping: "uuidMapping", disabled: "disabled", addPadding: "addPadding", title: "title", description: "description", inline: "inline", showSearch: "showSearch", noDataFoundMsg: "noDataFoundMsg", emptyState: "emptyState", selectionType: "selectionType", supportSorting: "supportSorting", pager: "pager", tableViewType: "tableViewType", zebraStripes: "zebraStripes", smartFilter: "smartFilter", showTopBar: "showTopBar", breadCrumbsItems: "breadCrumbsItems" }, outputs: { fieldClick: "fieldClick", valueChange: "valueChange", breadCrumbItemClick: "breadCrumbItemClick" }, providers: [PepGenericListService], viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true }, { propertyName: "pepListContainer", first: true, predicate: ["pepListContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div class=\"header-area\" >\n <div *ngIf=\"showTopBar\" class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"description\">\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\">\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n </div>\n <ng-container *ngIf=\"showSmartFilter\">\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!onLoad\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </ng-container>\n</div>\n<pep-page-layout *ngIf=\"!inline\" class=\"none-inline\" [addPadding]=\"addPadding\" [showShadow]=\"showSmartFilter\">\n <ng-container *ngIf=\"showSmartFilter\" pep-side-area>\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"showTopBar\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"description\" pep-top-area>\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"!onLoad\" pep-main-area class=\"main-area-container\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </div>\n</pep-page-layout>\n\n<ng-template #topBarTemplate>\n <pep-top-bar [title]=\"title\" [inline]=\"inline\">\n <div header-start-content>\n <ng-content select=\"[left-buttons]\"></ng-content>\n </div>\n <div header-end-content>\n <ng-content select=\"[right-buttons]\"></ng-content>\n </div>\n <!-- <div footer-start-content>\n <ng-content select=\"[left-bottom-area]\"></ng-content> \n </div>\n <div footer-end-content>\n <ng-content select=\"[right-bottom-area]\"></ng-content> \n </div> -->\n <pep-list-actions *ngIf=\"menuActions.length > 0\" [sizeType]=\"inline ? 'sm' : 'md'\" [actions]=\"menuActions\"\n (actionClick)=\"onActionItemClicked($event)\"></pep-list-actions>\n <pep-list-total [sizeType]=\"inline ? 'sm' : 'md'\" [totalRows]=\"totalRowCount\">\n </pep-list-total>\n <pep-search #search *ngIf=\"showSearch\" [value]=\"searchString\" [sizeType]=\"inline ? 'sm' : 'md'\"\n (search)=\"onSearchChanged($event)\">\n </pep-search>\n </pep-top-bar>\n</ng-template>\n\n<ng-template #smartFilterTemplate>\n <pep-side-bar #sideNav [ngClass]=\"{'smart-filter-area': inline}\">\n <pep-smart-filters title=\"Test filters\" [fields]=\"internalSmartFilter.fields\"\n [filters]=\"internalSmartFilter.data\" (filtersChange)=\"onFiltersChange($event)\">\n </pep-smart-filters>\n </pep-side-bar>\n</ng-template>\n\n<ng-template #breadCrumbsTemplate>\n <pep-bread-crumbs class=\"bread-crumbs\" [items]=\"breadCrumbsItems\" [addSpacing]=\"true\" [displayType]=\"'items'\"\n (itemClick)=\"onBreadCrumbItemClick($event)\"></pep-bread-crumbs>\n</ng-template>\n\n<ng-template #listTemplate>\n <div *ngIf=\"showEmptyState\" class=\"list-empty-state\">\n <div class=\"list-empty-title\">{{ listInputs.emptyState.title }}</div>\n <div class=\"list-empty-descr\">{{ listInputs.emptyState.description }}</div>\n <pep-icon name=\"leaf_skiny\" class=\"leaf-skiny\"></pep-icon>\n <pep-icon name=\"leaf_round\" class=\"leaf-round\"></pep-icon>\n <!-- <mat-icon class=\"leaf-skiny\">\n <pep-icon name=\"leaf_skiny\"></pep-icon>\n </mat-icon> -->\n <!-- <mat-icon class=\"leaf-round\">\n <pep-icon name=\"leaf_round\"></pep-icon>\n </mat-icon> -->\n </div>\n <div *ngIf=\"!showEmptyState\" class=\"list-container\">\n <ng-container #pepListContainer></ng-container>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:block}.main-area-container{display:grid;height:inherit}.list-container{height:100%}.list-empty-state{height:100%;background:rgb(247,247,247);border-radius:var(--pep-border-radius-md, .25rem);position:relative;overflow:hidden;display:inline-flex!important;align-items:center;justify-content:center;flex-direction:column}.list-empty-state .leaf-skiny{z-index:1;height:52rem;position:absolute;left:-10rem;top:-2rem;pointer-events:none;transform:scale(1.4)}.list-empty-state .leaf-round{z-index:1;height:45rem;position:absolute;right:-13rem;top:-7rem;pointer-events:none;transform:rotate(45deg) scale(1)}.list-empty-state .list-empty-title{font-family:var(--pep-font-family-title, Nexa),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-weight:var(--pep-font-weight-bold, 600);font-size:var(--pep-font-size-2xl, 1.5rem)!important;line-height:var(--pep-line-height-2xl, 2.25rem)!important;z-index:50;padding-inline:var(--pep-spacing-lg, 1rem)}.list-empty-state .list-empty-descr{font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.5rem)!important;z-index:50;padding-inline:var(--pep-spacing-lg, 1rem)}@media (max-width: 1279px){.list-empty-state .leaf-skiny{top:-5rem;left:-11rem;transform:scale(1.1)}.list-empty-state .leaf-round{right:-12rem;top:-7rem;transform:rotate(45deg) scale(.9)}}@media (max-width: 959px){.list-empty-state .leaf-round{display:none}.list-empty-state .list-empty-title,.list-empty-state .list-empty-descr{padding-inline:var(--pep-spacing-md, .75rem)}}.inline-container{height:inherit;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto 1fr}.inline-container.add-padding{padding-inline:var(--pep-spacing-lg, 1rem)}.inline-container .header-area{grid-column:2/3;grid-row:1/2}.inline-container .smart-filter-area{grid-column:1/2;grid-row:1/3}.inline-container .list-container{grid-column:2/3;grid-row:2/3}.inline-container .list-description{font-size:var(--pep-font-size-xs, .75rem);max-width:640px;padding:var(--pep-spacing-sm, .5rem) 0}.inline-container .bread-crumbs{padding:var(--pep-spacing-md, .75rem) 0 var(--pep-spacing-sm, .5rem) 0}.none-inline .list-description{font-size:var(--pep-font-size-sm, .875rem);max-width:720px;padding:var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.none-inline .bread-crumbs{padding:var(--pep-spacing-md, .75rem) var(--pep-spacing-xs, .25rem) var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.noDataFoundMsg{margin:1rem 0;height:calc(100% - 2rem);width:100%;background:hsla(0deg,0%,10%,.12);display:flex;justify-content:center;align-items:center}\n", ".list-empty-state ::ng-deep .svg-icon{fill:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.04)}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.PepListActionsComponent, selector: "pep-list-actions", inputs: ["actions", "sizeType", "xPosition", "hidden"], outputs: ["actionClick", "stateChange", "menuClick"] }, { kind: "component", type: i5.PepListTotalComponent, selector: "pep-list-total", inputs: ["totalRows", "totalAmount", "isMapView", "sizeType"] }, { kind: "component", type: i6.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { kind: "component", type: i7.PepTopBarComponent, selector: "pep-top-bar", inputs: ["inline", "title"], outputs: ["footerStateChange"] }, { kind: "component", type: i8.PepSideBarComponent, selector: "pep-side-bar", inputs: ["position", "ignoreResize", "showHeader", "showFooter", "showToggle", "useAsWebComponent"], outputs: ["stateChange"] }, { kind: "component", type: i9.PepSearchComponent, selector: "pep-search", inputs: ["triggerOn", "autoCompleteTop", "autoCompleteValues", "shrink", "value", "searchControl", "useAsWebComponent", "sizeType"], outputs: ["search", "autocompleteChange", "stateChange"] }, { kind: "component", type: i10.PepBreadCrumbsComponent, selector: "pep-bread-crumbs", inputs: ["items", "displayType", "addSpacing"], outputs: ["itemClick"] }, { kind: "component", type: i1$2.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i12.PepSmartFiltersComponent, selector: "pep-smart-filters", inputs: ["title", "filters", "fields", "useAsWebComponent"], outputs: ["filtersChange", "fieldToggleChange"] }] });
568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: GenericListComponent, decorators: [{
569
- type: Component,
570
- args: [{ selector: 'pep-generic-list', providers: [PepGenericListService], template: "<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div class=\"header-area\" >\n <div *ngIf=\"showTopBar\" class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"description\">\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\">\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n </div>\n <ng-container *ngIf=\"showSmartFilter\">\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!onLoad\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </ng-container>\n</div>\n<pep-page-layout *ngIf=\"!inline\" class=\"none-inline\" [addPadding]=\"addPadding\" [showShadow]=\"showSmartFilter\">\n <ng-container *ngIf=\"showSmartFilter\" pep-side-area>\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"showTopBar\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"description\" pep-top-area>\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"!onLoad\" pep-main-area class=\"main-area-container\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </div>\n</pep-page-layout>\n\n<ng-template #topBarTemplate>\n <pep-top-bar [title]=\"title\" [inline]=\"inline\">\n <div header-start-content>\n <ng-content select=\"[left-buttons]\"></ng-content>\n </div>\n <div header-end-content>\n <ng-content select=\"[right-buttons]\"></ng-content>\n </div>\n <!-- <div footer-start-content>\n <ng-content select=\"[left-bottom-area]\"></ng-content> \n </div>\n <div footer-end-content>\n <ng-content select=\"[right-bottom-area]\"></ng-content> \n </div> -->\n <pep-list-actions *ngIf=\"menuActions.length > 0\" [sizeType]=\"inline ? 'sm' : 'md'\" [actions]=\"menuActions\"\n (actionClick)=\"onActionItemClicked($event)\"></pep-list-actions>\n <pep-list-total [sizeType]=\"inline ? 'sm' : 'md'\" [totalRows]=\"totalRowCount\">\n </pep-list-total>\n <pep-search #search *ngIf=\"showSearch\" [value]=\"searchString\" [sizeType]=\"inline ? 'sm' : 'md'\"\n (search)=\"onSearchChanged($event)\">\n </pep-search>\n </pep-top-bar>\n</ng-template>\n\n<ng-template #smartFilterTemplate>\n <pep-side-bar #sideNav [ngClass]=\"{'smart-filter-area': inline}\">\n <pep-smart-filters title=\"Test filters\" [fields]=\"internalSmartFilter.fields\"\n [filters]=\"internalSmartFilter.data\" (filtersChange)=\"onFiltersChange($event)\">\n </pep-smart-filters>\n </pep-side-bar>\n</ng-template>\n\n<ng-template #breadCrumbsTemplate>\n <pep-bread-crumbs class=\"bread-crumbs\" [items]=\"breadCrumbsItems\" [addSpacing]=\"true\" [displayType]=\"'items'\"\n (itemClick)=\"onBreadCrumbItemClick($event)\"></pep-bread-crumbs>\n</ng-template>\n\n<ng-template #listTemplate>\n <div *ngIf=\"showEmptyState\" class=\"list-empty-state\">\n <div class=\"list-empty-title\">{{ listInputs.emptyState.title }}</div>\n <div class=\"list-empty-descr\">{{ listInputs.emptyState.description }}</div>\n <pep-icon name=\"leaf_skiny\" class=\"leaf-skiny\"></pep-icon>\n <pep-icon name=\"leaf_round\" class=\"leaf-round\"></pep-icon>\n <!-- <mat-icon class=\"leaf-skiny\">\n <pep-icon name=\"leaf_skiny\"></pep-icon>\n </mat-icon> -->\n <!-- <mat-icon class=\"leaf-round\">\n <pep-icon name=\"leaf_round\"></pep-icon>\n </mat-icon> -->\n </div>\n <div *ngIf=\"!showEmptyState\" class=\"list-container\">\n <ng-container #pepListContainer></ng-container>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:block}.main-area-container{display:grid;height:inherit}.list-container{height:100%}.list-empty-state{height:100%;background:rgb(247,247,247);border-radius:var(--pep-border-radius-md, .25rem);position:relative;overflow:hidden;display:inline-flex!important;align-items:center;justify-content:center;flex-direction:column}.list-empty-state .leaf-skiny{z-index:1;height:52rem;position:absolute;left:-10rem;top:-2rem;pointer-events:none;transform:scale(1.4)}.list-empty-state .leaf-round{z-index:1;height:45rem;position:absolute;right:-13rem;top:-7rem;pointer-events:none;transform:rotate(45deg) scale(1)}.list-empty-state .list-empty-title{font-family:var(--pep-font-family-title, Nexa),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-weight:var(--pep-font-weight-bold, 600);font-size:var(--pep-font-size-2xl, 1.5rem)!important;line-height:var(--pep-line-height-2xl, 2.25rem)!important;z-index:50;padding-inline:var(--pep-spacing-lg, 1rem)}.list-empty-state .list-empty-descr{font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.5rem)!important;z-index:50;padding-inline:var(--pep-spacing-lg, 1rem)}@media (max-width: 1279px){.list-empty-state .leaf-skiny{top:-5rem;left:-11rem;transform:scale(1.1)}.list-empty-state .leaf-round{right:-12rem;top:-7rem;transform:rotate(45deg) scale(.9)}}@media (max-width: 959px){.list-empty-state .leaf-round{display:none}.list-empty-state .list-empty-title,.list-empty-state .list-empty-descr{padding-inline:var(--pep-spacing-md, .75rem)}}.inline-container{height:inherit;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto 1fr}.inline-container.add-padding{padding-inline:var(--pep-spacing-lg, 1rem)}.inline-container .header-area{grid-column:2/3;grid-row:1/2}.inline-container .smart-filter-area{grid-column:1/2;grid-row:1/3}.inline-container .list-container{grid-column:2/3;grid-row:2/3}.inline-container .list-description{font-size:var(--pep-font-size-xs, .75rem);max-width:640px;padding:var(--pep-spacing-sm, .5rem) 0}.inline-container .bread-crumbs{padding:var(--pep-spacing-md, .75rem) 0 var(--pep-spacing-sm, .5rem) 0}.none-inline .list-description{font-size:var(--pep-font-size-sm, .875rem);max-width:720px;padding:var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.none-inline .bread-crumbs{padding:var(--pep-spacing-md, .75rem) var(--pep-spacing-xs, .25rem) var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.noDataFoundMsg{margin:1rem 0;height:calc(100% - 2rem);width:100%;background:hsla(0deg,0%,10%,.12);display:flex;justify-content:center;align-items:center}\n", ".list-empty-state ::ng-deep .svg-icon{fill:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.04)}\n"] }]
571
- }], ctorParameters: function () { return [{ type: i1$1.PepDataConvertorService }, { type: i1$1.PepLayoutService }, { type: i1$1.PepLoaderService }, { type: i1.TranslateService }, { type: PepGenericListService }]; }, propDecorators: { search: [{
572
- type: ViewChild,
573
- args: ['search']
574
- }], pepListContainer: [{
575
- type: ViewChild,
576
- args: ['pepListContainer', { read: ViewContainerRef }]
577
- }], dataSource: [{
578
- type: Input
579
- }], actions: [{
580
- type: Input
581
- }], uuidMapping: [{
582
- type: Input
583
- }], disabled: [{
584
- type: Input
585
- }], addPadding: [{
586
- type: Input
587
- }], title: [{
588
- type: Input
589
- }], description: [{
590
- type: Input
591
- }], inline: [{
592
- type: Input
593
- }], showSearch: [{
594
- type: Input
595
- }], noDataFoundMsg: [{
596
- type: Input
597
- }], emptyState: [{
598
- type: Input
599
- }], selectionType: [{
600
- type: Input
601
- }], supportSorting: [{
602
- type: Input
603
- }], pager: [{
604
- type: Input
605
- }], tableViewType: [{
606
- type: Input
607
- }], zebraStripes: [{
608
- type: Input
609
- }], smartFilter: [{
610
- type: Input
611
- }], showTopBar: [{
612
- type: Input
613
- }], breadCrumbsItems: [{
614
- type: Input
615
- }], fieldClick: [{
616
- type: Output
617
- }], valueChange: [{
618
- type: Output
619
- }], breadCrumbItemClick: [{
620
- type: Output
167
+ class GenericListComponent {
168
+ constructor(_dataConvertorService, _layoutService, _loaderService, _translate, _genericListService) {
169
+ this._dataConvertorService = _dataConvertorService;
170
+ this._layoutService = _layoutService;
171
+ this._loaderService = _loaderService;
172
+ this._translate = _translate;
173
+ this._genericListService = _genericListService;
174
+ this._dataSource = {
175
+ init: (params) => __awaiter(this, void 0, void 0, function* () {
176
+ return {
177
+ dataView: {
178
+ Type: 'Grid'
179
+ },
180
+ totalCount: -1,
181
+ items: []
182
+ };
183
+ })
184
+ };
185
+ this.actions = {
186
+ get: (data) => __awaiter(this, void 0, void 0, function* () {
187
+ return [];
188
+ })
189
+ };
190
+ this.uuidMapping = 'key';
191
+ this.disabled = false;
192
+ this.addPadding = false;
193
+ this.title = '';
194
+ this.description = '';
195
+ this.inline = false;
196
+ this.showSearch = false;
197
+ this.noDataFoundMsg = '';
198
+ this.selectionType = 'multi';
199
+ this.supportSorting = false;
200
+ this.pager = {
201
+ type: 'scroll'
202
+ };
203
+ this.tableViewType = 'regular';
204
+ this.zebraStripes = false;
205
+ this.showTopBar = false;
206
+ this.breadCrumbsItems = new Array();
207
+ this.fieldClick = new EventEmitter();
208
+ this.valueChange = new EventEmitter();
209
+ this.breadCrumbItemClick = new EventEmitter();
210
+ this._resize$ = new Subscription();
211
+ this._loader$ = new Subscription();
212
+ this._dataView = {
213
+ Type: 'Grid'
214
+ };
215
+ this.onLoad = true;
216
+ this.totalRowCount = -1;
217
+ this.searchString = '';
218
+ this.showSmartFilter = false;
219
+ this.showEmptyState = false;
220
+ this.internalSmartFilter = {
221
+ fields: [],
222
+ data: []
223
+ };
224
+ this._appliedFilters = [];
225
+ this._sorting = undefined;
226
+ this.menuHandlers = {};
227
+ this.menuActions = [];
228
+ this._resize$ = this._layoutService.onResize$.pipe().subscribe((size) => {
229
+ //
230
+ });
231
+ this._loader$ = this._loaderService.onChanged$.subscribe((status) => {
232
+ //
233
+ });
234
+ }
235
+ set pepListContainer(val) {
236
+ this._pepListContainer = val;
237
+ }
238
+ set dataSource(val) {
239
+ this._dataSource = val;
240
+ this._sorting = undefined;
241
+ this.initSearch();
242
+ this.initList();
243
+ }
244
+ set smartFilter(val) {
245
+ this.internalSmartFilter = this._genericListService.convertToSmartFilter(val);
246
+ this.showSmartFilter = this.internalSmartFilter.fields.length > 0;
247
+ }
248
+ set pepList(val) {
249
+ this._pepList = val;
250
+ }
251
+ get pepList() {
252
+ return this._pepList;
253
+ }
254
+ ngOnInit() {
255
+ //
256
+ }
257
+ initList() {
258
+ return __awaiter(this, void 0, void 0, function* () {
259
+ this.onLoad = true;
260
+ setTimeout(() => __awaiter(this, void 0, void 0, function* () {
261
+ var _a, _b;
262
+ if (this._dataSource) {
263
+ //merge selector inputs with callback inputs
264
+ this.loadTableInputs();
265
+ let fromIndex = 0;
266
+ let toIndex = 0;
267
+ if (this.listInputs.pager.type === 'pages') {
268
+ fromIndex = this.listInputs.pager.size * this.listInputs.pager.index;
269
+ toIndex = fromIndex + (this.listInputs.pager.size || DEFAULT_PAGE_SIZE) - 1;
270
+ }
271
+ else {
272
+ toIndex = 100; //TO DO - get value from - this.customList.getTopItems()
273
+ }
274
+ const data = yield this.loadData(fromIndex, toIndex);
275
+ this.totalRowCount = (data === null || data === void 0 ? void 0 : data.length) || 0;
276
+ if (((_b = (_a = this.listInputs) === null || _a === void 0 ? void 0 : _a.emptyState) === null || _b === void 0 ? void 0 : _b.show) === true) {
277
+ this.setEmptyState();
278
+ }
279
+ this.onLoad = false;
280
+ //show empty state
281
+ if (this.showEmptyState) {
282
+ if (!this.listInputs.emptyState.title) {
283
+ this.listInputs.emptyState.title = this._translate.instant('GENERIC_LIST.EMPTY_STATE.TITLE');
284
+ }
285
+ if (!this.listInputs.emptyState.description) {
286
+ this.listInputs.emptyState.description = this._translate.instant('GENERIC_LIST.EMPTY_STATE.DESCRIPTION');
287
+ }
288
+ return;
289
+ }
290
+ setTimeout(() => __awaiter(this, void 0, void 0, function* () {
291
+ var _c, _d;
292
+ if (this._pepListContainer) {
293
+ if (this._pepListContainer.length > 0) {
294
+ this._pepListContainer.remove();
295
+ }
296
+ const { PepListComponent } = yield import('@pepperi-addons/ngx-lib/list');
297
+ const componentRef = this._pepListContainer.createComponent(PepListComponent);
298
+ this.pepList = componentRef.instance;
299
+ componentRef.instance.viewType = this._genericListService.getListViewType(this._dataView.Type);
300
+ componentRef.instance.tableViewType = this.listInputs.tableViewType;
301
+ componentRef.instance.zebraStripes = this.listInputs.zebraStripes;
302
+ if (this.disabled) {
303
+ componentRef.instance.disabled = true;
304
+ componentRef.instance.lockItemInnerEvents = true;
305
+ }
306
+ componentRef.instance.supportSorting = this.listInputs.supportSorting;
307
+ componentRef.instance.selectionTypeForActions = this.listInputs.selectionType;
308
+ componentRef.instance.showCardSelection = this.listInputs.selectionType !== 'none';
309
+ componentRef.instance.pagerType = this.listInputs.pager.type;
310
+ if (this.listInputs.pager.type === 'pages') {
311
+ componentRef.instance.pageSize = ((_c = this.listInputs.pager) === null || _c === void 0 ? void 0 : _c.size) || DEFAULT_PAGE_SIZE;
312
+ componentRef.instance.pageIndex = ((_d = this.listInputs.pager) === null || _d === void 0 ? void 0 : _d.index) || 0;
313
+ }
314
+ componentRef.instance.noDataFoundMsg = this.listInputs.noDataFoundMsg;
315
+ componentRef.instance.fieldClick.subscribe(($event) => {
316
+ this.onCustomizeFieldClick($event);
317
+ });
318
+ componentRef.instance.selectedItemsChange.subscribe(($event) => {
319
+ this.onSelectedItemsChanged($event);
320
+ });
321
+ componentRef.instance.loadItems.subscribe(($event) => {
322
+ this.onLoadItems($event);
323
+ });
324
+ componentRef.instance.loadPage.subscribe(($event) => {
325
+ this.onLoadPage($event);
326
+ });
327
+ componentRef.instance.valueChange.subscribe(($event) => {
328
+ this.onValueChanged($event);
329
+ });
330
+ componentRef.instance.sortingChange.subscribe(($event) => {
331
+ this.onSortingChange($event);
332
+ });
333
+ let convertedList = [];
334
+ if (data) {
335
+ if (data === null || data === void 0 ? void 0 : data.length) {
336
+ convertedList = this._dataConvertorService.convertListData(data);
337
+ }
338
+ const uiControl = this.getUiControl(DataViewConverter.toUIControlData(this._dataView));
339
+ const selectedItems = this._genericListService.getSelectedItems(convertedList);
340
+ if (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) {
341
+ componentRef.instance.setSelectedIds(selectedItems);
342
+ }
343
+ componentRef.instance.initListData(uiControl, convertedList.length, convertedList);
344
+ }
345
+ }
346
+ }), 0);
347
+ }
348
+ }), 0);
349
+ });
350
+ }
351
+ /**
352
+ * loads inputs in case they are provided and merge with selector inputs
353
+ * @returns merged pep-list inputs
354
+ */
355
+ loadTableInputs() {
356
+ this.listInputs = {
357
+ supportSorting: this.supportSorting,
358
+ selectionType: this.selectionType,
359
+ pager: this.pager,
360
+ noDataFoundMsg: this.noDataFoundMsg,
361
+ tableViewType: this.tableViewType,
362
+ zebraStripes: this.zebraStripes,
363
+ emptyState: this.emptyState
364
+ };
365
+ if (this._dataSource.inputs) {
366
+ Object.entries(this._dataSource.inputs).forEach((item) => {
367
+ if (this._genericListService.hasProperty(this.listInputs, item[0])) {
368
+ this.listInputs[item[0]] = item[1];
369
+ }
370
+ });
371
+ }
372
+ }
373
+ /**
374
+ * detemines whether empty state is to be displayed
375
+ */
376
+ setEmptyState() {
377
+ this.showEmptyState = this.totalRowCount === 0 &&
378
+ this.searchString === '' &&
379
+ this._appliedFilters.length === 0;
380
+ }
381
+ getUiControl(data) {
382
+ const uiControl = new UIControl();
383
+ uiControl.ControlFields = [];
384
+ if (data === null || data === void 0 ? void 0 : data.ControlFields) {
385
+ uiControl.ControlFields = data.ControlFields.map((field) => this._genericListService.convertToUiControlField(field));
386
+ }
387
+ return uiControl;
388
+ }
389
+ loadMenuItems() {
390
+ if (this.listInputs.selectionType !== 'none') {
391
+ this.getMenuActions().then(x => this.menuActions = x);
392
+ }
393
+ }
394
+ getMenuActions() {
395
+ return __awaiter(this, void 0, void 0, function* () {
396
+ const res = [];
397
+ const result = this.getMenuObjects();
398
+ if (result.success) {
399
+ const actions = yield this.actions.get(result.data);
400
+ this.menuHandlers = {};
401
+ actions === null || actions === void 0 ? void 0 : actions.forEach(item => {
402
+ const uuid = PepGuid.newGuid();
403
+ this.menuHandlers[uuid] = item.handler;
404
+ res.push({
405
+ key: uuid,
406
+ text: item.title
407
+ });
408
+ });
409
+ }
410
+ return res;
411
+ });
412
+ }
413
+ getMenuObjects() {
414
+ const menuObjects = {
415
+ success: false,
416
+ data: new PepSelectionData()
417
+ };
418
+ if (this.pepList) {
419
+ menuObjects.success = true;
420
+ menuObjects.data = this.pepList.getSelectedItemsData();
421
+ }
422
+ return menuObjects;
423
+ }
424
+ initSearch() {
425
+ var _a;
426
+ this.searchString = '';
427
+ (_a = this.search) === null || _a === void 0 ? void 0 : _a.initSearch();
428
+ }
429
+ loadData(fromIndex, toIndex) {
430
+ var _a;
431
+ return __awaiter(this, void 0, void 0, function* () {
432
+ this._loaderService.show();
433
+ let converedData = [];
434
+ const data = yield this._dataSource.init({
435
+ searchString: this.searchString || undefined,
436
+ filters: this._appliedFilters.length ? this._appliedFilters : undefined,
437
+ sorting: this._sorting || undefined,
438
+ fromIndex: fromIndex,
439
+ toIndex: toIndex
440
+ });
441
+ this._loaderService.hide();
442
+ if (data) {
443
+ this._dataView = data.dataView;
444
+ if (((_a = data.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && !data.isPepRowData) {
445
+ converedData = data.items.map(item => this._genericListService.convertToPepRowData(item, data.dataView, this.uuidMapping));
446
+ }
447
+ }
448
+ return converedData;
449
+ });
450
+ }
451
+ updateDataList(fromIndex, toIndex, pageIndex = undefined) {
452
+ return __awaiter(this, void 0, void 0, function* () {
453
+ if (this._dataSource.update) {
454
+ this._loaderService.show();
455
+ let converedData = [];
456
+ const dataList = yield this._dataSource.update({
457
+ searchString: this.searchString || undefined,
458
+ filters: this._appliedFilters.length ? this._appliedFilters : undefined,
459
+ sorting: this._sorting || undefined,
460
+ fromIndex: fromIndex,
461
+ toIndex: toIndex,
462
+ pageIndex: pageIndex
463
+ });
464
+ this._loaderService.hide();
465
+ if ((dataList === null || dataList === void 0 ? void 0 : dataList.length) > 0) {
466
+ converedData = dataList.map(item => this._genericListService.convertToPepRowData(item, this._dataView, this.uuidMapping));
467
+ }
468
+ return converedData;
469
+ }
470
+ else {
471
+ return [];
472
+ }
473
+ });
474
+ }
475
+ /**
476
+ * loads virtual scroll items from api
477
+ */
478
+ onLoadItems(event) {
479
+ return __awaiter(this, void 0, void 0, function* () {
480
+ const list = yield this.updateDataList(event.fromIndex, event.toIndex);
481
+ const convertedList = this._dataConvertorService.convertListData(list);
482
+ const selectedItems = this._genericListService.getSelectedItems(convertedList);
483
+ if (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) {
484
+ this.pepList.setSelectedIds(selectedItems);
485
+ }
486
+ this.pepList.updateItems(convertedList, event);
487
+ });
488
+ }
489
+ /**
490
+ * loads paging bulk from api
491
+ */
492
+ onLoadPage(event) {
493
+ return __awaiter(this, void 0, void 0, function* () {
494
+ const fromIndex = event.pageIndex * event.pageSize;
495
+ const toIndex = Math.min(fromIndex + event.pageSize - 1, this.totalRowCount - 1);
496
+ const list = yield this.updateDataList(fromIndex, toIndex, event.pageIndex);
497
+ const convertedList = this._dataConvertorService.convertListData(list);
498
+ const selectedItems = this._genericListService.getSelectedItems(convertedList);
499
+ if (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) {
500
+ this.pepList.setSelectedIds(selectedItems);
501
+ }
502
+ this.pepList.updatePage(convertedList, event);
503
+ });
504
+ }
505
+ getItemById(id) {
506
+ if (this.pepList) {
507
+ return this._pepList.getItemDataByID(id);
508
+ }
509
+ else {
510
+ return null;
511
+ }
512
+ }
513
+ getSelectedItems() {
514
+ if (this.pepList) {
515
+ return this._pepList.getSelectedItemsData();
516
+ }
517
+ else {
518
+ return null;
519
+ }
520
+ }
521
+ getPageIndex() {
522
+ return this.pepList.pageIndex;
523
+ }
524
+ onActionItemClicked(action) {
525
+ const result = this.getMenuObjects();
526
+ if (result.success) {
527
+ this.menuHandlers[action.source.key](result.data);
528
+ }
529
+ }
530
+ onSearchChanged(event) {
531
+ this.searchString = event.value;
532
+ this.initList();
533
+ }
534
+ onSelectedItemsChanged(selectedRowsCount) {
535
+ //loading menu items after pep-list selected items are updated
536
+ setTimeout(() => {
537
+ this.loadMenuItems();
538
+ }, 0);
539
+ }
540
+ onCustomizeFieldClick(fieldClickEvent) {
541
+ this.fieldClick.emit(fieldClickEvent);
542
+ }
543
+ onBreadCrumbItemClick(event) {
544
+ this.breadCrumbItemClick.emit(event);
545
+ }
546
+ onValueChanged(event) {
547
+ this.valueChange.emit(event);
548
+ }
549
+ onSortingChange(event) {
550
+ this._sorting = event;
551
+ this.initList();
552
+ }
553
+ onFiltersChange(filters) {
554
+ this._appliedFilters = filters;
555
+ this.initList();
556
+ }
557
+ ngOnDestroy() {
558
+ if (this._resize$) {
559
+ this._resize$.unsubscribe();
560
+ }
561
+ if (this._loader$) {
562
+ this._loader$.unsubscribe();
563
+ }
564
+ }
565
+ }
566
+ GenericListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: GenericListComponent, deps: [{ token: i1$1.PepDataConvertorService }, { token: i1$1.PepLayoutService }, { token: i1$1.PepLoaderService }, { token: i1.TranslateService }, { token: PepGenericListService }], target: i0.ɵɵFactoryTarget.Component });
567
+ GenericListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: GenericListComponent, selector: "pep-generic-list", inputs: { dataSource: "dataSource", actions: "actions", uuidMapping: "uuidMapping", disabled: "disabled", addPadding: "addPadding", title: "title", description: "description", inline: "inline", showSearch: "showSearch", noDataFoundMsg: "noDataFoundMsg", emptyState: "emptyState", selectionType: "selectionType", supportSorting: "supportSorting", pager: "pager", tableViewType: "tableViewType", zebraStripes: "zebraStripes", smartFilter: "smartFilter", showTopBar: "showTopBar", breadCrumbsItems: "breadCrumbsItems" }, outputs: { fieldClick: "fieldClick", valueChange: "valueChange", breadCrumbItemClick: "breadCrumbItemClick" }, providers: [PepGenericListService], viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true }, { propertyName: "pepListContainer", first: true, predicate: ["pepListContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div class=\"header-area\" >\n <div *ngIf=\"showTopBar\" class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"description\">\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\">\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n </div>\n <ng-container *ngIf=\"showSmartFilter\">\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!onLoad\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </ng-container>\n</div>\n<pep-page-layout *ngIf=\"!inline\" class=\"none-inline\" [addPadding]=\"addPadding\" [showShadow]=\"showSmartFilter\">\n <ng-container *ngIf=\"showSmartFilter\" pep-side-area>\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"showTopBar\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"description\" pep-top-area>\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"!onLoad\" pep-main-area class=\"main-area-container\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </div>\n</pep-page-layout>\n\n<ng-template #topBarTemplate>\n <pep-top-bar [title]=\"title\" [inline]=\"inline\">\n <div header-start-content>\n <ng-content select=\"[left-buttons]\"></ng-content>\n </div>\n <div header-end-content>\n <ng-content select=\"[right-buttons]\"></ng-content>\n </div>\n <!-- <div footer-start-content>\n <ng-content select=\"[left-bottom-area]\"></ng-content> \n </div>\n <div footer-end-content>\n <ng-content select=\"[right-bottom-area]\"></ng-content> \n </div> -->\n <pep-list-actions *ngIf=\"menuActions.length > 0\" [sizeType]=\"inline ? 'sm' : 'md'\" [actions]=\"menuActions\"\n (actionClick)=\"onActionItemClicked($event)\"></pep-list-actions>\n <pep-list-total [sizeType]=\"inline ? 'sm' : 'md'\" [totalRows]=\"totalRowCount\">\n </pep-list-total>\n <pep-search #search *ngIf=\"showSearch\" [value]=\"searchString\" [sizeType]=\"inline ? 'sm' : 'md'\"\n (search)=\"onSearchChanged($event)\">\n </pep-search>\n </pep-top-bar>\n</ng-template>\n\n<ng-template #smartFilterTemplate>\n <pep-side-bar #sideNav [ngClass]=\"{'smart-filter-area': inline}\">\n <pep-smart-filters title=\"Test filters\" [fields]=\"internalSmartFilter.fields\"\n [filters]=\"internalSmartFilter.data\" (filtersChange)=\"onFiltersChange($event)\">\n </pep-smart-filters>\n </pep-side-bar>\n</ng-template>\n\n<ng-template #breadCrumbsTemplate>\n <pep-bread-crumbs class=\"bread-crumbs\" [items]=\"breadCrumbsItems\" [addSpacing]=\"true\" [displayType]=\"'items'\"\n (itemClick)=\"onBreadCrumbItemClick($event)\"></pep-bread-crumbs>\n</ng-template>\n\n<ng-template #listTemplate>\n <div *ngIf=\"showEmptyState\" class=\"list-empty-state\">\n <div class=\"list-empty-title\">{{ listInputs.emptyState.title }}</div>\n <div class=\"list-empty-descr\">{{ listInputs.emptyState.description }}</div>\n <pep-icon name=\"leaf_skiny\" class=\"leaf-skiny\"></pep-icon>\n <pep-icon name=\"leaf_round\" class=\"leaf-round\"></pep-icon>\n <!-- <mat-icon class=\"leaf-skiny\">\n <pep-icon name=\"leaf_skiny\"></pep-icon>\n </mat-icon> -->\n <!-- <mat-icon class=\"leaf-round\">\n <pep-icon name=\"leaf_round\"></pep-icon>\n </mat-icon> -->\n </div>\n <div *ngIf=\"!showEmptyState\" class=\"list-container\">\n <ng-container #pepListContainer></ng-container>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:block}.main-area-container{display:grid;height:inherit}.list-container{height:100%}.list-empty-state{height:100%;background:rgb(247,247,247);border-radius:var(--pep-border-radius-md, .25rem);position:relative;overflow:hidden;display:inline-flex!important;align-items:center;justify-content:center;flex-direction:column}.list-empty-state .leaf-skiny{z-index:1;height:52rem;position:absolute;left:-10rem;top:-2rem;pointer-events:none;transform:scale(1.4)}.list-empty-state .leaf-round{z-index:1;height:45rem;position:absolute;right:-13rem;top:-7rem;pointer-events:none;transform:rotate(45deg) scale(1)}.list-empty-state .list-empty-title{font-family:var(--pep-font-family-title, Nexa),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-weight:var(--pep-font-weight-bold, 600);font-size:var(--pep-font-size-2xl, 1.5rem)!important;line-height:var(--pep-line-height-2xl, 2.25rem)!important;z-index:50;padding-inline:var(--pep-spacing-lg, 1rem)}.list-empty-state .list-empty-descr{font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.5rem)!important;z-index:50;padding-inline:var(--pep-spacing-lg, 1rem)}@media (max-width: 1279px){.list-empty-state .leaf-skiny{top:-5rem;left:-11rem;transform:scale(1.1)}.list-empty-state .leaf-round{right:-12rem;top:-7rem;transform:rotate(45deg) scale(.9)}}@media (max-width: 959px){.list-empty-state .leaf-round{display:none}.list-empty-state .list-empty-title,.list-empty-state .list-empty-descr{padding-inline:var(--pep-spacing-md, .75rem)}}.inline-container{height:inherit;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto 1fr}.inline-container.add-padding{padding-inline:var(--pep-spacing-lg, 1rem)}.inline-container .header-area{grid-column:2/3;grid-row:1/2}.inline-container .smart-filter-area{grid-column:1/2;grid-row:1/3}.inline-container .list-container{grid-column:2/3;grid-row:2/3}.inline-container .list-description{font-size:var(--pep-font-size-xs, .75rem);max-width:640px;padding:var(--pep-spacing-sm, .5rem) 0}.inline-container .bread-crumbs{padding:var(--pep-spacing-md, .75rem) 0 var(--pep-spacing-sm, .5rem) 0}.none-inline .list-description{font-size:var(--pep-font-size-sm, .875rem);max-width:720px;padding:var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.none-inline .bread-crumbs{padding:var(--pep-spacing-md, .75rem) var(--pep-spacing-xs, .25rem) var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.noDataFoundMsg{margin:1rem 0;height:calc(100% - 2rem);width:100%;background:hsla(0deg,0%,10%,.12);display:flex;justify-content:center;align-items:center}\n", ".list-empty-state ::ng-deep .svg-icon{fill:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.04)}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.PepListActionsComponent, selector: "pep-list-actions", inputs: ["actions", "sizeType", "xPosition", "hidden"], outputs: ["actionClick", "stateChange", "menuClick"] }, { kind: "component", type: i5.PepListTotalComponent, selector: "pep-list-total", inputs: ["totalRows", "totalAmount", "isMapView", "sizeType"] }, { kind: "component", type: i6.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { kind: "component", type: i7.PepTopBarComponent, selector: "pep-top-bar", inputs: ["inline", "title"], outputs: ["footerStateChange"] }, { kind: "component", type: i8.PepSideBarComponent, selector: "pep-side-bar", inputs: ["position", "ignoreResize", "showHeader", "showFooter", "showToggle", "useAsWebComponent"], outputs: ["stateChange"] }, { kind: "component", type: i9.PepSearchComponent, selector: "pep-search", inputs: ["triggerOn", "autoCompleteTop", "autoCompleteValues", "shrink", "value", "searchControl", "useAsWebComponent", "sizeType"], outputs: ["search", "autocompleteChange", "stateChange"] }, { kind: "component", type: i10.PepBreadCrumbsComponent, selector: "pep-bread-crumbs", inputs: ["items", "displayType", "addSpacing"], outputs: ["itemClick"] }, { kind: "component", type: i1$2.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { kind: "component", type: i12.PepSmartFiltersComponent, selector: "pep-smart-filters", inputs: ["title", "filters", "fields", "useAsWebComponent"], outputs: ["filtersChange", "fieldToggleChange"] }] });
568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: GenericListComponent, decorators: [{
569
+ type: Component,
570
+ args: [{ selector: 'pep-generic-list', providers: [PepGenericListService], template: "<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div class=\"header-area\" >\n <div *ngIf=\"showTopBar\" class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"description\">\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\">\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n </div>\n <ng-container *ngIf=\"showSmartFilter\">\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!onLoad\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </ng-container>\n</div>\n<pep-page-layout *ngIf=\"!inline\" class=\"none-inline\" [addPadding]=\"addPadding\" [showShadow]=\"showSmartFilter\">\n <ng-container *ngIf=\"showSmartFilter\" pep-side-area>\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"showTopBar\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"description\" pep-top-area>\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"!onLoad\" pep-main-area class=\"main-area-container\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </div>\n</pep-page-layout>\n\n<ng-template #topBarTemplate>\n <pep-top-bar [title]=\"title\" [inline]=\"inline\">\n <div header-start-content>\n <ng-content select=\"[left-buttons]\"></ng-content>\n </div>\n <div header-end-content>\n <ng-content select=\"[right-buttons]\"></ng-content>\n </div>\n <!-- <div footer-start-content>\n <ng-content select=\"[left-bottom-area]\"></ng-content> \n </div>\n <div footer-end-content>\n <ng-content select=\"[right-bottom-area]\"></ng-content> \n </div> -->\n <pep-list-actions *ngIf=\"menuActions.length > 0\" [sizeType]=\"inline ? 'sm' : 'md'\" [actions]=\"menuActions\"\n (actionClick)=\"onActionItemClicked($event)\"></pep-list-actions>\n <pep-list-total [sizeType]=\"inline ? 'sm' : 'md'\" [totalRows]=\"totalRowCount\">\n </pep-list-total>\n <pep-search #search *ngIf=\"showSearch\" [value]=\"searchString\" [sizeType]=\"inline ? 'sm' : 'md'\"\n (search)=\"onSearchChanged($event)\">\n </pep-search>\n </pep-top-bar>\n</ng-template>\n\n<ng-template #smartFilterTemplate>\n <pep-side-bar #sideNav [ngClass]=\"{'smart-filter-area': inline}\">\n <pep-smart-filters title=\"Test filters\" [fields]=\"internalSmartFilter.fields\"\n [filters]=\"internalSmartFilter.data\" (filtersChange)=\"onFiltersChange($event)\">\n </pep-smart-filters>\n </pep-side-bar>\n</ng-template>\n\n<ng-template #breadCrumbsTemplate>\n <pep-bread-crumbs class=\"bread-crumbs\" [items]=\"breadCrumbsItems\" [addSpacing]=\"true\" [displayType]=\"'items'\"\n (itemClick)=\"onBreadCrumbItemClick($event)\"></pep-bread-crumbs>\n</ng-template>\n\n<ng-template #listTemplate>\n <div *ngIf=\"showEmptyState\" class=\"list-empty-state\">\n <div class=\"list-empty-title\">{{ listInputs.emptyState.title }}</div>\n <div class=\"list-empty-descr\">{{ listInputs.emptyState.description }}</div>\n <pep-icon name=\"leaf_skiny\" class=\"leaf-skiny\"></pep-icon>\n <pep-icon name=\"leaf_round\" class=\"leaf-round\"></pep-icon>\n <!-- <mat-icon class=\"leaf-skiny\">\n <pep-icon name=\"leaf_skiny\"></pep-icon>\n </mat-icon> -->\n <!-- <mat-icon class=\"leaf-round\">\n <pep-icon name=\"leaf_round\"></pep-icon>\n </mat-icon> -->\n </div>\n <div *ngIf=\"!showEmptyState\" class=\"list-container\">\n <ng-container #pepListContainer></ng-container>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:block}.main-area-container{display:grid;height:inherit}.list-container{height:100%}.list-empty-state{height:100%;background:rgb(247,247,247);border-radius:var(--pep-border-radius-md, .25rem);position:relative;overflow:hidden;display:inline-flex!important;align-items:center;justify-content:center;flex-direction:column}.list-empty-state .leaf-skiny{z-index:1;height:52rem;position:absolute;left:-10rem;top:-2rem;pointer-events:none;transform:scale(1.4)}.list-empty-state .leaf-round{z-index:1;height:45rem;position:absolute;right:-13rem;top:-7rem;pointer-events:none;transform:rotate(45deg) scale(1)}.list-empty-state .list-empty-title{font-family:var(--pep-font-family-title, Nexa),-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;font-weight:var(--pep-font-weight-bold, 600);font-size:var(--pep-font-size-2xl, 1.5rem)!important;line-height:var(--pep-line-height-2xl, 2.25rem)!important;z-index:50;padding-inline:var(--pep-spacing-lg, 1rem)}.list-empty-state .list-empty-descr{font-size:var(--pep-font-size-md, 1rem)!important;line-height:var(--pep-line-height-md, 1.5rem)!important;z-index:50;padding-inline:var(--pep-spacing-lg, 1rem)}@media (max-width: 1279px){.list-empty-state .leaf-skiny{top:-5rem;left:-11rem;transform:scale(1.1)}.list-empty-state .leaf-round{right:-12rem;top:-7rem;transform:rotate(45deg) scale(.9)}}@media (max-width: 959px){.list-empty-state .leaf-round{display:none}.list-empty-state .list-empty-title,.list-empty-state .list-empty-descr{padding-inline:var(--pep-spacing-md, .75rem)}}.inline-container{height:inherit;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto 1fr}.inline-container.add-padding{padding-inline:var(--pep-spacing-lg, 1rem)}.inline-container .header-area{grid-column:2/3;grid-row:1/2}.inline-container .smart-filter-area{grid-column:1/2;grid-row:1/3}.inline-container .list-container{grid-column:2/3;grid-row:2/3}.inline-container .list-description{font-size:var(--pep-font-size-xs, .75rem);max-width:640px;padding:var(--pep-spacing-sm, .5rem) 0}.inline-container .bread-crumbs{padding:var(--pep-spacing-md, .75rem) 0 var(--pep-spacing-sm, .5rem) 0}.none-inline .list-description{font-size:var(--pep-font-size-sm, .875rem);max-width:720px;padding:var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.none-inline .bread-crumbs{padding:var(--pep-spacing-md, .75rem) var(--pep-spacing-xs, .25rem) var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.noDataFoundMsg{margin:1rem 0;height:calc(100% - 2rem);width:100%;background:hsla(0deg,0%,10%,.12);display:flex;justify-content:center;align-items:center}\n", ".list-empty-state ::ng-deep .svg-icon{fill:hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.04)}\n"] }]
571
+ }], ctorParameters: function () { return [{ type: i1$1.PepDataConvertorService }, { type: i1$1.PepLayoutService }, { type: i1$1.PepLoaderService }, { type: i1.TranslateService }, { type: PepGenericListService }]; }, propDecorators: { search: [{
572
+ type: ViewChild,
573
+ args: ['search']
574
+ }], pepListContainer: [{
575
+ type: ViewChild,
576
+ args: ['pepListContainer', { read: ViewContainerRef }]
577
+ }], dataSource: [{
578
+ type: Input
579
+ }], actions: [{
580
+ type: Input
581
+ }], uuidMapping: [{
582
+ type: Input
583
+ }], disabled: [{
584
+ type: Input
585
+ }], addPadding: [{
586
+ type: Input
587
+ }], title: [{
588
+ type: Input
589
+ }], description: [{
590
+ type: Input
591
+ }], inline: [{
592
+ type: Input
593
+ }], showSearch: [{
594
+ type: Input
595
+ }], noDataFoundMsg: [{
596
+ type: Input
597
+ }], emptyState: [{
598
+ type: Input
599
+ }], selectionType: [{
600
+ type: Input
601
+ }], supportSorting: [{
602
+ type: Input
603
+ }], pager: [{
604
+ type: Input
605
+ }], tableViewType: [{
606
+ type: Input
607
+ }], zebraStripes: [{
608
+ type: Input
609
+ }], smartFilter: [{
610
+ type: Input
611
+ }], showTopBar: [{
612
+ type: Input
613
+ }], breadCrumbsItems: [{
614
+ type: Input
615
+ }], fieldClick: [{
616
+ type: Output
617
+ }], valueChange: [{
618
+ type: Output
619
+ }], breadCrumbItemClick: [{
620
+ type: Output
621
621
  }] } });
622
622
 
623
- const pepIcons = [
624
- pepIconLeafRound,
625
- pepIconLeafSkiny, pepIconSystemView
626
- ];
627
- function appInitializerFactory(translate) {
628
- return () => {
629
- translate.setDefaultLang('en');
630
- return firstValueFrom(translate.use('en'));
631
- };
632
- }
633
- class PepGenericListModule {
634
- constructor(pepIconRegistry) {
635
- this.pepIconRegistry = pepIconRegistry;
636
- this.pepIconRegistry.registerIcons(pepIcons);
637
- }
638
- }
639
- PepGenericListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListModule, deps: [{ token: i1$2.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
640
- PepGenericListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListModule, declarations: [GenericListComponent], imports: [CommonModule,
641
- PepNgxLibModule,
642
- MatIconModule,
643
- PepListModule,
644
- PepFormModule,
645
- PepMenuModule,
646
- PepPageLayoutModule,
647
- PepTopBarModule,
648
- PepSideBarModule,
649
- PepSearchModule,
650
- PepBreadCrumbsModule,
651
- PepIconModule,
652
- PepSmartFiltersModule], exports: [GenericListComponent] });
653
- PepGenericListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListModule, providers: [
654
- PepGenericListService,
655
- {
656
- provide: APP_INITIALIZER,
657
- useFactory: appInitializerFactory,
658
- deps: [TranslateService],
659
- multi: true
660
- }
661
- ], imports: [CommonModule,
662
- PepNgxLibModule,
663
- MatIconModule,
664
- PepListModule,
665
- PepFormModule,
666
- PepMenuModule,
667
- PepPageLayoutModule,
668
- PepTopBarModule,
669
- PepSideBarModule,
670
- PepSearchModule,
671
- PepBreadCrumbsModule,
672
- PepIconModule,
673
- PepSmartFiltersModule] });
674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListModule, decorators: [{
675
- type: NgModule,
676
- args: [{
677
- declarations: [
678
- GenericListComponent
679
- ],
680
- imports: [
681
- CommonModule,
682
- PepNgxLibModule,
683
- MatIconModule,
684
- PepListModule,
685
- PepFormModule,
686
- PepMenuModule,
687
- PepPageLayoutModule,
688
- PepTopBarModule,
689
- PepSideBarModule,
690
- PepSearchModule,
691
- PepBreadCrumbsModule,
692
- PepIconModule,
693
- PepSmartFiltersModule
694
- ],
695
- exports: [
696
- GenericListComponent
697
- ],
698
- providers: [
699
- PepGenericListService,
700
- {
701
- provide: APP_INITIALIZER,
702
- useFactory: appInitializerFactory,
703
- deps: [TranslateService],
704
- multi: true
705
- }
706
- ]
707
- }]
623
+ const pepIcons = [
624
+ pepIconLeafRound,
625
+ pepIconLeafSkiny, pepIconSystemView
626
+ ];
627
+ function appInitializerFactory(translate) {
628
+ return () => {
629
+ translate.setDefaultLang('en');
630
+ return firstValueFrom(translate.use('en'));
631
+ };
632
+ }
633
+ class PepGenericListModule {
634
+ constructor(pepIconRegistry) {
635
+ this.pepIconRegistry = pepIconRegistry;
636
+ this.pepIconRegistry.registerIcons(pepIcons);
637
+ }
638
+ }
639
+ PepGenericListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListModule, deps: [{ token: i1$2.PepIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule });
640
+ PepGenericListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListModule, declarations: [GenericListComponent], imports: [CommonModule,
641
+ PepNgxLibModule,
642
+ MatIconModule,
643
+ PepListModule,
644
+ PepFormModule,
645
+ PepMenuModule,
646
+ PepPageLayoutModule,
647
+ PepTopBarModule,
648
+ PepSideBarModule,
649
+ PepSearchModule,
650
+ PepBreadCrumbsModule,
651
+ PepIconModule,
652
+ PepSmartFiltersModule], exports: [GenericListComponent] });
653
+ PepGenericListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListModule, providers: [
654
+ PepGenericListService,
655
+ {
656
+ provide: APP_INITIALIZER,
657
+ useFactory: appInitializerFactory,
658
+ deps: [TranslateService],
659
+ multi: true
660
+ }
661
+ ], imports: [CommonModule,
662
+ PepNgxLibModule,
663
+ MatIconModule,
664
+ PepListModule,
665
+ PepFormModule,
666
+ PepMenuModule,
667
+ PepPageLayoutModule,
668
+ PepTopBarModule,
669
+ PepSideBarModule,
670
+ PepSearchModule,
671
+ PepBreadCrumbsModule,
672
+ PepIconModule,
673
+ PepSmartFiltersModule] });
674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PepGenericListModule, decorators: [{
675
+ type: NgModule,
676
+ args: [{
677
+ declarations: [
678
+ GenericListComponent
679
+ ],
680
+ imports: [
681
+ CommonModule,
682
+ PepNgxLibModule,
683
+ MatIconModule,
684
+ PepListModule,
685
+ PepFormModule,
686
+ PepMenuModule,
687
+ PepPageLayoutModule,
688
+ PepTopBarModule,
689
+ PepSideBarModule,
690
+ PepSearchModule,
691
+ PepBreadCrumbsModule,
692
+ PepIconModule,
693
+ PepSmartFiltersModule
694
+ ],
695
+ exports: [
696
+ GenericListComponent
697
+ ],
698
+ providers: [
699
+ PepGenericListService,
700
+ {
701
+ provide: APP_INITIALIZER,
702
+ useFactory: appInitializerFactory,
703
+ deps: [TranslateService],
704
+ multi: true
705
+ }
706
+ ]
707
+ }]
708
708
  }], ctorParameters: function () { return [{ type: i1$2.PepIconRegistry }]; } });
709
709
 
710
- /*
711
- * Public API Surface of ngx-composite-lib/generic-list
710
+ /*
711
+ * Public API Surface of ngx-composite-lib/generic-list
712
712
  */
713
713
 
714
- /**
715
- * Generated bundle index. Do not edit.
714
+ /**
715
+ * Generated bundle index. Do not edit.
716
716
  */
717
717
 
718
718
  export { GenericListComponent, PepGenericListModule, PepGenericListService, appInitializerFactory };