@pepperi-addons/ngx-composite-lib 0.0.16-beta.43 → 0.0.16-beta.44

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 (129) hide show
  1. package/bundles/pepperi-addons-ngx-composite-lib-color-settings.umd.js +132 -132
  2. package/bundles/pepperi-addons-ngx-composite-lib-data-view-builder.umd.js +338 -338
  3. package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js +89 -89
  4. package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js +635 -647
  5. package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js.map +1 -1
  6. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js +998 -1006
  7. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js.map +1 -1
  8. package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js +179 -179
  9. package/bundles/pepperi-addons-ngx-composite-lib-shadow-settings.umd.js +117 -117
  10. package/bundles/pepperi-addons-ngx-composite-lib.umd.js +598 -598
  11. package/color-settings/color-settings.component.d.ts +25 -25
  12. package/color-settings/color-settings.model.d.ts +5 -5
  13. package/color-settings/color-settings.module.d.ts +12 -12
  14. package/color-settings/pepperi-addons-ngx-composite-lib-color-settings.d.ts +5 -5
  15. package/color-settings/public-api.d.ts +3 -3
  16. package/core/common/directives/index.d.ts +1 -1
  17. package/core/common/directives/public-api.d.ts +1 -1
  18. package/core/common/directives/reset-configuration-field.directive.d.ts +39 -39
  19. package/core/common/index.d.ts +1 -1
  20. package/core/common/public-api.d.ts +2 -2
  21. package/core/common/services/dimx.service.d.ts +32 -32
  22. package/core/common/services/index.d.ts +1 -1
  23. package/core/common/services/public-api.d.ts +2 -2
  24. package/core/common/services/utilities.service.d.ts +6 -6
  25. package/core/index.d.ts +1 -1
  26. package/core/public-api.d.ts +1 -1
  27. package/data-view-builder/data-view-builder.component.d.ts +35 -35
  28. package/data-view-builder/data-view-builder.model.d.ts +1 -1
  29. package/data-view-builder/data-view-builder.module.d.ts +23 -23
  30. package/data-view-builder/data-view-builder.service.d.ts +14 -14
  31. package/data-view-builder/menu-data-view/menu-data-view.component.d.ts +36 -36
  32. package/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.d.ts +5 -5
  33. package/data-view-builder/public-api.d.ts +3 -3
  34. package/esm2015/color-settings/color-settings.component.js +90 -90
  35. package/esm2015/color-settings/color-settings.model.js +8 -8
  36. package/esm2015/color-settings/color-settings.module.js +39 -39
  37. package/esm2015/color-settings/pepperi-addons-ngx-composite-lib-color-settings.js +4 -4
  38. package/esm2015/color-settings/public-api.js +6 -6
  39. package/esm2015/core/common/directives/index.js +4 -4
  40. package/esm2015/core/common/directives/public-api.js +4 -4
  41. package/esm2015/core/common/directives/reset-configuration-field.directive.js +139 -139
  42. package/esm2015/core/common/index.js +4 -4
  43. package/esm2015/core/common/public-api.js +5 -5
  44. package/esm2015/core/common/services/dimx.service.js +49 -49
  45. package/esm2015/core/common/services/index.js +4 -4
  46. package/esm2015/core/common/services/public-api.js +5 -5
  47. package/esm2015/core/common/services/utilities.service.js +18 -18
  48. package/esm2015/core/index.js +4 -4
  49. package/esm2015/core/public-api.js +4 -4
  50. package/esm2015/data-view-builder/data-view-builder.component.js +121 -121
  51. package/esm2015/data-view-builder/data-view-builder.model.js +1 -1
  52. package/esm2015/data-view-builder/data-view-builder.module.js +81 -81
  53. package/esm2015/data-view-builder/data-view-builder.service.js +38 -38
  54. package/esm2015/data-view-builder/menu-data-view/menu-data-view.component.js +121 -121
  55. package/esm2015/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.js +4 -4
  56. package/esm2015/data-view-builder/public-api.js +6 -6
  57. package/esm2015/file-status-panel/file-status-panel.component.js +38 -38
  58. package/esm2015/file-status-panel/file-status-panel.model.js +8 -8
  59. package/esm2015/file-status-panel/file-status-panel.module.js +55 -55
  60. package/esm2015/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.js +4 -4
  61. package/esm2015/file-status-panel/public-api.js +6 -6
  62. package/esm2015/generic-form/generic-form.component.js +187 -190
  63. package/esm2015/generic-form/generic-form.model.js +2 -2
  64. package/esm2015/generic-form/generic-form.module.js +73 -73
  65. package/esm2015/generic-form/generic-form.service.js +58 -68
  66. package/esm2015/generic-form/pepperi-addons-ngx-composite-lib-generic-form.js +4 -4
  67. package/esm2015/generic-form/public-api.js +7 -7
  68. package/esm2015/generic-list/generic-list.component.js +438 -446
  69. package/esm2015/generic-list/generic-list.model.js +1 -1
  70. package/esm2015/generic-list/generic-list.module.js +71 -71
  71. package/esm2015/generic-list/generic-list.service.js +126 -126
  72. package/esm2015/generic-list/pepperi-addons-ngx-composite-lib-generic-list.js +4 -4
  73. package/esm2015/generic-list/public-api.js +7 -7
  74. package/esm2015/group-buttons-settings/group-buttons-settings.component.js +134 -134
  75. package/esm2015/group-buttons-settings/group-buttons-settings.model.js +1 -1
  76. package/esm2015/group-buttons-settings/group-buttons-settings.module.js +49 -49
  77. package/esm2015/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +4 -4
  78. package/esm2015/group-buttons-settings/public-api.js +6 -6
  79. package/esm2015/ngx-composite-lib.module.js +55 -55
  80. package/esm2015/pepperi-addons-ngx-composite-lib.js +4 -4
  81. package/esm2015/public-api.js +5 -5
  82. package/esm2015/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.js +4 -4
  83. package/esm2015/shadow-settings/public-api.js +6 -6
  84. package/esm2015/shadow-settings/shadow-settings.component.js +72 -72
  85. package/esm2015/shadow-settings/shadow-settings.model.js +7 -7
  86. package/esm2015/shadow-settings/shadow-settings.module.js +43 -43
  87. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js +122 -122
  88. package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.js +319 -319
  89. package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js +84 -84
  90. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js +290 -302
  91. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js.map +1 -1
  92. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js +595 -603
  93. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js.map +1 -1
  94. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +170 -170
  95. package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.js +107 -107
  96. package/fesm2015/pepperi-addons-ngx-composite-lib.js +255 -255
  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/pepperi-addons-ngx-composite-lib-file-status-panel.d.ts +5 -5
  101. package/file-status-panel/public-api.d.ts +3 -3
  102. package/generic-form/generic-form.component.d.ts +44 -46
  103. package/generic-form/generic-form.model.d.ts +34 -34
  104. package/generic-form/generic-form.module.d.ts +13 -13
  105. package/generic-form/generic-form.service.d.ts +15 -16
  106. package/generic-form/pepperi-addons-ngx-composite-lib-generic-form.d.ts +5 -5
  107. package/generic-form/public-api.d.ts +4 -4
  108. package/generic-list/generic-list.component.d.ts +101 -101
  109. package/generic-list/generic-list.model.d.ts +54 -54
  110. package/generic-list/generic-list.module.d.ts +18 -18
  111. package/generic-list/generic-list.service.d.ts +43 -43
  112. package/generic-list/pepperi-addons-ngx-composite-lib-generic-list.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/pepperi-addons-ngx-composite-lib-group-buttons-settings.d.ts +5 -5
  118. package/group-buttons-settings/public-api.d.ts +3 -3
  119. package/ngx-composite-lib.module.d.ts +13 -13
  120. package/package.json +2 -2
  121. package/pepperi-addons-ngx-composite-lib.d.ts +5 -5
  122. package/public-api.d.ts +2 -2
  123. package/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.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 +7 -7
  127. package/shadow-settings/shadow-settings.module.d.ts +13 -13
  128. package/esm2015/generic-form/index.js +0 -5
  129. package/generic-form/index.d.ts +0 -1
@@ -35,1022 +35,1014 @@
35
35
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
36
36
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
37
37
 
