@memberjunction/ng-explorer-core 5.22.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.
Files changed (73) hide show
  1. package/dist/generated/lazy-feature-config.d.ts +1 -1
  2. package/dist/generated/lazy-feature-config.d.ts.map +1 -1
  3. package/dist/generated/lazy-feature-config.js +3 -2
  4. package/dist/generated/lazy-feature-config.js.map +1 -1
  5. package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +49 -49
  6. package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js.map +1 -1
  7. package/dist/lib/generic/form-toolbar.js +10 -10
  8. package/dist/lib/generic/form-toolbar.js.map +1 -1
  9. package/dist/lib/oauth/oauth-callback.component.js +6 -6
  10. package/dist/lib/oauth/oauth-callback.component.js.map +1 -1
  11. package/dist/lib/oauth/oauth.module.d.ts +2 -3
  12. package/dist/lib/oauth/oauth.module.d.ts.map +1 -1
  13. package/dist/lib/oauth/oauth.module.js +0 -4
  14. package/dist/lib/oauth/oauth.module.js.map +1 -1
  15. package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +6 -25
  16. package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
  17. package/dist/lib/resource-wrappers/chat-collections-resource.component.js +30 -124
  18. package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
  19. package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +7 -23
  20. package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
  21. package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +50 -142
  22. package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
  23. package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts +3 -19
  24. package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts.map +1 -1
  25. package/dist/lib/resource-wrappers/chat-tasks-resource.component.js +16 -98
  26. package/dist/lib/resource-wrappers/chat-tasks-resource.component.js.map +1 -1
  27. package/dist/lib/resource-wrappers/view-resource.component.d.ts +13 -11
  28. package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
  29. package/dist/lib/resource-wrappers/view-resource.component.js +80 -89
  30. package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
  31. package/dist/lib/shell/components/header/app-nav.component.d.ts.map +1 -1
  32. package/dist/lib/shell/components/header/app-nav.component.js +18 -3
  33. package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
  34. package/dist/lib/shell/components/tabs/component-cache-manager.d.ts +38 -16
  35. package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
  36. package/dist/lib/shell/components/tabs/component-cache-manager.js +57 -35
  37. package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
  38. package/dist/lib/shell/components/tabs/tab-container.component.d.ts +33 -0
  39. package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
  40. package/dist/lib/shell/components/tabs/tab-container.component.js +99 -16
  41. package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
  42. package/dist/lib/shell/services/settings-dialog.service.d.ts +8 -8
  43. package/dist/lib/shell/services/settings-dialog.service.d.ts.map +1 -1
  44. package/dist/lib/shell/services/settings-dialog.service.js +20 -26
  45. package/dist/lib/shell/services/settings-dialog.service.js.map +1 -1
  46. package/dist/lib/shell/shell.component.d.ts.map +1 -1
  47. package/dist/lib/shell/shell.component.js +17 -16
  48. package/dist/lib/shell/shell.component.js.map +1 -1
  49. package/dist/lib/shell/shell.module.d.ts +4 -5
  50. package/dist/lib/shell/shell.module.d.ts.map +1 -1
  51. package/dist/lib/shell/shell.module.js +4 -8
  52. package/dist/lib/shell/shell.module.js.map +1 -1
  53. package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +72 -71
  54. package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
  55. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +11 -11
  56. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js.map +1 -1
  57. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +36 -12
  58. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts.map +1 -1
  59. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +78 -50
  60. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js.map +1 -1
  61. package/dist/lib/single-dashboard/single-dashboard.component.d.ts +12 -5
  62. package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
  63. package/dist/lib/single-dashboard/single-dashboard.component.js +44 -55
  64. package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
  65. package/dist/lib/single-list-detail/single-list-detail.component.d.ts +10 -2
  66. package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -1
  67. package/dist/lib/single-list-detail/single-list-detail.component.js +313 -243
  68. package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
  69. package/dist/module.d.ts +23 -34
  70. package/dist/module.d.ts.map +1 -1
  71. package/dist/module.js +33 -74
  72. package/dist/module.js.map +1 -1
  73. package/package.json +37 -47
@@ -7,13 +7,12 @@ import * as i5 from "./components/dialogs/app-access-dialog.component";
7
7
  import * as i6 from "../command-palette/command-palette.component";
8
8
  import * as i7 from "@angular/common";
9
9
  import * as i8 from "@angular/forms";
10
- import * as i9 from "@progress/kendo-angular-dropdowns";
11
- import * as i10 from "@progress/kendo-angular-inputs";
12
- import * as i11 from "@memberjunction/ng-explorer-settings";
13
- import * as i12 from "@memberjunction/ng-shared-generic";
10
+ import * as i9 from "@memberjunction/ng-ui-components";
11
+ import * as i10 from "@memberjunction/ng-explorer-settings";
12
+ import * as i11 from "@memberjunction/ng-shared-generic";
14
13
  export declare class ShellModule {
15
14
  static ɵfac: i0.ɵɵFactoryDeclaration<ShellModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<ShellModule, [typeof i1.ShellComponent, typeof i2.AppSwitcherComponent, typeof i3.AppNavComponent, typeof i4.TabContainerComponent, typeof i5.AppAccessDialogComponent, typeof i6.CommandPaletteComponent], [typeof i7.CommonModule, typeof i8.FormsModule, typeof i9.DropDownsModule, typeof i10.InputsModule, typeof i11.ExplorerSettingsModule, typeof i12.SharedGenericModule], [typeof i1.ShellComponent]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ShellModule, [typeof i1.ShellComponent, typeof i2.AppSwitcherComponent, typeof i3.AppNavComponent, typeof i4.TabContainerComponent, typeof i5.AppAccessDialogComponent, typeof i6.CommandPaletteComponent], [typeof i7.CommonModule, typeof i8.FormsModule, typeof i9.MJDropdownComponent, typeof i10.ExplorerSettingsModule, typeof i11.SharedGenericModule], [typeof i1.ShellComponent]>;
17
16
  static ɵinj: i0.ɵɵInjectorDeclaration<ShellModule>;
18
17
  }
19
18
  //# sourceMappingURL=shell.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shell.module.d.ts","sourceRoot":"","sources":["../../../src/lib/shell/shell.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAeA,qBAwBa,WAAW;yCAAX,WAAW;0CAAX,WAAW;0CAAX,WAAW;CAAI"}
1
+ {"version":3,"file":"shell.module.d.ts","sourceRoot":"","sources":["../../../src/lib/shell/shell.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAcA,qBAuBa,WAAW;yCAAX,WAAW;0CAAX,WAAW;0CAAX,WAAW;CAAI"}
@@ -10,8 +10,7 @@ import { CommandPaletteComponent } from '../command-palette/command-palette.comp
10
10
  import { CommandPaletteService } from '../command-palette/command-palette.service';
11
11
  import { ExplorerSettingsModule } from '@memberjunction/ng-explorer-settings';
12
12
  import { SharedGenericModule } from '@memberjunction/ng-shared-generic';
13
- import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
14
- import { InputsModule } from '@progress/kendo-angular-inputs';
13
+ import { MJDropdownComponent } from '@memberjunction/ng-ui-components';
15
14
  import * as i0 from "@angular/core";
16
15
  export class ShellModule {
17
16
  static ɵfac = function ShellModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ShellModule)(); };
@@ -20,8 +19,7 @@ export class ShellModule {
20
19
  CommandPaletteService
21
20
  ], imports: [CommonModule,
22
21
  FormsModule,
23
- DropDownsModule,
24
- InputsModule,
22
+ MJDropdownComponent,
25
23
  ExplorerSettingsModule,
26
24
  SharedGenericModule] });
27
25
  }
@@ -39,8 +37,7 @@ export class ShellModule {
39
37
  imports: [
40
38
  CommonModule,
41
39
  FormsModule,
42
- DropDownsModule,
43
- InputsModule,
40
+ MJDropdownComponent,
44
41
  ExplorerSettingsModule,
45
42
  SharedGenericModule
46
43
  ],
@@ -59,8 +56,7 @@ export class ShellModule {
59
56
  AppAccessDialogComponent,
60
57
  CommandPaletteComponent], imports: [CommonModule,
61
58
  FormsModule,
62
- DropDownsModule,
63
- InputsModule,
59
+ MJDropdownComponent,
64
60
  ExplorerSettingsModule,
65
61
  SharedGenericModule], exports: [ShellComponent] }); })();
