@indice/ng-components 0.2.115 → 0.2.116

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 (82) hide show
  1. package/bundles/indice-ng-components.umd.js +3725 -0
  2. package/bundles/indice-ng-components.umd.js.map +1 -0
  3. package/{esm2020/indice-ng-components.mjs → esm2015/indice-ng-components.js} +0 -0
  4. package/{esm2020/lib/controls/avatar-initials/avatar-initials.component.mjs → esm2015/lib/controls/avatar-initials/avatar-initials.component.js} +8 -5
  5. package/esm2015/lib/controls/collapsible-panel/collapsible-panel.component.js +23 -0
  6. package/esm2015/lib/controls/date-picker/date-picker.component.js +269 -0
  7. package/esm2015/lib/controls/drop-down-menu/drop-down-menu.component.js +72 -0
  8. package/{esm2020/lib/controls/kpi-tile/kpi-tile.component.mjs → esm2015/lib/controls/kpi-tile/kpi-tile.component.js} +8 -5
  9. package/{esm2020/lib/controls/list-view/list-column.component.mjs → esm2015/lib/controls/list-view/list-column.component.js} +3 -3
  10. package/{esm2020/lib/controls/list-view/list-details-section.component.mjs → esm2015/lib/controls/list-view/list-details-section.component.js} +3 -3
  11. package/{esm2020/lib/controls/list-view/list-tile.component.mjs → esm2015/lib/controls/list-view/list-tile.component.js} +3 -3
  12. package/esm2015/lib/controls/list-view/list-view-empty-state.component.js +32 -0
  13. package/esm2015/lib/controls/list-view/list-view.component.js +186 -0
  14. package/{esm2020/lib/controls/pager/pager.component.mjs → esm2015/lib/controls/pager/pager.component.js} +8 -5
  15. package/esm2015/lib/controls/side-pane/side-pane.component.js +76 -0
  16. package/esm2015/lib/controls/skeleton-loader/skeleton-loader.component.js +29 -0
  17. package/{esm2020/lib/controls/toaster/toaster-container.component.mjs → esm2015/lib/controls/toaster/toaster-container.component.js} +8 -5
  18. package/esm2015/lib/controls/toaster/toaster.component.js +34 -0
  19. package/{esm2020/lib/controls/toggle/toggle.component.mjs → esm2015/lib/controls/toggle/toggle.component.js} +10 -6
  20. package/{esm2020/lib/directives/click-outside.directive.mjs → esm2015/lib/directives/click-outside.directive.js} +3 -3
  21. package/{esm2020/lib/directives/dynamic-component-host.directive.mjs → esm2015/lib/directives/dynamic-component-host.directive.js} +3 -3
  22. package/esm2015/lib/helpers/base-list.component.js +182 -0
  23. package/{esm2020/lib/icons.mjs → esm2015/lib/icons.js} +0 -0
  24. package/{esm2020/lib/layouts/shell/shell-footer/shell-footer.component.mjs → esm2015/lib/layouts/shell/shell-footer/shell-footer.component.js} +8 -5
  25. package/esm2015/lib/layouts/shell/shell-header/shell-header.component.js +118 -0
  26. package/esm2015/lib/layouts/shell/shell-layout/shell-layout.component.js +106 -0
  27. package/esm2015/lib/layouts/views/form-layout/form-layout.component.js +85 -0
  28. package/esm2015/lib/layouts/views/model-view-layout/model-view-layout.component.js +55 -0
  29. package/{esm2020/lib/layouts/views/side-view-layout/side-view-layout.component.mjs → esm2015/lib/layouts/views/side-view-layout/side-view-layout.component.js} +8 -5
  30. package/esm2015/lib/layouts/views/view-layout/view-layout.component.js +110 -0
  31. package/{esm2020/lib/ng-components.module.mjs → esm2015/lib/ng-components.module.js} +6 -9
  32. package/{esm2020/lib/pages/auth/auth-callback/auth-callback.component.mjs → esm2015/lib/pages/auth/auth-callback/auth-callback.component.js} +10 -6
  33. package/{esm2020/lib/pages/auth/auth-renew/auth-renew.component.mjs → esm2015/lib/pages/auth/auth-renew/auth-renew.component.js} +3 -3
  34. package/{esm2020/lib/pages/auth/logged-out/logged-out.component.mjs → esm2015/lib/pages/auth/logged-out/logged-out.component.js} +9 -5
  35. package/esm2015/lib/pages/http-status/error/error.component.js +20 -0
  36. package/esm2015/lib/pages/http-status/page-not-found/page-not-found.component.js +18 -0
  37. package/esm2015/lib/pages/http-status/unauthorized/unauthorized.component.js +17 -0
  38. package/{esm2020/lib/pipes/address.pipe.mjs → esm2015/lib/pipes/address.pipe.js} +3 -3
  39. package/{esm2020/lib/pipes/duration-format.pipe.mjs → esm2015/lib/pipes/duration-format.pipe.js} +3 -3
  40. package/{esm2020/lib/services/component-loader/component-loader-options.class.mjs → esm2015/lib/services/component-loader/component-loader-options.class.js} +0 -0
  41. package/esm2015/lib/services/component-loader/component-loader.class.js +192 -0
  42. package/{esm2020/lib/services/component-loader/component-loader.factory.mjs → esm2015/lib/services/component-loader/component-loader.factory.js} +3 -3
  43. package/{esm2020/lib/services/component-loader/content-ref.class.mjs → esm2015/lib/services/component-loader/content-ref.class.js} +0 -0
  44. package/{esm2020/lib/services/modal-service/modal-backdrop-component.mjs → esm2015/lib/services/modal-service/modal-backdrop-component.js} +5 -5
  45. package/esm2015/lib/services/modal-service/modal-container-component.js +128 -0
  46. package/esm2015/lib/services/modal-service/modal-options.class.js +35 -0
  47. package/esm2015/lib/services/modal-service/modal-service.js +220 -0
  48. package/{esm2020/lib/services/modal-service/modal-styles.class.mjs → esm2015/lib/services/modal-service/modal-styles.class.js} +0 -0
  49. package/{esm2020/lib/services/modal-service/modal.class.mjs → esm2015/lib/services/modal-service/modal.class.js} +3 -3
  50. package/{esm2020/lib/services/toaster.service.mjs → esm2015/lib/services/toaster.service.js} +3 -3
  51. package/{esm2020/lib/tokens.mjs → esm2015/lib/tokens.js} +0 -0
  52. package/{esm2020/lib/types.mjs → esm2015/lib/types.js} +0 -0
  53. package/{esm2020/public-api.mjs → esm2015/public-api.js} +0 -0
  54. package/{fesm2020/indice-ng-components.mjs → fesm2015/indice-ng-components.js} +303 -200
  55. package/fesm2015/indice-ng-components.js.map +1 -0
  56. package/lib/ng-components.module.d.ts +1 -4
  57. package/lib/services/modal-service/modal-options.class.d.ts +2 -1
  58. package/package.json +6 -19
  59. package/esm2020/lib/controls/collapsible-panel/collapsible-panel.component.mjs +0 -20
  60. package/esm2020/lib/controls/date-picker/date-picker.component.mjs +0 -260
  61. package/esm2020/lib/controls/drop-down-menu/drop-down-menu.component.mjs +0 -68
  62. package/esm2020/lib/controls/list-view/list-view-empty-state.component.mjs +0 -29
  63. package/esm2020/lib/controls/list-view/list-view.component.mjs +0 -183
  64. package/esm2020/lib/controls/side-pane/side-pane.component.mjs +0 -72
  65. package/esm2020/lib/controls/skeleton-loader/skeleton-loader.component.mjs +0 -25
  66. package/esm2020/lib/controls/toaster/toaster.component.mjs +0 -31
  67. package/esm2020/lib/helpers/base-list.component.mjs +0 -181
  68. package/esm2020/lib/layouts/shell/shell-header/shell-header.component.mjs +0 -113
  69. package/esm2020/lib/layouts/shell/shell-layout/shell-layout.component.mjs +0 -101
  70. package/esm2020/lib/layouts/views/form-layout/form-layout.component.mjs +0 -80
  71. package/esm2020/lib/layouts/views/model-view-layout/model-view-layout.component.mjs +0 -51
  72. package/esm2020/lib/layouts/views/view-layout/view-layout.component.mjs +0 -104
  73. package/esm2020/lib/pages/http-status/error/error.component.mjs +0 -17
  74. package/esm2020/lib/pages/http-status/page-not-found/page-not-found.component.mjs +0 -15
  75. package/esm2020/lib/pages/http-status/unauthorized/unauthorized.component.mjs +0 -14
  76. package/esm2020/lib/services/component-loader/component-loader.class.mjs +0 -188
  77. package/esm2020/lib/services/modal-service/modal-container-component.mjs +0 -126
  78. package/esm2020/lib/services/modal-service/modal-options.class.mjs +0 -34
  79. package/esm2020/lib/services/modal-service/modal-service.mjs +0 -219
  80. package/fesm2015/indice-ng-components.mjs +0 -3129
  81. package/fesm2015/indice-ng-components.mjs.map +0 -1
  82. package/fesm2020/indice-ng-components.mjs.map +0 -1