38
- /*! *****************************************************************************
39
- Copyright (c) Microsoft Corporation.
40
-
41
- Permission to use, copy, modify, and/or distribute this software for any
42
- purpose with or without fee is hereby granted.
43
-
44
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
45
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
46
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
47
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
48
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
49
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
50
- PERFORMANCE OF THIS SOFTWARE.
51
- ***************************************************************************** */
52
- /* global Reflect, Promise */
53
- var extendStatics = function (d, b) {
54
- extendStatics = Object.setPrototypeOf ||
55
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56
- function (d, b) { for (var p in b)
57
- if (Object.prototype.hasOwnProperty.call(b, p))
58
- d[p] = b[p]; };
59
- return extendStatics(d, b);
60
- };
61
- function __extends(d, b) {
62
- if (typeof b !== "function" && b !== null)
63
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
64
- extendStatics(d, b);
65
- function __() { this.constructor = d; }
66
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
67
- }
68
- var __assign = function () {
69
- __assign = Object.assign || function __assign(t) {
70
- for (var s, i = 1, n = arguments.length; i < n; i++) {
71
- s = arguments[i];
72
- for (var p in s)
73
- if (Object.prototype.hasOwnProperty.call(s, p))
74
- t[p] = s[p];
75
- }
76
- return t;
77
- };
78
- return __assign.apply(this, arguments);
79
- };
80
- function __rest(s, e) {
81
- var t = {};
82
- for (var p in s)
83
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
84
- t[p] = s[p];
85
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
86
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
87
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
88
- t[p[i]] = s[p[i]];
89
- }
90
- return t;
91
- }
92
- function __decorate(decorators, target, key, desc) {
93
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
94
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
95
- r = Reflect.decorate(decorators, target, key, desc);
96
- else
97
- for (var i = decorators.length - 1; i >= 0; i--)
98
- if (d = decorators[i])
99
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
100
- return c > 3 && r && Object.defineProperty(target, key, r), r;
101
- }
102
- function __param(paramIndex, decorator) {
103
- return function (target, key) { decorator(target, key, paramIndex); };
104
- }
105
- function __metadata(metadataKey, metadataValue) {
106
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
107
- return Reflect.metadata(metadataKey, metadataValue);
108
- }
109
- function __awaiter(thisArg, _arguments, P, generator) {
110
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
111
- return new (P || (P = Promise))(function (resolve, reject) {
112
- function fulfilled(value) { try {
113
- step(generator.next(value));
114
- }
115
- catch (e) {
116
- reject(e);
117
- } }
118
- function rejected(value) { try {
119
- step(generator["throw"](value));
120
- }
121
- catch (e) {
122
- reject(e);
123
- } }
124
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
125
- step((generator = generator.apply(thisArg, _arguments || [])).next());
126
- });
127
- }
128
- function __generator(thisArg, body) {
129
- var _ = { label: 0, sent: function () { if (t[0] & 1)
130
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
131
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
132
- function verb(n) { return function (v) { return step([n, v]); }; }
133
- function step(op) {
134
- if (f)
135
- throw new TypeError("Generator is already executing.");
136
- while (_)
137
- try {
138
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
139
- return t;
140
- if (y = 0, t)
141
- op = [op[0] & 2, t.value];
142
- switch (op[0]) {
143
- case 0:
144
- case 1:
145
- t = op;
146
- break;
147
- case 4:
148
- _.label++;
149
- return { value: op[1], done: false };
150
- case 5:
151
- _.label++;
152
- y = op[1];
153
- op = [0];
154
- continue;
155
- case 7:
156
- op = _.ops.pop();
157
- _.trys.pop();
158
- continue;
159
- default:
160
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
161
- _ = 0;
162
- continue;
163
- }
164
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
165
- _.label = op[1];
166
- break;
167
- }
168
- if (op[0] === 6 && _.label < t[1]) {
169
- _.label = t[1];
170
- t = op;
171
- break;
172
- }
173
- if (t && _.label < t[2]) {
174
- _.label = t[2];
175
- _.ops.push(op);
176
- break;
177
- }
178
- if (t[2])
179
- _.ops.pop();
180
- _.trys.pop();
181
- continue;
182
- }
183
- op = body.call(thisArg, _);
184
- }
185
- catch (e) {
186
- op = [6, e];
187
- y = 0;
188
- }
189
- finally {
190
- f = t = 0;
191
- }
192
- if (op[0] & 5)
193
- throw op[1];
194
- return { value: op[0] ? op[1] : void 0, done: true };
195
- }
196
- }
197
- var __createBinding = Object.create ? (function (o, m, k, k2) {
198
- if (k2 === undefined)
199
- k2 = k;
200
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
201
- }) : (function (o, m, k, k2) {
202
- if (k2 === undefined)
203
- k2 = k;
204
- o[k2] = m[k];
205
- });
206
- function __exportStar(m, o) {
207
- for (var p in m)
208
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
209
- __createBinding(o, m, p);
210
- }
211
- function __values(o) {
212
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
213
- if (m)
214
- return m.call(o);
215
- if (o && typeof o.length === "number")
216
- return {
217
- next: function () {
218
- if (o && i >= o.length)
219
- o = void 0;
220
- return { value: o && o[i++], done: !o };
221
- }
222
- };
223
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
224
- }
225
- function __read(o, n) {
226
- var m = typeof Symbol === "function" && o[Symbol.iterator];
227
- if (!m)
228
- return o;
229
- var i = m.call(o), r, ar = [], e;
230
- try {
231
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
232
- ar.push(r.value);
233
- }
234
- catch (error) {
235
- e = { error: error };
236
- }
237
- finally {
238
- try {
239
- if (r && !r.done && (m = i["return"]))
240
- m.call(i);
241
- }
242
- finally {
243
- if (e)
244
- throw e.error;
245
- }
246
- }
247
- return ar;
248
- }
249
- /** @deprecated */
250
- function __spread() {
251
- for (var ar = [], i = 0; i < arguments.length; i++)
252
- ar = ar.concat(__read(arguments[i]));
253
- return ar;
254
- }
255
- /** @deprecated */
256
- function __spreadArrays() {
257
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
258
- s += arguments[i].length;
259
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
260
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
261
- r[k] = a[j];
262
- return r;
263
- }
264
- function __spreadArray(to, from, pack) {
265
- if (pack || arguments.length === 2)
266
- for (var i = 0, l = from.length, ar; i < l; i++) {
267
- if (ar || !(i in from)) {
268
- if (!ar)
269
- ar = Array.prototype.slice.call(from, 0, i);
270
- ar[i] = from[i];
271
- }
272
- }
273
- return to.concat(ar || Array.prototype.slice.call(from));
274
- }
275
- function __await(v) {
276
- return this instanceof __await ? (this.v = v, this) : new __await(v);
277
- }
278
- function __asyncGenerator(thisArg, _arguments, generator) {
279
- if (!Symbol.asyncIterator)
280
- throw new TypeError("Symbol.asyncIterator is not defined.");
281
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
282
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
283
- function verb(n) { if (g[n])
284
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
285
- function resume(n, v) { try {
286
- step(g[n](v));
287
- }
288
- catch (e) {
289
- settle(q[0][3], e);
290
- } }
291
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
292
- function fulfill(value) { resume("next", value); }
293
- function reject(value) { resume("throw", value); }
294
- function settle(f, v) { if (f(v), q.shift(), q.length)
295
- resume(q[0][0], q[0][1]); }
296
- }
297
- function __asyncDelegator(o) {
298
- var i, p;
299
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
300
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
301
- }
302
- function __asyncValues(o) {
303
- if (!Symbol.asyncIterator)
304
- throw new TypeError("Symbol.asyncIterator is not defined.");
305
- var m = o[Symbol.asyncIterator], i;
306
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
307
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
308
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
309
- }
310
- function __makeTemplateObject(cooked, raw) {
311
- if (Object.defineProperty) {
312
- Object.defineProperty(cooked, "raw", { value: raw });
313
- }
314
- else {
315
- cooked.raw = raw;
316
- }
317
- return cooked;
318
- }
319
- ;
320
- var __setModuleDefault = Object.create ? (function (o, v) {
321
- Object.defineProperty(o, "default", { enumerable: true, value: v });
322
- }) : function (o, v) {
323
- o["default"] = v;
324
- };
325
- function __importStar(mod) {
326
- if (mod && mod.__esModule)
327
- return mod;
328
- var result = {};
329
- if (mod != null)
330
- for (var k in mod)
331
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
332
- __createBinding(result, mod, k);
333
- __setModuleDefault(result, mod);
334
- return result;
335
- }
336
- function __importDefault(mod) {
337
- return (mod && mod.__esModule) ? mod : { default: mod };
338
- }
339
- function __classPrivateFieldGet(receiver, state, kind, f) {
340
- if (kind === "a" && !f)
341
- throw new TypeError("Private accessor was defined without a getter");
342
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
343
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
344
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
345
- }
346
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
347
- if (kind === "m")
348
- throw new TypeError("Private method is not writable");
349
- if (kind === "a" && !f)
350
- throw new TypeError("Private accessor was defined without a setter");
351
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
352
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
353
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
38
+ /*! *****************************************************************************
39
+ Copyright (c) Microsoft Corporation.
40
+
41
+ Permission to use, copy, modify, and/or distribute this software for any
42
+ purpose with or without fee is hereby granted.
43
+
44
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
45
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
46
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
47
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
48
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
49
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
50
+ PERFORMANCE OF THIS SOFTWARE.
51
+ ***************************************************************************** */
52
+ /* global Reflect, Promise */
53
+ var extendStatics = function (d, b) {
54
+ extendStatics = Object.setPrototypeOf ||
55
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
56
+ function (d, b) { for (var p in b)
57
+ if (Object.prototype.hasOwnProperty.call(b, p))
58
+ d[p] = b[p]; };
59
+ return extendStatics(d, b);
60
+ };
61
+ function __extends(d, b) {
62
+ if (typeof b !== "function" && b !== null)
63
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
64
+ extendStatics(d, b);
65
+ function __() { this.constructor = d; }
66
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
67
+ }
68
+ var __assign = function () {
69
+ __assign = Object.assign || function __assign(t) {
70
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
71
+ s = arguments[i];
72
+ for (var p in s)
73
+ if (Object.prototype.hasOwnProperty.call(s, p))
74
+ t[p] = s[p];
75
+ }
76
+ return t;
77
+ };
78
+ return __assign.apply(this, arguments);
79
+ };
80
+ function __rest(s, e) {
81
+ var t = {};
82
+ for (var p in s)
83
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
84
+ t[p] = s[p];
85
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
86
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
87
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
88
+ t[p[i]] = s[p[i]];
89
+ }
90
+ return t;
91
+ }
92
+ function __decorate(decorators, target, key, desc) {
93
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
94
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
95
+ r = Reflect.decorate(decorators, target, key, desc);
96
+ else
97
+ for (var i = decorators.length - 1; i >= 0; i--)
98
+ if (d = decorators[i])
99
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
100
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
101
+ }
102
+ function __param(paramIndex, decorator) {
103
+ return function (target, key) { decorator(target, key, paramIndex); };
104
+ }
105
+ function __metadata(metadataKey, metadataValue) {
106
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
107
+ return Reflect.metadata(metadataKey, metadataValue);
108
+ }
109
+ function __awaiter(thisArg, _arguments, P, generator) {
110
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
111
+ return new (P || (P = Promise))(function (resolve, reject) {
112
+ function fulfilled(value) { try {
113
+ step(generator.next(value));
114
+ }
115
+ catch (e) {
116
+ reject(e);
117
+ } }
118
+ function rejected(value) { try {
119
+ step(generator["throw"](value));
120
+ }
121
+ catch (e) {
122
+ reject(e);
123
+ } }
124
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
125
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
126
+ });
127
+ }
128
+ function __generator(thisArg, body) {
129
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
130
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
131
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
132
+ function verb(n) { return function (v) { return step([n, v]); }; }
133
+ function step(op) {
134
+ if (f)
135
+ throw new TypeError("Generator is already executing.");
136
+ while (_)
137
+ try {
138
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
139
+ return t;
140
+ if (y = 0, t)
141
+ op = [op[0] & 2, t.value];
142
+ switch (op[0]) {
143
+ case 0:
144
+ case 1:
145
+ t = op;
146
+ break;
147
+ case 4:
148
+ _.label++;
149
+ return { value: op[1], done: false };
150
+ case 5:
151
+ _.label++;
152
+ y = op[1];
153
+ op = [0];
154
+ continue;
155
+ case 7:
156
+ op = _.ops.pop();
157
+ _.trys.pop();
158
+ continue;
159
+ default:
160
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
161
+ _ = 0;
162
+ continue;
163
+ }
164
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
165
+ _.label = op[1];
166
+ break;
167
+ }
168
+ if (op[0] === 6 && _.label < t[1]) {
169
+ _.label = t[1];
170
+ t = op;
171
+ break;
172
+ }
173
+ if (t && _.label < t[2]) {
174
+ _.label = t[2];
175
+ _.ops.push(op);
176
+ break;
177
+ }
178
+ if (t[2])
179
+ _.ops.pop();
180
+ _.trys.pop();
181
+ continue;
182
+ }
183
+ op = body.call(thisArg, _);
184
+ }
185
+ catch (e) {
186
+ op = [6, e];
187
+ y = 0;
188
+ }
189
+ finally {
190
+ f = t = 0;
191
+ }
192
+ if (op[0] & 5)
193
+ throw op[1];
194
+ return { value: op[0] ? op[1] : void 0, done: true };
195
+ }
196
+ }
197
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
198
+ if (k2 === undefined)
199
+ k2 = k;
200
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
201
+ }) : (function (o, m, k, k2) {
202
+ if (k2 === undefined)
203
+ k2 = k;
204
+ o[k2] = m[k];
205
+ });
206
+ function __exportStar(m, o) {
207
+ for (var p in m)
208
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
209
+ __createBinding(o, m, p);
210
+ }
211
+ function __values(o) {
212
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
213
+ if (m)
214
+ return m.call(o);
215
+ if (o && typeof o.length === "number")
216
+ return {
217
+ next: function () {
218
+ if (o && i >= o.length)
219
+ o = void 0;
220
+ return { value: o && o[i++], done: !o };
221
+ }
222
+ };
223
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
224
+ }
225
+ function __read(o, n) {
226
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
227
+ if (!m)
228
+ return o;
229
+ var i = m.call(o), r, ar = [], e;
230
+ try {
231
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
232
+ ar.push(r.value);
233
+ }
234
+ catch (error) {
235
+ e = { error: error };
236
+ }
237
+ finally {
238
+ try {
239
+ if (r && !r.done && (m = i["return"]))
240
+ m.call(i);
241
+ }
242
+ finally {
243
+ if (e)
244
+ throw e.error;
245
+ }
246
+ }
247
+ return ar;
248
+ }
249
+ /** @deprecated */
250
+ function __spread() {
251
+ for (var ar = [], i = 0; i < arguments.length; i++)
252
+ ar = ar.concat(__read(arguments[i]));
253
+ return ar;
254
+ }
255
+ /** @deprecated */
256
+ function __spreadArrays() {
257
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
258
+ s += arguments[i].length;
259
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
260
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
261
+ r[k] = a[j];
262
+ return r;
263
+ }
264
+ function __spreadArray(to, from, pack) {
265
+ if (pack || arguments.length === 2)
266
+ for (var i = 0, l = from.length, ar; i < l; i++) {
267
+ if (ar || !(i in from)) {
268
+ if (!ar)
269
+ ar = Array.prototype.slice.call(from, 0, i);
270
+ ar[i] = from[i];
271
+ }
272
+ }
273
+ return to.concat(ar || Array.prototype.slice.call(from));
274
+ }
275
+ function __await(v) {
276
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
277
+ }
278
+ function __asyncGenerator(thisArg, _arguments, generator) {
279
+ if (!Symbol.asyncIterator)
280
+ throw new TypeError("Symbol.asyncIterator is not defined.");
281
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
282
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
283
+ function verb(n) { if (g[n])
284
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
285
+ function resume(n, v) { try {
286
+ step(g[n](v));
287
+ }
288
+ catch (e) {
289
+ settle(q[0][3], e);
290
+ } }
291
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
292
+ function fulfill(value) { resume("next", value); }
293
+ function reject(value) { resume("throw", value); }
294
+ function settle(f, v) { if (f(v), q.shift(), q.length)
295
+ resume(q[0][0], q[0][1]); }
296
+ }
297
+ function __asyncDelegator(o) {
298
+ var i, p;
299
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
300
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
301
+ }
302
+ function __asyncValues(o) {
303
+ if (!Symbol.asyncIterator)
304
+ throw new TypeError("Symbol.asyncIterator is not defined.");
305
+ var m = o[Symbol.asyncIterator], i;
306
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
307
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
308
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
309
+ }
310
+ function __makeTemplateObject(cooked, raw) {
311
+ if (Object.defineProperty) {
312
+ Object.defineProperty(cooked, "raw", { value: raw });
313
+ }
314
+ else {
315
+ cooked.raw = raw;
316
+ }
317
+ return cooked;
318
+ }
319
+ ;
320
+ var __setModuleDefault = Object.create ? (function (o, v) {
321
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
322
+ }) : function (o, v) {
323
+ o["default"] = v;
324
+ };
325
+ function __importStar(mod) {
326
+ if (mod && mod.__esModule)
327
+ return mod;
328
+ var result = {};
329
+ if (mod != null)
330
+ for (var k in mod)
331
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
332
+ __createBinding(result, mod, k);
333
+ __setModuleDefault(result, mod);
334
+ return result;
335
+ }
336
+ function __importDefault(mod) {
337
+ return (mod && mod.__esModule) ? mod : { default: mod };
338
+ }
339
+ function __classPrivateFieldGet(receiver, state, kind, f) {
340
+ if (kind === "a" && !f)
341
+ throw new TypeError("Private accessor was defined without a getter");
342
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
343
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
344
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
345
+ }
346
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
347
+ if (kind === "m")
348
+ throw new TypeError("Private method is not writable");
349
+ if (kind === "a" && !f)
350
+ throw new TypeError("Private accessor was defined without a setter");
351
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
352
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
353
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
354
354
  }