66
62
  //# sourceMappingURL=shell.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shell.module.js","sourceRoot":"","sources":["../../../src/lib/shell/shell.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;;AA0B9D,MAAM,OAAO,WAAW;qGAAX,WAAW;4DAAX,WAAW;iEAPX;YACT,qBAAqB;SACtB,YATC,YAAY;YACZ,WAAW;YACX,eAAe;YACf,YAAY;YACZ,sBAAsB;YACtB,mBAAmB;;iFASV,WAAW;cAxBvB,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,cAAc;oBACd,oBAAoB;oBACpB,eAAe;oBACf,qBAAqB;oBACrB,wBAAwB;oBACxB,uBAAuB;iBACxB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,eAAe;oBACf,YAAY;oBACZ,sBAAsB;oBACtB,mBAAmB;iBACpB;gBACD,SAAS,EAAE;oBACT,qBAAqB;iBACtB;gBACD,OAAO,EAAE;oBACP,cAAc;iBACf;aACF;;wFACY,WAAW,mBAtBpB,cAAc;QACd,oBAAoB;QACpB,eAAe;QACf,qBAAqB;QACrB,wBAAwB;QACxB,uBAAuB,aAGvB,YAAY;QACZ,WAAW;QACX,eAAe;QACf,YAAY;QACZ,sBAAsB;QACtB,mBAAmB,aAMnB,cAAc","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ShellComponent } from './shell.component';\nimport { AppSwitcherComponent } from './components/header/app-switcher.component';\nimport { AppNavComponent } from './components/header/app-nav.component';\nimport { TabContainerComponent } from './components/tabs/tab-container.component';\nimport { AppAccessDialogComponent } from './components/dialogs/app-access-dialog.component';\nimport { CommandPaletteComponent } from '../command-palette/command-palette.component';\nimport { CommandPaletteService } from '../command-palette/command-palette.service';\nimport { ExplorerSettingsModule } from '@memberjunction/ng-explorer-settings';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\nimport { DropDownsModule } from '@progress/kendo-angular-dropdowns';\nimport { InputsModule } from '@progress/kendo-angular-inputs';\n\n@NgModule({\n declarations: [\n ShellComponent,\n AppSwitcherComponent,\n AppNavComponent,\n TabContainerComponent,\n AppAccessDialogComponent,\n CommandPaletteComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n DropDownsModule,\n InputsModule,\n ExplorerSettingsModule,\n SharedGenericModule\n ],\n providers: [\n CommandPaletteService\n ],\n exports: [\n ShellComponent\n ]\n})\nexport class ShellModule { }\n"]}
1
+ {"version":3,"file":"shell.module.js","sourceRoot":"","sources":["../../../src/lib/shell/shell.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;;AAyBvE,MAAM,OAAO,WAAW;qGAAX,WAAW;4DAAX,WAAW;iEAPX;YACT,qBAAqB;SACtB,YARC,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,sBAAsB;YACtB,mBAAmB;;iFASV,WAAW;cAvBvB,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,cAAc;oBACd,oBAAoB;oBACpB,eAAe;oBACf,qBAAqB;oBACrB,wBAAwB;oBACxB,uBAAuB;iBACxB;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,mBAAmB;oBACnB,sBAAsB;oBACtB,mBAAmB;iBACpB;gBACD,SAAS,EAAE;oBACT,qBAAqB;iBACtB;gBACD,OAAO,EAAE;oBACP,cAAc;iBACf;aACF;;wFACY,WAAW,mBArBpB,cAAc;QACd,oBAAoB;QACpB,eAAe;QACf,qBAAqB;QACrB,wBAAwB;QACxB,uBAAuB,aAGvB,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,sBAAsB;QACtB,mBAAmB,aAMnB,cAAc","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ShellComponent } from './shell.component';\nimport { AppSwitcherComponent } from './components/header/app-switcher.component';\nimport { AppNavComponent } from './components/header/app-nav.component';\nimport { TabContainerComponent } from './components/tabs/tab-container.component';\nimport { AppAccessDialogComponent } from './components/dialogs/app-access-dialog.component';\nimport { CommandPaletteComponent } from '../command-palette/command-palette.component';\nimport { CommandPaletteService } from '../command-palette/command-palette.service';\nimport { ExplorerSettingsModule } from '@memberjunction/ng-explorer-settings';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\nimport { MJDropdownComponent } from '@memberjunction/ng-ui-components';\n\n@NgModule({\n declarations: [\n ShellComponent,\n AppSwitcherComponent,\n AppNavComponent,\n TabContainerComponent,\n AppAccessDialogComponent,\n CommandPaletteComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n MJDropdownComponent,\n ExplorerSettingsModule,\n SharedGenericModule\n ],\n providers: [\n CommandPaletteService\n ],\n exports: [\n ShellComponent\n ]\n})\nexport class ShellModule { }\n"]}
@@ -6,86 +6,86 @@ import { SharedService } from '@memberjunction/ng-shared';
6
6
  import * as i0 from "@angular/core";
7
7
  import * as i1 from "@memberjunction/ng-shared";
8
8
  import * as i2 from "@angular/forms";
9
- import * as i3 from "@progress/kendo-angular-dialog";
10
- import * as i4 from "@progress/kendo-angular-buttons";
11
- import * as i5 from "@progress/kendo-angular-label";
12
- import * as i6 from "@progress/kendo-angular-dropdowns";
13
- import * as i7 from "@memberjunction/ng-shared-generic";
14
- function AddItemComponent_Case_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
9
+ import * as i3 from "@memberjunction/ng-shared-generic";
10
+ import * as i4 from "@memberjunction/ng-ui-components";
11
+ function AddItemComponent_Case_8_Conditional_4_Template(rf, ctx) { if (rf & 1) {
15
12
  const _r3 = i0.ɵɵgetCurrentView();
16
- i0.ɵɵelementStart(0, "kendo-label", 11);
17
- i0.ɵɵelement(1, "br");
18
- i0.ɵɵelementStart(2, "kendo-dropdownlist", 4);
19
- i0.ɵɵlistener("valueChange", function AddItemComponent_Case_7_Conditional_3_Template_kendo_dropdownlist_valueChange_2_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onViewChange($event)); });
20
- i0.ɵɵtwoWayListener("ngModelChange", function AddItemComponent_Case_7_Conditional_3_Template_kendo_dropdownlist_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedView, $event) || (ctx_r1.selectedView = $event); return i0.ɵɵresetView($event); });
13
+ i0.ɵɵelementStart(0, "label");
14
+ i0.ɵɵtext(1, "Views ");
15
+ i0.ɵɵelement(2, "br");
16
+ i0.ɵɵelementStart(3, "mj-dropdown", 3);
17
+ i0.ɵɵlistener("ValueChange", function AddItemComponent_Case_8_Conditional_4_Template_mj_dropdown_ValueChange_3_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onViewChange($event)); });
18
+ i0.ɵɵtwoWayListener("ngModelChange", function AddItemComponent_Case_8_Conditional_4_Template_mj_dropdown_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedView, $event) || (ctx_r1.selectedView = $event); return i0.ɵɵresetView($event); });
21
19
  i0.ɵɵelementEnd()();
22
20
  } if (rf & 2) {
23
21
  const ctx_r1 = i0.ɵɵnextContext(2);
24
- i0.ɵɵadvance(2);
25
- i0.ɵɵproperty("data", ctx_r1.Views)("textField", "Name")("valueField", "ID");
22
+ i0.ɵɵadvance(3);
23
+ i0.ɵɵproperty("Data", ctx_r1.Views)("TextField", "Name")("ValueField", "ID");
26
24
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.selectedView);
27
25
  } }
28
- function AddItemComponent_Case_7_Conditional_4_Template(rf, ctx) { if (rf & 1) {
29
- i0.ɵɵelement(0, "mj-loading", 12);
26
+ function AddItemComponent_Case_8_Conditional_5_Template(rf, ctx) { if (rf & 1) {
27
+ i0.ɵɵelement(0, "mj-loading", 9);
30
28
  } if (rf & 2) {
31
29
  i0.ɵɵproperty("showText", false);
32
30
  } }
33
- function AddItemComponent_Case_7_Conditional_5_Template(rf, ctx) { if (rf & 1) {
34
- i0.ɵɵelementStart(0, "div", 13);
31
+ function AddItemComponent_Case_8_Conditional_6_Template(rf, ctx) { if (rf & 1) {
32
+ i0.ɵɵelementStart(0, "div", 10);
35
33
  i0.ɵɵtext(1, " No views available for this entity ");
36
34
  i0.ɵɵelementEnd();
37
35
  } }
38
- function AddItemComponent_Case_7_Template(rf, ctx) { if (rf & 1) {
36
+ function AddItemComponent_Case_8_Template(rf, ctx) { if (rf & 1) {
39
37
  const _r1 = i0.ɵɵgetCurrentView();
40
- i0.ɵɵelementStart(0, "kendo-label", 10);
41
- i0.ɵɵelement(1, "br");
42
- i0.ɵɵelementStart(2, "kendo-dropdownlist", 4);
43
- i0.ɵɵlistener("valueChange", function AddItemComponent_Case_7_Template_kendo_dropdownlist_valueChange_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onEntityChange($event)); });
44
- i0.ɵɵtwoWayListener("ngModelChange", function AddItemComponent_Case_7_Template_kendo_dropdownlist_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedEntity, $event) || (ctx_r1.selectedEntity = $event); return i0.ɵɵresetView($event); });
38
+ i0.ɵɵelementStart(0, "label");
39
+ i0.ɵɵtext(1, "Entity ");
40
+ i0.ɵɵelement(2, "br");
41
+ i0.ɵɵelementStart(3, "mj-dropdown", 3);
42
+ i0.ɵɵlistener("ValueChange", function AddItemComponent_Case_8_Template_mj_dropdown_ValueChange_3_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onEntityChange($event)); });
43
+ i0.ɵɵtwoWayListener("ngModelChange", function AddItemComponent_Case_8_Template_mj_dropdown_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedEntity, $event) || (ctx_r1.selectedEntity = $event); return i0.ɵɵresetView($event); });
45
44
  i0.ɵɵelementEnd()();
