@apipass/modals 0.1.8 → 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 +176 -73
- 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 -38
- package/esm2015/modals.module.js +55 -34
- package/esm2015/public-api.js +4 -4
- package/fesm2015/apipass-modals.js +147 -67
- package/fesm2015/apipass-modals.js.map +1 -1
- package/lib/confirm-remove-modal.component.d.ts +24 -21
- package/modals.module.d.ts +14 -2
- package/package.json +5 -3
- package/public-api.d.ts +3 -3
- package/apipass-modals.metadata.json +0 -1
package/apipass-modals.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="@apipass/modals" />
|
|
5
|
+
export * from './public-api';
|
|
@@ -1,85 +1,188 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/material/dialog'), require('@angular/core'), require('@angular/common'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@apipass/modals', ['exports', '@angular/material/dialog', '@angular/core', '@angular/common', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.modals = {}), global.ng.material.dialog, global.ng.core, global.ng.common, global.
|
|
5
|
-
}(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/material/dialog'), require('@angular/core'), require('@angular/common'), require('@apipass/buttons'), require('@apipass/icons'), require('@apipass/inputs'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@apipass/modals', ['exports', '@angular/material/dialog', '@angular/core', '@angular/common', '@apipass/buttons', '@apipass/icons', '@apipass/inputs', '@angular/forms', '@angular/material/form-field', '@angular/material/input'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.modals = {}), global.ng.material.dialog, global.ng.core, global.ng.common, global.i3, global.i4, global.i5, global.ng.forms, global.ng.material.formField, global.ng.material.input));
|
|
5
|
+
}(this, (function (exports, i1, i0, i2, i3, i4, i5, i6, formField, input) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
7
|
+
function ConfirmRemoveModalDataComponent_h3_1_Template(rf, ctx) {
|
|
8
|
+
if (rf & 1) {
|
|
9
|
+
i0.ɵɵelementStart(0, "h3", 8);
|
|
10
|
+
i0.ɵɵtext(1);
|
|
11
|
+
i0.ɵɵelementEnd();
|
|
12
|
+
}
|
|
13
|
+
if (rf & 2) {
|
|
14
|
+
var ctx_r0 = i0.ɵɵnextContext();
|
|
15
|
+
i0.ɵɵadvance(1);
|
|
16
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.data.title, " ");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function ConfirmRemoveModalDataComponent_icon_2_Template(rf, ctx) {
|
|
20
|
+
if (rf & 1) {
|
|
21
|
+
var _r5_1 = i0.ɵɵgetCurrentView();
|
|
22
|
+
i0.ɵɵelementStart(0, "icon", 9);
|
|
23
|
+
i0.ɵɵlistener("onClick", function ConfirmRemoveModalDataComponent_icon_2_Template_icon_onClick_0_listener() { i0.ɵɵrestoreView(_r5_1); var ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.closeClick(); });
|
|
24
|
+
i0.ɵɵelementEnd();
|
|
25
|
+
}
|
|
26
|
+
if (rf & 2) {
|
|
27
|
+
var ctx_r1 = i0.ɵɵnextContext();
|
|
28
|
+
i0.ɵɵproperty("title", ctx_r1.data.closeLabel);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function ConfirmRemoveModalDataComponent_p_4_Template(rf, ctx) {
|
|
32
|
+
if (rf & 1) {
|
|
33
|
+
i0.ɵɵelement(0, "p", 10);
|
|
34
|
+
}
|
|
35
|
+
if (rf & 2) {
|
|
36
|
+
var ctx_r2 = i0.ɵɵnextContext();
|
|
37
|
+
i0.ɵɵproperty("innerHTML", ctx_r2.data.content, i0.ɵɵsanitizeHtml);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function ConfirmRemoveModalDataComponent_input_text_5_Template(rf, ctx) {
|
|
41
|
+
if (rf & 1) {
|
|
42
|
+
var _r7_1 = i0.ɵɵgetCurrentView();
|
|
43
|
+
i0.ɵɵelementStart(0, "input-text", 11);
|
|
44
|
+
i0.ɵɵlistener("ngModelChange", function ConfirmRemoveModalDataComponent_input_text_5_Template_input_text_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r7_1); var ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.data.removeText = $event; });
|
|
45
|
+
i0.ɵɵelementEnd();
|
|
46
|
+
}
|
|
47
|
+
if (rf & 2) {
|
|
48
|
+
var ctx_r3 = i0.ɵɵnextContext();
|
|
49
|
+
i0.ɵɵproperty("label", ctx_r3.data.removeTextLabel)("ngModel", ctx_r3.data.removeText);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
var ConfirmRemoveDialogData = /** @class */ (function () {
|
|
53
|
+
function ConfirmRemoveDialogData() {
|
|
54
|
+
}
|
|
55
|
+
return ConfirmRemoveDialogData;
|
|
56
|
+
}());
|
|
57
|
+
var ConfirmRemoveModalDataComponent = /** @class */ (function () {
|
|
58
|
+
function ConfirmRemoveModalDataComponent(dialogRef, data) {
|
|
59
|
+
this.dialogRef = dialogRef;
|
|
60
|
+
this.data = data;
|
|
61
|
+
}
|
|
62
|
+
ConfirmRemoveModalDataComponent.prototype.closeClick = function () {
|
|
63
|
+
this.dialogRef.close();
|
|
64
|
+
};
|
|
65
|
+
ConfirmRemoveModalDataComponent.prototype.confirmClick = function () {
|
|
66
|
+
var _a, _b, _c;
|
|
67
|
+
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)) {
|
|
68
|
+
this.dialogRef.close(this.data);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
ConfirmRemoveModalDataComponent.prototype.isConfirmDisabled = function () {
|
|
72
|
+
var _a, _b, _c;
|
|
73
|
+
if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeTextConfirm)) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeText) !== ((_c = this.data) === null || _c === void 0 ? void 0 : _c.removeTextConfirm);
|
|
77
|
+
};
|
|
78
|
+
return ConfirmRemoveModalDataComponent;
|
|
79
|
+
}());
|
|
80
|
+
ConfirmRemoveModalDataComponent.ɵfac = function ConfirmRemoveModalDataComponent_Factory(t) { return new (t || ConfirmRemoveModalDataComponent)(i0.ɵɵdirectiveInject(i1.MatDialogRef), i0.ɵɵdirectiveInject(i1.MAT_DIALOG_DATA)); };
|
|
81
|
+
ConfirmRemoveModalDataComponent.ɵcmp = i0.ɵɵ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) {
|
|
82
|
+
if (rf & 1) {
|
|
83
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
84
|
+
i0.ɵɵtemplate(1, ConfirmRemoveModalDataComponent_h3_1_Template, 2, 1, "h3", 1);
|
|
85
|
+
i0.ɵɵtemplate(2, ConfirmRemoveModalDataComponent_icon_2_Template, 1, 1, "icon", 2);
|
|
86
|
+
i0.ɵɵelementEnd();
|
|
87
|
+
i0.ɵɵelementStart(3, "div", 3);
|
|
88
|
+
i0.ɵɵtemplate(4, ConfirmRemoveModalDataComponent_p_4_Template, 1, 1, "p", 4);
|
|
89
|
+
i0.ɵɵtemplate(5, ConfirmRemoveModalDataComponent_input_text_5_Template, 1, 2, "input-text", 5);
|
|
90
|
+
i0.ɵɵelementEnd();
|
|
91
|
+
i0.ɵɵelementStart(6, "div", 6);
|
|
92
|
+
i0.ɵɵelementStart(7, "secondary-button", 7);
|
|
93
|
+
i0.ɵɵlistener("onClick", function ConfirmRemoveModalDataComponent_Template_secondary_button_onClick_7_listener() { return ctx.confirmClick(); });
|
|
94
|
+
i0.ɵɵelementEnd();
|
|
95
|
+
i0.ɵɵelementEnd();
|
|
96
|
+
}
|
|
97
|
+
if (rf & 2) {
|
|
98
|
+
i0.ɵɵadvance(1);
|
|
99
|
+
i0.ɵɵproperty("ngIf", ctx.data.title);
|
|
100
|
+
i0.ɵɵadvance(1);
|
|
101
|
+
i0.ɵɵproperty("ngIf", ctx.data.showCloseIcon);
|
|
102
|
+
i0.ɵɵadvance(2);
|
|
103
|
+
i0.ɵɵproperty("ngIf", ctx.data.content);
|
|
104
|
+
i0.ɵɵadvance(1);
|
|
105
|
+
i0.ɵɵproperty("ngIf", ctx.data.removeTextConfirm);
|
|
106
|
+
i0.ɵɵadvance(2);
|
|
107
|
+
i0.ɵɵproperty("btnDisabled", ctx.isConfirmDisabled())("icon", ctx.data.confirmIcon)("label", ctx.data.confirmText);
|
|
108
|
+
}
|
|
109
|
+
}, directives: [i2.NgIf, i1.MatDialogContent, i1.MatDialogActions, i3.SecondaryButtonComponent, i1.MatDialogTitle, i4.IconComponent, i5.InputTextComponent, i6.NgControlStatus, i6.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%}"] });
|
|
110
|
+
/*@__PURE__*/ (function () {
|
|
111
|
+
i0.ɵsetClassMetadata(ConfirmRemoveModalDataComponent, [{
|
|
112
|
+
type: i0.Component,
|
|
113
|
+
args: [{
|
|
114
|
+
selector: 'confirm-remove-modal-data',
|
|
115
|
+
templateUrl: 'confirm-remove-modal.component.html',
|
|
116
|
+
styleUrls: ['confirm-remove-modal.component.scss']
|
|
117
|
+
}]
|
|
118
|
+
}], function () {
|
|
119
|
+
return [{ type: i1.MatDialogRef }, { type: ConfirmRemoveDialogData, decorators: [{
|
|
120
|
+
type: i0.Inject,
|
|
121
|
+
args: [i1.MAT_DIALOG_DATA]
|
|
122
|
+
}] }];
|
|
123
|
+
}, null);
|
|
124
|
+
})();
|
|
46
125
|
|
|
47
|
-
var ModalsModule = /** @class */ (function () {
|
|
48
|
-
function ModalsModule() {
|
|
49
|
-
}
|
|
50
|
-
return ModalsModule;
|
|
51
|
-
}());
|
|
52
|
-
ModalsModule
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
126
|
+
var ModalsModule = /** @class */ (function () {
|
|
127
|
+
function ModalsModule() {
|
|
128
|
+
}
|
|
129
|
+
return ModalsModule;
|
|
130
|
+
}());
|
|
131
|
+
ModalsModule.ɵmod = i0.ɵɵdefineNgModule({ type: ModalsModule });
|
|
132
|
+
ModalsModule.ɵinj = i0.ɵɵdefineInjector({ factory: function ModalsModule_Factory(t) { return new (t || ModalsModule)(); }, providers: [], imports: [[
|
|
133
|
+
i2.CommonModule,
|
|
134
|
+
i1.MatDialogModule,
|
|
135
|
+
formField.MatFormFieldModule,
|
|
136
|
+
i6.FormsModule,
|
|
137
|
+
input.MatInputModule,
|
|
138
|
+
i5.InputsModule,
|
|
139
|
+
i3.ButtonsModule,
|
|
140
|
+
i4.IconsModule,
|
|
141
|
+
]] });
|
|
142
|
+
(function () {
|
|
143
|
+
(typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ModalsModule, { declarations: [ConfirmRemoveModalDataComponent], imports: [i2.CommonModule,
|
|
144
|
+
i1.MatDialogModule,
|
|
145
|
+
formField.MatFormFieldModule,
|
|
146
|
+
i6.FormsModule,
|
|
147
|
+
input.MatInputModule,
|
|
148
|
+
i5.InputsModule,
|
|
149
|
+
i3.ButtonsModule,
|
|
150
|
+
i4.IconsModule], exports: [ConfirmRemoveModalDataComponent] });
|
|
151
|
+
})();
|
|
152
|
+
/*@__PURE__*/ (function () {
|
|
153
|
+
i0.ɵsetClassMetadata(ModalsModule, [{
|
|
154
|
+
type: i0.NgModule,
|
|
155
|
+
args: [{
|
|
156
|
+
imports: [
|
|
157
|
+
i2.CommonModule,
|
|
158
|
+
i1.MatDialogModule,
|
|
159
|
+
formField.MatFormFieldModule,
|
|
160
|
+
i6.FormsModule,
|
|
161
|
+
input.MatInputModule,
|
|
162
|
+
i5.InputsModule,
|
|
163
|
+
i3.ButtonsModule,
|
|
164
|
+
i4.IconsModule,
|
|
165
|
+
],
|
|
166
|
+
declarations: [
|
|
167
|
+
ConfirmRemoveModalDataComponent
|
|
168
|
+
],
|
|
169
|
+
exports: [
|
|
170
|
+
ConfirmRemoveModalDataComponent
|
|
171
|
+
],
|
|
172
|
+
providers: []
|
|
173
|
+
}]
|
|
174
|
+
}], null, null);
|
|
175
|
+
})();
|
|
73
176
|
|
|
74
|
-
/**
|
|
75
|
-
* Generated bundle index. Do not edit.
|
|
177
|
+
/**
|
|
178
|
+
* Generated bundle index. Do not edit.
|
|
76
179
|
*/
|
|
77
180
|
|
|
78
|
-
Object.keys(
|
|
181
|
+
Object.keys(i1).forEach(function (k) {
|
|
79
182
|
if (k !== 'default') Object.defineProperty(exports, k, {
|
|
80
183
|
enumerable: true,
|
|
81
184
|
get: function () {
|
|
82
|
-
return
|
|
185
|
+
return i1[k];
|
|
83
186
|
}
|
|
84
187
|
});
|
|
85
188
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apipass-modals.umd.js","sources":["../../../projects/modals/src/lib/confirm-remove-modal.component.ts","../../../projects/modals/src/modals.module.ts","../../../projects/modals/src/apipass-modals.ts"],"sourcesContent":["import {Component, Inject} from '@angular/core';\
|
|
1
|
+
{"version":3,"file":"apipass-modals.umd.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","MAT_DIALOG_DATA","i0.ɵɵtemplate","Component","Inject","CommonModule","MatDialogModule","MatFormFieldModule","FormsModule","MatInputModule","InputsModule","ButtonsModule","IconsModule","NgModule"],"mappings":";;;;;;;;YACEA,6BACE;YAAAC,YACF;YAAAC,iBAAK;;;;YADHC,eACF;YADEC,kDACF;;;;;;YACAJ,+BAAyI;YAAhCK,sMAAwB;YAACH,iBAAO;;;;YAA1DI,8CAAyB;;;;;YAIxGC,wBAAuD;;;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mC,8BAAA,+BAAA;;;;6BCQ1C,+BAA+B;sBAL3CI,YAAS;uBAAC;wBACT,QAAQ,EAAE,2BAA2B;wBACrC,WAAW,EAAE,qCAAqC;wBAClD,SAAS,EAAE,CAAC,qCAAqC,CAAC;qBACnD;;uDAKyC,uBAAuB;kCAA5DC,SAAM;mCAACH,kBAAe;;;;;;QCK3B;;;;oDAAa,YAAY;2GAAZ,YAAY,mBAFZ,EAAE,YAhBJ;gBACPI,eAAY;gBACZC,kBAAe;gBACfC,4BAAkB;gBAClBC,cAAW;gBACXC,oBAAc;gBACdC,eAAY;gBACZC,gBAAa;gBACbC,cAAW;aACZ;;iFASU,YAAY,mBAPrB,+BAA+B,aAV/BP,eAAY;gBACZC,kBAAe;gBACfC,4BAAkB;gBAClBC,cAAW;gBACXC,oBAAc;gBACdC,eAAY;gBACZC,gBAAa;gBACbC,cAAW,aAMX,+BAA+B;;;6BAItB,YAAY;sBAnBxBC,WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPR,eAAY;4BACZC,kBAAe;4BACfC,4BAAkB;4BAClBC,cAAW;4BACXC,oBAAc;4BACdC,eAAY;4BACZC,gBAAa;4BACbC,cAAW;yBACZ;wBACD,YAAY,EAAE;4BACZ,+BAA+B;yBAChC;wBACD,OAAO,EAAE;4BACP,+BAA+B;yBAChC;wBACD,SAAS,EAAE,EAAE;qBACd;;;;IC7BD;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/material/dialog"),require("@angular/core"),require("@angular/common"),require("@apipass/buttons"),require("@apipass/icons"),require("@apipass/inputs"),require("@angular/forms"),require("@angular/material/form-field"),require("@angular/material/input")):"function"==typeof define&&define.amd?define("@apipass/modals",["exports","@angular/material/dialog","@angular/core","@angular/common","@apipass/buttons","@apipass/icons","@apipass/inputs","@angular/forms","@angular/material/form-field","@angular/material/input"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).apipass=e.apipass||{},e.apipass.modals={}),e.ng.material.dialog,e.ng.core,e.ng.common,e.i3,e.i4,e.i5,e.ng.forms,e.ng.material.formField,e.ng.material.input)}(this,(function(e,t,n,o,a,i,l,r,d,c){"use strict";function m(e,t){if(1&e&&(n.ɵɵelementStart(0,"h3",8),n.ɵɵtext(1),n.ɵɵelementEnd()),2&e){var o=n.ɵɵnextContext();n.ɵɵadvance(1),n.ɵɵtextInterpolate1(" ",o.data.title," ")}}function s(e,t){if(1&e){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"icon",9),n.ɵɵlistener("onClick",(function(){return n.ɵɵrestoreView(o),n.ɵɵnextContext().closeClick()})),n.ɵɵelementEnd()}if(2&e){var a=n.ɵɵnextContext();n.ɵɵproperty("title",a.data.closeLabel)}}function u(e,t){if(1&e&&n.ɵɵelement(0,"p",10),2&e){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.content,n.ɵɵsanitizeHtml)}}function p(e,t){if(1&e){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"input-text",11),n.ɵɵlistener("ngModelChange",(function(e){return n.ɵɵrestoreView(o),n.ɵɵnextContext().data.removeText=e})),n.ɵɵelementEnd()}if(2&e){var a=n.ɵɵnextContext();n.ɵɵproperty("label",a.data.removeTextLabel)("ngModel",a.data.removeText)}}var f=function(){},g=function(){function e(e,t){this.dialogRef=e,this.data=t}return e.prototype.closeClick=function(){this.dialogRef.close()},e.prototype.confirmClick=function(){var e,t,n;(null===(e=this.data)||void 0===e?void 0:e.removeTextConfirm)&&(null===(t=this.data)||void 0===t?void 0:t.removeText)!==(null===(n=this.data)||void 0===n?void 0:n.removeTextConfirm)||this.dialogRef.close(this.data)},e.prototype.isConfirmDisabled=function(){var e,t,n;return!!(null===(e=this.data)||void 0===e?void 0:e.removeTextConfirm)&&(null===(t=this.data)||void 0===t?void 0:t.removeText)!==(null===(n=this.data)||void 0===n?void 0:n.removeTextConfirm)},e}();g.ɵfac=function(e){return new(e||g)(n.ɵɵdirectiveInject(t.MatDialogRef),n.ɵɵdirectiveInject(t.MAT_DIALOG_DATA))},g.ɵcmp=n.ɵɵdefineComponent({type:g,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(e,t){1&e&&(n.ɵɵelementStart(0,"div",0),n.ɵɵtemplate(1,m,2,1,"h3",1),n.ɵɵtemplate(2,s,1,1,"icon",2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"div",3),n.ɵɵtemplate(4,u,1,1,"p",4),n.ɵɵtemplate(5,p,1,2,"input-text",5),n.ɵɵelementEnd(),n.ɵɵelementStart(6,"div",6),n.ɵɵelementStart(7,"secondary-button",7),n.ɵɵlistener("onClick",(function(){return t.confirmClick()})),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&e&&(n.ɵɵadvance(1),n.ɵɵproperty("ngIf",t.data.title),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",t.data.showCloseIcon),n.ɵɵadvance(2),n.ɵɵproperty("ngIf",t.data.content),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",t.data.removeTextConfirm),n.ɵɵadvance(2),n.ɵɵproperty("btnDisabled",t.isConfirmDisabled())("icon",t.data.confirmIcon)("label",t.data.confirmText))},directives:[o.NgIf,t.MatDialogContent,t.MatDialogActions,a.SecondaryButtonComponent,t.MatDialogTitle,i.IconComponent,l.InputTextComponent,r.NgControlStatus,r.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%}"]});var M=function(){};M.ɵmod=n.ɵɵdefineNgModule({type:M}),M.ɵinj=n.ɵɵdefineInjector({factory:function(e){return new(e||M)},providers:[],imports:[[o.CommonModule,t.MatDialogModule,d.MatFormFieldModule,r.FormsModule,c.MatInputModule,l.InputsModule,a.ButtonsModule,i.IconsModule]]}),("undefined"==typeof ngJitMode||ngJitMode)&&n.ɵɵsetNgModuleScope(M,{declarations:[g],imports:[o.CommonModule,t.MatDialogModule,d.MatFormFieldModule,r.FormsModule,c.MatInputModule,l.InputsModule,a.ButtonsModule,i.IconsModule],exports:[g]}),Object.keys(t).forEach((function(n){"default"!==n&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),e.ConfirmRemoveDialogData=f,e.ConfirmRemoveModalDataComponent=g,e.ModalsModule=M,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=apipass-modals.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../projects/modals/src/lib/confirm-remove-modal.component.ts","../../../projects/modals/src/modals.module.ts"],"names":["
|
|
1
|
+
{"version":3,"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"],"names":["i0.ɵɵelementStart","i0.ɵɵtext","i0.ɵɵelementEnd","i0.ɵɵadvance","i0.ɵɵtextInterpolate1","i0.ɵɵlistener","i0.ɵɵproperty","i0.ɵɵelement","ctx_r3","data","removeText","ConfirmRemoveModalDataComponent","dialogRef","this","prototype","closeClick","close","confirmClick","_a","removeTextConfirm","_b","_c","isConfirmDisabled","i0","ɵɵdirectiveInject","i1","MatDialogRef","MAT_DIALOG_DATA","selectors","decls","vars","consts","template","rf","ctx","i0.ɵɵtemplate","confirmIcon","confirmText","ModalsModule","providers","imports","CommonModule","MatDialogModule","MatFormFieldModule","FormsModule","MatInputModule","InputsModule","ButtonsModule","IconsModule","declarations","exports"],"mappings":"y4BACEA,EAAAA,eAAAA,EAAAA,KAAAA,GACEC,EAAAA,OAAAA,GACFC,EAAAA,6CADEC,EAAAA,UAAAA,GAAAC,EAAAA,mBAAAA,IAAAA,EAAAA,KAAAA,MAAAA,yDAEFJ,EAAAA,eAAAA,EAAAA,OAAAA,GAAyGK,EAAAA,WAAAA,WAAAA,WAAAA,OAAAA,EAAAA,cAAAA,GAAAA,EAAAA,gBAAAA,gBAAyBH,EAAAA,+CAAnDI,EAAAA,WAAAA,QAAAA,EAAAA,KAAAA,qCAI/EC,EAAAA,UAAAA,EAAAA,IAAAA,iCAAwBD,EAAAA,WAAAA,YAAAA,EAAAA,KAAAA,QAAAA,EAAAA,oEACxBN,EAAAA,eAAAA,EAAAA,aAAAA,IAA0EK,EAAAA,WAAAA,iBAAAA,SAAAA,GAAAA,OAAAA,EAAAA,cAAAA,GAAAA,EAAAA,gBAAAA,KAAAA,WAAAA,KAA8BH,EAAAA,+CAA7DI,EAAAA,WAAAA,QAAAA,EAAAA,KAAAA,gBAAAA,CAA8B,UAAAE,EAAAC,KAAAC,mBCN3E,0BAoBE,SAAAC,EACSC,EACyBH,GADzBI,KAAAD,UAAAA,EACyBC,KAAAJ,KAAAA,SAIlCE,EAAAG,UAAAC,WAAA,WACEF,KAAKD,UAAUI,SAGjBL,EAAAG,UAAAG,aAAA,sBACgB,QAAVC,EAACL,KAAKJ,YAAI,IAAAS,OAAA,EAAAA,EAAEC,qB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A,GACAA,EAAAA,WAAAA,EAAAA,EAAAA,EAAAA,EAAAA,aAAAA,GACFjC,EAAAA,eAEAF,EAAAA,eAAAA,EAAAA,MAAAA,GACEA,EAAAA,eAAAA,EAAAA,mBAAAA,GAA2GK,EAAAA,WAAAA,WAAAA,WAAAA,OAAW6B,EAAAjB,kBAAgBf,EAAAA,eACxIA,EAAAA,sBAbMC,EAAAA,UAAAA,GAAAG,EAAAA,WAAAA,OAAAA,EAAAA,KAAAA,OAGEH,EAAAA,UAAAA,GAAAG,EAAAA,WAAAA,OAAAA,EAAAA,KAAAA,eAIHH,EAAAA,UAAAA,GAAAG,EAAAA,WAAAA,OAAAA,EAAAA,KAAAA,SACSH,EAAAA,UAAAA,GAAAG,EAAAA,WAAAA,OAAAA,EAAAA,KAAAA,mBAIMH,EAAAA,UAAAA,GAAAG,EAAAA,WAAAA,cAAAA,EAAAA,oBAAAA,CAAmC,OAAA4B,EAAAzB,KAAA2B,YAAnC9B,CAAmC,QAAA4B,EAAAzB,KAAA4B,4yBEiBvD,6CAAaC,iEAAAA,IAAYC,UAFZ,GAAEC,QAAA,CAhBJ,CACPC,EAAAA,aACAC,EAAAA,gBACAC,EAAAA,mBACAC,EAAAA,YACAC,EAAAA,eACAC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,iFAUSV,EAAY,CAAAW,aAAA,CAPrBtC,GAA+B6B,QAAA,CAV/BC,EAAAA,aACAC,EAAAA,gBACAC,EAAAA,mBACAC,EAAAA,YACAC,EAAAA,eACAC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,aAAWE,QAAA,CAMXvC","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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpcGFzcy1tb2RhbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9tb2RhbHMvc3JjL2FwaXBhc3MtbW9kYWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=
|
|
@@ -1,38 +1,105 @@
|
|
|
1
|
-
import { Component, Inject } from '@angular/core';
|
|
2
|
-
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/material/dialog";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
import * as i3 from "@apipass/buttons";
|
|
7
|
+
import * as i4 from "@apipass/icons";
|
|
8
|
+
import * as i5 from "@apipass/inputs";
|
|
9
|
+
import * as i6 from "@angular/forms";
|
|
10
|
+
function ConfirmRemoveModalDataComponent_h3_1_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
+
i0.ɵɵelementStart(0, "h3", 8);
|
|
12
|
+
i0.ɵɵtext(1);
|
|
13
|
+
i0.ɵɵelementEnd();
|
|
14
|
+
} if (rf & 2) {
|
|
15
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
16
|
+
i0.ɵɵadvance(1);
|
|
17
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.data.title, " ");
|
|
18
|
+
} }
|
|
19
|
+
function ConfirmRemoveModalDataComponent_icon_2_Template(rf, ctx) { if (rf & 1) {
|
|
20
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
21
|
+
i0.ɵɵelementStart(0, "icon", 9);
|
|
22
|
+
i0.ɵɵlistener("onClick", function ConfirmRemoveModalDataComponent_icon_2_Template_icon_onClick_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.closeClick(); });
|
|
23
|
+
i0.ɵɵelementEnd();
|
|
24
|
+
} if (rf & 2) {
|
|
25
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
26
|
+
i0.ɵɵproperty("title", ctx_r1.data.closeLabel);
|
|
27
|
+
} }
|
|
28
|
+
function ConfirmRemoveModalDataComponent_p_4_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
+
i0.ɵɵelement(0, "p", 10);
|
|
30
|
+
} if (rf & 2) {
|
|
31
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
32
|
+
i0.ɵɵproperty("innerHTML", ctx_r2.data.content, i0.ɵɵsanitizeHtml);
|
|
33
|
+
} }
|
|
34
|
+
function ConfirmRemoveModalDataComponent_input_text_5_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
36
|
+
i0.ɵɵelementStart(0, "input-text", 11);
|
|
37
|
+
i0.ɵɵlistener("ngModelChange", function ConfirmRemoveModalDataComponent_input_text_5_Template_input_text_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.data.removeText = $event; });
|
|
38
|
+
i0.ɵɵelementEnd();
|
|
39
|
+
} if (rf & 2) {
|
|
40
|
+
const ctx_r3 = i0.ɵɵnextContext();
|
|
41
|
+
i0.ɵɵproperty("label", ctx_r3.data.removeTextLabel)("ngModel", ctx_r3.data.removeText);
|
|
42
|
+
} }
|
|
43
|
+
export class ConfirmRemoveDialogData {
|
|
44
|
+
}
|
|
45
|
+
export class ConfirmRemoveModalDataComponent {
|
|
46
|
+
constructor(dialogRef, data) {
|
|
47
|
+
this.dialogRef = dialogRef;
|
|
48
|
+
this.data = data;
|
|
49
|
+
}
|
|
50
|
+
closeClick() {
|
|
51
|
+
this.dialogRef.close();
|
|
52
|
+
}
|
|
53
|
+
confirmClick() {
|
|
54
|
+
var _a, _b, _c;
|
|
55
|
+
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)) {
|
|
56
|
+
this.dialogRef.close(this.data);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
isConfirmDisabled() {
|
|
60
|
+
var _a, _b, _c;
|
|
61
|
+
if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeTextConfirm)) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeText) !== ((_c = this.data) === null || _c === void 0 ? void 0 : _c.removeTextConfirm);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
ConfirmRemoveModalDataComponent.ɵfac = function ConfirmRemoveModalDataComponent_Factory(t) { return new (t || ConfirmRemoveModalDataComponent)(i0.ɵɵdirectiveInject(i1.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
|
|
68
|
+
ConfirmRemoveModalDataComponent.ɵcmp = i0.ɵɵ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) {
|
|
69
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
70
|
+
i0.ɵɵtemplate(1, ConfirmRemoveModalDataComponent_h3_1_Template, 2, 1, "h3", 1);
|
|
71
|
+
i0.ɵɵtemplate(2, ConfirmRemoveModalDataComponent_icon_2_Template, 1, 1, "icon", 2);
|
|
72
|
+
i0.ɵɵelementEnd();
|
|
73
|
+
i0.ɵɵelementStart(3, "div", 3);
|
|
74
|
+
i0.ɵɵtemplate(4, ConfirmRemoveModalDataComponent_p_4_Template, 1, 1, "p", 4);
|
|
75
|
+
i0.ɵɵtemplate(5, ConfirmRemoveModalDataComponent_input_text_5_Template, 1, 2, "input-text", 5);
|
|
76
|
+
i0.ɵɵelementEnd();
|
|
77
|
+
i0.ɵɵelementStart(6, "div", 6);
|
|
78
|
+
i0.ɵɵelementStart(7, "secondary-button", 7);
|
|
79
|
+
i0.ɵɵlistener("onClick", function ConfirmRemoveModalDataComponent_Template_secondary_button_onClick_7_listener() { return ctx.confirmClick(); });
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
i0.ɵɵelementEnd();
|
|
82
|
+
} if (rf & 2) {
|
|
83
|
+
i0.ɵɵadvance(1);
|
|
84
|
+
i0.ɵɵproperty("ngIf", ctx.data.title);
|
|
85
|
+
i0.ɵɵadvance(1);
|
|
86
|
+
i0.ɵɵproperty("ngIf", ctx.data.showCloseIcon);
|
|
87
|
+
i0.ɵɵadvance(2);
|
|
88
|
+
i0.ɵɵproperty("ngIf", ctx.data.content);
|
|
89
|
+
i0.ɵɵadvance(1);
|
|
90
|
+
i0.ɵɵproperty("ngIf", ctx.data.removeTextConfirm);
|
|
91
|
+
i0.ɵɵadvance(2);
|
|
92
|
+
i0.ɵɵproperty("btnDisabled", ctx.isConfirmDisabled())("icon", ctx.data.confirmIcon)("label", ctx.data.confirmText);
|
|
93
|
+
} }, directives: [i2.NgIf, i1.MatDialogContent, i1.MatDialogActions, i3.SecondaryButtonComponent, i1.MatDialogTitle, i4.IconComponent, i5.InputTextComponent, i6.NgControlStatus, i6.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%}"] });
|
|
94
|
+
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ConfirmRemoveModalDataComponent, [{
|
|
95
|
+
type: Component,
|
|
96
|
+
args: [{
|
|
97
|
+
selector: 'confirm-remove-modal-data',
|
|
98
|
+
templateUrl: 'confirm-remove-modal.component.html',
|
|
99
|
+
styleUrls: ['confirm-remove-modal.component.scss']
|
|
100
|
+
}]
|
|
101
|
+
}], function () { return [{ type: i1.MatDialogRef }, { type: ConfirmRemoveDialogData, decorators: [{
|
|
102
|
+
type: Inject,
|
|
103
|
+
args: [MAT_DIALOG_DATA]
|
|
104
|
+
}] }]; }, null); })();
|
|
105
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1yZW1vdmUtbW9kYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbW9kYWxzL3NyYy9saWIvY29uZmlybS1yZW1vdmUtbW9kYWwuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vcHJvamVjdHMvbW9kYWxzL3NyYy9saWIvY29uZmlybS1yZW1vdmUtbW9kYWwuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxNQUFNLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDaEQsT0FBTyxFQUFDLGVBQWUsRUFBRSxZQUFZLEVBQUMsTUFBTSwwQkFBMEIsQ0FBQzs7Ozs7Ozs7O0lDQXJFLDZCQUNFO0lBQUEsWUFDRjtJQUFBLGlCQUFLOzs7SUFESCxlQUNGO0lBREUsa0R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yeS1idXR0b24+XG48L2Rpdj5cbiJdfQ==
|
package/esm2015/modals.module.js
CHANGED
|
@@ -1,34 +1,55 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { ConfirmRemoveModalDataComponent } from './lib/confirm-remove-modal.component';
|
|
4
|
-
import { MatDialogModule } from '@angular/material/dialog';
|
|
5
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
|
-
import { FormsModule } from '@angular/forms';
|
|
7
|
-
import { MatInputModule } from '@angular/material/input';
|
|
8
|
-
import { ButtonsModule } from '@apipass/buttons';
|
|
9
|
-
import { IconsModule } from '@apipass/icons';
|
|
10
|
-
import { InputsModule } from '@apipass/inputs';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ConfirmRemoveModalDataComponent } from './lib/confirm-remove-modal.component';
|
|
4
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
5
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import { MatInputModule } from '@angular/material/input';
|
|
8
|
+
import { ButtonsModule } from '@apipass/buttons';
|
|
9
|
+
import { IconsModule } from '@apipass/icons';
|
|
10
|
+
import { InputsModule } from '@apipass/inputs';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export class ModalsModule {
|
|
13
|
+
}
|
|
14
|
+
ModalsModule.ɵmod = i0.ɵɵdefineNgModule({ type: ModalsModule });
|
|
15
|
+
ModalsModule.ɵinj = i0.ɵɵdefineInjector({ factory: function ModalsModule_Factory(t) { return new (t || ModalsModule)(); }, providers: [], imports: [[
|
|
16
|
+
CommonModule,
|
|
17
|
+
MatDialogModule,
|
|
18
|
+
MatFormFieldModule,
|
|
19
|
+
FormsModule,
|
|
20
|
+
MatInputModule,
|
|
21
|
+
InputsModule,
|
|
22
|
+
ButtonsModule,
|
|
23
|
+
IconsModule,
|
|
24
|
+
]] });
|
|
25
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ModalsModule, { declarations: [ConfirmRemoveModalDataComponent], imports: [CommonModule,
|
|
26
|
+
MatDialogModule,
|
|
27
|
+
MatFormFieldModule,
|
|
28
|
+
FormsModule,
|
|
29
|
+
MatInputModule,
|
|
30
|
+
InputsModule,
|
|
31
|
+
ButtonsModule,
|
|
32
|
+
IconsModule], exports: [ConfirmRemoveModalDataComponent] }); })();
|
|
33
|
+
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ModalsModule, [{
|
|
34
|
+
type: NgModule,
|
|
35
|
+
args: [{
|
|
36
|
+
imports: [
|
|
37
|
+
CommonModule,
|
|
38
|
+
MatDialogModule,
|
|
39
|
+
MatFormFieldModule,
|
|
40
|
+
FormsModule,
|
|
41
|
+
MatInputModule,
|
|
42
|
+
InputsModule,
|
|
43
|
+
ButtonsModule,
|
|
44
|
+
IconsModule,
|
|
45
|
+
],
|
|
46
|
+
declarations: [
|
|
47
|
+
ConfirmRemoveModalDataComponent
|
|
48
|
+
],
|
|
49
|
+
exports: [
|
|
50
|
+
ConfirmRemoveModalDataComponent
|
|
51
|
+
],
|
|
52
|
+
providers: []
|
|
53
|
+
}]
|
|
54
|
+
}], null, null); })();
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWxzLm1vZHVsZS5qcyIsInNvdXJ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W9kdWxlfSBmcm9tICdAYXBpcGFzcy9pbnB1dHMnO1xuXG5ATmdNb2R1bGUoe1xuICBpbXBvcnRzOiBbXG4gICAgQ29tbW9uTW9kdWxlLFxuICAgIE1hdERpYWxvZ01vZHVsZSxcbiAgICBNYXRGb3JtRmllbGRNb2R1bGUsXG4gICAgRm9ybXNNb2R1bGUsXG4gICAgTWF0SW5wdXRNb2R1bGUsXG4gICAgSW5wdXRzTW9kdWxlLFxuICAgIEJ1dHRvbnNNb2R1bGUsXG4gICAgSWNvbnNNb2R1bGUsXG4gIF0sXG4gIGRlY2xhcmF0aW9uczogW1xuICAgIENvbmZpcm1SZW1vdmVNb2RhbERhdGFDb21wb25lbnRcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIENvbmZpcm1SZW1vdmVNb2RhbERhdGFDb21wb25lbnRcbiAgXSxcbiAgcHJvdmlkZXJzOiBbXVxufSlcbmV4cG9ydCBjbGFzcyBNb2RhbHNNb2R1bGUgeyB9XG4iXX0=
|
package/esm2015/public-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from '@angular/material/dialog';
|
|
2
|
-
export * from './modals.module';
|
|
3
|
-
export * from './lib/confirm-remove-modal.component';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from '@angular/material/dialog';
|
|
2
|
+
export * from './modals.module';
|
|
3
|
+
export * from './lib/confirm-remove-modal.component';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL21vZGFscy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxzQ0FBc0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJ0Bhbmd1bGFyL21hdGVyaWFsL2RpYWxvZyc7XG5leHBvcnQgKiBmcm9tICcuL21vZGFscy5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29uZmlybS1yZW1vdmUtbW9kYWwuY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -1,76 +1,156 @@
|
|
|
1
|
-
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
1
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogContent, MatDialogActions, MatDialogTitle, MatDialogModule } from '@angular/material/dialog';
|
|
2
2
|
export * from '@angular/material/dialog';
|
|
3
|
-
import { Component, Inject, NgModule } from '@angular/core';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
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';
|
|
5
9
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
|
-
import { FormsModule } from '@angular/forms';
|
|
7
10
|
import { MatInputModule } from '@angular/material/input';
|
|
8
|
-
import { ButtonsModule } from '@apipass/buttons';
|
|
9
|
-
import { IconsModule } from '@apipass/icons';
|
|
10
|
-
import { InputsModule } from '@apipass/inputs';
|
|
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
|
-
|
|
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); })();
|
|
47
107
|
|
|
48
|
-
class ModalsModule {
|
|
49
|
-
}
|
|
50
|
-
ModalsModule
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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); })();
|
|
71
151
|
|
|
72
|
-
/**
|
|
73
|
-
* Generated bundle index. Do not edit.
|
|
152
|
+
/**
|
|
153
|
+
* Generated bundle index. Do not edit.
|
|
74
154
|
*/
|
|
75
155
|
|
|
76
156
|
export { ConfirmRemoveDialogData, ConfirmRemoveModalDataComponent, ModalsModule };
|
|
@@ -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":["import {Component, Inject} from '@angular/core';\
|
|
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,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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,21 +1,24 @@
|
|
|
1
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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",
|
|
@@ -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,3 +1,3 @@
|
|
|
1
|
-
export * from '@angular/material/dialog';
|
|
2
|
-
export * from './modals.module';
|
|
3
|
-
export * from './lib/confirm-remove-modal.component';
|
|
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,"exports":[{"from":"@angular/material/dialog"}],"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":"ConfirmRemoveModalDataComponent"}],"exports":[{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}],"providers":[]}]}],"members":{}},"ConfirmRemoveDialogData":{"__symbolic":"class","members":{}},"ConfirmRemoveModalDataComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":16,"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":25,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MAT_DIALOG_DATA","line":25,"character":12}]}]],"parameters":[{"__symbolic":"reference","name":"MatDialogRef","module":"@angular/material/dialog","arguments":[{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}]},{"__symbolic":"reference","name":"ConfirmRemoveDialogData"}]}],"closeClick":[{"__symbolic":"method"}],"confirmClick":[{"__symbolic":"method"}],"isConfirmDisabled":[{"__symbolic":"method"}]}}},"origins":{"ModalsModule":"./modals.module","ConfirmRemoveDialogData":"./lib/confirm-remove-modal.component","ConfirmRemoveModalDataComponent":"./lib/confirm-remove-modal.component"},"importAs":"@apipass/modals"}
|