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