@flywheel-io/vision 0.3.1 → 0.4.0
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/bundles/flywheel-io-vision.umd.js +402 -6
- package/bundles/flywheel-io-vision.umd.js.map +1 -1
- package/bundles/flywheel-io-vision.umd.min.js +1 -1
- package/bundles/flywheel-io-vision.umd.min.js.map +1 -1
- package/components/dialog/choice-dialog.component.d.ts +24 -0
- package/components/dialog/confirm-dialog.component.d.ts +12 -0
- package/components/dialog/dialog.module.d.ts +2 -0
- package/components/dialog/dialog.service.d.ts +19 -0
- package/components/dialog/error-dialog.component.d.ts +10 -0
- package/components/dialog/portal-dialog.component.d.ts +25 -0
- package/components/shared/pipes/pipes.module.d.ts +4 -0
- package/components/shared/pipes/translate.pipe.d.ts +15 -0
- package/components/shared/pipes/trusthtml.pipe.d.ts +7 -0
- package/components/shared/translation.service.d.ts +11 -0
- package/esm2015/components/dialog/choice-dialog.component.js +52 -0
- package/esm2015/components/dialog/confirm-dialog.component.js +40 -0
- package/esm2015/components/dialog/dialog.module.js +45 -0
- package/esm2015/components/dialog/dialog.service.js +69 -0
- package/esm2015/components/dialog/error-dialog.component.js +32 -0
- package/esm2015/components/dialog/portal-dialog.component.js +88 -0
- package/esm2015/components/notification/notification/notification.component.js +1 -1
- package/esm2015/components/shared/pipes/pipes.module.js +24 -0
- package/esm2015/components/shared/pipes/translate.pipe.js +40 -0
- package/esm2015/components/shared/pipes/trusthtml.pipe.js +20 -0
- package/esm2015/components/shared/translation.service.js +22 -0
- package/esm2015/flywheel-io-vision.js +5 -2
- package/esm2015/public-api.js +8 -1
- package/fesm2015/flywheel-io-vision.js +402 -6
- package/fesm2015/flywheel-io-vision.js.map +1 -1
- package/flywheel-io-vision.d.ts +4 -1
- package/flywheel-io-vision.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +7 -0
- package/scss/material/overrides.scss +8 -20
- package/styles.css +11 -80
- package/styles.scss +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/button'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@flywheel-io/vision', ['exports', '@angular/core', '@angular/common', '@angular/material/button', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['flywheel-io'] = global['flywheel-io'] || {}, global['flywheel-io'].vision = {}), global.ng.core, global.ng.common, global.ng.material.button, global.
|
|
5
|
-
}(this, (function (exports, i0, common, button,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/dialog'), require('@angular/cdk/portal'), require('@angular/material/icon'), require('rxjs'), require('rxjs/operators'), require('@angular/platform-browser'), require('@angular/cdk/overlay'), require('@angular/forms'), require('@angular/material/paginator'), require('@angular/material/sort'), require('@angular/material/table'), require('@angular/material/input'), require('@angular/material/select')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@flywheel-io/vision', ['exports', '@angular/core', '@angular/common', '@angular/material/button', '@angular/material/dialog', '@angular/cdk/portal', '@angular/material/icon', 'rxjs', 'rxjs/operators', '@angular/platform-browser', '@angular/cdk/overlay', '@angular/forms', '@angular/material/paginator', '@angular/material/sort', '@angular/material/table', '@angular/material/input', '@angular/material/select'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['flywheel-io'] = global['flywheel-io'] || {}, global['flywheel-io'].vision = {}), global.ng.core, global.ng.common, global.ng.material.button, global.ng.material.dialog, global.ng.cdk.portal, global.ng.material.icon, global.rxjs, global.rxjs.operators, global.ng.platformBrowser, global.ng.cdk.overlay, global.ng.forms, global.ng.material.paginator, global.ng.material.sort, global.ng.material.table, global.ng.material.input, global.ng.material.select));
|
|
5
|
+
}(this, (function (exports, i0, common, button, dialog, portal, icon, rxjs, operators, platformBrowser, overlay, forms, paginator, sort, table, input, select) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var FwButtonGroupComponent = /** @class */ (function () {
|
|
8
8
|
function FwButtonGroupComponent() {
|
|
@@ -102,6 +102,155 @@
|
|
|
102
102
|
},] }
|
|
103
103
|
];
|
|
104
104
|
|
|
105
|
+
var FwChoiceDialog = /** @class */ (function () {
|
|
106
|
+
function FwChoiceDialog(data) {
|
|
107
|
+
this.data = data;
|
|
108
|
+
this.alignActions = this.data.alignActions
|
|
109
|
+
? this.data.alignActions === 'start'
|
|
110
|
+
? null
|
|
111
|
+
: this.data.alignActions
|
|
112
|
+
: 'center';
|
|
113
|
+
this.choices = this.data.choices;
|
|
114
|
+
this.content = this.data.content;
|
|
115
|
+
this.title = this.data.title;
|
|
116
|
+
}
|
|
117
|
+
FwChoiceDialog.prototype.getTestId = function (choice) {
|
|
118
|
+
var _a;
|
|
119
|
+
return choice.testId || String((_a = choice.label) !== null && _a !== void 0 ? _a : choice.value).toLowerCase() + "-button";
|
|
120
|
+
};
|
|
121
|
+
return FwChoiceDialog;
|
|
122
|
+
}());
|
|
123
|
+
FwChoiceDialog.decorators = [
|
|
124
|
+
{ type: i0.Component, args: [{
|
|
125
|
+
host: {
|
|
126
|
+
class: 'mat-dialog-component',
|
|
127
|
+
'test-id': 'choice-dialog',
|
|
128
|
+
},
|
|
129
|
+
selector: 'fw-choice-dialog',
|
|
130
|
+
template: "\n <h1 mat-dialog-title *ngIf=\"title\">{{ title }}</h1>\n <div mat-dialog-content>{{ content }}</div>\n <div mat-dialog-actions [align]=\"alignActions\">\n <ng-container *ngFor=\"let choice of choices\" [ngSwitch]=\"choice.variant\">\n <button *ngSwitchCase=\"'raised'\" mat-raised-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngSwitchCase=\"'stroked'\" mat-stroked-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngSwitchCase=\"'flat'\" mat-flat-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <ng-container *ngSwitchDefault>\n <button *ngIf=\"choice.color\" mat-flat-button [color]=\"choice.color\" [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n <button *ngIf=\"!choice.color\" mat-stroked-button [attr.test-id]=\"getTestId(choice)\"\n [mat-dialog-close]=\"choice.value\">{{ choice.label }}</button>\n </ng-container>\n </ng-container>\n </div>\n "
|
|
131
|
+
},] }
|
|
132
|
+
];
|
|
133
|
+
FwChoiceDialog.ctorParameters = function () { return [
|
|
134
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
|
|
135
|
+
]; };
|
|
136
|
+
|
|
137
|
+
var FwConfirmDialog = /** @class */ (function () {
|
|
138
|
+
function FwConfirmDialog(data) {
|
|
139
|
+
this.data = data;
|
|
140
|
+
this.title = this.data.title;
|
|
141
|
+
this.content = this.data.content;
|
|
142
|
+
this.html = this.data.html;
|
|
143
|
+
}
|
|
144
|
+
return FwConfirmDialog;
|
|
145
|
+
}());
|
|
146
|
+
FwConfirmDialog.decorators = [
|
|
147
|
+
{ type: i0.Component, args: [{
|
|
148
|
+
host: {
|
|
149
|
+
class: 'mat-dialog-component',
|
|
150
|
+
'test-id': 'confirm-dialog',
|
|
151
|
+
},
|
|
152
|
+
selector: 'fw-confirm-dialog',
|
|
153
|
+
template: "\n <h1 mat-dialog-title *ngIf=\"title\">{{ title }}</h1>\n <div mat-dialog-content *ngIf=\"html\" class=\"markup\" [innerHTML]=\"html | trusthtml\"></div>\n <div mat-dialog-content *ngIf=\"!html\">{{ content || ('confirmDialog.body' | translate ) }}</div>\n <div mat-dialog-actions align=\"center\">\n <button test-id=\"no-button\" mat-stroked-button [mat-dialog-close]=\"false\">{{ 'confirmDialog.no' | translate }}</button>\n <button test-id=\"yes-button\" mat-flat-button color=\"primary\" [mat-dialog-close]=\"true\">{{ 'confirmDialog.yes' | translate }}</button>\n </div>\n ",
|
|
154
|
+
styles: ["\n [mat-dialog-content] {\n text-align: center;\n }\n [mat-dialog-content].markup {\n text-align: inherit;\n }\n "]
|
|
155
|
+
},] }
|
|
156
|
+
];
|
|
157
|
+
FwConfirmDialog.ctorParameters = function () { return [
|
|
158
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
|
|
159
|
+
]; };
|
|
160
|
+
|
|
161
|
+
var FwDialogService = /** @class */ (function () {
|
|
162
|
+
function FwDialogService(matDialog) {
|
|
163
|
+
this.matDialog = matDialog;
|
|
164
|
+
this.dialogs = [];
|
|
165
|
+
this.config = new Map();
|
|
166
|
+
}
|
|
167
|
+
FwDialogService.prototype.closeAll = function (component) {
|
|
168
|
+
if (component) {
|
|
169
|
+
this.dialogs
|
|
170
|
+
.filter(function (el) { return el.component === component; })
|
|
171
|
+
.forEach(function (el) { return el.ref.close(); });
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this.matDialog.closeAll();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
FwDialogService.prototype.open = function (component, config) {
|
|
178
|
+
var _this = this;
|
|
179
|
+
var index = this.dialogs.findIndex(function (el) { return el.component === component; });
|
|
180
|
+
var ref = null;
|
|
181
|
+
var baseConfig = Object.assign({ multi: 'allow' }, this.config.get(component));
|
|
182
|
+
switch (baseConfig.multi) {
|
|
183
|
+
case 'ignore':
|
|
184
|
+
// if an existing dialog of the same type doesn't exist, open one
|
|
185
|
+
if (index === -1) {
|
|
186
|
+
ref = this.matDialog.open(component, Object.assign(Object.assign({}, baseConfig), config));
|
|
187
|
+
this.dialogs.push({ component: component, ref: ref });
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
case 'replace':
|
|
191
|
+
// if an existing dialog of the same type exists, replace it.
|
|
192
|
+
if (index > -1) {
|
|
193
|
+
this.dialogs[index].ref.close();
|
|
194
|
+
ref = this.matDialog.open(component, Object.assign(Object.assign({}, baseConfig), config));
|
|
195
|
+
this.dialogs.splice(index, 1, { component: component, ref: ref });
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
ref = this.matDialog.open(component, Object.assign(Object.assign({}, baseConfig), config));
|
|
199
|
+
this.dialogs.push({ component: component, ref: ref });
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
default:
|
|
203
|
+
ref = this.matDialog.open(component, Object.assign(Object.assign({}, baseConfig), config));
|
|
204
|
+
this.dialogs.push({ component: component, ref: ref });
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
if (ref) {
|
|
208
|
+
ref.afterClosed().subscribe(function () {
|
|
209
|
+
// clean up open dialog reference
|
|
210
|
+
var index = _this.dialogs.findIndex(function (el) { return el.ref === ref; });
|
|
211
|
+
if (index >= 0) {
|
|
212
|
+
_this.dialogs.splice(index, 1);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
return ref;
|
|
217
|
+
};
|
|
218
|
+
FwDialogService.prototype.registerDialog = function (component, config) {
|
|
219
|
+
this.config.set(component, config);
|
|
220
|
+
};
|
|
221
|
+
return FwDialogService;
|
|
222
|
+
}());
|
|
223
|
+
FwDialogService.decorators = [
|
|
224
|
+
{ type: i0.Injectable }
|
|
225
|
+
];
|
|
226
|
+
FwDialogService.ctorParameters = function () { return [
|
|
227
|
+
{ type: dialog.MatDialog }
|
|
228
|
+
]; };
|
|
229
|
+
|
|
230
|
+
var FwErrorDialog = /** @class */ (function () {
|
|
231
|
+
function FwErrorDialog(data, ref) {
|
|
232
|
+
this.data = data;
|
|
233
|
+
this.ref = ref;
|
|
234
|
+
this.message = this.data.message;
|
|
235
|
+
this.ref.disableClose = false;
|
|
236
|
+
}
|
|
237
|
+
return FwErrorDialog;
|
|
238
|
+
}());
|
|
239
|
+
FwErrorDialog.decorators = [
|
|
240
|
+
{ type: i0.Component, args: [{
|
|
241
|
+
host: {
|
|
242
|
+
class: 'mat-dialog-component',
|
|
243
|
+
'test-id': 'error-dialog',
|
|
244
|
+
},
|
|
245
|
+
selector: 'fw-error-dialog',
|
|
246
|
+
template: "\n <div mat-dialog-content>{{ message }}</div>\n <div mat-dialog-actions align=\"end\">\n <button test-id=\"close-button\" mat-stroked-button mat-dialog-close>\n {{ 'common.actions.close' | translate }}\n </button>\n </div>\n "
|
|
247
|
+
},] }
|
|
248
|
+
];
|
|
249
|
+
FwErrorDialog.ctorParameters = function () { return [
|
|
250
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
|
|
251
|
+
{ type: dialog.MatDialogRef }
|
|
252
|
+
]; };
|
|
253
|
+
|
|
105
254
|
/******************************************************************************
|
|
106
255
|
Copyright (c) Microsoft Corporation.
|
|
107
256
|
|
|
@@ -429,6 +578,241 @@
|
|
|
429
578
|
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
430
579
|
}
|
|
431
580
|
|
|
581
|
+
var FwPortalDialog = /** @class */ (function () {
|
|
582
|
+
function FwPortalDialog(data, viewContainerRef) {
|
|
583
|
+
this.data = data;
|
|
584
|
+
this.viewContainerRef = viewContainerRef;
|
|
585
|
+
this.content = this.data.content;
|
|
586
|
+
this.title = this.data.title;
|
|
587
|
+
this.destroyed$ = new rxjs.Subject();
|
|
588
|
+
if (this.data.component) {
|
|
589
|
+
this.portal = new portal.ComponentPortal(this.data.component.type, this.viewContainerRef);
|
|
590
|
+
}
|
|
591
|
+
else if (this.data.template) {
|
|
592
|
+
this.portal = new portal.TemplatePortal(this.data.template, this.viewContainerRef);
|
|
593
|
+
}
|
|
594
|
+
else {
|
|
595
|
+
throw new Error('One of [component, template] was not provided.');
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
FwPortalDialog.prototype.ngOnDestroy = function () {
|
|
599
|
+
this.destroyed$.next();
|
|
600
|
+
};
|
|
601
|
+
FwPortalDialog.prototype.attached = function (ref) {
|
|
602
|
+
var e_1, _c, e_2, _d;
|
|
603
|
+
var _a, _b;
|
|
604
|
+
if (this.data.component) {
|
|
605
|
+
ref = ref;
|
|
606
|
+
if (this.data.component.outputs) {
|
|
607
|
+
try {
|
|
608
|
+
for (var _e = __values(Object.entries(this.data.component.outputs)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
609
|
+
var _g = __read(_f.value, 2), key = _g[0], observer = _g[1];
|
|
610
|
+
var output$ = ref[key];
|
|
611
|
+
if (typeof (output$ === null || output$ === void 0 ? void 0 : output$.pipe) === 'function' && typeof output$.subscribe === 'function') {
|
|
612
|
+
output$.pipe(operators.takeUntil(this.destroyed$)).subscribe(observer);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
617
|
+
finally {
|
|
618
|
+
try {
|
|
619
|
+
if (_f && !_f.done && (_c = _e.return)) _c.call(_e);
|
|
620
|
+
}
|
|
621
|
+
finally { if (e_1) throw e_1.error; }
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
if (this.data.component.inputs) {
|
|
625
|
+
var changes = {};
|
|
626
|
+
try {
|
|
627
|
+
for (var _h = __values(Object.entries(this.data.component.inputs)), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
628
|
+
var _k = __read(_j.value, 2), key = _k[0], value = _k[1];
|
|
629
|
+
ref.instance[key] = value;
|
|
630
|
+
changes[key] = new i0.SimpleChange(value, value, true);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
634
|
+
finally {
|
|
635
|
+
try {
|
|
636
|
+
if (_j && !_j.done && (_d = _h.return)) _d.call(_h);
|
|
637
|
+
}
|
|
638
|
+
finally { if (e_2) throw e_2.error; }
|
|
639
|
+
}
|
|
640
|
+
(_b = (_a = ref.instance).ngOnChanges) === null || _b === void 0 ? void 0 : _b.call(_a, changes);
|
|
641
|
+
ref.changeDetectorRef.markForCheck();
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
return FwPortalDialog;
|
|
646
|
+
}());
|
|
647
|
+
FwPortalDialog.decorators = [
|
|
648
|
+
{ type: i0.Component, args: [{
|
|
649
|
+
host: {
|
|
650
|
+
class: 'mat-dialog-component',
|
|
651
|
+
'test-id': 'portal-dialog',
|
|
652
|
+
},
|
|
653
|
+
selector: 'fw-portal-dialog',
|
|
654
|
+
template: "\n <ng-container *ngIf=\"title\">\n <h1 mat-dialog-title>{{ title }}</h1>\n <button test-id=\"dialog-close-corner\" mat-icon-button mat-dialog-close>\n <mat-icon>close</mat-icon>\n </button>\n </ng-container>\n <mat-dialog-content>\n <p *ngIf=\"content\" class=\"content\">{{ content }}</p>\n <ng-template [cdkPortalOutlet]=\"portal\" (attached)=\"attached($event)\"></ng-template>\n </mat-dialog-content>\n <mat-dialog-actions align=\"end\">\n <button test-id=\"dialog-close-button\" mat-stroked-button mat-dialog-close>\n {{ 'common.actions.close' | translate }}\n </button>\n </mat-dialog-actions>\n ",
|
|
655
|
+
styles: ["\n :host {\n min-width: 200px;\n }\n .content {\n margin-bottom: 30px;\n }\n "]
|
|
656
|
+
},] }
|
|
657
|
+
];
|
|
658
|
+
FwPortalDialog.ctorParameters = function () { return [
|
|
659
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [dialog.MAT_DIALOG_DATA,] }] },
|
|
660
|
+
{ type: i0.ViewContainerRef }
|
|
661
|
+
]; };
|
|
662
|
+
|
|
663
|
+
var TranslationService = /** @class */ (function () {
|
|
664
|
+
function TranslationService() {
|
|
665
|
+
}
|
|
666
|
+
return TranslationService;
|
|
667
|
+
}());
|
|
668
|
+
/**
|
|
669
|
+
* Very basic i18n implementation. Consumer apps can provide their own implementation of TranslationService to override.
|
|
670
|
+
*/
|
|
671
|
+
var MinimalTranslationService = /** @class */ (function () {
|
|
672
|
+
function MinimalTranslationService() {
|
|
673
|
+
}
|
|
674
|
+
MinimalTranslationService.prototype.getMessage = function (key, silent) {
|
|
675
|
+
return rxjs.of(MinimalTranslationService.messages[key]);
|
|
676
|
+
};
|
|
677
|
+
return MinimalTranslationService;
|
|
678
|
+
}());
|
|
679
|
+
MinimalTranslationService.messages = {
|
|
680
|
+
'common.actions.close': 'Close',
|
|
681
|
+
'confirmDialog.body': 'Are you sure?',
|
|
682
|
+
'confirmDialog.no': 'No',
|
|
683
|
+
'confirmDialog.yes': 'Yes',
|
|
684
|
+
};
|
|
685
|
+
MinimalTranslationService.decorators = [
|
|
686
|
+
{ type: i0.Injectable }
|
|
687
|
+
];
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Translate a message given a nested key to a location in the loaded locale copy.
|
|
691
|
+
*/
|
|
692
|
+
var TranslatePipe = /** @class */ (function () {
|
|
693
|
+
function TranslatePipe(cdr, translationService) {
|
|
694
|
+
this.cdr = cdr;
|
|
695
|
+
this.translationService = translationService;
|
|
696
|
+
this.subscriptions = {};
|
|
697
|
+
this.messages = {};
|
|
698
|
+
}
|
|
699
|
+
TranslatePipe.prototype.ngOnDestroy = function () {
|
|
700
|
+
var e_1, _a;
|
|
701
|
+
try {
|
|
702
|
+
for (var _b = __values(Object.values(this.subscriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
703
|
+
var subscription = _c.value;
|
|
704
|
+
subscription.unsubscribe();
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
708
|
+
finally {
|
|
709
|
+
try {
|
|
710
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
711
|
+
}
|
|
712
|
+
finally { if (e_1) throw e_1.error; }
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
TranslatePipe.prototype.transform = function (key, silent) {
|
|
716
|
+
var _this = this;
|
|
717
|
+
if (silent === void 0) { silent = false; }
|
|
718
|
+
if (!(key in this.subscriptions)) {
|
|
719
|
+
this.subscriptions[key] = this.translationService.getMessage(key, silent).subscribe(function (message) {
|
|
720
|
+
_this.messages[key] = message;
|
|
721
|
+
// trigger change detection to support components with ChangeDetectionStrategy.OnPush
|
|
722
|
+
_this.cdr.markForCheck();
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
return this.messages[key] || '';
|
|
726
|
+
};
|
|
727
|
+
return TranslatePipe;
|
|
728
|
+
}());
|
|
729
|
+
TranslatePipe.decorators = [
|
|
730
|
+
{ type: i0.Pipe, args: [{
|
|
731
|
+
name: 'translate',
|
|
732
|
+
pure: false,
|
|
733
|
+
},] }
|
|
734
|
+
];
|
|
735
|
+
TranslatePipe.ctorParameters = function () { return [
|
|
736
|
+
{ type: i0.ChangeDetectorRef },
|
|
737
|
+
{ type: TranslationService }
|
|
738
|
+
]; };
|
|
739
|
+
|
|
740
|
+
var TrustHtmlPipe = /** @class */ (function () {
|
|
741
|
+
function TrustHtmlPipe(sanitizer) {
|
|
742
|
+
this.sanitizer = sanitizer;
|
|
743
|
+
}
|
|
744
|
+
TrustHtmlPipe.prototype.transform = function (html) {
|
|
745
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
746
|
+
};
|
|
747
|
+
return TrustHtmlPipe;
|
|
748
|
+
}());
|
|
749
|
+
TrustHtmlPipe.decorators = [
|
|
750
|
+
{ type: i0.Pipe, args: [{
|
|
751
|
+
name: 'trusthtml',
|
|
752
|
+
pure: true,
|
|
753
|
+
},] }
|
|
754
|
+
];
|
|
755
|
+
TrustHtmlPipe.ctorParameters = function () { return [
|
|
756
|
+
{ type: platformBrowser.DomSanitizer }
|
|
757
|
+
]; };
|
|
758
|
+
|
|
759
|
+
var exports$1 = [
|
|
760
|
+
TranslatePipe,
|
|
761
|
+
TrustHtmlPipe,
|
|
762
|
+
];
|
|
763
|
+
var PipesModule = /** @class */ (function () {
|
|
764
|
+
function PipesModule() {
|
|
765
|
+
}
|
|
766
|
+
return PipesModule;
|
|
767
|
+
}());
|
|
768
|
+
PipesModule.decorators = [
|
|
769
|
+
{ type: i0.NgModule, args: [{
|
|
770
|
+
declarations: exports$1,
|
|
771
|
+
exports: exports$1,
|
|
772
|
+
providers: [
|
|
773
|
+
{
|
|
774
|
+
provide: TranslationService,
|
|
775
|
+
useClass: MinimalTranslationService,
|
|
776
|
+
},
|
|
777
|
+
],
|
|
778
|
+
},] }
|
|
779
|
+
];
|
|
780
|
+
|
|
781
|
+
var ɵ0 = {
|
|
782
|
+
disableClose: true,
|
|
783
|
+
hasBackdrop: true,
|
|
784
|
+
};
|
|
785
|
+
var FwDialogModule = /** @class */ (function () {
|
|
786
|
+
function FwDialogModule() {
|
|
787
|
+
}
|
|
788
|
+
return FwDialogModule;
|
|
789
|
+
}());
|
|
790
|
+
FwDialogModule.decorators = [
|
|
791
|
+
{ type: i0.NgModule, args: [{
|
|
792
|
+
declarations: [
|
|
793
|
+
FwChoiceDialog,
|
|
794
|
+
FwConfirmDialog,
|
|
795
|
+
FwErrorDialog,
|
|
796
|
+
FwPortalDialog,
|
|
797
|
+
],
|
|
798
|
+
imports: [
|
|
799
|
+
common.CommonModule,
|
|
800
|
+
button.MatButtonModule,
|
|
801
|
+
dialog.MatDialogModule,
|
|
802
|
+
icon.MatIconModule,
|
|
803
|
+
PipesModule,
|
|
804
|
+
portal.PortalModule,
|
|
805
|
+
],
|
|
806
|
+
providers: [
|
|
807
|
+
FwDialogService,
|
|
808
|
+
{
|
|
809
|
+
provide: dialog.MAT_DIALOG_DEFAULT_OPTIONS,
|
|
810
|
+
useValue: ɵ0
|
|
811
|
+
}
|
|
812
|
+
],
|
|
813
|
+
},] }
|
|
814
|
+
];
|
|
815
|
+
|
|
432
816
|
function genId() {
|
|
433
817
|
return String.prototype.padStart(24, Math.floor(Math.random() * Date.now()).toString(16));
|
|
434
818
|
}
|
|
@@ -661,7 +1045,7 @@
|
|
|
661
1045
|
providers: [FwNotificationTimerService],
|
|
662
1046
|
encapsulation: i0.ViewEncapsulation.None,
|
|
663
1047
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
664
|
-
styles: ["fw-notification{display:block;border-radius:4px;box-sizing:border-box;margin:5px 24px;max-width:33vw;min-width:344px;padding:14px 16px;transform-origin:center;background-color:#2f96b4;border:1px solid hsla(0,0%,100%,.
|
|
1048
|
+
styles: ["fw-notification{display:block;border-radius:4px;box-sizing:border-box;margin:5px 24px;max-width:33vw;min-width:344px;padding:14px 16px;transform-origin:center;background-color:#2f96b4;border:1px solid hsla(0,0%,100%,.7019607843);box-shadow:0 0 12px #999;color:#fff;opacity:.99;white-space:pre-wrap}fw-notification.error{background-color:#bd362f}fw-notification.info{background-color:#2f96b4}fw-notification.success{background-color:#51a351}fw-notification.wait{background-color:#2f96b4}fw-notification.warning{background-color:#f89406}"]
|
|
665
1049
|
},] }
|
|
666
1050
|
];
|
|
667
1051
|
FwNotificationComponent.ctorParameters = function () { return [
|
|
@@ -1163,6 +1547,11 @@
|
|
|
1163
1547
|
exports.FwButtonGroupComponent = FwButtonGroupComponent;
|
|
1164
1548
|
exports.FwButtonGroupModule = FwButtonGroupModule;
|
|
1165
1549
|
exports.FwButtonModule = FwButtonModule;
|
|
1550
|
+
exports.FwChoiceDialog = FwChoiceDialog;
|
|
1551
|
+
exports.FwConfirmDialog = FwConfirmDialog;
|
|
1552
|
+
exports.FwDialogModule = FwDialogModule;
|
|
1553
|
+
exports.FwDialogService = FwDialogService;
|
|
1554
|
+
exports.FwErrorDialog = FwErrorDialog;
|
|
1166
1555
|
exports.FwNotificationComponent = FwNotificationComponent;
|
|
1167
1556
|
exports.FwNotificationContainerComponent = FwNotificationContainerComponent;
|
|
1168
1557
|
exports.FwNotificationModule = FwNotificationModule;
|
|
@@ -1171,10 +1560,17 @@
|
|
|
1171
1560
|
exports.FwPopoverModule = FwPopoverModule;
|
|
1172
1561
|
exports.FwPopoverTriggerComponent = FwPopoverTriggerComponent;
|
|
1173
1562
|
exports.FwPopoverTriggerDirective = FwPopoverTriggerDirective;
|
|
1563
|
+
exports.FwPortalDialog = FwPortalDialog;
|
|
1174
1564
|
exports.FwTableComponent = FwTableComponent;
|
|
1175
1565
|
exports.FwTableModule = FwTableModule;
|
|
1566
|
+
exports.MinimalTranslationService = MinimalTranslationService;
|
|
1567
|
+
exports.TranslationService = TranslationService;
|
|
1176
1568
|
exports.genId = genId;
|
|
1177
|
-
exports.ɵ
|
|
1569
|
+
exports.ɵ0 = ɵ0;
|
|
1570
|
+
exports.ɵa = PipesModule;
|
|
1571
|
+
exports.ɵb = TranslatePipe;
|
|
1572
|
+
exports.ɵc = TrustHtmlPipe;
|
|
1573
|
+
exports.ɵd = FwNotificationTimerService;
|
|
1178
1574
|
|
|
1179
1575
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1180
1576
|
|