@memberjunction/ng-simple-record-list 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.
@@ -2,16 +2,13 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./simple-record-list/simple-record-list.component";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "@angular/forms";
5
- import * as i4 from "@progress/kendo-angular-dialog";
6
- import * as i5 from "@memberjunction/ng-container-directives";
7
- import * as i6 from "@progress/kendo-angular-buttons";
8
- import * as i7 from "@progress/kendo-angular-dropdowns";
9
- import * as i8 from "@memberjunction/ng-entity-form-dialog";
10
- import * as i9 from "@progress/kendo-angular-indicators";
11
- import * as i10 from "@memberjunction/ng-shared-generic";
5
+ import * as i4 from "@memberjunction/ng-container-directives";
6
+ import * as i5 from "@memberjunction/ng-ui-components";
7
+ import * as i6 from "@memberjunction/ng-entity-form-dialog";
8
+ import * as i7 from "@memberjunction/ng-shared-generic";
12
9
  export declare class SimpleRecordListModule {
13
10
  static ɵfac: i0.ɵɵFactoryDeclaration<SimpleRecordListModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<SimpleRecordListModule, [typeof i1.SimpleRecordListComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.DialogsModule, typeof i5.ContainerDirectivesModule, typeof i6.ButtonsModule, typeof i7.DropDownsModule, typeof i4.DialogsModule, typeof i8.EntityFormDialogModule, typeof i9.IndicatorsModule, typeof i10.SharedGenericModule], [typeof i1.SimpleRecordListComponent]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SimpleRecordListModule, [typeof i1.SimpleRecordListComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.ContainerDirectivesModule, typeof i5.MJButtonDirective, typeof i5.MJDialogComponent, typeof i5.MJDialogActionsComponent, typeof i6.EntityFormDialogModule, typeof i7.SharedGenericModule], [typeof i1.SimpleRecordListComponent]>;
15
12
  static ɵinj: i0.ɵɵInjectorDeclaration<SimpleRecordListModule>;
16
13
  }
17
14
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":";;;;;;;;;;;AAmBA,qBAoBa,sBAAsB;yCAAtB,sBAAsB;0CAAtB,sBAAsB;0CAAtB,sBAAsB;CAAI"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":";;;;;;;;AAgBA,qBAkBa,sBAAsB;yCAAtB,sBAAsB;0CAAtB,sBAAsB;0CAAtB,sBAAsB;CAAI"}
@@ -1,11 +1,8 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormsModule } from '@angular/forms';
4
- // Kendo UI Angular imports
5
- import { DialogsModule } from "@progress/kendo-angular-dialog";
6
- import { ButtonsModule } from '@progress/kendo-angular-buttons';
7
- import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
8
- import { IndicatorsModule } from '@progress/kendo-angular-indicators';
4
+ // MJ UI Components
5
+ import { MJButtonDirective, MJDialogComponent, MJDialogActionsComponent } from '@memberjunction/ng-ui-components';
9
6
  // MJ
10
7
  import { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';
11
8
  import { EntityFormDialogModule } from '@memberjunction/ng-entity-form-dialog';
@@ -18,13 +15,10 @@ export class SimpleRecordListModule {
18
15
  static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: SimpleRecordListModule });
19
16
  static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
20
17
  FormsModule,
21
- DialogsModule,
22
18
  ContainerDirectivesModule,
23
- ButtonsModule,
24
- DropDownsModule,
25
- DialogsModule,
19
+ MJDialogComponent,
20
+ MJDialogActionsComponent,
26
21
  EntityFormDialogModule,
27
- IndicatorsModule,
28
22
  SharedGenericModule] });
29
23
  }
30
24
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SimpleRecordListModule, [{
@@ -36,13 +30,11 @@ export class SimpleRecordListModule {
36
30
  imports: [
37
31
  CommonModule,
38
32
  FormsModule,
39
- DialogsModule,
40
33
  ContainerDirectivesModule,
41
- ButtonsModule,
42
- DropDownsModule,
43
- DialogsModule,
34
+ MJButtonDirective,
35
+ MJDialogComponent,
36
+ MJDialogActionsComponent,
44
37
  EntityFormDialogModule,
45
- IndicatorsModule,
46
38
  SharedGenericModule
47
39
  ],
48
40
  exports: [
@@ -52,12 +44,10 @@ export class SimpleRecordListModule {
52
44
  }], null, null); })();
53
45
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SimpleRecordListModule, { declarations: [SimpleRecordListComponent], imports: [CommonModule,
54
46
  FormsModule,
55
- DialogsModule,
56
47
  ContainerDirectivesModule,
57
- ButtonsModule,
58
- DropDownsModule,
59
- DialogsModule,
48
+ MJButtonDirective,
49
+ MJDialogComponent,
50
+ MJDialogActionsComponent,
60
51
  EntityFormDialogModule,
61
- IndicatorsModule,
62
52
  SharedGenericModule], exports: [SimpleRecordListComponent] }); })();
63
53
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,2BAA2B;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,KAAK;AACL,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,QAAQ;AACR,OAAO,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;;AAsB9F,MAAM,OAAO,sBAAsB;gHAAtB,sBAAsB;4DAAtB,sBAAsB;gEAf/B,YAAY;YACZ,WAAW;YACX,aAAa;YACb,yBAAyB;YACzB,aAAa;YACb,eAAe;YACf,aAAa;YACb,sBAAsB;YACtB,gBAAgB;YAChB,mBAAmB;;iFAMV,sBAAsB;cApBlC,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,yBAAyB;iBAC1B;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,aAAa;oBACb,yBAAyB;oBACzB,aAAa;oBACb,eAAe;oBACf,aAAa;oBACb,sBAAsB;oBACtB,gBAAgB;oBAChB,mBAAmB;iBACpB;gBACD,OAAO,EAAE;oBACP,yBAAyB;iBAC1B;aACF;;wFACY,sBAAsB,mBAlB/B,yBAAyB,aAGzB,YAAY;QACZ,WAAW;QACX,aAAa;QACb,yBAAyB;QACzB,aAAa;QACb,eAAe;QACf,aAAa;QACb,sBAAsB;QACtB,gBAAgB;QAChB,mBAAmB,aAGnB,yBAAyB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { FormsModule } from '@angular/forms';\n\n// Kendo UI Angular imports\nimport { DialogsModule } from \"@progress/kendo-angular-dialog\";\nimport { ButtonsModule } from '@progress/kendo-angular-buttons'; \nimport { DropDownsModule } from '@progress/kendo-angular-dropdowns';\nimport { IndicatorsModule } from '@progress/kendo-angular-indicators';\n\n// MJ\nimport { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';\nimport { EntityFormDialogModule } from '@memberjunction/ng-entity-form-dialog';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\n\n// LOCAL\nimport { SimpleRecordListComponent } from './simple-record-list/simple-record-list.component';\n\n@NgModule({\n declarations: [\n SimpleRecordListComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n DialogsModule,\n ContainerDirectivesModule,\n ButtonsModule,\n DropDownsModule,\n DialogsModule,\n EntityFormDialogModule,\n IndicatorsModule,\n SharedGenericModule\n ],\n exports: [\n SimpleRecordListComponent\n ]\n})\nexport class SimpleRecordListModule { }"]}
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../../src/lib/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAElH,KAAK;AACL,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,QAAQ;AACR,OAAO,EAAE,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;;AAoB9F,MAAM,OAAO,sBAAsB;gHAAtB,sBAAsB;4DAAtB,sBAAsB;gEAb/B,YAAY;YACZ,WAAW;YACX,yBAAyB;YAEzB,iBAAiB;YACjB,wBAAwB;YACxB,sBAAsB;YACtB,mBAAmB;;iFAMV,sBAAsB;cAlBlC,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,yBAAyB;iBAC1B;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,yBAAyB;oBACzB,iBAAiB;oBACjB,iBAAiB;oBACjB,wBAAwB;oBACxB,sBAAsB;oBACtB,mBAAmB;iBACpB;gBACD,OAAO,EAAE;oBACP,yBAAyB;iBAC1B;aACF;;wFACY,sBAAsB,mBAhB/B,yBAAyB,aAGzB,YAAY;QACZ,WAAW;QACX,yBAAyB;QACzB,iBAAiB;QACjB,iBAAiB;QACjB,wBAAwB;QACxB,sBAAsB;QACtB,mBAAmB,aAGnB,yBAAyB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { FormsModule } from '@angular/forms';\n\n// MJ UI Components\nimport { MJButtonDirective, MJDialogComponent, MJDialogActionsComponent } from '@memberjunction/ng-ui-components';\n\n// MJ\nimport { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';\nimport { EntityFormDialogModule } from '@memberjunction/ng-entity-form-dialog';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\n\n// LOCAL\nimport { SimpleRecordListComponent } from './simple-record-list/simple-record-list.component';\n\n@NgModule({\n declarations: [\n SimpleRecordListComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ContainerDirectivesModule,\n MJButtonDirective,\n MJDialogComponent,\n MJDialogActionsComponent,\n EntityFormDialogModule,\n SharedGenericModule\n ],\n exports: [\n SimpleRecordListComponent\n ]\n})\nexport class SimpleRecordListModule { }"]}
@@ -3,10 +3,9 @@ import { Metadata, RunView } from '@memberjunction/core';
3
3
  import { MJNotificationService } from '@memberjunction/ng-notifications';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "@angular/router";
