@indice/ng-components 0.2.113 → 0.2.116

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