@impartner/design-components 1.0.5 → 1.1.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/esm2020/lib/alert/alert.component.mjs +48 -6
- package/esm2020/lib/alert/alert.module.mjs +6 -5
- package/fesm2015/impartner-design-components.mjs +50 -9
- package/fesm2015/impartner-design-components.mjs.map +1 -1
- package/fesm2020/impartner-design-components.mjs +50 -9
- package/fesm2020/impartner-design-components.mjs.map +1 -1
- package/lib/alert/alert.component.d.ts +20 -3
- package/lib/alert/alert.module.d.ts +2 -1
- package/package.json +1 -1
|
@@ -4000,16 +4000,32 @@ class AlertComponent {
|
|
|
4000
4000
|
*/
|
|
4001
4001
|
this.show = false;
|
|
4002
4002
|
/**
|
|
4003
|
-
* The heading text of the Alert.
|
|
4003
|
+
* The heading text of the Alert. Content can also be projected in the heading area using a `heading` directive.
|
|
4004
4004
|
*/
|
|
4005
4005
|
this.headingText = '';
|
|
4006
|
+
/**
|
|
4007
|
+
* The body text of the Alert. Content can also be projected into the body area using default projection.
|
|
4008
|
+
*/
|
|
4009
|
+
this.bodyText = '';
|
|
4010
|
+
/**
|
|
4011
|
+
* By default, an Alert is a "floating" notification. When set to "inline", these "floating" styles are replaced.
|
|
4012
|
+
*/
|
|
4013
|
+
this.inline = false;
|
|
4014
|
+
/**
|
|
4015
|
+
* Removes the Alert icon provided by the theme or projected into the icon area using the `icon` directive.
|
|
4016
|
+
*/
|
|
4017
|
+
this.hideIcon = false;
|
|
4018
|
+
/**
|
|
4019
|
+
* Allows the Alert to be dismissed.
|
|
4020
|
+
*/
|
|
4021
|
+
this.dismissible = true;
|
|
4006
4022
|
/**
|
|
4007
4023
|
* Event emitted when the Alert is dismissed.
|
|
4008
4024
|
*/
|
|
4009
4025
|
this.dismiss = new EventEmitter();
|
|
4010
4026
|
}
|
|
4011
|
-
get
|
|
4012
|
-
|
|
4027
|
+
get componentClasses() {
|
|
4028
|
+
const themeClass = this.theme === 'warning'
|
|
4013
4029
|
? 'alert-warning'
|
|
4014
4030
|
: this.theme === 'info'
|
|
4015
4031
|
? 'alert-info'
|
|
@@ -4018,23 +4034,48 @@ class AlertComponent {
|
|
|
4018
4034
|
: this.theme === 'success'
|
|
4019
4035
|
? 'alert-success'
|
|
4020
4036
|
: '';
|
|
4037
|
+
const inlineClass = this.inline ? ' alert-inline' : '';
|
|
4038
|
+
const dismissibleClass = this.dismissible ? ' alert-dismissible' : '';
|
|
4039
|
+
return themeClass + inlineClass + dismissibleClass;
|
|
4040
|
+
}
|
|
4041
|
+
get themeIconName() {
|
|
4042
|
+
return this.theme === 'warning'
|
|
4043
|
+
? 'exclamation-circle'
|
|
4044
|
+
: this.theme === 'info'
|
|
4045
|
+
? 'info-circle'
|
|
4046
|
+
: this.theme === 'danger'
|
|
4047
|
+
? 'times-circle'
|
|
4048
|
+
: this.theme === 'success'
|
|
4049
|
+
? 'check-circle'
|
|
4050
|
+
: '';
|
|
4021
4051
|
}
|
|
4022
4052
|
closeAlert() {
|
|
4053
|
+
if (!this.dismissible) {
|
|
4054
|
+
return;
|
|
4055
|
+
}
|
|
4023
4056
|
this.show = false;
|
|
4024
4057
|
this.dismiss.emit();
|
|
4025
4058
|
}
|
|
4026
4059
|
}
|
|
4027
4060
|
AlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4028
|
-
AlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: AlertComponent, selector: "impdc-alert, [impdc-alert]", inputs: { theme: "theme", show: "show", headingText: "headingText" }, outputs: { dismiss: "dismiss" }, ngImport: i0, template: "<div *ngIf=\"show\" class=\"
|
|
4061
|
+
AlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: AlertComponent, selector: "impdc-alert, [impdc-alert]", inputs: { theme: "theme", show: "show", headingText: "headingText", bodyText: "bodyText", inline: "inline", hideIcon: "hideIcon", dismissible: "dismissible" }, outputs: { dismiss: "dismiss" }, ngImport: i0, template: "<div *ngIf=\"show\" class=\"impdc alert\" [ngClass]=\"componentClasses\">\n <ng-container *ngIf=\"!hideIcon\">\n <span #alertIcon [hidden]=\"!alertIcon.children.length\" class=\"alert-icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n <span *ngIf=\"!alertIcon.children.length\" class=\"alert-icon\">\n <span impdc-icon [name]=\"themeIconName\"></span>\n </span>\n </ng-container>\n\n <div class=\"alert-content\">\n <div class=\"alert-heading\">\n <ng-content select=\"[heading]\"></ng-content>\n <span *ngIf=\"headingText\">{{ headingText }}</span>\n </div>\n\n <div\n #bodyContent\n class=\"alert-body\"\n [hidden]=\"!bodyContent.children.length\">\n <div *ngIf=\"bodyText\">{{ bodyText }}</div>\n\n <ng-content></ng-content>\n\n <div\n #alertActions\n [hidden]=\"!alertActions.children.length\"\n class=\"alert-actions\">\n <ng-content select=\"[action]\"></ng-content>\n </div>\n </div>\n </div>\n\n <a\n *ngIf=\"dismissible\"\n class=\"close-icon\"\n (click)=\"closeAlert()\"\n data-bs-dismiss=\"alert\"\n aria-label=\"Close\">\n <span impdc-icon name=\"times\" theme=\"regular\"></span>\n </a>\n</div>\n", styles: [".impdc.alert{display:flex;gap:1.2rem}.impdc.alert .alert-icon,.impdc.alert .close-icon{display:flex;width:2rem;height:2rem;font-size:1.6rem;line-height:2rem;align-items:center;justify-content:center}.impdc.alert .alert-content{flex:1;display:flex;flex-direction:column;gap:.8rem}.impdc.alert .alert-content .alert-heading{display:flex;align-items:center;gap:1.2rem}.impdc.alert .alert-content .alert-body{display:flex;flex-direction:column;gap:1.6rem;font-size:1.4rem;font-weight:400;line-height:2rem}.impdc.alert .alert-content .alert-body .alert-actions{display:flex;gap:2.8rem}.impdc.alert .alert-content .alert-body .alert-actions ::ng-deep a{font-size:1.4rem;font-weight:500;line-height:2rem;text-decoration-line:underline;color:var(--impartner-hex-alert-action-color)}.impdc.alert .close-icon{cursor:pointer;color:var(--impartner-hex-btn-close-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "impdc-icon, [impdc-icon]", inputs: ["name", "theme", "size"] }] });
|
|
4029
4062
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertComponent, decorators: [{
|
|
4030
4063
|
type: Component,
|
|
4031
|
-
args: [{ selector: 'impdc-alert, [impdc-alert]', template: "<div *ngIf=\"show\" class=\"
|
|
4064
|
+
args: [{ selector: 'impdc-alert, [impdc-alert]', template: "<div *ngIf=\"show\" class=\"impdc alert\" [ngClass]=\"componentClasses\">\n <ng-container *ngIf=\"!hideIcon\">\n <span #alertIcon [hidden]=\"!alertIcon.children.length\" class=\"alert-icon\">\n <ng-content select=\"[icon]\"></ng-content>\n </span>\n <span *ngIf=\"!alertIcon.children.length\" class=\"alert-icon\">\n <span impdc-icon [name]=\"themeIconName\"></span>\n </span>\n </ng-container>\n\n <div class=\"alert-content\">\n <div class=\"alert-heading\">\n <ng-content select=\"[heading]\"></ng-content>\n <span *ngIf=\"headingText\">{{ headingText }}</span>\n </div>\n\n <div\n #bodyContent\n class=\"alert-body\"\n [hidden]=\"!bodyContent.children.length\">\n <div *ngIf=\"bodyText\">{{ bodyText }}</div>\n\n <ng-content></ng-content>\n\n <div\n #alertActions\n [hidden]=\"!alertActions.children.length\"\n class=\"alert-actions\">\n <ng-content select=\"[action]\"></ng-content>\n </div>\n </div>\n </div>\n\n <a\n *ngIf=\"dismissible\"\n class=\"close-icon\"\n (click)=\"closeAlert()\"\n data-bs-dismiss=\"alert\"\n aria-label=\"Close\">\n <span impdc-icon name=\"times\" theme=\"regular\"></span>\n </a>\n</div>\n", styles: [".impdc.alert{display:flex;gap:1.2rem}.impdc.alert .alert-icon,.impdc.alert .close-icon{display:flex;width:2rem;height:2rem;font-size:1.6rem;line-height:2rem;align-items:center;justify-content:center}.impdc.alert .alert-content{flex:1;display:flex;flex-direction:column;gap:.8rem}.impdc.alert .alert-content .alert-heading{display:flex;align-items:center;gap:1.2rem}.impdc.alert .alert-content .alert-body{display:flex;flex-direction:column;gap:1.6rem;font-size:1.4rem;font-weight:400;line-height:2rem}.impdc.alert .alert-content .alert-body .alert-actions{display:flex;gap:2.8rem}.impdc.alert .alert-content .alert-body .alert-actions ::ng-deep a{font-size:1.4rem;font-weight:500;line-height:2rem;text-decoration-line:underline;color:var(--impartner-hex-alert-action-color)}.impdc.alert .close-icon{cursor:pointer;color:var(--impartner-hex-btn-close-color)}\n"] }]
|
|
4032
4065
|
}], propDecorators: { theme: [{
|
|
4033
4066
|
type: Input
|
|
4034
4067
|
}], show: [{
|
|
4035
4068
|
type: Input
|
|
4036
4069
|
}], headingText: [{
|
|
4037
4070
|
type: Input
|
|
4071
|
+
}], bodyText: [{
|
|
4072
|
+
type: Input
|
|
4073
|
+
}], inline: [{
|
|
4074
|
+
type: Input
|
|
4075
|
+
}], hideIcon: [{
|
|
4076
|
+
type: Input
|
|
4077
|
+
}], dismissible: [{
|
|
4078
|
+
type: Input
|
|
4038
4079
|
}], dismiss: [{
|
|
4039
4080
|
type: Output
|
|
4040
4081
|
}] } });
|
|
@@ -4042,14 +4083,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
4042
4083
|
class AlertModule {
|
|
4043
4084
|
}
|
|
4044
4085
|
AlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4045
|
-
AlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: AlertModule, declarations: [AlertComponent], imports: [CommonModule], exports: [AlertComponent] });
|
|
4046
|
-
AlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertModule, imports: [CommonModule] });
|
|
4086
|
+
AlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: AlertModule, declarations: [AlertComponent], imports: [CommonModule, IconModule], exports: [IconModule, AlertComponent] });
|
|
4087
|
+
AlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertModule, imports: [CommonModule, IconModule, IconModule] });
|
|
4047
4088
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertModule, decorators: [{
|
|
4048
4089
|
type: NgModule,
|
|
4049
4090
|
args: [{
|
|
4050
|
-
imports: [CommonModule],
|
|
4091
|
+
imports: [CommonModule, IconModule],
|
|
4051
4092
|
declarations: [AlertComponent],
|
|
4052
|
-
exports: [AlertComponent]
|
|
4093
|
+
exports: [IconModule, AlertComponent]
|
|
4053
4094
|
}]
|
|
4054
4095
|
}] });
|
|
4055
4096
|
|