6
- import * as i2 from "@progress/kendo-angular-dialog";
7
- import * as i3 from "@progress/kendo-angular-buttons";
8
- import * as i4 from "@memberjunction/ng-entity-form-dialog";
9
- import * as i5 from "@memberjunction/ng-shared-generic";
6
+ import * as i2 from "@memberjunction/ng-ui-components";
7
+ import * as i3 from "@memberjunction/ng-entity-form-dialog";
8
+ import * as i4 from "@memberjunction/ng-shared-generic";
10
9
  function SimpleRecordListComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
11
10
  i0.ɵɵelementStart(0, "div");
12
11
  i0.ɵɵelement(1, "mj-loading", 5);
@@ -126,12 +125,12 @@ function SimpleRecordListComponent_Conditional_3_Template(rf, ctx) { if (rf & 1)
126
125
  } }
127
126
  function SimpleRecordListComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
128
127
  const _r12 = i0.ɵɵgetCurrentView();
129
- i0.ɵɵelementStart(0, "kendo-dialog", 19);
130
- i0.ɵɵlistener("close", function SimpleRecordListComponent_Conditional_4_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeDeleteDialog("No")); });
128
+ i0.ɵɵelementStart(0, "mj-dialog", 19);
129
+ i0.ɵɵlistener("Close", function SimpleRecordListComponent_Conditional_4_Template_mj_dialog_Close_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeDeleteDialog("No")); });
131
130
  i0.ɵɵelementStart(1, "div");
132
131
  i0.ɵɵtext(2);
133
132
  i0.ɵɵelementEnd();
134
- i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 20);
133
+ i0.ɵɵelementStart(3, "mj-dialog-actions")(4, "button", 20);
135
134
  i0.ɵɵlistener("click", function SimpleRecordListComponent_Conditional_4_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeDeleteDialog("Yes")); });
136
135
  i0.ɵɵtext(5, "Yes");
137
136
  i0.ɵɵelementEnd();
@@ -141,7 +140,7 @@ function SimpleRecordListComponent_Conditional_4_Template(rf, ctx) { if (rf & 1)
141
140
  i0.ɵɵelementEnd()()();
142
141
  } if (rf & 2) {
143
142
  const ctx_r1 = i0.ɵɵnextContext();
144
- i0.ɵɵproperty("title", "Delete " + ctx_r1.EntityName + "?")("width", 450)("height", 200);
143
+ i0.ɵɵproperty("Visible", true)("Title", "Delete " + ctx_r1.EntityName + "?")("Width", 450)("Height", 200);
145
144
  i0.ɵɵadvance(2);
146
145
  i0.ɵɵtextInterpolate1(" Are you sure you want to delete '", ctx_r1.getRecordName(ctx_r1.deleteRecordItem), "'? ");
147
146
  } }
@@ -156,13 +155,13 @@ function SimpleRecordListComponent_Conditional_5_Conditional_3_Template(rf, ctx)
156
155
  } }
157
156
  function SimpleRecordListComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
158
157
  const _r13 = i0.ɵɵgetCurrentView();
159
- i0.ɵɵelementStart(0, "kendo-dialog", 19);
160
- i0.ɵɵlistener("close", function SimpleRecordListComponent_Conditional_5_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeCustomActionDialog("No")); });
158
+ i0.ɵɵelementStart(0, "mj-dialog", 19);
159
+ i0.ɵɵlistener("Close", function SimpleRecordListComponent_Conditional_5_Template_mj_dialog_Close_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeCustomActionDialog("No")); });
161
160
  i0.ɵɵelementStart(1, "div");
162
161
  i0.ɵɵtext(2);
163
162
  i0.ɵɵconditionalCreate(3, SimpleRecordListComponent_Conditional_5_Conditional_3_Template, 2, 1, "p");
164
163
  i0.ɵɵelementEnd();
165
- i0.ɵɵelementStart(4, "kendo-dialog-actions")(5, "button", 20);
164
+ i0.ɵɵelementStart(4, "mj-dialog-actions")(5, "button", 20);
166
165
  i0.ɵɵlistener("click", function SimpleRecordListComponent_Conditional_5_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closeCustomActionDialog("Yes")); });
167
166
  i0.ɵɵtext(6, "Yes");
168
167
  i0.ɵɵelementEnd();
@@ -172,7 +171,7 @@ function SimpleRecordListComponent_Conditional_5_Template(rf, ctx) { if (rf & 1)
172
171
  i0.ɵɵelementEnd()()();
173
172
  } if (rf & 2) {
174
173
  const ctx_r1 = i0.ɵɵnextContext();
175
- i0.ɵɵproperty("title", ctx_r1.CustomActionDialogTitle)("width", 450)("height", 200);
174
+ i0.ɵɵproperty("Visible", true)("Title", ctx_r1.CustomActionDialogTitle)("Width", 450)("Height", 200);
176
175
  i0.ɵɵadvance(2);
177
176
  i0.ɵɵtextInterpolate1(" ", ctx_r1.CustomActionDialogMessage.replace("{{recordName}}", ctx_r1.getRecordName(ctx_r1.customActionItem)), " ");
178
177
  i0.ɵɵadvance();
@@ -415,13 +414,13 @@ export class SimpleRecordListComponent {
415
414
  }
416
415
  }
417
416
  static ɵfac = function SimpleRecordListComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SimpleRecordListComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
