@memberjunction/ng-generic-dialog 5.21.0 → 5.23.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.
@@ -10,9 +10,9 @@ import * as i0 from "@angular/core";
10
10
  * Your content goes in here
11
11
  * </div>
12
12
  * <div custom-actions>
13
- * <button kendoButton (click)="customOkClick()" themeColor="primary">Custom OK</button>
14
- * <button kendoButton (click)="customCancelClick()">Custom Cancel</button>
15
- * <button kendoButton (click)="additionalAction()">Additional Action</button>
13
+ * <button mjButton variant="primary" (click)="customOkClick()">Custom OK</button>
14
+ * <button mjButton (click)="customCancelClick()">Custom Cancel</button>
15
+ * <button mjButton (click)="additionalAction()">Additional Action</button>
16
16
  * </div>
17
17
  * </mj-generic-dialog>
18
18
  */
@@ -1,7 +1,6 @@
1
1
  import { Component, Output, EventEmitter, Input, ContentChild } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- import * as i1 from "@progress/kendo-angular-dialog";
4
- import * as i2 from "@progress/kendo-angular-buttons";
3
+ import * as i1 from "@memberjunction/ng-ui-components";
5
4
  const _c0 = ["custom-actions"];
6
5
  const _c1 = ["*", [["", "custom-actions", ""]]];
7
6
  const _c2 = ["*", "[custom-actions]"];
@@ -34,10 +33,10 @@ function GenericDialogComponent_Conditional_0_Conditional_6_Template(rf, ctx) {
34
33
  } }
35
34
  function GenericDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
36
35
  const _r1 = i0.ɵɵgetCurrentView();
37
- i0.ɵɵelementStart(0, "kendo-dialog", 1);
38
- i0.ɵɵlistener("close", function GenericDialogComponent_Conditional_0_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.HandleCancelClick()); });
36
+ i0.ɵɵelementStart(0, "mj-dialog", 1);
37
+ i0.ɵɵlistener("Close", function GenericDialogComponent_Conditional_0_Template_mj_dialog_Close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.HandleCancelClick()); });
39
38
  i0.ɵɵprojection(1);
40
- i0.ɵɵelementStart(2, "kendo-dialog-actions");
39
+ i0.ɵɵelementStart(2, "mj-dialog-actions");
41
40
  i0.ɵɵconditionalCreate(3, GenericDialogComponent_Conditional_0_Conditional_3_Template, 2, 1, "button", 2);
42
41
  i0.ɵɵconditionalCreate(4, GenericDialogComponent_Conditional_0_Conditional_4_Template, 2, 1, "button", 3);
43
42
  i0.ɵɵprojection(5, 1);
@@ -45,7 +44,7 @@ function GenericDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
45
44
  i0.ɵɵelementEnd()();
