@indice/ng-components 0.2.142-beta → 0.2.142

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