@pepperi-addons/ngx-composite-lib 0.0.10-beta.9 → 0.0.12-beta.1

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