46
45
  } if (rf & 2) {
47
46
  const ctx_r1 = i0.ɵɵnextContext();
48
- i0.ɵɵproperty("width", ctx_r1.DialogWidth)("height", ctx_r1.DialogHeight)("title", ctx_r1.DialogTitle);
47
+ i0.ɵɵproperty("Visible", true)("Width", ctx_r1.DialogWidth)("Height", ctx_r1.DialogHeight)("Title", ctx_r1.DialogTitle);
49
48
  i0.ɵɵadvance(3);
50
49
  i0.ɵɵconditional(ctx_r1.ShowOKButton ? 3 : -1);
51
50
  i0.ɵɵadvance();
@@ -63,9 +62,9 @@ function GenericDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
63
62
  * Your content goes in here
64
63
  * </div>
65
64
  * <div custom-actions>
66
- * <button kendoButton (click)="customOkClick()" themeColor="primary">Custom OK</button>
67
- * <button kendoButton (click)="customCancelClick()">Custom Cancel</button>
68
- * <button kendoButton (click)="additionalAction()">Additional Action</button>
65
+ * <button mjButton variant="primary" (click)="customOkClick()">Custom OK</button>
66
+ * <button mjButton (click)="customCancelClick()">Custom Cancel</button>
67
+ * <button mjButton (click)="additionalAction()">Additional Action</button>
69
68
  * </div>
70
69
  * </mj-generic-dialog>
71
70
  */
@@ -157,16 +156,16 @@ export class GenericDialogComponent {
157
156
  } if (rf & 2) {
158
157
  let _t;
159
158
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.customActions = _t.first);
160
- } }, inputs: { DialogTitle: "DialogTitle", DialogWidth: "DialogWidth", DialogHeight: "DialogHeight", ShowOKButton: "ShowOKButton", OKButtonText: "OKButtonText", CancelButtonText: "CancelButtonText", ShowCancelButton: "ShowCancelButton", DialogVisible: "DialogVisible" }, outputs: { DialogClosed: "DialogClosed", RefreshData: "RefreshData" }, standalone: false, 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
+ } }, inputs: { DialogTitle: "DialogTitle", DialogWidth: "DialogWidth", DialogHeight: "DialogHeight", ShowOKButton: "ShowOKButton", OKButtonText: "OKButtonText", CancelButtonText: "CancelButtonText", ShowCancelButton: "ShowCancelButton", DialogVisible: "DialogVisible" }, outputs: { DialogClosed: "DialogClosed", RefreshData: "RefreshData" }, standalone: false, ngContentSelectors: _c2, decls: 1, vars: 1, consts: [[3, "Visible", "Width", "Height", "Title"], [3, "Close", "Visible", "Width", "Height", "Title"], ["mjButton", "", "variant", "primary"], ["mjButton", ""], ["mjButton", "", "variant", "primary", 3, "click"], ["mjButton", "", 3, "click"]], template: function GenericDialogComponent_Template(rf, ctx) { if (rf & 1) {
161
160
  i0.ɵɵprojectionDef(_c1);
162
- i0.ɵɵconditionalCreate(0, GenericDialogComponent_Conditional_0_Template, 7, 6, "kendo-dialog", 0);
161
+ i0.ɵɵconditionalCreate(0, GenericDialogComponent_Conditional_0_Template, 7, 7, "mj-dialog", 0);
163
162
  } if (rf & 2) {
164
163
  i0.ɵɵconditional(ctx.DialogVisible ? 0 : -1);
165
- } }, dependencies: [i1.DialogComponent, i1.DialogActionsComponent, i2.ButtonComponent], encapsulation: 2 });
164
+ } }, dependencies: [i1.MJButtonDirective, i1.MJDialogComponent, i1.MJDialogActionsComponent], encapsulation: 2 });
166
165
  }