46
- i0.ɵɵconditionalCreate(3, AddItemComponent_Case_7_Conditional_3_Template, 3, 4, "kendo-label", 11);
47
- i0.ɵɵconditionalCreate(4, AddItemComponent_Case_7_Conditional_4_Template, 1, 1, "mj-loading", 12);
48
- i0.ɵɵconditionalCreate(5, AddItemComponent_Case_7_Conditional_5_Template, 2, 0, "div", 13);
45
+ i0.ɵɵconditionalCreate(4, AddItemComponent_Case_8_Conditional_4_Template, 4, 4, "label");
46
+ i0.ɵɵconditionalCreate(5, AddItemComponent_Case_8_Conditional_5_Template, 1, 1, "mj-loading", 9);
47
+ i0.ɵɵconditionalCreate(6, AddItemComponent_Case_8_Conditional_6_Template, 2, 0, "div", 10);
49
48
  } if (rf & 2) {
50
49
  const ctx_r1 = i0.ɵɵnextContext();
51
- i0.ɵɵadvance(2);
52
- i0.ɵɵproperty("data", ctx_r1.Entities)("textField", "Name")("valueField", "ID");
50
+ i0.ɵɵadvance(3);
51
+ i0.ɵɵproperty("Data", ctx_r1.Entities)("TextField", "Name")("ValueField", "ID");
53
52
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.selectedEntity);
54
53
  i0.ɵɵadvance();
55
- i0.ɵɵconditional(ctx_r1.selectedEntity && ctx_r1.Views.length ? 3 : -1);
54
+ i0.ɵɵconditional(ctx_r1.selectedEntity && ctx_r1.Views.length ? 4 : -1);
56
55
  i0.ɵɵadvance();
57
- i0.ɵɵconditional(ctx_r1.selectedEntity && !ctx_r1.Views.length && ctx_r1.showloader ? 4 : -1);
56
+ i0.ɵɵconditional(ctx_r1.selectedEntity && !ctx_r1.Views.length && ctx_r1.showloader ? 5 : -1);
58
57
  i0.ɵɵadvance();
59
- i0.ɵɵconditional(ctx_r1.selectedEntity && !ctx_r1.Views.length && !ctx_r1.showloader ? 5 : -1);
58
+ i0.ɵɵconditional(ctx_r1.selectedEntity && !ctx_r1.Views.length && !ctx_r1.showloader ? 6 : -1);
60
59
  } }
61
- function AddItemComponent_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
60
+ function AddItemComponent_Case_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
62
61
  const _r4 = i0.ɵɵgetCurrentView();
63
- i0.ɵɵelementStart(0, "kendo-label", 14);
64
- i0.ɵɵelement(1, "br");
65
- i0.ɵɵelementStart(2, "kendo-dropdownlist", 4);
66
- i0.ɵɵlistener("valueChange", function AddItemComponent_Case_8_Conditional_0_Template_kendo_dropdownlist_valueChange_2_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onViewChange($event)); });
67
- i0.ɵɵtwoWayListener("ngModelChange", function AddItemComponent_Case_8_Conditional_0_Template_kendo_dropdownlist_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedReport, $event) || (ctx_r1.selectedReport = $event); return i0.ɵɵresetView($event); });
62
+ i0.ɵɵelementStart(0, "label");
63
+ i0.ɵɵtext(1, "Reports ");
64
+ i0.ɵɵelement(2, "br");
65
+ i0.ɵɵelementStart(3, "mj-dropdown", 3);
66
+ i0.ɵɵlistener("ValueChange", function AddItemComponent_Case_9_Conditional_0_Template_mj_dropdown_ValueChange_3_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onViewChange($event)); });
67
+ i0.ɵɵtwoWayListener("ngModelChange", function AddItemComponent_Case_9_Conditional_0_Template_mj_dropdown_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedReport, $event) || (ctx_r1.selectedReport = $event); return i0.ɵɵresetView($event); });
68
68
  i0.ɵɵelementEnd()();
69
69
  } if (rf & 2) {
70
70
  const ctx_r1 = i0.ɵɵnextContext(2);
71
- i0.ɵɵadvance(2);
72
- i0.ɵɵproperty("data", ctx_r1.Reports)("textField", "Name")("valueField", "ID");
71
+ i0.ɵɵadvance(3);
72
+ i0.ɵɵproperty("Data", ctx_r1.Reports)("TextField", "Name")("ValueField", "ID");
73
73
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.selectedReport);
74
74
  } }
75
- function AddItemComponent_Case_8_Conditional_1_Template(rf, ctx) { if (rf & 1) {
76
- i0.ɵɵelement(0, "mj-loading", 12);
75
+ function AddItemComponent_Case_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
76
+ i0.ɵɵelement(0, "mj-loading", 9);
77
77
  } if (rf & 2) {
78
78
  i0.ɵɵproperty("showText", false);
79
79
  } }
80
- function AddItemComponent_Case_8_Conditional_2_Template(rf, ctx) { if (rf & 1) {
81
- i0.ɵɵelementStart(0, "div", 15);
80
+ function AddItemComponent_Case_9_Conditional_2_Template(rf, ctx) { if (rf & 1) {
81
+ i0.ɵɵelementStart(0, "div", 11);
82
82
  i0.ɵɵtext(1, " No reports available ");
83
83
  i0.ɵɵelementEnd();
84
84
  } }
85
- function AddItemComponent_Case_8_Template(rf, ctx) { if (rf & 1) {
86
- i0.ɵɵconditionalCreate(0, AddItemComponent_Case_8_Conditional_0_Template, 3, 4, "kendo-label", 14);
87
- i0.ɵɵconditionalCreate(1, AddItemComponent_Case_8_Conditional_1_Template, 1, 1, "mj-loading", 12);
88
- i0.ɵɵconditionalCreate(2, AddItemComponent_Case_8_Conditional_2_Template, 2, 0, "div", 15);
85
+ function AddItemComponent_Case_9_Template(rf, ctx) { if (rf & 1) {
86
+ i0.ɵɵconditionalCreate(0, AddItemComponent_Case_9_Conditional_0_Template, 4, 4, "label");
87
+ i0.ɵɵconditionalCreate(1, AddItemComponent_Case_9_Conditional_1_Template, 1, 1, "mj-loading", 9);
88
+ i0.ɵɵconditionalCreate(2, AddItemComponent_Case_9_Conditional_2_Template, 2, 0, "div", 11);
89
89
  } if (rf & 2) {
90
90
  const ctx_r1 = i0.ɵɵnextContext();
91
91
  i0.ɵɵconditional(ctx_r1.Reports.length ? 0 : -1);
@@ -198,42 +198,43 @@ export class AddItemComponent {
198
198
  this.onClose.emit();
199
199
  }
200
200
  static ɵfac = function AddItemComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AddItemComponent)(i0.ɵɵdirectiveInject(i1.SharedService)); };
201
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddItemComponent, selectors: [["app-add-item-dialog"]], inputs: { selectedResource: "selectedResource" }, outputs: { onClose: "onClose" }, standalone: false, decls: 15, vars: 9, consts: [[1, "k-overlay"], ["title", "Add Item to Dashboard", 1, "modal-body-wrap", 3, "close", "width", "minHeight", "minWidth", "resizable"], [1, "k-d-flex", "k-flex-col", "resource-wrap"], ["text", "Resource Type"], [3, "valueChange", "ngModelChange", "data", "textField", "valueField", "ngModel"], [1, "user-view-wrap"], [1, "k-actions", "k-actions-end", "popup-actions", "customBtn"], ["themeColor", "info", "kendoButton", "", 3, "click"], [1, "fa-solid", "fa-check"], ["themeColor", "info", "kendoButton", "", "fillMode", "outline", 3, "click"], ["text", "Entity"], ["text", "Views"], ["size", "medium", 3, "showText"], [1, "no-views-message"], ["text", "Reports"], [1, "no-items-message"]], template: function AddItemComponent_Template(rf, ctx) { if (rf & 1) {
201
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddItemComponent, selectors: [["app-add-item-dialog"]], inputs: { selectedResource: "selectedResource" }, outputs: { onClose: "onClose" }, standalone: false, decls: 16, vars: 10, consts: [[1, "k-overlay"], ["Title", "Add Item to Dashboard", 3, "Close", "Visible", "Width", "MinHeight", "MinWidth", "Resizable"], [1, "k-d-flex", "k-flex-col", "resource-wrap"], [3, "ValueChange", "ngModelChange", "Data", "TextField", "ValueField", "ngModel"], [1, "user-view-wrap"], [1, "k-actions", "k-actions-end", "popup-actions", "customBtn"], ["mjButton", "", "variant", "primary", 3, "click"], [1, "fa-solid", "fa-check"], ["mjButton", "", "variant", "outline", 3, "click"], ["size", "medium", 3, "showText"], [1, "no-views-message"], [1, "no-items-message"]], template: function AddItemComponent_Template(rf, ctx) { if (rf & 1) {
202
202
  i0.ɵɵelement(0, "div", 0);
203
- i0.ɵɵelementStart(1, "kendo-window", 1);
204
- i0.ɵɵlistener("close", function AddItemComponent_Template_kendo_window_close_1_listener() { return ctx.closeDialog(); });
205
- i0.ɵɵelementStart(2, "div", 2)(3, "kendo-label", 3);
206
- i0.ɵɵelement(4, "br");
207
- i0.ɵɵelementStart(5, "kendo-dropdownlist", 4);
208
- i0.ɵɵlistener("valueChange", function AddItemComponent_Template_kendo_dropdownlist_valueChange_5_listener($event) { return ctx.onResourceTypeChange($event); });
209
- i0.ɵɵtwoWayListener("ngModelChange", function AddItemComponent_Template_kendo_dropdownlist_ngModelChange_5_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.resourceType, $event) || (ctx.resourceType = $event); return $event; });
203
+ i0.ɵɵelementStart(1, "mj-window", 1);
204
+ i0.ɵɵlistener("Close", function AddItemComponent_Template_mj_window_Close_1_listener() { return ctx.closeDialog(); });
205
+ i0.ɵɵelementStart(2, "div", 2)(3, "label");
206
+ i0.ɵɵtext(4, "Resource Type ");
207
+ i0.ɵɵelement(5, "br");
208
+ i0.ɵɵelementStart(6, "mj-dropdown", 3);
209
+ i0.ɵɵlistener("ValueChange", function AddItemComponent_Template_mj_dropdown_ValueChange_6_listener($event) { return ctx.onResourceTypeChange($event); });
210
+ i0.ɵɵtwoWayListener("ngModelChange", function AddItemComponent_Template_mj_dropdown_ngModelChange_6_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.resourceType, $event) || (ctx.resourceType = $event); return $event; });
210
211
  i0.ɵɵelementEnd()();
211
- i0.ɵɵelementStart(6, "div", 5);
212
- i0.ɵɵconditionalCreate(7, AddItemComponent_Case_7_Template, 6, 7)(8, AddItemComponent_Case_8_Template, 3, 3);
212
+ i0.ɵɵelementStart(7, "div", 4);
213
+ i0.ɵɵconditionalCreate(8, AddItemComponent_Case_8_Template, 7, 7)(9, AddItemComponent_Case_9_Template, 3, 3);
213
214
  i0.ɵɵelementEnd()();
214
- i0.ɵɵelementStart(9, "div", 6)(10, "button", 7);
215
- i0.ɵɵlistener("click", function AddItemComponent_Template_button_click_10_listener() { return ctx.addItem(); });
216
- i0.ɵɵelement(11, "span", 8);
217
- i0.ɵɵtext(12, " Add ");
215
+ i0.ɵɵelementStart(10, "div", 5)(11, "button", 6);
216
+ i0.ɵɵlistener("click", function AddItemComponent_Template_button_click_11_listener() { return ctx.addItem(); });
217
+ i0.ɵɵelement(12, "span", 7);
218
+ i0.ɵɵtext(13, " Add ");
218
219
  i0.ɵɵelementEnd();
219
- i0.ɵɵelementStart(13, "button", 9);
220
- i0.ɵɵlistener("click", function AddItemComponent_Template_button_click_13_listener() { return ctx.closeDialog(); });
221
- i0.ɵɵtext(14, "Cancel");
220
+ i0.ɵɵelementStart(14, "button", 8);
221
+ i0.ɵɵlistener("click", function AddItemComponent_Template_button_click_14_listener() { return ctx.closeDialog(); });
222
+ i0.ɵɵtext(15, "Cancel");
222
223
  i0.ɵɵelementEnd()()();
223
224
  } if (rf & 2) {
224
- let tmp_8_0;
225
+ let tmp_9_0;
225
226
  i0.ɵɵadvance();
226
- i0.ɵɵproperty("width", 500)("minHeight", 300)("minWidth", 400)("resizable", true);
227
- i0.ɵɵadvance(4);
228
- i0.ɵɵproperty("data", ctx.ResourceTypes)("textField", "DisplayName")("valueField", "ID");
227
+ i0.ɵɵproperty("Visible", true)("Width", 500)("MinHeight", 300)("MinWidth", 400)("Resizable", true);
228
+ i0.ɵɵadvance(5);
229
+ i0.ɵɵproperty("Data", ctx.ResourceTypes)("TextField", "DisplayName")("ValueField", "ID");
229
230
  i0.ɵɵtwoWayProperty("ngModel", ctx.resourceType);
230
231
  i0.ɵɵadvance(2);
231
- i0.ɵɵconditional((tmp_8_0 = ctx.resourceType.Entity) === "MJ: User Views" ? 7 : tmp_8_0 === "Reports" ? 8 : -1);
232
- } }, dependencies: [i2.NgControlStatus, i2.NgModel, i3.WindowComponent, i4.ButtonComponent, i5.LabelComponent, i6.DropDownListComponent, i7.LoadingComponent], styles: [".popup-actions[_ngcontent-%COMP%] {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n}\n .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n}\n.resource-wrap[_ngcontent-%COMP%] {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.user-view-wrap[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n}\n .customBtn button {\n flex: 1;\n border-radius: 10px;\n line-height: 34px;\n}\n\n.no-items-message[_ngcontent-%COMP%], .no-views-message[_ngcontent-%COMP%] {\n padding: 12px;\n background-color: var(--mj-bg-surface-card);\n border-radius: 4px;\n color: var(--mj-text-muted);\n text-align: center;\n font-size: 14px;\n margin-top: 5px;\n border: 1px dashed var(--mj-border-default);\n}"] });
232
+ i0.ɵɵconditional((tmp_9_0 = ctx.resourceType.Entity) === "MJ: User Views" ? 8 : tmp_9_0 === "Reports" ? 9 : -1);
233
+ } }, dependencies: [i2.NgControlStatus, i2.NgModel, i3.LoadingComponent, i4.MJButtonDirective, i4.MJDropdownComponent, i4.MJWindowComponent], styles: [".popup-actions[_ngcontent-%COMP%] {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n}\n .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n}\n.resource-wrap[_ngcontent-%COMP%] {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.user-view-wrap[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n}\n .customBtn button {\n flex: 1;\n border-radius: 10px;\n line-height: 34px;\n}\n\n.no-items-message[_ngcontent-%COMP%], .no-views-message[_ngcontent-%COMP%] {\n padding: 12px;\n background-color: var(--mj-bg-surface-card);\n border-radius: 4px;\n color: var(--mj-text-muted);\n text-align: center;\n font-size: 14px;\n margin-top: 5px;\n border: 1px dashed var(--mj-border-default);\n}"] });
233
234
  }