355
355
 
356
- var PepGenericListService = /** @class */ (function () {
357
- function PepGenericListService(_translate, _queryBuilderService) {
358
- this._translate = _translate;
359
- this._queryBuilderService = _queryBuilderService;
360
- //
361
- }
362
- /**
363
- * checks if the object contains property
364
- * @param obj object
365
- * @param prop property name
366
- * @returns true if contains, false otherwise
367
- */
368
- PepGenericListService.prototype.hasProperty = function (obj, prop) {
369
- return Object.prototype.hasOwnProperty.call(obj, prop);
370
- };
371
- PepGenericListService.prototype.getListViewType = function (dataViewType) {
372
- switch (dataViewType) {
373
- case 'Grid':
374
- return 'table';
375
- case 'Card':
376
- return 'cards';
377
- case 'Line':
378
- return 'lines';
379
- default:
380
- return 'table';
381
- }
382
- };
383
- PepGenericListService.prototype.convertToPepRowData = function (item, dataView$1, uuidMapping) {
384
- var _a;
385
- var row = new i1.PepRowData();
386
- var itemFields;
387
- if (this.hasProperty(item, 'fields') && typeof item.fields === 'object') {
388
- itemFields = item.fields;
389
- if (item.isEditable === false) {
390
- row.IsEditable = false;
391
- }
392
- if (item.isSelectableForActions === false) {
393
- row.IsSelectableForActions = false;
394
- }
395
- }
396
- else {
397
- itemFields = item;
398
- }
399
- row.UUID = itemFields[uuidMapping] || undefined;
400
- row.Fields = [];
401
- if ((dataView$1 === null || dataView$1 === void 0 ? void 0 : dataView$1.Fields) && dataView$1.Columns) {
402
- for (var index = 0; index < dataView$1.Fields.length; index++) {
403
- var field = dataView$1.Fields[index];
404
- row.Fields.push({
405
- ApiName: field.FieldID,
406
- Title: field.Title ? this._translate.instant(field.Title) : '',
407
- XAlignment: 1,
408
- FormattedValue: (itemFields[field.FieldID] || '').toString(),
409
- Value: (itemFields[field.FieldID] || '').toString(),
410
- ColumnWidth: ((_a = dataView$1.Columns[index]) === null || _a === void 0 ? void 0 : _a.Width) || undefined,
411
- AdditionalValue: '',
412
- OptionalValues: field.OptionalValues || [],
413
- FieldType: dataView.DataViewFieldTypes[field.Type],
414
- ReadOnly: field.ReadOnly,
415
- Enabled: !field.ReadOnly
416
- });
417
- }
418
- }
419
- return row;
420
- };
421
- PepGenericListService.prototype.convertToUiControlField = function (field) {
422
- return {
423
- ApiName: field.ApiName,
424
- FieldType: field.FieldType,
425
- Title: field.Title,
426
- ReadOnly: field.ReadOnlyField,
427
- ColumnWidth: field.ColumnWidth,
428
- ColumnWidthType: 1,
429
- Layout: {
430
- X: field.Layout.X,
431
- Y: field.Layout.Y,
432
- Width: field.Layout.Width,
433
- Height: field.Layout.Field_Height,
434
- XAlignment: field.Layout.xAlignment,
435
- YAlignment: field.Layout.yAlignment,
436
- }
437
- };
438
- };
439
- PepGenericListService.prototype.convertToSmartFilter = function (smartFilter) {
440
- var _a;
441
- var convertedFields = [];
442
- var filterData = [];
443
- if (smartFilter === null || smartFilter === void 0 ? void 0 : smartFilter.dataView) {
444
- convertedFields = this.createSmartFilterFields(smartFilter.dataView);
445
- if ((_a = smartFilter.data) === null || _a === void 0 ? void 0 : _a.length) {
446
- filterData = smartFilter.data;
447
- }
448
- }
449
- return {
450
- fields: convertedFields,
451
- data: filterData
452
- };
453
- };
454
- PepGenericListService.prototype.createSmartFilterFields = function (dataView) {
455
- var smartFields = [];
456
- var fields = dataView.Fields.map(function (field) {
457
- return {
458
- FieldID: field.FieldID,
459
- FieldType: field.Type,
460
- Title: field.Title,
461
- OptionalValues: field.OptionalValues
462
- };
463
- });
464
- var smartFilterfields = this._queryBuilderService.convertToSmartFilterFields(fields);
465
- if (smartFilterfields === null || smartFilterfields === void 0 ? void 0 : smartFilterfields.length) {
466
- smartFields = smartFilterfields.map((function (field) { return field.smart; }));
467
- }
468
- return smartFields;
469
- };
470
- return PepGenericListService;
471
- }());
472
- PepGenericListService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListService, deps: [{ token: i1__namespace.TranslateService }, { token: i2__namespace.PepQueryBuilderService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
473
- PepGenericListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListService });
474
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListService, decorators: [{
475
- type: i0.Injectable
356
+ var PepGenericListService = /** @class */ (function () {
357
+ function PepGenericListService(_translate, _queryBuilderService) {
358
+ this._translate = _translate;
359
+ this._queryBuilderService = _queryBuilderService;
360
+ //
361
+ }
362
+ /**
363
+ * checks if the object contains property
364
+ * @param obj object
365
+ * @param prop property name
366
+ * @returns true if contains, false otherwise
367
+ */
368
+ PepGenericListService.prototype.hasProperty = function (obj, prop) {
369
+ return Object.prototype.hasOwnProperty.call(obj, prop);
370
+ };
371
+ PepGenericListService.prototype.getListViewType = function (dataViewType) {
372
+ switch (dataViewType) {
373
+ case 'Grid':
374
+ return 'table';
375
+ case 'Card':
376
+ return 'cards';
377
+ case 'Line':
378
+ return 'lines';
379
+ default:
380
+ return 'table';
381
+ }
382
+ };
383
+ PepGenericListService.prototype.convertToPepRowData = function (item, dataView$1, uuidMapping) {
384
+ var _a;
385
+ var row = new i1.PepRowData();
386
+ var itemFields;
387
+ if (this.hasProperty(item, 'fields') && typeof item.fields === 'object') {
388
+ itemFields = item.fields;
389
+ if (item.isEditable === false) {
390
+ row.IsEditable = false;
391
+ }
392
+ if (item.isSelectableForActions === false) {
393
+ row.IsSelectableForActions = false;
394
+ }
395
+ }
396
+ else {
397
+ itemFields = item;
398
+ }
399
+ row.UUID = itemFields[uuidMapping] || undefined;
400
+ row.Fields = [];
401
+ if ((dataView$1 === null || dataView$1 === void 0 ? void 0 : dataView$1.Fields) && dataView$1.Columns) {
402
+ for (var index = 0; index < dataView$1.Fields.length; index++) {
403
+ var field = dataView$1.Fields[index];
404
+ row.Fields.push({
405
+ ApiName: field.FieldID,
406
+ Title: field.Title ? this._translate.instant(field.Title) : '',
407
+ XAlignment: 1,
408
+ FormattedValue: (itemFields[field.FieldID] || '').toString(),
409
+ Value: (itemFields[field.FieldID] || '').toString(),
410
+ ColumnWidth: ((_a = dataView$1.Columns[index]) === null || _a === void 0 ? void 0 : _a.Width) || undefined,
411
+ AdditionalValue: '',
412
+ OptionalValues: field.OptionalValues || [],
413
+ FieldType: dataView.DataViewFieldTypes[field.Type],
414
+ ReadOnly: field.ReadOnly,
415
+ Enabled: !field.ReadOnly
416
+ });
417
+ }
418
+ }
419
+ return row;
420
+ };
421
+ PepGenericListService.prototype.convertToUiControlField = function (field) {
422
+ return {
423
+ ApiName: field.ApiName,
424
+ FieldType: field.FieldType,
425
+ Title: field.Title,
426
+ ReadOnly: field.ReadOnlyField,
427
+ ColumnWidth: field.ColumnWidth,
428
+ ColumnWidthType: 1,
429
+ Layout: {
430
+ X: field.Layout.X,
431
+ Y: field.Layout.Y,
432
+ Width: field.Layout.Width,
433
+ Height: field.Layout.Field_Height,
434
+ XAlignment: field.Layout.xAlignment,
435
+ YAlignment: field.Layout.yAlignment,
436
+ }
437
+ };
438
+ };
439
+ PepGenericListService.prototype.convertToSmartFilter = function (smartFilter) {
440
+ var _a;
441
+ var convertedFields = [];
442
+ var filterData = [];
443
+ if (smartFilter === null || smartFilter === void 0 ? void 0 : smartFilter.dataView) {
444
+ convertedFields = this.createSmartFilterFields(smartFilter.dataView);
445
+ if ((_a = smartFilter.data) === null || _a === void 0 ? void 0 : _a.length) {
446
+ filterData = smartFilter.data;
447
+ }
448
+ }
449
+ return {
450
+ fields: convertedFields,
451
+ data: filterData
452
+ };
453
+ };
454
+ PepGenericListService.prototype.createSmartFilterFields = function (dataView) {
455
+ var smartFields = [];
456
+ var fields = dataView.Fields.map(function (field) {
457
+ return {
458
+ FieldID: field.FieldID,
459
+ FieldType: field.Type,
460
+ Title: field.Title,
461
+ OptionalValues: field.OptionalValues
462
+ };
463
+ });
464
+ var smartFilterfields = this._queryBuilderService.convertToSmartFilterFields(fields);
465
+ if (smartFilterfields === null || smartFilterfields === void 0 ? void 0 : smartFilterfields.length) {
466
+ smartFields = smartFilterfields.map((function (field) { return field.smart; }));
467
+ }
468
+ return smartFields;
469
+ };
470
+ return PepGenericListService;
471
+ }());
472
+ PepGenericListService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListService, deps: [{ token: i1__namespace.TranslateService }, { token: i2__namespace.PepQueryBuilderService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
473
+ PepGenericListService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListService });
474
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListService, decorators: [{
475
+ type: i0.Injectable
476
476
  }], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }, { type: i2__namespace.PepQueryBuilderService }]; } });