167
166
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GenericDialogComponent, [{
168
167
  type: Component,
169
- args: [{ standalone: false, 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}" }]
168
+ args: [{ standalone: false, selector: 'mj-generic-dialog', template: "@if (DialogVisible) {\n <mj-dialog\n [Visible]=\"true\"\n [Width]=\"DialogWidth\"\n [Height]=\"DialogHeight\"\n [Title]=\"DialogTitle\"\n (Close)=\"HandleCancelClick()\"\n >\n <ng-content></ng-content>\n <mj-dialog-actions>\n @if(ShowOKButton) {\n <button mjButton variant=\"primary\" (click)=\"HandleOKClick()\">{{OKButtonText}}</button>\n }\n @if(ShowCancelButton) {\n <button mjButton (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 </mj-dialog-actions>\n </mj-dialog>\n}\n" }]
170
169
  }], () => [{ type: i0.ChangeDetectorRef }], { DialogTitle: [{
171
170
  type: Input
172
171
  }], DialogWidth: [{
@@ -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;IAClB,yGAAmB;IAGnB,yGAAuB;IAKvB,qBAAmD;IAEnD,oGAA8D;IAItE,AADI,iBAAuB,EACZ;;;IAnBX,AADA,AADA,0CAAqB,+BACE,6BACF;IAKjB,eAEC;IAFD,8CAEC;IACD,cAEC;IAFD,kDAEC;IAKD,eAEC;IAFD,uGAEC;;ADnBb;;;;;;;;;;;;;;;GAeG;AAOH,MAAM,OAAO,sBAAsB;IACb;IAApB,YAAoB,GAAsB;QAAtB,QAAG,GAAH,GAAG,CAAmB;IAAG,CAAC;IAE9C;;OAEG;IACM,WAAW,GAAW,eAAe,CAAC;IAC/C;;OAEG;IACM,WAAW,GAAW,OAAO,CAAC;IACvC;;OAEG;IACM,YAAY,GAAW,OAAO,CAAC;IAExC;;OAEG;IACM,YAAY,GAAY,IAAI,CAAC;IAEtC;;OAEG;IACM,YAAY,GAAW,IAAI,CAAC;IAErC;;OAEG;IACM,gBAAgB,GAAW,QAAQ,CAAC;IAE7C;;OAEG;IACM,gBAAgB,GAAY,IAAI,C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;;kBAKL,KAAK;;kBAKL,KAAK;;kBAML,KAAK;;kBAiBL,MAAM;;kBAKN,MAAM;;kBA0BN,YAAY;mBAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;kFAxFtC,sBAAsB","sourcesContent":["import { Component, Output, EventEmitter, Input, ChangeDetectorRef, ElementRef, ContentChild, AfterContentInit } from '@angular/core';\n\n/**\n * Generic base dialog component that can be used as a base for other dialogs by using this component as shown here in any other Angular component.\n * The custom-actions slot shown below is entirely optional, if you don't need anything beyond OK/Cancel, you can leave this out entirely. You can also turn off the\n * built-in OK and Cancel buttons using the ShowOKButton and ShowCancelButton properties.\n * \n * <mj-generic-dialog DialogTitle=\"Your Dialog Title\" [DialogVisible]=\"YourVisibleStateVariable\" (DialogClosed)=\"YourDialogClosedEventHandler($event)\">\n * <div>\n * Your content goes in here\n * </div>\n * <div custom-actions>\n * <button kendoButton (click)=\"customOkClick()\" themeColor=\"primary\">Custom OK</button>\n * <button kendoButton (click)=\"customCancelClick()\">Custom Cancel</button>\n * <button kendoButton (click)=\"additionalAction()\">Additional Action</button>\n * </div>\n * </mj-generic-dialog>\n */\n@Component({\n standalone: false,\n selector: 'mj-generic-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.css']\n})\nexport class GenericDialogComponent implements AfterContentInit {\n constructor(private cdr: ChangeDetectorRef) {}\n\n /**\n * Dialog title\n */\n @Input() DialogTitle: string = 'Default Title';\n /**\n * Optional, width of the dialog in pixels or percentage \n */\n @Input() DialogWidth: string = '700px';\n /**\n * Optional, height of the dialog in pixels or percentage \n */\n @Input() DialogHeight: string = '450px';\n\n /**\n * Ability to turn off the built-in OK button if it is not desired\n */\n @Input() ShowOKButton: boolean = true;\n\n /**\n * Text displayed on the OK button, defaults to \"OK\" if not provided\n */\n @Input() OKButtonText: string = \"OK\";\n\n /**\n * Text displayed on the Cancel button, defaults to \"Cancel\" if not provided\n */\n @Input() CancelButtonText: string = \"Cancel\";\n\n /**\n * Ability to turn off the built-in Cancel button if it is not desired\n */\n @Input() ShowCancelButton: boolean = true;\n\n /**\n * 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 \n * be set to false automatically.\n */\n @Input() get DialogVisible(): boolean {\n return this._dialogVisible;\n }\n set DialogVisible(value: boolean) {\n if (value !== this._dialogVisible && value) {\n // showing the dialog when it wasn't shown, refresh the data\n this.RefreshData.emit();\n }\n this._dialogVisible = value;\n this.cdr.detectChanges(); // Ensure visibility updates immediately\n }\n private _dialogVisible: boolean = false;\n\n\n /**\n * 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\n */\n @Output() DialogClosed = new EventEmitter<boolean>();\n\n /**\n * 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.\n */\n @Output() RefreshData = new EventEmitter<void>();\n\n /**\n * 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\n */\n public HandleCancelClick() {\n this.DialogVisible = false;\n this.DialogClosed.emit(false);\n }\n\n /**\n * Internal event handler for the OK button, you can call this method directly if you want to simulate the user clicking on the OK button\n */\n public HandleOKClick() {\n this.DialogVisible = false;\n this.DialogClosed.emit(true);\n }\n\n private _hasCustomActions: boolean = false;\n /**\n * Returns true if the dialog has custom actions defined in the custom-actions slot\n */\n public get HasCustomActions(): boolean {\n return this._hasCustomActions;\n }\n\n @ContentChild('custom-actions', { static: false }) customActions!: ElementRef;\n\n ngAfterContentInit() {\n this._hasCustomActions = !!this.customActions;\n }\n}\n","@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
+ {"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;;;;;;;;ICWtH,iCAA6D;IAA1B,yMAAS,sBAAe,KAAC;IAAC,YAAgB;IAAA,iBAAS;;;IAAzB,cAAgB;IAAhB,yCAAgB;;;;IAG7E,iCAA+C;IAA9B,yMAAS,0BAAmB,KAAC;IAAC,YAAoB;IAAA,iBAAS;;;IAA7B,cAAoB;IAApB,6CAAoB;;;IAOnE,4BAAM;IAAA,oFAAoE;IAAA,iBAAO;;;;IApB7F,oCAMC;IADG,6LAAS,0BAAmB,KAAC;IAE7B,kBAAyB;IACzB,yCAAmB;IACf,yGAAmB;IAGnB,yGAAuB;IAKvB,qBAAmD;IAEnD,oGAA8D;IAItE,AADI,iBAAoB,EACZ;;;IAnBR,AADA,AADA,AADA,8BAAgB,6BACK,+BACE,6BACF;IAKjB,eAEC;IAFD,8CAEC;IACD,cAEC;IAFD,kDAEC;IAKD,eAEC;IAFD,uGAEC;;ADpBb;;;;;;;;;;;;;;;GAeG;AAOH,MAAM,OAAO,sBAAsB;IACb;IAApB,YAAoB,GAAsB;QAAtB,QAAG,GAAH,GAAG,CAAmB;IAAG,CAAC;IAE9C;;OAEG;IACM,WAAW,GAAW,eAAe,CAAC;IAC/C;;OAEG;IACM,WAAW,GAAW,OAAO,CAAC;IACvC;;OAEG;IACM,YAAY,GAAW,OAAO,CAAC;IAExC;;OAEG;IACM,YAAY,GAA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;;YAArB,4CAyBC;;;iFDDY,sBAAsB;cANlC,SAAS;6BACI,KAAK,YACP,mBAAmB;;kBAU5B,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAKL,KAAK;;kBAKL,KAAK;;kBAKL,KAAK;;kBAKL,KAAK;;kBAML,KAAK;;kBAiBL,MAAM;;kBAKN,MAAM;;kBA0BN,YAAY;mBAAC,gBAAgB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;kFAxFtC,sBAAsB","sourcesContent":["import { Component, Output, EventEmitter, Input, ChangeDetectorRef, ElementRef, ContentChild, AfterContentInit } from '@angular/core';\n\n/**\n * Generic base dialog component that can be used as a base for other dialogs by using this component as shown here in any other Angular component.\n * The custom-actions slot shown below is entirely optional, if you don't need anything beyond OK/Cancel, you can leave this out entirely. You can also turn off the\n * built-in OK and Cancel buttons using the ShowOKButton and ShowCancelButton properties.\n * \n * <mj-generic-dialog DialogTitle=\"Your Dialog Title\" [DialogVisible]=\"YourVisibleStateVariable\" (DialogClosed)=\"YourDialogClosedEventHandler($event)\">\n * <div>\n * Your content goes in here\n * </div>\n * <div custom-actions>\n * <button mjButton variant=\"primary\" (click)=\"customOkClick()\">Custom OK</button>\n * <button mjButton (click)=\"customCancelClick()\">Custom Cancel</button>\n * <button mjButton (click)=\"additionalAction()\">Additional Action</button>\n * </div>\n * </mj-generic-dialog>\n */\n@Component({\n standalone: false,\n selector: 'mj-generic-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.css']\n})\nexport class GenericDialogComponent implements AfterContentInit {\n constructor(private cdr: ChangeDetectorRef) {}\n\n /**\n * Dialog title\n */\n @Input() DialogTitle: string = 'Default Title';\n /**\n * Optional, width of the dialog in pixels or percentage \n */\n @Input() DialogWidth: string = '700px';\n /**\n * Optional, height of the dialog in pixels or percentage \n */\n @Input() DialogHeight: string = '450px';\n\n /**\n * Ability to turn off the built-in OK button if it is not desired\n */\n @Input() ShowOKButton: boolean = true;\n\n /**\n * Text displayed on the OK button, defaults to \"OK\" if not provided\n */\n @Input() OKButtonText: string = \"OK\";\n\n /**\n * Text displayed on the Cancel button, defaults to \"Cancel\" if not provided\n */\n @Input() CancelButtonText: string = \"Cancel\";\n\n /**\n * Ability to turn off the built-in Cancel button if it is not desired\n */\n @Input() ShowCancelButton: boolean = true;\n\n /**\n * 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 \n * be set to false automatically.\n */\n @Input() get DialogVisible(): boolean {\n return this._dialogVisible;\n }\n set DialogVisible(value: boolean) {\n if (value !== this._dialogVisible && value) {\n // showing the dialog when it wasn't shown, refresh the data\n this.RefreshData.emit();\n }\n this._dialogVisible = value;\n this.cdr.detectChanges(); // Ensure visibility updates immediately\n }\n private _dialogVisible: boolean = false;\n\n\n /**\n * 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\n */\n @Output() DialogClosed = new EventEmitter<boolean>();\n\n /**\n * 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.\n */\n @Output() RefreshData = new EventEmitter<void>();\n\n /**\n * 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\n */\n public HandleCancelClick() {\n this.DialogVisible = false;\n this.DialogClosed.emit(false);\n }\n\n /**\n * Internal event handler for the OK button, you can call this method directly if you want to simulate the user clicking on the OK button\n */\n public HandleOKClick() {\n this.DialogVisible = false;\n this.DialogClosed.emit(true);\n }\n\n private _hasCustomActions: boolean = false;\n /**\n * Returns true if the dialog has custom actions defined in the custom-actions slot\n */\n public get HasCustomActions(): boolean {\n return this._hasCustomActions;\n }\n\n @ContentChild('custom-actions', { static: false }) customActions!: ElementRef;\n\n ngAfterContentInit() {\n this._hasCustomActions = !!this.customActions;\n }\n}\n","@if (DialogVisible) {\n <mj-dialog\n [Visible]=\"true\"\n [Width]=\"DialogWidth\"\n [Height]=\"DialogHeight\"\n [Title]=\"DialogTitle\"\n (Close)=\"HandleCancelClick()\"\n >\n <ng-content></ng-content>\n <mj-dialog-actions>\n @if(ShowOKButton) {\n <button mjButton variant=\"primary\" (click)=\"HandleOKClick()\">{{OKButtonText}}</button>\n }\n @if(ShowCancelButton) {\n <button mjButton (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 </mj-dialog-actions>\n </mj-dialog>\n}\n"]}
package/dist/module.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./lib/dialog.component";
3
3
  import * as i2 from "@angular/common";
4
- import * as i3 from "@progress/kendo-angular-dialog";
5
- import * as i4 from "@progress/kendo-angular-buttons";
4
+ import * as i3 from "@memberjunction/ng-ui-components";
6
5
  export declare class GenericDialogModule {
7
6
  static ɵfac: i0.ɵɵFactoryDeclaration<GenericDialogModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<GenericDialogModule, [typeof i1.GenericDialogComponent], [typeof i2.CommonModule, typeof i3.DialogsModule, typeof i4.ButtonsModule], [typeof i1.GenericDialogComponent]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GenericDialogModule, [typeof i1.GenericDialogComponent], [typeof i2.CommonModule, typeof i3.MJButtonDirective, typeof i3.MJDialogComponent, typeof i3.MJDialogActionsComponent], [typeof i1.GenericDialogComponent]>;
9
8
  static ɵinj: i0.ɵɵInjectorDeclaration<GenericDialogModule>;
10
9
  }
11
10
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;AASA,qBAaa,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAAI"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;AAQA,qBAca,mBAAmB;yCAAnB,mBAAmB;0CAAnB,mBAAmB;0CAAnB,mBAAmB;CAAI"}
package/dist/module.js CHANGED
@@ -1,16 +1,15 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
- // Kendo UI Angular imports
4
- import { DialogsModule } from "@progress/kendo-angular-dialog";
5
- import { ButtonsModule } from '@progress/kendo-angular-buttons';
3
+ // MJ UI Components
4
+ import { MJButtonDirective, MJDialogComponent, MJDialogActionsComponent } from '@memberjunction/ng-ui-components';
6
5
  import { GenericDialogComponent } from './lib/dialog.component';
7
6
  import * as i0 from "@angular/core";
8
7
  export class GenericDialogModule {
9
8
  static ɵfac = function GenericDialogModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GenericDialogModule)(); };
10
9
  static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: GenericDialogModule });
