@memberjunction/ng-generic-dialog 2.48.0 → 2.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/dialog.component.js +52 -50
- package/dist/lib/dialog.component.js.map +1 -1
- package/dist/module.js +5 -5
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
|
@@ -69,47 +69,38 @@ function GenericDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
69
69
|
* </mj-generic-dialog>
|
|
70
70
|
*/
|
|
71
71
|
export class GenericDialogComponent {
|
|
72
|
+
cdr;
|
|
72
73
|
constructor(cdr) {
|
|
73
74
|
this.cdr = cdr;
|
|
74
|
-
/**
|
|
75
|
-
* Dialog title
|
|
76
|
-
*/
|
|
77
|
-
this.DialogTitle = 'Default Title';
|
|
78
|
-
/**
|
|
79
|
-
* Optional, width of the dialog in pixels or percentage
|
|
80
|
-
*/
|
|
81
|
-
this.DialogWidth = '700px';
|
|
82
|
-
/**
|
|
83
|
-
* Optional, height of the dialog in pixels or percentage
|
|
84
|
-
*/
|
|
85
|
-
this.DialogHeight = '450px';
|
|
86
|
-
/**
|
|
87
|
-
* Ability to turn off the built-in OK button if it is not desired
|
|
88
|
-
*/
|
|
89
|
-
this.ShowOKButton = true;
|
|
90
|
-
/**
|
|
91
|
-
* Text displayed on the OK button, defaults to "OK" if not provided
|
|
92
|
-
*/
|
|
93
|
-
this.OKButtonText = "OK";
|
|
94
|
-
/**
|
|
95
|
-
* Text displayed on the Cancel button, defaults to "Cancel" if not provided
|
|
96
|
-
*/
|
|
97
|
-
this.CancelButtonText = "Cancel";
|
|
98
|
-
/**
|
|
99
|
-
* Ability to turn off the built-in Cancel button if it is not desired
|
|
100
|
-
*/
|
|
101
|
-
this.ShowCancelButton = true;
|
|
102
|
-
this._dialogVisible = false;
|
|
103
|
-
/**
|
|
104
|
-
* Emits when the dialog is closed, the parameter is true if the dialog was closed with the OK button, false if it was closed with the Cancel button
|
|
105
|
-
*/
|
|
106
|
-
this.DialogClosed = new EventEmitter();
|
|
107
|
-
/**
|
|
108
|
-
* This event is fired during the component lifecycle if the dialog wants the user of the dialog to refresh the data provided within its content.
|
|
109
|
-
*/
|
|
110
|
-
this.RefreshData = new EventEmitter();
|
|
111
|
-
this._hasCustomActions = false;
|
|
112
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Dialog title
|
|
78
|
+
*/
|
|
79
|
+
DialogTitle = 'Default Title';
|
|
80
|
+
/**
|
|
81
|
+
* Optional, width of the dialog in pixels or percentage
|
|
82
|
+
*/
|
|
83
|
+
DialogWidth = '700px';
|
|
84
|
+
/**
|
|
85
|
+
* Optional, height of the dialog in pixels or percentage
|
|
86
|
+
*/
|
|
87
|
+
DialogHeight = '450px';
|
|
88
|
+
/**
|
|
89
|
+
* Ability to turn off the built-in OK button if it is not desired
|
|
90
|
+
*/
|
|
91
|
+
ShowOKButton = true;
|
|
92
|
+
/**
|
|
93
|
+
* Text displayed on the OK button, defaults to "OK" if not provided
|
|
94
|
+
*/
|
|
95
|
+
OKButtonText = "OK";
|
|
96
|
+
/**
|
|
97
|
+
* Text displayed on the Cancel button, defaults to "Cancel" if not provided
|
|
98
|
+
*/
|
|
99
|
+
CancelButtonText = "Cancel";
|
|
100
|
+
/**
|
|
101
|
+
* Ability to turn off the built-in Cancel button if it is not desired
|
|
102
|
+
*/
|
|
103
|
+
ShowCancelButton = true;
|
|
113
104
|
/**
|
|
114
105
|
* Determines if the dialog is visible or not, bind this to a variable in your containing component that is changed to true when you want the dialog shown. When the user closes the dialog this property will
|
|
115
106
|
* be set to false automatically.
|
|
@@ -125,6 +116,15 @@ export class GenericDialogComponent {
|
|
|
125
116
|
this._dialogVisible = value;
|
|
126
117
|
this.cdr.detectChanges(); // Ensure visibility updates immediately
|
|
127
118
|
}
|
|
119
|
+
_dialogVisible = false;
|
|
120
|
+
/**
|
|
121
|
+
* Emits when the dialog is closed, the parameter is true if the dialog was closed with the OK button, false if it was closed with the Cancel button
|
|
122
|
+
*/
|
|
123
|
+
DialogClosed = new EventEmitter();
|
|
124
|
+
/**
|
|
125
|
+
* This event is fired during the component lifecycle if the dialog wants the user of the dialog to refresh the data provided within its content.
|
|
126
|
+
*/
|
|
127
|
+
RefreshData = new EventEmitter();
|
|
128
128
|
/**
|
|
129
129
|
* Internal event handler for the Cancel button, you can call this method directly if you want to simulate the user clicking on the Cancel button
|
|
130
130
|
*/
|
|
@@ -139,28 +139,30 @@ export class GenericDialogComponent {
|
|
|
139
139
|
this.DialogVisible = false;
|
|
140
140
|
this.DialogClosed.emit(true);
|
|
141
141
|
}
|
|
142
|
+
_hasCustomActions = false;
|
|
142
143
|
/**
|
|
143
144
|
* Returns true if the dialog has custom actions defined in the custom-actions slot
|
|
144
145
|
*/
|
|
145
146
|
get HasCustomActions() {
|
|
146
147
|
return this._hasCustomActions;
|
|
147
148
|
}
|
|
149
|
+
customActions;
|
|
148
150
|
ngAfterContentInit() {
|
|
149
151
|
this._hasCustomActions = !!this.customActions;
|
|
150
152
|
}
|
|
153
|
+
static ɵfac = function GenericDialogComponent_Factory(t) { return new (t || GenericDialogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
154
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GenericDialogComponent, selectors: [["mj-generic-dialog"]], contentQueries: function GenericDialogComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
155
|
+
i0.ɵɵcontentQuery(dirIndex, _c0, 5);
|
|
156
|
+
} if (rf & 2) {
|
|
157
|
+
let _t;
|
|
158
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customActions = _t.first);
|
|
159
|
+
} }, inputs: { DialogTitle: "DialogTitle", DialogWidth: "DialogWidth", DialogHeight: "DialogHeight", ShowOKButton: "ShowOKButton", OKButtonText: "OKButtonText", CancelButtonText: "CancelButtonText", ShowCancelButton: "ShowCancelButton", DialogVisible: "DialogVisible" }, outputs: { DialogClosed: "DialogClosed", RefreshData: "RefreshData" }, ngContentSelectors: _c2, decls: 1, vars: 1, consts: [[3, "width", "height", "title"], [3, "close", "width", "height", "title"], ["kendoButton", "", "themeColor", "primary"], ["kendoButton", ""], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"]], template: function GenericDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
160
|
+
i0.ɵɵprojectionDef(_c1);
|
|
161
|
+
i0.ɵɵtemplate(0, GenericDialogComponent_Conditional_0_Template, 7, 6, "kendo-dialog", 0);
|
|
162
|
+
} if (rf & 2) {
|
|
163
|
+
i0.ɵɵconditional(ctx.DialogVisible ? 0 : -1);
|
|
164
|
+
} }, dependencies: [i1.DialogComponent, i1.DialogActionsComponent, i2.ButtonComponent] });
|
|
151
165
|
}
|
|
152
|
-
GenericDialogComponent.ɵfac = function GenericDialogComponent_Factory(t) { return new (t || GenericDialogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
153
|
-
GenericDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GenericDialogComponent, selectors: [["mj-generic-dialog"]], contentQueries: function GenericDialogComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
|
|
154
|
-
i0.ɵɵcontentQuery(dirIndex, _c0, 5);
|
|
155
|
-
} if (rf & 2) {
|
|
156
|
-
let _t;
|
|
157
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customActions = _t.first);
|
|
158
|
-
} }, inputs: { DialogTitle: "DialogTitle", DialogWidth: "DialogWidth", DialogHeight: "DialogHeight", ShowOKButton: "ShowOKButton", OKButtonText: "OKButtonText", CancelButtonText: "CancelButtonText", ShowCancelButton: "ShowCancelButton", DialogVisible: "DialogVisible" }, outputs: { DialogClosed: "DialogClosed", RefreshData: "RefreshData" }, ngContentSelectors: _c2, decls: 1, vars: 1, consts: [[3, "width", "height", "title"], [3, "close", "width", "height", "title"], ["kendoButton", "", "themeColor", "primary"], ["kendoButton", ""], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"]], template: function GenericDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
159
|
-
i0.ɵɵprojectionDef(_c1);
|
|
160
|
-
i0.ɵɵtemplate(0, GenericDialogComponent_Conditional_0_Template, 7, 6, "kendo-dialog", 0);
|
|
161
|
-
} if (rf & 2) {
|
|
162
|
-
i0.ɵɵconditional(ctx.DialogVisible ? 0 : -1);
|
|
163
|
-
} }, dependencies: [i1.DialogComponent, i1.DialogActionsComponent, i2.ButtonComponent] });
|
|
164
166
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GenericDialogComponent, [{
|
|
165
167
|
type: Component,
|
|
166
168
|
args: [{ selector: 'mj-generic-dialog', template: "@if (DialogVisible) {\n <kendo-dialog\n [width]=\"DialogWidth\"\n [height]=\"DialogHeight\"\n [title]=\"DialogTitle\" \n (close)=\"HandleCancelClick()\"\n >\n <ng-content></ng-content>\n <kendo-dialog-actions>\n @if(ShowOKButton) {\n <button kendoButton (click)=\"HandleOKClick()\" themeColor=\"primary\">{{OKButtonText}}</button>\n }\n @if(ShowCancelButton) {\n <button kendoButton (click)=\"HandleCancelClick()\">{{CancelButtonText}}</button>\n }\n\n <!-- Named slot for custom actions/buttons -->\n <ng-content select=\"[custom-actions]\"></ng-content>\n\n @if(!ShowOKButton && !ShowCancelButton && !HasCustomActions) {\n <span>No actions available - enable built-in actions or add custom actions</span>\n }\n </kendo-dialog-actions> \n </kendo-dialog> \n}" }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.component.js","sourceRoot":"","sources":["../../src/lib/dialog.component.ts","../../src/lib/dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAiC,YAAY,EAAoB,MAAM,eAAe,CAAC;;;;;;;;;ICUtH,iCAAmE;IAA/C,yMAAS,sBAAe,KAAC;IAAsB,YAAgB;IAAA,iBAAS;;;IAAzB,cAAgB;IAAhB,yCAAgB;;;;IAGnF,iCAAkD;IAA9B,yMAAS,0BAAmB,KAAC;IAAC,YAAoB;IAAA,iBAAS;;;IAA7B,cAAoB;IAApB,6CAAoB;;;IAOtE,4BAAM;IAAA,oFAAoE;IAAA,iBAAO;;;;IAnB7F,uCAKC;IADG,gMAAS,0BAAmB,KAAC;IAE7B,kBAAyB;IACzB,4CAAsB;IAIlB,AAHA,gGAAmB,mFAGI;IAKvB,qBAAmD;IAEnD,2FAA8D;IAItE,AADI,iBAAuB,EACZ;;;IAnBX,AADA,AADA,0CAAqB,+BACE,6BACF;IAKjB,eAEC;IAFD,8CAEC;IACD,cAEC;IAFD,kDAEC;IAKD,eAEC;IAFD,uGAEC;;ADnBb;;;;;;;;;;;;;;;GAeG;AAMH,MAAM,OAAO,sBAAsB;
|
|
1
|
+
{"version":3,"file":"dialog.component.js","sourceRoot":"","sources":["../../src/lib/dialog.component.ts","../../src/lib/dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAiC,YAAY,EAAoB,MAAM,eAAe,CAAC;;;;;;;;;ICUtH,iCAAmE;IAA/C,yMAAS,sBAAe,KAAC;IAAsB,YAAgB;IAAA,iBAAS;;;IAAzB,cAAgB;IAAhB,yCAAgB;;;;IAGnF,iCAAkD;IAA9B,yMAAS,0BAAmB,KAAC;IAAC,YAAoB;IAAA,iBAAS;;;IAA7B,cAAoB;IAApB,6CAAoB;;;IAOtE,4BAAM;IAAA,oFAAoE;IAAA,iBAAO;;;;IAnB7F,uCAKC;IADG,gMAAS,0BAAmB,KAAC;IAE7B,kBAAyB;IACzB,4CAAsB;IAIlB,AAHA,gGAAmB,mFAGI;IAKvB,qBAAmD;IAEnD,2FAA8D;IAItE,AADI,iBAAuB,EACZ;;;IA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I,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAEO,iBAAiB,GAAY,KAAK,CAAC;IAC3C;;OAEG;IACH,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAEkD,aAAa,CAAc;IAE9E,kBAAkB;QACd,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;IAClD,CAAC;gFA5FU,sBAAsB;6DAAtB,sBAAsB;;;;;;;YCvBnC,wFAAqB;;YAArB,4CAwBC;;;iFDDY,sBAAsB;cALlC,SAAS;2BACE,mBAAmB;kDAUpB,WAAW;kBAAnB,KAAK;YAIG,WAAW;kBAAnB,KAAK;YAIG,YAAY;kBAApB,KAAK;YAKG,YAAY;kBAApB,KAAK;YAKG,YAAY;kBAApB,KAAK;YAKG,gBAAgB;kBAAxB,KAAK;YAKG,gBAAgB;kBAAxB,KAAK;YAMO,aAAa;kBAAzB,KAAK;YAiBI,YAAY;kBAArB,MAAM;YAKG,WAAW;kBAApB,MAAM;YA0B4C,aAAa;kBAA/D,YAAY;mBAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;kFAxFtC,sBAAsB"}
|
package/dist/module.js
CHANGED
|
@@ -6,12 +6,12 @@ import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
|
6
6
|
import { GenericDialogComponent } from './lib/dialog.component';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export class GenericDialogModule {
|
|
9
|
+
static ɵfac = function GenericDialogModule_Factory(t) { return new (t || GenericDialogModule)(); };
|
|
10
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: GenericDialogModule });
|
|
11
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
12
|
+
DialogsModule,
|
|
13
|
+
ButtonsModule] });
|
|
9
14
|
}
|
|
10
|
-
GenericDialogModule.ɵfac = function GenericDialogModule_Factory(t) { return new (t || GenericDialogModule)(); };
|
|
11
|
-
GenericDialogModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: GenericDialogModule });
|
|
12
|
-
GenericDialogModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
13
|
-
DialogsModule,
|
|
14
|
-
ButtonsModule] });
|
|
15
15
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GenericDialogModule, [{
|
|
16
16
|
type: NgModule,
|
|
17
17
|
args: [{
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,2BAA2B;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;;AAehE,MAAM,OAAO,mBAAmB
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,2BAA2B;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;;AAehE,MAAM,OAAO,mBAAmB;6EAAnB,mBAAmB;4DAAnB,mBAAmB;gEAR5B,YAAY;YACZ,aAAa;YACb,aAAa;;iFAMJ,mBAAmB;cAb/B,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,sBAAsB;iBACvB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,aAAa;oBACb,aAAa;iBACd;gBACD,OAAO,EAAE;oBACP,sBAAsB;iBACvB;aACF;;wFACY,mBAAmB,mBAX5B,sBAAsB,aAGtB,YAAY;QACZ,aAAa;QACb,aAAa,aAGb,sBAAsB"}
|
package/package.json
CHANGED