234
235
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddItemComponent, [{
235
236
  type: Component,
236
- args: [{ standalone: false, selector: 'app-add-item-dialog', template: "<div class=\"k-overlay\"></div>\n<kendo-window class=\"modal-body-wrap\" [width]=\"500\" [minHeight]=\"300\" [minWidth]=\"400\" [resizable]=\"true\" (close)=\"closeDialog()\"\n title=\"Add Item to Dashboard\">\n <div class=\"k-d-flex k-flex-col resource-wrap\">\n <kendo-label text=\"Resource Type\">\n <br />\n <kendo-dropdownlist [data]=\"ResourceTypes\" [textField]=\"'DisplayName'\" [valueField]=\"'ID'\"\n (valueChange)=\"onResourceTypeChange($event)\" [(ngModel)]=\"resourceType\">\n </kendo-dropdownlist>\n </kendo-label>\n <div class=\"user-view-wrap\">\n @switch (resourceType.Entity ) {\n @case ('MJ: User Views') {\n <kendo-label text=\"Entity\">\n <br />\n <kendo-dropdownlist [data]=\"Entities\" [textField]=\"'Name'\" [valueField]=\"'ID'\"\n (valueChange)=\"onEntityChange($event)\" [(ngModel)]=\"selectedEntity\">\n </kendo-dropdownlist>\n </kendo-label>\n @if (selectedEntity && Views.length) {\n <kendo-label text=\"Views\">\n <br />\n <kendo-dropdownlist [data]=\"Views\" [textField]=\"'Name'\" [valueField]=\"'ID'\"\n (valueChange)=\"onViewChange($event)\" [(ngModel)]=\"selectedView\">\n </kendo-dropdownlist>\n </kendo-label>\n }\n @if (selectedEntity && !Views.length && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n @if (selectedEntity && !Views.length && !showloader) {\n <div class=\"no-views-message\">\n No views available for this entity\n </div>\n }\n }\n @case ('Reports') {\n @if (Reports.length) {\n <kendo-label text=\"Reports\">\n <br />\n <kendo-dropdownlist [data]=\"Reports\" [textField]=\"'Name'\" [valueField]=\"'ID'\"\n (valueChange)=\"onViewChange($event)\" [(ngModel)]=\"selectedReport\">\n </kendo-dropdownlist>\n </kendo-label>\n }\n @if (!Reports.length && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n @if (!Reports.length && !showloader) {\n <div class=\"no-items-message\">\n No reports available\n </div>\n }\n }\n }\n </div>\n </div>\n <div class=\"k-actions k-actions-end popup-actions customBtn\">\n <button themeColor=\"info\" kendoButton (click)=\"addItem()\">\n <span class=\"fa-solid fa-check\"></span> Add\n </button>\n <button themeColor=\"info\" kendoButton fillMode=\"outline\" (click)=\"closeDialog()\">Cancel</button>\n </div>\n</kendo-window>", styles: [".popup-actions {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n}\n::ng-deep .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n}\n.resource-wrap {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.user-view-wrap {\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n::ng-deep .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n::ng-deep .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n}\n::ng-deep .customBtn button {\n flex: 1;\n border-radius: 10px;\n line-height: 34px;\n}\n\n.no-items-message, .no-views-message {\n padding: 12px;\n background-color: var(--mj-bg-surface-card);\n border-radius: 4px;\n color: var(--mj-text-muted);\n text-align: center;\n font-size: 14px;\n margin-top: 5px;\n border: 1px dashed var(--mj-border-default);\n}\n"] }]
237
+ args: [{ standalone: false, selector: 'app-add-item-dialog', template: "<div class=\"k-overlay\"></div>\n<mj-window [Visible]=\"true\" [Width]=\"500\" [MinHeight]=\"300\" [MinWidth]=\"400\" [Resizable]=\"true\" (Close)=\"closeDialog()\"\n Title=\"Add Item to Dashboard\">\n <div class=\"k-d-flex k-flex-col resource-wrap\">\n <label>Resource Type\n <br />\n <mj-dropdown [Data]=\"ResourceTypes\" [TextField]=\"'DisplayName'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onResourceTypeChange($any($event))\" [(ngModel)]=\"resourceType\">\n </mj-dropdown>\n </label>\n <div class=\"user-view-wrap\">\n @switch (resourceType.Entity ) {\n @case ('MJ: User Views') {\n <label>Entity\n <br />\n <mj-dropdown [Data]=\"Entities\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onEntityChange($any($event))\" [(ngModel)]=\"selectedEntity\">\n </mj-dropdown>\n </label>\n @if (selectedEntity && Views.length) {\n <label>Views\n <br />\n <mj-dropdown [Data]=\"Views\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onViewChange($any($event))\" [(ngModel)]=\"selectedView\">\n </mj-dropdown>\n </label>\n }\n @if (selectedEntity && !Views.length && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n @if (selectedEntity && !Views.length && !showloader) {\n <div class=\"no-views-message\">\n No views available for this entity\n </div>\n }\n }\n @case ('Reports') {\n @if (Reports.length) {\n <label>Reports\n <br />\n <mj-dropdown [Data]=\"Reports\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onViewChange($any($event))\" [(ngModel)]=\"selectedReport\">\n </mj-dropdown>\n </label>\n }\n @if (!Reports.length && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n @if (!Reports.length && !showloader) {\n <div class=\"no-items-message\">\n No reports available\n </div>\n }\n }\n }\n </div>\n </div>\n <div class=\"k-actions k-actions-end popup-actions customBtn\">\n <button mjButton variant=\"primary\" (click)=\"addItem()\">\n <span class=\"fa-solid fa-check\"></span> Add\n </button>\n <button mjButton variant=\"outline\" (click)=\"closeDialog()\">Cancel</button>\n </div>\n</mj-window>\n", styles: [".popup-actions {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n}\n::ng-deep .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n}\n.resource-wrap {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.user-view-wrap {\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n::ng-deep .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n}\n::ng-deep .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n}\n::ng-deep .customBtn button {\n flex: 1;\n border-radius: 10px;\n line-height: 34px;\n}\n\n.no-items-message, .no-views-message {\n padding: 12px;\n background-color: var(--mj-bg-surface-card);\n border-radius: 4px;\n color: var(--mj-text-muted);\n text-align: center;\n font-size: 14px;\n margin-top: 5px;\n border: 1px dashed var(--mj-border-default);\n}\n"] }]
237
238
  }], () => [{ type: i1.SharedService }], { onClose: [{
238
239
  type: Output
239
240
  }], selectedResource: [{
@@ -1 +1 @@
1
- {"version":3,"file":"add-item.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.ts","../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAwB,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;;;;;;;;;;;ICgB9C,uCAA0B;IACxB,qBAAM;IACN,6CACkE;IAAhE,0NAAe,2BAAoB,KAAC;IAAC,qUAA0B;IAEnE,AADE,iBAAqB,EACT;;;IAHQ,eAAc;IAAsB,AAArB,AAAf,mCAAc,qBAAqB,oBAAoB;IACpC,mDAA0B;;;IAKnE,iCAA0D;;IAA9C,gCAAkB;;;IAG9B,+BAA8B;IAC5B,oDACF;IAAA,iBAAM;;;;IApBR,uCAA2B;IACzB,qBAAM;IACN,6CACsE;IAApE,2MAAe,6BAAsB,KAAC;IAAC,0TAA4B;IAEvE,AADE,iBAAqB,EACT;IACd,kGAAsC;IAQtC,iGAAqD;IAGrD,0FAAsD;;;IAfhC,eAAiB;IAAsB,AAArB,AAAlB,sCAAiB,qBAAqB,oBAAoB;IACrC,qDAA4B;IAGvE,cAOC;IAPD,uEAOC;IACD,cAEC;IAFD,6FAEC;IACD,cAIC;IAJD,8FAIC;;;;IAIC,uCAA4B;IAC1B,qBAAM;IACN,6CACoE;IAAlE,0NAAe,2BAAoB,KAAC;IAAC,yUAA4B;IAErE,AADE,iBAAqB,EACT;;;IAHQ,eAAgB;IAAsB,AAArB,AAAjB,qCAAgB,qBAAqB,oBAAoB;IACtC,qDAA4B;;;IA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AC,uBAAM;YAE3F,AADE,AADyF,iBAAS,EAC5F,EACO;;;YA9DuB,cAAa;YAAoC,AAAjB,AAAlB,AAAd,2BAAa,kBAAkB,iBAAiB,mBAAmB;YAK/E,eAAsB;YAA6B,AAA5B,AAAvB,wCAAsB,4BAA4B,oBAAoB;YAC3C,gDAA0B;YAIzE,eA2CC;YA3CD,yDAAA,gBAAgB,mBAAhB,SAAS,UA2CR;;;iFD1CM,gBAAgB;cAN5B,SAAS;6BACI,KAAK,YACP,qBAAqB;;kBAK9B,MAAM;;kBACN,KAAK;;kFAFK,gBAAgB","sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { MJResourceTypeEntity, ViewInfo} from '@memberjunction/core-entities';\nimport { ResourceData } from '@memberjunction/core-entities';\nimport { SharedService } from '@memberjunction/ng-shared';\n\n@Component({\n standalone: false,\n selector: 'app-add-item-dialog',\n templateUrl: './add-item.component.html',\n styleUrls: ['./add-item.component.css']\n})\nexport class AddItemComponent implements OnInit {\n @Output() onClose = new EventEmitter<any>();\n @Input() selectedResource!:MJResourceTypeEntity | null;\n public showloader: boolean = false;\n public resourceType: any = null;\n public selectedEntity: any = null;\n public selectedView: any = null;\n public selectedReport: any = null;\n public Entities: any[] = [];\n public Views: any[] = [];\n public Reports: any[] = [];\n public get ResourceTypes(): any[] {\n return SharedService.Instance.ResourceTypes.filter((rt: any) => rt.Name !== 'Dashboards' && rt.Name !== 'Records');\n }\n private md: Metadata = new Metadata();\n\n constructor(private sharedService: SharedService) { }\n\n ngOnInit(): void {\n this.resourceType = this.selectedResource || SharedService.Instance.ViewResourceType;\n this.onResourceTypeChange(this.resourceType);\n // Sort entities alphabetically by name\n this.Entities = [...this.md.Entities].sort((a, b) => \n a.Name.localeCompare(b.Name)\n );\n }\n\n async onResourceTypeChange(event: any) {\n this.resourceType = event;\n this.selectedEntity = null;\n if (this.resourceType.Name === 'Reports') {\n this.getReports();\n }\n }\n\n async getViews() {\n if (!this.selectedEntity) return;\n \n this.showloader = true;\n this.Views = await ViewInfo.GetViewsForUser(this.selectedEntity.ID);\n \n // Sort views alphabetically\n if (this.Views && this.Views.length) {\n this.Views = this.Views.sort((a, b) => a.Name.localeCompare(b.Name));\n }\n \n // Always set showloader to false when done, even if no views found\n this.showloader = false;\n }\n\n async getReports() {\n if (!this.resourceType) return;\n \n this.showloader = true;\n this.selectedReport = null;\n this.Reports = [];\n \n const rv = new RunView();\n const reports = await rv.RunView({ EntityName: this.resourceType.Entity, ExtraFilter: `UserID='${this.md.CurrentUser.ID}'` });\n \n if (reports.Success && reports.Results) {\n // Sort reports alphabetically\n this.Reports = reports.Results.sort((a, b) => a.Name.localeCompare(b.Name));\n }\n \n // Always set showloader to false when done, even if no reports found\n this.showloader = false;\n }\n\n onEntityChange(event: any) {\n this.selectedEntity = event;\n this.selectedView = null;\n this.selectedReport = null;\n this.getViews();\n }\n\n onViewChange(event: any) {\n if (this.resourceType.Name === 'Reports') {\n this.selectedReport = event;\n } else {\n this.selectedView = event;\n }\n }\n\n public addItem() {\n if (!this.selectedReport && !this.selectedView) {\n this.sharedService.CreateSimpleNotification('Please select an item to add', 'warning', 2000);\n return;\n }\n \n const name = this.selectedReport?.Name || this.selectedView?.Name;\n const id = this.selectedReport?.ID || this.selectedView?.ID;\n \n if (!id) {\n this.sharedService.CreateSimpleNotification('Invalid selection', 'error', 2000);\n return;\n }\n \n const dashboardItem = {\n title: name ? name : 'New Item - ' + id,\n col: 1,\n rowSpan: 3,\n colSpan: 2,\n ResourceData: new ResourceData({\n Name: name,\n ResourceType: this.resourceType.Name, // Add ResourceType\n ResourceTypeID: this.resourceType.ID,\n ResourceRecordID: id,\n Configuration: {}\n }),\n };\n \n this.sharedService.CreateSimpleNotification(`Added \"${name}\" to dashboard`, 'success', 2000);\n this.onClose.emit(dashboardItem);\n\n }\n\n closeDialog() {\n this.onClose.emit();\n }\n}\n","<div class=\"k-overlay\"></div>\n<kendo-window class=\"modal-body-wrap\" [width]=\"500\" [minHeight]=\"300\" [minWidth]=\"400\" [resizable]=\"true\" (close)=\"closeDialog()\"\n title=\"Add Item to Dashboard\">\n <div class=\"k-d-flex k-flex-col resource-wrap\">\n <kendo-label text=\"Resource Type\">\n <br />\n <kendo-dropdownlist [data]=\"ResourceTypes\" [textField]=\"'DisplayName'\" [valueField]=\"'ID'\"\n (valueChange)=\"onResourceTypeChange($event)\" [(ngModel)]=\"resourceType\">\n </kendo-dropdownlist>\n </kendo-label>\n <div class=\"user-view-wrap\">\n @switch (resourceType.Entity ) {\n @case ('MJ: User Views') {\n <kendo-label text=\"Entity\">\n <br />\n <kendo-dropdownlist [data]=\"Entities\" [textField]=\"'Name'\" [valueField]=\"'ID'\"\n (valueChange)=\"onEntityChange($event)\" [(ngModel)]=\"selectedEntity\">\n </kendo-dropdownlist>\n </kendo-label>\n @if (selectedEntity && Views.length) {\n <kendo-label text=\"Views\">\n <br />\n <kendo-dropdownlist [data]=\"Views\" [textField]=\"'Name'\" [valueField]=\"'ID'\"\n (valueChange)=\"onViewChange($event)\" [(ngModel)]=\"selectedView\">\n </kendo-dropdownlist>\n </kendo-label>\n }\n @if (selectedEntity && !Views.length && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n @if (selectedEntity && !Views.length && !showloader) {\n <div class=\"no-views-message\">\n No views available for this entity\n </div>\n }\n }\n @case ('Reports') {\n @if (Reports.length) {\n <kendo-label text=\"Reports\">\n <br />\n <kendo-dropdownlist [data]=\"Reports\" [textField]=\"'Name'\" [valueField]=\"'ID'\"\n (valueChange)=\"onViewChange($event)\" [(ngModel)]=\"selectedReport\">\n </kendo-dropdownlist>\n </kendo-label>\n }\n @if (!Reports.length && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n @if (!Reports.length && !showloader) {\n <div class=\"no-items-message\">\n No reports available\n </div>\n }\n }\n }\n </div>\n </div>\n <div class=\"k-actions k-actions-end popup-actions customBtn\">\n <button themeColor=\"info\" kendoButton (click)=\"addItem()\">\n <span class=\"fa-solid fa-check\"></span> Add\n </button>\n <button themeColor=\"info\" kendoButton fillMode=\"outline\" (click)=\"closeDialog()\">Cancel</button>\n </div>\n</kendo-window>"]}
1
+ {"version":3,"file":"add-item.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.ts","../../../../../src/lib/single-dashboard/Components/add-item/add-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAwB,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;;;;;;;;ICgB9C,6BAAO;IAAA,sBACL;IAAA,qBAAM;IACN,sCACwE;IAAtE,mNAAe,2BAA0B,KAAC;IAAC,8TAA0B;IAEzE,AADE,iBAAc,EACR;;;IAHO,eAAc;IAAsB,AAArB,AAAf,mCAAc,qBAAqB,oBAAoB;IACvB,mDAA0B;;;IAKzE,gCAA0D;;IAA9C,gCAAkB;;;IAG9B,+BAA8B;IAC5B,oDACF;IAAA,iBAAM;;;;IApBR,6BAAO;IAAA,uBACL;IAAA,qBAAM;IACN,sCAC4E;IAA1E,oMAAe,6BAA4B,KAAC;IAAC,mTAA4B;IAE7E,AADE,iBAAc,EACR;IACR,wFAAsC;IAQtC,gGAAqD;IAGrD,0FAAsD;;;IAfvC,eAAiB;IAAsB,AAArB,AAAlB,sCAAiB,qBAAqB,oBAAoB;IACxB,qDAA4B;IAG7E,cAOC;IAPD,uEAOC;IACD,cAEC;IAFD,6FAEC;IACD,cAIC;IAJD,8FAIC;;;;IAIC,6BAAO;IAAA,wBACL;IAAA,q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A0B,2CAwBP;YAoBzB,AADE,iBAAM,EACF;YAEJ,AADF,+BAA6D,iBACJ;YAApB,8FAAS,aAAS,IAAC;YACpD,2BAAuC;YAAC,sBAC1C;YAAA,iBAAS;YACT,kCAA2D;YAAxB,8FAAS,iBAAa,IAAC;YAAC,uBAAM;YAErE,AADE,AADmE,iBAAS,EACtE,EACI;;;YA9DD,cAAgB;YAAkD,AAAjB,AAAlB,AAAd,AAAjB,8BAAgB,cAAc,kBAAkB,iBAAiB,mBAAmB;YAK5E,eAAsB;YAA6B,AAA5B,AAAvB,wCAAsB,4BAA4B,oBAAoB;YAC9B,gDAA0B;YAI/E,eA2CC;YA3CD,yDAAA,gBAAgB,mBAAhB,SAAS,UA2CR;;;iFD1CM,gBAAgB;cAN5B,SAAS;6BACI,KAAK,YACP,qBAAqB;;kBAK9B,MAAM;;kBACN,KAAK;;kFAFK,gBAAgB","sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { MJResourceTypeEntity, ViewInfo} from '@memberjunction/core-entities';\nimport { ResourceData } from '@memberjunction/core-entities';\nimport { SharedService } from '@memberjunction/ng-shared';\n\n@Component({\n standalone: false,\n selector: 'app-add-item-dialog',\n templateUrl: './add-item.component.html',\n styleUrls: ['./add-item.component.css']\n})\nexport class AddItemComponent implements OnInit {\n @Output() onClose = new EventEmitter<any>();\n @Input() selectedResource!:MJResourceTypeEntity | null;\n public showloader: boolean = false;\n public resourceType: any = null;\n public selectedEntity: any = null;\n public selectedView: any = null;\n public selectedReport: any = null;\n public Entities: any[] = [];\n public Views: any[] = [];\n public Reports: any[] = [];\n public get ResourceTypes(): any[] {\n return SharedService.Instance.ResourceTypes.filter((rt: any) => rt.Name !== 'Dashboards' && rt.Name !== 'Records');\n }\n private md: Metadata = new Metadata();\n\n constructor(private sharedService: SharedService) { }\n\n ngOnInit(): void {\n this.resourceType = this.selectedResource || SharedService.Instance.ViewResourceType;\n this.onResourceTypeChange(this.resourceType);\n // Sort entities alphabetically by name\n this.Entities = [...this.md.Entities].sort((a, b) => \n a.Name.localeCompare(b.Name)\n );\n }\n\n async onResourceTypeChange(event: any) {\n this.resourceType = event;\n this.selectedEntity = null;\n if (this.resourceType.Name === 'Reports') {\n this.getReports();\n }\n }\n\n async getViews() {\n if (!this.selectedEntity) return;\n \n this.showloader = true;\n this.Views = await ViewInfo.GetViewsForUser(this.selectedEntity.ID);\n \n // Sort views alphabetically\n if (this.Views && this.Views.length) {\n this.Views = this.Views.sort((a, b) => a.Name.localeCompare(b.Name));\n }\n \n // Always set showloader to false when done, even if no views found\n this.showloader = false;\n }\n\n async getReports() {\n if (!this.resourceType) return;\n \n this.showloader = true;\n this.selectedReport = null;\n this.Reports = [];\n \n const rv = new RunView();\n const reports = await rv.RunView({ EntityName: this.resourceType.Entity, ExtraFilter: `UserID='${this.md.CurrentUser.ID}'` });\n \n if (reports.Success && reports.Results) {\n // Sort reports alphabetically\n this.Reports = reports.Results.sort((a, b) => a.Name.localeCompare(b.Name));\n }\n \n // Always set showloader to false when done, even if no reports found\n this.showloader = false;\n }\n\n onEntityChange(event: any) {\n this.selectedEntity = event;\n this.selectedView = null;\n this.selectedReport = null;\n this.getViews();\n }\n\n onViewChange(event: any) {\n if (this.resourceType.Name === 'Reports') {\n this.selectedReport = event;\n } else {\n this.selectedView = event;\n }\n }\n\n public addItem() {\n if (!this.selectedReport && !this.selectedView) {\n this.sharedService.CreateSimpleNotification('Please select an item to add', 'warning', 2000);\n return;\n }\n \n const name = this.selectedReport?.Name || this.selectedView?.Name;\n const id = this.selectedReport?.ID || this.selectedView?.ID;\n \n if (!id) {\n this.sharedService.CreateSimpleNotification('Invalid selection', 'error', 2000);\n return;\n }\n \n const dashboardItem = {\n title: name ? name : 'New Item - ' + id,\n col: 1,\n rowSpan: 3,\n colSpan: 2,\n ResourceData: new ResourceData({\n Name: name,\n ResourceType: this.resourceType.Name, // Add ResourceType\n ResourceTypeID: this.resourceType.ID,\n ResourceRecordID: id,\n Configuration: {}\n }),\n };\n \n this.sharedService.CreateSimpleNotification(`Added \"${name}\" to dashboard`, 'success', 2000);\n this.onClose.emit(dashboardItem);\n\n }\n\n closeDialog() {\n this.onClose.emit();\n }\n}\n","<div class=\"k-overlay\"></div>\n<mj-window [Visible]=\"true\" [Width]=\"500\" [MinHeight]=\"300\" [MinWidth]=\"400\" [Resizable]=\"true\" (Close)=\"closeDialog()\"\n Title=\"Add Item to Dashboard\">\n <div class=\"k-d-flex k-flex-col resource-wrap\">\n <label>Resource Type\n <br />\n <mj-dropdown [Data]=\"ResourceTypes\" [TextField]=\"'DisplayName'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onResourceTypeChange($any($event))\" [(ngModel)]=\"resourceType\">\n </mj-dropdown>\n </label>\n <div class=\"user-view-wrap\">\n @switch (resourceType.Entity ) {\n @case ('MJ: User Views') {\n <label>Entity\n <br />\n <mj-dropdown [Data]=\"Entities\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onEntityChange($any($event))\" [(ngModel)]=\"selectedEntity\">\n </mj-dropdown>\n </label>\n @if (selectedEntity && Views.length) {\n <label>Views\n <br />\n <mj-dropdown [Data]=\"Views\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onViewChange($any($event))\" [(ngModel)]=\"selectedView\">\n </mj-dropdown>\n </label>\n }\n @if (selectedEntity && !Views.length && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n @if (selectedEntity && !Views.length && !showloader) {\n <div class=\"no-views-message\">\n No views available for this entity\n </div>\n }\n }\n @case ('Reports') {\n @if (Reports.length) {\n <label>Reports\n <br />\n <mj-dropdown [Data]=\"Reports\" [TextField]=\"'Name'\" [ValueField]=\"'ID'\"\n (ValueChange)=\"onViewChange($any($event))\" [(ngModel)]=\"selectedReport\">\n </mj-dropdown>\n </label>\n }\n @if (!Reports.length && showloader) {\n <mj-loading [showText]=\"false\" size=\"medium\"></mj-loading>\n }\n @if (!Reports.length && !showloader) {\n <div class=\"no-items-message\">\n No reports available\n </div>\n }\n }\n }\n </div>\n </div>\n <div class=\"k-actions k-actions-end popup-actions customBtn\">\n <button mjButton variant=\"primary\" (click)=\"addItem()\">\n <span class=\"fa-solid fa-check\"></span> Add\n </button>\n <button mjButton variant=\"outline\" (click)=\"closeDialog()\">Cancel</button>\n </div>\n</mj-window>\n"]}
@@ -1,7 +1,6 @@
1
1
  import { Component, EventEmitter, Input, Output } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- import * as i1 from "@progress/kendo-angular-dialog";
4
- import * as i2 from "@progress/kendo-angular-buttons";
3
+ import * as i1 from "@memberjunction/ng-ui-components";
5
4
  export class DeleteItemComponent {
6
5
  onClose = new EventEmitter();
7
6
  removeDashboardItem = new EventEmitter();
@@ -21,9 +20,9 @@ export class DeleteItemComponent {
21
20
  this.onClose.emit();
22
21
  }
23
22
  static ɵfac = function DeleteItemComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DeleteItemComponent)(); };
