@kolektor/nucleus-material 0.0.12-pre.7931 → 0.1.0-pre.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +7 -0
  2. package/esm2022/index.mjs +24 -0
  3. package/esm2022/kolektor-nucleus-material.mjs +5 -0
  4. package/esm2022/lib/dialog/dialog.component.mjs +22 -0
  5. package/esm2022/lib/dialog/dialog.module.mjs +19 -0
  6. package/esm2022/lib/dialog/dialog.service.mjs +45 -0
  7. package/esm2022/lib/dialog/models.mjs +10 -0
  8. package/esm2022/lib/loaded-content/loaded-content-component.mjs +72 -0
  9. package/esm2022/lib/loaded-content/loaded-content-directive.mjs +78 -0
  10. package/esm2022/lib/loaded-content/loaded-content-module.mjs +33 -0
  11. package/esm2022/lib/loaded-content/loading-state.mjs +105 -0
  12. package/esm2022/lib/snackbar/models.mjs +9 -0
  13. package/esm2022/lib/snackbar/progress-snackbar/progress-snackbar.component.mjs +31 -0
  14. package/esm2022/lib/snackbar/snackbar.module.mjs +20 -0
  15. package/esm2022/lib/snackbar/snackbar.service.mjs +51 -0
  16. package/esm2022/lib/swipe-tabs/swipe-tabs-directive.mjs +58 -0
  17. package/esm2022/lib/swipe-tabs/swipe-tabs-module.mjs +18 -0
  18. package/esm2022/lib/user-avatar/user-avatar-component.mjs +52 -0
  19. package/esm2022/lib/user-avatar/user-avatar-module.mjs +18 -0
  20. package/fesm2022/kolektor-nucleus-material.mjs +598 -0
  21. package/fesm2022/kolektor-nucleus-material.mjs.map +1 -0
  22. package/index.d.ts +17 -5
  23. package/lib/dialog/dialog.component.d.ts +10 -10
  24. package/lib/dialog/dialog.module.d.ts +10 -10
  25. package/lib/dialog/dialog.service.d.ts +17 -17
  26. package/lib/dialog/models.d.ts +24 -24
  27. package/lib/loaded-content/loaded-content-component.d.ts +22 -22
  28. package/lib/loaded-content/loaded-content-directive.d.ts +23 -23
  29. package/lib/loaded-content/loaded-content-module.d.ts +12 -12
  30. package/lib/loaded-content/loading-state.d.ts +32 -32
  31. package/lib/snackbar/models.d.ts +7 -7
  32. package/lib/snackbar/progress-snackbar/progress-snackbar.component.d.ts +10 -10
  33. package/lib/snackbar/snackbar.module.d.ts +10 -10
  34. package/lib/snackbar/snackbar.service.d.ts +13 -13
  35. package/lib/swipe-tabs/swipe-tabs-directive.d.ts +11 -11
  36. package/lib/swipe-tabs/swipe-tabs-module.d.ts +8 -8
  37. package/lib/user-avatar/user-avatar-component.d.ts +13 -14
  38. package/lib/user-avatar/user-avatar-module.d.ts +8 -8
  39. package/package.json +24 -29
  40. package/esm2020/kolektor-nucleus-material.mjs +0 -5
  41. package/esm2020/lib/dialog/dialog.component.mjs +0 -22
  42. package/esm2020/lib/dialog/dialog.module.mjs +0 -29
  43. package/esm2020/lib/dialog/dialog.service.mjs +0 -40
  44. package/esm2020/lib/dialog/models.mjs +0 -10
  45. package/esm2020/lib/loaded-content/loaded-content-component.mjs +0 -71
  46. package/esm2020/lib/loaded-content/loaded-content-directive.mjs +0 -79
  47. package/esm2020/lib/loaded-content/loaded-content-module.mjs +0 -39
  48. package/esm2020/lib/loaded-content/loading-state.mjs +0 -107
  49. package/esm2020/lib/native-styling/models.mjs +0 -9
  50. package/esm2020/lib/native-styling/native-styling.service.mjs +0 -67
  51. package/esm2020/lib/snackbar/models.mjs +0 -9
  52. package/esm2020/lib/snackbar/progress-snackbar/progress-snackbar.component.mjs +0 -29
  53. package/esm2020/lib/snackbar/snackbar.module.mjs +0 -33
  54. package/esm2020/lib/snackbar/snackbar.service.mjs +0 -50
  55. package/esm2020/lib/swipe-tabs/swipe-tabs-directive.mjs +0 -54
  56. package/esm2020/lib/swipe-tabs/swipe-tabs-module.mjs +0 -24
  57. package/esm2020/lib/user-avatar/user-avatar-component.mjs +0 -50
  58. package/esm2020/lib/user-avatar/user-avatar-module.mjs +0 -24
  59. package/esm2020/public-api.mjs +0 -30
  60. package/fesm2015/kolektor-nucleus-material.mjs +0 -712
  61. package/fesm2015/kolektor-nucleus-material.mjs.map +0 -1
  62. package/fesm2020/kolektor-nucleus-material.mjs +0 -704
  63. package/fesm2020/kolektor-nucleus-material.mjs.map +0 -1
  64. package/lib/native-styling/models.d.ts +0 -7
  65. package/lib/native-styling/native-styling.service.d.ts +0 -14
  66. package/public-api.d.ts +0 -19
