@memberjunction/ng-dashboards 6.1.2 → 6.2.0-edge.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/vectors/vector-management-resource.component.d.ts +6 -1
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +99 -45
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.d.ts +4 -0
- package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.d.ts.map +1 -1
- package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.js +16 -6
- package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +4 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +14 -4
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.js +2 -2
- package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
- package/dist/DevTools/graphql-console.component.d.ts.map +1 -1
- package/dist/DevTools/graphql-console.component.js +2 -0
- package/dist/DevTools/graphql-console.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.d.ts.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +2 -0
- package/dist/Integration/components/connections/connections.component.js.map +1 -1
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.d.ts +4 -12
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.d.ts.map +1 -1
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.js +39 -78
- package/dist/KnowledgeHub/components/feature-pipelines/feature-pipelines-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.d.ts +3 -0
- package/dist/Lists/components/lists-browse-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js +7 -6
- package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.d.ts +3 -0
- package/dist/Lists/components/lists-my-lists-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js +7 -6
- package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
- package/dist/PredictiveStudio/at-risk.view-models.d.ts +41 -3
- package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +1 -1
- package/dist/PredictiveStudio/at-risk.view-models.js +99 -6
- package/dist/PredictiveStudio/at-risk.view-models.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-catalog.component.d.ts +4 -1
- package/dist/PredictiveStudio/components/ps-catalog.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-catalog.component.js +61 -37
- package/dist/PredictiveStudio/components/ps-catalog.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.d.ts +12 -0
- package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.js +426 -184
- package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts +84 -0
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts.map +1 -0
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +1397 -0
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js.map +1 -0
- package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts +66 -34
- package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipelines.component.js +2456 -743
- package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts +194 -0
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -0
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +1902 -0
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -0
- package/dist/PredictiveStudio/components/ps-production.component.d.ts +17 -1
- package/dist/PredictiveStudio/components/ps-production.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-production.component.js +653 -372
- package/dist/PredictiveStudio/components/ps-production.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-registry.component.d.ts +21 -61
- package/dist/PredictiveStudio/components/ps-registry.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-registry.component.js +214 -681
- package/dist/PredictiveStudio/components/ps-registry.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts +49 -0
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts.map +1 -0
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js +658 -0
- package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js.map +1 -0
- package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts +42 -0
- package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts.map +1 -0
- package/dist/PredictiveStudio/predictive-studio-score-history.service.js +90 -0
- package/dist/PredictiveStudio/predictive-studio-score-history.service.js.map +1 -0
- package/dist/PredictiveStudio/predictive-studio.view-models.d.ts +14 -2
- package/dist/PredictiveStudio/predictive-studio.view-models.d.ts.map +1 -1
- package/dist/PredictiveStudio/predictive-studio.view-models.js +41 -5
- package/dist/PredictiveStudio/predictive-studio.view-models.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-models-resource.component.d.ts +9 -1
- package/dist/PredictiveStudio/resources/ps-models-resource.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/resources/ps-models-resource.component.js +178 -65
- package/dist/PredictiveStudio/resources/ps-models-resource.component.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +9 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +307 -369
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-resource-base.js +1 -1
- package/dist/PredictiveStudio/resources/ps-resource-base.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-studio-resource.component.d.ts +17 -1
- package/dist/PredictiveStudio/resources/ps-studio-resource.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +309 -138
- package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
- package/dist/VersionHistory/components/graph-resource.component.d.ts +1 -0
- package/dist/VersionHistory/components/graph-resource.component.d.ts.map +1 -1
- package/dist/VersionHistory/components/graph-resource.component.js +6 -5
- package/dist/VersionHistory/components/graph-resource.component.js.map +1 -1
- package/dist/predictive-studio-dashboards.module.d.ts +10 -8
- package/dist/predictive-studio-dashboards.module.d.ts.map +1 -1
- package/dist/predictive-studio-dashboards.module.js +13 -3
- package/dist/predictive-studio-dashboards.module.js.map +1 -1
- package/package.json +64 -63
|
@@ -37,10 +37,12 @@ export declare class ListsMyListsResource extends BaseResourceComponent implemen
|
|
|
37
37
|
availableEntities: Array<{
|
|
38
38
|
ID: string;
|
|
39
39
|
Name: string;
|
|
40
|
+
DisplayName: string;
|
|
40
41
|
}>;
|
|
41
42
|
filteredEntities: Array<{
|
|
42
43
|
ID: string;
|
|
43
44
|
Name: string;
|
|
45
|
+
DisplayName: string;
|
|
44
46
|
}>;
|
|
45
47
|
showContextMenu: boolean;
|
|
46
48
|
contextMenuX: number;
|
|
@@ -114,6 +116,7 @@ export declare class ListsMyListsResource extends BaseResourceComponent implemen
|
|
|
114
116
|
selectEntity(entity: {
|
|
115
117
|
ID: string;
|
|
116
118
|
Name: string;
|
|
119
|
+
DisplayName: string;
|
|
117
120
|
}): void;
|
|
118
121
|
filterEntities(term: string): void;
|
|
119
122
|
openEntityDropdown(inputElement: HTMLInputElement): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists-my-lists-resource.component.d.ts","sourceRoot":"","sources":["../../../src/Lists/components/lists-my-lists-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAgB,MAAM,eAAe,CAAC;AAErH,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAwB,oBAAoB,EAAsB,MAAM,+BAA+B,CAAC;AAE7H,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;AAGzE,UAAU,aAAa;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,YAAY;IACpB,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,qBA0gCa,oBAAqB,SAAQ,qBAAsB,YAAW,SAAS;IA4DhF,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,UAAU;IA9DpB,UAAmB,QAAQ,gBAAuB;IAElD,SAAS,UAAQ;IACjB,UAAU,SAAM;IAChB,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAU;IAEnC,QAAQ,EAAE,aAAa,EAAE,CAAM;IAC/B,aAAa,EAAE,aAAa,EAAE,CAAM;IACpC,UAAU,EAAE,oBAAoB,EAAE,CAAM;IACxC,YAAY,EAAE,YAAY,EAAE,CAAM;IAClC,cAAc,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAM;IACvE,iBAAiB,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAM;
|
|
1
|
+
{"version":3,"file":"lists-my-lists-resource.component.d.ts","sourceRoot":"","sources":["../../../src/Lists/components/lists-my-lists-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAgB,MAAM,eAAe,CAAC;AAErH,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAwB,oBAAoB,EAAsB,MAAM,+BAA+B,CAAC;AAE7H,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;AAGzE,UAAU,aAAa;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,YAAY;IACpB,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,qBA0gCa,oBAAqB,SAAQ,qBAAsB,YAAW,SAAS;IA4DhF,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,UAAU;IA9DpB,UAAmB,QAAQ,gBAAuB;IAElD,SAAS,U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AAgB;IAiBjD,mBAAmB;IAIb,aAAa;IA6DnB,iBAAiB;IAQjB,YAAY;IAMN,UAAU;IAwChB,iBAAiB;IAMX,QAAQ;IAqDR,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAI5D,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;yCA7rBrD,oBAAoB;2CAApB,oBAAoB;CAgsBhC"}
|
|
@@ -486,7 +486,7 @@ function ListsMyListsResource_Conditional_24_For_3_Template(rf, ctx) { if (rf &
|
|
|
486
486
|
} if (rf & 2) {
|
|
487
487
|
const entity_r26 = ctx.$implicit;
|
|
488
488
|
i0.ɵɵadvance();
|
|
489
|
-
i0.ɵɵtextInterpolate1(" ", entity_r26.
|
|
489
|
+
i0.ɵɵtextInterpolate1(" ", entity_r26.DisplayName, " ");
|
|
490
490
|
} }
|
|
491
491
|
function ListsMyListsResource_Conditional_24_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
492
492
|
i0.ɵɵelementStart(0, "div", 101);
|
|
@@ -754,8 +754,8 @@ let ListsMyListsResource = class ListsMyListsResource extends BaseResourceCompon
|
|
|
754
754
|
// Build available entities for dropdown
|
|
755
755
|
this.availableEntities = entities
|
|
756
756
|
.filter(e => e.IncludeInAPI)
|
|
757
|
-
.map(e => ({ ID: e.ID, Name: e.Name }))
|
|
758
|
-
.sort((a, b) => a.
|
|
757
|
+
.map(e => ({ ID: e.ID, Name: e.Name, DisplayName: e.DisplayNameOrName }))
|
|
758
|
+
.sort((a, b) => a.DisplayName.localeCompare(b.DisplayName));
|
|
759
759
|
this.filteredEntities = [...this.availableEntities];
|
|
760
760
|
// Build flat categories for dropdown
|
|
761
761
|
this.flatCategories = this.buildFlatCategories(this.categories);
|
|
@@ -946,12 +946,13 @@ let ListsMyListsResource = class ListsMyListsResource extends BaseResourceCompon
|
|
|
946
946
|
}
|
|
947
947
|
selectEntity(entity) {
|
|
948
948
|
this.selectedEntityId = entity.ID;
|
|
949
|
-
this.entitySearchTerm = entity.
|
|
949
|
+
this.entitySearchTerm = entity.DisplayName;
|
|
950
950
|
this.showEntityDropdown = false;
|
|
951
951
|
}
|
|
952
952
|
filterEntities(term) {
|
|
953
953
|
const lowerTerm = term.toLowerCase();
|
|
954
|
-
this.filteredEntities = this.availableEntities.filter(e => e.
|
|
954
|
+
this.filteredEntities = this.availableEntities.filter(e => e.DisplayName.toLowerCase().includes(lowerTerm) ||
|
|
955
|
+
e.Name.toLowerCase().includes(lowerTerm));
|
|
955
956
|
// Ensure dropdown is visible while typing
|
|
956
957
|
if (!this.showEntityDropdown && term) {
|
|
957
958
|
this.showEntityDropdown = true;
|
|
@@ -1548,7 +1549,7 @@ export { ListsMyListsResource };
|
|
|
1548
1549
|
<div
|
|
1549
1550
|
class="dropdown-item"
|
|
1550
1551
|
(mousedown)="selectEntity(entity); $event.preventDefault()">
|
|
1551
|
-
{{entity.
|
|
1552
|
+
{{entity.DisplayName}}
|
|
1552
1553
|
</div>
|
|
1553
1554
|
}
|
|
1554
1555
|
@if (filteredEntities.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists-my-lists-resource.component.js","sourceRoot":"","sources":["../../../src/Lists/components/lists-my-lists-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAA4C,YAAY,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,aAAa,EAAG,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAgB,oBAAoB,EAA4C,MAAM,+BAA+B,CAAC;AAC7H,OAAO,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oCA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sBC;YAtBD,sEAsBC;;;AA+pBM,oBAAoB;IA1gChC,aAAa,CAAC,qBAAqB,EAAE,sBAAsB,CAAC;GA0gChD,oBAAoB,CA+rBhC;;iFA/rBY,oBAAoB;cAzgChC,SAAS;6BACI,KAAK,YACP,4BAA4B,YAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0WP,iBA0pBY,iBAAiB,CAAC,IAAI;;kBAsEpC,YAAY;mBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;kBAWzC,YAAY;mBAAC,yBAAyB;;kFA/E5B,oBAAoB","sourcesContent":["import { Component, ViewEncapsulation, ChangeDetectorRef, OnDestroy, ElementRef, HostListener } from '@angular/core';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { ResourceData } from '@memberjunction/core-entities';\nimport { MJListEntity, MJListEntityExtended, MJListCategoryEntity, MJListDetailEntity } from '@memberjunction/core-entities';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { Subject } from 'rxjs';\nimport { TabService } from '@memberjunction/ng-base-application';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { validateEnumParam, validateStringParam } from '../../shared/agent-tool-validation';\nimport { buildListBrowseAgentContext, resolveNamedRecord, buildNotFoundError } from '../lists-agent-context';\ninterface ListViewModel {\n list: MJListEntity;\n itemCount: number;\n entityName: string;\n}\n\ninterface CategoryNode {\n category: MJListCategoryEntity | null;\n lists: ListViewModel[];\n children: CategoryNode[];\n isExpanded: boolean;\n}\n\n@RegisterClass(BaseResourceComponent, 'ListsMyListsResource')\n@Component({\n standalone: false,\n selector: 'mj-lists-my-lists-resource',\n template: `\n <mj-page-layout>\n <mj-page-header\n Title=\"My Lists\"\n Icon=\"fa-solid fa-list-check\"\n Subtitle=\"Lists you've created or have access to\">\n <div meta>\n <mj-stat-badge [Count]=\"filteredLists.length\" [Total]=\"allLists.length\" Label=\"lists\"></mj-stat-badge>\n </div>\n <div actions>\n <button mjButton variant=\"primary\" size=\"sm\" (click)=\"createNewList()\">\n <i class=\"fa-solid fa-plus\"></i> <span class=\"action-btn-label\">New List</span>\n </button>\n </div>\n <div toolbar>\n <mj-page-search\n Placeholder=\"Search lists...\"\n [Value]=\"searchTerm\"\n (ValueChange)=\"onSearchChange($event)\">\n </mj-page-search>\n </div>\n </mj-page-header>\n\n <mj-page-body>\n\n <!-- Loading State -->\n @if (isLoading) {\n <div class=\"loading-container\">\n <mj-loading text=\"Loading lists...\" size=\"medium\"></mj-loading>\n </div>\n }\n \n <!-- Empty State -->\n @if (!isLoading && filteredLists.length === 0 && !searchTerm) {\n <mj-empty-state Size=\"large\"\n Icon=\"fa-solid fa-list-check\"\n Title=\"No Lists Yet\"\n Message=\"Lists help you organize and track groups of records across your data.\"\n ActionText=\"Create Your First List\"\n ActionIcon=\"fa-solid fa-plus\"\n (Action)=\"createNewList()\">\n <div class=\"empty-state-features\">\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Group records from any entity</span>\n </div>\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Organize with categories</span>\n </div>\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Quick access from any view</span>\n </div>\n </div>\n </mj-empty-state>\n }\n\n <!-- No Results State -->\n @if (!isLoading && filteredLists.length === 0 && searchTerm) {\n <mj-empty-state Variant=\"no-results\"\n Title=\"No Results Found\"\n [Message]=\"NoResultsMessage\"\n ActionText=\"Clear search\"\n ActionIcon=\"fa-solid fa-rotate-left\"\n (Action)=\"clearSearch()\" />\n }\n \n <!-- Lists Grid -->\n @if (!isLoading && filteredLists.length > 0) {\n <div class=\"lists-content\">\n <!-- View Toggle -->\n <div class=\"view-controls\">\n <button\n class=\"view-toggle\"\n [class.active]=\"viewMode === 'grid'\"\n (click)=\"setViewMode('grid')\"\n title=\"Grid view\">\n <i class=\"fa-solid fa-grip\"></i>\n </button>\n <button\n class=\"view-toggle\"\n [class.active]=\"viewMode === 'list'\"\n (click)=\"setViewMode('list')\"\n title=\"List view\">\n <i class=\"fa-solid fa-list\"></i>\n </button>\n <span class=\"list-count\">{{filteredLists.length}} list{{filteredLists.length !== 1 ? 's' : ''}}</span>\n </div>\n <!-- Category Tree View -->\n @if (viewMode === 'list') {\n <div class=\"category-tree\">\n @for (node of categoryTree; track node) {\n <ng-container *ngTemplateOutlet=\"categoryNodeTemplate; context: { node: node, depth: 0 }\"></ng-container>\n }\n </div>\n }\n <!-- Grid View -->\n @if (viewMode === 'grid') {\n <div class=\"lists-grid\" role=\"list\" aria-label=\"My Lists\">\n @for (item of filteredLists; track item) {\n <div\n class=\"list-card\"\n (click)=\"openList(item.list)\"\n (keydown.enter)=\"openList(item.list)\"\n (keydown.space)=\"openList(item.list); $event.preventDefault()\"\n tabindex=\"0\"\n role=\"listitem\"\n [attr.aria-label]=\"item.list.Name + ' - ' + item.entityName + ' - ' + item.itemCount + ' items'\">\n <div class=\"card-header\">\n <div class=\"card-icon\" [style.background-color]=\"getEntityColor(item.list.Entity)\" aria-hidden=\"true\">\n <i [class]=\"getEntityIcon(item.list.Entity)\"></i>\n </div>\n <div class=\"card-menu\">\n <button class=\"menu-btn\" (click)=\"openListMenu($event, item.list)\" [attr.aria-label]=\"'More options for ' + item.list.Name\">\n <i class=\"fa-solid fa-ellipsis-v\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <h3 class=\"card-title\">{{item.list.Name}}</h3>\n @if (item.list.Description) {\n <p class=\"card-description\">{{item.list.Description}}</p>\n }\n <div class=\"card-meta\">\n <span class=\"meta-item\">\n <i class=\"fa-solid fa-database\"></i>\n {{item.entityName}}\n </span>\n <span class=\"meta-item\">\n <i class=\"fa-solid fa-hashtag\"></i>\n {{item.itemCount}} item{{item.itemCount !== 1 ? 's' : ''}}\n </span>\n </div>\n </div>\n <div class=\"card-footer\">\n @if (item.list.CategoryID) {\n <span class=\"category-tag\">\n <i class=\"fa-solid fa-folder\"></i>\n {{getCategoryName(item.list.CategoryID)}}\n </span>\n }\n <span class=\"date-info\">Updated {{formatDate(item.list.__mj_UpdatedAt)}}</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n \n <!-- Category Node Template -->\n <ng-template #categoryNodeTemplate let-node=\"node\" let-depth=\"depth\">\n <div class=\"category-section\" [style.margin-left.px]=\"depth * 20\">\n <!-- Category Header -->\n @if (node.category) {\n <div\n class=\"category-header\"\n (click)=\"toggleCategory(node)\">\n <i [class]=\"node.isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"></i>\n <i class=\"fa-solid fa-folder\" [class.fa-folder-open]=\"node.isExpanded\"></i>\n <span class=\"category-name\">{{node.category.Name}}</span>\n <span class=\"category-count\">{{getListCountInCategory(node)}}</span>\n </div>\n }\n \n <!-- Uncategorized Header -->\n @if (!node.category && node.lists.length > 0) {\n <div\n class=\"category-header uncategorized\"\n (click)=\"toggleCategory(node)\">\n <i [class]=\"node.isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"></i>\n <i class=\"fa-solid fa-inbox\"></i>\n <span class=\"category-name\">Uncategorized</span>\n <span class=\"category-count\">{{node.lists.length}}</span>\n </div>\n }\n \n <!-- Lists in this category -->\n @if (node.isExpanded) {\n <div class=\"category-lists\" role=\"list\">\n @for (item of node.lists; track item) {\n <div\n class=\"list-row\"\n (click)=\"openList(item.list)\"\n (keydown.enter)=\"openList(item.list)\"\n (keydown.space)=\"openList(item.list); $event.preventDefault()\"\n tabindex=\"0\"\n role=\"listitem\"\n [attr.aria-label]=\"item.list.Name + ' - ' + item.entityName + ' - ' + item.itemCount + ' items'\">\n <div class=\"list-icon\" [style.background-color]=\"getEntityColor(item.list.Entity)\" aria-hidden=\"true\">\n <i [class]=\"getEntityIcon(item.list.Entity)\"></i>\n </div>\n <div class=\"list-info\">\n <span class=\"list-name\">{{item.list.Name}}</span>\n <span class=\"list-meta\">{{item.entityName}} · {{item.itemCount}} items</span>\n </div>\n <div class=\"list-actions\">\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"openListMenu($event, item.list)\" [attr.aria-label]=\"'More options for ' + item.list.Name\">\n <i class=\"fa-solid fa-ellipsis-v\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n }\n </div>\n }\n \n <!-- Child categories -->\n @if (node.isExpanded) {\n @for (child of node.children; track child) {\n <ng-container *ngTemplateOutlet=\"categoryNodeTemplate; context: { node: child, depth: depth + 1 }\"></ng-container>\n }\n }\n </div>\n </ng-template>\n \n <!-- Context Menu (native) -->\n @if (showContextMenu) {\n <div class=\"context-menu-overlay\" (click)=\"closeContextMenu()\"></div>\n }\n @if (showContextMenu) {\n <div class=\"context-menu\" [style.top.px]=\"contextMenuY\" [style.left.px]=\"contextMenuX\">\n <button class=\"menu-item\" (click)=\"editList()\">\n <i class=\"fa-solid fa-pen\"></i>\n Edit\n </button>\n <button class=\"menu-item\" (click)=\"duplicateList()\">\n <i class=\"fa-solid fa-copy\"></i>\n Duplicate\n </button>\n @if (CanDeleteSelectedList) {\n <div class=\"menu-divider\"></div>\n <button class=\"menu-item danger\" (click)=\"confirmDeleteList()\">\n <i class=\"fa-solid fa-trash\"></i>\n Delete\n </button>\n }\n </div>\n }\n \n <!-- Create/Edit List Dialog (native modal) -->\n @if (showCreateDialog) {\n <div class=\"modal-overlay\" (click)=\"closeCreateDialog()\"></div>\n }\n @if (showCreateDialog) {\n <div class=\"modal-dialog\">\n <div class=\"modal-header\">\n <h3>{{editingList ? 'Edit List' : 'Create New List'}}</h3>\n <button class=\"modal-close\" (click)=\"closeCreateDialog()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"form-group\">\n <label>Name *</label>\n <input\n type=\"text\"\n [(ngModel)]=\"newListName\"\n placeholder=\"Enter list name\"\n class=\"form-input\" />\n </div>\n <div class=\"form-group\">\n <label>Description</label>\n <textarea\n [(ngModel)]=\"newListDescription\"\n placeholder=\"Optional description\"\n class=\"form-input\"\n rows=\"3\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Entity *</label>\n <div class=\"custom-select-wrapper\">\n <input\n #entityInput\n type=\"text\"\n [(ngModel)]=\"entitySearchTerm\"\n (ngModelChange)=\"filterEntities($event)\"\n (focus)=\"openEntityDropdown(entityInput)\"\n placeholder=\"Search and select an entity\"\n class=\"form-input\"\n [disabled]=\"!!editingList\" />\n </div>\n </div>\n <div class=\"form-group\">\n <label>Category</label>\n <select [(ngModel)]=\"selectedCategoryId\" class=\"form-input\">\n <option [ngValue]=\"null\">No category</option>\n @for (cat of flatCategories; track cat) {\n <option [ngValue]=\"cat.ID\">{{cat.displayName}}</option>\n }\n </select>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn-primary\"\n (click)=\"saveList()\"\n [disabled]=\"!newListName || !selectedEntityId || isSaving\">\n @if (isSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n {{isSaving ? 'Saving...' : (editingList ? 'Save' : 'Create')}}\n </button>\n <button class=\"btn-secondary\" (click)=\"closeCreateDialog()\" [disabled]=\"isSaving\">Cancel</button>\n </div>\n </div>\n }\n \n <!-- Delete Confirmation Dialog -->\n @if (showDeleteConfirm) {\n <div class=\"modal-overlay\" (click)=\"cancelDelete()\"></div>\n }\n @if (showDeleteConfirm) {\n <div class=\"modal-dialog confirm-dialog\">\n <div class=\"modal-header\">\n <h3>Delete List</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>Are you sure you want to delete \"<strong>{{deleteListName}}</strong>\"?</p>\n <p class=\"warning-text\">This will also remove all items in the list.</p>\n </div>\n <div class=\"modal-footer\">\n <button class=\"btn-danger\" (click)=\"deleteList()\">\n @if (isDeleting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n {{isDeleting ? 'Deleting...' : 'Delete'}}\n </button>\n <button class=\"btn-secondary\" (click)=\"cancelDelete()\">Cancel</button>\n </div>\n </div>\n }\n \n <!-- Entity Dropdown Portal (fixed positioning) -->\n @if (showEntityDropdown && !editingList) {\n <div\n class=\"entity-dropdown-portal\"\n [style.top.px]=\"entityDropdownPosition.top\"\n [style.left.px]=\"entityDropdownPosition.left\"\n [style.width.px]=\"entityDropdownPosition.width\"\n [class.dropdown-above]=\"entityDropdownPosition.openAbove\">\n <div class=\"entity-dropdown-content\" [class.open-above]=\"entityDropdownPosition.openAbove\">\n @for (entity of filteredEntities; track entity) {\n <div\n class=\"dropdown-item\"\n (mousedown)=\"selectEntity(entity); $event.preventDefault()\">\n {{entity.Name}}\n </div>\n }\n @if (filteredEntities.length === 0) {\n <div class=\"dropdown-empty\">\n No entities found\n </div>\n }\n </div>\n </div>\n }\n </mj-page-body>\n </mj-page-layout>\n `,\n styles: [`\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n /* Loading */\n .loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n }\n\n /* Onboarding feature checklist — projected into <mj-empty-state>. */\n .empty-state-features {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n margin: var(--mj-space-5) 0 var(--mj-space-2);\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: var(--mj-text-secondary);\n }\n\n .feature-item i {\n font-size: 14px !important;\n color: var(--mj-status-success) !important;\n }\n\n /* Content */\n .lists-content {\n flex: 1;\n overflow-y: auto;\n padding: 16px 24px;\n }\n\n .view-controls {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 16px;\n }\n\n .view-toggle {\n padding: 8px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: all 0.2s;\n }\n\n .view-toggle:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .view-toggle.active {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n }\n\n .list-count {\n margin-left: auto;\n color: var(--mj-text-muted);\n font-size: 14px;\n }\n\n /* Grid View */\n .lists-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\n gap: 16px;\n }\n\n .list-card {\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n cursor: pointer;\n transition: transform 0.2s, box-shadow 0.2s, outline 0.1s;\n outline: 2px solid transparent;\n }\n\n .list-card:hover {\n transform: translateY(-2px);\n box-shadow: var(--mj-shadow-md);\n }\n\n .list-card:focus {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n }\n\n .list-card:focus:not(:focus-visible) {\n outline: none;\n }\n\n .list-card:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n }\n\n .card-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding: 16px 16px 0;\n }\n\n .card-icon {\n width: 40px;\n height: 40px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-inverse);\n font-size: 18px;\n }\n\n .menu-btn {\n background: none;\n border: none;\n padding: 4px 8px;\n color: var(--mj-text-muted);\n cursor: pointer;\n border-radius: 4px;\n }\n\n .menu-btn:hover {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n }\n\n .card-body {\n padding: 12px 16px;\n }\n\n .card-title {\n margin: 0 0 4px;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .card-description {\n margin: 0 0 12px;\n font-size: 13px;\n color: var(--mj-text-secondary);\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .card-meta {\n display: flex;\n gap: 16px;\n }\n\n .meta-item {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .card-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n }\n\n .category-tag {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n padding: 2px 8px;\n border-radius: 4px;\n }\n\n .date-info {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n /* Category Tree */\n .category-tree {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .category-section {\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n overflow: hidden;\n }\n\n .category-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n cursor: pointer;\n transition: background 0.2s;\n }\n\n .category-header:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .category-header i:first-child {\n width: 16px;\n text-align: center;\n color: var(--mj-text-muted);\n }\n\n .category-header .fa-folder,\n .category-header .fa-folder-open {\n color: var(--mj-status-warning);\n }\n\n .category-header.uncategorized .fa-inbox {\n color: var(--mj-text-muted);\n }\n\n .category-name {\n flex: 1;\n font-weight: 500;\n color: var(--mj-text-primary);\n }\n\n .category-count {\n font-size: 12px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n padding: 2px 8px;\n border-radius: 10px;\n }\n\n .category-lists {\n border-top: 1px solid var(--mj-border-default);\n }\n\n .list-row {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px 12px 40px;\n cursor: pointer;\n transition: background 0.2s;\n outline: none;\n }\n\n .list-row:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .list-row:focus {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n }\n\n .list-row:focus-visible {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n box-shadow: inset 3px 0 0 var(--mj-brand-primary);\n }\n\n .list-icon {\n width: 32px;\n height: 32px;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-inverse);\n font-size: 14px;\n flex-shrink: 0;\n }\n\n .list-info {\n flex: 1;\n min-width: 0;\n }\n\n .list-name {\n display: block;\n font-weight: 500;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .list-meta {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .list-actions {\n display: flex;\n gap: 4px;\n }\n\n .action-btn {\n background: none;\n border: none;\n padding: 4px 8px;\n color: var(--mj-text-muted);\n cursor: pointer;\n border-radius: 4px;\n opacity: 0;\n transition: opacity 0.2s;\n }\n\n .list-row:hover .action-btn {\n opacity: 1;\n }\n\n .action-btn:hover {\n background: var(--mj-border-default);\n color: var(--mj-text-secondary);\n }\n\n /* Context Menu (native) */\n .context-menu-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n }\n\n .context-menu {\n position: fixed;\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n box-shadow: var(--mj-shadow-md);\n min-width: 160px;\n padding: 4px 0;\n z-index: 1000;\n }\n\n .menu-item {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 10px 16px;\n background: none;\n border: none;\n text-align: left;\n font-size: 14px;\n color: var(--mj-text-primary);\n cursor: pointer;\n transition: background 0.15s;\n }\n\n .menu-item:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .menu-item.danger {\n color: var(--mj-status-error);\n }\n\n .menu-item.danger:hover {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n }\n\n .menu-divider {\n height: 1px;\n background: var(--mj-border-default);\n margin: 4px 0;\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: var(--mj-bg-overlay);\n z-index: 1000;\n }\n\n .modal-dialog {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: var(--mj-bg-surface-card);\n border-radius: 12px;\n box-shadow: var(--mj-shadow-lg);\n width: 500px;\n max-width: 90vw;\n max-height: 90vh;\n overflow: hidden;\n z-index: 1001;\n }\n\n .confirm-dialog {\n width: 400px;\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 var(--mj-border-default);\n }\n\n .modal-header h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .modal-close {\n background: none;\n border: none;\n padding: 4px 8px;\n color: var(--mj-text-muted);\n cursor: pointer;\n border-radius: 4px;\n }\n\n .modal-close:hover {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n }\n\n .modal-body {\n padding: 20px;\n max-height: 60vh;\n overflow-y: auto;\n }\n\n .modal-body p {\n margin: 0 0 8px;\n color: var(--mj-text-primary);\n }\n\n .warning-text {\n color: var(--mj-status-error) !important;\n font-size: 13px;\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 var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n }\n\n .btn-primary {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\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-primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n }\n\n .btn-primary:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n .btn-secondary {\n padding: 10px 20px;\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 14px;\n cursor: pointer;\n transition: background 0.2s;\n }\n\n .btn-secondary:hover:not(:disabled) {\n background: var(--mj-bg-surface-sunken);\n }\n\n .btn-danger {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n background: var(--mj-status-error);\n color: var(--mj-text-inverse);\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-danger:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 85%, black);\n }\n\n /* Form Styles */\n .form-group {\n margin-bottom: 16px;\n }\n\n .form-group:last-child {\n margin-bottom: 0;\n }\n\n .form-group label {\n display: block;\n margin-bottom: 6px;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n }\n\n .form-input {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 14px;\n transition: border-color 0.2s, box-shadow 0.2s;\n box-sizing: border-box;\n }\n\n .form-input:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n\n .form-input:disabled {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n }\n\n textarea.form-input {\n resize: vertical;\n min-height: 80px;\n }\n\n select.form-input {\n cursor: pointer;\n }\n\n .custom-select-wrapper {\n position: relative;\n }\n\n /* Portal Dropdown - Fixed positioning to escape modal z-index */\n .entity-dropdown-portal {\n position: fixed;\n z-index: 10002; /* Above modal (1001) */\n }\n\n .entity-dropdown-content {\n max-height: 200px;\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n box-shadow: var(--mj-shadow-md);\n }\n\n .entity-dropdown-content.open-above {\n position: absolute;\n bottom: 0;\n }\n\n .dropdown-item {\n padding: 10px 12px;\n cursor: pointer;\n transition: background 0.15s;\n font-size: 14px;\n color: var(--mj-text-primary);\n }\n\n .dropdown-item:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n }\n\n .dropdown-item:first-child {\n border-radius: 6px 6px 0 0;\n }\n\n .dropdown-item:last-child {\n border-radius: 0 0 6px 6px;\n }\n\n .dropdown-empty {\n padding: 10px 12px;\n color: var(--mj-text-muted);\n font-style: italic;\n }\n\n /* Responsive */\n @media (max-width: 768px) {\n .lists-header {\n flex-direction: column;\n gap: 16px;\n align-items: stretch;\n }\n\n .header-actions {\n flex-direction: column;\n }\n\n .search-box input {\n width: 100%;\n }\n\n .btn-create {\n width: 100%;\n justify-content: center;\n }\n\n .lists-grid {\n grid-template-columns: 1fr;\n }\n\n .modal-dialog {\n width: 95vw;\n }\n }\n `],\n encapsulation: ViewEncapsulation.None\n})\nexport class ListsMyListsResource extends BaseResourceComponent implements OnDestroy {\n protected override destroy$ = new Subject<void>();\n\n isLoading = true;\n searchTerm = '';\n viewMode: 'grid' | 'list' = 'grid';\n\n allLists: ListViewModel[] = [];\n filteredLists: ListViewModel[] = [];\n categories: MJListCategoryEntity[] = [];\n categoryTree: CategoryNode[] = [];\n flatCategories: Array<{ ID: string | null; displayName: string }> = [];\n availableEntities: Array<{ ID: string; Name: string }> = [];\n filteredEntities: Array<{ ID: string; Name: string }> = [];\n\n // Context menu\n showContextMenu = false;\n contextMenuX = 0;\n contextMenuY = 0;\n selectedContextList: MJListEntity | null = null;\n\n /**\n * Whether the current user may DELETE the context-menu's list — the same shared ownership rule\n * the server enforces (owner, or a Developer/Integration user). This \"My Lists\" view is\n * owner-scoped, so for the standard case it's the owner and resolves true; the gate makes it\n * correct-by-construction (and consistent with the Browse view) rather than an unconditional button.\n */\n public get CanDeleteSelectedList(): boolean {\n const list = this.selectedContextList;\n if (!list) {\n return false;\n }\n return MJListEntityExtended.UserCanDelete(list.UserID, this.ProviderToUse.CurrentUser);\n }\n\n // Create/Edit dialog\n showCreateDialog = false;\n editingList: MJListEntity | null = null;\n newListName = '';\n newListDescription = '';\n selectedEntityId = '';\n selectedCategoryId: string | null = null;\n entitySearchTerm = '';\n showEntityDropdown = false;\n entityDropdownPosition = { top: 0, left: 0, width: 0, openAbove: false };\n\n // Delete confirmation\n showDeleteConfirm = false;\n deleteListName = '';\n listToDelete: MJListEntity | null = null;\n\n // Operation states\n isSaving = false;\n isDeleting = false;\n\n private categoryMap: Map<string, MJListCategoryEntity> = new Map();\n private entityColorMap: Map<string, string> = new Map();\n private entityIconMap: Map<string, string> = new Map();\n\n constructor(\n private cdr: ChangeDetectorRef,\n private tabService: TabService,\n private notificationService: MJNotificationService,\n private elementRef: ElementRef\n ) {\n super();\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent) {\n // Close entity dropdown when clicking outside the input or dropdown\n if (this.showEntityDropdown) {\n const target = event.target as HTMLElement;\n if (!target.closest('.custom-select-wrapper') && !target.closest('.entity-dropdown-portal')) {\n this.showEntityDropdown = false;\n }\n }\n }\n\n @HostListener('document:keydown.escape')\n onEscapeKey() {\n if (this.showContextMenu) {\n this.closeContextMenu();\n }\n if (this.showCreateDialog) {\n this.closeCreateDialog();\n }\n if (this.showDeleteConfirm) {\n this.cancelDelete();\n }\n }\n\n async ngOnInit() {\n super.ngOnInit();\n await this.loadData();\n this.registerAgentTools();\n this.publishAgentContext();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // ================================================================\n // AI Agent Context & Client Tools\n //\n // SAFETY BOUNDARY: SAFE (open / search / view) operations plus ONE\n // bounded-mutation tool (CreateList) that opens the dialog-validated\n // create flow. INTENTIONALLY EXCLUDED — must NOT be wired in:\n // - EditList (editList) — mutates an existing record\n // - DeleteList (confirmDeleteList) — destructive\n // ================================================================\n\n /** Report the My-Lists surface's salient state to the AI agent. */\n private publishAgentContext(): void {\n this.navigationService.SetAgentContext(this, buildListBrowseAgentContext({\n SearchTerm: this.searchTerm,\n ViewMode: this.viewMode,\n AllListCount: this.allLists.length,\n FilteredListCount: this.filteredLists.length,\n // Deep context: the NAMES of the user's currently-visible lists (bounded),\n // so the agent can open them by name rather than an opaque GUID.\n VisibleListNames: this.filteredLists.map(i => i.list.Name),\n }));\n }\n\n /**\n * Resolve an agent-supplied reference (a list ID or NAME, exact or partial) to\n * one of the user's loaded lists via the pure {@link resolveNamedRecord} helper.\n */\n private resolveMyListItem(input: string): ListViewModel | null {\n const match = resolveNamedRecord(input, this.allLists.map(i => ({ ID: i.list.ID, Name: i.list.Name })));\n if (!match) {\n return null;\n }\n return this.allLists.find(i => UUIDsEqual(i.list.ID, match.ID)) ?? null;\n }\n\n /** Register the My-Lists surface's agent-actionable tools. */\n private registerAgentTools(): void {\n this.navigationService.SetAgentClientTools(this, [\n {\n Name: 'OpenList',\n Description: 'Open one of my lists in a new tab by its ID or name. Pass the list name the user says (see VisibleListNames) — the tool resolves an exact ID, an exact name, or a partial name match.',\n ParameterSchema: { type: 'object', properties: { list: { type: 'string', description: 'The list ID or name to open' }, listId: { type: 'string', description: 'Deprecated alias for \"list\".' } } },\n Handler: async (params: Record<string, unknown>) => {\n const check = validateStringParam(params['list'] ?? params['listId'], 'list');\n if (!check.ok) return check.result;\n const item = this.resolveMyListItem(check.value);\n if (!item) return { Success: false, ErrorMessage: buildNotFoundError(check.value, this.allLists.map(i => ({ ID: i.list.ID, Name: i.list.Name })), 'list') };\n this.openList(item.list);\n return { Success: true, Data: { listName: item.list.Name } };\n },\n },\n {\n Name: 'SearchLists',\n Description: 'Set the search term that filters my lists.',\n ParameterSchema: { type: 'object', properties: { searchTerm: { type: 'string' } }, required: ['searchTerm'] },\n Handler: async (params: Record<string, unknown>) => {\n const check = validateStringParam(params['searchTerm'], 'searchTerm');\n if (!check.ok) return check.result;\n this.searchTerm = check.value;\n this.onSearchChange(check.value);\n this.publishAgentContext();\n return { Success: true, Data: { resultCount: this.filteredLists.length } };\n },\n },\n {\n Name: 'SetViewMode',\n Description: 'Set the view mode: \"grid\" or \"list\".',\n ParameterSchema: { type: 'object', properties: { mode: { type: 'string', enum: ['grid', 'list'] } }, required: ['mode'] },\n Handler: async (params: Record<string, unknown>) => {\n const check = validateEnumParam(params['mode'], ['grid', 'list'] as const, 'mode');\n if (!check.ok) return check.result;\n this.setViewMode(check.value);\n return { Success: true };\n },\n },\n {\n // BOUNDED MUTATION: opens the dialog-validated create flow only.\n Name: 'CreateList',\n Description: 'Open the \"Create New List\" dialog. Nothing is saved until the user confirms the name and entity.',\n ParameterSchema: { type: 'object', properties: {} },\n Handler: async () => {\n this.createNewList();\n return { Success: true };\n },\n },\n ]);\n }\n\n async loadData() {\n this.isLoading = true;\n\n try {\n const md = this.ProviderToUse;\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const userId = md.CurrentUser?.ID;\n\n if (!userId) {\n console.error('No current user');\n return;\n }\n\n // Load lists and categories in parallel; item counts follow as a\n // batched set of count_only queries (index-seek COUNTs server-side)\n // instead of transferring every membership row to the client.\n const [listsResult, categoriesResult] = await rv.RunViews([\n {\n EntityName: 'MJ: Lists',\n ExtraFilter: `UserID = '${userId}'`,\n OrderBy: 'Name',\n ResultType: 'entity_object'\n },\n {\n EntityName: 'MJ: List Categories',\n OrderBy: 'Name',\n ResultType: 'entity_object'\n }\n ]);\n\n if (!listsResult.Success || !categoriesResult.Success) {\n console.error('Failed to load lists data');\n return;\n }\n\n const lists = listsResult.Results as MJListEntity[];\n this.categories = categoriesResult.Results as MJListCategoryEntity[];\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 // Count items per list — one batched round trip\n const itemCounts = new Map<string, number>();\n if (lists.length > 0) {\n const countResults = await rv.RunViews(lists.map(list => ({\n EntityName: 'MJ: List Details',\n ExtraFilter: `ListID = '${list.ID}'`,\n ResultType: 'count_only' as const\n })));\n countResults.forEach((res, idx) => {\n itemCounts.set(lists[idx].ID, res.Success ? res.TotalRowCount : 0);\n });\n }\n\n // Build entity info\n const entities = md.Entities;\n for (const entity of entities) {\n this.entityColorMap.set(entity.Name, this.generateEntityColor(entity.Name));\n this.entityIconMap.set(entity.Name, entity.Icon || 'fa-solid fa-table');\n }\n\n // Build list view models\n this.allLists = lists.map(list => ({\n list,\n itemCount: itemCounts.get(list.ID) || 0,\n entityName: list.Entity || 'Unknown'\n }));\n\n // Build available entities for dropdown\n this.availableEntities = entities\n .filter(e => e.IncludeInAPI)\n .map(e => ({ ID: e.ID, Name: e.Name }))\n .sort((a, b) => a.Name.localeCompare(b.Name));\n this.filteredEntities = [...this.availableEntities];\n\n // Build flat categories for dropdown\n this.flatCategories = this.buildFlatCategories(this.categories);\n\n this.applyFilter();\n this.buildCategoryTree();\n } catch (error) {\n console.error('Error loading lists:', error);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n private buildFlatCategories(categories: MJListCategoryEntity[]): Array<{ ID: string; displayName: string }> {\n const result: Array<{ ID: string; displayName: string }> = [];\n const topLevel = categories.filter(c => !c.ParentID);\n\n const processCategory = (cat: MJListCategoryEntity, level: number) => {\n const indent = '\\u00A0\\u00A0'.repeat(level);\n result.push({ ID: cat.ID, displayName: `${indent}${cat.Name}` });\n\n const children = categories.filter(c => UUIDsEqual(c.ParentID, cat.ID));\n for (const child of children) {\n processCategory(child, level + 1);\n }\n };\n\n for (const cat of topLevel) {\n processCategory(cat, 0);\n }\n\n return result;\n }\n\n private buildCategoryTree() {\n const rootNodes: CategoryNode[] = [];\n const categoryNodes = new Map<string, CategoryNode>();\n\n // Create nodes for all categories\n for (const cat of this.categories) {\n categoryNodes.set(cat.ID, {\n category: cat,\n lists: [],\n children: [],\n isExpanded: true\n });\n }\n\n // Build tree structure\n for (const cat of this.categories) {\n const node = categoryNodes.get(cat.ID)!;\n if (cat.ParentID && categoryNodes.has(cat.ParentID)) {\n categoryNodes.get(cat.ParentID)!.children.push(node);\n } else {\n rootNodes.push(node);\n }\n }\n\n // Assign lists to categories\n const uncategorizedLists: ListViewModel[] = [];\n for (const item of this.filteredLists) {\n if (item.list.CategoryID && categoryNodes.has(item.list.CategoryID)) {\n categoryNodes.get(item.list.CategoryID)!.lists.push(item);\n } else {\n uncategorizedLists.push(item);\n }\n }\n\n // Add uncategorized node if there are uncategorized lists\n if (uncategorizedLists.length > 0) {\n rootNodes.unshift({\n category: null,\n lists: uncategorizedLists,\n children: [],\n isExpanded: true\n });\n }\n\n this.categoryTree = rootNodes;\n }\n\n onSearchChange(_term: string) {\n this.applyFilter();\n this.buildCategoryTree();\n this.publishAgentContext();\n }\n\n /** Set the grid/list view mode and refresh agent context. */\n setViewMode(mode: 'grid' | 'list') {\n this.viewMode = mode;\n this.publishAgentContext();\n }\n\n clearSearch() {\n this.searchTerm = '';\n this.applyFilter();\n this.buildCategoryTree();\n }\n\n /** Message for the no-results empty state, echoing the active search term. */\n public get NoResultsMessage(): string {\n return `No lists match \"${this.searchTerm}\". Try a different search term or clear your search.`;\n }\n\n private applyFilter() {\n if (!this.searchTerm) {\n this.filteredLists = [...this.allLists];\n } else {\n const term = this.searchTerm.toLowerCase();\n this.filteredLists = this.allLists.filter(item =>\n item.list.Name.toLowerCase().includes(term) ||\n (item.list.Description && item.list.Description.toLowerCase().includes(term)) ||\n item.entityName.toLowerCase().includes(term)\n );\n }\n }\n\n toggleCategory(node: CategoryNode) {\n node.isExpanded = !node.isExpanded;\n }\n\n getListCountInCategory(node: CategoryNode): number {\n let count = node.lists.length;\n for (const child of node.children) {\n count += this.getListCountInCategory(child);\n }\n return count;\n }\n\n getCategoryName(categoryId: string): string {\n return this.categoryMap.get(categoryId)?.Name || 'Unknown';\n }\n\n getEntityColor(entityName: string): string {\n return this.entityColorMap.get(entityName) || '#607D8B';\n }\n\n getEntityIcon(entityName: string): string {\n return this.entityIconMap.get(entityName) || 'fa-solid fa-table';\n }\n\n private generateEntityColor(entityName: string): string {\n let hash = 0;\n for (let i = 0; i < entityName.length; i++) {\n hash = entityName.charCodeAt(i) + ((hash << 5) - hash);\n }\n const colors = [\n '#2196F3', '#4CAF50', '#FF9800', '#9C27B0', '#F44336',\n '#00BCD4', '#795548', '#607D8B', '#E91E63', '#3F51B5'\n ];\n return colors[Math.abs(hash) % colors.length];\n }\n\n formatDate(date: Date): string {\n if (!date) return '';\n const now = new Date();\n const d = new Date(date);\n const diffMs = now.getTime() - d.getTime();\n const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));\n\n if (diffDays === 0) return 'today';\n if (diffDays === 1) return 'yesterday';\n if (diffDays < 7) return `${diffDays} days ago`;\n if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;\n return d.toLocaleDateString();\n }\n\n openList(list: MJListEntity) {\n const appId = this.Data?.Configuration?.applicationId || '';\n this.tabService.OpenList(list.ID, list.Name, appId);\n }\n\n openListMenu(event: Event, list: MJListEntity) {\n event.stopPropagation();\n const mouseEvent = event as MouseEvent;\n this.selectedContextList = list;\n this.contextMenuX = mouseEvent.clientX;\n this.contextMenuY = mouseEvent.clientY;\n this.showContextMenu = true;\n }\n\n closeContextMenu() {\n this.showContextMenu = false;\n this.selectedContextList = null;\n }\n\n createNewList() {\n this.editingList = null;\n this.newListName = '';\n this.newListDescription = '';\n this.selectedEntityId = '';\n this.entitySearchTerm = '';\n this.selectedCategoryId = null;\n this.showEntityDropdown = false;\n this.showCreateDialog = true;\n }\n\n editList() {\n if (!this.selectedContextList) return;\n\n this.editingList = this.selectedContextList;\n this.newListName = this.selectedContextList.Name;\n this.newListDescription = this.selectedContextList.Description || '';\n this.selectedEntityId = this.selectedContextList.EntityID;\n this.entitySearchTerm = this.selectedContextList.Entity || '';\n this.selectedCategoryId = this.selectedContextList.CategoryID || null;\n this.showCreateDialog = true;\n this.closeContextMenu();\n }\n\n selectEntity(entity: { ID: string; Name: string }) {\n this.selectedEntityId = entity.ID;\n this.entitySearchTerm = entity.Name;\n this.showEntityDropdown = false;\n }\n\n filterEntities(term: string) {\n const lowerTerm = term.toLowerCase();\n this.filteredEntities = this.availableEntities.filter(e =>\n e.Name.toLowerCase().includes(lowerTerm)\n );\n // Ensure dropdown is visible while typing\n if (!this.showEntityDropdown && term) {\n this.showEntityDropdown = true;\n }\n // Clear selection when user modifies the search text\n this.selectedEntityId = '';\n }\n\n openEntityDropdown(inputElement: HTMLInputElement) {\n const rect = inputElement.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const dropdownHeight = 200; // estimated max height\n const spaceBelow = viewportHeight - rect.bottom;\n const openAbove = spaceBelow < dropdownHeight && rect.top > dropdownHeight;\n\n this.entityDropdownPosition = {\n top: openAbove ? rect.top - dropdownHeight : rect.bottom,\n left: rect.left,\n width: rect.width,\n openAbove\n };\n this.showEntityDropdown = true;\n this.filteredEntities = [...this.availableEntities];\n }\n\n closeEntityDropdown() {\n this.showEntityDropdown = false;\n }\n\n async duplicateList() {\n if (!this.selectedContextList) return;\n\n const listToDuplicate = this.selectedContextList;\n this.closeContextMenu();\n\n this.isLoading = true;\n this.cdr.detectChanges();\n\n try {\n const md = this.ProviderToUse;\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n\n const newList = await md.GetEntityObject<MJListEntity>('MJ: Lists');\n newList.Name = `${listToDuplicate.Name} (Copy)`;\n newList.Description = listToDuplicate.Description;\n newList.EntityID = listToDuplicate.EntityID;\n newList.CategoryID = listToDuplicate.CategoryID;\n newList.UserID = md.CurrentUser!.ID;\n\n const listSaved = await newList.Save();\n if (!listSaved) {\n this.notificationService.CreateSimpleNotification('Failed to duplicate list', 'error', 4000);\n return;\n }\n\n const itemsResult = await rv.RunView<MJListDetailEntity>({\n EntityName: 'MJ: List Details',\n ExtraFilter: `ListID = '${listToDuplicate.ID}'`,\n ResultType: 'entity_object'\n });\n\n if (itemsResult.Success && itemsResult.Results.length > 0) {\n let copiedCount = 0;\n for (const item of itemsResult.Results) {\n const newItem = await md.GetEntityObject<MJListDetailEntity>('MJ: List Details');\n newItem.ListID = newList.ID;\n newItem.RecordID = item.RecordID;\n newItem.Sequence = item.Sequence;\n const itemSaved = await newItem.Save();\n if (itemSaved) copiedCount++;\n }\n this.notificationService.CreateSimpleNotification(\n `List duplicated with ${copiedCount} item${copiedCount !== 1 ? 's' : ''}`,\n 'success',\n 3000\n );\n } else {\n this.notificationService.CreateSimpleNotification('List duplicated successfully', 'success', 3000);\n }\n\n await this.loadData();\n } catch (error) {\n console.error('Error duplicating list:', error);\n this.notificationService.CreateSimpleNotification('Error duplicating list. Please try again.', 'error', 4000);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n confirmDeleteList() {\n if (!this.selectedContextList) return;\n this.listToDelete = this.selectedContextList;\n this.deleteListName = this.selectedContextList.Name;\n this.showDeleteConfirm = true;\n this.closeContextMenu();\n }\n\n cancelDelete() {\n this.showDeleteConfirm = false;\n this.listToDelete = null;\n this.deleteListName = '';\n }\n\n async deleteList() {\n if (!this.listToDelete) return;\n\n const listToDelete = this.listToDelete;\n const listName = listToDelete.Name;\n\n // Defense-in-depth: re-check the shared ownership rule before deleting (the server is the true\n // enforcement point, but this fails fast with a clean message).\n if (!MJListEntityExtended.UserCanDelete(listToDelete.UserID, this.ProviderToUse.CurrentUser)) {\n this.notificationService.CreateSimpleNotification(\n `You don't have permission to delete \"${listName}\".`, 'error', 6000,\n );\n return;\n }\n\n this.isDeleting = true;\n this.cdr.detectChanges();\n\n try {\n const deleted = await listToDelete.Delete();\n if (deleted) {\n this.notificationService.CreateSimpleNotification(`\"${listName}\" deleted`, 'success', 3000);\n } else {\n // Get the detailed error message from LatestResult\n const errorMessage = listToDelete.LatestResult?.Message || 'Unknown error occurred';\n console.error('Failed to delete list:', listToDelete.LatestResult);\n this.notificationService.CreateSimpleNotification(`Failed to delete list: ${errorMessage}`, 'error', 6000);\n }\n this.cancelDelete();\n await this.loadData();\n } catch (error) {\n console.error('Error deleting list:', error);\n const errorMessage = error instanceof Error ? error.message : String(error);\n this.notificationService.CreateSimpleNotification(`Error deleting list: ${errorMessage}`, 'error', 6000);\n } finally {\n this.isDeleting = false;\n this.cdr.detectChanges();\n }\n }\n\n closeCreateDialog() {\n this.showCreateDialog = false;\n this.editingList = null;\n this.showEntityDropdown = false;\n }\n\n async saveList() {\n this.isSaving = true;\n this.cdr.detectChanges();\n\n const isEditing = !!this.editingList;\n const listName = this.newListName;\n\n try {\n const md = this.ProviderToUse;\n let list: MJListEntity;\n\n if (this.editingList) {\n list = this.editingList;\n } else {\n list = await md.GetEntityObject<MJListEntity>('MJ: Lists');\n list.UserID = md.CurrentUser!.ID;\n list.EntityID = this.selectedEntityId;\n }\n\n list.Name = this.newListName;\n list.Description = this.newListDescription || null;\n list.CategoryID = this.selectedCategoryId || null;\n\n const saved = await list.Save();\n if (saved) {\n this.notificationService.CreateSimpleNotification(\n isEditing ? `\"${listName}\" updated` : `\"${listName}\" created`,\n 'success',\n 3000\n );\n this.closeCreateDialog();\n await this.loadData();\n } else {\n // Get the detailed error message from LatestResult\n const errorMessage = list.LatestResult?.Message || 'Unknown error occurred';\n const action = isEditing ? 'update' : 'create';\n console.error(`Failed to ${action} list:`, list.LatestResult);\n this.notificationService.CreateSimpleNotification(\n `Failed to ${action} list: ${errorMessage}`,\n 'error',\n 6000\n );\n }\n } catch (error) {\n console.error('Error saving list:', error);\n const errorMessage = error instanceof Error ? error.message : String(error);\n this.notificationService.CreateSimpleNotification(`Error saving list: ${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 'My Lists';\n }\n\n async GetResourceIconClass(_data: ResourceData): Promise<string> {\n return 'fa-solid fa-list-check';\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"lists-my-lists-resource.component.js","sourceRoot":"","sources":["../../../src/Lists/components/lists-my-lists-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAA4C,YAAY,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,aAAa,EAAG,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAgB,oBAAoB,EAA4C,MAAM,+BAA+B,CAAC;AAC7H,OAAO,EAAY,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC5F,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;;;;;;;;;;;IA6CrG,+BAA+B;IAC7B,iCAA+D;IACjE,iBAAM;;;;IAKN,0CAM6B;IAA3B,mMAAU,sBAAe,KAAC;IAExB,AADF,+BAAkC,cACN;IACxB,wBAAwC;IACxC,4BAAM;IAAA,6CAA6B;IACrC,AADqC,iBAAO,EACtC;IACN,+BAA0B;IACxB,wBAAwC;IACxC,4BAAM;IAAA,wCAAwB;IAChC,AADgC,iBAAO,EACjC;IACN,gCAA0B;IACxB,yBAAwC;IACxC,6BAAM;IAAA,2CAA0B;IAGtC,AADE,AADE,AADkC,iBAAO,EACnC,EACF,EACS;;;;IAKjB,0CAK6B;IAA3B,mMAAU,oBAAa,KAAC;IAL1B,iBAK6B;;;IAH3B,iDAA4B;;;IA+BtB,wBAAyG;;;IAAz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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0WP,iBA0pBY,iBAAiB,CAAC,IAAI;;kBAsEpC,YAAY;mBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;kBAWzC,YAAY;mBAAC,yBAAyB;;kFA/E5B,oBAAoB","sourcesContent":["import { Component, ViewEncapsulation, ChangeDetectorRef, OnDestroy, ElementRef, HostListener } from '@angular/core';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { ResourceData } from '@memberjunction/core-entities';\nimport { MJListEntity, MJListEntityExtended, MJListCategoryEntity, MJListDetailEntity } from '@memberjunction/core-entities';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { Subject } from 'rxjs';\nimport { TabService } from '@memberjunction/ng-base-application';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { validateEnumParam, validateStringParam } from '../../shared/agent-tool-validation';\nimport { buildListBrowseAgentContext, resolveNamedRecord, buildNotFoundError } from '../lists-agent-context';\ninterface ListViewModel {\n list: MJListEntity;\n itemCount: number;\n entityName: string;\n}\n\ninterface CategoryNode {\n category: MJListCategoryEntity | null;\n lists: ListViewModel[];\n children: CategoryNode[];\n isExpanded: boolean;\n}\n\n@RegisterClass(BaseResourceComponent, 'ListsMyListsResource')\n@Component({\n standalone: false,\n selector: 'mj-lists-my-lists-resource',\n template: `\n <mj-page-layout>\n <mj-page-header\n Title=\"My Lists\"\n Icon=\"fa-solid fa-list-check\"\n Subtitle=\"Lists you've created or have access to\">\n <div meta>\n <mj-stat-badge [Count]=\"filteredLists.length\" [Total]=\"allLists.length\" Label=\"lists\"></mj-stat-badge>\n </div>\n <div actions>\n <button mjButton variant=\"primary\" size=\"sm\" (click)=\"createNewList()\">\n <i class=\"fa-solid fa-plus\"></i> <span class=\"action-btn-label\">New List</span>\n </button>\n </div>\n <div toolbar>\n <mj-page-search\n Placeholder=\"Search lists...\"\n [Value]=\"searchTerm\"\n (ValueChange)=\"onSearchChange($event)\">\n </mj-page-search>\n </div>\n </mj-page-header>\n\n <mj-page-body>\n\n <!-- Loading State -->\n @if (isLoading) {\n <div class=\"loading-container\">\n <mj-loading text=\"Loading lists...\" size=\"medium\"></mj-loading>\n </div>\n }\n \n <!-- Empty State -->\n @if (!isLoading && filteredLists.length === 0 && !searchTerm) {\n <mj-empty-state Size=\"large\"\n Icon=\"fa-solid fa-list-check\"\n Title=\"No Lists Yet\"\n Message=\"Lists help you organize and track groups of records across your data.\"\n ActionText=\"Create Your First List\"\n ActionIcon=\"fa-solid fa-plus\"\n (Action)=\"createNewList()\">\n <div class=\"empty-state-features\">\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Group records from any entity</span>\n </div>\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Organize with categories</span>\n </div>\n <div class=\"feature-item\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <span>Quick access from any view</span>\n </div>\n </div>\n </mj-empty-state>\n }\n\n <!-- No Results State -->\n @if (!isLoading && filteredLists.length === 0 && searchTerm) {\n <mj-empty-state Variant=\"no-results\"\n Title=\"No Results Found\"\n [Message]=\"NoResultsMessage\"\n ActionText=\"Clear search\"\n ActionIcon=\"fa-solid fa-rotate-left\"\n (Action)=\"clearSearch()\" />\n }\n \n <!-- Lists Grid -->\n @if (!isLoading && filteredLists.length > 0) {\n <div class=\"lists-content\">\n <!-- View Toggle -->\n <div class=\"view-controls\">\n <button\n class=\"view-toggle\"\n [class.active]=\"viewMode === 'grid'\"\n (click)=\"setViewMode('grid')\"\n title=\"Grid view\">\n <i class=\"fa-solid fa-grip\"></i>\n </button>\n <button\n class=\"view-toggle\"\n [class.active]=\"viewMode === 'list'\"\n (click)=\"setViewMode('list')\"\n title=\"List view\">\n <i class=\"fa-solid fa-list\"></i>\n </button>\n <span class=\"list-count\">{{filteredLists.length}} list{{filteredLists.length !== 1 ? 's' : ''}}</span>\n </div>\n <!-- Category Tree View -->\n @if (viewMode === 'list') {\n <div class=\"category-tree\">\n @for (node of categoryTree; track node) {\n <ng-container *ngTemplateOutlet=\"categoryNodeTemplate; context: { node: node, depth: 0 }\"></ng-container>\n }\n </div>\n }\n <!-- Grid View -->\n @if (viewMode === 'grid') {\n <div class=\"lists-grid\" role=\"list\" aria-label=\"My Lists\">\n @for (item of filteredLists; track item) {\n <div\n class=\"list-card\"\n (click)=\"openList(item.list)\"\n (keydown.enter)=\"openList(item.list)\"\n (keydown.space)=\"openList(item.list); $event.preventDefault()\"\n tabindex=\"0\"\n role=\"listitem\"\n [attr.aria-label]=\"item.list.Name + ' - ' + item.entityName + ' - ' + item.itemCount + ' items'\">\n <div class=\"card-header\">\n <div class=\"card-icon\" [style.background-color]=\"getEntityColor(item.list.Entity)\" aria-hidden=\"true\">\n <i [class]=\"getEntityIcon(item.list.Entity)\"></i>\n </div>\n <div class=\"card-menu\">\n <button class=\"menu-btn\" (click)=\"openListMenu($event, item.list)\" [attr.aria-label]=\"'More options for ' + item.list.Name\">\n <i class=\"fa-solid fa-ellipsis-v\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n <div class=\"card-body\">\n <h3 class=\"card-title\">{{item.list.Name}}</h3>\n @if (item.list.Description) {\n <p class=\"card-description\">{{item.list.Description}}</p>\n }\n <div class=\"card-meta\">\n <span class=\"meta-item\">\n <i class=\"fa-solid fa-database\"></i>\n {{item.entityName}}\n </span>\n <span class=\"meta-item\">\n <i class=\"fa-solid fa-hashtag\"></i>\n {{item.itemCount}} item{{item.itemCount !== 1 ? 's' : ''}}\n </span>\n </div>\n </div>\n <div class=\"card-footer\">\n @if (item.list.CategoryID) {\n <span class=\"category-tag\">\n <i class=\"fa-solid fa-folder\"></i>\n {{getCategoryName(item.list.CategoryID)}}\n </span>\n }\n <span class=\"date-info\">Updated {{formatDate(item.list.__mj_UpdatedAt)}}</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n \n <!-- Category Node Template -->\n <ng-template #categoryNodeTemplate let-node=\"node\" let-depth=\"depth\">\n <div class=\"category-section\" [style.margin-left.px]=\"depth * 20\">\n <!-- Category Header -->\n @if (node.category) {\n <div\n class=\"category-header\"\n (click)=\"toggleCategory(node)\">\n <i [class]=\"node.isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"></i>\n <i class=\"fa-solid fa-folder\" [class.fa-folder-open]=\"node.isExpanded\"></i>\n <span class=\"category-name\">{{node.category.Name}}</span>\n <span class=\"category-count\">{{getListCountInCategory(node)}}</span>\n </div>\n }\n \n <!-- Uncategorized Header -->\n @if (!node.category && node.lists.length > 0) {\n <div\n class=\"category-header uncategorized\"\n (click)=\"toggleCategory(node)\">\n <i [class]=\"node.isExpanded ? 'fa-solid fa-chevron-down' : 'fa-solid fa-chevron-right'\"></i>\n <i class=\"fa-solid fa-inbox\"></i>\n <span class=\"category-name\">Uncategorized</span>\n <span class=\"category-count\">{{node.lists.length}}</span>\n </div>\n }\n \n <!-- Lists in this category -->\n @if (node.isExpanded) {\n <div class=\"category-lists\" role=\"list\">\n @for (item of node.lists; track item) {\n <div\n class=\"list-row\"\n (click)=\"openList(item.list)\"\n (keydown.enter)=\"openList(item.list)\"\n (keydown.space)=\"openList(item.list); $event.preventDefault()\"\n tabindex=\"0\"\n role=\"listitem\"\n [attr.aria-label]=\"item.list.Name + ' - ' + item.entityName + ' - ' + item.itemCount + ' items'\">\n <div class=\"list-icon\" [style.background-color]=\"getEntityColor(item.list.Entity)\" aria-hidden=\"true\">\n <i [class]=\"getEntityIcon(item.list.Entity)\"></i>\n </div>\n <div class=\"list-info\">\n <span class=\"list-name\">{{item.list.Name}}</span>\n <span class=\"list-meta\">{{item.entityName}} · {{item.itemCount}} items</span>\n </div>\n <div class=\"list-actions\">\n <button mjButton variant=\"flat\" size=\"sm\" (click)=\"openListMenu($event, item.list)\" [attr.aria-label]=\"'More options for ' + item.list.Name\">\n <i class=\"fa-solid fa-ellipsis-v\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n }\n </div>\n }\n \n <!-- Child categories -->\n @if (node.isExpanded) {\n @for (child of node.children; track child) {\n <ng-container *ngTemplateOutlet=\"categoryNodeTemplate; context: { node: child, depth: depth + 1 }\"></ng-container>\n }\n }\n </div>\n </ng-template>\n \n <!-- Context Menu (native) -->\n @if (showContextMenu) {\n <div class=\"context-menu-overlay\" (click)=\"closeContextMenu()\"></div>\n }\n @if (showContextMenu) {\n <div class=\"context-menu\" [style.top.px]=\"contextMenuY\" [style.left.px]=\"contextMenuX\">\n <button class=\"menu-item\" (click)=\"editList()\">\n <i class=\"fa-solid fa-pen\"></i>\n Edit\n </button>\n <button class=\"menu-item\" (click)=\"duplicateList()\">\n <i class=\"fa-solid fa-copy\"></i>\n Duplicate\n </button>\n @if (CanDeleteSelectedList) {\n <div class=\"menu-divider\"></div>\n <button class=\"menu-item danger\" (click)=\"confirmDeleteList()\">\n <i class=\"fa-solid fa-trash\"></i>\n Delete\n </button>\n }\n </div>\n }\n \n <!-- Create/Edit List Dialog (native modal) -->\n @if (showCreateDialog) {\n <div class=\"modal-overlay\" (click)=\"closeCreateDialog()\"></div>\n }\n @if (showCreateDialog) {\n <div class=\"modal-dialog\">\n <div class=\"modal-header\">\n <h3>{{editingList ? 'Edit List' : 'Create New List'}}</h3>\n <button class=\"modal-close\" (click)=\"closeCreateDialog()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"form-group\">\n <label>Name *</label>\n <input\n type=\"text\"\n [(ngModel)]=\"newListName\"\n placeholder=\"Enter list name\"\n class=\"form-input\" />\n </div>\n <div class=\"form-group\">\n <label>Description</label>\n <textarea\n [(ngModel)]=\"newListDescription\"\n placeholder=\"Optional description\"\n class=\"form-input\"\n rows=\"3\"></textarea>\n </div>\n <div class=\"form-group\">\n <label>Entity *</label>\n <div class=\"custom-select-wrapper\">\n <input\n #entityInput\n type=\"text\"\n [(ngModel)]=\"entitySearchTerm\"\n (ngModelChange)=\"filterEntities($event)\"\n (focus)=\"openEntityDropdown(entityInput)\"\n placeholder=\"Search and select an entity\"\n class=\"form-input\"\n [disabled]=\"!!editingList\" />\n </div>\n </div>\n <div class=\"form-group\">\n <label>Category</label>\n <select [(ngModel)]=\"selectedCategoryId\" class=\"form-input\">\n <option [ngValue]=\"null\">No category</option>\n @for (cat of flatCategories; track cat) {\n <option [ngValue]=\"cat.ID\">{{cat.displayName}}</option>\n }\n </select>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button\n class=\"btn-primary\"\n (click)=\"saveList()\"\n [disabled]=\"!newListName || !selectedEntityId || isSaving\">\n @if (isSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n {{isSaving ? 'Saving...' : (editingList ? 'Save' : 'Create')}}\n </button>\n <button class=\"btn-secondary\" (click)=\"closeCreateDialog()\" [disabled]=\"isSaving\">Cancel</button>\n </div>\n </div>\n }\n \n <!-- Delete Confirmation Dialog -->\n @if (showDeleteConfirm) {\n <div class=\"modal-overlay\" (click)=\"cancelDelete()\"></div>\n }\n @if (showDeleteConfirm) {\n <div class=\"modal-dialog confirm-dialog\">\n <div class=\"modal-header\">\n <h3>Delete List</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>Are you sure you want to delete \"<strong>{{deleteListName}}</strong>\"?</p>\n <p class=\"warning-text\">This will also remove all items in the list.</p>\n </div>\n <div class=\"modal-footer\">\n <button class=\"btn-danger\" (click)=\"deleteList()\">\n @if (isDeleting) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n {{isDeleting ? 'Deleting...' : 'Delete'}}\n </button>\n <button class=\"btn-secondary\" (click)=\"cancelDelete()\">Cancel</button>\n </div>\n </div>\n }\n \n <!-- Entity Dropdown Portal (fixed positioning) -->\n @if (showEntityDropdown && !editingList) {\n <div\n class=\"entity-dropdown-portal\"\n [style.top.px]=\"entityDropdownPosition.top\"\n [style.left.px]=\"entityDropdownPosition.left\"\n [style.width.px]=\"entityDropdownPosition.width\"\n [class.dropdown-above]=\"entityDropdownPosition.openAbove\">\n <div class=\"entity-dropdown-content\" [class.open-above]=\"entityDropdownPosition.openAbove\">\n @for (entity of filteredEntities; track entity) {\n <div\n class=\"dropdown-item\"\n (mousedown)=\"selectEntity(entity); $event.preventDefault()\">\n {{entity.DisplayName}}\n </div>\n }\n @if (filteredEntities.length === 0) {\n <div class=\"dropdown-empty\">\n No entities found\n </div>\n }\n </div>\n </div>\n }\n </mj-page-body>\n </mj-page-layout>\n `,\n styles: [`\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n /* Loading */\n .loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n }\n\n /* Onboarding feature checklist — projected into <mj-empty-state>. */\n .empty-state-features {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n margin: var(--mj-space-5) 0 var(--mj-space-2);\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: var(--mj-text-secondary);\n }\n\n .feature-item i {\n font-size: 14px !important;\n color: var(--mj-status-success) !important;\n }\n\n /* Content */\n .lists-content {\n flex: 1;\n overflow-y: auto;\n padding: 16px 24px;\n }\n\n .view-controls {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 16px;\n }\n\n .view-toggle {\n padding: 8px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: all 0.2s;\n }\n\n .view-toggle:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .view-toggle.active {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n }\n\n .list-count {\n margin-left: auto;\n color: var(--mj-text-muted);\n font-size: 14px;\n }\n\n /* Grid View */\n .lists-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));\n gap: 16px;\n }\n\n .list-card {\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n box-shadow: var(--mj-shadow-sm);\n overflow: hidden;\n cursor: pointer;\n transition: transform 0.2s, box-shadow 0.2s, outline 0.1s;\n outline: 2px solid transparent;\n }\n\n .list-card:hover {\n transform: translateY(-2px);\n box-shadow: var(--mj-shadow-md);\n }\n\n .list-card:focus {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n }\n\n .list-card:focus:not(:focus-visible) {\n outline: none;\n }\n\n .list-card:focus-visible {\n outline: 2px solid var(--mj-brand-primary);\n outline-offset: 2px;\n }\n\n .card-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n padding: 16px 16px 0;\n }\n\n .card-icon {\n width: 40px;\n height: 40px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-inverse);\n font-size: 18px;\n }\n\n .menu-btn {\n background: none;\n border: none;\n padding: 4px 8px;\n color: var(--mj-text-muted);\n cursor: pointer;\n border-radius: 4px;\n }\n\n .menu-btn:hover {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n }\n\n .card-body {\n padding: 12px 16px;\n }\n\n .card-title {\n margin: 0 0 4px;\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .card-description {\n margin: 0 0 12px;\n font-size: 13px;\n color: var(--mj-text-secondary);\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .card-meta {\n display: flex;\n gap: 16px;\n }\n\n .meta-item {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .card-footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 12px 16px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n }\n\n .category-tag {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n padding: 2px 8px;\n border-radius: 4px;\n }\n\n .date-info {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n /* Category Tree */\n .category-tree {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n\n .category-section {\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n overflow: hidden;\n }\n\n .category-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px;\n cursor: pointer;\n transition: background 0.2s;\n }\n\n .category-header:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .category-header i:first-child {\n width: 16px;\n text-align: center;\n color: var(--mj-text-muted);\n }\n\n .category-header .fa-folder,\n .category-header .fa-folder-open {\n color: var(--mj-status-warning);\n }\n\n .category-header.uncategorized .fa-inbox {\n color: var(--mj-text-muted);\n }\n\n .category-name {\n flex: 1;\n font-weight: 500;\n color: var(--mj-text-primary);\n }\n\n .category-count {\n font-size: 12px;\n color: var(--mj-text-muted);\n background: var(--mj-bg-surface-sunken);\n padding: 2px 8px;\n border-radius: 10px;\n }\n\n .category-lists {\n border-top: 1px solid var(--mj-border-default);\n }\n\n .list-row {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px 12px 40px;\n cursor: pointer;\n transition: background 0.2s;\n outline: none;\n }\n\n .list-row:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .list-row:focus {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n }\n\n .list-row:focus-visible {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n box-shadow: inset 3px 0 0 var(--mj-brand-primary);\n }\n\n .list-icon {\n width: 32px;\n height: 32px;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-inverse);\n font-size: 14px;\n flex-shrink: 0;\n }\n\n .list-info {\n flex: 1;\n min-width: 0;\n }\n\n .list-name {\n display: block;\n font-weight: 500;\n color: var(--mj-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .list-meta {\n font-size: 12px;\n color: var(--mj-text-muted);\n }\n\n .list-actions {\n display: flex;\n gap: 4px;\n }\n\n .action-btn {\n background: none;\n border: none;\n padding: 4px 8px;\n color: var(--mj-text-muted);\n cursor: pointer;\n border-radius: 4px;\n opacity: 0;\n transition: opacity 0.2s;\n }\n\n .list-row:hover .action-btn {\n opacity: 1;\n }\n\n .action-btn:hover {\n background: var(--mj-border-default);\n color: var(--mj-text-secondary);\n }\n\n /* Context Menu (native) */\n .context-menu-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n }\n\n .context-menu {\n position: fixed;\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n box-shadow: var(--mj-shadow-md);\n min-width: 160px;\n padding: 4px 0;\n z-index: 1000;\n }\n\n .menu-item {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 10px 16px;\n background: none;\n border: none;\n text-align: left;\n font-size: 14px;\n color: var(--mj-text-primary);\n cursor: pointer;\n transition: background 0.15s;\n }\n\n .menu-item:hover {\n background: var(--mj-bg-surface-sunken);\n }\n\n .menu-item.danger {\n color: var(--mj-status-error);\n }\n\n .menu-item.danger:hover {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n }\n\n .menu-divider {\n height: 1px;\n background: var(--mj-border-default);\n margin: 4px 0;\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: var(--mj-bg-overlay);\n z-index: 1000;\n }\n\n .modal-dialog {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: var(--mj-bg-surface-card);\n border-radius: 12px;\n box-shadow: var(--mj-shadow-lg);\n width: 500px;\n max-width: 90vw;\n max-height: 90vh;\n overflow: hidden;\n z-index: 1001;\n }\n\n .confirm-dialog {\n width: 400px;\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 var(--mj-border-default);\n }\n\n .modal-header h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n }\n\n .modal-close {\n background: none;\n border: none;\n padding: 4px 8px;\n color: var(--mj-text-muted);\n cursor: pointer;\n border-radius: 4px;\n }\n\n .modal-close:hover {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n }\n\n .modal-body {\n padding: 20px;\n max-height: 60vh;\n overflow-y: auto;\n }\n\n .modal-body p {\n margin: 0 0 8px;\n color: var(--mj-text-primary);\n }\n\n .warning-text {\n color: var(--mj-status-error) !important;\n font-size: 13px;\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 var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n }\n\n .btn-primary {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\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-primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n }\n\n .btn-primary:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n .btn-secondary {\n padding: 10px 20px;\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 14px;\n cursor: pointer;\n transition: background 0.2s;\n }\n\n .btn-secondary:hover:not(:disabled) {\n background: var(--mj-bg-surface-sunken);\n }\n\n .btn-danger {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n background: var(--mj-status-error);\n color: var(--mj-text-inverse);\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-danger:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 85%, black);\n }\n\n /* Form Styles */\n .form-group {\n margin-bottom: 16px;\n }\n\n .form-group:last-child {\n margin-bottom: 0;\n }\n\n .form-group label {\n display: block;\n margin-bottom: 6px;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n }\n\n .form-input {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 14px;\n transition: border-color 0.2s, box-shadow 0.2s;\n box-sizing: border-box;\n }\n\n .form-input:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n\n .form-input:disabled {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n }\n\n textarea.form-input {\n resize: vertical;\n min-height: 80px;\n }\n\n select.form-input {\n cursor: pointer;\n }\n\n .custom-select-wrapper {\n position: relative;\n }\n\n /* Portal Dropdown - Fixed positioning to escape modal z-index */\n .entity-dropdown-portal {\n position: fixed;\n z-index: 10002; /* Above modal (1001) */\n }\n\n .entity-dropdown-content {\n max-height: 200px;\n overflow-y: auto;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n box-shadow: var(--mj-shadow-md);\n }\n\n .entity-dropdown-content.open-above {\n position: absolute;\n bottom: 0;\n }\n\n .dropdown-item {\n padding: 10px 12px;\n cursor: pointer;\n transition: background 0.15s;\n font-size: 14px;\n color: var(--mj-text-primary);\n }\n\n .dropdown-item:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n }\n\n .dropdown-item:first-child {\n border-radius: 6px 6px 0 0;\n }\n\n .dropdown-item:last-child {\n border-radius: 0 0 6px 6px;\n }\n\n .dropdown-empty {\n padding: 10px 12px;\n color: var(--mj-text-muted);\n font-style: italic;\n }\n\n /* Responsive */\n @media (max-width: 768px) {\n .lists-header {\n flex-direction: column;\n gap: 16px;\n align-items: stretch;\n }\n\n .header-actions {\n flex-direction: column;\n }\n\n .search-box input {\n width: 100%;\n }\n\n .btn-create {\n width: 100%;\n justify-content: center;\n }\n\n .lists-grid {\n grid-template-columns: 1fr;\n }\n\n .modal-dialog {\n width: 95vw;\n }\n }\n `],\n encapsulation: ViewEncapsulation.None\n})\nexport class ListsMyListsResource extends BaseResourceComponent implements OnDestroy {\n protected override destroy$ = new Subject<void>();\n\n isLoading = true;\n searchTerm = '';\n viewMode: 'grid' | 'list' = 'grid';\n\n allLists: ListViewModel[] = [];\n filteredLists: ListViewModel[] = [];\n categories: MJListCategoryEntity[] = [];\n categoryTree: CategoryNode[] = [];\n flatCategories: Array<{ ID: string | null; displayName: string }> = [];\n availableEntities: Array<{ ID: string; Name: string; DisplayName: string }> = [];\n filteredEntities: Array<{ ID: string; Name: string; DisplayName: string }> = [];\n\n // Context menu\n showContextMenu = false;\n contextMenuX = 0;\n contextMenuY = 0;\n selectedContextList: MJListEntity | null = null;\n\n /**\n * Whether the current user may DELETE the context-menu's list — the same shared ownership rule\n * the server enforces (owner, or a Developer/Integration user). This \"My Lists\" view is\n * owner-scoped, so for the standard case it's the owner and resolves true; the gate makes it\n * correct-by-construction (and consistent with the Browse view) rather than an unconditional button.\n */\n public get CanDeleteSelectedList(): boolean {\n const list = this.selectedContextList;\n if (!list) {\n return false;\n }\n return MJListEntityExtended.UserCanDelete(list.UserID, this.ProviderToUse.CurrentUser);\n }\n\n // Create/Edit dialog\n showCreateDialog = false;\n editingList: MJListEntity | null = null;\n newListName = '';\n newListDescription = '';\n selectedEntityId = '';\n selectedCategoryId: string | null = null;\n entitySearchTerm = '';\n showEntityDropdown = false;\n entityDropdownPosition = { top: 0, left: 0, width: 0, openAbove: false };\n\n // Delete confirmation\n showDeleteConfirm = false;\n deleteListName = '';\n listToDelete: MJListEntity | null = null;\n\n // Operation states\n isSaving = false;\n isDeleting = false;\n\n private categoryMap: Map<string, MJListCategoryEntity> = new Map();\n private entityColorMap: Map<string, string> = new Map();\n private entityIconMap: Map<string, string> = new Map();\n\n constructor(\n private cdr: ChangeDetectorRef,\n private tabService: TabService,\n private notificationService: MJNotificationService,\n private elementRef: ElementRef\n ) {\n super();\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent) {\n // Close entity dropdown when clicking outside the input or dropdown\n if (this.showEntityDropdown) {\n const target = event.target as HTMLElement;\n if (!target.closest('.custom-select-wrapper') && !target.closest('.entity-dropdown-portal')) {\n this.showEntityDropdown = false;\n }\n }\n }\n\n @HostListener('document:keydown.escape')\n onEscapeKey() {\n if (this.showContextMenu) {\n this.closeContextMenu();\n }\n if (this.showCreateDialog) {\n this.closeCreateDialog();\n }\n if (this.showDeleteConfirm) {\n this.cancelDelete();\n }\n }\n\n async ngOnInit() {\n super.ngOnInit();\n await this.loadData();\n this.registerAgentTools();\n this.publishAgentContext();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // ================================================================\n // AI Agent Context & Client Tools\n //\n // SAFETY BOUNDARY: SAFE (open / search / view) operations plus ONE\n // bounded-mutation tool (CreateList) that opens the dialog-validated\n // create flow. INTENTIONALLY EXCLUDED — must NOT be wired in:\n // - EditList (editList) — mutates an existing record\n // - DeleteList (confirmDeleteList) — destructive\n // ================================================================\n\n /** Report the My-Lists surface's salient state to the AI agent. */\n private publishAgentContext(): void {\n this.navigationService.SetAgentContext(this, buildListBrowseAgentContext({\n SearchTerm: this.searchTerm,\n ViewMode: this.viewMode,\n AllListCount: this.allLists.length,\n FilteredListCount: this.filteredLists.length,\n // Deep context: the NAMES of the user's currently-visible lists (bounded),\n // so the agent can open them by name rather than an opaque GUID.\n VisibleListNames: this.filteredLists.map(i => i.list.Name),\n }));\n }\n\n /**\n * Resolve an agent-supplied reference (a list ID or NAME, exact or partial) to\n * one of the user's loaded lists via the pure {@link resolveNamedRecord} helper.\n */\n private resolveMyListItem(input: string): ListViewModel | null {\n const match = resolveNamedRecord(input, this.allLists.map(i => ({ ID: i.list.ID, Name: i.list.Name })));\n if (!match) {\n return null;\n }\n return this.allLists.find(i => UUIDsEqual(i.list.ID, match.ID)) ?? null;\n }\n\n /** Register the My-Lists surface's agent-actionable tools. */\n private registerAgentTools(): void {\n this.navigationService.SetAgentClientTools(this, [\n {\n Name: 'OpenList',\n Description: 'Open one of my lists in a new tab by its ID or name. Pass the list name the user says (see VisibleListNames) — the tool resolves an exact ID, an exact name, or a partial name match.',\n ParameterSchema: { type: 'object', properties: { list: { type: 'string', description: 'The list ID or name to open' }, listId: { type: 'string', description: 'Deprecated alias for \"list\".' } } },\n Handler: async (params: Record<string, unknown>) => {\n const check = validateStringParam(params['list'] ?? params['listId'], 'list');\n if (!check.ok) return check.result;\n const item = this.resolveMyListItem(check.value);\n if (!item) return { Success: false, ErrorMessage: buildNotFoundError(check.value, this.allLists.map(i => ({ ID: i.list.ID, Name: i.list.Name })), 'list') };\n this.openList(item.list);\n return { Success: true, Data: { listName: item.list.Name } };\n },\n },\n {\n Name: 'SearchLists',\n Description: 'Set the search term that filters my lists.',\n ParameterSchema: { type: 'object', properties: { searchTerm: { type: 'string' } }, required: ['searchTerm'] },\n Handler: async (params: Record<string, unknown>) => {\n const check = validateStringParam(params['searchTerm'], 'searchTerm');\n if (!check.ok) return check.result;\n this.searchTerm = check.value;\n this.onSearchChange(check.value);\n this.publishAgentContext();\n return { Success: true, Data: { resultCount: this.filteredLists.length } };\n },\n },\n {\n Name: 'SetViewMode',\n Description: 'Set the view mode: \"grid\" or \"list\".',\n ParameterSchema: { type: 'object', properties: { mode: { type: 'string', enum: ['grid', 'list'] } }, required: ['mode'] },\n Handler: async (params: Record<string, unknown>) => {\n const check = validateEnumParam(params['mode'], ['grid', 'list'] as const, 'mode');\n if (!check.ok) return check.result;\n this.setViewMode(check.value);\n return { Success: true };\n },\n },\n {\n // BOUNDED MUTATION: opens the dialog-validated create flow only.\n Name: 'CreateList',\n Description: 'Open the \"Create New List\" dialog. Nothing is saved until the user confirms the name and entity.',\n ParameterSchema: { type: 'object', properties: {} },\n Handler: async () => {\n this.createNewList();\n return { Success: true };\n },\n },\n ]);\n }\n\n async loadData() {\n this.isLoading = true;\n\n try {\n const md = this.ProviderToUse;\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const userId = md.CurrentUser?.ID;\n\n if (!userId) {\n console.error('No current user');\n return;\n }\n\n // Load lists and categories in parallel; item counts follow as a\n // batched set of count_only queries (index-seek COUNTs server-side)\n // instead of transferring every membership row to the client.\n const [listsResult, categoriesResult] = await rv.RunViews([\n {\n EntityName: 'MJ: Lists',\n ExtraFilter: `UserID = '${userId}'`,\n OrderBy: 'Name',\n ResultType: 'entity_object'\n },\n {\n EntityName: 'MJ: List Categories',\n OrderBy: 'Name',\n ResultType: 'entity_object'\n }\n ]);\n\n if (!listsResult.Success || !categoriesResult.Success) {\n console.error('Failed to load lists data');\n return;\n }\n\n const lists = listsResult.Results as MJListEntity[];\n this.categories = categoriesResult.Results as MJListCategoryEntity[];\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 // Count items per list — one batched round trip\n const itemCounts = new Map<string, number>();\n if (lists.length > 0) {\n const countResults = await rv.RunViews(lists.map(list => ({\n EntityName: 'MJ: List Details',\n ExtraFilter: `ListID = '${list.ID}'`,\n ResultType: 'count_only' as const\n })));\n countResults.forEach((res, idx) => {\n itemCounts.set(lists[idx].ID, res.Success ? res.TotalRowCount : 0);\n });\n }\n\n // Build entity info\n const entities = md.Entities;\n for (const entity of entities) {\n this.entityColorMap.set(entity.Name, this.generateEntityColor(entity.Name));\n this.entityIconMap.set(entity.Name, entity.Icon || 'fa-solid fa-table');\n }\n\n // Build list view models\n this.allLists = lists.map(list => ({\n list,\n itemCount: itemCounts.get(list.ID) || 0,\n entityName: list.Entity || 'Unknown'\n }));\n\n // Build available entities for dropdown\n this.availableEntities = entities\n .filter(e => e.IncludeInAPI)\n .map(e => ({ ID: e.ID, Name: e.Name, DisplayName: e.DisplayNameOrName }))\n .sort((a, b) => a.DisplayName.localeCompare(b.DisplayName));\n this.filteredEntities = [...this.availableEntities];\n\n // Build flat categories for dropdown\n this.flatCategories = this.buildFlatCategories(this.categories);\n\n this.applyFilter();\n this.buildCategoryTree();\n } catch (error) {\n console.error('Error loading lists:', error);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n private buildFlatCategories(categories: MJListCategoryEntity[]): Array<{ ID: string; displayName: string }> {\n const result: Array<{ ID: string; displayName: string }> = [];\n const topLevel = categories.filter(c => !c.ParentID);\n\n const processCategory = (cat: MJListCategoryEntity, level: number) => {\n const indent = '\\u00A0\\u00A0'.repeat(level);\n result.push({ ID: cat.ID, displayName: `${indent}${cat.Name}` });\n\n const children = categories.filter(c => UUIDsEqual(c.ParentID, cat.ID));\n for (const child of children) {\n processCategory(child, level + 1);\n }\n };\n\n for (const cat of topLevel) {\n processCategory(cat, 0);\n }\n\n return result;\n }\n\n private buildCategoryTree() {\n const rootNodes: CategoryNode[] = [];\n const categoryNodes = new Map<string, CategoryNode>();\n\n // Create nodes for all categories\n for (const cat of this.categories) {\n categoryNodes.set(cat.ID, {\n category: cat,\n lists: [],\n children: [],\n isExpanded: true\n });\n }\n\n // Build tree structure\n for (const cat of this.categories) {\n const node = categoryNodes.get(cat.ID)!;\n if (cat.ParentID && categoryNodes.has(cat.ParentID)) {\n categoryNodes.get(cat.ParentID)!.children.push(node);\n } else {\n rootNodes.push(node);\n }\n }\n\n // Assign lists to categories\n const uncategorizedLists: ListViewModel[] = [];\n for (const item of this.filteredLists) {\n if (item.list.CategoryID && categoryNodes.has(item.list.CategoryID)) {\n categoryNodes.get(item.list.CategoryID)!.lists.push(item);\n } else {\n uncategorizedLists.push(item);\n }\n }\n\n // Add uncategorized node if there are uncategorized lists\n if (uncategorizedLists.length > 0) {\n rootNodes.unshift({\n category: null,\n lists: uncategorizedLists,\n children: [],\n isExpanded: true\n });\n }\n\n this.categoryTree = rootNodes;\n }\n\n onSearchChange(_term: string) {\n this.applyFilter();\n this.buildCategoryTree();\n this.publishAgentContext();\n }\n\n /** Set the grid/list view mode and refresh agent context. */\n setViewMode(mode: 'grid' | 'list') {\n this.viewMode = mode;\n this.publishAgentContext();\n }\n\n clearSearch() {\n this.searchTerm = '';\n this.applyFilter();\n this.buildCategoryTree();\n }\n\n /** Message for the no-results empty state, echoing the active search term. */\n public get NoResultsMessage(): string {\n return `No lists match \"${this.searchTerm}\". Try a different search term or clear your search.`;\n }\n\n private applyFilter() {\n if (!this.searchTerm) {\n this.filteredLists = [...this.allLists];\n } else {\n const term = this.searchTerm.toLowerCase();\n this.filteredLists = this.allLists.filter(item =>\n item.list.Name.toLowerCase().includes(term) ||\n (item.list.Description && item.list.Description.toLowerCase().includes(term)) ||\n item.entityName.toLowerCase().includes(term)\n );\n }\n }\n\n toggleCategory(node: CategoryNode) {\n node.isExpanded = !node.isExpanded;\n }\n\n getListCountInCategory(node: CategoryNode): number {\n let count = node.lists.length;\n for (const child of node.children) {\n count += this.getListCountInCategory(child);\n }\n return count;\n }\n\n getCategoryName(categoryId: string): string {\n return this.categoryMap.get(categoryId)?.Name || 'Unknown';\n }\n\n getEntityColor(entityName: string): string {\n return this.entityColorMap.get(entityName) || '#607D8B';\n }\n\n getEntityIcon(entityName: string): string {\n return this.entityIconMap.get(entityName) || 'fa-solid fa-table';\n }\n\n private generateEntityColor(entityName: string): string {\n let hash = 0;\n for (let i = 0; i < entityName.length; i++) {\n hash = entityName.charCodeAt(i) + ((hash << 5) - hash);\n }\n const colors = [\n '#2196F3', '#4CAF50', '#FF9800', '#9C27B0', '#F44336',\n '#00BCD4', '#795548', '#607D8B', '#E91E63', '#3F51B5'\n ];\n return colors[Math.abs(hash) % colors.length];\n }\n\n formatDate(date: Date): string {\n if (!date) return '';\n const now = new Date();\n const d = new Date(date);\n const diffMs = now.getTime() - d.getTime();\n const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));\n\n if (diffDays === 0) return 'today';\n if (diffDays === 1) return 'yesterday';\n if (diffDays < 7) return `${diffDays} days ago`;\n if (diffDays < 30) return `${Math.floor(diffDays / 7)} weeks ago`;\n return d.toLocaleDateString();\n }\n\n openList(list: MJListEntity) {\n const appId = this.Data?.Configuration?.applicationId || '';\n this.tabService.OpenList(list.ID, list.Name, appId);\n }\n\n openListMenu(event: Event, list: MJListEntity) {\n event.stopPropagation();\n const mouseEvent = event as MouseEvent;\n this.selectedContextList = list;\n this.contextMenuX = mouseEvent.clientX;\n this.contextMenuY = mouseEvent.clientY;\n this.showContextMenu = true;\n }\n\n closeContextMenu() {\n this.showContextMenu = false;\n this.selectedContextList = null;\n }\n\n createNewList() {\n this.editingList = null;\n this.newListName = '';\n this.newListDescription = '';\n this.selectedEntityId = '';\n this.entitySearchTerm = '';\n this.selectedCategoryId = null;\n this.showEntityDropdown = false;\n this.showCreateDialog = true;\n }\n\n editList() {\n if (!this.selectedContextList) return;\n\n this.editingList = this.selectedContextList;\n this.newListName = this.selectedContextList.Name;\n this.newListDescription = this.selectedContextList.Description || '';\n this.selectedEntityId = this.selectedContextList.EntityID;\n this.entitySearchTerm = this.selectedContextList.Entity || '';\n this.selectedCategoryId = this.selectedContextList.CategoryID || null;\n this.showCreateDialog = true;\n this.closeContextMenu();\n }\n\n selectEntity(entity: { ID: string; Name: string; DisplayName: string }) {\n this.selectedEntityId = entity.ID;\n this.entitySearchTerm = entity.DisplayName;\n this.showEntityDropdown = false;\n }\n\n filterEntities(term: string) {\n const lowerTerm = term.toLowerCase();\n this.filteredEntities = this.availableEntities.filter(e =>\n e.DisplayName.toLowerCase().includes(lowerTerm) ||\n e.Name.toLowerCase().includes(lowerTerm)\n );\n // Ensure dropdown is visible while typing\n if (!this.showEntityDropdown && term) {\n this.showEntityDropdown = true;\n }\n // Clear selection when user modifies the search text\n this.selectedEntityId = '';\n }\n\n openEntityDropdown(inputElement: HTMLInputElement) {\n const rect = inputElement.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const dropdownHeight = 200; // estimated max height\n const spaceBelow = viewportHeight - rect.bottom;\n const openAbove = spaceBelow < dropdownHeight && rect.top > dropdownHeight;\n\n this.entityDropdownPosition = {\n top: openAbove ? rect.top - dropdownHeight : rect.bottom,\n left: rect.left,\n width: rect.width,\n openAbove\n };\n this.showEntityDropdown = true;\n this.filteredEntities = [...this.availableEntities];\n }\n\n closeEntityDropdown() {\n this.showEntityDropdown = false;\n }\n\n async duplicateList() {\n if (!this.selectedContextList) return;\n\n const listToDuplicate = this.selectedContextList;\n this.closeContextMenu();\n\n this.isLoading = true;\n this.cdr.detectChanges();\n\n try {\n const md = this.ProviderToUse;\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n\n const newList = await md.GetEntityObject<MJListEntity>('MJ: Lists');\n newList.Name = `${listToDuplicate.Name} (Copy)`;\n newList.Description = listToDuplicate.Description;\n newList.EntityID = listToDuplicate.EntityID;\n newList.CategoryID = listToDuplicate.CategoryID;\n newList.UserID = md.CurrentUser!.ID;\n\n const listSaved = await newList.Save();\n if (!listSaved) {\n this.notificationService.CreateSimpleNotification('Failed to duplicate list', 'error', 4000);\n return;\n }\n\n const itemsResult = await rv.RunView<MJListDetailEntity>({\n EntityName: 'MJ: List Details',\n ExtraFilter: `ListID = '${listToDuplicate.ID}'`,\n ResultType: 'entity_object'\n });\n\n if (itemsResult.Success && itemsResult.Results.length > 0) {\n let copiedCount = 0;\n for (const item of itemsResult.Results) {\n const newItem = await md.GetEntityObject<MJListDetailEntity>('MJ: List Details');\n newItem.ListID = newList.ID;\n newItem.RecordID = item.RecordID;\n newItem.Sequence = item.Sequence;\n const itemSaved = await newItem.Save();\n if (itemSaved) copiedCount++;\n }\n this.notificationService.CreateSimpleNotification(\n `List duplicated with ${copiedCount} item${copiedCount !== 1 ? 's' : ''}`,\n 'success',\n 3000\n );\n } else {\n this.notificationService.CreateSimpleNotification('List duplicated successfully', 'success', 3000);\n }\n\n await this.loadData();\n } catch (error) {\n console.error('Error duplicating list:', error);\n this.notificationService.CreateSimpleNotification('Error duplicating list. Please try again.', 'error', 4000);\n } finally {\n this.isLoading = false;\n this.cdr.detectChanges();\n }\n }\n\n confirmDeleteList() {\n if (!this.selectedContextList) return;\n this.listToDelete = this.selectedContextList;\n this.deleteListName = this.selectedContextList.Name;\n this.showDeleteConfirm = true;\n this.closeContextMenu();\n }\n\n cancelDelete() {\n this.showDeleteConfirm = false;\n this.listToDelete = null;\n this.deleteListName = '';\n }\n\n async deleteList() {\n if (!this.listToDelete) return;\n\n const listToDelete = this.listToDelete;\n const listName = listToDelete.Name;\n\n // Defense-in-depth: re-check the shared ownership rule before deleting (the server is the true\n // enforcement point, but this fails fast with a clean message).\n if (!MJListEntityExtended.UserCanDelete(listToDelete.UserID, this.ProviderToUse.CurrentUser)) {\n this.notificationService.CreateSimpleNotification(\n `You don't have permission to delete \"${listName}\".`, 'error', 6000,\n );\n return;\n }\n\n this.isDeleting = true;\n this.cdr.detectChanges();\n\n try {\n const deleted = await listToDelete.Delete();\n if (deleted) {\n this.notificationService.CreateSimpleNotification(`\"${listName}\" deleted`, 'success', 3000);\n } else {\n // Get the detailed error message from LatestResult\n const errorMessage = listToDelete.LatestResult?.Message || 'Unknown error occurred';\n console.error('Failed to delete list:', listToDelete.LatestResult);\n this.notificationService.CreateSimpleNotification(`Failed to delete list: ${errorMessage}`, 'error', 6000);\n }\n this.cancelDelete();\n await this.loadData();\n } catch (error) {\n console.error('Error deleting list:', error);\n const errorMessage = error instanceof Error ? error.message : String(error);\n this.notificationService.CreateSimpleNotification(`Error deleting list: ${errorMessage}`, 'error', 6000);\n } finally {\n this.isDeleting = false;\n this.cdr.detectChanges();\n }\n }\n\n closeCreateDialog() {\n this.showCreateDialog = false;\n this.editingList = null;\n this.showEntityDropdown = false;\n }\n\n async saveList() {\n this.isSaving = true;\n this.cdr.detectChanges();\n\n const isEditing = !!this.editingList;\n const listName = this.newListName;\n\n try {\n const md = this.ProviderToUse;\n let list: MJListEntity;\n\n if (this.editingList) {\n list = this.editingList;\n } else {\n list = await md.GetEntityObject<MJListEntity>('MJ: Lists');\n list.UserID = md.CurrentUser!.ID;\n list.EntityID = this.selectedEntityId;\n }\n\n list.Name = this.newListName;\n list.Description = this.newListDescription || null;\n list.CategoryID = this.selectedCategoryId || null;\n\n const saved = await list.Save();\n if (saved) {\n this.notificationService.CreateSimpleNotification(\n isEditing ? `\"${listName}\" updated` : `\"${listName}\" created`,\n 'success',\n 3000\n );\n this.closeCreateDialog();\n await this.loadData();\n } else {\n // Get the detailed error message from LatestResult\n const errorMessage = list.LatestResult?.Message || 'Unknown error occurred';\n const action = isEditing ? 'update' : 'create';\n console.error(`Failed to ${action} list:`, list.LatestResult);\n this.notificationService.CreateSimpleNotification(\n `Failed to ${action} list: ${errorMessage}`,\n 'error',\n 6000\n );\n }\n } catch (error) {\n console.error('Error saving list:', error);\n const errorMessage = error instanceof Error ? error.message : String(error);\n this.notificationService.CreateSimpleNotification(`Error saving list: ${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 'My Lists';\n }\n\n async GetResourceIconClass(_data: ResourceData): Promise<string> {\n return 'fa-solid fa-list-check';\n }\n}\n"]}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Framework-free + deterministic → unit-tested with no Angular.
|
|
10
10
|
*/
|
|
11
|
+
import { type OutcomeConfig } from '@memberjunction/predictive-studio-core';
|
|
11
12
|
/** A scored record in the at-risk list. */
|
|
12
13
|
export interface AtRiskRow {
|
|
13
14
|
recordId: string;
|
|
@@ -22,8 +23,14 @@ export interface AtRiskRow {
|
|
|
22
23
|
riskPct: number;
|
|
23
24
|
/** Predicted class label, when present (classification). */
|
|
24
25
|
class: string | null;
|
|
25
|
-
/** Risk band, for color. */
|
|
26
|
-
band: 'high' | 'medium' | 'low';
|
|
26
|
+
/** Risk band, for color / filtering. */
|
|
27
|
+
band: 'high' | 'medium' | 'low' | string;
|
|
28
|
+
/** Qualitative status label (e.g. "High", "Critical", "Low Risk"). */
|
|
29
|
+
status?: string;
|
|
30
|
+
/** Semantic badge color. */
|
|
31
|
+
badgeColor?: string;
|
|
32
|
+
/** Icon class. */
|
|
33
|
+
icon?: string;
|
|
27
34
|
/**
|
|
28
35
|
* Top signed per-record drivers behind THIS row's prediction (P1-5), humanized + one-hot-collapsed for
|
|
29
36
|
* display. `up: true` pushed the risk up, `false` down. Null when the model doesn't produce per-record
|
|
@@ -40,6 +47,8 @@ export interface RowDriver {
|
|
|
40
47
|
/** Whether this pushed the risk UP (value > 0) or down. */
|
|
41
48
|
up: boolean;
|
|
42
49
|
}
|
|
50
|
+
/** Parse + humanize the raw per-record `drivers` (post-preprocessing `feature`/`value`) into {@link RowDriver}s. */
|
|
51
|
+
export declare function parseRowDrivers(raw: unknown): RowDriver[] | null;
|
|
43
52
|
/**
|
|
44
53
|
* Build a human-readable label for a record from its (simple) row of the target entity — preferring a
|
|
45
54
|
* single `Name`, else `FirstName`+`LastName`, else `Email`, else any first non-empty string field.
|
|
@@ -51,8 +60,37 @@ export interface RunDetailLike {
|
|
|
51
60
|
recordId: string;
|
|
52
61
|
ResultPayload?: string | null;
|
|
53
62
|
}
|
|
63
|
+
/** Options for parsing predictions into at-risk rows. */
|
|
64
|
+
export interface ParseAtRiskOptions {
|
|
65
|
+
/**
|
|
66
|
+
* When true, the model predicts probability of a positive outcome (e.g. `P(Renewed)`).
|
|
67
|
+
* Churn / adverse risk is therefore inverted: `riskScore = 1.0 - score`.
|
|
68
|
+
* High score (0.99) -> Low Risk (1%, green). Low score (0.10) -> High Risk (90%, red).
|
|
69
|
+
*/
|
|
70
|
+
invertedRisk?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Configured outcome metadata for the model (labels, thresholds, colors, icons).
|
|
73
|
+
* When provided, `resolveScoreBand()` evaluates the dynamic band, status, badgeColor, and icon.
|
|
74
|
+
*/
|
|
75
|
+
outcomeConfig?: OutcomeConfig;
|
|
76
|
+
}
|
|
77
|
+
/** Result of detecting whether a model is a renewal model and what its output score represents. */
|
|
78
|
+
export interface RenewalPolarityResult {
|
|
79
|
+
isRenewalModel: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* True if `score` represents adverse lapse risk (P(Lapse) / Churn Risk), e.g. 0.01 = 1% risk.
|
|
82
|
+
* False if `score` represents positive outcome probability (P(Renewed)), e.g. 0.99 = 99% renewal chance.
|
|
83
|
+
*/
|
|
84
|
+
scoreIsLapseRisk: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Robustly inspects model metadata and sample scoring payloads to determine:
|
|
88
|
+
* 1. Whether this is a renewal/retention/churn model (`isRenewalModel`)
|
|
89
|
+
* 2. Whether the raw payload `score` represents adverse lapse risk (P(Lapse)) or positive outcome (P(Renewed))
|
|
90
|
+
*/
|
|
91
|
+
export declare function resolveRenewalPolarity(rawPayloads: Array<string | null | undefined>, targetVariable?: string | null, modelName?: string | null): RenewalPolarityResult;
|
|
54
92
|
/** Parse + rank the per-record predictions into the at-risk list (highest risk first). */
|
|
55
|
-
export declare function parseAtRiskRows(details: RunDetailLike[]): AtRiskRow[];
|
|
93
|
+
export declare function parseAtRiskRows(details: RunDetailLike[], options?: ParseAtRiskOptions): AtRiskRow[];
|
|
56
94
|
/**
|
|
57
95
|
* The top plain-language drivers for the whole prediction, from the model's global feature importance.
|
|
58
96
|
* Accepts the object form (`{"MembershipType=Student": 0.9, ...}`) or the array form
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"at-risk.view-models.d.ts","sourceRoot":"","sources":["../../src/PredictiveStudio/at-risk.view-models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"at-risk.view-models.d.ts","sourceRoot":"","sources":["../../src/PredictiveStudio/at-risk.view-models.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,wCAAwC,CAAC;AAEhD,2CAA2C;AAC3C,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,wCAAwC;IACxC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACzC,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;CAC7B;AAED,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IAC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