@memberjunction/ng-explorer-core 4.0.0 → 4.2.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 (142) hide show
  1. package/README.md +117 -726
  2. package/dist/lib/resource-wrappers/record-resource.component.d.ts.map +1 -1
  3. package/dist/lib/resource-wrappers/record-resource.component.js +11 -29
  4. package/dist/lib/resource-wrappers/record-resource.component.js.map +1 -1
  5. package/dist/lib/shell/components/header/app-nav.component.d.ts +71 -14
  6. package/dist/lib/shell/components/header/app-nav.component.d.ts.map +1 -1
  7. package/dist/lib/shell/components/header/app-nav.component.js +195 -54
  8. package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
  9. package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
  10. package/dist/lib/shell/components/tabs/component-cache-manager.js +0 -6
  11. package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
  12. package/dist/lib/shell/shell.component.d.ts +5 -1
  13. package/dist/lib/shell/shell.component.d.ts.map +1 -1
  14. package/dist/lib/shell/shell.component.js +28 -17
  15. package/dist/lib/shell/shell.component.js.map +1 -1
  16. package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +1 -1
  17. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +1 -1
  18. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +1 -1
  19. package/dist/lib/single-record/single-record.component.d.ts +9 -0
  20. package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
  21. package/dist/lib/single-record/single-record.component.js +43 -2
  22. package/dist/lib/single-record/single-record.component.js.map +1 -1
  23. package/dist/lib/user-menu/base-user-menu.d.ts.map +1 -1
  24. package/dist/lib/user-menu/base-user-menu.js +2 -13
  25. package/dist/lib/user-menu/base-user-menu.js.map +1 -1
  26. package/package.json +35 -35
  27. package/dist/generic/Events.types.d.ts +0 -174
  28. package/dist/generic/Events.types.d.ts.map +0 -1
  29. package/dist/generic/Events.types.js +0 -220
  30. package/dist/generic/Events.types.js.map +0 -1
  31. package/dist/lib/app-view/application-view.component.d.ts +0 -65
  32. package/dist/lib/app-view/application-view.component.d.ts.map +0 -1
  33. package/dist/lib/app-view/application-view.component.js +0 -611
  34. package/dist/lib/app-view/application-view.component.js.map +0 -1
  35. package/dist/lib/auth-button/auth-button.component.d.ts +0 -13
  36. package/dist/lib/auth-button/auth-button.component.d.ts.map +0 -1
  37. package/dist/lib/auth-button/auth-button.component.js +0 -36
  38. package/dist/lib/auth-button/auth-button.component.js.map +0 -1
  39. package/dist/lib/base-browser-component/base-browser-component.d.ts +0 -44
  40. package/dist/lib/base-browser-component/base-browser-component.d.ts.map +0 -1
  41. package/dist/lib/base-browser-component/base-browser-component.js +0 -195
  42. package/dist/lib/base-browser-component/base-browser-component.js.map +0 -1
  43. package/dist/lib/chat-wrapper/chat-wrapper.component.d.ts +0 -54
  44. package/dist/lib/chat-wrapper/chat-wrapper.component.d.ts.map +0 -1
  45. package/dist/lib/chat-wrapper/chat-wrapper.component.js +0 -257
  46. package/dist/lib/chat-wrapper/chat-wrapper.component.js.map +0 -1
  47. package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts +0 -32
  48. package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts.map +0 -1
  49. package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +0 -244
  50. package/dist/lib/dashboard-browser-component/dashboard-browser.component.js.map +0 -1
  51. package/dist/lib/data-browser-component/data-browser.component.d.ts +0 -23
  52. package/dist/lib/data-browser-component/data-browser.component.d.ts.map +0 -1
  53. package/dist/lib/data-browser-component/data-browser.component.js +0 -267
  54. package/dist/lib/data-browser-component/data-browser.component.js.map +0 -1
  55. package/dist/lib/expansion-panel-component/expansion-panel-component.d.ts +0 -21
  56. package/dist/lib/expansion-panel-component/expansion-panel-component.d.ts.map +0 -1
  57. package/dist/lib/expansion-panel-component/expansion-panel-component.js +0 -158
  58. package/dist/lib/expansion-panel-component/expansion-panel-component.js.map +0 -1
  59. package/dist/lib/favorites/favorites.component.d.ts +0 -15
  60. package/dist/lib/favorites/favorites.component.d.ts.map +0 -1
  61. package/dist/lib/favorites/favorites.component.js +0 -135
  62. package/dist/lib/favorites/favorites.component.js.map +0 -1
  63. package/dist/lib/files/files.component.d.ts +0 -10
  64. package/dist/lib/files/files.component.d.ts.map +0 -1
  65. package/dist/lib/files/files.component.js +0 -41
  66. package/dist/lib/files/files.component.js.map +0 -1
  67. package/dist/lib/generic-browse-list/generic-browse-list.component.d.ts +0 -30
  68. package/dist/lib/generic-browse-list/generic-browse-list.component.d.ts.map +0 -1
  69. package/dist/lib/generic-browse-list/generic-browse-list.component.js +0 -171
  70. package/dist/lib/generic-browse-list/generic-browse-list.component.js.map +0 -1
  71. package/dist/lib/generic-browser-list/generic-browser-list.component.d.ts +0 -120
  72. package/dist/lib/generic-browser-list/generic-browser-list.component.d.ts.map +0 -1
  73. package/dist/lib/generic-browser-list/generic-browser-list.component.js +0 -1093
  74. package/dist/lib/generic-browser-list/generic-browser-list.component.js.map +0 -1
  75. package/dist/lib/header/MSFT_UserImageService.d.ts +0 -12
  76. package/dist/lib/header/MSFT_UserImageService.d.ts.map +0 -1
  77. package/dist/lib/header/MSFT_UserImageService.js +0 -25
  78. package/dist/lib/header/MSFT_UserImageService.js.map +0 -1
  79. package/dist/lib/header/header.component.d.ts +0 -69
  80. package/dist/lib/header/header.component.d.ts.map +0 -1
  81. package/dist/lib/header/header.component.js +0 -342
  82. package/dist/lib/header/header.component.js.map +0 -1
  83. package/dist/lib/home-component/home.component.d.ts +0 -22
  84. package/dist/lib/home-component/home.component.d.ts.map +0 -1
  85. package/dist/lib/home-component/home.component.js +0 -194
  86. package/dist/lib/home-component/home.component.js.map +0 -1
  87. package/dist/lib/home-wrapper/home-wrapper.component.d.ts +0 -7
  88. package/dist/lib/home-wrapper/home-wrapper.component.d.ts.map +0 -1
  89. package/dist/lib/home-wrapper/home-wrapper.component.js +0 -30
  90. package/dist/lib/home-wrapper/home-wrapper.component.js.map +0 -1
  91. package/dist/lib/list-view/list-view.component.d.ts +0 -45
  92. package/dist/lib/list-view/list-view.component.d.ts.map +0 -1
  93. package/dist/lib/list-view/list-view.component.js +0 -329
  94. package/dist/lib/list-view/list-view.component.js.map +0 -1
  95. package/dist/lib/navigation/navigation.component.d.ts +0 -142
  96. package/dist/lib/navigation/navigation.component.d.ts.map +0 -1
  97. package/dist/lib/navigation/navigation.component.js +0 -1212
  98. package/dist/lib/navigation/navigation.component.js.map +0 -1
  99. package/dist/lib/query-browser-component/query-browser.component.d.ts +0 -75
  100. package/dist/lib/query-browser-component/query-browser.component.d.ts.map +0 -1
  101. package/dist/lib/query-browser-component/query-browser.component.js +0 -908
  102. package/dist/lib/query-browser-component/query-browser.component.js.map +0 -1
  103. package/dist/lib/report-browser-component/report-browser.component.d.ts +0 -22
  104. package/dist/lib/report-browser-component/report-browser.component.d.ts.map +0 -1
  105. package/dist/lib/report-browser-component/report-browser.component.js +0 -80
  106. package/dist/lib/report-browser-component/report-browser.component.js.map +0 -1
  107. package/dist/lib/resource-browser/resource-browser.component.d.ts +0 -178
  108. package/dist/lib/resource-browser/resource-browser.component.d.ts.map +0 -1
  109. package/dist/lib/resource-browser/resource-browser.component.js +0 -1012
  110. package/dist/lib/resource-browser/resource-browser.component.js.map +0 -1
  111. package/dist/lib/resource-wrappers/report-resource.component.d.ts +0 -13
  112. package/dist/lib/resource-wrappers/report-resource.component.d.ts.map +0 -1
  113. package/dist/lib/resource-wrappers/report-resource.component.js +0 -49
  114. package/dist/lib/resource-wrappers/report-resource.component.js.map +0 -1
  115. package/dist/lib/shared/custom-icon/custom-icon.component.d.ts +0 -11
  116. package/dist/lib/shared/custom-icon/custom-icon.component.d.ts.map +0 -1
  117. package/dist/lib/shared/custom-icon/custom-icon.component.js +0 -44
  118. package/dist/lib/shared/custom-icon/custom-icon.component.js.map +0 -1
  119. package/dist/lib/single-application/single-application.component.d.ts +0 -24
  120. package/dist/lib/single-application/single-application.component.d.ts.map +0 -1
  121. package/dist/lib/single-application/single-application.component.js +0 -122
  122. package/dist/lib/single-application/single-application.component.js.map +0 -1
  123. package/dist/lib/single-entity/single-entity.component.d.ts +0 -34
  124. package/dist/lib/single-entity/single-entity.component.d.ts.map +0 -1
  125. package/dist/lib/single-entity/single-entity.component.js +0 -245
  126. package/dist/lib/single-entity/single-entity.component.js.map +0 -1
  127. package/dist/lib/single-report/single-report.component.d.ts +0 -17
  128. package/dist/lib/single-report/single-report.component.d.ts.map +0 -1
  129. package/dist/lib/single-report/single-report.component.js +0 -55
  130. package/dist/lib/single-report/single-report.component.js.map +0 -1
  131. package/dist/lib/single-view/single-view.component.d.ts +0 -43
  132. package/dist/lib/single-view/single-view.component.d.ts.map +0 -1
  133. package/dist/lib/single-view/single-view.component.js +0 -207
  134. package/dist/lib/single-view/single-view.component.js.map +0 -1
  135. package/dist/lib/style-guide-test/style-guide-test.component.d.ts +0 -70
  136. package/dist/lib/style-guide-test/style-guide-test.component.d.ts.map +0 -1
  137. package/dist/lib/style-guide-test/style-guide-test.component.js +0 -1024
  138. package/dist/lib/style-guide-test/style-guide-test.component.js.map +0 -1
  139. package/dist/lib/tabbed-dashboard/tabbed-dashboard.component.d.ts +0 -46
  140. package/dist/lib/tabbed-dashboard/tabbed-dashboard.component.d.ts.map +0 -1
  141. package/dist/lib/tabbed-dashboard/tabbed-dashboard.component.js +0 -547
  142. package/dist/lib/tabbed-dashboard/tabbed-dashboard.component.js.map +0 -1