418
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SimpleRecordListComponent, selectors: [["mj-simple-record-list"]], inputs: { EntityName: "EntityName", Columns: "Columns", SortBy: "SortBy", AllowDelete: "AllowDelete", AllowNew: "AllowNew", AllowEdit: "AllowEdit", AllowCustomAction: "AllowCustomAction", CustomActionIcon: "CustomActionIcon", CustomActionIconFunction: "CustomActionIconFunction", CustomActionTooltip: "CustomActionTooltip", CustomActionTooltipFunction: "CustomActionTooltipFunction", CustomActionDialogTitle: "CustomActionDialogTitle", CustomActionDialogMessage: "CustomActionDialogMessage", CustomActionDialogInfo: "CustomActionDialogInfo", EditSectionName: "EditSectionName" }, outputs: { RecordSelected: "RecordSelected", RecordEdited: "RecordEdited", RecordCreated: "RecordCreated", CustomActionClicked: "CustomActionClicked", CustomActionConfirmed: "CustomActionConfirmed" }, standalone: false, decls: 6, vars: 4, consts: [["entityForm", ""], [1, "wrapper", "scrollable"], [1, "vertical-full-width"], ["Mode", "section", 3, "Record", "SectionName", "Visible", "AutoRevertOnCancel", "HandleSave", "Width", "Height"], [3, "title", "width", "height"], ["size", "medium", 3, "showText"], ["kendoButton", ""], [1, "grid"], [1, "sticky-header"], ["kendoButton", "", 3, "click"], [1, "fa-solid", "fa-plus"], [3, "click"], ["title", "Edit", 1, "fa-solid", "fa-pen-to-square", "icon"], [3, "class", "title"], ["title", "Delete", 1, "fa-solid", "fa-trash-can", "icon"], ["title", "Edit", 1, "fa-solid", "fa-pen-to-square", "icon", 3, "click"], [3, "click", "title"], ["title", "Delete", 1, "fa-solid", "fa-trash-can", "icon", 3, "click"], ["Mode", "section", 3, "DialogClosed", "Record", "SectionName", "Visible", "AutoRevertOnCancel", "HandleSave", "Width", "Height"], [3, "close", "title", "width", "height"], ["kendoButton", "", "themeColor", "primary", 3, "click"]], template: function SimpleRecordListComponent_Template(rf, ctx) { if (rf & 1) {
417
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SimpleRecordListComponent, selectors: [["mj-simple-record-list"]], inputs: { EntityName: "EntityName", Columns: "Columns", SortBy: "SortBy", AllowDelete: "AllowDelete", AllowNew: "AllowNew", AllowEdit: "AllowEdit", AllowCustomAction: "AllowCustomAction", CustomActionIcon: "CustomActionIcon", CustomActionIconFunction: "CustomActionIconFunction", CustomActionTooltip: "CustomActionTooltip", CustomActionTooltipFunction: "CustomActionTooltipFunction", CustomActionDialogTitle: "CustomActionDialogTitle", CustomActionDialogMessage: "CustomActionDialogMessage", CustomActionDialogInfo: "CustomActionDialogInfo", EditSectionName: "EditSectionName" }, outputs: { RecordSelected: "RecordSelected", RecordEdited: "RecordEdited", RecordCreated: "RecordCreated", CustomActionClicked: "CustomActionClicked", CustomActionConfirmed: "CustomActionConfirmed" }, standalone: false, decls: 6, vars: 4, consts: [["entityForm", ""], [1, "wrapper", "scrollable"], [1, "vertical-full-width"], ["Mode", "section", 3, "Record", "SectionName", "Visible", "AutoRevertOnCancel", "HandleSave", "Width", "Height"], [3, "Visible", "Title", "Width", "Height"], ["size", "medium", 3, "showText"], ["mjButton", ""], [1, "grid"], [1, "sticky-header"], ["mjButton", "", 3, "click"], [1, "fa-solid", "fa-plus"], [3, "click"], ["title", "Edit", 1, "fa-solid", "fa-pen-to-square", "icon"], [3, "class", "title"], ["title", "Delete", 1, "fa-solid", "fa-trash-can", "icon"], ["title", "Edit", 1, "fa-solid", "fa-pen-to-square", "icon", 3, "click"], [3, "click", "title"], ["title", "Delete", 1, "fa-solid", "fa-trash-can", "icon", 3, "click"], ["Mode", "section", 3, "DialogClosed", "Record", "SectionName", "Visible", "AutoRevertOnCancel", "HandleSave", "Width", "Height"], [3, "Close", "Visible", "Title", "Width", "Height"], ["mjButton", "", "variant", "primary", 3, "click"]], template: function SimpleRecordListComponent_Template(rf, ctx) { if (rf & 1) {
419
418
  i0.ɵɵelementStart(0, "div", 1);
420
419
  i0.ɵɵconditionalCreate(1, SimpleRecordListComponent_Conditional_1_Template, 2, 1, "div")(2, SimpleRecordListComponent_Conditional_2_Template, 10, 1, "div", 2);
421
420
  i0.ɵɵelementEnd();
422
421
  i0.ɵɵconditionalCreate(3, SimpleRecordListComponent_Conditional_3_Template, 2, 7, "mj-entity-form-dialog", 3);
423
- i0.ɵɵconditionalCreate(4, SimpleRecordListComponent_Conditional_4_Template, 8, 4, "kendo-dialog", 4);
424
- i0.ɵɵconditionalCreate(5, SimpleRecordListComponent_Conditional_5_Template, 9, 5, "kendo-dialog", 4);
422
+ i0.ɵɵconditionalCreate(4, SimpleRecordListComponent_Conditional_4_Template, 8, 5, "mj-dialog", 4);
423
+ i0.ɵɵconditionalCreate(5, SimpleRecordListComponent_Conditional_5_Template, 9, 6, "mj-dialog", 4);
425
424
  } if (rf & 2) {
426
425
  i0.ɵɵadvance();
427
426
  i0.ɵɵconditional(ctx.isLoading ? 1 : 2);
@@ -431,11 +430,11 @@ export class SimpleRecordListComponent {
431
430
  i0.ɵɵconditional(ctx.deleteRecordDialogVisible && ctx.AllowDelete ? 4 : -1);
432
431
  i0.ɵɵadvance();
433
432
  i0.ɵɵconditional(ctx.customActionDialogVisible && ctx.AllowCustomAction ? 5 : -1);
434
- } }, dependencies: [i2.DialogComponent, i2.DialogActionsComponent, i3.ButtonComponent, i4.EntityFormDialogComponent, i5.LoadingComponent], styles: ["button[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n.wrapper[_ngcontent-%COMP%] {\n padding-right: 10px;\n}\n\n\n\ntable[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 10px;\n margin-right: 5px;\n border-collapse: collapse; \n\n width: 100%;\n}\n \ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-sunken); \n\n color: var(--mj-text-primary); \n\n font-weight: bold; \n\n text-align: left;\n}\n\n\n\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n height: 36px; \n\n padding: 0 8px; \n\n}\n\n\n\ntable[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child {\n display: flex; \n\n justify-content: space-between; \n\n align-items: center; \n\n padding-right: 8px; \n\n}\n\n\n\ntd[_ngcontent-%COMP%]:first-child span[_ngcontent-%COMP%]:first-child {\n border: none; \n\n}\n\n\n\ntd[_ngcontent-%COMP%]:first-child span[_ngcontent-%COMP%]:last-child {\n border: none; \n\n}\n\n\n\ntd[_ngcontent-%COMP%]:first-child .icon[_ngcontent-%COMP%] {\n margin-left: 10px; \n\n cursor: pointer; \n\n}\n\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover {\n background-color: var(--mj-brand-primary-subtle); \n\n}\n\n.sticky-header[_ngcontent-%COMP%] {\n position: sticky;\n top: 0;\n}\n\n.scrollable[_ngcontent-%COMP%] {\n display: flex;\n overflow-y: scroll;\n max-height: 95%;\n}\n\n.vertical-full-width[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n width: 100%;\n}"] });
433
+ } }, dependencies: [i2.MJButtonDirective, i2.MJDialogComponent, i2.MJDialogActionsComponent, i3.EntityFormDialogComponent, i4.LoadingComponent], styles: ["button[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n.wrapper[_ngcontent-%COMP%] {\n padding-right: 10px;\n}\n\n\n\ntable[_ngcontent-%COMP%] {\n margin-left: 5px;\n margin-top: 10px;\n margin-right: 5px;\n border-collapse: collapse; \n\n width: 100%;\n}\n \ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n background-color: var(--mj-bg-surface-sunken); \n\n color: var(--mj-text-primary); \n\n font-weight: bold; \n\n text-align: left;\n}\n\n\n\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n height: 36px; \n\n padding: 0 8px; \n\n}\n\n\n\ntable[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child {\n display: flex; \n\n justify-content: space-between; \n\n align-items: center; \n\n padding-right: 8px; \n\n}\n\n\n\ntd[_ngcontent-%COMP%]:first-child span[_ngcontent-%COMP%]:first-child {\n border: none; \n\n}\n\n\n\ntd[_ngcontent-%COMP%]:first-child span[_ngcontent-%COMP%]:last-child {\n border: none; \n\n}\n\n\n\ntd[_ngcontent-%COMP%]:first-child .icon[_ngcontent-%COMP%] {\n margin-left: 10px; \n\n cursor: pointer; \n\n}\n\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover {\n background-color: var(--mj-brand-primary-subtle); \n\n}\n\n.sticky-header[_ngcontent-%COMP%] {\n position: sticky;\n top: 0;\n}\n\n.scrollable[_ngcontent-%COMP%] {\n display: flex;\n overflow-y: scroll;\n max-height: 95%;\n}\n\n.vertical-full-width[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n width: 100%;\n}"] });
435
434
  }
