@apipass/modals 0.2.5-alpha.14 → 0.2.5-alpha.16
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/bundles/apipass-modals.umd.js +103 -0
- 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/lib/modal-header/modal-header.component.js +97 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/apipass-modals.js +97 -2
- package/fesm2015/apipass-modals.js.map +1 -1
- package/lib/modal-header/modal-header.component.d.ts +16 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -271,6 +271,108 @@
|
|
|
271
271
|
}], null, null);
|
|
272
272
|
})();
|
|
273
273
|
|
|
274
|
+
function ModalHeaderComponent_div_2_icon_1_Template(rf, ctx) {
|
|
275
|
+
if (rf & 1) {
|
|
276
|
+
var _r4_1 = i0.ɵɵgetCurrentView();
|
|
277
|
+
i0.ɵɵelementStart(0, "icon", 6);
|
|
278
|
+
i0.ɵɵlistener("onClick", function ModalHeaderComponent_div_2_icon_1_Template_icon_onClick_0_listener() { i0.ɵɵrestoreView(_r4_1); var ctx_r3 = i0.ɵɵnextContext(2); return ctx_r3.changeExpand(); });
|
|
279
|
+
i0.ɵɵelementEnd();
|
|
280
|
+
}
|
|
281
|
+
if (rf & 2) {
|
|
282
|
+
var ctx_r1 = i0.ɵɵnextContext(2);
|
|
283
|
+
i0.ɵɵproperty("size", 13)("name", !ctx_r1.expanded ? "fa fa-expand-arrows-alt" : "fa fa-compress")("title", ctx_r1.titleExpand);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function ModalHeaderComponent_div_2_icon_2_Template(rf, ctx) {
|
|
287
|
+
if (rf & 1) {
|
|
288
|
+
var _r6_1 = i0.ɵɵgetCurrentView();
|
|
289
|
+
i0.ɵɵelementStart(0, "icon", 7);
|
|
290
|
+
i0.ɵɵlistener("onClick", function ModalHeaderComponent_div_2_icon_2_Template_icon_onClick_0_listener() { i0.ɵɵrestoreView(_r6_1); var ctx_r5 = i0.ɵɵnextContext(2); return ctx_r5.closeClick.next(); });
|
|
291
|
+
i0.ɵɵelementEnd();
|
|
292
|
+
}
|
|
293
|
+
if (rf & 2) {
|
|
294
|
+
var ctx_r2 = i0.ɵɵnextContext(2);
|
|
295
|
+
i0.ɵɵproperty("title", ctx_r2.titleClose);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
function ModalHeaderComponent_div_2_Template(rf, ctx) {
|
|
299
|
+
if (rf & 1) {
|
|
300
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
301
|
+
i0.ɵɵtemplate(1, ModalHeaderComponent_div_2_icon_1_Template, 1, 3, "icon", 4);
|
|
302
|
+
i0.ɵɵtemplate(2, ModalHeaderComponent_div_2_icon_2_Template, 1, 1, "icon", 5);
|
|
303
|
+
i0.ɵɵelementEnd();
|
|
304
|
+
}
|
|
305
|
+
if (rf & 2) {
|
|
306
|
+
var ctx_r0 = i0.ɵɵnextContext();
|
|
307
|
+
i0.ɵɵadvance(1);
|
|
308
|
+
i0.ɵɵproperty("ngIf", ctx_r0.showExpandIcon);
|
|
309
|
+
i0.ɵɵadvance(1);
|
|
310
|
+
i0.ɵɵproperty("ngIf", ctx_r0.showCloseIcon);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
var ModalHeaderComponent = /** @class */ (function () {
|
|
314
|
+
function ModalHeaderComponent() {
|
|
315
|
+
this.expanded = false;
|
|
316
|
+
this.showExpandIcon = false;
|
|
317
|
+
this.showCloseIcon = false;
|
|
318
|
+
this.titleClose = 'Close';
|
|
319
|
+
this.titleExpand = 'Expand';
|
|
320
|
+
this.closeClick = new i0.EventEmitter();
|
|
321
|
+
}
|
|
322
|
+
ModalHeaderComponent.prototype.changeExpand = function () {
|
|
323
|
+
var _a, _b;
|
|
324
|
+
this.expanded = !this.expanded;
|
|
325
|
+
if (this.expanded) {
|
|
326
|
+
(_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.addPanelClass('mod-expanded');
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
(_b = this.dialogRef) === null || _b === void 0 ? void 0 : _b.removePanelClass('mod-expanded');
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
return ModalHeaderComponent;
|
|
333
|
+
}());
|
|
334
|
+
ModalHeaderComponent.ɵfac = function ModalHeaderComponent_Factory(t) { return new (t || ModalHeaderComponent)(); };
|
|
335
|
+
ModalHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ModalHeaderComponent, selectors: [["modal-header"]], inputs: { title: "title", expanded: "expanded", showExpandIcon: "showExpandIcon", showCloseIcon: "showCloseIcon", titleClose: "titleClose", titleExpand: "titleExpand", dialogRef: "dialogRef" }, outputs: { closeClick: "closeClick" }, decls: 3, vars: 2, consts: [[1, "modal-title"], ["mat-dialog-title", "", 3, "innerHTML"], ["class", "modal-title-actions", 4, "ngIf"], [1, "modal-title-actions"], ["type", "primary clickable", 3, "size", "name", "title", "onClick", 4, "ngIf"], ["type", "tertiary clickable", "name", "fas fa-times", 3, "title", "onClick", 4, "ngIf"], ["type", "primary clickable", 3, "size", "name", "title", "onClick"], ["type", "tertiary clickable", "name", "fas fa-times", 3, "title", "onClick"]], template: function ModalHeaderComponent_Template(rf, ctx) {
|
|
336
|
+
if (rf & 1) {
|
|
337
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
338
|
+
i0.ɵɵelement(1, "h3", 1);
|
|
339
|
+
i0.ɵɵtemplate(2, ModalHeaderComponent_div_2_Template, 3, 2, "div", 2);
|
|
340
|
+
i0.ɵɵelementEnd();
|
|
341
|
+
}
|
|
342
|
+
if (rf & 2) {
|
|
343
|
+
i0.ɵɵadvance(1);
|
|
344
|
+
i0.ɵɵproperty("innerHTML", ctx.title, i0.ɵɵsanitizeHtml);
|
|
345
|
+
i0.ɵɵadvance(1);
|
|
346
|
+
i0.ɵɵproperty("ngIf", ctx.showExpandIcon || ctx.showCloseIcon);
|
|
347
|
+
}
|
|
348
|
+
}, 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%] > .modal-title-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;position:absolute;right:-5px;top:-5px}.modal-title[_ngcontent-%COMP%] > .modal-title-actions[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]{display:block}.modal-title[_ngcontent-%COMP%] > .modal-title-actions[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]:not(:last-child){margin-right:10px}"] });
|
|
349
|
+
/*@__PURE__*/ (function () {
|
|
350
|
+
i0.ɵsetClassMetadata(ModalHeaderComponent, [{
|
|
351
|
+
type: i0.Component,
|
|
352
|
+
args: [{
|
|
353
|
+
selector: 'modal-header',
|
|
354
|
+
template: "\n <div class=\"modal-title\">\n <h3 [innerHTML]='title' mat-dialog-title></h3>\n <div *ngIf=\"showExpandIcon || showCloseIcon\" class=\"modal-title-actions\">\n <icon *ngIf=\"showExpandIcon\" type=\"primary clickable\" [size]=\"13\" [name]=\"!expanded ? 'fa fa-expand-arrows-alt' : 'fa fa-compress'\" [title]=\"titleExpand\" (onClick)=\"changeExpand()\"></icon>\n <icon *ngIf=\"showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"titleClose\" (onClick)=\"closeClick.next()\"></icon>\n </div>\n </div>\n ",
|
|
355
|
+
styleUrls: ['modal-header.scss']
|
|
356
|
+
}]
|
|
357
|
+
}], null, { title: [{
|
|
358
|
+
type: i0.Input
|
|
359
|
+
}], expanded: [{
|
|
360
|
+
type: i0.Input
|
|
361
|
+
}], showExpandIcon: [{
|
|
362
|
+
type: i0.Input
|
|
363
|
+
}], showCloseIcon: [{
|
|
364
|
+
type: i0.Input
|
|
365
|
+
}], titleClose: [{
|
|
366
|
+
type: i0.Input
|
|
367
|
+
}], titleExpand: [{
|
|
368
|
+
type: i0.Input
|
|
369
|
+
}], dialogRef: [{
|
|
370
|
+
type: i0.Input
|
|
371
|
+
}], closeClick: [{
|
|
372
|
+
type: i0.Output
|
|
373
|
+
}] });
|
|
374
|
+
})();
|
|
375
|
+
|
|
274
376
|
/**
|
|
275
377
|
* Generated bundle index. Do not edit.
|
|
276
378
|
*/
|
|
@@ -287,6 +389,7 @@
|
|
|
287
389
|
exports.ConfirmModalDataComponent = ConfirmModalDataComponent;
|
|
288
390
|
exports.ConfirmRemoveDialogData = ConfirmRemoveDialogData;
|
|
289
391
|
exports.ConfirmRemoveModalDataComponent = ConfirmRemoveModalDataComponent;
|
|
392
|
+
exports.ModalHeaderComponent = ModalHeaderComponent;
|
|
290
393
|
exports.ModalsModule = ModalsModule;
|
|
291
394
|
|
|
292
395
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apipass-modals.umd.js","sources":["../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.html","../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.ts","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.html","../../../projects/modals/src/lib/confirm-modal/confirm-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\" [innerHTML]=\"data.title\" mat-dialog-title></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","<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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</div>\n\n<div class=\"modal-actions\" mat-dialog-actions>\n <tertiary-button [icon]=\"data.cancelIcon\" [label]=\"data.cancelText\" (onClick)=\"closeClick()\"></tertiary-button>\n <primary-button [icon]=\"data.confirmIcon\" [label]=\"data.confirmText\" (onClick)=\"confirmClick()\"></primary-button>\n</div>\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\n\nexport class ConfirmDialogData {\n title?: string;\n content?: string;\n confirmIcon?: string;\n confirmText?: string;\n cancelIcon?: string;\n cancelText?: string;\n showCloseIcon?: boolean;\n closeLabel?: string;\n item?: any;\n}\n\n@Component({\n selector: 'confirm-modal-data',\n templateUrl: 'confirm-modal.component.html',\n styleUrls: ['confirm-modal.component.scss']\n})\nexport class ConfirmModalDataComponent {\n\n constructor(\n public dialogRef: MatDialogRef<ConfirmModalDataComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogData\n ) {\n }\n\n closeClick(): void {\n this.dialogRef.close(false);\n }\n\n confirmClick(): void {\n this.dialogRef.close(true);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ConfirmRemoveModalDataComponent} from './lib/confirm-remove-modal/confirm-remove-modal.component';\nimport {ConfirmModalDataComponent} from './lib/confirm-modal/confirm-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 ConfirmModalDataComponent\n ],\n exports: [\n ConfirmRemoveModalDataComponent,\n ConfirmModalDataComponent\n ],\n providers: []\n})\nexport class ModalsModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i0.ɵɵelement","i0.ɵɵproperty","i0.ɵɵelementStart","i0.ɵɵlistener","i0.ɵɵelementEnd","MAT_DIALOG_DATA","i0.ɵɵtemplate","i0.ɵɵadvance","Component","Inject","CommonModule","MatDialogModule","MatFormFieldModule","FormsModule","MatInputModule","InputsModule","ButtonsModule","IconsModule","NgModule"],"mappings":";;;;;;;;YACEA,wBAAsE;;;;YAA/CC,gEAAwB;;;;;;YAC/CC,+BAAyI;YAAhCC,sMAAwB;YAACC,iBAAO;;;;YAA1DH,8CAAyB;;;;;YAIxGD,wBAAuD;;;;YAA/BC,kEAA0B;;;;;;YAClDC,sCAAqH;YAA3CC,gPAA6B;YAACC,iBAAa;;;;YAA1EH,mDAA8B,mCAAA;;;;QCJ3E;SAWC;sCAAA;KAAA,IAAA;;QASC,yCACS,SAAwD,EAC/B,IAA6B;YADtD,cAAS,GAAT,SAAS,CAA+C;YAC/B,SAAI,GAAJ,IAAI,CAAyB;SAE9D;QAED,oDAAU,GAAV;YACE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;SACxB;QAED,sDAAY,GAAZ;;YACE,IAAI,QAAC,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,IAAI,OAAA,IAAI,CAAC,IAAI,0CAAE,UAAU,aAAK,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,EAAE;gBAC3F,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACjC;SACF;QAED,2DAAiB,GAAjB;;YACE,IAAI,QAAC,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,EAAE;gBACjC,OAAO,KAAK,CAAC;aACd;YACD,OAAO,OAAA,IAAI,CAAC,IAAI,0CAAE,UAAU,aAAK,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,CAAC;SAC/D;;;kHAvBU,+BAA+B,8DAIhCI,kBAAe;wEAJd,+BAA+B;;gBDrB5CH,8BACE;gBAAAI,8EAAiE;gBACjEA,kFAAkI;gBACpIF,iBAAM;gBAENF,8BACE;gBAAAI,4EAAmD;gBACnDA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../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.html","../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.ts","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.html","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.ts","../../../projects/modals/src/modals.module.ts","../../../projects/modals/src/lib/modal-header/modal-header.component.ts","../../../projects/modals/src/apipass-modals.ts"],"sourcesContent":["<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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","<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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</div>\n\n<div class=\"modal-actions\" mat-dialog-actions>\n <tertiary-button [icon]=\"data.cancelIcon\" [label]=\"data.cancelText\" (onClick)=\"closeClick()\"></tertiary-button>\n <primary-button [icon]=\"data.confirmIcon\" [label]=\"data.confirmText\" (onClick)=\"confirmClick()\"></primary-button>\n</div>\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\n\nexport class ConfirmDialogData {\n title?: string;\n content?: string;\n confirmIcon?: string;\n confirmText?: string;\n cancelIcon?: string;\n cancelText?: string;\n showCloseIcon?: boolean;\n closeLabel?: string;\n item?: any;\n}\n\n@Component({\n selector: 'confirm-modal-data',\n templateUrl: 'confirm-modal.component.html',\n styleUrls: ['confirm-modal.component.scss']\n})\nexport class ConfirmModalDataComponent {\n\n constructor(\n public dialogRef: MatDialogRef<ConfirmModalDataComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogData\n ) {\n }\n\n closeClick(): void {\n this.dialogRef.close(false);\n }\n\n confirmClick(): void {\n this.dialogRef.close(true);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ConfirmRemoveModalDataComponent} from './lib/confirm-remove-modal/confirm-remove-modal.component';\nimport {ConfirmModalDataComponent} from './lib/confirm-modal/confirm-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 ConfirmModalDataComponent\n ],\n exports: [\n ConfirmRemoveModalDataComponent,\n ConfirmModalDataComponent\n ],\n providers: []\n})\nexport class ModalsModule { }\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {MatDialogRef} from '@angular/material/dialog';\n\n@Component({\n selector: 'modal-header',\n template: `\n <div class=\"modal-title\">\n <h3 [innerHTML]='title' mat-dialog-title></h3>\n <div *ngIf=\"showExpandIcon || showCloseIcon\" class=\"modal-title-actions\">\n <icon *ngIf=\"showExpandIcon\" type=\"primary clickable\" [size]=\"13\" [name]=\"!expanded ? 'fa fa-expand-arrows-alt' : 'fa fa-compress'\" [title]=\"titleExpand\" (onClick)=\"changeExpand()\"></icon>\n <icon *ngIf=\"showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"titleClose\" (onClick)=\"closeClick.next()\"></icon>\n </div>\n </div>\n ` ,\n styleUrls: ['modal-header.scss']\n})\nexport class ModalHeaderComponent {\n\n @Input() title: string | undefined;\n @Input() expanded = false;\n @Input() showExpandIcon = false;\n @Input() showCloseIcon = false;\n\n @Input() titleClose = 'Close';\n @Input() titleExpand = 'Expand';\n @Input() dialogRef: MatDialogRef<ModalHeaderComponent> | undefined;\n\n @Output() closeClick: EventEmitter<any> = new EventEmitter();\n\n public changeExpand(): void {\n this.expanded = !this.expanded;\n if (this.expanded) {\n this.dialogRef?.addPanelClass('mod-expanded');\n } else {\n this.dialogRef?.removePanelClass('mod-expanded');\n }\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i0.ɵɵelement","i0.ɵɵproperty","i0.ɵɵelementStart","i0.ɵɵlistener","i0.ɵɵelementEnd","MAT_DIALOG_DATA","i0.ɵɵtemplate","i0.ɵɵadvance","Component","Inject","CommonModule","MatDialogModule","MatFormFieldModule","FormsModule","MatInputModule","InputsModule","ButtonsModule","IconsModule","NgModule","EventEmitter","Input","Output"],"mappings":";;;;;;;;YACEA,wBAAsE;;;;YAA/CC,gEAAwB;;;;;;YAC/CC,+BAAyI;YAAhCC,sMAAwB;YAACC,iBAAO;;;;YAA1DH,8CAAyB;;;;;YAIxGD,wBAAuD;;;;YAA/BC,kEAA0B;;;;;;YAClDC,sCAAqH;YAA3CC,gPAA6B;YAACC,iBAAa;;;;YAA1EH,mDAA8B,mCAAA;;;;QCJ3E;SAWC;sCAAA;KAAA,IAAA;;QASC,yCACS,SAAwD,EAC/B,IAA6B;YADtD,cAAS,GAAT,SAAS,CAA+C;YAC/B,SAAI,GAAJ,IAAI,CAAyB;SAE9D;QAED,oDAAU,GAAV;YACE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;SACxB;QAED,sDAAY,GAAZ;;YACE,IAAI,QAAC,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,IAAI,OAAA,IAAI,CAAC,IAAI,0CAAE,UAAU,aAAK,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,EAAE;gBAC3F,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACjC;SACF;QAED,2DAAiB,GAAjB;;YACE,IAAI,QAAC,IAAI,CAAC,IAAI,0CAAE,iBAAiB,CAAA,EAAE;gBACjC,OAAO,KAAK,CAAC;aACd;YACD,OAAO,OAAA,IAAI,CAAC,IAAI,0CAAE,UAAU,aAAK,IAAI,CAAC,IA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BAAbY,QAAK;oBACG,QAAQ;0BAAhBA,QAAK;oBACG,cAAc;0BAAtBA,QAAK;oBACG,aAAa;0BAArBA,QAAK;oBAEG,UAAU;0BAAlBA,QAAK;oBACG,WAAW;0BAAnBA,QAAK;oBACG,SAAS;0BAAjBA,QAAK;oBAEI,UAAU;0BAAnBC,SAAM;;;;IC3BT;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(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"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).apipass=t.apipass||{},t.apipass.modals={}),t.ng.material.dialog,t.ng.core,t.ng.common,t.i3,t.i4,t.i5,t.ng.forms,t.ng.material.formField,t.ng.material.input)}(this,(function(t,e,n,o,i,a,l,r,c,d){"use strict";function m(t,e){if(1&t&&n.ɵɵelement(0,"h3",8),2&t){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.title,n.ɵɵsanitizeHtml)}}function s(t,e){if(1&t){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"icon",9),n.ɵɵlistener("onClick",(function(){return n.ɵɵrestoreView(o),n.ɵɵnextContext().closeClick()})),n.ɵɵelementEnd()}if(2&t){var i=n.ɵɵnextContext();n.ɵɵproperty("title",i.data.closeLabel)}}function p(t,e){if(1&t&&n.ɵɵelement(0,"p",10),2&t){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.content,n.ɵɵsanitizeHtml)}}function f(t,e){if(1&t){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"input-text",11),n.ɵɵlistener("ngModelChange",(function(t){return n.ɵɵrestoreView(o),n.ɵɵnextContext().data.removeText=t})),n.ɵɵelementEnd()}if(2&t){var i=n.ɵɵnextContext();n.ɵɵproperty("label",i.data.removeTextLabel)("ngModel",i.data.removeText)}}var u=function(){},g=function(){function t(t,e){this.dialogRef=t,this.data=e}return t.prototype.closeClick=function(){this.dialogRef.close()},t.prototype.confirmClick=function(){var t,e,n;(null===(t=this.data)||void 0===t?void 0:t.removeTextConfirm)&&(null===(e=this.data)||void 0===e?void 0:e.removeText)!==(null===(n=this.data)||void 0===n?void 0:n.removeTextConfirm)||this.dialogRef.close(this.data)},t.prototype.isConfirmDisabled=function(){var t,e,n;return!!(null===(t=this.data)||void 0===t?void 0:t.removeTextConfirm)&&(null===(e=this.data)||void 0===e?void 0:e.removeText)!==(null===(n=this.data)||void 0===n?void 0:n.removeTextConfirm)},t}();function C(t,e){if(1&t&&n.ɵɵelement(0,"h3",7),2&t){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.title,n.ɵɵsanitizeHtml)}}function M(t,e){if(1&t){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"icon",8),n.ɵɵlistener("onClick",(function(){return n.ɵɵrestoreView(o),n.ɵɵnextContext().closeClick()})),n.ɵɵelementEnd()}if(2&t){var i=n.ɵɵnextContext();n.ɵɵproperty("title",i.data.closeLabel)}}function v(t,e){if(1&t&&n.ɵɵelement(0,"p",9),2&t){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.content,n.ɵɵsanitizeHtml)}}g.ɵfac=function(t){return new(t||g)(n.ɵɵdirectiveInject(e.MatDialogRef),n.ɵɵdirectiveInject(e.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","",3,"innerHTML",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","",3,"innerHTML"],["type","tertiary clickable","name","fas fa-times",3,"title","onClick"],[3,"innerHTML"],[3,"label","ngModel","ngModelChange"]],template:function(t,e){1&t&&(n.ɵɵelementStart(0,"div",0),n.ɵɵtemplate(1,m,1,1,"h3",1),n.ɵɵtemplate(2,s,1,1,"icon",2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"div",3),n.ɵɵtemplate(4,p,1,1,"p",4),n.ɵɵtemplate(5,f,1,2,"input-text",5),n.ɵɵelementEnd(),n.ɵɵelementStart(6,"div",6),n.ɵɵelementStart(7,"secondary-button",7),n.ɵɵlistener("onClick",(function(){return e.confirmClick()})),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&t&&(n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.title),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.showCloseIcon),n.ɵɵadvance(2),n.ɵɵproperty("ngIf",e.data.content),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.removeTextConfirm),n.ɵɵadvance(2),n.ɵɵproperty("btnDisabled",e.isConfirmDisabled())("icon",e.data.confirmIcon)("label",e.data.confirmText))},directives:[o.NgIf,e.MatDialogContent,e.MatDialogActions,i.SecondaryButtonComponent,e.MatDialogTitle,a.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;box-shadow: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 x=function(){},y=function(){function t(t,e){this.dialogRef=t,this.data=e}return t.prototype.closeClick=function(){this.dialogRef.close(!1)},t.prototype.confirmClick=function(){this.dialogRef.close(!0)},t}();y.ɵfac=function(t){return new(t||y)(n.ɵɵdirectiveInject(e.MatDialogRef),n.ɵɵdirectiveInject(e.MAT_DIALOG_DATA))},y.ɵcmp=n.ɵɵdefineComponent({type:y,selectors:[["confirm-modal-data"]],decls:8,vars:7,consts:[[1,"modal-title"],["mat-dialog-title","",3,"innerHTML",4,"ngIf"],["type","tertiary clickable","name","fas fa-times",3,"title","onClick",4,"ngIf"],["mat-dialog-content","",1,"modal-content"],[3,"innerHTML",4,"ngIf"],["mat-dialog-actions","",1,"modal-actions"],[3,"icon","label","onClick"],["mat-dialog-title","",3,"innerHTML"],["type","tertiary clickable","name","fas fa-times",3,"title","onClick"],[3,"innerHTML"]],template:function(t,e){1&t&&(n.ɵɵelementStart(0,"div",0),n.ɵɵtemplate(1,C,1,1,"h3",1),n.ɵɵtemplate(2,M,1,1,"icon",2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"div",3),n.ɵɵtemplate(4,v,1,1,"p",4),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"div",5),n.ɵɵelementStart(6,"tertiary-button",6),n.ɵɵlistener("onClick",(function(){return e.closeClick()})),n.ɵɵelementEnd(),n.ɵɵelementStart(7,"primary-button",6),n.ɵɵlistener("onClick",(function(){return e.confirmClick()})),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&t&&(n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.title),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.showCloseIcon),n.ɵɵadvance(2),n.ɵɵproperty("ngIf",e.data.content),n.ɵɵadvance(2),n.ɵɵproperty("icon",e.data.cancelIcon)("label",e.data.cancelText),n.ɵɵadvance(1),n.ɵɵproperty("icon",e.data.confirmIcon)("label",e.data.confirmText))},directives:[o.NgIf,e.MatDialogContent,e.MatDialogActions,i.TertiaryButtonComponent,i.PrimaryButtonComponent,e.MatDialogTitle,a.IconComponent],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;box-shadow:none!important;margin:20px 0!important;text-align:center!important}.modal-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0!important}.modal-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;width:100%}.modal-actions[_ngcontent-%COMP%] primary-button[_ngcontent-%COMP%]{margin-left:5px}"]});var h=function(){};h.ɵmod=n.ɵɵdefineNgModule({type:h}),h.ɵinj=n.ɵɵdefineInjector({factory:function(t){return new(t||h)},providers:[],imports:[[o.CommonModule,e.MatDialogModule,c.MatFormFieldModule,r.FormsModule,d.MatInputModule,l.InputsModule,i.ButtonsModule,a.IconsModule]]}),("undefined"==typeof ngJitMode||ngJitMode)&&n.ɵɵsetNgModuleScope(h,{declarations:[g,y],imports:[o.CommonModule,e.MatDialogModule,c.MatFormFieldModule,r.FormsModule,d.MatInputModule,l.InputsModule,i.ButtonsModule,a.IconsModule],exports:[g,y]}),Object.keys(e).forEach((function(n){"default"!==n&&Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t.ConfirmDialogData=x,t.ConfirmModalDataComponent=y,t.ConfirmRemoveDialogData=u,t.ConfirmRemoveModalDataComponent=g,t.ModalsModule=h,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(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"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).apipass=t.apipass||{},t.apipass.modals={}),t.ng.material.dialog,t.ng.core,t.ng.common,t.i3,t.i4,t.i5,t.ng.forms,t.ng.material.formField,t.ng.material.input)}(this,(function(t,e,n,o,i,a,l,r,c,d){"use strict";function s(t,e){if(1&t&&n.ɵɵelement(0,"h3",8),2&t){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.title,n.ɵɵsanitizeHtml)}}function m(t,e){if(1&t){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"icon",9),n.ɵɵlistener("onClick",(function(){return n.ɵɵrestoreView(o),n.ɵɵnextContext().closeClick()})),n.ɵɵelementEnd()}if(2&t){var i=n.ɵɵnextContext();n.ɵɵproperty("title",i.data.closeLabel)}}function p(t,e){if(1&t&&n.ɵɵelement(0,"p",10),2&t){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.content,n.ɵɵsanitizeHtml)}}function f(t,e){if(1&t){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"input-text",11),n.ɵɵlistener("ngModelChange",(function(t){return n.ɵɵrestoreView(o),n.ɵɵnextContext().data.removeText=t})),n.ɵɵelementEnd()}if(2&t){var i=n.ɵɵnextContext();n.ɵɵproperty("label",i.data.removeTextLabel)("ngModel",i.data.removeText)}}var u=function(){},g=function(){function t(t,e){this.dialogRef=t,this.data=e}return t.prototype.closeClick=function(){this.dialogRef.close()},t.prototype.confirmClick=function(){var t,e,n;(null===(t=this.data)||void 0===t?void 0:t.removeTextConfirm)&&(null===(e=this.data)||void 0===e?void 0:e.removeText)!==(null===(n=this.data)||void 0===n?void 0:n.removeTextConfirm)||this.dialogRef.close(this.data)},t.prototype.isConfirmDisabled=function(){var t,e,n;return!!(null===(t=this.data)||void 0===t?void 0:t.removeTextConfirm)&&(null===(e=this.data)||void 0===e?void 0:e.removeText)!==(null===(n=this.data)||void 0===n?void 0:n.removeTextConfirm)},t}();function C(t,e){if(1&t&&n.ɵɵelement(0,"h3",7),2&t){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.title,n.ɵɵsanitizeHtml)}}function x(t,e){if(1&t){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"icon",8),n.ɵɵlistener("onClick",(function(){return n.ɵɵrestoreView(o),n.ɵɵnextContext().closeClick()})),n.ɵɵelementEnd()}if(2&t){var i=n.ɵɵnextContext();n.ɵɵproperty("title",i.data.closeLabel)}}function M(t,e){if(1&t&&n.ɵɵelement(0,"p",9),2&t){var o=n.ɵɵnextContext();n.ɵɵproperty("innerHTML",o.data.content,n.ɵɵsanitizeHtml)}}g.ɵfac=function(t){return new(t||g)(n.ɵɵdirectiveInject(e.MatDialogRef),n.ɵɵdirectiveInject(e.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","",3,"innerHTML",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","",3,"innerHTML"],["type","tertiary clickable","name","fas fa-times",3,"title","onClick"],[3,"innerHTML"],[3,"label","ngModel","ngModelChange"]],template:function(t,e){1&t&&(n.ɵɵelementStart(0,"div",0),n.ɵɵtemplate(1,s,1,1,"h3",1),n.ɵɵtemplate(2,m,1,1,"icon",2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"div",3),n.ɵɵtemplate(4,p,1,1,"p",4),n.ɵɵtemplate(5,f,1,2,"input-text",5),n.ɵɵelementEnd(),n.ɵɵelementStart(6,"div",6),n.ɵɵelementStart(7,"secondary-button",7),n.ɵɵlistener("onClick",(function(){return e.confirmClick()})),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&t&&(n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.title),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.showCloseIcon),n.ɵɵadvance(2),n.ɵɵproperty("ngIf",e.data.content),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.removeTextConfirm),n.ɵɵadvance(2),n.ɵɵproperty("btnDisabled",e.isConfirmDisabled())("icon",e.data.confirmIcon)("label",e.data.confirmText))},directives:[o.NgIf,e.MatDialogContent,e.MatDialogActions,i.SecondaryButtonComponent,e.MatDialogTitle,a.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;box-shadow: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 v=function(){},y=function(){function t(t,e){this.dialogRef=t,this.data=e}return t.prototype.closeClick=function(){this.dialogRef.close(!1)},t.prototype.confirmClick=function(){this.dialogRef.close(!0)},t}();y.ɵfac=function(t){return new(t||y)(n.ɵɵdirectiveInject(e.MatDialogRef),n.ɵɵdirectiveInject(e.MAT_DIALOG_DATA))},y.ɵcmp=n.ɵɵdefineComponent({type:y,selectors:[["confirm-modal-data"]],decls:8,vars:7,consts:[[1,"modal-title"],["mat-dialog-title","",3,"innerHTML",4,"ngIf"],["type","tertiary clickable","name","fas fa-times",3,"title","onClick",4,"ngIf"],["mat-dialog-content","",1,"modal-content"],[3,"innerHTML",4,"ngIf"],["mat-dialog-actions","",1,"modal-actions"],[3,"icon","label","onClick"],["mat-dialog-title","",3,"innerHTML"],["type","tertiary clickable","name","fas fa-times",3,"title","onClick"],[3,"innerHTML"]],template:function(t,e){1&t&&(n.ɵɵelementStart(0,"div",0),n.ɵɵtemplate(1,C,1,1,"h3",1),n.ɵɵtemplate(2,x,1,1,"icon",2),n.ɵɵelementEnd(),n.ɵɵelementStart(3,"div",3),n.ɵɵtemplate(4,M,1,1,"p",4),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"div",5),n.ɵɵelementStart(6,"tertiary-button",6),n.ɵɵlistener("onClick",(function(){return e.closeClick()})),n.ɵɵelementEnd(),n.ɵɵelementStart(7,"primary-button",6),n.ɵɵlistener("onClick",(function(){return e.confirmClick()})),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&t&&(n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.title),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.data.showCloseIcon),n.ɵɵadvance(2),n.ɵɵproperty("ngIf",e.data.content),n.ɵɵadvance(2),n.ɵɵproperty("icon",e.data.cancelIcon)("label",e.data.cancelText),n.ɵɵadvance(1),n.ɵɵproperty("icon",e.data.confirmIcon)("label",e.data.confirmText))},directives:[o.NgIf,e.MatDialogContent,e.MatDialogActions,i.TertiaryButtonComponent,i.PrimaryButtonComponent,e.MatDialogTitle,a.IconComponent],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;box-shadow:none!important;margin:20px 0!important;text-align:center!important}.modal-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0!important}.modal-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;width:100%}.modal-actions[_ngcontent-%COMP%] primary-button[_ngcontent-%COMP%]{margin-left:5px}"]});var h=function(){};function I(t,e){if(1&t){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"icon",6),n.ɵɵlistener("onClick",(function(){return n.ɵɵrestoreView(o),n.ɵɵnextContext(2).changeExpand()})),n.ɵɵelementEnd()}if(2&t){var i=n.ɵɵnextContext(2);n.ɵɵproperty("size",13)("name",i.expanded?"fa fa-compress":"fa fa-expand-arrows-alt")("title",i.titleExpand)}}function b(t,e){if(1&t){var o=n.ɵɵgetCurrentView();n.ɵɵelementStart(0,"icon",7),n.ɵɵlistener("onClick",(function(){return n.ɵɵrestoreView(o),n.ɵɵnextContext(2).closeClick.next()})),n.ɵɵelementEnd()}if(2&t){var i=n.ɵɵnextContext(2);n.ɵɵproperty("title",i.titleClose)}}function w(t,e){if(1&t&&(n.ɵɵelementStart(0,"div",3),n.ɵɵtemplate(1,I,1,3,"icon",4),n.ɵɵtemplate(2,b,1,1,"icon",5),n.ɵɵelementEnd()),2&t){var o=n.ɵɵnextContext();n.ɵɵadvance(1),n.ɵɵproperty("ngIf",o.showExpandIcon),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",o.showCloseIcon)}}h.ɵmod=n.ɵɵdefineNgModule({type:h}),h.ɵinj=n.ɵɵdefineInjector({factory:function(t){return new(t||h)},providers:[],imports:[[o.CommonModule,e.MatDialogModule,c.MatFormFieldModule,r.FormsModule,d.MatInputModule,l.InputsModule,i.ButtonsModule,a.IconsModule]]}),("undefined"==typeof ngJitMode||ngJitMode)&&n.ɵɵsetNgModuleScope(h,{declarations:[g,y],imports:[o.CommonModule,e.MatDialogModule,c.MatFormFieldModule,r.FormsModule,d.MatInputModule,l.InputsModule,i.ButtonsModule,a.IconsModule],exports:[g,y]});var k=function(){function t(){this.expanded=!1,this.showExpandIcon=!1,this.showCloseIcon=!1,this.titleClose="Close",this.titleExpand="Expand",this.closeClick=new n.EventEmitter}return t.prototype.changeExpand=function(){var t,e;this.expanded=!this.expanded,this.expanded?null===(t=this.dialogRef)||void 0===t||t.addPanelClass("mod-expanded"):null===(e=this.dialogRef)||void 0===e||e.removePanelClass("mod-expanded")},t}();k.ɵfac=function(t){return new(t||k)},k.ɵcmp=n.ɵɵdefineComponent({type:k,selectors:[["modal-header"]],inputs:{title:"title",expanded:"expanded",showExpandIcon:"showExpandIcon",showCloseIcon:"showCloseIcon",titleClose:"titleClose",titleExpand:"titleExpand",dialogRef:"dialogRef"},outputs:{closeClick:"closeClick"},decls:3,vars:2,consts:[[1,"modal-title"],["mat-dialog-title","",3,"innerHTML"],["class","modal-title-actions",4,"ngIf"],[1,"modal-title-actions"],["type","primary clickable",3,"size","name","title","onClick",4,"ngIf"],["type","tertiary clickable","name","fas fa-times",3,"title","onClick",4,"ngIf"],["type","primary clickable",3,"size","name","title","onClick"],["type","tertiary clickable","name","fas fa-times",3,"title","onClick"]],template:function(t,e){1&t&&(n.ɵɵelementStart(0,"div",0),n.ɵɵelement(1,"h3",1),n.ɵɵtemplate(2,w,3,2,"div",2),n.ɵɵelementEnd()),2&t&&(n.ɵɵadvance(1),n.ɵɵproperty("innerHTML",e.title,n.ɵɵsanitizeHtml),n.ɵɵadvance(1),n.ɵɵproperty("ngIf",e.showExpandIcon||e.showCloseIcon))},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%] > .modal-title-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;position:absolute;right:-5px;top:-5px}.modal-title[_ngcontent-%COMP%] > .modal-title-actions[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]{display:block}.modal-title[_ngcontent-%COMP%] > .modal-title-actions[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]:not(:last-child){margin-right:10px}"]}),Object.keys(e).forEach((function(n){"default"!==n&&Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t.ConfirmDialogData=v,t.ConfirmModalDataComponent=y,t.ConfirmRemoveDialogData=u,t.ConfirmRemoveModalDataComponent=g,t.ModalHeaderComponent=k,t.ModalsModule=h,Object.defineProperty(t,"__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/confirm-remove-modal.component.html","../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.ts","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.html","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.ts","../../../projects/modals/src/modals.module.ts"],"names":["i0.ɵɵelement","i0.ɵɵproperty","i0.ɵɵelementStart","i0.ɵɵlistener","i0.ɵɵelementEnd","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","i0.ɵɵadvance","confirmIcon","confirmText","ConfirmModalDataComponent","cancelText","ModalsModule","providers","imports","CommonModule","MatDialogModule","MatFormFieldModule","FormsModule","MatInputModule","InputsModule","ButtonsModule","IconsModule","declarations","exports"],"mappings":"w4BACEA,EAAAA,UAAAA,EAAAA,KAAAA,gCAAuBC,EAAAA,WAAAA,YAAAA,EAAAA,KAAAA,MAAAA,EAAAA,oEACvBC,EAAAA,eAAAA,EAAAA,OAAAA,GAAyGC,EAAAA,WAAAA,WAAAA,WAAAA,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AAA,eACAC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,aAAWE,QAAA,CAOX1C,EACA4B","sourcesContent":["<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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","<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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</div>\n\n<div class=\"modal-actions\" mat-dialog-actions>\n <tertiary-button [icon]=\"data.cancelIcon\" [label]=\"data.cancelText\" (onClick)=\"closeClick()\"></tertiary-button>\n <primary-button [icon]=\"data.confirmIcon\" [label]=\"data.confirmText\" (onClick)=\"confirmClick()\"></primary-button>\n</div>\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\n\nexport class ConfirmDialogData {\n title?: string;\n content?: string;\n confirmIcon?: string;\n confirmText?: string;\n cancelIcon?: string;\n cancelText?: string;\n showCloseIcon?: boolean;\n closeLabel?: string;\n item?: any;\n}\n\n@Component({\n selector: 'confirm-modal-data',\n templateUrl: 'confirm-modal.component.html',\n styleUrls: ['confirm-modal.component.scss']\n})\nexport class ConfirmModalDataComponent {\n\n constructor(\n public dialogRef: MatDialogRef<ConfirmModalDataComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogData\n ) {\n }\n\n closeClick(): void {\n this.dialogRef.close(false);\n }\n\n confirmClick(): void {\n this.dialogRef.close(true);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ConfirmRemoveModalDataComponent} from './lib/confirm-remove-modal/confirm-remove-modal.component';\nimport {ConfirmModalDataComponent} from './lib/confirm-modal/confirm-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 ConfirmModalDataComponent\n ],\n exports: [\n ConfirmRemoveModalDataComponent,\n ConfirmModalDataComponent\n ],\n providers: []\n})\nexport class ModalsModule { }\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.html","../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.ts","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.html","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.ts","../../../projects/modals/src/modals.module.ts","../../../projects/modals/src/lib/modal-header/modal-header.component.ts"],"names":["i0.ɵɵelement","i0.ɵɵproperty","i0.ɵɵelementStart","i0.ɵɵlistener","i0.ɵɵelementEnd","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","i0.ɵɵadvance","confirmIcon","confirmText","ConfirmModalDataComponent","cancelText","ctx_r1","expanded","titleExpand","next","ModalsModule","providers","imports","CommonModule","MatDialogModule","MatFormFieldModule","FormsModule","MatInputModule","InputsModule","ButtonsModule","IconsModule","declarations","exports","ModalHeaderComponent","showExpandIcon","showCloseIcon","titleClose","EventEmitter","changeExpand","addPanelClass","removePanelClass","inputs","title","outputs"],"mappings":"w4BACEA,EAAAA,UAAAA,EAAAA,KAAAA,gCAAuBC,EAAAA,WAAAA,YAAAA,EAAAA,KAAAA,MAAAA,EAAAA,oEACvBC,EAAAA,eAAAA,EAAAA,OAAAA,GAAyGC,EAAAA,WAAA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A,EAAoB9B,UAAA,CAAA,CAAA,iBAAAsC,OAAA,CAAAC,MAAA,QAAAzB,SAAA,WAAAiB,eAAA,iBAAAC,cAAA,gBAAAC,WAAA,aAAAlB,YAAA,cAAA/B,UAAA,aAAAwD,QAAA,CAAArD,WAAA,cAAAc,MAAA,EAAAC,KAAA,EAAAC,OAAA,CAAA,CAAA,EAAA,eAAA,CAAA,mBAAA,GAAA,EAAA,aAAA,CAAA,QAAA,sBAAA,EAAA,QAAA,CAAA,EAAA,uBAAA,CAAA,OAAA,oBAAA,EAAA,OAAA,OAAA,QAAA,UAAA,EAAA,QAAA,CAAA,OAAA,qBAAA,OAAA,eAAA,EAAA,QAAA,UAAA,EAAA,QAAA,CAAA,OAAA,oBAAA,EAAA,OAAA,OAAA,QAAA,WAAA,CAAA,OAAA,qBAAA,OAAA,eAAA,EAAA,QAAA,YAAAC,SAAA,SAAAC,EAAAC,SAV7B7B,EAAAA,eAAAA,EAAAA,MAAAA,GACEF,EAAAA,UAAAA,EAAAA,KAAAA,GACAgC,EAAAA,WAAAA,EAAAA,EAAAA,EAAAA,EAAAA,MAAAA,GAIF5B,EAAAA,sBALM6B,EAAAA,UAAAA,GAAAhC,EAAAA,WAAAA,YAAAA,EAAAA,MAAAA,EAAAA,gBACCgC,EAAAA,UAAAA,GAAAhC,EAAAA,WAAAA,OAAAA,EAAAA,gBAAAA,EAAAA","sourcesContent":["<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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","<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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</div>\n\n<div class=\"modal-actions\" mat-dialog-actions>\n <tertiary-button [icon]=\"data.cancelIcon\" [label]=\"data.cancelText\" (onClick)=\"closeClick()\"></tertiary-button>\n <primary-button [icon]=\"data.confirmIcon\" [label]=\"data.confirmText\" (onClick)=\"confirmClick()\"></primary-button>\n</div>\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\n\nexport class ConfirmDialogData {\n title?: string;\n content?: string;\n confirmIcon?: string;\n confirmText?: string;\n cancelIcon?: string;\n cancelText?: string;\n showCloseIcon?: boolean;\n closeLabel?: string;\n item?: any;\n}\n\n@Component({\n selector: 'confirm-modal-data',\n templateUrl: 'confirm-modal.component.html',\n styleUrls: ['confirm-modal.component.scss']\n})\nexport class ConfirmModalDataComponent {\n\n constructor(\n public dialogRef: MatDialogRef<ConfirmModalDataComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogData\n ) {\n }\n\n closeClick(): void {\n this.dialogRef.close(false);\n }\n\n confirmClick(): void {\n this.dialogRef.close(true);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ConfirmRemoveModalDataComponent} from './lib/confirm-remove-modal/confirm-remove-modal.component';\nimport {ConfirmModalDataComponent} from './lib/confirm-modal/confirm-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 ConfirmModalDataComponent\n ],\n exports: [\n ConfirmRemoveModalDataComponent,\n ConfirmModalDataComponent\n ],\n providers: []\n})\nexport class ModalsModule { }\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {MatDialogRef} from '@angular/material/dialog';\n\n@Component({\n selector: 'modal-header',\n template: `\n <div class=\"modal-title\">\n <h3 [innerHTML]='title' mat-dialog-title></h3>\n <div *ngIf=\"showExpandIcon || showCloseIcon\" class=\"modal-title-actions\">\n <icon *ngIf=\"showExpandIcon\" type=\"primary clickable\" [size]=\"13\" [name]=\"!expanded ? 'fa fa-expand-arrows-alt' : 'fa fa-compress'\" [title]=\"titleExpand\" (onClick)=\"changeExpand()\"></icon>\n <icon *ngIf=\"showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"titleClose\" (onClick)=\"closeClick.next()\"></icon>\n </div>\n </div>\n ` ,\n styleUrls: ['modal-header.scss']\n})\nexport class ModalHeaderComponent {\n\n @Input() title: string | undefined;\n @Input() expanded = false;\n @Input() showExpandIcon = false;\n @Input() showCloseIcon = false;\n\n @Input() titleClose = 'Close';\n @Input() titleExpand = 'Expand';\n @Input() dialogRef: MatDialogRef<ModalHeaderComponent> | undefined;\n\n @Output() closeClick: EventEmitter<any> = new EventEmitter();\n\n public changeExpand(): void {\n this.expanded = !this.expanded;\n if (this.expanded) {\n this.dialogRef?.addPanelClass('mod-expanded');\n } else {\n this.dialogRef?.removePanelClass('mod-expanded');\n }\n }\n\n}\n"]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
function ModalHeaderComponent_div_2_icon_1_Template(rf, ctx) { if (rf & 1) {
|
|
4
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
5
|
+
i0.ɵɵelementStart(0, "icon", 6);
|
|
6
|
+
i0.ɵɵlistener("onClick", function ModalHeaderComponent_div_2_icon_1_Template_icon_onClick_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(2); return ctx_r3.changeExpand(); });
|
|
7
|
+
i0.ɵɵelementEnd();
|
|
8
|
+
} if (rf & 2) {
|
|
9
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
10
|
+
i0.ɵɵproperty("size", 13)("name", !ctx_r1.expanded ? "fa fa-expand-arrows-alt" : "fa fa-compress")("title", ctx_r1.titleExpand);
|
|
11
|
+
} }
|
|
12
|
+
function ModalHeaderComponent_div_2_icon_2_Template(rf, ctx) { if (rf & 1) {
|
|
13
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
14
|
+
i0.ɵɵelementStart(0, "icon", 7);
|
|
15
|
+
i0.ɵɵlistener("onClick", function ModalHeaderComponent_div_2_icon_2_Template_icon_onClick_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(2); return ctx_r5.closeClick.next(); });
|
|
16
|
+
i0.ɵɵelementEnd();
|
|
17
|
+
} if (rf & 2) {
|
|
18
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
19
|
+
i0.ɵɵproperty("title", ctx_r2.titleClose);
|
|
20
|
+
} }
|
|
21
|
+
function ModalHeaderComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
23
|
+
i0.ɵɵtemplate(1, ModalHeaderComponent_div_2_icon_1_Template, 1, 3, "icon", 4);
|
|
24
|
+
i0.ɵɵtemplate(2, ModalHeaderComponent_div_2_icon_2_Template, 1, 1, "icon", 5);
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
} if (rf & 2) {
|
|
27
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
28
|
+
i0.ɵɵadvance(1);
|
|
29
|
+
i0.ɵɵproperty("ngIf", ctx_r0.showExpandIcon);
|
|
30
|
+
i0.ɵɵadvance(1);
|
|
31
|
+
i0.ɵɵproperty("ngIf", ctx_r0.showCloseIcon);
|
|
32
|
+
} }
|
|
33
|
+
export class ModalHeaderComponent {
|
|
34
|
+
constructor() {
|
|
35
|
+
this.expanded = false;
|
|
36
|
+
this.showExpandIcon = false;
|
|
37
|
+
this.showCloseIcon = false;
|
|
38
|
+
this.titleClose = 'Close';
|
|
39
|
+
this.titleExpand = 'Expand';
|
|
40
|
+
this.closeClick = new EventEmitter();
|
|
41
|
+
}
|
|
42
|
+
changeExpand() {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
this.expanded = !this.expanded;
|
|
45
|
+
if (this.expanded) {
|
|
46
|
+
(_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.addPanelClass('mod-expanded');
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
(_b = this.dialogRef) === null || _b === void 0 ? void 0 : _b.removePanelClass('mod-expanded');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
ModalHeaderComponent.ɵfac = function ModalHeaderComponent_Factory(t) { return new (t || ModalHeaderComponent)(); };
|
|
54
|
+
ModalHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ModalHeaderComponent, selectors: [["modal-header"]], inputs: { title: "title", expanded: "expanded", showExpandIcon: "showExpandIcon", showCloseIcon: "showCloseIcon", titleClose: "titleClose", titleExpand: "titleExpand", dialogRef: "dialogRef" }, outputs: { closeClick: "closeClick" }, decls: 3, vars: 2, consts: [[1, "modal-title"], ["mat-dialog-title", "", 3, "innerHTML"], ["class", "modal-title-actions", 4, "ngIf"], [1, "modal-title-actions"], ["type", "primary clickable", 3, "size", "name", "title", "onClick", 4, "ngIf"], ["type", "tertiary clickable", "name", "fas fa-times", 3, "title", "onClick", 4, "ngIf"], ["type", "primary clickable", 3, "size", "name", "title", "onClick"], ["type", "tertiary clickable", "name", "fas fa-times", 3, "title", "onClick"]], template: function ModalHeaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
56
|
+
i0.ɵɵelement(1, "h3", 1);
|
|
57
|
+
i0.ɵɵtemplate(2, ModalHeaderComponent_div_2_Template, 3, 2, "div", 2);
|
|
58
|
+
i0.ɵɵelementEnd();
|
|
59
|
+
} if (rf & 2) {
|
|
60
|
+
i0.ɵɵadvance(1);
|
|
61
|
+
i0.ɵɵproperty("innerHTML", ctx.title, i0.ɵɵsanitizeHtml);
|
|
62
|
+
i0.ɵɵadvance(1);
|
|
63
|
+
i0.ɵɵproperty("ngIf", ctx.showExpandIcon || ctx.showCloseIcon);
|
|
64
|
+
} }, 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%] > .modal-title-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;position:absolute;right:-5px;top:-5px}.modal-title[_ngcontent-%COMP%] > .modal-title-actions[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]{display:block}.modal-title[_ngcontent-%COMP%] > .modal-title-actions[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]:not(:last-child){margin-right:10px}"] });
|
|
65
|
+
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(ModalHeaderComponent, [{
|
|
66
|
+
type: Component,
|
|
67
|
+
args: [{
|
|
68
|
+
selector: 'modal-header',
|
|
69
|
+
template: `
|
|
70
|
+
<div class="modal-title">
|
|
71
|
+
<h3 [innerHTML]='title' mat-dialog-title></h3>
|
|
72
|
+
<div *ngIf="showExpandIcon || showCloseIcon" class="modal-title-actions">
|
|
73
|
+
<icon *ngIf="showExpandIcon" type="primary clickable" [size]="13" [name]="!expanded ? 'fa fa-expand-arrows-alt' : 'fa fa-compress'" [title]="titleExpand" (onClick)="changeExpand()"></icon>
|
|
74
|
+
<icon *ngIf="showCloseIcon" type="tertiary clickable" name="fas fa-times" [title]="titleClose" (onClick)="closeClick.next()"></icon>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
`,
|
|
78
|
+
styleUrls: ['modal-header.scss']
|
|
79
|
+
}]
|
|
80
|
+
}], null, { title: [{
|
|
81
|
+
type: Input
|
|
82
|
+
}], expanded: [{
|
|
83
|
+
type: Input
|
|
84
|
+
}], showExpandIcon: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], showCloseIcon: [{
|
|
87
|
+
type: Input
|
|
88
|
+
}], titleClose: [{
|
|
89
|
+
type: Input
|
|
90
|
+
}], titleExpand: [{
|
|
91
|
+
type: Input
|
|
92
|
+
}], dialogRef: [{
|
|
93
|
+
type: Input
|
|
94
|
+
}], closeClick: [{
|
|
95
|
+
type: Output
|
|
96
|
+
}] }); })();
|
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtaGVhZGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21vZGFscy9zcmMvbGliL21vZGFsLWhlYWRlci9tb2RhbC1oZWFkZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUMsTUFBTSxlQUFlLENBQUM7Ozs7SUFTN0QsK0JBQTRMO0lBQWxDLG9NQUEwQjtJQUFDLGlCQUFPOzs7SUFBdEkseUJBQVcseUVBQUEsNkJBQUE7Ozs7SUFDakUsK0JBQW9JO0lBQXJDLDJLQUFXLHdCQUFpQixJQUFDO0lBQUMsaUJBQU87OztJQUExRCx5Q0FBb0I7OztJQUZoRyw4QkFDRTtJQUFBLDZFQUFxTDtJQUNyTCw2RUFBNkg7SUFDL0gsaUJBQU07OztJQUZFLGVBQXNCO0lBQXRCLDRDQUFzQjtJQUN0QixlQUFxQjtJQUFyQiwyQ0FBcUI7O0FBTW5DLE1BQU0sT0FBTyxvQkFBb0I7SUFiakM7UUFnQlcsYUFBUSxHQUFHLEtBQUssQ0FBQztRQUNqQixtQkFBYyxHQUFHLEtBQUssQ0FBQztRQUN2QixrQkFBYSxHQUFHLEtBQUssQ0FBQztRQUV0QixlQUFVLEdBQUcsT0FBTyxDQUFDO1FBQ3JCLGdCQ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xlOiBzdHJpbmcgfCB1bmRlZmluZWQ7XG4gIEBJbnB1dCgpIGV4cGFuZGVkID0gZmFsc2U7XG4gIEBJbnB1dCgpIHNob3dFeHBhbmRJY29uID0gZmFsc2U7XG4gIEBJbnB1dCgpIHNob3dDbG9zZUljb24gPSBmYWxzZTtcblxuICBASW5wdXQoKSB0aXRsZUNsb3NlID0gJ0Nsb3NlJztcbiAgQElucHV0KCkgdGl0bGVFeHBhbmQgPSAnRXhwYW5kJztcbiAgQElucHV0KCkgZGlhbG9nUmVmOiBNYXREaWFsb2dSZWY8TW9kYWxIZWFkZXJDb21wb25lbnQ+IHwgdW5kZWZpbmVkO1xuXG4gIEBPdXRwdXQoKSBjbG9zZUNsaWNrOiBFdmVudEVtaXR0ZXI8YW55PiA9IG5ldyBFdmVudEVtaXR0ZXIoKTtcblxuICBwdWJsaWMgY2hhbmdlRXhwYW5kKCk6IHZvaWQge1xuICAgIHRoaXMuZXhwYW5kZWQgPSAhdGhpcy5leHBhbmRlZDtcbiAgICBpZiAodGhpcy5leHBhbmRlZCkge1xuICAgICAgdGhpcy5kaWFsb2dSZWY/LmFkZFBhbmVsQ2xhc3MoJ21vZC1leHBhbmRlZCcpO1xuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLmRpYWxvZ1JlZj8ucmVtb3ZlUGFuZWxDbGFzcygnbW9kLWV4cGFuZGVkJyk7XG4gICAgfVxuICB9XG5cbn1cbiJdfQ==
|
package/esm2015/public-api.js
CHANGED
|
@@ -2,4 +2,5 @@ export * from '@angular/material/dialog';
|
|
|
2
2
|
export * from './modals.module';
|
|
3
3
|
export * from './lib/confirm-remove-modal/confirm-remove-modal.component';
|
|
4
4
|
export * from './lib/confirm-modal/confirm-modal.component';
|
|
5
|
-
|
|
5
|
+
export * from './lib/modal-header/modal-header.component';
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL21vZGFscy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYywyREFBMkQsQ0FBQztBQUMxRSxjQUFjLDZDQUE2QyxDQUFDO0FBQzVELGNBQWMsMkNBQTJDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICdAYW5ndWxhci9tYXRlcmlhbC9kaWFsb2cnO1xuZXhwb3J0ICogZnJvbSAnLi9tb2RhbHMubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbmZpcm0tcmVtb3ZlLW1vZGFsL2NvbmZpcm0tcmVtb3ZlLW1vZGFsLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb25maXJtLW1vZGFsL2NvbmZpcm0tbW9kYWwuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL21vZGFsLWhlYWRlci9tb2RhbC1oZWFkZXIuY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogContent, MatDialogActions, MatDialogTitle, MatDialogModule } from '@angular/material/dialog';
|
|
2
2
|
export * from '@angular/material/dialog';
|
|
3
|
-
import { ɵɵelement, ɵɵnextContext, ɵɵproperty, ɵɵsanitizeHtml, ɵɵgetCurrentView, ɵɵelementStart, ɵɵlistener, ɵɵrestoreView, ɵɵelementEnd, ɵɵdirectiveInject, ɵɵdefineComponent, ɵɵtemplate, ɵɵadvance, ɵsetClassMetadata, Component, Inject, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
|
|
3
|
+
import { ɵɵelement, ɵɵnextContext, ɵɵproperty, ɵɵsanitizeHtml, ɵɵgetCurrentView, ɵɵelementStart, ɵɵlistener, ɵɵrestoreView, ɵɵelementEnd, ɵɵdirectiveInject, ɵɵdefineComponent, ɵɵtemplate, ɵɵadvance, ɵsetClassMetadata, Component, Inject, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule, EventEmitter, Input, Output } from '@angular/core';
|
|
4
4
|
import { NgIf, CommonModule } from '@angular/common';
|
|
5
5
|
import { SecondaryButtonComponent, TertiaryButtonComponent, PrimaryButtonComponent, ButtonsModule } from '@apipass/buttons';
|
|
6
6
|
import { IconComponent, IconsModule } from '@apipass/icons';
|
|
@@ -226,9 +226,104 @@ ModalsModule.ɵinj = ɵɵdefineInjector({ factory: function ModalsModule_Factory
|
|
|
226
226
|
}]
|
|
227
227
|
}], null, null); })();
|
|
228
228
|
|
|
229
|
+
function ModalHeaderComponent_div_2_icon_1_Template(rf, ctx) { if (rf & 1) {
|
|
230
|
+
const _r4 = ɵɵgetCurrentView();
|
|
231
|
+
ɵɵelementStart(0, "icon", 6);
|
|
232
|
+
ɵɵlistener("onClick", function ModalHeaderComponent_div_2_icon_1_Template_icon_onClick_0_listener() { ɵɵrestoreView(_r4); const ctx_r3 = ɵɵnextContext(2); return ctx_r3.changeExpand(); });
|
|
233
|
+
ɵɵelementEnd();
|
|
234
|
+
} if (rf & 2) {
|
|
235
|
+
const ctx_r1 = ɵɵnextContext(2);
|
|
236
|
+
ɵɵproperty("size", 13)("name", !ctx_r1.expanded ? "fa fa-expand-arrows-alt" : "fa fa-compress")("title", ctx_r1.titleExpand);
|
|
237
|
+
} }
|
|
238
|
+
function ModalHeaderComponent_div_2_icon_2_Template(rf, ctx) { if (rf & 1) {
|
|
239
|
+
const _r6 = ɵɵgetCurrentView();
|
|
240
|
+
ɵɵelementStart(0, "icon", 7);
|
|
241
|
+
ɵɵlistener("onClick", function ModalHeaderComponent_div_2_icon_2_Template_icon_onClick_0_listener() { ɵɵrestoreView(_r6); const ctx_r5 = ɵɵnextContext(2); return ctx_r5.closeClick.next(); });
|
|
242
|
+
ɵɵelementEnd();
|
|
243
|
+
} if (rf & 2) {
|
|
244
|
+
const ctx_r2 = ɵɵnextContext(2);
|
|
245
|
+
ɵɵproperty("title", ctx_r2.titleClose);
|
|
246
|
+
} }
|
|
247
|
+
function ModalHeaderComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
248
|
+
ɵɵelementStart(0, "div", 3);
|
|
249
|
+
ɵɵtemplate(1, ModalHeaderComponent_div_2_icon_1_Template, 1, 3, "icon", 4);
|
|
250
|
+
ɵɵtemplate(2, ModalHeaderComponent_div_2_icon_2_Template, 1, 1, "icon", 5);
|
|
251
|
+
ɵɵelementEnd();
|
|
252
|
+
} if (rf & 2) {
|
|
253
|
+
const ctx_r0 = ɵɵnextContext();
|
|
254
|
+
ɵɵadvance(1);
|
|
255
|
+
ɵɵproperty("ngIf", ctx_r0.showExpandIcon);
|
|
256
|
+
ɵɵadvance(1);
|
|
257
|
+
ɵɵproperty("ngIf", ctx_r0.showCloseIcon);
|
|
258
|
+
} }
|
|
259
|
+
class ModalHeaderComponent {
|
|
260
|
+
constructor() {
|
|
261
|
+
this.expanded = false;
|
|
262
|
+
this.showExpandIcon = false;
|
|
263
|
+
this.showCloseIcon = false;
|
|
264
|
+
this.titleClose = 'Close';
|
|
265
|
+
this.titleExpand = 'Expand';
|
|
266
|
+
this.closeClick = new EventEmitter();
|
|
267
|
+
}
|
|
268
|
+
changeExpand() {
|
|
269
|
+
var _a, _b;
|
|
270
|
+
this.expanded = !this.expanded;
|
|
271
|
+
if (this.expanded) {
|
|
272
|
+
(_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.addPanelClass('mod-expanded');
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
(_b = this.dialogRef) === null || _b === void 0 ? void 0 : _b.removePanelClass('mod-expanded');
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
ModalHeaderComponent.ɵfac = function ModalHeaderComponent_Factory(t) { return new (t || ModalHeaderComponent)(); };
|
|
280
|
+
ModalHeaderComponent.ɵcmp = ɵɵdefineComponent({ type: ModalHeaderComponent, selectors: [["modal-header"]], inputs: { title: "title", expanded: "expanded", showExpandIcon: "showExpandIcon", showCloseIcon: "showCloseIcon", titleClose: "titleClose", titleExpand: "titleExpand", dialogRef: "dialogRef" }, outputs: { closeClick: "closeClick" }, decls: 3, vars: 2, consts: [[1, "modal-title"], ["mat-dialog-title", "", 3, "innerHTML"], ["class", "modal-title-actions", 4, "ngIf"], [1, "modal-title-actions"], ["type", "primary clickable", 3, "size", "name", "title", "onClick", 4, "ngIf"], ["type", "tertiary clickable", "name", "fas fa-times", 3, "title", "onClick", 4, "ngIf"], ["type", "primary clickable", 3, "size", "name", "title", "onClick"], ["type", "tertiary clickable", "name", "fas fa-times", 3, "title", "onClick"]], template: function ModalHeaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
281
|
+
ɵɵelementStart(0, "div", 0);
|
|
282
|
+
ɵɵelement(1, "h3", 1);
|
|
283
|
+
ɵɵtemplate(2, ModalHeaderComponent_div_2_Template, 3, 2, "div", 2);
|
|
284
|
+
ɵɵelementEnd();
|
|
285
|
+
} if (rf & 2) {
|
|
286
|
+
ɵɵadvance(1);
|
|
287
|
+
ɵɵproperty("innerHTML", ctx.title, ɵɵsanitizeHtml);
|
|
288
|
+
ɵɵadvance(1);
|
|
289
|
+
ɵɵproperty("ngIf", ctx.showExpandIcon || ctx.showCloseIcon);
|
|
290
|
+
} }, 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%] > .modal-title-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;position:absolute;right:-5px;top:-5px}.modal-title[_ngcontent-%COMP%] > .modal-title-actions[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]{display:block}.modal-title[_ngcontent-%COMP%] > .modal-title-actions[_ngcontent-%COMP%] icon[_ngcontent-%COMP%]:not(:last-child){margin-right:10px}"] });
|
|
291
|
+
/*@__PURE__*/ (function () { ɵsetClassMetadata(ModalHeaderComponent, [{
|
|
292
|
+
type: Component,
|
|
293
|
+
args: [{
|
|
294
|
+
selector: 'modal-header',
|
|
295
|
+
template: `
|
|
296
|
+
<div class="modal-title">
|
|
297
|
+
<h3 [innerHTML]='title' mat-dialog-title></h3>
|
|
298
|
+
<div *ngIf="showExpandIcon || showCloseIcon" class="modal-title-actions">
|
|
299
|
+
<icon *ngIf="showExpandIcon" type="primary clickable" [size]="13" [name]="!expanded ? 'fa fa-expand-arrows-alt' : 'fa fa-compress'" [title]="titleExpand" (onClick)="changeExpand()"></icon>
|
|
300
|
+
<icon *ngIf="showCloseIcon" type="tertiary clickable" name="fas fa-times" [title]="titleClose" (onClick)="closeClick.next()"></icon>
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
`,
|
|
304
|
+
styleUrls: ['modal-header.scss']
|
|
305
|
+
}]
|
|
306
|
+
}], null, { title: [{
|
|
307
|
+
type: Input
|
|
308
|
+
}], expanded: [{
|
|
309
|
+
type: Input
|
|
310
|
+
}], showExpandIcon: [{
|
|
311
|
+
type: Input
|
|
312
|
+
}], showCloseIcon: [{
|
|
313
|
+
type: Input
|
|
314
|
+
}], titleClose: [{
|
|
315
|
+
type: Input
|
|
316
|
+
}], titleExpand: [{
|
|
317
|
+
type: Input
|
|
318
|
+
}], dialogRef: [{
|
|
319
|
+
type: Input
|
|
320
|
+
}], closeClick: [{
|
|
321
|
+
type: Output
|
|
322
|
+
}] }); })();
|
|
323
|
+
|
|
229
324
|
/**
|
|
230
325
|
* Generated bundle index. Do not edit.
|
|
231
326
|
*/
|
|
232
327
|
|
|
233
|
-
export { ConfirmDialogData, ConfirmModalDataComponent, ConfirmRemoveDialogData, ConfirmRemoveModalDataComponent, ModalsModule };
|
|
328
|
+
export { ConfirmDialogData, ConfirmModalDataComponent, ConfirmRemoveDialogData, ConfirmRemoveModalDataComponent, ModalHeaderComponent, ModalsModule };
|
|
234
329
|
//# sourceMappingURL=apipass-modals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apipass-modals.js","sources":["../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.html","../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.ts","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.html","../../../projects/modals/src/lib/confirm-modal/confirm-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\" [innerHTML]=\"data.title\" mat-dialog-title></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","<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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</div>\n\n<div class=\"modal-actions\" mat-dialog-actions>\n <tertiary-button [icon]=\"data.cancelIcon\" [label]=\"data.cancelText\" (onClick)=\"closeClick()\"></tertiary-button>\n <primary-button [icon]=\"data.confirmIcon\" [label]=\"data.confirmText\" (onClick)=\"confirmClick()\"></primary-button>\n</div>\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\n\nexport class ConfirmDialogData {\n title?: string;\n content?: string;\n confirmIcon?: string;\n confirmText?: string;\n cancelIcon?: string;\n cancelText?: string;\n showCloseIcon?: boolean;\n closeLabel?: string;\n item?: any;\n}\n\n@Component({\n selector: 'confirm-modal-data',\n templateUrl: 'confirm-modal.component.html',\n styleUrls: ['confirm-modal.component.scss']\n})\nexport class ConfirmModalDataComponent {\n\n constructor(\n public dialogRef: MatDialogRef<ConfirmModalDataComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogData\n ) {\n }\n\n closeClick(): void {\n this.dialogRef.close(false);\n }\n\n confirmClick(): void {\n this.dialogRef.close(true);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ConfirmRemoveModalDataComponent} from './lib/confirm-remove-modal/confirm-remove-modal.component';\nimport {ConfirmModalDataComponent} from './lib/confirm-modal/confirm-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 ConfirmModalDataComponent\n ],\n exports: [\n ConfirmRemoveModalDataComponent,\n ConfirmModalDataComponent\n ],\n providers: []\n})\nexport class ModalsModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i0.ɵɵelement","i0.ɵɵproperty","i0.ɵɵelementStart","i0.ɵɵlistener","i0.ɵɵelementEnd","i0.ɵɵtemplate","i0.ɵɵadvance"],"mappings":";;;;;;;;;;;;IACEA,qBAAsE;;;IAA/CC,0DAAwB;;;;IAC/CC,4BAAyI;IAAhCC,6LAAwB;IAACC,cAAO;;;IAA1DH,2CAAyB;;;IAIxGD,qBAAuD;;;IAA/BC,4DAA0B;;;;IAClDC,mCAAqH;IAA3CC,uOAA6B;IAACC,cAAa;;;IAA1EH,gDAA8B,mCAAA;;MCJ9D,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,CA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QACZ,aAAa;QACb,WAAW,aAOX,+BAA+B;QAC/B,yBAAyB;+CAIhB,YAAY;cArBxB,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;oBAC/B,yBAAyB;iBAC1B;gBACD,OAAO,EAAE;oBACP,+BAA+B;oBAC/B,yBAAyB;iBAC1B;gBACD,SAAS,EAAE,EAAE;aACd;;;AChCD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"apipass-modals.js","sources":["../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.html","../../../projects/modals/src/lib/confirm-remove-modal/confirm-remove-modal.component.ts","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.html","../../../projects/modals/src/lib/confirm-modal/confirm-modal.component.ts","../../../projects/modals/src/modals.module.ts","../../../projects/modals/src/lib/modal-header/modal-header.component.ts","../../../projects/modals/src/apipass-modals.ts"],"sourcesContent":["<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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","<div class=\"modal-title\">\n <h3 *ngIf=\"data.title\" [innerHTML]=\"data.title\" mat-dialog-title></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</div>\n\n<div class=\"modal-actions\" mat-dialog-actions>\n <tertiary-button [icon]=\"data.cancelIcon\" [label]=\"data.cancelText\" (onClick)=\"closeClick()\"></tertiary-button>\n <primary-button [icon]=\"data.confirmIcon\" [label]=\"data.confirmText\" (onClick)=\"confirmClick()\"></primary-button>\n</div>\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\n\nexport class ConfirmDialogData {\n title?: string;\n content?: string;\n confirmIcon?: string;\n confirmText?: string;\n cancelIcon?: string;\n cancelText?: string;\n showCloseIcon?: boolean;\n closeLabel?: string;\n item?: any;\n}\n\n@Component({\n selector: 'confirm-modal-data',\n templateUrl: 'confirm-modal.component.html',\n styleUrls: ['confirm-modal.component.scss']\n})\nexport class ConfirmModalDataComponent {\n\n constructor(\n public dialogRef: MatDialogRef<ConfirmModalDataComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ConfirmDialogData\n ) {\n }\n\n closeClick(): void {\n this.dialogRef.close(false);\n }\n\n confirmClick(): void {\n this.dialogRef.close(true);\n }\n\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {ConfirmRemoveModalDataComponent} from './lib/confirm-remove-modal/confirm-remove-modal.component';\nimport {ConfirmModalDataComponent} from './lib/confirm-modal/confirm-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 ConfirmModalDataComponent\n ],\n exports: [\n ConfirmRemoveModalDataComponent,\n ConfirmModalDataComponent\n ],\n providers: []\n})\nexport class ModalsModule { }\n","import {Component, EventEmitter, Input, Output} from '@angular/core';\nimport {MatDialogRef} from '@angular/material/dialog';\n\n@Component({\n selector: 'modal-header',\n template: `\n <div class=\"modal-title\">\n <h3 [innerHTML]='title' mat-dialog-title></h3>\n <div *ngIf=\"showExpandIcon || showCloseIcon\" class=\"modal-title-actions\">\n <icon *ngIf=\"showExpandIcon\" type=\"primary clickable\" [size]=\"13\" [name]=\"!expanded ? 'fa fa-expand-arrows-alt' : 'fa fa-compress'\" [title]=\"titleExpand\" (onClick)=\"changeExpand()\"></icon>\n <icon *ngIf=\"showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"titleClose\" (onClick)=\"closeClick.next()\"></icon>\n </div>\n </div>\n ` ,\n styleUrls: ['modal-header.scss']\n})\nexport class ModalHeaderComponent {\n\n @Input() title: string | undefined;\n @Input() expanded = false;\n @Input() showExpandIcon = false;\n @Input() showCloseIcon = false;\n\n @Input() titleClose = 'Close';\n @Input() titleExpand = 'Expand';\n @Input() dialogRef: MatDialogRef<ModalHeaderComponent> | undefined;\n\n @Output() closeClick: EventEmitter<any> = new EventEmitter();\n\n public changeExpand(): void {\n this.expanded = !this.expanded;\n if (this.expanded) {\n this.dialogRef?.addPanelClass('mod-expanded');\n } else {\n this.dialogRef?.removePanelClass('mod-expanded');\n }\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i0.ɵɵelement","i0.ɵɵproperty","i0.ɵɵelementStart","i0.ɵɵlistener","i0.ɵɵelementEnd","i0.ɵɵtemplate","i0.ɵɵadvance"],"mappings":";;;;;;;;;;;;IACEA,qBAAsE;;;IAA/CC,0DAAwB;;;;IAC/CC,4BAAyI;IAAhCC,6LAAwB;IAACC,cAAO;;;IAA1DH,2CAAyB;;;IAIxGD,qBAAuD;;;IAA/BC,4DAA0B;;;;IAClDC,mCAAqH;IAA3CC,uOAA6B;IAACC,cAAa;;;IAA1EH,gDAA8B,mCAAA;;MCJ9D,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,iBAAi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EAAE,CAAC,mBAAmB,CAAC;aACjC;gBAGU,KAAK;kBAAb,KAAK;YACG,QAAQ;kBAAhB,KAAK;YACG,cAAc;kBAAtB,KAAK;YACG,aAAa;kBAArB,KAAK;YAEG,UAAU;kBAAlB,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,SAAS;kBAAjB,KAAK;YAEI,UAAU;kBAAnB,MAAM;;;AC3BT;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ModalHeaderComponent {
|
|
5
|
+
title: string | undefined;
|
|
6
|
+
expanded: boolean;
|
|
7
|
+
showExpandIcon: boolean;
|
|
8
|
+
showCloseIcon: boolean;
|
|
9
|
+
titleClose: string;
|
|
10
|
+
titleExpand: string;
|
|
11
|
+
dialogRef: MatDialogRef<ModalHeaderComponent> | undefined;
|
|
12
|
+
closeClick: EventEmitter<any>;
|
|
13
|
+
changeExpand(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDef<ModalHeaderComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDefWithMeta<ModalHeaderComponent, "modal-header", never, { "title": "title"; "expanded": "expanded"; "showExpandIcon": "showExpandIcon"; "showCloseIcon": "showCloseIcon"; "titleClose": "titleClose"; "titleExpand": "titleExpand"; "dialogRef": "dialogRef"; }, { "closeClick": "closeClick"; }, never, never>;
|
|
16
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export * from '@angular/material/dialog';
|
|
|
2
2
|
export * from './modals.module';
|
|
3
3
|
export * from './lib/confirm-remove-modal/confirm-remove-modal.component';
|
|
4
4
|
export * from './lib/confirm-modal/confirm-modal.component';
|
|
5
|
+
export * from './lib/modal-header/modal-header.component';
|