@memberjunction/ng-explorer-core 2.47.0 → 2.49.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.
- package/dist/app-routing.module.js +40 -53
- package/dist/app-routing.module.js.map +1 -1
- package/dist/generic/Events.types.js +104 -0
- package/dist/generic/Events.types.js.map +1 -1
- package/dist/generic/Item.types.js +28 -14
- package/dist/generic/Item.types.js.map +1 -1
- package/dist/generic/PathData.types.js +5 -0
- package/dist/generic/PathData.types.js.map +1 -1
- package/dist/generic/app-nav-view.types.js +3 -1
- package/dist/generic/app-nav-view.types.js.map +1 -1
- package/dist/lib/app-view/application-view.component.js +273 -294
- package/dist/lib/app-view/application-view.component.js.map +1 -1
- package/dist/lib/auth-button/auth-button.component.js +13 -22
- package/dist/lib/auth-button/auth-button.component.js.map +1 -1
- package/dist/lib/base-browser-component/base-browser-component.js +96 -108
- package/dist/lib/base-browser-component/base-browser-component.js.map +1 -1
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +106 -124
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.js.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +257 -281
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js.map +1 -1
- package/dist/lib/data-browser-component/data-browser.component.js +122 -137
- package/dist/lib/data-browser-component/data-browser.component.js.map +1 -1
- package/dist/lib/expansion-panel-component/expansion-panel-component.js +100 -117
- package/dist/lib/expansion-panel-component/expansion-panel-component.js.map +1 -1
- package/dist/lib/favorites/favorites.component.js +44 -54
- package/dist/lib/favorites/favorites.component.js.map +1 -1
- package/dist/lib/files/files.component.js +12 -11
- package/dist/lib/files/files.component.js.map +1 -1
- package/dist/lib/generic/form-toolbar.js +21 -20
- package/dist/lib/generic/form-toolbar.js.map +1 -1
- package/dist/lib/generic/resource-container-component.js +23 -20
- package/dist/lib/generic/resource-container-component.js.map +1 -1
- package/dist/lib/generic-browse-list/generic-browse-list.component.js +48 -46
- package/dist/lib/generic-browse-list/generic-browse-list.component.js.map +1 -1
- package/dist/lib/generic-browser-list/generic-browser-list.component.js +353 -386
- package/dist/lib/generic-browser-list/generic-browser-list.component.js.map +1 -1
- package/dist/lib/guards/auth-guard.service.js +4 -2
- package/dist/lib/guards/auth-guard.service.js.map +1 -1
- package/dist/lib/guards/entities.guard.js +1 -1
- package/dist/lib/guards/entities.guard.js.map +1 -1
- package/dist/lib/header/MSFT_UserImageService.js +4 -3
- package/dist/lib/header/MSFT_UserImageService.js.map +1 -1
- package/dist/lib/header/header.component.js +111 -121
- package/dist/lib/header/header.component.js.map +1 -1
- package/dist/lib/home-component/home.component.js +34 -42
- package/dist/lib/home-component/home.component.js.map +1 -1
- package/dist/lib/home-wrapper/home-wrapper.component.js +6 -6
- package/dist/lib/home-wrapper/home-wrapper.component.js.map +1 -1
- package/dist/lib/list-view/list-view.component.js +132 -152
- package/dist/lib/list-view/list-view.component.js.map +1 -1
- package/dist/lib/navigation/navigation.component.js +568 -615
- package/dist/lib/navigation/navigation.component.js.map +1 -1
- package/dist/lib/query-browser-component/query-browser.component.js +30 -39
- package/dist/lib/query-browser-component/query-browser.component.js.map +1 -1
- package/dist/lib/report-browser-component/report-browser.component.js +18 -30
- package/dist/lib/report-browser-component/report-browser.component.js.map +1 -1
- package/dist/lib/resource-browser/resource-browser.component.js +435 -457
- package/dist/lib/resource-browser/resource-browser.component.js.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +12 -25
- package/dist/lib/resource-wrappers/dashboard-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/list-detail-resource.component.js +18 -31
- package/dist/lib/resource-wrappers/list-detail-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/query-resource.component.js +15 -28
- package/dist/lib/resource-wrappers/query-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/record-resource.component.js +35 -47
- package/dist/lib/resource-wrappers/record-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/report-resource.component.js +15 -28
- package/dist/lib/resource-wrappers/report-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.js +21 -34
- package/dist/lib/resource-wrappers/search-results-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +23 -37
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/single-application/single-application.component.js +15 -20
- package/dist/lib/single-application/single-application.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +81 -95
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +28 -29
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +51 -64
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +158 -165
- package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
- package/dist/lib/single-entity/single-entity.component.js +106 -118
- package/dist/lib/single-entity/single-entity.component.js.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.js +265 -287
- package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
- package/dist/lib/single-query/single-query.component.js +35 -44
- package/dist/lib/single-query/single-query.component.js.map +1 -1
- package/dist/lib/single-record/single-record.component.js +64 -73
- package/dist/lib/single-record/single-record.component.js.map +1 -1
- package/dist/lib/single-report/single-report.component.js +33 -43
- package/dist/lib/single-report/single-report.component.js.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.js +18 -30
- package/dist/lib/single-search-result/single-search-result.component.js.map +1 -1
- package/dist/lib/single-view/single-view.component.js +107 -124
- package/dist/lib/single-view/single-view.component.js.map +1 -1
- package/dist/lib/tabbed-dashboard/tabbed-dashboard.component.js +197 -210
- package/dist/lib/tabbed-dashboard/tabbed-dashboard.component.js.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +137 -155
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/lib/user-profile/user-profile.component.js +10 -8
- package/dist/lib/user-profile/user-profile.component.js.map +1 -1
- package/dist/module.js +51 -51
- package/dist/module.js.map +1 -1
- package/package.json +25 -25
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
11
2
|
import { ResourceData } from '@memberjunction/core-entities';
|
|
12
3
|
import { SharedService } from '@memberjunction/ng-shared';
|
|
@@ -33,28 +24,24 @@ function EditDashboardComponent_kendo_tilelayout_item_9_Template(rf, ctx) { if (
|
|
|
33
24
|
i0.ɵɵtextInterpolate1(" ", item_r2.title, " ");
|
|
34
25
|
} }
|
|
35
26
|
export class EditDashboardComponent {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.itemsChanged = false;
|
|
45
|
-
this.resourceType = null;
|
|
46
|
-
}
|
|
27
|
+
onSave = new EventEmitter();
|
|
28
|
+
onClose = new EventEmitter();
|
|
29
|
+
triggerAddItem = new EventEmitter();
|
|
30
|
+
editMode = false;
|
|
31
|
+
config = new DashboardConfigDetails();
|
|
32
|
+
items = [];
|
|
33
|
+
_items = [];
|
|
34
|
+
itemsChanged = false;
|
|
47
35
|
get ResourceTypes() {
|
|
48
36
|
return SharedService.Instance.ResourceTypes.filter((rt) => rt.Name !== 'Dashboards' && rt.Name !== 'Records');
|
|
49
37
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
38
|
+
resourceType = null;
|
|
39
|
+
async ngOnInit() {
|
|
40
|
+
this._items = [];
|
|
41
|
+
for (const item of this.items) {
|
|
42
|
+
const dashboardItem = this.CreateDashboardItem(item);
|
|
43
|
+
this._items.push(dashboardItem);
|
|
44
|
+
}
|
|
58
45
|
}
|
|
59
46
|
CreateDashboardItem(item) {
|
|
60
47
|
const dashboardItem = new DashboardItem();
|
|
@@ -114,43 +101,43 @@ export class EditDashboardComponent {
|
|
|
114
101
|
this.triggerAddItem.emit(event);
|
|
115
102
|
}
|
|
116
103
|
}
|
|
104
|
+
static ɵfac = function EditDashboardComponent_Factory(t) { return new (t || EditDashboardComponent)(); };
|
|
105
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EditDashboardComponent, selectors: [["app-edit-dashboard"]], inputs: { editMode: "editMode", config: "config", items: "items" }, outputs: { onSave: "onSave", onClose: "onClose", triggerAddItem: "triggerAddItem" }, decls: 18, vars: 13, consts: [[1, "k-overlay"], ["title", "Customize Dashboard", 1, "kendo-window-hide-restore", 3, "close", "width", "minHeight", "minWidth", "resizable", "state"], [1, "k-d-flex", "k-flex-col", "k-justify-content-between", "k-h-full", "custom-dialog-body"], [1, "dialog-content"], [1, "dialog-actions"], ["themeColor", "primary", 1, "k-m-2", 3, "itemClick", "data", "textField"], [1, "fa-solid", "fa-plus"], [3, "resize", "reorder", "columns", "rowHeight", "resizable", "reorderable"], [3, "col", "colSpan", "rowSpan", "id", 4, "ngFor", "ngForOf"], [1, "dialog-footer"], [1, "k-card-footer", "!k-border-none"], [3, "click"], [1, "fa-solid", "fa-xmark"], [3, "click", "primary"], [1, "fa-solid", "fa-check"], [3, "col", "colSpan", "rowSpan", "id"], [1, "k-float-right", 3, "click"]], template: function EditDashboardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
+
i0.ɵɵelement(0, "div", 0);
|
|
107
|
+
i0.ɵɵelementStart(1, "kendo-window", 1);
|
|
108
|
+
i0.ɵɵlistener("close", function EditDashboardComponent_Template_kendo_window_close_1_listener($event) { return ctx.closeDialog($event); });
|
|
109
|
+
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3)(4, "div", 4)(5, "kendo-dropdownbutton", 5);
|
|
110
|
+
i0.ɵɵlistener("itemClick", function EditDashboardComponent_Template_kendo_dropdownbutton_itemClick_5_listener($event) { return ctx.onItemSelect($event); });
|
|
111
|
+
i0.ɵɵelement(6, "span", 6);
|
|
112
|
+
i0.ɵɵtext(7, " Add item ");
|
|
113
|
+
i0.ɵɵelementEnd()();
|
|
114
|
+
i0.ɵɵelementStart(8, "kendo-tilelayout", 7);
|
|
115
|
+
i0.ɵɵlistener("resize", function EditDashboardComponent_Template_kendo_tilelayout_resize_8_listener($event) { return ctx.onResize($event); })("reorder", function EditDashboardComponent_Template_kendo_tilelayout_reorder_8_listener($event) { return ctx.onReorder($event); });
|
|
116
|
+
i0.ɵɵtemplate(9, EditDashboardComponent_kendo_tilelayout_item_9_Template, 6, 5, "kendo-tilelayout-item", 8);
|
|
117
|
+
i0.ɵɵelementEnd()();
|
|
118
|
+
i0.ɵɵelementStart(10, "div", 9)(11, "div", 10)(12, "kendo-button", 11);
|
|
119
|
+
i0.ɵɵlistener("click", function EditDashboardComponent_Template_kendo_button_click_12_listener($event) { return ctx.closeDialog($event); });
|
|
120
|
+
i0.ɵɵelement(13, "span", 12);
|
|
121
|
+
i0.ɵɵtext(14, " Cancel ");
|
|
122
|
+
i0.ɵɵelementEnd();
|
|
123
|
+
i0.ɵɵelementStart(15, "kendo-button", 13);
|
|
124
|
+
i0.ɵɵlistener("click", function EditDashboardComponent_Template_kendo_button_click_15_listener() { return ctx.saveChanges(); });
|
|
125
|
+
i0.ɵɵelement(16, "span", 14);
|
|
126
|
+
i0.ɵɵtext(17, " Save ");
|
|
127
|
+
i0.ɵɵelementEnd()()()()();
|
|
128
|
+
} if (rf & 2) {
|
|
129
|
+
i0.ɵɵadvance();
|
|
130
|
+
i0.ɵɵproperty("width", 500)("minHeight", 300)("minWidth", 400)("resizable", true)("state", "maximized");
|
|
131
|
+
i0.ɵɵadvance(4);
|
|
132
|
+
i0.ɵɵproperty("data", ctx.ResourceTypes)("textField", "DisplayName");
|
|
133
|
+
i0.ɵɵadvance(3);
|
|
134
|
+
i0.ɵɵproperty("columns", ctx.config.columns)("rowHeight", ctx.config.rowHeight)("resizable", true)("reorderable", true);
|
|
135
|
+
i0.ɵɵadvance();
|
|
136
|
+
i0.ɵɵproperty("ngForOf", ctx._items);
|
|
137
|
+
i0.ɵɵadvance(6);
|
|
138
|
+
i0.ɵɵproperty("primary", true);
|
|
139
|
+
} }, dependencies: [i1.NgForOf, i2.WindowComponent, i3.ButtonComponent, i3.DropDownButtonComponent, i4.TileLayoutComponent, i4.TileLayoutItemComponent, i4.TileLayoutItemHeaderComponent, i4.TileLayoutItemBodyComponent], styles: [".dialog-content[_ngcontent-%COMP%] .dialog-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n}\n.dialog-footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n width: auto;\n height: 40px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n background: #FFF;\n padding: 8px 16px;\n}\n.custom-dialog-body[_ngcontent-%COMP%] {\nflex: 1;\n}\n.custom-dialog-body[_ngcontent-%COMP%] .dialog-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n padding: 16px;\n box-sizing: border-box;\n}\n.dialog-footer[_ngcontent-%COMP%] .k-card-footer[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n padding: 0;\n}\n .kendo-window-hide-restore .k-window-content {\n padding: 0;\n}\n.custom-dialog-body[_ngcontent-%COMP%] .dialog-content[_ngcontent-%COMP%] .k-tilelayout[_ngcontent-%COMP%] {\n background: #fff;\n}"] });
|
|
117
140
|
}
|
|
118
|
-
EditDashboardComponent.ɵfac = function EditDashboardComponent_Factory(t) { return new (t || EditDashboardComponent)(); };
|
|
119
|
-
EditDashboardComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EditDashboardComponent, selectors: [["app-edit-dashboard"]], inputs: { editMode: "editMode", config: "config", items: "items" }, outputs: { onSave: "onSave", onClose: "onClose", triggerAddItem: "triggerAddItem" }, decls: 18, vars: 13, consts: [[1, "k-overlay"], ["title", "Customize Dashboard", 1, "kendo-window-hide-restore", 3, "close", "width", "minHeight", "minWidth", "resizable", "state"], [1, "k-d-flex", "k-flex-col", "k-justify-content-between", "k-h-full", "custom-dialog-body"], [1, "dialog-content"], [1, "dialog-actions"], ["themeColor", "primary", 1, "k-m-2", 3, "itemClick", "data", "textField"], [1, "fa-solid", "fa-plus"], [3, "resize", "reorder", "columns", "rowHeight", "resizable", "reorderable"], [3, "col", "colSpan", "rowSpan", "id", 4, "ngFor", "ngForOf"], [1, "dialog-footer"], [1, "k-card-footer", "!k-border-none"], [3, "click"], [1, "fa-solid", "fa-xmark"], [3, "click", "primary"], [1, "fa-solid", "fa-check"], [3, "col", "colSpan", "rowSpan", "id"], [1, "k-float-right", 3, "click"]], template: function EditDashboardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
-
i0.ɵɵelement(0, "div", 0);
|
|
121
|
-
i0.ɵɵelementStart(1, "kendo-window", 1);
|
|
122
|
-
i0.ɵɵlistener("close", function EditDashboardComponent_Template_kendo_window_close_1_listener($event) { return ctx.closeDialog($event); });
|
|
123
|
-
i0.ɵɵelementStart(2, "div", 2)(3, "div", 3)(4, "div", 4)(5, "kendo-dropdownbutton", 5);
|
|
124
|
-
i0.ɵɵlistener("itemClick", function EditDashboardComponent_Template_kendo_dropdownbutton_itemClick_5_listener($event) { return ctx.onItemSelect($event); });
|
|
125
|
-
i0.ɵɵelement(6, "span", 6);
|
|
126
|
-
i0.ɵɵtext(7, " Add item ");
|
|
127
|
-
i0.ɵɵelementEnd()();
|
|
128
|
-
i0.ɵɵelementStart(8, "kendo-tilelayout", 7);
|
|
129
|
-
i0.ɵɵlistener("resize", function EditDashboardComponent_Template_kendo_tilelayout_resize_8_listener($event) { return ctx.onResize($event); })("reorder", function EditDashboardComponent_Template_kendo_tilelayout_reorder_8_listener($event) { return ctx.onReorder($event); });
|
|
130
|
-
i0.ɵɵtemplate(9, EditDashboardComponent_kendo_tilelayout_item_9_Template, 6, 5, "kendo-tilelayout-item", 8);
|
|
131
|
-
i0.ɵɵelementEnd()();
|
|
132
|
-
i0.ɵɵelementStart(10, "div", 9)(11, "div", 10)(12, "kendo-button", 11);
|
|
133
|
-
i0.ɵɵlistener("click", function EditDashboardComponent_Template_kendo_button_click_12_listener($event) { return ctx.closeDialog($event); });
|
|
134
|
-
i0.ɵɵelement(13, "span", 12);
|
|
135
|
-
i0.ɵɵtext(14, " Cancel ");
|
|
136
|
-
i0.ɵɵelementEnd();
|
|
137
|
-
i0.ɵɵelementStart(15, "kendo-button", 13);
|
|
138
|
-
i0.ɵɵlistener("click", function EditDashboardComponent_Template_kendo_button_click_15_listener() { return ctx.saveChanges(); });
|
|
139
|
-
i0.ɵɵelement(16, "span", 14);
|
|
140
|
-
i0.ɵɵtext(17, " Save ");
|
|
141
|
-
i0.ɵɵelementEnd()()()()();
|
|
142
|
-
} if (rf & 2) {
|
|
143
|
-
i0.ɵɵadvance();
|
|
144
|
-
i0.ɵɵproperty("width", 500)("minHeight", 300)("minWidth", 400)("resizable", true)("state", "maximized");
|
|
145
|
-
i0.ɵɵadvance(4);
|
|
146
|
-
i0.ɵɵproperty("data", ctx.ResourceTypes)("textField", "DisplayName");
|
|
147
|
-
i0.ɵɵadvance(3);
|
|
148
|
-
i0.ɵɵproperty("columns", ctx.config.columns)("rowHeight", ctx.config.rowHeight)("resizable", true)("reorderable", true);
|
|
149
|
-
i0.ɵɵadvance();
|
|
150
|
-
i0.ɵɵproperty("ngForOf", ctx._items);
|
|
151
|
-
i0.ɵɵadvance(6);
|
|
152
|
-
i0.ɵɵproperty("primary", true);
|
|
153
|
-
} }, dependencies: [i1.NgForOf, i2.WindowComponent, i3.ButtonComponent, i3.DropDownButtonComponent, i4.TileLayoutComponent, i4.TileLayoutItemComponent, i4.TileLayoutItemHeaderComponent, i4.TileLayoutItemBodyComponent], styles: [".dialog-content[_ngcontent-%COMP%] .dialog-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n}\n.dialog-footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n width: auto;\n height: 40px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n background: #FFF;\n padding: 8px 16px;\n}\n.custom-dialog-body[_ngcontent-%COMP%] {\nflex: 1;\n}\n.custom-dialog-body[_ngcontent-%COMP%] .dialog-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n padding: 16px;\n box-sizing: border-box;\n}\n.dialog-footer[_ngcontent-%COMP%] .k-card-footer[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n padding: 0;\n}\n .kendo-window-hide-restore .k-window-content {\n padding: 0;\n}\n.custom-dialog-body[_ngcontent-%COMP%] .dialog-content[_ngcontent-%COMP%] .k-tilelayout[_ngcontent-%COMP%] {\n background: #fff;\n}"] });
|
|
154
141
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EditDashboardComponent, [{
|
|
155
142
|
type: Component,
|
|
156
143
|
args: [{ selector: 'app-edit-dashboard', template: "<div class=\"k-overlay\"></div>\n<kendo-window \n class=\"kendo-window-hide-restore\"\n [width]=\"500\" \n [minHeight]=\"300\" \n [minWidth]=\"400\" \n [resizable]=\"true\" \n (close)=\"closeDialog($event)\"\n [state]=\"'maximized'\" \n title=\"Customize Dashboard\">\n <div class=\"k-d-flex k-flex-col k-justify-content-between k-h-full custom-dialog-body\">\n <div class=\"dialog-content \">\n <div class=\"dialog-actions\">\n <kendo-dropdownbutton class=\"k-m-2\" themeColor=\"primary\" [data]=\"ResourceTypes\" [textField]=\"'DisplayName'\" (itemClick)=\"onItemSelect($event)\">\n <span class=\"fa-solid fa-plus\"></span> Add item\n </kendo-dropdownbutton>\n </div>\n <kendo-tilelayout\n [columns]=\"config.columns\"\n [rowHeight]=\"config.rowHeight\"\n [resizable]=\"true\"\n [reorderable]=\"true\"\n (resize)=\"onResize($event)\"\n (reorder)=\"onReorder($event)\"\n >\n <kendo-tilelayout-item *ngFor=\"let item of _items\" [col]=\"item.col\" [colSpan]=\"item.colSpan\" [rowSpan]=\"item.rowSpan\" [id]=\"item.uniqueId\">\n <kendo-tilelayout-item-header>\n {{item.title}}\n <kendo-button class=\"k-float-right\" (click)=\"removeItem(item)\">X</kendo-button>\n </kendo-tilelayout-item-header>\n <kendo-tilelayout-item-body>\n <!-- <div class=\"overlay\"></div> -->\n <!-- <app-resource [Data]=\"item.ResourceData\" [isVisible]=\"false\"></app-resource> -->\n </kendo-tilelayout-item-body>\n </kendo-tilelayout-item>\n </kendo-tilelayout>\n \n </div>\n <div class=\"dialog-footer\">\n <div class=\"k-card-footer !k-border-none\">\n <kendo-button (click)=\"closeDialog($event)\" >\n <span class=\"fa-solid fa-xmark\"></span>\n Cancel\n </kendo-button>\n <kendo-button (click)=\"saveChanges()\" [primary]=\"true\" >\n <span class=\"fa-solid fa-check\"></span>\n Save\n </kendo-button>\n </div>\n </div>\n </div>\n</kendo-window>", styles: [".dialog-content .dialog-actions {\n display: flex;\n justify-content: flex-end;\n}\n.dialog-footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n width: auto;\n height: 40px;\n border-top: 1px solid rgba(0, 0, 0, 0.08);\n background: #FFF;\n padding: 8px 16px;\n}\n.custom-dialog-body {\nflex: 1;\n}\n.custom-dialog-body .dialog-content {\n flex: 1;\n overflow: auto;\n padding: 16px;\n box-sizing: border-box;\n}\n.dialog-footer .k-card-footer {\n display: flex;\n gap: 8px;\n padding: 0;\n}\n::ng-deep .kendo-window-hide-restore .k-window-content {\n padding: 0;\n}\n.custom-dialog-body .dialog-content .k-tilelayout {\n background: #fff;\n}"] }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-dashboard.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.ts","../../../../../src/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.html"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"edit-dashboard.component.js","sourceRoot":"","sources":["../../../../../src/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.ts","../../../../../src/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.html"],"names":[],"mappings":"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"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
|
11
2
|
import { ResourceData } from '@memberjunction/core-entities';
|
|
12
3
|
import { Metadata } from '@memberjunction/core';
|
|
@@ -171,6 +162,28 @@ function SingleDashboardComponent_kendo_tilelayout_15_Template(rf, ctx) { if (rf
|
|
|
171
162
|
i0.ɵɵrepeater(ctx_r1.items);
|
|
172
163
|
} }
|
|
173
164
|
export class SingleDashboardComponent extends BaseDashboard {
|
|
165
|
+
route;
|
|
166
|
+
sharedService;
|
|
167
|
+
dashboardNameInput;
|
|
168
|
+
ResourceData;
|
|
169
|
+
dashboardSaved = new EventEmitter();
|
|
170
|
+
loadComplete = new EventEmitter();
|
|
171
|
+
loadStarted = new EventEmitter();
|
|
172
|
+
items = [];
|
|
173
|
+
dashboardEntity;
|
|
174
|
+
config = new DashboardConfigDetails();
|
|
175
|
+
isItemDialogOpened = false;
|
|
176
|
+
isEditDialogOpened = false;
|
|
177
|
+
isEditDashboardNameDialogOpened = false;
|
|
178
|
+
isDeletingDashboardItem = false;
|
|
179
|
+
allowResize = false;
|
|
180
|
+
allowReorder = false;
|
|
181
|
+
isEditingDashboard = false;
|
|
182
|
+
selectedResource;
|
|
183
|
+
selectedDashboardItem;
|
|
184
|
+
saveChangesSubject = new Subject();
|
|
185
|
+
selectedComponent = null;
|
|
186
|
+
editOnLoad = false;
|
|
174
187
|
get contentLoading() {
|
|
175
188
|
for (const item of this.items) {
|
|
176
189
|
if (item.contentLoading) {
|
|
@@ -187,21 +200,6 @@ export class SingleDashboardComponent extends BaseDashboard {
|
|
|
187
200
|
super();
|
|
188
201
|
this.route = route;
|
|
189
202
|
this.sharedService = sharedService;
|
|
190
|
-
this.dashboardSaved = new EventEmitter();
|
|
191
|
-
this.loadComplete = new EventEmitter();
|
|
192
|
-
this.loadStarted = new EventEmitter();
|
|
193
|
-
this.items = [];
|
|
194
|
-
this.config = new DashboardConfigDetails();
|
|
195
|
-
this.isItemDialogOpened = false;
|
|
196
|
-
this.isEditDialogOpened = false;
|
|
197
|
-
this.isEditDashboardNameDialogOpened = false;
|
|
198
|
-
this.isDeletingDashboardItem = false;
|
|
199
|
-
this.allowResize = false;
|
|
200
|
-
this.allowReorder = false;
|
|
201
|
-
this.isEditingDashboard = false;
|
|
202
|
-
this.saveChangesSubject = new Subject();
|
|
203
|
-
this.selectedComponent = null;
|
|
204
|
-
this.editOnLoad = false;
|
|
205
203
|
this.saveChangesSubject
|
|
206
204
|
.pipe(debounceTime(500))
|
|
207
205
|
.subscribe(() => {
|
|
@@ -212,58 +210,56 @@ export class SingleDashboardComponent extends BaseDashboard {
|
|
|
212
210
|
this.editOnLoad = true;
|
|
213
211
|
}
|
|
214
212
|
}
|
|
215
|
-
ngOnInit() {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
this.config.reorderable = uiConfig.reorderable;
|
|
234
|
-
}
|
|
235
|
-
//the save and canel functions call this function
|
|
236
|
-
//and we only want to show the edit view once
|
|
237
|
-
if (this.editOnLoad) {
|
|
238
|
-
this.editOnLoad = false;
|
|
239
|
-
this.toggleEditDashboard(true);
|
|
240
|
-
}
|
|
213
|
+
async ngOnInit() {
|
|
214
|
+
// load up the dashboard
|
|
215
|
+
const d = this.ResourceData;
|
|
216
|
+
const config = this.ResourceData.Configuration;
|
|
217
|
+
if (this.ResourceData) {
|
|
218
|
+
const md = new Metadata();
|
|
219
|
+
let uiConfig = { items: [] };
|
|
220
|
+
this.dashboardEntity = await md.GetEntityObject('Dashboards');
|
|
221
|
+
if (this.ResourceData.ResourceRecordID && this.ResourceData.ResourceRecordID.length > 0) {
|
|
222
|
+
await this.dashboardEntity.Load(this.ResourceData.ResourceRecordID);
|
|
223
|
+
// now we have loaded and we need to get the UIConfigDetails
|
|
224
|
+
const raw = this.dashboardEntity.UIConfigDetails;
|
|
225
|
+
if (raw) {
|
|
226
|
+
uiConfig = JSON.parse(raw);
|
|
227
|
+
this.config.columns = uiConfig.columns;
|
|
228
|
+
this.config.rowHeight = uiConfig.rowHeight;
|
|
229
|
+
this.config.resizable = uiConfig.resizable;
|
|
230
|
+
this.config.reorderable = uiConfig.reorderable;
|
|
241
231
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.dashboardEntity.Name = 'My Dashboard';
|
|
248
|
-
// Set default configuration
|
|
249
|
-
this.config.columns = 4; // 4-column layout
|
|
250
|
-
this.config.rowHeight = 150;
|
|
251
|
-
this.config.resizable = true;
|
|
252
|
-
this.config.reorderable = true;
|
|
253
|
-
// Automatically show edit mode for new dashboards to encourage adding items
|
|
254
|
-
setTimeout(() => {
|
|
255
|
-
this.toggleEditDashboard(true);
|
|
256
|
-
}, 500);
|
|
257
|
-
}
|
|
258
|
-
// now we need to load up the items
|
|
259
|
-
this.items = [];
|
|
260
|
-
//const tempItems = uiConfig.items.sort((a: any, b: any) => a.order - b.order);
|
|
261
|
-
for (const item of uiConfig.items) {
|
|
262
|
-
const dashboardItem = this.CreateDashboardItem(item);
|
|
263
|
-
this.items.push(dashboardItem);
|
|
232
|
+
//the save and canel functions call this function
|
|
233
|
+
//and we only want to show the edit view once
|
|
234
|
+
if (this.editOnLoad) {
|
|
235
|
+
this.editOnLoad = false;
|
|
236
|
+
this.toggleEditDashboard(true);
|
|
264
237
|
}
|
|
265
238
|
}
|
|
266
|
-
|
|
239
|
+
else {
|
|
240
|
+
this.dashboardEntity.NewRecord(); // creating a new dashboard
|
|
241
|
+
this.dashboardEntity.UserID = md.CurrentUser.ID;
|
|
242
|
+
// We should never get here now because dashboard creation is handled in dashboard-browser
|
|
243
|
+
// But just in case, set a better default name
|
|
244
|
+
this.dashboardEntity.Name = 'My Dashboard';
|
|
245
|
+
// Set default configuration
|
|
246
|
+
this.config.columns = 4; // 4-column layout
|
|
247
|
+
this.config.rowHeight = 150;
|
|
248
|
+
this.config.resizable = true;
|
|
249
|
+
this.config.reorderable = true;
|
|
250
|
+
// Automatically show edit mode for new dashboards to encourage adding items
|
|
251
|
+
setTimeout(() => {
|
|
252
|
+
this.toggleEditDashboard(true);
|
|
253
|
+
}, 500);
|
|
254
|
+
}
|
|
255
|
+
// now we need to load up the items
|
|
256
|
+
this.items = [];
|
|
257
|
+
//const tempItems = uiConfig.items.sort((a: any, b: any) => a.order - b.order);
|
|
258
|
+
for (const item of uiConfig.items) {
|
|
259
|
+
const dashboardItem = this.CreateDashboardItem(item);
|
|
260
|
+
this.items.push(dashboardItem);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
267
263
|
}
|
|
268
264
|
CreateDashboardItem(item) {
|
|
269
265
|
const dashboardItem = new DashboardItem();
|
|
@@ -317,24 +313,20 @@ export class SingleDashboardComponent extends BaseDashboard {
|
|
|
317
313
|
this.isEditingDashboard = allowEdit;
|
|
318
314
|
this.toggleInlineNameEdit(false);
|
|
319
315
|
}
|
|
320
|
-
onClickSaveDashboard() {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
331
|
-
});
|
|
316
|
+
async onClickSaveDashboard() {
|
|
317
|
+
this.toggleEditDashboard(false);
|
|
318
|
+
let result = await this.SaveDashboard();
|
|
319
|
+
if (result) {
|
|
320
|
+
this.sharedService.CreateSimpleNotification("Dashboard changes have been saved.", "success", 1000);
|
|
321
|
+
await this.ngOnInit();
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
this.sharedService.CreateSimpleNotification("An error occured saving the dashboard changes", "error", 1000);
|
|
325
|
+
}
|
|
332
326
|
}
|
|
333
|
-
onclickCancelChanges() {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
yield this.ngOnInit();
|
|
337
|
-
});
|
|
327
|
+
async onclickCancelChanges() {
|
|
328
|
+
this.toggleEditDashboard(false);
|
|
329
|
+
await this.ngOnInit();
|
|
338
330
|
}
|
|
339
331
|
closeDashboardDialog(data = null) {
|
|
340
332
|
this.isEditDialogOpened = false;
|
|
@@ -350,33 +342,30 @@ export class SingleDashboardComponent extends BaseDashboard {
|
|
|
350
342
|
this.SaveDashboard();
|
|
351
343
|
this.closeDashboardDialog();
|
|
352
344
|
}
|
|
353
|
-
SaveDashboard() {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
return false;
|
|
370
|
-
});
|
|
345
|
+
async SaveDashboard() {
|
|
346
|
+
if (this.dashboardEntity) {
|
|
347
|
+
const configData = {
|
|
348
|
+
columns: this.config.columns,
|
|
349
|
+
rowHeight: this.config.rowHeight,
|
|
350
|
+
resizable: this.config.resizable,
|
|
351
|
+
reorderable: this.config.reorderable,
|
|
352
|
+
items: this.items
|
|
353
|
+
};
|
|
354
|
+
const configJSON = JSON.stringify(configData);
|
|
355
|
+
this.dashboardEntity.UIConfigDetails = configJSON;
|
|
356
|
+
const result = await this.dashboardEntity.Save();
|
|
357
|
+
return result;
|
|
358
|
+
}
|
|
359
|
+
else
|
|
360
|
+
return false;
|
|
371
361
|
}
|
|
372
362
|
dashboardSaveComplete(entity) {
|
|
373
363
|
this.dashboardSaved.emit(entity);
|
|
374
364
|
}
|
|
375
365
|
toggleInlineNameEdit(visible) {
|
|
376
|
-
var _a, _b;
|
|
377
366
|
this.isEditDashboardNameDialogOpened = visible;
|
|
378
367
|
if (this.isEditDashboardNameDialogOpened) {
|
|
379
|
-
|
|
368
|
+
this.dashboardNameInput?.nativeElement?.focus();
|
|
380
369
|
}
|
|
381
370
|
}
|
|
382
371
|
saveDashboardName() {
|
|
@@ -401,19 +390,17 @@ export class SingleDashboardComponent extends BaseDashboard {
|
|
|
401
390
|
this.selectedDashboardItem = item;
|
|
402
391
|
this.isDeletingDashboardItem = true;
|
|
403
392
|
}
|
|
404
|
-
deleteDashboardItem(item) {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
this.isDeletingDashboardItem = false;
|
|
416
|
-
});
|
|
393
|
+
async deleteDashboardItem(item) {
|
|
394
|
+
this.items = this.items.filter(i => i.uniqueId != item.uniqueId);
|
|
395
|
+
let result = await this.SaveDashboard();
|
|
396
|
+
if (result) {
|
|
397
|
+
this.sharedService.CreateSimpleNotification(`Dashboard item ${item.uniqueId} deleted successfully`, "success", 1000);
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
this.sharedService.CreateSimpleNotification(`Unable to delete dashboard item ${item.uniqueId}`, "error", 1000);
|
|
401
|
+
}
|
|
402
|
+
this.selectedDashboardItem = null;
|
|
403
|
+
this.isDeletingDashboardItem = false;
|
|
417
404
|
}
|
|
418
405
|
getIsEditingItemBodyStyle() {
|
|
419
406
|
return this.isEditingDashboard ? "bg-light-grey" : "";
|
|
@@ -472,41 +459,41 @@ export class SingleDashboardComponent extends BaseDashboard {
|
|
|
472
459
|
};
|
|
473
460
|
return iconMap[resourceType] || iconMap['default'];
|
|
474
461
|
}
|
|
462
|
+
static ɵfac = function SingleDashboardComponent_Factory(t) { return new (t || SingleDashboardComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.SharedService)); };
|
|
463
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleDashboardComponent, selectors: [["mj-single-dashboard"]], viewQuery: function SingleDashboardComponent_Query(rf, ctx) { if (rf & 1) {
|
|
464
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
465
|
+
} if (rf & 2) {
|
|
466
|
+
let _t;
|
|
467
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dashboardNameInput = _t.first);
|
|
468
|
+
} }, inputs: { ResourceData: "ResourceData" }, outputs: { dashboardSaved: "dashboardSaved", loadComplete: "loadComplete", loadStarted: "loadStarted" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 16, vars: 9, consts: [["dashboard_name_header", ""], ["edit_dashboard_buttons", ""], ["dashboardNameInput", ""], [3, "selectedResource", "onClose", 4, "ngIf"], [4, "ngIf"], [3, "dashboardItem", "removeDashboardItem", "onClose", 4, "ngIf"], [1, "dashboard-container"], [1, "main-head-dashboard"], [1, "dashboard-title"], ["class", "dashboard-header k-d-flex k-flex-row k-justify-content-flex-end", 4, "ngIf", "ngIfElse"], [1, "dashboard-header", "k-d-flex", "k-flex-row", "k-justify-content-flex-end"], [4, "ngIf", "ngIfElse"], [1, "tile-resource-container"], ["class", "empty-dashboard", 4, "ngIf"], [3, "columns", "rowHeight", "resizable", "reorderable", "reorder", "resize", 4, "ngIf"], [3, "onClose", "selectedResource"], [3, "onClose", "triggerAddItem", "onSave", "items", "config"], [3, "removeDashboardItem", "onClose", "dashboardItem"], ["type", "text", "placeholder", "Enter name here", "id", "txtDashboardName", 1, "k-textbox", "k-input", "k-input-md", "k-rounded-md", "k-input-solid", 3, "keydown.enter"], [3, "click"], [1, "k-i-check", "k-button-icon", "k-icon", "ng-star-inserted"], [1, "k-icon", "k-i-cancel"], [1, "k-icon", "k-i-star"], [1, "fa-solid", "fa-check"], [1, "fa-solid", "fa-xmark"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-gear"], [1, "empty-dashboard"], ["aria-hidden", "true", 1, "fa-solid", "fa-grip-vertical"], ["themeColor", "primary", 3, "click"], [3, "reorder", "resize", "columns", "rowHeight", "resizable", "reorderable"], [3, "ngClass", "col", "colSpan", "rowSpan", "id"], [3, "mouseenter", "mouseleave", "ngClass", "col", "colSpan", "rowSpan", "id"], [3, "ngClass"], [1, "item-title"], ["aria-hidden", "true"], [3, "ContentLoadingStarted", "ContentLoadingComplete", "Data", "isVisible"], [1, "btn-wrapper"], ["kendoButton", "", "title", "Edit dashboard", 3, "click"], [1, "fa-solid", "fa-pen-to-square"], ["kendoButton", "", "title", "Remove item", 3, "click"], [1, "fa-solid", "fa-trash"]], template: function SingleDashboardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
469
|
+
i0.ɵɵtemplate(0, SingleDashboardComponent_app_add_item_dialog_0_Template, 1, 1, "app-add-item-dialog", 3)(1, SingleDashboardComponent_div_1_Template, 2, 2, "div", 4)(2, SingleDashboardComponent_app_delete_item_dialog_2_Template, 1, 1, "app-delete-item-dialog", 5);
|
|
470
|
+
i0.ɵɵelementStart(3, "div", 6)(4, "div", 7)(5, "div", 8);
|
|
471
|
+
i0.ɵɵtemplate(6, SingleDashboardComponent_div_6_Template, 9, 0, "div", 9)(7, SingleDashboardComponent_ng_template_7_Template, 3, 1, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
472
|
+
i0.ɵɵelementEnd();
|
|
473
|
+
i0.ɵɵelementStart(9, "div", 10);
|
|
474
|
+
i0.ɵɵtemplate(10, SingleDashboardComponent_div_10_Template, 7, 0, "div", 11)(11, SingleDashboardComponent_ng_template_11_Template, 6, 0, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
475
|
+
i0.ɵɵelementEnd()();
|
|
476
|
+
i0.ɵɵelementStart(13, "div", 12);
|
|
477
|
+
i0.ɵɵtemplate(14, SingleDashboardComponent_div_14_Template, 9, 0, "div", 13)(15, SingleDashboardComponent_kendo_tilelayout_15_Template, 3, 4, "kendo-tilelayout", 14);
|
|
478
|
+
i0.ɵɵelementEnd()();
|
|
479
|
+
} if (rf & 2) {
|
|
480
|
+
const dashboard_name_header_r14 = i0.ɵɵreference(8);
|
|
481
|
+
const edit_dashboard_buttons_r15 = i0.ɵɵreference(12);
|
|
482
|
+
i0.ɵɵproperty("ngIf", ctx.isItemDialogOpened);
|
|
483
|
+
i0.ɵɵadvance();
|
|
484
|
+
i0.ɵɵproperty("ngIf", ctx.isEditDialogOpened);
|
|
485
|
+
i0.ɵɵadvance();
|
|
486
|
+
i0.ɵɵproperty("ngIf", ctx.isDeletingDashboardItem);
|
|
487
|
+
i0.ɵɵadvance(4);
|
|
488
|
+
i0.ɵɵproperty("ngIf", ctx.isEditDashboardNameDialogOpened)("ngIfElse", dashboard_name_header_r14);
|
|
489
|
+
i0.ɵɵadvance(4);
|
|
490
|
+
i0.ɵɵproperty("ngIf", ctx.isEditingDashboard)("ngIfElse", edit_dashboard_buttons_r15);
|
|
491
|
+
i0.ɵɵadvance(4);
|
|
492
|
+
i0.ɵɵproperty("ngIf", ctx.items.length === 0 && !ctx.isEditingDashboard);
|
|
493
|
+
i0.ɵɵadvance();
|
|
494
|
+
i0.ɵɵproperty("ngIf", ctx.items.length > 0 || ctx.isEditingDashboard);
|
|
495
|
+
} }, styles: ["[_nghost-%COMP%] {\n display: block;\n padding: 20px;\n height: 100%;\n box-sizing: border-box;\n}\n\n.dashboard-container[_ngcontent-%COMP%] {\n height: calc(100% - 60px);\n overflow: auto;\n}\n\n.dashboard-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 15px;\n}\n\n.dashboard-title[_ngcontent-%COMP%] .k-icon[_ngcontent-%COMP%] {\n color: var(--border-blue);\n font-size: 25px;\n}\n\n.dashboard-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n color: #424242;\n font-size: 28px;\n font-style: normal;\n font-weight: 300;\n line-height: 28px;\n margin: 0;\n cursor: pointer;\n}\n\n.dashboard-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]:hover {\n text-decoration: underline;\n}\n\n.dashboard-header[_ngcontent-%COMP%] {\n display: flex;\n gap: 10px;\n align-items: center;\n}\n\n .dashboard-header .k-button-solid-base {\n border: 1px solid var(--border-blue) !important;\n color: var(--border-blue) !important;\n border-radius: 10px;\n line-height: 34px;\n background: var(--white-color);\n}\n\n .dashboard-header .k-button-solid-primary {\n background: var(--border-blue) !important;\n color: var(--white-color) !important;\n border-radius: 10px;\n line-height: 34px;\n border-color: var(--border-blue);\n}\n\n .dashboard-header .btn-ref .k-button-text {\n display: flex;\n gap: 10px;\n}\n\n.dashboard-header[_ngcontent-%COMP%] .btn-ref[_ngcontent-%COMP%] {\n border: none;\n background: transparent;\n}\n\n.main-head-dashboard[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 20px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n\n.tile-resource-container[_ngcontent-%COMP%] {\n margin-top: 20px;\n padding: 15px;\n border-radius: 8px;\n background-color: #f9f9f9;\n}\n\n.tile-resource-container[_ngcontent-%COMP%] .k-tilelayout[_ngcontent-%COMP%] {\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);\n border-radius: 8px;\n padding: 10px;\n}\n\n\n\n kendo-tilelayout-item {\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n margin: 5px;\n}\n\n.bg-light-grey[_ngcontent-%COMP%] {\n background-color: #f0f0f0;\n}\n\n.bg-dark-grey[_ngcontent-%COMP%] {\n background-color: #5a5a5a;\n color: white;\n}\n\n.bg-blue[_ngcontent-%COMP%] {\n background-color: #4250AD;\n color: white;\n}\n\n.dashboard-item-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px 15px;\n font-weight: 500;\n}\n\n.dashboard-item-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 8px;\n}\n\n.button-spacing[_ngcontent-%COMP%] {\n margin-right: 8px;\n}\n\n.btn-wrapper[_ngcontent-%COMP%] {\n display: flex;\n gap: 5px;\n}\n\n.btn-wrapper[_ngcontent-%COMP%] > button[_ngcontent-%COMP%] {\n margin-left: 5px;\n}\n\n\n\n.empty-dashboard[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n text-align: center;\n color: #666;\n background-color: #f9f9f9;\n border-radius: 8px;\n margin-top: 20px;\n}\n\n.empty-dashboard[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n margin-bottom: 20px;\n color: #ccc;\n}\n\n.empty-dashboard[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n}\n\n.empty-dashboard[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}"] });
|
|
475
496
|
}
|
|
476
|
-
SingleDashboardComponent.ɵfac = function SingleDashboardComponent_Factory(t) { return new (t || SingleDashboardComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.SharedService)); };
|
|
477
|
-
SingleDashboardComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleDashboardComponent, selectors: [["mj-single-dashboard"]], viewQuery: function SingleDashboardComponent_Query(rf, ctx) { if (rf & 1) {
|
|
478
|
-
i0.ɵɵviewQuery(_c0, 5);
|
|
479
|
-
} if (rf & 2) {
|
|
480
|
-
let _t;
|
|
481
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dashboardNameInput = _t.first);
|
|
482
|
-
} }, inputs: { ResourceData: "ResourceData" }, outputs: { dashboardSaved: "dashboardSaved", loadComplete: "loadComplete", loadStarted: "loadStarted" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 16, vars: 9, consts: [["dashboard_name_header", ""], ["edit_dashboard_buttons", ""], ["dashboardNameInput", ""], [3, "selectedResource", "onClose", 4, "ngIf"], [4, "ngIf"], [3, "dashboardItem", "removeDashboardItem", "onClose", 4, "ngIf"], [1, "dashboard-container"], [1, "main-head-dashboard"], [1, "dashboard-title"], ["class", "dashboard-header k-d-flex k-flex-row k-justify-content-flex-end", 4, "ngIf", "ngIfElse"], [1, "dashboard-header", "k-d-flex", "k-flex-row", "k-justify-content-flex-end"], [4, "ngIf", "ngIfElse"], [1, "tile-resource-container"], ["class", "empty-dashboard", 4, "ngIf"], [3, "columns", "rowHeight", "resizable", "reorderable", "reorder", "resize", 4, "ngIf"], [3, "onClose", "selectedResource"], [3, "onClose", "triggerAddItem", "onSave", "items", "config"], [3, "removeDashboardItem", "onClose", "dashboardItem"], ["type", "text", "placeholder", "Enter name here", "id", "txtDashboardName", 1, "k-textbox", "k-input", "k-input-md", "k-rounded-md", "k-input-solid", 3, "keydown.enter"], [3, "click"], [1, "k-i-check", "k-button-icon", "k-icon", "ng-star-inserted"], [1, "k-icon", "k-i-cancel"], [1, "k-icon", "k-i-star"], [1, "fa-solid", "fa-check"], [1, "fa-solid", "fa-xmark"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-gear"], [1, "empty-dashboard"], ["aria-hidden", "true", 1, "fa-solid", "fa-grip-vertical"], ["themeColor", "primary", 3, "click"], [3, "reorder", "resize", "columns", "rowHeight", "resizable", "reorderable"], [3, "ngClass", "col", "colSpan", "rowSpan", "id"], [3, "mouseenter", "mouseleave", "ngClass", "col", "colSpan", "rowSpan", "id"], [3, "ngClass"], [1, "item-title"], ["aria-hidden", "true"], [3, "ContentLoadingStarted", "ContentLoadingComplete", "Data", "isVisible"], [1, "btn-wrapper"], ["kendoButton", "", "title", "Edit dashboard", 3, "click"], [1, "fa-solid", "fa-pen-to-square"], ["kendoButton", "", "title", "Remove item", 3, "click"], [1, "fa-solid", "fa-trash"]], template: function SingleDashboardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
483
|
-
i0.ɵɵtemplate(0, SingleDashboardComponent_app_add_item_dialog_0_Template, 1, 1, "app-add-item-dialog", 3)(1, SingleDashboardComponent_div_1_Template, 2, 2, "div", 4)(2, SingleDashboardComponent_app_delete_item_dialog_2_Template, 1, 1, "app-delete-item-dialog", 5);
|
|
484
|
-
i0.ɵɵelementStart(3, "div", 6)(4, "div", 7)(5, "div", 8);
|
|
485
|
-
i0.ɵɵtemplate(6, SingleDashboardComponent_div_6_Template, 9, 0, "div", 9)(7, SingleDashboardComponent_ng_template_7_Template, 3, 1, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
486
|
-
i0.ɵɵelementEnd();
|
|
487
|
-
i0.ɵɵelementStart(9, "div", 10);
|
|
488
|
-
i0.ɵɵtemplate(10, SingleDashboardComponent_div_10_Template, 7, 0, "div", 11)(11, SingleDashboardComponent_ng_template_11_Template, 6, 0, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
489
|
-
i0.ɵɵelementEnd()();
|
|
490
|
-
i0.ɵɵelementStart(13, "div", 12);
|
|
491
|
-
i0.ɵɵtemplate(14, SingleDashboardComponent_div_14_Template, 9, 0, "div", 13)(15, SingleDashboardComponent_kendo_tilelayout_15_Template, 3, 4, "kendo-tilelayout", 14);
|
|
492
|
-
i0.ɵɵelementEnd()();
|
|
493
|
-
} if (rf & 2) {
|
|
494
|
-
const dashboard_name_header_r14 = i0.ɵɵreference(8);
|
|
495
|
-
const edit_dashboard_buttons_r15 = i0.ɵɵreference(12);
|
|
496
|
-
i0.ɵɵproperty("ngIf", ctx.isItemDialogOpened);
|
|
497
|
-
i0.ɵɵadvance();
|
|
498
|
-
i0.ɵɵproperty("ngIf", ctx.isEditDialogOpened);
|
|
499
|
-
i0.ɵɵadvance();
|
|
500
|
-
i0.ɵɵproperty("ngIf", ctx.isDeletingDashboardItem);
|
|
501
|
-
i0.ɵɵadvance(4);
|
|
502
|
-
i0.ɵɵproperty("ngIf", ctx.isEditDashboardNameDialogOpened)("ngIfElse", dashboard_name_header_r14);
|
|
503
|
-
i0.ɵɵadvance(4);
|
|
504
|
-
i0.ɵɵproperty("ngIf", ctx.isEditingDashboard)("ngIfElse", edit_dashboard_buttons_r15);
|
|
505
|
-
i0.ɵɵadvance(4);
|
|
506
|
-
i0.ɵɵproperty("ngIf", ctx.items.length === 0 && !ctx.isEditingDashboard);
|
|
507
|
-
i0.ɵɵadvance();
|
|
508
|
-
i0.ɵɵproperty("ngIf", ctx.items.length > 0 || ctx.isEditingDashboard);
|
|
509
|
-
} }, styles: ["[_nghost-%COMP%] {\n display: block;\n padding: 20px;\n height: 100%;\n box-sizing: border-box;\n}\n\n.dashboard-container[_ngcontent-%COMP%] {\n height: calc(100% - 60px);\n overflow: auto;\n}\n\n.dashboard-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 15px;\n}\n\n.dashboard-title[_ngcontent-%COMP%] .k-icon[_ngcontent-%COMP%] {\n color: var(--border-blue);\n font-size: 25px;\n}\n\n.dashboard-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n color: #424242;\n font-size: 28px;\n font-style: normal;\n font-weight: 300;\n line-height: 28px;\n margin: 0;\n cursor: pointer;\n}\n\n.dashboard-title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]:hover {\n text-decoration: underline;\n}\n\n.dashboard-header[_ngcontent-%COMP%] {\n display: flex;\n gap: 10px;\n align-items: center;\n}\n\n .dashboard-header .k-button-solid-base {\n border: 1px solid var(--border-blue) !important;\n color: var(--border-blue) !important;\n border-radius: 10px;\n line-height: 34px;\n background: var(--white-color);\n}\n\n .dashboard-header .k-button-solid-primary {\n background: var(--border-blue) !important;\n color: var(--white-color) !important;\n border-radius: 10px;\n line-height: 34px;\n border-color: var(--border-blue);\n}\n\n .dashboard-header .btn-ref .k-button-text {\n display: flex;\n gap: 10px;\n}\n\n.dashboard-header[_ngcontent-%COMP%] .btn-ref[_ngcontent-%COMP%] {\n border: none;\n background: transparent;\n}\n\n.main-head-dashboard[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 20px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n\n.tile-resource-container[_ngcontent-%COMP%] {\n margin-top: 20px;\n padding: 15px;\n border-radius: 8px;\n background-color: #f9f9f9;\n}\n\n.tile-resource-container[_ngcontent-%COMP%] .k-tilelayout[_ngcontent-%COMP%] {\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);\n border-radius: 8px;\n padding: 10px;\n}\n\n\n\n kendo-tilelayout-item {\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n margin: 5px;\n}\n\n.bg-light-grey[_ngcontent-%COMP%] {\n background-color: #f0f0f0;\n}\n\n.bg-dark-grey[_ngcontent-%COMP%] {\n background-color: #5a5a5a;\n color: white;\n}\n\n.bg-blue[_ngcontent-%COMP%] {\n background-color: #4250AD;\n color: white;\n}\n\n.dashboard-item-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px 15px;\n font-weight: 500;\n}\n\n.dashboard-item-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 8px;\n}\n\n.button-spacing[_ngcontent-%COMP%] {\n margin-right: 8px;\n}\n\n.btn-wrapper[_ngcontent-%COMP%] {\n display: flex;\n gap: 5px;\n}\n\n.btn-wrapper[_ngcontent-%COMP%] > button[_ngcontent-%COMP%] {\n margin-left: 5px;\n}\n\n\n\n.empty-dashboard[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n text-align: center;\n color: #666;\n background-color: #f9f9f9;\n border-radius: 8px;\n margin-top: 20px;\n}\n\n.empty-dashboard[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n margin-bottom: 20px;\n color: #ccc;\n}\n\n.empty-dashboard[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n}\n\n.empty-dashboard[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}"] });
|
|
510
497
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleDashboardComponent, [{
|
|
511
498
|
type: Component,
|
|
512
499
|
args: [{ selector: 'mj-single-dashboard', template: "<app-add-item-dialog *ngIf=\"isItemDialogOpened\" (onClose)=\"closeDialog($event)\" [selectedResource]=\"selectedResource\"></app-add-item-dialog>\n<div *ngIf=\"isEditDialogOpened\">\n <app-edit-dashboard (onClose)=\"closeDashboardDialog($event)\" (triggerAddItem)=\"addItem($event)\" [items]=\"items\" [config]=\"config\" (onSave)=\"saveChanges($event)\"></app-edit-dashboard>\n</div>\n\n<app-delete-item-dialog *ngIf=\"isDeletingDashboardItem\" [dashboardItem]=\"selectedDashboardItem\" (removeDashboardItem)=\"deleteDashboardItem($event)\" (onClose)=\"closeDeleteItemComponent()\"></app-delete-item-dialog>\n\n<div class=\"dashboard-container\">\n <div class=\"main-head-dashboard\">\n <div class=\"dashboard-title\">\n <div *ngIf=\"isEditDashboardNameDialogOpened; else dashboard_name_header\" class=\"dashboard-header k-d-flex k-flex-row k-justify-content-flex-end\">\n <input class=\"k-textbox k-input k-input-md k-rounded-md k-input-solid\" (keydown.enter)=\"saveDashboardName()\" type=\"text\" placeholder=\"Enter name here\" id=\"txtDashboardName\" #dashboardNameInput>\n <kendo-button (click)=\"saveDashboardName()\">\n <span class=\"k-i-check k-button-icon k-icon ng-star-inserted\"></span>\n Save\n </kendo-button>\n <kendo-button (click)=\"cancelNameChange()\" >\n <span class=\"k-icon k-i-cancel\"></span>\n Cancel\n </kendo-button>\n </div>\n <ng-template #dashboard_name_header>\n <span class=\"k-icon k-i-star\"></span>\n <h3 (click)=\"toggleInlineNameEdit(true)\">{{dashboardEntity ? dashboardEntity.Name : ''}}</h3>\n </ng-template>\n </div>\n <div class=\"dashboard-header k-d-flex k-flex-row k-justify-content-flex-end\">\n <div *ngIf=\"isEditingDashboard; else edit_dashboard_buttons\">\n <kendo-button (click)=\"onClickSaveDashboard()\">\n <span class=\"fa-solid fa-check\"></span>\n Save\n </kendo-button>\n <kendo-button (click)=\"onclickCancelChanges()\">\n <span class=\"fa-solid fa-xmark\"></span>\n Cancel\n </kendo-button>\n </div>\n <ng-template #edit_dashboard_buttons>\n <kendo-button (click)=\"addItem()\">\n <span class=\"fa-solid fa-plus\"></span>\n Add Item\n </kendo-button>\n <kendo-button (click)=\"toggleEditDashboard(true)\" >\n <span class=\"fa-solid fa-gear\"></span>\n Edit Dashboard\n </kendo-button>\n </ng-template>\n </div>\n </div>\n <div class=\"tile-resource-container\">\n <!-- Show empty state if no items -->\n <div *ngIf=\"items.length === 0 && !isEditingDashboard\" class=\"empty-dashboard\">\n <i class=\"fa-solid fa-grip-vertical\" aria-hidden=\"true\"></i>\n <h3>This dashboard is empty</h3>\n <p>Start by adding reports or user views to your dashboard</p>\n <kendo-button themeColor=\"primary\" (click)=\"addItem()\">\n <span class=\"fa-solid fa-plus\"></span>\n Add Item\n </kendo-button>\n </div>\n \n <!-- Show tile layout if there are items or if editing -->\n <kendo-tilelayout\n *ngIf=\"items.length > 0 || isEditingDashboard\"\n [columns]=\"config.columns\"\n [rowHeight]=\"config.rowHeight\"\n [resizable]=\"allowResize\"\n [reorderable]=\"allowReorder\"\n (reorder)=\"onReorder($event)\"\n (resize)=\"onResize($event)\"\n >\n @for(item of items; track item.uniqueId) {\n <kendo-tilelayout-item (mouseenter)=\"onMouseEnter($event)\" (mouseleave)=\"onMouseOut($event)\" [ngClass]=\"[getSelectedComponentStyle(this)]\" [col]=\"item.col\" [colSpan]=\"item.colSpan\" [rowSpan]=\"item.rowSpan\" [id]=\"item.uniqueId\">\n <kendo-tilelayout-item-header [ngClass]=\"['dashboard-item-header', getIsEditingItemHeaderStyle()]\">\n <div class=\"item-title\">\n <i [class]=\"getResourceIcon(item.ResourceData.ResourceType)\" aria-hidden=\"true\"></i>\n {{item.title}}\n </div>\n @if(!isEditingDashboard) {\n <div>\n <div class=\"btn-wrapper\">\n <button kendoButton title=\"Edit dashboard\" (click)=\"toggleEditDashboard(true)\">\n <span class=\"fa-solid fa-pen-to-square\"></span>\n </button>\n <button kendoButton title=\"Remove item\" (click)=\"showConfirmDeleteDashboardItem(item)\">\n <span class=\"fa-solid fa-trash\"></span>\n </button>\n </div>\n </div>\n }\n </kendo-tilelayout-item-header>\n <kendo-tilelayout-item-body [ngClass]=\"[getIsEditingItemBodyStyle()]\">\n <mj-resource [Data]=\"item.ResourceData\" [isVisible]=\"true\" (ContentLoadingStarted)=\"loadingStarted($event)\" (ContentLoadingComplete)=\"loadingComplete($event)\"></mj-resource>\n </kendo-tilelayout-item-body>\n </kendo-tilelayout-item>\n }\n </kendo-tilelayout>\n </div>\n</div>\n", styles: [":host {\n display: block;\n padding: 20px;\n height: 100%;\n box-sizing: border-box;\n}\n\n.dashboard-container {\n height: calc(100% - 60px);\n overflow: auto;\n}\n\n.dashboard-title {\n display: flex;\n align-items: center;\n gap: 15px;\n}\n\n.dashboard-title .k-icon {\n color: var(--border-blue);\n font-size: 25px;\n}\n\n.dashboard-title h3 {\n color: #424242;\n font-size: 28px;\n font-style: normal;\n font-weight: 300;\n line-height: 28px;\n margin: 0;\n cursor: pointer;\n}\n\n.dashboard-title h3:hover {\n text-decoration: underline;\n}\n\n.dashboard-header {\n display: flex;\n gap: 10px;\n align-items: center;\n}\n\n::ng-deep .dashboard-header .k-button-solid-base {\n border: 1px solid var(--border-blue) !important;\n color: var(--border-blue) !important;\n border-radius: 10px;\n line-height: 34px;\n background: var(--white-color);\n}\n\n::ng-deep .dashboard-header .k-button-solid-primary {\n background: var(--border-blue) !important;\n color: var(--white-color) !important;\n border-radius: 10px;\n line-height: 34px;\n border-color: var(--border-blue);\n}\n\n::ng-deep .dashboard-header .btn-ref .k-button-text {\n display: flex;\n gap: 10px;\n}\n\n.dashboard-header .btn-ref {\n border: none;\n background: transparent;\n}\n\n.main-head-dashboard {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 20px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n\n.tile-resource-container {\n margin-top: 20px;\n padding: 15px;\n border-radius: 8px;\n background-color: #f9f9f9;\n}\n\n.tile-resource-container .k-tilelayout {\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);\n border-radius: 8px;\n padding: 10px;\n}\n\n/* Dashboard item styling */\n::ng-deep kendo-tilelayout-item {\n border-radius: 6px;\n overflow: hidden;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n margin: 5px;\n}\n\n.bg-light-grey {\n background-color: #f0f0f0;\n}\n\n.bg-dark-grey {\n background-color: #5a5a5a;\n color: white;\n}\n\n.bg-blue {\n background-color: #4250AD;\n color: white;\n}\n\n.dashboard-item-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px 15px;\n font-weight: 500;\n}\n\n.dashboard-item-header i {\n margin-right: 8px;\n}\n\n.button-spacing {\n margin-right: 8px;\n}\n\n.btn-wrapper {\n display: flex;\n gap: 5px;\n}\n\n.btn-wrapper > button {\n margin-left: 5px;\n}\n\n/* Empty dashboard state */\n.empty-dashboard {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n text-align: center;\n color: #666;\n background-color: #f9f9f9;\n border-radius: 8px;\n margin-top: 20px;\n}\n\n.empty-dashboard i {\n font-size: 48px;\n margin-bottom: 20px;\n color: #ccc;\n}\n\n.empty-dashboard h3 {\n margin-bottom: 10px;\n}\n\n.empty-dashboard p {\n margin-bottom: 20px;\n}"] }]
|
|
@@ -524,21 +511,27 @@ SingleDashboardComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Si
|
|
|
524
511
|
}] }); })();
|
|
525
512
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SingleDashboardComponent, { className: "SingleDashboardComponent", filePath: "src/lib/single-dashboard/single-dashboard.component.ts", lineNumber: 17 }); })();
|
|
526
513
|
export class DashboardConfigDetails {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
this.reorderable = true;
|
|
532
|
-
}
|
|
514
|
+
columns = 4;
|
|
515
|
+
rowHeight = 150;
|
|
516
|
+
resizable = true;
|
|
517
|
+
reorderable = true;
|
|
533
518
|
}
|
|
534
519
|
export class DashboardItem {
|
|
520
|
+
static nextUniqueId = 1;
|
|
535
521
|
getNextUniqueID() {
|
|
536
522
|
return DashboardItem.nextUniqueId++;
|
|
537
523
|
}
|
|
538
524
|
constructor() {
|
|
539
|
-
this.contentLoading = false;
|
|
540
525
|
this.uniqueId = this.getNextUniqueID();
|
|
541
526
|
}
|
|
527
|
+
uniqueId;
|
|
528
|
+
title;
|
|
529
|
+
col;
|
|
530
|
+
row;
|
|
531
|
+
rowSpan;
|
|
532
|
+
colSpan;
|
|
533
|
+
order;
|
|
534
|
+
ResourceData;
|
|
535
|
+
contentLoading = false;
|
|
542
536
|
}
|
|
543
|
-
DashboardItem.nextUniqueId = 1;
|
|
544
537
|
//# sourceMappingURL=single-dashboard.component.js.map
|