@spicainternational/ngx-sds-components 2.4.2 → 2.5.1
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 +85 -0
- package/esm2020/src/lib/modal/modal.component.mjs +14 -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 +27 -0
- package/src/lib/modal/modal.component.d.ts +5 -3
- package/src/lib/modal/modal.module.d.ts +4 -3
- package/src/lib/modal/public-api.d.ts +1 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output, 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.size = 'md';
|
|
9
|
+
this.isOpen = false;
|
|
10
|
+
this.primaryButtonText = 'Primary button';
|
|
11
|
+
this.secondaryButtonText = 'Secondary button';
|
|
12
|
+
this.primaryButtonClass = 'btn-primary';
|
|
13
|
+
this.primaryClick = new EventEmitter();
|
|
14
|
+
this.secondaryButtonClass = 'btn-secondary';
|
|
15
|
+
this.secondaryClick = new EventEmitter();
|
|
16
|
+
this.showSecondaryButton = true;
|
|
17
|
+
this.showCloseButton = true;
|
|
18
|
+
this.showHeader = true;
|
|
19
|
+
}
|
|
20
|
+
ngOnChanges(changes) {
|
|
21
|
+
if (changes['isOpen']) {
|
|
22
|
+
if (this.isOpen) {
|
|
23
|
+
this.open();
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
this.close();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
ngOnInit() { }
|
|
31
|
+
open() {
|
|
32
|
+
if (this._modal != undefined) {
|
|
33
|
+
this._modal.open();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
close() {
|
|
37
|
+
if (this._modal != undefined) {
|
|
38
|
+
this._modal.close();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
onSecondaryClick() {
|
|
42
|
+
this.secondaryClick.emit();
|
|
43
|
+
this.close();
|
|
44
|
+
}
|
|
45
|
+
onPrimaryClick() {
|
|
46
|
+
this.primaryClick.emit();
|
|
47
|
+
this.close();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
SdsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
51
|
+
SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", closeText: "closeText", size: "size", isOpen: "isOpen", primaryButtonText: "primaryButtonText", secondaryButtonText: "secondaryButtonText", primaryButtonClass: "primaryButtonClass", secondaryButtonClass: "secondaryButtonClass", showSecondaryButton: "showSecondaryButton", showCloseButton: "showCloseButton", showHeader: "showHeader" }, outputs: { primaryClick: "primaryClick", secondaryClick: "secondaryClick" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\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"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
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>\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: [""] }]
|
|
55
|
+
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], closeText: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], size: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], isOpen: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], primaryButtonText: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], secondaryButtonText: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], primaryButtonClass: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], primaryClick: [{
|
|
70
|
+
type: Output
|
|
71
|
+
}], secondaryButtonClass: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], secondaryClick: [{
|
|
74
|
+
type: Output
|
|
75
|
+
}], showSecondaryButton: [{
|
|
76
|
+
type: Input
|
|
77
|
+
}], showCloseButton: [{
|
|
78
|
+
type: Input
|
|
79
|
+
}], showHeader: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], _modal: [{
|
|
82
|
+
type: ViewChild,
|
|
83
|
+
args: ['modal', { static: true }]
|
|
84
|
+
}] } });
|
|
85
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlhbG9nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL21vZGFsL2RpYWxvZy9kaWFsb2cuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvbW9kYWwvZGlhbG9nL2RpYWxvZy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQXFCLE1BQU0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j5cbiAgICAgICAgPGJ1dHRvblxuICAgICAgICAgICAgY2xhc3M9XCJidG5cIlxuICAgICAgICAgICAgW2NsYXNzXT1cInByaW1hcnlCdXR0b25DbGFzc1wiXG4gICAgICAgICAgICAoY2xpY2spPVwib25QcmltYXJ5Q2xpY2soKVwiXG4gICAgICAgID57e3ByaW1hcnlCdXR0b25UZXh0fX08L2J1dHRvbj5cbiAgICA8L25nLWNvbnRhaW5lcj5cbjwvc2RzLW1vZGFsPiJdfQ==
|
|
@@ -1,13 +1,15 @@
|
|
|
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();
|
|
13
15
|
this.closeIcon = faXmark;
|
|
@@ -27,13 +29,13 @@ export class SdsModalComponent {
|
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
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
|
|
32
|
+
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" }, 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\"\n (click)=\"close()\">\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
33
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, decorators: [{
|
|
32
34
|
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: ['
|
|
35
|
+
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\"\n (click)=\"close()\">\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"] }]
|
|
36
|
+
}], ctorParameters: function () { return []; }, propDecorators: { headerContent: [{
|
|
37
|
+
type: ContentChild,
|
|
38
|
+
args: ['header']
|
|
37
39
|
}], modalTitle: [{
|
|
38
40
|
type: Input
|
|
39
41
|
}], showHeader: [{
|
|
@@ -46,9 +48,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
46
48
|
type: Input
|
|
47
49
|
}], modalDialogId: [{
|
|
48
50
|
type: Input
|
|
51
|
+
}], showCloseButton: [{
|
|
52
|
+
type: Input
|
|
49
53
|
}], modalOpen: [{
|
|
50
54
|
type: Output
|
|
51
55
|
}], modalClose: [{
|
|
52
56
|
type: Output
|
|
57
|
+
}], _modal: [{
|
|
58
|
+
type: ViewChild,
|
|
59
|
+
args: ['modal', { static: false }]
|
|
53
60
|
}] } });
|
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvbW9kYWwvbW9kYWwuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvbW9kYWwvbW9kYWwuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOlt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ICAgICAgICAgICAgICAgPG5nLWNvbnRlbnQgc2VsZWN0PSdoZWFkZXInPjwvbmctY29udGVudD5cbiAgICAgICAgICAgIDwvZGl2PiAgICAgICAgICAgICBcblxuICAgICAgICAgICAgPGRpdiAqbmdJZj1cInNob3dIZWFkZXIgJiYgIWhlYWRlckNvbnRlbnRcIiBjbGFzcz1cIm1vZGFsLWhlYWRlclwiPlxuICAgICAgICAgICAgICAgIDxoNSBjbGFzcz1cIm1vZGFsLXRpdGxlXCI+e3ttb2RhbFRpdGxlfX08L2g1PlxuICAgICAgICAgICAgICAgIDxidXR0b24gXG4gICAgICAgICAgICAgICAgICAgICpuZ0lmPVwic2hvd0Nsb3NlQnV0dG9uXCJcbiAgICAgICAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiIFxuICAgICAgICAgICAgICAgICAgICBjbGFzcz1cImNsb3NlXCIgXG4gICAgICAgICAgICAgICAgICAgIFt0aXRsZV09XCJjbG9zZVRleHRcIlxuICAgICAgICAgICAgICAgICAgICAoY2xpY2spPVwiY2xvc2UoKVwiPlxuICAgICAgICAgICAgICAgICAgICA8ZmEtaWNvbiBbaWNvbl09XCJjbG9zZUljb25cIj48L2ZhLWljb24+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,eyJ2ZXJzaW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5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuaW1wb3J0IHsgU2RzTW9kYWxDb21wb25lbnQgfSBmcm9tICcuL21vZGFsLmNvbXBvbmVudCc7XG5pbXBvcnQgeyBGb250QXdlc29tZU1vZHVsZSB9IGZyb20gJ0Bmb3J0YXdlc29tZS9hbmd1bGFyLWZvbnRhd2Vzb21lJztcbmltcG9ydCB7IFNkc0RpYWxvZ0NvbXBvbmVudCB9IGZyb20gJy4vZGlhbG9nL2RpYWxvZy5jb21wb25lbnQnO1xuXG5cbmNvbnN0IGNvbXBvbmVudHMgPSBbXG4gICAgU2RzTW9kYWxDb21wb25lbnQsXG4gICAgU2RzRGlhbG9nQ29tcG9uZW50XG5dO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtcbiAgICAuLi5jb21wb25lbnRzXG4gIF0sXG4gIGltcG9ydHM6IFtcbiAgICBDb21tb25Nb2R1bGUsXG4gICAgRm9udEF3ZXNvbWVNb2R1bGVcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIC4uLmNvbXBvbmVudHNcbl1cbn0pXG5leHBvcnQgY2xhc3MgU2RzTW9kYWxNb2R1bGUgeyB9XG4iXX0=
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFuZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2RzLWNvbXBvbmVudHMvc3JjL2xpYi9wYW5lL3BhbmUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvcGFuZS9wYW5lLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRS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ZSk7XG4gICAgfVxuXG4gICAgcHVibGljIGhpZGVDb250ZW50KCk6IHZvaWR7XG4gICAgICAgIHRoaXMuaXNDb250ZW50VmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICB0aGlzLnNlbGVjdGVkUGFnZSA9IHVuZGVmaW5lZDtcbiAgICAgICAgdGhpcy5wYWdlQ2hhbmdlLmVtaXQodGhpcy5zZWxlY3RlZFBhZ2UpO1xuICAgIH1cblxuXG59XG4iLCI8ZGl2IGNsYXNzPVwicGFuZSBib3JkZXItbGVmdFwiPlxuICAgIDxkaXYgY2xhc3M9XCJwYW5lLWhlYWRlclwiPlxuICAgICAgICA8dWw+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,9 +8,11 @@ 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();
|
|
16
18
|
this.closeIcon = faXmark;
|
|
@@ -30,13 +32,13 @@ class SdsModalComponent {
|
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
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
|
|
35
|
+
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" }, 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\"\n (click)=\"close()\">\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
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, decorators: [{
|
|
35
37
|
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: ['
|
|
38
|
+
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\"\n (click)=\"close()\">\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"] }]
|
|
39
|
+
}], ctorParameters: function () { return []; }, propDecorators: { headerContent: [{
|
|
40
|
+
type: ContentChild,
|
|
41
|
+
args: ['header']
|
|
40
42
|
}], modalTitle: [{
|
|
41
43
|
type: Input
|
|
42
44
|
}], showHeader: [{
|
|
@@ -49,18 +51,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
49
51
|
type: Input
|
|
50
52
|
}], modalDialogId: [{
|
|
51
53
|
type: Input
|
|
54
|
+
}], showCloseButton: [{
|
|
55
|
+
type: Input
|
|
52
56
|
}], modalOpen: [{
|
|
53
57
|
type: Output
|
|
54
58
|
}], modalClose: [{
|
|
55
59
|
type: Output
|
|
60
|
+
}], _modal: [{
|
|
61
|
+
type: ViewChild,
|
|
62
|
+
args: ['modal', { static: false }]
|
|
63
|
+
}] } });
|
|
64
|
+
|
|
65
|
+
class SdsDialogComponent {
|
|
66
|
+
constructor() {
|
|
67
|
+
this.title = '';
|
|
68
|
+
this.size = 'md';
|
|
69
|
+
this.isOpen = false;
|
|
70
|
+
this.primaryButtonText = 'Primary button';
|
|
71
|
+
this.secondaryButtonText = 'Secondary button';
|
|
72
|
+
this.primaryButtonClass = 'btn-primary';
|
|
73
|
+
this.primaryClick = new EventEmitter();
|
|
74
|
+
this.secondaryButtonClass = 'btn-secondary';
|
|
75
|
+
this.secondaryClick = new EventEmitter();
|
|
76
|
+
this.showSecondaryButton = true;
|
|
77
|
+
this.showCloseButton = true;
|
|
78
|
+
this.showHeader = true;
|
|
79
|
+
}
|
|
80
|
+
ngOnChanges(changes) {
|
|
81
|
+
if (changes['isOpen']) {
|
|
82
|
+
if (this.isOpen) {
|
|
83
|
+
this.open();
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.close();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
ngOnInit() { }
|
|
91
|
+
open() {
|
|
92
|
+
if (this._modal != undefined) {
|
|
93
|
+
this._modal.open();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
close() {
|
|
97
|
+
if (this._modal != undefined) {
|
|
98
|
+
this._modal.close();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
onSecondaryClick() {
|
|
102
|
+
this.secondaryClick.emit();
|
|
103
|
+
this.close();
|
|
104
|
+
}
|
|
105
|
+
onPrimaryClick() {
|
|
106
|
+
this.primaryClick.emit();
|
|
107
|
+
this.close();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
SdsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
+
SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", closeText: "closeText", size: "size", isOpen: "isOpen", primaryButtonText: "primaryButtonText", secondaryButtonText: "secondaryButtonText", primaryButtonClass: "primaryButtonClass", secondaryButtonClass: "secondaryButtonClass", showSecondaryButton: "showSecondaryButton", showCloseButton: "showCloseButton", showHeader: "showHeader" }, outputs: { primaryClick: "primaryClick", secondaryClick: "secondaryClick" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\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"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, decorators: [{
|
|
113
|
+
type: Component,
|
|
114
|
+
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>\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: [""] }]
|
|
115
|
+
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], closeText: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}], size: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}], isOpen: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], primaryButtonText: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], secondaryButtonText: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], primaryButtonClass: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], primaryClick: [{
|
|
130
|
+
type: Output
|
|
131
|
+
}], secondaryButtonClass: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], secondaryClick: [{
|
|
134
|
+
type: Output
|
|
135
|
+
}], showSecondaryButton: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], showCloseButton: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}], showHeader: [{
|
|
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,QA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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 public closeIcon = faXmark;\r\n\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","<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\"\n (click)=\"close()\">\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\n@Component({\n selector: 'sds-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n})\nexport class SdsDialogComponent implements OnInit, OnChanges {\n @Input() public title: string = '';\n @Input() public closeText?: string;\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n @Input() public isOpen: boolean = false;\n \n @Input() public primaryButtonText: string = 'Primary button';\n @Input() public secondaryButtonText: string = 'Secondary button';\n\n @Input() public primaryButtonClass: string = 'btn-primary';\n @Output() public primaryClick: EventEmitter<void> = new EventEmitter();\n\n @Input() public secondaryButtonClass: string = 'btn-secondary'; \n @Output() public secondaryClick: EventEmitter<void> = new EventEmitter();\n @Input() public showSecondaryButton: boolean = true;\n\n @Input() public showCloseButton: boolean = true;\n @Input() public showHeader: boolean = true;\n\n @ViewChild('modal', { static: true }) private _modal: SdsModalComponent | undefined;\n\n constructor() {}\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['isOpen']) {\n if (this.isOpen) {\n this.open();\n } else {\n this.close();\n }\n\n }\n\n }\n\n ngOnInit(): void {}\n\n\n public open(): void {\n if (this._modal != undefined) {\n this._modal.open();\n }\n }\n\n public close(): void {\n if (this._modal != undefined) {\n this._modal.close();\n } \n }\n\n public onSecondaryClick(): void {\n this.secondaryClick.emit();\n this.close();\n }\n\n public onPrimaryClick(): void {\n this.primaryClick.emit();\n this.close();\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>\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;AAoB1B,IAAA,WAAA,GAAA;QAnBwB,IAAA,CAAA,aAAa,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAGjE,QAAA,IAAU,CAAA,UAAA,GAA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;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,IAAA,CAAA,UAAU,GAAG,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N,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,9 +8,11 @@ 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();
|
|
16
18
|
this.closeIcon = faXmark;
|
|
@@ -30,13 +32,13 @@ class SdsModalComponent {
|
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
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
|
|
35
|
+
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" }, 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\"\n (click)=\"close()\">\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
36
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsModalComponent, decorators: [{
|
|
35
37
|
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: ['
|
|
38
|
+
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\"\n (click)=\"close()\">\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"] }]
|
|
39
|
+
}], ctorParameters: function () { return []; }, propDecorators: { headerContent: [{
|
|
40
|
+
type: ContentChild,
|
|
41
|
+
args: ['header']
|
|
40
42
|
}], modalTitle: [{
|
|
41
43
|
type: Input
|
|
42
44
|
}], showHeader: [{
|
|
@@ -49,18 +51,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
49
51
|
type: Input
|
|
50
52
|
}], modalDialogId: [{
|
|
51
53
|
type: Input
|
|
54
|
+
}], showCloseButton: [{
|
|
55
|
+
type: Input
|
|
52
56
|
}], modalOpen: [{
|
|
53
57
|
type: Output
|
|
54
58
|
}], modalClose: [{
|
|
55
59
|
type: Output
|
|
60
|
+
}], _modal: [{
|
|
61
|
+
type: ViewChild,
|
|
62
|
+
args: ['modal', { static: false }]
|
|
63
|
+
}] } });
|
|
64
|
+
|
|
65
|
+
class SdsDialogComponent {
|
|
66
|
+
constructor() {
|
|
67
|
+
this.title = '';
|
|
68
|
+
this.size = 'md';
|
|
69
|
+
this.isOpen = false;
|
|
70
|
+
this.primaryButtonText = 'Primary button';
|
|
71
|
+
this.secondaryButtonText = 'Secondary button';
|
|
72
|
+
this.primaryButtonClass = 'btn-primary';
|
|
73
|
+
this.primaryClick = new EventEmitter();
|
|
74
|
+
this.secondaryButtonClass = 'btn-secondary';
|
|
75
|
+
this.secondaryClick = new EventEmitter();
|
|
76
|
+
this.showSecondaryButton = true;
|
|
77
|
+
this.showCloseButton = true;
|
|
78
|
+
this.showHeader = true;
|
|
79
|
+
}
|
|
80
|
+
ngOnChanges(changes) {
|
|
81
|
+
if (changes['isOpen']) {
|
|
82
|
+
if (this.isOpen) {
|
|
83
|
+
this.open();
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.close();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
ngOnInit() { }
|
|
91
|
+
open() {
|
|
92
|
+
if (this._modal != undefined) {
|
|
93
|
+
this._modal.open();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
close() {
|
|
97
|
+
if (this._modal != undefined) {
|
|
98
|
+
this._modal.close();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
onSecondaryClick() {
|
|
102
|
+
this.secondaryClick.emit();
|
|
103
|
+
this.close();
|
|
104
|
+
}
|
|
105
|
+
onPrimaryClick() {
|
|
106
|
+
this.primaryClick.emit();
|
|
107
|
+
this.close();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
SdsDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
111
|
+
SdsDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsDialogComponent, selector: "sds-dialog", inputs: { title: "title", closeText: "closeText", size: "size", isOpen: "isOpen", primaryButtonText: "primaryButtonText", secondaryButtonText: "secondaryButtonText", primaryButtonClass: "primaryButtonClass", secondaryButtonClass: "secondaryButtonClass", showSecondaryButton: "showSecondaryButton", showCloseButton: "showCloseButton", showHeader: "showHeader" }, outputs: { primaryClick: "primaryClick", secondaryClick: "secondaryClick" }, viewQueries: [{ propertyName: "_modal", first: true, predicate: ["modal"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<sds-modal\n #modal\n [modalTitle]=\"title\"\n [size]=\"size\"\n [closeText]=\"closeText\"\n [showCloseButton]=\"showCloseButton\"\n [showHeader]=\"showHeader\"\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"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsDialogComponent, decorators: [{
|
|
113
|
+
type: Component,
|
|
114
|
+
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>\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: [""] }]
|
|
115
|
+
}], ctorParameters: function () { return []; }, propDecorators: { title: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], closeText: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}], size: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}], isOpen: [{
|
|
122
|
+
type: Input
|
|
123
|
+
}], primaryButtonText: [{
|
|
124
|
+
type: Input
|
|
125
|
+
}], secondaryButtonText: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], primaryButtonClass: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], primaryClick: [{
|
|
130
|
+
type: Output
|
|
131
|
+
}], secondaryButtonClass: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], secondaryClick: [{
|
|
134
|
+
type: Output
|
|
135
|
+
}], showSecondaryButton: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}], showCloseButton: [{
|
|
138
|
+
type: Input
|
|
139
|
+
}], showHeader: [{
|
|
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;QAE3B,IAAI,CAAA,IAAA,GAA8B,IAAI,CAAC;AAGtC,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YA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AA,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 public closeIcon = faXmark;\r\n\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","<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\"\n (click)=\"close()\">\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\n@Component({\n selector: 'sds-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n})\nexport class SdsDialogComponent implements OnInit, OnChanges {\n @Input() public title: string = '';\n @Input() public closeText?: string;\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\n @Input() public isOpen: boolean = false;\n \n @Input() public primaryButtonText: string = 'Primary button';\n @Input() public secondaryButtonText: string = 'Secondary button';\n\n @Input() public primaryButtonClass: string = 'btn-primary';\n @Output() public primaryClick: EventEmitter<void> = new EventEmitter();\n\n @Input() public secondaryButtonClass: string = 'btn-secondary'; \n @Output() public secondaryClick: EventEmitter<void> = new EventEmitter();\n @Input() public showSecondaryButton: boolean = true;\n\n @Input() public showCloseButton: boolean = true;\n @Input() public showHeader: boolean = true;\n\n @ViewChild('modal', { static: true }) private _modal: SdsModalComponent | undefined;\n\n constructor() {}\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['isOpen']) {\n if (this.isOpen) {\n this.open();\n } else {\n this.close();\n }\n\n }\n\n }\n\n ngOnInit(): void {}\n\n\n public open(): void {\n if (this._modal != undefined) {\n this._modal.open();\n }\n }\n\n public close(): void {\n if (this._modal != undefined) {\n this._modal.close();\n } \n }\n\n public onSecondaryClick(): void {\n this.secondaryClick.emit();\n this.close();\n }\n\n public onPrimaryClick(): void {\n this.primaryClick.emit();\n this.close();\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>\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;AAoB1B,IAAA,WAAA,GAAA;AAnBwB,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;QAEpE,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;KAMX;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;;8GApCQ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA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AA,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,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,w3CA6CM,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA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,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.1",
|
|
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.1",
|
|
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.7",
|
|
14
15
|
"devextreme": ">=19.0.0",
|
|
15
16
|
"devextreme-angular": ">=19.0.0",
|
|
16
17
|
"ngx-bootstrap": ">=7.0.0"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SdsDialogComponent implements OnInit, OnChanges {
|
|
4
|
+
title: string;
|
|
5
|
+
closeText?: string;
|
|
6
|
+
size: 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
primaryButtonText: string;
|
|
9
|
+
secondaryButtonText: string;
|
|
10
|
+
primaryButtonClass: string;
|
|
11
|
+
primaryClick: EventEmitter<void>;
|
|
12
|
+
secondaryButtonClass: string;
|
|
13
|
+
secondaryClick: EventEmitter<void>;
|
|
14
|
+
showSecondaryButton: boolean;
|
|
15
|
+
showCloseButton: boolean;
|
|
16
|
+
showHeader: boolean;
|
|
17
|
+
private _modal;
|
|
18
|
+
constructor();
|
|
19
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
open(): void;
|
|
22
|
+
close(): void;
|
|
23
|
+
onSecondaryClick(): void;
|
|
24
|
+
onPrimaryClick(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDialogComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDialogComponent, "sds-dialog", never, { "title": "title"; "closeText": "closeText"; "size": "size"; "isOpen": "isOpen"; "primaryButtonText": "primaryButtonText"; "secondaryButtonText": "secondaryButtonText"; "primaryButtonClass": "primaryButtonClass"; "secondaryButtonClass": "secondaryButtonClass"; "showSecondaryButton": "showSecondaryButton"; "showCloseButton": "showCloseButton"; "showHeader": "showHeader"; }, { "primaryClick": "primaryClick"; "secondaryClick": "secondaryClick"; }, never, ["*"]>;
|
|
27
|
+
}
|
|
@@ -1,20 +1,22 @@
|
|
|
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>;
|
|
13
14
|
closeIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
15
|
+
private _modal;
|
|
14
16
|
constructor();
|
|
15
17
|
ngOnInit(): void;
|
|
16
18
|
open(): void;
|
|
17
19
|
close(): void;
|
|
18
20
|
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"; },
|
|
21
|
+
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"; }, ["headerContent"], ["header", "*", "footer"]>;
|
|
20
22
|
}
|
|
@@ -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
|
}
|