@memberjunction/ng-dashboard-viewer 5.4.0 → 5.5.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/lib/breadcrumb/dashboard-breadcrumb.component.d.ts.map +1 -1
- package/dist/lib/breadcrumb/dashboard-breadcrumb.component.js +5 -4
- package/dist/lib/breadcrumb/dashboard-breadcrumb.component.js.map +1 -1
- package/dist/lib/dashboard-browser/dashboard-browser.component.d.ts.map +1 -1
- package/dist/lib/dashboard-browser/dashboard-browser.component.js +16 -15
- package/dist/lib/dashboard-browser/dashboard-browser.component.js.map +1 -1
- package/dist/lib/dashboard-viewer/dashboard-viewer.component.js +4 -4
- package/dist/lib/dashboard-viewer/dashboard-viewer.component.js.map +1 -1
- package/dist/lib/parts/view-part.component.js +2 -2
- package/dist/lib/parts/view-part.component.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-breadcrumb.component.d.ts","sourceRoot":"","sources":["../../../src/lib/breadcrumb/dashboard-breadcrumb.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EAEZ,iBAAiB,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;;
|
|
1
|
+
{"version":3,"file":"dashboard-breadcrumb.component.d.ts","sourceRoot":"","sources":["../../../src/lib/breadcrumb/dashboard-breadcrumb.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EAEZ,iBAAiB,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;;AAG7F;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAC9C;AAED;;GAEG;AACH,M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G,IAAI,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI;IAQ7D,WAAW,IAAI,IAAI;IAKnB,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI;IA2BzD,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,GAAG,MAAM;IAQnF,OAAO,CAAC,iBAAiB;yCAhKhB,4BAA4B;2CAA5B,4BAA4B;CAyLxC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
function DashboardBreadcrumbComponent_Conditional_0_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
4
5
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
@@ -129,7 +130,7 @@ export class DashboardBreadcrumbComponent {
|
|
|
129
130
|
*/
|
|
130
131
|
OnNavigate(categoryId) {
|
|
131
132
|
const category = categoryId
|
|
132
|
-
? this.Categories.find(c => c.ID
|
|
133
|
+
? this.Categories.find(c => UUIDsEqual(c.ID, categoryId)) || null
|
|
133
134
|
: null;
|
|
134
135
|
this.Navigate.emit({ CategoryId: categoryId, Category: category });
|
|
135
136
|
}
|
|
@@ -145,7 +146,7 @@ export class DashboardBreadcrumbComponent {
|
|
|
145
146
|
get CurrentCategory() {
|
|
146
147
|
if (!this._currentCategoryId)
|
|
147
148
|
return null;
|
|
148
|
-
return this.Categories.find(c => c.ID
|
|
149
|
+
return this.Categories.find(c => UUIDsEqual(c.ID, this._currentCategoryId)) || null;
|
|
149
150
|
}
|
|
150
151
|
// ========================================
|
|
151
152
|
// Drag and Drop
|
|
@@ -203,7 +204,7 @@ export class DashboardBreadcrumbComponent {
|
|
|
203
204
|
const path = [];
|
|
204
205
|
let currentId = this._currentCategoryId;
|
|
205
206
|
while (currentId) {
|
|
206
|
-
const category = this.Categories.find(c => c.ID
|
|
207
|
+
const category = this.Categories.find(c => UUIDsEqual(c.ID, currentId));
|
|
207
208
|
if (category) {
|
|
208
209
|
path.unshift(category);
|
|
209
210
|
currentId = category.ParentID;
|
|
@@ -248,5 +249,5 @@ export class DashboardBreadcrumbComponent {
|
|
|
248
249
|
}], DashboardDrop: [{
|
|
249
250
|
type: Output
|
|
250
251
|
}] }); })();
|
|
251
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardBreadcrumbComponent, { className: "DashboardBreadcrumbComponent", filePath: "src/lib/breadcrumb/dashboard-breadcrumb.component.ts", lineNumber:
|
|
252
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardBreadcrumbComponent, { className: "DashboardBreadcrumbComponent", filePath: "src/lib/breadcrumb/dashboard-breadcrumb.component.ts", lineNumber: 40 }); })();
|
|
252
253
|
//# sourceMappingURL=dashboard-breadcrumb.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-breadcrumb.component.js","sourceRoot":"","sources":["../../../src/lib/breadcrumb/dashboard-breadcrumb.component.ts","../../../src/lib/breadcrumb/dashboard-breadcrumb.component.html"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,uBAAuB,EAE1B,MAAM,eAAe,CAAC;;;;ICYjB,uBAA8D;IAC9D,iCAOoC;IAAlC,AADA,AADA,AADA,wYAAsC,8BAAoB,GAAG,IAAI,KAAC,iOACtD,sCAA4B,KAAC,kMAC5B,oBAAa,KAAC,yNACnB,kCAAwB,KAAC;IACjC,uBAAkC;IAClC,4BAAM;IAAA,YAAgB;IACxB,AADwB,iBAAO,EACtB;;;;;;IARP,cAA4C;IAC5C,AADA,2FAA4C,0DACS;IAM/C,eAAgB;IAAhB,mCAAgB;;;IAKxB,uBAA8D;IAC9D,+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AK;;kBAaL,KAAK;;kBAYL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,MAAM;;kBAGN,MAAM;;kFA7DE,4BAA4B","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef\n} from '@angular/core';\nimport { MJDashboardCategoryEntity, MJDashboardEntity } from '@memberjunction/core-entities';\n\n/**\n * Event emitted when a breadcrumb item is clicked for navigation\n */\nexport interface BreadcrumbNavigateEvent {\n CategoryId: string | null;\n Category: MJDashboardCategoryEntity | null;\n}\n\n/**\n * Event emitted when a dashboard is dropped on a breadcrumb item\n */\nexport interface BreadcrumbDropEvent {\n TargetCategoryId: string | null;\n DashboardIds: string[];\n}\n\n/**\n * Reusable breadcrumb navigation component for dashboards.\n * Shows hierarchical path from root to current location.\n * Supports drag-and-drop of dashboards onto breadcrumb items.\n */\n@Component({\n standalone: false,\n selector: 'mj-dashboard-breadcrumb',\n templateUrl: './dashboard-breadcrumb.component.html',\n styleUrls: ['./dashboard-breadcrumb.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardBreadcrumbComponent {\n // ========================================\n // Inputs\n // ========================================\n\n /** All categories for building breadcrumb path */\n private _categories: MJDashboardCategoryEntity[] = [];\n\n @Input()\n set Categories(value: MJDashboardCategoryEntity[]) {\n this._categories = value || [];\n // Rebuild breadcrumbs when categories change (they may load after CurrentCategoryId is set)\n this.updateBreadcrumbs();\n }\n get Categories(): MJDashboardCategoryEntity[] {\n return this._categories;\n }\n\n /** Current category ID (null = root) */\n private _currentCategoryId: string | null = null;\n\n @Input()\n set CurrentCategoryId(value: string | null) {\n if (value !== this._currentCategoryId) {\n this._currentCategoryId = value;\n this.updateBreadcrumbs();\n }\n }\n get CurrentCategoryId(): string | null {\n return this._currentCategoryId;\n }\n\n /** Current dashboard (when viewing a specific dashboard) */\n @Input() CurrentDashboard: MJDashboardEntity | null = null;\n\n /** Icon class for the root breadcrumb item */\n @Input() RootIcon = 'fa-solid fa-gauge-high';\n\n /** Label for the root breadcrumb item */\n @Input() RootLabel = 'Dashboards';\n\n /** Whether to show the current dashboard name at the end */\n @Input() ShowDashboardName = false;\n\n /** Whether to allow drag-drop onto breadcrumb items */\n @Input() AllowDragDrop = true;\n\n /** Whether breadcrumb is visible (e.g., hide during edit mode) */\n @Input() Visible = true;\n\n /** Size variant: 'normal' or 'large' */\n @Input() Size: 'normal' | 'large' = 'normal';\n\n // ========================================\n // Outputs\n // ========================================\n\n /** Emitted when a breadcrumb item is clicked for navigation */\n @Output() Navigate = new EventEmitter<BreadcrumbNavigateEvent>();\n\n /** Emitted when dashboards are dropped on a breadcrumb item */\n @Output() DashboardDrop = new EventEmitter<BreadcrumbDropEvent>();\n\n // ========================================\n // State\n // ========================================\n\n /** Breadcrumb trail from root to current category */\n public Breadcrumbs: MJDashboardCategoryEntity[] = [];\n\n /** Category ID being hovered during drag */\n public DragOverCategoryId: string | null | undefined = undefined;\n\n // ========================================\n // Constructor\n // ========================================\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n // ========================================\n // Public Methods\n // ========================================\n\n /**\n * Navigate to a category\n */\n public OnNavigate(categoryId: string | null): void {\n const category = categoryId\n ? this.Categories.find(c => c.ID === categoryId) || null\n : null;\n this.Navigate.emit({ CategoryId: categoryId, Category: category });\n }\n\n /**\n * Check if we're at the root level\n */\n public get IsAtRoot(): boolean {\n return !this._currentCategoryId;\n }\n\n /**\n * Get the current category\n */\n public get CurrentCategory(): MJDashboardCategoryEntity | null {\n if (!this._currentCategoryId) return null;\n return this.Categories.find(c => c.ID === this._currentCategoryId) || null;\n }\n\n // ========================================\n // Drag and Drop\n // ========================================\n\n public OnDragOver(categoryId: string | null, event: DragEvent): void {\n if (!this.AllowDragDrop) return;\n event.preventDefault();\n event.dataTransfer!.dropEffect = 'move';\n this.DragOverCategoryId = categoryId;\n this.cdr.markForCheck();\n }\n\n public OnDragLeave(): void {\n this.DragOverCategoryId = undefined;\n this.cdr.markForCheck();\n }\n\n public OnDrop(categoryId: string | null, event: DragEvent): void {\n if (!this.AllowDragDrop) return;\n event.preventDefault();\n\n const data = event.dataTransfer?.getData('application/json');\n if (data) {\n try {\n const dragData = JSON.parse(data);\n if (dragData.type === 'dashboards' && dragData.ids?.length > 0) {\n this.DashboardDrop.emit({\n TargetCategoryId: categoryId,\n DashboardIds: dragData.ids\n });\n }\n } catch {\n // Invalid drag data\n }\n }\n\n this.DragOverCategoryId = undefined;\n this.cdr.markForCheck();\n }\n\n // ========================================\n // Track By\n // ========================================\n\n public TrackByCategory(_index: number, category: MJDashboardCategoryEntity): string {\n return category.ID;\n }\n\n // ========================================\n // Private Methods\n // ========================================\n\n private updateBreadcrumbs(): void {\n this.Breadcrumbs = [];\n\n if (!this._currentCategoryId) {\n this.cdr.markForCheck();\n return;\n }\n\n // Build the path from current category to root\n const path: MJDashboardCategoryEntity[] = [];\n let currentId: string | null = this._currentCategoryId;\n\n while (currentId) {\n const category = this.Categories.find(c => c.ID === currentId);\n if (category) {\n path.unshift(category);\n currentId = category.ParentID;\n } else {\n break;\n }\n }\n\n this.Breadcrumbs = path;\n this.cdr.markForCheck();\n }\n}\n","<!-- Dashboard Breadcrumb Component -->\n@if (Visible) {\n <div\n class=\"dashboard-breadcrumb\"\n [class.large]=\"Size === 'large'\"\n >\n <!-- Root item -->\n <button\n class=\"breadcrumb-item root\"\n [class.drop-target]=\"DragOverCategoryId === null\"\n (click)=\"OnNavigate(null)\"\n (dragover)=\"OnDragOver(null, $event)\"\n (dragleave)=\"OnDragLeave()\"\n (drop)=\"OnDrop(null, $event)\">\n <i [class]=\"RootIcon\"></i>\n <span>{{ RootLabel }}</span>\n </button>\n <!-- Category path -->\n @for (crumb of Breadcrumbs; track TrackByCategory($index, crumb); let last = $last) {\n <i class=\"fa-solid fa-chevron-right breadcrumb-separator\"></i>\n <button\n class=\"breadcrumb-item\"\n [class.current]=\"last && !ShowDashboardName\"\n [class.drop-target]=\"DragOverCategoryId === crumb.ID\"\n (click)=\"!last || ShowDashboardName ? OnNavigate(crumb.ID) : null\"\n (dragover)=\"OnDragOver(crumb.ID, $event)\"\n (dragleave)=\"OnDragLeave()\"\n (drop)=\"OnDrop(crumb.ID, $event)\">\n <i class=\"fa-solid fa-folder\"></i>\n <span>{{ crumb.Name }}</span>\n </button>\n }\n <!-- Dashboard name (when viewing a specific dashboard) -->\n @if (ShowDashboardName && CurrentDashboard) {\n <i class=\"fa-solid fa-chevron-right breadcrumb-separator\"></i>\n <span class=\"breadcrumb-item current dashboard-name\">\n <i class=\"fa-solid fa-chart-line\"></i>\n <span>{{ CurrentDashboard.Name }}</span>\n </span>\n }\n </div>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dashboard-breadcrumb.component.js","sourceRoot":"","sources":["../../../src/lib/breadcrumb/dashboard-breadcrumb.component.ts","../../../src/lib/breadcrumb/dashboard-breadcrumb.component.html"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,uBAAuB,EAE1B,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;;ICU9C,uBAA8D;IAC9D,iCAOoC;IAAlC,AADA,AADA,AADA,wYAAsC,8BAAoB,GAAG,IAAI,KAAC,iOACtD,sCAA4B,KAAC,kMAC5B,oBAAa,KAAC,yNACnB,kCAAwB,KAAC;IACjC,uBAAkC;IAClC,4BAAM;IAAA,YAAgB;IACxB,AADwB,iBAAO,EACtB;;;;;;IARP,cAA4C;IAC5C,AADA,2FAA4C,0DACS;IAM/C,eAAgB;IAAhB,mCAAgB;;;IAKxB,uBAA8D;IAC9D,+BAAqD;IACnD,uBAAsC;IACtC,4BAAM;IAAA,YAA2B;IACnC,AADmC,iBAAO,EACnC;;;IADC,eAA2B;IAA3B,kDAA2B;;;;IA9BrC,AALF,8BAGG,gB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BAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,MAAM;;kBAGN,MAAM;;kFA7DE,4BAA4B","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectionStrategy,\n ChangeDetectorRef\n} from '@angular/core';\nimport { MJDashboardCategoryEntity, MJDashboardEntity } from '@memberjunction/core-entities';\nimport { UUIDsEqual } from '@memberjunction/global';\n\n/**\n * Event emitted when a breadcrumb item is clicked for navigation\n */\nexport interface BreadcrumbNavigateEvent {\n CategoryId: string | null;\n Category: MJDashboardCategoryEntity | null;\n}\n\n/**\n * Event emitted when a dashboard is dropped on a breadcrumb item\n */\nexport interface BreadcrumbDropEvent {\n TargetCategoryId: string | null;\n DashboardIds: string[];\n}\n\n/**\n * Reusable breadcrumb navigation component for dashboards.\n * Shows hierarchical path from root to current location.\n * Supports drag-and-drop of dashboards onto breadcrumb items.\n */\n@Component({\n standalone: false,\n selector: 'mj-dashboard-breadcrumb',\n templateUrl: './dashboard-breadcrumb.component.html',\n styleUrls: ['./dashboard-breadcrumb.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DashboardBreadcrumbComponent {\n // ========================================\n // Inputs\n // ========================================\n\n /** All categories for building breadcrumb path */\n private _categories: MJDashboardCategoryEntity[] = [];\n\n @Input()\n set Categories(value: MJDashboardCategoryEntity[]) {\n this._categories = value || [];\n // Rebuild breadcrumbs when categories change (they may load after CurrentCategoryId is set)\n this.updateBreadcrumbs();\n }\n get Categories(): MJDashboardCategoryEntity[] {\n return this._categories;\n }\n\n /** Current category ID (null = root) */\n private _currentCategoryId: string | null = null;\n\n @Input()\n set CurrentCategoryId(value: string | null) {\n if (value !== this._currentCategoryId) {\n this._currentCategoryId = value;\n this.updateBreadcrumbs();\n }\n }\n get CurrentCategoryId(): string | null {\n return this._currentCategoryId;\n }\n\n /** Current dashboard (when viewing a specific dashboard) */\n @Input() CurrentDashboard: MJDashboardEntity | null = null;\n\n /** Icon class for the root breadcrumb item */\n @Input() RootIcon = 'fa-solid fa-gauge-high';\n\n /** Label for the root breadcrumb item */\n @Input() RootLabel = 'Dashboards';\n\n /** Whether to show the current dashboard name at the end */\n @Input() ShowDashboardName = false;\n\n /** Whether to allow drag-drop onto breadcrumb items */\n @Input() AllowDragDrop = true;\n\n /** Whether breadcrumb is visible (e.g., hide during edit mode) */\n @Input() Visible = true;\n\n /** Size variant: 'normal' or 'large' */\n @Input() Size: 'normal' | 'large' = 'normal';\n\n // ========================================\n // Outputs\n // ========================================\n\n /** Emitted when a breadcrumb item is clicked for navigation */\n @Output() Navigate = new EventEmitter<BreadcrumbNavigateEvent>();\n\n /** Emitted when dashboards are dropped on a breadcrumb item */\n @Output() DashboardDrop = new EventEmitter<BreadcrumbDropEvent>();\n\n // ========================================\n // State\n // ========================================\n\n /** Breadcrumb trail from root to current category */\n public Breadcrumbs: MJDashboardCategoryEntity[] = [];\n\n /** Category ID being hovered during drag */\n public DragOverCategoryId: string | null | undefined = undefined;\n\n // ========================================\n // Constructor\n // ========================================\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n // ========================================\n // Public Methods\n // ========================================\n\n /**\n * Navigate to a category\n */\n public OnNavigate(categoryId: string | null): void {\n const category = categoryId\n ? this.Categories.find(c => UUIDsEqual(c.ID, categoryId)) || null\n : null;\n this.Navigate.emit({ CategoryId: categoryId, Category: category });\n }\n\n /**\n * Check if we're at the root level\n */\n public get IsAtRoot(): boolean {\n return !this._currentCategoryId;\n }\n\n /**\n * Get the current category\n */\n public get CurrentCategory(): MJDashboardCategoryEntity | null {\n if (!this._currentCategoryId) return null;\n return this.Categories.find(c => UUIDsEqual(c.ID, this._currentCategoryId)) || null;\n }\n\n // ========================================\n // Drag and Drop\n // ========================================\n\n public OnDragOver(categoryId: string | null, event: DragEvent): void {\n if (!this.AllowDragDrop) return;\n event.preventDefault();\n event.dataTransfer!.dropEffect = 'move';\n this.DragOverCategoryId = categoryId;\n this.cdr.markForCheck();\n }\n\n public OnDragLeave(): void {\n this.DragOverCategoryId = undefined;\n this.cdr.markForCheck();\n }\n\n public OnDrop(categoryId: string | null, event: DragEvent): void {\n if (!this.AllowDragDrop) return;\n event.preventDefault();\n\n const data = event.dataTransfer?.getData('application/json');\n if (data) {\n try {\n const dragData = JSON.parse(data);\n if (dragData.type === 'dashboards' && dragData.ids?.length > 0) {\n this.DashboardDrop.emit({\n TargetCategoryId: categoryId,\n DashboardIds: dragData.ids\n });\n }\n } catch {\n // Invalid drag data\n }\n }\n\n this.DragOverCategoryId = undefined;\n this.cdr.markForCheck();\n }\n\n // ========================================\n // Track By\n // ========================================\n\n public TrackByCategory(_index: number, category: MJDashboardCategoryEntity): string {\n return category.ID;\n }\n\n // ========================================\n // Private Methods\n // ========================================\n\n private updateBreadcrumbs(): void {\n this.Breadcrumbs = [];\n\n if (!this._currentCategoryId) {\n this.cdr.markForCheck();\n return;\n }\n\n // Build the path from current category to root\n const path: MJDashboardCategoryEntity[] = [];\n let currentId: string | null = this._currentCategoryId;\n\n while (currentId) {\n const category = this.Categories.find(c => UUIDsEqual(c.ID, currentId));\n if (category) {\n path.unshift(category);\n currentId = category.ParentID;\n } else {\n break;\n }\n }\n\n this.Breadcrumbs = path;\n this.cdr.markForCheck();\n }\n}\n","<!-- Dashboard Breadcrumb Component -->\n@if (Visible) {\n <div\n class=\"dashboard-breadcrumb\"\n [class.large]=\"Size === 'large'\"\n >\n <!-- Root item -->\n <button\n class=\"breadcrumb-item root\"\n [class.drop-target]=\"DragOverCategoryId === null\"\n (click)=\"OnNavigate(null)\"\n (dragover)=\"OnDragOver(null, $event)\"\n (dragleave)=\"OnDragLeave()\"\n (drop)=\"OnDrop(null, $event)\">\n <i [class]=\"RootIcon\"></i>\n <span>{{ RootLabel }}</span>\n </button>\n <!-- Category path -->\n @for (crumb of Breadcrumbs; track TrackByCategory($index, crumb); let last = $last) {\n <i class=\"fa-solid fa-chevron-right breadcrumb-separator\"></i>\n <button\n class=\"breadcrumb-item\"\n [class.current]=\"last && !ShowDashboardName\"\n [class.drop-target]=\"DragOverCategoryId === crumb.ID\"\n (click)=\"!last || ShowDashboardName ? OnNavigate(crumb.ID) : null\"\n (dragover)=\"OnDragOver(crumb.ID, $event)\"\n (dragleave)=\"OnDragLeave()\"\n (drop)=\"OnDrop(crumb.ID, $event)\">\n <i class=\"fa-solid fa-folder\"></i>\n <span>{{ crumb.Name }}</span>\n </button>\n }\n <!-- Dashboard name (when viewing a specific dashboard) -->\n @if (ShowDashboardName && CurrentDashboard) {\n <i class=\"fa-solid fa-chevron-right breadcrumb-separator\"></i>\n <span class=\"breadcrumb-item current dashboard-name\">\n <i class=\"fa-solid fa-chart-line\"></i>\n <span>{{ CurrentDashboard.Name }}</span>\n </span>\n }\n </div>\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-browser.component.d.ts","sourceRoot":"","sources":["../../../src/lib/dashboard-browser/dashboard-browser.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EACZ,MAAM,EACN,SAAS,EACT,iBAAiB,EAEpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;;
|
|
1
|
+
{"version":3,"file":"dashboard-browser.component.d.ts","sourceRoot":"","sources":["../../../src/lib/dashboard-browser/dashboard-browser.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EACZ,MAAM,EACN,SAAS,EACT,iBAAiB,EAEpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;;AAOvH;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,YAAY,EAAE,OAAO,CAAC;CACzB;AAED;;G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zB;;OAEG;IACI,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IASjD,OAAO,CAAC,WAAW;yCAxkCV,yBAAyB;2CAAzB,yBAAyB;CAqlCrC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
import * as i1 from "@angular/forms";
|
|
5
6
|
import * as i2 from "@memberjunction/ng-shared-generic";
|
|
@@ -956,7 +957,7 @@ export class DashboardBrowserComponent {
|
|
|
956
957
|
OnCategoryChange(categoryId) {
|
|
957
958
|
this._selectedCategoryId = categoryId;
|
|
958
959
|
const category = categoryId
|
|
959
|
-
? this.Categories.find(c => c.ID
|
|
960
|
+
? this.Categories.find(c => UUIDsEqual(c.ID, categoryId)) || null
|
|
960
961
|
: null;
|
|
961
962
|
this.CategoryChange.emit({ CategoryId: categoryId, Category: category });
|
|
962
963
|
this.applyFilters();
|
|
@@ -976,7 +977,7 @@ export class DashboardBrowserComponent {
|
|
|
976
977
|
NavigateToCategory(categoryId) {
|
|
977
978
|
this._selectedCategoryId = categoryId;
|
|
978
979
|
const category = categoryId
|
|
979
|
-
? this.Categories.find(c => c.ID
|
|
980
|
+
? this.Categories.find(c => UUIDsEqual(c.ID, categoryId)) || null
|
|
980
981
|
: null;
|
|
981
982
|
this.CategoryChange.emit({ CategoryId: categoryId, Category: category });
|
|
982
983
|
this.applyFilters();
|
|
@@ -987,7 +988,7 @@ export class DashboardBrowserComponent {
|
|
|
987
988
|
NavigateUp() {
|
|
988
989
|
if (!this._selectedCategoryId)
|
|
989
990
|
return;
|
|
990
|
-
const currentCategory = this.Categories.find(c => c.ID
|
|
991
|
+
const currentCategory = this.Categories.find(c => UUIDsEqual(c.ID, this._selectedCategoryId));
|
|
991
992
|
const parentId = currentCategory?.ParentID || null;
|
|
992
993
|
this.NavigateToCategory(parentId);
|
|
993
994
|
}
|
|
@@ -1003,7 +1004,7 @@ export class DashboardBrowserComponent {
|
|
|
1003
1004
|
get CurrentCategory() {
|
|
1004
1005
|
if (!this._selectedCategoryId)
|
|
1005
1006
|
return null;
|
|
1006
|
-
return this.Categories.find(c => c.ID
|
|
1007
|
+
return this.Categories.find(c => UUIDsEqual(c.ID, this._selectedCategoryId)) || null;
|
|
1007
1008
|
}
|
|
1008
1009
|
// ========================================
|
|
1009
1010
|
// Public Methods - Selection
|
|
@@ -1296,8 +1297,8 @@ export class DashboardBrowserComponent {
|
|
|
1296
1297
|
* Get count of dashboards and sub-categories in a category
|
|
1297
1298
|
*/
|
|
1298
1299
|
GetCategoryContentCount(category) {
|
|
1299
|
-
const dashboards = this.Dashboards.filter(d => d.CategoryID
|
|
1300
|
-
const categories = this.Categories.filter(c => c.ParentID
|
|
1300
|
+
const dashboards = this.Dashboards.filter(d => UUIDsEqual(d.CategoryID, category.ID)).length;
|
|
1301
|
+
const categories = this.Categories.filter(c => UUIDsEqual(c.ParentID, category.ID)).length;
|
|
1301
1302
|
return { dashboards, categories };
|
|
1302
1303
|
}
|
|
1303
1304
|
// ========================================
|
|
@@ -1400,7 +1401,7 @@ export class DashboardBrowserComponent {
|
|
|
1400
1401
|
try {
|
|
1401
1402
|
const dragData = JSON.parse(data);
|
|
1402
1403
|
if (dragData.type === 'dashboards' && dragData.ids?.length > 0) {
|
|
1403
|
-
const dashboards = this.Dashboards.filter(d => dragData.ids.
|
|
1404
|
+
const dashboards = this.Dashboards.filter(d => dragData.ids.some((id) => UUIDsEqual(id, d.ID)));
|
|
1404
1405
|
if (dashboards.length > 0) {
|
|
1405
1406
|
this.DashboardMove.emit({
|
|
1406
1407
|
Dashboards: dashboards,
|
|
@@ -1426,7 +1427,7 @@ export class DashboardBrowserComponent {
|
|
|
1426
1427
|
GetCategoryName(categoryId) {
|
|
1427
1428
|
if (!categoryId)
|
|
1428
1429
|
return 'Uncategorized';
|
|
1429
|
-
const category = this.Categories.find(c => c.ID
|
|
1430
|
+
const category = this.Categories.find(c => UUIDsEqual(c.ID, categoryId));
|
|
1430
1431
|
return category?.Name || 'Unknown';
|
|
1431
1432
|
}
|
|
1432
1433
|
/**
|
|
@@ -1581,7 +1582,7 @@ export class DashboardBrowserComponent {
|
|
|
1581
1582
|
try {
|
|
1582
1583
|
const dragData = JSON.parse(data);
|
|
1583
1584
|
if (dragData.type === 'dashboards' && dragData.ids?.length > 0) {
|
|
1584
|
-
const dashboards = this.Dashboards.filter(d => dragData.ids.
|
|
1585
|
+
const dashboards = this.Dashboards.filter(d => dragData.ids.some((id) => UUIDsEqual(id, d.ID)));
|
|
1585
1586
|
if (dashboards.length > 0) {
|
|
1586
1587
|
this.DashboardMove.emit({
|
|
1587
1588
|
Dashboards: dashboards,
|
|
@@ -1605,7 +1606,7 @@ export class DashboardBrowserComponent {
|
|
|
1605
1606
|
* Handle drop from breadcrumb component
|
|
1606
1607
|
*/
|
|
1607
1608
|
OnBreadcrumbDrop(event) {
|
|
1608
|
-
const dashboards = this.Dashboards.filter(d => event.DashboardIds.
|
|
1609
|
+
const dashboards = this.Dashboards.filter(d => event.DashboardIds.some(id => UUIDsEqual(id, d.ID)));
|
|
1609
1610
|
if (dashboards.length > 0) {
|
|
1610
1611
|
this.DashboardMove.emit({
|
|
1611
1612
|
Dashboards: dashboards,
|
|
@@ -1651,7 +1652,7 @@ export class DashboardBrowserComponent {
|
|
|
1651
1652
|
// Find categories that are children of the current category
|
|
1652
1653
|
// Handle both null and undefined ParentID for root-level categories
|
|
1653
1654
|
if (this._selectedCategoryId) {
|
|
1654
|
-
this.ChildCategories = this.Categories.filter(c => c.ParentID
|
|
1655
|
+
this.ChildCategories = this.Categories.filter(c => UUIDsEqual(c.ParentID, this._selectedCategoryId));
|
|
1655
1656
|
}
|
|
1656
1657
|
else {
|
|
1657
1658
|
// At root level - show categories with no parent (null or undefined)
|
|
@@ -1678,7 +1679,7 @@ export class DashboardBrowserComponent {
|
|
|
1678
1679
|
const path = [];
|
|
1679
1680
|
let currentId = this._selectedCategoryId;
|
|
1680
1681
|
while (currentId) {
|
|
1681
|
-
const category = this.Categories.find(c => c.ID
|
|
1682
|
+
const category = this.Categories.find(c => UUIDsEqual(c.ID, currentId));
|
|
1682
1683
|
if (category) {
|
|
1683
1684
|
path.unshift(category);
|
|
1684
1685
|
currentId = category.ParentID;
|
|
@@ -1702,8 +1703,8 @@ export class DashboardBrowserComponent {
|
|
|
1702
1703
|
this.cdr.markForCheck();
|
|
1703
1704
|
}
|
|
1704
1705
|
selectRange(fromId, toId) {
|
|
1705
|
-
const fromIndex = this.FilteredDashboards.findIndex(d => d.ID
|
|
1706
|
-
const toIndex = this.FilteredDashboards.findIndex(d => d.ID
|
|
1706
|
+
const fromIndex = this.FilteredDashboards.findIndex(d => UUIDsEqual(d.ID, fromId));
|
|
1707
|
+
const toIndex = this.FilteredDashboards.findIndex(d => UUIDsEqual(d.ID, toId));
|
|
1707
1708
|
if (fromIndex === -1 || toIndex === -1)
|
|
1708
1709
|
return;
|
|
1709
1710
|
const start = Math.min(fromIndex, toIndex);
|
|
@@ -1844,5 +1845,5 @@ export class DashboardBrowserComponent {
|
|
|
1844
1845
|
}], ViewPreferenceChange: [{
|
|
1845
1846
|
type: Output
|
|
1846
1847
|
}] }); })();
|
|
1847
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardBrowserComponent, { className: "DashboardBrowserComponent", filePath: "src/lib/dashboard-browser/dashboard-browser.component.ts", lineNumber:
|
|
1848
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardBrowserComponent, { className: "DashboardBrowserComponent", filePath: "src/lib/dashboard-browser/dashboard-browser.component.ts", lineNumber: 114 }); })();
|
|
1848
1849
|
//# sourceMappingURL=dashboard-browser.component.js.map
|