@indice/ng-components 0.2.112 → 0.2.113

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