@@ -0,0 +1,3725 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/router'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@indice/ng-auth')) :
3
+ typeof define === 'function' && define.amd ? define('@indice/ng-components', ['exports', '@angular/core', '@angular/common', '@angular/router', '@angular/forms', 'rxjs', 'rxjs/operators', '@indice/ng-auth'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.indice = global.indice || {}, global.indice["ng-components"] = {}), global.ng.core, global.ng.common, global.ng.router, global.ng.forms, global.rxjs, global.rxjs.operators, global.i2));
5
+ })(this, (function (exports, i0, i1, i1$1, forms, rxjs, operators, i2) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
28
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
+
30
+ /*! *****************************************************************************
31
+ Copyright (c) Microsoft Corporation.
32
+
33
+ Permission to use, copy, modify, and/or distribute this software for any
34
+ purpose with or without fee is hereby granted.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
37
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
38
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
39
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
40
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42
+ PERFORMANCE OF THIS SOFTWARE.
43
+ ***************************************************************************** */
44
+ /* global Reflect, Promise */
45
+ var extendStatics = function (d, b) {
46
+ extendStatics = Object.setPrototypeOf ||
47
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
48
+ function (d, b) { for (var p in b)
49
+ if (Object.prototype.hasOwnProperty.call(b, p))
50
+ d[p] = b[p]; };
51
+ return extendStatics(d, b);
52
+ };
53
+ function __extends(d, b) {
54
+ if (typeof b !== "function" && b !== null)
55
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
56
+ extendStatics(d, b);
57
+ function __() { this.constructor = d; }
58
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
59
+ }
60
+ var __assign = function () {
61
+ __assign = Object.assign || function __assign(t) {
62
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
63
+ s = arguments[i];
64
+ for (var p in s)
65
+ if (Object.prototype.hasOwnProperty.call(s, p))
66
+ t[p] = s[p];
67
+ }
68
+ return t;
69
+ };
70
+ return __assign.apply(this, arguments);
71
+ };
72
+ function __rest(s, e) {
73
+ var t = {};
74
+ for (var p in s)
75
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
76
+ t[p] = s[p];
77
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
78
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
79
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
80
+ t[p[i]] = s[p[i]];
81
+ }
82
+ return t;
83
+ }
84
+ function __decorate(decorators, target, key, desc) {
85
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
86
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
87
+ r = Reflect.decorate(decorators, target, key, desc);
88
+ else
89
+ for (var i = decorators.length - 1; i >= 0; i--)
90
+ if (d = decorators[i])
91
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
92
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
93
+ }
94
+ function __param(paramIndex, decorator) {
95
+ return function (target, key) { decorator(target, key, paramIndex); };
96
+ }
97
+ function __metadata(metadataKey, metadataValue) {
98
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
99
+ return Reflect.metadata(metadataKey, metadataValue);
100
+ }
101
+ function __awaiter(thisArg, _arguments, P, generator) {
102
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
103
+ return new (P || (P = Promise))(function (resolve, reject) {
104
+ function fulfilled(value) { try {
105
+ step(generator.next(value));
106
+ }
107
+ catch (e) {
108
+ reject(e);
109
+ } }
110
+ function rejected(value) { try {
111
+ step(generator["throw"](value));
112
+ }
113
+ catch (e) {
114
+ reject(e);
115
+ } }
116
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
117
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
118
+ });
119
+ }
120
+ function __generator(thisArg, body) {
121
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
122
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
123
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
124
+ function verb(n) { return function (v) { return step([n, v]); }; }
125
+ function step(op) {
126
+ if (f)
127
+ throw new TypeError("Generator is already executing.");
128
+ while (_)
129
+ try {
130
+ 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)
131
+ return t;
132
+ if (y = 0, t)
133
+ op = [op[0] & 2, t.value];
134
+ switch (op[0]) {
135
+ case 0:
136
+ case 1:
137
+ t = op;
138
+ break;
139
+ case 4:
140
+ _.label++;
141
+ return { value: op[1], done: false };
142
+ case 5:
143
+ _.label++;
144
+ y = op[1];
145
+ op = [0];
146
+ continue;
147
+ case 7:
148
+ op = _.ops.pop();
149
+ _.trys.pop();
150
+ continue;
151
+ default:
152
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
153
+ _ = 0;
154
+ continue;
155
+ }
156
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
157
+ _.label = op[1];
158
+ break;
159
+ }
160
+ if (op[0] === 6 && _.label < t[1]) {
161
+ _.label = t[1];
162
+ t = op;
163
+ break;
164
+ }
165
+ if (t && _.label < t[2]) {
166
+ _.label = t[2];
167
+ _.ops.push(op);
168
+ break;
169
+ }
170
+ if (t[2])
171
+ _.ops.pop();
172
+ _.trys.pop();
173
+ continue;
174
+ }
175
+ op = body.call(thisArg, _);
176
+ }
177
+ catch (e) {
178
+ op = [6, e];
179
+ y = 0;
180
+ }
181
+ finally {
182
+ f = t = 0;
183
+ }
184
+ if (op[0] & 5)
185
+ throw op[1];
186
+ return { value: op[0] ? op[1] : void 0, done: true };
187
+ }
188
+ }
189
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
190
+ if (k2 === undefined)
191
+ k2 = k;
192
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
193
+ }) : (function (o, m, k, k2) {
194
+ if (k2 === undefined)
195
+ k2 = k;
196
+ o[k2] = m[k];
197
+ });
198
+ function __exportStar(m, o) {
199
+ for (var p in m)
200
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
201
+ __createBinding(o, m, p);
202
+ }
203
+ function __values(o) {
204
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
205
+ if (m)
206
+ return m.call(o);
207
+ if (o && typeof o.length === "number")
208
+ return {
209
+ next: function () {
210
+ if (o && i >= o.length)
211
+ o = void 0;
212
+ return { value: o && o[i++], done: !o };
213
+ }
214
+ };
215
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
216
+ }
217
+ function __read(o, n) {
218
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
219
+ if (!m)
220
+ return o;
221
+ var i = m.call(o), r, ar = [], e;
222
+ try {
223
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
224
+ ar.push(r.value);
225
+ }
226
+ catch (error) {
227
+ e = { error: error };
228
+ }
229
+ finally {
230
+ try {
231
+ if (r && !r.done && (m = i["return"]))
232
+ m.call(i);
233
+ }
234
+ finally {
235
+ if (e)
236
+ throw e.error;
237
+ }
238
+ }
239
+ return ar;
240
+ }
241
+ /** @deprecated */
242
+ function __spread() {
243
+ for (var ar = [], i = 0; i < arguments.length; i++)
244
+ ar = ar.concat(__read(arguments[i]));
245
+ return ar;
246
+ }
247
+ /** @deprecated */
248
+ function __spreadArrays() {
249
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
250
+ s += arguments[i].length;
251
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
252
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
253
+ r[k] = a[j];
254
+ return r;
255
+ }
256
+ function __spreadArray(to, from, pack) {
257
+ if (pack || arguments.length === 2)
258
+ for (var i = 0, l = from.length, ar; i < l; i++) {
259
+ if (ar || !(i in from)) {
260
+ if (!ar)
261
+ ar = Array.prototype.slice.call(from, 0, i);
262
+ ar[i] = from[i];
263
+ }
264
+ }
265
+ return to.concat(ar || Array.prototype.slice.call(from));
266
+ }
267
+ function __await(v) {
268
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
269
+ }
270
+ function __asyncGenerator(thisArg, _arguments, generator) {
271
+ if (!Symbol.asyncIterator)
272
+ throw new TypeError("Symbol.asyncIterator is not defined.");
273
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
274
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
275
+ function verb(n) { if (g[n])
276
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
277
+ function resume(n, v) { try {
278
+ step(g[n](v));
279
+ }
280
+ catch (e) {
281
+ settle(q[0][3], e);
282
+ } }
283
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
284
+ function fulfill(value) { resume("next", value); }
285
+ function reject(value) { resume("throw", value); }
286
+ function settle(f, v) { if (f(v), q.shift(), q.length)
287
+ resume(q[0][0], q[0][1]); }
288
+ }
289
+ function __asyncDelegator(o) {
290
+ var i, p;
291
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
292
+ 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; }
293
+ }
294
+ function __asyncValues(o) {
295
+ if (!Symbol.asyncIterator)
296
+ throw new TypeError("Symbol.asyncIterator is not defined.");
297
+ var m = o[Symbol.asyncIterator], i;
298
+ 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);
299
+ 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); }); }; }
300
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
301
+ }
302
+ function __makeTemplateObject(cooked, raw) {
303
+ if (Object.defineProperty) {
304
+ Object.defineProperty(cooked, "raw", { value: raw });
305
+ }
306
+ else {
307
+ cooked.raw = raw;
308
+ }
309
+ return cooked;
310
+ }
311
+ ;
312
+ var __setModuleDefault = Object.create ? (function (o, v) {
313
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
314
+ }) : function (o, v) {
315
+ o["default"] = v;
316
+ };
317
+ function __importStar(mod) {
318
+ if (mod && mod.__esModule)
319
+ return mod;
320
+ var result = {};
321
+ if (mod != null)
322
+ for (var k in mod)
323
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
324
+ __createBinding(result, mod, k);
325
+ __setModuleDefault(result, mod);
326
+ return result;
327
+ }
328
+ function __importDefault(mod) {
329
+ return (mod && mod.__esModule) ? mod : { default: mod };
330
+ }
331
+ function __classPrivateFieldGet(receiver, state, kind, f) {
332
+ if (kind === "a" && !f)
333
+ throw new TypeError("Private accessor was defined without a getter");
334
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
335
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
336
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
337
+ }
338
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
339
+ if (kind === "m")
340
+ throw new TypeError("Private method is not writable");
341
+ if (kind === "a" && !f)
342
+ throw new TypeError("Private accessor was defined without a setter");
343
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
344
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
345
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
346
+ }
347
+
348
+ // tslint:disable-next-line:directive-selector
349
+ var ClickOutsideDirective = /** @class */ (function () {
350
+ function ClickOutsideDirective(
351
+ // tslint:disable-next-line:variable-name
352
+ _el,
353
+ // tslint:disable-next-line:variable-name
354
+ _ngZone, platformId) {
355
+ this._el = _el;
356
+ this._ngZone = _ngZone;
357
+ this.platformId = platformId;
358
+ this.clickOutsideEnabled = true;
359
+ this.attachOutsideOnClick = false;
360
+ this.delayClickOutsideInit = false;
361
+ this.emitOnBlur = false;
362
+ this.exclude = '';
363
+ this.excludeBeforeClick = false;
364
+ this.clickOutsideEvents = '';
365
+ this.clickOutside = new i0.EventEmitter();
366
+ // tslint:disable-next-line:variable-name
367
+ this._nodesExcluded = [];
368
+ // tslint:disable-next-line:variable-name
369
+ this._events = ['click'];
370
+ this._initOnClickBody = this._initOnClickBody.bind(this);
371
+ this._onClickBody = this._onClickBody.bind(this);
372
+ this._onWindowBlur = this._onWindowBlur.bind(this);
373
+ }
374
+ ClickOutsideDirective.prototype.ngOnInit = function () {
375
+ if (!i1.isPlatformBrowser(this.platformId)) {
376
+ return;
377
+ }
378
+ this._init();
379
+ };
380
+ ClickOutsideDirective.prototype.ngOnDestroy = function () {
381
+ if (!i1.isPlatformBrowser(this.platformId)) {
382
+ return;
383
+ }
384
+ this._removeClickOutsideListener();
385
+ this._removeAttachOutsideOnClickListener();
386
+ this._removeWindowBlurListener();
387
+ };
388
+ ClickOutsideDirective.prototype.ngOnChanges = function (changes) {
389
+ if (!i1.isPlatformBrowser(this.platformId)) {
390
+ return;
391
+ }
392
+ // tslint:disable-next-line:no-string-literal
393
+ if (changes['attachOutsideOnClick'] || changes['exclude'] || changes['emitOnBlur']) {
394
+ this._init();
395
+ }
396
+ };
397
+ ClickOutsideDirective.prototype._init = function () {
398
+ if (this.clickOutsideEvents !== '') {
399
+ this._events = this.clickOutsideEvents.split(',').map(function (e) { return e.trim(); });
400
+ }
401
+ this._excludeCheck();
402
+ if (this.attachOutsideOnClick) {
403
+ this._initAttachOutsideOnClickListener();
404
+ }
405
+ else {
406
+ this._initOnClickBody();
407
+ }
408
+ if (this.emitOnBlur) {
409
+ this._initWindowBlurListener();
410
+ }
411
+ };
412
+ ClickOutsideDirective.prototype._initOnClickBody = function () {
413
+ if (this.delayClickOutsideInit) {
414
+ setTimeout(this._initClickOutsideListener.bind(this));
415
+ }
416
+ else {
417
+ this._initClickOutsideListener();
418
+ }
419
+ };
420
+ ClickOutsideDirective.prototype._excludeCheck = function () {
421
+ if (this.exclude) {
422
+ try {
423
+ var nodes = Array.from(document.querySelectorAll(this.exclude));
424
+ if (nodes) {
425
+ this._nodesExcluded = nodes;
426
+ }
427
+ }
428
+ catch (err) {
429
+ console.error('[ng-click-outside] Check your exclude selector syntax.', err);
430
+ }
431
+ }
432
+ };
433
+ ClickOutsideDirective.prototype._onClickBody = function (ev) {
434
+ if (!this.clickOutsideEnabled) {
435
+ return;
436
+ }
437
+ if (this.excludeBeforeClick) {
438
+ this._excludeCheck();
439
+ }
440
+ if (!this._el.nativeElement.contains(ev.target) && !this._shouldExclude(ev.target)) {
441
+ this._emit(ev);
442
+ if (this.attachOutsideOnClick) {
443
+ this._removeClickOutsideListener();
444
+ }
445
+ }
446
+ };
447
+ /**
448
+ * Resolves problem with outside click on iframe
449
+ * @see https://github.com/arkon/ng-click-outside/issues/32
450
+ */
451
+ ClickOutsideDirective.prototype._onWindowBlur = function (ev) {
452
+ var _this = this;
453
+ setTimeout(function () {
454
+ if (!document.hidden) {
455
+ _this._emit(ev);
456
+ }
457
+ });
458
+ };
459
+ ClickOutsideDirective.prototype._emit = function (ev) {
460
+ var _this = this;
461
+ if (!this.clickOutsideEnabled) {
462
+ return;
463
+ }
464
+ this._ngZone.run(function () { return _this.clickOutside.emit(ev); });
465
+ };
466
+ ClickOutsideDirective.prototype._shouldExclude = function (target) {
467
+ var e_1, _a;
468
+ try {
469
+ // tslint:disable-next-line:prefer-const
470
+ for (var _b = __values(this._nodesExcluded), _c = _b.next(); !_c.done; _c = _b.next()) {
471
+ var excludedNode = _c.value;
472
+ if (excludedNode.contains(target)) {
473
+ return true;
474
+ }
475
+ }
476
+ }
477
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
478
+ finally {
479
+ try {
480
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
481
+ }
482
+ finally { if (e_1) throw e_1.error; }
483
+ }
484
+ return false;
485
+ };
486
+ ClickOutsideDirective.prototype._initClickOutsideListener = function () {
487
+ var _this = this;
488
+ this._ngZone.runOutsideAngular(function () {
489
+ _this._events.forEach(function (e) { return document.addEventListener(e, _this._onClickBody); });
490
+ });
491
+ };
492
+ ClickOutsideDirective.prototype._removeClickOutsideListener = function () {
493
+ var _this = this;
494
+ this._ngZone.runOutsideAngular(function () {
495
+ _this._events.forEach(function (e) { return document.removeEventListener(e, _this._onClickBody); });
496
+ });
497
+ };
498
+ ClickOutsideDirective.prototype._initAttachOutsideOnClickListener = function () {
499
+ var _this = this;
500
+ this._ngZone.runOutsideAngular(function () {
501
+ _this._events.forEach(function (e) { return _this._el.nativeElement.addEventListener(e, _this._initOnClickBody); });
502
+ });
503
+ };
504
+ ClickOutsideDirective.prototype._removeAttachOutsideOnClickListener = function () {
505
+ var _this = this;
506
+ this._ngZone.runOutsideAngular(function () {
507
+ _this._events.forEach(function (e) { return _this._el.nativeElement.removeEventListener(e, _this._initOnClickBody); });
508
+ });
509
+ };
510
+ ClickOutsideDirective.prototype._initWindowBlurListener = function () {
511
+ var _this = this;
512
+ this._ngZone.runOutsideAngular(function () {
513
+ window.addEventListener('blur', _this._onWindowBlur);
514
+ });
515
+ };
516
+ ClickOutsideDirective.prototype._removeWindowBlurListener = function () {
517
+ var _this = this;
518
+ this._ngZone.runOutsideAngular(function () {
519
+ window.removeEventListener('blur', _this._onWindowBlur);
520
+ });
521
+ };
522
+ return ClickOutsideDirective;
523
+ }());
524
+ ClickOutsideDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ClickOutsideDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: i0.PLATFORM_ID }], target: i0__namespace.ɵɵFactoryTarget.Directive });
525
+ ClickOutsideDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: ClickOutsideDirective, selector: "[clickOutside]", inputs: { clickOutsideEnabled: "clickOutsideEnabled", attachOutsideOnClick: "attachOutsideOnClick", delayClickOutsideInit: "delayClickOutsideInit", emitOnBlur: "emitOnBlur", exclude: "exclude", excludeBeforeClick: "excludeBeforeClick", clickOutsideEvents: "clickOutsideEvents" }, outputs: { clickOutside: "clickOutside" }, usesOnChanges: true, ngImport: i0__namespace });
526
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ClickOutsideDirective, decorators: [{
527
+ type: i0.Directive,
528
+ args: [{ selector: '[clickOutside]' }]
529
+ }], ctorParameters: function () {
530
+ return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }, { type: undefined, decorators: [{
531
+ type: i0.Inject,
532
+ args: [i0.PLATFORM_ID]
533
+ }] }];
534
+ }, propDecorators: { clickOutsideEnabled: [{
535
+ type: i0.Input
536
+ }], attachOutsideOnClick: [{
537
+ type: i0.Input
538
+ }], delayClickOutsideInit: [{
539
+ type: i0.Input
540
+ }], emitOnBlur: [{
541
+ type: i0.Input
542
+ }], exclude: [{
543
+ type: i0.Input
544
+ }], excludeBeforeClick: [{
545
+ type: i0.Input
546
+ }], clickOutsideEvents: [{
547
+ type: i0.Input
548
+ }], clickOutside: [{
549
+ type: i0.Output
550
+ }] } });
551
+
552
+ var DropDownMenuComponent = /** @class */ (function () {
553
+ function DropDownMenuComponent() {
554
+ this.options = [];
555
+ // tslint:disable-next-line:no-input-rename
556
+ this.selectedValue = null;
557
+ this.multiple = false;
558
+ this.placeholder = 'Παρακαλώ επιλέξτε...';
559
+ this.selectedOption$ = null;
560
+ this.selectedChange = new i0.EventEmitter();
561
+ this.selectedChanged = new i0.EventEmitter();
562
+ this.expanded$ = false;
563
+ }
564
+ Object.defineProperty(DropDownMenuComponent.prototype, "selectedOption", {
565
+ get: function () {
566
+ return this.selectedOption$;
567
+ },
568
+ set: function (option) {
569
+ this.selectedOption$ = option;
570
+ this.selectedValue = option ? option.value : null;
571
+ this.expanded = false;
572
+ },
573
+ enumerable: false,
574
+ configurable: true
575
+ });
576
+ Object.defineProperty(DropDownMenuComponent.prototype, "expanded", {
577
+ get: function () {
578
+ return this.expanded$;
579
+ },
580
+ set: function (value) {
581
+ this.expanded$ = value;
582
+ },
583
+ enumerable: false,
584
+ configurable: true
585
+ });
586
+ DropDownMenuComponent.prototype.ngOnChanges = function (changes) {
587
+ var _this = this;
588
+ if (this.options && this.options.length > 0 && this.selectedValue !== null && this.selectedValue !== undefined) {
589
+ this.selectedOption$ = this.options.filter(function (o) { return o.value === _this.selectedValue; })[0];
590
+ }
591
+ };
592
+ DropDownMenuComponent.prototype.ngOnInit = function () { };
593
+ DropDownMenuComponent.prototype.isSelected = function (option) {
594
+ return option != null && this.selectedValue != null && option.value === this.selectedValue;
595
+ };
596
+ DropDownMenuComponent.prototype.onClickOutside = function ($event) {
597
+ this.expanded = false;
598
+ };
599
+ DropDownMenuComponent.prototype.selectOption = function (option) {
600
+ this.selectedOption = option;
601
+ this.selectedChange.emit(option.value);
602
+ this.selectedChanged.emit(option.value);
603
+ };
604
+ return DropDownMenuComponent;
605
+ }());
606
+ DropDownMenuComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DropDownMenuComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
607
+ DropDownMenuComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: DropDownMenuComponent, selector: "lib-drop-down-menu", inputs: { options: "options", selectedValue: ["selected", "selectedValue"], multiple: "multiple", placeholder: "placeholder" }, outputs: { selectedChange: "selectedChange", selectedChanged: "selectedChanged" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"dropdown-container\" (clickOutside)=\"onClickOutside($event)\">\r\n <button\r\n type=\"button\"\r\n (click)=\"expanded = !expanded\"\r\n class=\"dropdown-button\"\r\n aria-haspopup=\"listbox\"\r\n aria-expanded=\"true\"\r\n aria-labelledby=\"listbox-label\"\r\n >\r\n <span class=\"dropdown-selected-text\">\r\n {{ selectedOption?.text || placeholder }}\r\n </span>\r\n <span class=\"dropdown-button-icon\">\r\n <!-- Heroicon name: solid/selector -->\r\n <svg class=\"dropdown-arrow\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n </span>\r\n </button>\r\n <ul\r\n *ngIf=\"expanded && options && options.length > 0\"\r\n class=\"dropdown-ul\"\r\n tabindex=\"-1\"\r\n role=\"listbox\"\r\n aria-labelledby=\"listbox-label\"\r\n aria-activedescendant=\"listbox-option-3\"\r\n >\r\n <ng-container *ngFor=\"let option of options\">\r\n <li\r\n [class]=\"isSelected(option) ? 'dropdown-li-selected' : 'dropdown-li'\"\r\n (click)=\"selectOption(option)\"\r\n id=\"listbox-option-0\"\r\n role=\"option\"\r\n >\r\n <span [class]=\"isSelected(option) ? 'dropdown-li-selected-text' : 'dropdown-li-text'\">\r\n {{ option.text }}\r\n </span>\r\n <span *ngIf=\"isSelected(option)\" class=\"dropdown-li-selected-indicator-container\">\r\n <!-- Heroicon name: solid/check -->\r\n <svg\r\n class=\"dropdown-li-selected-indicator\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"currentColor\"\r\n aria-hidden=\"true\"\r\n >\r\n <path\r\n fill-rule=\"evenodd\"\r\n d=\"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z\"\r\n clip-rule=\"evenodd\"\r\n />\r\n </svg>\r\n </span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>\r\n", directives: [{ type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
608
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DropDownMenuComponent, decorators: [{
609
+ type: i0.Component,
610
+ args: [{
611
+ // tslint:disable-next-line:component-selector
612
+ selector: 'lib-drop-down-menu',
613
+ templateUrl: './drop-down-menu.component.html',
614
+ }]
615
+ }], ctorParameters: function () { return []; }, propDecorators: { options: [{
616
+ type: i0.Input
617
+ }], selectedValue: [{
618
+ type: i0.Input,
619
+ args: ['selected']
620
+ }], multiple: [{
621
+ type: i0.Input
622
+ }], placeholder: [{
623
+ type: i0.Input
624
+ }], selectedChange: [{
625
+ type: i0.Output
626
+ }], selectedChanged: [{
627
+ type: i0.Output
628
+ }] } });
629
+
630
+ var Icons = /** @class */ (function () {
631
+ function Icons() {
632
+ }
633
+ return Icons;
634
+ }());
635
+ // https://uifabricicons.azurewebsites.net/
636
+ Icons.Dashboard = "ms-Icon ms-Icon--HomeGroup ";
637
+ Icons.Locations = "ms-Icon ms-Icon--MapPin ";
638
+ Icons.ChargePoints = "ms-Icon ms-Icon--ChatBot ";
639
+ Icons.Transations = "ms-Icon ms-Icon--PaymentCard ";
640
+ Icons.Badges = "ms-Icon ms-Icon--IDBadge ";
641
+ Icons.Information = "ms-Icon ms-Icon--Info";
642
+ Icons.Refresh = "ms-Icon ms-Icon--Refresh";
643
+ Icons.Search = "ms-Icon ms-Icon--Search";
644
+ Icons.Add = "ms-Icon ms-Icon--Add";
645
+ Icons.Delete = "ms-Icon ms-Icon--Delete";
646
+ Icons.SendEmail = "ms-Icon ms-Icon--NewMail";
647
+ Icons.Filter = "ms-Icon ms-Icon--Filter";
648
+ Icons.Export = "ms-Icon ms-Icon--ExcelDocument";
649
+ Icons.Import = "ms-Icon ms-Icon--PeopleAdd";
650
+ Icons.TilesView = "ms-Icon ms-Icon--AppIconDefault";
651
+ Icons.TableView = "ms-Icon ms-Icon--Table";
652
+ Icons.MapView = "ms-Icon ms-Icon--MapPin";
653
+ Icons.EntryView = "ms-Icon ms-Icon--EntryView";
654
+ Icons.Separator = "ms-Icon ms-Icon--Separator text-white";
655
+ Icons.ItemsCount = 'ms-Icon ms-Icon--Boards';
656
+ Icons.Heart = 'ms-Icon ms-Icon--Heart';
657
+ Icons.HeartBroken = 'ms-Icon ms-Icon--HeartBroken';
658
+ Icons.DateTime = 'ms-Icon ms-Icon--ReminderTime';
659
+ Icons.Expand = 'ms-Icon ms-Icon--ChevronDown';
660
+ Icons.Collapse = 'ms-Icon ms-Icon--ChevronUp';
661
+ Icons.SortAsc = 'ms-Icon ms-Icon--Ascending';
662
+ Icons.SortDesc = 'ms-Icon ms-Icon--Descending';
663
+ Icons.Details = ' ms-Icon ms-Icon--AccountActivity';
664
+
665
+ var NavLink = /** @class */ (function () {
666
+ function NavLink(text, path, exact, external, icon) {
667
+ if (exact === void 0) { exact = false; }
668
+ if (external === void 0) { external = false; }
669
+ this.text = text;
670
+ this.path = path;
671
+ this.exact = exact;
672
+ this.external = external;
673
+ this.icon = icon;
674
+ }
675
+ return NavLink;
676
+ }());
677
+ var ExternalNavLink = /** @class */ (function (_super) {
678
+ __extends(ExternalNavLink, _super);
679
+ function ExternalNavLink(text, path, openInNewTab, icon) {
680
+ return _super.call(this, text, path, true, openInNewTab, icon) || this;
681
+ }
682
+ return ExternalNavLink;
683
+ }(NavLink));
684
+ var FragmentNavLink = /** @class */ (function (_super) {
685
+ __extends(FragmentNavLink, _super);
686
+ function FragmentNavLink(text, path, icon) {
687
+ return _super.call(this, text, path, true, true, icon) || this;
688
+ }
689
+ return FragmentNavLink;
690
+ }(NavLink));
691
+ var ViewAction = /** @class */ (function () {
692
+ function ViewAction(type, key, param, icon, tooltip) {
693
+ this.type = type;
694
+ this.key = key;
695
+ this.param = param;
696
+ this.icon = icon;
697
+ this.tooltip = tooltip;
698
+ }
699
+ return ViewAction;
700
+ }());
701
+ var ListViewType = /** @class */ (function () {
702
+ function ListViewType() {
703
+ }
704
+ return ListViewType;
705
+ }());
706
+ ListViewType.Tiles = 'tiles';
707
+ ListViewType.Table = 'table';
708
+ ListViewType.Map = 'map';
709
+ ListViewType.Gallery = 'gallery';
710
+ var RouterViewAction = /** @class */ (function (_super) {
711
+ __extends(RouterViewAction, _super);
712
+ function RouterViewAction(icon, link, outlet, tooltip) {
713
+ var _this = _super.call(this, 'router-link', null, null, icon, tooltip) || this;
714
+ _this.outlet = null;
715
+ _this.link = null;
716
+ _this.outlet = outlet;
717
+ _this.link = link;
718
+ return _this;
719
+ }
720
+ return RouterViewAction;
721
+ }(ViewAction));
722
+ var SwitchViewAction = /** @class */ (function (_super) {
723
+ __extends(SwitchViewAction, _super);
724
+ function SwitchViewAction(view, icon, tooltip) {
725
+ return _super.call(this, 'switch-view', null, view, icon, tooltip) || this;
726
+ }
727
+ return SwitchViewAction;
728
+ }(ViewAction));
729
+ var HeaderMetaItem = /** @class */ (function () {
730
+ function HeaderMetaItem() {
731
+ this.key = null;
732
+ this.icon = null;
733
+ this.text = null;
734
+ }
735
+ return HeaderMetaItem;
736
+ }());
737
+ var MenuOption = /** @class */ (function () {
738
+ function MenuOption(text, value, description, data, icon) {
739
+ this.text = text;
740
+ this.value = value;
741
+ this.description = description;
742
+ this.data = data;
743
+ this.icon = icon;
744
+ }
745
+ return MenuOption;
746
+ }());
747
+ var DefaultShellConfig = /** @class */ (function () {
748
+ function DefaultShellConfig() {
749
+ this.appLogo = 'https://tailwindui.com/img/logos/workflow-mark.svg?color=white';
750
+ this.appLogoAlt = 'your app name here';
751
+ this.showHeader = true;
752
+ this.showUserNameOnHeader = false;
753
+ this.showFooter = true;
754
+ this.fluid = false;
755
+ }
756
+ return DefaultShellConfig;
757
+ }());
758
+ exports.SCREEN_SIZE = void 0;
759
+ (function (SCREEN_SIZE) {
760
+ SCREEN_SIZE[SCREEN_SIZE["XS"] = 0] = "XS";
761
+ SCREEN_SIZE[SCREEN_SIZE["SM"] = 1] = "SM";
762
+ SCREEN_SIZE[SCREEN_SIZE["MD"] = 2] = "MD";
763
+ SCREEN_SIZE[SCREEN_SIZE["LG"] = 3] = "LG";
764
+ SCREEN_SIZE[SCREEN_SIZE["XL"] = 4] = "XL";
765
+ })(exports.SCREEN_SIZE || (exports.SCREEN_SIZE = {}));
766
+ exports.ToastType = void 0;
767
+ (function (ToastType) {
768
+ ToastType["Info"] = "info";
769
+ ToastType["Success"] = "success";
770
+ ToastType["Error"] = "error";
771
+ ToastType["Warning"] = "warning";
772
+ })(exports.ToastType || (exports.ToastType = {}));
773
+ var NULL_TOAST = { title: '_____NULL_____' };
774
+ exports.SidePaneSize = void 0;
775
+ (function (SidePaneSize) {
776
+ SidePaneSize["Default"] = "";
777
+ SidePaneSize["Small25"] = "25%";
778
+ SidePaneSize["Medium50"] = "50%";
779
+ SidePaneSize["Large75"] = "75%";
780
+ })(exports.SidePaneSize || (exports.SidePaneSize = {}));
781
+ exports.SidePaneOverlayType = void 0;
782
+ (function (SidePaneOverlayType) {
783
+ SidePaneOverlayType["Default"] = "";
784
+ SidePaneOverlayType["None"] = "-opacity-0";
785
+ SidePaneOverlayType["Light"] = "";
786
+ SidePaneOverlayType["Dark"] = "-opacity-50";
787
+ })(exports.SidePaneOverlayType || (exports.SidePaneOverlayType = {}));
788
+
789
+ var PagerComponent = /** @class */ (function () {
790
+ function PagerComponent(router) {
791
+ this.router = router;
792
+ // BUSY STATE
793
+ this.busy = false;
794
+ // PAGING
795
+ this.count = null;
796
+ this.page = 1;
797
+ // tslint:disable-next-line:no-input-rename
798
+ this.pageSize = 20;
799
+ // tslint:disable-next-line:no-input-rename
800
+ this.pageSizeOptions = [
801
+ new MenuOption('10', 10),
802
+ new MenuOption('20', 20),
803
+ new MenuOption('30', 30),
804
+ new MenuOption('50', 50),
805
+ new MenuOption('100', 100)
806
+ ];
807
+ this.pages = [];
808
+ this.pageChanged = new i0.EventEmitter();
809
+ this.pageSizeChanged = new i0.EventEmitter();
810
+ this.canPreviousPage = false;
811
+ this.canNextPage = false;
812
+ // SORTING
813
+ // tslint:disable-next-line:no-input-rename
814
+ this.sortOptions = [];
815
+ // tslint:disable-next-line:no-input-rename
816
+ this.sort = null;
817
+ // tslint:disable-next-line:no-input-rename
818
+ this.sortdir = 'desc';
819
+ this.sortChanged = new i0.EventEmitter();
820
+ this.sortdirChanged = new i0.EventEmitter();
821
+ this.sortdirIcon = Icons.SortDesc;
822
+ }
823
+ PagerComponent.prototype.ngOnChanges = function (changes) {
824
+ this.calcPages();
825
+ };
826
+ PagerComponent.prototype.ngOnInit = function () {
827
+ };
828
+ PagerComponent.prototype.calcPages = function () {
829
+ this.pages = [];
830
+ if (this.count && this.count > 0) {
831
+ var pageCount = this.count / this.pageSize;
832
+ for (var i = 0; i < pageCount; i++) {
833
+ this.pages.push(new MenuOption(i + 1 + '', i + 1));
834
+ }
835
+ }
836
+ this.canPreviousPage = this.page > 1;
837
+ this.canNextPage = this.page < this.pages.length;
838
+ };
839
+ PagerComponent.prototype.nextPage = function () {
840
+ var next = this.page + 1;
841
+ this.gotoPage(next);
842
+ };
843
+ PagerComponent.prototype.previousPage = function () {
844
+ var previous = this.page - 1;
845
+ this.gotoPage(previous);
846
+ };
847
+ PagerComponent.prototype.gotoPage = function (page) {
848
+ this.page = page;
849
+ this.pageChanged.emit(page);
850
+ this.calcPages();
851
+ };
852
+ PagerComponent.prototype.pageSizeOptionChanged = function (pageSize) {
853
+ this.pageSizeChanged.emit(pageSize);
854
+ this.calcPages();
855
+ };
856
+ PagerComponent.prototype.pageOptionChanged = function (page) {
857
+ this.pageChanged.emit(page);
858
+ this.calcPages();
859
+ };
860
+ PagerComponent.prototype.sortOptionChanged = function (sort) {
861
+ this.sortChanged.emit(sort);
862
+ };
863
+ PagerComponent.prototype.toggleSortdir = function () {
864
+ var sortdir = 'desc';
865
+ if (this.sortdir === 'desc') {
866
+ sortdir = 'asc';
867
+ this.sortdirIcon = Icons.SortAsc;
868
+ }
869
+ else {
870
+ sortdir = 'desc';
871
+ this.sortdirIcon = Icons.SortDesc;
872
+ }
873
+ this.sortdirChanged.emit(sortdir);
874
+ };
875
+ return PagerComponent;
876
+ }());
877
+ PagerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PagerComponent, deps: [{ token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
878
+ PagerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: PagerComponent, selector: "lib-pager", inputs: { busy: "busy", count: "count", page: "page", pageSize: ["page-size", "pageSize"], pageSizeOptions: ["page-size-options", "pageSizeOptions"], sortOptions: ["sort-options", "sortOptions"], sort: "sort", sortdir: ["sort-dir", "sortdir"] }, outputs: { pageChanged: "pageChanged", pageSizeChanged: "pageSizeChanged", sortChanged: "sortChanged", sortdirChanged: "sortdirChanged" }, usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"pager-container\">\r\n <div class=\"pager-container-inner\">\r\n <div class=\"inline-flex\" *ngIf=\"sortOptions && sortOptions.length > 0\">\r\n <lib-drop-down-menu [options]=\"sortOptions\" [selected]=\"sort\" (selectedChanged)=\"sortOptionChanged($event)\"></lib-drop-down-menu>\r\n <button (click)=\"toggleSortdir()\" [disabled]=\"!sort || busy\" class=\"pager-icon-button\">\r\n <span class=\"sr-only\">sort direction</span>\r\n <span class=\"inline-block relative\">\r\n <i [class]=\"sortdirIcon\"></i>\r\n </span>\r\n </button>\r\n </div>\r\n <div class=\"pager-pages-container\">\r\n <lib-drop-down-menu [options]=\"pageSizeOptions\" [selected]=\"pageSize\" (selectedChanged)=\"pageSizeOptionChanged($event)\"></lib-drop-down-menu>\r\n <div class=\"mx-2\" *ngIf=\"count !== null && count > pageSize\">\r\n <button [disabled]=\"!canPreviousPage || busy\" (click)=\"previousPage()\"\r\n class=\"pager-arrow-button-left\">\r\n <span class=\"sr-only\">Previous</span>\r\n <svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\" d=\"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n </button>\r\n <button [disabled]=\"!canNextPage || busy\" (click)=\"nextPage()\"\r\n class=\"pager-arrow-button-right\">\r\n <span class=\"sr-only\">Next</span>\r\n <svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\" d=\"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <lib-drop-down-menu *ngIf=\"(pages && pages.length > 0) && (count !== null && count > pageSize)\" [options]=\"pages\" [selected]=\"page\" (selectedChanged)=\"pageOptionChanged($event)\"></lib-drop-down-menu>\r\n </div>\r\n </div>\r\n</div>\r\n", components: [{ type: DropDownMenuComponent, selector: "lib-drop-down-menu", inputs: ["options", "selected", "multiple", "placeholder"], outputs: ["selectedChange", "selectedChanged"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
879
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PagerComponent, decorators: [{
880
+ type: i0.Component,
881
+ args: [{
882
+ selector: 'lib-pager',
883
+ templateUrl: './pager.component.html'
884
+ }]
885
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }]; }, propDecorators: { busy: [{
886
+ type: i0.Input
887
+ }], count: [{
888
+ type: i0.Input
889
+ }], page: [{
890
+ type: i0.Input
891
+ }], pageSize: [{
892
+ type: i0.Input,
893
+ args: ['page-size']
894
+ }], pageSizeOptions: [{
895
+ type: i0.Input,
896
+ args: ['page-size-options']
897
+ }], pageChanged: [{
898
+ type: i0.Output
899
+ }], pageSizeChanged: [{
900
+ type: i0.Output
901
+ }], sortOptions: [{
902
+ type: i0.Input,
903
+ args: ['sort-options']
904
+ }], sort: [{
905
+ type: i0.Input,
906
+ args: ['sort']
907
+ }], sortdir: [{
908
+ type: i0.Input,
909
+ args: ['sort-dir']
910
+ }], sortChanged: [{
911
+ type: i0.Output
912
+ }], sortdirChanged: [{
913
+ type: i0.Output
914
+ }] } });
915
+
916
+ var ListTileComponent = /** @class */ (function () {
917
+ function ListTileComponent() {
918
+ this.template = null;
919
+ }
920
+ return ListTileComponent;
921
+ }());
922
+ ListTileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListTileComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
923
+ ListTileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ListTileComponent, selector: "lib-list-tile", queries: [{ propertyName: "template", first: true, predicate: i0.TemplateRef, descendants: true }], ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
924
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListTileComponent, decorators: [{
925
+ type: i0.Component,
926
+ args: [{ selector: 'lib-list-tile', template: '<ng-content></ng-content>' }]
927
+ }], ctorParameters: function () { return []; }, propDecorators: { template: [{
928
+ type: i0.ContentChild,
929
+ args: [i0.TemplateRef]
930
+ }] } });
931
+
932
+ var ListColumnComponent = /** @class */ (function () {
933
+ function ListColumnComponent() {
934
+ this.title = null;
935
+ // tslint:disable-next-line:no-input-rename
936
+ this.fullWidth = false;
937
+ this.template = null;
938
+ }
939
+ return ListColumnComponent;
940
+ }());
941
+ ListColumnComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListColumnComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
942
+ ListColumnComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ListColumnComponent, selector: "lib-list-column", inputs: { title: "title", fullWidth: ["full-width", "fullWidth"] }, queries: [{ propertyName: "template", first: true, predicate: i0.TemplateRef, descendants: true }], ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
943
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListColumnComponent, decorators: [{
944
+ type: i0.Component,
945
+ args: [{ selector: 'lib-list-column', template: '<ng-content></ng-content>' }]
946
+ }], ctorParameters: function () { return []; }, propDecorators: { title: [{
947
+ type: i0.Input
948
+ }], fullWidth: [{
949
+ type: i0.Input,
950
+ args: ['full-width']
951
+ }], template: [{
952
+ type: i0.ContentChild,
953
+ args: [i0.TemplateRef]
954
+ }] } });
955
+
956
+ var ListDetailsSectionComponent = /** @class */ (function () {
957
+ function ListDetailsSectionComponent() {
958
+ this.template = null;
959
+ }
960
+ return ListDetailsSectionComponent;
961
+ }());
962
+ ListDetailsSectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListDetailsSectionComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
963
+ ListDetailsSectionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ListDetailsSectionComponent, selector: "lib-list-details-section", queries: [{ propertyName: "template", first: true, predicate: i0.TemplateRef, descendants: true }], ngImport: i0__namespace, template: '<ng-content></ng-content>', isInline: true });
964
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListDetailsSectionComponent, decorators: [{
965
+ type: i0.Component,
966
+ args: [{ selector: 'lib-list-details-section', template: '<ng-content></ng-content>' }]
967
+ }], ctorParameters: function () { return []; }, propDecorators: { template: [{
968
+ type: i0.ContentChild,
969
+ args: [i0.TemplateRef]
970
+ }] } });
971
+
972
+ var ListViewEmptyStateComponent = /** @class */ (function () {
973
+ function ListViewEmptyStateComponent() {
974
+ this.title = 'Δεν βρέθηκαν εγγραφές.';
975
+ // tslint:disable-next-line:no-input-rename
976
+ this.subTitle = 'Παρακαλώ αλλάξτε τα κριτήρια αναζήτησης σας ή ξεκινήστε προσθέτοντας μια νέα εγγραφή';
977
+ // tslint:disable-next-line:no-input-rename
978
+ this.newItemLabel = 'Νέα εγγραφή';
979
+ }
980
+ ListViewEmptyStateComponent.prototype.ngOnInit = function () {
981
+ };
982
+ return ListViewEmptyStateComponent;
983
+ }());
984
+ ListViewEmptyStateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListViewEmptyStateComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
985
+ ListViewEmptyStateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ListViewEmptyStateComponent, selector: "lib-list-view-empty-state", inputs: { title: "title", subTitle: ["sub-title", "subTitle"], newItemLabel: ["new-item-label", "newItemLabel"] }, ngImport: i0__namespace, template: "<div class=\"p-20\">\n <div class=\"text-center p-2\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"mx-auto h-12 w-12 text-gray-400\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4\" />\n </svg>\n <h3 class=\"mt-2 text-sm font-medium text-gray-900\">{{title}}</h3>\n <p class=\"mt-1 text-sm text-gray-500\">\n {{subTitle}}\n </p>\n <div class=\"mt-6\" *ngIf=\"false\">\n <button type=\"button\" class=\"inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-gray-600 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-gray-500\">\n <!-- Heroicon name: solid/plus -->\n <svg class=\"-ml-1 mr-2 h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path vector-effect=\"non-scaling-stroke\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z\" />\n </svg>\n {{newItemLabel}}\n </button>\n </div>\n </div>\n</div>\n", directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
986
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListViewEmptyStateComponent, decorators: [{
987
+ type: i0.Component,
988
+ args: [{
989
+ selector: 'lib-list-view-empty-state',
990
+ templateUrl: './list-view-empty-state.component.html'
991
+ }]
992
+ }], ctorParameters: function () { return []; }, propDecorators: { title: [{
993
+ type: i0.Input
994
+ }], subTitle: [{
995
+ type: i0.Input,
996
+ args: ['sub-title']
997
+ }], newItemLabel: [{
998
+ type: i0.Input,
999
+ args: ['new-item-label']
1000
+ }] } });
1001
+
1002
+ var SkeletonLoaderComponent = /** @class */ (function () {
1003
+ function SkeletonLoaderComponent() {
1004
+ this.count = 5;
1005
+ this.type = 'tiles'; // 'large-tile', 'table'
1006
+ }
1007
+ SkeletonLoaderComponent.prototype.ngOnInit = function () {
1008
+ };
1009
+ SkeletonLoaderComponent.prototype.counter = function (i) {
1010
+ return new Array(i);
1011
+ };
1012
+ return SkeletonLoaderComponent;
1013
+ }());
1014
+ SkeletonLoaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SkeletonLoaderComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1015
+ SkeletonLoaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: SkeletonLoaderComponent, selector: "lib-skeleton-loader", inputs: { count: "count", type: "type" }, ngImport: i0__namespace, template: "<!-- <h1>SKELETON LOADER!</h1> -->\r\n<ng-container *ngSwitch=\"type\">\r\n <div class=\"cards-deck-4\" *ngSwitchCase=\"'tiles'\">\r\n <ng-container *ngFor=\"let i of counter(count)\">\r\n <div class=\"relative p-4 w-full bg-white rounded-lg overflow-hidden shadow hover:shadow-md rounded-lg\">\r\n <div class=\"animate-pulse flex flex-col\">\r\n <div class=\"rounded w-full h-32 bg-gray-200\"></div>\r\n <div class=\"flex flex-col mt-5\">\r\n <div class=\"w-full h-5 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-10/12 h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-8/12 h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 mt-5 gap-x-2 gap-y-1\">\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n\r\n <div class=\"flex items-center mt-5\">\r\n <div>\r\n <div class=\"rounded-full bg-gray-200 w-10 h-10\"></div>\r\n </div>\r\n <div class=\"flex justify-between w-full ml-3\">\r\n <div class=\"w-5/12 h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"w-2/12 h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"cards-deck-3\" *ngSwitchCase=\"'large-tiles'\">\r\n <ng-container *ngFor=\"let i of counter(count)\">\r\n <div class=\"relative p-4 w-full bg-white rounded-lg overflow-hidden shadow hover:shadow-md rounded-lg\">\r\n <div class=\"animate-pulse flex flex-col\">\r\n <div class=\"rounded w-full h-52 bg-gray-200\"></div>\r\n <div class=\"flex flex-col mt-5\">\r\n <div class=\"w-full h-5 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-10/12 h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-8/12 h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 mt-5 gap-x-2 gap-y-1\">\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n\r\n <div class=\"flex items-center mt-5\">\r\n <div>\r\n <div class=\"rounded-full bg-gray-200 w-10 h-10\"></div>\r\n </div>\r\n <div class=\"flex justify-between w-full ml-3\">\r\n <div class=\"w-5/12 h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"w-2/12 h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"cards-deck-1\" *ngSwitchCase=\"'table'\">\r\n <ng-container *ngFor=\"let i of counter(count)\">\r\n <div class=\"border border-light-blue-300 shadow rounded-sm p-4 max-w-sm w-full mx-auto mb-4\">\r\n <div class=\"animate-pulse flex space-x-4\">\r\n <div class=\"rounded-full bg-light-blue-400 h-12 w-12\">&nbsp;</div>\r\n <div class=\"flex-1 space-y-4 py-1\">\r\n <div class=\"h-4 bg-light-blue-400 rounded w-3/4\">&nbsp;</div>\r\n <div class=\"space-y-2\">\r\n <div class=\"h-4 bg-light-blue-400 rounded\">&nbsp;</div>\r\n <div class=\"h-4 bg-light-blue-400 rounded w-5/6\">&nbsp;</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"cards-deck-3\" *ngSwitchDefault>\r\n <ng-container *ngFor=\"let i of counter(count)\">\r\n <div class=\"relative p-4 w-full bg-white rounded-lg overflow-hidden shadow hover:shadow-md rounded-lg\">\r\n <div class=\"animate-pulse flex flex-col\">\r\n <div class=\"rounded w-full h-52 bg-gray-200\"></div>\r\n <div class=\"flex flex-col mt-5\">\r\n <div class=\"w-full h-5 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-10/12 h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-8/12 h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 mt-5 gap-x-2 gap-y-1\">\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"mt-2 w-full h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n\r\n <div class=\"flex items-center mt-5\">\r\n <div>\r\n <div class=\"rounded-full bg-gray-200 w-10 h-10\"></div>\r\n </div>\r\n <div class=\"flex justify-between w-full ml-3\">\r\n <div class=\"w-5/12 h-3 bg-gray-200 rounded\"></div>\r\n <div class=\"w-2/12 h-3 bg-gray-200 rounded\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</ng-container>\r\n", directives: [{ type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
1016
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SkeletonLoaderComponent, decorators: [{
1017
+ type: i0.Component,
1018
+ args: [{
1019
+ // tslint:disable-next-line:component-selector
1020
+ selector: 'lib-skeleton-loader',
1021
+ templateUrl: './skeleton-loader.component.html'
1022
+ }]
1023
+ }], ctorParameters: function () { return []; }, propDecorators: { count: [{
1024
+ type: i0.Input
1025
+ }], type: [{
1026
+ type: i0.Input
1027
+ }] } });
1028
+
1029
+ var ListViewComponent = /** @class */ (function () {
1030
+ function ListViewComponent() {
1031
+ // BUSY STATE
1032
+ this.busy = false;
1033
+ this.expandIcon = Icons.Expand;
1034
+ this.collapseIcon = Icons.Collapse;
1035
+ // tslint:disable-next-line:no-input-rename
1036
+ this.showPager = true;
1037
+ // PAGING - pass through for pager component
1038
+ this.count = null;
1039
+ this.page = 1;
1040
+ // tslint:disable-next-line:no-input-rename
1041
+ this.pageSize = 20;
1042
+ // tslint:disable-next-line:no-input-rename
1043
+ this.pageSizeOptions = [];
1044
+ this.pageChanged = new i0.EventEmitter();
1045
+ this.pageSizeChanged = new i0.EventEmitter();
1046
+ this.detailsOpened = new i0.EventEmitter();
1047
+ this.tableViewSupported = false;
1048
+ this.multipleFullWidth = false;
1049
+ this.fullWidthTHClass = 'list-view-th-full';
1050
+ this.fullWidthTDClass = 'list-view-td-full';
1051
+ this.tilesViewSupported = false;
1052
+ this.detailsSectionSupported = false;
1053
+ this.loaderItems = [];
1054
+ // DETAILS SECTION
1055
+ // Check if details section and button should be displayed according to the count of the value given
1056
+ // tslint:disable-next-line:no-input-rename
1057
+ this.detailsSectionPropertyCount = null;
1058
+ // SORTING - pass through for pager component
1059
+ // tslint:disable-next-line:no-input-rename
1060
+ this.sortOptions = [];
1061
+ this.sort = null;
1062
+ // tslint:disable-next-line:no-input-rename
1063
+ this.sortdir = '-';
1064
+ this.sortChanged = new i0.EventEmitter();
1065
+ this.sortdirChanged = new i0.EventEmitter();
1066
+ this.view = ListViewType.Table;
1067
+ // COLUMNS
1068
+ this.columns = [];
1069
+ this.tilesDeckClass = 'cards-deck-4';
1070
+ // tslint:disable-next-line:no-input-rename
1071
+ this.tilesCount = 4;
1072
+ this.tileTemplate = null;
1073
+ this.detailsTemplate = null;
1074
+ for (var i = 0; i < 5; i++) {
1075
+ this.loaderItems.push({});
1076
+ }
1077
+ }
1078
+ Object.defineProperty(ListViewComponent.prototype, "cols", {
1079
+ set: function (refs) {
1080
+ this.columns = refs === null || refs === void 0 ? void 0 : refs.toArray();
1081
+ if (this.columns && this.columns.length > 0) {
1082
+ this.tableViewSupported = true;
1083
+ }
1084
+ this.multipleFullWidth = this.columns.filter(function (c) { return c.fullWidth; }).length > 1;
1085
+ this.fullWidthTHClass = this.multipleFullWidth ? 'list-view-th-half' : 'list-view-th-full';
1086
+ this.fullWidthTDClass = this.multipleFullWidth ? 'list-view-td-half' : 'list-view-td-full';
1087
+ },
1088
+ enumerable: false,
1089
+ configurable: true
1090
+ });
1091
+ Object.defineProperty(ListViewComponent.prototype, "tiles", {
1092
+ set: function (ref) {
1093
+ this.tileTemplate = ref;
1094
+ if (this.tileTemplate) {
1095
+ this.tilesViewSupported = true;
1096
+ }
1097
+ },
1098
+ enumerable: false,
1099
+ configurable: true
1100
+ });
1101
+ Object.defineProperty(ListViewComponent.prototype, "details", {
1102
+ set: function (ref) {
1103
+ this.detailsTemplate = ref;
1104
+ if (this.detailsTemplate) {
1105
+ this.detailsSectionSupported = true;
1106
+ }
1107
+ },
1108
+ enumerable: false,
1109
+ configurable: true
1110
+ });
1111
+ ListViewComponent.prototype.ngOnChanges = function (changes) {
1112
+ var tilesCountChange = changes['tiles-count'] || changes.tilesCount;
1113
+ if (tilesCountChange) {
1114
+ this.setTilesDeckClass(tilesCountChange.currentValue);
1115
+ }
1116
+ };
1117
+ // events
1118
+ ListViewComponent.prototype.emitPageChanged = function ($event) {
1119
+ this.pageChanged.emit($event);
1120
+ };
1121
+ ListViewComponent.prototype.emitPageSizeChanged = function ($event) {
1122
+ this.pageSizeChanged.emit($event);
1123
+ };
1124
+ ListViewComponent.prototype.emitSortChanged = function ($event) {
1125
+ this.sortChanged.emit($event);
1126
+ };
1127
+ ListViewComponent.prototype.emitSortdirChanged = function ($event) {
1128
+ this.sortdirChanged.emit($event);
1129
+ };
1130
+ ListViewComponent.prototype.toggleDetails = function (item) {
1131
+ item.detailsExpanded = !item.detailsExpanded;
1132
+ this.detailsOpened.emit({ item: item, open: item.detailsExpanded });
1133
+ };
1134
+ // helpers
1135
+ ListViewComponent.prototype.setTilesDeckClass = function (tiles) {
1136
+ if (tiles >= 1 && tiles <= 4) {
1137
+ this.tilesDeckClass =
1138
+ this.view !== ListViewType.Gallery
1139
+ ? "cards-deck-" + tiles
1140
+ : this.items && this.items.length > 0
1141
+ ? "gallery-deck-" + tiles
1142
+ : 'gallery-deck';
1143
+ }
1144
+ else {
1145
+ this.tilesDeckClass =
1146
+ this.view !== ListViewType.Gallery
1147
+ ? 'cards-deck-3'
1148
+ : this.items && this.items.length > 0
1149
+ ? 'gallery-deck-3'
1150
+ : 'gallery-deck';
1151
+ }
1152
+ };
1153
+ return ListViewComponent;
1154
+ }());
1155
+ ListViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListViewComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1156
+ ListViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ListViewComponent, selector: "lib-list-view", inputs: { busy: "busy", items: "items", showPager: ["show-pager", "showPager"], count: "count", page: "page", pageSize: ["page-size", "pageSize"], pageSizeOptions: ["page-size-options", "pageSizeOptions"], detailsSectionPropertyCount: ["details-section-property-count", "detailsSectionPropertyCount"], sortOptions: ["sort-options", "sortOptions"], sort: "sort", sortdir: ["sort-dir", "sortdir"], view: "view", tilesCount: ["tiles-count", "tilesCount"] }, outputs: { pageChanged: "pageChanged", pageSizeChanged: "pageSizeChanged", detailsOpened: "detailsOpened", sortChanged: "sortChanged", sortdirChanged: "sortdirChanged" }, queries: [{ propertyName: "tiles", first: true, predicate: ListTileComponent, descendants: true, read: ListTileComponent }, { propertyName: "details", first: true, predicate: ListDetailsSectionComponent, descendants: true, read: ListDetailsSectionComponent }, { propertyName: "cols", predicate: ListColumnComponent, read: ListColumnComponent }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"px-2\">\r\n\r\n <lib-pager *ngIf=\"showPager\"\r\n [page]=\"page\"\r\n [page-size]=\"pageSize\"\r\n [count]=\"count\"\r\n [sort-options]=\"sortOptions\"\r\n [sort]=\"sort\"\r\n [sort-dir]=\"sortdir\"\r\n [busy]=\"busy\"\r\n (pageChanged)=\"emitPageChanged($event)\"\r\n (pageSizeChanged)=\"emitPageSizeChanged($event)\"\r\n (sortChanged)=\"emitSortChanged($event)\"\r\n (sortdirChanged)=\"emitSortdirChanged($event)\">\r\n </lib-pager>\r\n</div>\r\n\r\n<ng-container *ngIf=\"!busy && items && items.length === 0\">\r\n <div class=\"cards-deck-1\">\r\n <lib-list-view-empty-state></lib-list-view-empty-state>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container [ngSwitch]=\"view\">\r\n\r\n <ng-container *ngSwitchCase=\"'tiles'\">\r\n <div [class]=\"tilesDeckClass\">\r\n\r\n <lib-skeleton-loader *ngIf=\"busy\" [count]=\"5\" [type]=\"'tiles'\"></lib-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"items && items.length > 0\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <span *ngIf=\"!tileTemplate || !tileTemplate.template\">template missing..</span>\r\n <ng-template [ngTemplateOutlet]=\"tileTemplate.template\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-template>\r\n </ng-container>\r\n </ng-container>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <!-- *ngSwitchCase=\"'gallery'\" -->\r\n <ng-container *ngSwitchCase=\"'gallery'\">\r\n <ul role=\"list\" [class]=\"tilesDeckClass\">\r\n\r\n <lib-skeleton-loader *ngIf=\"busy\" [count]=\"5\" [type]=\"'tiles'\"></lib-skeleton-loader>\r\n\r\n <ng-container *ngIf=\"!busy && items && items.length > 0\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <span *ngIf=\"!tileTemplate || !tileTemplate.template\">template missing..</span>\r\n <ng-template [ngTemplateOutlet]=\"tileTemplate.template\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-template>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </ng-container>\r\n\r\n <!-- *ngSwitchCase=\"'table'\" -->\r\n <ng-container *ngSwitchDefault>\r\n\r\n <div class=\"list-view-container\">\r\n <div class=\"list-view-container-inner\">\r\n <table class=\"list-view-table\">\r\n <thead class=\"list-view-thead\">\r\n <tr>\r\n <ng-container *ngIf=\"detailsSectionSupported\">\r\n <th class=\"list-view-th-details\"></th>\r\n </ng-container>\r\n <ng-container *ngFor=\"let col of columns\">\r\n <th scope=\"col\"\r\n [class]=\"col.fullWidth ? fullWidthTHClass : 'list-view-th'\">\r\n {{col.title}}\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </thead>\r\n <tbody class=\"list-view-tbody\" *ngIf=\"busy\">\r\n <ng-container *ngFor=\"let item of loaderItems;let i=index\">\r\n <tr class=\"list-view-tr\">\r\n <ng-container *ngIf=\"detailsSectionSupported\">\r\n <td class=\"list-view-td-details\"\r\n *ngIf=\"detailsSectionPropertyCount !== null ? item[detailsSectionPropertyCount] !== 0 : true; else hiddenDetailsButton\">\r\n <button disabled\r\n type=\"button\"\r\n class=\"expand-collapse-button\">\r\n <!-- Heroicon name: solid/plus -->\r\n <i [class]=\"item.detailsExpanded ? collapseIcon : expandIcon\"></i>\r\n </button>\r\n </td>\r\n <ng-template #hiddenDetailsButton>\r\n <td class=\"list-view-td-details\"></td>\r\n </ng-template>\r\n </ng-container>\r\n <td *ngFor=\"let col of columns\"\r\n [class]=\"col.fullWidth ? fullWidthTDClass : 'list-view-td'\">\r\n <div class=\"w-full animate-pulse h-8 bg-gray-200 rounded\"></div>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"detailsSectionSupported\">\r\n <tr *ngIf=\"item.detailsExpanded\">\r\n <td [colSpan]=\"columns.length + 1\"\r\n class=\"list-view-td bg-gray-100\">\r\n <ng-template [ngTemplateOutlet]=\"detailsTemplate.template\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-template>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </tbody>\r\n <tbody class=\"list-view-tbody\" *ngIf=\"!busy\">\r\n <ng-container *ngFor=\"let item of items;let i=index\">\r\n <tr class=\"list-view-tr\">\r\n <ng-container *ngIf=\"detailsSectionSupported\">\r\n <td class=\"list-view-td-details\"\r\n *ngIf=\"detailsSectionPropertyCount !== null ? item[detailsSectionPropertyCount] !== 0 : true; else hiddenDetailsButton\">\r\n <button (click)=\"toggleDetails(item)\"\r\n type=\"button\"\r\n class=\"expand-collapse-button\">\r\n <!-- Heroicon name: solid/plus -->\r\n <i [class]=\"item.detailsExpanded ? collapseIcon : expandIcon\"></i>\r\n </button>\r\n </td>\r\n <ng-template #hiddenDetailsButton>\r\n <td class=\"list-view-td-details\"></td>\r\n </ng-template>\r\n </ng-container>\r\n <td *ngFor=\"let col of columns\"\r\n [class]=\"col.fullWidth ? fullWidthTDClass : 'list-view-td'\">\r\n <ng-template [ngTemplateOutlet]=\"col.template\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-template>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"detailsSectionSupported\">\r\n <tr *ngIf=\"item.detailsExpanded\">\r\n <td [colSpan]=\"columns.length + 1\"\r\n class=\"list-view-td bg-gray-100\">\r\n <ng-template [ngTemplateOutlet]=\"detailsTemplate.template\"\r\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-template>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-content></ng-content>\r\n", components: [{ type: PagerComponent, selector: "lib-pager", inputs: ["busy", "count", "page", "page-size", "page-size-options", "sort-options", "sort", "sort-dir"], outputs: ["pageChanged", "pageSizeChanged", "sortChanged", "sortdirChanged"] }, { type: ListViewEmptyStateComponent, selector: "lib-list-view-empty-state", inputs: ["title", "sub-title", "new-item-label"] }, { type: SkeletonLoaderComponent, selector: "lib-skeleton-loader", inputs: ["count", "type"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
1157
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ListViewComponent, decorators: [{
1158
+ type: i0.Component,
1159
+ args: [{
1160
+ selector: 'lib-list-view',
1161
+ templateUrl: './list-view.component.html'
1162
+ }]
1163
+ }], ctorParameters: function () { return []; }, propDecorators: { busy: [{
1164
+ type: i0.Input
1165
+ }], items: [{
1166
+ type: i0.Input
1167
+ }], showPager: [{
1168
+ type: i0.Input,
1169
+ args: ['show-pager']
1170
+ }], count: [{
1171
+ type: i0.Input
1172
+ }], page: [{
1173
+ type: i0.Input
1174
+ }], pageSize: [{
1175
+ type: i0.Input,
1176
+ args: ['page-size']
1177
+ }], pageSizeOptions: [{
1178
+ type: i0.Input,
1179
+ args: ['page-size-options']
1180
+ }], pageChanged: [{
1181
+ type: i0.Output
1182
+ }], pageSizeChanged: [{
1183
+ type: i0.Output
1184
+ }], detailsOpened: [{
1185
+ type: i0.Output
1186
+ }], detailsSectionPropertyCount: [{
1187
+ type: i0.Input,
1188
+ args: ['details-section-property-count']
1189
+ }], sortOptions: [{
1190
+ type: i0.Input,
1191
+ args: ['sort-options']
1192
+ }], sort: [{
1193
+ type: i0.Input
1194
+ }], sortdir: [{
1195
+ type: i0.Input,
1196
+ args: ['sort-dir']
1197
+ }], sortChanged: [{
1198
+ type: i0.Output
1199
+ }], sortdirChanged: [{
1200
+ type: i0.Output
1201
+ }], view: [{
1202
+ type: i0.Input
1203
+ }], cols: [{
1204
+ type: i0.ContentChildren,
1205
+ args: [ListColumnComponent, { read: ListColumnComponent }]
1206
+ }], tilesCount: [{
1207
+ type: i0.Input,
1208
+ args: ['tiles-count']
1209
+ }], tiles: [{
1210
+ type: i0.ContentChild,
1211
+ args: [ListTileComponent, { read: ListTileComponent }]
1212
+ }], details: [{
1213
+ type: i0.ContentChild,
1214
+ args: [ListDetailsSectionComponent, { read: ListDetailsSectionComponent }]
1215
+ }] } });
1216
+
1217
+ var CollapsiblePanelComponent = /** @class */ (function () {
1218
+ function CollapsiblePanelComponent() {
1219
+ this.title = null;
1220
+ this.visible = false;
1221
+ }
1222
+ CollapsiblePanelComponent.prototype.ngOnInit = function () {
1223
+ };
1224
+ return CollapsiblePanelComponent;
1225
+ }());
1226
+ CollapsiblePanelComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: CollapsiblePanelComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1227
+ CollapsiblePanelComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: CollapsiblePanelComponent, selector: "lib-collapsible-panel", inputs: { title: "title" }, ngImport: i0__namespace, template: "<div class=\"collapsible-panel-container\">\r\n <div class=\"collapsible-panel-container-shadow\">\r\n <div class=\"collapsible-panel-container-inner\">\r\n <button type=\"button\" class=\"collapsible-panel-button\" (click)=\"visible = !visible\">\r\n <div class=\"collapsible-panel-button-content-container\">\r\n <span>{{ title }} </span>\r\n <span class=\"ico-plus\"></span>\r\n </div>\r\n </button>\r\n <div class=\"collapsible-panel-content-container\" *ngIf=\"visible\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1228
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: CollapsiblePanelComponent, decorators: [{
1229
+ type: i0.Component,
1230
+ args: [{
1231
+ selector: 'lib-collapsible-panel',
1232
+ templateUrl: './collapsible-panel.component.html'
1233
+ }]
1234
+ }], ctorParameters: function () { return []; }, propDecorators: { title: [{
1235
+ type: i0.Input
1236
+ }] } });
1237
+
1238
+ var KpiTileComponent = /** @class */ (function () {
1239
+ function KpiTileComponent() {
1240
+ this.title = undefined;
1241
+ this.busy = false;
1242
+ this.kpi = undefined;
1243
+ // tslint:disable-next-line:no-output-rename
1244
+ this.tileAction = new i0.EventEmitter();
1245
+ }
1246
+ KpiTileComponent.prototype.ngOnInit = function () {
1247
+ };
1248
+ KpiTileComponent.prototype.emitTileAction = function ($event) {
1249
+ $event.preventDefault();
1250
+ $event.stopPropagation();
1251
+ this.tileAction.emit($event);
1252
+ return false;
1253
+ };
1254
+ return KpiTileComponent;
1255
+ }());
1256
+ KpiTileComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: KpiTileComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1257
+ KpiTileComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: KpiTileComponent, selector: "lib-kpi-tile", inputs: { title: "title", busy: "busy", kpi: "kpi" }, outputs: { tileAction: "tile-action" }, ngImport: i0__namespace, template: "<div class=\"card\"\r\n [ngClass]=\"{'card-deck-busy' : busy }\">\r\n <div class=\"card-body\">\r\n <div class=\"kpi-tile-title-container\">\r\n <a href=\"#\"\r\n class=\"kpi-tile-action\"\r\n (click)=\"emitTileAction($event)\">{{title || '-'}}</a>\r\n </div>\r\n <p class=\"kpi-tile-value\">{{kpi || '-'}}</p>\r\n <div class=\"card-footer\">\r\n <div class=\"text-xs\">\r\n <a href=\"#\"\r\n class=\"kpi-tile-action\"\r\n (click)=\"emitTileAction($event)\">\u03A0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B1</a>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1258
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: KpiTileComponent, decorators: [{
1259
+ type: i0.Component,
1260
+ args: [{
1261
+ selector: 'lib-kpi-tile',
1262
+ templateUrl: './kpi-tile.component.html'
1263
+ }]
1264
+ }], ctorParameters: function () { return []; }, propDecorators: { title: [{
1265
+ type: i0.Input
1266
+ }], busy: [{
1267
+ type: i0.Input
1268
+ }], kpi: [{
1269
+ type: i0.Input
1270
+ }], tileAction: [{
1271
+ type: i0.Output,
1272
+ args: ['tile-action']
1273
+ }] } });
1274
+
1275
+ // freaksly simple date picker : https://tailwind-elements.com/docs/standard/forms/datepicker/
1276
+ var DatepickerComponent = /** @class */ (function () {
1277
+ function DatepickerComponent() {
1278
+ this.readonly = false;
1279
+ this.disabled = false;
1280
+ this.displayFormat = 'dd/MM/yyyy';
1281
+ this.placeholder = '';
1282
+ this.value = null;
1283
+ this.valueChange = new i0.EventEmitter();
1284
+ this.showCalendar = false;
1285
+ this.showYears = false;
1286
+ this.monthNames = [
1287
+ 'Ιανουάριος',
1288
+ 'Φεβρουάριος',
1289
+ 'Μάρτιος',
1290
+ 'Απρίλιος',
1291
+ 'Μάϊος',
1292
+ 'Ιούνιος',
1293
+ 'Ιούλιος',
1294
+ 'Αύγουστος',
1295
+ 'Σεπτέμβριος',
1296
+ 'Οκτώβριος',
1297
+ 'Νοεμβριος',
1298
+ 'Δεκέμβριος',
1299
+ ];
1300
+ this.dayNames = ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'];
1301
+ this.month = -1;
1302
+ this.year = -1;
1303
+ this.calendarDates = [];
1304
+ this.calendarYears = [];
1305
+ this.showCalendarYears = [];
1306
+ this.blankDays = [];
1307
+ this.calendarYearPage = 1;
1308
+ this.yearsPerPage = 30;
1309
+ this.onChange$ = undefined;
1310
+ this.onTouched$ = undefined;
1311
+ }
1312
+ DatepickerComponent.prototype.ngOnInit = function () {
1313
+ var _a, _b;
1314
+ var today = new Date();
1315
+ this.month = today.getMonth();
1316
+ this.year = today.getFullYear();
1317
+ this.calendarDates = [{ day: this.value, today: this.value, selected: this.value }];
1318
+ this.calendarYears = [{ year: (_a = this.value) === null || _a === void 0 ? void 0 : _a.getFullYear(), today: this.value, selected: this.value }];
1319
+ var yearsArray = [];
1320
+ for (var i = 1950; i <= today.getFullYear() + 2; i++) {
1321
+ yearsArray.push({ year: i, today: this.compareDates(today, null, i), selected: i == ((_b = this.value) === null || _b === void 0 ? void 0 : _b.getFullYear()) });
1322
+ }
1323
+ this.calendarYears = yearsArray;
1324
+ this.showCalendarYears = this.paginate(this.calendarYears, 1);
1325
+ this.calcDays();
1326
+ };
1327
+ DatepickerComponent.prototype.writeValue = function (obj) {
1328
+ if (obj) {
1329
+ this.value = new Date(obj);
1330
+ this.month = this.value.getMonth();
1331
+ this.year = this.value.getFullYear();
1332
+ }
1333
+ };
1334
+ DatepickerComponent.prototype.registerOnChange = function (fn) {
1335
+ this.onChange$ = fn;
1336
+ };
1337
+ DatepickerComponent.prototype.registerOnTouched = function (fn) {
1338
+ this.onTouched$ = fn;
1339
+ };
1340
+ DatepickerComponent.prototype.onBlur = function (event) {
1341
+ if (this.onTouched$) {
1342
+ this.onTouched$();
1343
+ }
1344
+ this.getDateFromInput();
1345
+ };
1346
+ DatepickerComponent.prototype.selectDateValue = function (date) {
1347
+ // This should be in UTC
1348
+ var selectedDate = new Date(this.year, this.month, date.day, 3, 0, 0, 0);
1349
+ this.value = selectedDate;
1350
+ this.valueChange.emit(this.value);
1351
+ if (this.onChange$) {
1352
+ this.onChange$(this.value);
1353
+ }
1354
+ this.updateDays();
1355
+ if (this.onTouched$) {
1356
+ this.onTouched$();
1357
+ }
1358
+ this.showCalendar = false;
1359
+ };
1360
+ DatepickerComponent.prototype.selectYearValue = function (year) {
1361
+ var _a, _b, _c;
1362
+ // This should be in UTC
1363
+ var selectedDate = new Date(year.year, (_a = this.month) !== null && _a !== void 0 ? _a : 1, (_c = (_b = this.calendarDates) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x.selected == true; }).day) !== null && _c !== void 0 ? _c : 1, 3, 0, 0, 0);
1364
+ this.year = year.year;
1365
+ this.value = selectedDate;
1366
+ this.valueChange.emit(this.value);
1367
+ if (this.onChange$) {
1368
+ this.onChange$(this.value);
1369
+ }
1370
+ this.updateDays();
1371
+ if (this.onTouched$) {
1372
+ this.onTouched$();
1373
+ }
1374
+ this.showYears = false;
1375
+ this.showCalendar = true;
1376
+ this.calcDays();
1377
+ };
1378
+ DatepickerComponent.prototype.previousMonth = function () {
1379
+ if (this.month !== 0) {
1380
+ this.month = this.month - 1;
1381
+ this.calcDays();
1382
+ }
1383
+ else {
1384
+ this.month = 11;
1385
+ this.year = this.year - 1;
1386
+ this.calcDays();
1387
+ }
1388
+ if (this.onTouched$) {
1389
+ this.onTouched$();
1390
+ }
1391
+ };
1392
+ DatepickerComponent.prototype.nextMonth = function () {
1393
+ if (this.month !== 11) {
1394
+ this.month = this.month + 1;
1395
+ this.calcDays();
1396
+ }
1397
+ else {
1398
+ this.month = 0;
1399
+ this.year = this.year + 1;
1400
+ this.calcDays();
1401
+ }
1402
+ if (this.onTouched$) {
1403
+ this.onTouched$();
1404
+ }
1405
+ };
1406
+ DatepickerComponent.prototype.previousYear = function () {
1407
+ this.showCalendarYears = this.paginate(this.calendarYears, this.calendarYearPage > 1 ? --this.calendarYearPage : 1);
1408
+ this.calcDays();
1409
+ if (this.onTouched$) {
1410
+ this.onTouched$();
1411
+ }
1412
+ };
1413
+ DatepickerComponent.prototype.nextYear = function () {
1414
+ this.showCalendarYears = this.paginate(this.calendarYears, this.calendarYearPage <= this.calendarYears.length / this.yearsPerPage
1415
+ ? ++this.calendarYearPage
1416
+ : this.calendarYearPage);
1417
+ this.calcDays();
1418
+ if (this.onTouched$) {
1419
+ this.onTouched$();
1420
+ }
1421
+ };
1422
+ DatepickerComponent.prototype.compareDates = function (date1, day, year) {
1423
+ var _a;
1424
+ if (!date1) {
1425
+ return false;
1426
+ }
1427
+ var d = new Date(year !== null && year !== void 0 ? year : this.year, this.month, day !== null && day !== void 0 ? day : (_a = this.value) === null || _a === void 0 ? void 0 : _a.getDay());
1428
+ return date1.toDateString() === d.toDateString();
1429
+ };
1430
+ ;
1431
+ DatepickerComponent.prototype.calcDays = function () {
1432
+ var _a;
1433
+ var daysInMonth = new Date(this.year, this.month + 1, 0).getDate();
1434
+ // find where to start calendar day of week
1435
+ var dayOfWeek = new Date(this.year, this.month).getDay();
1436
+ var blankdaysArray = new Array();
1437
+ for (var i = 1; i <= dayOfWeek; i++) {
1438
+ // check if month is February
1439
+ blankdaysArray.push(this.month != 2 ? (32 - i) : (29 - i));
1440
+ blankdaysArray.reverse().sort();
1441
+ }
1442
+ var daysArray = [];
1443
+ var today = new Date();
1444
+ for (var i = 1; i <= daysInMonth; i++) {
1445
+ daysArray.push({ day: i, today: this.compareDates(today, i, null), selected: this.compareDates((_a = this.value) !== null && _a !== void 0 ? _a : today, i, null) });
1446
+ }
1447
+ var yearsArray = [];
1448
+ for (var i_1 = 1950; i_1 <= today.getFullYear() + 2; i_1++) {
1449
+ yearsArray.push({ year: i_1, today: this.compareDates(today, null, i_1), selected: i_1 == this.year });
1450
+ }
1451
+ this.calendarYears = yearsArray;
1452
+ this.blankDays = blankdaysArray;
1453
+ this.calendarDates = daysArray;
1454
+ };
1455
+ DatepickerComponent.prototype.updateDays = function () {
1456
+ var _this = this;
1457
+ var today = new Date();
1458
+ this.calendarDates.forEach(function (d) {
1459
+ d.today = _this.compareDates(today, d, _this.year);
1460
+ d.selected = _this.compareDates(_this.value, d, _this.year);
1461
+ });
1462
+ };
1463
+ DatepickerComponent.prototype.paginate = function (array, page_number) {
1464
+ return array.slice((page_number - 1) * this.yearsPerPage, page_number * this.yearsPerPage);
1465
+ };
1466
+ DatepickerComponent.prototype.getDateFromInput = function () {
1467
+ var _a, _b;
1468
+ if (((_a = this.dateInput) === null || _a === void 0 ? void 0 : _a.nativeElement.value) !== '') {
1469
+ var dateParts = (_b = this.dateInput) === null || _b === void 0 ? void 0 : _b.nativeElement.value.split("/");
1470
+ var dateInGrFormat = new Date(+dateParts[2], dateParts[1] - 1, +dateParts[0], 3, 0, 0);
1471
+ if (dateInGrFormat.toString() !== 'Invalid Date') {
1472
+ this.writeValue(dateInGrFormat);
1473
+ this.calcDays();
1474
+ this.valueChange.emit(dateInGrFormat);
1475
+ }
1476
+ if (this.onChange$) {
1477
+ this.onChange$(this.value);
1478
+ }
1479
+ this.updateDays();
1480
+ if (this.onTouched$) {
1481
+ this.onTouched$();
1482
+ }
1483
+ }
1484
+ this.showCalendar = false;
1485
+ };
1486
+ DatepickerComponent.prototype.openYears = function () {
1487
+ this.showYears = !this.showYears;
1488
+ this.calendarYearPage = Math.ceil(this.calendarYears.map(function (x) { return x.year; }).indexOf(this.year) / this.yearsPerPage);
1489
+ this.showCalendarYears = this.paginate(this.calendarYears, this.calendarYearPage !== 0 ? this.calendarYearPage : 1);
1490
+ this.calcDays();
1491
+ };
1492
+ DatepickerComponent.prototype.openCalendar = function () {
1493
+ this.showCalendar = !this.showCalendar;
1494
+ this.calcDays();
1495
+ };
1496
+ DatepickerComponent.prototype.closeCalendar = function () {
1497
+ this.showCalendar = false;
1498
+ this.getDateFromInput();
1499
+ };
1500
+ return DatepickerComponent;
1501
+ }());
1502
+ DatepickerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DatepickerComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1503
+ DatepickerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: DatepickerComponent, selector: "lib-date-picker", inputs: { readonly: "readonly", disabled: "disabled", displayFormat: ["display-format", "displayFormat"], placeholder: "placeholder", value: "value" }, outputs: { valueChange: "valueChange" }, providers: [
1504
+ {
1505
+ provide: forms.NG_VALUE_ACCESSOR,
1506
+ useExisting: i0.forwardRef(function () { return DatepickerComponent; }),
1507
+ multi: true
1508
+ }
1509
+ ], viewQueries: [{ propertyName: "dateInput", first: true, predicate: ["dateInput"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"relative flex\"\r\n (clickOutside)=\"closeCalendar()\">\r\n\r\n <input type=\"text\"\r\n #dateInput\r\n [readonly]=\"readonly\"\r\n name=\"dateInput\"\r\n (blur)=\"onBlur($event)\"\r\n id=\"dateInput\"\r\n (focus)=\"showCalendar = false\"\r\n [value]=\"value | date: displayFormat\"\r\n class=\"w-full focus:ring-0 focus:outline-none rounded-none sm:text-sm border-gray-300 focus:border-0\"\r\n [ngClass]=\"{'cursor-not-allowed': disabled}\"\r\n [placeholder]=\"disabled ? '' : placeholder\">\r\n\r\n <button type=\"button\"\r\n class=\"relative inline-flex items-center px-2 py-2 border border-gray-300 text-sm font-medium rounded-r-sm text-gray-700 bg-gray-50 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-gray-500 focus:border-gray-500\"\r\n [disabled]=\"disabled\"\r\n (click)=\"openCalendar()\"\r\n [ngClass]=\"{'cursor-not-allowed': disabled}\">\r\n <i class=\"ms-Icon ms-Icon--DateTime2\"></i>\r\n </button>\r\n\r\n <div *ngIf=\"showCalendar\"\r\n class=\"bg-gray-100 mt-10 rounded-sm shadow-md p-4 absolute left-0 z-50 w-full\"\r\n style=\"height:18rem;min-width:16rem;\"\r\n name=\"calendar\">\r\n <div class=\"flex justify-between items-center mb-2\">\r\n <div>\r\n <button type=\"button\"\r\n (click)=\"openYears()\">\r\n <span class=\"text-lg font-bold text-gray-800\">\r\n {{monthNames[month]}}\r\n </span>\r\n <span class=\"ml-1 text-lg text-gray-600 font-normal\">\r\n {{year}}</span>\r\n </button>\r\n </div>\r\n <div *ngIf=\"!showYears; else showYearsPickerTmpl\">\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\r\n (click)=\"previousMonth();\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 19l-7-7 7-7\" />\r\n </svg>\r\n </button>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\r\n (click)=\"nextMonth()\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 5l7 7-7 7\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <ng-template #showYearsPickerTmpl>\r\n <div>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25 w-1/2\"\r\n (click)=\"previousYear();\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 19l-7-7 7-7\" />\r\n </svg>\r\n </button>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25 w-1/2\"\r\n (click)=\"nextYear()\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 5l7 7-7 7\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n\r\n <div class=\"flex flex-wrap mb-3 -mx-1\"\r\n *ngIf=\"!showYears; else showCalYearsTmpl\">\r\n <div *ngFor=\"let day of dayNames\"\r\n class=\"text-gray-800 font-medium text-center text-sm uppercase\"\r\n style=\"width: 14.28%\">{{day}}</div>\r\n </div>\r\n\r\n <ng-template #showCalYearsTmpl>\r\n <div class=\"flex flex-wrap -mx-1 items-center\">\r\n <div *ngFor=\"let year of showCalendarYears\"\r\n style=\"width: 18.28%\"\r\n class=\"px-1 mb-1\">\r\n <div (click)=\"selectYearValue(year)\"\r\n class=\"cursor-pointer text-center hover:text-blue-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\r\n [class]=\"year.selected ? 'bg-gray-700 text-blue-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{year.year}}</div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"flex flex-wrap -mx-1 items-center\"\r\n *ngIf=\"!showYears\">\r\n <div *ngFor=\"let blankday of blankDays\"\r\n style=\"width: 14.28%\"\r\n class=\"text-center border p-1 border-transparent text-sm opacity-50\">{{blankday}}</div>\r\n <div *ngFor=\"let date of calendarDates\"\r\n style=\"width: 14.28%\"\r\n class=\"px-1 mb-1\">\r\n <div (click)=\"selectDateValue(date)\"\r\n class=\"cursor-pointer text-center hover:text-blue-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\r\n [class]=\"date.selected ? 'bg-gray-700 text-blue-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{date.day}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>", directives: [{ type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "date": i1__namespace.DatePipe } });
1510
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DatepickerComponent, decorators: [{
1511
+ type: i0.Component,
1512
+ args: [{
1513
+ selector: 'lib-date-picker',
1514
+ templateUrl: './date-picker.component.html',
1515
+ providers: [
1516
+ {
1517
+ provide: forms.NG_VALUE_ACCESSOR,
1518
+ useExisting: i0.forwardRef(function () { return DatepickerComponent; }),
1519
+ multi: true
1520
+ }
1521
+ ]
1522
+ }]
1523
+ }], ctorParameters: function () { return []; }, propDecorators: { readonly: [{
1524
+ type: i0.Input
1525
+ }], disabled: [{
1526
+ type: i0.Input
1527
+ }], displayFormat: [{
1528
+ type: i0.Input,
1529
+ args: ['display-format']
1530
+ }], placeholder: [{
1531
+ type: i0.Input
1532
+ }], value: [{
1533
+ type: i0.Input
1534
+ }], valueChange: [{
1535
+ type: i0.Output
1536
+ }], dateInput: [{
1537
+ type: i0.ViewChild,
1538
+ args: ['dateInput']
1539
+ }] } });
1540
+
1541
+ var ToasterService = /** @class */ (function () {
1542
+ function ToasterService() {
1543
+ this.subject = new rxjs.BehaviorSubject(NULL_TOAST);
1544
+ this.toast$ = this.subject.asObservable()
1545
+ .pipe(operators.filter(function (toast) { return toast !== null && toast.title !== NULL_TOAST.title; }));
1546
+ }
1547
+ ToasterService.prototype.show = function (type, title, body, delay) {
1548
+ this.subject.next({ type: type, title: title, body: body, delay: delay });
1549
+ };
1550
+ return ToasterService;
1551
+ }());
1552
+ ToasterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToasterService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1553
+ ToasterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToasterService, providedIn: 'root' });
1554
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToasterService, decorators: [{
1555
+ type: i0.Injectable,
1556
+ args: [{
1557
+ providedIn: 'root'
1558
+ }]
1559
+ }], ctorParameters: function () { return []; } });
1560
+
1561
+ var ToasterComponent = /** @class */ (function () {
1562
+ function ToasterComponent() {
1563
+ this.i = 0;
1564
+ this.remove = new i0.EventEmitter();
1565
+ this.isMobile = false;
1566
+ this.closed = false;
1567
+ }
1568
+ ToasterComponent.prototype.ngOnInit = function () {
1569
+ window.screen.width > 640 ? this.isMobile = false : this.isMobile = true;
1570
+ };
1571
+ ToasterComponent.prototype.closeToast = function (index) {
1572
+ var _this = this;
1573
+ this.closed = true;
1574
+ setTimeout(function () { return _this.remove.emit(index); }, 100);
1575
+ };
1576
+ return ToasterComponent;
1577
+ }());
1578
+ ToasterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToasterComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1579
+ ToasterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ToasterComponent, selector: "lib-toaster", inputs: { toast: "toast", i: "i" }, outputs: { remove: "remove" }, ngImport: i0__namespace, template: "<div aria-live=\"assertive\"\r\n [ngClass]=\"closed ? 'toast-closed': 'toast z-50'\"\r\n [ngStyle]=\"isMobile ? { 'margin-bottom.px': i * 85 } : {'margin-top.px': i * 85 }\">\r\n <div class=\"toast-container\">\r\n <div class=\"toast-pill\">\r\n <div class=\"toast-context-padding\">\r\n <div class=\"toast-context\"\r\n [ngSwitch]=\"toast?.type\">\r\n <div class=\"toast-icon\"\r\n *ngSwitchCase=\"'info'\">\r\n <svg class=\"h-5 w-5 text-blue-400\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\"\r\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z\"\r\n clip-rule=\"evenodd\" />\r\n </svg>\r\n </div>\r\n <div class=\"toast-icon\"\r\n *ngSwitchCase=\"'success'\">\r\n <svg class=\"h-5 w-5 text-green-400\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\r\n </svg>\r\n </div>\r\n <div class=\"toast-icon\"\r\n *ngSwitchCase=\"'error'\">\r\n <svg class=\"h-5 w-5 text-red-400\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\"\r\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z\"\r\n clip-rule=\"evenodd\" />\r\n </svg>\r\n </div>\r\n <div class=\"toast-icon\"\r\n *ngSwitchCase=\"'warning'\">\r\n <svg class=\"h-5 w-5 text-yellow-400\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\"\r\n d=\"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z\"\r\n clip-rule=\"evenodd\" />\r\n </svg>\r\n </div>\r\n <div class=\"toast-icon\"\r\n *ngSwitchDefault>\r\n <svg class=\"h-5 w-5 text-green-400\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\r\n </svg>\r\n </div>\r\n\r\n <div class=\"ml-3 w-0 flex-1\">\r\n <p class=\"toast-title\"\r\n *ngIf=\"toast?.title\">\r\n {{toast?.title}}\r\n </p>\r\n <p class=\"toast-body\">\r\n {{toast?.body}}\r\n </p>\r\n </div>\r\n <div class=\"toast-close-icon\">\r\n <button class=\"toast-close-button\"\r\n (click)=\"closeToast(i)\">\r\n <span class=\"sr-only\">Close</span>\r\n <!-- Heroicon name: solid/x -->\r\n <svg class=\"h-5 w-5\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\"\r\n d=\"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z\"\r\n clip-rule=\"evenodd\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1580
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToasterComponent, decorators: [{
1581
+ type: i0.Component,
1582
+ args: [{
1583
+ selector: 'lib-toaster',
1584
+ templateUrl: './toaster.component.html'
1585
+ }]
1586
+ }], ctorParameters: function () { return []; }, propDecorators: { toast: [{
1587
+ type: i0.Input
1588
+ }], i: [{
1589
+ type: i0.Input
1590
+ }], remove: [{
1591
+ type: i0.Output
1592
+ }] } });
1593
+
1594
+ var ToasterContainerComponent = /** @class */ (function () {
1595
+ function ToasterContainerComponent(toaster) {
1596
+ this.toaster = toaster;
1597
+ this.toasts = [];
1598
+ }
1599
+ ToasterContainerComponent.prototype.ngOnInit = function () {
1600
+ var _this = this;
1601
+ this.toaster.toast$
1602
+ .subscribe(function (toast) {
1603
+ _this.toasts = __spreadArray([toast], __read(_this.toasts));
1604
+ setTimeout(function () { return _this.toasts.pop(); }, toast.delay || 6000);
1605
+ });
1606
+ };
1607
+ ToasterContainerComponent.prototype.remove = function (index) {
1608
+ this.toasts = this.toasts.slice(0, index).concat(this.toasts.slice(index + 1));
1609
+ };
1610
+ return ToasterContainerComponent;
1611
+ }());
1612
+ ToasterContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToasterContainerComponent, deps: [{ token: ToasterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1613
+ ToasterContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ToasterContainerComponent, selector: "lib-toaster-container", ngImport: i0__namespace, template: "<lib-toaster *ngFor=\"let toast of toasts; let i=index\" [toast]=\"toast\" [i]=\"i\" (remove)=\"remove($event)\"></lib-toaster>\r\n", components: [{ type: ToasterComponent, selector: "lib-toaster", inputs: ["toast", "i"], outputs: ["remove"] }], directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1614
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToasterContainerComponent, decorators: [{
1615
+ type: i0.Component,
1616
+ args: [{
1617
+ selector: 'lib-toaster-container',
1618
+ templateUrl: './toaster-container.component.html'
1619
+ }]
1620
+ }], ctorParameters: function () { return [{ type: ToasterService }]; } });
1621
+
1622
+ var AvatarInitialsComponent = /** @class */ (function () {
1623
+ function AvatarInitialsComponent() {
1624
+ this.large = false;
1625
+ this.colors = [
1626
+ '#EB7181',
1627
+ '#468547',
1628
+ '#FFD558',
1629
+ '#3670B2', // blue
1630
+ ];
1631
+ }
1632
+ AvatarInitialsComponent.prototype.ngOnInit = function () {
1633
+ this.createInititals();
1634
+ var randomIndex = Math.floor(Math.random() * Math.floor(this.colors.length));
1635
+ // assign this to a class if you want to randomly change background colors of the circle.
1636
+ this.circleColor = this.colors[randomIndex];
1637
+ };
1638
+ AvatarInitialsComponent.prototype.createInititals = function () {
1639
+ if (this.name) {
1640
+ var initials = '';
1641
+ for (var i = 0; i < this.name.length; i++) {
1642
+ if (this.name.charAt(i) === ' ') {
1643
+ continue;
1644
+ }
1645
+ if (this.name.charAt(i) === this.name.charAt(i).toUpperCase()) {
1646
+ initials += this.name.charAt(i);
1647
+ if (initials.length === 2) {
1648
+ break;
1649
+ }
1650
+ }
1651
+ }
1652
+ this.initials = initials;
1653
+ }
1654
+ };
1655
+ return AvatarInitialsComponent;
1656
+ }());
1657
+ AvatarInitialsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AvatarInitialsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1658
+ AvatarInitialsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: AvatarInitialsComponent, selector: "lib-avatar-initials", inputs: { name: "name", large: "large" }, ngImport: i0__namespace, template: "<div [ngClass]=\"large ? 'avatar-container-large': 'avatar-container'\">\r\n <span [ngClass]=\"large ? 'avatar-text-large': 'avatar-text'\">{{ initials }}</span>\r\n</div>\r\n", directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1659
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AvatarInitialsComponent, decorators: [{
1660
+ type: i0.Component,
1661
+ args: [{
1662
+ selector: 'lib-avatar-initials',
1663
+ templateUrl: './avatar-initials.component.html'
1664
+ }]
1665
+ }], ctorParameters: function () { return []; }, propDecorators: { name: [{
1666
+ type: i0.Input
1667
+ }], large: [{
1668
+ type: i0.Input
1669
+ }] } });
1670
+
1671
+ var ToggleComponent = /** @class */ (function () {
1672
+ function ToggleComponent() {
1673
+ this.valueChange = new i0.EventEmitter();
1674
+ this.onChange$ = undefined;
1675
+ this.onTouched$ = undefined;
1676
+ }
1677
+ ToggleComponent.prototype.writeValue = function (obj) {
1678
+ if (obj) {
1679
+ this.value = obj || false;
1680
+ }
1681
+ };
1682
+ ToggleComponent.prototype.registerOnChange = function (fn) {
1683
+ this.onChange$ = fn;
1684
+ };
1685
+ ToggleComponent.prototype.registerOnTouched = function (fn) {
1686
+ this.onTouched$ = fn;
1687
+ };
1688
+ ToggleComponent.prototype.onBlur = function (event) {
1689
+ if (this.onTouched$) {
1690
+ this.onTouched$();
1691
+ }
1692
+ };
1693
+ ToggleComponent.prototype.ngOnInit = function () {
1694
+ };
1695
+ ToggleComponent.prototype.changeValue = function () {
1696
+ this.value = !this.value;
1697
+ this.valueChange.emit(this.value);
1698
+ if (this.onChange$) {
1699
+ this.onChange$(this.value);
1700
+ }
1701
+ if (this.onTouched$) {
1702
+ this.onTouched$();
1703
+ }
1704
+ };
1705
+ return ToggleComponent;
1706
+ }());
1707
+ ToggleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToggleComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
1708
+ ToggleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ToggleComponent, selector: "lib-toggle", inputs: { value: "value", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, providers: [
1709
+ {
1710
+ provide: forms.NG_VALUE_ACCESSOR,
1711
+ useExisting: i0.forwardRef(function () { return ToggleComponent; }),
1712
+ multi: true
1713
+ }
1714
+ ], ngImport: i0__namespace, template: "<button type=\"button\"\r\n [ngClass]=\"value ? (disabled ? 'on disabled' : 'on') : 'off'\"\r\n class=\"toggle-button\"\r\n role=\"switch\"\r\n aria-checked=\"false\"\r\n aria-labelledby=\"isPrivate\"\r\n (click)=\"changeValue()\"\r\n (blur)=\"onBlur($event)\"\r\n value=\"{{value}}\"\r\n [disabled]=\"disabled\"\r\n [title]=\"disabled ? '\u03A4\u03BF \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B9\u03B4\u03C9\u03C4\u03B9\u03BA\u03CC' : '\u0399\u03B4\u03B9\u03C9\u03C4\u03B9\u03BA\u03CC'\">\r\n <span aria-hidden=\"true\"\r\n [ngClass]=\"value ? 'enabled-anim' : 'disabled-anim'\"\r\n class=\"toggle-span\"></span>\r\n</button>", directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1715
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ToggleComponent, decorators: [{
1716
+ type: i0.Component,
1717
+ args: [{
1718
+ selector: 'lib-toggle',
1719
+ templateUrl: './toggle.component.html',
1720
+ providers: [
1721
+ {
1722
+ provide: forms.NG_VALUE_ACCESSOR,
1723
+ useExisting: i0.forwardRef(function () { return ToggleComponent; }),
1724
+ multi: true
1725
+ }
1726
+ ]
1727
+ }]
1728
+ }], ctorParameters: function () { return []; }, propDecorators: { value: [{
1729
+ type: i0.Input
1730
+ }], disabled: [{
1731
+ type: i0.Input
1732
+ }], valueChange: [{
1733
+ type: i0.Output
1734
+ }] } });
1735
+
1736
+ var SidePaneComponent = /** @class */ (function () {
1737
+ function SidePaneComponent(router, document) {
1738
+ this.router = router;
1739
+ this.document = document;
1740
+ // tslint:disable-next-line:no-input-rename
1741
+ this.showPane = false;
1742
+ this.sizeContainerStyle = 'side-pane-box-size';
1743
+ this.overlayStyle = 'side-pane-overlay';
1744
+ this.onComplete = new i0.EventEmitter();
1745
+ }
1746
+ SidePaneComponent.prototype.ngOnDestroy = function () {
1747
+ };
1748
+ SidePaneComponent.prototype.ngOnInit = function () {
1749
+ };
1750
+ SidePaneComponent.prototype.onSidePaneActivated = function (component) {
1751
+ var _a;
1752
+ this.document.body.classList.add('modal-active');
1753
+ var sizeStyleSuffix = '';
1754
+ var state = (_a = this.router.getCurrentNavigation()) === null || _a === void 0 ? void 0 : _a.extras.state;
1755
+ if (state) {
1756
+ if (state.paneSize) {
1757
+ if (state.paneSize === exports.SidePaneSize.Small25) {
1758
+ sizeStyleSuffix = '-25';
1759
+ }
1760
+ else if (state.paneSize === exports.SidePaneSize.Medium50) {
1761
+ sizeStyleSuffix = '-50';
1762
+ }
1763
+ else if (state.paneSize === exports.SidePaneSize.Large75) {
1764
+ sizeStyleSuffix = '-75';
1765
+ }
1766
+ }
1767
+ if (state.paneOverlay) {
1768
+ if (state.paneOverlay === exports.SidePaneOverlayType.None) {
1769
+ this.overlayStyle = 'side-pane-overlay-opacity-0';
1770
+ }
1771
+ else if (state.paneOverlay === exports.SidePaneOverlayType.Dark) {
1772
+ this.overlayStyle = 'side-pane-overlay-opacity-50';
1773
+ }
1774
+ else {
1775
+ this.overlayStyle = 'side-pane-overlay';
1776
+ }
1777
+ }
1778
+ }
1779
+ this.sizeContainerStyle = "side-pane-box-size" + sizeStyleSuffix;
1780
+ this.showPane = true;
1781
+ };
1782
+ SidePaneComponent.prototype.onSidePaneDeactivated = function ($event) {
1783
+ this.document.body.classList.remove('modal-active');
1784
+ this.showPane = false;
1785
+ this.onComplete.emit(true);
1786
+ };
1787
+ return SidePaneComponent;
1788
+ }());
1789
+ SidePaneComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SidePaneComponent, deps: [{ token: i1__namespace$1.Router }, { token: i1.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Component });
1790
+ SidePaneComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: SidePaneComponent, selector: "lib-side-pane", inputs: { showPane: ["visible", "showPane"] }, outputs: { onComplete: "onComplete" }, ngImport: i0__namespace, template: "<div *ngIf=\"showPane\" class=\"side-pane-outer-container\" aria-labelledby=\"slide-over\" role=\"dialog\" aria-modal=\"true\">\r\n <div [class]=\"showPane ? overlayStyle : 'hidden'\" aria-hidden=\"true\"></div>\r\n <div [class]=\"showPane ? 'side-pane-container' : 'hidden'\">\r\n <div [class]=\"sizeContainerStyle\">\r\n <div class=\"side-pane\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1791
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SidePaneComponent, decorators: [{
1792
+ type: i0.Component,
1793
+ args: [{
1794
+ selector: 'lib-side-pane',
1795
+ templateUrl: './side-pane.component.html'
1796
+ }]
1797
+ }], ctorParameters: function () {
1798
+ return [{ type: i1__namespace$1.Router }, { type: undefined, decorators: [{
1799
+ type: i0.Inject,
1800
+ args: [i1.DOCUMENT]
1801
+ }] }];
1802
+ }, propDecorators: { showPane: [{
1803
+ type: i0.Input,
1804
+ args: ['visible']
1805
+ }], onComplete: [{
1806
+ type: i0.Output
1807
+ }] } });
1808
+
1809
+ var APP_LINKS = new i0.InjectionToken('APP_LINKS');
1810
+ var SHELL_CONFIG = new i0.InjectionToken('SHELL_CONFIG');
1811
+
1812
+ var DynamicComponentHostDirective = /** @class */ (function () {
1813
+ function DynamicComponentHostDirective(viewContainerRef) {
1814
+ this.viewContainerRef = viewContainerRef;
1815
+ this.hostName = '';
1816
+ }
1817
+ return DynamicComponentHostDirective;
1818
+ }());
1819
+ DynamicComponentHostDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DynamicComponentHostDirective, deps: [{ token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1820
+ DynamicComponentHostDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: DynamicComponentHostDirective, selector: "[appDynamicComponentHost]", inputs: { hostName: "hostName" }, ngImport: i0__namespace });
1821
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DynamicComponentHostDirective, decorators: [{
1822
+ type: i0.Directive,
1823
+ args: [{ selector: '[appDynamicComponentHost]' }]
1824
+ }], ctorParameters: function () { return [{ type: i0__namespace.ViewContainerRef }]; }, propDecorators: { hostName: [{
1825
+ type: i0.Input
1826
+ }] } });
1827
+
1828
+ /**
1829
+ * Holds information about the dynamic content.
1830
+ * @remarks
1831
+ * `ComponentRef` is undefined in the case content is of `TemplateRef` type.
1832
+ */
1833
+ var ContentRef = /** @class */ (function () {
1834
+ function ContentRef(nodes, viewRef, componentRef) {
1835
+ this.nodes = nodes;
1836
+ this.viewRef = viewRef;
1837
+ this.componentRef = componentRef;
1838
+ }
1839
+ return ContentRef;
1840
+ }());
1841
+
1842
+ /**
1843
+ * Provides ways of loading and handling dynamic content.
1844
+ *
1845
+ * @remarks
1846
+ * Do NOT use this directly, create an instance through {@link ComponentLoaderFactory}
1847
+ * You can use this loader in two ways:
1848
+ * - Attaches a component to `ViewContainerRef`.
1849
+ * - Attaches a component to `ViewContainerRef`. The attached component has a `<ng-content>` tag inside its view. The {@link ComponentLoaderOptions.content} will be drawn inside this tag.
1850
+ *
1851
+ * @internal
1852
+ */
1853
+ var ComponentLoader = /** @class */ (function () {
1854
+ function ComponentLoader(vcr, cfr, applicationRef, injector) {
1855
+ this.vcr = vcr;
1856
+ this.cfr = cfr;
1857
+ this.applicationRef = applicationRef;
1858
+ this.injector = injector;
1859
+ /**
1860
+ * Before content is shown event.
1861
+ */
1862
+ this.onBeforeShow = new rxjs.Subject();
1863
+ /**
1864
+ * After show content event.
1865
+ * @returns The id of newly created component ref.
1866
+ */
1867
+ this.onShown = new rxjs.Subject();
1868
+ /**
1869
+ * Before content is hidden event.
1870
+ * @returns The instance of attached component;
1871
+ */
1872
+ this.onBeforeHide = new rxjs.Subject();
1873
+ /**
1874
+ * After content is hidden event.
1875
+ * @returns The id of destroyed component ref.
1876
+ */
1877
+ this.onHidden = new rxjs.Subject();
1878
+ this.providers = [];
1879
+ this.containerDefaultSelector = 'body';
1880
+ }
1881
+ /**
1882
+ * Attaches component.
1883
+ * @param componentType - The type component to attach.
1884
+ * @returns Current instance of {@link ComponentLoader}
1885
+ */
1886
+ ComponentLoader.prototype.attach = function (componentType) {
1887
+ this.componentFactory = this.cfr.resolveComponentFactory(componentType);
1888
+ return this;
1889
+ };
1890
+ /**
1891
+ * Body will be used in nothing is provided.
1892
+ * @param container - The element in which dynamic content will be drawn inside to. For string case a query to the dom will be executed to find the element.
1893
+ * @returns Current instance of {@link ComponentLoader}
1894
+ */
1895
+ ComponentLoader.prototype.to = function (container) {
1896
+ this.container = container || this.container;
1897
+ return this;
1898
+ };
1899
+ /**
1900
+ * Adds provider to the providers array. These providers will be injected to the attached component.
1901
+ *
1902
+ * @see {@link https://angular.io/guide/glossary#di-token | Injection Token}
1903
+ *
1904
+ * @param provider - Provider to inject.
1905
+ * @returns Current instance of {@link ComponentLoader}
1906
+ */
1907
+ ComponentLoader.prototype.provide = function (provider) {
1908
+ this.providers.push(provider);
1909
+ return this;
1910
+ };
1911
+ /**
1912
+ * Attaches attached component to dom and any dynamic content if provided.
1913
+ * @remarks
1914
+ * Also triggers the {@link ComponentLoader.onBeforeShow} and {@link ComponentLoader.onShown} events.
1915
+ *
1916
+ * @param options - {@link ComponentLoaderOptions}.
1917
+ * @returns A reference to the created content.
1918
+ */
1919
+ ComponentLoader.prototype.show = function (options) {
1920
+ if (options === void 0) { options = {}; }
1921
+ if (this.componentRef) {
1922
+ throw Error('Component is already shown');
1923
+ }
1924
+ if (!this.componentFactory) {
1925
+ throw Error('You must attach a component');
1926
+ }
1927
+ this.onBeforeShow.next();
1928
+ if (options.content) {
1929
+ this.contentRef = this.getContentRef(options.content, options.context, options.initialState);
1930
+ }
1931
+ this.createComponentAndAttachToView(options);
1932
+ this.appendContentToContainer();
1933
+ this.markComponentsForCheck();
1934
+ this.onShown.next(options.id);
1935
+ return this.componentRef;
1936
+ };
1937
+ /**
1938
+ * Removes attached component from dom.
1939
+ * @remarks
1940
+ * Also triggers the {@link ComponentLoader.onBeforeHide} and {@link ComponentLoader.onHidden} events.
1941
+ *
1942
+ * @param id - If provided it is returned through the {@link ComponentLoader.onHidden}.
1943
+ * @returns Current instance of {@link ComponentLoader}
1944
+ */
1945
+ ComponentLoader.prototype.hide = function (id, result) {
1946
+ var _a, _b, _c;
1947
+ if (!this.componentRef) {
1948
+ throw Error('No attached component found to hide');
1949
+ }
1950
+ this.onBeforeHide.next(this.componentRef.instance);
1951
+ var componentEl = this.componentRef.location.nativeElement;
1952
+ componentEl.parentNode.removeChild(componentEl);
1953
+ if ((_a = this.contentRef) === null || _a === void 0 ? void 0 : _a.componentRef) {
1954
+ this.contentRef.componentRef.destroy();
1955
+ }
1956
+ if (this.vcr && ((_b = this.contentRef) === null || _b === void 0 ? void 0 : _b.viewRef)) {
1957
+ this.vcr.remove(this.vcr.indexOf(this.contentRef.viewRef));
1958
+ }
1959
+ if ((_c = this.contentRef) === null || _c === void 0 ? void 0 : _c.viewRef) {
1960
+ this.contentRef.viewRef.destroy();
1961
+ }
1962
+ this.contentRef = void 0;
1963
+ this.componentRef = void 0;
1964
+ this.onHidden.next(id ? { id: id, result: result } : null);
1965
+ return this;
1966
+ };
1967
+ ComponentLoader.prototype.getInnerComponent = function () {
1968
+ return this.innerComponent;
1969
+ };
1970
+ ComponentLoader.prototype.markComponentsForCheck = function () {
1971
+ var _a;
1972
+ if ((_a = this.contentRef) === null || _a === void 0 ? void 0 : _a.componentRef) {
1973
+ this.innerComponent = this.contentRef.componentRef.instance;
1974
+ this.contentRef.componentRef.changeDetectorRef.markForCheck();
1975
+ this.contentRef.componentRef.changeDetectorRef.detectChanges();
1976
+ }
1977
+ this.componentRef.changeDetectorRef.markForCheck();
1978
+ this.componentRef.changeDetectorRef.detectChanges();
1979
+ };
1980
+ ComponentLoader.prototype.createComponentAndAttachToView = function (options) {
1981
+ var _a;
1982
+ var injector = i0.Injector.create({
1983
+ providers: this.providers,
1984
+ parent: this.injector,
1985
+ });
1986
+ this.componentRef = this.componentFactory.create(injector, (_a = this.contentRef) === null || _a === void 0 ? void 0 : _a.nodes);
1987
+ this.applicationRef.attachView(this.componentRef.hostView);
1988
+ this.instance = this.componentRef.instance;
1989
+ Object.assign(this.componentRef.instance, options);
1990
+ };
1991
+ ComponentLoader.prototype.appendContentToContainer = function () {
1992
+ var _a, _b;
1993
+ if (this.container instanceof i0.ElementRef) {
1994
+ this.container.nativeElement.appendChild((_a = this.componentRef) === null || _a === void 0 ? void 0 : _a.location.nativeElement);
1995
+ }
1996
+ if (typeof this.container === 'string' && typeof document !== 'undefined') {
1997
+ var selectedElement = document.querySelector(this.container) || document.querySelector(this.containerDefaultSelector);
1998
+ if (!selectedElement) {
1999
+ return;
2000
+ }
2001
+ selectedElement.appendChild((_b = this.componentRef) === null || _b === void 0 ? void 0 : _b.location.nativeElement);
2002
+ }
2003
+ };
2004
+ ComponentLoader.prototype.getContentRef = function (content, context, initialState) {
2005
+ //TemplateRef case
2006
+ if (content instanceof i0.TemplateRef) {
2007
+ if (this.vcr) {
2008
+ var viewRef_1 = this.vcr.createEmbeddedView(content, context);
2009
+ viewRef_1.markForCheck();
2010
+ return new ContentRef([viewRef_1.rootNodes], viewRef_1);
2011
+ }
2012
+ var viewRef = content.createEmbeddedView({});
2013
+ this.applicationRef.attachView(viewRef);
2014
+ return new ContentRef([viewRef.rootNodes], viewRef);
2015
+ }
2016
+ //Component case
2017
+ if (typeof content === 'function') {
2018
+ var contentCf = this.cfr.resolveComponentFactory(content);
2019
+ var injector = i0.Injector.create({
2020
+ providers: this.providers,
2021
+ parent: this.injector,
2022
+ });
2023
+ var componentRef = contentCf.create(injector);
2024
+ Object.assign(componentRef.instance, initialState);
2025
+ this.applicationRef.attachView(componentRef.hostView);
2026
+ return new ContentRef([[componentRef.location.nativeElement]], componentRef.hostView, componentRef);
2027
+ }
2028
+ throw Error('Unsupported content type');
2029
+ };
2030
+ return ComponentLoader;
2031
+ }());
2032
+
2033
+ /**
2034
+ * Use to create instances of {@link ComponentLoader}.
2035
+ *
2036
+ * @public
2037
+ */
2038
+ var ComponentLoaderFactory = /** @class */ (function () {
2039
+ function ComponentLoaderFactory(componentFactoryResolver, injector, applicationRef) {
2040
+ this.componentFactoryResolver = componentFactoryResolver;
2041
+ this.injector = injector;
2042
+ this.applicationRef = applicationRef;
2043
+ }
2044
+ /**
2045
+ * Returns a new instance of {@link ComponentLoader}
2046
+ * @param viewContainerRef - The view container the dynamic content will be attached to.
2047
+ * @returns A new instance of {@link ComponentLoader}.
2048
+ *
2049
+ * @public
2050
+ */
2051
+ ComponentLoaderFactory.prototype.createLoader = function (viewContainerRef) {
2052
+ return new ComponentLoader(viewContainerRef, this.componentFactoryResolver, this.applicationRef, this.injector);
2053
+ };
2054
+ return ComponentLoaderFactory;
2055
+ }());
2056
+ ComponentLoaderFactory.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ComponentLoaderFactory, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.Injector }, { token: i0__namespace.ApplicationRef }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2057
+ ComponentLoaderFactory.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ComponentLoaderFactory, providedIn: 'root' });
2058
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ComponentLoaderFactory, decorators: [{
2059
+ type: i0.Injectable,
2060
+ args: [{ providedIn: 'root' }]
2061
+ }], ctorParameters: function () { return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.Injector }, { type: i0__namespace.ApplicationRef }]; } });
2062
+
2063
+ var ShellHeaderComponent = /** @class */ (function () {
2064
+ function ShellHeaderComponent(authService, router, config, links) {
2065
+ this.authService = authService;
2066
+ this.router = router;
2067
+ this.config = config;
2068
+ this.links = links;
2069
+ // tslint:disable-next-line:no-input-rename
2070
+ this.sectionLinksPath = 'main';
2071
+ // tslint:disable-next-line:no-input-rename
2072
+ this.profileMenuVisible = true;
2073
+ // tslint:disable-next-line:no-input-rename
2074
+ this.showUserNameOnHeader = false;
2075
+ this.border = true;
2076
+ this.sectionLinks = rxjs.of([]);
2077
+ this.mobileMenuExpanded = false;
2078
+ this.userMenuExpanded = false;
2079
+ this.routerSub$ = null;
2080
+ this.userSub$ = null;
2081
+ this.statusSub$ = null;
2082
+ this.user = null;
2083
+ this.avatarName = null;
2084
+ this.routeSubject = this.router.events.pipe(operators.filter(function (event) { return event instanceof i1$1.NavigationStart; }));
2085
+ }
2086
+ ShellHeaderComponent.prototype.ngOnDestroy = function () {
2087
+ console.log(this.showUserNameOnHeader);
2088
+ if (this.routerSub$) {
2089
+ this.routerSub$.unsubscribe();
2090
+ }
2091
+ // TODO: check authenticated user here before we start polling server status
2092
+ if (this.statusSub$) {
2093
+ this.statusSub$.unsubscribe();
2094
+ }
2095
+ if (this.userSub$) {
2096
+ this.userSub$.unsubscribe();
2097
+ }
2098
+ };
2099
+ ShellHeaderComponent.prototype.ngOnInit = function () {
2100
+ var _this = this;
2101
+ this.sectionLinks = this.links[this.sectionLinksPath];
2102
+ this.routerSub$ = this.routeSubject.subscribe(function (event) {
2103
+ _this.mobileMenuExpanded = false;
2104
+ _this.userMenuExpanded = false;
2105
+ });
2106
+ this.authService.loadUser().subscribe(function (user) {
2107
+ console.log(user);
2108
+ _this.setCurrentUser(user);
2109
+ }, function (error) {
2110
+ console.error(error);
2111
+ });
2112
+ // Detect user changes and display / or not user info accordingly...
2113
+ this.userSub$ = this.authService.user$.subscribe(function (user) {
2114
+ // console.log('ShellHeaderComponent user subscription');
2115
+ _this.setCurrentUser(user);
2116
+ });
2117
+ };
2118
+ // tslint:disable-next-line:typedef
2119
+ ShellHeaderComponent.prototype.onClickOutside = function ($event) {
2120
+ this.userMenuExpanded = false;
2121
+ };
2122
+ ShellHeaderComponent.prototype.signin = function (event) {
2123
+ if (event) {
2124
+ event.preventDefault();
2125
+ }
2126
+ this.authService.signinRedirect();
2127
+ };
2128
+ ShellHeaderComponent.prototype.setCurrentUser = function (user) {
2129
+ var _a, _b;
2130
+ this.user = user;
2131
+ if (this.user && this.user.profile) {
2132
+ this.avatarName = ("" + ((_a = this.user.profile.given_name) === null || _a === void 0 ? void 0 : _a.charAt(0)) + ((_b = this.user.profile.family_name) === null || _b === void 0 ? void 0 : _b.charAt(0))).toUpperCase();
2133
+ // console.log('load user', this.avatarName);
2134
+ }
2135
+ };
2136
+ return ShellHeaderComponent;
2137
+ }());
2138
+ ShellHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellHeaderComponent, deps: [{ token: i2.AuthService }, { token: i1$1.Router }, { token: SHELL_CONFIG }, { token: APP_LINKS }], target: i0__namespace.ɵɵFactoryTarget.Component });
2139
+ ShellHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ShellHeaderComponent, selector: "lib-shell-header", inputs: { sectionLinksPath: ["section-links", "sectionLinksPath"], profileMenuVisible: ["profile-menu", "profileMenuVisible"], showUserNameOnHeader: ["show-userName", "showUserNameOnHeader"], border: "border" }, ngImport: i0__namespace, template: "<nav>\r\n <div class=\"shell-header-paddings\">\r\n <div [class]=\"border ? 'shell-header-border' : ''\">\r\n <div class=\"shell-header-menu-container\">\r\n <div class=\"shell-header-links-no-grow-container\">\r\n <div>\r\n <a href=\"#\"\r\n [routerLink]=\"['/']\"><img class=\"app-logo\" [src]=\"config.appLogo\" [alt]=\"config.appLogoAlt\" /></a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"shell-header-link-container\">\r\n <ng-container *ngFor=\"let link of sectionLinks | async\">\r\n <a href=\"#\"\r\n [routerLink]=\"[link.path]\"\r\n [attr.target]=\"link.external ? '_blank' : '_self'\"\r\n [routerLinkActive]=\"['nav-link-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\"\r\n class=\"nav-link\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"shell-header-md-visible\">\r\n <div class=\"shell-header-links-no-grow-container\">\r\n\r\n <ng-container *ngFor=\"let link of links.profileActions | async\">\r\n <a class=\"shell-header-menu-rounded-button\"\r\n (clickOutside)=\"onClickOutside($event)\"\r\n [attr.href]=\"link.path\"\r\n [attr.target]=\"link.external ? '_blank' : '_self'\">\r\n <span class=\"sr-only\">{{ link.text }}</span>\r\n <i *ngIf=\"link.icon\"\r\n [class]=\"link.icon\"></i>\r\n </a>\r\n </ng-container>\r\n\r\n <!-- Profile dropdown -->\r\n <div class=\"ml-2 relative\"\r\n (clickOutside)=\"onClickOutside($event)\"\r\n *ngIf=\"profileMenuVisible\">\r\n <div [ngClass]=\"{'shell-header-profile': showUserNameOnHeader}\">\r\n <div *ngIf=\"user && showUserNameOnHeader\"\r\n class=\"shell-header-profile-userName\">\r\n {{ user.profile.name }}\r\n </div>\r\n <button type=\"button\"\r\n *ngIf=\"user\"\r\n (click)=\"userMenuExpanded = !userMenuExpanded\"\r\n class=\"shell-header-profile-dropdown-button\"\r\n id=\"user-menu\"\r\n aria-expanded=\"false\"\r\n aria-haspopup=\"true\">\r\n <span class=\"sr-only\">Open user menu</span>\r\n <span class=\"avatar-container\">\r\n <span class=\"avatar-text\">{{this.avatarName}}</span>\r\n </span>\r\n </button>\r\n\r\n <button type=\"button\"\r\n *ngIf=\"!user\"\r\n (click)=\"signin(null)\"\r\n class=\"shell-header-profile-dropdown-button\"\r\n id=\"user-menu\"\r\n aria-expanded=\"false\"\r\n aria-haspopup=\"true\">\r\n <span class=\"sr-only\">sign in</span>\r\n <span class=\"avatar-container\">\r\n <span class=\"avatar-text\"><i class=\"ms-Icon ms-Icon--Signin\"></i></span>\r\n </span>\r\n </button>\r\n\r\n <div *ngIf=\"userMenuExpanded\"\r\n [ngClass]=\"showUserNameOnHeader ? 'shell-header-profile-dropdown-with-username' : 'shell-header-profile-dropdown'\"\r\n role=\"menu\"\r\n aria-orientation=\"vertical\"\r\n aria-labelledby=\"user-menu\">\r\n <!-- <a href=\"#\" class=\"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100\" role=\"menuitem\">\u0391\u03C0\u03BF\u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7</a> -->\r\n <ng-container *ngFor=\"let link of links.profile | async\">\r\n <!-- <a *ngIf=\"link.external\" [attr.href]=\"link.path\" [attr.target]=\"'_blank'\" class=\"nav-link-profile\">\r\n {{ link.text }}\r\n </a> -->\r\n <a [routerLink]=\"link.path\" [routerLinkActive]=\"['nav-link-profile-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\" class=\"nav-link-profile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"mobile-menu-button-container\">\r\n <!-- Mobile menu button -->\r\n <button type=\"button\"\r\n (click)=\"mobileMenuExpanded = !mobileMenuExpanded\"\r\n class=\"mobile-menu-button\"\r\n aria-controls=\"mobile-menu\"\r\n [attr.aria-expanded]=\"mobileMenuExpanded\">\r\n <span class=\"sr-only\">Open main menu</span>\r\n <!--Heroicon name: outline/menu Menu open: \"hidden\", Menu closed: \"block\"-->\r\n <svg class=\"block h-6 w-6\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M4 6h16M4 12h16M4 18h16\" />\r\n </svg>\r\n <!--Heroicon name: outline/x Menu open: \"block\", Menu closed: \"hidden\"-->\r\n <svg class=\"hidden h-6 w-6\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <!-- Mobile menu, show/hide based on menu state. -->\r\n <div class=\"mobile-menu-container\"\r\n *ngIf=\"mobileMenuExpanded\"\r\n id=\"mobile-menu\">\r\n <div class=\"mobile-menu-link-container\">\r\n <ng-container *ngFor=\"let link of sectionLinks | async\">\r\n <a *ngIf=\"link.external\" [attr.href]=\"link.path\" [attr.target]=\"'_blank'\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n <a *ngIf=\"!link.external\" [routerLink]=\"link.path\" [routerLinkActive]=\"['nav-link-mobile-active']\" [routerLinkActiveOptions]=\"{ exact: link.exact }\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n <ng-container *ngIf=\"!user\">\r\n <a href=\"#\" (click)=\"signin($event)\" class=\"nav-link-mobile\">\r\n <i class=\"ms-Icon ms-Icon--Signin mr-2\"></i>\u03A3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7\r\n </a>\r\n </ng-container>\r\n </div>\r\n <div class=\"mobile-menu-user-info-container\" *ngIf=\"user\">\r\n <div class=\"mobile-menu-user-info-container-inner\">\r\n <div class=\"flex-shrink-0\">\r\n <span class=\"mobile-menu-avatar-container\">\r\n <span class=\"mobile-menu-avatar-name\">{{ this.avatarName }}</span>\r\n </span>\r\n </div>\r\n <div class=\"ml-3\">\r\n <div class=\"mobile-menu-user-name\">{{ user.profile.name }}</div>\r\n <div class=\"mobile-menu-user-email\">{{ user.profile.email }}</div>\r\n </div>\r\n <button class=\"mobile-menu-rounded-button\">\r\n <span class=\"sr-only\">View notifications</span>\r\n <!-- Heroicon name: outline/bell -->\r\n <svg class=\"mobile-menu-rounded-button-icon-style\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\"\r\n aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <div class=\"mobile-menu-link-container\">\r\n <ng-container *ngFor=\"let link of links.profile | async\">\r\n <a *ngIf=\"link.external\" [attr.href]=\"link.path\" [attr.target]=\"'_blank'\" class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n <a [routerLink]=\"link.path\"\r\n [routerLinkActive]=\"['nav-link-mobile-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: link.exact }\"\r\n class=\"nav-link-mobile\">\r\n {{ link.text }}\r\n </a>\r\n </ng-container>\r\n <!-- <a href=\"#\" class=\"block px-3 py-2 rounded-sm text-base font-medium text-gray-400 hover:text-white hover:bg-gray-700\">\u0391\u03C0\u03BF\u03C3\u03CD\u03BD\u03B4\u03B5\u03C3\u03B7</a> -->\r\n </div>\r\n </div>\r\n </div>\r\n</nav>\r\n", directives: [{ type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1__namespace.AsyncPipe } });
2140
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellHeaderComponent, decorators: [{
2141
+ type: i0.Component,
2142
+ args: [{
2143
+ // tslint:disable-next-line:component-selector
2144
+ selector: 'lib-shell-header',
2145
+ templateUrl: './shell-header.component.html',
2146
+ }]
2147
+ }], ctorParameters: function () {
2148
+ return [{ type: i2__namespace.AuthService, decorators: [{
2149
+ type: i0.Inject,
2150
+ args: [i2.AuthService]
2151
+ }] }, { type: i1__namespace$1.Router, decorators: [{
2152
+ type: i0.Inject,
2153
+ args: [i1$1.Router]
2154
+ }] }, { type: undefined, decorators: [{
2155
+ type: i0.Inject,
2156
+ args: [SHELL_CONFIG]
2157
+ }] }, { type: undefined, decorators: [{
2158
+ type: i0.Inject,
2159
+ args: [APP_LINKS]
2160
+ }] }];
2161
+ }, propDecorators: { sectionLinksPath: [{
2162
+ type: i0.Input,
2163
+ args: ['section-links']
2164
+ }], profileMenuVisible: [{
2165
+ type: i0.Input,
2166
+ args: ['profile-menu']
2167
+ }], showUserNameOnHeader: [{
2168
+ type: i0.Input,
2169
+ args: ['show-userName']
2170
+ }], border: [{
2171
+ type: i0.Input
2172
+ }] } });
2173
+
2174
+ var ShellFooterComponent = /** @class */ (function () {
2175
+ function ShellFooterComponent(links) {
2176
+ this.links = links;
2177
+ }
2178
+ return ShellFooterComponent;
2179
+ }());
2180
+ ShellFooterComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellFooterComponent, deps: [{ token: APP_LINKS }], target: i0__namespace.ɵɵFactoryTarget.Component });
2181
+ ShellFooterComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ShellFooterComponent, selector: "lib-shell-footer", ngImport: i0__namespace, template: "<footer class=\"shell-footer-component-container\">\r\n <div class=\"shell-footer-paddings\">\r\n <div class=\"shell-footer-component-container-inner\">\r\n <div class=\"shell-footer-sections-container\">\r\n <div class=\"shell-footer-section\">\r\n <img class=\"shell-footer-logo-h\" src=\"/assets/images/branding/indice.png\" alt=\"INDICE logo\" />\r\n <nav class=\"mt-4\">\r\n <ul class=\"space-y-2\">\r\n <ng-container *ngFor=\"let link of links.brand | async\">\r\n <li>\r\n <a [href]=\"link.path\" class=\"shell-footer-link\">{{ link.text }}</a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </nav>\r\n </div>\r\n <div class=\"shell-footer-section-links\">\r\n <h5 class=\"shell-footer-section-title\">Legal</h5>\r\n <nav class=\"mt-4\">\r\n <ul class=\"grid lg:grid-cols-2\">\r\n <ng-container *ngFor=\"let link of links.legal | async\">\r\n <li class=\"mb-2\">\r\n <a [href]=\"link.path\" class=\"shell-footer-link\">{{ link.text }}</a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </nav>\r\n </div>\r\n <div class=\"shell-footer-section-links\">\r\n <h5 class=\"shell-footer-section-title\">Follow us</h5>\r\n <nav class=\"mt-4\">\r\n <ul class=\"grid lg:grid-cols-2\">\r\n <li class=\"mb-2\">\r\n <a href=\"#\" class=\"shell-footer-social\">\r\n <svg class=\"shell-footer-social-icon\" aria-hidden=\"true\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path d=\"M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84\"/>\r\n </svg>\r\n <span> Twitter </span>\r\n </a>\r\n </li>\r\n <li class=\"mb-2\">\r\n <a href=\"#\" class=\"shell-footer-social\">\r\n <svg class=\"shell-footer-social-icon\" aria-hidden=\"true\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\r\n <path fill-rule=\"evenodd\" d=\"M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z\" clip-rule=\"evenodd\"/>\r\n </svg>\r\n <span> Instagram </span>\r\n </a>\r\n </li>\r\n <li class=\"mb-2\">\r\n <a href=\"#\" class=\"shell-footer-social\">\r\n <svg class=\"shell-footer-social-icon\" aria-hidden=\"true\" fill=\"currentColor\" viewBox=\"0 0 24 24\" >\r\n <path fill-rule=\"evenodd\" d=\"M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z\" clip-rule=\"evenodd\"/>\r\n </svg>\r\n <span> Facebook </span>\r\n </a>\r\n </li>\r\n </ul>\r\n </nav>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"shell-footer-copyright\">\r\n <!--<nav class=\"flex flex-wrap justify-center space-x-6\">\r\n <a href=\"#\" class=\"font-normal text-sm hover:text-gray-100 mb-2\">Cookie settings</a>\r\n </nav>-->\r\n <p class=\"text-sm text-center sm:text-right\">\r\n \u00A9 2021 INDICE. All rights reserved.\r\n </p>\r\n </div>\r\n </div>\r\n</footer>\r\n", directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1__namespace.AsyncPipe } });
2182
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellFooterComponent, decorators: [{
2183
+ type: i0.Component,
2184
+ args: [{
2185
+ selector: 'lib-shell-footer',
2186
+ templateUrl: './shell-footer.component.html'
2187
+ }]
2188
+ }], ctorParameters: function () {
2189
+ return [{ type: undefined, decorators: [{
2190
+ type: i0.Inject,
2191
+ args: [APP_LINKS]
2192
+ }] }];
2193
+ } });
2194
+
2195
+ var ShellLayoutComponent = /** @class */ (function () {
2196
+ function ShellLayoutComponent(document, router, location, config, componentLoaderFactory) {
2197
+ this.document = document;
2198
+ this.router = router;
2199
+ this.location = location;
2200
+ this.config = config;
2201
+ this.componentLoaderFactory = componentLoaderFactory;
2202
+ this.dynamicComponentHosts = null;
2203
+ this.showRightPaneSM = false;
2204
+ this.routerSub$ = null;
2205
+ this.activeConfig = new DefaultShellConfig();
2206
+ this.loaded = false;
2207
+ if (!config) {
2208
+ config = new DefaultShellConfig();
2209
+ }
2210
+ this.activeConfig = config;
2211
+ }
2212
+ ShellLayoutComponent.prototype.ngAfterViewChecked = function () {
2213
+ var _this = this;
2214
+ setTimeout(function () { _this.loaded = true; }, 200);
2215
+ };
2216
+ ShellLayoutComponent.prototype.ngOnInit = function () {
2217
+ var _this = this;
2218
+ this.routerSub$ = this.router.events.pipe(operators.filter(function (event) { return event instanceof i1$1.ActivationStart; })).subscribe(function (e) {
2219
+ var _a, _b, _c, _d, _e, _f;
2220
+ // console.log('ShellLayoutComponent ActivationStart', e);
2221
+ if ((_a = e) === null || _a === void 0 ? void 0 : _a.snapshot) {
2222
+ // console.log('ShellLayoutComponent ActivationStart snapshot', (e as ActivationStart)?.snapshot);
2223
+ if ((_c = (_b = e) === null || _b === void 0 ? void 0 : _b.snapshot) === null || _c === void 0 ? void 0 : _c.data) {
2224
+ // console.log('ShellLayoutComponent ActivationStart snapshot data', (e as ActivationStart)?.snapshot.data);
2225
+ if ((_e = (_d = e) === null || _d === void 0 ? void 0 : _d.snapshot) === null || _e === void 0 ? void 0 : _e.data.shell) {
2226
+ // console.log('ShellLayoutComponent ActivationStart snapshot data shell params',
2227
+ // (e as ActivationStart)?.snapshot.data.shell);
2228
+ _this.activeConfig = (_f = e) === null || _f === void 0 ? void 0 : _f.snapshot.data.shell;
2229
+ // console.log('ShellLayoutComponent activeConfig from route: ', this.activeConfig);
2230
+ if (_this.activeConfig.customHeaderComponent) {
2231
+ _this.initCustomComponents();
2232
+ }
2233
+ }
2234
+ else {
2235
+ _this.activeConfig = _this.config ? _this.config : new DefaultShellConfig();
2236
+ // console.log('ShellLayoutComponent default activeConfig: ', this.activeConfig);
2237
+ }
2238
+ }
2239
+ }
2240
+ });
2241
+ };
2242
+ ShellLayoutComponent.prototype.ngAfterViewInit = function () {
2243
+ this.initCustomComponents();
2244
+ };
2245
+ ShellLayoutComponent.prototype.initCustomComponents = function () {
2246
+ if (this.dynamicComponentHosts && this.dynamicComponentHosts.length > 0) {
2247
+ this.loadCustomComponent(this.dynamicComponentHosts.find(function (_) { return _.hostName === 'Header'; }));
2248
+ // since you're not using it...
2249
+ // this.loadCustomComponent(this.dynamicComponentHosts.find(_ => _.hostName === 'Footer'));
2250
+ }
2251
+ };
2252
+ ShellLayoutComponent.prototype.ngOnDestroy = function () {
2253
+ if (this.routerSub$) {
2254
+ this.routerSub$.unsubscribe();
2255
+ }
2256
+ };
2257
+ ShellLayoutComponent.prototype.loadCustomComponent = function (host) {
2258
+ if (host) {
2259
+ var viewContainerRef = host.viewContainerRef;
2260
+ if (viewContainerRef && this.activeConfig.customHeaderComponent) {
2261
+ var clf = this.componentLoaderFactory.createLoader(viewContainerRef);
2262
+ var headerCompRef = clf.attach(this.activeConfig.customHeaderComponent).to(viewContainerRef.element).show();
2263
+ }
2264
+ }
2265
+ };
2266
+ return ShellLayoutComponent;
2267
+ }());
2268
+ ShellLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellLayoutComponent, deps: [{ token: i1.DOCUMENT }, { token: i1__namespace$1.Router }, { token: i1__namespace.Location }, { token: SHELL_CONFIG }, { token: ComponentLoaderFactory }], target: i0__namespace.ɵɵFactoryTarget.Component });
2269
+ ShellLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ShellLayoutComponent, selector: "lib-shell-layout", viewQueries: [{ propertyName: "dynamicComponentHosts", predicate: DynamicComponentHostDirective, descendants: true }], ngImport: i0__namespace, template: "<div *ngIf=\"loaded\" [style.display]=\"!loaded ? 'none':'block'\" class=\"shell-container active-side-pane\">\r\n <div class=\"shell-header-container\" *ngIf=\"activeConfig.showHeader\">\r\n <div [class]=\"activeConfig.fluid ? 'shell-header-container-inner-fluid' : 'shell-header-container-inner'\">\r\n\r\n <ng-container *ngIf=\"activeConfig.customHeaderComponent\">\r\n <div appDynamicComponentHost =\"Header\"></div>\r\n </ng-container>\r\n\r\n <lib-shell-header *ngIf=\"!activeConfig.customHeaderComponent\" [show-userName]=\"activeConfig.showUserNameOnHeader\"></lib-shell-header>\r\n </div>\r\n </div>\r\n\r\n <main [class]=\"activeConfig.showHeader ? 'shell-content-container' : 'shell-content-container-no-header'\">\r\n <div [class]=\"activeConfig.fluid ? 'shell-content-container-inner-fluid' : 'shell-content-container-inner'\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n </main>\r\n\r\n <div class=\"shell-footer-container\" *ngIf=\"activeConfig.showFooter\">\r\n <div [class]=\"activeConfig.fluid ? 'shell-footer-container-inner-fluid' : 'shell-footer-container-inner'\">\r\n <ng-container *ngIf=\"activeConfig.customFooterComponent\">\r\n <div appDynamicComponentHost hostName=\"Footer\"></div>\r\n </ng-container>\r\n <lib-shell-footer *ngIf=\"!activeConfig.customFooterComponent\"></lib-shell-footer>\r\n </div>\r\n </div>\r\n\r\n <lib-side-pane #rightPane>\r\n <router-outlet name=\"rightpane\" (activate)=\"rightPane.onSidePaneActivated($event)\" (deactivate)=\"rightPane.onSidePaneDeactivated($event)\"></router-outlet>\r\n </lib-side-pane>\r\n\r\n <lib-toaster-container></lib-toaster-container>\r\n\r\n</div>\r\n", components: [{ type: ShellHeaderComponent, selector: "lib-shell-header", inputs: ["section-links", "profile-menu", "show-userName", "border"] }, { type: ShellFooterComponent, selector: "lib-shell-footer" }, { type: SidePaneComponent, selector: "lib-side-pane", inputs: ["visible"], outputs: ["onComplete"] }, { type: ToasterContainerComponent, selector: "lib-toaster-container" }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: DynamicComponentHostDirective, selector: "[appDynamicComponentHost]", inputs: ["hostName"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }] });
2270
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ShellLayoutComponent, decorators: [{
2271
+ type: i0.Component,
2272
+ args: [{
2273
+ // tslint:disable-next-line:component-selector
2274
+ selector: 'lib-shell-layout',
2275
+ templateUrl: './shell-layout.component.html',
2276
+ }]
2277
+ }], ctorParameters: function () {
2278
+ return [{ type: undefined, decorators: [{
2279
+ type: i0.Inject,
2280
+ args: [i1.DOCUMENT]
2281
+ }] }, { type: i1__namespace$1.Router }, { type: i1__namespace.Location }, { type: undefined, decorators: [{
2282
+ type: i0.Inject,
2283
+ args: [SHELL_CONFIG]
2284
+ }] }, { type: ComponentLoaderFactory }];
2285
+ }, propDecorators: { dynamicComponentHosts: [{
2286
+ type: i0.ViewChildren,
2287
+ args: [DynamicComponentHostDirective]
2288
+ }] } });
2289
+
2290
+ var ViewLayoutComponent = /** @class */ (function () {
2291
+ function ViewLayoutComponent(route$, router$) {
2292
+ this.route$ = route$;
2293
+ this.router$ = router$;
2294
+ // tslint:disable-next-line:no-input-rename
2295
+ this.header = true;
2296
+ this.fluid = false;
2297
+ this.title = 'no title';
2298
+ this.icon = null;
2299
+ this.actions = null;
2300
+ this.busy = false;
2301
+ // tslint:disable-next-line:no-input-rename
2302
+ this.searchPlaceholder = 'αναζήτηση';
2303
+ this.view = null;
2304
+ // tslint:disable-next-line:no-input-rename
2305
+ this.metaItems = [];
2306
+ // tslint:disable-next-line:no-output-on-prefix
2307
+ this.onAction = new i0.EventEmitter();
2308
+ // tslint:disable-next-line:no-output-on-prefix
2309
+ this.onSearch = new i0.EventEmitter();
2310
+ }
2311
+ ViewLayoutComponent.prototype.ngOnInit = function () {
2312
+ var _a;
2313
+ if ((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement) {
2314
+ rxjs.fromEvent(this.searchInput$.nativeElement, 'keyup').pipe(operators.map(function (event) {
2315
+ return event.target.value; // Get input value.
2316
+ }), operators.filter(function (inputValue) { return inputValue.length >= 3 || inputValue.length === 0; }),
2317
+ // If character length greater than minimumSearchCharacters setting.
2318
+ operators.debounceTime(1000), // Time in milliseconds between key events.
2319
+ operators.distinctUntilChanged() // If previous query is different from current.
2320
+ ).subscribe();
2321
+ }
2322
+ };
2323
+ ViewLayoutComponent.prototype.emitActionClick = function (action) {
2324
+ this.onAction.emit(action);
2325
+ };
2326
+ ViewLayoutComponent.prototype.routerLinkActionClick = function (action) {
2327
+ // console.log('routerLinkActionClick', action);
2328
+ if (action.outlet) {
2329
+ this.router$.navigate(['', { outlets: { rightpane: action.link } }]);
2330
+ }
2331
+ else {
2332
+ this.router$.navigate([action.link]);
2333
+ }
2334
+ };
2335
+ ViewLayoutComponent.prototype.searchActionClick = function (action, text) {
2336
+ this.onSearch.emit(text);
2337
+ };
2338
+ ViewLayoutComponent.prototype.searchActionType = function (text) {
2339
+ var _a;
2340
+ this.onSearch.emit((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement.value);
2341
+ };
2342
+ ViewLayoutComponent.prototype.handleClear = function (event) {
2343
+ var _a;
2344
+ console.log('handle clear!!!');
2345
+ event.stopPropagation();
2346
+ this.onSearch.emit((_a = event.target) === null || _a === void 0 ? void 0 : _a.value);
2347
+ };
2348
+ ViewLayoutComponent.prototype.switchViewActionClick = function (action) {
2349
+ // console.log('switchViewActionClick', action);
2350
+ this.view = action.param;
2351
+ if (action && action.param) {
2352
+ this.router$.navigate([], { queryParams: { view: action.param }, queryParamsHandling: 'merge', skipLocationChange: false });
2353
+ }
2354
+ };
2355
+ return ViewLayoutComponent;
2356
+ }());
2357
+ ViewLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ViewLayoutComponent, deps: [{ token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
2358
+ ViewLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ViewLayoutComponent, selector: "lib-view-layout", inputs: { header: ["show-header", "header"], fluid: "fluid", title: "title", icon: "icon", actions: "actions", busy: "busy", searchPlaceholder: ["search-placeholder", "searchPlaceholder"], view: "view", metaItems: ["meta-items", "metaItems"] }, outputs: { onAction: "onAction", onSearch: "onSearch" }, viewQueries: [{ propertyName: "searchInput$", first: true, predicate: ["search"], descendants: true }], ngImport: i0__namespace, template: "<header *ngIf=\"header\"\r\n class=\"view-layout-paddings\">\r\n\r\n <div class=\"view-layout-title-container-sm md:view-layout-title-container\">\r\n <div class=\"view-layout-title-container-inner\">\r\n <i *ngIf=\"icon\"\r\n [class]=\"icon + ' title-icon'\"\r\n aria-hidden=\"true\"></i>\r\n <h1 [class]=\"busy ? 'view-layout-title-busy' : 'view-layout-title'\">\r\n {{title}}\r\n </h1>\r\n </div>\r\n <div *ngIf=\"metaItems && metaItems.length > 0\"\r\n class=\"meta-container\">\r\n <ng-container *ngFor=\"let meta of metaItems\">\r\n <div class=\"meta-container-inner\">\r\n <i *ngIf=\"meta.icon\"\r\n [class]=\"meta.icon + ' meta-icon'\"\r\n aria-hidden=\"true\"></i>\r\n <span class=\"meta-text\">{{meta.text}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"flex items-center justify-end\">\r\n <ng-container *ngFor=\"let action of actions\" [ngSwitch]=\"action.type\">\r\n\r\n <ng-container *ngSwitchCase=\"'switch-view'\">\r\n <button [disabled]=\"view === action.param\" type=\"button\" href=\"#\" class=\"ml-1 disabled:opacity-50 btn-view-header\" (click)=\"switchViewActionClick(action)\">\r\n <span class=\"inline-block relative\">\r\n <i [class]=\"action.icon\"></i>\r\n <span *ngIf=\"view === action.param\" class=\"selected-view-indicator\"></span>\r\n </span>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <label for=\"search\" class=\"sr-only\">Search</label>\r\n <div class=\"search-container\">\r\n <div class=\"pointer-events-none absolute inset-y-0 left-0 pl-3 flex items-center\">\r\n <!--<svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\" d=\"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z\" clip-rule=\"evenodd\" />\r\n </svg>-->\r\n </div>\r\n <input id=\"search\" #search class=\"search-input\" [placeholder]=\"searchPlaceholder\"\r\n type=\"search\" name=\"search\" (input)=\"searchActionType(search.value)\" (onsearch)=\"handleClear($event)\">\r\n </div>\r\n <button type=\"button\" href=\"#\" class=\"btn-view-header rounded-l-none\" [title]=\"action.tooltip\" (click)=\"searchActionClick(action, search.value)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n\r\n <ng-container *ngSwitchCase=\"'router-link'\">\r\n <button type=\"button\" href=\"#\" class=\"ml-1 btn-view-header\" [title]=\"action.tooltip\" (click)=\"routerLinkActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n\r\n\r\n <ng-container *ngSwitchDefault>\r\n <button type=\"button\" class=\"ml-1 btn-view-header\" [title]=\"action.tooltip\" (click)=\"emitActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</header>\r\n\r\n<!-- component -->\r\n<div [class]=\"fluid ? 'view-container-fluid' : 'view-container'\">\r\n <ng-content></ng-content>\r\n</div>\r\n", directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
2359
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ViewLayoutComponent, decorators: [{
2360
+ type: i0.Component,
2361
+ args: [{
2362
+ selector: 'lib-view-layout',
2363
+ templateUrl: './view-layout.component.html'
2364
+ }]
2365
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$1.Router }]; }, propDecorators: { searchInput$: [{
2366
+ type: i0.ViewChild,
2367
+ args: ['search']
2368
+ }], header: [{
2369
+ type: i0.Input,
2370
+ args: ['show-header']
2371
+ }], fluid: [{
2372
+ type: i0.Input
2373
+ }], title: [{
2374
+ type: i0.Input
2375
+ }], icon: [{
2376
+ type: i0.Input
2377
+ }], actions: [{
2378
+ type: i0.Input
2379
+ }], busy: [{
2380
+ type: i0.Input
2381
+ }], searchPlaceholder: [{
2382
+ type: i0.Input,
2383
+ args: ['search-placeholder']
2384
+ }], view: [{
2385
+ type: i0.Input
2386
+ }], metaItems: [{
2387
+ type: i0.Input,
2388
+ args: ['meta-items']
2389
+ }], onAction: [{
2390
+ type: i0.Output
2391
+ }], onSearch: [{
2392
+ type: i0.Output
2393
+ }] } });
2394
+
2395
+ var ModelViewLayoutComponent = /** @class */ (function () {
2396
+ function ModelViewLayoutComponent(location) {
2397
+ this.location = location;
2398
+ this.showRightPaneSM = false;
2399
+ this.title = 'no title';
2400
+ // tslint:disable-next-line:no-input-rename
2401
+ this.primary = null;
2402
+ // tslint:disable-next-line:no-input-rename
2403
+ this.secondary = null;
2404
+ // tslint:disable-next-line:no-input-rename
2405
+ this.metaItems = [
2406
+ // { key: 'test', icon: Icons.Badges, text: 'βρέθηκαν 200 αποτελέσματα' }
2407
+ ];
2408
+ }
2409
+ ModelViewLayoutComponent.prototype.ngOnInit = function () {
2410
+ };
2411
+ ModelViewLayoutComponent.prototype.onSidePaneActivated = function ($event) {
2412
+ //console.log('onSidePaneActivated', $event);
2413
+ this.showRightPaneSM = true;
2414
+ };
2415
+ ModelViewLayoutComponent.prototype.onSidePaneDeactivated = function ($event) {
2416
+ //console.log('onSidePaneActivated', $event);
2417
+ this.showRightPaneSM = false;
2418
+ };
2419
+ ModelViewLayoutComponent.prototype.closeSidePane = function () {
2420
+ this.location.back();
2421
+ };
2422
+ return ModelViewLayoutComponent;
2423
+ }());
2424
+ ModelViewLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModelViewLayoutComponent, deps: [{ token: i1__namespace.Location }], target: i0__namespace.ɵɵFactoryTarget.Component });
2425
+ ModelViewLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ModelViewLayoutComponent, selector: "lib-model-view-layout", inputs: { title: "title", primary: ["primary-links", "primary"], secondary: ["secondary-links", "secondary"], metaItems: ["meta-items", "metaItems"] }, ngImport: i0__namespace, template: "<lib-view-layout [title]=\"title\" [meta-items]=\"metaItems\">\r\n <main class=\"model-view-container\">\r\n <div class=\"model-view-container-inner\">\r\n <aside class=\"model-view-aside\">\r\n <section aria-labelledby=\"menu\" class=\"details-view-aside-header-section\">\r\n <div class=\"model-view-aside-header-container\">\r\n <div class=\"model-view-aside-header-container-inner\">\r\n <ng-content></ng-content>\r\n </div>\r\n <!-- menu items -->\r\n <div class=\"model-view-menu-container\">\r\n <nav class=\"model-view-menu-nav\">\r\n <div class=\"model-view-menu-item\">\r\n <ng-container *ngFor=\"let section of primary\">\r\n <a href=\"#\"\r\n [routerLinkActive]=\"['view-nav-link-active']\"\r\n [routerLink]=\"section.link\"\r\n class=\"view-nav-link\">\r\n {{section.text}}\r\n </a>\r\n </ng-container>\r\n </div>\r\n <div class=\"model-view-menu-item-far\">\r\n <ng-container *ngFor=\"let section of secondary\">\r\n <a href=\"#\"\r\n [routerLinkActive]=\"['view-nav-link-active']\"\r\n [routerLinkActiveOptions]=\"{ exact: true }\"\r\n [routerLink]=\"section.link\"\r\n class=\"view-nav-link\">\r\n {{section.text}}\r\n </a>\r\n </ng-container>\r\n </div>\r\n </nav>\r\n </div>\r\n </div>\r\n </section>\r\n </aside>\r\n <div class=\"model-view-details-container\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n </div>\r\n </main>\r\n", components: [{ type: ViewLayoutComponent, selector: "lib-view-layout", inputs: ["show-header", "fluid", "title", "icon", "actions", "busy", "search-placeholder", "view", "meta-items"], outputs: ["onAction", "onSearch"] }], directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["routerLink", "target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo"] }, { type: i1__namespace$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], exportAs: ["routerLinkActive"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }] });
2426
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModelViewLayoutComponent, decorators: [{
2427
+ type: i0.Component,
2428
+ args: [{
2429
+ // tslint:disable-next-line:component-selector
2430
+ selector: 'lib-model-view-layout',
2431
+ templateUrl: './model-view-layout.component.html'
2432
+ }]
2433
+ }], ctorParameters: function () { return [{ type: i1__namespace.Location }]; }, propDecorators: { title: [{
2434
+ type: i0.Input
2435
+ }], primary: [{
2436
+ type: i0.Input,
2437
+ args: ['primary-links']
2438
+ }], secondary: [{
2439
+ type: i0.Input,
2440
+ args: ['secondary-links']
2441
+ }], metaItems: [{
2442
+ type: i0.Input,
2443
+ args: ['meta-items']
2444
+ }] } });
2445
+
2446
+ var SideViewLayoutComponent = /** @class */ (function () {
2447
+ function SideViewLayoutComponent(location, router) {
2448
+ this.location = location;
2449
+ this.router = router;
2450
+ this.title = 'Πληροφορίες';
2451
+ this.showActions = true;
2452
+ this.disabled = false;
2453
+ // tslint:disable-next-line:no-input-rename
2454
+ this.okLabel = 'Αποθήκευση';
2455
+ // tslint:disable-next-line:no-input-rename
2456
+ this.okShow = true;
2457
+ // tslint:disable-next-line:no-input-rename
2458
+ this.closeOnOk = true;
2459
+ // tslint:disable-next-line:no-input-rename
2460
+ this.cancelLabel = 'Ακύρωση';
2461
+ // tslint:disable-next-line:no-input-rename
2462
+ this.cancelShow = true;
2463
+ // tslint:disable-next-line:no-input-rename
2464
+ this.forceLocationBack = false;
2465
+ // @Output() close = new EventEmitter<any>();
2466
+ this.cancel = new i0.EventEmitter();
2467
+ this.ok = new i0.EventEmitter();
2468
+ }
2469
+ SideViewLayoutComponent.prototype.ngOnInit = function () {
2470
+ };
2471
+ SideViewLayoutComponent.prototype.closeSidePane = function () {
2472
+ var _this = this;
2473
+ if (this.returnPath) {
2474
+ this.router.navigateByUrl('/', { skipLocationChange: true }).then(function () { return _this.router.navigateByUrl(_this.returnPath || '/'); });
2475
+ }
2476
+ else {
2477
+ if ((this.router.url.split('/(')[0] !== this.router.url) && !this.forceLocationBack) {
2478
+ this.router.navigateByUrl(this.router.url.split('/(')[0]);
2479
+ }
2480
+ else if ((this.router.url.split('(')[0] !== this.router.url) && !this.forceLocationBack) {
2481
+ this.router.navigateByUrl(this.router.url.split('(')[0]);
2482
+ }
2483
+ else {
2484
+ this.location.back();
2485
+ }
2486
+ }
2487
+ };
2488
+ SideViewLayoutComponent.prototype.emitClose = function () {
2489
+ this.cancel.emit(false);
2490
+ this.closeSidePane();
2491
+ };
2492
+ SideViewLayoutComponent.prototype.emitCancel = function () {
2493
+ this.cancel.emit(false);
2494
+ this.closeSidePane();
2495
+ };
2496
+ SideViewLayoutComponent.prototype.emitOK = function () {
2497
+ this.ok.emit(true);
2498
+ if (this.closeOnOk) {
2499
+ this.closeSidePane();
2500
+ }
2501
+ };
2502
+ return SideViewLayoutComponent;
2503
+ }());
2504
+ SideViewLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SideViewLayoutComponent, deps: [{ token: i1__namespace.Location }, { token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
2505
+ SideViewLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: SideViewLayoutComponent, selector: "lib-side-view-layout", inputs: { title: "title", showActions: "showActions", disabled: "disabled", returnPath: ["return-path", "returnPath"], okLabel: ["ok-label", "okLabel"], okShow: ["ok-show", "okShow"], closeOnOk: ["ok-close-dialog", "closeOnOk"], cancelLabel: ["cancel-label", "cancelLabel"], cancelShow: ["cancel-show", "cancelShow"], forceLocationBack: ["force-location-back", "forceLocationBack"] }, outputs: { cancel: "cancel", ok: "ok" }, ngImport: i0__namespace, template: "<div class=\"side-view-layout-size-box\">\r\n <div class=\"side-view-layout-container\">\r\n <div class=\"side-view-layout-container-inner\">\r\n <div class=\"side-view-layout-header-margins\">\r\n <div class=\"side-view-layout-header-container\">\r\n <h2 class=\"side-view-layout-header-title\" id=\"slide-over-title\">\r\n {{title}}\r\n </h2>\r\n <div class=\"side-view-layout-close-button-container\">\r\n <button (click)=\"emitClose()\" class=\"side-view-layout-close-button\">\r\n <span class=\"sr-only\">Close panel</span>\r\n <!-- Heroicon name: outline/x -->\r\n <svg class=\"side-view-layout-close-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"side-view-layout-content-container\">\r\n <!-- Replace with your content -->\r\n <ng-content></ng-content>\r\n <!-- /End replace -->\r\n </div>\r\n </div>\r\n <div *ngIf=\"showActions\" class=\"side-view-layout-actions-container\">\r\n <button *ngIf=\"cancelShow\" (click)=\"emitCancel()\" type=\"button\" class=\"side-view-layout-action-button-cancel\">\r\n {{cancelLabel}}\r\n </button>\r\n <button *ngIf=\"okShow\" (click)=\"emitOK()\" class=\"side-view-layout-action-button-submit\" [disabled]=\"disabled\">\r\n {{okLabel}}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2506
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: SideViewLayoutComponent, decorators: [{
2507
+ type: i0.Component,
2508
+ args: [{
2509
+ selector: 'lib-side-view-layout',
2510
+ templateUrl: './side-view-layout.component.html'
2511
+ }]
2512
+ }], ctorParameters: function () { return [{ type: i1__namespace.Location }, { type: i1__namespace$1.Router }]; }, propDecorators: { title: [{
2513
+ type: i0.Input
2514
+ }], showActions: [{
2515
+ type: i0.Input
2516
+ }], disabled: [{
2517
+ type: i0.Input
2518
+ }], returnPath: [{
2519
+ type: i0.Input,
2520
+ args: ['return-path']
2521
+ }], okLabel: [{
2522
+ type: i0.Input,
2523
+ args: ['ok-label']
2524
+ }], okShow: [{
2525
+ type: i0.Input,
2526
+ args: ['ok-show']
2527
+ }], closeOnOk: [{
2528
+ type: i0.Input,
2529
+ args: ['ok-close-dialog']
2530
+ }], cancelLabel: [{
2531
+ type: i0.Input,
2532
+ args: ['cancel-label']
2533
+ }], cancelShow: [{
2534
+ type: i0.Input,
2535
+ args: ['cancel-show']
2536
+ }], forceLocationBack: [{
2537
+ type: i0.Input,
2538
+ args: ['force-location-back']
2539
+ }], cancel: [{
2540
+ type: i0.Output
2541
+ }], ok: [{
2542
+ type: i0.Output
2543
+ }] } });
2544
+
2545
+ var FormLayoutComponent = /** @class */ (function () {
2546
+ function FormLayoutComponent(router$) {
2547
+ this.router$ = router$;
2548
+ this.title = null;
2549
+ // tslint:disable-next-line:no-input-rename
2550
+ this.searchPlaceholder = 'αναζήτηση';
2551
+ this.actions = null;
2552
+ // tslint:disable-next-line:no-input-rename
2553
+ this.subTitle = null;
2554
+ // tslint:disable-next-line:no-output-on-prefix
2555
+ this.onAction = new i0.EventEmitter();
2556
+ // tslint:disable-next-line:no-output-on-prefix
2557
+ this.onSearch = new i0.EventEmitter();
2558
+ this.onComplete = new i0.EventEmitter();
2559
+ }
2560
+ FormLayoutComponent.prototype.ngOnInit = function () {
2561
+ var _a;
2562
+ if ((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement) {
2563
+ rxjs.fromEvent(this.searchInput$.nativeElement, 'keyup').pipe(operators.map(function (event) {
2564
+ return event.target.value; // Get input value.
2565
+ }), operators.filter(function (inputValue) { return inputValue.length >= 3 || inputValue.length === 0; }),
2566
+ // If character length greater than minimumSearchCharacters setting.
2567
+ operators.debounceTime(1000), // Time in milliseconds between key events.
2568
+ operators.distinctUntilChanged() // If previous query is different from current.
2569
+ ).subscribe();
2570
+ }
2571
+ };
2572
+ FormLayoutComponent.prototype.onSidePaneDeactivated = function ($event) {
2573
+ this.onComplete.emit(true);
2574
+ };
2575
+ FormLayoutComponent.prototype.emitActionClick = function (action) {
2576
+ this.onAction.emit(action);
2577
+ };
2578
+ FormLayoutComponent.prototype.searchActionClick = function (action, text) {
2579
+ this.onSearch.emit(text);
2580
+ };
2581
+ FormLayoutComponent.prototype.searchActionType = function (text) {
2582
+ var _a;
2583
+ this.onSearch.emit((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement.value);
2584
+ };
2585
+ FormLayoutComponent.prototype.routerLinkActionClick = function (action, relative) {
2586
+ if (relative === void 0) { relative = false; }
2587
+ if (action.outlet) {
2588
+ this.router$.navigate(['', { outlets: { formRightPane: action.link } }]);
2589
+ }
2590
+ else {
2591
+ this.router$.navigate([action.link]);
2592
+ }
2593
+ };
2594
+ return FormLayoutComponent;
2595
+ }());
2596
+ FormLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: FormLayoutComponent, deps: [{ token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
2597
+ FormLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: FormLayoutComponent, selector: "lib-form-layout", inputs: { title: "title", searchPlaceholder: ["search-placeholder", "searchPlaceholder"], actions: "actions", subTitle: ["sub-title", "subTitle"] }, outputs: { onAction: "onAction", onSearch: "onSearch", onComplete: "onComplete" }, viewQueries: [{ propertyName: "searchInput$", first: true, predicate: ["search"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"form-layout-container\">\r\n <div class=\"form-header\" *ngIf=\"title || subTitle || actions\">\r\n <div class=\"form-header-inner\">\r\n <h3 class=\"form-title\">\r\n {{ title }}\r\n </h3>\r\n <p class=\"form-subtitle\">\r\n {{ subTitle }}\r\n </p>\r\n </div>\r\n <div class=\"form-header-actions\">\r\n <ng-container *ngFor=\"let action of actions\"\r\n [ngSwitch]=\"action.type\">\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <label for=\"search\"\r\n class=\"sr-only\">Search</label>\r\n <div class=\"search-container\">\r\n <div class=\"pointer-events-none absolute inset-y-0 left-0 pl-3 flex items-center\">\r\n <!--<svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\" d=\"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z\" clip-rule=\"evenodd\" />\r\n </svg>-->\r\n </div>\r\n <input id=\"search\"\r\n #search\r\n class=\"form-search-input\"\r\n [placeholder]=\"searchPlaceholder\"\r\n type=\"search\"\r\n name=\"search\"\r\n (input)=\"searchActionType(search.value)\">\r\n </div>\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"btn-form-view-header-search\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"searchActionClick(action, search.value)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'router-link'\">\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"ml-1 btn-form-view-header\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"routerLinkActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button type=\"button\"\r\n class=\"ml-1 btn-form-view-header\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"emitActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"form-content-container\">\r\n <div [ngClass]=\"{'form-content-container-inner': actions}\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <lib-side-pane #formPane (onComplete)=\"onSidePaneDeactivated($event)\">\r\n <router-outlet name=\"formRightPane\"\r\n (activate)=\"formPane.onSidePaneActivated($event)\"\r\n (deactivate)=\"formPane.onSidePaneDeactivated($event)\"></router-outlet>\r\n </lib-side-pane>\r\n</div>\r\n", components: [{ type: SidePaneComponent, selector: "lib-side-pane", inputs: ["visible"], outputs: ["onComplete"] }], directives: [{ type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }] });
2598
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: FormLayoutComponent, decorators: [{
2599
+ type: i0.Component,
2600
+ args: [{
2601
+ selector: 'lib-form-layout',
2602
+ templateUrl: './form-layout.component.html'
2603
+ }]
2604
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }]; }, propDecorators: { searchInput$: [{
2605
+ type: i0.ViewChild,
2606
+ args: ['search']
2607
+ }], title: [{
2608
+ type: i0.Input
2609
+ }], searchPlaceholder: [{
2610
+ type: i0.Input,
2611
+ args: ['search-placeholder']
2612
+ }], actions: [{
2613
+ type: i0.Input
2614
+ }], subTitle: [{
2615
+ type: i0.Input,
2616
+ args: ['sub-title']
2617
+ }], onAction: [{
2618
+ type: i0.Output
2619
+ }], onSearch: [{
2620
+ type: i0.Output
2621
+ }], onComplete: [{
2622
+ type: i0.Output
2623
+ }] } });
2624
+
2625
+ var AuthCallbackComponent = /** @class */ (function () {
2626
+ function AuthCallbackComponent(authService, router) {
2627
+ this.authService = authService;
2628
+ this.router = router;
2629
+ this.status = 'παρακαλώ περιμένετε...';
2630
+ }
2631
+ AuthCallbackComponent.prototype.ngOnInit = function () {
2632
+ var _this = this;
2633
+ this.authService.signinRedirectCallback().subscribe(function (user) {
2634
+ var _a;
2635
+ if (user) {
2636
+ _this.router.navigateByUrl(((_a = user.state) === null || _a === void 0 ? void 0 : _a.url) || '/');
2637
+ }
2638
+ });
2639
+ };
2640
+ return AuthCallbackComponent;
2641
+ }());
2642
+ AuthCallbackComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AuthCallbackComponent, deps: [{ token: i2.AuthService }, { token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
2643
+ AuthCallbackComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: AuthCallbackComponent, selector: "lib-auth-callback", ngImport: i0__namespace, template: "<lib-view-layout [title]=\"status\" [busy]=\"true\"></lib-view-layout>", components: [{ type: ViewLayoutComponent, selector: "lib-view-layout", inputs: ["show-header", "fluid", "title", "icon", "actions", "busy", "search-placeholder", "view", "meta-items"], outputs: ["onAction", "onSearch"] }] });
2644
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AuthCallbackComponent, decorators: [{
2645
+ type: i0.Component,
2646
+ args: [{
2647
+ selector: 'lib-auth-callback',
2648
+ templateUrl: './auth-callback.component.html'
2649
+ }]
2650
+ }], ctorParameters: function () {
2651
+ return [{ type: i2__namespace.AuthService, decorators: [{
2652
+ type: i0.Inject,
2653
+ args: [i2.AuthService]
2654
+ }] }, { type: i1__namespace$1.Router }];
2655
+ } });
2656
+
2657
+ var AuthRenewComponent = /** @class */ (function () {
2658
+ function AuthRenewComponent(authService, router) {
2659
+ this.authService = authService;
2660
+ this.router = router;
2661
+ }
2662
+ AuthRenewComponent.prototype.ngOnInit = function () {
2663
+ var _this = this;
2664
+ this.authService.signinSilentCallback().subscribe(function (user) {
2665
+ if (!user) {
2666
+ _this.router.navigate(['/unauthorized']);
2667
+ }
2668
+ });
2669
+ };
2670
+ return AuthRenewComponent;
2671
+ }());
2672
+ AuthRenewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AuthRenewComponent, deps: [{ token: i2.AuthService }, { token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
2673
+ AuthRenewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: AuthRenewComponent, selector: "lib-auth-renew", ngImport: i0__namespace, template: '', isInline: true });
2674
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AuthRenewComponent, decorators: [{
2675
+ type: i0.Component,
2676
+ args: [{
2677
+ selector: 'lib-auth-renew',
2678
+ template: ''
2679
+ }]
2680
+ }], ctorParameters: function () {
2681
+ return [{ type: i2__namespace.AuthService, decorators: [{
2682
+ type: i0.Inject,
2683
+ args: [i2.AuthService]
2684
+ }] }, { type: i1__namespace$1.Router }];
2685
+ } });
2686
+
2687
+ var LoggedOutComponent = /** @class */ (function () {
2688
+ function LoggedOutComponent(authService) {
2689
+ this.authService = authService;
2690
+ this.status = 'working on it, please give me a sec...';
2691
+ this.finished = false;
2692
+ }
2693
+ LoggedOutComponent.prototype.ngOnInit = function () {
2694
+ var _this = this;
2695
+ this.authService.removeUser().subscribe(function () {
2696
+ _this.status = 'Thank you!';
2697
+ _this.finished = true;
2698
+ });
2699
+ };
2700
+ return LoggedOutComponent;
2701
+ }());
2702
+ LoggedOutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: LoggedOutComponent, deps: [{ token: i2.AuthService }], target: i0__namespace.ɵɵFactoryTarget.Component });
2703
+ LoggedOutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: LoggedOutComponent, selector: "lib-logged-out", ngImport: i0__namespace, template: "<lib-view-layout title=\"\u0388\u03C7\u03B5\u03C4\u03B5 \u03B1\u03C0\u03BF\u03C3\u03C5\u03BD\u03B4\u03B5\u03B8\u03B5\u03AF \u03BC\u03B5 \u03B5\u03C0\u03B9\u03C4\u03C5\u03C7\u03AF\u03B1!\"></lib-view-layout>", components: [{ type: ViewLayoutComponent, selector: "lib-view-layout", inputs: ["show-header", "fluid", "title", "icon", "actions", "busy", "search-placeholder", "view", "meta-items"], outputs: ["onAction", "onSearch"] }] });
2704
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: LoggedOutComponent, decorators: [{
2705
+ type: i0.Component,
2706
+ args: [{
2707
+ // tslint:disable-next-line:component-selector
2708
+ selector: 'lib-logged-out',
2709
+ templateUrl: './logged-out.component.html'
2710
+ }]
2711
+ }], ctorParameters: function () {
2712
+ return [{ type: i2__namespace.AuthService, decorators: [{
2713
+ type: i0.Inject,
2714
+ args: [i2.AuthService]
2715
+ }] }];
2716
+ } });
2717
+
2718
+ var ErrorComponent = /** @class */ (function () {
2719
+ function ErrorComponent() {
2720
+ this.error = 'Error!';
2721
+ }
2722
+ ErrorComponent.prototype.ngOnInit = function () {
2723
+ };
2724
+ return ErrorComponent;
2725
+ }());
2726
+ ErrorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ErrorComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2727
+ ErrorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ErrorComponent, selector: "lib-error", ngImport: i0__namespace, template: "<lib-view-layout [show-header]=\"false\" title=\"500 - \u03C0\u03B1\u03C1\u03BF\u03C5\u03C3\u03B9\u03AC\u03C3\u03C4\u03B7\u03BA\u03B5 \u03C3\u03C6\u03AC\u03BB\u03BC\u03B1!\">\r\n <div class=\"bg-gray-600 view-container\">\r\n <div class=\"max-w-2xl mx-auto text-center py-16 px-4 sm:py-20 sm:px-6 lg:px-8\">\r\n <h2 class=\"text-3xl font-extrabold text-white sm:text-4xl\">\r\n <span class=\"block\">500</span>\r\n </h2>\r\n <p class=\"mt-4 text-lg leading-6 text-gray-200\">\u03C3\u03C6\u03AC\u03BB\u03BC\u03B1, \u03BA\u03B1\u03C4\u03B9 \u03B4\u03B5\u03BD \u03C0\u03AE\u03B3\u03B5 \u03BA\u03B1\u03BB\u03AC...!</p>\r\n <a href=\"/\" class=\"mt-8 inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-sm rounded-sm text-gray-600 bg-white hover:bg-gray-50 sm:w-auto\">\r\n \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B5\u03B4\u03CE \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B5\u03C0\u03B9\u03C3\u03C4\u03C1\u03AD\u03C8\u03B5\u03C4\u03B5\r\n </a>\r\n </div>\r\n </div>\r\n</lib-view-layout>\r\n", components: [{ type: ViewLayoutComponent, selector: "lib-view-layout", inputs: ["show-header", "fluid", "title", "icon", "actions", "busy", "search-placeholder", "view", "meta-items"], outputs: ["onAction", "onSearch"] }] });
2728
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ErrorComponent, decorators: [{
2729
+ type: i0.Component,
2730
+ args: [{
2731
+ selector: 'lib-error',
2732
+ templateUrl: './error.component.html'
2733
+ }]
2734
+ }] });
2735
+
2736
+ var PageNotFoundComponent = /** @class */ (function () {
2737
+ function PageNotFoundComponent() {
2738
+ }
2739
+ PageNotFoundComponent.prototype.ngOnInit = function () {
2740
+ };
2741
+ return PageNotFoundComponent;
2742
+ }());
2743
+ PageNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PageNotFoundComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2744
+ PageNotFoundComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: PageNotFoundComponent, selector: "lib-page-not-found", ngImport: i0__namespace, template: "<lib-view-layout [show-header]=\"false\"\r\n title=\"404 - \u03B4\u03B5\u03BD \u03B2\u03C1\u03AD\u03B8\u03B7\u03BA\u03B5!\">\r\n <div class=\"bg-gray-600 view-container\">\r\n <div class=\"max-w-2xl mx-auto text-center py-16 px-4 sm:py-20 sm:px-6 lg:px-8\">\r\n <h2 class=\"text-3xl font-extrabold text-white sm:text-4xl\">\r\n <span class=\"block\">404</span>\r\n </h2>\r\n <p class=\"mt-4 text-lg leading-6 text-gray-200\">\u03B4\u03B5\u03BD \u03B2\u03C1\u03AD\u03B8\u03B7\u03BA\u03B5 \u03B7 \u03C3\u03B5\u03BB\u03AF\u03B4\u03B1 \u03C0\u03BF\u03C5 \u03B6\u03B7\u03C4\u03AE\u03C3\u03B1\u03C4\u03B5!</p>\r\n <a href=\"/\"\r\n class=\"mt-8 inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-sm rounded-sm text-gray-600 bg-white hover:bg-gray-50 sm:w-auto\">\r\n \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B5\u03B4\u03CE \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B5\u03C0\u03B9\u03C3\u03C4\u03C1\u03AD\u03C8\u03B5\u03C4\u03B5\r\n </a>\r\n </div>\r\n </div>\r\n</lib-view-layout>", components: [{ type: ViewLayoutComponent, selector: "lib-view-layout", inputs: ["show-header", "fluid", "title", "icon", "actions", "busy", "search-placeholder", "view", "meta-items"], outputs: ["onAction", "onSearch"] }] });
2745
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: PageNotFoundComponent, decorators: [{
2746
+ type: i0.Component,
2747
+ args: [{
2748
+ selector: 'lib-page-not-found',
2749
+ templateUrl: './page-not-found.component.html'
2750
+ }]
2751
+ }], ctorParameters: function () { return []; } });
2752
+
2753
+ var UnauthorizedComponent = /** @class */ (function () {
2754
+ function UnauthorizedComponent() {
2755
+ }
2756
+ UnauthorizedComponent.prototype.ngOnInit = function () { };
2757
+ return UnauthorizedComponent;
2758
+ }());
2759
+ UnauthorizedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: UnauthorizedComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
2760
+ UnauthorizedComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: UnauthorizedComponent, selector: "lib-unauthorized", ngImport: i0__namespace, template: "<lib-view-layout [show-header]=\"false\" title=\"401 - \u03B4\u03B5\u03BD \u03B5\u03C0\u03B9\u03C4\u03C1\u03AD\u03C0\u03B5\u03C4\u03B1\u03B9 \u03B7 \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7!\">\r\n <div class=\"bg-gray-600 view-container\">\r\n <div class=\"max-w-2xl mx-auto text-center py-16 px-4 sm:py-20 sm:px-6 lg:px-8\">\r\n <h2 class=\"text-3xl font-extrabold text-white sm:text-4xl\">\r\n <span class=\"block\">401</span>\r\n </h2>\r\n <p class=\"mt-4 text-lg leading-6 text-gray-200\">\u03B4\u03B5\u03BD \u03AD\u03C7\u03B5\u03C4\u03B5 \u03C4\u03B1 \u03BA\u03B1\u03C4\u03AC\u03BB\u03BB\u03B7\u03BB\u03B1 \u03B4\u03B9\u03BA\u03B1\u03B9\u03CE\u03BC\u03B1\u03C4\u03B1 \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7\u03C2!</p>\r\n <a href=\"/\" class=\"mt-8 inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-sm rounded-sm text-gray-600 bg-white hover:bg-gray-50 sm:w-auto\">\r\n \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u03B5\u03B4\u03CE \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B5\u03C0\u03B9\u03C3\u03C4\u03C1\u03AD\u03C8\u03B5\u03C4\u03B5\r\n </a>\r\n </div>\r\n </div>\r\n </lib-view-layout>\r\n\r\n\r\n", components: [{ type: ViewLayoutComponent, selector: "lib-view-layout", inputs: ["show-header", "fluid", "title", "icon", "actions", "busy", "search-placeholder", "view", "meta-items"], outputs: ["onAction", "onSearch"] }] });
2761
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: UnauthorizedComponent, decorators: [{
2762
+ type: i0.Component,
2763
+ args: [{
2764
+ selector: 'lib-unauthorized',
2765
+ templateUrl: './unauthorized.component.html'
2766
+ }]
2767
+ }], ctorParameters: function () { return []; } });
2768
+
2769
+ var AddressPipe = /** @class */ (function () {
2770
+ function AddressPipe() {
2771
+ }
2772
+ AddressPipe.prototype.transform = function (value) {
2773
+ if (value === undefined || null || '') {
2774
+ return '';
2775
+ }
2776
+ // tslint:disable-next-line:no-non-null-assertion
2777
+ return "" + (value.street || '') + (value.streetNumber ? ' ' + value.streetNumber : '') + (value.city ? ', ' + value.city : '') + (+value.postalCode ? ', ' + +value.postalCode : '');
2778
+ };
2779
+ return AddressPipe;
2780
+ }());
2781
+ AddressPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AddressPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
2782
+ AddressPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AddressPipe, name: "address", pure: false });
2783
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: AddressPipe, decorators: [{
2784
+ type: i0.Pipe,
2785
+ args: [{
2786
+ name: 'address',
2787
+ pure: false
2788
+ }]
2789
+ }] });
2790
+
2791
+ var DurationFormatPipe = /** @class */ (function () {
2792
+ function DurationFormatPipe() {
2793
+ }
2794
+ DurationFormatPipe.prototype.transform = function (value, arg1, arg2) {
2795
+ var days;
2796
+ var seconds;
2797
+ var minutes;
2798
+ var hours;
2799
+ if (arg1 === 'ms' && arg2 === 'hhmmss') {
2800
+ seconds = Math.floor((value / 1000) % 60);
2801
+ minutes = Math.floor(((value / (1000 * 60)) % 60));
2802
+ hours = Math.floor((value / (1000 * 60 * 60)));
2803
+ return this.format(arg2, seconds, minutes, hours, days);
2804
+ }
2805
+ else if (arg1 === 's' && arg2 === 'hhmmss') {
2806
+ seconds = Math.floor((value % 60));
2807
+ minutes = Math.floor(((value / 60) % 60));
2808
+ hours = Math.floor(((value / 60) / 60));
2809
+ return this.format(arg2, seconds, minutes, hours, days);
2810
+ }
2811
+ else if (arg1 === 'ms' && (arg2 === 'ddhhmmss' || arg2 === 'ddhhmmssLong')) {
2812
+ seconds = Math.floor(((value / 1000) % 60));
2813
+ minutes = Math.floor((value / (1000 * 60) % 60));
2814
+ hours = Math.floor((value / (1000 * 60 * 60) % 24));
2815
+ days = Math.floor((value / (1000 * 60 * 60 * 24)));
2816
+ return this.format(arg2, seconds, minutes, hours, days);
2817
+ }
2818
+ else if (arg1 === 's' && (arg2 === 'ddhhmmss' || arg2 === 'ddhhmmssLong')) {
2819
+ seconds = Math.floor(value % 60);
2820
+ minutes = Math.floor(((value / 60) % 60));
2821
+ hours = Math.floor(((value / 60) / 60) % 24);
2822
+ days = Math.floor((((value / 60) / 60) / 24));
2823
+ return this.format(arg2, seconds, minutes, hours, days);
2824
+ }
2825
+ else {
2826
+ return value;
2827
+ }
2828
+ };
2829
+ DurationFormatPipe.prototype.format = function (arg2, seconds, minutes, hours, days) {
2830
+ (days < 10) ? days = '0' + days : days;
2831
+ (hours < 10) ? hours = '0' + hours : hours;
2832
+ (minutes < 10) ? minutes = '0' + minutes : minutes;
2833
+ (seconds < 10) ? seconds = '0' + seconds : seconds;
2834
+ switch (arg2) {
2835
+ case 'hhmmss':
2836
+ return hours + ":" + minutes + ":" + seconds;
2837
+ case 'ddhhmmss':
2838
+ return days + "d, " + hours + "h, " + minutes + "m, " + seconds + "s";
2839
+ case 'ddhhmmssLong':
2840
+ return days + " days, " + hours + " hours, " + minutes + " minutes, " + seconds + " seconds";
2841
+ }
2842
+ return undefined;
2843
+ };
2844
+ return DurationFormatPipe;
2845
+ }());
2846
+ DurationFormatPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DurationFormatPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
2847
+ DurationFormatPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DurationFormatPipe, name: "durationFormat", pure: false });
2848
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DurationFormatPipe, decorators: [{
2849
+ type: i0.Pipe,
2850
+ args: [{
2851
+ name: 'durationFormat',
2852
+ pure: false
2853
+ }]
2854
+ }] });
2855
+
2856
+ var BaseListComponent = /** @class */ (function () {
2857
+ function BaseListComponent(route$, router$) {
2858
+ this.route$ = route$;
2859
+ this.router$ = router$;
2860
+ this.items = null;
2861
+ this.view = ListViewType.Tiles;
2862
+ this.title = null;
2863
+ this.actions = [];
2864
+ this.loaderItems = [1, 2, 3, 4, 5];
2865
+ this.page = 1;
2866
+ this.pageSize = 20;
2867
+ this.count = 0;
2868
+ this.sort = '';
2869
+ this.sortdir = '-';
2870
+ this.search = '';
2871
+ this.sortOptions = [];
2872
+ this.metaItems = [];
2873
+ }
2874
+ BaseListComponent.prototype.ngOnDestroy = function () {
2875
+ if (this.routeSub$) {
2876
+ this.routeSub$.unsubscribe();
2877
+ }
2878
+ };
2879
+ BaseListComponent.prototype.getViewActions = function () {
2880
+ var actions = [
2881
+ new ViewAction('search', null, null, Icons.Search, 'αναζήτηση'),
2882
+ new ViewAction('refresh', null, null, Icons.Refresh, 'ανανέωση στοιχείων')
2883
+ ];
2884
+ if (this.newItemLink) {
2885
+ actions.push(new RouterViewAction(Icons.Add, this.newItemLink, 'rightpane', 'προσθήκη νέας εγγραφής;'));
2886
+ }
2887
+ return rxjs.of(actions);
2888
+ };
2889
+ BaseListComponent.prototype.ngOnInit = function () {
2890
+ var _this = this;
2891
+ this.getViewActions().subscribe(function (actions) {
2892
+ _this.actions = actions || [];
2893
+ });
2894
+ this.metaItems = [
2895
+ { key: 'count', icon: Icons.ItemsCount, text: 'παρακαλώ περιμένετε...' }
2896
+ ];
2897
+ // disabled external route changes monitoring due to sync issues - which is bad :) - refresh from url will not work
2898
+ // until i come up with a solution...
2899
+ this.routeSub$ = this.route$.queryParamMap.subscribe(function (params) {
2900
+ if (params.keys.length === 0) {
2901
+ return;
2902
+ }
2903
+ // changing the view mode does not require reloading...
2904
+ _this.view = params.get('view') || ListViewType.Tiles;
2905
+ // console.log('route changes ', this.view);
2906
+ // if (params.get('search') !== this.search) {
2907
+ // this.searchChanged(params.get('search'));
2908
+ // }
2909
+ // const page = +(params.get('page') || 1);
2910
+ // if (page !== this.page) {
2911
+ // this.page = page;
2912
+ // }
2913
+ // const size = +(params.get('pagesize') || 20);
2914
+ // if (this.pageSize !== size) {
2915
+ // this.pageSize = size;
2916
+ // }
2917
+ // if (params.get('search') !== this.search) {
2918
+ // this.search = params.get('search');
2919
+ // }
2920
+ // if (params.get('sort') !== this.sort) {
2921
+ // this.sort = params.get('sort');
2922
+ // }
2923
+ // if (params.get('sortdir') !== this.sortdir) {
2924
+ // this.sortdir = params.get('sortdir');
2925
+ // }
2926
+ });
2927
+ // just to sync params in query
2928
+ this.setRouteParams(true);
2929
+ this.load();
2930
+ };
2931
+ BaseListComponent.prototype.setRouteParams = function (locationChange) {
2932
+ if (locationChange === void 0) { locationChange = false; }
2933
+ this.router$.navigate([], {
2934
+ relativeTo: this.route$, queryParams: {
2935
+ view: this.view,
2936
+ page: this.page,
2937
+ pagesize: this.pageSize,
2938
+ search: this.search,
2939
+ sort: this.sort,
2940
+ dir: this.sortdir
2941
+ }, queryParamsHandling: 'merge', skipLocationChange: locationChange
2942
+ });
2943
+ };
2944
+ BaseListComponent.prototype.actionHandler = function ($event) {
2945
+ // console.log('BaseListComponent actionHandler', $event);
2946
+ if ($event.key === 'refresh') {
2947
+ this.refresh();
2948
+ }
2949
+ };
2950
+ BaseListComponent.prototype.load = function () {
2951
+ var _this = this;
2952
+ // console.log('BaseListComponent LOAD');
2953
+ this.count = 0;
2954
+ this.items = null;
2955
+ this.loadItems().subscribe(function (result) {
2956
+ _this.count = result ? result.count : 0;
2957
+ _this.items = result === null || result === void 0 ? void 0 : result.items;
2958
+ _this.updateHeaderMeta();
2959
+ }, function (err) {
2960
+ _this.count = 0;
2961
+ _this.items = null;
2962
+ _this.updateHeaderMeta();
2963
+ });
2964
+ };
2965
+ BaseListComponent.prototype.updateHeaderMeta = function () {
2966
+ var _a;
2967
+ var count = (_a = this.metaItems) === null || _a === void 0 ? void 0 : _a.filter(function (m) { return m.key === 'count'; })[0];
2968
+ if (count) {
2969
+ this.count === 1 ? count.text = this.count + " \u03B1\u03C0\u03BF\u03C4\u03AD\u03BB\u03B5\u03C3\u03BC\u03B1" : count.text = this.count + " \u03B1\u03C0\u03BF\u03C4\u03B5\u03BB\u03AD\u03C3\u03BC\u03B1\u03C4\u03B1";
2970
+ }
2971
+ };
2972
+ BaseListComponent.prototype.clear = function () {
2973
+ this.count = 0;
2974
+ this.page = 1;
2975
+ this.items = null;
2976
+ this.search = null;
2977
+ this.setRouteParams();
2978
+ this.load();
2979
+ };
2980
+ BaseListComponent.prototype.refresh = function () {
2981
+ this.count = 0;
2982
+ this.page = 1;
2983
+ this.items = null;
2984
+ this.setRouteParams();
2985
+ this.load();
2986
+ };
2987
+ BaseListComponent.prototype.pageChanged = function (page) {
2988
+ if (this.page !== page) {
2989
+ this.page = page;
2990
+ this.setRouteParams();
2991
+ this.load();
2992
+ }
2993
+ };
2994
+ BaseListComponent.prototype.pageSizeChanged = function (pageSize) {
2995
+ if (this.pageSize !== pageSize) {
2996
+ this.pageSize = pageSize;
2997
+ this.page = 1;
2998
+ this.setRouteParams();
2999
+ this.refresh();
3000
+ }
3001
+ };
3002
+ BaseListComponent.prototype.sortChanged = function (sort) {
3003
+ // console.log('base-list sortChanged', sort);
3004
+ if (this.sort !== sort) {
3005
+ this.page = 1;
3006
+ this.sort = sort;
3007
+ this.setRouteParams();
3008
+ this.refresh();
3009
+ }
3010
+ };
3011
+ BaseListComponent.prototype.sortdirChanged = function (sortdir) {
3012
+ if (this.sortdir !== sortdir) {
3013
+ this.page = 1;
3014
+ this.sortdir = sortdir;
3015
+ this.setRouteParams();
3016
+ this.refresh();
3017
+ }
3018
+ };
3019
+ BaseListComponent.prototype.searchChanged = function (searchText) {
3020
+ this.count = 0;
3021
+ this.page = 1;
3022
+ this.items = null;
3023
+ this.search = searchText;
3024
+ this.setRouteParams();
3025
+ this.load();
3026
+ };
3027
+ return BaseListComponent;
3028
+ }());
3029
+ BaseListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: BaseListComponent, deps: [{ token: i1__namespace$1.ActivatedRoute }, { token: i1__namespace$1.Router }], target: i0__namespace.ɵɵFactoryTarget.Component });
3030
+ BaseListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: BaseListComponent, selector: "ng-component", ngImport: i0__namespace, template: '', isInline: true });
3031
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: BaseListComponent, decorators: [{
3032
+ type: i0.Component,
3033
+ args: [{ template: '' }]
3034
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$1.Router }]; } });
3035
+
3036
+ var cssClassNames = {
3037
+ backdrop: 'modal-backdrop',
3038
+ show: 'show',
3039
+ fade: 'fade',
3040
+ modalOpen: 'modal-open'
3041
+ };
3042
+ var animationTime = {
3043
+ backdrop: 150,
3044
+ modal: 300,
3045
+ };
3046
+
3047
+ /**
3048
+ * Background layer for modals.
3049
+ * Override class name to theme it.
3050
+ * @see {@link cssClassNames}
3051
+ * @internal
3052
+ */
3053
+ var ModalBackdropComponent = /** @class */ (function () {
3054
+ function ModalBackdropComponent(element, renderer) {
3055
+ this.element = element;
3056
+ this.renderer = renderer;
3057
+ this.animationsEnabled = false;
3058
+ }
3059
+ ModalBackdropComponent.prototype.ngOnInit = function () {
3060
+ if (this.animationsEnabled) {
3061
+ this.renderer.addClass(this.element.nativeElement, cssClassNames.fade);
3062
+ this.reflow(this.element.nativeElement);
3063
+ }
3064
+ this.renderer.addClass(this.element.nativeElement, cssClassNames.show);
3065
+ };
3066
+ ModalBackdropComponent.prototype.hide = function () {
3067
+ var _this = this;
3068
+ this.renderer.removeClass(this.element.nativeElement, cssClassNames.show);
3069
+ setTimeout(function () { var _a; return (_a = _this.backdropLoader) === null || _a === void 0 ? void 0 : _a.hide(); }, this.animationsEnabled ? animationTime.backdrop : 0);
3070
+ };
3071
+ ModalBackdropComponent.prototype.reflow = function (element) {
3072
+ (function (bs) { return bs; })(element.offsetHeight);
3073
+ };
3074
+ return ModalBackdropComponent;
3075
+ }());
3076
+ ModalBackdropComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalBackdropComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
3077
+ ModalBackdropComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ModalBackdropComponent, selector: "lib-modal-backdrop", host: { classAttribute: "modal-backdrop" }, ngImport: i0__namespace, template: '', isInline: true, encapsulation: i0__namespace.ViewEncapsulation.None });
3078
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalBackdropComponent, decorators: [{
3079
+ type: i0.Component,
3080
+ args: [{
3081
+ selector: 'lib-modal-backdrop',
3082
+ encapsulation: i0.ViewEncapsulation.None,
3083
+ template: '',
3084
+ host: {
3085
+ class: cssClassNames.backdrop,
3086
+ },
3087
+ }]
3088
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.Renderer2 }]; } });
3089
+
3090
+ /**
3091
+ * Modals option can be passed to a specific modal from {@link ModalService.show} or
3092
+ * set globbaly using the injection token {@link MODAL_CONFIG_DEFAULT_OVERRIDE}.
3093
+ * @remarks
3094
+ * Modal specific options are merged with global options.
3095
+ * @see {@link modalConfigDefaults} for defaults.
3096
+ * @public
3097
+ */
3098
+ var ModalOptions = /** @class */ (function () {
3099
+ function ModalOptions() {
3100
+ }
3101
+ return ModalOptions;
3102
+ }());
3103
+ ModalOptions.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalOptions, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3104
+ ModalOptions.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalOptions });
3105
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalOptions, decorators: [{
3106
+ type: i0.Injectable
3107
+ }] });
3108
+ /**
3109
+ * Default option values.
3110
+ */
3111
+ var modalConfigDefaults = {
3112
+ backdrop: true,
3113
+ keyboard: true,
3114
+ show: false,
3115
+ ignoreBackdropClick: false,
3116
+ class: '',
3117
+ animated: true,
3118
+ initialState: {},
3119
+ closeInterceptor: void 0,
3120
+ };
3121
+ /**
3122
+ * Use this injection token to set global options.
3123
+ */
3124
+ var MODAL_CONFIG_DEFAULT_OVERRIDE = new i0.InjectionToken('override-default-config');
3125
+
3126
+ /**
3127
+ * Modal container component.
3128
+ * @remarks
3129
+ * All dynamic content `TemplateRef` or `Component` case will be drawn inside this.
3130
+ * You can override css classes to theme it {@link cssClassNames}
3131
+ * @internal
3132
+ */
3133
+ var ModalContainerComponent = /** @class */ (function () {
3134
+ function ModalContainerComponent(options, _element, renderer) {
3135
+ this._element = _element;
3136
+ this.renderer = renderer;
3137
+ this.isShown = false;
3138
+ this.animationsEnabled = false;
3139
+ this.isModalHiding = false;
3140
+ this.clickStartedInContent = false;
3141
+ this.config = Object.assign({}, options);
3142
+ }
3143
+ ModalContainerComponent.prototype.ngOnInit = function () {
3144
+ var _this = this;
3145
+ if (this.animationsEnabled) {
3146
+ this.renderer.addClass(this._element.nativeElement, cssClassNames.fade);
3147
+ }
3148
+ this.renderer.setStyle(this._element.nativeElement, 'display', 'block');
3149
+ setTimeout(function () {
3150
+ _this.isShown = true;
3151
+ _this.renderer.addClass(_this._element.nativeElement, cssClassNames.show);
3152
+ }, this.animationsEnabled ? animationTime.backdrop : 0);
3153
+ if (this._element.nativeElement) {
3154
+ this._element.nativeElement.focus();
3155
+ }
3156
+ };
3157
+ ModalContainerComponent.prototype.onClickStarted = function (event) {
3158
+ this.clickStartedInContent = event.target !== this._element.nativeElement;
3159
+ };
3160
+ ModalContainerComponent.prototype.onClickStop = function (event) {
3161
+ var clickedInBackdrop = event.target === this._element.nativeElement && !this.clickStartedInContent;
3162
+ if (this.config.ignoreBackdropClick || this.config.backdrop === 'static' || !clickedInBackdrop) {
3163
+ this.clickStartedInContent = false;
3164
+ return;
3165
+ }
3166
+ this.hide();
3167
+ };
3168
+ ModalContainerComponent.prototype.onPopState = function () {
3169
+ this.hide();
3170
+ };
3171
+ ModalContainerComponent.prototype.onEsc = function (event) {
3172
+ var _a;
3173
+ if (!this.isShown) {
3174
+ return;
3175
+ }
3176
+ if (event.keyCode === 27 || event.key === 'Escape' || event.key === 'Esc') {
3177
+ event.preventDefault();
3178
+ }
3179
+ if (this.config.keyboard && this.config.id === ((_a = this.modalService) === null || _a === void 0 ? void 0 : _a.getActiveModal().config.id)) {
3180
+ this.hide();
3181
+ }
3182
+ };
3183
+ ModalContainerComponent.prototype.ngOnDestroy = function () {
3184
+ if (this.isShown) {
3185
+ this._hide();
3186
+ }
3187
+ };
3188
+ ModalContainerComponent.prototype.hide = function (result) {
3189
+ var _this = this;
3190
+ if (this.isModalHiding || !this.isShown) {
3191
+ return;
3192
+ }
3193
+ if (this.config.closeInterceptor) {
3194
+ this.config.closeInterceptor().then(function () { return _this._hide(); }, function () { return undefined; });
3195
+ return;
3196
+ }
3197
+ this._hide(result);
3198
+ };
3199
+ ModalContainerComponent.prototype._hide = function (result) {
3200
+ var _this = this;
3201
+ this.isModalHiding = true;
3202
+ this.renderer.removeClass(this._element.nativeElement, cssClassNames.show);
3203
+ setTimeout(function () {
3204
+ var _a;
3205
+ _this.isShown = false;
3206
+ (_a = _this.modalService) === null || _a === void 0 ? void 0 : _a.hide(_this.config.id, result);
3207
+ _this.isModalHiding = false;
3208
+ }, this.animationsEnabled ? animationTime.modal : 0);
3209
+ };
3210
+ return ModalContainerComponent;
3211
+ }());
3212
+ ModalContainerComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalContainerComponent, deps: [{ token: ModalOptions }, { token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
3213
+ ModalContainerComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: ModalContainerComponent, selector: "lib-modal-container", host: { attributes: { "role": "dialog", "tabindex": "-1" }, listeners: { "mousedown": "onClickStarted($event)", "click": "onClickStop($event)", "window:popstate": "onPopState()", "window:keydown.esc": "onEsc($event)" }, properties: { "attr.aria-modal": "true", "attr.aria-labelledby": "config.ariaLabelledBy", "attr.aria-describedby": "config.ariaDescribedby" }, classAttribute: "modal" }, ngImport: i0__namespace, template: "\n <div [class]=\"'modal-dialog' + (config.class ? ' ' + config.class : '')\" role=\"document\" focusTrap>\n <div class=\"modal-content\">\n <ng-content></ng-content>\n </div>\n </div>\n ", isInline: true });
3214
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalContainerComponent, decorators: [{
3215
+ type: i0.Component,
3216
+ args: [{
3217
+ selector: 'lib-modal-container',
3218
+ template: "\n <div [class]=\"'modal-dialog' + (config.class ? ' ' + config.class : '')\" role=\"document\" focusTrap>\n <div class=\"modal-content\">\n <ng-content></ng-content>\n </div>\n </div>\n ",
3219
+ host: {
3220
+ class: 'modal',
3221
+ role: 'dialog',
3222
+ tabindex: '-1',
3223
+ '[attr.aria-modal]': 'true',
3224
+ '[attr.aria-labelledby]': 'config.ariaLabelledBy',
3225
+ '[attr.aria-describedby]': 'config.ariaDescribedby',
3226
+ },
3227
+ }]
3228
+ }], ctorParameters: function () { return [{ type: ModalOptions }, { type: i0__namespace.ElementRef }, { type: i0__namespace.Renderer2 }]; }, propDecorators: { onClickStarted: [{
3229
+ type: i0.HostListener,
3230
+ args: ['mousedown', ['$event']]
3231
+ }], onClickStop: [{
3232
+ type: i0.HostListener,
3233
+ args: ['click', ['$event']]
3234
+ }], onPopState: [{
3235
+ type: i0.HostListener,
3236
+ args: ['window:popstate']
3237
+ }], onEsc: [{
3238
+ type: i0.HostListener,
3239
+ args: ['window:keydown.esc', ['$event']]
3240
+ }] } });
3241
+
3242
+ /**
3243
+ * Modal class.
3244
+ * @remarks
3245
+ * This is returned from {@link ModalService.show}.
3246
+ * @public
3247
+ */
3248
+ var Modal = /** @class */ (function () {
3249
+ function Modal() {
3250
+ /**
3251
+ * Hides the modal
3252
+ * @param result - A result to the observers.
3253
+ */
3254
+ this.hide = function () { return void 0; };
3255
+ /**
3256
+ * Sets new class to modal window.
3257
+ */
3258
+ this.setClass = function () { return void 0; };
3259
+ }
3260
+ return Modal;
3261
+ }());
3262
+ Modal.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: Modal, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3263
+ Modal.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: Modal });
3264
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: Modal, decorators: [{
3265
+ type: i0.Injectable
3266
+ }] });
3267
+
3268
+ /**
3269
+ * A service for using modals.
3270
+ *
3271
+ * @public
3272
+ */
3273
+ var ModalService = /** @class */ (function () {
3274
+ function ModalService(clf, rendererFactory, document, modalDefaultOption) {
3275
+ this.clf = clf;
3276
+ this.document = document;
3277
+ this.onBeforeShow = new rxjs.Subject();
3278
+ this.onShown = new rxjs.Subject();
3279
+ this.onBeforeHide = new rxjs.Subject();
3280
+ this.onHidden = new rxjs.Subject();
3281
+ this.loaders = [];
3282
+ this.modalsCount = 0;
3283
+ this.initialPadding = '0px';
3284
+ this.backdropLoader = this.clf.createLoader();
3285
+ this.defaultConfig = Object.assign(Object.assign({}, modalConfigDefaults), modalDefaultOption);
3286
+ this.renderer = rendererFactory.createRenderer(null, null);
3287
+ }
3288
+ ModalService.prototype.ngOnDestroy = function () {
3289
+ this.loaders.forEach(function (loader) { var _a; return (_a = loader.instance) === null || _a === void 0 ? void 0 : _a.hide(); });
3290
+ };
3291
+ /**
3292
+ * Opens a new modal.
3293
+ *
3294
+ * @param content - `Component` or `TemplateRef` type.
3295
+ * @param config - Specific {@link ModalOptions | options} for this modal. Global and specific options are merged.
3296
+ * @returns An instance of {@link Modal}
3297
+ */
3298
+ ModalService.prototype.show = function (content, config) {
3299
+ this.modalsCount++;
3300
+ var combinedConfig = Object.assign(Object.assign({}, this.defaultConfig), config);
3301
+ combinedConfig.id = (config === null || config === void 0 ? void 0 : config.id) || new Date().getUTCMilliseconds();
3302
+ this.createLoaders();
3303
+ this.addBodyPadding();
3304
+ if (this.modalsCount === 1) {
3305
+ this.renderer.addClass(this.document.body, cssClassNames.modalOpen);
3306
+ }
3307
+ this.showBackdrop(combinedConfig);
3308
+ return this.showModal(content, combinedConfig);
3309
+ };
3310
+ /**
3311
+ * Hide an active modal.
3312
+ * @param id - Id of modal to hide. If not provided all active modals are hidden.
3313
+ * @param result - A result to be sent to observers.
3314
+ */
3315
+ ModalService.prototype.hide = function (id, result) {
3316
+ var _this = this;
3317
+ if (this.modalsCount === 1 || id == null) {
3318
+ this.hideBackdrop();
3319
+ this.revertScrollbar();
3320
+ this.renderer.removeClass(this.document.body, cssClassNames.modalOpen);
3321
+ }
3322
+ this.modalsCount = this.modalsCount >= 1 && id != null ? this.modalsCount - 1 : 0;
3323
+ setTimeout(function () {
3324
+ _this.hideModal(id, result);
3325
+ _this.removeLoaders(id);
3326
+ },
3327
+ //Bug
3328
+ //Should use combined config but for the moment is not possible to pass it this parameter.
3329
+ //If config is an instance variable then every newly opened modal will override the config
3330
+ //resulting in opened modals to get a new configuration
3331
+ this.defaultConfig.animated ? animationTime.backdrop : 0);
3332
+ };
3333
+ ModalService.prototype.getActiveModal = function () {
3334
+ return this.loaders[this.modalsCount - 1].instance;
3335
+ };
3336
+ ModalService.prototype.showModal = function (content, combinedConfig) {
3337
+ var _a;
3338
+ var modalLoader = this.loaders[this.loaders.length - 1];
3339
+ if (combinedConfig && combinedConfig.providers) {
3340
+ combinedConfig.providers.forEach(function (provider) { return modalLoader.provide(provider); });
3341
+ }
3342
+ var modal = new Modal();
3343
+ var modalContainerRef = modalLoader
3344
+ .provide({ provide: ModalOptions, useValue: combinedConfig })
3345
+ .provide({ provide: Modal, useValue: modal })
3346
+ .attach(ModalContainerComponent)
3347
+ .to('body');
3348
+ modal.setClass = function (newClass) {
3349
+ if (modalContainerRef.instance) {
3350
+ modalContainerRef.instance.config.class = newClass;
3351
+ }
3352
+ };
3353
+ modal.onBeforeHide = new rxjs.Subject();
3354
+ modal.onHidden = new rxjs.Subject();
3355
+ this.copyEvent(modalLoader.onBeforeHide, modal.onBeforeHide);
3356
+ this.copyEvent(modalLoader.onHidden, modal.onHidden);
3357
+ modalContainerRef.show({
3358
+ content: content,
3359
+ animationsEnabled: combinedConfig.animated,
3360
+ initialState: combinedConfig.initialState,
3361
+ modalService: this,
3362
+ id: combinedConfig.id,
3363
+ });
3364
+ if (modalContainerRef.instance) {
3365
+ modalContainerRef.instance.level = this.modalsCount;
3366
+ modal.content = modalLoader.getInnerComponent();
3367
+ modal.id = (_a = modalContainerRef.instance.config) === null || _a === void 0 ? void 0 : _a.id;
3368
+ modal.hide = function (res) { var _a; return (_a = modalContainerRef.instance) === null || _a === void 0 ? void 0 : _a.hide(res); };
3369
+ }
3370
+ return modal;
3371
+ };
3372
+ ModalService.prototype.hideModal = function (id, result) {
3373
+ if (id != null) {
3374
+ var indexToRemove = this.loaders.findIndex(function (loader) { var _a; return ((_a = loader.instance) === null || _a === void 0 ? void 0 : _a.config.id) === id; });
3375
+ var modalLoader = this.loaders[indexToRemove];
3376
+ if (modalLoader) {
3377
+ modalLoader.hide(id, result);
3378
+ }
3379
+ }
3380
+ else {
3381
+ this.loaders.forEach(function (loader) {
3382
+ if (loader.instance) {
3383
+ loader.hide(loader.instance.config.id);
3384
+ }
3385
+ });
3386
+ }
3387
+ };
3388
+ ModalService.prototype.showBackdrop = function (combinedConfig) {
3389
+ var isBackdropEnabled = combinedConfig.backdrop === true || combinedConfig.backdrop === 'static';
3390
+ var isBackdropInDOM = this.backdropRef != null;
3391
+ if (isBackdropEnabled && !isBackdropInDOM) {
3392
+ this.backdropLoader
3393
+ .attach(ModalBackdropComponent)
3394
+ .to('body')
3395
+ .show({ animationsEnabled: combinedConfig.animated, backdropLoader: this.backdropLoader });
3396
+ this.backdropRef = this.backdropLoader.componentRef;
3397
+ }
3398
+ };
3399
+ ModalService.prototype.hideBackdrop = function () {
3400
+ if (!this.backdropRef) {
3401
+ return;
3402
+ }
3403
+ this.backdropRef.instance.hide();
3404
+ this.backdropRef = void 0;
3405
+ };
3406
+ ModalService.prototype.removeLoaders = function (id) {
3407
+ if (id != null) {
3408
+ var indexToRemove = this.loaders.findIndex(function (loader) { var _a; return ((_a = loader.instance) === null || _a === void 0 ? void 0 : _a.config.id) === id; });
3409
+ if (indexToRemove >= 0) {
3410
+ this.loaders.splice(indexToRemove, 1);
3411
+ this.loaders.forEach(function (loader, i) {
3412
+ if (loader.instance) {
3413
+ loader.instance.level = i + 1;
3414
+ }
3415
+ });
3416
+ }
3417
+ }
3418
+ else {
3419
+ this.loaders.splice(0, this.loaders.length);
3420
+ }
3421
+ };
3422
+ ModalService.prototype.addBodyPadding = function () {
3423
+ if (this.modalsCount === 1) {
3424
+ var width = this.getScrollbarWidth();
3425
+ if (this.isScrollBarPresent(width)) {
3426
+ this.initialPadding = this.document.body.style.paddingRight;
3427
+ var actualPadding = parseFloat(window.getComputedStyle(this.document.body).paddingRight);
3428
+ this.document.body.style.paddingRight = actualPadding + width + "px";
3429
+ }
3430
+ }
3431
+ };
3432
+ ModalService.prototype.revertScrollbar = function () {
3433
+ this.document.body.style.paddingRight = this.initialPadding;
3434
+ };
3435
+ ModalService.prototype.getScrollbarWidth = function () {
3436
+ var measurer = this.document.createElement('div');
3437
+ measurer.className = 'modal-scrollbar-measure';
3438
+ var body = this.document.body;
3439
+ body.appendChild(measurer);
3440
+ var width = measurer.getBoundingClientRect().width - measurer.clientWidth;
3441
+ body.removeChild(measurer);
3442
+ return width;
3443
+ };
3444
+ ModalService.prototype.isScrollBarPresent = function (scrollbarWidth) {
3445
+ var rect = this.document.body.getBoundingClientRect();
3446
+ var bodyToViewportGap = window.innerWidth - (rect.left + rect.right);
3447
+ var uncertainty = 0.1 * scrollbarWidth;
3448
+ return bodyToViewportGap >= scrollbarWidth - uncertainty;
3449
+ };
3450
+ ModalService.prototype.createLoaders = function () {
3451
+ var loader = this.clf.createLoader();
3452
+ this.copyEvent(loader.onBeforeShow, this.onBeforeShow);
3453
+ this.copyEvent(loader.onShown, this.onShown);
3454
+ this.copyEvent(loader.onBeforeHide, this.onBeforeHide);
3455
+ this.copyEvent(loader.onHidden, this.onHidden);
3456
+ this.loaders.push(loader);
3457
+ };
3458
+ ModalService.prototype.copyEvent = function (from, to) {
3459
+ from.subscribe(function (data) {
3460
+ to.next(data);
3461
+ });
3462
+ };
3463
+ return ModalService;
3464
+ }());
3465
+ ModalService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalService, deps: [{ token: ComponentLoaderFactory }, { token: i0__namespace.RendererFactory2 }, { token: i1.DOCUMENT }, { token: MODAL_CONFIG_DEFAULT_OVERRIDE, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
3466
+ ModalService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalService });
3467
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: ModalService, decorators: [{
3468
+ type: i0.Injectable
3469
+ }], ctorParameters: function () {
3470
+ return [{ type: ComponentLoaderFactory }, { type: i0__namespace.RendererFactory2 }, { type: undefined, decorators: [{
3471
+ type: i0.Inject,
3472
+ args: [i1.DOCUMENT]
3473
+ }] }, { type: ModalOptions, decorators: [{
3474
+ type: i0.Optional
3475
+ }, {
3476
+ type: i0.Inject,
3477
+ args: [MODAL_CONFIG_DEFAULT_OVERRIDE]
3478
+ }] }];
3479
+ } });
3480
+
3481
+ var IndiceComponentsModule = /** @class */ (function () {
3482
+ function IndiceComponentsModule() {
3483
+ }
3484
+ // tslint:disable-next-line:typedef
3485
+ IndiceComponentsModule.forRoot = function () {
3486
+ return {
3487
+ ngModule: IndiceComponentsModule,
3488
+ providers: [ToasterService]
3489
+ };
3490
+ };
3491
+ return IndiceComponentsModule;
3492
+ }());
3493
+ IndiceComponentsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: IndiceComponentsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
3494
+ IndiceComponentsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: IndiceComponentsModule, declarations: [
3495
+ // diectives
3496
+ ClickOutsideDirective,
3497
+ DynamicComponentHostDirective,
3498
+ // controls
3499
+ DropDownMenuComponent,
3500
+ PagerComponent,
3501
+ ListViewComponent,
3502
+ ListColumnComponent,
3503
+ ListTileComponent,
3504
+ ListDetailsSectionComponent,
3505
+ ListViewEmptyStateComponent,
3506
+ SkeletonLoaderComponent,
3507
+ CollapsiblePanelComponent,
3508
+ KpiTileComponent,
3509
+ SidePaneComponent,
3510
+ DatepickerComponent,
3511
+ AvatarInitialsComponent,
3512
+ ToggleComponent,
3513
+ // Toaster
3514
+ ToasterContainerComponent,
3515
+ ToasterComponent,
3516
+ // shell layout
3517
+ ShellLayoutComponent,
3518
+ ShellHeaderComponent,
3519
+ ShellFooterComponent,
3520
+ // view layouts
3521
+ ViewLayoutComponent,
3522
+ SideViewLayoutComponent,
3523
+ ModelViewLayoutComponent,
3524
+ FormLayoutComponent,
3525
+ // pages (common)
3526
+ AuthCallbackComponent,
3527
+ AuthRenewComponent,
3528
+ LoggedOutComponent,
3529
+ ErrorComponent,
3530
+ PageNotFoundComponent,
3531
+ UnauthorizedComponent,
3532
+ // pipes
3533
+ AddressPipe,
3534
+ DurationFormatPipe
3535
+ ], imports: [i1.CommonModule,
3536
+ i1$1.RouterModule,
3537
+ i2.IndiceAuthModule], exports: [ClickOutsideDirective,
3538
+ DropDownMenuComponent,
3539
+ PagerComponent,
3540
+ ListViewComponent,
3541
+ ListColumnComponent,
3542
+ ListTileComponent,
3543
+ ListDetailsSectionComponent,
3544
+ ListViewEmptyStateComponent,
3545
+ KpiTileComponent,
3546
+ SkeletonLoaderComponent,
3547
+ ShellLayoutComponent,
3548
+ ShellHeaderComponent,
3549
+ ShellFooterComponent,
3550
+ ViewLayoutComponent,
3551
+ SideViewLayoutComponent,
3552
+ ModelViewLayoutComponent,
3553
+ FormLayoutComponent,
3554
+ AuthCallbackComponent,
3555
+ AuthRenewComponent,
3556
+ LoggedOutComponent,
3557
+ ErrorComponent,
3558
+ PageNotFoundComponent,
3559
+ UnauthorizedComponent,
3560
+ AddressPipe,
3561
+ DurationFormatPipe,
3562
+ CollapsiblePanelComponent,
3563
+ SidePaneComponent,
3564
+ DatepickerComponent,
3565
+ ToasterContainerComponent,
3566
+ ToasterComponent,
3567
+ AvatarInitialsComponent,
3568
+ ToggleComponent] });
3569
+ IndiceComponentsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: IndiceComponentsModule, imports: [[
3570
+ i1.CommonModule,
3571
+ i1$1.RouterModule,
3572
+ i2.IndiceAuthModule
3573
+ ]] });
3574
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: IndiceComponentsModule, decorators: [{
3575
+ type: i0.NgModule,
3576
+ args: [{
3577
+ declarations: [
3578
+ // diectives
3579
+ ClickOutsideDirective,
3580
+ DynamicComponentHostDirective,
3581
+ // controls
3582
+ DropDownMenuComponent,
3583
+ PagerComponent,
3584
+ ListViewComponent,
3585
+ ListColumnComponent,
3586
+ ListTileComponent,
3587
+ ListDetailsSectionComponent,
3588
+ ListViewEmptyStateComponent,
3589
+ SkeletonLoaderComponent,
3590
+ CollapsiblePanelComponent,
3591
+ KpiTileComponent,
3592
+ SidePaneComponent,
3593
+ DatepickerComponent,
3594
+ AvatarInitialsComponent,
3595
+ ToggleComponent,
3596
+ // Toaster
3597
+ ToasterContainerComponent,
3598
+ ToasterComponent,
3599
+ // shell layout
3600
+ ShellLayoutComponent,
3601
+ ShellHeaderComponent,
3602
+ ShellFooterComponent,
3603
+ // view layouts
3604
+ ViewLayoutComponent,
3605
+ SideViewLayoutComponent,
3606
+ ModelViewLayoutComponent,
3607
+ FormLayoutComponent,
3608
+ // pages (common)
3609
+ AuthCallbackComponent,
3610
+ AuthRenewComponent,
3611
+ LoggedOutComponent,
3612
+ ErrorComponent,
3613
+ PageNotFoundComponent,
3614
+ UnauthorizedComponent,
3615
+ // pipes
3616
+ AddressPipe,
3617
+ DurationFormatPipe
3618
+ ],
3619
+ imports: [
3620
+ i1.CommonModule,
3621
+ i1$1.RouterModule,
3622
+ i2.IndiceAuthModule
3623
+ ],
3624
+ exports: [
3625
+ ClickOutsideDirective,
3626
+ DropDownMenuComponent,
3627
+ PagerComponent,
3628
+ ListViewComponent,
3629
+ ListColumnComponent,
3630
+ ListTileComponent,
3631
+ ListDetailsSectionComponent,
3632
+ ListViewEmptyStateComponent,
3633
+ KpiTileComponent,
3634
+ SkeletonLoaderComponent,
3635
+ ShellLayoutComponent,
3636
+ ShellHeaderComponent,
3637
+ ShellFooterComponent,
3638
+ ViewLayoutComponent,
3639
+ SideViewLayoutComponent,
3640
+ ModelViewLayoutComponent,
3641
+ FormLayoutComponent,
3642
+ AuthCallbackComponent,
3643
+ AuthRenewComponent,
3644
+ LoggedOutComponent,
3645
+ ErrorComponent,
3646
+ PageNotFoundComponent,
3647
+ UnauthorizedComponent,
3648
+ AddressPipe,
3649
+ DurationFormatPipe,
3650
+ CollapsiblePanelComponent,
3651
+ SidePaneComponent,
3652
+ DatepickerComponent,
3653
+ ToasterContainerComponent,
3654
+ ToasterComponent,
3655
+ AvatarInitialsComponent,
3656
+ ToggleComponent
3657
+ ]
3658
+ }]
3659
+ }] });
3660
+
3661
+ // Public API Surface of @indice/ng-components
3662
+
3663
+ /**
3664
+ * Generated bundle index. Do not edit.
3665
+ */
3666
+
3667
+ exports.APP_LINKS = APP_LINKS;
3668
+ exports.AddressPipe = AddressPipe;
3669
+ exports.AuthCallbackComponent = AuthCallbackComponent;
3670
+ exports.AuthRenewComponent = AuthRenewComponent;
3671
+ exports.AvatarInitialsComponent = AvatarInitialsComponent;
3672
+ exports.BaseListComponent = BaseListComponent;
3673
+ exports.ClickOutsideDirective = ClickOutsideDirective;
3674
+ exports.CollapsiblePanelComponent = CollapsiblePanelComponent;
3675
+ exports.ComponentLoaderFactory = ComponentLoaderFactory;
3676
+ exports.DatepickerComponent = DatepickerComponent;
3677
+ exports.DefaultShellConfig = DefaultShellConfig;
3678
+ exports.DropDownMenuComponent = DropDownMenuComponent;
3679
+ exports.DurationFormatPipe = DurationFormatPipe;
3680
+ exports.ErrorComponent = ErrorComponent;
3681
+ exports.ExternalNavLink = ExternalNavLink;
3682
+ exports.FormLayoutComponent = FormLayoutComponent;
3683
+ exports.FragmentNavLink = FragmentNavLink;
3684
+ exports.HeaderMetaItem = HeaderMetaItem;
3685
+ exports.Icons = Icons;
3686
+ exports.IndiceComponentsModule = IndiceComponentsModule;
3687
+ exports.KpiTileComponent = KpiTileComponent;
3688
+ exports.ListColumnComponent = ListColumnComponent;
3689
+ exports.ListDetailsSectionComponent = ListDetailsSectionComponent;
3690
+ exports.ListTileComponent = ListTileComponent;
3691
+ exports.ListViewComponent = ListViewComponent;
3692
+ exports.ListViewEmptyStateComponent = ListViewEmptyStateComponent;
3693
+ exports.ListViewType = ListViewType;
3694
+ exports.LoggedOutComponent = LoggedOutComponent;
3695
+ exports.MODAL_CONFIG_DEFAULT_OVERRIDE = MODAL_CONFIG_DEFAULT_OVERRIDE;
3696
+ exports.MenuOption = MenuOption;
3697
+ exports.Modal = Modal;
3698
+ exports.ModalOptions = ModalOptions;
3699
+ exports.ModalService = ModalService;
3700
+ exports.ModelViewLayoutComponent = ModelViewLayoutComponent;
3701
+ exports.NULL_TOAST = NULL_TOAST;
3702
+ exports.NavLink = NavLink;
3703
+ exports.PageNotFoundComponent = PageNotFoundComponent;
3704
+ exports.PagerComponent = PagerComponent;
3705
+ exports.RouterViewAction = RouterViewAction;
3706
+ exports.SHELL_CONFIG = SHELL_CONFIG;
3707
+ exports.ShellFooterComponent = ShellFooterComponent;
3708
+ exports.ShellHeaderComponent = ShellHeaderComponent;
3709
+ exports.ShellLayoutComponent = ShellLayoutComponent;
3710
+ exports.SidePaneComponent = SidePaneComponent;
3711
+ exports.SideViewLayoutComponent = SideViewLayoutComponent;
3712
+ exports.SkeletonLoaderComponent = SkeletonLoaderComponent;
3713
+ exports.SwitchViewAction = SwitchViewAction;
3714
+ exports.ToasterComponent = ToasterComponent;
3715
+ exports.ToasterContainerComponent = ToasterContainerComponent;
3716
+ exports.ToasterService = ToasterService;
3717
+ exports.ToggleComponent = ToggleComponent;
3718
+ exports.UnauthorizedComponent = UnauthorizedComponent;
3719
+ exports.ViewAction = ViewAction;
3720
+ exports.ViewLayoutComponent = ViewLayoutComponent;
3721
+
3722
+ Object.defineProperty(exports, '__esModule', { value: true });
3723
+
3724
+ }));
3725
+ //# sourceMappingURL=indice-ng-components.umd.js.map