@memberjunction/ng-explorer-settings 0.9.10 → 0.9.13

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.
Files changed (25) hide show
  1. package/dist/lib/application-entities-grid/application-entities-grid.component.d.ts +51 -0
  2. package/dist/lib/application-entities-grid/application-entities-grid.component.js +348 -0
  3. package/dist/lib/entity-form-dialog/entity-form-dialog.component.d.ts +33 -0
  4. package/dist/lib/entity-form-dialog/entity-form-dialog.component.js +183 -0
  5. package/dist/lib/entity-form-window/entity-form-window.component.d.ts +17 -0
  6. package/dist/lib/entity-form-window/entity-form-window.component.js +99 -0
  7. package/dist/lib/module.d.ts +21 -14
  8. package/dist/lib/module.js +50 -8
  9. package/dist/lib/record-list/record-list.component.d.ts +41 -0
  10. package/dist/lib/record-list/record-list.component.js +324 -0
  11. package/dist/lib/roles-list/roles-list.component.d.ts +11 -1
  12. package/dist/lib/roles-list/roles-list.component.js +125 -26
  13. package/dist/lib/settings/settings.component.d.ts +26 -2
  14. package/dist/lib/settings/settings.component.js +136 -66
  15. package/dist/lib/single-application/single-application.component.d.ts +22 -0
  16. package/dist/lib/single-application/single-application.component.js +144 -0
  17. package/dist/lib/single-role/single-role.component.d.ts +16 -13
  18. package/dist/lib/single-role/single-role.component.js +112 -182
  19. package/dist/lib/single-user/single-user.component.d.ts +24 -0
  20. package/dist/lib/single-user/single-user.component.js +191 -0
  21. package/dist/lib/user-roles-grid/user-roles-grid.component.d.ts +41 -0
  22. package/dist/lib/user-roles-grid/user-roles-grid.component.js +320 -0
  23. package/dist/public-api.d.ts +4 -1
  24. package/dist/public-api.js +4 -1
  25. package/package.json +9 -4
@@ -0,0 +1,99 @@
1
+ import { Component, Input, Output, ViewChild, ViewContainerRef, EventEmitter } from '@angular/core';
2
+ import { MJGlobal } from '@memberjunction/global';
3
+ import { BaseFormComponent, BaseFormSectionComponent } from '@memberjunction/ng-base-forms';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/common";
6
+ import * as i2 from "@progress/kendo-angular-dialog";
7
+ const _c0 = ["dynamicFormContainer"];
8
+ function EntityFormWindow_div_0_ng_template_2_Template(rf, ctx) { }
9
+ function EntityFormWindow_div_0_Template(rf, ctx) { if (rf & 1) {
10
+ const _r4 = i0.ɵɵgetCurrentView();
11
+ i0.ɵɵelementStart(0, "div")(1, "kendo-window", 1);
12
+ i0.ɵɵlistener("close", function EntityFormWindow_div_0_Template_kendo_window_close_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.closeWindow()); });
13
+ i0.ɵɵtemplate(2, EntityFormWindow_div_0_ng_template_2_Template, 0, 0, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
14
+ i0.ɵɵelementEnd()();
15
+ } }
16
+ export class EntityFormWindow {
17
+ constructor() {
18
+ this.Mode = 'complete';
19
+ this.SectionName = '';
20
+ this.Record = null;
21
+ this.close = new EventEmitter();
22
+ this._visible = false;
23
+ }
24
+ set Visible(val) {
25
+ this._visible = val;
26
+ if (val) {
27
+ Promise.resolve().then(() => {
28
+ // At this point, the DOM should be updated, and `this.container` should be available.
29
+ this.showForm();
30
+ });
31
+ }
32
+ }
33
+ get Visible() {
34
+ return this._visible;
35
+ }
36
+ showForm() {
37
+ var _a, _b;
38
+ if (!this.container)
39
+ throw new Error('Container not found');
40
+ if (!this.Record)
41
+ throw new Error('Record is a required property');
42
+ // Ensure the container is clear before inserting a new component
43
+ this.container.clear();
44
+ // here we want to grab the right type of object to instantiate based on the settings either mode of complete or section
45
+ // if section, we grab a sub-class of BaseFormSectionComponent, if complete, we grab a sub-class of the BaseForComponent class
46
+ let reg;
47
+ if (this.Mode === 'complete') {
48
+ reg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormComponent, (_a = this.Record) === null || _a === void 0 ? void 0 : _a.EntityInfo.Name);
49
+ }
50
+ else {
51
+ reg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormSectionComponent, ((_b = this.Record) === null || _b === void 0 ? void 0 : _b.EntityInfo.Name) + '.' + this.SectionName);
52
+ }
53
+ if (reg && reg.SubClass) {
54
+ // we have our class registration
55
+ const component = this.container.createComponent(reg.SubClass);
56
+ if (this.Record && component.instance instanceof BaseFormSectionComponent) {
57
+ component.instance.record = this.Record;
58
+ component.instance.EditMode = true;
59
+ }
60
+ else if (this.Record && component.instance instanceof BaseFormComponent) {
61
+ component.instance.record = this.Record;
62
+ component.instance.EditMode = true;
63
+ }
64
+ }
65
+ }
66
+ closeWindow() {
67
+ this.Visible = false;
68
+ this.close.emit();
69
+ }
70
+ }
71
+ EntityFormWindow.ɵfac = function EntityFormWindow_Factory(t) { return new (t || EntityFormWindow)(); };
72
+ EntityFormWindow.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EntityFormWindow, selectors: [["mj-entity-form-window"]], viewQuery: function EntityFormWindow_Query(rf, ctx) { if (rf & 1) {
73
+ i0.ɵɵviewQuery(_c0, 5, ViewContainerRef);
74
+ } if (rf & 2) {
75
+ let _t;
76
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.container = _t.first);
77
+ } }, inputs: { Mode: "Mode", SectionName: "SectionName", Record: "Record", Visible: "Visible" }, outputs: { close: "close" }, decls: 1, vars: 1, consts: [[4, "ngIf"], ["title", "the window!", 3, "close"], ["dynamicFormContainer", ""]], template: function EntityFormWindow_Template(rf, ctx) { if (rf & 1) {
78
+ i0.ɵɵtemplate(0, EntityFormWindow_div_0_Template, 4, 0, "div", 0);
79
+ } if (rf & 2) {
80
+ i0.ɵɵproperty("ngIf", ctx.Visible);
81
+ } }, dependencies: [i1.NgIf, i2.WindowComponent] });
82
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityFormWindow, [{
83
+ type: Component,
84
+ args: [{ selector: 'mj-entity-form-window', template: "<div *ngIf=\"Visible\">\r\n <kendo-window title=\"the window!\" (close)=\"closeWindow()\" >\r\n <ng-template #dynamicFormContainer></ng-template>\r\n </kendo-window>\r\n</div>" }]
85
+ }], null, { Mode: [{
86
+ type: Input
87
+ }], SectionName: [{
88
+ type: Input
89
+ }], Record: [{
90
+ type: Input
91
+ }], close: [{
92
+ type: Output
93
+ }], Visible: [{
94
+ type: Input
95
+ }], container: [{
96
+ type: ViewChild,
97
+ args: ['dynamicFormContainer', { read: ViewContainerRef }]
98
+ }] }); })();
99
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityFormWindow, { className: "EntityFormWindow", filePath: "src\\lib\\entity-form-window\\entity-form-window.component.ts", lineNumber: 15 }); })();
@@ -1,21 +1,28 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./single-role/single-role.component";
3
3
  import * as i2 from "./settings/settings.component";
