@memberjunction/ng-dashboards 5.4.1 → 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/AI/components/agents/agent-configuration.component.js +4 -4
- package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.js +5 -4
- package/dist/AI/components/agents/agent-editor.component.js.map +1 -1
- package/dist/AI/components/models/model-management.component.js +3 -3
- package/dist/AI/components/models/model-management.component.js.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +8 -7
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
- package/dist/AI/components/prompts/prompt-management.component.js +3 -3
- package/dist/AI/components/prompts/prompt-management.component.js.map +1 -1
- package/dist/AI/components/system/system-configuration.component.js +4 -4
- package/dist/AI/components/system/system-configuration.component.js.map +1 -1
- package/dist/APIKeys/api-applications-panel.component.d.ts.map +1 -1
- package/dist/APIKeys/api-applications-panel.component.js +3 -2
- package/dist/APIKeys/api-applications-panel.component.js.map +1 -1
- package/dist/APIKeys/api-keys-resource.component.js +2 -2
- package/dist/APIKeys/api-keys-resource.component.js.map +1 -1
- package/dist/APIKeys/api-scopes-panel.component.d.ts.map +1 -1
- package/dist/APIKeys/api-scopes-panel.component.js +4 -3
- package/dist/APIKeys/api-scopes-panel.component.js.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +3 -3
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/categories-list-view.component.d.ts.map +1 -1
- package/dist/Actions/components/categories-list-view.component.js +3 -2
- package/dist/Actions/components/categories-list-view.component.js.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.js +2 -2
- package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-explorer.component.js +2 -2
- package/dist/Actions/components/explorer/action-explorer.component.js.map +1 -1
- package/dist/Actions/components/explorer/new-action-panel.component.d.ts.map +1 -1
- package/dist/Actions/components/explorer/new-action-panel.component.js +3 -2
- package/dist/Actions/components/explorer/new-action-panel.component.js.map +1 -1
- package/dist/Actions/components/explorer/new-category-panel.component.d.ts.map +1 -1
- package/dist/Actions/components/explorer/new-category-panel.component.js +3 -2
- package/dist/Actions/components/explorer/new-category-panel.component.js.map +1 -1
- package/dist/Communication/communication-templates-resource.component.js +2 -2
- package/dist/Communication/communication-templates-resource.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts +6 -0
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js +19 -6
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts +4 -0
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +13 -4
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
- package/dist/Credentials/components/credentials-categories-resource.component.d.ts +2 -0
- package/dist/Credentials/components/credentials-categories-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-categories-resource.component.js +13 -9
- package/dist/Credentials/components/credentials-categories-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +11 -11
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-overview-resource.component.js +3 -3
- package/dist/Credentials/components/credentials-overview-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.d.ts +2 -0
- package/dist/Credentials/components/credentials-types-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.js +13 -9
- package/dist/Credentials/components/credentials-types-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js +11 -11
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js +4 -3
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
- package/dist/DataExplorer/components/view-selector/view-selector.component.d.ts.map +1 -1
- package/dist/DataExplorer/components/view-selector/view-selector.component.js +4 -3
- package/dist/DataExplorer/components/view-selector/view-selector.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +6 -6
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-resource.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-resource.component.js +4 -1
- package/dist/DataExplorer/data-explorer-resource.component.js.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.d.ts.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.js +9 -8
- package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
- package/dist/EntityAdmin/entity-admin-dashboard.component.js +2 -2
- package/dist/EntityAdmin/entity-admin-dashboard.component.js.map +1 -1
- package/dist/Home/home-application.js +2 -2
- package/dist/Home/home-application.js.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js +3 -3
- package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-categories-resource.component.d.ts +1 -0
- package/dist/Lists/components/lists-categories-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-categories-resource.component.js +17 -14
- package/dist/Lists/components/lists-categories-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js +2 -2
- package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-operations-resource.component.d.ts +1 -0
- package/dist/Lists/components/lists-operations-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-operations-resource.component.js +15 -12
- package/dist/Lists/components/lists-operations-resource.component.js.map +1 -1
- package/dist/MCP/components/mcp-connection-dialog.component.d.ts.map +1 -1
- package/dist/MCP/components/mcp-connection-dialog.component.js +3 -2
- package/dist/MCP/components/mcp-connection-dialog.component.js.map +1 -1
- package/dist/MCP/components/mcp-test-tool-dialog.component.d.ts.map +1 -1
- package/dist/MCP/components/mcp-test-tool-dialog.component.js +8 -7
- package/dist/MCP/components/mcp-test-tool-dialog.component.js.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +22 -22
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts +2 -0
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +14 -10
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.js +2 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.js.map +1 -1
- package/dist/Testing/components/testing-explorer.component.d.ts +1 -0
- package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-explorer.component.js +22 -18
- package/dist/Testing/components/testing-explorer.component.js.map +1 -1
- package/dist/Testing/components/testing-review.component.d.ts +1 -0
- package/dist/Testing/components/testing-review.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-review.component.js +14 -10
- package/dist/Testing/components/testing-review.component.js.map +1 -1
- package/dist/VersionHistory/components/diff-resource.component.js +6 -6
- package/dist/VersionHistory/components/diff-resource.component.js.map +1 -1
- package/dist/VersionHistory/components/graph-resource.component.js +2 -2
- package/dist/VersionHistory/components/graph-resource.component.js.map +1 -1
- package/dist/VersionHistory/components/labels-resource.component.js +3 -3
- package/dist/VersionHistory/components/labels-resource.component.js.map +1 -1
- package/package.json +38 -38
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Component, ViewEncapsulation } from '@angular/core';
|
|
8
|
-
import { RegisterClass } from '@memberjunction/global';
|
|
8
|
+
import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
|
|
9
9
|
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
10
10
|
import { Metadata, RunView } from '@memberjunction/core';
|
|
11
11
|
import { Subject } from 'rxjs';
|
|
@@ -234,8 +234,8 @@ function ListsCategoriesResource_ng_template_14_Template(rf, ctx) { if (rf & 1)
|
|
|
234
234
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
235
235
|
i0.ɵɵstyleProp("padding-left", vm_r9.depth * 20, "px");
|
|
236
236
|
i0.ɵɵadvance();
|
|
237
|
-
i0.ɵɵclassProp("selected",
|
|
238
|
-
i0.ɵɵattribute("aria-expanded", ctx_r2.hasChildren(vm_r9.category) ? vm_r9.isExpanded : null)("aria-selected",
|
|
237
|
+
i0.ɵɵclassProp("selected", ctx_r2.IsCategorySelected(vm_r9.category));
|
|
238
|
+
i0.ɵɵattribute("aria-expanded", ctx_r2.hasChildren(vm_r9.category) ? vm_r9.isExpanded : null)("aria-selected", ctx_r2.IsCategorySelected(vm_r9.category))("aria-label", vm_r9.category.Name + " - " + vm_r9.listCount + " lists");
|
|
239
239
|
i0.ɵɵadvance();
|
|
240
240
|
i0.ɵɵconditional(ctx_r2.hasChildren(vm_r9.category) ? 2 : -1);
|
|
241
241
|
i0.ɵɵadvance();
|
|
@@ -447,7 +447,7 @@ let ListsCategoriesResource = class ListsCategoriesResource extends BaseResource
|
|
|
447
447
|
this.categoryViewModels = [];
|
|
448
448
|
const buildVm = (category, depth) => {
|
|
449
449
|
const lists = this.listsByCategoryId.get(category.ID) || [];
|
|
450
|
-
const children = this.categories.filter(c => c.ParentID
|
|
450
|
+
const children = this.categories.filter(c => UUIDsEqual(c.ParentID, category.ID));
|
|
451
451
|
return {
|
|
452
452
|
category,
|
|
453
453
|
listCount: lists.length,
|
|
@@ -458,7 +458,7 @@ let ListsCategoriesResource = class ListsCategoriesResource extends BaseResource
|
|
|
458
458
|
};
|
|
459
459
|
const processCategory = (category, depth) => {
|
|
460
460
|
this.categoryViewModels.push(buildVm(category, depth));
|
|
461
|
-
const children = this.categories.filter(c => c.ParentID
|
|
461
|
+
const children = this.categories.filter(c => UUIDsEqual(c.ParentID, category.ID));
|
|
462
462
|
for (const child of children) {
|
|
463
463
|
processCategory(child, depth + 1);
|
|
464
464
|
}
|
|
@@ -476,20 +476,20 @@ let ListsCategoriesResource = class ListsCategoriesResource extends BaseResource
|
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
478
|
this.availableParents.push({ ID: cat.ID, displayName: prefix + cat.Name });
|
|
479
|
-
const children = this.categories.filter(c => c.ParentID
|
|
479
|
+
const children = this.categories.filter(c => UUIDsEqual(c.ParentID, cat.ID));
|
|
480
480
|
for (const child of children) {
|
|
481
481
|
addCategory(child, prefix + '\u00A0\u00A0');
|
|
482
482
|
}
|
|
483
483
|
};
|
|
484
484
|
const topLevel = this.categories.filter(c => !c.ParentID);
|
|
485
485
|
for (const cat of topLevel) {
|
|
486
|
-
if (this.editingCategory?.ID
|
|
486
|
+
if (!UUIDsEqual(this.editingCategory?.ID, cat.ID)) {
|
|
487
487
|
addCategory(cat, '');
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
isDescendantOf(category, ancestor) {
|
|
492
|
-
if (category.ID
|
|
492
|
+
if (UUIDsEqual(category.ID, ancestor.ID))
|
|
493
493
|
return true;
|
|
494
494
|
if (!category.ParentID)
|
|
495
495
|
return false;
|
|
@@ -500,10 +500,10 @@ let ListsCategoriesResource = class ListsCategoriesResource extends BaseResource
|
|
|
500
500
|
return this.categoryViewModels.filter(vm => !vm.category.ParentID);
|
|
501
501
|
}
|
|
502
502
|
getChildCategories(parent) {
|
|
503
|
-
return this.categoryViewModels.filter(vm => vm.category.ParentID
|
|
503
|
+
return this.categoryViewModels.filter(vm => UUIDsEqual(vm.category.ParentID, parent.ID));
|
|
504
504
|
}
|
|
505
505
|
hasChildren(category) {
|
|
506
|
-
return this.categories.some(c => c.ParentID
|
|
506
|
+
return this.categories.some(c => UUIDsEqual(c.ParentID, category.ID));
|
|
507
507
|
}
|
|
508
508
|
toggleExpand(event, vm) {
|
|
509
509
|
event.stopPropagation();
|
|
@@ -521,6 +521,9 @@ let ListsCategoriesResource = class ListsCategoriesResource extends BaseResource
|
|
|
521
521
|
vm.isExpanded = false;
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
+
IsCategorySelected(category) {
|
|
525
|
+
return UUIDsEqual(this.selectedCategory?.ID, category.ID);
|
|
526
|
+
}
|
|
524
527
|
selectCategory(category) {
|
|
525
528
|
this.selectedCategory = category;
|
|
526
529
|
this.selectedCategoryLists = this.listsByCategoryId.get(category.ID) || [];
|
|
@@ -538,7 +541,7 @@ let ListsCategoriesResource = class ListsCategoriesResource extends BaseResource
|
|
|
538
541
|
getSelectedCategoryChildCount() {
|
|
539
542
|
if (!this.selectedCategory)
|
|
540
543
|
return 0;
|
|
541
|
-
return this.categories.filter(c => c.ParentID
|
|
544
|
+
return this.categories.filter(c => UUIDsEqual(c.ParentID, this.selectedCategory.ID)).length;
|
|
542
545
|
}
|
|
543
546
|
createCategory() {
|
|
544
547
|
this.editingCategory = null;
|
|
@@ -564,7 +567,7 @@ let ListsCategoriesResource = class ListsCategoriesResource extends BaseResource
|
|
|
564
567
|
this.categoryToDelete = this.selectedCategory;
|
|
565
568
|
const categoryName = this.categoryToDelete.Name;
|
|
566
569
|
const listsInCategory = this.listsByCategoryId.get(this.categoryToDelete.ID) || [];
|
|
567
|
-
const childCategories = this.categories.filter(c => c.ParentID
|
|
570
|
+
const childCategories = this.categories.filter(c => UUIDsEqual(c.ParentID, this.categoryToDelete.ID));
|
|
568
571
|
let message = `Are you sure you want to delete "${categoryName}"?`;
|
|
569
572
|
if (listsInCategory.length > 0) {
|
|
570
573
|
message += ` ${listsInCategory.length} list(s) will be uncategorized.`;
|
|
@@ -851,7 +854,7 @@ export { ListsCategoriesResource };
|
|
|
851
854
|
<div class="category-node" [style.padding-left.px]="vm.depth * 20">
|
|
852
855
|
<div
|
|
853
856
|
class="node-content"
|
|
854
|
-
[class.selected]="
|
|
857
|
+
[class.selected]="IsCategorySelected(vm.category)"
|
|
855
858
|
(click)="selectCategory(vm.category)"
|
|
856
859
|
(keydown.enter)="selectCategory(vm.category)"
|
|
857
860
|
(keydown.space)="selectCategory(vm.category); $event.preventDefault()"
|
|
@@ -860,7 +863,7 @@ export { ListsCategoriesResource };
|
|
|
860
863
|
tabindex="0"
|
|
861
864
|
role="treeitem"
|
|
862
865
|
[attr.aria-expanded]="hasChildren(vm.category) ? vm.isExpanded : null"
|
|
863
|
-
[attr.aria-selected]="
|
|
866
|
+
[attr.aria-selected]="IsCategorySelected(vm.category)"
|
|
864
867
|
[attr.aria-label]="vm.category.Name + ' - ' + vm.listCount + ' lists'">
|
|
865
868
|
@if (hasChildren(vm.category)) {
|
|
866
869
|
<button
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists-categories-resource.component.js","sourceRoot":"","sources":["../../../src/Lists/components/lists-categories-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAgC,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;;;;;;;;IAgCvB,8BAA+B;IAC7B,iCAAoE;IACtE,iBAAM;;;;IAMJ,AADF,8BAAyB,cACe;IAEpC,AADA,0BAA2B,YACY;IACzC,iBAAM;IACN,0BAAI;IAAA,i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C;YAGD,cAoFC;YApFD,+EAoFC;YA6CD,eAqDC;YArDD,0CAqDC;YAGD,cAoBC;YApBD,iDAoBC;;;AA8nBM,uBAAuB;IAj4BnC,aAAa,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;GAi4BnD,uBAAuB,CAwWnC;;iFAxWY,uBAAuB;cAh4BnC,SAAS;6BACI,KAAK,YACP,8BAA8B,YAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiQP,iBA0nBY,iBAAiB,CAAC,IAAI;;kFAE1B,uBAAuB","sourcesContent":["import { Component, ViewEncapsulation, ChangeDetectorRef, OnDestroy } from '@angular/core';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { ResourceData, MJListCategoryEntity, MJListEntity } from '@memberjunction/core-entities';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { Subject } from 'rxjs';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\ninterface CategoryViewModel {\n category: MJListCategoryEntity;\n listCount: number;\n childCount: number;\n depth: number;\n isExpanded: boolean;\n}\n\n@RegisterClass(BaseResourceComponent, 'ListsCategoriesResource')\n@Component({\n standalone: false,\n selector: 'mj-lists-categories-resource',\n template: `\n <div class=\"lists-categories-container\">\n <!-- Header -->\n <div class=\"categories-header\">\n <div class=\"header-title\">\n <i class=\"fa-solid fa-tags\"></i>\n <h2>List Categories</h2>\n </div>\n <div class=\"header-actions\">\n <button class=\"btn-create\" (click)=\"createCategory()\">\n <i class=\"fa-solid fa-plus\"></i>\n <span>New Category</span>\n </button>\n </div>\n </div>\n \n <!-- Loading State -->\n @if (isLoading) {\n <div class=\"loading-container\">\n <mj-loading text=\"Loading categories...\" size=\"medium\"></mj-loading>\n </div>\n }\n \n <!-- Empty State -->\n @if (!isLoading && categoryViewModels.length === 0) {\n <div class=\"empty-state\">\n <div class=\"empty-state-icon-wrapper\">\n <div class=\"icon-bg\"></div>\n <i class=\"fa-solid fa-folder-tree\"></i>\n </div>\n <h3>No Categories Yet</h3>\n <p>Categories help you organize lists into logical groups.</p>\n <div class=\"empty-state-features\">\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Create hierarchical folder structures</span>\n </div>\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Quickly find related lists</span>\n </div>\n </div>\n <button class=\"btn-create-large\" (click)=\"createCategory()\">\n <i class=\"fa-solid fa-plus\"></i>\n Create Your First Category\n </button>\n </div>\n }\n \n <!-- Categories Content -->\n @if (!isLoading && categoryViewModels.length > 0) {\n <div class=\"categories-content\">\n <div class=\"categories-layout\">\n <!-- Category Tree -->\n <div class=\"category-tree-panel\">\n <div class=\"panel-header\">\n <h3>Categories</h3>\n <span class=\"count-badge\">{{categories.length}}</span>\n </div>\n <div class=\"tree-content\" role=\"tree\" aria-label=\"Category tree\">\n @for (vm of getTopLevelCategories(); track vm) {\n <ng-container *ngTemplateOutlet=\"categoryNodeTemplate; context: { vm: vm }\"></ng-container>\n }\n </div>\n </div>\n <!-- Category Details -->\n @if (selectedCategory) {\n <div class=\"category-detail-panel\">\n <div class=\"panel-header\">\n <h3>Category Details</h3>\n <div class=\"panel-actions\">\n <button class=\"icon-btn\" (click)=\"editCategory()\" title=\"Edit\">\n <i class=\"fa-solid fa-pen\"></i>\n </button>\n <button class=\"icon-btn danger\" (click)=\"deleteCategory()\" title=\"Delete\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n </div>\n <div class=\"detail-content\">\n <div class=\"detail-field\">\n <label>Name</label>\n <span class=\"field-value\">{{selectedCategory.Name}}</span>\n </div>\n @if (selectedCategory.Description) {\n <div class=\"detail-field\">\n <label>Description</label>\n <span class=\"field-value\">{{selectedCategory.Description}}</span>\n </div>\n }\n <div class=\"detail-field\">\n <label>Parent Category</label>\n <span class=\"field-value\">\n {{getParentCategoryName(selectedCategory) || '(Top Level)'}}\n </span>\n </div>\n <div class=\"detail-stats\">\n <div class=\"stat-item\">\n <span class=\"stat-value\">{{getSelectedCategoryListCount()}}</span>\n <span class=\"stat-label\">Lists</span>\n </div>\n <div class=\"stat-item\">\n <span class=\"stat-value\">{{getSelectedCategoryChildCount()}}</span>\n <span class=\"stat-label\">Subcategories</span>\n </div>\n </div>\n <!-- Lists in this category -->\n @if (selectedCategoryLists.length > 0) {\n <div class=\"category-lists\">\n <h4>Lists in this category</h4>\n <div class=\"mini-list\">\n @for (list of selectedCategoryLists; track list) {\n <div class=\"mini-list-item\">\n <i class=\"fa-solid fa-list\"></i>\n <span>{{list.Name}}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n <!-- No Selection State -->\n @if (!selectedCategory) {\n <div class=\"category-detail-panel empty\">\n <div class=\"no-selection\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n <p>Select a category to view details</p>\n </div>\n </div>\n }\n </div>\n </div>\n }\n \n <!-- Category Node Template -->\n <ng-template #categoryNodeTemplate let-vm=\"vm\">\n <div class=\"category-node\" [style.padding-left.px]=\"vm.depth * 20\">\n <div\n class=\"node-content\"\n [class.selected]=\"selectedCategory?.ID === vm.category.ID\"\n (click)=\"selectCategory(vm.category)\"\n (keydown.enter)=\"selectCategory(vm.category)\"\n (keydown.space)=\"selectCategory(vm.category); $event.preventDefault()\"\n (keydown.arrowRight)=\"expandNode($event, vm)\"\n (keydown.arrowLeft)=\"collapseNode($event, vm)\"\n tabindex=\"0\"\n role=\"treeitem\"\n [attr.aria-expanded]=\"hasChildren(vm.category) ? vm.isExpanded : null\"\n [attr.aria-selected]=\"selectedCategory?.ID === vm.category.ID\"\n [attr.aria-label]=\"vm.category.Name + ' - ' + vm.listCount + ' lists'\">\n @if (hasChildren(vm.category)) {\n <button\n class=\"expand-btn\"\n (click)=\"toggleExpand($event, vm)\"\n tabindex=\"-1\"\n aria-hidden=\"true\">\n <i [class]=\"vm.isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"></i>\n </button>\n }\n @if (!hasChildren(vm.category)) {\n <span class=\"expand-placeholder\"></span>\n }\n <i class=\"fa-solid fa-folder\" [class.fa-folder-open]=\"vm.isExpanded\" aria-hidden=\"true\"></i>\n <span class=\"node-name\">{{vm.category.Name}}</span>\n <span class=\"node-count\" aria-hidden=\"true\">{{vm.listCount}}</span>\n </div>\n @if (vm.isExpanded && hasChildren(vm.category)) {\n <div class=\"node-children\" role=\"group\">\n @for (childVm of getChildCategories(vm.category); track childVm) {\n <ng-container *ngTemplateOutlet=\"categoryNodeTemplate; context: { vm: childVm }\"></ng-container>\n }\n </div>\n }\n </div>\n </ng-template>\n \n <!-- Create/Edit Dialog -->\n @if (showDialog) {\n <div class=\"modal-overlay\" (click)=\"closeDialog()\">\n <div class=\"modal-dialog\" (click)=\"$event.stopPropagation()\">\n <div class=\"modal-header\">\n <h3>{{editingCategory ? 'Edit Category' : 'Create Category'}}</h3>\n <button class=\"modal-close\" (click)=\"closeDialog()\" [disabled]=\"isSaving\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"category-form\">\n <div class=\"form-group\">\n <label>Name *</label>\n <input\n type=\"text\"\n [(ngModel)]=\"dialogName\"\n placeholder=\"Enter category name\"\n class=\"form-input\" />\n </div>\n <div class=\"form-group\">\n <label>Description</label>\n <textarea\n [(ngModel)]=\"dialogDescription\"\n placeholder=\"Optional description\"\n class=\"form-input\"\n rows=\"3\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Parent Category</label>\n <select\n [(ngModel)]=\"dialogParentId\"\n class=\"form-input\">\n @for (parent of availableParents; track parent) {\n <option [ngValue]=\"parent.ID\">{{parent.displayName}}</option>\n }\n </select>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn-primary\"\n (click)=\"saveCategory()\"\n [disabled]=\"!dialogName || isSaving\">\n @if (isSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n {{isSaving ? 'Saving...' : (editingCategory ? 'Save' : 'Create')}}\n </button>\n <button class=\"btn-secondary\" (click)=\"closeDialog()\" [disabled]=\"isSaving\">Cancel</button>\n </div>\n </div>\n </div>\n }\n \n <!-- Delete Confirmation Dialog -->\n @if (showDeleteConfirm) {\n <div class=\"modal-overlay\" (click)=\"cancelDelete()\">\n <div class=\"modal-dialog modal-sm\" (click)=\"$event.stopPropagation()\">\n <div class=\"modal-header danger\">\n <h3>Delete Category</h3>\n <button class=\"modal-close\" (click)=\"cancelDelete()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <div class=\"modal-body\">\n <p>{{deleteConfirmMessage}}</p>\n </div>\n <div class=\"modal-footer\">\n <button class=\"btn-danger\" (click)=\"confirmDelete()\">\n Delete\n </button>\n <button class=\"btn-secondary\" (click)=\"cancelDelete()\">Cancel</button>\n </div>\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .lists-categories-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: #f5f7fa;\n overflow: hidden;\n }\n\n /* Header */\n .categories-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 24px;\n background: white;\n border-bottom: 1px solid #e0e0e0;\n flex-shrink: 0;\n }\n\n .header-title {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .header-title i {\n font-size: 24px;\n color: #2196F3;\n }\n\n .header-title h2 {\n margin: 0;\n font-size: 20px;\n font-weight: 600;\n color: #333;\n }\n\n .btn-create {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n background: #2196F3;\n color: white;\n border: none;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.2s;\n }\n\n .btn-create:hover {\n background: #1976D2;\n }\n\n /* Loading */\n .loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n }\n\n /* Empty State */\n .empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n padding: 48px 40px;\n text-align: center;\n max-width: 420px;\n margin: 0 auto;\n }\n\n .empty-state-icon-wrapper {\n position: relative;\n margin-bottom: 24px;\n }\n\n .empty-state-icon-wrapper .icon-bg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100px;\n height: 100px;\n border-radius: 50%;\n background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(33, 150, 243, 0.05) 100%);\n }\n\n .empty-state-icon-wrapper > i {\n position: relative;\n font-size: 48px;\n color: #2196F3;\n z-index: 1;\n }\n\n .empty-state h3 {\n margin: 0 0 12px;\n font-size: 22px;\n font-weight: 600;\n color: #333;\n }\n\n .empty-state p {\n margin: 0 0 8px;\n color: #666;\n font-size: 15px;\n line-height: 1.5;\n }\n\n .empty-state-features {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 16px 0 24px;\n text-align: left;\n }\n\n .feature-item {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n color: #555;\n }\n\n .feature-item i {\n font-size: 14px !important;\n color: #4CAF50 !important;\n }\n\n .btn-create-large {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 14px 28px;\n background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);\n color: white;\n border: none;\n border-radius: 8px;\n font-size: 15px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);\n }\n\n .btn-create-large:hover {\n background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);\n }\n\n /* Content Layout */\n .categories-content {\n flex: 1;\n padding: 16px 24px;\n overflow: hidden;\n }\n\n .categories-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n height: 100%;\n }\n\n .category-tree-panel,\n .category-detail-panel {\n background: white;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0,0,0,0.08);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n\n .panel-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n border-bottom: 1px solid #e0e0e0;\n background: #fafafa;\n }\n\n .panel-header h3 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: #333;\n }\n\n .count-badge {\n font-size: 12px;\n color: #999;\n background: #f0f0f0;\n padding: 2px 8px;\n border-radius: 10px;\n }\n\n .panel-actions {\n display: flex;\n gap: 4px;\n }\n\n .icon-btn {\n background: none;\n border: none;\n padding: 6px 8px;\n color: #666;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s;\n }\n\n .icon-btn:hover {\n background: #f0f0f0;\n color: #333;\n }\n\n .icon-btn.danger:hover {\n background: #ffebee;\n color: #d32f2f;\n }\n\n /* Tree Content */\n .tree-content {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n }\n\n .category-node {\n user-select: none;\n }\n\n .node-content {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n transition: background 0.15s;\n }\n\n .node-content:hover {\n background: #f5f5f5;\n }\n\n .node-content:focus {\n outline: none;\n background: #e8f4fd;\n }\n\n .node-content:focus-visible {\n outline: 2px solid #2196F3;\n outline-offset: -2px;\n background: #e8f4fd;\n }\n\n .node-content.selected {\n background: #e3f2fd;\n }\n\n .node-content.selected:focus-visible {\n outline: 2px solid #1976D2;\n }\n\n .expand-btn {\n background: none;\n border: none;\n padding: 2px;\n color: #999;\n cursor: pointer;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .expand-btn:hover {\n color: #666;\n }\n\n .expand-placeholder {\n width: 20px;\n }\n\n .node-content .fa-folder,\n .node-content .fa-folder-open {\n color: #ffc107;\n }\n\n .node-name {\n flex: 1;\n font-size: 14px;\n color: #333;\n }\n\n .node-count {\n font-size: 12px;\n color: #999;\n background: #f0f0f0;\n padding: 1px 6px;\n border-radius: 8px;\n }\n\n /* Detail Panel */\n .detail-content {\n flex: 1;\n padding: 16px;\n overflow-y: auto;\n }\n\n .detail-field {\n margin-bottom: 16px;\n }\n\n .detail-field label {\n display: block;\n font-size: 12px;\n font-weight: 500;\n color: #999;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 4px;\n }\n\n .field-value {\n font-size: 14px;\n color: #333;\n }\n\n .detail-stats {\n display: flex;\n gap: 24px;\n margin: 24px 0;\n padding: 16px;\n background: #f5f7fa;\n border-radius: 8px;\n }\n\n .stat-item {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .stat-value {\n font-size: 24px;\n font-weight: 600;\n color: #2196F3;\n }\n\n .stat-label {\n font-size: 12px;\n color: #999;\n }\n\n .category-lists h4 {\n margin: 0 0 12px;\n font-size: 13px;\n font-weight: 600;\n color: #666;\n }\n\n .mini-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .mini-list-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: #f5f7fa;\n border-radius: 4px;\n font-size: 13px;\n color: #333;\n }\n\n .mini-list-item i {\n color: #999;\n }\n\n /* No Selection */\n .category-detail-panel.empty {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .no-selection {\n text-align: center;\n color: #999;\n }\n\n .no-selection i {\n font-size: 32px;\n margin-bottom: 12px;\n }\n\n .no-selection p {\n margin: 0;\n }\n\n /* Form */\n .category-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .form-group label {\n font-size: 13px;\n font-weight: 500;\n color: #666;\n }\n\n .form-input {\n padding: 8px 12px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 14px;\n }\n\n .form-input:focus {\n outline: none;\n border-color: #2196F3;\n }\n\n /* Modal Styles */\n .modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n animation: fadeIn 0.15s ease-out;\n }\n\n @keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n .modal-dialog {\n background: white;\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);\n width: 450px;\n max-width: 90vw;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n animation: slideIn 0.2s ease-out;\n }\n\n .modal-dialog.modal-sm {\n width: 400px;\n }\n\n @keyframes slideIn {\n from { transform: translateY(-20px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n }\n\n .modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .modal-header.danger {\n background: #ffebee;\n border-bottom-color: #ffcdd2;\n }\n\n .modal-header.danger h3 {\n color: #c62828;\n }\n\n .modal-header h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: #333;\n }\n\n .modal-close {\n background: none;\n border: none;\n padding: 4px 8px;\n color: #999;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s;\n }\n\n .modal-close:hover:not(:disabled) {\n background: #f0f0f0;\n color: #333;\n }\n\n .modal-close:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .modal-body {\n padding: 20px;\n overflow-y: auto;\n }\n\n .modal-body p {\n margin: 0;\n color: #666;\n line-height: 1.6;\n }\n\n .modal-footer {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid #e0e0e0;\n background: #fafafa;\n }\n\n .btn-secondary {\n padding: 8px 16px;\n background: white;\n border: 1px solid #ddd;\n border-radius: 6px;\n color: #666;\n font-size: 14px;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .btn-secondary:hover:not(:disabled) {\n background: #f5f5f5;\n border-color: #ccc;\n }\n\n .btn-secondary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .btn-primary {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n background: #2196F3;\n border: none;\n border-radius: 6px;\n color: white;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .btn-primary:hover:not(:disabled) {\n background: #1976D2;\n }\n\n .btn-primary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .btn-danger {\n padding: 8px 16px;\n background: #d32f2f;\n border: none;\n border-radius: 6px;\n color: white;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .btn-danger:hover {\n background: #c62828;\n }\n\n /* Responsive */\n @media (max-width: 768px) {\n .categories-layout {\n grid-template-columns: 1fr;\n }\n\n .category-detail-panel.empty {\n display: none;\n }\n\n .modal-dialog {\n width: 95vw;\n }\n }\n `],\n encapsulation: ViewEncapsulation.None\n})\nexport class ListsCategoriesResource extends BaseResourceComponent implements OnDestroy {\n private destroy$ = new Subject<void>();\n\n isLoading = true;\n categories: MJListCategoryEntity[] = [];\n categoryViewModels: CategoryViewModel[] = [];\n selectedCategory: MJListCategoryEntity | null = null;\n selectedCategoryLists: MJListEntity[] = [];\n\n // Dialog\n showDialog = false;\n editingCategory: MJListCategoryEntity | null = null;\n dialogName = '';\n dialogDescription = '';\n dialogParentId: string | null = null;\n availableParents: Array<{ ID: string | null; displayName: string }> = [];\n\n // Operation states\n isSaving = false;\n\n // Delete confirmation dialog\n showDeleteConfirm = false;\n deleteConfirmMessage = '';\n private categoryToDelete: MJListCategoryEntity | null = null;\n\n private listsByCategoryId: Map<string, MJListEntity[]> = new Map();\n private categoryMap: Map<string, MJListCategoryEntity> = new Map();\n\n constructor(\n private cdr: ChangeDetectorRef,\n private notificationService: MJNotificationService\n ) {\n super();\n }\n\n async ngOnInit() {\n await this.loadData();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async loadData() {\n this.isLoading = true;\n\n try {\n const md = new Metadata();\n const rv = new RunView();\n const userId = md.CurrentUser?.ID;\n\n const [categoriesResult, listsResult] = await rv.RunViews([\n {\n EntityName: 'MJ: List Categories',\n OrderBy: 'Name',\n ResultType: 'entity_object',\n CacheLocal: true // Categories rarely change, cache for performance\n },\n {\n EntityName: 'MJ: Lists',\n ExtraFilter: userId ? `UserID = '${userId}'` : '',\n ResultType: 'entity_object'\n }\n ]);\n\n if (!categoriesResult.Success) {\n console.error('Failed to load categories');\n return;\n }\n\n this.categories = categoriesResult.Results as MJListCategoryEntity[];\n const lists = listsResult.Results as MJListEntity[];\n\n // Build category map\n this.categoryMap.clear();\n for (const cat of this.categories) {\n this.categoryMap.set(cat.ID, cat);\n }\n\n // Group lists by category\n this.listsByCategoryId.clear();\n for (const list of lists) {\n if (list.CategoryID) {\n const existing = this.listsByCategoryId.get(list.CategoryID) || [];\n existing.push(list);\n this.listsByCategoryId.set(list.CategoryID, existing);\n }\n }\n\n // Build view models\n this.buildCategoryViewModels();\n this.buildAvailableParents();\n } catch (error) {\n console.error('Error loading categories:', error);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n private buildCategoryViewModels() {\n this.categoryViewModels = [];\n\n const buildVm = (category: MJListCategoryEntity, depth: number): CategoryViewModel => {\n const lists = this.listsByCategoryId.get(category.ID) || [];\n const children = this.categories.filter(c => c.ParentID === category.ID);\n\n return {\n category,\n listCount: lists.length,\n childCount: children.length,\n depth,\n isExpanded: true\n };\n };\n\n const processCategory = (category: MJListCategoryEntity, depth: number) => {\n this.categoryViewModels.push(buildVm(category, depth));\n const children = this.categories.filter(c => c.ParentID === category.ID);\n for (const child of children) {\n processCategory(child, depth + 1);\n }\n };\n\n const topLevel = this.categories.filter(c => !c.ParentID);\n for (const cat of topLevel) {\n processCategory(cat, 0);\n }\n }\n\n private buildAvailableParents() {\n this.availableParents = [{ ID: null, displayName: '(Top Level)' }];\n\n const addCategory = (cat: MJListCategoryEntity, prefix: string) => {\n // Exclude the editing category and its descendants\n if (this.editingCategory && this.isDescendantOf(cat, this.editingCategory)) {\n return;\n }\n this.availableParents.push({ ID: cat.ID, displayName: prefix + cat.Name });\n const children = this.categories.filter(c => c.ParentID === cat.ID);\n for (const child of children) {\n addCategory(child, prefix + '\\u00A0\\u00A0');\n }\n };\n\n const topLevel = this.categories.filter(c => !c.ParentID);\n for (const cat of topLevel) {\n if (this.editingCategory?.ID !== cat.ID) {\n addCategory(cat, '');\n }\n }\n }\n\n private isDescendantOf(category: MJListCategoryEntity, ancestor: MJListCategoryEntity): boolean {\n if (category.ID === ancestor.ID) return true;\n if (!category.ParentID) return false;\n const parent = this.categoryMap.get(category.ParentID);\n return parent ? this.isDescendantOf(parent, ancestor) : false;\n }\n\n getTopLevelCategories(): CategoryViewModel[] {\n return this.categoryViewModels.filter(vm => !vm.category.ParentID);\n }\n\n getChildCategories(parent: MJListCategoryEntity): CategoryViewModel[] {\n return this.categoryViewModels.filter(vm => vm.category.ParentID === parent.ID);\n }\n\n hasChildren(category: MJListCategoryEntity): boolean {\n return this.categories.some(c => c.ParentID === category.ID);\n }\n\n toggleExpand(event: Event, vm: CategoryViewModel) {\n event.stopPropagation();\n vm.isExpanded = !vm.isExpanded;\n }\n\n expandNode(event: Event, vm: CategoryViewModel) {\n event.preventDefault();\n if (this.hasChildren(vm.category) && !vm.isExpanded) {\n vm.isExpanded = true;\n }\n }\n\n collapseNode(event: Event, vm: CategoryViewModel) {\n event.preventDefault();\n if (vm.isExpanded) {\n vm.isExpanded = false;\n }\n }\n\n selectCategory(category: MJListCategoryEntity) {\n this.selectedCategory = category;\n this.selectedCategoryLists = this.listsByCategoryId.get(category.ID) || [];\n }\n\n getParentCategoryName(category: MJListCategoryEntity): string | null {\n if (!category.ParentID) return null;\n return this.categoryMap.get(category.ParentID)?.Name || null;\n }\n\n getSelectedCategoryListCount(): number {\n if (!this.selectedCategory) return 0;\n return this.listsByCategoryId.get(this.selectedCategory.ID)?.length || 0;\n }\n\n getSelectedCategoryChildCount(): number {\n if (!this.selectedCategory) return 0;\n return this.categories.filter(c => c.ParentID === this.selectedCategory!.ID).length;\n }\n\n createCategory() {\n this.editingCategory = null;\n this.dialogName = '';\n this.dialogDescription = '';\n this.dialogParentId = null;\n this.buildAvailableParents();\n this.showDialog = true;\n }\n\n editCategory() {\n if (!this.selectedCategory) return;\n this.editingCategory = this.selectedCategory;\n this.dialogName = this.selectedCategory.Name;\n this.dialogDescription = this.selectedCategory.Description || '';\n this.dialogParentId = this.selectedCategory.ParentID || null;\n this.buildAvailableParents();\n this.showDialog = true;\n }\n\n deleteCategory() {\n if (!this.selectedCategory) return;\n\n this.categoryToDelete = this.selectedCategory;\n const categoryName = this.categoryToDelete.Name;\n const listsInCategory = this.listsByCategoryId.get(this.categoryToDelete.ID) || [];\n const childCategories = this.categories.filter(c => c.ParentID === this.categoryToDelete!.ID);\n\n let message = `Are you sure you want to delete \"${categoryName}\"?`;\n if (listsInCategory.length > 0) {\n message += ` ${listsInCategory.length} list(s) will be uncategorized.`;\n }\n if (childCategories.length > 0) {\n message += ` ${childCategories.length} subcategory(ies) will become top-level.`;\n }\n\n this.deleteConfirmMessage = message;\n this.showDeleteConfirm = true;\n }\n\n cancelDelete() {\n this.showDeleteConfirm = false;\n this.categoryToDelete = null;\n this.deleteConfirmMessage = '';\n }\n\n async confirmDelete() {\n if (!this.categoryToDelete) return;\n\n const categoryName = this.categoryToDelete.Name;\n const categoryToDelete = this.categoryToDelete;\n this.showDeleteConfirm = false;\n this.isLoading = true;\n this.cdr.detectChanges();\n\n try {\n const deleted = await categoryToDelete.Delete();\n if (deleted) {\n this.notificationService.CreateSimpleNotification(`\"${categoryName}\" deleted`, 'success', 3000);\n } else {\n // Get the detailed error message from LatestResult\n const errorMessage = categoryToDelete.LatestResult?.Message || 'Unknown error occurred';\n console.error('Failed to delete category:', categoryToDelete.LatestResult);\n this.notificationService.CreateSimpleNotification(`Failed to delete category: ${errorMessage}`, 'error', 6000);\n }\n this.selectedCategory = null;\n this.categoryToDelete = null;\n await this.loadData();\n } catch (error) {\n console.error('Error deleting category:', error);\n const errorMessage = error instanceof Error ? error.message : String(error);\n this.notificationService.CreateSimpleNotification(`Error deleting category: ${errorMessage}`, 'error', 6000);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n closeDialog() {\n this.showDialog = false;\n this.editingCategory = null;\n }\n\n async saveCategory() {\n this.isSaving = true;\n this.cdr.detectChanges();\n\n const isEditing = !!this.editingCategory;\n const categoryName = this.dialogName;\n\n try {\n const md = new Metadata();\n let category: MJListCategoryEntity;\n\n if (this.editingCategory) {\n category = this.editingCategory;\n } else {\n category = await md.GetEntityObject<MJListCategoryEntity>('MJ: List Categories');\n category.UserID = md.CurrentUser!.ID;\n }\n\n category.Name = this.dialogName;\n category.Description = this.dialogDescription || null;\n category.ParentID = this.dialogParentId || null;\n\n const saved = await category.Save();\n if (saved) {\n this.notificationService.CreateSimpleNotification(\n isEditing ? `\"${categoryName}\" updated` : `\"${categoryName}\" created`,\n 'success',\n 3000\n );\n this.closeDialog();\n await this.loadData();\n\n // Re-select the saved category\n if (isEditing) {\n this.selectedCategory = category;\n this.selectedCategoryLists = this.listsByCategoryId.get(category.ID) || [];\n }\n } else {\n // Get the detailed error message from LatestResult\n const errorMessage = category.LatestResult?.Message || 'Unknown error occurred';\n const action = isEditing ? 'update' : 'create';\n console.error(`Failed to ${action} category:`, category.LatestResult);\n this.notificationService.CreateSimpleNotification(\n `Failed to ${action} category: ${errorMessage}`,\n 'error',\n 6000\n );\n }\n } catch (error) {\n console.error('Error saving category:', error);\n const errorMessage = error instanceof Error ? error.message : String(error);\n this.notificationService.CreateSimpleNotification(`Error saving category: ${errorMessage}`, 'error', 6000);\n } finally {\n this.isSaving = false;\n this.cdr.detectChanges();\n }\n }\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n return 'Categories';\n }\n\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-tags';\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"lists-categories-resource.component.js","sourceRoot":"","sources":["../../../src/Lists/components/lists-categories-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAgC,MAAM,eAAe,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAG,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;;;;;;;;IAgCvB,8BAA+B;IAC7B,iCAAoE;IACtE,iBAAM;;;;IAMJ,AADF,8BAAyB,cACe;IAEpC,AADA,0BAA2B,YACY;IACzC,iBAAM;IACN,0BAAI;IAAA,iCAAiB;IAAA,iBAAK;IAC1B,yBAAG;IAAA,uEAAuD;IAAA,iBAAI;IAE5D,AADF,+BAAkC,cACN;IACxB,yBAAwC;IACxC,6BAAM;IAAA,sDAAqC;IAC7C,AAD6C,iBAAO,EAC9C;IACN,gCAA0B;IACxB,yBAAwC;IACxC,6BAAM;IAAA,2CAA0B;IAEpC,AADE,AADkC,iBAAO,EACnC,EACF;IACN,mCAA4D;IAA3B,6LAAS,uBAAgB,KAAC;IACzD,wBAAgC;IAChC,6CACF;IACF,AADE,iBAAS,EACL;;;IAeI,wBAA2F;;;IAA3F,iHAA4E;;;;;IAArB,AAAxC,0DAAwC,8DAAmB;;;IAyBtE,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Aa,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;GAi4BnD,uBAAuB,CA4WnC;;iFA5WY,uBAAuB;cAh4BnC,SAAS;6BACI,KAAK,YACP,8BAA8B,YAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiQP,iBA0nBY,iBAAiB,CAAC,IAAI;;kFAE1B,uBAAuB","sourcesContent":["import { Component, ViewEncapsulation, ChangeDetectorRef, OnDestroy } from '@angular/core';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { ResourceData, MJListCategoryEntity, MJListEntity } from '@memberjunction/core-entities';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { Subject } from 'rxjs';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\ninterface CategoryViewModel {\n category: MJListCategoryEntity;\n listCount: number;\n childCount: number;\n depth: number;\n isExpanded: boolean;\n}\n\n@RegisterClass(BaseResourceComponent, 'ListsCategoriesResource')\n@Component({\n standalone: false,\n selector: 'mj-lists-categories-resource',\n template: `\n <div class=\"lists-categories-container\">\n <!-- Header -->\n <div class=\"categories-header\">\n <div class=\"header-title\">\n <i class=\"fa-solid fa-tags\"></i>\n <h2>List Categories</h2>\n </div>\n <div class=\"header-actions\">\n <button class=\"btn-create\" (click)=\"createCategory()\">\n <i class=\"fa-solid fa-plus\"></i>\n <span>New Category</span>\n </button>\n </div>\n </div>\n \n <!-- Loading State -->\n @if (isLoading) {\n <div class=\"loading-container\">\n <mj-loading text=\"Loading categories...\" size=\"medium\"></mj-loading>\n </div>\n }\n \n <!-- Empty State -->\n @if (!isLoading && categoryViewModels.length === 0) {\n <div class=\"empty-state\">\n <div class=\"empty-state-icon-wrapper\">\n <div class=\"icon-bg\"></div>\n <i class=\"fa-solid fa-folder-tree\"></i>\n </div>\n <h3>No Categories Yet</h3>\n <p>Categories help you organize lists into logical groups.</p>\n <div class=\"empty-state-features\">\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Create hierarchical folder structures</span>\n </div>\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Quickly find related lists</span>\n </div>\n </div>\n <button class=\"btn-create-large\" (click)=\"createCategory()\">\n <i class=\"fa-solid fa-plus\"></i>\n Create Your First Category\n </button>\n </div>\n }\n \n <!-- Categories Content -->\n @if (!isLoading && categoryViewModels.length > 0) {\n <div class=\"categories-content\">\n <div class=\"categories-layout\">\n <!-- Category Tree -->\n <div class=\"category-tree-panel\">\n <div class=\"panel-header\">\n <h3>Categories</h3>\n <span class=\"count-badge\">{{categories.length}}</span>\n </div>\n <div class=\"tree-content\" role=\"tree\" aria-label=\"Category tree\">\n @for (vm of getTopLevelCategories(); track vm) {\n <ng-container *ngTemplateOutlet=\"categoryNodeTemplate; context: { vm: vm }\"></ng-container>\n }\n </div>\n </div>\n <!-- Category Details -->\n @if (selectedCategory) {\n <div class=\"category-detail-panel\">\n <div class=\"panel-header\">\n <h3>Category Details</h3>\n <div class=\"panel-actions\">\n <button class=\"icon-btn\" (click)=\"editCategory()\" title=\"Edit\">\n <i class=\"fa-solid fa-pen\"></i>\n </button>\n <button class=\"icon-btn danger\" (click)=\"deleteCategory()\" title=\"Delete\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n </div>\n <div class=\"detail-content\">\n <div class=\"detail-field\">\n <label>Name</label>\n <span class=\"field-value\">{{selectedCategory.Name}}</span>\n </div>\n @if (selectedCategory.Description) {\n <div class=\"detail-field\">\n <label>Description</label>\n <span class=\"field-value\">{{selectedCategory.Description}}</span>\n </div>\n }\n <div class=\"detail-field\">\n <label>Parent Category</label>\n <span class=\"field-value\">\n {{getParentCategoryName(selectedCategory) || '(Top Level)'}}\n </span>\n </div>\n <div class=\"detail-stats\">\n <div class=\"stat-item\">\n <span class=\"stat-value\">{{getSelectedCategoryListCount()}}</span>\n <span class=\"stat-label\">Lists</span>\n </div>\n <div class=\"stat-item\">\n <span class=\"stat-value\">{{getSelectedCategoryChildCount()}}</span>\n <span class=\"stat-label\">Subcategories</span>\n </div>\n </div>\n <!-- Lists in this category -->\n @if (selectedCategoryLists.length > 0) {\n <div class=\"category-lists\">\n <h4>Lists in this category</h4>\n <div class=\"mini-list\">\n @for (list of selectedCategoryLists; track list) {\n <div class=\"mini-list-item\">\n <i class=\"fa-solid fa-list\"></i>\n <span>{{list.Name}}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }\n <!-- No Selection State -->\n @if (!selectedCategory) {\n <div class=\"category-detail-panel empty\">\n <div class=\"no-selection\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n <p>Select a category to view details</p>\n </div>\n </div>\n }\n </div>\n </div>\n }\n \n <!-- Category Node Template -->\n <ng-template #categoryNodeTemplate let-vm=\"vm\">\n <div class=\"category-node\" [style.padding-left.px]=\"vm.depth * 20\">\n <div\n class=\"node-content\"\n [class.selected]=\"IsCategorySelected(vm.category)\"\n (click)=\"selectCategory(vm.category)\"\n (keydown.enter)=\"selectCategory(vm.category)\"\n (keydown.space)=\"selectCategory(vm.category); $event.preventDefault()\"\n (keydown.arrowRight)=\"expandNode($event, vm)\"\n (keydown.arrowLeft)=\"collapseNode($event, vm)\"\n tabindex=\"0\"\n role=\"treeitem\"\n [attr.aria-expanded]=\"hasChildren(vm.category) ? vm.isExpanded : null\"\n [attr.aria-selected]=\"IsCategorySelected(vm.category)\"\n [attr.aria-label]=\"vm.category.Name + ' - ' + vm.listCount + ' lists'\">\n @if (hasChildren(vm.category)) {\n <button\n class=\"expand-btn\"\n (click)=\"toggleExpand($event, vm)\"\n tabindex=\"-1\"\n aria-hidden=\"true\">\n <i [class]=\"vm.isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"></i>\n </button>\n }\n @if (!hasChildren(vm.category)) {\n <span class=\"expand-placeholder\"></span>\n }\n <i class=\"fa-solid fa-folder\" [class.fa-folder-open]=\"vm.isExpanded\" aria-hidden=\"true\"></i>\n <span class=\"node-name\">{{vm.category.Name}}</span>\n <span class=\"node-count\" aria-hidden=\"true\">{{vm.listCount}}</span>\n </div>\n @if (vm.isExpanded && hasChildren(vm.category)) {\n <div class=\"node-children\" role=\"group\">\n @for (childVm of getChildCategories(vm.category); track childVm) {\n <ng-container *ngTemplateOutlet=\"categoryNodeTemplate; context: { vm: childVm }\"></ng-container>\n }\n </div>\n }\n </div>\n </ng-template>\n \n <!-- Create/Edit Dialog -->\n @if (showDialog) {\n <div class=\"modal-overlay\" (click)=\"closeDialog()\">\n <div class=\"modal-dialog\" (click)=\"$event.stopPropagation()\">\n <div class=\"modal-header\">\n <h3>{{editingCategory ? 'Edit Category' : 'Create Category'}}</h3>\n <button class=\"modal-close\" (click)=\"closeDialog()\" [disabled]=\"isSaving\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"category-form\">\n <div class=\"form-group\">\n <label>Name *</label>\n <input\n type=\"text\"\n [(ngModel)]=\"dialogName\"\n placeholder=\"Enter category name\"\n class=\"form-input\" />\n </div>\n <div class=\"form-group\">\n <label>Description</label>\n <textarea\n [(ngModel)]=\"dialogDescription\"\n placeholder=\"Optional description\"\n class=\"form-input\"\n rows=\"3\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Parent Category</label>\n <select\n [(ngModel)]=\"dialogParentId\"\n class=\"form-input\">\n @for (parent of availableParents; track parent) {\n <option [ngValue]=\"parent.ID\">{{parent.displayName}}</option>\n }\n </select>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn-primary\"\n (click)=\"saveCategory()\"\n [disabled]=\"!dialogName || isSaving\">\n @if (isSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n {{isSaving ? 'Saving...' : (editingCategory ? 'Save' : 'Create')}}\n </button>\n <button class=\"btn-secondary\" (click)=\"closeDialog()\" [disabled]=\"isSaving\">Cancel</button>\n </div>\n </div>\n </div>\n }\n \n <!-- Delete Confirmation Dialog -->\n @if (showDeleteConfirm) {\n <div class=\"modal-overlay\" (click)=\"cancelDelete()\">\n <div class=\"modal-dialog modal-sm\" (click)=\"$event.stopPropagation()\">\n <div class=\"modal-header danger\">\n <h3>Delete Category</h3>\n <button class=\"modal-close\" (click)=\"cancelDelete()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <div class=\"modal-body\">\n <p>{{deleteConfirmMessage}}</p>\n </div>\n <div class=\"modal-footer\">\n <button class=\"btn-danger\" (click)=\"confirmDelete()\">\n Delete\n </button>\n <button class=\"btn-secondary\" (click)=\"cancelDelete()\">Cancel</button>\n </div>\n </div>\n </div>\n }\n </div>\n `,\n styles: [`\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .lists-categories-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: #f5f7fa;\n overflow: hidden;\n }\n\n /* Header */\n .categories-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 24px;\n background: white;\n border-bottom: 1px solid #e0e0e0;\n flex-shrink: 0;\n }\n\n .header-title {\n display: flex;\n align-items: center;\n gap: 12px;\n }\n\n .header-title i {\n font-size: 24px;\n color: #2196F3;\n }\n\n .header-title h2 {\n margin: 0;\n font-size: 20px;\n font-weight: 600;\n color: #333;\n }\n\n .btn-create {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n background: #2196F3;\n color: white;\n border: none;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.2s;\n }\n\n .btn-create:hover {\n background: #1976D2;\n }\n\n /* Loading */\n .loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n }\n\n /* Empty State */\n .empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n padding: 48px 40px;\n text-align: center;\n max-width: 420px;\n margin: 0 auto;\n }\n\n .empty-state-icon-wrapper {\n position: relative;\n margin-bottom: 24px;\n }\n\n .empty-state-icon-wrapper .icon-bg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100px;\n height: 100px;\n border-radius: 50%;\n background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(33, 150, 243, 0.05) 100%);\n }\n\n .empty-state-icon-wrapper > i {\n position: relative;\n font-size: 48px;\n color: #2196F3;\n z-index: 1;\n }\n\n .empty-state h3 {\n margin: 0 0 12px;\n font-size: 22px;\n font-weight: 600;\n color: #333;\n }\n\n .empty-state p {\n margin: 0 0 8px;\n color: #666;\n font-size: 15px;\n line-height: 1.5;\n }\n\n .empty-state-features {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 16px 0 24px;\n text-align: left;\n }\n\n .feature-item {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n color: #555;\n }\n\n .feature-item i {\n font-size: 14px !important;\n color: #4CAF50 !important;\n }\n\n .btn-create-large {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 14px 28px;\n background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);\n color: white;\n border: none;\n border-radius: 8px;\n font-size: 15px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s;\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);\n }\n\n .btn-create-large:hover {\n background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);\n transform: translateY(-1px);\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);\n }\n\n /* Content Layout */\n .categories-content {\n flex: 1;\n padding: 16px 24px;\n overflow: hidden;\n }\n\n .categories-layout {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n height: 100%;\n }\n\n .category-tree-panel,\n .category-detail-panel {\n background: white;\n border-radius: 8px;\n box-shadow: 0 1px 3px rgba(0,0,0,0.08);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n\n .panel-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n border-bottom: 1px solid #e0e0e0;\n background: #fafafa;\n }\n\n .panel-header h3 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: #333;\n }\n\n .count-badge {\n font-size: 12px;\n color: #999;\n background: #f0f0f0;\n padding: 2px 8px;\n border-radius: 10px;\n }\n\n .panel-actions {\n display: flex;\n gap: 4px;\n }\n\n .icon-btn {\n background: none;\n border: none;\n padding: 6px 8px;\n color: #666;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s;\n }\n\n .icon-btn:hover {\n background: #f0f0f0;\n color: #333;\n }\n\n .icon-btn.danger:hover {\n background: #ffebee;\n color: #d32f2f;\n }\n\n /* Tree Content */\n .tree-content {\n flex: 1;\n overflow-y: auto;\n padding: 8px 0;\n }\n\n .category-node {\n user-select: none;\n }\n\n .node-content {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n cursor: pointer;\n transition: background 0.15s;\n }\n\n .node-content:hover {\n background: #f5f5f5;\n }\n\n .node-content:focus {\n outline: none;\n background: #e8f4fd;\n }\n\n .node-content:focus-visible {\n outline: 2px solid #2196F3;\n outline-offset: -2px;\n background: #e8f4fd;\n }\n\n .node-content.selected {\n background: #e3f2fd;\n }\n\n .node-content.selected:focus-visible {\n outline: 2px solid #1976D2;\n }\n\n .expand-btn {\n background: none;\n border: none;\n padding: 2px;\n color: #999;\n cursor: pointer;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .expand-btn:hover {\n color: #666;\n }\n\n .expand-placeholder {\n width: 20px;\n }\n\n .node-content .fa-folder,\n .node-content .fa-folder-open {\n color: #ffc107;\n }\n\n .node-name {\n flex: 1;\n font-size: 14px;\n color: #333;\n }\n\n .node-count {\n font-size: 12px;\n color: #999;\n background: #f0f0f0;\n padding: 1px 6px;\n border-radius: 8px;\n }\n\n /* Detail Panel */\n .detail-content {\n flex: 1;\n padding: 16px;\n overflow-y: auto;\n }\n\n .detail-field {\n margin-bottom: 16px;\n }\n\n .detail-field label {\n display: block;\n font-size: 12px;\n font-weight: 500;\n color: #999;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 4px;\n }\n\n .field-value {\n font-size: 14px;\n color: #333;\n }\n\n .detail-stats {\n display: flex;\n gap: 24px;\n margin: 24px 0;\n padding: 16px;\n background: #f5f7fa;\n border-radius: 8px;\n }\n\n .stat-item {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n .stat-value {\n font-size: 24px;\n font-weight: 600;\n color: #2196F3;\n }\n\n .stat-label {\n font-size: 12px;\n color: #999;\n }\n\n .category-lists h4 {\n margin: 0 0 12px;\n font-size: 13px;\n font-weight: 600;\n color: #666;\n }\n\n .mini-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .mini-list-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n background: #f5f7fa;\n border-radius: 4px;\n font-size: 13px;\n color: #333;\n }\n\n .mini-list-item i {\n color: #999;\n }\n\n /* No Selection */\n .category-detail-panel.empty {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .no-selection {\n text-align: center;\n color: #999;\n }\n\n .no-selection i {\n font-size: 32px;\n margin-bottom: 12px;\n }\n\n .no-selection p {\n margin: 0;\n }\n\n /* Form */\n .category-form {\n display: flex;\n flex-direction: column;\n gap: 16px;\n }\n\n .form-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n }\n\n .form-group label {\n font-size: 13px;\n font-weight: 500;\n color: #666;\n }\n\n .form-input {\n padding: 8px 12px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 14px;\n }\n\n .form-input:focus {\n outline: none;\n border-color: #2196F3;\n }\n\n /* Modal Styles */\n .modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n animation: fadeIn 0.15s ease-out;\n }\n\n @keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n .modal-dialog {\n background: white;\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);\n width: 450px;\n max-width: 90vw;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n animation: slideIn 0.2s ease-out;\n }\n\n .modal-dialog.modal-sm {\n width: 400px;\n }\n\n @keyframes slideIn {\n from { transform: translateY(-20px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n }\n\n .modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n border-bottom: 1px solid #e0e0e0;\n }\n\n .modal-header.danger {\n background: #ffebee;\n border-bottom-color: #ffcdd2;\n }\n\n .modal-header.danger h3 {\n color: #c62828;\n }\n\n .modal-header h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: #333;\n }\n\n .modal-close {\n background: none;\n border: none;\n padding: 4px 8px;\n color: #999;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.15s;\n }\n\n .modal-close:hover:not(:disabled) {\n background: #f0f0f0;\n color: #333;\n }\n\n .modal-close:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .modal-body {\n padding: 20px;\n overflow-y: auto;\n }\n\n .modal-body p {\n margin: 0;\n color: #666;\n line-height: 1.6;\n }\n\n .modal-footer {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 16px 20px;\n border-top: 1px solid #e0e0e0;\n background: #fafafa;\n }\n\n .btn-secondary {\n padding: 8px 16px;\n background: white;\n border: 1px solid #ddd;\n border-radius: 6px;\n color: #666;\n font-size: 14px;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .btn-secondary:hover:not(:disabled) {\n background: #f5f5f5;\n border-color: #ccc;\n }\n\n .btn-secondary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .btn-primary {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 16px;\n background: #2196F3;\n border: none;\n border-radius: 6px;\n color: white;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .btn-primary:hover:not(:disabled) {\n background: #1976D2;\n }\n\n .btn-primary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .btn-danger {\n padding: 8px 16px;\n background: #d32f2f;\n border: none;\n border-radius: 6px;\n color: white;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s;\n }\n\n .btn-danger:hover {\n background: #c62828;\n }\n\n /* Responsive */\n @media (max-width: 768px) {\n .categories-layout {\n grid-template-columns: 1fr;\n }\n\n .category-detail-panel.empty {\n display: none;\n }\n\n .modal-dialog {\n width: 95vw;\n }\n }\n `],\n encapsulation: ViewEncapsulation.None\n})\nexport class ListsCategoriesResource extends BaseResourceComponent implements OnDestroy {\n private destroy$ = new Subject<void>();\n\n isLoading = true;\n categories: MJListCategoryEntity[] = [];\n categoryViewModels: CategoryViewModel[] = [];\n selectedCategory: MJListCategoryEntity | null = null;\n selectedCategoryLists: MJListEntity[] = [];\n\n // Dialog\n showDialog = false;\n editingCategory: MJListCategoryEntity | null = null;\n dialogName = '';\n dialogDescription = '';\n dialogParentId: string | null = null;\n availableParents: Array<{ ID: string | null; displayName: string }> = [];\n\n // Operation states\n isSaving = false;\n\n // Delete confirmation dialog\n showDeleteConfirm = false;\n deleteConfirmMessage = '';\n private categoryToDelete: MJListCategoryEntity | null = null;\n\n private listsByCategoryId: Map<string, MJListEntity[]> = new Map();\n private categoryMap: Map<string, MJListCategoryEntity> = new Map();\n\n constructor(\n private cdr: ChangeDetectorRef,\n private notificationService: MJNotificationService\n ) {\n super();\n }\n\n async ngOnInit() {\n await this.loadData();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n async loadData() {\n this.isLoading = true;\n\n try {\n const md = new Metadata();\n const rv = new RunView();\n const userId = md.CurrentUser?.ID;\n\n const [categoriesResult, listsResult] = await rv.RunViews([\n {\n EntityName: 'MJ: List Categories',\n OrderBy: 'Name',\n ResultType: 'entity_object',\n CacheLocal: true // Categories rarely change, cache for performance\n },\n {\n EntityName: 'MJ: Lists',\n ExtraFilter: userId ? `UserID = '${userId}'` : '',\n ResultType: 'entity_object'\n }\n ]);\n\n if (!categoriesResult.Success) {\n console.error('Failed to load categories');\n return;\n }\n\n this.categories = categoriesResult.Results as MJListCategoryEntity[];\n const lists = listsResult.Results as MJListEntity[];\n\n // Build category map\n this.categoryMap.clear();\n for (const cat of this.categories) {\n this.categoryMap.set(cat.ID, cat);\n }\n\n // Group lists by category\n this.listsByCategoryId.clear();\n for (const list of lists) {\n if (list.CategoryID) {\n const existing = this.listsByCategoryId.get(list.CategoryID) || [];\n existing.push(list);\n this.listsByCategoryId.set(list.CategoryID, existing);\n }\n }\n\n // Build view models\n this.buildCategoryViewModels();\n this.buildAvailableParents();\n } catch (error) {\n console.error('Error loading categories:', error);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n private buildCategoryViewModels() {\n this.categoryViewModels = [];\n\n const buildVm = (category: MJListCategoryEntity, depth: number): CategoryViewModel => {\n const lists = this.listsByCategoryId.get(category.ID) || [];\n const children = this.categories.filter(c => UUIDsEqual(c.ParentID, category.ID));\n\n return {\n category,\n listCount: lists.length,\n childCount: children.length,\n depth,\n isExpanded: true\n };\n };\n\n const processCategory = (category: MJListCategoryEntity, depth: number) => {\n this.categoryViewModels.push(buildVm(category, depth));\n const children = this.categories.filter(c => UUIDsEqual(c.ParentID, category.ID));\n for (const child of children) {\n processCategory(child, depth + 1);\n }\n };\n\n const topLevel = this.categories.filter(c => !c.ParentID);\n for (const cat of topLevel) {\n processCategory(cat, 0);\n }\n }\n\n private buildAvailableParents() {\n this.availableParents = [{ ID: null, displayName: '(Top Level)' }];\n\n const addCategory = (cat: MJListCategoryEntity, prefix: string) => {\n // Exclude the editing category and its descendants\n if (this.editingCategory && this.isDescendantOf(cat, this.editingCategory)) {\n return;\n }\n this.availableParents.push({ ID: cat.ID, displayName: prefix + cat.Name });\n const children = this.categories.filter(c => UUIDsEqual(c.ParentID, cat.ID));\n for (const child of children) {\n addCategory(child, prefix + '\\u00A0\\u00A0');\n }\n };\n\n const topLevel = this.categories.filter(c => !c.ParentID);\n for (const cat of topLevel) {\n if (!UUIDsEqual(this.editingCategory?.ID, cat.ID)) {\n addCategory(cat, '');\n }\n }\n }\n\n private isDescendantOf(category: MJListCategoryEntity, ancestor: MJListCategoryEntity): boolean {\n if (UUIDsEqual(category.ID, ancestor.ID)) return true;\n if (!category.ParentID) return false;\n const parent = this.categoryMap.get(category.ParentID);\n return parent ? this.isDescendantOf(parent, ancestor) : false;\n }\n\n getTopLevelCategories(): CategoryViewModel[] {\n return this.categoryViewModels.filter(vm => !vm.category.ParentID);\n }\n\n getChildCategories(parent: MJListCategoryEntity): CategoryViewModel[] {\n return this.categoryViewModels.filter(vm => UUIDsEqual(vm.category.ParentID, parent.ID));\n }\n\n hasChildren(category: MJListCategoryEntity): boolean {\n return this.categories.some(c => UUIDsEqual(c.ParentID, category.ID));\n }\n\n toggleExpand(event: Event, vm: CategoryViewModel) {\n event.stopPropagation();\n vm.isExpanded = !vm.isExpanded;\n }\n\n expandNode(event: Event, vm: CategoryViewModel) {\n event.preventDefault();\n if (this.hasChildren(vm.category) && !vm.isExpanded) {\n vm.isExpanded = true;\n }\n }\n\n collapseNode(event: Event, vm: CategoryViewModel) {\n event.preventDefault();\n if (vm.isExpanded) {\n vm.isExpanded = false;\n }\n }\n\n IsCategorySelected(category: MJListCategoryEntity): boolean {\n return UUIDsEqual(this.selectedCategory?.ID, category.ID);\n }\n\n selectCategory(category: MJListCategoryEntity) {\n this.selectedCategory = category;\n this.selectedCategoryLists = this.listsByCategoryId.get(category.ID) || [];\n }\n\n getParentCategoryName(category: MJListCategoryEntity): string | null {\n if (!category.ParentID) return null;\n return this.categoryMap.get(category.ParentID)?.Name || null;\n }\n\n getSelectedCategoryListCount(): number {\n if (!this.selectedCategory) return 0;\n return this.listsByCategoryId.get(this.selectedCategory.ID)?.length || 0;\n }\n\n getSelectedCategoryChildCount(): number {\n if (!this.selectedCategory) return 0;\n return this.categories.filter(c => UUIDsEqual(c.ParentID, this.selectedCategory!.ID)).length\n }\n\n createCategory() {\n this.editingCategory = null;\n this.dialogName = '';\n this.dialogDescription = '';\n this.dialogParentId = null;\n this.buildAvailableParents();\n this.showDialog = true;\n }\n\n editCategory() {\n if (!this.selectedCategory) return;\n this.editingCategory = this.selectedCategory;\n this.dialogName = this.selectedCategory.Name;\n this.dialogDescription = this.selectedCategory.Description || '';\n this.dialogParentId = this.selectedCategory.ParentID || null;\n this.buildAvailableParents();\n this.showDialog = true;\n }\n\n deleteCategory() {\n if (!this.selectedCategory) return;\n\n this.categoryToDelete = this.selectedCategory;\n const categoryName = this.categoryToDelete.Name;\n const listsInCategory = this.listsByCategoryId.get(this.categoryToDelete.ID) || [];\n const childCategories = this.categories.filter(c => UUIDsEqual(c.ParentID, this.categoryToDelete!.ID));\n\n let message = `Are you sure you want to delete \"${categoryName}\"?`;\n if (listsInCategory.length > 0) {\n message += ` ${listsInCategory.length} list(s) will be uncategorized.`;\n }\n if (childCategories.length > 0) {\n message += ` ${childCategories.length} subcategory(ies) will become top-level.`;\n }\n\n this.deleteConfirmMessage = message;\n this.showDeleteConfirm = true;\n }\n\n cancelDelete() {\n this.showDeleteConfirm = false;\n this.categoryToDelete = null;\n this.deleteConfirmMessage = '';\n }\n\n async confirmDelete() {\n if (!this.categoryToDelete) return;\n\n const categoryName = this.categoryToDelete.Name;\n const categoryToDelete = this.categoryToDelete;\n this.showDeleteConfirm = false;\n this.isLoading = true;\n this.cdr.detectChanges();\n\n try {\n const deleted = await categoryToDelete.Delete();\n if (deleted) {\n this.notificationService.CreateSimpleNotification(`\"${categoryName}\" deleted`, 'success', 3000);\n } else {\n // Get the detailed error message from LatestResult\n const errorMessage = categoryToDelete.LatestResult?.Message || 'Unknown error occurred';\n console.error('Failed to delete category:', categoryToDelete.LatestResult);\n this.notificationService.CreateSimpleNotification(`Failed to delete category: ${errorMessage}`, 'error', 6000);\n }\n this.selectedCategory = null;\n this.categoryToDelete = null;\n await this.loadData();\n } catch (error) {\n console.error('Error deleting category:', error);\n const errorMessage = error instanceof Error ? error.message : String(error);\n this.notificationService.CreateSimpleNotification(`Error deleting category: ${errorMessage}`, 'error', 6000);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n closeDialog() {\n this.showDialog = false;\n this.editingCategory = null;\n }\n\n async saveCategory() {\n this.isSaving = true;\n this.cdr.detectChanges();\n\n const isEditing = !!this.editingCategory;\n const categoryName = this.dialogName;\n\n try {\n const md = new Metadata();\n let category: MJListCategoryEntity;\n\n if (this.editingCategory) {\n category = this.editingCategory;\n } else {\n category = await md.GetEntityObject<MJListCategoryEntity>('MJ: List Categories');\n category.UserID = md.CurrentUser!.ID;\n }\n\n category.Name = this.dialogName;\n category.Description = this.dialogDescription || null;\n category.ParentID = this.dialogParentId || null;\n\n const saved = await category.Save();\n if (saved) {\n this.notificationService.CreateSimpleNotification(\n isEditing ? `\"${categoryName}\" updated` : `\"${categoryName}\" created`,\n 'success',\n 3000\n );\n this.closeDialog();\n await this.loadData();\n\n // Re-select the saved category\n if (isEditing) {\n this.selectedCategory = category;\n this.selectedCategoryLists = this.listsByCategoryId.get(category.ID) || [];\n }\n } else {\n // Get the detailed error message from LatestResult\n const errorMessage = category.LatestResult?.Message || 'Unknown error occurred';\n const action = isEditing ? 'update' : 'create';\n console.error(`Failed to ${action} category:`, category.LatestResult);\n this.notificationService.CreateSimpleNotification(\n `Failed to ${action} category: ${errorMessage}`,\n 'error',\n 6000\n );\n }\n } catch (error) {\n console.error('Error saving category:', error);\n const errorMessage = error instanceof Error ? error.message : String(error);\n this.notificationService.CreateSimpleNotification(`Error saving category: ${errorMessage}`, 'error', 6000);\n } finally {\n this.isSaving = false;\n this.cdr.detectChanges();\n }\n }\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n return 'Categories';\n }\n\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-tags';\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Component, ViewEncapsulation, HostListener } from '@angular/core';
|
|
8
|
-
import { RegisterClass } from '@memberjunction/global';
|
|
8
|
+
import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
|
|
9
9
|
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
10
10
|
import { Metadata, RunView } from '@memberjunction/core';
|
|
11
11
|
import { Subject } from 'rxjs';
|
|
@@ -699,7 +699,7 @@ let ListsMyListsResource = class ListsMyListsResource extends BaseResourceCompon
|
|
|
699
699
|
const processCategory = (cat, level) => {
|
|
700
700
|
const indent = '\u00A0\u00A0'.repeat(level);
|
|
701
701
|
result.push({ ID: cat.ID, displayName: `${indent}${cat.Name}` });
|
|
702
|
-
const children = categories.filter(c => c.ParentID
|
|
702
|
+
const children = categories.filter(c => UUIDsEqual(c.ParentID, cat.ID));
|
|
703
703
|
for (const child of children) {
|
|
704
704
|
processCategory(child, level + 1);
|
|
705
705
|
}
|