11
10
  static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
12
- DialogsModule,
13
- ButtonsModule] });
11
+ MJDialogComponent,
12
+ MJDialogActionsComponent] });
14
13
  }
15
14
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GenericDialogModule, [{
16
15
  type: NgModule,
@@ -20,8 +19,9 @@ export class GenericDialogModule {
20
19
  ],
21
20
  imports: [
22
21
  CommonModule,
23
- DialogsModule,
24
- ButtonsModule,
22
+ MJButtonDirective,
23
+ MJDialogComponent,
24
+ MJDialogActionsComponent,
25
25
  ],
26
26
  exports: [
27
27
  GenericDialogComponent
@@ -29,6 +29,7 @@ export class GenericDialogModule {
29
29
  }]
30
30
  }], null, null); })();
31
31
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(GenericDialogModule, { declarations: [GenericDialogComponent], imports: [CommonModule,
32
- DialogsModule,
33
- ButtonsModule], exports: [GenericDialogComponent] }); })();
32
+ MJButtonDirective,
33
+ MJDialogComponent,
34
+ MJDialogActionsComponent], exports: [GenericDialogComponent] }); })();
34
35
  //# sourceMappingURL=module.js.map
@@ -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;6GAAnB,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","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n// Kendo UI Angular imports\nimport { DialogsModule } from \"@progress/kendo-angular-dialog\";\nimport { ButtonsModule } from '@progress/kendo-angular-buttons'; \n\nimport { GenericDialogComponent } from './lib/dialog.component';\n \n@NgModule({\n declarations: [\n GenericDialogComponent\n ],\n imports: [\n CommonModule,\n DialogsModule,\n ButtonsModule,\n ],\n exports: [\n GenericDialogComponent\n ]\n})\nexport class GenericDialogModule { }"]}
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,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAElH,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;;AAgBhE,MAAM,OAAO,mBAAmB;6GAAnB,mBAAmB;4DAAnB,mBAAmB;gEAT5B,YAAY;YAEZ,iBAAiB;YACjB,wBAAwB;;iFAMf,mBAAmB;cAd/B,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,sBAAsB;iBACvB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,iBAAiB;oBACjB,iBAAiB;oBACjB,wBAAwB;iBACzB;gBACD,OAAO,EAAE;oBACP,sBAAsB;iBACvB;aACF;;wFACY,mBAAmB,mBAZ5B,sBAAsB,aAGtB,YAAY;QACZ,iBAAiB;QACjB,iBAAiB;QACjB,wBAAwB,aAGxB,sBAAsB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n// MJ UI Components\nimport { MJButtonDirective, MJDialogComponent, MJDialogActionsComponent } from '@memberjunction/ng-ui-components';\n\nimport { GenericDialogComponent } from './lib/dialog.component';\n\n@NgModule({\n declarations: [\n GenericDialogComponent\n ],\n imports: [\n CommonModule,\n MJButtonDirective,\n MJDialogComponent,\n MJDialogActionsComponent,\n ],\n exports: [\n GenericDialogComponent\n ]\n})\nexport class GenericDialogModule { }\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-generic-dialog",
3
- "version": "5.21.0",
3
+ "version": "5.23.0",
4
4
  "description": "MemberJunction: Angular component for a generic dialog",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -22,11 +22,10 @@
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@angular/common": "21.1.3",
25
- "@angular/core": "21.1.3",
26
- "@progress/kendo-angular-buttons": "22.0.1",
27
- "@progress/kendo-angular-dialog": "22.0.1"
25
+ "@angular/core": "21.1.3"
28
26
  },
29
27
  "dependencies": {
28
+ "@memberjunction/ng-ui-components": "5.23.0",
30
29
  "tslib": "^2.8.1"
31
30
  },
32
31
  "sideEffects": false,