@apipass/modals 0.1.1-beta.14

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/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @apipass/modals
2
+
3
+ This package is a angular component for modals
4
+
5
+ ## Installation
6
+
7
+
8
+ ```bash
9
+ npm install @apipass/modals
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ ```typescript
15
+ [...]
16
+ import {ModalsModule} from "@apipass/modals";
17
+
18
+ @NgModule({
19
+ imports: [
20
+ [...]
21
+ ModalsModule
22
+ ],
23
+ [...]
24
+ ```
25
+
26
+
27
+ ...
28
+ ```html
29
+
30
+ ```
31
+
32
+ ## License
33
+ [MIT](https://choosealicense.com/licenses/mit/)
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"ModalsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":10,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":12,"character":4},{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialogModule","line":13,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":14,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":16,"character":4},{"__symbolic":"reference","module":"@apipass/buttons","name":"ButtonsModule","line":17,"character":4},{"__symbolic":"reference","module":"@apipass/icons","name":"IconsModule","line":18,"character":4}],"declarations":[{"__symbolic":"reference","name":"ConfirmRemoveModalComponent"},{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}],"exports":[{"__symbolic":"reference","name":"ConfirmRemoveModalComponent"},{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}],"entryComponents":[{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}],"providers":[]}]}],"members":{}},"DialogRole":{"__symbolic":"interface"},"DialogPosition":{"__symbolic":"interface"},"DialogConfig":{"__symbolic":"class","members":{}},"DialogData":{"__symbolic":"interface"},"ConfirmRemoveModalComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":51,"character":1},"arguments":[{"selector":"confirm-remove-modal","template":""}]}],"members":{"title":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":57,"character":3}}]}],"content":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":58,"character":3}}]}],"confirmIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":59,"character":3}}]}],"confirmText":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":60,"character":3}}]}],"removeTextLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":61,"character":3}}]}],"removeTextConfirm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":62,"character":3}}]}],"showCloseIcon":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":3}}]}],"closeLabel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":64,"character":3}}]}],"dialogConfig":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":66,"character":3}}]}],"openModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":68,"character":3}}]}],"confirmModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":69,"character":3}}]}],"closeModal":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":70,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MatDialog","line":72,"character":29}]}],"ngOnInit":[{"__symbolic":"method"}]}},"ConfirmRemoveModalDataComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":105,"character":1},"arguments":[{"selector":"confirm-remove-modal-data","template":"<h1 *ngIf=\"data.title\" mat-dialog-title>\r\n {{data.title}}\r\n</h1>\r\n<icon *ngIf=\"data.showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"data.closeLabel\" (onClick)=\"closeClick()\"></icon>\r\n\r\n<div mat-dialog-content>\r\n <p *ngIf=\"data.content\">{{data.content}}</p>\r\n <mat-form-field appearance=\"fill\">\r\n <mat-label *ngIf=\"data.removeTextLabel\">{{data.removeTextLabel}}</mat-label>\r\n <input matInput [(ngModel)]=\"data.removeText\">\r\n </mat-form-field>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <secondary-button [btnDisabled]=\"isConfirmDisabled()\" [icon]=\"data.confirmIcon\" [mat-dialog-close]=\"data\" [label]=\"data.confirmText\"></secondary-button>\r\n</div>\r\n","styles":[".clickable{cursor:pointer}.apipass-custom-icon{background-repeat:no-repeat;background-size:100%;display:block;height:100%;width:100%}.apipass-custom-faq-icon{background-image:url(/assets/images/icons/custom/apipass-custom-faq-icon.png)}.apipass-custom-chat-icon{background-image:url(/assets/images/icons/custom/apipass-custom-chat-icon.png)}.apipass-custom-mouse-icon{background-image:url(/assets/images/icons/custom/apipass-custom-mouse-icon.png)}.apipass-customization-icon{background-image:url(/assets/images/icons/custom/apipass-customization-icon.png)}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":114,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/material/dialog","name":"MAT_DIALOG_DATA","line":114,"character":12}]}]],"parameters":[{"__symbolic":"reference","name":"MatDialogRef","module":"@angular/material/dialog","arguments":[{"__symbolic":"reference","name":"ConfirmRemoveModalDataComponent"}]},{"__symbolic":"reference","name":"any"}]}],"closeClick":[{"__symbolic":"method"}],"isConfirmDisabled":[{"__symbolic":"method"}]}}},"origins":{"ModalsModule":"./modals.module","DialogRole":"./lib/confirm-remove-modal.component","DialogPosition":"./lib/confirm-remove-modal.component","DialogConfig":"./lib/confirm-remove-modal.component","DialogData":"./lib/confirm-remove-modal.component","ConfirmRemoveModalComponent":"./lib/confirm-remove-modal.component","ConfirmRemoveModalDataComponent":"./lib/confirm-remove-modal.component"},"importAs":"@apipass/modals"}
@@ -0,0 +1,154 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/dialog'), require('@angular/material/form-field'), require('@angular/forms'), require('@angular/material/input'), require('@apipass/buttons'), require('@apipass/icons')) :
3
+ typeof define === 'function' && define.amd ? define('@apipass/modals', ['exports', '@angular/core', '@angular/common', '@angular/material/dialog', '@angular/material/form-field', '@angular/forms', '@angular/material/input', '@apipass/buttons', '@apipass/icons'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.apipass = global.apipass || {}, global.apipass.modals = {}), global.ng.core, global.ng.common, global.ng.material.dialog, global.ng.material.formField, global.ng.forms, global.ng.material.input, global.buttons, global.icons));
5
+ }(this, (function (exports, core, common, dialog, formField, forms, input, buttons, icons) { 'use strict';
6
+
7
+ var DialogConfig = /** @class */ (function () {
8
+ function DialogConfig() {
9
+ }
10
+ return DialogConfig;
11
+ }());
12
+ var ConfirmRemoveModalComponent = /** @class */ (function () {
13
+ function ConfirmRemoveModalComponent(dialog) {
14
+ this.dialog = dialog;
15
+ this.title = '';
16
+ this.content = '';
17
+ this.confirmIcon = '';
18
+ this.confirmText = 'Remove';
19
+ this.removeTextLabel = '';
20
+ this.removeTextConfirm = '';
21
+ this.showCloseIcon = true;
22
+ this.closeLabel = 'Close';
23
+ this.dialogConfig = new DialogConfig();
24
+ this.openModal = new core.EventEmitter();
25
+ this.confirmModal = new core.EventEmitter();
26
+ this.closeModal = new core.EventEmitter();
27
+ }
28
+ ConfirmRemoveModalComponent.prototype.ngOnInit = function () {
29
+ var _this = this;
30
+ this.openModal.subscribe(function () {
31
+ _this.dialogConfig.data = {
32
+ title: _this.title,
33
+ content: _this.content,
34
+ confirmIcon: _this.confirmIcon,
35
+ confirmText: _this.confirmText,
36
+ removeText: '',
37
+ removeTextLabel: _this.removeTextLabel,
38
+ removeTextConfirm: _this.removeTextConfirm,
39
+ showCloseIcon: _this.showCloseIcon,
40
+ closeLabel: _this.closeLabel
41
+ };
42
+ var dialogRef = _this.dialog.open(ConfirmRemoveModalDataComponent, _this.dialogConfig);
43
+ dialogRef.afterClosed().subscribe(function (result) {
44
+ if (!result) {
45
+ _this.closeModal.next();
46
+ _this.confirmModal.next(false);
47
+ }
48
+ if ((result === null || result === void 0 ? void 0 : result.removeText) !== _this.removeTextConfirm) {
49
+ _this.confirmModal.next(false);
50
+ }
51
+ else {
52
+ _this.confirmModal.next(true);
53
+ }
54
+ });
55
+ });
56
+ };
57
+ return ConfirmRemoveModalComponent;
58
+ }());
59
+ ConfirmRemoveModalComponent.decorators = [
60
+ { type: core.Component, args: [{
61
+ selector: 'confirm-remove-modal',
62
+ template: ""
63
+ },] }
64
+ ];
65
+ ConfirmRemoveModalComponent.ctorParameters = function () { return [
66
+ { type: dialog.MatDialog }
67
+ ]; };
68
+ ConfirmRemoveModalComponent.propDecorators = {
69
+ title: [{ type: core.Input }],
70
+ content: [{ type: core.Input }],
71
+ confirmIcon: [{ type: core.Input }],
72
+ confirmText: [{ type: core.Input }],
73
+ removeTextLabel: [{ type: core.Input }],
74
+ removeTextConfirm: [{ type: core.Input }],
75
+ showCloseIcon: [{ type: core.Input }],
76
+ closeLabel: [{ type: core.Input }],
77
+ dialogConfig: [{ type: core.Input }],
78
+ openModal: [{ type: core.Input }],
79
+ confirmModal: [{ type: core.Output }],
80
+ closeModal: [{ type: core.Output }]
81
+ };
82
+ var ConfirmRemoveModalDataComponent = /** @class */ (function () {
83
+ function ConfirmRemoveModalDataComponent(dialogRef, data) {
84
+ this.dialogRef = dialogRef;
85
+ this.data = data;
86
+ }
87
+ ConfirmRemoveModalDataComponent.prototype.closeClick = function () {
88
+ var _a, _b;
89
+ if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeText) === ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeTextConfirm)) {
90
+ this.dialogRef.close();
91
+ }
92
+ };
93
+ ConfirmRemoveModalDataComponent.prototype.isConfirmDisabled = function () {
94
+ var _a, _b;
95
+ return ((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeText) !== ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeTextConfirm);
96
+ };
97
+ return ConfirmRemoveModalDataComponent;
98
+ }());
99
+ ConfirmRemoveModalDataComponent.decorators = [
100
+ { type: core.Component, args: [{
101
+ selector: 'confirm-remove-modal-data',
102
+ template: "<h1 *ngIf=\"data.title\" mat-dialog-title>\r\n {{data.title}}\r\n</h1>\r\n<icon *ngIf=\"data.showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"data.closeLabel\" (onClick)=\"closeClick()\"></icon>\r\n\r\n<div mat-dialog-content>\r\n <p *ngIf=\"data.content\">{{data.content}}</p>\r\n <mat-form-field appearance=\"fill\">\r\n <mat-label *ngIf=\"data.removeTextLabel\">{{data.removeTextLabel}}</mat-label>\r\n <input matInput [(ngModel)]=\"data.removeText\">\r\n </mat-form-field>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <secondary-button [btnDisabled]=\"isConfirmDisabled()\" [icon]=\"data.confirmIcon\" [mat-dialog-close]=\"data\" [label]=\"data.confirmText\"></secondary-button>\r\n</div>\r\n",
103
+ styles: [".clickable{cursor:pointer}.apipass-custom-icon{background-repeat:no-repeat;background-size:100%;display:block;height:100%;width:100%}.apipass-custom-faq-icon{background-image:url(/assets/images/icons/custom/apipass-custom-faq-icon.png)}.apipass-custom-chat-icon{background-image:url(/assets/images/icons/custom/apipass-custom-chat-icon.png)}.apipass-custom-mouse-icon{background-image:url(/assets/images/icons/custom/apipass-custom-mouse-icon.png)}.apipass-customization-icon{background-image:url(/assets/images/icons/custom/apipass-customization-icon.png)}"]
104
+ },] }
105
+ ];
106
+ ConfirmRemoveModalDataComponent.ctorParameters = function () { return [
107
+ { type: dialog.MatDialogRef },
108
+ { type: undefined, decorators: [{ type: core.Inject, args: [dialog.MAT_DIALOG_DATA,] }] }
109
+ ]; };
110
+
111
+ var ModalsModule = /** @class */ (function () {
112
+ function ModalsModule() {
113
+ }
114
+ return ModalsModule;
115
+ }());
116
+ ModalsModule.decorators = [
117
+ { type: core.NgModule, args: [{
118
+ imports: [
119
+ common.CommonModule,
120
+ dialog.MatDialogModule,
121
+ formField.MatFormFieldModule,
122
+ forms.FormsModule,
123
+ input.MatInputModule,
124
+ buttons.ButtonsModule,
125
+ icons.IconsModule,
126
+ ],
127
+ declarations: [
128
+ ConfirmRemoveModalComponent,
129
+ ConfirmRemoveModalDataComponent
130
+ ],
131
+ exports: [
132
+ ConfirmRemoveModalComponent,
133
+ ConfirmRemoveModalDataComponent
134
+ ],
135
+ entryComponents: [
136
+ ConfirmRemoveModalDataComponent
137
+ ],
138
+ providers: []
139
+ },] }
140
+ ];
141
+
142
+ /**
143
+ * Generated bundle index. Do not edit.
144
+ */
145
+
146
+ exports.ConfirmRemoveModalComponent = ConfirmRemoveModalComponent;
147
+ exports.ConfirmRemoveModalDataComponent = ConfirmRemoveModalDataComponent;
148
+ exports.DialogConfig = DialogConfig;
149
+ exports.ModalsModule = ModalsModule;
150
+
151
+ Object.defineProperty(exports, '__esModule', { value: true });
152
+
153
+ })));
154
+ //# sourceMappingURL=apipass-modals.umd.js.map
@@ -0,0 +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, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from \"@angular/material/dialog\";\r\nimport {Direction} from \"@angular/cdk/bidi\";\r\n\r\nexport declare type DialogRole = 'dialog' | 'alertdialog';\r\n\r\nexport interface DialogPosition {\r\n top?: string;\r\n bottom?: string;\r\n left?: string;\r\n right?: string;\r\n}\r\n\r\nexport class DialogConfig {\r\n id?: string;\r\n role?: DialogRole;\r\n panelClass?: string | string[];\r\n hasBackdrop?: boolean;\r\n backdropClass?: string;\r\n disableClose?: boolean;\r\n\r\n width?: string;\r\n height?: string;\r\n minWidth?: number | string;\r\n minHeight?: number | string;\r\n maxWidth?: number | string;\r\n maxHeight?: number | string;\r\n\r\n data?: any;\r\n position?: DialogPosition;\r\n direction?: Direction;\r\n ariaDescribedBy?: string | null;\r\n ariaLabelledBy?: string | null;\r\n ariaLabel?: string | null;\r\n autoFocus?: boolean;\r\n restoreFocus?: boolean;\r\n closeOnNavigation?: boolean;\r\n}\r\n\r\nexport interface DialogData {\r\n title: string;\r\n content: string;\r\n confirmIcon: string;\r\n confirmText: string;\r\n removeText: string;\r\n removeTextLabel: string;\r\n removeTextConfirm: string;\r\n showCloseIcon: boolean;\r\n closeLabel: string;\r\n}\r\n\r\n@Component({\r\n selector: 'confirm-remove-modal',\r\n template: ``\r\n})\r\nexport class ConfirmRemoveModalComponent implements OnInit {\r\n\r\n @Input() public title: string = '';\r\n @Input() public content: string = '';\r\n @Input() public confirmIcon: string = '';\r\n @Input() public confirmText: string = 'Remove';\r\n @Input() public removeTextLabel: string = '';\r\n @Input() public removeTextConfirm: string = '';\r\n @Input() public showCloseIcon: boolean = true;\r\n @Input() public closeLabel: string = 'Close';\r\n\r\n @Input() public dialogConfig: DialogConfig = new DialogConfig();\r\n\r\n @Input() public openModal: EventEmitter<void> = new EventEmitter();\r\n @Output() public confirmModal: EventEmitter<boolean> = new EventEmitter();\r\n @Output() public closeModal: EventEmitter<void> = new EventEmitter();\r\n\r\n constructor(public dialog: MatDialog) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.openModal.subscribe(() => {\r\n this.dialogConfig.data = {\r\n title: this.title,\r\n content: this.content,\r\n confirmIcon: this.confirmIcon,\r\n confirmText: this.confirmText,\r\n removeText: '',\r\n removeTextLabel: this.removeTextLabel,\r\n removeTextConfirm: this.removeTextConfirm,\r\n showCloseIcon: this.showCloseIcon,\r\n closeLabel: this.closeLabel\r\n };\r\n const dialogRef = this.dialog.open(ConfirmRemoveModalDataComponent, this.dialogConfig);\r\n dialogRef.afterClosed().subscribe((result: DialogData) => {\r\n if (!result) {\r\n this.closeModal.next()\r\n this.confirmModal.next(false);\r\n }\r\n if (result?.removeText !== this.removeTextConfirm) {\r\n this.confirmModal.next(false);\r\n } else {\r\n this.confirmModal.next(true);\r\n }\r\n });\r\n })\r\n }\r\n\r\n}\r\n\r\n@Component({\r\n selector: 'confirm-remove-modal-data',\r\n templateUrl: 'confirm-remove-modal.component.html',\r\n styleUrls: ['confirm-remove-modal.component.scss']\r\n})\r\nexport class ConfirmRemoveModalDataComponent {\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: DialogData,\r\n ) {\r\n }\r\n\r\n closeClick(): void {\r\n if (this.data?.removeText === this.data?.removeTextConfirm) {\r\n this.dialogRef.close();\r\n }\r\n }\r\n\r\n isConfirmDisabled(): boolean {\r\n return this.data?.removeText !== this.data?.removeTextConfirm;\r\n }\r\n\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {ConfirmRemoveModalComponent, ConfirmRemoveModalDataComponent} from \"./lib/confirm-remove-modal.component\";\r\nimport {MatDialogModule} from \"@angular/material/dialog\";\r\nimport {MatFormFieldModule} from \"@angular/material/form-field\";\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {MatInputModule} from \"@angular/material/input\";\r\nimport {ButtonsModule} from \"@apipass/buttons\";\r\nimport {IconsModule} from \"@apipass/icons\";\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n FormsModule,\r\n MatInputModule,\r\n ButtonsModule,\r\n IconsModule,\r\n ],\r\n declarations: [\r\n ConfirmRemoveModalComponent,\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n exports: [\r\n ConfirmRemoveModalComponent,\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n entryComponents: [\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n providers: []\r\n})\r\nexport class ModalsModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["EventEmitter","Component","MatDialog","Input","Output","MatDialogRef","Inject","MAT_DIALOG_DATA","NgModule","CommonModule","MatDialogModule","MatFormFieldModule","FormsModule","MatInputModule","ButtonsModule","IconsModule"],"mappings":";;;;;;;QAaA;SAwBC;2BAAA;KAAA,IAAA;;QAmCC,qCAAmB,MAAiB;YAAjB,WAAM,GAAN,MAAM,CAAW;YAfpB,UAAK,GAAW,EAAE,CAAC;YACnB,YAAO,GAAW,EAAE,CAAC;YACrB,gBAAW,GAAW,EAAE,CAAC;YACzB,gBAAW,GAAW,QAAQ,CAAC;YAC/B,oBAAe,GAAW,EAAE,CAAC;YAC7B,sBAAiB,GAAW,EAAE,CAAC;YAC/B,kBAAa,GAAY,IAAI,CAAC;YAC9B,eAAU,GAAW,OAAO,CAAC;YAE7B,iBAAY,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function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/dialog"),require("@angular/material/form-field"),require("@angular/forms"),require("@angular/material/input"),require("@apipass/buttons"),require("@apipass/icons")):"function"==typeof define&&define.amd?define("@apipass/modals",["exports","@angular/core","@angular/common","@angular/material/dialog","@angular/material/form-field","@angular/forms","@angular/material/input","@apipass/buttons","@apipass/icons"],o):o(((e="undefined"!=typeof globalThis?globalThis:e||self).apipass=e.apipass||{},e.apipass.modals={}),e.ng.core,e.ng.common,e.ng.material.dialog,e.ng.material.formField,e.ng.forms,e.ng.material.input,e.buttons,e.icons)}(this,(function(e,o,t,a,n,i,r,s,l){"use strict";var c=function(){},m=function(){function e(e){this.dialog=e,this.title="",this.content="",this.confirmIcon="",this.confirmText="Remove",this.removeTextLabel="",this.removeTextConfirm="",this.showCloseIcon=!0,this.closeLabel="Close",this.dialogConfig=new c,this.openModal=new o.EventEmitter,this.confirmModal=new o.EventEmitter,this.closeModal=new o.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.openModal.subscribe((function(){e.dialogConfig.data={title:e.title,content:e.content,confirmIcon:e.confirmIcon,confirmText:e.confirmText,removeText:"",removeTextLabel:e.removeTextLabel,removeTextConfirm:e.removeTextConfirm,showCloseIcon:e.showCloseIcon,closeLabel:e.closeLabel},e.dialog.open(u,e.dialogConfig).afterClosed().subscribe((function(o){o||(e.closeModal.next(),e.confirmModal.next(!1)),(null==o?void 0:o.removeText)!==e.removeTextConfirm?e.confirmModal.next(!1):e.confirmModal.next(!0)}))}))},e}();m.decorators=[{type:o.Component,args:[{selector:"confirm-remove-modal",template:""}]}],m.ctorParameters=function(){return[{type:a.MatDialog}]},m.propDecorators={title:[{type:o.Input}],content:[{type:o.Input}],confirmIcon:[{type:o.Input}],confirmText:[{type:o.Input}],removeTextLabel:[{type:o.Input}],removeTextConfirm:[{type:o.Input}],showCloseIcon:[{type:o.Input}],closeLabel:[{type:o.Input}],dialogConfig:[{type:o.Input}],openModal:[{type:o.Input}],confirmModal:[{type:o.Output}],closeModal:[{type:o.Output}]};var u=function(){function e(e,o){this.dialogRef=e,this.data=o}return e.prototype.closeClick=function(){var e,o;(null===(e=this.data)||void 0===e?void 0:e.removeText)===(null===(o=this.data)||void 0===o?void 0:o.removeTextConfirm)&&this.dialogRef.close()},e.prototype.isConfirmDisabled=function(){var e,o;return(null===(e=this.data)||void 0===e?void 0:e.removeText)!==(null===(o=this.data)||void 0===o?void 0:o.removeTextConfirm)},e}();u.decorators=[{type:o.Component,args:[{selector:"confirm-remove-modal-data",template:'<h1 *ngIf="data.title" mat-dialog-title>\r\n {{data.title}}\r\n</h1>\r\n<icon *ngIf="data.showCloseIcon" type="tertiary clickable" name="fas fa-times" [title]="data.closeLabel" (onClick)="closeClick()"></icon>\r\n\r\n<div mat-dialog-content>\r\n <p *ngIf="data.content">{{data.content}}</p>\r\n <mat-form-field appearance="fill">\r\n <mat-label *ngIf="data.removeTextLabel">{{data.removeTextLabel}}</mat-label>\r\n <input matInput [(ngModel)]="data.removeText">\r\n </mat-form-field>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <secondary-button [btnDisabled]="isConfirmDisabled()" [icon]="data.confirmIcon" [mat-dialog-close]="data" [label]="data.confirmText"></secondary-button>\r\n</div>\r\n',styles:[".clickable{cursor:pointer}.apipass-custom-icon{background-repeat:no-repeat;background-size:100%;display:block;height:100%;width:100%}.apipass-custom-faq-icon{background-image:url(/assets/images/icons/custom/apipass-custom-faq-icon.png)}.apipass-custom-chat-icon{background-image:url(/assets/images/icons/custom/apipass-custom-chat-icon.png)}.apipass-custom-mouse-icon{background-image:url(/assets/images/icons/custom/apipass-custom-mouse-icon.png)}.apipass-customization-icon{background-image:url(/assets/images/icons/custom/apipass-customization-icon.png)}"]}]}],u.ctorParameters=function(){return[{type:a.MatDialogRef},{type:void 0,decorators:[{type:o.Inject,args:[a.MAT_DIALOG_DATA]}]}]};var p=function(){};p.decorators=[{type:o.NgModule,args:[{imports:[t.CommonModule,a.MatDialogModule,n.MatFormFieldModule,i.FormsModule,r.MatInputModule,s.ButtonsModule,l.IconsModule],declarations:[m,u],exports:[m,u],entryComponents:[u],providers:[]}]}],e.ConfirmRemoveModalComponent=m,e.ConfirmRemoveModalDataComponent=u,e.DialogConfig=c,e.ModalsModule=p,Object.defineProperty(e,"__esModule",{value:!0})}));
2
+ //# sourceMappingURL=apipass-modals.umd.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../projects/modals/src/lib/confirm-remove-modal.component.ts","../../../projects/modals/src/modals.module.ts"],"names":["ConfirmRemoveModalComponent","dialog","this","title","content","confirmIcon","confirmText","removeTextLabel","removeTextConfirm","showCloseIcon","closeLabel","dialogConfig","DialogConfig","openModal","EventEmitter","confirmModal","closeModal","prototype","ngOnInit","_this","subscribe","data","removeText","open","ConfirmRemoveModalDataComponent","afterClosed","result","next","Component","args","selector","template","MatDialog","Input","Output","dialogRef","closeClick","_a","_b","close","isConfirmDisabled","MatDialogRef","Inject","MAT_DIALOG_DATA","NgModule","imports","CommonModule","MatDialogModule","MatFormFieldModule","FormsModule","MatInputModule","ButtonsModule","IconsModule","declarations","exports","entryComponents","providers"],"mappings":"00BAaA,0BA2DE,SAAAA,EAAmBC,GAAAC,KAAAD,OAAAA,EAfHC,KAAAC,MAAgB,GAChBD,KAAAE,QAAkB,GAClBF,KAAAG,YAAsB,GACtBH,KAAAI,YAAsB,SACtBJ,KAAAK,gBAA0B,GAC1BL,KAAAM,kBAA4B,GAC5BN,KAAAO,eAAyB,EACzBP,KAAAQ,WAAqB,QAErBR,KAAAS,aAA6B,IAAIC,EAEjCV,KAAAW,UAAgC,IAAIC,EAAAA,aACnCZ,KAAAa,aAAsC,IAAID,EAAAA,aAC1CZ,KAAAc,WAAiC,IAAIF,EAAAA,oBAKtDd,EAAAiB,UAAAC,SAAA,WAAA,IAAAC,EAAAjB,KACEA,KAAKW,UAAUO,WAAU,WACvBD,EAAKR,aAAaU,KA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AMb,KAAA,CAACc,EAAAA,4BCjFZ,iCAvBCC,EAAAA,SAAQf,KAAA,CAAC,CACRgB,QAAS,CACPC,EAAAA,aACAC,EAAAA,gBACAC,EAAAA,mBACAC,EAAAA,YACAC,EAAAA,eACAC,EAAAA,cACAC,EAAAA,aAEFC,aAAc,CACZrD,EACAwB,GAEF8B,QAAS,CACPtD,EACAwB,GAEF+B,gBAAiB,CACf/B,GAEFgC,UAAW","sourcesContent":["import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from \"@angular/material/dialog\";\r\nimport {Direction} from \"@angular/cdk/bidi\";\r\n\r\nexport declare type DialogRole = 'dialog' | 'alertdialog';\r\n\r\nexport interface DialogPosition {\r\n top?: string;\r\n bottom?: string;\r\n left?: string;\r\n right?: string;\r\n}\r\n\r\nexport class DialogConfig {\r\n id?: string;\r\n role?: DialogRole;\r\n panelClass?: string | string[];\r\n hasBackdrop?: boolean;\r\n backdropClass?: string;\r\n disableClose?: boolean;\r\n\r\n width?: string;\r\n height?: string;\r\n minWidth?: number | string;\r\n minHeight?: number | string;\r\n maxWidth?: number | string;\r\n maxHeight?: number | string;\r\n\r\n data?: any;\r\n position?: DialogPosition;\r\n direction?: Direction;\r\n ariaDescribedBy?: string | null;\r\n ariaLabelledBy?: string | null;\r\n ariaLabel?: string | null;\r\n autoFocus?: boolean;\r\n restoreFocus?: boolean;\r\n closeOnNavigation?: boolean;\r\n}\r\n\r\nexport interface DialogData {\r\n title: string;\r\n content: string;\r\n confirmIcon: string;\r\n confirmText: string;\r\n removeText: string;\r\n removeTextLabel: string;\r\n removeTextConfirm: string;\r\n showCloseIcon: boolean;\r\n closeLabel: string;\r\n}\r\n\r\n@Component({\r\n selector: 'confirm-remove-modal',\r\n template: ``\r\n})\r\nexport class ConfirmRemoveModalComponent implements OnInit {\r\n\r\n @Input() public title: string = '';\r\n @Input() public content: string = '';\r\n @Input() public confirmIcon: string = '';\r\n @Input() public confirmText: string = 'Remove';\r\n @Input() public removeTextLabel: string = '';\r\n @Input() public removeTextConfirm: string = '';\r\n @Input() public showCloseIcon: boolean = true;\r\n @Input() public closeLabel: string = 'Close';\r\n\r\n @Input() public dialogConfig: DialogConfig = new DialogConfig();\r\n\r\n @Input() public openModal: EventEmitter<void> = new EventEmitter();\r\n @Output() public confirmModal: EventEmitter<boolean> = new EventEmitter();\r\n @Output() public closeModal: EventEmitter<void> = new EventEmitter();\r\n\r\n constructor(public dialog: MatDialog) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.openModal.subscribe(() => {\r\n this.dialogConfig.data = {\r\n title: this.title,\r\n content: this.content,\r\n confirmIcon: this.confirmIcon,\r\n confirmText: this.confirmText,\r\n removeText: '',\r\n removeTextLabel: this.removeTextLabel,\r\n removeTextConfirm: this.removeTextConfirm,\r\n showCloseIcon: this.showCloseIcon,\r\n closeLabel: this.closeLabel\r\n };\r\n const dialogRef = this.dialog.open(ConfirmRemoveModalDataComponent, this.dialogConfig);\r\n dialogRef.afterClosed().subscribe((result: DialogData) => {\r\n if (!result) {\r\n this.closeModal.next()\r\n this.confirmModal.next(false);\r\n }\r\n if (result?.removeText !== this.removeTextConfirm) {\r\n this.confirmModal.next(false);\r\n } else {\r\n this.confirmModal.next(true);\r\n }\r\n });\r\n })\r\n }\r\n\r\n}\r\n\r\n@Component({\r\n selector: 'confirm-remove-modal-data',\r\n templateUrl: 'confirm-remove-modal.component.html',\r\n styleUrls: ['confirm-remove-modal.component.scss']\r\n})\r\nexport class ConfirmRemoveModalDataComponent {\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: DialogData,\r\n ) {\r\n }\r\n\r\n closeClick(): void {\r\n if (this.data?.removeText === this.data?.removeTextConfirm) {\r\n this.dialogRef.close();\r\n }\r\n }\r\n\r\n isConfirmDisabled(): boolean {\r\n return this.data?.removeText !== this.data?.removeTextConfirm;\r\n }\r\n\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {ConfirmRemoveModalComponent, ConfirmRemoveModalDataComponent} from \"./lib/confirm-remove-modal.component\";\r\nimport {MatDialogModule} from \"@angular/material/dialog\";\r\nimport {MatFormFieldModule} from \"@angular/material/form-field\";\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {MatInputModule} from \"@angular/material/input\";\r\nimport {ButtonsModule} from \"@apipass/buttons\";\r\nimport {IconsModule} from \"@apipass/icons\";\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n FormsModule,\r\n MatInputModule,\r\n ButtonsModule,\r\n IconsModule,\r\n ],\r\n declarations: [\r\n ConfirmRemoveModalComponent,\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n exports: [\r\n ConfirmRemoveModalComponent,\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n entryComponents: [\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n providers: []\r\n})\r\nexport class ModalsModule { }\r\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpcGFzcy1tb2RhbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9tb2RhbHMvc3JjL2FwaXBhc3MtbW9kYWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=
@@ -0,0 +1,100 @@
1
+ import { Component, EventEmitter, Inject, Input, Output } from '@angular/core';
2
+ import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from "@angular/material/dialog";
3
+ export class DialogConfig {
4
+ }
5
+ export class ConfirmRemoveModalComponent {
6
+ constructor(dialog) {
7
+ this.dialog = dialog;
8
+ this.title = '';
9
+ this.content = '';
10
+ this.confirmIcon = '';
11
+ this.confirmText = 'Remove';
12
+ this.removeTextLabel = '';
13
+ this.removeTextConfirm = '';
14
+ this.showCloseIcon = true;
15
+ this.closeLabel = 'Close';
16
+ this.dialogConfig = new DialogConfig();
17
+ this.openModal = new EventEmitter();
18
+ this.confirmModal = new EventEmitter();
19
+ this.closeModal = new EventEmitter();
20
+ }
21
+ ngOnInit() {
22
+ this.openModal.subscribe(() => {
23
+ this.dialogConfig.data = {
24
+ title: this.title,
25
+ content: this.content,
26
+ confirmIcon: this.confirmIcon,
27
+ confirmText: this.confirmText,
28
+ removeText: '',
29
+ removeTextLabel: this.removeTextLabel,
30
+ removeTextConfirm: this.removeTextConfirm,
31
+ showCloseIcon: this.showCloseIcon,
32
+ closeLabel: this.closeLabel
33
+ };
34
+ const dialogRef = this.dialog.open(ConfirmRemoveModalDataComponent, this.dialogConfig);
35
+ dialogRef.afterClosed().subscribe((result) => {
36
+ if (!result) {
37
+ this.closeModal.next();
38
+ this.confirmModal.next(false);
39
+ }
40
+ if ((result === null || result === void 0 ? void 0 : result.removeText) !== this.removeTextConfirm) {
41
+ this.confirmModal.next(false);
42
+ }
43
+ else {
44
+ this.confirmModal.next(true);
45
+ }
46
+ });
47
+ });
48
+ }
49
+ }
50
+ ConfirmRemoveModalComponent.decorators = [
51
+ { type: Component, args: [{
52
+ selector: 'confirm-remove-modal',
53
+ template: ``
54
+ },] }
55
+ ];
56
+ ConfirmRemoveModalComponent.ctorParameters = () => [
57
+ { type: MatDialog }
58
+ ];
59
+ ConfirmRemoveModalComponent.propDecorators = {
60
+ title: [{ type: Input }],
61
+ content: [{ type: Input }],
62
+ confirmIcon: [{ type: Input }],
63
+ confirmText: [{ type: Input }],
64
+ removeTextLabel: [{ type: Input }],
65
+ removeTextConfirm: [{ type: Input }],
66
+ showCloseIcon: [{ type: Input }],
67
+ closeLabel: [{ type: Input }],
68
+ dialogConfig: [{ type: Input }],
69
+ openModal: [{ type: Input }],
70
+ confirmModal: [{ type: Output }],
71
+ closeModal: [{ type: Output }]
72
+ };
73
+ export class ConfirmRemoveModalDataComponent {
74
+ constructor(dialogRef, data) {
75
+ this.dialogRef = dialogRef;
76
+ this.data = data;
77
+ }
78
+ closeClick() {
79
+ var _a, _b;
80
+ if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeText) === ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeTextConfirm)) {
81
+ this.dialogRef.close();
82
+ }
83
+ }
84
+ isConfirmDisabled() {
85
+ var _a, _b;
86
+ return ((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeText) !== ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeTextConfirm);
87
+ }
88
+ }
89
+ ConfirmRemoveModalDataComponent.decorators = [
90
+ { type: Component, args: [{
91
+ selector: 'confirm-remove-modal-data',
92
+ template: "<h1 *ngIf=\"data.title\" mat-dialog-title>\r\n {{data.title}}\r\n</h1>\r\n<icon *ngIf=\"data.showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"data.closeLabel\" (onClick)=\"closeClick()\"></icon>\r\n\r\n<div mat-dialog-content>\r\n <p *ngIf=\"data.content\">{{data.content}}</p>\r\n <mat-form-field appearance=\"fill\">\r\n <mat-label *ngIf=\"data.removeTextLabel\">{{data.removeTextLabel}}</mat-label>\r\n <input matInput [(ngModel)]=\"data.removeText\">\r\n </mat-form-field>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <secondary-button [btnDisabled]=\"isConfirmDisabled()\" [icon]=\"data.confirmIcon\" [mat-dialog-close]=\"data\" [label]=\"data.confirmText\"></secondary-button>\r\n</div>\r\n",
93
+ styles: [".clickable{cursor:pointer}.apipass-custom-icon{background-repeat:no-repeat;background-size:100%;display:block;height:100%;width:100%}.apipass-custom-faq-icon{background-image:url(/assets/images/icons/custom/apipass-custom-faq-icon.png)}.apipass-custom-chat-icon{background-image:url(/assets/images/icons/custom/apipass-custom-chat-icon.png)}.apipass-custom-mouse-icon{background-image:url(/assets/images/icons/custom/apipass-custom-mouse-icon.png)}.apipass-customization-icon{background-image:url(/assets/images/icons/custom/apipass-customization-icon.png)}"]
94
+ },] }
95
+ ];
96
+ ConfirmRemoveModalDataComponent.ctorParameters = () => [
97
+ { type: MatDialogRef },
98
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
99
+ ];
100
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1yZW1vdmUtbW9kYWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbW9kYWxzL3NyYy9saWIvY29uZmlybS1yZW1vdmUtbW9kYWwuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsWUFBWSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3JGLE9BQU8sRUFBQyxlQUFlLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBQyxNQUFNLDBCQUEwQixDQUFDO0FBWWxGLE1BQU0sT0FBTyxZQUFZO0NBd0J4QjtBQWtCRCxNQUFNLE9BQU8sMkJBQTJCO0lBaUJ0QyxZQUFtQixNQUFpQjtRQUFqQixXQUFNLEdBQU4sTUFBTSxDQUFXO1FBZnBCLFVBQUssR0FBVyxFQUFFLENBQUM7UUFDbkIsWUFBTyxHQUFXLEVBQUUsQ0FBQztRQUNyQixnQkFBVyxHQUFXLEVBQUUsQ0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mZpcm0pIHtcclxuICAgICAgdGhpcy5kaWFsb2dSZWYuY2xvc2UoKTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIGlzQ29uZmlybURpc2FibGVkKCk6IGJvb2xlYW4ge1xyXG4gICAgcmV0dXJuIHRoaXMuZGF0YT8ucmVtb3ZlVGV4dCAhPT0gdGhpcy5kYXRhPy5yZW1vdmVUZXh0Q29uZmlybTtcclxuICB9XHJcblxyXG59XHJcbiJdfQ==
@@ -0,0 +1,37 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { ConfirmRemoveModalComponent, 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
+ export class ModalsModule {
11
+ }
12
+ ModalsModule.decorators = [
13
+ { type: NgModule, args: [{
14
+ imports: [
15
+ CommonModule,
16
+ MatDialogModule,
17
+ MatFormFieldModule,
18
+ FormsModule,
19
+ MatInputModule,
20
+ ButtonsModule,
21
+ IconsModule,
22
+ ],
23
+ declarations: [
24
+ ConfirmRemoveModalComponent,
25
+ ConfirmRemoveModalDataComponent
26
+ ],
27
+ exports: [
28
+ ConfirmRemoveModalComponent,
29
+ ConfirmRemoveModalDataComponent
30
+ ],
31
+ entryComponents: [
32
+ ConfirmRemoveModalDataComponent
33
+ ],
34
+ providers: []
35
+ },] }
36
+ ];
37
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWxzLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL21vZGFscy9zcmMvbW9kYWxzLm1vZHVsZS50cyJdLCJuYW1lcyI6W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Db21wb25lbnRcclxuICBdLFxyXG4gIGV4cG9ydHM6IFtcclxuICAgIENvbmZpcm1SZW1vdmVNb2RhbENvbXBvbmVudCxcclxuICAgIENvbmZpcm1SZW1vdmVNb2RhbERhdGFDb21wb25lbnRcclxuICBdLFxyXG4gIGVudHJ5Q29tcG9uZW50czogW1xyXG4gICAgQ29uZmlybVJlbW92ZU1vZGFsRGF0YUNvbXBvbmVudFxyXG4gIF0sXHJcbiAgcHJvdmlkZXJzOiBbXVxyXG59KVxyXG5leHBvcnQgY2xhc3MgTW9kYWxzTW9kdWxlIHsgfVxyXG4iXX0=
@@ -0,0 +1,3 @@
1
+ export * from './modals.module';
2
+ export * from './lib/confirm-remove-modal.component';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL21vZGFscy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGlCQUFpQixDQUFDO0FBQ2hDLGNBQWMsc0NBQXNDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL21vZGFscy5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY29uZmlybS1yZW1vdmUtbW9kYWwuY29tcG9uZW50JztcbiJdfQ==
@@ -0,0 +1,141 @@
1
+ import { EventEmitter, Component, Input, Output, Inject, NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
4
+ import { MatFormFieldModule } from '@angular/material/form-field';
5
+ import { FormsModule } from '@angular/forms';
6
+ import { MatInputModule } from '@angular/material/input';
7
+ import { ButtonsModule } from '@apipass/buttons';
8
+ import { IconsModule } from '@apipass/icons';
9
+
10
+ class DialogConfig {
11
+ }
12
+ class ConfirmRemoveModalComponent {
13
+ constructor(dialog) {
14
+ this.dialog = dialog;
15
+ this.title = '';
16
+ this.content = '';
17
+ this.confirmIcon = '';
18
+ this.confirmText = 'Remove';
19
+ this.removeTextLabel = '';
20
+ this.removeTextConfirm = '';
21
+ this.showCloseIcon = true;
22
+ this.closeLabel = 'Close';
23
+ this.dialogConfig = new DialogConfig();
24
+ this.openModal = new EventEmitter();
25
+ this.confirmModal = new EventEmitter();
26
+ this.closeModal = new EventEmitter();
27
+ }
28
+ ngOnInit() {
29
+ this.openModal.subscribe(() => {
30
+ this.dialogConfig.data = {
31
+ title: this.title,
32
+ content: this.content,
33
+ confirmIcon: this.confirmIcon,
34
+ confirmText: this.confirmText,
35
+ removeText: '',
36
+ removeTextLabel: this.removeTextLabel,
37
+ removeTextConfirm: this.removeTextConfirm,
38
+ showCloseIcon: this.showCloseIcon,
39
+ closeLabel: this.closeLabel
40
+ };
41
+ const dialogRef = this.dialog.open(ConfirmRemoveModalDataComponent, this.dialogConfig);
42
+ dialogRef.afterClosed().subscribe((result) => {
43
+ if (!result) {
44
+ this.closeModal.next();
45
+ this.confirmModal.next(false);
46
+ }
47
+ if ((result === null || result === void 0 ? void 0 : result.removeText) !== this.removeTextConfirm) {
48
+ this.confirmModal.next(false);
49
+ }
50
+ else {
51
+ this.confirmModal.next(true);
52
+ }
53
+ });
54
+ });
55
+ }
56
+ }
57
+ ConfirmRemoveModalComponent.decorators = [
58
+ { type: Component, args: [{
59
+ selector: 'confirm-remove-modal',
60
+ template: ``
61
+ },] }
62
+ ];
63
+ ConfirmRemoveModalComponent.ctorParameters = () => [
64
+ { type: MatDialog }
65
+ ];
66
+ ConfirmRemoveModalComponent.propDecorators = {
67
+ title: [{ type: Input }],
68
+ content: [{ type: Input }],
69
+ confirmIcon: [{ type: Input }],
70
+ confirmText: [{ type: Input }],
71
+ removeTextLabel: [{ type: Input }],
72
+ removeTextConfirm: [{ type: Input }],
73
+ showCloseIcon: [{ type: Input }],
74
+ closeLabel: [{ type: Input }],
75
+ dialogConfig: [{ type: Input }],
76
+ openModal: [{ type: Input }],
77
+ confirmModal: [{ type: Output }],
78
+ closeModal: [{ type: Output }]
79
+ };
80
+ class ConfirmRemoveModalDataComponent {
81
+ constructor(dialogRef, data) {
82
+ this.dialogRef = dialogRef;
83
+ this.data = data;
84
+ }
85
+ closeClick() {
86
+ var _a, _b;
87
+ if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeText) === ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeTextConfirm)) {
88
+ this.dialogRef.close();
89
+ }
90
+ }
91
+ isConfirmDisabled() {
92
+ var _a, _b;
93
+ return ((_a = this.data) === null || _a === void 0 ? void 0 : _a.removeText) !== ((_b = this.data) === null || _b === void 0 ? void 0 : _b.removeTextConfirm);
94
+ }
95
+ }
96
+ ConfirmRemoveModalDataComponent.decorators = [
97
+ { type: Component, args: [{
98
+ selector: 'confirm-remove-modal-data',
99
+ template: "<h1 *ngIf=\"data.title\" mat-dialog-title>\r\n {{data.title}}\r\n</h1>\r\n<icon *ngIf=\"data.showCloseIcon\" type=\"tertiary clickable\" name=\"fas fa-times\" [title]=\"data.closeLabel\" (onClick)=\"closeClick()\"></icon>\r\n\r\n<div mat-dialog-content>\r\n <p *ngIf=\"data.content\">{{data.content}}</p>\r\n <mat-form-field appearance=\"fill\">\r\n <mat-label *ngIf=\"data.removeTextLabel\">{{data.removeTextLabel}}</mat-label>\r\n <input matInput [(ngModel)]=\"data.removeText\">\r\n </mat-form-field>\r\n</div>\r\n\r\n<div mat-dialog-actions>\r\n <secondary-button [btnDisabled]=\"isConfirmDisabled()\" [icon]=\"data.confirmIcon\" [mat-dialog-close]=\"data\" [label]=\"data.confirmText\"></secondary-button>\r\n</div>\r\n",
100
+ styles: [".clickable{cursor:pointer}.apipass-custom-icon{background-repeat:no-repeat;background-size:100%;display:block;height:100%;width:100%}.apipass-custom-faq-icon{background-image:url(/assets/images/icons/custom/apipass-custom-faq-icon.png)}.apipass-custom-chat-icon{background-image:url(/assets/images/icons/custom/apipass-custom-chat-icon.png)}.apipass-custom-mouse-icon{background-image:url(/assets/images/icons/custom/apipass-custom-mouse-icon.png)}.apipass-customization-icon{background-image:url(/assets/images/icons/custom/apipass-customization-icon.png)}"]
101
+ },] }
102
+ ];
103
+ ConfirmRemoveModalDataComponent.ctorParameters = () => [
104
+ { type: MatDialogRef },
105
+ { type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
106
+ ];
107
+
108
+ class ModalsModule {
109
+ }
110
+ ModalsModule.decorators = [
111
+ { type: NgModule, args: [{
112
+ imports: [
113
+ CommonModule,
114
+ MatDialogModule,
115
+ MatFormFieldModule,
116
+ FormsModule,
117
+ MatInputModule,
118
+ ButtonsModule,
119
+ IconsModule,
120
+ ],
121
+ declarations: [
122
+ ConfirmRemoveModalComponent,
123
+ ConfirmRemoveModalDataComponent
124
+ ],
125
+ exports: [
126
+ ConfirmRemoveModalComponent,
127
+ ConfirmRemoveModalDataComponent
128
+ ],
129
+ entryComponents: [
130
+ ConfirmRemoveModalDataComponent
131
+ ],
132
+ providers: []
133
+ },] }
134
+ ];
135
+
136
+ /**
137
+ * Generated bundle index. Do not edit.
138
+ */
139
+
140
+ export { ConfirmRemoveModalComponent, ConfirmRemoveModalDataComponent, DialogConfig, ModalsModule };
141
+ //# sourceMappingURL=apipass-modals.js.map
@@ -0,0 +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, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from \"@angular/material/dialog\";\r\nimport {Direction} from \"@angular/cdk/bidi\";\r\n\r\nexport declare type DialogRole = 'dialog' | 'alertdialog';\r\n\r\nexport interface DialogPosition {\r\n top?: string;\r\n bottom?: string;\r\n left?: string;\r\n right?: string;\r\n}\r\n\r\nexport class DialogConfig {\r\n id?: string;\r\n role?: DialogRole;\r\n panelClass?: string | string[];\r\n hasBackdrop?: boolean;\r\n backdropClass?: string;\r\n disableClose?: boolean;\r\n\r\n width?: string;\r\n height?: string;\r\n minWidth?: number | string;\r\n minHeight?: number | string;\r\n maxWidth?: number | string;\r\n maxHeight?: number | string;\r\n\r\n data?: any;\r\n position?: DialogPosition;\r\n direction?: Direction;\r\n ariaDescribedBy?: string | null;\r\n ariaLabelledBy?: string | null;\r\n ariaLabel?: string | null;\r\n autoFocus?: boolean;\r\n restoreFocus?: boolean;\r\n closeOnNavigation?: boolean;\r\n}\r\n\r\nexport interface DialogData {\r\n title: string;\r\n content: string;\r\n confirmIcon: string;\r\n confirmText: string;\r\n removeText: string;\r\n removeTextLabel: string;\r\n removeTextConfirm: string;\r\n showCloseIcon: boolean;\r\n closeLabel: string;\r\n}\r\n\r\n@Component({\r\n selector: 'confirm-remove-modal',\r\n template: ``\r\n})\r\nexport class ConfirmRemoveModalComponent implements OnInit {\r\n\r\n @Input() public title: string = '';\r\n @Input() public content: string = '';\r\n @Input() public confirmIcon: string = '';\r\n @Input() public confirmText: string = 'Remove';\r\n @Input() public removeTextLabel: string = '';\r\n @Input() public removeTextConfirm: string = '';\r\n @Input() public showCloseIcon: boolean = true;\r\n @Input() public closeLabel: string = 'Close';\r\n\r\n @Input() public dialogConfig: DialogConfig = new DialogConfig();\r\n\r\n @Input() public openModal: EventEmitter<void> = new EventEmitter();\r\n @Output() public confirmModal: EventEmitter<boolean> = new EventEmitter();\r\n @Output() public closeModal: EventEmitter<void> = new EventEmitter();\r\n\r\n constructor(public dialog: MatDialog) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.openModal.subscribe(() => {\r\n this.dialogConfig.data = {\r\n title: this.title,\r\n content: this.content,\r\n confirmIcon: this.confirmIcon,\r\n confirmText: this.confirmText,\r\n removeText: '',\r\n removeTextLabel: this.removeTextLabel,\r\n removeTextConfirm: this.removeTextConfirm,\r\n showCloseIcon: this.showCloseIcon,\r\n closeLabel: this.closeLabel\r\n };\r\n const dialogRef = this.dialog.open(ConfirmRemoveModalDataComponent, this.dialogConfig);\r\n dialogRef.afterClosed().subscribe((result: DialogData) => {\r\n if (!result) {\r\n this.closeModal.next()\r\n this.confirmModal.next(false);\r\n }\r\n if (result?.removeText !== this.removeTextConfirm) {\r\n this.confirmModal.next(false);\r\n } else {\r\n this.confirmModal.next(true);\r\n }\r\n });\r\n })\r\n }\r\n\r\n}\r\n\r\n@Component({\r\n selector: 'confirm-remove-modal-data',\r\n templateUrl: 'confirm-remove-modal.component.html',\r\n styleUrls: ['confirm-remove-modal.component.scss']\r\n})\r\nexport class ConfirmRemoveModalDataComponent {\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: DialogData,\r\n ) {\r\n }\r\n\r\n closeClick(): void {\r\n if (this.data?.removeText === this.data?.removeTextConfirm) {\r\n this.dialogRef.close();\r\n }\r\n }\r\n\r\n isConfirmDisabled(): boolean {\r\n return this.data?.removeText !== this.data?.removeTextConfirm;\r\n }\r\n\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {ConfirmRemoveModalComponent, ConfirmRemoveModalDataComponent} from \"./lib/confirm-remove-modal.component\";\r\nimport {MatDialogModule} from \"@angular/material/dialog\";\r\nimport {MatFormFieldModule} from \"@angular/material/form-field\";\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {MatInputModule} from \"@angular/material/input\";\r\nimport {ButtonsModule} from \"@apipass/buttons\";\r\nimport {IconsModule} from \"@apipass/icons\";\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n FormsModule,\r\n MatInputModule,\r\n ButtonsModule,\r\n IconsModule,\r\n ],\r\n declarations: [\r\n ConfirmRemoveModalComponent,\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n exports: [\r\n ConfirmRemoveModalComponent,\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n entryComponents: [\r\n ConfirmRemoveModalDataComponent\r\n ],\r\n providers: []\r\n})\r\nexport class ModalsModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAaa,YAAY;CAwBxB;MAkBY,2BAA2B;IAiBtC,YAAmB,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;QAfpB,UAAK,GAAW,EAAE,CAAC;QACnB,YAAO,GAAW,EAAE,CAAC;QACrB,gBAAW,GAAW,EAAE,CAAC;QACzB,gBAAW,GAAW,QAAQ,CAAC;QAC/B,oBAAe,GAAW,EAAE,CAAC;QAC7B,sBAAiB,GAAW,EAAE,CAAC;QAC/B,kBAAa,GAAY,IAAI,CAAC;QAC9B,eAAU,GAAW,OAAO,CAAC;QAE7B,iBAAY,GAAiB,IAAI,YAAY,EAAE,CAAC;QAEhD,cAAS,GAAuB,IAAI,YAAY,EAAE,CAAC;QAClD,iBAAY,GAA0B,IAAI,YAAY,EAAE,CAAC;QACzD,eAAU,GAAuB,IAAI,YAAY,EAAE,CAAC;KAGpE;IAED,QAAQ;QACN,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;YACvB,IAAI,CAAC,YAAY,CAAC,IAAI,GAAG;gBACvB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,UAAU,EAAE,EAAE;gBACd,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;gBACzC,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,UAAU,EAAE,IAAI,CAAC,UAAU;aAC5B,CAAC;YACF,MAAM,S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CAAC;KAC/D;;;YArBF,SAAS,SAAC;gBACT,QAAQ,EAAE,2BAA2B;gBACrC,2uBAAkD;;aAEnD;;;YA5GmC,YAAY;4CAiH3C,MAAM,SAAC,eAAe;;;MCjFd,YAAY;;;YAvBxB,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,eAAe;oBACf,kBAAkB;oBAClB,WAAW;oBACX,cAAc;oBACd,aAAa;oBACb,WAAW;iBACZ;gBACD,YAAY,EAAE;oBACZ,2BAA2B;oBAC3B,+BAA+B;iBAChC;gBACD,OAAO,EAAE;oBACP,2BAA2B;oBAC3B,+BAA+B;iBAChC;gBACD,eAAe,EAAE;oBACf,+BAA+B;iBAChC;gBACD,SAAS,EAAE,EAAE;aACd;;;AChCD;;;;;;"}
@@ -0,0 +1,68 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { MatDialog, MatDialogRef } from "@angular/material/dialog";
3
+ import { Direction } from "@angular/cdk/bidi";
4
+ export declare type DialogRole = 'dialog' | 'alertdialog';
5
+ export interface DialogPosition {
6
+ top?: string;
7
+ bottom?: string;
8
+ left?: string;
9
+ right?: string;
10
+ }
11
+ export declare class DialogConfig {
12
+ id?: string;
13
+ role?: DialogRole;
14
+ panelClass?: string | string[];
15
+ hasBackdrop?: boolean;
16
+ backdropClass?: string;
17
+ disableClose?: boolean;
18
+ width?: string;
19
+ height?: string;
20
+ minWidth?: number | string;
21
+ minHeight?: number | string;
22
+ maxWidth?: number | string;
23
+ maxHeight?: number | string;
24
+ data?: any;
25
+ position?: DialogPosition;
26
+ direction?: Direction;
27
+ ariaDescribedBy?: string | null;
28
+ ariaLabelledBy?: string | null;
29
+ ariaLabel?: string | null;
30
+ autoFocus?: boolean;
31
+ restoreFocus?: boolean;
32
+ closeOnNavigation?: boolean;
33
+ }
34
+ export interface DialogData {
35
+ title: string;
36
+ content: string;
37
+ confirmIcon: string;
38
+ confirmText: string;
39
+ removeText: string;
40
+ removeTextLabel: string;
41
+ removeTextConfirm: string;
42
+ showCloseIcon: boolean;
43
+ closeLabel: string;
44
+ }
45
+ export declare class ConfirmRemoveModalComponent implements OnInit {
46
+ dialog: MatDialog;
47
+ title: string;
48
+ content: string;
49
+ confirmIcon: string;
50
+ confirmText: string;
51
+ removeTextLabel: string;
52
+ removeTextConfirm: string;
53
+ showCloseIcon: boolean;
54
+ closeLabel: string;
55
+ dialogConfig: DialogConfig;
56
+ openModal: EventEmitter<void>;
57
+ confirmModal: EventEmitter<boolean>;
58
+ closeModal: EventEmitter<void>;
59
+ constructor(dialog: MatDialog);
60
+ ngOnInit(): void;
61
+ }
62
+ export declare class ConfirmRemoveModalDataComponent {
63
+ dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>;
64
+ data: DialogData;
65
+ constructor(dialogRef: MatDialogRef<ConfirmRemoveModalDataComponent>, data: DialogData);
66
+ closeClick(): void;
67
+ isConfirmDisabled(): boolean;
68
+ }
@@ -0,0 +1,2 @@
1
+ export declare class ModalsModule {
2
+ }
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@apipass/modals",
3
+ "version": "0.1.1-beta.14",
4
+ "peerDependencies": {
5
+ "@angular/animations": "10.0.11",
6
+ "@angular/cdk": "10.0.2",
7
+ "@angular/common": "10.0.11",
8
+ "@angular/core": "10.0.11",
9
+ "@angular/forms": "10.0.11"
10
+ },
11
+ "dependencies": {
12
+ "@angular/animations": "10.0.11",
13
+ "@angular/cdk": "10.0.2",
14
+ "@angular/common": "10.0.11",
15
+ "@angular/core": "10.0.11",
16
+ "@angular/forms": "10.0.11",
17
+ "@angular/material": "10.0.2",
18
+ "@apipass/icons": "^0.1.1-beta.6",
19
+ "@apipass/buttons": "^0.1.1-beta.5",
20
+ "tslib": "2.0.0"
21
+ },
22
+ "main": "bundles/apipass-modals.umd.js",
23
+ "module": "fesm2015/apipass-modals.js",
24
+ "es2015": "fesm2015/apipass-modals.js",
25
+ "esm2015": "esm2015/apipass-modals.js",
26
+ "fesm2015": "fesm2015/apipass-modals.js",
27
+ "typings": "apipass-modals.d.ts",
28
+ "metadata": "apipass-modals.metadata.json",
29
+ "sideEffects": false
30
+ }
@@ -0,0 +1,2 @@
1
+ export * from './modals.module';
2
+ export * from './lib/confirm-remove-modal.component';