4
- import * as i3 from "./roles-list/roles-list.component";
5
- import * as i4 from "@angular/common";
6
- import * as i5 from "@progress/kendo-angular-grid";
7
- import * as i6 from "@angular/forms";
8
- import * as i7 from "@progress/kendo-angular-dialog";
9
- import * as i8 from "@progress/kendo-angular-excel-export";
10
- import * as i9 from "@memberjunction/ng-compare-records";
11
- import * as i10 from "@memberjunction/ng-container-directives";
12
- import * as i11 from "@progress/kendo-angular-buttons";
13
- import * as i12 from "@progress/kendo-angular-icons";
14
- import * as i13 from "@progress/kendo-angular-dropdowns";
15
- import * as i14 from "@memberjunction/ng-entity-permissions";
16
- import * as i15 from "@progress/kendo-angular-layout";
4
+ import * as i3 from "./user-roles-grid/user-roles-grid.component";
5
+ import * as i4 from "./single-user/single-user.component";
6
+ import * as i5 from "./single-application/single-application.component";
7
+ import * as i6 from "./application-entities-grid/application-entities-grid.component";
8
+ import * as i7 from "@angular/common";
9
+ import * as i8 from "@progress/kendo-angular-grid";
10
+ import * as i9 from "@angular/forms";
11
+ import * as i10 from "@progress/kendo-angular-dialog";
12
+ import * as i11 from "@progress/kendo-angular-excel-export";
13
+ import * as i12 from "@memberjunction/ng-compare-records";
14
+ import * as i13 from "@memberjunction/ng-container-directives";
15
+ import * as i14 from "@progress/kendo-angular-buttons";
16
+ import * as i15 from "@progress/kendo-angular-icons";
17
+ import * as i16 from "@progress/kendo-angular-dropdowns";
18
+ import * as i17 from "@memberjunction/ng-entity-permissions";
19
+ import * as i18 from "@progress/kendo-angular-layout";
20
+ import * as i19 from "@memberjunction/ng-entity-form-dialog";
21
+ import * as i20 from "@progress/kendo-angular-indicators";
22
+ import * as i21 from "@memberjunction/ng-user-view-grid";
23
+ import * as i22 from "@memberjunction/ng-simple-record-list";
17
24
  export declare class ExplorerSettingsModule {
18
25
  static ɵfac: i0.ɵɵFactoryDeclaration<ExplorerSettingsModule, never>;
19
- static ɵmod: i0.ɵɵNgModuleDeclaration<ExplorerSettingsModule, [typeof i1.SingleRoleComponent, typeof i2.SettingsComponent, typeof i3.RolesListComponent], [typeof i4.CommonModule, typeof i5.GridModule, typeof i6.FormsModule, typeof i7.DialogsModule, typeof i8.ExcelExportModule, typeof i9.CompareRecordsModule, typeof i10.ContainerDirectivesModule, typeof i11.ButtonsModule, typeof i12.IconsModule, typeof i13.DropDownsModule, typeof i14.EntityPermissionsModule, typeof i15.TabStripModule], [typeof i1.SingleRoleComponent, typeof i2.SettingsComponent, typeof i3.RolesListComponent]>;
26
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ExplorerSettingsModule, [typeof i1.SingleRoleComponent, typeof i2.SettingsComponent, typeof i3.UserRolesGridComponent, typeof i4.SingleUserComponent, typeof i5.SingleApplicationComponent, typeof i6.ApplicationEntitiesGridComponent], [typeof i7.CommonModule, typeof i8.GridModule, typeof i9.FormsModule, typeof i10.DialogsModule, typeof i11.ExcelExportModule, typeof i12.CompareRecordsModule, typeof i13.ContainerDirectivesModule, typeof i14.ButtonsModule, typeof i15.IconsModule, typeof i16.DropDownsModule, typeof i17.EntityPermissionsModule, typeof i18.TabStripModule, typeof i10.DialogsModule, typeof i19.EntityFormDialogModule, typeof i20.IndicatorsModule, typeof i21.UserViewGridModule, typeof i22.SimpleRecordListModule], [typeof i1.SingleRoleComponent, typeof i2.SettingsComponent, typeof i3.UserRolesGridComponent, typeof i4.SingleUserComponent, typeof i5.SingleApplicationComponent, typeof i6.ApplicationEntitiesGridComponent]>;
20
27
  static ɵinj: i0.ɵɵInjectorDeclaration<ExplorerSettingsModule>;
21
28
  }
