@apipass/modals 0.1.5 → 0.1.9-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apipass-modals.d.ts +5 -4
- package/bundles/apipass-modals.umd.js +183 -145
- package/bundles/apipass-modals.umd.js.map +1 -1
- package/bundles/apipass-modals.umd.min.js +1 -1
- package/bundles/apipass-modals.umd.min.js.map +1 -1
- package/esm2015/apipass-modals.js +4 -4
- package/esm2015/lib/confirm-remove-modal.component.js +105 -103
- package/esm2015/modals.module.js +55 -39
- package/esm2015/public-api.js +4 -3
- package/fesm2015/apipass-modals.js +149 -138
- package/fesm2015/apipass-modals.js.map +1 -1
- package/lib/confirm-remove-modal.component.d.ts +24 -69
- package/modals.module.d.ts +14 -2
- package/package.json +8 -6
- package/public-api.d.ts +3 -2
- package/apipass-modals.metadata.json +0 -1
|
@@ -1,146 +1,157 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogContent, MatDialogActions, MatDialogTitle, MatDialogModule } from '@angular/material/dialog';
|
|
2
|
+
export * from '@angular/material/dialog';
|
|
3
|
+
import { ɵɵelementStart, ɵɵtext, ɵɵelementEnd, ɵɵnextContext, ɵɵadvance, ɵɵtextInterpolate1, ɵɵgetCurrentView, ɵɵlistener, ɵɵrestoreView, ɵɵproperty, ɵɵelement, ɵɵsanitizeHtml, ɵɵdirectiveInject, ɵɵdefineComponent, ɵɵtemplate, ɵsetClassMetadata, Component, Inject, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
|
|
4
|
+
import { NgIf, CommonModule } from '@angular/common';
|
|
5
|
+
import { SecondaryButtonComponent, ButtonsModule } from '@apipass/buttons';
|
|
6
|
+
import { IconComponent, IconsModule } from '@apipass/icons';
|
|
7
|
+
import { InputTextComponent, InputsModule } from '@apipass/inputs';
|
|
8
|
+
import { NgControlStatus, NgModel, FormsModule } from '@angular/forms';
|
|
4
9
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
|
-
import { FormsModule } from '@angular/forms';
|
|
6
10
|
import { MatInputModule } from '@angular/material/input';
|
|
7
|
-
import { ButtonsModule } from '@apipass/buttons';
|
|
8
|
-
import { IconsModule } from '@apipass/icons';
|
|
9
|
-
import { InputsModule } from '@apipass/inputs';
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
];
|
|
107
|
-
ConfirmRemoveModalDataComponent.ctorParameters = () => [
|
|
108
|
-
{ type: MatDialogRef },
|
|
109
|
-
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
110
|
-
];
|
|
12
|
+
function ConfirmRemoveModalDataComponent_h3_1_Template(rf, ctx) { if (rf & 1) {
|
|
13
|
+
ɵɵelementStart(0, "h3", 8);
|
|
14
|
+
ɵɵtext(1);
|
|
15
|
+
ɵɵelementEnd();
|
|
16
|
+
} if (rf & 2) {
|
|
17
|
+
const ctx_r0 = ɵɵnextContext();
|
|
18
|
+
ɵɵadvance(1);
|
|
19
|
+
ɵɵtextInterpolate1(" ", ctx_r0.data.title, " ");
|
|
20
|
+
} }
|
|
21
|
+
function ConfirmRemoveModalDataComponent_icon_2_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
+
const _r5 = ɵɵgetCurrentView();
|
|
23
|
+
ɵɵelementStart(0, "icon", 9);
|
|
24
|
+
ɵɵlistener("onClick", function ConfirmRemoveModalDataComponent_icon_2_Template_icon_onClick_0_listener() { ɵɵrestoreView(_r5); const ctx_r4 = ɵɵnextContext(); return ctx_r4.closeClick(); });
|
|
25
|
+
ɵɵelementEnd();
|
|
26
|
+
} if (rf & 2) {
|
|
27
|
+
const ctx_r1 = ɵɵnextContext();
|
|
28
|
+
ɵɵproperty("title", ctx_r1.data.closeLabel);
|
|
29
|
+
} }
|
|
30
|
+
function ConfirmRemoveModalDataComponent_p_4_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
ɵɵelement(0, "p", 10);
|
|
32
|
+
} if (rf & 2) {
|
|
33
|
+
const ctx_r2 = ɵɵnextContext();
|
|
34
|
+
ɵɵproperty("innerHTML", ctx_r2.data.content, ɵɵsanitizeHtml);
|
|
35
|
+
} }
|
|
36
|
+
function ConfirmRemoveModalDataComponent_input_text_5_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
+
const _r7 = ɵɵgetCurrentView();
|
|
38
|
+
ɵɵelementStart(0, "input-text", 11);
|
|
39
|
+
ɵɵlistener("ngModelChange", function ConfirmRemoveModalDataComponent_input_text_5_Template_input_text_ngModelChange_0_listener($event) { ɵɵrestoreView(_r7); const ctx_r6 = ɵɵnextContext(); return ctx_r6.data.removeText = $event; });
|
|
40
|
+
ɵɵelementEnd();
|
|
41
|
+
} if (rf & 2) {
|
|
42
|
+
const ctx_r3 = ɵɵnextContext();
|
|
43
|
+
ɵɵproperty("label", ctx_r3.data.removeTextLabel)("ngModel", ctx_r3.data.removeText);
|
|
44
|
+
} }
|
|
45
|
+
class ConfirmRemoveDialogData {
|
|
46
|
+
}
|
|
47
|
+
class ConfirmRemoveModalDataComponent {
|
|
48
|
+
constructor(dialogRef, data) {
|
|
49
|
+
this.dialogRef = dialogRef;
|
|
50
|
+
this.data = data;
|
|
51
|
+
}
|
|
52
|
+
closeClick() {
|
|
53
|
+
this.dialogRef.close();
|
|
54
|
+
}
|
|
55
|
+
confirmClick() {
|
|
56
|
+
var _a, _b, _c;
|
|
57
|
+
if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeTextConfirm) || ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeText) === ((_c = this.data) === null || _c === void 0 ? void 0 : _c.removeTextConfirm)) {
|
|
58
|
+
this.dialogRef.close(this.data);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
isConfirmDisabled() {
|
|
62
|
+
var _a, _b, _c;
|
|
63
|
+
if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeTextConfirm)) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeText) !== ((_c = this.data) === null || _c === void 0 ? void 0 : _c.removeTextConfirm);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
ConfirmRemoveModalDataComponent.ɵfac = function ConfirmRemoveModalDataComponent_Factory(t) { return new (t || ConfirmRemoveModalDataComponent)(ɵɵdirectiveInject(MatDialogRef), ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
|
|
70
|
+
ConfirmRemoveModalDataComponent.ɵcmp = ɵɵdefineComponent({ type: ConfirmRemoveModalDataComponent, selectors: [["confirm-remove-modal-data"]], decls: 8, vars: 7, consts: [[1, "modal-title"], ["mat-dialog-title", "", 4, "ngIf"], ["type", "tertiary clickable", "name", "fas fa-times", 3, "title", "onClick", 4, "ngIf"], ["mat-dialog-content", "", 1, "modal-content"], [3, "innerHTML", 4, "ngIf"], [3, "label", "ngModel", "ngModelChange", 4, "ngIf"], ["mat-dialog-actions", "", 1, "modal-actions"], [3, "btnDisabled", "icon", "label", "onClick"], ["mat-dialog-title", ""], ["type", "tertiary clickable", "name", "fas fa-times", 3, "title", "onClick"], [3, "innerHTML"], [3, "label", "ngModel", "ngModelChange"]], template: function ConfirmRemoveModalDataComponent_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
+
ɵɵelementStart(0, "div", 0);
|
|
72
|
+
ɵɵtemplate(1, ConfirmRemoveModalDataComponent_h3_1_Template, 2, 1, "h3", 1);
|
|
73
|
+
ɵɵtemplate(2, ConfirmRemoveModalDataComponent_icon_2_Template, 1, 1, "icon", 2);
|
|
74
|
+
ɵɵelementEnd();
|
|
75
|
+
ɵɵelementStart(3, "div", 3);
|
|
76
|
+
ɵɵtemplate(4, ConfirmRemoveModalDataComponent_p_4_Template, 1, 1, "p", 4);
|
|
77
|
+
ɵɵtemplate(5, ConfirmRemoveModalDataComponent_input_text_5_Template, 1, 2, "input-text", 5);
|
|
78
|
+
ɵɵelementEnd();
|
|
79
|
+
ɵɵelementStart(6, "div", 6);
|
|
80
|
+
ɵɵelementStart(7, "secondary-button", 7);
|
|
81
|
+
ɵɵlistener("onClick", function ConfirmRemoveModalDataComponent_Template_secondary_button_onClick_7_listener() { return ctx.confirmClick(); });
|
|
82
|
+
ɵɵelementEnd();
|
|
83
|
+
ɵɵelementEnd();
|
|
84
|
+
} if (rf & 2) {
|
|
85
|
+
ɵɵadvance(1);
|
|
86
|
+
ɵɵproperty("ngIf", ctx.data.title);
|
|
87
|
+
ɵɵadvance(1);
|
|
88
|
+
ɵɵproperty("ngIf", ctx.data.showCloseIcon);
|
|
89
|
+
ɵɵadvance(2);
|
|
90
|
+
ɵɵproperty("ngIf", ctx.data.content);
|
|
91
|
+
ɵɵadvance(1);
|
|
92
|
+
ɵɵproperty("ngIf", ctx.data.removeTextConfirm);
|
|
93
|
+
ɵɵadvance(2);
|
|
94
|
+
ɵɵproperty("btnDisabled", ctx.isConfirmDisabled())("icon", ctx.data.confirmIcon)("label", ctx.data.confirmText);
|
|
95
|
+
} }, directives: [NgIf, MatDialogContent, MatDialogActions, SecondaryButtonComponent, MatDialogTitle, IconComponent, InputTextComponent, NgControlStatus, NgModel], styles: [".modal-title[_ngcontent-%COMP%]{align-items:flex-start;display:flex;justify-content:center;position:relative;width:100%}.modal-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-weight:700;margin:0;text-align:center;width:100%}.modal-title[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]{position:absolute;right:-5px;top:-5px}.modal-content[_ngcontent-%COMP%]{border:none!important;margin:20px 0!important;text-align:center!important}.modal-content[_ngcontent-%COMP%] input-text[_ngcontent-%COMP%]{width:80%}.modal-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;width:100%}"] });
|
|
96
|
+
/*@__PURE__*/ (function () { ɵsetClassMetadata(ConfirmRemoveModalDataComponent, [{
|
|
97
|
+
type: Component,
|
|
98
|
+
args: [{
|
|
99
|
+
selector: 'confirm-remove-modal-data',
|
|
100
|
+
templateUrl: 'confirm-remove-modal.component.html',
|
|
101
|
+
styleUrls: ['confirm-remove-modal.component.scss']
|
|
102
|
+
}]
|
|
103
|
+
}], function () { return [{ type: MatDialogRef }, { type: ConfirmRemoveDialogData, decorators: [{
|
|
104
|
+
type: Inject,
|
|
105
|
+
args: [MAT_DIALOG_DATA]
|
|
106
|
+
}] }]; }, null); })();
|
|
111
107
|
|
|
112
|
-
class ModalsModule {
|
|
113
|
-
}
|
|
114
|
-
ModalsModule
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
108
|
+
class ModalsModule {
|
|
109
|
+
}
|
|
110
|
+
ModalsModule.ɵmod = ɵɵdefineNgModule({ type: ModalsModule });
|
|
111
|
+
ModalsModule.ɵinj = ɵɵdefineInjector({ factory: function ModalsModule_Factory(t) { return new (t || ModalsModule)(); }, providers: [], imports: [[
|
|
112
|
+
CommonModule,
|
|
113
|
+
MatDialogModule,
|
|
114
|
+
MatFormFieldModule,
|
|
115
|
+
FormsModule,
|
|
116
|
+
MatInputModule,
|
|
117
|
+
InputsModule,
|
|
118
|
+
ButtonsModule,
|
|
119
|
+
IconsModule,
|
|
120
|
+
]] });
|
|
121
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(ModalsModule, { declarations: [ConfirmRemoveModalDataComponent], imports: [CommonModule,
|
|
122
|
+
MatDialogModule,
|
|
123
|
+
MatFormFieldModule,
|
|
124
|
+
FormsModule,
|
|
125
|
+
MatInputModule,
|
|
126
|
+
InputsModule,
|
|
127
|
+
ButtonsModule,
|
|
128
|
+
IconsModule], exports: [ConfirmRemoveModalDataComponent] }); })();
|
|
129
|
+
/*@__PURE__*/ (function () { ɵsetClassMetadata(ModalsModule, [{
|
|
130
|
+
type: NgModule,
|
|
131
|
+
args: [{
|
|
132
|
+
imports: [
|
|
133
|
+
CommonModule,
|
|
134
|
+
MatDialogModule,
|
|
135
|
+
MatFormFieldModule,
|
|
136
|
+
FormsModule,
|
|
137
|
+
MatInputModule,
|
|
138
|
+
InputsModule,
|
|
139
|
+
ButtonsModule,
|
|
140
|
+
IconsModule,
|
|
141
|
+
],
|
|
142
|
+
declarations: [
|
|
143
|
+
ConfirmRemoveModalDataComponent
|
|
144
|
+
],
|
|
145
|
+
exports: [
|
|
146
|
+
ConfirmRemoveModalDataComponent
|
|
147
|
+
],
|
|
148
|
+
providers: []
|
|
149
|
+
}]
|
|
150
|
+
}], null, null); })();
|
|
140
151
|
|
|
141
|
-
/**
|
|
142
|
-
* Generated bundle index. Do not edit.
|
|
152
|
+
/**
|
|
153
|
+
* Generated bundle index. Do not edit.
|
|
143
154
|
*/
|
|
144
155
|
|
|
145
|
-
export {
|
|
156
|
+
export { ConfirmRemoveDialogData, ConfirmRemoveModalDataComponent, ModalsModule };
|
|
146
157
|
//# sourceMappingURL=apipass-modals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apipass-modals.js","sources":["../../../projects/modals/src/lib/confirm-remove-modal.component.ts","../../../projects/modals/src/modals.module.ts","../../../projects/modals/src/apipass-modals.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"apipass-modals.js","sources":["../../../projects/modals/src/lib/confirm-remove-modal.component.html","../../../projects/modals/src/lib/confirm-remove-modal.component.ts","../../../projects/modals/src/modals.module.ts","../../../projects/modals/src/apipass-modals.ts"],"sourcesContent":["<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" mat-dialog-title>\n {{data.title}}\n </h3>\n <icon *ngIf=\"data.showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"data.closeLabel\" (onClick)=\"closeClick()\"></icon>\n</div>\n\n<div class=\"modal-content\" mat-dialog-content>\n <p *ngIf=\"data.content\" [innerHTML]=\"data.content\"></p>\n <input-text *ngIf=\"data.removeTextConfirm\" [label]=\"data.removeTextLabel\" [(ngModel)]=\"data.removeText\"></input-text>\n</div>\n\n<div class=\"modal-actions\" mat-dialog-actions>\n <secondary-button [btnDisabled]=\"isConfirmDisabled()\" [icon]=\"data.confirmIcon\" [label]=\"data.confirmText\" (onClick)=\"confirmClick()\"></secondary-button>\n</div>\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\n\nexport class ConfirmRemoveDialogData {\n title?: string;\n content?: string;\n confirmIcon?: string;\n confirmText?: string;\n removeText?: string;\n removeTextLabel?: string;\n removeTextConfirm?: string;\n showCloseIcon?: boolean;\n closeLabel?: string;\n item?: any;\n}\n\n@Component({\n selector: 'confirm-remove-modal-data',\n templateUrl: 'confirm-remove-modal.component.html',\n styleUrls: ['confirm-remove-modal.component.scss']\n})\nexport class ConfirmRemoveModalDataComponent {\n\n constructor(\n public dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ConfirmRemoveDialogData,\n ) {\n }\n\n closeClick(): void {\n this.dialogRef.close();\n }\n\n confirmClick(): void {\n if (!this.data?.removeTextConfirm || this.data?.removeText === this.data?.removeTextConfirm) {\n this.dialogRef.close(this.data);\n }\n }\n\n isConfirmDisabled(): boolean {\n if (!this.data?.removeTextConfirm) {\n return false;\n }\n return this.data?.removeText !== this.data?.removeTextConfirm;\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ConfirmRemoveModalDataComponent} from './lib/confirm-remove-modal.component';\nimport {MatDialogModule} from '@angular/material/dialog';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {FormsModule} from '@angular/forms';\nimport {MatInputModule} from '@angular/material/input';\nimport {ButtonsModule} from '@apipass/buttons';\nimport {IconsModule} from '@apipass/icons';\nimport {InputsModule} from '@apipass/inputs';\n\n@NgModule({\n imports: [\n CommonModule,\n MatDialogModule,\n MatFormFieldModule,\n FormsModule,\n MatInputModule,\n InputsModule,\n ButtonsModule,\n IconsModule,\n ],\n declarations: [\n ConfirmRemoveModalDataComponent\n ],\n exports: [\n ConfirmRemoveModalDataComponent\n ],\n providers: []\n})\nexport class ModalsModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i0.ɵɵelementStart","i0.ɵɵtext","i0.ɵɵelementEnd","i0.ɵɵadvance","i0.ɵɵtextInterpolate1","i0.ɵɵlistener","i0.ɵɵproperty","i0.ɵɵelement","i0.ɵɵtemplate"],"mappings":";;;;;;;;;;;;IACEA,0BACE;IAAAC,SACF;IAAAC,cAAK;;;IADHC,YACF;IADEC,+CACF;;;;IACAJ,4BAAyI;IAAhCK,6LAAwB;IAACH,cAAO;;;IAA1DI,2CAAyB;;;IAIxGC,qBAAuD;;;IAA/BD,4DAA0B;;;;IAClDN,mCAAqH;IAA3CK,uOAA6B;IAACH,cAAa;;;IAA1EI,gDAA8B,mCAAA;;MCN9D,uBAAuB;CAWnC;MAOY,+BAA+B;IAE1C,YACS,SAAwD,EAC/B,IAA6B;QADtD,cAAS,GAAT,SAAS,CAA+C;QAC/B,SAAI,GAAJ,IAAI,CAAyB;KAE9D;IAED,UAAU;QACR,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;KACxB;IAED,YAAY;;QACV,IAAI,QAAC,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,IAAI,OAAA,IAAI,CAAC,IAAI,0CAAE,UAAU,aAAK,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,EAAE;YAC3F,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACjC;KACF;IAED,iBAAiB;;QACf,IAAI,QAAC,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,EAAE;YACjC,OAAO,KAAK,CAAC;SACd;QACD,OAAO,OAAA,IAAI,CAAC,IAAI,0CAAE,UAAU,aAAK,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,CAAC;KAC/D;;8GAvBU,+BAA+B,qDAIhC,eAAe;iEAJd,+BAA+B;QDrB5CN,2BACE;QAAAQ,2EACE;QAEFA,+EAAkI;QACpIN,cAAM;QAENF,2BACE;QAAAQ,yEAAmD;QACnDA,2FAAwG;QAC1GN,cAAM;QAENF,2BACE;QAAAA,wCAAyJ;QAA9CK,uHAAW,kBAAc,IAAC;QAACH,cAAmB;QAC3JA,cAAM;;QAbAC,YAAkB;QAAlBG,kCAAkB;QAGhBH,YAA0B;QAA1BG,0CAA0B;QAI7BH,YAAoB;QAApBG,oCAAoB;QACXH,YAA8B;QAA9BG,8CAA8B;QAIxBH,YAAmC;QAAnCG,kDAAmC,8BAAA,+BAAA;;+CCQ1C,+BAA+B;cAL3C,SAAS;eAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,WAAW,EAAE,qCAAqC;gBAClD,SAAS,EAAE,CAAC,qCAAqC,CAAC;aACnD;8DAKyC,uBAAuB;sBAA5D,MAAM;uBAAC,eAAe;;;MCKd,YAAY;;6CAAZ,YAAY;oGAAZ,YAAY,mBAFZ,EAAE,YAhBJ;YACP,YAAY;YACZ,eAAe;YACf,kBAAkB;YAClB,WAAW;YACX,cAAc;YACd,YAAY;YACZ,aAAa;YACb,WAAW;SACZ;qFASU,YAAY,mBAPrB,+BAA+B,aAV/B,YAAY;QACZ,eAAe;QACf,kBAAkB;QAClB,WAAW;QACX,cAAc;QACd,YAAY;QACZ,aAAa;QACb,WAAW,aAMX,+BAA+B;+CAItB,YAAY;cAnBxB,QAAQ;eAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,eAAe;oBACf,kBAAkB;oBAClB,WAAW;oBACX,cAAc;oBACd,YAAY;oBACZ,aAAa;oBACb,WAAW;iBACZ;gBACD,YAAY,EAAE;oBACZ,+BAA+B;iBAChC;gBACD,OAAO,EAAE;oBACP,+BAA+B;iBAChC;gBACD,SAAS,EAAE,EAAE;aACd;;;AC7BD;;;;;;"}
|
|
@@ -1,69 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
position?: DialogPosition;
|
|
26
|
-
direction?: Direction;
|
|
27
|
-
ariaDescribedBy?: string | null;
|
|
28
|
-
ariaLabelledBy?: string | null;
|
|
29
|
-
ariaLabel?: string | null;
|
|
30
|
-
autoFocus?: boolean;
|
|
31
|
-
restoreFocus?: boolean;
|
|
32
|
-
closeOnNavigation?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export interface DialogData {
|
|
35
|
-
title: string;
|
|
36
|
-
content: string;
|
|
37
|
-
confirmIcon: string;
|
|
38
|
-
confirmText: string;
|
|
39
|
-
removeText: string;
|
|
40
|
-
removeTextLabel: string;
|
|
41
|
-
removeTextConfirm: string;
|
|
42
|
-
showCloseIcon: boolean;
|
|
43
|
-
closeLabel: string;
|
|
44
|
-
}
|
|
45
|
-
export declare class ConfirmRemoveModalComponent implements OnInit {
|
|
46
|
-
dialog: MatDialog;
|
|
47
|
-
title: string;
|
|
48
|
-
content: string;
|
|
49
|
-
confirmIcon: string;
|
|
50
|
-
confirmText: string;
|
|
51
|
-
removeTextLabel: string;
|
|
52
|
-
removeTextConfirm: string;
|
|
53
|
-
showCloseIcon: boolean;
|
|
54
|
-
closeLabel: string;
|
|
55
|
-
dialogConfig: DialogConfig;
|
|
56
|
-
openModal: EventEmitter<any>;
|
|
57
|
-
confirmModal: EventEmitter<any>;
|
|
58
|
-
closeModal: EventEmitter<any>;
|
|
59
|
-
constructor(dialog: MatDialog);
|
|
60
|
-
ngOnInit(): void;
|
|
61
|
-
}
|
|
62
|
-
export declare class ConfirmRemoveModalDataComponent {
|
|
63
|
-
dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>;
|
|
64
|
-
data: DialogData;
|
|
65
|
-
constructor(dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>, data: DialogData);
|
|
66
|
-
closeClick(): void;
|
|
67
|
-
confirmClick(): void;
|
|
68
|
-
isConfirmDisabled(): boolean;
|
|
69
|
-
}
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ConfirmRemoveDialogData {
|
|
4
|
+
title?: string;
|
|
5
|
+
content?: string;
|
|
6
|
+
confirmIcon?: string;
|
|
7
|
+
confirmText?: string;
|
|
8
|
+
removeText?: string;
|
|
9
|
+
removeTextLabel?: string;
|
|
10
|
+
removeTextConfirm?: string;
|
|
11
|
+
showCloseIcon?: boolean;
|
|
12
|
+
closeLabel?: string;
|
|
13
|
+
item?: any;
|
|
14
|
+
}
|
|
15
|
+
export declare class ConfirmRemoveModalDataComponent {
|
|
16
|
+
dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>;
|
|
17
|
+
data: ConfirmRemoveDialogData;
|
|
18
|
+
constructor(dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>, data: ConfirmRemoveDialogData);
|
|
19
|
+
closeClick(): void;
|
|
20
|
+
confirmClick(): void;
|
|
21
|
+
isConfirmDisabled(): boolean;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDef<ConfirmRemoveModalDataComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDefWithMeta<ConfirmRemoveModalDataComponent, "confirm-remove-modal-data", never, {}, {}, never, never>;
|
|
24
|
+
}
|
package/modals.module.d.ts
CHANGED
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./lib/confirm-remove-modal.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/material/dialog";
|
|
5
|
+
import * as i4 from "@angular/material/form-field";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "@angular/material/input";
|
|
8
|
+
import * as i7 from "@apipass/inputs";
|
|
9
|
+
import * as i8 from "@apipass/buttons";
|
|
10
|
+
import * as i9 from "@apipass/icons";
|
|
11
|
+
export declare class ModalsModule {
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDefWithMeta<ModalsModule, [typeof i1.ConfirmRemoveModalDataComponent], [typeof i2.CommonModule, typeof i3.MatDialogModule, typeof i4.MatFormFieldModule, typeof i5.FormsModule, typeof i6.MatInputModule, typeof i7.InputsModule, typeof i8.ButtonsModule, typeof i9.IconsModule], [typeof i1.ConfirmRemoveModalDataComponent]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDef<ModalsModule>;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apipass/modals",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9-alpha.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/animations": "^10.0.11",
|
|
6
6
|
"@angular/cdk": "^10.1.3",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@angular/material": "^10.1.3",
|
|
13
|
-
"@apipass/buttons": "^0.1.
|
|
14
|
-
"@apipass/icons": "^0.1.
|
|
15
|
-
"@apipass/inputs": "^0.1.
|
|
13
|
+
"@apipass/buttons": "^0.1.4",
|
|
14
|
+
"@apipass/icons": "^0.1.4",
|
|
15
|
+
"@apipass/inputs": "^0.1.4",
|
|
16
16
|
"tslib": "2.0.0"
|
|
17
17
|
},
|
|
18
18
|
"main": "bundles/apipass-modals.umd.js",
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"esm2015": "esm2015/apipass-modals.js",
|
|
22
22
|
"fesm2015": "fesm2015/apipass-modals.js",
|
|
23
23
|
"typings": "apipass-modals.d.ts",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"scripts": {
|
|
26
|
+
"prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy. This is not allowed.\\nPlease delete and rebuild the package, without compiling with Ivy, before attempting to publish.\\n')\" && exit 1"
|
|
27
|
+
}
|
|
26
28
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from './
|
|
1
|
+
export * from '@angular/material/dialog';
|
|
2
|
+
export * from './modals.module';
|
|
3
|
+
export * from './lib/confirm-remove-modal.component';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"ModalsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":11,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":17,"character":4},{"__symbolic":"reference","module":"@apipass/inputs","name":"InputsModule","line":18,"character":4},{"__symbolic":"reference","module":"@apipass/buttons","name":"ButtonsModule","line":19,"character":4},{"__symbolic":"reference","module":"@apipass/icons","name":"IconsModule","line":20,"character":4}],"declarations":[{"__symbolic":"reference","name":"ConfirmRemoveModalComponent"},{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}],"exports":[{"__symbolic":"reference","name":"ConfirmRemoveModalComponent"},{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}],"entryComponents":[{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}],"providers":[]}]}],"members":{}},"DialogRole":{"__symbolic":"interface"},"DialogPosition":{"__symbolic":"interface"},"DialogConfig":{"__symbolic":"class","members":{}},"DialogData":{"__symbolic":"interface"},"ConfirmRemoveModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":51,"character":1},"arguments":[{"selector":"confirm-remove-modal","template":""}]}],"members":{"title":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":57,"character":3}}]}],"content":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":58,"character":3}}]}],"confirmIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":3}}]}],"confirmText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"removeTextLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"removeTextConfirm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3}}]}],"showCloseIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}}]}],"closeLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3}}]}],"dialogConfig":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":3}}]}],"openModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":3}}]}],"confirmModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":69,"character":3}}]}],"closeModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":70,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":72,"character":29}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ConfirmRemoveModalDataComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":103,"character":1},"arguments":[{"selector":"confirm-remove-modal-data","template":"<div class=\"modal-title\">\r\n <h3 *ngIf=\"data.title\" mat-dialog-title>\r\n {{data.title}}\r\n </h3>\r\n <icon *ngIf=\"data.showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"data.closeLabel\" (onClick)=\"closeClick()\"></icon>\r\n</div>\r\n\r\n<div class=\"modal-content\" mat-dialog-content>\r\n <p *ngIf=\"data.content\" [innerHTML]=\"data.content\"></p>\r\n <input-text *ngIf=\"data.removeTextConfirm\" [label]=\"data.removeTextLabel\" [(ngModel)]=\"data.removeText\"></input-text>\r\n</div>\r\n\r\n<div class=\"modal-actions\" mat-dialog-actions>\r\n <secondary-button [btnDisabled]=\"isConfirmDisabled()\" [icon]=\"data.confirmIcon\" [label]=\"data.confirmText\" (onClick)=\"confirmClick()\"></secondary-button>\r\n</div>\r\n","styles":[".modal-title{align-items:flex-start;display:flex;justify-content:center;position:relative;width:100%}.modal-title h3{font-weight:700;margin:0;text-align:center;width:100%}.modal-title icon{position:absolute;right:-5px;top:-5px}.modal-content{border:none!important;margin:20px 0!important;text-align:center!important;width:100%!important}.modal-content input-text{width:80%}.modal-actions{align-items:center;display:flex;justify-content:center;width:100%}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":112,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MAT_DIALOG_DATA","line":112,"character":12}]}]],"parameters":[{"__symbolic":"reference","name":"MatDialogRef","module":"@angular/material/dialog","arguments":[{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}]},{"__symbolic":"reference","name":"any"}]}],"closeClick":[{"__symbolic":"method"}],"confirmClick":[{"__symbolic":"method"}],"isConfirmDisabled":[{"__symbolic":"method"}]}}},"origins":{"ModalsModule":"./modals.module","DialogRole":"./lib/confirm-remove-modal.component","DialogPosition":"./lib/confirm-remove-modal.component","DialogConfig":"./lib/confirm-remove-modal.component","DialogData":"./lib/confirm-remove-modal.component","ConfirmRemoveModalComponent":"./lib/confirm-remove-modal.component","ConfirmRemoveModalDataComponent":"./lib/confirm-remove-modal.component"},"importAs":"@apipass/modals"}
|