@@ -1,704 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, Inject, Injectable, NgModule, Input, Directive, ViewEncapsulation } from '@angular/core';
3
- import * as i1 from '@angular/material/dialog';
4
- import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
5
- import * as i1$1 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
7
- import * as i3 from '@angular/material/button';
8
- import { MatButtonModule } from '@angular/material/button';
9
- import { tap } from 'rxjs/operators';
10
- import * as i2 from '@angular/material/progress-spinner';
11
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
12
- import * as i4 from '@angular/material/icon';
13
- import { MatIconModule } from '@angular/material/icon';
14
- import * as i1$2 from '@angular/router';
15
- import { NavigationEnd } from '@angular/router';
16
- import * as i1$3 from '@angular/material/tabs';
17
- import * as Hammer from 'hammerjs';
18
- import * as i1$4 from '@angular/material/snack-bar';
19
- import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
20
-
21
- class NucDialogComponent {
22
- constructor(dialogRef, dialogData) {
23
- this.dialogRef = dialogRef;
24
- this.dialogData = dialogData;
25
- }
26
- }
27
- NucDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
28
- NucDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NucDialogComponent, selector: "nuc-dialog", ngImport: i0, template: "<ng-container *ngIf=\"dialogData\">\r\n <h2 mat-dialog-title *ngIf=\"dialogData.title\">\r\n {{dialogData.title}}\r\n </h2>\r\n <mat-dialog-content>{{dialogData.message}}</mat-dialog-content>\r\n <mat-dialog-actions>\r\n <ng-container *ngFor=\"let action of dialogData.actions\">\r\n <button color=\"{{action.color || 'primary'}}\" *ngIf=\"action.value === undefined\" mat-button mat-dialog-close>{{action.text}}</button>\r\n <button color=\"{{action.color || 'primary'}}\" *ngIf=\"action.value !== undefined\" mat-button [mat-dialog-close]=\"action.value\">{{action.text}}</button>\r\n </ng-container>\r\n </mat-dialog-actions>\r\n</ng-container>\r\n", styles: ["mat-dialog-actions{justify-content:flex-end}mat-dialog-content{white-space:pre-wrap}button{text-transform:uppercase;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucDialogComponent, decorators: [{
30
- type: Component,
31
- args: [{ selector: 'nuc-dialog', template: "<ng-container *ngIf=\"dialogData\">\r\n <h2 mat-dialog-title *ngIf=\"dialogData.title\">\r\n {{dialogData.title}}\r\n </h2>\r\n <mat-dialog-content>{{dialogData.message}}</mat-dialog-content>\r\n <mat-dialog-actions>\r\n <ng-container *ngFor=\"let action of dialogData.actions\">\r\n <button color=\"{{action.color || 'primary'}}\" *ngIf=\"action.value === undefined\" mat-button mat-dialog-close>{{action.text}}</button>\r\n <button color=\"{{action.color || 'primary'}}\" *ngIf=\"action.value !== undefined\" mat-button [mat-dialog-close]=\"action.value\">{{action.text}}</button>\r\n </ng-container>\r\n </mat-dialog-actions>\r\n</ng-container>\r\n", styles: ["mat-dialog-actions{justify-content:flex-end}mat-dialog-content{white-space:pre-wrap}button{text-transform:uppercase;font-weight:700}\n"] }]
32
- }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
33
- type: Inject,
34
- args: [MAT_DIALOG_DATA]
35
- }] }]; } });
36
-
37
- class NucDialogService {
38
- constructor(_matDialog) {
39
- this._matDialog = _matDialog;
40
- }
41
- /**
42
- * Opens a NucDialog with content from dialogData.
43
- *
44
- * @param dialogData NucDialogData containing title, message and possible actions.
45
- * @param dialogConfig Extra configuration options. Data property is ignored, since it will be set to dialogData.
46
- * @returns a promise with value that was specified inside pressed Nucleus action.
47
- */
48
- async open(dialogData, dialogConfig) {
49
- if (dialogData.actions && dialogData.actions.length > 0) {
50
- if (dialogConfig) {
51
- dialogConfig.data = dialogData;
52
- }
53
- else {
54
- dialogConfig = { data: dialogData };
55
- }
56
- return await this._matDialog.open(NucDialogComponent, dialogConfig).beforeClosed().toPromise();
57
- }
58
- else {
59
- console.error('Nucleus.AppCore: NucDialogData requires at least one action.');
60
- }
61
- }
62
- }
63
- NucDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucDialogService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
64
- NucDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucDialogService, providedIn: 'root' });
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucDialogService, decorators: [{
66
- type: Injectable,
67
- args: [{
68
- providedIn: 'root'
69
- }]
70
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
71
-
72
- class NucDialogModule {
73
- }
74
- NucDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
75
- NucDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NucDialogModule, declarations: [NucDialogComponent], imports: [CommonModule,
76
- MatDialogModule,
77
- MatButtonModule] });
78
- NucDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucDialogModule, imports: [CommonModule,
79
- MatDialogModule,
80
- MatButtonModule] });
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucDialogModule, decorators: [{
82
- type: NgModule,
83
- args: [{
84
- declarations: [
85
- NucDialogComponent
86
- ],
87
- imports: [
88
- CommonModule,
89
- MatDialogModule,
90
- MatButtonModule
91
- ]
92
- }]
93
- }] });
94
-
95
- var NucColor;
96
- (function (NucColor) {
97
- /** Primary color of the theme. */
98
- NucColor["primary"] = "primary";
99
- /** Accent color of the theme. */
100
- NucColor["accent"] = "accent";
101
- /** Warning color of the theme. */
102
- NucColor["warn"] = "warn";
103
- })(NucColor || (NucColor = {}));
104
-
105
- var LoadingStatus;
106
- (function (LoadingStatus) {
107
- LoadingStatus[LoadingStatus["completed"] = 0] = "completed";
108
- LoadingStatus[LoadingStatus["inProgress"] = 1] = "inProgress";
109
- LoadingStatus[LoadingStatus["failed"] = 2] = "failed";
110
- LoadingStatus[LoadingStatus["undefined"] = 3] = "undefined";
111
- })(LoadingStatus || (LoadingStatus = {}));
112
- class LoadingState {
113
- constructor() {
114
- this._status = LoadingStatus.undefined;
115
- this._initialMessage = null;
116
- this._message = null;
117
- this._errorDetails = null;
118
- this._lastSubscription = null;
119
- }
120
- get status() {
121
- return this._status;
122
- }
123
- get message() {
124
- return this._message;
125
- }
126
- get errorDetails() {
127
- return this._errorDetails;
128
- }
129
- load(observable, resultFunction, errorFunction, completeFunction) {
130
- return this._load(true, null, observable, resultFunction, errorFunction, completeFunction);
131
- }
132
- loadWithMessage(observable, message, resultFunction, errorFunction, completeFunction) {
133
- this._initialMessage = message;
134
- return this._load(true, message, observable, resultFunction, errorFunction, completeFunction);
135
- }
136
- invoke(observable, resultFunction, errorFunction, completeFunction) {
137
- return this._load(false, null, observable, resultFunction, errorFunction, completeFunction);
138
- }
139
- invokeWithMessage(observable, message, resultFunction, errorFunction, completeFunction) {
140
- this._initialMessage = message;
141
- return this._load(false, message, observable, resultFunction, errorFunction, completeFunction);
142
- }
143
- retry() {
144
- if (this._lastSubscription) {
145
- this._lastSubscription.unsubscribe();
146
- }
147
- this.setInProgress(this._initialMessage);
148
- this._lastSubscription = this._loadObservable.subscribe({
149
- next: this._resultFunction,
150
- error: this._errorFunction,
151
- complete: this._completeFunction
152
- });
153
- return this._lastSubscription;
154
- }
155
- setInProgress(message = null) {
156
- this._status = LoadingStatus.inProgress;
157
- this._message = message;
158
- }
159
- setCompleted() {
160
- this._status = LoadingStatus.completed;
161
- }
162
- setFailed(message = null, error = null) {
163
- this._status = LoadingStatus.failed;
164
- this._message = message;
165
- this._errorDetails = error;
166
- }
167
- _load(saveAsLoadObservable, progressMessage, observable, resultFunction, errorFunction, completeFunction) {
168
- if (this._lastSubscription) {
169
- this._lastSubscription.unsubscribe();
170
- }
171
- this.setInProgress(progressMessage);
172
- const obs = observable.pipe(tap({
173
- next: () => {
174
- if (!saveAsLoadObservable && this.message) { // if message was used one time we clear it
175
- this._message = null;
176
- }
177
- this.setCompleted();
178
- },
179
- error: (err) => {
180
- this.setFailed(null, LoadingState.getErrorDetails(err));
181
- }
182
- }));
183
- if (saveAsLoadObservable) {
184
- this._loadObservable = obs;
185
- this._resultFunction = resultFunction;
186
- this._errorFunction = errorFunction;
187
- this._completeFunction = completeFunction;
188
- }
189
- this._lastSubscription = obs.subscribe({
190
- next: resultFunction,
191
- error: errorFunction,
192
- complete: completeFunction
193
- });
194
- return this._lastSubscription;
195
- }
196
- static getErrorDetails(error) {
197
- // this routine tries to get the best error details from:
198
- // - standard rfc7807 http error: https://datatracker.ietf.org/doc/html/rfc7807
199
- // - angular HttpError
200
- // - JS Error object
201
- const problem = error?.error;
202
- if (problem?.title && problem?.detail) {
203
- return `${problem.title}: ${problem.detail}`;
204
- }
205
- else {
206
- return problem?.title || problem?.detail || error.message || error;
207
- }
208
- }
209
- }
210
-
211
- class NucLoadedContentComponent {
212
- constructor() {
213
- this._errorDetailsVisible = false;
214
- this.errorMessage = 'We are having trouble loading the data.';
215
- this.showRetry = true;
216
- }
217
- get message() {
218
- if (this.state.message != null) {
219
- return this.state.message;
220
- }
221
- else {
222
- if (this.state.status === LoadingStatus.failed) {
223
- return this.errorMessage;
224
- }
225
- else if (this.state.status === LoadingStatus.inProgress) {
226
- return this.inProgressMessage;
227
- }
228
- }
229
- return null;
230
- }
231
- get showRetryButton() {
232
- return this.showRetry;
233
- }
234
- get inProgress() {
235
- const inProgress = this.state.status === LoadingStatus.inProgress;
236
- if (inProgress) {
237
- this._errorDetailsVisible = false;
238
- }
239
- return inProgress;
240
- }
241
- get failed() {
242
- return this.state.status === LoadingStatus.failed;
243
- }
244
- get completed() {
245
- return this.state.status === LoadingStatus.completed;
246
- }
247
- get errorDetailsVisible() {
248
- return this._errorDetailsVisible;
249
- }
250
- showErrorDetails() {
251
- this._errorDetailsVisible = true;
252
- }
253
- }
254
- NucLoadedContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucLoadedContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
255
- NucLoadedContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NucLoadedContentComponent, selector: "nuc-loaded-content-component", inputs: { completedTemplate: "completedTemplate", errorTemplate: "errorTemplate", inProgressTemplate: "inProgressTemplate", state: "state", inProgressMessage: "inProgressMessage", errorMessage: "errorMessage", showRetry: "showRetry" }, ngImport: i0, template: "<ng-container *ngIf=\"completed\">\r\n <ng-container *ngTemplateOutlet=\"completedTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div class=\"indicators-container\" *ngIf=\"inProgress || failed\">\r\n <ng-container *ngIf=\"inProgress\">\r\n <ng-container *ngTemplateOutlet=\"inProgressTemplate ? inProgressTemplate: defaultInProgressTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"failed\">\r\n <ng-container *ngTemplateOutlet=\"errorTemplate ? errorTemplate: defaultErrorTemplate\"></ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #defaultInProgressTemplate>\r\n <div class=\"spinner\">\r\n <mat-spinner [diameter]=\"45\"></mat-spinner>\r\n </div>\r\n <p>\r\n {{message}}\r\n </p>\r\n</ng-template>\r\n\r\n<ng-template #defaultErrorTemplate>\r\n <div>\r\n <p class=\"message\">\r\n <span>{{message}}</span>\r\n <mat-icon *ngIf=\"state.errorDetails && !errorDetailsVisible\" class=\"info-button\" color=\"warn\" (click)=\"showErrorDetails()\">info</mat-icon>\r\n </p>\r\n\r\n <p *ngIf=\"errorDetailsVisible\" class=\"error-details mat-small\">\r\n {{state.errorDetails}}\r\n </p>\r\n\r\n <p *ngIf=\"showRetryButton\">\r\n <button mat-mini-fab color=\"primary\" (click)=\"state.retry()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n </p>\r\n </div>\r\n</ng-template>\r\n", styles: [".indicators-container{text-align:center;margin:0 auto;padding-top:4rem}.error-details{margin-top:1rem}.spinner{display:flex;justify-content:center;align-items:center;margin-bottom:.5rem}.message{display:flex;justify-content:center;align-items:center}.info-button{cursor:pointer;margin-left:.5rem}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i3.MatMiniFabButton, selector: "button[mat-mini-fab]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucLoadedContentComponent, decorators: [{
257
- type: Component,
258
- args: [{ selector: 'nuc-loaded-content-component', template: "<ng-container *ngIf=\"completed\">\r\n <ng-container *ngTemplateOutlet=\"completedTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div class=\"indicators-container\" *ngIf=\"inProgress || failed\">\r\n <ng-container *ngIf=\"inProgress\">\r\n <ng-container *ngTemplateOutlet=\"inProgressTemplate ? inProgressTemplate: defaultInProgressTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"failed\">\r\n <ng-container *ngTemplateOutlet=\"errorTemplate ? errorTemplate: defaultErrorTemplate\"></ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #defaultInProgressTemplate>\r\n <div class=\"spinner\">\r\n <mat-spinner [diameter]=\"45\"></mat-spinner>\r\n </div>\r\n <p>\r\n {{message}}\r\n </p>\r\n</ng-template>\r\n\r\n<ng-template #defaultErrorTemplate>\r\n <div>\r\n <p class=\"message\">\r\n <span>{{message}}</span>\r\n <mat-icon *ngIf=\"state.errorDetails && !errorDetailsVisible\" class=\"info-button\" color=\"warn\" (click)=\"showErrorDetails()\">info</mat-icon>\r\n </p>\r\n\r\n <p *ngIf=\"errorDetailsVisible\" class=\"error-details mat-small\">\r\n {{state.errorDetails}}\r\n </p>\r\n\r\n <p *ngIf=\"showRetryButton\">\r\n <button mat-mini-fab color=\"primary\" (click)=\"state.retry()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n </p>\r\n </div>\r\n</ng-template>\r\n", styles: [".indicators-container{text-align:center;margin:0 auto;padding-top:4rem}.error-details{margin-top:1rem}.spinner{display:flex;justify-content:center;align-items:center;margin-bottom:.5rem}.message{display:flex;justify-content:center;align-items:center}.info-button{cursor:pointer;margin-left:.5rem}\n"] }]
259
- }], propDecorators: { completedTemplate: [{
260
- type: Input
261
- }], errorTemplate: [{
262
- type: Input
263
- }], inProgressTemplate: [{
264
- type: Input
265
- }], state: [{
266
- type: Input
267
- }], inProgressMessage: [{
268
- type: Input
269
- }], errorMessage: [{
270
- type: Input
271
- }], showRetry: [{
272
- type: Input
273
- }] } });
274
-
275
- // eslint-disable-next-line @angular-eslint/directive-selector
276
- class NucLoadedContentDirective {
277
- constructor(_viewContainer, templateRef, _componentResolver) {
278
- this._viewContainer = _viewContainer;
279
- this.templateRef = templateRef;
280
- this._componentResolver = _componentResolver;
281
- this._completedTemplateRef = null;
282
- this._errorTemplateRef = null;
283
- this._inProgressTemplateRef = null;
284
- this._component = null;
285
- this._completedTemplateRef = templateRef;
286
- }
287
- set nucLoadedContent(state) {
288
- // add some error handling if state is null, etc.
289
- this._state = state;
290
- this._updateView();
291
- }
292
- // eslint-disable-next-line @angular-eslint/no-input-rename
293
- set errorTemplate(templateRef) {
294
- this._errorTemplateRef = templateRef;
295
- this._updateView();
296
- }
297
- // eslint-disable-next-line @angular-eslint/no-input-rename
298
- set inProgressTemplate(templateRef) {
299
- this._inProgressTemplateRef = templateRef;
300
- this._updateView();
301
- }
302
- set inProgressMessage(inProgressMessage) {
303
- this._component.instance.inProgressMessage = inProgressMessage;
304
- }
305
- set errorMessage(errorMessage) {
306
- this._component.instance.errorMessage = errorMessage;
307
- }
308
- set showRetry(showRetry) {
309
- this._component.instance.showRetry = showRetry;
310
- }
311
- _updateView() {
312
- if (this._component == null) {
313
- const fac = this._componentResolver.resolveComponentFactory(NucLoadedContentComponent);
314
- this._component = this._viewContainer.createComponent(fac);
315
- }
316
- this._component.instance.state = this._state;
317
- this._component.instance.completedTemplate = this._completedTemplateRef;
318
- if (this._inProgressTemplateRef) {
319
- this._component.instance.inProgressTemplate = this._inProgressTemplateRef;
320
- }
321
- if (this._errorTemplateRef) {
322
- this._component.instance.errorTemplate = this._errorTemplateRef;
323
- }
324
- }
325
- }
326
- NucLoadedContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucLoadedContentDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Directive });
327
- NucLoadedContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NucLoadedContentDirective, selector: "[nucLoadedContent]", inputs: { nucLoadedContent: "nucLoadedContent", errorTemplate: ["nucLoadedContentError", "errorTemplate"], inProgressTemplate: ["nucLoadedContentInProgress", "inProgressTemplate"], inProgressMessage: ["nucLoadedContentInProgressMessage", "inProgressMessage"], errorMessage: ["nucLoadedContentErrorMessage", "errorMessage"], showRetry: ["nucLoadedContentShowRetry", "showRetry"] }, ngImport: i0 });
328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucLoadedContentDirective, decorators: [{
329
- type: Directive,
330
- args: [{ selector: '[nucLoadedContent]' }]
331
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { nucLoadedContent: [{
332
- type: Input
333
- }], errorTemplate: [{
334
- type: Input,
335
- args: ['nucLoadedContentError']
336
- }], inProgressTemplate: [{
337
- type: Input,
338
- args: ['nucLoadedContentInProgress']
339
- }], inProgressMessage: [{
340
- type: Input,
341
- args: ['nucLoadedContentInProgressMessage']
342
- }], errorMessage: [{
343
- type: Input,
344
- args: ['nucLoadedContentErrorMessage']
345
- }], showRetry: [{
346
- type: Input,
347
- args: ['nucLoadedContentShowRetry']
348
- }] } });
349
-
350
- class NucLoadedContentModule {
351
- }
352
- NucLoadedContentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucLoadedContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
353
- NucLoadedContentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NucLoadedContentModule, declarations: [NucLoadedContentDirective,
354
- NucLoadedContentComponent], imports: [CommonModule,
355
- MatProgressSpinnerModule,
356
- MatButtonModule,
357
- MatIconModule], exports: [NucLoadedContentDirective] });
358
- NucLoadedContentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucLoadedContentModule, imports: [CommonModule,
359
- MatProgressSpinnerModule,
360
- MatButtonModule,
361
- MatIconModule] });
362
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucLoadedContentModule, decorators: [{
363
- type: NgModule,
364
- args: [{
365
- declarations: [
366
- NucLoadedContentDirective,
367
- NucLoadedContentComponent
368
- ],
369
- imports: [
370
- CommonModule,
371
- MatProgressSpinnerModule,
372
- MatButtonModule,
373
- MatIconModule
374
- ],
375
- exports: [
376
- NucLoadedContentDirective
377
- ]
378
- }]
379
- }] });
380
-
381
- /// <reference path="../../../../../node_modules/@types/winrt-uwp/index.d.ts" />
382
- /* eslint-disable no-undef */
383
- /// <reference path="../../../../../node_modules/@types/winrt-uwp/index.d.ts" />
384
- class NativeStylingService {
385
- constructor(router) {
386
- this.router = router;
387
- }
388
- styleWindowsTitleBar(style) {
389
- if (window.Windows) {
390
- const accentColor = this.convertColor(style.backgroundColor);
391
- const hoverColor = style.hoverBackgroundColor ? this.convertColor(style.hoverBackgroundColor) : this.makeDarker(accentColor);
392
- const foregroundColor = style.foreground === 'light' ? Windows.UI.Colors.white : Windows.UI.Colors.black;
393
- const titleColor = style.hideTitle ? accentColor : foregroundColor;
394
- const appView = Windows.UI.ViewManagement.ApplicationView.getForCurrentView();
395
- const titleBar = appView.titleBar;
396
- titleBar.foregroundColor = titleColor;
397
- titleBar.inactiveForegroundColor = titleColor;
398
- titleBar.buttonHoverBackgroundColor = hoverColor;
399
- titleBar.buttonBackgroundColor = accentColor;
400
- titleBar.buttonInactiveBackgroundColor = accentColor;
401
- titleBar.buttonHoverForegroundColor = foregroundColor;
402
- titleBar.buttonForegroundColor = foregroundColor;
403
- titleBar.buttonInactiveForegroundColor = foregroundColor;
404
- titleBar.backgroundColor = accentColor;
405
- titleBar.inactiveBackgroundColor = accentColor;
406
- if (style.hideBackButton) {
407
- this.hideBackButton();
408
- const subscription = this.router.events.subscribe((event) => {
409
- if (event instanceof NavigationEnd && event.id > 1) {
410
- this.hideBackButton();
411
- subscription.unsubscribe();
412
- }
413
- });
414
- }
415
- }
416
- }
417
- hideBackButton() {
418
- const systemNavigation = Windows.UI.Core.SystemNavigationManager.getForCurrentView();
419
- systemNavigation.appViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.collapsed;
420
- }
421
- convertColor(colorStr) {
422
- const regEx = new RegExp('^#([A-Fa-f0-9]{6})$');
423
- if (!regEx.test(colorStr)) {
424
- throw new Error('Color is not in the right format. Should be #RRGGBB.');
425
- }
426
- const r = parseInt(colorStr.substr(1, 2), 16);
427
- const g = parseInt(colorStr.substr(3, 2), 16);
428
- const b = parseInt(colorStr.substr(5, 2), 16);
429
- return Windows.UI.ColorHelper.fromArgb(255, r, g, b);
430
- }
431
- makeDarker(color, factor = 0.80) {
432
- return Windows.UI.ColorHelper.fromArgb(color.a, color.r * factor, color.g * factor, color.b * factor);
433
- }
434
- }
435
- NativeStylingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NativeStylingService, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
436
- NativeStylingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NativeStylingService, providedIn: 'root' });
437
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NativeStylingService, decorators: [{
438
- type: Injectable,
439
- args: [{
440
- providedIn: 'root'
441
- }]
442
- }], ctorParameters: function () { return [{ type: i1$2.Router }]; } });
443
-
444
- class WindowsTitleBarSyle {
445
- constructor() {
446
- this.hoverBackgroundColor = null;
447
- this.foreground = 'dark';
448
- this.hideTitle = false;
449
- this.hideBackButton = false;
450
- }
451
- }
452
-
453
- // eslint-disable-next-line @angular-eslint/directive-selector
454
- class NucSwipeTabsDirective {
455
- constructor(element, tabGroup) {
456
- this.element = element;
457
- this.tabGroup = tabGroup;
458
- }
459
- ngOnInit() {
460
- const hammerJs = new Hammer.Manager(this.element.nativeElement, {
461
- inputClass: Hammer.TouchInput
462
- });
463
- hammerJs.add(new Hammer.Pan({
464
- direction: Hammer.DIRECTION_HORIZONTAL,
465
- threshold: 30
466
- }));
467
- hammerJs.on('panleft panright', (event) => {
468
- if (event.isFinal) {
469
- const tabs = this.tabGroup._tabs.map(x => x.disabled);
470
- const currentIndex = this.tabGroup.selectedIndex ?? 0;
471
- let nextIndex = currentIndex;
472
- if (event.type === 'panright' && event.direction === 4 && currentIndex > 0) {
473
- // if user pans right, go to the left
474
- for (let i = currentIndex - 1; i >= 0; i--) {
475
- if (!tabs[i]) {
476
- nextIndex = i;
477
- break;
478
- }
479
- }
480
- }
481
- else if (event.type === 'panleft' && event.direction === 2 && currentIndex < (this.tabGroup._tabs.length - 1)) {
482
- // if user pans left, go to the right
483
- for (let i = currentIndex + 1; i < tabs.length; i++) {
484
- if (!tabs[i]) {
485
- nextIndex = i;
486
- break;
487
- }
488
- }
489
- }
490
- this.tabGroup.selectedIndex = nextIndex;
491
- }
492
- });
493
- }
494
- }
495
- NucSwipeTabsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSwipeTabsDirective, deps: [{ token: i0.ElementRef }, { token: i1$3.MatTabGroup }], target: i0.ɵɵFactoryTarget.Directive });
496
- NucSwipeTabsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: NucSwipeTabsDirective, selector: "[nucSwipe]", ngImport: i0 });
497
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSwipeTabsDirective, decorators: [{
498
- type: Directive,
499
- args: [{ selector: '[nucSwipe]' }]
500
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$3.MatTabGroup }]; } });
501
-
502
- class NucSwipeTabsModule {
503
- }
504
- NucSwipeTabsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSwipeTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
505
- NucSwipeTabsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NucSwipeTabsModule, declarations: [NucSwipeTabsDirective], imports: [CommonModule], exports: [NucSwipeTabsDirective] });
506
- NucSwipeTabsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSwipeTabsModule, imports: [CommonModule] });
507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSwipeTabsModule, decorators: [{
508
- type: NgModule,
509
- args: [{
510
- declarations: [
511
- NucSwipeTabsDirective
512
- ],
513
- imports: [
514
- CommonModule
515
- ],
516
- exports: [
517
- NucSwipeTabsDirective
518
- ]
519
- }]
520
- }] });
521
-
522
- var NucSnackbarType;
523
- (function (NucSnackbarType) {
524
- NucSnackbarType["Info"] = "info";
525
- NucSnackbarType["Warning"] = "warning";
526
- NucSnackbarType["Danger"] = "danger";
527
- NucSnackbarType["Success"] = "success";
528
- NucSnackbarType["Progress"] = "progress";
529
- })(NucSnackbarType || (NucSnackbarType = {}));
530
-
531
- class ProgressSnackbarComponent {
532
- constructor(data, elem) {
533
- this.data = data;
534
- this.elem = elem;
535
- }
536
- ngAfterViewInit() {
537
- const element = this.elem.nativeElement;
538
- const circle = element.querySelector('circle');
539
- const message = element.querySelector('.message');
540
- const color = window.getComputedStyle(message).color;
541
- circle.style.stroke = color;
542
- }
543
- }
544
- ProgressSnackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProgressSnackbarComponent, deps: [{ token: MAT_SNACK_BAR_DATA }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
545
- ProgressSnackbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProgressSnackbarComponent, selector: "lib-progress-snackbar", host: { classAttribute: "mat-simple-snackbar" }, ngImport: i0, template: "<div class=\"mat-simple-snack-bar-content message\">\r\n <mat-spinner style=\"vertical-align: middle; display: inline-flex; margin-right: 8px;\" diameter=\"16\" strokeWidth=\"1.5\" mode=\"indeterminate\" class=\"spinner\" color=\"red\"></mat-spinner>\r\n {{data.message}}\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None });
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProgressSnackbarComponent, decorators: [{
547
- type: Component,
548
- args: [{ selector: 'lib-progress-snackbar', encapsulation: ViewEncapsulation.None, host: {
549
- class: 'mat-simple-snackbar',
550
- }, template: "<div class=\"mat-simple-snack-bar-content message\">\r\n <mat-spinner style=\"vertical-align: middle; display: inline-flex; margin-right: 8px;\" diameter=\"16\" strokeWidth=\"1.5\" mode=\"indeterminate\" class=\"spinner\" color=\"red\"></mat-spinner>\r\n {{data.message}}\r\n</div>\r\n" }]
551
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
552
- type: Inject,
553
- args: [MAT_SNACK_BAR_DATA]
554
- }] }, { type: i0.ElementRef }]; } });
555
-
556
- class NucSnackbarService {
557
- constructor(matSnackBar, zone) {
558
- this.matSnackBar = matSnackBar;
559
- this.zone = zone;
560
- }
561
- openSnackbar(type, message, action, duration) {
562
- let snackbarRef;
563
- this.zone.run(() => {
564
- const panelClass = `${type}-snackbar`;
565
- if (type === NucSnackbarType.Progress) {
566
- snackbarRef = this.matSnackBar.openFromComponent(ProgressSnackbarComponent, {
567
- duration,
568
- panelClass,
569
- data: {
570
- message
571
- }
572
- });
573
- }
574
- else {
575
- snackbarRef = this.matSnackBar.open(message, action, {
576
- duration,
577
- panelClass
578
- });
579
- }
580
- });
581
- return snackbarRef;
582
- }
583
- openSnackbarWithConfig(message, action, config) {
584
- let snackbarRef;
585
- this.zone.run(() => {
586
- snackbarRef = this.matSnackBar.open(message, action, config);
587
- });
588
- return snackbarRef;
589
- }
590
- }
591
- NucSnackbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSnackbarService, deps: [{ token: i1$4.MatSnackBar }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
592
- NucSnackbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSnackbarService, providedIn: 'root' });
593
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSnackbarService, decorators: [{
594
- type: Injectable,
595
- args: [{
596
- providedIn: 'root'
597
- }]
598
- }], ctorParameters: function () { return [{ type: i1$4.MatSnackBar }, { type: i0.NgZone }]; } });
599
-
600
- class NucSnackbarModule {
601
- }
602
- NucSnackbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSnackbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
603
- NucSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NucSnackbarModule, declarations: [ProgressSnackbarComponent], imports: [CommonModule,
604
- MatSnackBarModule,
605
- MatProgressSpinnerModule] });
606
- NucSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSnackbarModule, imports: [CommonModule,
607
- MatSnackBarModule,
608
- MatProgressSpinnerModule] });
609
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucSnackbarModule, decorators: [{
610
- type: NgModule,
611
- args: [{
612
- declarations: [
613
- ProgressSnackbarComponent
614
- ],
615
- imports: [
616
- CommonModule,
617
- MatSnackBarModule,
618
- MatProgressSpinnerModule
619
- ],
620
- entryComponents: [
621
- ProgressSnackbarComponent
622
- ],
623
- exports: []
624
- }]
625
- }] });
626
-
627
- class NucUserAvatarComponent {
628
- constructor() {
629
- this.size = 'medium';
630
- this.background = false;
631
- }
632
- getUserInitials() {
633
- const nameParts = this.name.split(' ');
634
- return nameParts[0].charAt(0).toUpperCase() + '' + nameParts[nameParts.length - 1].charAt(0).toUpperCase();
635
- }
636
- getHslString() {
637
- if (!this.background) {
638
- return `hsl(${0},${0}%,${100}%)`;
639
- }
640
- let hash = 0;
641
- for (let i = 0; i < this.name.length; i++) {
642
- /*
643
- * Javascript uses double precision floating-point format for all numerical datatypes.
644
- * Except when using bitwise operations, where operators are converted to 32-bit signed integers.
645
- * Result of bitwise operations are then converted back to double precision floating-point format.
646
- *
647
- * We make a bitwise OR operation between the new hash and 0.
648
- * This keeps only the lower 32 bits in the new hash value.
649
- */
650
- // eslint-disable-next-line no-bitwise
651
- hash = (this.name.charCodeAt(i) + ((hash << 15) - hash)) | 0;
652
- }
653
- const hue = Math.abs(hash % 360);
654
- const lightness = 49.2;
655
- const saturation = 42.6;
656
- return `hsl(${hue},${saturation}%,${lightness}%)`;
657
- }
658
- }
659
- NucUserAvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucUserAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
660
- NucUserAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: NucUserAvatarComponent, selector: "nuc-user-avatar", inputs: { name: "name", image: "image", size: "size", background: "background" }, ngImport: i0, template: "<ng-container *ngIf=\"image\">\r\n <div class=\"user-avatar size-{{size}}\">\r\n <img src=\"{{image}}\" />\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"!image\">\r\n <div class=\"user-avatar size-{{size}} unselectable\" [style.background-color]=\"getHslString()\" [ngClass]=\"{'white-text': background, 'black-text border': !background}\">\r\n {{getUserInitials()}}\r\n </div>\r\n</ng-container>\r\n", styles: [".user-avatar{display:flex;align-items:center;justify-content:center;border-radius:50%;position:relative;text-align:center;font-weight:400}.user-avatar img{object-fit:contain;width:inherit;height:inherit;border-radius:50%}.white-text{color:#fff}.black-text{color:#333}.unselectable{-webkit-user-select:none;user-select:none}.border{border:2px solid #333333}.user-avatar.size-small{height:24px;width:24px;font-size:.8em;line-height:24px}.user-avatar.size-medium{height:40px;width:40px;font-size:1.2em;line-height:40px}.user-avatar.size-large{height:64px;width:64px;font-size:2em;line-height:64px}.user-avatar.size-xlarge{height:90px;width:90px;font-size:3em;line-height:90px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
661
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucUserAvatarComponent, decorators: [{
662
- type: Component,
663
- args: [{ selector: 'nuc-user-avatar', template: "<ng-container *ngIf=\"image\">\r\n <div class=\"user-avatar size-{{size}}\">\r\n <img src=\"{{image}}\" />\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"!image\">\r\n <div class=\"user-avatar size-{{size}} unselectable\" [style.background-color]=\"getHslString()\" [ngClass]=\"{'white-text': background, 'black-text border': !background}\">\r\n {{getUserInitials()}}\r\n </div>\r\n</ng-container>\r\n", styles: [".user-avatar{display:flex;align-items:center;justify-content:center;border-radius:50%;position:relative;text-align:center;font-weight:400}.user-avatar img{object-fit:contain;width:inherit;height:inherit;border-radius:50%}.white-text{color:#fff}.black-text{color:#333}.unselectable{-webkit-user-select:none;user-select:none}.border{border:2px solid #333333}.user-avatar.size-small{height:24px;width:24px;font-size:.8em;line-height:24px}.user-avatar.size-medium{height:40px;width:40px;font-size:1.2em;line-height:40px}.user-avatar.size-large{height:64px;width:64px;font-size:2em;line-height:64px}.user-avatar.size-xlarge{height:90px;width:90px;font-size:3em;line-height:90px}\n"] }]
664
- }], ctorParameters: function () { return []; }, propDecorators: { name: [{
665
- type: Input
666
- }], image: [{
667
- type: Input
668
- }], size: [{
669
- type: Input
670
- }], background: [{
671
- type: Input
672
- }] } });
673
-
674
- class NucUserAvatarModule {
675
- }
676
- NucUserAvatarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucUserAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
677
- NucUserAvatarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NucUserAvatarModule, declarations: [NucUserAvatarComponent], imports: [CommonModule], exports: [NucUserAvatarComponent] });
678
- NucUserAvatarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucUserAvatarModule, imports: [CommonModule] });
679
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucUserAvatarModule, decorators: [{
680
- type: NgModule,
681
- args: [{
682
- declarations: [
683
- NucUserAvatarComponent
684
- ],
685
- imports: [
686
- CommonModule,
687
- ],
688
- exports: [
689
- NucUserAvatarComponent
690
- ]
691
- }]
692
- }] });
693
-
694
- /*
695
- * Public API Surface of nucleus-material
696
- */
697
- // dialog
698
-
699
- /**
700
- * Generated bundle index. Do not edit.
701
- */
702
-
703
- export { LoadingState, LoadingStatus, NativeStylingService, NucColor, NucDialogModule, NucDialogService, NucLoadedContentComponent, NucLoadedContentDirective, NucLoadedContentModule, NucSnackbarModule, NucSnackbarService, NucSnackbarType, NucSwipeTabsDirective, NucSwipeTabsModule, NucUserAvatarComponent, NucUserAvatarModule, WindowsTitleBarSyle };
704
- //# sourceMappingURL=kolektor-nucleus-material.mjs.map