@spicainternational/ngx-sds-components 2.4.3 → 2.5.2
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/src/lib/modal/dialog/dialog.component.mjs +78 -0
- package/esm2020/src/lib/modal/modal.component.mjs +21 -7
- package/esm2020/src/lib/modal/modal.module.mjs +10 -4
- package/esm2020/src/lib/modal/public-api.mjs +2 -1
- package/esm2020/src/lib/pane/pane.component.mjs +3 -3
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs +103 -10
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-pane.mjs +2 -2
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-pane.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs +103 -10
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-pane.mjs +2 -2
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-pane.mjs.map +1 -1
- package/package.json +3 -2
- package/src/lib/modal/dialog/dialog.component.d.ts +28 -0
- package/src/lib/modal/modal.component.d.ts +7 -3
- package/src/lib/modal/modal.module.d.ts +4 -3
- package/src/lib/modal/public-api.d.ts +1 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../modal.component";
|
|
4
|
+
import * as i2 from "@angular/common";
|
|
5
|
+
export class SdsDialogComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.title = '';
|
|
8
|
+
this.closeText = 'close';
|
|
9
|
+
this.size = 'md';
|
|
10
|
+
this.primaryButtonText = 'Ok';
|
|
11
|
+
this.secondaryButtonText = 'Cancel';
|
|
12
|
+
this.primaryButtonClass = 'btn-primary';
|
|
13
|
+
this.secondaryButtonClass = 'btn-secondary';
|
|
14
|
+
this.showHeader = true;
|
|
15
|
+
this.showCloseButton = true;
|
|
16
|
+
this.showSecondaryButton = true;
|
|
17
|
+
}
|
|
18
|
+
ngOnInit() { }
|
|
19
|
+
open(callback, data) {
|
|
20
|
+
this._callback = callback;
|
|
21
|
+
this._callbackData = data;
|
|
22
|
+
if (this._modal != undefined) {
|
|
23
|
+
this._modal.open();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
close() {
|
|
27
|
+
if (this._modal != undefined) {
|
|
28
|
+
this._modal.close();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
onSecondaryClick() {
|
|
32
|
+
if (this._callback) {
|
|
33
|
+
this._callback('secondary', this._callbackData);
|
|
34
|
+
}
|
|
35
|
+
this.close();
|
|
36
|
+
}
|
|
37
|
+
onPrimaryClick() {
|
|
38
|
+
if (this._callback) {
|
|
39
|
+
this._callback('primary', this._callbackData);
|
|
40
|
+
}
|
|
41
|
+
this.close();
|
|
42
|
+
}
|
|
43
|
+
onCloseClick() {
|
|
44
|
+
if (this._callback) {
|
|
45
|
+
this._callback('close', this._callbackData);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
SdsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
+
SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", closeText: "closeText", size: "size", primaryButtonText: "primaryButtonText", secondaryButtonText: "secondaryButtonText", primaryButtonClass: "primaryButtonClass", secondaryButtonClass: "secondaryButtonClass", showHeader: "showHeader", showCloseButton: "showCloseButton", showSecondaryButton: "showSecondaryButton" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, static: true }], ngImport: i0, template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\n (closeClick)=\"onCloseClick()\"\n>\n <div>\n <ng-content></ng-content>\n </div>\n\n <ng-container #footer ngProjectAs='footer'>\n <button\n *ngIf=\"showSecondaryButton\"\n class=\"btn\"\n [class]=\"secondaryButtonClass\"\n (click)=\"onSecondaryClick()\"\n >{{secondaryButtonText}}</button>\n <button\n class=\"btn\"\n [class]=\"primaryButtonClass\"\n (click)=\"onPrimaryClick()\"\n >{{primaryButtonText}}</button>\n </ng-container>\n</sds-modal>", styles: [""], components: [{ type: i1.SdsModalComponent, selector: "sds-modal", inputs: ["modalTitle", "showHeader", "showFooter", "closeText", "size", "modalDialogId", "showCloseButton"], outputs: ["modalOpen", "modalClose", "closeClick"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, decorators: [{
|
|
52
|
+
type: Component,
|
|
53
|
+
args: [{ selector: 'sds-dialog', template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\n (closeClick)=\"onCloseClick()\"\n>\n <div>\n <ng-content></ng-content>\n </div>\n\n <ng-container #footer ngProjectAs='footer'>\n <button\n *ngIf=\"showSecondaryButton\"\n class=\"btn\"\n [class]=\"secondaryButtonClass\"\n (click)=\"onSecondaryClick()\"\n >{{secondaryButtonText}}</button>\n <button\n class=\"btn\"\n [class]=\"primaryButtonClass\"\n (click)=\"onPrimaryClick()\"\n >{{primaryButtonText}}</button>\n </ng-container>\n</sds-modal>", styles: [""] }]
|
|
54
|
+
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], closeText: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], size: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], primaryButtonText: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], secondaryButtonText: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], primaryButtonClass: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], secondaryButtonClass: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], showHeader: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], showCloseButton: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], showSecondaryButton: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], _modal: [{
|
|
75
|
+
type: ViewChild,
|
|
76
|
+
args: ['modal', { static: true }]
|
|
77
|
+
}] } });
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL21vZGFsL2RpYWxvZy9kaWFsb2cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvbW9kYWwvZGlhbG9nL2RpYWxvZy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFnQixLQUFLLEVBQTRDLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7OztBQVVwSCxNQUFNLE9BQU8sa0JBQWtCO0lBb0IzQjtRQW5CZ0IsVUFBSyxHQUFXLEVBQUUsQ0FBQztRQUNuQixjQUFTLEdBQVksT0FBTyxDQUFDO1FBQzdCLFNBQ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ICAgICAgIGNsYXNzPVwiYnRuXCJcbiAgICAgICAgICAgIFtjbGFzc109XCJwcmltYXJ5QnV0dG9uQ2xhc3NcIlxuICAgICAgICAgICAgKGNsaWNrKT1cIm9uUHJpbWFyeUNsaWNrKClcIlxuICAgICAgICA+e3twcmltYXJ5QnV0dG9uVGV4dH19PC9idXR0b24+XG4gICAgPC9uZy1jb250YWluZXI+XG48L3Nkcy1tb2RhbD4iXX0=
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { Component, Input, Output, ViewChild, EventEmitter, } from '@angular/core';
|
|
1
|
+
import { Component, Input, Output, ViewChild, EventEmitter, ContentChild, } from '@angular/core';
|
|
2
2
|
import { faXmark } from '@fortawesome/pro-regular-svg-icons';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@fortawesome/angular-fontawesome";
|
|
5
5
|
import * as i2 from "@angular/common";
|
|
6
6
|
export class SdsModalComponent {
|
|
7
7
|
constructor() {
|
|
8
|
+
this.headerContent = { nativeElement: undefined };
|
|
8
9
|
this.showHeader = true;
|
|
9
10
|
this.showFooter = true;
|
|
10
11
|
this.size = 'md';
|
|
12
|
+
this.showCloseButton = true;
|
|
11
13
|
this.modalOpen = new EventEmitter();
|
|
12
14
|
this.modalClose = new EventEmitter();
|
|
15
|
+
this.closeClick = new EventEmitter();
|
|
13
16
|
this.closeIcon = faXmark;
|
|
14
17
|
}
|
|
15
18
|
ngOnInit() { }
|
|
@@ -25,15 +28,19 @@ export class SdsModalComponent {
|
|
|
25
28
|
this.modalClose.emit();
|
|
26
29
|
}
|
|
27
30
|
}
|
|
31
|
+
onCloseButtonClick() {
|
|
32
|
+
this.closeClick.emit();
|
|
33
|
+
this.close();
|
|
34
|
+
}
|
|
28
35
|
}
|
|
29
36
|
SdsModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
SdsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsModalComponent, selector: "sds-modal", inputs: { modalTitle: "modalTitle", showHeader: "showHeader", showFooter: "showFooter", closeText: "closeText", size: "size", modalDialogId: "modalDialogId" }, outputs: { modalOpen: "modalOpen", modalClose: "modalClose" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <ng-content select
|
|
37
|
+
SdsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsModalComponent, selector: "sds-modal", inputs: { modalTitle: "modalTitle", showHeader: "showHeader", showFooter: "showFooter", closeText: "closeText", size: "size", modalDialogId: "modalDialogId", showCloseButton: "showCloseButton" }, outputs: { modalOpen: "modalOpen", modalClose: "modalClose", closeClick: "closeClick" }, queries: [{ propertyName: "headerContent", first: true, predicate: ["header"], descendants: true }], viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\n <ng-content select='header'></ng-content>\n </div> \n\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n *ngIf=\"showCloseButton\"\n type=\"button\" \n class=\"close\" \n [title]=\"closeText ? closeText : ''\"\n (click)=\"onCloseButtonClick()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"footer\"></ng-content>\n </div> \n </div>\n </div>\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
31
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, decorators: [{
|
|
32
39
|
type: Component,
|
|
33
|
-
args: [{ selector: 'sds-modal', template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <ng-content select
|
|
34
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
35
|
-
type:
|
|
36
|
-
args: ['
|
|
40
|
+
args: [{ selector: 'sds-modal', template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\n <ng-content select='header'></ng-content>\n </div> \n\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n *ngIf=\"showCloseButton\"\n type=\"button\" \n class=\"close\" \n [title]=\"closeText ? closeText : ''\"\n (click)=\"onCloseButtonClick()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"footer\"></ng-content>\n </div> \n </div>\n </div>\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}\n"] }]
|
|
41
|
+
}], ctorParameters: function () { return []; }, propDecorators: { headerContent: [{
|
|
42
|
+
type: ContentChild,
|
|
43
|
+
args: ['header']
|
|
37
44
|
}], modalTitle: [{
|
|
38
45
|
type: Input
|
|
39
46
|
}], showHeader: [{
|
|
@@ -46,9 +53,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
46
53
|
type: Input
|
|
47
54
|
}], modalDialogId: [{
|
|
48
55
|
type: Input
|
|
56
|
+
}], showCloseButton: [{
|
|
57
|
+
type: Input
|
|
49
58
|
}], modalOpen: [{
|
|
50
59
|
type: Output
|
|
51
60
|
}], modalClose: [{
|
|
52
61
|
type: Output
|
|
62
|
+
}], closeClick: [{
|
|
63
|
+
type: Output
|
|
64
|
+
}], _modal: [{
|
|
65
|
+
type: ViewChild,
|
|
66
|
+
args: ['modal', { static: false }]
|
|
53
67
|
}] } });
|
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4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iAgICAgICAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiIFxuICAgICAgICAgICAgICAgICAgICBjbGFzcz1cImNsb3NlXCIgXG4gICAgICAgICAgICAgICAgICAgIFt0aXRsZV09XCJjbG9zZVRleHQgPyBjbG9zZVRleHQgOiAnJ1wiXG4gICAgICAgICAgICAgICAgICAgIChjbGljayk9XCJvbkNsb3NlQnV0dG9uQ2xpY2soKVwiPlxuICAgICAgICAgICAgICAgICAgICA8ZmEtaWNvbiBbaWNvbl09XCJjbG9zZUljb25cIj48L2ZhLWljb24+XG4gICAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cIm1vZGFsLWJvZHlcIj5cbiAgICAgICAgICAgICAgICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG4gICAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgICAgPGRpdiAqbmdJZj1cInNob3dGb290ZXJcIiBjbGFzcz1cIm1vZGFsLWZvb3RlclwiPlxuICAgICAgICAgICAgICAgIDxuZy1jb250ZW50IHNlbGVjdD1cImZvb3RlclwiPjwvbmctY29udGVudD5cbiAgICAgICAgICAgIDwvZGl2PiAgICAgICAgICAgIFxuICAgICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbjwvZGl2PiJdfQ==
|
|
@@ -2,13 +2,19 @@ import { NgModule } from '@angular/core';
|
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { SdsModalComponent } from './modal.component';
|
|
4
4
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
5
|
+
import { SdsDialogComponent } from './dialog/dialog.component';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
const components = [
|
|
7
|
+
const components = [
|
|
8
|
+
SdsModalComponent,
|
|
9
|
+
SdsDialogComponent
|
|
10
|
+
];
|
|
7
11
|
export class SdsModalModule {
|
|
8
12
|
}
|
|
9
13
|
SdsModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
10
|
-
SdsModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, declarations: [SdsModalComponent
|
|
11
|
-
|
|
14
|
+
SdsModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, declarations: [SdsModalComponent,
|
|
15
|
+
SdsDialogComponent], imports: [CommonModule,
|
|
16
|
+
FontAwesomeModule], exports: [SdsModalComponent,
|
|
17
|
+
SdsDialogComponent] });
|
|
12
18
|
SdsModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, imports: [[
|
|
13
19
|
CommonModule,
|
|
14
20
|
FontAwesomeModule
|
|
@@ -28,4 +34,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
28
34
|
]
|
|
29
35
|
}]
|
|
30
36
|
}] });
|
|
31
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvbW9kYWwvbW9kYWwubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxp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vZy5jb21wb25lbnQnO1xuXG5cbmNvbnN0IGNvbXBvbmVudHMgPSBbXG4gICAgU2RzTW9kYWxDb21wb25lbnQsXG4gICAgU2RzRGlhbG9nQ29tcG9uZW50XG5dO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtcbiAgICAuLi5jb21wb25lbnRzXG4gIF0sXG4gIGltcG9ydHM6IFtcbiAgICBDb21tb25Nb2R1bGUsXG4gICAgRm9udEF3ZXNvbWVNb2R1bGVcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIC4uLmNvbXBvbmVudHNcbl1cbn0pXG5leHBvcnQgY2xhc3MgU2RzTW9kYWxNb2R1bGUgeyB9XG4iXX0=
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './modal.module';
|
|
2
2
|
export * from './modal.component';
|
|
3
|
-
|
|
3
|
+
export * from './dialog/dialog.component';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL21vZGFsL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsMkJBQTJCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL21vZGFsLm1vZHVsZSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbW9kYWwuY29tcG9uZW50JztcclxuZXhwb3J0ICogZnJvbSAnLi9kaWFsb2cvZGlhbG9nLmNvbXBvbmVudCc7XHJcbiJdfQ==
|
|
@@ -23,10 +23,10 @@ export class SdsPaneComponent {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
SdsPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
-
SdsPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPaneComponent, selector: "sds-pane", inputs: { pages: "pages", contentWidthRem: "contentWidthRem" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
26
|
+
SdsPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPaneComponent, selector: "sds-pane", inputs: { pages: "pages", contentWidthRem: "contentWidthRem" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn btn-stealth ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
27
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPaneComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
|
-
args: [{ selector: 'sds-pane', template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""] }]
|
|
29
|
+
args: [{ selector: 'sds-pane', template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn btn-stealth ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""] }]
|
|
30
30
|
}], ctorParameters: function () { return []; }, propDecorators: { pages: [{
|
|
31
31
|
type: Input
|
|
32
32
|
}], contentWidthRem: [{
|
|
@@ -34,4 +34,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
34
34
|
}], pageChange: [{
|
|
35
35
|
type: Output
|
|
36
36
|
}] } });
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFuZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2RzLWNvbXBvbmVudHMvc3JjL2xpYi9wYW5lL3BhbmUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvcGFuZS9wYW5lLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHL0UsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLG9DQUFvQyxDQUFDOzs7O0FBTzdELE1BQU0sT0FBTyxnQkFBZ0I7SUFZekI7UUFUUyxvQkFBZSxHQUFXLEVBQUUsQ0FBQztRQUU1QixlQUFVLEdBQUcsSUFBSSxZQUFZLEVBQUUsQ0FBQztRQUduQyxxQkFBZ0IsR0FBWSxLQUFLLENBQUM7UUFFbEMsY0FBUyxHQUFHLE9BQU8sQ0FBQztJQUVa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gICAgICA8dWw+XG4gICAgICAgICAgICA8bGkgXG4gICAgICAgICAgICAgICAgKm5nRm9yPVwibGV0IHBhZ2Ugb2YgcGFnZXNcIlxuICAgICAgICAgICAgICAgIFtjbGFzcy5hY3RpdmVdID0gXCJzZWxlY3RlZFBhZ2UgPT09IHBhZ2VcIlxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8ZGl2IFxuICAgICAgICAgICAgICAgICAgICBjbGFzcz1cImljb24tY29udGFpbmVyXCJcbiAgICAgICAgICAgICAgICAgICAgW3RpdGxlXT1cInBhZ2UudGl0bGVcIlxuICAgICAgICAgICAgICAgICAgICAoY2xpY2spID0gXCJzaG93Q29udGVudChwYWdlKVwiXG4gICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgPGZhLWljb24gW2ljb25dPVwicGFnZS5pY29uXCIgW2ZpeGVkV2lkdGhdPVwidHJ1ZVwiPiA8L2ZhLWljb24+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2xpPlxuICAgICAgICA8L3VsPlxuICAgIDwvZGl2PlxuXG4gICAgPGRpdiBcbiAgICAgICAgKm5nSWY9XCJzZWxlY3RlZFBhZ2VcIiBcbiAgICAgICAgY2xhc3M9XCJwYW5lLWNvbnRlbnRcIlxuICAgICAgICBbc3R5bGUud2lkdGgucmVtXT1cImNvbnRlbnRXaWR0aFJlbVwiXG4gICAgICAgID5cbiAgICAgICAgXG4gICAgICAgIDxkaXYgY2xhc3M9XCJwYWdlLWhlYWRlclwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRpdGxlXCI+XG4gICAgICAgICAgICAgICAge3tzZWxlY3RlZFBhZ2U/LnRpdGxlfX1cbiAgICAgICAgICAgIDwvZGl2PlxuXG4gICAgICAgICAgICA8YnV0dG9uIFxuICAgICAgICAgICAgICAgIGNsYXNzPVwiYnRuIGJ0bi1zdGVhbHRoIG1sLWF1dG9cIlxuICAgICAgICAgICAgICAgIChjbGljayk9XCJoaWRlQ29udGVudCgpXCJcbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPGZhLWljb24gW2ljb25dPVwiY2xvc2VJY29uXCIgW2ZpeGVkV2lkdGhdPVwidHJ1ZVwiPiA8L2ZhLWljb24+ICAgICAgICBcbiAgICAgICAgICAgIDwvYnV0dG9uPiAgXG5cbiAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgPGRpdiBjbGFzcz1cInBhZ2UtY29udGFpbmVyXCI+XG4gICAgICAgICAgICA8bmctY29udGFpbmVyXG4gICAgICAgICAgICAgICAgW25nVGVtcGxhdGVPdXRsZXRdPVwic2VsZWN0ZWRQYWdlICYmIHNlbGVjdGVkUGFnZS5jb250ZW50VGVtcGxhdGUgPyBzZWxlY3RlZFBhZ2UuY29udGVudFRlbXBsYXRlIDogbnVsbFwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj4gICAgICAgICAgICBcbiAgICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG48L2Rpdj4iXX0=
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component,
|
|
2
|
+
import { EventEmitter, Component, ContentChild, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { faXmark } from '@fortawesome/pro-regular-svg-icons';
|
|
@@ -8,11 +8,14 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
|
8
8
|
|
|
9
9
|
class SdsModalComponent {
|
|
10
10
|
constructor() {
|
|
11
|
+
this.headerContent = { nativeElement: undefined };
|
|
11
12
|
this.showHeader = true;
|
|
12
13
|
this.showFooter = true;
|
|
13
14
|
this.size = 'md';
|
|
15
|
+
this.showCloseButton = true;
|
|
14
16
|
this.modalOpen = new EventEmitter();
|
|
15
17
|
this.modalClose = new EventEmitter();
|
|
18
|
+
this.closeClick = new EventEmitter();
|
|
16
19
|
this.closeIcon = faXmark;
|
|
17
20
|
}
|
|
18
21
|
ngOnInit() { }
|
|
@@ -28,15 +31,19 @@ class SdsModalComponent {
|
|
|
28
31
|
this.modalClose.emit();
|
|
29
32
|
}
|
|
30
33
|
}
|
|
34
|
+
onCloseButtonClick() {
|
|
35
|
+
this.closeClick.emit();
|
|
36
|
+
this.close();
|
|
37
|
+
}
|
|
31
38
|
}
|
|
32
39
|
SdsModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
-
SdsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsModalComponent, selector: "sds-modal", inputs: { modalTitle: "modalTitle", showHeader: "showHeader", showFooter: "showFooter", closeText: "closeText", size: "size", modalDialogId: "modalDialogId" }, outputs: { modalOpen: "modalOpen", modalClose: "modalClose" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <ng-content select
|
|
40
|
+
SdsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsModalComponent, selector: "sds-modal", inputs: { modalTitle: "modalTitle", showHeader: "showHeader", showFooter: "showFooter", closeText: "closeText", size: "size", modalDialogId: "modalDialogId", showCloseButton: "showCloseButton" }, outputs: { modalOpen: "modalOpen", modalClose: "modalClose", closeClick: "closeClick" }, queries: [{ propertyName: "headerContent", first: true, predicate: ["header"], descendants: true }], viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\n <ng-content select='header'></ng-content>\n </div> \n\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n *ngIf=\"showCloseButton\"\n type=\"button\" \n class=\"close\" \n [title]=\"closeText ? closeText : ''\"\n (click)=\"onCloseButtonClick()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"footer\"></ng-content>\n </div> \n </div>\n </div>\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
34
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, decorators: [{
|
|
35
42
|
type: Component,
|
|
36
|
-
args: [{ selector: 'sds-modal', template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <ng-content select
|
|
37
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
38
|
-
type:
|
|
39
|
-
args: ['
|
|
43
|
+
args: [{ selector: 'sds-modal', template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\n <ng-content select='header'></ng-content>\n </div> \n\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n *ngIf=\"showCloseButton\"\n type=\"button\" \n class=\"close\" \n [title]=\"closeText ? closeText : ''\"\n (click)=\"onCloseButtonClick()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"footer\"></ng-content>\n </div> \n </div>\n </div>\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}\n"] }]
|
|
44
|
+
}], ctorParameters: function () { return []; }, propDecorators: { headerContent: [{
|
|
45
|
+
type: ContentChild,
|
|
46
|
+
args: ['header']
|
|
40
47
|
}], modalTitle: [{
|
|
41
48
|
type: Input
|
|
42
49
|
}], showHeader: [{
|
|
@@ -49,18 +56,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
49
56
|
type: Input
|
|
50
57
|
}], modalDialogId: [{
|
|
51
58
|
type: Input
|
|
59
|
+
}], showCloseButton: [{
|
|
60
|
+
type: Input
|
|
52
61
|
}], modalOpen: [{
|
|
53
62
|
type: Output
|
|
54
63
|
}], modalClose: [{
|
|
55
64
|
type: Output
|
|
65
|
+
}], closeClick: [{
|
|
66
|
+
type: Output
|
|
67
|
+
}], _modal: [{
|
|
68
|
+
type: ViewChild,
|
|
69
|
+
args: ['modal', { static: false }]
|
|
70
|
+
}] } });
|
|
71
|
+
|
|
72
|
+
class SdsDialogComponent {
|
|
73
|
+
constructor() {
|
|
74
|
+
this.title = '';
|
|
75
|
+
this.closeText = 'close';
|
|
76
|
+
this.size = 'md';
|
|
77
|
+
this.primaryButtonText = 'Ok';
|
|
78
|
+
this.secondaryButtonText = 'Cancel';
|
|
79
|
+
this.primaryButtonClass = 'btn-primary';
|
|
80
|
+
this.secondaryButtonClass = 'btn-secondary';
|
|
81
|
+
this.showHeader = true;
|
|
82
|
+
this.showCloseButton = true;
|
|
83
|
+
this.showSecondaryButton = true;
|
|
84
|
+
}
|
|
85
|
+
ngOnInit() { }
|
|
86
|
+
open(callback, data) {
|
|
87
|
+
this._callback = callback;
|
|
88
|
+
this._callbackData = data;
|
|
89
|
+
if (this._modal != undefined) {
|
|
90
|
+
this._modal.open();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
close() {
|
|
94
|
+
if (this._modal != undefined) {
|
|
95
|
+
this._modal.close();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
onSecondaryClick() {
|
|
99
|
+
if (this._callback) {
|
|
100
|
+
this._callback('secondary', this._callbackData);
|
|
101
|
+
}
|
|
102
|
+
this.close();
|
|
103
|
+
}
|
|
104
|
+
onPrimaryClick() {
|
|
105
|
+
if (this._callback) {
|
|
106
|
+
this._callback('primary', this._callbackData);
|
|
107
|
+
}
|
|
108
|
+
this.close();
|
|
109
|
+
}
|
|
110
|
+
onCloseClick() {
|
|
111
|
+
if (this._callback) {
|
|
112
|
+
this._callback('close', this._callbackData);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
SdsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", closeText: "closeText", size: "size", primaryButtonText: "primaryButtonText", secondaryButtonText: "secondaryButtonText", primaryButtonClass: "primaryButtonClass", secondaryButtonClass: "secondaryButtonClass", showHeader: "showHeader", showCloseButton: "showCloseButton", showSecondaryButton: "showSecondaryButton" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, static: true }], ngImport: i0, template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\n (closeClick)=\"onCloseClick()\"\n>\n <div>\n <ng-content></ng-content>\n </div>\n\n <ng-container #footer ngProjectAs='footer'>\n <button\n *ngIf=\"showSecondaryButton\"\n class=\"btn\"\n [class]=\"secondaryButtonClass\"\n (click)=\"onSecondaryClick()\"\n >{{secondaryButtonText}}</button>\n <button\n class=\"btn\"\n [class]=\"primaryButtonClass\"\n (click)=\"onPrimaryClick()\"\n >{{primaryButtonText}}</button>\n </ng-container>\n</sds-modal>", styles: [""], components: [{ type: SdsModalComponent, selector: "sds-modal", inputs: ["modalTitle", "showHeader", "showFooter", "closeText", "size", "modalDialogId", "showCloseButton"], outputs: ["modalOpen", "modalClose", "closeClick"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, decorators: [{
|
|
119
|
+
type: Component,
|
|
120
|
+
args: [{ selector: 'sds-dialog', template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\n (closeClick)=\"onCloseClick()\"\n>\n <div>\n <ng-content></ng-content>\n </div>\n\n <ng-container #footer ngProjectAs='footer'>\n <button\n *ngIf=\"showSecondaryButton\"\n class=\"btn\"\n [class]=\"secondaryButtonClass\"\n (click)=\"onSecondaryClick()\"\n >{{secondaryButtonText}}</button>\n <button\n class=\"btn\"\n [class]=\"primaryButtonClass\"\n (click)=\"onPrimaryClick()\"\n >{{primaryButtonText}}</button>\n </ng-container>\n</sds-modal>", styles: [""] }]
|
|
121
|
+
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], closeText: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], size: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], primaryButtonText: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], secondaryButtonText: [{
|
|
130
|
+
type: Input
|
|
131
|
+
}], primaryButtonClass: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], secondaryButtonClass: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], showHeader: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], showCloseButton: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}], showSecondaryButton: [{
|
|
140
|
+
type: Input
|
|
141
|
+
}], _modal: [{
|
|
142
|
+
type: ViewChild,
|
|
143
|
+
args: ['modal', { static: true }]
|
|
56
144
|
}] } });
|
|
57
145
|
|
|
58
|
-
const components = [
|
|
146
|
+
const components = [
|
|
147
|
+
SdsModalComponent,
|
|
148
|
+
SdsDialogComponent
|
|
149
|
+
];
|
|
59
150
|
class SdsModalModule {
|
|
60
151
|
}
|
|
61
152
|
SdsModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
62
|
-
SdsModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, declarations: [SdsModalComponent
|
|
63
|
-
|
|
153
|
+
SdsModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, declarations: [SdsModalComponent,
|
|
154
|
+
SdsDialogComponent], imports: [CommonModule,
|
|
155
|
+
FontAwesomeModule], exports: [SdsModalComponent,
|
|
156
|
+
SdsDialogComponent] });
|
|
64
157
|
SdsModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, imports: [[
|
|
65
158
|
CommonModule,
|
|
66
159
|
FontAwesomeModule
|
|
@@ -85,5 +178,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
85
178
|
* Generated bundle index. Do not edit.
|
|
86
179
|
*/
|
|
87
180
|
|
|
88
|
-
export { SdsModalComponent, SdsModalModule };
|
|
181
|
+
export { SdsDialogComponent, SdsModalComponent, SdsModalModule };
|
|
89
182
|
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-modal.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-modal.mjs","sources":["../../../projects/ngx-sds-components/src/lib/modal/modal.component.ts","../../../projects/ngx-sds-components/src/lib/modal/modal.component.html","../../../projects/ngx-sds-components/src/lib/modal/modal.module.ts","../../../projects/ngx-sds-components/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n EventEmitter,\r\n} from '@angular/core';\r\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n})\r\nexport class SdsModalComponent implements OnInit {\r\n @ViewChild('modal', { static: false }) private _modal:\r\n | ElementRef\r\n | undefined;\r\n\r\n @Input() public modalTitle?: string;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showFooter: boolean = true;\r\n @Input() public closeText?: string;\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n @Input() public modalDialogId?: string;\r\n\r\n @Output() public modalOpen: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public modalClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public closeIcon = faXmark;\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'block';\r\n this.modalOpen.emit();\r\n }\r\n }\r\n\r\n public close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'none';\r\n this.modalClose.emit();\r\n }\r\n }\r\n}\r\n","<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <ng-content select=\"[header]\"></ng-content>\n </div> \n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n type=\"button\" \n class=\"close\" \n [title]=\"closeText\"\n (click)=\"close()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div> \n </div>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsModalComponent } from './modal.component';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\n\nconst components = [SdsModalComponent];\n@NgModule({\n declarations: [\n ...components\n ],\n imports: [\n CommonModule,\n FontAwesomeModule\n ],\n exports: [\n ...components\n]\n})\nexport class SdsModalModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAiBa,iBAAiB,CAAA;AAiB1B,IAAA,WAAA,GAAA;AAXgB,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAC3B,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAE3B,QAAA,IAAI,CAAA,IAAA,GAA8B,IAAI,CAAC;AAGtC,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAEpE,QAAA,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;KAEX;AAEhB,IAAA,QAAQ,MAAW;IAEZ,IAAI,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AAClD,YAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;AACzB,SAAA;KACJ;IAEM,KAAK,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;AACjD,YAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;AAC1B,SAAA;KACJ;;8GAjCQ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,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AAS,EAAA,CAAA;sBAAxB,KAAK;gBACU,IAAI,EAAA,CAAA;sBAAnB,KAAK;gBACU,aAAa,EAAA,CAAA;sBAA5B,KAAK;gBAEW,SAAS,EAAA,CAAA;sBAAzB,MAAM;gBACU,UAAU,EAAA,CAAA;sBAA1B,MAAM;;;AExBX,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAa1B,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;4GAAd,cAAc,EAAA,YAAA,EAAA,CAbP,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAMjC,YAAY;QACZ,iBAAiB,aAPD,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAaxB,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EARhB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,iBAAiB;SAClB,CAAA,EAAA,CAAA,CAAA;2FAKU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AAChB,qBAAA;iBACA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-modal.mjs","sources":["../../../projects/ngx-sds-components/src/lib/modal/modal.component.ts","../../../projects/ngx-sds-components/src/lib/modal/modal.component.html","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.ts","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.html","../../../projects/ngx-sds-components/src/lib/modal/modal.module.ts","../../../projects/ngx-sds-components/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n EventEmitter,\r\n ContentChild,\r\n} from '@angular/core';\r\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n})\r\nexport class SdsModalComponent implements OnInit {\r\n @ContentChild('header') headerContent: ElementRef = { nativeElement: undefined };\r\n\r\n @Input() public modalTitle?: string;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showFooter: boolean = true;\r\n @Input() public closeText?: string;\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n @Input() public modalDialogId?: string;\r\n @Input() public showCloseButton: boolean = true;\r\n\r\n @Output() public modalOpen: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public modalClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n @Output() public closeClick: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public closeIcon = faXmark;\r\n\r\n @ViewChild('modal', { static: false }) private _modal: ElementRef | undefined;\r\n \r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'block';\r\n this.modalOpen.emit();\r\n }\r\n }\r\n\r\n public close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'none';\r\n this.modalClose.emit();\r\n }\r\n }\r\n\r\n public onCloseButtonClick(){\r\n this.closeClick.emit();\r\n this.close();\r\n }\r\n}\r\n","<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\n <ng-content select='header'></ng-content>\n </div> \n\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n *ngIf=\"showCloseButton\"\n type=\"button\" \n class=\"close\" \n [title]=\"closeText ? closeText : ''\"\n (click)=\"onCloseButtonClick()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"footer\"></ng-content>\n </div> \n </div>\n </div>\n</div>","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\nimport { SdsModalComponent } from '../modal.component';\n\ntype modalButton = 'primary' | 'secondary' | 'close';\n\n@Component({\n selector: 'sds-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n})\nexport class SdsDialogComponent implements OnInit {\n @Input() public title: string = '';\n @Input() public closeText?: string = 'close';\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n \n @Input() public primaryButtonText: string = 'Ok';\n @Input() public secondaryButtonText: string = 'Cancel';\n\n @Input() public primaryButtonClass: string = 'btn-primary';\n @Input() public secondaryButtonClass: string = 'btn-secondary'; \n \n @Input() public showHeader: boolean = true;\n @Input() public showCloseButton: boolean = true;\n @Input() public showSecondaryButton: boolean = true;\n\n @ViewChild('modal', { static: true }) private _modal: SdsModalComponent | undefined;\n\n private _callback?: Function;\n private _callbackData: any;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public open(callback?: (button: modalButton, data: any) => void, data?: any): void{\n this._callback = callback;\n this._callbackData = data;\n\n if (this._modal != undefined) {\n this._modal.open();\n }\n }\n\n private close(): void {\n if (this._modal != undefined) {\n this._modal.close();\n } \n }\n\n public onSecondaryClick(): void {\n if (this._callback) {\n this._callback('secondary', this._callbackData);\n }\n this.close();\n }\n\n public onPrimaryClick(): void {\n if (this._callback) {\n this._callback('primary', this._callbackData);\n }\n this.close();\n } \n\n public onCloseClick(): void {\n if (this._callback) {\n this._callback('close', this._callbackData);\n }\n }\n\n}\n\n\n\n","<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\n (closeClick)=\"onCloseClick()\"\n>\n <div>\n <ng-content></ng-content>\n </div>\n\n <ng-container #footer ngProjectAs='footer'>\n <button\n *ngIf=\"showSecondaryButton\"\n class=\"btn\"\n [class]=\"secondaryButtonClass\"\n (click)=\"onSecondaryClick()\"\n >{{secondaryButtonText}}</button>\n <button\n class=\"btn\"\n [class]=\"primaryButtonClass\"\n (click)=\"onPrimaryClick()\"\n >{{primaryButtonText}}</button>\n </ng-container>\n</sds-modal>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsModalComponent } from './modal.component';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { SdsDialogComponent } from './dialog/dialog.component';\n\n\nconst components = [\n SdsModalComponent,\n SdsDialogComponent\n];\n\n@NgModule({\n declarations: [\n ...components\n ],\n imports: [\n CommonModule,\n FontAwesomeModule\n ],\n exports: [\n ...components\n]\n})\nexport class SdsModalModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SdsModalComponent"],"mappings":";;;;;;;;MAiBa,iBAAiB,CAAA;AAqB1B,IAAA,WAAA,GAAA;QApBwB,IAAA,CAAA,aAAa,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAGjE,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAC3B,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAE3B,QAAA,IAAI,CAAA,IAAA,GAA8B,IAAI,CAAC;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,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AAChB,qBAAA;iBACA,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -26,10 +26,10 @@ class SdsPaneComponent {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
SdsPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
-
SdsPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPaneComponent, selector: "sds-pane", inputs: { pages: "pages", contentWidthRem: "contentWidthRem" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
29
|
+
SdsPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPaneComponent, selector: "sds-pane", inputs: { pages: "pages", contentWidthRem: "contentWidthRem" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn btn-stealth ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
30
30
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPaneComponent, decorators: [{
|
|
31
31
|
type: Component,
|
|
32
|
-
args: [{ selector: 'sds-pane', template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""] }]
|
|
32
|
+
args: [{ selector: 'sds-pane', template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn btn-stealth ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""] }]
|
|
33
33
|
}], ctorParameters: function () { return []; }, propDecorators: { pages: [{
|
|
34
34
|
type: Input
|
|
35
35
|
}], contentWidthRem: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-pane.mjs","sources":["../../../projects/ngx-sds-components/src/lib/pane/pane.component.ts","../../../projects/ngx-sds-components/src/lib/pane/pane.component.html","../../../projects/ngx-sds-components/src/lib/pane/pane.module.ts","../../../projects/ngx-sds-components/src/lib/pane/spicainternational-ngx-sds-components-src-lib-pane.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { PanePage } from './pane.model';\n\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\n\n@Component({\n selector: 'sds-pane',\n templateUrl: './pane.component.html',\n styleUrls: ['./pane.component.scss'],\n})\nexport class SdsPaneComponent implements OnInit {\n\n @Input() pages?: PanePage[];\n @Input() contentWidthRem: number = 20;\n\n @Output() pageChange = new EventEmitter();\n\n public selectedPage?: PanePage;\n public isContentVisible: boolean = false;\n\n public closeIcon = faXmark;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public showContent(page: PanePage): void{\n this.selectedPage = page;\n this.isContentVisible = true;\n this.pageChange.emit(this.selectedPage);\n }\n\n public hideContent(): void{\n this.isContentVisible = false;\n this.selectedPage = undefined;\n this.pageChange.emit(this.selectedPage);\n }\n\n\n}\n","<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsPaneComponent } from '../pane/pane.component';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\n@NgModule({\n declarations: [\n SdsPaneComponent\n ],\n imports: [\n CommonModule, \n FontAwesomeModule\n ],\n exports: [\n SdsPaneComponent\n ],\n})\nexport class SdsPaneModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAUa,gBAAgB,CAAA;AAYzB,IAAA,WAAA,GAAA;AATS,QAAA,IAAe,CAAA,eAAA,GAAW,EAAE,CAAC;AAE5B,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAE,CAAC;AAGnC,QAAA,IAAgB,CAAA,gBAAA,GAAY,KAAK,CAAC;AAElC,QAAA,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;KAEX;AAEhB,IAAA,QAAQ,MAAW;AAEZ,IAAA,WAAW,CAAC,IAAc,EAAA;AAC7B,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;AACzB,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC3C;IAEM,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;AAC9B,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC9B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC3C;;6GA1BQ,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,uJCV7B,
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-pane.mjs","sources":["../../../projects/ngx-sds-components/src/lib/pane/pane.component.ts","../../../projects/ngx-sds-components/src/lib/pane/pane.component.html","../../../projects/ngx-sds-components/src/lib/pane/pane.module.ts","../../../projects/ngx-sds-components/src/lib/pane/spicainternational-ngx-sds-components-src-lib-pane.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { PanePage } from './pane.model';\n\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\n\n@Component({\n selector: 'sds-pane',\n templateUrl: './pane.component.html',\n styleUrls: ['./pane.component.scss'],\n})\nexport class SdsPaneComponent implements OnInit {\n\n @Input() pages?: PanePage[];\n @Input() contentWidthRem: number = 20;\n\n @Output() pageChange = new EventEmitter();\n\n public selectedPage?: PanePage;\n public isContentVisible: boolean = false;\n\n public closeIcon = faXmark;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public showContent(page: PanePage): void{\n this.selectedPage = page;\n this.isContentVisible = true;\n this.pageChange.emit(this.selectedPage);\n }\n\n public hideContent(): void{\n this.isContentVisible = false;\n this.selectedPage = undefined;\n this.pageChange.emit(this.selectedPage);\n }\n\n\n}\n","<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn btn-stealth ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsPaneComponent } from '../pane/pane.component';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\n@NgModule({\n declarations: [\n SdsPaneComponent\n ],\n imports: [\n CommonModule, \n FontAwesomeModule\n ],\n exports: [\n SdsPaneComponent\n ],\n})\nexport class SdsPaneModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAUa,gBAAgB,CAAA;AAYzB,IAAA,WAAA,GAAA;AATS,QAAA,IAAe,CAAA,eAAA,GAAW,EAAE,CAAC;AAE5B,QAAA,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AA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,gBAAgB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,iBAAiB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,gBAAgB;AACnB,qBAAA;iBACJ,CAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component,
|
|
2
|
+
import { EventEmitter, Component, ContentChild, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { faXmark } from '@fortawesome/pro-regular-svg-icons';
|
|
@@ -8,11 +8,14 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
|
8
8
|
|
|
9
9
|
class SdsModalComponent {
|
|
10
10
|
constructor() {
|
|
11
|
+
this.headerContent = { nativeElement: undefined };
|
|
11
12
|
this.showHeader = true;
|
|
12
13
|
this.showFooter = true;
|
|
13
14
|
this.size = 'md';
|
|
15
|
+
this.showCloseButton = true;
|
|
14
16
|
this.modalOpen = new EventEmitter();
|
|
15
17
|
this.modalClose = new EventEmitter();
|
|
18
|
+
this.closeClick = new EventEmitter();
|
|
16
19
|
this.closeIcon = faXmark;
|
|
17
20
|
}
|
|
18
21
|
ngOnInit() { }
|
|
@@ -28,15 +31,19 @@ class SdsModalComponent {
|
|
|
28
31
|
this.modalClose.emit();
|
|
29
32
|
}
|
|
30
33
|
}
|
|
34
|
+
onCloseButtonClick() {
|
|
35
|
+
this.closeClick.emit();
|
|
36
|
+
this.close();
|
|
37
|
+
}
|
|
31
38
|
}
|
|
32
39
|
SdsModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
-
SdsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsModalComponent, selector: "sds-modal", inputs: { modalTitle: "modalTitle", showHeader: "showHeader", showFooter: "showFooter", closeText: "closeText", size: "size", modalDialogId: "modalDialogId" }, outputs: { modalOpen: "modalOpen", modalClose: "modalClose" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <ng-content select
|
|
40
|
+
SdsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsModalComponent, selector: "sds-modal", inputs: { modalTitle: "modalTitle", showHeader: "showHeader", showFooter: "showFooter", closeText: "closeText", size: "size", modalDialogId: "modalDialogId", showCloseButton: "showCloseButton" }, outputs: { modalOpen: "modalOpen", modalClose: "modalClose", closeClick: "closeClick" }, queries: [{ propertyName: "headerContent", first: true, predicate: ["header"], descendants: true }], viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true }], ngImport: i0, template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\n <ng-content select='header'></ng-content>\n </div> \n\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n *ngIf=\"showCloseButton\"\n type=\"button\" \n class=\"close\" \n [title]=\"closeText ? closeText : ''\"\n (click)=\"onCloseButtonClick()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"footer\"></ng-content>\n </div> \n </div>\n </div>\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
34
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, decorators: [{
|
|
35
42
|
type: Component,
|
|
36
|
-
args: [{ selector: 'sds-modal', template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <ng-content select
|
|
37
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
38
|
-
type:
|
|
39
|
-
args: ['
|
|
43
|
+
args: [{ selector: 'sds-modal', template: "<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\n <ng-content select='header'></ng-content>\n </div> \n\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n *ngIf=\"showCloseButton\"\n type=\"button\" \n class=\"close\" \n [title]=\"closeText ? closeText : ''\"\n (click)=\"onCloseButtonClick()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"footer\"></ng-content>\n </div> \n </div>\n </div>\n</div>", styles: [".modal{background:rgba(0,0,0,.5)}.modal.in{opacity:1}.modal.in .modal-dialog{transform:translate(0)}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}\n"] }]
|
|
44
|
+
}], ctorParameters: function () { return []; }, propDecorators: { headerContent: [{
|
|
45
|
+
type: ContentChild,
|
|
46
|
+
args: ['header']
|
|
40
47
|
}], modalTitle: [{
|
|
41
48
|
type: Input
|
|
42
49
|
}], showHeader: [{
|
|
@@ -49,18 +56,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
49
56
|
type: Input
|
|
50
57
|
}], modalDialogId: [{
|
|
51
58
|
type: Input
|
|
59
|
+
}], showCloseButton: [{
|
|
60
|
+
type: Input
|
|
52
61
|
}], modalOpen: [{
|
|
53
62
|
type: Output
|
|
54
63
|
}], modalClose: [{
|
|
55
64
|
type: Output
|
|
65
|
+
}], closeClick: [{
|
|
66
|
+
type: Output
|
|
67
|
+
}], _modal: [{
|
|
68
|
+
type: ViewChild,
|
|
69
|
+
args: ['modal', { static: false }]
|
|
70
|
+
}] } });
|
|
71
|
+
|
|
72
|
+
class SdsDialogComponent {
|
|
73
|
+
constructor() {
|
|
74
|
+
this.title = '';
|
|
75
|
+
this.closeText = 'close';
|
|
76
|
+
this.size = 'md';
|
|
77
|
+
this.primaryButtonText = 'Ok';
|
|
78
|
+
this.secondaryButtonText = 'Cancel';
|
|
79
|
+
this.primaryButtonClass = 'btn-primary';
|
|
80
|
+
this.secondaryButtonClass = 'btn-secondary';
|
|
81
|
+
this.showHeader = true;
|
|
82
|
+
this.showCloseButton = true;
|
|
83
|
+
this.showSecondaryButton = true;
|
|
84
|
+
}
|
|
85
|
+
ngOnInit() { }
|
|
86
|
+
open(callback, data) {
|
|
87
|
+
this._callback = callback;
|
|
88
|
+
this._callbackData = data;
|
|
89
|
+
if (this._modal != undefined) {
|
|
90
|
+
this._modal.open();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
close() {
|
|
94
|
+
if (this._modal != undefined) {
|
|
95
|
+
this._modal.close();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
onSecondaryClick() {
|
|
99
|
+
if (this._callback) {
|
|
100
|
+
this._callback('secondary', this._callbackData);
|
|
101
|
+
}
|
|
102
|
+
this.close();
|
|
103
|
+
}
|
|
104
|
+
onPrimaryClick() {
|
|
105
|
+
if (this._callback) {
|
|
106
|
+
this._callback('primary', this._callbackData);
|
|
107
|
+
}
|
|
108
|
+
this.close();
|
|
109
|
+
}
|
|
110
|
+
onCloseClick() {
|
|
111
|
+
if (this._callback) {
|
|
112
|
+
this._callback('close', this._callbackData);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
SdsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", closeText: "closeText", size: "size", primaryButtonText: "primaryButtonText", secondaryButtonText: "secondaryButtonText", primaryButtonClass: "primaryButtonClass", secondaryButtonClass: "secondaryButtonClass", showHeader: "showHeader", showCloseButton: "showCloseButton", showSecondaryButton: "showSecondaryButton" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, static: true }], ngImport: i0, template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\n (closeClick)=\"onCloseClick()\"\n>\n <div>\n <ng-content></ng-content>\n </div>\n\n <ng-container #footer ngProjectAs='footer'>\n <button\n *ngIf=\"showSecondaryButton\"\n class=\"btn\"\n [class]=\"secondaryButtonClass\"\n (click)=\"onSecondaryClick()\"\n >{{secondaryButtonText}}</button>\n <button\n class=\"btn\"\n [class]=\"primaryButtonClass\"\n (click)=\"onPrimaryClick()\"\n >{{primaryButtonText}}</button>\n </ng-container>\n</sds-modal>", styles: [""], components: [{ type: SdsModalComponent, selector: "sds-modal", inputs: ["modalTitle", "showHeader", "showFooter", "closeText", "size", "modalDialogId", "showCloseButton"], outputs: ["modalOpen", "modalClose", "closeClick"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, decorators: [{
|
|
119
|
+
type: Component,
|
|
120
|
+
args: [{ selector: 'sds-dialog', template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\n (closeClick)=\"onCloseClick()\"\n>\n <div>\n <ng-content></ng-content>\n </div>\n\n <ng-container #footer ngProjectAs='footer'>\n <button\n *ngIf=\"showSecondaryButton\"\n class=\"btn\"\n [class]=\"secondaryButtonClass\"\n (click)=\"onSecondaryClick()\"\n >{{secondaryButtonText}}</button>\n <button\n class=\"btn\"\n [class]=\"primaryButtonClass\"\n (click)=\"onPrimaryClick()\"\n >{{primaryButtonText}}</button>\n </ng-container>\n</sds-modal>", styles: [""] }]
|
|
121
|
+
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], closeText: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], size: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], primaryButtonText: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], secondaryButtonText: [{
|
|
130
|
+
type: Input
|
|
131
|
+
}], primaryButtonClass: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], secondaryButtonClass: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], showHeader: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], showCloseButton: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}], showSecondaryButton: [{
|
|
140
|
+
type: Input
|
|
141
|
+
}], _modal: [{
|
|
142
|
+
type: ViewChild,
|
|
143
|
+
args: ['modal', { static: true }]
|
|
56
144
|
}] } });
|
|
57
145
|
|
|
58
|
-
const components = [
|
|
146
|
+
const components = [
|
|
147
|
+
SdsModalComponent,
|
|
148
|
+
SdsDialogComponent
|
|
149
|
+
];
|
|
59
150
|
class SdsModalModule {
|
|
60
151
|
}
|
|
61
152
|
SdsModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
62
|
-
SdsModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, declarations: [SdsModalComponent
|
|
63
|
-
|
|
153
|
+
SdsModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, declarations: [SdsModalComponent,
|
|
154
|
+
SdsDialogComponent], imports: [CommonModule,
|
|
155
|
+
FontAwesomeModule], exports: [SdsModalComponent,
|
|
156
|
+
SdsDialogComponent] });
|
|
64
157
|
SdsModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalModule, imports: [[
|
|
65
158
|
CommonModule,
|
|
66
159
|
FontAwesomeModule
|
|
@@ -85,5 +178,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
85
178
|
* Generated bundle index. Do not edit.
|
|
86
179
|
*/
|
|
87
180
|
|
|
88
|
-
export { SdsModalComponent, SdsModalModule };
|
|
181
|
+
export { SdsDialogComponent, SdsModalComponent, SdsModalModule };
|
|
89
182
|
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-modal.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-modal.mjs","sources":["../../../projects/ngx-sds-components/src/lib/modal/modal.component.ts","../../../projects/ngx-sds-components/src/lib/modal/modal.component.html","../../../projects/ngx-sds-components/src/lib/modal/modal.module.ts","../../../projects/ngx-sds-components/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n EventEmitter,\r\n} from '@angular/core';\r\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n})\r\nexport class SdsModalComponent implements OnInit {\r\n @ViewChild('modal', { static: false }) private _modal:\r\n | ElementRef\r\n | undefined;\r\n\r\n @Input() public modalTitle?: string;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showFooter: boolean = true;\r\n @Input() public closeText?: string;\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n @Input() public modalDialogId?: string;\r\n\r\n @Output() public modalOpen: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public modalClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public closeIcon = faXmark;\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'block';\r\n this.modalOpen.emit();\r\n }\r\n }\r\n\r\n public close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'none';\r\n this.modalClose.emit();\r\n }\r\n }\r\n}\r\n","<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <ng-content select=\"[header]\"></ng-content>\n </div> \n\n <div *ngIf=\"showHeader\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n type=\"button\" \n class=\"close\" \n [title]=\"closeText\"\n (click)=\"close()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n <ng-content select=\"[header]\"></ng-content>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"[footer]\"></ng-content>\n </div> \n </div>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsModalComponent } from './modal.component';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\n\nconst components = [SdsModalComponent];\n@NgModule({\n declarations: [\n ...components\n ],\n imports: [\n CommonModule,\n FontAwesomeModule\n ],\n exports: [\n ...components\n]\n})\nexport class SdsModalModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAiBa,iBAAiB,CAAA;AAiB1B,IAAA,WAAA,GAAA;QAXgB,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAC3B,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;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B,aAPD,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAaxB,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EARhB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,iBAAiB;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACA,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-modal.mjs","sources":["../../../projects/ngx-sds-components/src/lib/modal/modal.component.ts","../../../projects/ngx-sds-components/src/lib/modal/modal.component.html","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.ts","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.html","../../../projects/ngx-sds-components/src/lib/modal/modal.module.ts","../../../projects/ngx-sds-components/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n EventEmitter,\r\n ContentChild,\r\n} from '@angular/core';\r\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n})\r\nexport class SdsModalComponent implements OnInit {\r\n @ContentChild('header') headerContent: ElementRef = { nativeElement: undefined };\r\n\r\n @Input() public modalTitle?: string;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showFooter: boolean = true;\r\n @Input() public closeText?: string;\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n @Input() public modalDialogId?: string;\r\n @Input() public showCloseButton: boolean = true;\r\n\r\n @Output() public modalOpen: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public modalClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n @Output() public closeClick: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public closeIcon = faXmark;\r\n\r\n @ViewChild('modal', { static: false }) private _modal: ElementRef | undefined;\r\n \r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'block';\r\n this.modalOpen.emit();\r\n }\r\n }\r\n\r\n public close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'none';\r\n this.modalClose.emit();\r\n }\r\n }\r\n\r\n public onCloseButtonClick(){\r\n this.closeClick.emit();\r\n this.close();\r\n }\r\n}\r\n","<div #modal class=\"modal\">\n <div\n class=\"modal-dialog modal-dialog-centered modal-dialog-scrollable\"\n [id]=\"modalDialogId\"\n [ngClass]=\"'modal-' + size\"\n role=\"document\"\n >\n <div class=\"modal-content\">\n\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\n <ng-content select='header'></ng-content>\n </div> \n\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\n <button \n *ngIf=\"showCloseButton\"\n type=\"button\" \n class=\"close\" \n [title]=\"closeText ? closeText : ''\"\n (click)=\"onCloseButtonClick()\">\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\n <ng-content select=\"footer\"></ng-content>\n </div> \n </div>\n </div>\n</div>","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\nimport { SdsModalComponent } from '../modal.component';\n\ntype modalButton = 'primary' | 'secondary' | 'close';\n\n@Component({\n selector: 'sds-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n})\nexport class SdsDialogComponent implements OnInit {\n @Input() public title: string = '';\n @Input() public closeText?: string = 'close';\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n \n @Input() public primaryButtonText: string = 'Ok';\n @Input() public secondaryButtonText: string = 'Cancel';\n\n @Input() public primaryButtonClass: string = 'btn-primary';\n @Input() public secondaryButtonClass: string = 'btn-secondary'; \n \n @Input() public showHeader: boolean = true;\n @Input() public showCloseButton: boolean = true;\n @Input() public showSecondaryButton: boolean = true;\n\n @ViewChild('modal', { static: true }) private _modal: SdsModalComponent | undefined;\n\n private _callback?: Function;\n private _callbackData: any;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public open(callback?: (button: modalButton, data: any) => void, data?: any): void{\n this._callback = callback;\n this._callbackData = data;\n\n if (this._modal != undefined) {\n this._modal.open();\n }\n }\n\n private close(): void {\n if (this._modal != undefined) {\n this._modal.close();\n } \n }\n\n public onSecondaryClick(): void {\n if (this._callback) {\n this._callback('secondary', this._callbackData);\n }\n this.close();\n }\n\n public onPrimaryClick(): void {\n if (this._callback) {\n this._callback('primary', this._callbackData);\n }\n this.close();\n } \n\n public onCloseClick(): void {\n if (this._callback) {\n this._callback('close', this._callbackData);\n }\n }\n\n}\n\n\n\n","<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\n (closeClick)=\"onCloseClick()\"\n>\n <div>\n <ng-content></ng-content>\n </div>\n\n <ng-container #footer ngProjectAs='footer'>\n <button\n *ngIf=\"showSecondaryButton\"\n class=\"btn\"\n [class]=\"secondaryButtonClass\"\n (click)=\"onSecondaryClick()\"\n >{{secondaryButtonText}}</button>\n <button\n class=\"btn\"\n [class]=\"primaryButtonClass\"\n (click)=\"onPrimaryClick()\"\n >{{primaryButtonText}}</button>\n </ng-container>\n</sds-modal>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsModalComponent } from './modal.component';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { SdsDialogComponent } from './dialog/dialog.component';\n\n\nconst components = [\n SdsModalComponent,\n SdsDialogComponent\n];\n\n@NgModule({\n declarations: [\n ...components\n ],\n imports: [\n CommonModule,\n FontAwesomeModule\n ],\n exports: [\n ...components\n]\n})\nexport class SdsModalModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SdsModalComponent"],"mappings":";;;;;;;;MAiBa,iBAAiB,CAAA;AAqB1B,IAAA,WAAA,GAAA;AApBwB,QAAA,IAAA,CAAA,aAAa,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;QAGjE,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAC3B,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAE3B,IAAI,CAAA,IAAA,GAA8B,IAAI,CAAC;QAEvC,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAE/B,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAE1D,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAQ,CAAC;QAEpE,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;KAKX;AAEhB,IAAA,QAAQ,MAAW;IAEZ,IAAI,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAA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B,kBAAkB;CACrB,CAAC;MAcW,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBAhBvB,iBAAiB;AACjB,QAAA,kBAAkB,aAQlB,YAAY;AACZ,QAAA,iBAAiB,aAVjB,iBAAiB;QACjB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAeT,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EARhB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,iBAAiB;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACA,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -26,10 +26,10 @@ class SdsPaneComponent {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
SdsPaneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
-
SdsPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPaneComponent, selector: "sds-pane", inputs: { pages: "pages", contentWidthRem: "contentWidthRem" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
29
|
+
SdsPaneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPaneComponent, selector: "sds-pane", inputs: { pages: "pages", contentWidthRem: "contentWidthRem" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn btn-stealth ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
30
30
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPaneComponent, decorators: [{
|
|
31
31
|
type: Component,
|
|
32
|
-
args: [{ selector: 'sds-pane', template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""] }]
|
|
32
|
+
args: [{ selector: 'sds-pane', template: "<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn btn-stealth ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>", styles: [""] }]
|
|
33
33
|
}], ctorParameters: function () { return []; }, propDecorators: { pages: [{
|
|
34
34
|
type: Input
|
|
35
35
|
}], contentWidthRem: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-pane.mjs","sources":["../../../projects/ngx-sds-components/src/lib/pane/pane.component.ts","../../../projects/ngx-sds-components/src/lib/pane/pane.component.html","../../../projects/ngx-sds-components/src/lib/pane/pane.module.ts","../../../projects/ngx-sds-components/src/lib/pane/spicainternational-ngx-sds-components-src-lib-pane.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { PanePage } from './pane.model';\n\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\n\n@Component({\n selector: 'sds-pane',\n templateUrl: './pane.component.html',\n styleUrls: ['./pane.component.scss'],\n})\nexport class SdsPaneComponent implements OnInit {\n\n @Input() pages?: PanePage[];\n @Input() contentWidthRem: number = 20;\n\n @Output() pageChange = new EventEmitter();\n\n public selectedPage?: PanePage;\n public isContentVisible: boolean = false;\n\n public closeIcon = faXmark;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public showContent(page: PanePage): void{\n this.selectedPage = page;\n this.isContentVisible = true;\n this.pageChange.emit(this.selectedPage);\n }\n\n public hideContent(): void{\n this.isContentVisible = false;\n this.selectedPage = undefined;\n this.pageChange.emit(this.selectedPage);\n }\n\n\n}\n","<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsPaneComponent } from '../pane/pane.component';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\n@NgModule({\n declarations: [\n SdsPaneComponent\n ],\n imports: [\n CommonModule, \n FontAwesomeModule\n ],\n exports: [\n SdsPaneComponent\n ],\n})\nexport class SdsPaneModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAUa,gBAAgB,CAAA;AAYzB,IAAA,WAAA,GAAA;QATS,IAAe,CAAA,eAAA,GAAW,EAAE,CAAC;AAE5B,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAE,CAAC;QAGnC,IAAgB,CAAA,gBAAA,GAAY,KAAK,CAAC;QAElC,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;KAEX;AAEhB,IAAA,QAAQ,MAAW;AAEZ,IAAA,WAAW,CAAC,IAAc,EAAA;AAC7B,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;AACzB,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC3C;IAEM,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;AAC9B,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC9B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC3C;;6GA1BQ,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,uJCV7B,
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-pane.mjs","sources":["../../../projects/ngx-sds-components/src/lib/pane/pane.component.ts","../../../projects/ngx-sds-components/src/lib/pane/pane.component.html","../../../projects/ngx-sds-components/src/lib/pane/pane.module.ts","../../../projects/ngx-sds-components/src/lib/pane/spicainternational-ngx-sds-components-src-lib-pane.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { PanePage } from './pane.model';\n\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\n\n@Component({\n selector: 'sds-pane',\n templateUrl: './pane.component.html',\n styleUrls: ['./pane.component.scss'],\n})\nexport class SdsPaneComponent implements OnInit {\n\n @Input() pages?: PanePage[];\n @Input() contentWidthRem: number = 20;\n\n @Output() pageChange = new EventEmitter();\n\n public selectedPage?: PanePage;\n public isContentVisible: boolean = false;\n\n public closeIcon = faXmark;\n\n constructor() {}\n\n ngOnInit(): void {}\n\n public showContent(page: PanePage): void{\n this.selectedPage = page;\n this.isContentVisible = true;\n this.pageChange.emit(this.selectedPage);\n }\n\n public hideContent(): void{\n this.isContentVisible = false;\n this.selectedPage = undefined;\n this.pageChange.emit(this.selectedPage);\n }\n\n\n}\n","<div class=\"pane border-left\">\n <div class=\"pane-header\">\n <ul>\n <li \n *ngFor=\"let page of pages\"\n [class.active] = \"selectedPage === page\"\n >\n <div \n class=\"icon-container\"\n [title]=\"page.title\"\n (click) = \"showContent(page)\"\n >\n <fa-icon [icon]=\"page.icon\" [fixedWidth]=\"true\"> </fa-icon>\n </div>\n </li>\n </ul>\n </div>\n\n <div \n *ngIf=\"selectedPage\" \n class=\"pane-content\"\n [style.width.rem]=\"contentWidthRem\"\n >\n \n <div class=\"page-header\">\n <div class=\"title\">\n {{selectedPage?.title}}\n </div>\n\n <button \n class=\"btn btn-stealth ml-auto\"\n (click)=\"hideContent()\"\n >\n <fa-icon [icon]=\"closeIcon\" [fixedWidth]=\"true\"> </fa-icon> \n </button> \n\n </div>\n\n <div class=\"page-container\">\n <ng-container\n [ngTemplateOutlet]=\"selectedPage && selectedPage.contentTemplate ? selectedPage.contentTemplate : null\"\n >\n </ng-container> \n </div>\n </div>\n</div>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SdsPaneComponent } from '../pane/pane.component';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\n\n@NgModule({\n declarations: [\n SdsPaneComponent\n ],\n imports: [\n CommonModule, \n FontAwesomeModule\n ],\n exports: [\n SdsPaneComponent\n ],\n})\nexport class SdsPaneModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAUa,gBAAgB,CAAA;AAYzB,IAAA,WAAA,GAAA;QATS,IAAe,CAAA,eAAA,GAAW,EAAE,CAAC;AAE5B,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,EAAE,CAAC;QAGnC,IAAgB,CAAA,gBAAA,GAAY,KAAK,CAAC;QAElC,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;KAEX;AAEhB,IAAA,QAAQ,MAAW;AAEZ,IAAA,WAAW,CAAC,IAAc,EAAA;AAC7B,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;AACzB,QAAA,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC3C;IAEM,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;AAC9B,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC9B,IAAI,CAAC,UAAU,CA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AAA,EAAA,CAAA;0EAMX,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBAEI,UAAU,EAAA,CAAA;sBAAnB,MAAM;;;MEEE,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;2GAAb,aAAa,EAAA,YAAA,EAAA,CAVlB,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAGhB,YAAY;AACZ,QAAA,iBAAiB,aAGjB,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGX,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EARb,OAAA,EAAA,CAAA;YACL,YAAY;YACZ,iBAAiB;AACpB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKQ,aAAa,EAAA,UAAA,EAAA,CAAA;kBAZzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,gBAAgB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,iBAAiB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,gBAAgB;AACnB,qBAAA;AACJ,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spicainternational/ngx-sds-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "Spica design system angular components.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=10.0.0",
|
|
7
7
|
"@angular/core": ">=10.0.0",
|
|
8
|
-
"@spicainternational/sds-core": "^3.4.5",
|
|
9
8
|
"@fortawesome/angular-fontawesome": "^0.10.2",
|
|
10
9
|
"@fortawesome/fontawesome-svg-core": "^6.1.0",
|
|
11
10
|
"@fortawesome/pro-light-svg-icons": "^6.1.0",
|
|
12
11
|
"@fortawesome/pro-regular-svg-icons": "^6.1.0",
|
|
13
12
|
"@fortawesome/pro-solid-svg-icons": "^6.1.0",
|
|
13
|
+
"@spicainternational/sds-bootstrap": ">=2.1.2",
|
|
14
|
+
"@spicainternational/sds-core": ">=3.4.9",
|
|
14
15
|
"devextreme": ">=19.0.0",
|
|
15
16
|
"devextreme-angular": ">=19.0.0",
|
|
16
17
|
"ngx-bootstrap": ">=7.0.0"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
declare type modalButton = 'primary' | 'secondary' | 'close';
|
|
4
|
+
export declare class SdsDialogComponent implements OnInit {
|
|
5
|
+
title: string;
|
|
6
|
+
closeText?: string;
|
|
7
|
+
size: 'sm' | 'md' | 'lg' | 'xl';
|
|
8
|
+
primaryButtonText: string;
|
|
9
|
+
secondaryButtonText: string;
|
|
10
|
+
primaryButtonClass: string;
|
|
11
|
+
secondaryButtonClass: string;
|
|
12
|
+
showHeader: boolean;
|
|
13
|
+
showCloseButton: boolean;
|
|
14
|
+
showSecondaryButton: boolean;
|
|
15
|
+
private _modal;
|
|
16
|
+
private _callback?;
|
|
17
|
+
private _callbackData;
|
|
18
|
+
constructor();
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
open(callback?: (button: modalButton, data: any) => void, data?: any): void;
|
|
21
|
+
private close;
|
|
22
|
+
onSecondaryClick(): void;
|
|
23
|
+
onPrimaryClick(): void;
|
|
24
|
+
onCloseClick(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDialogComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDialogComponent, "sds-dialog", never, { "title": "title"; "closeText": "closeText"; "size": "size"; "primaryButtonText": "primaryButtonText"; "secondaryButtonText": "secondaryButtonText"; "primaryButtonClass": "primaryButtonClass"; "secondaryButtonClass": "secondaryButtonClass"; "showHeader": "showHeader"; "showCloseButton": "showCloseButton"; "showSecondaryButton": "showSecondaryButton"; }, {}, never, ["*"]>;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { OnInit, EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnInit, EventEmitter } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SdsModalComponent implements OnInit {
|
|
4
|
-
|
|
4
|
+
headerContent: ElementRef;
|
|
5
5
|
modalTitle?: string;
|
|
6
6
|
showHeader: boolean;
|
|
7
7
|
showFooter: boolean;
|
|
8
8
|
closeText?: string;
|
|
9
9
|
size: 'sm' | 'md' | 'lg' | 'xl';
|
|
10
10
|
modalDialogId?: string;
|
|
11
|
+
showCloseButton: boolean;
|
|
11
12
|
modalOpen: EventEmitter<void>;
|
|
12
13
|
modalClose: EventEmitter<void>;
|
|
14
|
+
closeClick: EventEmitter<void>;
|
|
13
15
|
closeIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
16
|
+
private _modal;
|
|
14
17
|
constructor();
|
|
15
18
|
ngOnInit(): void;
|
|
16
19
|
open(): void;
|
|
17
20
|
close(): void;
|
|
21
|
+
onCloseButtonClick(): void;
|
|
18
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsModalComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsModalComponent, "sds-modal", never, { "modalTitle": "modalTitle"; "showHeader": "showHeader"; "showFooter": "showFooter"; "closeText": "closeText"; "size": "size"; "modalDialogId": "modalDialogId"; }, { "modalOpen": "modalOpen"; "modalClose": "modalClose"; },
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsModalComponent, "sds-modal", never, { "modalTitle": "modalTitle"; "showHeader": "showHeader"; "showFooter": "showFooter"; "closeText": "closeText"; "size": "size"; "modalDialogId": "modalDialogId"; "showCloseButton": "showCloseButton"; }, { "modalOpen": "modalOpen"; "modalClose": "modalClose"; "closeClick": "closeClick"; }, ["headerContent"], ["header", "*", "footer"]>;
|
|
20
24
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./modal.component";
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "@
|
|
3
|
+
import * as i2 from "./dialog/dialog.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@fortawesome/angular-fontawesome";
|
|
5
6
|
export declare class SdsModalModule {
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsModalModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsModalModule, [typeof i1.SdsModalComponent], [typeof
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsModalModule, [typeof i1.SdsModalComponent, typeof i2.SdsDialogComponent], [typeof i3.CommonModule, typeof i4.FontAwesomeModule], [typeof i1.SdsModalComponent, typeof i2.SdsDialogComponent]>;
|
|
8
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<SdsModalModule>;
|
|
9
10
|
}
|