24
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DeleteItemComponent, selectors: [["app-delete-item-dialog"]], inputs: { dashboardItem: "dashboardItem" }, outputs: { onClose: "onClose", removeDashboardItem: "removeDashboardItem" }, standalone: false, decls: 13, vars: 1, consts: [[1, "modal-body-wrap", 3, "close"], [1, "k-m-7.5", "k-text-center"], [1, "k-actions", "k-actions-end", "popup-actions"], ["kendoButton", "", "themeColor", "primary", 3, "click"], [1, "fa-solid", "fa-check"], ["kendoButton", "", 3, "click"], [1, "fa-solid", "fa-xmark"]], template: function DeleteItemComponent_Template(rf, ctx) { if (rf & 1) {
25
- i0.ɵɵelementStart(0, "kendo-dialog", 0);
26
- i0.ɵɵlistener("close", function DeleteItemComponent_Template_kendo_dialog_close_0_listener() { return ctx.closeDialog(); });
23
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DeleteItemComponent, selectors: [["app-delete-item-dialog"]], inputs: { dashboardItem: "dashboardItem" }, outputs: { onClose: "onClose", removeDashboardItem: "removeDashboardItem" }, standalone: false, decls: 13, vars: 2, consts: [[3, "Close", "Visible"], [1, "k-m-7.5", "k-text-center"], ["mjButton", "", "variant", "primary", 3, "click"], [1, "fa-solid", "fa-check"], ["mjButton", "", 3, "click"], [1, "fa-solid", "fa-xmark"]], template: function DeleteItemComponent_Template(rf, ctx) { if (rf & 1) {
24
+ i0.ɵɵelementStart(0, "mj-dialog", 0);
25
+ i0.ɵɵlistener("Close", function DeleteItemComponent_Template_mj_dialog_Close_0_listener() { return ctx.closeDialog(); });
27
26
  i0.ɵɵelementStart(1, "p", 1);
28
27
  i0.ɵɵtext(2, " Are you sure you want to delete ");
29
28
  i0.ɵɵelementStart(3, "b");
@@ -31,24 +30,25 @@ export class DeleteItemComponent {
31
30
  i0.ɵɵelementEnd();
32
31
  i0.ɵɵtext(5, "? ");
33
32
  i0.ɵɵelementEnd();
34
- i0.ɵɵelementStart(6, "div", 2)(7, "button", 3);
33
+ i0.ɵɵelementStart(6, "mj-dialog-actions")(7, "button", 2);
35
34
  i0.ɵɵlistener("click", function DeleteItemComponent_Template_button_click_7_listener() { return ctx.confirmDeleteItem(); });
36
- i0.ɵɵelement(8, "span", 4);
35
+ i0.ɵɵelement(8, "span", 3);
37
36
  i0.ɵɵtext(9, " Yes ");
38
37
  i0.ɵɵelementEnd();
39
- i0.ɵɵelementStart(10, "button", 5);
38
+ i0.ɵɵelementStart(10, "button", 4);
40
39
  i0.ɵɵlistener("click", function DeleteItemComponent_Template_button_click_10_listener() { return ctx.closeDialog(); });
41
- i0.ɵɵelement(11, "span", 6);
40
+ i0.ɵɵelement(11, "span", 5);
42
41
  i0.ɵɵtext(12, " No ");
43
42
  i0.ɵɵelementEnd()()();
44
43
  } if (rf & 2) {
44
+ i0.ɵɵproperty("Visible", true);
45
45
  i0.ɵɵadvance(4);
46
46
  i0.ɵɵtextInterpolate(ctx.dashboardItem == null ? null : ctx.dashboardItem.title);
47
- } }, dependencies: [i1.DialogComponent, i2.ButtonComponent], styles: [".popup-actions[_ngcontent-%COMP%] {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n }\n .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n }\n .resource-wrap[_ngcontent-%COMP%] {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n .user-view-wrap[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n }\n .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n }"] });
47
+ } }, dependencies: [i1.MJButtonDirective, i1.MJDialogComponent, i1.MJDialogActionsComponent], styles: [".popup-actions[_ngcontent-%COMP%] {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n }\n .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n }\n .resource-wrap[_ngcontent-%COMP%] {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n .user-view-wrap[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n }\n .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n }"] });
48
48
  }
