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