@@ -12,10 +12,24 @@ import { FormsModule } from '@angular/forms';
12
12
  import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
13
13
  import { SingleRoleComponent } from './single-role/single-role.component';
14
14
  import { SettingsComponent } from './settings/settings.component';
15
- import { RolesListComponent } from './roles-list/roles-list.component';
16
15
  import { EntityPermissionsModule } from '@memberjunction/ng-entity-permissions';
17
16
  import { TabStripModule } from '@progress/kendo-angular-layout';
17
+ import { EntityFormDialogModule } from '@memberjunction/ng-entity-form-dialog';
18
+ import { UserRolesGridComponent } from './user-roles-grid/user-roles-grid.component';
19
+ import { IndicatorsModule } from '@progress/kendo-angular-indicators';
20
+ import { SingleUserComponent } from './single-user/single-user.component';
21
+ import { UserViewGridModule } from '@memberjunction/ng-user-view-grid';
22
+ import { SimpleRecordListModule } from '@memberjunction/ng-simple-record-list';
23
+ import { SingleApplicationComponent } from './single-application/single-application.component';
24
+ import { ApplicationEntitiesGridComponent } from './application-entities-grid/application-entities-grid.component';
18
25
  import * as i0 from "@angular/core";
26
+ import * as i1 from "@angular/common";
27
+ import * as i2 from "@memberjunction/ng-container-directives";
28
+ import * as i3 from "@progress/kendo-angular-icons";
29
+ import * as i4 from "@memberjunction/ng-entity-permissions";
30
+ import * as i5 from "@progress/kendo-angular-layout";
31
+ import * as i6 from "@memberjunction/ng-entity-form-dialog";
32
+ import * as i7 from "@progress/kendo-angular-indicators";
19
33
  export class ExplorerSettingsModule {
20
34
  }
21
35
  ExplorerSettingsModule.ɵfac = function ExplorerSettingsModule_Factory(t) { return new (t || ExplorerSettingsModule)(); };
@@ -31,14 +45,22 @@ ExplorerSettingsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [C
31
45
  IconsModule,
32
46
  DropDownsModule,
33
47
  EntityPermissionsModule,
34
- TabStripModule] });
48
+ TabStripModule,
49
+ DialogsModule,
50
+ EntityFormDialogModule,
51
+ IndicatorsModule,
52
+ UserViewGridModule,
53
+ SimpleRecordListModule] });
35
54
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExplorerSettingsModule, [{
36
55
  type: NgModule,
37
56
  args: [{
38
57
  declarations: [
39
58
  SingleRoleComponent,
40
59
  SettingsComponent,
41
- RolesListComponent
60
+ UserRolesGridComponent,
61
+ SingleUserComponent,
62
+ SingleApplicationComponent,
63
+ ApplicationEntitiesGridComponent
42
64
  ],
43
65
  imports: [
44
66
  CommonModule,
@@ -52,18 +74,29 @@ ExplorerSettingsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [C
52
74
  IconsModule,
53
75
  DropDownsModule,
54
76
  EntityPermissionsModule,
55
- TabStripModule
77
+ TabStripModule,
78
+ DialogsModule,
79
+ EntityFormDialogModule,
80
+ IndicatorsModule,
81
+ UserViewGridModule,
82
+ SimpleRecordListModule
56
83
  ],
57
84
  exports: [
58
85
  SingleRoleComponent,
59
86
  SettingsComponent,
60
- RolesListComponent
87
+ UserRolesGridComponent,
88
+ SingleUserComponent,
89
+ SingleApplicationComponent,
90
+ ApplicationEntitiesGridComponent
61
91
  ]
62
92
  }]
63
93
  }], null, null); })();