49
49
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DeleteItemComponent, [{
50
50
  type: Component,
51
- args: [{ standalone: false, selector: 'app-delete-item-dialog', template: "<kendo-dialog class=\"modal-body-wrap\" (close)=\"closeDialog()\">\n <p class=\"k-m-7.5 k-text-center\">\n Are you sure you want to delete <b>{{dashboardItem?.title}}</b>?\n </p>\n <div class=\"k-actions k-actions-end popup-actions\">\n <button kendoButton (click)=\"confirmDeleteItem()\" themeColor=\"primary\">\n <span class=\"fa-solid fa-check\"></span> Yes\n </button>\n <button kendoButton (click)=\"closeDialog()\">\n <span class=\"fa-solid fa-xmark\"></span> No\n </button>\n </div>\n</kendo-dialog>", styles: [".popup-actions {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n }\n ::ng-deep .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n }\n .resource-wrap {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n .user-view-wrap {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n ::ng-deep .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n }\n ::ng-deep .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n }\n"] }]
51
+ args: [{ standalone: false, selector: 'app-delete-item-dialog', template: "<mj-dialog [Visible]=\"true\" (Close)=\"closeDialog()\">\n <p class=\"k-m-7.5 k-text-center\">\n Are you sure you want to delete <b>{{dashboardItem?.title}}</b>?\n </p>\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"confirmDeleteItem()\">\n <span class=\"fa-solid fa-check\"></span> Yes\n </button>\n <button mjButton (click)=\"closeDialog()\">\n <span class=\"fa-solid fa-xmark\"></span> No\n </button>\n </mj-dialog-actions>\n</mj-dialog>\n", styles: [".popup-actions {\n width: 100%;\n padding: 10px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n }\n ::ng-deep .modal-body-wrap .k-window-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n flex: 1;\n padding: 0;\n }\n .resource-wrap {\n flex: 1;\n padding: 24px;\n margin: 16px;\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n .user-view-wrap {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n ::ng-deep .resource-wrap .k-label {\n color: var(--mj-text-secondary);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n }\n ::ng-deep .resource-wrap .k-dropdownlist {\n border-radius: 4px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: transparent;\n line-height: 32px;\n margin: 0;\n }\n"] }]
52
52
  }], null, { onClose: [{
53
53
  type: Output
54
54
  }], removeDashboardItem: [{
@@ -1 +1 @@
1
- {"version":3,"file":"delete-item.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.ts","../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;;;;AAS/E,MAAM,OAAO,mBAAmB;IACpB,OAAO,GAAG,IAAI,YAAY,EAAO,CAAC;IAClC,mBAAmB,GAAG,IAAI,YAAY,EAAO,CAAC;IAC/C,aAAa,CAAyB;IAE/C,QAAQ;IAER,CAAC;IAEM,iBAAiB;QACtB,IAAG,IAAI,CAAC,aAAa,EAAC,CAAC;YACrB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACpD,CAAC;aACG,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC9B,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;6GAtBU,mBAAmB;6DAAnB,mBAAmB;YCThC,uCAA8D;YAAxB,sGAAS,iBAAa,IAAC;YACzD,4BAAiC;YAC7B,iDAAgC;YAAA,yBAAG;YAAA,YAAwB;YAAA,iBAAI;YAAA,kBACnE;YAAA,iBAAI;YAEA,AADJ,8BAAmD,gBACwB;YAAnD,gGAAS,uBAAmB,IAAC;YAC7C,0BAAuC;YAAC,qBAC5C;YAAA,iBAAS;YACT,kCAA4C;YAAxB,iGAAS,iBAAa,IAAC;YACvC,2BAAuC;YAAC,qBAC5C;YAER,AADI,AADI,iBAAS,EACP,EACK;;YAV4B,eAAwB;YAAxB,gFAAwB;;;iFDOtD,mBAAmB;cAN/B,SAAS;6BACI,KAAK,YACP,wBAAwB;;kBAKjC,MAAM;;kBACN,MAAM;;kBACN,KAAK;;kFAHK,mBAAmB","sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { DashboardItem } from '../../single-dashboard.component';\n\n@Component({\n standalone: false,\n selector: 'app-delete-item-dialog',\n templateUrl: './delete-item.component.html',\n styleUrls: ['./delete-item.component.css']\n})\nexport class DeleteItemComponent implements OnInit {\n @Output() onClose = new EventEmitter<any>();\n @Output() removeDashboardItem = new EventEmitter<any>();\n @Input() dashboardItem! : DashboardItem | null;\n\n ngOnInit(): void {\n\n }\n\n public confirmDeleteItem(): void {\n if(this.dashboardItem){\n this.removeDashboardItem.emit(this.dashboardItem);\n }\n else{\n console.log(\"item is null\");\n }\n\n this.onClose.emit();\n }\n\n public closeDialog(): void {\n this.onClose.emit();\n }\n}\n","<kendo-dialog class=\"modal-body-wrap\" (close)=\"closeDialog()\">\n <p class=\"k-m-7.5 k-text-center\">\n Are you sure you want to delete <b>{{dashboardItem?.title}}</b>?\n </p>\n <div class=\"k-actions k-actions-end popup-actions\">\n <button kendoButton (click)=\"confirmDeleteItem()\" themeColor=\"primary\">\n <span class=\"fa-solid fa-check\"></span> Yes\n </button>\n <button kendoButton (click)=\"closeDialog()\">\n <span class=\"fa-solid fa-xmark\"></span> No\n </button>\n </div>\n</kendo-dialog>"]}
1
+ {"version":3,"file":"delete-item.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.ts","../../../../../src/lib/single-dashboard/Components/delete-item/delete-item.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;;;AAS/E,MAAM,OAAO,mBAAmB;IACpB,OAAO,GAAG,IAAI,YAAY,EAAO,CAAC;IAClC,mBAAmB,GAAG,IAAI,YAAY,EAAO,CAAC;IAC/C,aAAa,CAAyB;IAE/C,QAAQ;IAER,CAAC;IAEM,iBAAiB;QACtB,IAAG,IAAI,CAAC,aAAa,EAAC,CAAC;YACrB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACpD,CAAC;aACG,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC9B,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;6GAtBU,mBAAmB;6DAAnB,mBAAmB;YCThC,oCAAoD;YAAxB,mGAAS,iBAAa,IAAC;YAC/C,4BAAiC;YAC7B,iDAAgC;YAAA,yBAAG;YAAA,YAAwB;YAAA,iBAAI;YAAA,kBACnE;YAAA,iBAAI;YAEA,AADJ,yCAAmB,gBACkD;YAA9B,gGAAS,uBAAmB,IAAC;YAC5D,0BAAuC;YAAC,qBAC5C;YAAA,iBAAS;YACT,kCAAyC;YAAxB,iGAAS,iBAAa,IAAC;YACpC,2BAAuC;YAAC,qBAC5C;YAER,AADI,AADI,iBAAS,EACO,EACZ;;YAZD,8BAAgB;YAEgB,eAAwB;YAAxB,gFAAwB;;;iFDOtD,mBAAmB;cAN/B,SAAS;6BACI,KAAK,YACP,wBAAwB;;kBAKjC,MAAM;;kBACN,MAAM;;kBACN,KAAK;;kFAHK,mBAAmB","sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { DashboardItem } from '../../single-dashboard.component';\n\n@Component({\n standalone: false,\n selector: 'app-delete-item-dialog',\n templateUrl: './delete-item.component.html',\n styleUrls: ['./delete-item.component.css']\n})\nexport class DeleteItemComponent implements OnInit {\n @Output() onClose = new EventEmitter<any>();\n @Output() removeDashboardItem = new EventEmitter<any>();\n @Input() dashboardItem! : DashboardItem | null;\n\n ngOnInit(): void {\n\n }\n\n public confirmDeleteItem(): void {\n if(this.dashboardItem){\n this.removeDashboardItem.emit(this.dashboardItem);\n }\n else{\n console.log(\"item is null\");\n }\n\n this.onClose.emit();\n }\n\n public closeDialog(): void {\n this.onClose.emit();\n }\n}\n","<mj-dialog [Visible]=\"true\" (Close)=\"closeDialog()\">\n <p class=\"k-m-7.5 k-text-center\">\n Are you sure you want to delete <b>{{dashboardItem?.title}}</b>?\n </p>\n <mj-dialog-actions>\n <button mjButton variant=\"primary\" (click)=\"confirmDeleteItem()\">\n <span class=\"fa-solid fa-check\"></span> Yes\n </button>\n <button mjButton (click)=\"closeDialog()\">\n <span class=\"fa-solid fa-xmark\"></span> No\n </button>\n </mj-dialog-actions>\n</mj-dialog>\n"]}
@@ -1,26 +1,50 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { TileLayoutReorderEvent, TileLayoutResizeEvent } from '@progress/kendo-angular-layout';
3
2
  import { DashboardConfigDetails, DashboardItem } from '../../single-dashboard.component';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class EditDashboardComponent {
6
- onSave: EventEmitter<any>;
7
- onClose: EventEmitter<any>;
8
- triggerAddItem: EventEmitter<any>;
5
+ onSave: EventEmitter<{
6
+ itemsChanged: boolean;
7
+ items: DashboardItem[];
8
+ config: DashboardConfigDetails;
9
+ }>;
10
+ onClose: EventEmitter<void>;
11
+ triggerAddItem: EventEmitter<{
12
+ ID: string;
13
+ DisplayName: string;
14
+ }>;
9
15
  editMode: boolean;
10
16
  config: DashboardConfigDetails;
11
17
  items: DashboardItem[];
12
18
  _items: DashboardItem[];
13
19
  itemsChanged: boolean;
14
- get ResourceTypes(): any[];
15
- resourceType: any;
20
+ showAddMenu: boolean;
21
+ get ResourceTypes(): {
22
+ ID: string;
23
+ Name: string;
24
+ DisplayName: string;
25
+ }[];
16
26
  ngOnInit(): Promise<void>;
17
- protected CreateDashboardItem(item: any): DashboardItem;
18
- removeItem(e: any): void;
19
- onReorder(e: TileLayoutReorderEvent): void;
20
- onResize(e: TileLayoutResizeEvent): void;
21
- closeDialog(event?: any): void;
27
+ protected CreateDashboardItem(item: DashboardItem): DashboardItem;
28
+ removeItem(item: DashboardItem): void;
29
+ toggleAddMenu(): void;
30
+ onReorder(e: {
31
+ oldIndex: number;
32
+ newIndex: number;
33
+ newCol?: number;
34
+ newRow?: number;
35
+ uniqueId?: number;
36
+ }): void;
37
+ onResize(e: {
38
+ newColSpan: number;
39
+ newRowSpan: number;
40
+ uniqueId?: number;
41
+ }): void;
42
+ closeDialog(): void;
22
43
  saveChanges(): void;
23
- onItemSelect(event: any): void;
44
+ onItemSelect(event: {
45
+ ID: string;
46
+ DisplayName: string;
47
+ }): void;
24
48
  static ɵfac: i0.ɵɵFactoryDeclaration<EditDashboardComponent, never>;
25
49
  static ɵcmp: i0.ɵɵComponentDeclaration<EditDashboardComponent, "app-edit-dashboard", never, { "editMode": { "alias": "editMode"; "required": false; }; "config": { "alias": "config"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "onSave": "onSave"; "onClose": "onClose"; "triggerAddItem": "triggerAddItem"; }, never, never, false, never>;
26
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"edit-dashboard.component.d.ts","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE/F,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;;AAEzF,qBAMa,sBAAsB;IACvB,MAAM,oBAA2B;IACjC,OAAO,oBAA2B;IAClC,cAAc,oBAA2B;IACnC,QAAQ,EAAE,OAAO,CAAS;IAC1B,MAAM,EAAE,sBAAsB,CAAgC;IAC9D,KAAK,EAAE,aAAa,EAAE,CAAM;IACrC,MAAM,EAAE,aAAa,EAAE,CAAM;IAC7B,YAAY,EAAE,OAAO,CAAS;IAErC,IAAW,aAAa,IAAI,GAAG,EAAE,CAEhC;IACM,YAAY,EAAE,GAAG,CAAQ;IAE1B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ/B,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,aAAa;IAcvD,UAAU,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI;IASxB,SAAS,CAAC,CAAC,EAAE,sBAAsB,GAAG,IAAI;IAe1C,QAAQ,CAAC,CAAC,EAAE,qBAAqB,GAAG,IAAI;IASxC,WAAW,CAAC,KAAK,GAAE,GAAU,GAAG,IAAI;IAIpC,WAAW;IAQX,YAAY,CAAC,KAAK,EAAE,GAAG;yCAlFZ,sBAAsB;2CAAtB,sBAAsB;CAuFlC"}
1
+ {"version":3,"file":"edit-dashboard.component.d.ts","sourceRoot":"","sources":["../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