@indice/ng-components 0.2.112 → 0.2.113

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