@@ -1,1012 +0,0 @@
1
- import { Component, EventEmitter, Input, Output } from '@angular/core';
2
- import { Folder, Item, ItemType } from '../../generic/Item.types';
3
- import { Subject, debounceTime } from 'rxjs';
4
- import { LogError, Metadata, RunView } from '@memberjunction/core';
5
- import { BeforeDeleteItemEvent, BeforeUpdateItemEvent } from '../../generic/Events.types';
6
- import * as i0 from "@angular/core";
7
- import * as i1 from "@memberjunction/ng-shared";
8
- import * as i2 from "@angular/common";
9
- import * as i3 from "@progress/kendo-angular-grid";
10
- import * as i4 from "@progress/kendo-angular-dialog";
11
- import * as i5 from "@progress/kendo-angular-buttons";
12
- import * as i6 from "@progress/kendo-angular-inputs";
13
- import * as i7 from "@progress/kendo-angular-label";
14
- import * as i8 from "@progress/kendo-angular-layout";
15
- import * as i9 from "@memberjunction/ng-entity-form-dialog";
16
- import * as i10 from "@memberjunction/ng-shared-generic";
17
- function ResourceBrowserComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
18
- const _r2 = i0.ɵɵgetCurrentView();
19
- i0.ɵɵelementStart(0, "span", 25);
20
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_3_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.goToParent()); });
21
- i0.ɵɵelement(1, "span", 26);
22
- i0.ɵɵelementEnd();
23
- } }
24
- function ResourceBrowserComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
25
- i0.ɵɵelementStart(0, "div", 8);
26
- i0.ɵɵelement(1, "span", 27);
27
- i0.ɵɵtext(2, " Current Folder ");
28
- i0.ɵɵelementEnd();
29
- } }
30
- function ResourceBrowserComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
31
- const _r4 = i0.ɵɵgetCurrentView();
32
- i0.ɵɵelementStart(0, "kendo-dropdownbutton", 28);
33
- i0.ɵɵlistener("itemClick", function ResourceBrowserComponent_Conditional_11_Template_kendo_dropdownbutton_itemClick_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDropdownItemClick($event)); });
34
- i0.ɵɵelementStart(1, "span", 29);
35
- i0.ɵɵelement(2, "i", 30);
36
- i0.ɵɵtext(3, " Create New ");
37
- i0.ɵɵelementEnd()();
38
- } if (rf & 2) {
39
- const ctx_r2 = i0.ɵɵnextContext();
40
- i0.ɵɵproperty("data", ctx_r2.ItemOptions);
41
- } }
42
- function ResourceBrowserComponent_ng_template_16_Template(rf, ctx) { if (rf & 1) {
43
- i0.ɵɵelement(0, "i", 31);
44
- } }
45
- function ResourceBrowserComponent_Conditional_24_Template(rf, ctx) { if (rf & 1) {
46
- i0.ɵɵelementStart(0, "div", 21);
47
- i0.ɵɵelement(1, "mj-loading", 32);
48
- i0.ɵɵelementEnd();
49
- } if (rf & 2) {
50
- i0.ɵɵadvance();
51
- i0.ɵɵproperty("showText", false);
52
- } }
53
- function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_2_Template(rf, ctx) { if (rf & 1) {
54
- i0.ɵɵelementStart(0, "div", 40)(1, "span", 41);
55
- i0.ɵɵtext(2);
56
- i0.ɵɵelementEnd()();
57
- } if (rf & 2) {
58
- const dataItem_r7 = ctx.$implicit;
59
- i0.ɵɵadvance(2);
60
- i0.ɵɵtextInterpolate(dataItem_r7.Name);
61
- } }
62
- function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_5_Template(rf, ctx) { if (rf & 1) {
63
- i0.ɵɵelement(0, "kendo-chip", 42);
64
- } if (rf & 2) {
65
- const dataItem_r8 = ctx.$implicit;
66
- i0.ɵɵproperty("label", dataItem_r8.Type)("themeColor", dataItem_r8.Type === "Folder" ? "info" : "base");
67
- } }
68
- function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_1_Template(rf, ctx) { if (rf & 1) {
69
- const _r9 = i0.ɵɵgetCurrentView();
70
- i0.ɵɵelementStart(0, "button", 46);
71
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const dataItem_r10 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.editItem(dataItem_r10)); });
72
- i0.ɵɵelement(1, "span", 47);
73
- i0.ɵɵelementEnd();
74
- } }
75
- function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_2_Template(rf, ctx) { if (rf & 1) {
76
- const _r11 = i0.ɵɵgetCurrentView();
77
- i0.ɵɵelementStart(0, "button", 48);
78
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const dataItem_r10 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.deleteItem(dataItem_r10)); });
79
- i0.ɵɵelement(1, "span", 49);
80
- i0.ɵɵelementEnd();
81
- } }
82
- function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
83
- const _r12 = i0.ɵɵgetCurrentView();
84
- i0.ɵɵelementStart(0, "button", 50);
85
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const dataItem_r10 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.unlinkItem(dataItem_r10)); });
86
- i0.ɵɵelement(1, "span", 51);
87
- i0.ɵɵelementEnd();
88
- } }
89
- function ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Template(rf, ctx) { if (rf & 1) {
90
- i0.ɵɵelementStart(0, "div", 15);
91
- i0.ɵɵtemplate(1, ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_1_Template, 2, 0, "button", 43)(2, ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_2_Template, 2, 0, "button", 44)(3, ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Conditional_3_Template, 2, 0, "button", 45);
92
- i0.ɵɵelementEnd();
93
- } if (rf & 2) {
94
- const dataItem_r10 = ctx.$implicit;
95
- const ctx_r2 = i0.ɵɵnextContext(3);
96
- i0.ɵɵadvance();
97
- i0.ɵɵconditional(ctx_r2.EnableItemEdit && (!dataItem_r10.IsLink || dataItem_r10.LinkPermissionLevel === "Owner" || dataItem_r10.LinkPermissionLevel === "Edit") ? 1 : -1);
98
- i0.ɵɵadvance();
99
- i0.ɵɵconditional(ctx_r2.EnableItemDelete && (!dataItem_r10.IsLink || dataItem_r10.LinkPermissionLevel === "Owner") ? 2 : -1);
100
- i0.ɵɵadvance();
101
- i0.ɵɵconditional(ctx_r2.EnableRemoveLink && dataItem_r10.IsLink ? 3 : -1);
102
- } }
103
- function ResourceBrowserComponent_Conditional_25_Conditional_0_Template(rf, ctx) { if (rf & 1) {
104
- const _r6 = i0.ɵɵgetCurrentView();
105
- i0.ɵɵelementStart(0, "kendo-grid", 34);
106
- i0.ɵɵlistener("cellClick", function ResourceBrowserComponent_Conditional_25_Conditional_0_Template_kendo_grid_cellClick_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onCellItemClicked($event)); });
107
- i0.ɵɵelementStart(1, "kendo-grid-column", 35);
108
- i0.ɵɵtemplate(2, ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_2_Template, 3, 1, "ng-template", 36);
109
- i0.ɵɵelementEnd();
110
- i0.ɵɵelement(3, "kendo-grid-column", 37);
111
- i0.ɵɵelementStart(4, "kendo-grid-column", 38);
112
- i0.ɵɵtemplate(5, ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_5_Template, 1, 2, "ng-template", 36);
113
- i0.ɵɵelementEnd();
114
- i0.ɵɵelementStart(6, "kendo-grid-column", 39);
115
- i0.ɵɵtemplate(7, ResourceBrowserComponent_Conditional_25_Conditional_0_ng_template_7_Template, 4, 3, "ng-template", 36);
116
- i0.ɵɵelementEnd()();
117
- } if (rf & 2) {
118
- const ctx_r2 = i0.ɵɵnextContext(2);
119
- i0.ɵɵproperty("kendoGridBinding", ctx_r2.Items);
120
- i0.ɵɵadvance(6);
121
- i0.ɵɵproperty("width", 150);
122
- } }
123
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_0_Conditional_7_Template(rf, ctx) { if (rf & 1) {
124
- const _r13 = i0.ɵɵgetCurrentView();
125
- i0.ɵɵelementStart(0, "button", 57);
126
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_0_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.onDropdownItemClick({ Text: ctx_r2.ItemOptions[0].Text })); });
127
- i0.ɵɵelementStart(1, "span", 29);
128
- i0.ɵɵelement(2, "i", 30);
129
- i0.ɵɵtext(3, " Create Your First Item ");
130
- i0.ɵɵelementEnd()();
131
- } }
132
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
133
- i0.ɵɵelementStart(0, "div", 52)(1, "div", 54);
134
- i0.ɵɵelement(2, "span", 55);
135
- i0.ɵɵelementEnd();
136
- i0.ɵɵelementStart(3, "h3");
137
- i0.ɵɵtext(4);
138
- i0.ɵɵelementEnd();
139
- i0.ɵɵelementStart(5, "p");
140
- i0.ɵɵtext(6, "There are no items to display in this category.");
141
- i0.ɵɵelementEnd();
142
- i0.ɵɵtemplate(7, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_0_Conditional_7_Template, 4, 0, "button", 56);
143
- i0.ɵɵelementEnd();
144
- } if (rf & 2) {
145
- const ctx_r2 = i0.ɵɵnextContext(3);
146
- i0.ɵɵadvance(4);
147
- i0.ɵɵtextInterpolate1("No ", ctx_r2.Title, " Found");
148
- i0.ɵɵadvance(3);
149
- i0.ɵɵconditional(ctx_r2.ItemOptions.length > 0 ? 7 : -1);
150
- } }
151
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
152
- const _r16 = i0.ɵɵgetCurrentView();
153
- i0.ɵɵelementStart(0, "button", 46);
154
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_2_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r16); const item_r15 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(4); ctx_r2.editItem(item_r15); return i0.ɵɵresetView($event.stopPropagation()); });
155
- i0.ɵɵelement(1, "span", 47);
156
- i0.ɵɵelementEnd();
157
- } }
158
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
159
- const _r17 = i0.ɵɵgetCurrentView();
160
- i0.ɵɵelementStart(0, "button", 48);
161
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_3_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r17); const item_r15 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(4); ctx_r2.deleteItem(item_r15); return i0.ɵɵresetView($event.stopPropagation()); });
162
- i0.ɵɵelement(1, "span", 49);
163
- i0.ɵɵelementEnd();
164
- } }
165
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
166
- const _r18 = i0.ɵɵgetCurrentView();
167
- i0.ɵɵelementStart(0, "button", 50);
168
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_4_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r18); const item_r15 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(4); ctx_r2.unlinkItem(item_r15); return i0.ɵɵresetView($event.stopPropagation()); });
169
- i0.ɵɵelement(1, "span", 51);
170
- i0.ɵɵelementEnd();
171
- } }
172
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
173
- i0.ɵɵelementStart(0, "div", 61);
174
- i0.ɵɵelement(1, "span", 63)(2, "span", 64);
175
- i0.ɵɵelementEnd();
176
- } if (rf & 2) {
177
- const item_r15 = i0.ɵɵnextContext().$implicit;
178
- const ctx_r2 = i0.ɵɵnextContext(4);
179
- i0.ɵɵproperty("title", item_r15.Name + " (Shared)");
180
- i0.ɵɵadvance();
181
- i0.ɵɵproperty("ngClass", ctx_r2.getIconForResourceType(item_r15));
182
- } }
183
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
184
- i0.ɵɵelement(0, "span", 62);
185
- } if (rf & 2) {
186
- const item_r15 = i0.ɵɵnextContext().$implicit;
187
- const ctx_r2 = i0.ɵɵnextContext(4);
188
- i0.ɵɵproperty("ngClass", ctx_r2.getIconForResourceType(item_r15))("title", item_r15.Name);
189
- } }
190
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
191
- const _r14 = i0.ɵɵgetCurrentView();
192
- i0.ɵɵelementStart(0, "kendo-card", 59);
193
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Template_kendo_card_click_0_listener() { const item_r15 = i0.ɵɵrestoreView(_r14).$implicit; const ctx_r2 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r2.itemClick(item_r15)); });
194
- i0.ɵɵelementStart(1, "div", 60);
195
- i0.ɵɵtemplate(2, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_2_Template, 2, 0, "button", 43)(3, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_3_Template, 2, 0, "button", 44)(4, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_4_Template, 2, 0, "button", 45);
196
- i0.ɵɵelementEnd();
197
- i0.ɵɵelementStart(5, "kendo-card-body");
198
- i0.ɵɵtemplate(6, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_6_Template, 3, 2, "div", 61)(7, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Conditional_7_Template, 1, 2, "span", 62);
199
- i0.ɵɵelementStart(8, "h3");
200
- i0.ɵɵtext(9);
201
- i0.ɵɵelementEnd();
202
- i0.ɵɵelementStart(10, "p");
203
- i0.ɵɵtext(11);
204
- i0.ɵɵelementEnd();
205
- i0.ɵɵelement(12, "kendo-chip", 42);
206
- i0.ɵɵelementEnd()();
207
- } if (rf & 2) {
208
- const item_r15 = ctx.$implicit;
209
- const ctx_r2 = i0.ɵɵnextContext(4);
210
- i0.ɵɵadvance(2);
211
- i0.ɵɵconditional(ctx_r2.EnableItemEdit && (!item_r15.IsLink || item_r15.LinkPermissionLevel === "Owner" || item_r15.LinkPermissionLevel === "Edit") ? 2 : -1);
212
- i0.ɵɵadvance();
213
- i0.ɵɵconditional(ctx_r2.EnableItemDelete && (!item_r15.IsLink || item_r15.LinkPermissionLevel === "Owner") ? 3 : ctx_r2.EnableRemoveLink && item_r15.IsLink ? 4 : -1);
214
- i0.ɵɵadvance(3);
215
- i0.ɵɵconditional(item_r15.IsLink ? 6 : 7);
216
- i0.ɵɵadvance(3);
217
- i0.ɵɵtextInterpolate(item_r15.Name);
218
- i0.ɵɵadvance(2);
219
- i0.ɵɵtextInterpolate(item_r15.Description || "No description available");
220
- i0.ɵɵadvance();
221
- i0.ɵɵproperty("label", item_r15.Type)("themeColor", item_r15.Type === "Folder" ? "info" : "base");
222
- } }
223
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
224
- i0.ɵɵelementStart(0, "div", 53);
225
- i0.ɵɵrepeaterCreate(1, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_For_2_Template, 13, 7, "kendo-card", 58, i0.ɵɵrepeaterTrackByIdentity);
226
- i0.ɵɵelementEnd();
227
- } if (rf & 2) {
228
- const ctx_r2 = i0.ɵɵnextContext(3);
229
- i0.ɵɵadvance();
230
- i0.ɵɵrepeater(ctx_r2.Items);
231
- } }
232
- function ResourceBrowserComponent_Conditional_25_Conditional_1_Template(rf, ctx) { if (rf & 1) {
233
- i0.ɵɵtemplate(0, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_0_Template, 8, 2, "div", 52)(1, ResourceBrowserComponent_Conditional_25_Conditional_1_Conditional_1_Template, 3, 0, "div", 53);
234
- } if (rf & 2) {
235
- const ctx_r2 = i0.ɵɵnextContext(2);
236
- i0.ɵɵconditional(ctx_r2.Items.length === 0 ? 0 : 1);
237
- } }
238
- function ResourceBrowserComponent_Conditional_25_Template(rf, ctx) { if (rf & 1) {
239
- i0.ɵɵtemplate(0, ResourceBrowserComponent_Conditional_25_Conditional_0_Template, 8, 2, "kendo-grid", 33)(1, ResourceBrowserComponent_Conditional_25_Conditional_1_Template, 2, 1);
240
- } if (rf & 2) {
241
- const ctx_r2 = i0.ɵɵnextContext();
242
- i0.ɵɵconditional(ctx_r2.DisplayMode === "List" ? 0 : 1);
243
- } }
244
- function ResourceBrowserComponent_kendo_dialog_26_Conditional_11_Template(rf, ctx) { if (rf & 1) {
245
- i0.ɵɵelementStart(0, "p", 69);
246
- i0.ɵɵtext(1, "This action cannot be undone.");
247
- i0.ɵɵelementEnd();
248
- } }
249
- function ResourceBrowserComponent_kendo_dialog_26_Template(rf, ctx) { if (rf & 1) {
250
- const _r19 = i0.ɵɵgetCurrentView();
251
- i0.ɵɵelementStart(0, "kendo-dialog", 65);
252
- i0.ɵɵlistener("close", function ResourceBrowserComponent_kendo_dialog_26_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onConfirmDeleteItem(false)); });
253
- i0.ɵɵelementStart(1, "div", 66)(2, "div", 67);
254
- i0.ɵɵelement(3, "span", 68);
255
- i0.ɵɵelementEnd();
256
- i0.ɵɵelementStart(4, "p");
257
- i0.ɵɵtext(5, " Are you sure you want to ");
258
- i0.ɵɵelementStart(6, "strong");
259
- i0.ɵɵtext(7);
260
- i0.ɵɵelementEnd();
261
- i0.ɵɵelementStart(8, "strong");
262
- i0.ɵɵtext(9);
263
- i0.ɵɵelementEnd();
264
- i0.ɵɵtext(10, "? ");
265
- i0.ɵɵelementEnd();
266
- i0.ɵɵtemplate(11, ResourceBrowserComponent_kendo_dialog_26_Conditional_11_Template, 2, 0, "p", 69);
267
- i0.ɵɵelementEnd();
268
- i0.ɵɵelementStart(12, "kendo-dialog-actions", 70)(13, "button", 71);
269
- i0.ɵɵlistener("click", function ResourceBrowserComponent_kendo_dialog_26_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onConfirmDeleteItem(false)); });
270
- i0.ɵɵtext(14, " Cancel ");
271
- i0.ɵɵelementEnd();
272
- i0.ɵɵelementStart(15, "button", 72);
273
- i0.ɵɵlistener("click", function ResourceBrowserComponent_kendo_dialog_26_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onConfirmDeleteItem(true)); });
274
- i0.ɵɵelementStart(16, "span", 29);
275
- i0.ɵɵelement(17, "i", 73);
276
- i0.ɵɵtext(18);
277
- i0.ɵɵelementEnd()()()();
278
- } if (rf & 2) {
279
- const ctx_r2 = i0.ɵɵnextContext();
280
- i0.ɵɵproperty("minWidth", 400)("width", 500);
281
- i0.ɵɵadvance(7);
282
- i0.ɵɵtextInterpolate((ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.IsLink) && (ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.LinkPermissionLevel) === "Owner" || !(ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.IsLink) ? "delete" : "unlink");
283
- i0.ɵɵadvance(2);
284
- i0.ɵɵtextInterpolate(ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.Name);
285
- i0.ɵɵadvance(2);
286
- i0.ɵɵconditional((ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.IsLink) && (ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.LinkPermissionLevel) === "Owner" || !(ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.IsLink) ? 11 : -1);
287
- i0.ɵɵadvance(6);
288
- i0.ɵɵproperty("ngClass", (ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.IsLink) && (ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.LinkPermissionLevel) === "Owner" || !(ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.IsLink) ? "fas fa-trash" : "fas fa-link-slash");
289
- i0.ɵɵadvance();
290
- i0.ɵɵtextInterpolate1(" ", (ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.IsLink) && (ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.LinkPermissionLevel) === "Owner" || !(ctx_r2.selectedItem == null ? null : ctx_r2.selectedItem.IsLink) ? "Delete" : "Unlink", " ");
291
- } }
292
- function ResourceBrowserComponent_kendo_dialog_27_ng_template_5_Template(rf, ctx) { if (rf & 1) {
293
- i0.ɵɵelement(0, "i", 81);
294
- } }
295
- function ResourceBrowserComponent_kendo_dialog_27_Conditional_12_Template(rf, ctx) { if (rf & 1) {
296
- const _r21 = i0.ɵɵgetCurrentView();
297
- i0.ɵɵelementStart(0, "button", 57);
298
- i0.ɵɵlistener("click", function ResourceBrowserComponent_kendo_dialog_27_Conditional_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.updateFolder()); });
299
- i0.ɵɵelementStart(1, "span", 29);
300
- i0.ɵɵelement(2, "i", 82);
301
- i0.ɵɵtext(3, " Update Folder ");
302
- i0.ɵɵelementEnd()();
303
- } }
304
- function ResourceBrowserComponent_kendo_dialog_27_Conditional_13_Template(rf, ctx) { if (rf & 1) {
305
- const _r22 = i0.ɵɵgetCurrentView();
306
- i0.ɵɵelementStart(0, "button", 57);
307
- i0.ɵɵlistener("click", function ResourceBrowserComponent_kendo_dialog_27_Conditional_13_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.createFolder()); });
308
- i0.ɵɵelementStart(1, "span", 29);
309
- i0.ɵɵelement(2, "i", 83);
310
- i0.ɵɵtext(3, " Create Folder ");
311
- i0.ɵɵelementEnd()();
312
- } }
313
- function ResourceBrowserComponent_kendo_dialog_27_Template(rf, ctx) { if (rf & 1) {
314
- const _r20 = i0.ɵɵgetCurrentView();
315
- i0.ɵɵelementStart(0, "kendo-dialog", 74);
316
- i0.ɵɵlistener("close", function ResourceBrowserComponent_kendo_dialog_27_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleUpsertFolderView(false, false)); });
317
- i0.ɵɵelementStart(1, "div", 66)(2, "kendo-formfield", 75);
318
- i0.ɵɵelement(3, "kendo-label", 76);
319
- i0.ɵɵelementStart(4, "kendo-textbox", 77);
320
- i0.ɵɵlistener("valueChange", function ResourceBrowserComponent_kendo_dialog_27_Template_kendo_textbox_valueChange_4_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onUpsertFolderNameKeyup($event)); });
321
- i0.ɵɵtemplate(5, ResourceBrowserComponent_kendo_dialog_27_ng_template_5_Template, 1, 0, "ng-template", 14);
322
- i0.ɵɵelementEnd()();
323
- i0.ɵɵelementStart(6, "kendo-formfield", 78);
324
- i0.ɵɵelement(7, "kendo-label", 79);
325
- i0.ɵɵelementStart(8, "kendo-textarea", 80);
326
- i0.ɵɵlistener("valueChange", function ResourceBrowserComponent_kendo_dialog_27_Template_kendo_textarea_valueChange_8_listener($event) { i0.ɵɵrestoreView(_r20); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onUpsertFolderDescriptionKeyup($event)); });
327
- i0.ɵɵelementEnd()()();
328
- i0.ɵɵelementStart(9, "kendo-dialog-actions", 70)(10, "button", 71);
329
- i0.ɵɵlistener("click", function ResourceBrowserComponent_kendo_dialog_27_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r20); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleUpsertFolderView(false, false)); });
330
- i0.ɵɵtext(11, " Cancel ");
331
- i0.ɵɵelementEnd();
332
- i0.ɵɵtemplate(12, ResourceBrowserComponent_kendo_dialog_27_Conditional_12_Template, 4, 0, "button", 56)(13, ResourceBrowserComponent_kendo_dialog_27_Conditional_13_Template, 4, 0, "button", 56);
333
- i0.ɵɵelementEnd()();
334
- } if (rf & 2) {
335
- const ctx_r2 = i0.ɵɵnextContext();
336
- i0.ɵɵproperty("title", ctx_r2.selectedFolder ? "Edit Folder" : "Create New Folder")("minWidth", 400)("width", 500);
337
- i0.ɵɵadvance(4);
338
- i0.ɵɵproperty("value", ctx_r2.upsertNewFolderName)("clearButton", true);
339
- i0.ɵɵadvance(4);
340
- i0.ɵɵproperty("value", ctx_r2.upsertNewFolderDescription)("rows", 3);
341
- i0.ɵɵadvance(4);
342
- i0.ɵɵconditional(ctx_r2.selectedFolder ? 12 : 13);
343
- } }
344
- export class ResourceBrowserComponent {
345
- sharedService;
346
- /*******************************************************************************************
347
- * PROPERTIES
348
- *******************************************************************************************/
349
- _ResourceTypeName = null;
350
- /**
351
- * The name of the type of resource to display, cannot be changed after it is initially set
352
- */
353
- get ResourceTypeName() {
354
- return this._ResourceTypeName;
355
- }
356
- set ResourceTypeName(value) {
357
- if (this._ResourceTypeName === null) {
358
- this._ResourceTypeName = value;
359
- }
360
- else {
361
- // we do not ever want to allow an instance of this component to be "reused" where the Resource Type is changed so throw an exception here
362
- throw new Error('Resource Type cannot be changed after it has been set');
363
- }
364
- }
365
- /**
366
- * Whether or not to enable categories. If enabled, Categories will be displayed
367
- * and the option to create new categories will be available. Default is true.
368
- */
369
- EnableCategories = true;
370
- /**
371
- * If Categories are enabled, then the categories fetched will be filtered to return only those whoses EntityID
372
- * matches this value.
373
- */
374
- CategoryEntityID = null;
375
- /**
376
- * If set, this will set the current Category/Folder for the display. Not all Resource Types support Categories, so if the Resource Type in question does not have a CategoryEntityID specified, this property will be ignored.
377
- */
378
- CurrentCategoryID = null;
379
- /**
380
- * This property determines if the UI will include a button on items in the display to edit. The button will only be shown if the user has edit permissions, but this is a global setting to turn on/off the button even if the user has permissions. Default is true.
381
- */
382
- EnableItemEdit = true;
383
- /**
384
- * This property determines if the UI will include a button on items in the display to delete. The button will only be shown if the user has delete permissions, but this is a global setting to turn on/off the button even if the user has permissions. Default is true.
385
- */
386
- EnableItemDelete = true;
387
- /**
388
- * This proprerty determines if the UI will include a button on items in the display to unlink/remove a link to a shared resource (owned by another user).
389
- * The button will only be shown if the user has permissions, but this is a global setting to turn on/off the button even if the user has permissions. Default is true.
390
- */
391
- EnableRemoveLink = true;
392
- /**
393
- * The title to display, by default if not provided, we will use the ResourceType's Entity Name
394
- */
395
- Title;
396
- /**
397
- * Optional, a SQL Where clause filter to apply to Items being loaded into the browser
398
- */
399
- ItemFilter;
400
- /**
401
- * Optional, a valid expression to place into the RunView OrderBy property (don't include the keywords ORDER BY, just what is after ORDER BY)
402
- */
403
- OrderBy;
404
- /**
405
- * Array of NewItemOption objects that will be displayed in the Create New dropdown. Defaults to having a single entry for creating a new folder, you can remove this or add to it.
406
- */
407
- NewItemOptions = [];
408
- /**
409
- * The visual display mode for this component, tile will show the contents in tiles that are spaced and wrapped based on the viewport, list will show the details of the items in a list, and tree will show the items in a tree view - tree view NOT implemented yet
410
- */
411
- DisplayMode = 'Tile';
412
- /**
413
- * Fires whenever a resource/item is selected within the component
414
- */
415
- ResourceSelected = new EventEmitter();
416
- /*******************************************************************************************
417
- * EVENTS
418
- *******************************************************************************************/
419
- /**
420
- * Fires whenever the category (e.g. the folder) the user is currently viewing changes. This can happen when a user creates a new folder and navigates to it, navigates to an existing folder, goes "up" in the folder hierarchy, etc.
421
- */
422
- CategoryChanged = new EventEmitter();
423
- /**
424
- * Fires whenever the user changes the display mode of the component
425
- */
426
- DisplayModeChanged = new EventEmitter();
427
- /**
428
- * Fires whenever the user clicks the back button to view the parent folder
429
- */
430
- NavigateToParentEvent = new EventEmitter();
431
- /**
432
- * Fires whenever the users clicks to edit an Item that is not a folder
433
- */
434
- EditItemEvent = new EventEmitter();
435
- /**
436
- * Fires whenever the users clicks to edit an Item that is not a folder
437
- */
438
- DeleteItemEvent = new EventEmitter();
439
- /**
440
- * The current Resource Type (BaseEntity derived class), automatically is populated after init based on the ResourceType string
441
- */
442
- ResourceType;
443
- _isLoading = false;
444
- /**
445
- * This property will be true whenever the component is in the process of loading data
446
- */
447
- get IsLoading() {
448
- return this._isLoading;
449
- }
450
- _CategoryIDFieldName;
451
- /**
452
- * This is the field name in the Resource Type's Entity that is used to store the CategoryID (e.g. the Folder ID) for the resource.
453
- * Not all entities in resource types support a CategoryID concept, so this can be null. This property is read only and
454
- * is auto-populated during the configuration of the component.
455
- */
456
- get CategoryIDFieldName() {
457
- return this._CategoryIDFieldName;
458
- }
459
- _CategoryParentIDFieldName = undefined;
460
- /**
461
- * This is the field name in the Resource type's Category Entity, if a Category Entity was provided, that has the recursive/self-referencing foreign key to the parent category.
462
- * This field is read only and is auto-populated during the configuration of the component.
463
- */
464
- get CategoryParentIDFieldName() {
465
- return this._CategoryParentIDFieldName;
466
- }
467
- _UserIDFieldName = undefined;
468
- /**
469
- * This is the field name in the Resource Type's Entity that is used to store the UserID of the user that OWNS the resource. Commonly, but not always a field called UserID, but can be
470
- * any field in the Resource Type's entity that is a foreign key to the Users entity. This property is read only and is auto-populated during the configuration of the component.
471
- */
472
- get UserIDFieldName() {
473
- return this._UserIDFieldName;
474
- }
475
- _items = [];
476
- /**
477
- * The current list of items being displayed in the browser, DO NOT MODIFY THIS! This is read only and is auto-populated by the component.
478
- */
479
- get Items() {
480
- return this._items;
481
- }
482
- _DefaultNewItemOptions = [
483
- {
484
- Text: 'New Folder',
485
- Description: 'Create a new Folder',
486
- Icon: 'folder',
487
- Action: () => {
488
- if (this.EnableCategories) {
489
- this.toggleUpsertFolderView(true, true);
490
- }
491
- }
492
- }
493
- ];
494
- get ItemOptions() {
495
- return this._DefaultNewItemOptions;
496
- }
497
- upsertNewFolderName = "";
498
- upsertNewFolderDescription = "";
499
- selectedFolder = null;
500
- // JS code here and below from old component....
501
- _filterDebounceTime = 250;
502
- filterItemsSubject = new Subject();
503
- filter = '';
504
- sourceItems = null;
505
- selectedItem = null;
506
- deleteDialogOpened = false;
507
- copyFromDialogOpened = false;
508
- upsertFolderDialogVisible = false;
509
- _allResourceTypes = [];
510
- entityObjectName = "";
511
- constructor(sharedService) {
512
- this.sharedService = sharedService;
513
- this.filterItemsSubject
514
- .pipe(debounceTime(this._filterDebounceTime))
515
- .subscribe(() => this.filterItems(this.filter));
516
- }
517
- async ngOnInit() {
518
- /**
519
- * Hide the create folder option is EnableCategories is false
520
- */
521
- if (this.EnableCategories) {
522
- this._DefaultNewItemOptions.push(...this.NewItemOptions);
523
- }
524
- else {
525
- this._DefaultNewItemOptions = this.NewItemOptions;
526
- }
527
- this._allResourceTypes = this.sharedService.ResourceTypes;
528
- const resourceType = this._allResourceTypes.find(rt => {
529
- return rt.Entity === this.ResourceTypeName;
530
- });
531
- if (!resourceType) {
532
- throw new Error(`Resource Type ${this.ResourceTypeName} not found`);
533
- }
534
- this.ResourceType = resourceType;
535
- if (!this.ResourceType.EntityID) {
536
- throw new Error(`Resource Type ${this.ResourceTypeName} does not have an EntityID specified. EntityID is required for any Resource Type to be used with this component.`);
537
- }
538
- // now get the entity info for the resource type and for its category entity, if one is specified.
539
- const md = new Metadata();
540
- const resourceTypeEntity = md.EntityByID(this.ResourceType.EntityID);
541
- const categoryEntity = this.ResourceType.CategoryEntityID ? md.EntityByID(this.ResourceType.CategoryEntityID) : null;
542
- // Always check for UserID field, not just when we have categories
543
- const usersEntity = md.EntityByName("Users");
544
- this._UserIDFieldName = resourceTypeEntity.Fields.find(f => f.RelatedEntityID === usersEntity.ID)?.Name;
545
- // figure out the column inside the entity that points to the categoryEntity, if we have a category entity
546
- if (categoryEntity) {
547
- this._CategoryIDFieldName = resourceTypeEntity.Fields.find(f => f.RelatedEntityID === categoryEntity.ID)?.Name;
548
- this._CategoryParentIDFieldName = categoryEntity.Fields.find(f => f.RelatedEntityID === categoryEntity.ID)?.Name;
549
- }
550
- await this.Refresh();
551
- }
552
- /**
553
- * Refresh the component from the database based on other current state variables.
554
- */
555
- async Refresh() {
556
- const views = await this.LoadResources();
557
- const categories = await this.LoadCategories();
558
- const items = [...categories, ...views];
559
- const sortedItems = this.sortItems(items);
560
- this._items = sortedItems;
561
- }
562
- async LoadResources() {
563
- let results = [];
564
- if (!this.ResourceType || !this.ResourceType.Entity) {
565
- return results;
566
- }
567
- const md = new Metadata();
568
- const rv = new RunView();
569
- // create a combined filter for the SQL query that combines the user's provided ItemFilter, if provided, with a user filter that only includes items that are OWNED by the current user
570
- // and finally filter on the current category, if one is set and we have a category entity
571
- let filter = "";
572
- if (this.ItemFilter) {
573
- filter += `(${this.ItemFilter})`;
574
- }
575
- if (this.UserIDFieldName) {
576
- let base = this.ItemFilter ? "AND " : " ";
577
- filter += `${base}([${this.UserIDFieldName}] = '${md.CurrentUser.ID}')`;
578
- }
579
- if (this.CurrentCategoryID && this.CategoryIDFieldName) {
580
- let base = (this.ItemFilter || this.UserIDFieldName) ? "AND " : " ";
581
- filter += `${base}([${this.CategoryIDFieldName}] = '${this.CurrentCategoryID}')`;
582
- }
583
- const itemResult = await rv.RunView({
584
- EntityName: this.ResourceType.Entity,
585
- ExtraFilter: filter,
586
- OrderBy: this.OrderBy,
587
- ResultType: 'entity_object'
588
- });
589
- if (!itemResult.Success) {
590
- LogError(`Unable to load views for ${this.ResourceType.Entity}. Reason: ${itemResult.ErrorMessage}`);
591
- return results;
592
- ;
593
- }
594
- const views = itemResult.Results;
595
- const items = views.map(view => new Item(view, ItemType.Resource));
596
- return items;
597
- }
598
- async LoadCategories() {
599
- if (!this.EnableCategories) {
600
- return [];
601
- }
602
- if (!this.ResourceType || !this.ResourceType.CategoryEntity) {
603
- return [];
604
- }
605
- const md = new Metadata();
606
- const categoryEntity = md.EntityByName(this.ResourceType.CategoryEntity);
607
- if (!categoryEntity) {
608
- LogError(`Category Entity ${this.ResourceType.CategoryEntity} not found`);
609
- return [];
610
- }
611
- const hasEntityIDField = categoryEntity.Fields.some(field => field.Name === "EntityID");
612
- let filter = `UserID = '${md.CurrentUser.ID}'`;
613
- filter += this.CurrentCategoryID ? ` AND ParentID = '${this.CurrentCategoryID}' ` : " AND ParentID IS NULL ";
614
- filter += hasEntityIDField ? ` AND EntityID = '${this.ResourceType.EntityID}'` : "";
615
- const rv = new RunView();
616
- const rvResult = await rv.RunView({
617
- EntityName: this.ResourceType.CategoryEntity,
618
- ExtraFilter: filter,
619
- ResultType: 'entity_object'
620
- });
621
- if (!rvResult.Success) {
622
- LogError(`Unable to load categories for ${this.ResourceType.CategoryEntity}. Reason: ${rvResult.ErrorMessage}`);
623
- return [];
624
- }
625
- const categories = rvResult.Results;
626
- const folders = categories.map((category) => {
627
- const folderID = category.FirstPrimaryKey.Value;
628
- const NameEntityField = category.Fields.find(field => field.EntityFieldInfo.IsNameField);
629
- const folderName = NameEntityField ? NameEntityField.Value : "Folder";
630
- const folder = new Folder(folderID, folderName);
631
- folder.CategoryEntity = category;
632
- folder.Description = category.Get("Description");
633
- return folder;
634
- });
635
- const items = folders.map(folder => new Item(folder, ItemType.Folder));
636
- return items;
637
- }
638
- //maybe pass in a sort function for custom sorting?
639
- sortItems(items) {
640
- items.sort(function (a, b) {
641
- const aName = a.Name.toLowerCase();
642
- const bName = b.Name.toLowerCase();
643
- if (aName < bName) {
644
- return -1;
645
- }
646
- if (aName > bName) {
647
- return 1;
648
- }
649
- return 0;
650
- });
651
- return items;
652
- }
653
- //wrapper function for the grid view
654
- onCellItemClicked(event) {
655
- this.itemClick(event.dataItem);
656
- }
657
- itemClick(item) {
658
- if (!item) {
659
- return;
660
- }
661
- this.ResourceSelected.emit(item);
662
- }
663
- async updateFolder() {
664
- const folder = this.selectedFolder;
665
- if (!folder || !folder.CategoryEntity) {
666
- LogError("Folder or CategoryEntity is not set, cannot update folder");
667
- this.sharedService.CreateSimpleNotification("Unable to update folder", "error", 2500);
668
- return;
669
- }
670
- const categoryEntity = folder.CategoryEntity;
671
- categoryEntity.Set("Name", this.upsertNewFolderName);
672
- categoryEntity.Set("Description", this.upsertNewFolderDescription);
673
- const saveResult = await categoryEntity.Save();
674
- if (!saveResult) {
675
- LogError(`Unable to update folder ${folder.Name}`, undefined, categoryEntity.LatestResult);
676
- this.sharedService.CreateSimpleNotification(`Unable to update folder ${folder.Name}`, "error", 2500);
677
- }
678
- else {
679
- this.sharedService.CreateSimpleNotification(`Successfully updated folder ${folder.Name}`, "info", 2500);
680
- await this.Refresh();
681
- }
682
- this.toggleUpsertFolderView(false, false);
683
- }
684
- async createFolder() {
685
- if (!this.ResourceType.CategoryEntity) {
686
- LogError("ResourceType.CategoryEntity is not set, cannot create folder");
687
- this.sharedService.CreateSimpleNotification("Unable to create folder", "error", 1500);
688
- return;
689
- }
690
- const md = new Metadata();
691
- const folderEntity = await md.GetEntityObject(this.ResourceType.CategoryEntity);
692
- folderEntity.NewRecord();
693
- folderEntity.Set("Name", this.upsertNewFolderName);
694
- folderEntity.Set("Description", this.upsertNewFolderDescription);
695
- folderEntity.Set("ParentID", this.CurrentCategoryID);
696
- folderEntity.Set("UserID", md.CurrentUser.ID);
697
- folderEntity.Set("EntityID", this.CategoryEntityID);
698
- let saveResult = await folderEntity.Save();
699
- if (!saveResult) {
700
- this.sharedService.CreateSimpleNotification(`Unable to create folder ${this.upsertNewFolderName}`, "error", 1500);
701
- LogError(`Unable to create folder ${this.upsertNewFolderName}`, undefined, folderEntity.LatestResult);
702
- }
703
- this.toggleUpsertFolderView(false, false);
704
- this.sharedService.CreateSimpleNotification(`successfully created folder ${this.upsertNewFolderName}`, 'success', 1500);
705
- let folder = new Folder(folderEntity.Get("ID"), folderEntity.Get("Name"));
706
- folder.ParentFolderID = folderEntity.Get("ParentID");
707
- folder.Description = folderEntity.Get("Description");
708
- let item = new Item(folder, ItemType.Folder);
709
- //navigate to the newly created folder
710
- //by raising an item click event
711
- this.itemClick(item);
712
- }
713
- async unlinkItem(item) {
714
- await this.deleteOrUnlink(item, false);
715
- }
716
- _currentDeleteOrUnlinkState = false;
717
- async deleteOrUnlink(item, bDelete) {
718
- if (!item) {
719
- return;
720
- }
721
- this._currentDeleteOrUnlinkState = bDelete;
722
- this.selectedItem = item;
723
- if (item.Type === ItemType.Folder && bDelete) {
724
- this.deleteDialogOpened = true;
725
- }
726
- else if (item.Type === ItemType.Resource && bDelete) {
727
- this.deleteDialogOpened = true;
728
- }
729
- else if (item.Type === ItemType.Resource && !bDelete) {
730
- this.deleteDialogOpened = true;
731
- }
732
- }
733
- goToParent() {
734
- this.NavigateToParentEvent.emit();
735
- }
736
- async deleteItem(item) {
737
- await this.deleteOrUnlink(item, true);
738
- }
739
- async onConfirmDeleteItem(shouldDelete) {
740
- if (!this.selectedItem || !shouldDelete) {
741
- LogError("Selected item is not set or shouldDelete is false");
742
- return;
743
- }
744
- this.deleteDialogOpened = false;
745
- let item = this.selectedItem;
746
- let success = false;
747
- if (item.Type === ItemType.Folder && this._currentDeleteOrUnlinkState) {
748
- success = await this.deleteFolder(item);
749
- }
750
- else if (item.Type === ItemType.Resource && this._currentDeleteOrUnlinkState) {
751
- success = await this.deleteResource(item);
752
- }
753
- else if (item.Type === ItemType.Resource && !this._currentDeleteOrUnlinkState) {
754
- success = await this.unlinkResource(item);
755
- }
756
- this.selectedItem = null;
757
- if (success) {
758
- await this.Refresh();
759
- }
760
- }
761
- async deleteFolder(item) {
762
- const folder = item.Data;
763
- if (!folder || !folder.CategoryEntity) {
764
- LogError("Folder or CategoryEntity is not set, cannot delete folder");
765
- this.sharedService.CreateSimpleNotification("Unable to delete folder", "error", 2500);
766
- return false;
767
- }
768
- const hasChildren = await this.doesFolderHaveChildren(folder.ID);
769
- if (hasChildren) {
770
- this.sharedService.CreateSimpleNotification(`Unable to delete Folder ${folder.Name} because it has children`, "error", 2500);
771
- return false;
772
- }
773
- const categoryEntity = folder.CategoryEntity;
774
- const deleteResult = await categoryEntity.Delete();
775
- if (!deleteResult) {
776
- LogError(`Unable to delete folder ${folder.Name}`, undefined, categoryEntity.LatestResult);
777
- this.sharedService.CreateSimpleNotification(`unable to delete folder ${folder.Name}.`, "error", 2500);
778
- return false;
779
- }
780
- this.sharedService.CreateSimpleNotification(`Successfully deleted folder ${folder.Name}`, "info", 2500);
781
- return true;
782
- }
783
- async deleteResource(item) {
784
- let genericEntity = item.Data;
785
- if (!genericEntity) {
786
- LogError("Item Data is not set, cannot delete resource");
787
- return false;
788
- }
789
- const deleteEvent = new BeforeDeleteItemEvent(item);
790
- this.DeleteItemEvent.emit(deleteEvent);
791
- if (deleteEvent.Cancel) {
792
- //parent will handle deletion, so we can return early
793
- return true;
794
- }
795
- const entity = item.Data;
796
- const deleteResult = await entity.Delete();
797
- if (!deleteResult) {
798
- LogError(`Unable to delete ${item.Name}`, undefined, entity.LatestResult);
799
- this.sharedService.CreateSimpleNotification(`Unable to delete ${item.Name}`, "error", 2500);
800
- return false;
801
- }
802
- return true;
803
- }
804
- async unlinkResource(item) {
805
- return true;
806
- // // remove the link by removing the Resource Link record
807
- // if (item.ResourceLinkID) {
808
- // const md = new Metadata();
809
- // const link = await md.GetEntityObject<ResourceLinkEntity>("Resource Links");
810
- // if (await link.Load(item.ResourceLinkID))
811
- // return await link.Delete();
812
- // else
813
- // return false;
814
- // }
815
- // else
816
- // return false;
817
- }
818
- async doesFolderHaveChildren(folderID) {
819
- if (!this.ResourceType.CategoryEntity) {
820
- throw new Error("ResourceType.CategoryEntity is not set, cannot check for children");
821
- }
822
- const rv = new RunView();
823
- const folderResult = await rv.RunView({
824
- EntityName: this.ResourceType.CategoryEntity,
825
- ExtraFilter: `ParentID ='${folderID}'`
826
- });
827
- if (!folderResult.Success) {
828
- throw new Error(`Unable to fetch children for folder ${folderID}. Reason: ${folderResult.ErrorMessage}`);
829
- }
830
- return folderResult.Results.length > 0;
831
- }
832
- changeViewMode(mode) {
833
- this.DisplayMode = mode;
834
- }
835
- onKeyup(Value) {
836
- this.filter = Value;
837
- this.filterItemsSubject.next(true);
838
- }
839
- onUpsertFolderNameKeyup(value) {
840
- this.upsertNewFolderName = value;
841
- }
842
- onUpsertFolderDescriptionKeyup(value) {
843
- this.upsertNewFolderDescription = value;
844
- }
845
- filterItems(filter) {
846
- if (!this.sourceItems) {
847
- this.sourceItems = [...this._items];
848
- }
849
- if (!filter) {
850
- this._items = [...this.sourceItems];
851
- return;
852
- }
853
- this._items = this.sourceItems.filter(item => {
854
- return item.Name.toLowerCase().includes(filter.toLowerCase());
855
- });
856
- }
857
- editItem(item) {
858
- if (!item || !item.Data) {
859
- LogError("Item or item data is not set");
860
- this.sharedService.CreateSimpleNotification("Unable to edit item", "error", 2500);
861
- return;
862
- }
863
- if (item.Type === ItemType.Folder) {
864
- const folder = item.Data;
865
- this.selectedFolder = folder;
866
- this.toggleUpsertFolderView(true, false);
867
- }
868
- else {
869
- const event = new BeforeUpdateItemEvent(item);
870
- this.EditItemEvent.emit(event);
871
- }
872
- }
873
- async onDropdownItemClick(dropdownItem) {
874
- if (!dropdownItem || !dropdownItem.Action) {
875
- LogError("Dropdown item or action is not set");
876
- return;
877
- }
878
- dropdownItem.Action();
879
- }
880
- toggleCopyFromView() {
881
- this.copyFromDialogOpened = !this.copyFromDialogOpened;
882
- }
883
- getCopyFromTitle() {
884
- return `Select ${this.ResourceTypeName} to Copy`;
885
- }
886
- toggleUpsertFolderView(visible, createNew) {
887
- this.upsertFolderDialogVisible = visible;
888
- if (createNew) {
889
- this.upsertNewFolderName = "";
890
- this.upsertNewFolderDescription = "";
891
- this.selectedFolder = null;
892
- }
893
- else if (visible && this.selectedFolder) {
894
- this.upsertNewFolderName = this.selectedFolder.Name;
895
- this.upsertNewFolderDescription = this.selectedFolder.Description || "";
896
- }
897
- }
898
- getIconForResourceType(item) {
899
- if (!item) {
900
- return "";
901
- }
902
- const LargeClass = "fa-3x ";
903
- if (item.Type === ItemType.Folder) {
904
- return LargeClass + "fa-regular fa-folder";
905
- }
906
- const resourceType = this._allResourceTypes.find(rt => rt.ID === this.ResourceType.ID);
907
- if (resourceType) {
908
- return LargeClass + resourceType.Icon; // + rotateStyle;
909
- }
910
- return "";
911
- }
912
- static ɵfac = function ResourceBrowserComponent_Factory(t) { return new (t || ResourceBrowserComponent)(i0.ɵɵdirectiveInject(i1.SharedService)); };
913
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ResourceBrowserComponent, selectors: [["mj-resource-browser"]], inputs: { ResourceTypeName: "ResourceTypeName", EnableCategories: "EnableCategories", CategoryEntityID: "CategoryEntityID", CurrentCategoryID: "CurrentCategoryID", EnableItemEdit: "EnableItemEdit", EnableItemDelete: "EnableItemDelete", EnableRemoveLink: "EnableRemoveLink", Title: "Title", ItemFilter: "ItemFilter", OrderBy: "OrderBy", NewItemOptions: "NewItemOptions", DisplayMode: "DisplayMode" }, outputs: { ResourceSelected: "ResourceSelected", CategoryChanged: "CategoryChanged", DisplayModeChanged: "DisplayModeChanged", NavigateToParentEvent: "NavigateToParentEvent", EditItemEvent: "EditItemEvent", DeleteItemEvent: "DeleteItemEvent" }, decls: 30, vars: 14, consts: [["searchInput", ""], ["entityFormDialog", ""], [1, "mj-page-container"], [1, "mj-header"], [1, "mj-header-title"], ["title", "Back to Parent", 1, "mj-btn-icon-only"], [1, "mj-header-icon"], [1, "fa-regular", "fa-folder"], [1, "mj-header-subtitle"], [1, "mj-header-actions"], ["textField", "Text", "themeColor", "primary", "rounded", "medium", 3, "data"], [1, "mj-toolbar"], [1, "mj-search"], ["type", "text", "size", "medium", "rounded", "medium", "fillMode", "outline", 3, "keyup", "placeholder", "clearButton"], ["kendoTextBoxPrefixTemplate", ""], [1, "mj-toolbar-actions"], ["kendoButton", "", "title", "Table View", "fillMode", "outline", "themeColor", "base", 3, "click", "toggleable", "selected"], [1, "fa-solid", "fa-table"], ["kendoButton", "", "title", "Card View", "fillMode", "outline", "themeColor", "base", 3, "click", "toggleable", "selected"], [1, "fa-solid", "fa-grip"], [1, "main-area"], [1, "mj-loading"], ["class", "mj-dialog-confirm", "title", "Confirm Action", 3, "minWidth", "width", "close", 4, "ngIf"], ["class", "mj-dialog-form", 3, "title", "minWidth", "width", "close", 4, "ngIf"], ["Mode", "complete"], ["title", "Back to Parent", 1, "mj-btn-icon-only", 3, "click"], [1, "fa-solid", "fa-arrow-left"], [1, "fa-solid", "fa-folder-open"], ["textField", "Text", "themeColor", "primary", "rounded", "medium", 3, "itemClick", "data"], [1, "button-content"], [1, "fas", "fa-plus"], [1, "fas", "fa-search", "search-prefix-icon"], ["size", "large", 3, "showText"], [1, "mj-grid-table", 3, "kendoGridBinding"], [1, "mj-grid-table", 3, "cellClick", "kendoGridBinding"], ["field", "Name", "title", "Name"], ["kendoGridCellTemplate", ""], ["field", "Description", "title", "Description"], ["field", "Type", "title", "Type"], ["title", "Actions", 3, "width"], [1, "mj-grid-name-cell"], [1, "mj-grid-name"], ["rounded", "full", "size", "small", 3, "label", "themeColor"], ["title", "Edit Item", 1, "mj-btn-icon-only", "mj-btn-sm"], ["title", "Delete Item", 1, "mj-btn-icon-only", "mj-btn-sm"], ["title", "Remove Link", 1, "mj-btn-icon-only", "mj-btn-sm"], ["title", "Edit Item", 1, "mj-btn-icon-only", "mj-btn-sm", 3, "click"], [1, "fa-regular", "fa-pen-to-square"], ["title", "Delete Item", 1, "mj-btn-icon-only", "mj-btn-sm", 3, "click"], [1, "fa-regular", "fa-trash-can"], ["title", "Remove Link", 1, "mj-btn-icon-only", "mj-btn-sm", 3, "click"], [1, "fa-solid", "fa-link-slash"], [1, "mj-empty-state"], [1, "mj-grid-responsive"], [1, "mj-empty-icon"], [1, "fa-regular", "fa-folder-open"], ["kendoButton", "", "themeColor", "primary", "rounded", "medium"], ["kendoButton", "", "themeColor", "primary", "rounded", "medium", 3, "click"], [1, "mj-kendo-icon-card", "mj-kendo-icon-card-clickable"], [1, "mj-kendo-icon-card", "mj-kendo-icon-card-clickable", 3, "click"], [1, "mj-card-actions"], [1, "mj-icon-wrapper-linked", 3, "title"], [1, "mj-card-icon-large", 3, "ngClass", "title"], [1, "mj-card-icon-large", 3, "ngClass"], [1, "fa-solid", "fa-link", "mj-link-indicator"], ["title", "Confirm Action", 1, "mj-dialog-confirm", 3, "close", "minWidth", "width"], [1, "mj-dialog-content"], [1, "mj-dialog-icon"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "mj-dialog-warning"], [1, "mj-dialog-actions"], ["kendoButton", "", "fillMode", "outline", "rounded", "medium", 3, "click"], ["kendoButton", "", "themeColor", "error", "rounded", "medium", 3, "click"], [3, "ngClass"], [1, "mj-dialog-form", 3, "close", "title", "minWidth", "width"], ["orientation", "vertical", 1, "mb-3"], ["text", "Folder Name"], ["placeholder", "Enter folder name...", "rounded", "medium", "fillMode", "outline", 3, "valueChange", "value", "clearButton"], ["orientation", "vertical"], ["text", "Description"], ["placeholder", "Enter description (optional)...", "rounded", "medium", "fillMode", "outline", 3, "valueChange", "value", "rows"], [1, "fas", "fa-folder", "search-prefix-icon"], [1, "fas", "fa-save"], [1, "fas", "fa-folder-plus"]], template: function ResourceBrowserComponent_Template(rf, ctx) { if (rf & 1) {
914
- const _r1 = i0.ɵɵgetCurrentView();
915
- i0.ɵɵelementStart(0, "div", 2)(1, "div", 3)(2, "div", 4);
916
- i0.ɵɵtemplate(3, ResourceBrowserComponent_Conditional_3_Template, 2, 0, "span", 5);
917
- i0.ɵɵelementStart(4, "div", 6);
918
- i0.ɵɵelement(5, "span", 7);
919
- i0.ɵɵelementEnd();
920
- i0.ɵɵelementStart(6, "div")(7, "h1");
921
- i0.ɵɵtext(8);
922
- i0.ɵɵelementEnd();
923
- i0.ɵɵtemplate(9, ResourceBrowserComponent_Conditional_9_Template, 3, 0, "div", 8);
924
- i0.ɵɵelementEnd()();
925
- i0.ɵɵelementStart(10, "div", 9);
926
- i0.ɵɵtemplate(11, ResourceBrowserComponent_Conditional_11_Template, 4, 1, "kendo-dropdownbutton", 10);
927
- i0.ɵɵelementEnd()();
928
- i0.ɵɵelementStart(12, "div", 11)(13, "div", 12)(14, "kendo-textbox", 13, 0);
929
- i0.ɵɵlistener("keyup", function ResourceBrowserComponent_Template_kendo_textbox_keyup_14_listener() { i0.ɵɵrestoreView(_r1); const searchInput_r5 = i0.ɵɵreference(15); return i0.ɵɵresetView(ctx.onKeyup(searchInput_r5.value)); });
930
- i0.ɵɵtemplate(16, ResourceBrowserComponent_ng_template_16_Template, 1, 0, "ng-template", 14);
931
- i0.ɵɵelementEnd()();
932
- i0.ɵɵelementStart(17, "div", 15)(18, "kendo-buttongroup")(19, "button", 16);
933
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Template_button_click_19_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.changeViewMode("List")); });
934
- i0.ɵɵelement(20, "span", 17);
935
- i0.ɵɵelementEnd();
936
- i0.ɵɵelementStart(21, "button", 18);
937
- i0.ɵɵlistener("click", function ResourceBrowserComponent_Template_button_click_21_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.changeViewMode("Tile")); });
938
- i0.ɵɵelement(22, "span", 19);
939
- i0.ɵɵelementEnd()()()();
940
- i0.ɵɵelementStart(23, "div", 20);
941
- i0.ɵɵtemplate(24, ResourceBrowserComponent_Conditional_24_Template, 2, 1, "div", 21)(25, ResourceBrowserComponent_Conditional_25_Template, 2, 1);
942
- i0.ɵɵelementEnd();
943
- i0.ɵɵtemplate(26, ResourceBrowserComponent_kendo_dialog_26_Template, 19, 7, "kendo-dialog", 22)(27, ResourceBrowserComponent_kendo_dialog_27_Template, 14, 8, "kendo-dialog", 23);
944
- i0.ɵɵelement(28, "mj-entity-form-dialog", 24, 1);
945
- i0.ɵɵelementEnd();
946
- } if (rf & 2) {
947
- i0.ɵɵadvance(3);
948
- i0.ɵɵconditional(ctx.CurrentCategoryID ? 3 : -1);
949
- i0.ɵɵadvance(5);
950
- i0.ɵɵtextInterpolate(ctx.Title);
951
- i0.ɵɵadvance();
952
- i0.ɵɵconditional(ctx.CurrentCategoryID ? 9 : -1);
953
- i0.ɵɵadvance(2);
954
- i0.ɵɵconditional(ctx.ItemOptions.length > 0 ? 11 : -1);
955
- i0.ɵɵadvance(3);
956
- i0.ɵɵpropertyInterpolate1("placeholder", "Search ", ctx.Title, "...");
957
- i0.ɵɵproperty("clearButton", true);
958
- i0.ɵɵadvance(5);
959
- i0.ɵɵproperty("toggleable", true)("selected", ctx.DisplayMode === "List");
960
- i0.ɵɵadvance(2);
961
- i0.ɵɵproperty("toggleable", true)("selected", ctx.DisplayMode === "Tile");
962
- i0.ɵɵadvance(3);
963
- i0.ɵɵconditional(ctx.IsLoading ? 24 : 25);
964
- i0.ɵɵadvance(2);
965
- i0.ɵɵproperty("ngIf", ctx.deleteDialogOpened);
966
- i0.ɵɵadvance();
967
- i0.ɵɵproperty("ngIf", ctx.upsertFolderDialogVisible);
968
- } }, dependencies: [i2.NgClass, i2.NgIf, i3.GridComponent, i3.DataBindingDirective, i3.ColumnComponent, i3.CellTemplateDirective, i4.DialogComponent, i4.DialogActionsComponent, i5.ButtonGroupComponent, i5.ButtonComponent, i5.DropDownButtonComponent, i5.ChipComponent, i6.TextAreaComponent, i6.TextBoxComponent, i6.TextBoxPrefixTemplateDirective, i6.FormFieldComponent, i7.LabelComponent, i8.CardComponent, i8.CardBodyComponent, i9.EntityFormDialogComponent, i10.LoadingComponent], styles: ["\n\n\n\n\n.generic-browser-list-container[_ngcontent-%COMP%] {\n @extend .mj-page-container;\n}\n\n\n\n.title-wrapper[_ngcontent-%COMP%] {\n @extend .mj-toolbar;\n margin-bottom: 20px;\n}\n\n.title-flex-display[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 15px;\n}\n\n.title-folder[_ngcontent-%COMP%] {\n width: 44px;\n height: 44px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: var(--border-radius);\n transition: var(--transition-time);\n color: var(--mj-blue);\n}\n\n.title-folder[_ngcontent-%COMP%]:hover {\n background: var(--gray-600);\n color: var(--navy);\n}\n\n.title-wrapper[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n @extend .mj-toolbar-title;\n margin: 0;\n font-size: 1.5rem;\n font-weight: 600;\n color: var(--navy);\n}\n\n\n\n.title-wrapper[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n padding-bottom: 0;\n margin-bottom: 30px;\n}\n\n.search[_ngcontent-%COMP%] {\n @extend .mj-search;\n max-width: 360px;\n}\n\n.filter-wrapper[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.btn-cmn[_ngcontent-%COMP%] {\n @extend .mj-btn-icon-only;\n \n &.active {\n background: var(--mj-blue);\n color: var(--white-color);\n border-color: var(--mj-blue);\n }\n}\n\n\n\n .title-wrapper .k-dropdown-button .k-button {\n @extend .mj-btn-primary;\n \n .k-button-text {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n}\n\n\n\n.main-area[_ngcontent-%COMP%] {\n position: relative;\n}\n\n\n\n.nav-container[_ngcontent-%COMP%] {\n @extend .mj-grid-responsive;\n}\n\n.nav-item[_ngcontent-%COMP%] {\n @extend .mj-card;\n @extend .mj-grid-item;\n position: relative;\n}\n\n.nav-item-icon[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin-bottom: 16px;\n \n i, span {\n font-size: 3rem;\n color: var(--mj-blue);\n transition: var(--transition-time);\n }\n}\n\n.nav-item-content[_ngcontent-%COMP%] {\n @extend .mj-card-body;\n text-align: center;\n padding-top: 0;\n}\n\n.nav-item-title[_ngcontent-%COMP%] {\n margin: 0 0 8px 0;\n font-size: 1.25rem;\n font-weight: 600;\n color: var(--navy);\n cursor: pointer;\n transition: var(--transition-time);\n}\n\n.nav-item-title[_ngcontent-%COMP%]:hover {\n color: var(--mj-blue);\n text-decoration: underline;\n}\n\n.nav-item-subtitle[_ngcontent-%COMP%] {\n margin: 0 0 16px 0;\n font-size: 0.9rem;\n color: var(--gray-800);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.nav-item-edit[_ngcontent-%COMP%] {\n @extend .mj-card-actions;\n position: static;\n opacity: 1;\n justify-content: center;\n margin-top: 12px;\n}\n\n.nav-item[_ngcontent-%COMP%]:hover .nav-item-edit[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n\n\n.list-btn[_ngcontent-%COMP%] {\n @extend .mj-btn-icon-only;\n @extend .mj-btn-sm;\n \n &:hover {\n color: var(--white-color);\n background: var(--mj-blue);\n border-color: var(--mj-blue);\n }\n}\n\n\n\n.nav-item[_ngcontent-%COMP%]:hover {\n .nav-item-icon i,\n .nav-item-icon span {\n color: var(--navy);\n transform: scale(1.1);\n }\n \n .nav-item-title {\n color: var(--mj-blue);\n }\n}\n\n\n\n.kendo-grid[_ngcontent-%COMP%] {\n border-radius: var(--border-radius);\n overflow: hidden;\n box-shadow: var(--shadow);\n}\n\n.grid-wrapper[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n\n\n.dialog-wrapper[_ngcontent-%COMP%] {\n .k-window-content {\n padding: 0;\n }\n}\n\n.dialog-wrapper[_ngcontent-%COMP%] .k-window-title[_ngcontent-%COMP%] {\n font-size: 1.5rem;\n font-weight: 600;\n color: var(--navy);\n margin: 0;\n}\n\n.dialog-wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 1rem;\n color: var(--gray-900);\n line-height: 1.5;\n margin: 0;\n}\n\n.popup-actions-btn[_ngcontent-%COMP%] {\n @extend .mj-card-footer;\n gap: 12px;\n}\n\n.popup-actions-btn[_ngcontent-%COMP%] .cancel-btn[_ngcontent-%COMP%] {\n @extend .mj-btn-primary;\n flex: 1;\n}\n\n.popup-actions-btn[_ngcontent-%COMP%] .yes-btn[_ngcontent-%COMP%] {\n @extend .mj-btn-secondary;\n flex: 1;\n}\n\n\n\n.dialog-wrapper[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.dialog-wrapper[_ngcontent-%COMP%] .search[_ngcontent-%COMP%] kendo-label[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n \n .k-label {\n color: var(--navy);\n font-size: 14px;\n font-weight: 500;\n }\n}\n\n.dialog-wrapper[_ngcontent-%COMP%] kendo-textbox[_ngcontent-%COMP%] {\n width: 100%;\n \n .k-input {\n border-radius: var(--border-radius);\n border: 1px solid var(--gray-700);\n padding: 10px 12px;\n font-size: 16px;\n transition: var(--transition-time);\n \n &:focus {\n border-color: var(--mj-blue);\n box-shadow: 0 0 0 2px rgba(0, 118, 182, 0.2);\n }\n }\n}\n\n\n\n.breadcrumb-wrap[_ngcontent-%COMP%] {\n @extend .mj-breadcrumb;\n}\n\n.breadcrumb-icon[_ngcontent-%COMP%]:hover {\n color: var(--mj-blue);\n}\n\n\n\n .k-menu-popup {\n background: var(--white-color);\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n border: 1px solid var(--gray-700);\n padding: 8px 0;\n}\n\n .k-menu-popup .k-menu-link {\n padding: 10px 16px;\n color: var(--navy);\n transition: var(--transition-time);\n border-radius: 0;\n}\n\n .k-menu-popup .k-menu-link:hover {\n background: var(--gray-600);\n color: var(--mj-blue);\n}\n\n\n\n.margin-left-small[_ngcontent-%COMP%] {\n margin-left: 10px;\n}\n\n.padding-top-small[_ngcontent-%COMP%] {\n padding-top: 10px;\n}\n\n.cursor-pointer[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\n\n\n.card-wrapper[_ngcontent-%COMP%] {\n min-width: 280px;\n min-height: 200px;\n}\n\n\n\n .card-header-entity .title-wrap h1 {\n @extend .mj-header-title;\n font-size: 2.25rem !important;\n line-height: 1.2 !important;\n color: var(--navy) !important;\n margin: 0 !important;\n}\n\n .card-header-entity .add-item .k-button {\n @extend .mj-btn-primary;\n}\n\n .card-header-entity .add-item .k-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 8px rgba(0, 118, 182, 0.3);\n}\n\n\n\n\n\n\n@media (max-width: 768px) {\n .title-wrapper[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: stretch;\n gap: 15px;\n }\n \n .filter-wrapper[_ngcontent-%COMP%] {\n justify-content: space-between;\n }\n \n .search[_ngcontent-%COMP%] {\n max-width: none;\n }\n}\n\n@media (max-width: 480px) {\n .title-flex-display[_ngcontent-%COMP%] {\n gap: 10px;\n }\n \n .filter-wrapper[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n gap: 8px;\n }\n}"] });
969
- }
970
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ResourceBrowserComponent, [{
971
- type: Component,
972
- args: [{ selector: 'mj-resource-browser', template: "<div class=\"mj-page-container\">\n <!-- Header Section -->\n <div class=\"mj-header\">\n <div class=\"mj-header-title\">\n @if(CurrentCategoryID) {\n <span title=\"Back to Parent\" class=\"mj-btn-icon-only\" (click)=\"goToParent()\">\n <span class=\"fa-solid fa-arrow-left\"></span>\n </span>\n }\n <div class=\"mj-header-icon\">\n <span class=\"fa-regular fa-folder\"></span>\n </div>\n <div>\n <h1>{{Title}}</h1>\n @if(CurrentCategoryID) {\n <div class=\"mj-header-subtitle\">\n <span class=\"fa-solid fa-folder-open\"></span>\n Current Folder\n </div>\n }\n </div>\n </div>\n \n <div class=\"mj-header-actions\">\n @if(ItemOptions.length > 0) {\n <kendo-dropdownbutton \n (itemClick)=\"onDropdownItemClick($event)\" \n [data]=\"ItemOptions\" \n textField=\"Text\"\n themeColor=\"primary\"\n rounded=\"medium\">\n <span class=\"button-content\">\n <i class=\"fas fa-plus\"></i>\n Create New\n </span>\n </kendo-dropdownbutton> \n }\n </div>\n </div>\n\n <!-- Toolbar Section -->\n <div class=\"mj-toolbar\">\n <div class=\"mj-search\">\n <kendo-textbox \n type=\"text\" \n #searchInput \n placeholder=\"Search {{Title}}...\" \n (keyup)=\"onKeyup(searchInput.value)\"\n [clearButton]=\"true\"\n size=\"medium\"\n rounded=\"medium\"\n fillMode=\"outline\">\n <ng-template kendoTextBoxPrefixTemplate>\n <i class=\"fas fa-search search-prefix-icon\"></i>\n </ng-template>\n </kendo-textbox>\n </div>\n \n <div class=\"mj-toolbar-actions\">\n <kendo-buttongroup>\n <button kendoButton \n [toggleable]=\"true\" \n [selected]=\"DisplayMode === 'List'\"\n (click)=\"changeViewMode('List')\" \n title=\"Table View\"\n fillMode=\"outline\"\n themeColor=\"base\">\n <span class=\"fa-solid fa-table\"></span>\n </button>\n <button kendoButton \n [toggleable]=\"true\" \n [selected]=\"DisplayMode === 'Tile'\"\n (click)=\"changeViewMode('Tile')\" \n title=\"Card View\"\n fillMode=\"outline\"\n themeColor=\"base\">\n <span class=\"fa-solid fa-grip\"></span>\n </button>\n </kendo-buttongroup>\n </div>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"main-area\">\n <!-- Loading State -->\n @if (IsLoading) {\n <div class=\"mj-loading\">\n <mj-loading [showText]=\"false\" size=\"large\"></mj-loading>\n </div>\n }\n @else {\n <!-- List View -->\n @if(DisplayMode === 'List') {\n <kendo-grid \n (cellClick)=\"onCellItemClicked($event)\" \n [kendoGridBinding]=\"Items\"\n class=\"mj-grid-table\">\n <kendo-grid-column field=\"Name\" title=\"Name\">\n <ng-template kendoGridCellTemplate let-dataItem>\n <div class=\"mj-grid-name-cell\">\n <span class=\"mj-grid-name\">{{ dataItem.Name }}</span>\n </div>\n </ng-template>\n </kendo-grid-column>\n <kendo-grid-column field=\"Description\" title=\"Description\"></kendo-grid-column>\n <kendo-grid-column field=\"Type\" title=\"Type\">\n <ng-template kendoGridCellTemplate let-dataItem>\n <kendo-chip \n [label]=\"dataItem.Type\" \n rounded=\"full\"\n [themeColor]=\"dataItem.Type === 'Folder' ? 'info' : 'base'\"\n size=\"small\">\n </kendo-chip>\n </ng-template>\n </kendo-grid-column>\n <kendo-grid-column title=\"Actions\" [width]=\"150\">\n <ng-template kendoGridCellTemplate let-dataItem>\n <div class=\"mj-toolbar-actions\">\n @if(EnableItemEdit && (!dataItem.IsLink || dataItem.LinkPermissionLevel === 'Owner' || dataItem.LinkPermissionLevel === 'Edit')) {\n <button class=\"mj-btn-icon-only mj-btn-sm\" (click)=\"editItem(dataItem)\" title=\"Edit Item\">\n <span class=\"fa-regular fa-pen-to-square\"></span>\n </button>\n }\n @if(EnableItemDelete && (!dataItem.IsLink || dataItem.LinkPermissionLevel === 'Owner')) {\n <button class=\"mj-btn-icon-only mj-btn-sm\" (click)=\"deleteItem(dataItem)\" title=\"Delete Item\">\n <span class=\"fa-regular fa-trash-can\"></span>\n </button> \n }\n @if(EnableRemoveLink && dataItem.IsLink) {\n <button class=\"mj-btn-icon-only mj-btn-sm\" (click)=\"unlinkItem(dataItem)\" title=\"Remove Link\">\n <span class=\"fa-solid fa-link-slash\"></span>\n </button> \n }\n </div>\n </ng-template>\n </kendo-grid-column>\n </kendo-grid>\n }\n @else {\n <!-- Card View -->\n @if(Items.length === 0) {\n <div class=\"mj-empty-state\">\n <div class=\"mj-empty-icon\">\n <span class=\"fa-regular fa-folder-open\"></span>\n </div>\n <h3>No {{Title}} Found</h3>\n <p>There are no items to display in this category.</p>\n @if(ItemOptions.length > 0) {\n <button kendoButton themeColor=\"primary\" rounded=\"medium\" (click)=\"onDropdownItemClick({Text: ItemOptions[0].Text})\">\n <span class=\"button-content\">\n <i class=\"fas fa-plus\"></i>\n Create Your First Item\n </span>\n </button>\n }\n </div>\n }\n @else {\n <div class=\"mj-grid-responsive\">\n @for(item of Items; track item) {\n <kendo-card class=\"mj-kendo-icon-card mj-kendo-icon-card-clickable\" (click)=\"itemClick(item)\">\n <!-- Card Actions -->\n <div class=\"mj-card-actions\">\n @if(EnableItemEdit && (!item.IsLink || item.LinkPermissionLevel === 'Owner' || item.LinkPermissionLevel === 'Edit')) {\n <button class=\"mj-btn-icon-only mj-btn-sm\" (click)=\"editItem(item); $event.stopPropagation()\" title=\"Edit Item\">\n <span class=\"fa-regular fa-pen-to-square\"></span>\n </button>\n }\n @if(EnableItemDelete && (!item.IsLink || item.LinkPermissionLevel === 'Owner')) {\n <button class=\"mj-btn-icon-only mj-btn-sm\" (click)=\"deleteItem(item); $event.stopPropagation()\" title=\"Delete Item\">\n <span class=\"fa-regular fa-trash-can\"></span>\n </button> \n }\n @else if (EnableRemoveLink && item.IsLink) {\n <button class=\"mj-btn-icon-only mj-btn-sm\" (click)=\"unlinkItem(item); $event.stopPropagation()\" title=\"Remove Link\">\n <span class=\"fa-solid fa-link-slash\"></span>\n </button> \n }\n </div>\n \n <!-- Card Body -->\n <kendo-card-body>\n @if(item.IsLink) {\n <div class=\"mj-icon-wrapper-linked\" [title]=\"item.Name + ' (Shared)'\">\n <span [ngClass]=\"getIconForResourceType(item)\" class=\"mj-card-icon-large\"></span>\n <span class=\"fa-solid fa-link mj-link-indicator\"></span>\n </div>\n }\n @else {\n <span [ngClass]=\"getIconForResourceType(item)\" class=\"mj-card-icon-large\" [title]=\"item.Name\"></span>\n }\n \n <h3>{{ item.Name }}</h3>\n <p>{{ item.Description || 'No description available' }}</p>\n \n <!-- Type chip -->\n <kendo-chip \n [label]=\"item.Type\" \n rounded=\"full\"\n [themeColor]=\"item.Type === 'Folder' ? 'info' : 'base'\"\n size=\"small\">\n </kendo-chip>\n </kendo-card-body>\n </kendo-card>\n }\n </div>\n }\n }\n }\n</div>\n\n <!-- Delete Confirmation Dialog -->\n <kendo-dialog \n [minWidth]=\"400\"\n [width]=\"500\"\n class=\"mj-dialog-confirm\" \n title=\"Confirm Action\" \n *ngIf=\"deleteDialogOpened\" \n (close)=\"onConfirmDeleteItem(false)\">\n \n <div class=\"mj-dialog-content\">\n <div class=\"mj-dialog-icon\">\n <span class=\"fa-solid fa-triangle-exclamation\"></span>\n </div>\n <p>\n Are you sure you want to \n <strong>{{(selectedItem?.IsLink && selectedItem?.LinkPermissionLevel === 'Owner') || !selectedItem?.IsLink ? 'delete' : 'unlink'}}</strong> \n <strong>{{selectedItem?.Name}}</strong>?\n </p>\n @if((selectedItem?.IsLink && selectedItem?.LinkPermissionLevel === 'Owner') || !selectedItem?.IsLink) {\n <p class=\"mj-dialog-warning\">This action cannot be undone.</p>\n }\n </div>\n \n <kendo-dialog-actions class=\"mj-dialog-actions\">\n <button kendoButton fillMode=\"outline\" rounded=\"medium\" (click)=\"onConfirmDeleteItem(false)\">\n Cancel\n </button>\n <button kendoButton themeColor=\"error\" rounded=\"medium\" (click)=\"onConfirmDeleteItem(true)\">\n <span class=\"button-content\">\n <i [ngClass]=\"(selectedItem?.IsLink && selectedItem?.LinkPermissionLevel === 'Owner') || !selectedItem?.IsLink ? 'fas fa-trash' : 'fas fa-link-slash'\"></i>\n {{(selectedItem?.IsLink && selectedItem?.LinkPermissionLevel === 'Owner') || !selectedItem?.IsLink ? 'Delete' : 'Unlink'}}\n </span>\n </button>\n </kendo-dialog-actions>\n </kendo-dialog>\n\n <!-- Folder Creation/Edit Dialog -->\n <kendo-dialog \n [title]=\"selectedFolder ? 'Edit Folder' : 'Create New Folder'\" \n *ngIf=\"upsertFolderDialogVisible\" \n (close)=\"toggleUpsertFolderView(false, false)\"\n [minWidth]=\"400\"\n [width]=\"500\"\n class=\"mj-dialog-form\">\n \n <div class=\"mj-dialog-content\">\n <kendo-formfield orientation=\"vertical\" class=\"mb-3\">\n <kendo-label text=\"Folder Name\"></kendo-label>\n <kendo-textbox \n [value]=\"upsertNewFolderName\" \n placeholder=\"Enter folder name...\" \n (valueChange)=\"onUpsertFolderNameKeyup($event)\"\n rounded=\"medium\"\n fillMode=\"outline\"\n [clearButton]=\"true\">\n <ng-template kendoTextBoxPrefixTemplate>\n <i class=\"fas fa-folder search-prefix-icon\"></i>\n </ng-template>\n </kendo-textbox>\n </kendo-formfield>\n \n <kendo-formfield orientation=\"vertical\">\n <kendo-label text=\"Description\"></kendo-label>\n <kendo-textarea \n [value]=\"upsertNewFolderDescription\" \n placeholder=\"Enter description (optional)...\" \n (valueChange)=\"onUpsertFolderDescriptionKeyup($event)\"\n rounded=\"medium\"\n fillMode=\"outline\"\n [rows]=\"3\">\n </kendo-textarea>\n </kendo-formfield>\n </div>\n \n <kendo-dialog-actions class=\"mj-dialog-actions\">\n <button kendoButton fillMode=\"outline\" rounded=\"medium\" (click)=\"toggleUpsertFolderView(false, false)\">\n Cancel\n </button>\n @if(selectedFolder) {\n <button kendoButton themeColor=\"primary\" rounded=\"medium\" (click)=\"updateFolder()\">\n <span class=\"button-content\">\n <i class=\"fas fa-save\"></i>\n Update Folder\n </span>\n </button>\n }\n @else {\n <button kendoButton themeColor=\"primary\" rounded=\"medium\" (click)=\"createFolder()\">\n <span class=\"button-content\">\n <i class=\"fas fa-folder-plus\"></i>\n Create Folder\n </span>\n </button>\n }\n </kendo-dialog-actions>\n </kendo-dialog>\n\n <!-- Entity Form Dialog -->\n <mj-entity-form-dialog\n #entityFormDialog\n Mode=\"complete\">\n </mj-entity-form-dialog>\n</div>", styles: ["/* ===================================\n RESOURCE BROWSER COMPONENT - STANDARDIZED\n =================================== */\n\n.generic-browser-list-container {\n @extend .mj-page-container;\n}\n\n/* Header Section */\n.title-wrapper {\n @extend .mj-toolbar;\n margin-bottom: 20px;\n}\n\n.title-flex-display {\n display: flex;\n align-items: center;\n gap: 15px;\n}\n\n.title-folder {\n width: 44px;\n height: 44px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: var(--border-radius);\n transition: var(--transition-time);\n color: var(--mj-blue);\n}\n\n.title-folder:hover {\n background: var(--gray-600);\n color: var(--navy);\n}\n\n.title-wrapper h4 {\n @extend .mj-toolbar-title;\n margin: 0;\n font-size: 1.5rem;\n font-weight: 600;\n color: var(--navy);\n}\n\n/* Search and Filter Section */\n.title-wrapper:last-child {\n border-bottom: none;\n padding-bottom: 0;\n margin-bottom: 30px;\n}\n\n.search {\n @extend .mj-search;\n max-width: 360px;\n}\n\n.filter-wrapper {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.btn-cmn {\n @extend .mj-btn-icon-only;\n \n &.active {\n background: var(--mj-blue);\n color: var(--white-color);\n border-color: var(--mj-blue);\n }\n}\n\n/* Create New Dropdown */\n::ng-deep .title-wrapper .k-dropdown-button .k-button {\n @extend .mj-btn-primary;\n \n .k-button-text {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n}\n\n/* Main Content Area */\n.main-area {\n position: relative;\n}\n\n/* Navigation Container (Tile View) */\n.nav-container {\n @extend .mj-grid-responsive;\n}\n\n.nav-item {\n @extend .mj-card;\n @extend .mj-grid-item;\n position: relative;\n}\n\n.nav-item-icon {\n display: flex;\n justify-content: center;\n margin-bottom: 16px;\n \n i, span {\n font-size: 3rem;\n color: var(--mj-blue);\n transition: var(--transition-time);\n }\n}\n\n.nav-item-content {\n @extend .mj-card-body;\n text-align: center;\n padding-top: 0;\n}\n\n.nav-item-title {\n margin: 0 0 8px 0;\n font-size: 1.25rem;\n font-weight: 600;\n color: var(--navy);\n cursor: pointer;\n transition: var(--transition-time);\n}\n\n.nav-item-title:hover {\n color: var(--mj-blue);\n text-decoration: underline;\n}\n\n.nav-item-subtitle {\n margin: 0 0 16px 0;\n font-size: 0.9rem;\n color: var(--gray-800);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.nav-item-edit {\n @extend .mj-card-actions;\n position: static;\n opacity: 1;\n justify-content: center;\n margin-top: 12px;\n}\n\n.nav-item:hover .nav-item-edit {\n opacity: 1;\n}\n\n/* List Item Buttons */\n.list-btn {\n @extend .mj-btn-icon-only;\n @extend .mj-btn-sm;\n \n &:hover {\n color: var(--white-color);\n background: var(--mj-blue);\n border-color: var(--mj-blue);\n }\n}\n\n/* Card Hover Effects */\n.nav-item:hover {\n .nav-item-icon i,\n .nav-item-icon span {\n color: var(--navy);\n transform: scale(1.1);\n }\n \n .nav-item-title {\n color: var(--mj-blue);\n }\n}\n\n/* Grid View Styles */\n.kendo-grid {\n border-radius: var(--border-radius);\n overflow: hidden;\n box-shadow: var(--shadow);\n}\n\n.grid-wrapper {\n display: flex;\n align-items: center;\n gap: 8px;\n justify-content: center;\n}\n\n/* Dialog Styles */\n.dialog-wrapper {\n .k-window-content {\n padding: 0;\n }\n}\n\n.dialog-wrapper .k-window-title {\n font-size: 1.5rem;\n font-weight: 600;\n color: var(--navy);\n margin: 0;\n}\n\n.dialog-wrapper p {\n font-size: 1rem;\n color: var(--gray-900);\n line-height: 1.5;\n margin: 0;\n}\n\n.popup-actions-btn {\n @extend .mj-card-footer;\n gap: 12px;\n}\n\n.popup-actions-btn .cancel-btn {\n @extend .mj-btn-primary;\n flex: 1;\n}\n\n.popup-actions-btn .yes-btn {\n @extend .mj-btn-secondary;\n flex: 1;\n}\n\n/* Form Styles */\n.dialog-wrapper .search {\n margin-bottom: 20px;\n}\n\n.dialog-wrapper .search kendo-label {\n display: flex;\n flex-direction: column;\n gap: 8px;\n \n .k-label {\n color: var(--navy);\n font-size: 14px;\n font-weight: 500;\n }\n}\n\n.dialog-wrapper kendo-textbox {\n width: 100%;\n \n .k-input {\n border-radius: var(--border-radius);\n border: 1px solid var(--gray-700);\n padding: 10px 12px;\n font-size: 16px;\n transition: var(--transition-time);\n \n &:focus {\n border-color: var(--mj-blue);\n box-shadow: 0 0 0 2px rgba(0, 118, 182, 0.2);\n }\n }\n}\n\n/* Breadcrumb */\n.breadcrumb-wrap {\n @extend .mj-breadcrumb;\n}\n\n.breadcrumb-icon:hover {\n color: var(--mj-blue);\n}\n\n/* Context Menu */\n::ng-deep .k-menu-popup {\n background: var(--white-color);\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n border: 1px solid var(--gray-700);\n padding: 8px 0;\n}\n\n::ng-deep .k-menu-popup .k-menu-link {\n padding: 10px 16px;\n color: var(--navy);\n transition: var(--transition-time);\n border-radius: 0;\n}\n\n::ng-deep .k-menu-popup .k-menu-link:hover {\n background: var(--gray-600);\n color: var(--mj-blue);\n}\n\n/* Utility Classes */\n.margin-left-small {\n margin-left: 10px;\n}\n\n.padding-top-small {\n padding-top: 10px;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n/* Card Wrapper Override for Legacy Support */\n.card-wrapper {\n min-width: 280px;\n min-height: 200px;\n}\n\n/* Legacy Card Header Overrides */\n::ng-deep .card-header-entity .title-wrap h1 {\n @extend .mj-header-title;\n font-size: 2.25rem !important;\n line-height: 1.2 !important;\n color: var(--navy) !important;\n margin: 0 !important;\n}\n\n::ng-deep .card-header-entity .add-item .k-button {\n @extend .mj-btn-primary;\n}\n\n::ng-deep .card-header-entity .add-item .k-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 8px rgba(0, 118, 182, 0.3);\n}\n\n/* ===================================\n RESPONSIVE DESIGN\n =================================== */\n\n@media (max-width: 768px) {\n .title-wrapper {\n flex-direction: column;\n align-items: stretch;\n gap: 15px;\n }\n \n .filter-wrapper {\n justify-content: space-between;\n }\n \n .search {\n max-width: none;\n }\n}\n\n@media (max-width: 480px) {\n .title-flex-display {\n gap: 10px;\n }\n \n .filter-wrapper {\n flex-wrap: wrap;\n gap: 8px;\n }\n}"] }]
973
- }], () => [{ type: i1.SharedService }], { ResourceTypeName: [{
974
- type: Input,
975
- args: [{ required: true }]
976
- }], EnableCategories: [{
977
- type: Input
978
- }], CategoryEntityID: [{
979
- type: Input
980
- }], CurrentCategoryID: [{
981
- type: Input
982
- }], EnableItemEdit: [{
983
- type: Input
984
- }], EnableItemDelete: [{
985
- type: Input
986
- }], EnableRemoveLink: [{
987
- type: Input
988
- }], Title: [{
989
- type: Input
990
- }], ItemFilter: [{
991
- type: Input
992
- }], OrderBy: [{
993
- type: Input
994
- }], NewItemOptions: [{
995
- type: Input
996
- }], DisplayMode: [{
997
- type: Input
998
- }], ResourceSelected: [{
999
- type: Output
1000
- }], CategoryChanged: [{
1001
- type: Output
1002
- }], DisplayModeChanged: [{
1003
- type: Output
1004
- }], NavigateToParentEvent: [{
1005
- type: Output
1006
- }], EditItemEvent: [{
1007
- type: Output
1008
- }], DeleteItemEvent: [{
1009
- type: Output
1010
- }] }); })();
1011
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ResourceBrowserComponent, { className: "ResourceBrowserComponent" }); })();
1012
- //# sourceMappingURL=resource-browser.component.js.map