64
94
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ExplorerSettingsModule, { declarations: [SingleRoleComponent,
65
95
  SettingsComponent,
66
- RolesListComponent], imports: [CommonModule,
96
+ UserRolesGridComponent,
97
+ SingleUserComponent,
98
+ SingleApplicationComponent,
99
+ ApplicationEntitiesGridComponent], imports: [CommonModule,
67
100
  GridModule,
68
101
  FormsModule,
69
102
  DialogsModule,
@@ -74,6 +107,15 @@ ExplorerSettingsModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [C
74
107
  IconsModule,
75
108
  DropDownsModule,
76
109
  EntityPermissionsModule,
77
- TabStripModule], exports: [SingleRoleComponent,
110
+ TabStripModule,
111
+ DialogsModule,
112
+ EntityFormDialogModule,
113
+ IndicatorsModule,
114
+ UserViewGridModule,
115
+ SimpleRecordListModule], exports: [SingleRoleComponent,
78
116
  SettingsComponent,
79
- RolesListComponent] }); })();
117
+ UserRolesGridComponent,
118
+ SingleUserComponent,
119
+ SingleApplicationComponent,
120
+ ApplicationEntitiesGridComponent] }); })();
121
+ i0.ɵɵsetComponentScope(SingleRoleComponent, [i1.NgIf, i2.FillContainer, i3.SVGIconComponent, i4.EntityPermissionsGridComponent, i5.TabStripComponent, i5.TabStripTabComponent, i5.TabContentDirective, i6.EntityFormDialog, i7.LoaderComponent, UserRolesGridComponent], []);
@@ -0,0 +1,41 @@
1
+ import { OnInit, EventEmitter } from '@angular/core';
2
+ import { BaseEntity } from '@memberjunction/core';
3
+ import { kendoSVGIcon } from '@memberjunction/ng-shared';
4
+ import { Router } from '@angular/router';
5
+ import * as i0 from "@angular/core";
6
+ export declare class RecordListComponent implements OnInit {
7
+ private router;
8
+ EntityName: string;
9
+ Columns: string[];
10
+ SortBy: string;
11
+ AllowDelete: boolean;
12
+ AllowNew: boolean;
13
+ AllowEdit: boolean;
14
+ /**
15
+ * If AllowEdit or AllowNew is true, this is the section name to display for editing a new or existing record.
16
+ */
17
+ EditSectionName: string;
18
+ RecordSelected: EventEmitter<BaseEntity>;
19
+ RecordEdited: EventEmitter<BaseEntity>;
20
+ RecordCreated: EventEmitter<BaseEntity>;
21
+ isLoading: boolean;
22
+ records: BaseEntity[];
23
+ kendoSVGIcon: typeof kendoSVGIcon;
24
+ constructor(router: Router);
25
+ ngOnInit(): void;
26
+ Refresh(): Promise<void>;
27
+ selectRecord(event: MouseEvent | undefined, r: BaseEntity): void;
28
+ deleteRecordDialogVisible: boolean;
29
+ deleteRecordItem: BaseEntity | null;
30
+ deleteRecord(event: MouseEvent, r: BaseEntity): Promise<void>;
31
+ closeDeleteDialog(result: 'Yes' | 'No'): Promise<void>;
32
+ editOrNewRecord: BaseEntity;
33
+ showEditOrNewRecordForm: boolean;
34
+ recordMode: 'new' | 'edit';
35
+ createNewRecord(): Promise<void>;
36
+ editRecord(event: MouseEvent, r: BaseEntity): Promise<void>;
37
+ onEditOrNewRecordFormClosed(result: 'Save' | 'Cancel'): Promise<void>;
38
+ getRecordName(r: BaseEntity): string;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecordListComponent, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<RecordListComponent, "mj-record-list", never, { "EntityName": { "alias": "EntityName"; "required": false; }; "Columns": { "alias": "Columns"; "required": false; }; "SortBy": { "alias": "SortBy"; "required": false; }; "AllowDelete": { "alias": "AllowDelete"; "required": false; }; "AllowNew": { "alias": "AllowNew"; "required": false; }; "AllowEdit": { "alias": "AllowEdit"; "required": false; }; "EditSectionName": { "alias": "EditSectionName"; "required": false; }; }, { "RecordSelected": "RecordSelected"; "RecordEdited": "RecordEdited"; "RecordCreated": "RecordCreated"; }, never, never, false, never>;
41
+ }
@@ -0,0 +1,324 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { Component, Input, EventEmitter, Output } from '@angular/core';
11
+ import { Metadata, RunView } from '@memberjunction/core';
12
+ import { SharedService, kendoSVGIcon } from '@memberjunction/ng-shared';
13
+ import * as i0 from "@angular/core";
14
+ import * as i1 from "@angular/router";
15
+ import * as i2 from "@angular/common";
16
+ import * as i3 from "@progress/kendo-angular-dialog";
17
+ import * as i4 from "@memberjunction/ng-container-directives";
18
+ import * as i5 from "@progress/kendo-angular-buttons";
19
+ import * as i6 from "@progress/kendo-angular-icons";
20
+ import * as i7 from "@memberjunction/ng-entity-form-dialog";
21
+ import * as i8 from "@progress/kendo-angular-indicators";
22
+ function RecordListComponent_div_3_Template(rf, ctx) { if (rf & 1) {
23
+ i0.ɵɵelementStart(0, "div");
24
+ i0.ɵɵelement(1, "kendo-loader");
25
+ i0.ɵɵelementEnd();
26
+ } }
27
+ function RecordListComponent_table_4_th_3_Template(rf, ctx) { if (rf & 1) {
28
+ i0.ɵɵelementStart(0, "th");
29
+ i0.ɵɵtext(1);
30
+ i0.ɵɵelementEnd();
31
+ } if (rf & 2) {
32
+ const c_r6 = ctx.$implicit;
33
+ i0.ɵɵadvance();
34
+ i0.ɵɵtextInterpolate1(" ", c_r6, " ");
35
+ } }
36
+ function RecordListComponent_table_4_tr_5_td_1_span_3_kendo_svgicon_1_Template(rf, ctx) { if (rf & 1) {
37
+ const _r16 = i0.ɵɵgetCurrentView();
38
+ i0.ɵɵelementStart(0, "kendo-svgicon", 12);
39
+ i0.ɵɵlistener("click", function RecordListComponent_table_4_tr_5_td_1_span_3_kendo_svgicon_1_Template_kendo_svgicon_click_0_listener($event) { i0.ɵɵrestoreView(_r16); const r_r7 = i0.ɵɵnextContext(3).$implicit; const ctx_r14 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r14.editRecord($event, r_r7)); });
40
+ i0.ɵɵelementEnd();
41
+ } if (rf & 2) {
42
+ const ctx_r12 = i0.ɵɵnextContext(5);
43
+ i0.ɵɵproperty("icon", ctx_r12.kendoSVGIcon("pencil"));
44
+ } }
45
+ function RecordListComponent_table_4_tr_5_td_1_span_3_kendo_svgicon_2_Template(rf, ctx) { if (rf & 1) {
46
+ const _r19 = i0.ɵɵgetCurrentView();
47
+ i0.ɵɵelementStart(0, "kendo-svgicon", 12);
48
+ i0.ɵɵlistener("click", function RecordListComponent_table_4_tr_5_td_1_span_3_kendo_svgicon_2_Template_kendo_svgicon_click_0_listener($event) { i0.ɵɵrestoreView(_r19); const r_r7 = i0.ɵɵnextContext(3).$implicit; const ctx_r17 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r17.deleteRecord($event, r_r7)); });
49
+ i0.ɵɵelementEnd();
50
+ } if (rf & 2) {
51
+ const ctx_r13 = i0.ɵɵnextContext(5);
52
+ i0.ɵɵproperty("icon", ctx_r13.kendoSVGIcon("trash"));
53
+ } }
54
+ function RecordListComponent_table_4_tr_5_td_1_span_3_Template(rf, ctx) { if (rf & 1) {
55
+ i0.ɵɵelementStart(0, "span");
56
+ i0.ɵɵtemplate(1, RecordListComponent_table_4_tr_5_td_1_span_3_kendo_svgicon_1_Template, 1, 1, "kendo-svgicon", 11)(2, RecordListComponent_table_4_tr_5_td_1_span_3_kendo_svgicon_2_Template, 1, 1, "kendo-svgicon", 11);
57
+ i0.ɵɵelementEnd();
58
+ } if (rf & 2) {
59
+ const ctx_r11 = i0.ɵɵnextContext(4);
60
+ i0.ɵɵadvance();
61
+ i0.ɵɵproperty("ngIf", ctx_r11.AllowEdit);
62
+ i0.ɵɵadvance();
63
+ i0.ɵɵproperty("ngIf", ctx_r11.AllowEdit);
64
+ } }
65
+ function RecordListComponent_table_4_tr_5_td_1_Template(rf, ctx) { if (rf & 1) {
66
+ i0.ɵɵelementStart(0, "td")(1, "span");
67
+ i0.ɵɵtext(2);
68
+ i0.ɵɵelementEnd();
69
+ i0.ɵɵtemplate(3, RecordListComponent_table_4_tr_5_td_1_span_3_Template, 3, 2, "span", 2);
70
+ i0.ɵɵelementEnd();
71
+ } if (rf & 2) {
72
+ const c_r9 = ctx.$implicit;
73
+ const i_r10 = ctx.index;
74
+ const r_r7 = i0.ɵɵnextContext().$implicit;
75
+ const ctx_r8 = i0.ɵɵnextContext(2);
76
+ i0.ɵɵadvance(2);
77
+ i0.ɵɵtextInterpolate(r_r7.Get(c_r9));
78
+ i0.ɵɵadvance();
79
+ i0.ɵɵproperty("ngIf", i_r10 === 0 && (ctx_r8.AllowDelete || ctx_r8.AllowEdit));
80
+ } }
81
+ function RecordListComponent_table_4_tr_5_Template(rf, ctx) { if (rf & 1) {
82
+ const _r22 = i0.ɵɵgetCurrentView();
83
+ i0.ɵɵelementStart(0, "tr", 10);
84
+ i0.ɵɵlistener("click", function RecordListComponent_table_4_tr_5_Template_tr_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r22); const r_r7 = restoredCtx.$implicit; const ctx_r21 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r21.selectRecord(undefined, r_r7)); });
85
+ i0.ɵɵtemplate(1, RecordListComponent_table_4_tr_5_td_1_Template, 4, 2, "td", 8);
86
+ i0.ɵɵelementEnd();
87
+ } if (rf & 2) {
88
+ const ctx_r5 = i0.ɵɵnextContext(2);
89
+ i0.ɵɵadvance();
90
+ i0.ɵɵproperty("ngForOf", ctx_r5.Columns);
91
+ } }
92
+ function RecordListComponent_table_4_Template(rf, ctx) { if (rf & 1) {
93
+ i0.ɵɵelementStart(0, "table", 7)(1, "thead")(2, "tr");
94
+ i0.ɵɵtemplate(3, RecordListComponent_table_4_th_3_Template, 2, 1, "th", 8);
95
+ i0.ɵɵelementEnd()();
96
+ i0.ɵɵelementStart(4, "tbody");
97
+ i0.ɵɵtemplate(5, RecordListComponent_table_4_tr_5_Template, 2, 1, "tr", 9);
98
+ i0.ɵɵelementEnd()();
99
+ } if (rf & 2) {
100
+ const ctx_r1 = i0.ɵɵnextContext();
101
+ i0.ɵɵadvance(3);
102
+ i0.ɵɵproperty("ngForOf", ctx_r1.Columns);
103
+ i0.ɵɵadvance(2);
104
+ i0.ɵɵproperty("ngForOf", ctx_r1.records);
105
+ } }
106
+ function RecordListComponent_kendo_dialog_7_Template(rf, ctx) { if (rf & 1) {
107
+ const _r24 = i0.ɵɵgetCurrentView();
108
+ i0.ɵɵelementStart(0, "kendo-dialog", 13);
109
+ i0.ɵɵlistener("close", function RecordListComponent_kendo_dialog_7_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r24); const ctx_r23 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r23.closeDeleteDialog("No")); });
110
+ i0.ɵɵelementStart(1, "div");
111
+ i0.ɵɵtext(2);
112
+ i0.ɵɵelementEnd();
113
+ i0.ɵɵelementStart(3, "kendo-dialog-actions")(4, "button", 14);
114
+ i0.ɵɵlistener("click", function RecordListComponent_kendo_dialog_7_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r24); const ctx_r25 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r25.closeDeleteDialog("Yes")); });
115
+ i0.ɵɵtext(5, "Yes");
116
+ i0.ɵɵelementEnd();
117
+ i0.ɵɵelementStart(6, "button", 1);
118
+ i0.ɵɵlistener("click", function RecordListComponent_kendo_dialog_7_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r24); const ctx_r26 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r26.closeDeleteDialog("No")); });
119
+ i0.ɵɵtext(7, "No");
120
+ i0.ɵɵelementEnd()()();
121
+ } if (rf & 2) {
122
+ const ctx_r3 = i0.ɵɵnextContext();
123
+ i0.ɵɵproperty("title", "Delete " + ctx_r3.EntityName + "?")("width", 450)("height", 200);
124
+ i0.ɵɵadvance(2);
125
+ i0.ɵɵtextInterpolate1(" Are you sure you want to delete '", ctx_r3.getRecordName(ctx_r3.deleteRecordItem), "'? ");
126
+ } }
127
+ export class RecordListComponent {
128
+ constructor(router) {
129
+ this.router = router;
130
+ this.EntityName = '';
131
+ this.Columns = [];
132
+ this.SortBy = '';
133
+ this.AllowDelete = true;
134
+ this.AllowNew = true;
135
+ this.AllowEdit = true;
136
+ /**
137
+ * If AllowEdit or AllowNew is true, this is the section name to display for editing a new or existing record.
138
+ */
139
+ this.EditSectionName = 'details';
140
+ this.RecordSelected = new EventEmitter();
141
+ this.RecordEdited = new EventEmitter();
142
+ this.RecordCreated = new EventEmitter();
143
+ this.isLoading = false;
144
+ this.records = [];
145
+ this.kendoSVGIcon = kendoSVGIcon;
146
+ this.deleteRecordDialogVisible = false;
147
+ this.showEditOrNewRecordForm = false;
148
+ this.recordMode = 'new';
149
+ }
150
+ ngOnInit() {
151
+ this.Refresh();
152
+ }
153
+ Refresh() {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ this.isLoading = true;
156
+ const md = new Metadata();
157
+ if (this.Columns.length === 0) {
158
+ // 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
159
+ const e = md.Entities.find(e => e.Name === this.EntityName);
160
+ if (e) {
161
+ if (e.Fields.length < 10)
162
+ this.Columns = e.Fields.map(f => f.Name);
163
+ else {
164
+ const defaultInViewColumns = e.Fields.filter(c => c.DefaultInView);
165
+ if (defaultInViewColumns.length > 0)
166
+ this.Columns = defaultInViewColumns.map(f => f.Name);
167
+ else
168
+ this.Columns = e.Fields.slice(0, 10).map(f => f.Name);
169
+ }
170
+ }
171
+ }
172
+ const rv = new RunView();
173
+ const result = yield rv.RunView({
174
+ EntityName: this.EntityName,
175
+ ResultType: 'entity_object'
176
+ });
177
+ if (result.Success) {
178
+ this.records = result.Results;
179
+ if (this.SortBy && this.SortBy.trim().length > 0) {
180
+ this.records.sort((a, b) => a.Get(this.SortBy).localeCompare(b.Get(this.SortBy)));
181
+ }
182
+ }
183
+ else {
184
+ throw new Error("Error loading records: " + result.ErrorMessage);
185
+ }
186
+ this.isLoading = false;
187
+ });
188
+ }
189
+ selectRecord(event, r) {
190
+ if (event)
191
+ event.stopPropagation(); // prevent row from getting click
192
+ this.RecordSelected.emit(r);
193
+ }
194
+ deleteRecord(event, r) {
195
+ return __awaiter(this, void 0, void 0, function* () {
196
+ // confirm with the user first
197
+ this.deleteRecordItem = r;
198
+ this.deleteRecordDialogVisible = true;
199
+ if (event)
200
+ event.stopPropagation(); // prevent row from getting click
201
+ });
202
+ }
203
+ closeDeleteDialog(result) {
204
+ return __awaiter(this, void 0, void 0, function* () {
205
+ // if the user confirms, delete the record
206
+ this.deleteRecordDialogVisible = false;
207
+ if (result === 'Yes') {
208
+ if (!(yield this.deleteRecordItem.Delete())) {
209
+ // show an error message
210
+ SharedService.Instance.CreateSimpleNotification('Error deleting record', 'error', 3000);
211
+ }
212
+ else
213
+ this.Refresh(); // refresh the list
214
+ }
215
+ this.deleteRecordItem = null;
216
+ });
217
+ }
218
+ createNewRecord() {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ // attempt to create a new record and if success, navigate to the new record
221
+ const md = new Metadata();
222
+ this.editOrNewRecord = yield md.GetEntityObject(this.EntityName);
223
+ if (this.editOrNewRecord) {
224
+ this.editOrNewRecord.NewRecord();
225
+ this.recordMode = 'new';
226
+ this.showEditOrNewRecordForm = true;
227
+ }
228
+ });
229
+ }
230
+ editRecord(event, r) {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ this.editOrNewRecord = r;
233
+ this.recordMode = 'edit';
234
+ this.showEditOrNewRecordForm = true;
235
+ if (event)
236
+ event.stopPropagation(); // prevent row from getting click
237
+ });
238
+ }
239
+ onEditOrNewRecordFormClosed(result) {
240
+ return __awaiter(this, void 0, void 0, function* () {
241
+ this.showEditOrNewRecordForm = false;
242
+ if (result === 'Save') {
243
+ // the dialog already saved the record, just check to make sure it was saved and if so, navigate
244
+ if (this.editOrNewRecord.IsSaved) {
245
+ if (this.recordMode === 'edit')
246
+ this.RecordEdited.emit(this.editOrNewRecord);
247
+ else
248
+ this.RecordCreated.emit(this.editOrNewRecord);
249
+ // refresh our grid now
250
+ yield this.Refresh();
251
+ }
252
+ else
253
+ throw new Error('Record was not saved');
254
+ }
255
+ });
256
+ }
257
+ getRecordName(r) {
258
+ // 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)
259
+ const md = new Metadata();
260
+ const e = md.Entities.find(e => e.Name === this.EntityName);
261
+ if (!e)
262
+ throw new Error('Entity not found: ' + this.EntityName);
263
+ const nameField = e.Fields.find(c => c.IsNameField);
264
+ if (nameField)
265
+ return r.Get(nameField.Name);
266
+ else {
267
+ const nameField = e.Fields.find(c => c.Name === 'Name');
268
+ if (nameField)
269
+ return r.Get("Name");
270
+ else {
271
+ // iterate through all primary keys and form a comma separated list
272
+ const pkString = r.PrimaryKeys.map(pk => r.Get(pk.Name)).join(', ');
273
+ return "Record: " + pkString;
274
+ }
275
+ }
276
+ }
277
+ }
278
+ RecordListComponent.ɵfac = function RecordListComponent_Factory(t) { return new (t || RecordListComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
279
+ RecordListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecordListComponent, selectors: [["mj-record-list"]], inputs: { EntityName: "EntityName", Columns: "Columns", SortBy: "SortBy", AllowDelete: "AllowDelete", AllowNew: "AllowNew", AllowEdit: "AllowEdit", EditSectionName: "EditSectionName" }, outputs: { RecordSelected: "RecordSelected", RecordEdited: "RecordEdited", RecordCreated: "RecordCreated" }, decls: 8, vars: 10, consts: [["mjFillContainer", "", 1, "wrapper"], ["kendoButton", "", 3, "click"], [4, "ngIf"], ["class", "grid", 4, "ngIf"], ["Mode", "section", 3, "Record", "SectionName", "Visible", "AutoRevertOnCancel", "HandleSave", "Width", "Height", "close"], ["entityForm", ""], [3, "title", "width", "height", "close", 4, "ngIf"], [1, "grid"], [4, "ngFor", "ngForOf"], [3, "click", 4, "ngFor", "ngForOf"], [3, "click"], ["class", "icon", 3, "icon", "click", 4, "ngIf"], [1, "icon", 3, "icon", "click"], [3, "title", "width", "height", "close"], ["kendoButton", "", "themeColor", "primary", 3, "click"]], template: function RecordListComponent_Template(rf, ctx) { if (rf & 1) {
280
+ i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
281
+ i0.ɵɵlistener("click", function RecordListComponent_Template_button_click_1_listener() { return ctx.createNewRecord(); });
282
+ i0.ɵɵtext(2, "New Record");
283
+ i0.ɵɵelementEnd();
284
+ i0.ɵɵtemplate(3, RecordListComponent_div_3_Template, 2, 0, "div", 2)(4, RecordListComponent_table_4_Template, 6, 2, "table", 3);
285
+ i0.ɵɵelementEnd();
286
+ i0.ɵɵelementStart(5, "mj-entity-form-dialog", 4, 5);
287
+ i0.ɵɵlistener("close", function RecordListComponent_Template_mj_entity_form_dialog_close_5_listener($event) { return ctx.onEditOrNewRecordFormClosed($event); });
288
+ i0.ɵɵelementEnd();
289
+ i0.ɵɵtemplate(7, RecordListComponent_kendo_dialog_7_Template, 8, 4, "kendo-dialog", 6);
290
+ } if (rf & 2) {
291
+ i0.ɵɵadvance(3);
292
+ i0.ɵɵproperty("ngIf", ctx.isLoading);
293
+ i0.ɵɵadvance();
294
+ i0.ɵɵproperty("ngIf", !ctx.isLoading);
295
+ i0.ɵɵadvance();
296
+ i0.ɵɵproperty("Record", ctx.editOrNewRecord)("SectionName", ctx.EditSectionName)("Visible", ctx.showEditOrNewRecordForm)("AutoRevertOnCancel", true)("HandleSave", true)("Width", 550)("Height", 450);
297
+ i0.ɵɵadvance(2);
298
+ i0.ɵɵproperty("ngIf", ctx.deleteRecordDialogVisible && ctx.deleteRecord);
299
+ } }, dependencies: [i2.NgForOf, i2.NgIf, i3.DialogComponent, i3.DialogActionsComponent, i4.FillContainer, i5.ButtonComponent, i6.SVGIconComponent, i7.EntityFormDialog, i8.LoaderComponent], styles: ["button[_ngcontent-%COMP%] {\r\n margin-left: 5px;\r\n margin-top: 5px;\r\n width: 125px;\r\n}\r\n\r\n.wrapper[_ngcontent-%COMP%] {\r\n padding-right: 10px;\r\n}\r\n\r\n\n\r\ntable[_ngcontent-%COMP%] {\r\n margin-left: 5px;\r\n margin-top: 10px;\r\n margin-right: 5px;\r\n border-collapse: collapse; \n\r\n width: 100%;\r\n}\r\n \r\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\r\n background-color: #f2f2f2; \n\r\n color: black; \n\r\n font-weight: bold; \n\r\n text-align: left;\r\n}\r\n\r\n\n\r\ntable[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\r\n height: 36px; \n\r\n padding: 0 8px; \n\r\n}\r\n\r\n\n\r\ntable[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child {\r\n display: flex; \n\r\n justify-content: space-between; \n\r\n align-items: center; \n\r\n padding-right: 8px; \n\r\n}\r\n\r\n\n\r\ntd[_ngcontent-%COMP%]:first-child span[_ngcontent-%COMP%]:first-child {\r\n border: none; \n\r\n}\r\n\r\n\n\r\ntd[_ngcontent-%COMP%]:first-child span[_ngcontent-%COMP%]:last-child {\r\n border: none; \n\r\n}\r\n\r\n\n\r\ntd[_ngcontent-%COMP%]:first-child .icon[_ngcontent-%COMP%] {\r\n margin-left: 10px; \n\r\n cursor: pointer; \n\r\n}\r\n\r\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] {\r\n cursor: pointer;\r\n}\r\n\r\ntable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover {\r\n background-color: #e7f4ff; \n\r\n}"] });
300
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RecordListComponent, [{
301
+ type: Component,
302
+ args: [{ selector: 'mj-record-list', template: "<div mjFillContainer class=\"wrapper\">\r\n <button kendoButton (click)=\"createNewRecord()\">New Record</button>\r\n <div *ngIf=\"isLoading\"><kendo-loader></kendo-loader></div>\r\n <table *ngIf=\"!isLoading\" class=\"grid\">\r\n <thead>\r\n <tr>\r\n <th *ngFor=\"let c of Columns\">\r\n {{ c }}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let r of records\" (click)=\"selectRecord(undefined, r)\">\r\n <td *ngFor=\"let c of Columns; let i = index\">\r\n <span>{{ r.Get(c) }}</span>\r\n <span *ngIf=\"i === 0 && (this.AllowDelete || this.AllowEdit)\">\r\n <kendo-svgicon *ngIf=\"this.AllowEdit\" class='icon' [icon]=\"kendoSVGIcon('pencil')\" (click)=\"editRecord($event, r)\"></kendo-svgicon> \r\n <kendo-svgicon *ngIf=\"this.AllowEdit\" class='icon' [icon]=\"kendoSVGIcon('trash')\" (click)=\"deleteRecord($event, r)\"></kendo-svgicon>\r\n </span>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n \r\n<mj-entity-form-dialog #entityForm \r\n [Record]=\"editOrNewRecord\" \r\n [SectionName]=\"EditSectionName\"\r\n Mode=\"section\" \r\n [Visible]=\"showEditOrNewRecordForm\" \r\n [AutoRevertOnCancel]=\"true\"\r\n [HandleSave]=\"true\"\r\n [Width]=\"550\"\r\n [Height]=\"450\"\r\n (close)=\"onEditOrNewRecordFormClosed($event)\">\r\n</mj-entity-form-dialog>\r\n\r\n<kendo-dialog\r\n *ngIf=\"deleteRecordDialogVisible && deleteRecord\" \r\n [title]=\"'Delete ' + EntityName + '?'\" \r\n [width]=\"450\"\r\n [height]=\"200\"\r\n (close)=\"closeDeleteDialog('No')\" >\r\n <div>\r\n Are you sure you want to delete '{{getRecordName(deleteRecordItem!)}}'?\r\n </div>\r\n <kendo-dialog-actions>\r\n <button kendoButton (click)=\"closeDeleteDialog('Yes')\" themeColor=\"primary\">Yes</button>\r\n <button kendoButton (click)=\"closeDeleteDialog('No')\">No</button>\r\n </kendo-dialog-actions>\r\n</kendo-dialog>", styles: ["button {\r\n margin-left: 5px;\r\n margin-top: 5px;\r\n width: 125px;\r\n}\r\n\r\n.wrapper {\r\n padding-right: 10px;\r\n}\r\n\r\n/* Style for the whole table */\r\ntable {\r\n margin-left: 5px;\r\n margin-top: 10px;\r\n margin-right: 5px;\r\n border-collapse: collapse; /* Ensures border collapse for a cleaner look */\r\n width: 100%;\r\n}\r\n \r\ntable th {\r\n background-color: #f2f2f2; /* Light gray background for headers */\r\n color: black; /* Black text color for headers */\r\n font-weight: bold; /* Bold font weight for headers */\r\n text-align: left;\r\n}\r\n\r\n/* Style for all table cells */\r\ntable th, table td {\r\n height: 36px; /* Fixed height for all rows */\r\n padding: 0 8px; /* Add some padding inside cells */\r\n}\r\n\r\n/* Style for the first column cells */\r\ntable td:first-child {\r\n display: flex; /* Make the cell a flex container */\r\n justify-content: space-between; /* Space out the text and icons */\r\n align-items: center; /* Center items vertically */\r\n padding-right: 8px; /* Ensure there is some padding on the right */\r\n}\r\n\r\n/* Style for the text span within the first column */\r\ntd:first-child span:first-child {\r\n border: none; /* Ensures no border is applied to the span */\r\n}\r\n\r\n/* Style for the icons container span within the first column */\r\ntd:first-child span:last-child {\r\n border: none; /* Ensures no border is applied to the span */\r\n}\r\n\r\n/* Style for the icons within the first column */\r\ntd:first-child .icon {\r\n margin-left: 10px; /* Space between icons if needed */\r\n cursor: pointer; /* Change cursor to pointer on hover */\r\n}\r\n\r\ntable tr {\r\n cursor: pointer;\r\n}\r\n\r\ntable tr:hover {\r\n background-color: #e7f4ff; /* Light blue for even rows */\r\n}\r\n "] }]
303
+ }], () => [{ type: i1.Router }], { EntityName: [{
304
+ type: Input
305
+ }], Columns: [{
306
+ type: Input
307
+ }], SortBy: [{
308
+ type: Input
309
+ }], AllowDelete: [{
310
+ type: Input
311
+ }], AllowNew: [{
312
+ type: Input
313
+ }], AllowEdit: [{
314
+ type: Input
315
+ }], EditSectionName: [{
316
+ type: Input
317
+ }], RecordSelected: [{
318
+ type: Output
319
+ }], RecordEdited: [{
320
+ type: Output
321
+ }], RecordCreated: [{
322
+ type: Output
323
+ }] }); })();
324
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecordListComponent, { className: "RecordListComponent", filePath: "src\\lib\\record-list\\record-list.component.ts", lineNumber: 13 }); })();
@@ -1,4 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
+ import { kendoSVGIcon } from '@memberjunction/ng-shared';
2
3
  import { RoleEntity } from '@memberjunction/core-entities';
