ngx-sfc-components 0.0.12 → 0.0.13
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/esm2020/lib/components/index.mjs +1 -1
- package/esm2020/lib/components/notification/notification.component.mjs +12 -5
- package/esm2020/lib/components/notification/parts/content/notification-content.model.mjs +1 -1
- package/fesm2015/ngx-sfc-components.mjs +12 -4
- package/fesm2015/ngx-sfc-components.mjs.map +1 -1
- package/fesm2020/ngx-sfc-components.mjs +11 -4
- package/fesm2020/ngx-sfc-components.mjs.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/notification/notification.component.d.ts +4 -2
- package/lib/components/notification/parts/content/notification-content.model.d.ts +3 -0
- package/package.json +2 -2
|
@@ -1350,13 +1350,20 @@ class NotificationComponent {
|
|
|
1350
1350
|
this.NotificationTemplate = NotificationTemplate;
|
|
1351
1351
|
this.showClose = true;
|
|
1352
1352
|
this.autoCloseModel = { enabled: false, interval: this.AUTO_CLOSE_INTERVAL_DEFAULT };
|
|
1353
|
-
this.
|
|
1353
|
+
this._type = NotificationType.Info;
|
|
1354
1354
|
this.model = { showButton: true };
|
|
1355
1355
|
this.closed = new EventEmitter();
|
|
1356
1356
|
this.buttonClicked = new EventEmitter();
|
|
1357
1357
|
this.destroy = false;
|
|
1358
1358
|
this.show = false;
|
|
1359
1359
|
}
|
|
1360
|
+
get type() {
|
|
1361
|
+
return this.model.type ?? this._type;
|
|
1362
|
+
}
|
|
1363
|
+
;
|
|
1364
|
+
set type(value) {
|
|
1365
|
+
this._type = value;
|
|
1366
|
+
}
|
|
1360
1367
|
ngOnInit() {
|
|
1361
1368
|
if (!isDefined(this.autoCloseModel.interval))
|
|
1362
1369
|
this.autoCloseModel.interval = this.AUTO_CLOSE_INTERVAL_DEFAULT;
|
|
@@ -1372,14 +1379,14 @@ class NotificationComponent {
|
|
|
1372
1379
|
close() {
|
|
1373
1380
|
this.show = false;
|
|
1374
1381
|
this.destroy = true;
|
|
1375
|
-
this.closed.emit();
|
|
1382
|
+
this.closed.emit(this.model);
|
|
1376
1383
|
}
|
|
1377
1384
|
}
|
|
1378
1385
|
NotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1379
|
-
NotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NotificationComponent, selector: "sfc-notification", inputs: { showClose: "showClose", autoCloseModel: "autoCloseModel", type: "type", model: "model", content: "content" }, outputs: { closed: "closed", buttonClicked: "buttonClicked" }, host: { properties: { "class": "this.type" } }, queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], ngImport: i0, template: "<div class=\"container\" [sfcDestroyParent]=\"destroy\" [delay]=\"DESTROY_HOST_INTERVAL\">\r\n <div class=\"notification\" [sfcShowHideElement]=\"show\">\r\n <sfc-close *ngIf=\"showClose\" (click)=\"close()\"></sfc-close>\r\n\r\n <sfc-template-content [referenceContent]=\"content\" [templatesContent]=\"templates\"\r\n [templateType]=\"NotificationTemplate.Content\" [defaultContent]=\"defaultContent\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultContent>\r\n <sfc-notification-content [type]=\"type\" [model]=\"model\" (buttonClicked)=\"buttonClicked.emit()\">\r\n </sfc-notification-content>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [":host{display:inline-block}:host .container .notification{border-radius:1.25em;box-shadow:5px 5px 20px #656d78;padding:1em;display:flex;justify-content:center;align-items:center;flex-direction:column;color:#f5f7fa}:host .container .notification sfc-close{align-self:end}:host .container .notification ::ng-deep sfc-close{color:#f5f7fa}:host .container .notification ::ng-deep sfc-close:hover{color:#fff}:host.info .container .notification{background:linear-gradient(to bottom right,#4fc1e9 40%,#4a89dc 100%)}:host.success .container .notification{background:linear-gradient(to bottom right,#b0db7d 40%,#99dbb4 100%)}:host.failed .container .notification{background:linear-gradient(to bottom left,#ef8d9c 40%,#ffc39e 100%)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: ["sfcShowHideElement", "delay"] }, { kind: "directive", type: i1$1.DestroyParentDirective, selector: "[sfcDestroyParent]", inputs: ["sfcDestroyParent", "delay"] }, { kind: "component", type: i1$1.CloseComponent, selector: "sfc-close" }, { kind: "component", type: i1$1.TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }, { kind: "component", type: NotificationContentComponent, selector: "sfc-notification-content", inputs: ["type", "model"], outputs: ["buttonClicked"] }] });
|
|
1386
|
+
NotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: NotificationComponent, selector: "sfc-notification", inputs: { showClose: "showClose", autoCloseModel: "autoCloseModel", type: "type", model: "model", content: "content" }, outputs: { closed: "closed", buttonClicked: "buttonClicked" }, host: { properties: { "class": "this.type" } }, queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], ngImport: i0, template: "<div class=\"container\" [sfcDestroyParent]=\"destroy\" [delay]=\"DESTROY_HOST_INTERVAL\">\r\n <div class=\"notification\" [sfcShowHideElement]=\"show\">\r\n <sfc-close *ngIf=\"showClose\" (click)=\"close()\"></sfc-close>\r\n\r\n <sfc-template-content [referenceContent]=\"content\" [templatesContent]=\"templates\"\r\n [templateType]=\"NotificationTemplate.Content\" [defaultContent]=\"defaultContent\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultContent>\r\n <sfc-notification-content [type]=\"type\" [model]=\"model\" (buttonClicked)=\"buttonClicked.emit()\">\r\n </sfc-notification-content>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [":host{position:relative;z-index:9999;display:inline-block}:host .container .notification{border-radius:1.25em;box-shadow:5px 5px 20px #656d78;padding:1em;display:flex;justify-content:center;align-items:center;flex-direction:column;color:#f5f7fa}:host .container .notification sfc-close{align-self:end}:host .container .notification ::ng-deep sfc-close{color:#f5f7fa}:host .container .notification ::ng-deep sfc-close:hover{color:#fff}:host.info .container .notification{background:linear-gradient(to bottom right,#4fc1e9 40%,#4a89dc 100%)}:host.success .container .notification{background:linear-gradient(to bottom right,#b0db7d 40%,#99dbb4 100%)}:host.failed .container .notification{background:linear-gradient(to bottom left,#ef8d9c 40%,#ffc39e 100%)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: ["sfcShowHideElement", "delay"] }, { kind: "directive", type: i1$1.DestroyParentDirective, selector: "[sfcDestroyParent]", inputs: ["sfcDestroyParent", "delay"] }, { kind: "component", type: i1$1.CloseComponent, selector: "sfc-close" }, { kind: "component", type: i1$1.TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }, { kind: "component", type: NotificationContentComponent, selector: "sfc-notification-content", inputs: ["type", "model"], outputs: ["buttonClicked"] }] });
|
|
1380
1387
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: NotificationComponent, decorators: [{
|
|
1381
1388
|
type: Component,
|
|
1382
|
-
args: [{ selector: 'sfc-notification', template: "<div class=\"container\" [sfcDestroyParent]=\"destroy\" [delay]=\"DESTROY_HOST_INTERVAL\">\r\n <div class=\"notification\" [sfcShowHideElement]=\"show\">\r\n <sfc-close *ngIf=\"showClose\" (click)=\"close()\"></sfc-close>\r\n\r\n <sfc-template-content [referenceContent]=\"content\" [templatesContent]=\"templates\"\r\n [templateType]=\"NotificationTemplate.Content\" [defaultContent]=\"defaultContent\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultContent>\r\n <sfc-notification-content [type]=\"type\" [model]=\"model\" (buttonClicked)=\"buttonClicked.emit()\">\r\n </sfc-notification-content>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [":host{display:inline-block}:host .container .notification{border-radius:1.25em;box-shadow:5px 5px 20px #656d78;padding:1em;display:flex;justify-content:center;align-items:center;flex-direction:column;color:#f5f7fa}:host .container .notification sfc-close{align-self:end}:host .container .notification ::ng-deep sfc-close{color:#f5f7fa}:host .container .notification ::ng-deep sfc-close:hover{color:#fff}:host.info .container .notification{background:linear-gradient(to bottom right,#4fc1e9 40%,#4a89dc 100%)}:host.success .container .notification{background:linear-gradient(to bottom right,#b0db7d 40%,#99dbb4 100%)}:host.failed .container .notification{background:linear-gradient(to bottom left,#ef8d9c 40%,#ffc39e 100%)}\n"] }]
|
|
1389
|
+
args: [{ selector: 'sfc-notification', template: "<div class=\"container\" [sfcDestroyParent]=\"destroy\" [delay]=\"DESTROY_HOST_INTERVAL\">\r\n <div class=\"notification\" [sfcShowHideElement]=\"show\">\r\n <sfc-close *ngIf=\"showClose\" (click)=\"close()\"></sfc-close>\r\n\r\n <sfc-template-content [referenceContent]=\"content\" [templatesContent]=\"templates\"\r\n [templateType]=\"NotificationTemplate.Content\" [defaultContent]=\"defaultContent\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultContent>\r\n <sfc-notification-content [type]=\"type\" [model]=\"model\" (buttonClicked)=\"buttonClicked.emit()\">\r\n </sfc-notification-content>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [":host{position:relative;z-index:9999;display:inline-block}:host .container .notification{border-radius:1.25em;box-shadow:5px 5px 20px #656d78;padding:1em;display:flex;justify-content:center;align-items:center;flex-direction:column;color:#f5f7fa}:host .container .notification sfc-close{align-self:end}:host .container .notification ::ng-deep sfc-close{color:#f5f7fa}:host .container .notification ::ng-deep sfc-close:hover{color:#fff}:host.info .container .notification{background:linear-gradient(to bottom right,#4fc1e9 40%,#4a89dc 100%)}:host.success .container .notification{background:linear-gradient(to bottom right,#b0db7d 40%,#99dbb4 100%)}:host.failed .container .notification{background:linear-gradient(to bottom left,#ef8d9c 40%,#ffc39e 100%)}\n"] }]
|
|
1383
1390
|
}], propDecorators: { showClose: [{
|
|
1384
1391
|
type: Input
|
|
1385
1392
|
}], autoCloseModel: [{
|