477
477
 
478
- var GenericListComponent = /** @class */ (function () {
479
- function GenericListComponent(_resolver, _dataConvertorService, _layoutService, _loaderService,
480
- // private _translate: TranslateService,
481
- _genericListService) {
482
- var _this = this;
483
- this._resolver = _resolver;
484
- this._dataConvertorService = _dataConvertorService;
485
- this._layoutService = _layoutService;
486
- this._loaderService = _loaderService;
487
- this._genericListService = _genericListService;
488
- this._dataSource = {
489
- init: function (params) { return __awaiter(_this, void 0, void 0, function () {
490
- return __generator(this, function (_d) {
491
- return [2 /*return*/, {
492
- dataView: {
493
- Type: 'Grid'
494
- },
495
- totalCount: -1,
496
- items: []
497
- }];
498
- });
499
- }); }
500
- };
501
- this.actions = {
502
- get: function (data) { return __awaiter(_this, void 0, void 0, function () {
503
- return __generator(this, function (_d) {
504
- return [2 /*return*/, []];
505
- });
506
- }); }
507
- };
508
- this.uuidMapping = 'key';
509
- this.disabled = false;
510
- this.addPadding = false;
511
- this.title = '';
512
- this.description = '';
513
- this.inline = false;
514
- this.showSearch = false;
515
- this.noDataFoundMsg = '';
516
- this.selectionType = 'multi';
517
- this.supportSorting = false;
518
- this.pager = {
519
- type: 'scroll'
520
- };
521
- this.tableViewType = 'regular';
522
- this.zebraStripes = false;
523
- this.showTopBar = false;
524
- this.breadCrumbsItems = new Array();
525
- this.fieldClick = new i0.EventEmitter();
526
- this.valueChange = new i0.EventEmitter();
527
- this.breadCrumbItemClick = new i0.EventEmitter();
528
- this._resize$ = new rxjs.Subscription();
529
- this._loader$ = new rxjs.Subscription();
530
- this._dataView = {
531
- Type: 'Grid'
532
- };
533
- this.totalRowCount = -1;
534
- this.searchString = '';
535
- this.showSmartFilter = false;
536
- this.internalSmartFilter = {
537
- fields: [],
538
- data: []
539
- };
540
- this._appliedFilters = [];
541
- this._sorting = undefined;
542
- this.menuHandlers = {};
543
- this.menuActions = [];
544
- this._resize$ = this._layoutService.onResize$.pipe().subscribe(function (size) {
545
- //
546
- });
547
- this._loader$ = this._loaderService.onChanged$.subscribe(function (status) {
548
- //
549
- });
550
- }
551
- Object.defineProperty(GenericListComponent.prototype, "pepListContainer", {
552
- set: function (val) {
553
- this._pepListContainer = val;
554
- },
555
- enumerable: false,
556
- configurable: true
557
- });
558
- Object.defineProperty(GenericListComponent.prototype, "dataSource", {
559
- set: function (val) {
560
- this._dataSource = val;
561
- this._sorting = undefined;
562
- this.initSearch();
563
- this.initTable();
564
- },
565
- enumerable: false,
566
- configurable: true
567
- });
568
- Object.defineProperty(GenericListComponent.prototype, "smartFilter", {
569
- set: function (val) {
570
- this.internalSmartFilter = this._genericListService.convertToSmartFilter(val);
571
- this.showSmartFilter = this.internalSmartFilter.fields.length > 0;
572
- },
573
- enumerable: false,
574
- configurable: true
575
- });
576
- Object.defineProperty(GenericListComponent.prototype, "pepList", {
577
- get: function () {
578
- return this._pepList;
579
- },
580
- set: function (val) {
581
- this._pepList = val;
582
- },
583
- enumerable: false,
584
- configurable: true
585
- });
586
- GenericListComponent.prototype.ngOnInit = function () {
587
- //
588
- };
589
- GenericListComponent.prototype.initTable = function () {
590
- return __awaiter(this, void 0, void 0, function () {
591
- var _this = this;
592
- return __generator(this, function (_d) {
593
- setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
594
- var _a, _b, _c, factory, componentRef, fromIndex, toIndex, data, convertedList, uiControl;
595
- var _this = this;
596
- return __generator(this, function (_d) {
597
- switch (_d.label) {
598
- case 0:
599
- if (!(this._dataSource &&
600
- this._pepListContainer)) return [3 /*break*/, 2];
601
- if (this._pepListContainer.length > 0) {
602
- this._pepListContainer.remove();
603
- }
604
- factory = this._resolver.resolveComponentFactory(i5.PepListComponent);
605
- componentRef = this._pepListContainer.createComponent(factory);
606
- this.pepList = componentRef.instance;
607
- //merge selector inputs with callback inputs
608
- this.loadTableInputs();
609
- fromIndex = 0;
610
- toIndex = 0;
611
- if (this._listInputs.pager.type === 'pages') {
612
- fromIndex = this._listInputs.pager.size * this._listInputs.pager.index;
613
- toIndex = fromIndex + (this._listInputs.pager.size || i5.DEFAULT_PAGE_SIZE) - 1;
614
- }
615
- else {
616
- toIndex = 100; //TO DO - get value from - this.customList.getTopItems()
617
- }
618
- return [4 /*yield*/, this.loadData(fromIndex, toIndex)];
619
- case 1:
620
- data = _d.sent();
621
- this.totalRowCount = (data === null || data === void 0 ? void 0 : data.totalCount) || 0;
622
- componentRef.instance.viewType = this._genericListService.getListViewType(this._dataView.Type);
623
- componentRef.instance.tableViewType = this._listInputs.tableViewType;
624
- componentRef.instance.zebraStripes = this._listInputs.zebraStripes;
625
- if (this.disabled) {
626
- componentRef.instance.disabled = true;
627
- componentRef.instance.lockItemInnerEvents = true;
628
- }
629
- componentRef.instance.supportSorting = this._listInputs.supportSorting;
630
- componentRef.instance.selectionTypeForActions = this._listInputs.selectionType;
631
- componentRef.instance.showCardSelection = this._listInputs.selectionType !== 'none';
632
- componentRef.instance.pagerType = this._listInputs.pager.type;
633
- if (this._listInputs.pager.type === 'pages') {
634
- componentRef.instance.pageSize = ((_a = this._listInputs.pager) === null || _a === void 0 ? void 0 : _a.size) || i5.DEFAULT_PAGE_SIZE;
635
- componentRef.instance.pageIndex = ((_b = this._listInputs.pager) === null || _b === void 0 ? void 0 : _b.index) || 0;
636
- }
637
- componentRef.instance.noDataFoundMsg = this._listInputs.noDataFoundMsg;
638
- componentRef.instance.fieldClick.subscribe(function ($event) {
639
- _this.onCustomizeFieldClick($event);
640
- });
641
- componentRef.instance.selectedItemsChange.subscribe(function ($event) {
642
- _this.onSelectedItemsChanged($event);
643
- });
644
- componentRef.instance.loadItems.subscribe(function ($event) {
645
- _this.onLoadItems($event);
646
- });
647
- componentRef.instance.loadPage.subscribe(function ($event) {
648
- _this.onLoadPage($event);
649
- });
650
- componentRef.instance.valueChange.subscribe(function ($event) {
651
- _this.onValueChanged($event);
652
- });
653
- componentRef.instance.sortingChange.subscribe(function ($event) {
654
- _this.onSortingChange($event);
655
- });
656
- convertedList = [];
657
- if (data) {
658
- if ((_c = data.items) === null || _c === void 0 ? void 0 : _c.length) {
659
- convertedList = this._dataConvertorService.convertListData(data.items);
660
- }
661
- uiControl = this.getUiControl(dataViews.DataViewConverter.toUIControlData(data.dataView));
662
- componentRef.instance.initListData(uiControl, data.totalCount, convertedList);
663
- }
664
- _d.label = 2;
665
- case 2: return [2 /*return*/];
666
- }
667
- });
668
- }); }, 0);
669
- return [2 /*return*/];
670
- });
671
- });
672
- };
673
- /**
674
- * loads inputs in case they are provided and merge with selector inputs
675
- * @returns merged pep-list inputs
676
- */
677
- GenericListComponent.prototype.loadTableInputs = function () {
678
- var _this = this;
679
- this._listInputs = {
680
- supportSorting: this.supportSorting,
681
- selectionType: this.selectionType,
682
- pager: this.pager,
683
- noDataFoundMsg: this.noDataFoundMsg,
684
- tableViewType: this.tableViewType,
685
- zebraStripes: this.zebraStripes
686
- };
687
- if (this._dataSource.inputs) {
688
- Object.entries(this._dataSource.inputs).forEach(function (item) {
689
- if (_this._genericListService.hasProperty(_this._listInputs, item[0])) {
690
- _this._listInputs[item[0]] = item[1];
691
- }
692
- });
693
- }
694
- };
695
- GenericListComponent.prototype.getUiControl = function (data) {
696
- var _this = this;
697
- var uiControl = new i1.UIControl();
698
- uiControl.ControlFields = [];
699
- if (data === null || data === void 0 ? void 0 : data.ControlFields) {
700
- uiControl.ControlFields = data.ControlFields.map(function (field) { return _this._genericListService.convertToUiControlField(field); });
701
- }
702
- return uiControl;
703
- };
704
- GenericListComponent.prototype.loadMenuItems = function () {
705
- var _this = this;
706
- if (this._listInputs.selectionType !== 'none') {
707
- this.getMenuActions().then(function (x) { return _this.menuActions = x; });
708
- }
709
- };
710
- GenericListComponent.prototype.getMenuActions = function () {
711
- return __awaiter(this, void 0, void 0, function () {
712
- var res, result, actions;
713
- var _this = this;
714
- return __generator(this, function (_d) {
715
- switch (_d.label) {
716
- case 0:
717
- res = [];
718
- result = this.getMenuObjects();
719
- if (!result.success) return [3 /*break*/, 2];
720
- return [4 /*yield*/, this.actions.get(result.data)];
721
- case 1:
722
- actions = _d.sent();
723
- this.menuHandlers = {};
724
- actions === null || actions === void 0 ? void 0 : actions.forEach(function (item) {
725
- var uuid = i1.PepGuid.newGuid();
726
- _this.menuHandlers[uuid] = item.handler;
727
- res.push({
728
- key: uuid,
729
- text: item.title
730
- });
731
- });
732
- _d.label = 2;
733
- case 2: return [2 /*return*/, res];
734
- }
735
- });
736
- });
737
- };
738
- GenericListComponent.prototype.getMenuObjects = function () {
739
- var menuObjects = {
740
- success: false,
741
- data: new i5.PepSelectionData()
742
- };
743
- if (this.pepList) {
744
- menuObjects.success = true;
745
- menuObjects.data = this.pepList.getSelectedItemsData();
746
- }
747
- return menuObjects;
748
- };
749
- GenericListComponent.prototype.initSearch = function () {
750
- var _a;
751
- this.searchString = '';
752
- (_a = this.search) === null || _a === void 0 ? void 0 : _a.initSearch();
753
- };
754
- GenericListComponent.prototype.loadData = function (fromIndex, toIndex) {
755
- var _a;
756
- return __awaiter(this, void 0, void 0, function () {
757
- var data;
758
- var _this = this;
759
- return __generator(this, function (_d) {
760
- switch (_d.label) {
761
- case 0:
762
- setTimeout(function () {
763
- _this._loaderService.show();
764
- }, 150);
765
- return [4 /*yield*/, this._dataSource.init({
766
- searchString: this.searchString || undefined,
767
- filters: this._appliedFilters.length ? this._appliedFilters : undefined,
768
- sorting: this._sorting || undefined,
769
- fromIndex: fromIndex,
770
- toIndex: toIndex
771
- })];
772
- case 1:
773
- data = _d.sent();
774
- setTimeout(function () {
775
- _this._loaderService.hide();
776
- }, 150);
777
- if (data) {
778
- this._dataView = data.dataView;
779
- if (((_a = data.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && !data.isPepRowData) {
780
- data.items = data.items.map(function (item) { return _this._genericListService.convertToPepRowData(item, data.dataView, _this.uuidMapping); });
781
- }
782
- }
783
- return [2 /*return*/, data];
784
- }
785
- });
786
- });
787
- };
788
- GenericListComponent.prototype.updateDataList = function (fromIndex, toIndex, pageIndex) {
789
- if (pageIndex === void 0) { pageIndex = undefined; }
790
- return __awaiter(this, void 0, void 0, function () {
791
- var dataList;
792
- var _this = this;
793
- return __generator(this, function (_d) {
794
- switch (_d.label) {
795
- case 0:
796
- if (!this._dataSource.update) return [3 /*break*/, 2];
797
- setTimeout(function () {
798
- _this._loaderService.show();
799
- }, 150);
800
- return [4 /*yield*/, this._dataSource.update({
801
- searchString: this.searchString || undefined,
802
- filters: this._appliedFilters.length ? this._appliedFilters : undefined,
803
- sorting: this._sorting || undefined,
804
- fromIndex: fromIndex,
805
- toIndex: toIndex,
806
- pageIndex: pageIndex
807
- })];
808
- case 1:
809
- dataList = _d.sent();
810
- setTimeout(function () {
811
- _this._loaderService.hide();
812
- }, 150);
813
- if ((dataList === null || dataList === void 0 ? void 0 : dataList.length) > 0) {
814
- return [2 /*return*/, dataList.map(function (item) { return _this._genericListService.convertToPepRowData(item, _this._dataView, _this.uuidMapping); })];
815
- }
816
- else {
817
- return [2 /*return*/, []];
818
- }
819
- return [3 /*break*/, 3];
820
- case 2: return [2 /*return*/, []];
821
- case 3: return [2 /*return*/];
822
- }
823
- });
824
- });
825
- };
826
- /**
827
- * loads virtual scroll items from api
828
- */
829
- GenericListComponent.prototype.onLoadItems = function (event) {
830
- return __awaiter(this, void 0, void 0, function () {
831
- var list, convertedList;
832
- return __generator(this, function (_d) {
833
- switch (_d.label) {
834
- case 0: return [4 /*yield*/, this.updateDataList(event.fromIndex, event.toIndex)];
835
- case 1:
836
- list = _d.sent();
837
- convertedList = this._dataConvertorService.convertListData(list);
838
- this.pepList.updateItems(convertedList, event);
839
- return [2 /*return*/];
840
- }
841
- });
842
- });
843
- };
844
- /**
845
- * loads paging bulk from api
846
- */
847
- GenericListComponent.prototype.onLoadPage = function (event) {
848
- return __awaiter(this, void 0, void 0, function () {
849
- var fromIndex, toIndex, list, convertedList;
850
- return __generator(this, function (_d) {
851
- switch (_d.label) {
852
- case 0:
853
- fromIndex = event.pageIndex * event.pageSize;
854
- toIndex = Math.min(fromIndex + event.pageSize - 1, this.totalRowCount - 1);
855
- return [4 /*yield*/, this.updateDataList(fromIndex, toIndex, event.pageIndex)];
856
- case 1:
857
- list = _d.sent();
858
- convertedList = this._dataConvertorService.convertListData(list);
859
- this.pepList.updatePage(convertedList, event);
860
- return [2 /*return*/];
861
- }
862
- });
863
- });
864
- };
865
- GenericListComponent.prototype.getItemById = function (id) {
866
- if (this.pepList) {
867
- return this._pepList.getItemDataByID(id);
868
- }
869
- else {
870
- return null;
871
- }
872
- };
873
- GenericListComponent.prototype.getSelectedItems = function () {
874
- if (this.pepList) {
875
- return this._pepList.getSelectedItemsData();
876
- }
877
- else {
878
- return null;
879
- }
880
- };
881
- GenericListComponent.prototype.getPageIndex = function () {
882
- return this.pepList.pageIndex;
883
- };
884
- GenericListComponent.prototype.onActionItemClicked = function (action) {
885
- var result = this.getMenuObjects();
886
- if (result.success) {
887
- this.menuHandlers[action.source.key](result.data);
888
- }
889
- };
890
- GenericListComponent.prototype.onSearchChanged = function (event) {
891
- this.searchString = event.value;
892
- this.initTable();
893
- };
894
- GenericListComponent.prototype.onSelectedItemsChanged = function (selectedRowsCount) {
895
- var _this = this;
896
- //loading menu items after pep-list selected items are updated
897
- setTimeout(function () {
898
- _this.loadMenuItems();
899
- }, 0);
900
- };
901
- GenericListComponent.prototype.onCustomizeFieldClick = function (fieldClickEvent) {
902
- this.fieldClick.emit(fieldClickEvent);
903
- };
904
- GenericListComponent.prototype.onBreadCrumbItemClick = function (event) {
905
- this.breadCrumbItemClick.emit(event);
906
- };
907
- GenericListComponent.prototype.onValueChanged = function (event) {
908
- this.valueChange.emit(event);
909
- };
910
- GenericListComponent.prototype.onSortingChange = function (event) {
911
- this._sorting = event;
912
- this.initTable();
913
- };
914
- GenericListComponent.prototype.onFiltersChange = function (filters) {
915
- this._appliedFilters = filters;
916
- this.initTable();
917
- };
918
- GenericListComponent.prototype.ngOnDestroy = function () {
919
- if (this._resize$) {
920
- this._resize$.unsubscribe();
921
- }
922
- if (this._loader$) {
923
- this._loader$.unsubscribe();
924
- }
925
- };
926
- return GenericListComponent;
927
- }());
928
- GenericListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: GenericListComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i1__namespace$1.PepDataConvertorService }, { token: i1__namespace$1.PepLayoutService }, { token: i1__namespace$1.PepLoaderService }, { token: PepGenericListService }], target: i0__namespace.ɵɵFactoryTarget.Component });
929
- GenericListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", 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", 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: i0.ViewContainerRef }], ngImport: i0__namespace, 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 *ngTemplateOutlet=\"listTemplate\"></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 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 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%}.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)}::ng-deep .pep-top-bar-container:not(.inline){margin-inline:var(--pep-spacing-xs, .25rem)}::ng-deep .pep-top-bar-container.inline{height:var(--pep-top-bar-field-height, 2.5rem)!important}.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"], components: [{ type: i3__namespace.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { type: i4__namespace.PepTopBarComponent, selector: "pep-top-bar", inputs: ["inline", "title"], outputs: ["footerStateChange"] }, { type: i5__namespace.PepListActionsComponent, selector: "pep-list-actions", inputs: ["actions", "sizeType", "xPosition", "hidden"], outputs: ["actionClick", "stateChange", "menuClick"] }, { type: i5__namespace.PepListTotalComponent, selector: "pep-list-total", inputs: ["totalRows", "totalAmount", "isMapView", "sizeType"] }, { type: i6__namespace.PepSearchComponent, selector: "pep-search", inputs: ["triggerOn", "autoCompleteTop", "sizeType", "autoCompleteValues", "shrink", "value", "searchControl", "useAsWebComponent"], outputs: ["search", "autocompleteChange", "stateChange"] }, { type: i7__namespace.PepSideBarComponent, selector: "pep-side-bar", inputs: ["ignoreResize", "showHeader", "showFooter", "useAsWebComponent"], outputs: ["stateChange"] }, { type: i8__namespace.PepSmartFiltersComponent, selector: "pep-smart-filters", inputs: ["title", "filters", "fields", "useAsWebComponent"], outputs: ["filtersChange", "fieldToggleChange"] }, { type: i9__namespace.PepBreadCrumbsComponent, selector: "pep-bread-crumbs", inputs: ["addSpacing", "items", "displayType"], outputs: ["itemClick"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
930
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: GenericListComponent, decorators: [{
931
- type: i0.Component,
932
- args: [{
933
- selector: 'pep-generic-list',
934
- templateUrl: './generic-list.component.html',
935
- styleUrls: ['./generic-list.component.scss'],
936
- providers: [PepGenericListService]
937
- }]
938
- }], ctorParameters: function () { return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i1__namespace$1.PepDataConvertorService }, { type: i1__namespace$1.PepLayoutService }, { type: i1__namespace$1.PepLoaderService }, { type: PepGenericListService }]; }, propDecorators: { search: [{
939
- type: i0.ViewChild,
940
- args: ['search']
941
- }], pepListContainer: [{
942
- type: i0.ViewChild,
943
- args: ['pepListContainer', { read: i0.ViewContainerRef }]
944
- }], dataSource: [{
945
- type: i0.Input
946
- }], actions: [{
947
- type: i0.Input
948
- }], uuidMapping: [{
949
- type: i0.Input
950
- }], disabled: [{
951
- type: i0.Input
952
- }], addPadding: [{
953
- type: i0.Input
954
- }], title: [{
955
- type: i0.Input
956
- }], description: [{
957
- type: i0.Input
958
- }], inline: [{
959
- type: i0.Input
960
- }], showSearch: [{
961
- type: i0.Input
962
- }], noDataFoundMsg: [{
963
- type: i0.Input
964
- }], selectionType: [{
965
- type: i0.Input
966
- }], supportSorting: [{
967
- type: i0.Input
968
- }], pager: [{
969
- type: i0.Input
970
- }], tableViewType: [{
971
- type: i0.Input
972
- }], zebraStripes: [{
973
- type: i0.Input
974
- }], smartFilter: [{
975
- type: i0.Input
976
- }], showTopBar: [{
977
- type: i0.Input
978
- }], breadCrumbsItems: [{
979
- type: i0.Input
980
- }], fieldClick: [{
981
- type: i0.Output
982
- }], valueChange: [{
983
- type: i0.Output
984
- }], breadCrumbItemClick: [{
985
- type: i0.Output
478
+ var GenericListComponent = /** @class */ (function () {
479
+ function GenericListComponent(_resolver, _dataConvertorService, _layoutService, _loaderService,
480
+ // private _translate: TranslateService,
481
+ _genericListService) {
482
+ var _this = this;
483
+ this._resolver = _resolver;
484
+ this._dataConvertorService = _dataConvertorService;
485
+ this._layoutService = _layoutService;
486
+ this._loaderService = _loaderService;
487
+ this._genericListService = _genericListService;
488
+ this._dataSource = {
489
+ init: function (params) { return __awaiter(_this, void 0, void 0, function () {
490
+ return __generator(this, function (_d) {
491
+ return [2 /*return*/, {
492
+ dataView: {
493
+ Type: 'Grid'
494
+ },
495
+ totalCount: -1,
496
+ items: []
497
+ }];
498
+ });
499
+ }); }
500
+ };
501
+ this.actions = {
502
+ get: function (data) { return __awaiter(_this, void 0, void 0, function () {
503
+ return __generator(this, function (_d) {
504
+ return [2 /*return*/, []];
505
+ });
506
+ }); }
507
+ };
508
+ this.uuidMapping = 'key';
509
+ this.disabled = false;
510
+ this.addPadding = false;
511
+ this.title = '';
512
+ this.description = '';
513
+ this.inline = false;
514
+ this.showSearch = false;
515
+ this.noDataFoundMsg = '';
516
+ this.selectionType = 'multi';
517
+ this.supportSorting = false;
518
+ this.pager = {
519
+ type: 'scroll'
520
+ };
521
+ this.tableViewType = 'regular';
522
+ this.zebraStripes = false;
523
+ this.showTopBar = false;
524
+ this.breadCrumbsItems = new Array();
525
+ this.fieldClick = new i0.EventEmitter();
526
+ this.valueChange = new i0.EventEmitter();
527
+ this.breadCrumbItemClick = new i0.EventEmitter();
528
+ this._resize$ = new rxjs.Subscription();
529
+ this._loader$ = new rxjs.Subscription();
530
+ this._dataView = {
531
+ Type: 'Grid'
532
+ };
533
+ this.totalRowCount = -1;
534
+ this.searchString = '';
535
+ this.showSmartFilter = false;
536
+ this.internalSmartFilter = {
537
+ fields: [],
538
+ data: []
539
+ };
540
+ this._appliedFilters = [];
541
+ this._sorting = undefined;
542
+ this.menuHandlers = {};
543
+ this.menuActions = [];
544
+ this._resize$ = this._layoutService.onResize$.pipe().subscribe(function (size) {
545
+ //
546
+ });
547
+ this._loader$ = this._loaderService.onChanged$.subscribe(function (status) {
548
+ //
549
+ });
550
+ }
551
+ Object.defineProperty(GenericListComponent.prototype, "pepListContainer", {
552
+ set: function (val) {
553
+ this._pepListContainer = val;
554
+ },
555
+ enumerable: false,
556
+ configurable: true
557
+ });
558
+ Object.defineProperty(GenericListComponent.prototype, "dataSource", {
559
+ set: function (val) {
560
+ this._dataSource = val;
561
+ this._sorting = undefined;
562
+ this.initSearch();
563
+ this.initTable();
564
+ },
565
+ enumerable: false,
566
+ configurable: true
567
+ });
568
+ Object.defineProperty(GenericListComponent.prototype, "smartFilter", {
569
+ set: function (val) {
570
+ this.internalSmartFilter = this._genericListService.convertToSmartFilter(val);
571
+ this.showSmartFilter = this.internalSmartFilter.fields.length > 0;
572
+ },
573
+ enumerable: false,
574
+ configurable: true
575
+ });
576
+ Object.defineProperty(GenericListComponent.prototype, "pepList", {
577
+ get: function () {
578
+ return this._pepList;
579
+ },
580
+ set: function (val) {
581
+ this._pepList = val;
582
+ },
583
+ enumerable: false,
584
+ configurable: true
585
+ });
586
+ GenericListComponent.prototype.ngOnInit = function () {
587
+ //
588
+ };
589
+ GenericListComponent.prototype.initTable = function () {
590
+ return __awaiter(this, void 0, void 0, function () {
591
+ var _this = this;
592
+ return __generator(this, function (_d) {
593
+ setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
594
+ var _a, _b, _c, factory, componentRef, fromIndex, toIndex, data, convertedList, uiControl;
595
+ var _this = this;
596
+ return __generator(this, function (_d) {
597
+ switch (_d.label) {
598
+ case 0:
599
+ if (!(this._dataSource &&
600
+ this._pepListContainer)) return [3 /*break*/, 2];
601
+ if (this._pepListContainer.length > 0) {
602
+ this._pepListContainer.remove();
603
+ }
604
+ factory = this._resolver.resolveComponentFactory(i5.PepListComponent);
605
+ componentRef = this._pepListContainer.createComponent(factory);
606
+ this.pepList = componentRef.instance;
607
+ //merge selector inputs with callback inputs
608
+ this.loadTableInputs();
609
+ fromIndex = 0;
610
+ toIndex = 0;
611
+ if (this._listInputs.pager.type === 'pages') {
612
+ fromIndex = this._listInputs.pager.size * this._listInputs.pager.index;
613
+ toIndex = fromIndex + (this._listInputs.pager.size || i5.DEFAULT_PAGE_SIZE) - 1;
614
+ }
615
+ else {
616
+ toIndex = 100; //TO DO - get value from - this.customList.getTopItems()
617
+ }
618
+ return [4 /*yield*/, this.loadData(fromIndex, toIndex)];
619
+ case 1:
620
+ data = _d.sent();
621
+ this.totalRowCount = (data === null || data === void 0 ? void 0 : data.totalCount) || 0;
622
+ componentRef.instance.viewType = this._genericListService.getListViewType(this._dataView.Type);
623
+ componentRef.instance.tableViewType = this._listInputs.tableViewType;
624
+ componentRef.instance.zebraStripes = this._listInputs.zebraStripes;
625
+ if (this.disabled) {
626
+ componentRef.instance.disabled = true;
627
+ componentRef.instance.lockItemInnerEvents = true;
628
+ }
629
+ componentRef.instance.supportSorting = this._listInputs.supportSorting;
630
+ componentRef.instance.selectionTypeForActions = this._listInputs.selectionType;
631
+ componentRef.instance.showCardSelection = this._listInputs.selectionType !== 'none';
632
+ componentRef.instance.pagerType = this._listInputs.pager.type;
633
+ if (this._listInputs.pager.type === 'pages') {
634
+ componentRef.instance.pageSize = ((_a = this._listInputs.pager) === null || _a === void 0 ? void 0 : _a.size) || i5.DEFAULT_PAGE_SIZE;
635
+ componentRef.instance.pageIndex = ((_b = this._listInputs.pager) === null || _b === void 0 ? void 0 : _b.index) || 0;
636
+ }
637
+ componentRef.instance.noDataFoundMsg = this._listInputs.noDataFoundMsg;
638
+ componentRef.instance.fieldClick.subscribe(function ($event) {
639
+ _this.onCustomizeFieldClick($event);
640
+ });
641
+ componentRef.instance.selectedItemsChange.subscribe(function ($event) {
642
+ _this.onSelectedItemsChanged($event);
643
+ });
644
+ componentRef.instance.loadItems.subscribe(function ($event) {
645
+ _this.onLoadItems($event);
646
+ });
647
+ componentRef.instance.loadPage.subscribe(function ($event) {
648
+ _this.onLoadPage($event);
649
+ });
650
+ componentRef.instance.valueChange.subscribe(function ($event) {
651
+ _this.onValueChanged($event);
652
+ });
653
+ componentRef.instance.sortingChange.subscribe(function ($event) {
654
+ _this.onSortingChange($event);
655
+ });
656
+ convertedList = [];
657
+ if (data) {
658
+ if ((_c = data.items) === null || _c === void 0 ? void 0 : _c.length) {
659
+ convertedList = this._dataConvertorService.convertListData(data.items);
660
+ }
661
+ uiControl = this.getUiControl(dataViews.DataViewConverter.toUIControlData(data.dataView));
662
+ componentRef.instance.initListData(uiControl, data.totalCount, convertedList);
663
+ }
664
+ _d.label = 2;
665
+ case 2: return [2 /*return*/];
666
+ }
667
+ });
668
+ }); }, 0);
669
+ return [2 /*return*/];
670
+ });
671
+ });
672
+ };
673
+ /**
674
+ * loads inputs in case they are provided and merge with selector inputs
675
+ * @returns merged pep-list inputs
676
+ */
677
+ GenericListComponent.prototype.loadTableInputs = function () {
678
+ var _this = this;
679
+ this._listInputs = {
680
+ supportSorting: this.supportSorting,
681
+ selectionType: this.selectionType,
682
+ pager: this.pager,
683
+ noDataFoundMsg: this.noDataFoundMsg,
684
+ tableViewType: this.tableViewType,
685
+ zebraStripes: this.zebraStripes
686
+ };
687
+ if (this._dataSource.inputs) {
688
+ Object.entries(this._dataSource.inputs).forEach(function (item) {
689
+ if (_this._genericListService.hasProperty(_this._listInputs, item[0])) {
690
+ _this._listInputs[item[0]] = item[1];
691
+ }
692
+ });
693
+ }
694
+ };
695
+ GenericListComponent.prototype.getUiControl = function (data) {
696
+ var _this = this;
697
+ var uiControl = new i1.UIControl();
698
+ uiControl.ControlFields = [];
699
+ if (data === null || data === void 0 ? void 0 : data.ControlFields) {
700
+ uiControl.ControlFields = data.ControlFields.map(function (field) { return _this._genericListService.convertToUiControlField(field); });
701
+ }
702
+ return uiControl;
703
+ };
704
+ GenericListComponent.prototype.loadMenuItems = function () {
705
+ var _this = this;
706
+ if (this._listInputs.selectionType !== 'none') {
707
+ this.getMenuActions().then(function (x) { return _this.menuActions = x; });
708
+ }
709
+ };
710
+ GenericListComponent.prototype.getMenuActions = function () {
711
+ return __awaiter(this, void 0, void 0, function () {
712
+ var res, result, actions;
713
+ var _this = this;
714
+ return __generator(this, function (_d) {
715
+ switch (_d.label) {
716
+ case 0:
717
+ res = [];
718
+ result = this.getMenuObjects();
719
+ if (!result.success) return [3 /*break*/, 2];
720
+ return [4 /*yield*/, this.actions.get(result.data)];
721
+ case 1:
722
+ actions = _d.sent();
723
+ this.menuHandlers = {};
724
+ actions === null || actions === void 0 ? void 0 : actions.forEach(function (item) {
725
+ var uuid = i1.PepGuid.newGuid();
726
+ _this.menuHandlers[uuid] = item.handler;
727
+ res.push({
728
+ key: uuid,
729
+ text: item.title
730
+ });
731
+ });
732
+ _d.label = 2;
733
+ case 2: return [2 /*return*/, res];
734
+ }
735
+ });
736
+ });
737
+ };
738
+ GenericListComponent.prototype.getMenuObjects = function () {
739
+ var menuObjects = {
740
+ success: false,
741
+ data: new i5.PepSelectionData()
742
+ };
743
+ if (this.pepList) {
744
+ menuObjects.success = true;
745
+ menuObjects.data = this.pepList.getSelectedItemsData();
746
+ }
747
+ return menuObjects;
748
+ };
749
+ GenericListComponent.prototype.initSearch = function () {
750
+ var _a;
751
+ this.searchString = '';
752
+ (_a = this.search) === null || _a === void 0 ? void 0 : _a.initSearch();
753
+ };
754
+ GenericListComponent.prototype.loadData = function (fromIndex, toIndex) {
755
+ var _a;
756
+ return __awaiter(this, void 0, void 0, function () {
757
+ var data;
758
+ var _this = this;
759
+ return __generator(this, function (_d) {
760
+ switch (_d.label) {
761
+ case 0:
762
+ this._loaderService.show();
763
+ return [4 /*yield*/, this._dataSource.init({
764
+ searchString: this.searchString || undefined,
765
+ filters: this._appliedFilters.length ? this._appliedFilters : undefined,
766
+ sorting: this._sorting || undefined,
767
+ fromIndex: fromIndex,
768
+ toIndex: toIndex
769
+ })];
770
+ case 1:
771
+ data = _d.sent();
772
+ this._loaderService.hide();
773
+ if (data) {
774
+ this._dataView = data.dataView;
775
+ if (((_a = data.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && !data.isPepRowData) {
776
+ data.items = data.items.map(function (item) { return _this._genericListService.convertToPepRowData(item, data.dataView, _this.uuidMapping); });
777
+ }
778
+ }
779
+ return [2 /*return*/, data];
780
+ }
781
+ });
782
+ });
783
+ };
784
+ GenericListComponent.prototype.updateDataList = function (fromIndex, toIndex, pageIndex) {
785
+ if (pageIndex === void 0) { pageIndex = undefined; }
786
+ return __awaiter(this, void 0, void 0, function () {
787
+ var dataList;
788
+ var _this = this;
789
+ return __generator(this, function (_d) {
790
+ switch (_d.label) {
791
+ case 0:
792
+ if (!this._dataSource.update) return [3 /*break*/, 2];
793
+ this._loaderService.show();
794
+ return [4 /*yield*/, this._dataSource.update({
795
+ searchString: this.searchString || undefined,
796
+ filters: this._appliedFilters.length ? this._appliedFilters : undefined,
797
+ sorting: this._sorting || undefined,
798
+ fromIndex: fromIndex,
799
+ toIndex: toIndex,
800
+ pageIndex: pageIndex
801
+ })];
802
+ case 1:
803
+ dataList = _d.sent();
804
+ this._loaderService.hide();
805
+ if ((dataList === null || dataList === void 0 ? void 0 : dataList.length) > 0) {
806
+ return [2 /*return*/, dataList.map(function (item) { return _this._genericListService.convertToPepRowData(item, _this._dataView, _this.uuidMapping); })];
807
+ }
808
+ else {
809
+ return [2 /*return*/, []];
810
+ }
811
+ return [3 /*break*/, 3];
812
+ case 2: return [2 /*return*/, []];
813
+ case 3: return [2 /*return*/];
814
+ }
815
+ });
816
+ });
817
+ };
818
+ /**
819
+ * loads virtual scroll items from api
820
+ */
821
+ GenericListComponent.prototype.onLoadItems = function (event) {
822
+ return __awaiter(this, void 0, void 0, function () {
823
+ var list, convertedList;
824
+ return __generator(this, function (_d) {
825
+ switch (_d.label) {
826
+ case 0: return [4 /*yield*/, this.updateDataList(event.fromIndex, event.toIndex)];
827
+ case 1:
828
+ list = _d.sent();
829
+ convertedList = this._dataConvertorService.convertListData(list);
830
+ this.pepList.updateItems(convertedList, event);
831
+ return [2 /*return*/];
832
+ }
833
+ });
834
+ });
835
+ };
836
+ /**
837
+ * loads paging bulk from api
838
+ */
839
+ GenericListComponent.prototype.onLoadPage = function (event) {
840
+ return __awaiter(this, void 0, void 0, function () {
841
+ var fromIndex, toIndex, list, convertedList;
842
+ return __generator(this, function (_d) {
843
+ switch (_d.label) {
844
+ case 0:
845
+ fromIndex = event.pageIndex * event.pageSize;
846
+ toIndex = Math.min(fromIndex + event.pageSize - 1, this.totalRowCount - 1);
847
+ return [4 /*yield*/, this.updateDataList(fromIndex, toIndex, event.pageIndex)];
848
+ case 1:
849
+ list = _d.sent();
850
+ convertedList = this._dataConvertorService.convertListData(list);
851
+ this.pepList.updatePage(convertedList, event);
852
+ return [2 /*return*/];
853
+ }
854
+ });
855
+ });
856
+ };
857
+ GenericListComponent.prototype.getItemById = function (id) {
858
+ if (this.pepList) {
859
+ return this._pepList.getItemDataByID(id);
860
+ }
861
+ else {
862
+ return null;
863
+ }
864
+ };
865
+ GenericListComponent.prototype.getSelectedItems = function () {
866
+ if (this.pepList) {
867
+ return this._pepList.getSelectedItemsData();
868
+ }
869
+ else {
870
+ return null;
871
+ }
872
+ };
873
+ GenericListComponent.prototype.getPageIndex = function () {
874
+ return this.pepList.pageIndex;
875
+ };
876
+ GenericListComponent.prototype.onActionItemClicked = function (action) {
877
+ var result = this.getMenuObjects();
878
+ if (result.success) {
879
+ this.menuHandlers[action.source.key](result.data);
880
+ }
881
+ };
882
+ GenericListComponent.prototype.onSearchChanged = function (event) {
883
+ this.searchString = event.value;
884
+ this.initTable();
885
+ };
886
+ GenericListComponent.prototype.onSelectedItemsChanged = function (selectedRowsCount) {
887
+ var _this = this;
888
+ //loading menu items after pep-list selected items are updated
889
+ setTimeout(function () {
890
+ _this.loadMenuItems();
891
+ }, 0);
892
+ };
893
+ GenericListComponent.prototype.onCustomizeFieldClick = function (fieldClickEvent) {
894
+ this.fieldClick.emit(fieldClickEvent);
895
+ };
896
+ GenericListComponent.prototype.onBreadCrumbItemClick = function (event) {
897
+ this.breadCrumbItemClick.emit(event);
898
+ };
899
+ GenericListComponent.prototype.onValueChanged = function (event) {
900
+ this.valueChange.emit(event);
901
+ };
902
+ GenericListComponent.prototype.onSortingChange = function (event) {
903
+ this._sorting = event;
904
+ this.initTable();
905
+ };
906
+ GenericListComponent.prototype.onFiltersChange = function (filters) {
907
+ this._appliedFilters = filters;
908
+ this.initTable();
909
+ };
910
+ GenericListComponent.prototype.ngOnDestroy = function () {
911
+ if (this._resize$) {
912
+ this._resize$.unsubscribe();
913
+ }
914
+ if (this._loader$) {
915
+ this._loader$.unsubscribe();
916
+ }
917
+ };
918
+ return GenericListComponent;
919
+ }());
920
+ GenericListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: GenericListComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i1__namespace$1.PepDataConvertorService }, { token: i1__namespace$1.PepLayoutService }, { token: i1__namespace$1.PepLoaderService }, { token: PepGenericListService }], target: i0__namespace.ɵɵFactoryTarget.Component });
921
+ GenericListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", 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", 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: i0.ViewContainerRef }], ngImport: i0__namespace, 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 *ngTemplateOutlet=\"listTemplate\"></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 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 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%}.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)}::ng-deep .pep-top-bar-container:not(.inline){margin-inline:var(--pep-spacing-xs, .25rem)}::ng-deep .pep-top-bar-container.inline{height:var(--pep-top-bar-field-height, 2.5rem)!important}.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"], components: [{ type: i3__namespace.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { type: i4__namespace.PepTopBarComponent, selector: "pep-top-bar", inputs: ["inline", "title"], outputs: ["footerStateChange"] }, { type: i5__namespace.PepListActionsComponent, selector: "pep-list-actions", inputs: ["actions", "sizeType", "xPosition", "hidden"], outputs: ["actionClick", "stateChange", "menuClick"] }, { type: i5__namespace.PepListTotalComponent, selector: "pep-list-total", inputs: ["totalRows", "totalAmount", "isMapView", "sizeType"] }, { type: i6__namespace.PepSearchComponent, selector: "pep-search", inputs: ["triggerOn", "autoCompleteTop", "sizeType", "autoCompleteValues", "shrink", "value", "searchControl", "useAsWebComponent"], outputs: ["search", "autocompleteChange", "stateChange"] }, { type: i7__namespace.PepSideBarComponent, selector: "pep-side-bar", inputs: ["ignoreResize", "showHeader", "showFooter", "useAsWebComponent"], outputs: ["stateChange"] }, { type: i8__namespace.PepSmartFiltersComponent, selector: "pep-smart-filters", inputs: ["title", "filters", "fields", "useAsWebComponent"], outputs: ["filtersChange", "fieldToggleChange"] }, { type: i9__namespace.PepBreadCrumbsComponent, selector: "pep-bread-crumbs", inputs: ["addSpacing", "items", "displayType"], outputs: ["itemClick"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
922
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: GenericListComponent, decorators: [{
923
+ type: i0.Component,
924
+ args: [{
925
+ selector: 'pep-generic-list',
926
+ templateUrl: './generic-list.component.html',
927
+ styleUrls: ['./generic-list.component.scss'],
928
+ providers: [PepGenericListService]
929
+ }]
930
+ }], ctorParameters: function () { return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i1__namespace$1.PepDataConvertorService }, { type: i1__namespace$1.PepLayoutService }, { type: i1__namespace$1.PepLoaderService }, { type: PepGenericListService }]; }, propDecorators: { search: [{
931
+ type: i0.ViewChild,
932
+ args: ['search']
933
+ }], pepListContainer: [{
934
+ type: i0.ViewChild,
935
+ args: ['pepListContainer', { read: i0.ViewContainerRef }]
936
+ }], dataSource: [{
937
+ type: i0.Input
938
+ }], actions: [{
939
+ type: i0.Input
940
+ }], uuidMapping: [{
941
+ type: i0.Input
942
+ }], disabled: [{
943
+ type: i0.Input
944
+ }], addPadding: [{
945
+ type: i0.Input
946
+ }], title: [{
947
+ type: i0.Input
948
+ }], description: [{
949
+ type: i0.Input
950
+ }], inline: [{
951
+ type: i0.Input
952
+ }], showSearch: [{
953
+ type: i0.Input
954
+ }], noDataFoundMsg: [{
955
+ type: i0.Input
956
+ }], selectionType: [{
957
+ type: i0.Input
958
+ }], supportSorting: [{
959
+ type: i0.Input
960
+ }], pager: [{
961
+ type: i0.Input
962
+ }], tableViewType: [{
963
+ type: i0.Input
964
+ }], zebraStripes: [{
965
+ type: i0.Input
966
+ }], smartFilter: [{
967
+ type: i0.Input
968
+ }], showTopBar: [{
969
+ type: i0.Input
970
+ }], breadCrumbsItems: [{
971
+ type: i0.Input
972
+ }], fieldClick: [{
973
+ type: i0.Output
974
+ }], valueChange: [{
975
+ type: i0.Output
976
+ }], breadCrumbItemClick: [{
977
+ type: i0.Output
986
978
  }] } });
