@indice/ng-components 0.2.161 → 0.2.164

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