@indice/ng-components 0.2.146 → 0.2.147

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