987
979
 
988
- var PepGenericListModule = /** @class */ (function () {
989
- function PepGenericListModule() {
990
- }
991
- return PepGenericListModule;
992
- }());
993
- PepGenericListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
994
- PepGenericListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, declarations: [GenericListComponent], imports: [i10.CommonModule,
995
- i1.PepNgxLibModule,
996
- i5.PepListModule,
997
- form.PepFormModule,
998
- menu.PepMenuModule,
999
- i3.PepPageLayoutModule,
1000
- i4.PepTopBarModule,
1001
- i7.PepSideBarModule,
1002
- i6.PepSearchModule,
1003
- i9.PepBreadCrumbsModule,
1004
- i8.PepSmartFiltersModule], exports: [GenericListComponent] });
1005
- PepGenericListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, providers: [
1006
- PepGenericListService
1007
- ], imports: [[
1008
- i10.CommonModule,
1009
- i1.PepNgxLibModule,
1010
- i5.PepListModule,
1011
- form.PepFormModule,
1012
- menu.PepMenuModule,
1013
- i3.PepPageLayoutModule,
1014
- i4.PepTopBarModule,
1015
- i7.PepSideBarModule,
1016
- i6.PepSearchModule,
1017
- i9.PepBreadCrumbsModule,
1018
- i8.PepSmartFiltersModule
1019
- ]] });
1020
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, decorators: [{
1021
- type: i0.NgModule,
1022
- args: [{
1023
- declarations: [
1024
- GenericListComponent
1025
- ],
1026
- imports: [
1027
- i10.CommonModule,
1028
- i1.PepNgxLibModule,
1029
- i5.PepListModule,
1030
- form.PepFormModule,
1031
- menu.PepMenuModule,
1032
- i3.PepPageLayoutModule,
1033
- i4.PepTopBarModule,
1034
- i7.PepSideBarModule,
1035
- i6.PepSearchModule,
1036
- i9.PepBreadCrumbsModule,
1037
- i8.PepSmartFiltersModule
1038
- ],
1039
- exports: [
1040
- GenericListComponent
1041
- ],
1042
- providers: [
1043
- PepGenericListService
1044
- ]
1045
- }]
980
+ var PepGenericListModule = /** @class */ (function () {
981
+ function PepGenericListModule() {
982
+ }
983
+ return PepGenericListModule;
984
+ }());
985
+ PepGenericListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
986
+ PepGenericListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, declarations: [GenericListComponent], imports: [i10.CommonModule,
987
+ i1.PepNgxLibModule,
988
+ i5.PepListModule,
989
+ form.PepFormModule,
990
+ menu.PepMenuModule,
991
+ i3.PepPageLayoutModule,
992
+ i4.PepTopBarModule,
993
+ i7.PepSideBarModule,
994
+ i6.PepSearchModule,
995
+ i9.PepBreadCrumbsModule,
996
+ i8.PepSmartFiltersModule], exports: [GenericListComponent] });
997
+ PepGenericListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, providers: [
998
+ PepGenericListService
999
+ ], imports: [[
1000
+ i10.CommonModule,
1001
+ i1.PepNgxLibModule,
1002
+ i5.PepListModule,
1003
+ form.PepFormModule,
1004
+ menu.PepMenuModule,
1005
+ i3.PepPageLayoutModule,
1006
+ i4.PepTopBarModule,
1007
+ i7.PepSideBarModule,
1008
+ i6.PepSearchModule,
1009
+ i9.PepBreadCrumbsModule,
1010
+ i8.PepSmartFiltersModule
1011
+ ]] });
1012
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, decorators: [{
1013
+ type: i0.NgModule,
1014
+ args: [{
1015
+ declarations: [
1016
+ GenericListComponent
1017
+ ],
1018
+ imports: [
1019
+ i10.CommonModule,
1020
+ i1.PepNgxLibModule,
1021
+ i5.PepListModule,
1022
+ form.PepFormModule,
1023
+ menu.PepMenuModule,
1024
+ i3.PepPageLayoutModule,
1025
+ i4.PepTopBarModule,
1026
+ i7.PepSideBarModule,
1027
+ i6.PepSearchModule,
1028
+ i9.PepBreadCrumbsModule,
1029
+ i8.PepSmartFiltersModule
1030
+ ],
1031
+ exports: [
1032
+ GenericListComponent
1033
+ ],
1034
+ providers: [
1035
+ PepGenericListService
1036
+ ]
1037
+ }]
1046
1038
  }] });
1047
1039
 
1048
- /*
1049
- * Public API Surface of ngx-composite-lib/generic-list
1040
+ /*
1041
+ * Public API Surface of ngx-composite-lib/generic-list
1050
1042
  */
1051
1043
 
1052
- /**
1053
- * Generated bundle index. Do not edit.
1044
+ /**
1045
+ * Generated bundle index. Do not edit.
1054
1046
  */
1055
1047
 
1056
1048
  exports.GenericListComponent = GenericListComponent;