436
435
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SimpleRecordListComponent, [{
437
436
  type: Component,
438
- args: [{ standalone: false, selector: 'mj-simple-record-list', template: "<div class=\"wrapper scrollable\">\n @if(isLoading) {\n <div>\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n </div>\n }\n @else {\n <div class=\"vertical-full-width\">\n @if(AllowNew) {\n <button kendoButton (click)=\"createNewRecord()\"><span class=\"fa-solid fa-plus\"></span> New</button>\n }\n <table class=\"grid\">\n <thead class=\"sticky-header\">\n <tr>\n @for (c of Columns; track c) {\n <th>\n {{ c }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (r of records; track r) {\n <tr (click)=\"selectRecord(undefined, r)\">\n @for (c of Columns; track c; let i = $index) {\n <td>\n <span>{{ r.Get(c) }}</span>\n @if(i === 0 && (AllowDelete || AllowEdit)) {\n <span>\n @if (AllowEdit) {\n <span class=\"fa-solid fa-pen-to-square icon\" (click)=\"editRecord($event, r)\" title=\"Edit\"></span>\n }\n @if (AllowCustomAction) {\n <span\n class=\"fa-solid {{getCustomActionIcon(r)}} icon\"\n (click)=\"performCustomAction($event, r)\"\n title=\"{{getCustomActionTooltip(r)}}\"\n ></span>\n }\n @if (AllowDelete) {\n <span class=\"fa-solid fa-trash-can icon\" (click)=\"deleteRecord($event, r)\" title=\"Delete\"></span>\n }\n </span>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n}\n</div>\n\n@if(AllowNew || AllowEdit) {\n <mj-entity-form-dialog #entityForm\n [Record]=\"editOrNewRecord\"\n [SectionName]=\"EditSectionName\"\n Mode=\"section\"\n [Visible]=\"showEditOrNewRecordForm\"\n [AutoRevertOnCancel]=\"true\"\n [HandleSave]=\"true\"\n [Width]=\"550\"\n [Height]=\"450\"\n (DialogClosed)=\"onEditOrNewRecordFormClosed($event)\">\n </mj-entity-form-dialog>\n}\n\n@if(deleteRecordDialogVisible && AllowDelete) {\n <kendo-dialog\n [title]=\"'Delete ' + EntityName + '?'\"\n [width]=\"450\"\n [height]=\"200\"\n (close)=\"closeDeleteDialog('No')\" >\n <div>\n Are you sure you want to delete '{{getRecordName(deleteRecordItem!)}}'?\n </div>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeDeleteDialog('Yes')\" themeColor=\"primary\">Yes</button>\n <button kendoButton (click)=\"closeDeleteDialog('No')\">No</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n}\n\n@if(customActionDialogVisible && AllowCustomAction) {\n <kendo-dialog\n [title]=\"CustomActionDialogTitle\"\n [width]=\"450\"\n [height]=\"200\"\n (close)=\"closeCustomActionDialog('No')\" >\n <div>\n {{ CustomActionDialogMessage.replace('{{recordName}}', getRecordName(customActionItem!)) }}\n @if(CustomActionDialogInfo) {\n <p>{{ CustomActionDialogInfo }}</p>\n }\n </div>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeCustomActionDialog('Yes')\" themeColor=\"primary\">Yes</button>\n <button kendoButton (click)=\"closeCustomActionDialog('No')\">No</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n}\n", styles: ["button {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n.wrapper {\n padding-right: 10px;\n}\n\n/* Style for the whole table */\ntable {\n margin-left: 5px;\n margin-top: 10px;\n margin-right: 5px;\n border-collapse: collapse; /* Ensures border collapse for a cleaner look */\n width: 100%;\n}\n \ntable th {\n background-color: var(--mj-bg-surface-sunken); /* Light gray background for headers */\n color: var(--mj-text-primary); /* Text color for headers */\n font-weight: bold; /* Bold font weight for headers */\n text-align: left;\n}\n\n/* Style for all table cells */\ntable th, table td {\n height: 36px; /* Fixed height for all rows */\n padding: 0 8px; /* Add some padding inside cells */\n}\n\n/* Style for the first column cells */\ntable td:first-child {\n display: flex; /* Make the cell a flex container */\n justify-content: space-between; /* Space out the text and icons */\n align-items: center; /* Center items vertically */\n padding-right: 8px; /* Ensure there is some padding on the right */\n}\n\n/* Style for the text span within the first column */\ntd:first-child span:first-child {\n border: none; /* Ensures no border is applied to the span */\n}\n\n/* Style for the icons container span within the first column */\ntd:first-child span:last-child {\n border: none; /* Ensures no border is applied to the span */\n}\n\n/* Style for the icons within the first column */\ntd:first-child .icon {\n margin-left: 10px; /* Space between icons if needed */\n cursor: pointer; /* Change cursor to pointer on hover */\n}\n\ntable tr {\n cursor: pointer;\n}\n\ntable tr:hover {\n background-color: var(--mj-brand-primary-subtle); /* Light blue for even rows */\n}\n\n.sticky-header {\n position: sticky;\n top: 0;\n}\n\n.scrollable {\n display: flex;\n overflow-y: scroll;\n max-height: 95%;\n}\n\n.vertical-full-width {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n "] }]
437
+ args: [{ standalone: false, selector: 'mj-simple-record-list', template: "<div class=\"wrapper scrollable\">\n @if(isLoading) {\n <div>\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n </div>\n }\n @else {\n <div class=\"vertical-full-width\">\n @if(AllowNew) {\n <button mjButton (click)=\"createNewRecord()\"><span class=\"fa-solid fa-plus\"></span> New</button>\n }\n <table class=\"grid\">\n <thead class=\"sticky-header\">\n <tr>\n @for (c of Columns; track c) {\n <th>\n {{ c }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (r of records; track r) {\n <tr (click)=\"selectRecord(undefined, r)\">\n @for (c of Columns; track c; let i = $index) {\n <td>\n <span>{{ r.Get(c) }}</span>\n @if(i === 0 && (AllowDelete || AllowEdit)) {\n <span>\n @if (AllowEdit) {\n <span class=\"fa-solid fa-pen-to-square icon\" (click)=\"editRecord($event, r)\" title=\"Edit\"></span>\n }\n @if (AllowCustomAction) {\n <span\n class=\"fa-solid {{getCustomActionIcon(r)}} icon\"\n (click)=\"performCustomAction($event, r)\"\n title=\"{{getCustomActionTooltip(r)}}\"\n ></span>\n }\n @if (AllowDelete) {\n <span class=\"fa-solid fa-trash-can icon\" (click)=\"deleteRecord($event, r)\" title=\"Delete\"></span>\n }\n </span>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n}\n</div>\n\n@if(AllowNew || AllowEdit) {\n <mj-entity-form-dialog #entityForm\n [Record]=\"editOrNewRecord\"\n [SectionName]=\"EditSectionName\"\n Mode=\"section\"\n [Visible]=\"showEditOrNewRecordForm\"\n [AutoRevertOnCancel]=\"true\"\n [HandleSave]=\"true\"\n [Width]=\"550\"\n [Height]=\"450\"\n (DialogClosed)=\"onEditOrNewRecordFormClosed($event)\">\n </mj-entity-form-dialog>\n}\n\n@if(deleteRecordDialogVisible && AllowDelete) {\n <mj-dialog\n [Visible]=\"true\"\n [Title]=\"'Delete ' + EntityName + '?'\"\n [Width]=\"450\"\n [Height]=\"200\"\n (Close)=\"closeDeleteDialog('No')\" >\n <div>\n Are you sure you want to delete '{{getRecordName(deleteRecordItem!)}}'?\n </div>\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"closeDeleteDialog('Yes')\">Yes</button>\n <button mjButton (click)=\"closeDeleteDialog('No')\">No</button>\n </mj-dialog-actions>\n </mj-dialog>\n}\n\n@if(customActionDialogVisible && AllowCustomAction) {\n <mj-dialog\n [Visible]=\"true\"\n [Title]=\"CustomActionDialogTitle\"\n [Width]=\"450\"\n [Height]=\"200\"\n (Close)=\"closeCustomActionDialog('No')\" >\n <div>\n {{ CustomActionDialogMessage.replace('{{recordName}}', getRecordName(customActionItem!)) }}\n @if(CustomActionDialogInfo) {\n <p>{{ CustomActionDialogInfo }}</p>\n }\n </div>\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"closeCustomActionDialog('Yes')\">Yes</button>\n <button mjButton (click)=\"closeCustomActionDialog('No')\">No</button>\n </mj-dialog-actions>\n </mj-dialog>\n}\n", styles: ["button {\n margin-left: 5px;\n margin-top: 5px;\n width: 125px;\n}\n\n.wrapper {\n padding-right: 10px;\n}\n\n/* Style for the whole table */\ntable {\n margin-left: 5px;\n margin-top: 10px;\n margin-right: 5px;\n border-collapse: collapse; /* Ensures border collapse for a cleaner look */\n width: 100%;\n}\n \ntable th {\n background-color: var(--mj-bg-surface-sunken); /* Light gray background for headers */\n color: var(--mj-text-primary); /* Text color for headers */\n font-weight: bold; /* Bold font weight for headers */\n text-align: left;\n}\n\n/* Style for all table cells */\ntable th, table td {\n height: 36px; /* Fixed height for all rows */\n padding: 0 8px; /* Add some padding inside cells */\n}\n\n/* Style for the first column cells */\ntable td:first-child {\n display: flex; /* Make the cell a flex container */\n justify-content: space-between; /* Space out the text and icons */\n align-items: center; /* Center items vertically */\n padding-right: 8px; /* Ensure there is some padding on the right */\n}\n\n/* Style for the text span within the first column */\ntd:first-child span:first-child {\n border: none; /* Ensures no border is applied to the span */\n}\n\n/* Style for the icons container span within the first column */\ntd:first-child span:last-child {\n border: none; /* Ensures no border is applied to the span */\n}\n\n/* Style for the icons within the first column */\ntd:first-child .icon {\n margin-left: 10px; /* Space between icons if needed */\n cursor: pointer; /* Change cursor to pointer on hover */\n}\n\ntable tr {\n cursor: pointer;\n}\n\ntable tr:hover {\n background-color: var(--mj-brand-primary-subtle); /* Light blue for even rows */\n}\n\n.sticky-header {\n position: sticky;\n top: 0;\n}\n\n.scrollable {\n display: flex;\n overflow-y: scroll;\n max-height: 95%;\n}\n\n.vertical-full-width {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n "] }]
439
438
  }], () => [{ type: i1.Router }], { EntityName: [{
440
439
  type: Input
441
440
  }], Columns: [{
@@ -1 +1 @@
1
- {"version":3,"file":"simple-record-list.component.js","sourceRoot":"","sources":["../../../src/lib/simple-record-list/simple-record-list.component.ts","../../../src/lib/simple-record-list/simple-record-list.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAU,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAc,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;;ICFrE,2BAAK;IACH,gCAA0D;IAC5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BAIL,KAAK;;kBAML,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFAtEI,yBAAyB","sourcesContent":["import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';\n\nimport { BaseEntity, Metadata, RunView } from '@memberjunction/core';\nimport { Router } from '@angular/router';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\n \n \n@Component({\n standalone: false,\n selector: 'mj-simple-record-list',\n templateUrl: './simple-record-list.component.html',\n styleUrls: ['./simple-record-list.component.css']\n})\nexport class SimpleRecordListComponent implements OnInit {\n /**\n * Name of the entity to display records for.\n */\n @Input() EntityName: string = '';\n /**\n * List of columns to display in the grid. If empty and the entity has > 10 columns, those columns marked as DefaultInView=1 will be used, otherwise the first 10 columns will be used.\n */\n @Input() Columns: string[] = [];\n /**\n * Name of the column to sort by. If empty, no sorting is done.\n */\n @Input() SortBy: string = '';\n /**\n * If true, the delete button will be shown for each record.\n */\n @Input() AllowDelete: boolean = true;\n /**\n * If true, the new button will be shown.\n */\n @Input() AllowNew: boolean = true;\n /**\n * If true, the edit button will be shown for each record.\n */\n @Input() AllowEdit: boolean = true;\n /**\n * If true, a custom action button will be shown for each record.\n */\n @Input() AllowCustomAction: boolean = false;\n /**\n * The CSS class for the custom action button icon (e.g. 'fa-user-lock')\n */\n @Input() CustomActionIcon: string = '';\n /**\n * A function that returns the appropriate icon based on the record\n * Signature: (record: BaseEntity) => string\n * If provided, overrides CustomActionIcon\n */\n @Input() CustomActionIconFunction: ((record: BaseEntity) => string) | null = null;\n /**\n * Tooltip text for the custom action button\n */\n @Input() CustomActionTooltip: string = '';\n /**\n * A function that returns the appropriate tooltip text based on the record\n * Signature: (record: BaseEntity) => string\n * If provided, overrides CustomActionTooltip\n */\n @Input() CustomActionTooltipFunction: ((record: BaseEntity) => string) | null = null;\n /**\n * Title for the custom action confirmation dialog\n */\n @Input() CustomActionDialogTitle: string = 'Confirm Action';\n /**\n * Message for the custom action confirmation dialog\n */\n @Input() CustomActionDialogMessage: string = 'Are you sure you want to perform this action?';\n /**\n * Optional additional information for the custom action confirmation dialog\n */\n @Input() CustomActionDialogInfo: string = '';\n /**\n * If AllowEdit or AllowNew is true, this is the section name to display for editing a new or existing record.\n */\n @Input() EditSectionName: string = 'details';\n\n @Output() RecordSelected = new EventEmitter<BaseEntity>();\n @Output() RecordEdited = new EventEmitter<BaseEntity>();\n @Output() RecordCreated = new EventEmitter<BaseEntity>();\n @Output() CustomActionClicked = new EventEmitter<BaseEntity>();\n @Output() CustomActionConfirmed = new EventEmitter<BaseEntity>();\n\n public isLoading: boolean = false;\n public records: BaseEntity[] = [];\n\n constructor(private router: Router) { \n } \n \n ngOnInit(): void {\n this.Refresh()\n }\n\n async Refresh() { \n this.isLoading = true\n\n const md = new Metadata();\n if (this.Columns.length === 0) {\n // populate this by default by taking all columns if entity has < 10 columns, otherwise include columns that have DefaultInView=1, and if we have no columns with DefaultInView=1, then include the first 10 columns\n const e = md.Entities.find(e => e.Name === this.EntityName);\n if (e) {\n if (e.Fields.length < 10)\n this.Columns = e.Fields.map(f => f.Name);\n else {\n const defaultInViewColumns = e.Fields.filter(c => c.DefaultInView);\n if (defaultInViewColumns.length > 0)\n this.Columns = defaultInViewColumns.map(f => f.Name);\n else\n this.Columns = e.Fields.slice(0, 10).map(f => f.Name);\n }\n }\n }\n const rv = new RunView();\n const result = await rv.RunView({\n EntityName: this.EntityName,\n ResultType: 'entity_object'\n })\n if (result.Success) {\n this.records = result.Results;\n if (this.SortBy && this.SortBy.trim().length > 0) {\n this.records.sort((a, b) => a.Get(this.SortBy).localeCompare(b.Get(this.SortBy)));\n }\n }\n else {\n throw new Error(\"Error loading records: \" + result.ErrorMessage)\n }\n this.isLoading = false\n }\n\n public selectRecord(event: MouseEvent | undefined, r: BaseEntity) {\n if (event)\n event.stopPropagation(); // prevent row from getting click\n\n this.RecordSelected.emit(r);\n }\n\n public deleteRecordDialogVisible: boolean = false;\n public customActionDialogVisible: boolean = false;\n public deleteRecordItem!: BaseEntity | null;\n public customActionItem!: BaseEntity | undefined;\n \n public async deleteRecord(event: MouseEvent, r: BaseEntity) {\n // confirm with the user first\n this.deleteRecordItem = r;\n this.deleteRecordDialogVisible = true;\n if (event)\n event.stopPropagation(); // prevent row from getting click\n }\n\n public async performCustomAction(event: MouseEvent, r: BaseEntity) {\n // first emit the clicked event to allow the parent to react\n this.CustomActionClicked.emit(r);\n \n // confirm with the user\n this.customActionItem = r;\n this.customActionDialogVisible = true;\n if (event)\n event.stopPropagation(); // prevent row from getting click\n }\n \n /**\n * Gets the custom action icon for a record, using the function if provided, otherwise the static icon\n */\n public getCustomActionIcon(record: BaseEntity): string {\n if (this.CustomActionIconFunction) {\n return this.CustomActionIconFunction(record);\n }\n return this.CustomActionIcon;\n }\n \n /**\n * Gets the custom action tooltip for a record, using the function if provided, otherwise the static tooltip\n */\n public getCustomActionTooltip(record: BaseEntity): string {\n if (this.CustomActionTooltipFunction) {\n return this.CustomActionTooltipFunction(record);\n }\n return this.CustomActionTooltip;\n }\n\n public async closeCustomActionDialog(result: 'Yes' | 'No') {\n this.customActionDialogVisible = false;\n if (result === 'Yes') {\n // emit the event so the parent can handle the action\n this.CustomActionConfirmed.emit(this.customActionItem);\n }\n this.customActionItem = undefined;\n }\n\n public async closeDeleteDialog(result: 'Yes' | 'No') {\n // if the user confirms, delete the record\n this.deleteRecordDialogVisible = false;\n if (result === 'Yes') {\n if (!await this.deleteRecordItem!.Delete()) {\n // show an error message\n const errorMessage = this.deleteRecordItem!.LatestResult.CompleteMessage;\n MJNotificationService.Instance.CreateSimpleNotification('Error deleting record: ' + errorMessage, 'error', 3000);\n }\n else \n this.Refresh(); // refresh the list\n }\n this.deleteRecordItem = null;\n }\n\n public editOrNewRecord!: BaseEntity;\n public showEditOrNewRecordForm: boolean = false;\n public recordMode: 'new' | 'edit' = 'new';\n public async createNewRecord() {\n // attempt to create a new record and if success, navigate to the new record\n const md = new Metadata();\n this.editOrNewRecord = await md.GetEntityObject(this.EntityName);\n if (this.editOrNewRecord) {\n this.editOrNewRecord.NewRecord();\n this.recordMode = 'new';\n this.showEditOrNewRecordForm = true;\n }\n }\n\n public async editRecord(event: MouseEvent, r: BaseEntity) {\n this.editOrNewRecord = r;\n this.recordMode = 'edit';\n this.showEditOrNewRecordForm = true;\n if (event)\n event.stopPropagation(); // prevent row from getting click\n }\n\n public async onEditOrNewRecordFormClosed(result: 'Save' | 'Cancel') {\n if (!this.editOrNewRecord)\n return; // this can happen if the user closes the form before the record is loaded\n\n this.showEditOrNewRecordForm = false;\n \n if (result === 'Save') {\n // the dialog already saved the record, just check to make sure it was saved and if so, navigate\n if (this.editOrNewRecord.IsSaved) {\n if (this.recordMode === 'edit')\n this.RecordEdited.emit(this.editOrNewRecord);\n else\n this.RecordCreated.emit(this.editOrNewRecord);\n\n // refresh our grid now\n await this.Refresh();\n }\n else\n throw new Error('Record was not saved');\n }\n }\n\n public getRecordName(r: BaseEntity): string {\n // check to see if we have any columns in the entity that have IsNameField = 1, the fall back from there is to look for a column named \"Name\", and if that doesn't work we return the primary key(s)\n const md = new Metadata();\n const e = md.Entities.find(e => e.Name === this.EntityName);\n if (!e)\n throw new Error('Entity not found: ' + this.EntityName);\n\n const nameField = e.Fields.find(c => c.IsNameField);\n if (nameField)\n return r.Get(nameField.Name);\n else {\n const nameField = e.Fields.find(c => c.Name === 'Name');\n if (nameField)\n return r.Get(\"Name\");\n else {\n // iterate through all primary keys and form a comma separated list\n const pkString = r.PrimaryKeys.map(pk => r.Get(pk.Name)).join(', ');\n return \"Record: \" + pkString;\n }\n }\n }\n}\n","<div class=\"wrapper scrollable\">\n @if(isLoading) {\n <div>\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n </div>\n }\n @else {\n <div class=\"vertical-full-width\">\n @if(AllowNew) {\n <button kendoButton (click)=\"createNewRecord()\"><span class=\"fa-solid fa-plus\"></span> New</button>\n }\n <table class=\"grid\">\n <thead class=\"sticky-header\">\n <tr>\n @for (c of Columns; track c) {\n <th>\n {{ c }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (r of records; track r) {\n <tr (click)=\"selectRecord(undefined, r)\">\n @for (c of Columns; track c; let i = $index) {\n <td>\n <span>{{ r.Get(c) }}</span>\n @if(i === 0 && (AllowDelete || AllowEdit)) {\n <span>\n @if (AllowEdit) {\n <span class=\"fa-solid fa-pen-to-square icon\" (click)=\"editRecord($event, r)\" title=\"Edit\"></span>\n }\n @if (AllowCustomAction) {\n <span\n class=\"fa-solid {{getCustomActionIcon(r)}} icon\"\n (click)=\"performCustomAction($event, r)\"\n title=\"{{getCustomActionTooltip(r)}}\"\n ></span>\n }\n @if (AllowDelete) {\n <span class=\"fa-solid fa-trash-can icon\" (click)=\"deleteRecord($event, r)\" title=\"Delete\"></span>\n }\n </span>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n}\n</div>\n\n@if(AllowNew || AllowEdit) {\n <mj-entity-form-dialog #entityForm\n [Record]=\"editOrNewRecord\"\n [SectionName]=\"EditSectionName\"\n Mode=\"section\"\n [Visible]=\"showEditOrNewRecordForm\"\n [AutoRevertOnCancel]=\"true\"\n [HandleSave]=\"true\"\n [Width]=\"550\"\n [Height]=\"450\"\n (DialogClosed)=\"onEditOrNewRecordFormClosed($event)\">\n </mj-entity-form-dialog>\n}\n\n@if(deleteRecordDialogVisible && AllowDelete) {\n <kendo-dialog\n [title]=\"'Delete ' + EntityName + '?'\"\n [width]=\"450\"\n [height]=\"200\"\n (close)=\"closeDeleteDialog('No')\" >\n <div>\n Are you sure you want to delete '{{getRecordName(deleteRecordItem!)}}'?\n </div>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeDeleteDialog('Yes')\" themeColor=\"primary\">Yes</button>\n <button kendoButton (click)=\"closeDeleteDialog('No')\">No</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n}\n\n@if(customActionDialogVisible && AllowCustomAction) {\n <kendo-dialog\n [title]=\"CustomActionDialogTitle\"\n [width]=\"450\"\n [height]=\"200\"\n (close)=\"closeCustomActionDialog('No')\" >\n <div>\n {{ CustomActionDialogMessage.replace('{{recordName}}', getRecordName(customActionItem!)) }}\n @if(CustomActionDialogInfo) {\n <p>{{ CustomActionDialogInfo }}</p>\n }\n </div>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"closeCustomActionDialog('Yes')\" themeColor=\"primary\">Yes</button>\n <button kendoButton (click)=\"closeCustomActionDialog('No')\">No</button>\n </kendo-dialog-actions>\n </kendo-dialog>\n}\n"]}
1
+ {"version":3,"file":"simple-record-list.component.js","sourceRoot":"","sources":["../../../src/lib/simple-record-list/simple-record-list.component.ts","../../../src/lib/simple-record-list/simple-record-list.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAU,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAc,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;ICFrE,2BAAK;IACH,gCAA0D;IAC5D,iBAAM;;IADQ,cAAkB;IAAlB,gCAAkB;;;;IAM9B,iCAA6C;IAA5B,4MAAS,wBAAiB,KAAC;IAAC,2BAAsC;IAAC,oBAAG;IAAA,iBAAS;;;IAM1F,0BAAI;IACF,YACF;IAAA,iBAAK;;;IADH,cACF;IADE,qCACF;;;;IAaU,gCAA0F;IAA7C,sRAAS,+BAAqB,KAAC;IAAc,iBAAO;;;;IAGjG,gCAIC;IAFC,sRAAS,wCAA8B,KAAC;IAEzC,iBAAO;;;;IAHN,cAAA,yEAAgD,CAAA;IAEhD,uBAAA,qDAAqC,CAAA;;;;IAIvC,gCAA0F;IAAjD,sRAAS,iCAAuB,KAAC;IAAgB,iBAAO;;;IAZrG,4BAAM;IACJ,qIAAiB;IAG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xD,IAAI,SAAS;gBACX,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;iBAClB,CAAC;gBACJ,mEAAmE;gBACnE,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACpE,OAAO,UAAU,GAAG,QAAQ,CAAC;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;mHAjQU,yBAAyB;6DAAzB,yBAAyB;YCbtC,8BAAiC;YAM/B,AALA,wFAAgB,sEAKT;YA8CT,iBAAM;YAEN,6GAA4B;YAc5B,iGAA+C;YAiB/C,iGAAqD;;YApFnD,cAkDD;YAlDC,uCAkDD;YAGD,eAYC;YAZD,wDAYC;YAED,cAeC;YAfD,2EAeC;YAED,cAkBC;YAlBD,iFAkBC;;;iFD1FY,yBAAyB;cANrC,SAAS;6BACI,KAAK,YACP,uBAAuB;;kBAQhC,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAML,KAAK;;kBAIL,KAAK;;kBAML,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAIL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFAtEI,yBAAyB","sourcesContent":["import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';\n\nimport { BaseEntity, Metadata, RunView } from '@memberjunction/core';\nimport { Router } from '@angular/router';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\n \n \n@Component({\n standalone: false,\n selector: 'mj-simple-record-list',\n templateUrl: './simple-record-list.component.html',\n styleUrls: ['./simple-record-list.component.css']\n})\nexport class SimpleRecordListComponent implements OnInit {\n /**\n * Name of the entity to display records for.\n */\n @Input() EntityName: string = '';\n /**\n * List of columns to display in the grid. If empty and the entity has > 10 columns, those columns marked as DefaultInView=1 will be used, otherwise the first 10 columns will be used.\n */\n @Input() Columns: string[] = [];\n /**\n * Name of the column to sort by. If empty, no sorting is done.\n */\n @Input() SortBy: string = '';\n /**\n * If true, the delete button will be shown for each record.\n */\n @Input() AllowDelete: boolean = true;\n /**\n * If true, the new button will be shown.\n */\n @Input() AllowNew: boolean = true;\n /**\n * If true, the edit button will be shown for each record.\n */\n @Input() AllowEdit: boolean = true;\n /**\n * If true, a custom action button will be shown for each record.\n */\n @Input() AllowCustomAction: boolean = false;\n /**\n * The CSS class for the custom action button icon (e.g. 'fa-user-lock')\n */\n @Input() CustomActionIcon: string = '';\n /**\n * A function that returns the appropriate icon based on the record\n * Signature: (record: BaseEntity) => string\n * If provided, overrides CustomActionIcon\n */\n @Input() CustomActionIconFunction: ((record: BaseEntity) => string) | null = null;\n /**\n * Tooltip text for the custom action button\n */\n @Input() CustomActionTooltip: string = '';\n /**\n * A function that returns the appropriate tooltip text based on the record\n * Signature: (record: BaseEntity) => string\n * If provided, overrides CustomActionTooltip\n */\n @Input() CustomActionTooltipFunction: ((record: BaseEntity) => string) | null = null;\n /**\n * Title for the custom action confirmation dialog\n */\n @Input() CustomActionDialogTitle: string = 'Confirm Action';\n /**\n * Message for the custom action confirmation dialog\n */\n @Input() CustomActionDialogMessage: string = 'Are you sure you want to perform this action?';\n /**\n * Optional additional information for the custom action confirmation dialog\n */\n @Input() CustomActionDialogInfo: string = '';\n /**\n * If AllowEdit or AllowNew is true, this is the section name to display for editing a new or existing record.\n */\n @Input() EditSectionName: string = 'details';\n\n @Output() RecordSelected = new EventEmitter<BaseEntity>();\n @Output() RecordEdited = new EventEmitter<BaseEntity>();\n @Output() RecordCreated = new EventEmitter<BaseEntity>();\n @Output() CustomActionClicked = new EventEmitter<BaseEntity>();\n @Output() CustomActionConfirmed = new EventEmitter<BaseEntity>();\n\n public isLoading: boolean = false;\n public records: BaseEntity[] = [];\n\n constructor(private router: Router) { \n } \n \n ngOnInit(): void {\n this.Refresh()\n }\n\n async Refresh() { \n this.isLoading = true\n\n const md = new Metadata();\n if (this.Columns.length === 0) {\n // populate this by default by taking all columns if entity has < 10 columns, otherwise include columns that have DefaultInView=1, and if we have no columns with DefaultInView=1, then include the first 10 columns\n const e = md.Entities.find(e => e.Name === this.EntityName);\n if (e) {\n if (e.Fields.length < 10)\n this.Columns = e.Fields.map(f => f.Name);\n else {\n const defaultInViewColumns = e.Fields.filter(c => c.DefaultInView);\n if (defaultInViewColumns.length > 0)\n this.Columns = defaultInViewColumns.map(f => f.Name);\n else\n this.Columns = e.Fields.slice(0, 10).map(f => f.Name);\n }\n }\n }\n const rv = new RunView();\n const result = await rv.RunView({\n EntityName: this.EntityName,\n ResultType: 'entity_object'\n })\n if (result.Success) {\n this.records = result.Results;\n if (this.SortBy && this.SortBy.trim().length > 0) {\n this.records.sort((a, b) => a.Get(this.SortBy).localeCompare(b.Get(this.SortBy)));\n }\n }\n else {\n throw new Error(\"Error loading records: \" + result.ErrorMessage)\n }\n this.isLoading = false\n }\n\n public selectRecord(event: MouseEvent | undefined, r: BaseEntity) {\n if (event)\n event.stopPropagation(); // prevent row from getting click\n\n this.RecordSelected.emit(r);\n }\n\n public deleteRecordDialogVisible: boolean = false;\n public customActionDialogVisible: boolean = false;\n public deleteRecordItem!: BaseEntity | null;\n public customActionItem!: BaseEntity | undefined;\n \n public async deleteRecord(event: MouseEvent, r: BaseEntity) {\n // confirm with the user first\n this.deleteRecordItem = r;\n this.deleteRecordDialogVisible = true;\n if (event)\n event.stopPropagation(); // prevent row from getting click\n }\n\n public async performCustomAction(event: MouseEvent, r: BaseEntity) {\n // first emit the clicked event to allow the parent to react\n this.CustomActionClicked.emit(r);\n \n // confirm with the user\n this.customActionItem = r;\n this.customActionDialogVisible = true;\n if (event)\n event.stopPropagation(); // prevent row from getting click\n }\n \n /**\n * Gets the custom action icon for a record, using the function if provided, otherwise the static icon\n */\n public getCustomActionIcon(record: BaseEntity): string {\n if (this.CustomActionIconFunction) {\n return this.CustomActionIconFunction(record);\n }\n return this.CustomActionIcon;\n }\n \n /**\n * Gets the custom action tooltip for a record, using the function if provided, otherwise the static tooltip\n */\n public getCustomActionTooltip(record: BaseEntity): string {\n if (this.CustomActionTooltipFunction) {\n return this.CustomActionTooltipFunction(record);\n }\n return this.CustomActionTooltip;\n }\n\n public async closeCustomActionDialog(result: 'Yes' | 'No') {\n this.customActionDialogVisible = false;\n if (result === 'Yes') {\n // emit the event so the parent can handle the action\n this.CustomActionConfirmed.emit(this.customActionItem);\n }\n this.customActionItem = undefined;\n }\n\n public async closeDeleteDialog(result: 'Yes' | 'No') {\n // if the user confirms, delete the record\n this.deleteRecordDialogVisible = false;\n if (result === 'Yes') {\n if (!await this.deleteRecordItem!.Delete()) {\n // show an error message\n const errorMessage = this.deleteRecordItem!.LatestResult.CompleteMessage;\n MJNotificationService.Instance.CreateSimpleNotification('Error deleting record: ' + errorMessage, 'error', 3000);\n }\n else \n this.Refresh(); // refresh the list\n }\n this.deleteRecordItem = null;\n }\n\n public editOrNewRecord!: BaseEntity;\n public showEditOrNewRecordForm: boolean = false;\n public recordMode: 'new' | 'edit' = 'new';\n public async createNewRecord() {\n // attempt to create a new record and if success, navigate to the new record\n const md = new Metadata();\n this.editOrNewRecord = await md.GetEntityObject(this.EntityName);\n if (this.editOrNewRecord) {\n this.editOrNewRecord.NewRecord();\n this.recordMode = 'new';\n this.showEditOrNewRecordForm = true;\n }\n }\n\n public async editRecord(event: MouseEvent, r: BaseEntity) {\n this.editOrNewRecord = r;\n this.recordMode = 'edit';\n this.showEditOrNewRecordForm = true;\n if (event)\n event.stopPropagation(); // prevent row from getting click\n }\n\n public async onEditOrNewRecordFormClosed(result: 'Save' | 'Cancel') {\n if (!this.editOrNewRecord)\n return; // this can happen if the user closes the form before the record is loaded\n\n this.showEditOrNewRecordForm = false;\n \n if (result === 'Save') {\n // the dialog already saved the record, just check to make sure it was saved and if so, navigate\n if (this.editOrNewRecord.IsSaved) {\n if (this.recordMode === 'edit')\n this.RecordEdited.emit(this.editOrNewRecord);\n else\n this.RecordCreated.emit(this.editOrNewRecord);\n\n // refresh our grid now\n await this.Refresh();\n }\n else\n throw new Error('Record was not saved');\n }\n }\n\n public getRecordName(r: BaseEntity): string {\n // check to see if we have any columns in the entity that have IsNameField = 1, the fall back from there is to look for a column named \"Name\", and if that doesn't work we return the primary key(s)\n const md = new Metadata();\n const e = md.Entities.find(e => e.Name === this.EntityName);\n if (!e)\n throw new Error('Entity not found: ' + this.EntityName);\n\n const nameField = e.Fields.find(c => c.IsNameField);\n if (nameField)\n return r.Get(nameField.Name);\n else {\n const nameField = e.Fields.find(c => c.Name === 'Name');\n if (nameField)\n return r.Get(\"Name\");\n else {\n // iterate through all primary keys and form a comma separated list\n const pkString = r.PrimaryKeys.map(pk => r.Get(pk.Name)).join(', ');\n return \"Record: \" + pkString;\n }\n }\n }\n}\n","<div class=\"wrapper scrollable\">\n @if(isLoading) {\n <div>\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n </div>\n }\n @else {\n <div class=\"vertical-full-width\">\n @if(AllowNew) {\n <button mjButton (click)=\"createNewRecord()\"><span class=\"fa-solid fa-plus\"></span> New</button>\n }\n <table class=\"grid\">\n <thead class=\"sticky-header\">\n <tr>\n @for (c of Columns; track c) {\n <th>\n {{ c }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (r of records; track r) {\n <tr (click)=\"selectRecord(undefined, r)\">\n @for (c of Columns; track c; let i = $index) {\n <td>\n <span>{{ r.Get(c) }}</span>\n @if(i === 0 && (AllowDelete || AllowEdit)) {\n <span>\n @if (AllowEdit) {\n <span class=\"fa-solid fa-pen-to-square icon\" (click)=\"editRecord($event, r)\" title=\"Edit\"></span>\n }\n @if (AllowCustomAction) {\n <span\n class=\"fa-solid {{getCustomActionIcon(r)}} icon\"\n (click)=\"performCustomAction($event, r)\"\n title=\"{{getCustomActionTooltip(r)}}\"\n ></span>\n }\n @if (AllowDelete) {\n <span class=\"fa-solid fa-trash-can icon\" (click)=\"deleteRecord($event, r)\" title=\"Delete\"></span>\n }\n </span>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n}\n</div>\n\n@if(AllowNew || AllowEdit) {\n <mj-entity-form-dialog #entityForm\n [Record]=\"editOrNewRecord\"\n [SectionName]=\"EditSectionName\"\n Mode=\"section\"\n [Visible]=\"showEditOrNewRecordForm\"\n [AutoRevertOnCancel]=\"true\"\n [HandleSave]=\"true\"\n [Width]=\"550\"\n [Height]=\"450\"\n (DialogClosed)=\"onEditOrNewRecordFormClosed($event)\">\n </mj-entity-form-dialog>\n}\n\n@if(deleteRecordDialogVisible && AllowDelete) {\n <mj-dialog\n [Visible]=\"true\"\n [Title]=\"'Delete ' + EntityName + '?'\"\n [Width]=\"450\"\n [Height]=\"200\"\n (Close)=\"closeDeleteDialog('No')\" >\n <div>\n Are you sure you want to delete '{{getRecordName(deleteRecordItem!)}}'?\n </div>\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"closeDeleteDialog('Yes')\">Yes</button>\n <button mjButton (click)=\"closeDeleteDialog('No')\">No</button>\n </mj-dialog-actions>\n </mj-dialog>\n}\n\n@if(customActionDialogVisible && AllowCustomAction) {\n <mj-dialog\n [Visible]=\"true\"\n [Title]=\"CustomActionDialogTitle\"\n [Width]=\"450\"\n [Height]=\"200\"\n (Close)=\"closeCustomActionDialog('No')\" >\n <div>\n {{ CustomActionDialogMessage.replace('{{recordName}}', getRecordName(customActionItem!)) }}\n @if(CustomActionDialogInfo) {\n <p>{{ CustomActionDialogInfo }}</p>\n }\n </div>\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"closeCustomActionDialog('Yes')\">Yes</button>\n <button mjButton (click)=\"closeCustomActionDialog('No')\">No</button>\n </mj-dialog-actions>\n </mj-dialog>\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-simple-record-list",
3
- "version": "5.21.0",
3
+ "version": "5.23.0",
4
4
  "description": "MemberJunction: Very simple and reusable Angular component for displaying, editing, creating and deleting records in any entity",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -25,18 +25,14 @@
25
25
  "@angular/router": "21.1.3"
26
26
  },
27
27
  "dependencies": {
28
- "@memberjunction/core": "5.21.0",
29
- "@memberjunction/core-entities": "5.21.0",
30
- "@memberjunction/global": "5.21.0",
31
- "@memberjunction/ng-container-directives": "5.21.0",
32
- "@memberjunction/ng-entity-form-dialog": "5.21.0",
33
- "@memberjunction/ng-notifications": "5.21.0",
34
- "@memberjunction/ng-shared-generic": "5.21.0",
35
- "@progress/kendo-angular-buttons": "22.0.1",
36
- "@progress/kendo-angular-dialog": "22.0.1",
37
- "@progress/kendo-angular-dropdowns": "22.0.1",
38
- "@progress/kendo-angular-indicators": "22.0.1",
39
- "@progress/kendo-angular-layout": "22.0.1",
28
+ "@memberjunction/core": "5.23.0",
29
+ "@memberjunction/core-entities": "5.23.0",
30
+ "@memberjunction/global": "5.23.0",
31
+ "@memberjunction/ng-container-directives": "5.23.0",
32
+ "@memberjunction/ng-entity-form-dialog": "5.23.0",
33
+ "@memberjunction/ng-notifications": "5.23.0",
34
+ "@memberjunction/ng-shared-generic": "5.23.0",
35
+ "@memberjunction/ng-ui-components": "5.23.0",
40
36
  "tslib": "^2.8.1"
41
37
  },
42
38
  "sideEffects": false,