@memberjunction/ng-dashboards 5.38.0 → 5.39.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/README.md +14 -7
- package/dist/AI/components/agents/agent-configuration.component.js +199 -198
- package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
- package/dist/AI/components/analytics/ai-analytics-resource.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/ai-analytics-resource.component.js +20 -17
- package/dist/AI/components/analytics/ai-analytics-resource.component.js.map +1 -1
- package/dist/AI/components/analytics/cost-budget/cost-budget.component.d.ts +15 -0
- package/dist/AI/components/analytics/cost-budget/cost-budget.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/cost-budget/cost-budget.component.js +166 -58
- package/dist/AI/components/analytics/cost-budget/cost-budget.component.js.map +1 -1
- package/dist/AI/components/analytics/executive-summary/executive-summary.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/executive-summary/executive-summary.component.js +2 -1
- package/dist/AI/components/analytics/executive-summary/executive-summary.component.js.map +1 -1
- package/dist/AI/components/analytics/model-performance/model-performance.component.d.ts +1 -0
- package/dist/AI/components/analytics/model-performance/model-performance.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/model-performance/model-performance.component.js +55 -36
- package/dist/AI/components/analytics/model-performance/model-performance.component.js.map +1 -1
- package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.d.ts +9 -1
- package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.js +158 -117
- package/dist/AI/components/analytics/prompt-runs/prompt-run-analysis.component.js.map +1 -1
- package/dist/AI/components/analytics/usage-patterns/usage-patterns.component.d.ts +1 -0
- package/dist/AI/components/analytics/usage-patterns/usage-patterns.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/usage-patterns/usage-patterns.component.js +22 -8
- package/dist/AI/components/analytics/usage-patterns/usage-patterns.component.js.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +89 -856
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +1353 -7841
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
- package/dist/AI/components/autotagging/dialogs/dry-run-preview.dialog.component.d.ts +87 -0
- package/dist/AI/components/autotagging/dialogs/dry-run-preview.dialog.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/dialogs/dry-run-preview.dialog.component.js +475 -0
- package/dist/AI/components/autotagging/dialogs/dry-run-preview.dialog.component.js.map +1 -0
- package/dist/AI/components/autotagging/dialogs/item-detail.dialog.component.d.ts +29 -0
- package/dist/AI/components/autotagging/dialogs/item-detail.dialog.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/dialogs/item-detail.dialog.component.js +208 -0
- package/dist/AI/components/autotagging/dialogs/item-detail.dialog.component.js.map +1 -0
- package/dist/AI/components/autotagging/dialogs/no-content-type-warning.dialog.component.d.ts +21 -0
- package/dist/AI/components/autotagging/dialogs/no-content-type-warning.dialog.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/dialogs/no-content-type-warning.dialog.component.js +70 -0
- package/dist/AI/components/autotagging/dialogs/no-content-type-warning.dialog.component.js.map +1 -0
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.d.ts +235 -0
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js +1735 -0
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js.map +1 -0
- package/dist/AI/components/autotagging/shared/classify.dryrun.d.ts +61 -0
- package/dist/AI/components/autotagging/shared/classify.dryrun.d.ts.map +1 -0
- package/dist/AI/components/autotagging/shared/classify.dryrun.js +78 -0
- package/dist/AI/components/autotagging/shared/classify.dryrun.js.map +1 -0
- package/dist/AI/components/autotagging/shared/classify.format.d.ts +43 -0
- package/dist/AI/components/autotagging/shared/classify.format.d.ts.map +1 -0
- package/dist/AI/components/autotagging/shared/classify.format.js +209 -0
- package/dist/AI/components/autotagging/shared/classify.format.js.map +1 -0
- package/dist/AI/components/autotagging/shared/classify.types.d.ts +276 -0
- package/dist/AI/components/autotagging/shared/classify.types.d.ts.map +1 -0
- package/dist/AI/components/autotagging/shared/classify.types.js +6 -0
- package/dist/AI/components/autotagging/shared/classify.types.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/health-tab.component.d.ts +103 -0
- package/dist/AI/components/autotagging/tabs/health-tab.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/tabs/health-tab.component.js +571 -0
- package/dist/AI/components/autotagging/tabs/health-tab.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/history-tab.component.d.ts +40 -0
- package/dist/AI/components/autotagging/tabs/history-tab.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/tabs/history-tab.component.js +402 -0
- package/dist/AI/components/autotagging/tabs/history-tab.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/inbox-tab.component.d.ts +107 -0
- package/dist/AI/components/autotagging/tabs/inbox-tab.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/tabs/inbox-tab.component.js +719 -0
- package/dist/AI/components/autotagging/tabs/inbox-tab.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/pipeline-tab.component.d.ts +122 -0
- package/dist/AI/components/autotagging/tabs/pipeline-tab.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/tabs/pipeline-tab.component.js +752 -0
- package/dist/AI/components/autotagging/tabs/pipeline-tab.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/sources-tab.component.d.ts +166 -0
- package/dist/AI/components/autotagging/tabs/sources-tab.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js +1384 -0
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/tags-tab.component.d.ts +70 -0
- package/dist/AI/components/autotagging/tabs/tags-tab.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/tabs/tags-tab.component.js +448 -0
- package/dist/AI/components/autotagging/tabs/tags-tab.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/taxonomy-tab.component.d.ts +397 -0
- package/dist/AI/components/autotagging/tabs/taxonomy-tab.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/tabs/taxonomy-tab.component.js +3490 -0
- package/dist/AI/components/autotagging/tabs/taxonomy-tab.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/types-tab.component.d.ts +47 -0
- package/dist/AI/components/autotagging/tabs/types-tab.component.d.ts.map +1 -0
- package/dist/AI/components/autotagging/tabs/types-tab.component.js +220 -0
- package/dist/AI/components/autotagging/tabs/types-tab.component.js.map +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +293 -289
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/models/model-management.component.js +209 -208
- package/dist/AI/components/models/model-management.component.js.map +1 -1
- package/dist/AI/components/prompts/prompt-management.component.js +130 -128
- package/dist/AI/components/prompts/prompt-management.component.js.map +1 -1
- package/dist/AI/components/requests/agent-requests-resource.component.js +61 -61
- package/dist/AI/components/requests/agent-requests-resource.component.js.map +1 -1
- package/dist/AI/components/system/system-configuration.component.js +17 -17
- package/dist/AI/components/system/system-configuration.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +550 -532
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.d.ts +5 -0
- package/dist/AI/services/ai-instrumentation.service.d.ts.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.js +14 -2
- package/dist/AI/services/ai-instrumentation.service.js.map +1 -1
- package/dist/AI/services/cache-metrics.d.ts +50 -0
- package/dist/AI/services/cache-metrics.d.ts.map +1 -0
- package/dist/AI/services/cache-metrics.js +43 -0
- package/dist/AI/services/cache-metrics.js.map +1 -0
- package/dist/APIKeys/api-key-edit-panel.component.js +2 -2
- package/dist/APIKeys/api-keys-resource.component.js +132 -131
- package/dist/APIKeys/api-keys-resource.component.js.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +141 -141
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.js +15 -15
- package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-explorer.component.d.ts +0 -5
- package/dist/Actions/components/explorer/action-explorer.component.d.ts.map +1 -1
- package/dist/Actions/components/explorer/action-explorer.component.js +139 -212
- package/dist/Actions/components/explorer/action-explorer.component.js.map +1 -1
- package/dist/Admin/admin-data-schema.component.js +2 -2
- package/dist/Admin/admin-data-schema.component.js.map +1 -1
- package/dist/Admin/admin-dev-tools-resource.component.js +2 -2
- package/dist/Admin/admin-dev-tools-resource.component.js.map +1 -1
- package/dist/Admin/admin-identity-access.component.js +2 -2
- package/dist/Admin/admin-identity-access.component.js.map +1 -1
- package/dist/Admin/admin-monitoring.component.js +2 -2
- package/dist/Admin/admin-monitoring.component.js.map +1 -1
- package/dist/ApplicationRoles/application-roles-resource.component.js +54 -49
- package/dist/ApplicationRoles/application-roles-resource.component.js.map +1 -1
- package/dist/Communication/communication-logs-resource.component.d.ts +6 -0
- package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-logs-resource.component.js +72 -50
- package/dist/Communication/communication-logs-resource.component.js.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.js +103 -102
- package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
- package/dist/Communication/communication-providers-resource.component.js +52 -51
- package/dist/Communication/communication-providers-resource.component.js.map +1 -1
- package/dist/Communication/communication-runs-resource.component.js +39 -38
- package/dist/Communication/communication-runs-resource.component.js.map +1 -1
- package/dist/Communication/communication-templates-resource.component.d.ts +6 -0
- package/dist/Communication/communication-templates-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-templates-resource.component.js +92 -89
- package/dist/Communication/communication-templates-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-audit-resource.component.js +136 -135
- package/dist/Credentials/components/credentials-audit-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-categories-resource.component.js +155 -152
- package/dist/Credentials/components/credentials-categories-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +119 -118
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-overview-resource.component.js +129 -128
- package/dist/Credentials/components/credentials-overview-resource.component.js.map +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.js +107 -106
- package/dist/Credentials/components/credentials-types-resource.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +2 -2
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DatabaseDesigner/components/database-designer-dashboard.component.js +1 -1
- package/dist/DatabaseDesigner/components/entity-list.component.js +115 -114
- package/dist/DatabaseDesigner/components/entity-list.component.js.map +1 -1
- package/dist/DatabaseDesigner/database-designer-dashboards.module.d.ts +5 -6
- package/dist/DatabaseDesigner/database-designer-dashboards.module.d.ts.map +1 -1
- package/dist/DatabaseDesigner/database-designer-dashboards.module.js +4 -5
- package/dist/DatabaseDesigner/database-designer-dashboards.module.js.map +1 -1
- package/dist/DevTools/app-state-inspector.component.js +18 -17
- package/dist/DevTools/app-state-inspector.component.js.map +1 -1
- package/dist/DevTools/class-registry.component.js +88 -85
- package/dist/DevTools/class-registry.component.js.map +1 -1
- package/dist/DevTools/event-monitor.component.js +155 -150
- package/dist/DevTools/event-monitor.component.js.map +1 -1
- package/dist/DevTools/graphql-console.component.js +245 -243
- package/dist/DevTools/graphql-console.component.js.map +1 -1
- package/dist/DevTools/layout-inspector.component.js +18 -17
- package/dist/DevTools/layout-inspector.component.js.map +1 -1
- package/dist/EntityAdmin/entity-admin-dashboard.component.js +20 -19
- package/dist/EntityAdmin/entity-admin-dashboard.component.js.map +1 -1
- package/dist/Home/home-dashboard.component.js +2 -2
- package/dist/Integration/components/activity/activity.component.d.ts.map +1 -1
- package/dist/Integration/components/activity/activity.component.js +236 -229
- package/dist/Integration/components/activity/activity.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +390 -389
- package/dist/Integration/components/connections/connections.component.js.map +1 -1
- package/dist/Integration/components/overview/overview.component.js +2 -2
- package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js +2 -2
- package/dist/KnowledgeHub/components/analytics/analytics-resource.component.js.map +1 -1
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js +45 -44
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js.map +1 -1
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +293 -291
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
- package/dist/KnowledgeHub/components/scheduling/scheduling-resource.component.js +62 -61
- package/dist/KnowledgeHub/components/scheduling/scheduling-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.d.ts +6 -2
- package/dist/Lists/components/lists-browse-resource.component.d.ts.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js +525 -566
- package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-categories-resource.component.js +135 -134
- package/dist/Lists/components/lists-categories-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js +199 -198
- package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +443 -438
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/Scheduling/components/scheduling-activity.component.d.ts.map +1 -1
- package/dist/Scheduling/components/scheduling-activity.component.js +146 -147
- package/dist/Scheduling/components/scheduling-activity.component.js.map +1 -1
- package/dist/Scheduling/components/scheduling-jobs.component.js +76 -75
- package/dist/Scheduling/components/scheduling-jobs.component.js.map +1 -1
- package/dist/Scheduling/components/scheduling-overview.component.js +97 -96
- package/dist/Scheduling/components/scheduling-overview.component.js.map +1 -1
- package/dist/Scheduling/scheduling-dashboard.component.js +24 -22
- package/dist/Scheduling/scheduling-dashboard.component.js.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts +2 -0
- package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.js +1 -0
- package/dist/Scheduling/services/scheduling-instrumentation.service.js.map +1 -1
- package/dist/Testing/components/testing-dashboard-tab-resource.component.js +1 -1
- package/dist/Testing/components/testing-explorer.component.d.ts +14 -4
- package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-explorer.component.js +436 -427
- package/dist/Testing/components/testing-explorer.component.js.map +1 -1
- package/dist/Testing/components/testing-runs-resource.component.js +1 -1
- package/dist/Testing/components/testing-runs.component.js +116 -115
- package/dist/Testing/components/testing-runs.component.js.map +1 -1
- package/dist/Testing/testing-dashboard.component.js +6 -7
- package/dist/Testing/testing-dashboard.component.js.map +1 -1
- package/dist/VersionHistory/components/labels-resource.component.js +173 -172
- package/dist/VersionHistory/components/labels-resource.component.js.map +1 -1
- package/dist/VersionHistory/components/restore-resource.component.d.ts +6 -0
- package/dist/VersionHistory/components/restore-resource.component.d.ts.map +1 -1
- package/dist/VersionHistory/components/restore-resource.component.js +116 -92
- package/dist/VersionHistory/components/restore-resource.component.js.map +1 -1
- package/dist/ai-dashboards.module.d.ts +47 -35
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +40 -1
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/communication-dashboards.module.d.ts +1 -1
- package/dist/communication-dashboards.module.d.ts.map +1 -1
- package/dist/communication-dashboards.module.js +7 -1
- package/dist/communication-dashboards.module.js.map +1 -1
- package/dist/testing-dashboards.module.d.ts +4 -5
- package/dist/testing-dashboards.module.d.ts.map +1 -1
- package/dist/testing-dashboards.module.js +7 -5
- package/dist/testing-dashboards.module.js.map +1 -1
- package/package.json +55 -54
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Classify · Content Types tab.
|
|
3
|
+
*
|
|
4
|
+
* Self-contained sub-page: owns its header-interior and the content-type cards
|
|
5
|
+
* grid. Receives the shared raw data needed to build the cards from the host
|
|
6
|
+
* orchestrator (content types, sources, items, and the accurate total item
|
|
7
|
+
* count). The slide-in CRUD form stays in the host — this tab emits
|
|
8
|
+
* Add/Edit intents up via @Output and the host opens its existing form.
|
|
9
|
+
*/
|
|
10
|
+
import { EventEmitter } from '@angular/core';
|
|
11
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
12
|
+
import { ContentTypeCard } from '../shared/classify.types';
|
|
13
|
+
import { formatNumber } from '../shared/classify.format';
|
|
14
|
+
import * as i0 from "@angular/core";
|
|
15
|
+
export declare class ClassifyTypesTabComponent extends BaseAngularComponent {
|
|
16
|
+
/** Raw `MJ: Content Types` rows — the primary source for the cards. */
|
|
17
|
+
private _contentTypes;
|
|
18
|
+
set ContentTypes(value: Record<string, unknown>[]);
|
|
19
|
+
get ContentTypes(): Record<string, unknown>[];
|
|
20
|
+
/** Raw `MJ: Content Sources` rows — used to count sources per content type. */
|
|
21
|
+
private _sources;
|
|
22
|
+
set Sources(value: Record<string, unknown>[]);
|
|
23
|
+
get Sources(): Record<string, unknown>[];
|
|
24
|
+
/** Raw `MJ: Content Items` rows — used to count items per content type. */
|
|
25
|
+
private _items;
|
|
26
|
+
set Items(value: Record<string, unknown>[]);
|
|
27
|
+
get Items(): Record<string, unknown>[];
|
|
28
|
+
/** Accurate total item count from TotalRowCount (used when a single content type exists). */
|
|
29
|
+
private _totalItemCount;
|
|
30
|
+
set TotalItemCount(value: number);
|
|
31
|
+
get TotalItemCount(): number;
|
|
32
|
+
ContentTypeCards: ContentTypeCard[];
|
|
33
|
+
/** Template-facing formatter (exposed so `formatNumber(...)` resolves in the view). */
|
|
34
|
+
readonly formatNumber: typeof formatNumber;
|
|
35
|
+
/** Bubble Add/Edit intents to the host, which owns the slide-in CRUD form. */
|
|
36
|
+
AddTypeRequested: EventEmitter<void>;
|
|
37
|
+
EditTypeRequested: EventEmitter<ContentTypeCard>;
|
|
38
|
+
onAddType(): void;
|
|
39
|
+
onEditType(card: ContentTypeCard): void;
|
|
40
|
+
/** Rebuild the card view models from the current inputs. */
|
|
41
|
+
private rebuild;
|
|
42
|
+
private countSourcesByContentType;
|
|
43
|
+
private countItemsByContentType;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClassifyTypesTabComponent, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClassifyTypesTabComponent, "classify-types-tab", never, { "ContentTypes": { "alias": "ContentTypes"; "required": false; }; "Sources": { "alias": "Sources"; "required": false; }; "Items": { "alias": "Items"; "required": false; }; "TotalItemCount": { "alias": "TotalItemCount"; "required": false; }; }, { "AddTypeRequested": "AddTypeRequested"; "EditTypeRequested": "EditTypeRequested"; }, never, never, false, never>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=types-tab.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-tab.component.d.ts","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/tabs/types-tab.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAa,YAAY,EAAiB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;;AAEzD,qBAMa,yBAA0B,SAAQ,oBAAoB;IAC/D,u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
|
+
* grid. Receives the shared raw data needed to build the cards from the host
|
|
6
|
+
* orchestrator (content types, sources, items, and the accurate total item
|
|
7
|
+
* count). The slide-in CRUD form stays in the host — this tab emits
|
|
8
|
+
* Add/Edit intents up via @Output and the host opens its existing form.
|
|
9
|
+
*/
|
|
10
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
11
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
12
|
+
import { formatNumber } from '../shared/classify.format';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
import * as i1 from "@memberjunction/ng-ui-components";
|
|
15
|
+
const _forTrack0 = ($index, $item) => $item.ID;
|
|
16
|
+
function ClassifyTypesTabComponent_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
18
|
+
i0.ɵɵelementStart(0, "div", 9)(1, "div", 14)(2, "span", 15);
|
|
19
|
+
i0.ɵɵtext(3);
|
|
20
|
+
i0.ɵɵelementEnd();
|
|
21
|
+
i0.ɵɵelementStart(4, "span", 16);
|
|
22
|
+
i0.ɵɵtext(5);
|
|
23
|
+
i0.ɵɵelementEnd()();
|
|
24
|
+
i0.ɵɵelementStart(6, "div", 17)(7, "span", 18);
|
|
25
|
+
i0.ɵɵtext(8, "Description");
|
|
26
|
+
i0.ɵɵelementEnd();
|
|
27
|
+
i0.ɵɵelementStart(9, "span", 19);
|
|
28
|
+
i0.ɵɵtext(10);
|
|
29
|
+
i0.ɵɵelementEnd()();
|
|
30
|
+
i0.ɵɵelementStart(11, "div", 17)(12, "span", 18);
|
|
31
|
+
i0.ɵɵtext(13, "Sources Using");
|
|
32
|
+
i0.ɵɵelementEnd();
|
|
33
|
+
i0.ɵɵelementStart(14, "span", 19);
|
|
34
|
+
i0.ɵɵtext(15);
|
|
35
|
+
i0.ɵɵelementEnd()();
|
|
36
|
+
i0.ɵɵelementStart(16, "div", 17)(17, "span", 18);
|
|
37
|
+
i0.ɵɵtext(18, "Items Tagged");
|
|
38
|
+
i0.ɵɵelementEnd();
|
|
39
|
+
i0.ɵɵelementStart(19, "span", 19);
|
|
40
|
+
i0.ɵɵtext(20);
|
|
41
|
+
i0.ɵɵelementEnd()();
|
|
42
|
+
i0.ɵɵelementStart(21, "div", 20);
|
|
43
|
+
i0.ɵɵelement(22, "i", 21);
|
|
44
|
+
i0.ɵɵelementStart(23, "span");
|
|
45
|
+
i0.ɵɵtext(24);
|
|
46
|
+
i0.ɵɵelementEnd();
|
|
47
|
+
i0.ɵɵelementStart(25, "div", 22);
|
|
48
|
+
i0.ɵɵelement(26, "div", 23);
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
i0.ɵɵelementStart(27, "span");
|
|
51
|
+
i0.ɵɵtext(28);
|
|
52
|
+
i0.ɵɵelementEnd();
|
|
53
|
+
i0.ɵɵelementStart(29, "span", 24);
|
|
54
|
+
i0.ɵɵtext(30, "tags/item");
|
|
55
|
+
i0.ɵɵelementEnd()();
|
|
56
|
+
i0.ɵɵelementStart(31, "div", 25)(32, "button", 26);
|
|
57
|
+
i0.ɵɵlistener("click", function ClassifyTypesTabComponent_For_11_Template_button_click_32_listener() { const card_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onEditType(card_r2)); });
|
|
58
|
+
i0.ɵɵelement(33, "i", 27);
|
|
59
|
+
i0.ɵɵtext(34, " Edit");
|
|
60
|
+
i0.ɵɵelementEnd()()();
|
|
61
|
+
} if (rf & 2) {
|
|
62
|
+
const card_r2 = ctx.$implicit;
|
|
63
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
64
|
+
i0.ɵɵadvance(3);
|
|
65
|
+
i0.ɵɵtextInterpolate(card_r2.Name);
|
|
66
|
+
i0.ɵɵadvance(2);
|
|
67
|
+
i0.ɵɵtextInterpolate(card_r2.AIModelName);
|
|
68
|
+
i0.ɵɵadvance(5);
|
|
69
|
+
i0.ɵɵtextInterpolate(card_r2.Description || "\u2014");
|
|
70
|
+
i0.ɵɵadvance(5);
|
|
71
|
+
i0.ɵɵtextInterpolate(card_r2.SourcesUsing);
|
|
72
|
+
i0.ɵɵadvance(5);
|
|
73
|
+
i0.ɵɵtextInterpolate(ctx_r2.formatNumber(card_r2.ItemsTagged));
|
|
74
|
+
i0.ɵɵadvance(4);
|
|
75
|
+
i0.ɵɵtextInterpolate(card_r2.MinTags);
|
|
76
|
+
i0.ɵɵadvance(2);
|
|
77
|
+
i0.ɵɵstyleProp("left", card_r2.RangeLeftPct, "%")("right", card_r2.RangeRightPct, "%");
|
|
78
|
+
i0.ɵɵadvance(2);
|
|
79
|
+
i0.ɵɵtextInterpolate(card_r2.MaxTags);
|
|
80
|
+
} }
|
|
81
|
+
export class ClassifyTypesTabComponent extends BaseAngularComponent {
|
|
82
|
+
/** Raw `MJ: Content Types` rows — the primary source for the cards. */
|
|
83
|
+
_contentTypes = [];
|
|
84
|
+
set ContentTypes(value) {
|
|
85
|
+
this._contentTypes = value ?? [];
|
|
86
|
+
this.rebuild();
|
|
87
|
+
}
|
|
88
|
+
get ContentTypes() {
|
|
89
|
+
return this._contentTypes;
|
|
90
|
+
}
|
|
91
|
+
/** Raw `MJ: Content Sources` rows — used to count sources per content type. */
|
|
92
|
+
_sources = [];
|
|
93
|
+
set Sources(value) {
|
|
94
|
+
this._sources = value ?? [];
|
|
95
|
+
this.rebuild();
|
|
96
|
+
}
|
|
97
|
+
get Sources() {
|
|
98
|
+
return this._sources;
|
|
99
|
+
}
|
|
100
|
+
/** Raw `MJ: Content Items` rows — used to count items per content type. */
|
|
101
|
+
_items = [];
|
|
102
|
+
set Items(value) {
|
|
103
|
+
this._items = value ?? [];
|
|
104
|
+
this.rebuild();
|
|
105
|
+
}
|
|
106
|
+
get Items() {
|
|
107
|
+
return this._items;
|
|
108
|
+
}
|
|
109
|
+
/** Accurate total item count from TotalRowCount (used when a single content type exists). */
|
|
110
|
+
_totalItemCount = 0;
|
|
111
|
+
set TotalItemCount(value) {
|
|
112
|
+
this._totalItemCount = value ?? 0;
|
|
113
|
+
this.rebuild();
|
|
114
|
+
}
|
|
115
|
+
get TotalItemCount() {
|
|
116
|
+
return this._totalItemCount;
|
|
117
|
+
}
|
|
118
|
+
ContentTypeCards = [];
|
|
119
|
+
/** Template-facing formatter (exposed so `formatNumber(...)` resolves in the view). */
|
|
120
|
+
formatNumber = formatNumber;
|
|
121
|
+
/** Bubble Add/Edit intents to the host, which owns the slide-in CRUD form. */
|
|
122
|
+
AddTypeRequested = new EventEmitter();
|
|
123
|
+
EditTypeRequested = new EventEmitter();
|
|
124
|
+
onAddType() {
|
|
125
|
+
this.AddTypeRequested.emit();
|
|
126
|
+
}
|
|
127
|
+
onEditType(card) {
|
|
128
|
+
this.EditTypeRequested.emit(card);
|
|
129
|
+
}
|
|
130
|
+
/** Rebuild the card view models from the current inputs. */
|
|
131
|
+
rebuild() {
|
|
132
|
+
const sourcesUsingByType = this.countSourcesByContentType();
|
|
133
|
+
// When items are capped by MaxRows, countItemsByContentType undercounts.
|
|
134
|
+
// For a single content type, use the accurate TotalItemCount.
|
|
135
|
+
const singleType = this._contentTypes.length === 1;
|
|
136
|
+
const itemsByType = singleType ? null : this.countItemsByContentType();
|
|
137
|
+
this.ContentTypeCards = this._contentTypes.map(ct => {
|
|
138
|
+
const id = ct['ID'];
|
|
139
|
+
const minTags = ct['MinTags'] ?? 1;
|
|
140
|
+
const maxTags = ct['MaxTags'] ?? 10;
|
|
141
|
+
const range = 15; // max possible
|
|
142
|
+
return {
|
|
143
|
+
ID: id,
|
|
144
|
+
Name: ct['Name'] ?? 'Unnamed',
|
|
145
|
+
Description: ct['Description'] ?? '',
|
|
146
|
+
AIModelName: ct['AIModel'] ?? 'Default Model',
|
|
147
|
+
AIModelID: ct['AIModelID'] ?? '',
|
|
148
|
+
MinTags: minTags,
|
|
149
|
+
MaxTags: maxTags,
|
|
150
|
+
SourcesUsing: sourcesUsingByType.get(id) ?? 0,
|
|
151
|
+
ItemsTagged: singleType ? this._totalItemCount : (itemsByType.get(id) ?? 0),
|
|
152
|
+
RangeLeftPct: Math.round((minTags / range) * 100),
|
|
153
|
+
RangeRightPct: Math.round(100 - (maxTags / range) * 100),
|
|
154
|
+
EmbeddingModelID: ct['EmbeddingModelID'] ?? '',
|
|
155
|
+
VectorIndexID: ct['VectorIndexID'] ?? ''
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
countSourcesByContentType() {
|
|
160
|
+
const counts = new Map();
|
|
161
|
+
for (const source of this._sources) {
|
|
162
|
+
const typeId = source['ContentTypeID'];
|
|
163
|
+
if (typeId)
|
|
164
|
+
counts.set(typeId, (counts.get(typeId) ?? 0) + 1);
|
|
165
|
+
}
|
|
166
|
+
return counts;
|
|
167
|
+
}
|
|
168
|
+
countItemsByContentType() {
|
|
169
|
+
const counts = new Map();
|
|
170
|
+
for (const item of this._items) {
|
|
171
|
+
const typeId = item['ContentTypeID'];
|
|
172
|
+
if (typeId)
|
|
173
|
+
counts.set(typeId, (counts.get(typeId) ?? 0) + 1);
|
|
174
|
+
}
|
|
175
|
+
return counts;
|
|
176
|
+
}
|
|
177
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵClassifyTypesTabComponent_BaseFactory; return function ClassifyTypesTabComponent_Factory(__ngFactoryType__) { return (ɵClassifyTypesTabComponent_BaseFactory || (ɵClassifyTypesTabComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ClassifyTypesTabComponent)))(__ngFactoryType__ || ClassifyTypesTabComponent); }; })();
|
|
178
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ClassifyTypesTabComponent, selectors: [["classify-types-tab"]], inputs: { ContentTypes: "ContentTypes", Sources: "Sources", Items: "Items", TotalItemCount: "TotalItemCount" }, outputs: { AddTypeRequested: "AddTypeRequested", EditTypeRequested: "EditTypeRequested" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 18, vars: 2, consts: [["Title", "Content Types", "Subtitle", "Configure AI tagging rules per content category"], ["actions", ""], ["mjButton", "", "variant", "primary", "size", "sm", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "mj-action-label"], [3, "Padding", "Flex"], [1, "at-main-area"], [1, "at-page-body"], [1, "at-ct-grid"], [1, "at-ct-card"], [1, "at-add-type-card", 3, "click"], [1, "fa-solid", "fa-plus-circle"], [2, "font-size", "0.85rem", "font-weight", "600"], [2, "font-size", "0.72rem"], [1, "at-ct-card-header"], [1, "at-ct-card-name"], [1, "at-ct-card-model"], [1, "at-ct-field"], [1, "at-ct-field-label"], [1, "at-ct-field-value"], [1, "at-ct-tag-range"], [1, "fa-solid", "fa-tags"], [1, "at-ct-tag-range-bar"], [1, "at-ct-tag-range-fill"], [1, "at-ct-range-suffix"], [1, "at-source-card-actions", 2, "margin-top", "10px"], [1, "at-source-action-btn", 3, "click"], [1, "fa-solid", "fa-pen"]], template: function ClassifyTypesTabComponent_Template(rf, ctx) { if (rf & 1) {
|
|
179
|
+
i0.ɵɵelementStart(0, "mj-page-header-interior", 0)(1, "div", 1)(2, "button", 2);
|
|
180
|
+
i0.ɵɵlistener("click", function ClassifyTypesTabComponent_Template_button_click_2_listener() { return ctx.onAddType(); });
|
|
181
|
+
i0.ɵɵelement(3, "i", 3);
|
|
182
|
+
i0.ɵɵelementStart(4, "span", 4);
|
|
183
|
+
i0.ɵɵtext(5, "Add Type");
|
|
184
|
+
i0.ɵɵelementEnd()()()();
|
|
185
|
+
i0.ɵɵelementStart(6, "mj-page-body-interior", 5)(7, "div", 6)(8, "div", 7)(9, "div", 8);
|
|
186
|
+
i0.ɵɵrepeaterCreate(10, ClassifyTypesTabComponent_For_11_Template, 35, 11, "div", 9, _forTrack0);
|
|
187
|
+
i0.ɵɵelementStart(12, "div", 10);
|
|
188
|
+
i0.ɵɵlistener("click", function ClassifyTypesTabComponent_Template_div_click_12_listener() { return ctx.onAddType(); });
|
|
189
|
+
i0.ɵɵelement(13, "i", 11);
|
|
190
|
+
i0.ɵɵelementStart(14, "span", 12);
|
|
191
|
+
i0.ɵɵtext(15, "Add Content Type");
|
|
192
|
+
i0.ɵɵelementEnd();
|
|
193
|
+
i0.ɵɵelementStart(16, "span", 13);
|
|
194
|
+
i0.ɵɵtext(17, "Configure tagging rules");
|
|
195
|
+
i0.ɵɵelementEnd()()()()()();
|
|
196
|
+
} if (rf & 2) {
|
|
197
|
+
i0.ɵɵadvance(6);
|
|
198
|
+
i0.ɵɵproperty("Padding", false)("Flex", true);
|
|
199
|
+
i0.ɵɵadvance(4);
|
|
200
|
+
i0.ɵɵrepeater(ctx.ContentTypeCards);
|
|
201
|
+
} }, dependencies: [i1.MJButtonDirective, i1.MJPageHeaderInteriorComponent, i1.MJPageBodyInteriorComponent], encapsulation: 2 });
|
|
202
|
+
}
|
|
203
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClassifyTypesTabComponent, [{
|
|
204
|
+
type: Component,
|
|
205
|
+
args: [{ standalone: false, selector: 'classify-types-tab', template: "<mj-page-header-interior\n Title=\"Content Types\"\n Subtitle=\"Configure AI tagging rules per content category\">\n <div actions>\n <button mjButton variant=\"primary\" size=\"sm\" (click)=\"onAddType()\">\n <i class=\"fa-solid fa-plus\"></i> <span class=\"mj-action-label\">Add Type</span>\n </button>\n </div>\n</mj-page-header-interior>\n\n<mj-page-body-interior [Padding]=\"false\" [Flex]=\"true\">\n <div class=\"at-main-area\">\n <div class=\"at-page-body\">\n <div class=\"at-ct-grid\">\n @for (card of ContentTypeCards; track card.ID) {\n <div class=\"at-ct-card\">\n <div class=\"at-ct-card-header\">\n <span class=\"at-ct-card-name\">{{ card.Name }}</span>\n <span class=\"at-ct-card-model\">{{ card.AIModelName }}</span>\n </div>\n <div class=\"at-ct-field\">\n <span class=\"at-ct-field-label\">Description</span>\n <span class=\"at-ct-field-value\">{{ card.Description || '\u2014' }}</span>\n </div>\n <div class=\"at-ct-field\">\n <span class=\"at-ct-field-label\">Sources Using</span>\n <span class=\"at-ct-field-value\">{{ card.SourcesUsing }}</span>\n </div>\n <div class=\"at-ct-field\">\n <span class=\"at-ct-field-label\">Items Tagged</span>\n <span class=\"at-ct-field-value\">{{ formatNumber(card.ItemsTagged) }}</span>\n </div>\n <div class=\"at-ct-tag-range\">\n <i class=\"fa-solid fa-tags\"></i>\n <span>{{ card.MinTags }}</span>\n <div class=\"at-ct-tag-range-bar\">\n <div class=\"at-ct-tag-range-fill\" [style.left.%]=\"card.RangeLeftPct\" [style.right.%]=\"card.RangeRightPct\"></div>\n </div>\n <span>{{ card.MaxTags }}</span>\n <span class=\"at-ct-range-suffix\">tags/item</span>\n </div>\n <div class=\"at-source-card-actions\" style=\"margin-top: 10px;\">\n <button class=\"at-source-action-btn\" (click)=\"onEditType(card)\"><i class=\"fa-solid fa-pen\"></i> Edit</button>\n </div>\n </div>\n }\n <!-- Add Content Type Card -->\n <div class=\"at-add-type-card\" (click)=\"onAddType()\">\n <i class=\"fa-solid fa-plus-circle\"></i>\n <span style=\"font-size: 0.85rem; font-weight: 600;\">Add Content Type</span>\n <span style=\"font-size: 0.72rem;\">Configure tagging rules</span>\n </div>\n </div>\n </div>\n </div>\n</mj-page-body-interior>\n", styles: ["/*\n * Content Types tab styles.\n *\n * The host (AutotaggingPipelineResourceComponent) uses ViewEncapsulation.None,\n * so its `.at-*` rules are global and already style this tab's markup while it\n * renders inside the host shell. Tab-specific rules live here as the shared CSS\n * is partitioned during the host-slim step.\n */\n"] }]
|
|
206
|
+
}], null, { ContentTypes: [{
|
|
207
|
+
type: Input
|
|
208
|
+
}], Sources: [{
|
|
209
|
+
type: Input
|
|
210
|
+
}], Items: [{
|
|
211
|
+
type: Input
|
|
212
|
+
}], TotalItemCount: [{
|
|
213
|
+
type: Input
|
|
214
|
+
}], AddTypeRequested: [{
|
|
215
|
+
type: Output
|
|
216
|
+
}], EditTypeRequested: [{
|
|
217
|
+
type: Output
|
|
218
|
+
}] }); })();
|
|
219
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ClassifyTypesTabComponent, { className: "ClassifyTypesTabComponent", filePath: "src/AI/components/autotagging/tabs/types-tab.component.ts", lineNumber: 21 }); })();
|
|
220
|
+
//# sourceMappingURL=types-tab.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-tab.component.js","sourceRoot":"","sources":["../../../../../src/AI/components/autotagging/tabs/types-tab.component.ts","../../../../../src/AI/components/autotagging/tabs/types-tab.component.html"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;;;;;;ICK3C,AADF,AADF,8BAAwB,cACS,eACC;IAAA,YAAe;IAAA,iBAAO;IACpD,gCAA+B;IAAA,YAAsB;IACvD,AADuD,iBAAO,EACxD;IAEJ,AADF,+BAAyB,eACS;IAAA,2BAAW;IAAA,iBAAO;IAClD,gCAAgC;IAAA,aAA6B;IAC/D,AAD+D,iBAAO,EAChE;IAEJ,AADF,gCAAyB,gBACS;IAAA,8BAAa;IAAA,iBAAO;IACpD,iCAAgC;IAAA,aAAuB;IACzD,AADyD,iBAAO,EAC1D;IAEJ,AADF,gCAAyB,gBACS;IAAA,6BAAY;IAAA,iBAAO;IACnD,iCAAgC;IAAA,aAAoC;IACtE,AADsE,iBAAO,EACvE;IACN,gCAA6B;IAC3B,yBAAgC;IAChC,6BAAM;IAAA,aAAkB;IAAA,iBAAO;IAC/B,gCAAiC;IAC/B,2BAAgH;IAClH,iBAAM;IACN,6BAAM;IAAA,aAAkB;IAAA,iBAAO;IAC/B,iCAAiC;IAAA,0BAAS;IAC5C,AAD4C,iBAAO,EAC7C;IAEJ,AADF,gCAA8D,kB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I,CAAC,MAAM,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,eAAe,CAAW,CAAC;YAC/C,IAAI,MAAM;gBAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;iRA7GQ,yBAAyB,yBAAzB,yBAAyB;6DAAzB,yBAAyB;YChBlC,AADF,AAHF,kDAE+D,aAChD,gBACwD;YAAtB,sGAAS,eAAW,IAAC;YAChE,uBAAgC;YAAC,+BAA8B;YAAA,wBAAQ;YAG7E,AADE,AADE,AADyE,iBAAO,EACvE,EACL,EACkB;YAKpB,AADF,AADF,AADF,gDAAuD,aAC3B,aACE,aACA;YACtB,gGA+BC;YAED,gCAAoD;YAAtB,oGAAS,eAAW,IAAC;YACjD,yBAAuC;YACvC,iCAAoD;YAAA,iCAAgB;YAAA,iBAAO;YAC3E,iCAAkC;YAAA,wCAAuB;YAKnE,AADE,AADE,AADE,AADE,AAD2D,iBAAO,EAC5D,EACF,EACF,EACF,EACgB;;YA7CD,eAAiB;YAAC,AAAlB,+BAAiB,cAAc;YAI9C,eA+BC;YA/BD,mCA+BC;;;iFDzBI,yBAAyB;cANrC,SAAS;6BACM,KAAK,YACP,oBAAoB;;kBAO7B,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAWL,KAAK;;kBAeL,MAAM;;kBACN,MAAM;;kFApDE,yBAAyB","sourcesContent":["/**\n * @fileoverview Classify · Content Types tab.\n *\n * Self-contained sub-page: owns its header-interior and the content-type cards\n * grid. Receives the shared raw data needed to build the cards from the host\n * orchestrator (content types, sources, items, and the accurate total item\n * count). The slide-in CRUD form stays in the host — this tab emits\n * Add/Edit intents up via @Output and the host opens its existing form.\n */\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { ContentTypeCard } from '../shared/classify.types';\nimport { formatNumber } from '../shared/classify.format';\n\n@Component({\n standalone: false,\n selector: 'classify-types-tab',\n templateUrl: './types-tab.component.html',\n styleUrls: ['./types-tab.component.css']\n})\nexport class ClassifyTypesTabComponent extends BaseAngularComponent {\n /** Raw `MJ: Content Types` rows — the primary source for the cards. */\n private _contentTypes: Record<string, unknown>[] = [];\n @Input()\n set ContentTypes(value: Record<string, unknown>[]) {\n this._contentTypes = value ?? [];\n this.rebuild();\n }\n get ContentTypes(): Record<string, unknown>[] {\n return this._contentTypes;\n }\n\n /** Raw `MJ: Content Sources` rows — used to count sources per content type. */\n private _sources: Record<string, unknown>[] = [];\n @Input()\n set Sources(value: Record<string, unknown>[]) {\n this._sources = value ?? [];\n this.rebuild();\n }\n get Sources(): Record<string, unknown>[] {\n return this._sources;\n }\n\n /** Raw `MJ: Content Items` rows — used to count items per content type. */\n private _items: Record<string, unknown>[] = [];\n @Input()\n set Items(value: Record<string, unknown>[]) {\n this._items = value ?? [];\n this.rebuild();\n }\n get Items(): Record<string, unknown>[] {\n return this._items;\n }\n\n /** Accurate total item count from TotalRowCount (used when a single content type exists). */\n private _totalItemCount = 0;\n @Input()\n set TotalItemCount(value: number) {\n this._totalItemCount = value ?? 0;\n this.rebuild();\n }\n get TotalItemCount(): number {\n return this._totalItemCount;\n }\n\n public ContentTypeCards: ContentTypeCard[] = [];\n\n /** Template-facing formatter (exposed so `formatNumber(...)` resolves in the view). */\n public readonly formatNumber = formatNumber;\n\n /** Bubble Add/Edit intents to the host, which owns the slide-in CRUD form. */\n @Output() AddTypeRequested = new EventEmitter<void>();\n @Output() EditTypeRequested = new EventEmitter<ContentTypeCard>();\n\n public onAddType(): void {\n this.AddTypeRequested.emit();\n }\n\n public onEditType(card: ContentTypeCard): void {\n this.EditTypeRequested.emit(card);\n }\n\n /** Rebuild the card view models from the current inputs. */\n private rebuild(): void {\n const sourcesUsingByType = this.countSourcesByContentType();\n // When items are capped by MaxRows, countItemsByContentType undercounts.\n // For a single content type, use the accurate TotalItemCount.\n const singleType = this._contentTypes.length === 1;\n const itemsByType = singleType ? null : this.countItemsByContentType();\n\n this.ContentTypeCards = this._contentTypes.map(ct => {\n const id = ct['ID'] as string;\n const minTags = (ct['MinTags'] as number) ?? 1;\n const maxTags = (ct['MaxTags'] as number) ?? 10;\n const range = 15; // max possible\n return {\n ID: id,\n Name: (ct['Name'] as string) ?? 'Unnamed',\n Description: (ct['Description'] as string) ?? '',\n AIModelName: (ct['AIModel'] as string) ?? 'Default Model',\n AIModelID: (ct['AIModelID'] as string) ?? '',\n MinTags: minTags,\n MaxTags: maxTags,\n SourcesUsing: sourcesUsingByType.get(id) ?? 0,\n ItemsTagged: singleType ? this._totalItemCount : (itemsByType!.get(id) ?? 0),\n RangeLeftPct: Math.round((minTags / range) * 100),\n RangeRightPct: Math.round(100 - (maxTags / range) * 100),\n EmbeddingModelID: (ct['EmbeddingModelID'] as string) ?? '',\n VectorIndexID: (ct['VectorIndexID'] as string) ?? ''\n };\n });\n }\n\n private countSourcesByContentType(): Map<string, number> {\n const counts = new Map<string, number>();\n for (const source of this._sources) {\n const typeId = source['ContentTypeID'] as string;\n if (typeId) counts.set(typeId, (counts.get(typeId) ?? 0) + 1);\n }\n return counts;\n }\n\n private countItemsByContentType(): Map<string, number> {\n const counts = new Map<string, number>();\n for (const item of this._items) {\n const typeId = item['ContentTypeID'] as string;\n if (typeId) counts.set(typeId, (counts.get(typeId) ?? 0) + 1);\n }\n return counts;\n }\n}\n","<mj-page-header-interior\n Title=\"Content Types\"\n Subtitle=\"Configure AI tagging rules per content category\">\n <div actions>\n <button mjButton variant=\"primary\" size=\"sm\" (click)=\"onAddType()\">\n <i class=\"fa-solid fa-plus\"></i> <span class=\"mj-action-label\">Add Type</span>\n </button>\n </div>\n</mj-page-header-interior>\n\n<mj-page-body-interior [Padding]=\"false\" [Flex]=\"true\">\n <div class=\"at-main-area\">\n <div class=\"at-page-body\">\n <div class=\"at-ct-grid\">\n @for (card of ContentTypeCards; track card.ID) {\n <div class=\"at-ct-card\">\n <div class=\"at-ct-card-header\">\n <span class=\"at-ct-card-name\">{{ card.Name }}</span>\n <span class=\"at-ct-card-model\">{{ card.AIModelName }}</span>\n </div>\n <div class=\"at-ct-field\">\n <span class=\"at-ct-field-label\">Description</span>\n <span class=\"at-ct-field-value\">{{ card.Description || '—' }}</span>\n </div>\n <div class=\"at-ct-field\">\n <span class=\"at-ct-field-label\">Sources Using</span>\n <span class=\"at-ct-field-value\">{{ card.SourcesUsing }}</span>\n </div>\n <div class=\"at-ct-field\">\n <span class=\"at-ct-field-label\">Items Tagged</span>\n <span class=\"at-ct-field-value\">{{ formatNumber(card.ItemsTagged) }}</span>\n </div>\n <div class=\"at-ct-tag-range\">\n <i class=\"fa-solid fa-tags\"></i>\n <span>{{ card.MinTags }}</span>\n <div class=\"at-ct-tag-range-bar\">\n <div class=\"at-ct-tag-range-fill\" [style.left.%]=\"card.RangeLeftPct\" [style.right.%]=\"card.RangeRightPct\"></div>\n </div>\n <span>{{ card.MaxTags }}</span>\n <span class=\"at-ct-range-suffix\">tags/item</span>\n </div>\n <div class=\"at-source-card-actions\" style=\"margin-top: 10px;\">\n <button class=\"at-source-action-btn\" (click)=\"onEditType(card)\"><i class=\"fa-solid fa-pen\"></i> Edit</button>\n </div>\n </div>\n }\n <!-- Add Content Type Card -->\n <div class=\"at-add-type-card\" (click)=\"onAddType()\">\n <i class=\"fa-solid fa-plus-circle\"></i>\n <span style=\"font-size: 0.85rem; font-weight: 600;\">Add Content Type</span>\n <span style=\"font-size: 0.72rem;\">Configure tagging rules</span>\n </div>\n </div>\n </div>\n </div>\n</mj-page-body-interior>\n"]}
|