3
4
  import { Router } from '@angular/router';
4
5
  import * as i0 from "@angular/core";
@@ -6,10 +7,19 @@ export declare class RolesListComponent implements OnInit {
6
7
  private router;
7
8
  isLoading: boolean;
8
9
  roles: RoleEntity[];
10
+ kendoSVGIcon: typeof kendoSVGIcon;
9
11
  constructor(router: Router);
10
12
  ngOnInit(): void;
11
13
  Refresh(): Promise<void>;
12
- selectRole(r: RoleEntity): void;
14
+ selectRole(event: MouseEvent | undefined, r: RoleEntity): void;
15
+ deleteRoleDialogVisible: boolean;
16
+ deleteRoleRecord: RoleEntity | null;
17
+ deleteRole(event: MouseEvent, r: RoleEntity): Promise<void>;
18
+ closeDeleteRoleDialog(result: 'Yes' | 'No'): Promise<void>;
19
+ newRoleRecord: RoleEntity;
20
+ showNewRoleForm: boolean;
21
+ createNewRole(): Promise<void>;
22
+ onNewRoleFormClosed(result: 'Save' | 'Cancel'): Promise<void>;
13
23
  static ɵfac: i0.ɵɵFactoryDeclaration<RolesListComponent, never>;
14
24
  static ɵcmp: i0.ɵɵComponentDeclaration<RolesListComponent, "mj-roles-list", never, {}, {}, never, never, false, never>;
15
25
  }