@indice/ng-components 0.2.147-beta.0 → 0.2.147

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