@memberjunction/ng-dashboards 6.2.0-edge.6 → 6.2.0-edge.8
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 +23 -16
- package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js +2 -2
- package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-management.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-management.component.js +3 -1
- package/dist/AI/components/analytics/realtime/realtime-management.component.js.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-overview.component.d.ts +1 -1
- package/dist/AI/components/analytics/realtime/realtime-overview.component.js +3 -3
- package/dist/AI/components/analytics/realtime/realtime-overview.component.js.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts +6 -4
- package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-session-data.js +8 -2
- package/dist/AI/components/analytics/realtime/realtime-session-data.js.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +31 -10
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
- package/dist/AI/components/autotagging/components/classify-item-grid.component.js +1 -1
- package/dist/AI/components/autotagging/components/classify-item-grid.component.js.map +1 -1
- package/dist/AI/components/autotagging/components/classify-org-context-editor.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/components/classify-org-context-editor.component.js +1 -0
- package/dist/AI/components/autotagging/components/classify-org-context-editor.component.js.map +1 -1
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js +1 -0
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js.map +1 -1
- package/dist/AI/components/autotagging/tabs/sources-tab.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js +1 -0
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +2 -2
- package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +14 -24
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -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 +14 -7
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.d.ts.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.js +4 -2
- package/dist/AI/services/ai-instrumentation.service.js.map +1 -1
- package/dist/Actions/action-result-code.d.ts +80 -0
- package/dist/Actions/action-result-code.d.ts.map +1 -0
- package/dist/Actions/action-result-code.js +163 -0
- package/dist/Actions/action-result-code.js.map +1 -0
- package/dist/Actions/components/actions-overview.component.d.ts +8 -0
- package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +12 -9
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.d.ts +29 -9
- package/dist/Actions/components/execution-monitoring.component.d.ts.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.js +65 -42
- package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-card.component.d.ts.map +1 -1
- package/dist/Actions/components/explorer/action-card.component.js +5 -4
- package/dist/Actions/components/explorer/action-card.component.js.map +1 -1
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +92 -130
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -1
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +189 -274
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -1
- package/dist/ChiefOfStaff/chief-of-staff-approvals.component.d.ts +29 -0
- package/dist/ChiefOfStaff/chief-of-staff-approvals.component.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-approvals.component.js +666 -0
- package/dist/ChiefOfStaff/chief-of-staff-approvals.component.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-governance.component.d.ts +56 -0
- package/dist/ChiefOfStaff/chief-of-staff-governance.component.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-governance.component.js +515 -0
- package/dist/ChiefOfStaff/chief-of-staff-governance.component.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-live-refresh.d.ts +14 -0
- package/dist/ChiefOfStaff/chief-of-staff-live-refresh.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-live-refresh.js +39 -0
- package/dist/ChiefOfStaff/chief-of-staff-live-refresh.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-overview.component.d.ts +17 -0
- package/dist/ChiefOfStaff/chief-of-staff-overview.component.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-overview.component.js +485 -0
- package/dist/ChiefOfStaff/chief-of-staff-overview.component.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-page-base.d.ts +139 -0
- package/dist/ChiefOfStaff/chief-of-staff-page-base.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-page-base.js +602 -0
- package/dist/ChiefOfStaff/chief-of-staff-page-base.js.map +1 -0
- package/dist/ChiefOfStaff/index.d.ts +4 -1
- package/dist/ChiefOfStaff/index.d.ts.map +1 -1
- package/dist/ChiefOfStaff/index.js +4 -1
- package/dist/ChiefOfStaff/index.js.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.js +3 -3
- package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
- package/dist/Communication/communication-runs-resource.component.js +3 -3
- package/dist/Communication/communication-runs-resource.component.js.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.js +1 -0
- package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +2 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/services/component-version.service.d.ts.map +1 -1
- package/dist/ComponentStudio/services/component-version.service.js +3 -0
- package/dist/ComponentStudio/services/component-version.service.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +21 -2
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +32 -5
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DevTools/graphql-console.component.js +2 -2
- package/dist/DevTools/lazy-module-status.component.js +2 -2
- package/dist/FormBuilder/form-builder-resource.component.d.ts.map +1 -1
- package/dist/FormBuilder/form-builder-resource.component.js +5 -0
- package/dist/FormBuilder/form-builder-resource.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +2 -2
- package/dist/Integration/services/integration-data.service.d.ts +1 -1
- package/dist/Integration/services/integration-data.service.d.ts.map +1 -1
- package/dist/Integration/services/integration-data.service.js +4 -3
- package/dist/Integration/services/integration-data.service.js.map +1 -1
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.d.ts.map +1 -1
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js +11 -3
- package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js.map +1 -1
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +16 -16
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
- package/dist/KnowledgeHub/components/visualize/semantic-graph/semantic-graph-explorer.component.d.ts +113 -0
- package/dist/KnowledgeHub/components/visualize/semantic-graph/semantic-graph-explorer.component.d.ts.map +1 -0
- package/dist/KnowledgeHub/components/visualize/semantic-graph/semantic-graph-explorer.component.js +1184 -0
- package/dist/KnowledgeHub/components/visualize/semantic-graph/semantic-graph-explorer.component.js.map +1 -0
- package/dist/KnowledgeHub/components/visualize/visualize-agent-context.d.ts +1 -1
- package/dist/KnowledgeHub/components/visualize/visualize-agent-context.d.ts.map +1 -1
- package/dist/KnowledgeHub/components/visualize/visualize-agent-context.js +1 -1
- package/dist/KnowledgeHub/components/visualize/visualize-agent-context.js.map +1 -1
- package/dist/KnowledgeHub/components/visualize/visualize-resource.component.d.ts +1 -1
- package/dist/KnowledgeHub/components/visualize/visualize-resource.component.d.ts.map +1 -1
- package/dist/KnowledgeHub/components/visualize/visualize-resource.component.js +21 -10
- package/dist/KnowledgeHub/components/visualize/visualize-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
- package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -1
- package/dist/LoginStudio/login-studio-resource.component.js +1 -0
- package/dist/LoginStudio/login-studio-resource.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.js +1 -0
- package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +2 -2
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +3 -0
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
- package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
- package/dist/PredictiveStudio/engine/predictive-studio.engine.js +1 -0
- package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +1 -0
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts +26 -0
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +375 -252
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/dist/SystemDiagnostics/system-diagnostics.component.d.ts.map +1 -1
- package/dist/SystemDiagnostics/system-diagnostics.component.js +4 -2
- package/dist/SystemDiagnostics/system-diagnostics.component.js.map +1 -1
- package/dist/UserRoutines/user-routines-resource.component.d.ts +8 -1
- package/dist/UserRoutines/user-routines-resource.component.d.ts.map +1 -1
- package/dist/UserRoutines/user-routines-resource.component.js +22 -4
- package/dist/UserRoutines/user-routines-resource.component.js.map +1 -1
- package/dist/VersionHistory/components/diff-resource.component.d.ts.map +1 -1
- package/dist/VersionHistory/components/diff-resource.component.js +1 -0
- package/dist/VersionHistory/components/diff-resource.component.js.map +1 -1
- package/dist/VideoStudio/components/vs-archetype-editor.component.d.ts +162 -0
- package/dist/VideoStudio/components/vs-archetype-editor.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-archetype-editor.component.js +1105 -0
- package/dist/VideoStudio/components/vs-archetype-editor.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-audio-options.component.d.ts +27 -0
- package/dist/VideoStudio/components/vs-audio-options.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-audio-options.component.js +119 -0
- package/dist/VideoStudio/components/vs-audio-options.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-copilot-panel.component.d.ts +105 -0
- package/dist/VideoStudio/components/vs-copilot-panel.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-copilot-panel.component.js +560 -0
- package/dist/VideoStudio/components/vs-copilot-panel.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-production-brief.component.d.ts +163 -0
- package/dist/VideoStudio/components/vs-production-brief.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-production-brief.component.js +1054 -0
- package/dist/VideoStudio/components/vs-production-brief.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-setup-health-card.component.d.ts +43 -0
- package/dist/VideoStudio/components/vs-setup-health-card.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-setup-health-card.component.js +412 -0
- package/dist/VideoStudio/components/vs-setup-health-card.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-studio-slide-in.component.d.ts +73 -0
- package/dist/VideoStudio/components/vs-studio-slide-in.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-studio-slide-in.component.js +271 -0
- package/dist/VideoStudio/components/vs-studio-slide-in.component.js.map +1 -0
- package/dist/VideoStudio/index.d.ts +12 -0
- package/dist/VideoStudio/index.d.ts.map +1 -0
- package/dist/VideoStudio/index.js +12 -0
- package/dist/VideoStudio/index.js.map +1 -0
- package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.d.ts +118 -0
- package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.d.ts.map +1 -0
- package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.js +964 -0
- package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.js.map +1 -0
- package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.d.ts +70 -0
- package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.d.ts.map +1 -0
- package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.js +600 -0
- package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.js.map +1 -0
- package/dist/VideoStudio/resources/video-studio-productions-resource.component.d.ts +182 -0
- package/dist/VideoStudio/resources/video-studio-productions-resource.component.d.ts.map +1 -0
- package/dist/VideoStudio/resources/video-studio-productions-resource.component.js +1481 -0
- package/dist/VideoStudio/resources/video-studio-productions-resource.component.js.map +1 -0
- package/dist/VideoStudio/services/vs-studio-slide-in-state.service.d.ts +102 -0
- package/dist/VideoStudio/services/vs-studio-slide-in-state.service.d.ts.map +1 -0
- package/dist/VideoStudio/services/vs-studio-slide-in-state.service.js +240 -0
- package/dist/VideoStudio/services/vs-studio-slide-in-state.service.js.map +1 -0
- package/dist/VideoStudio/video-studio-agent-context.d.ts +495 -0
- package/dist/VideoStudio/video-studio-agent-context.d.ts.map +1 -0
- package/dist/VideoStudio/video-studio-agent-context.js +992 -0
- package/dist/VideoStudio/video-studio-agent-context.js.map +1 -0
- package/dist/ai-dashboards.module.d.ts +46 -41
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +33 -7
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/module.d.ts +13 -12
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +7 -0
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +8 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +10 -2
- package/dist/public-api.js.map +1 -1
- package/dist/shared/action-scheduled-job.d.ts.map +1 -1
- package/dist/shared/action-scheduled-job.js +2 -0
- package/dist/shared/action-scheduled-job.js.map +1 -1
- package/dist/video-studio-dashboards.module.d.ts +40 -0
- package/dist/video-studio-dashboards.module.d.ts.map +1 -0
- package/dist/video-studio-dashboards.module.js +159 -0
- package/dist/video-studio-dashboards.module.js.map +1 -0
- package/package.json +78 -71
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +0 -195
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +0 -1
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +0 -2910
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualize-resource.component.js","sourceRoot":"","sources":["../../../../src/KnowledgeHub/components/visualize/visualize-resource.component.ts","../../../../src/KnowledgeHub/components/visualize/visualize-resource.component.html"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAA4B,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAgB,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAIrF,OAAO,EACH,0BAA0B,EAC1B,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,GAGtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;;;;;;;;;IC1BrF,kCAMgC;IAA9B,gNAAS,6BAAmB,KAAC;IAC7B,oBAA2B;IAC3B,4BAAM;IAAA,YAAgB;IACxB,AADwB,iBAAO,EACtB;;;;IALP,yDAAsC;;IAGnC,cAAmB;IAAnB,2BAAmB;IAChB,eAAgB;IAAhB,mCAAgB;;;;IAWxB,8DAEsD;IAApD,4PAAuB,kCAA2B,KAAC;IACrD,iBAAqC;;IAFnC,+BAAiB;;;;IAInB,+CAGwC;IAAtC,2NAAe,4BAAqB,KAAC;IACvC,iBAAmB;;;IAFjB,0CAAqB;;ADkB1B,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,qBAAqB;;IAC1C,QAAQ,CAAqB;IAEpD,wCAAwC;IACxC,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;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AAC;IACL,CAAC;qRA9XQ,0BAA0B,yBAA1B,0BAA0B;6DAA1B,0BAA0B;;;;;;YC9CjC,AADF,AAJF,AADF,sCAAgB,wBAIsD,aACrD,aAC6B;YACtC,2GAWC;YAGP,AADE,AADE,iBAAM,EACF,EACS;YAIb,AADF,AADF,uCAA8C,aACX,aACH;YAMxB,AALF,2HAAgC,qFAKvB;YAOX,iBAAM;YAEN,oDAQ+C;YAA7C,AADA,2HAAU,oBAAgB,IAAC,4HACb,iCAA6B,IAAC;YAIpD,AADE,AADE,AADE,iBAA0B,EACtB,EACO,EACA;;YA7CT,eAWC;YAXD,wBAWC;YAKO,eAAa;YAAC,AAAd,2BAAa,kBAAkB;YAGvC,eAWC;YAXD,uDAWC;YAID,eAA4B;YAK5B,AADA,AADA,AADA,AADA,AADA,8CAA4B,mCACE,6BACN,mCACM,2BACR,iCACM;;;ADMvB,0BAA0B;IAPtC,aAAa,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;GAOjD,0BAA0B,CA+XtC;;iFA/XY,0BAA0B;cANtC,SAAS;6BACM,KAAK,YACP,wBAAwB;;kBAKjC,SAAS;mBAAC,UAAU;;kFADZ,0BAA0B;AAiYvC,8BAA8B;AAC9B,MAAM,UAAU,qBAAqB;IACjC,yCAAyC;AAC7C,CAAC","sourcesContent":["/**\n * @fileoverview Knowledge Hub \"Visualize\" Resource (host surface)\n *\n * Phase 5 host surface that replaces the standalone \"Clusters\" tab. It hosts two\n * visualization modes behind an internal segmented control:\n * - \"Clusters\" — the existing cluster scatter visualization (embedded child).\n * - \"Tag Cloud\" — a weighted tag cloud driven by TagCloudEngine.\n *\n * Both modes feed ONE shared record-drilldown panel:\n * - cluster point selection → a single record opened/listed.\n * - tag-cloud word selection → the records carrying that tag (via RunView).\n *\n * The host owns the resource lifecycle (NotifyLoadComplete), agent context\n * (ActiveVisualizationMode), and all navigation — the embedded children emit\n * open-record intents up to here.\n */\n\nimport { Component, ChangeDetectorRef, OnDestroy, AfterViewInit, inject, ViewChild } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { CompositeKey, RunView } from '@memberjunction/core';\nimport { ResourceData, UserInfoEngine } from '@memberjunction/core-entities';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';\nimport { TagCloudScope } from '@memberjunction/tag-engine-base';\nimport { TagCloudComponent, TagCloudSelection } from './tag-cloud/tag-cloud.component';\nimport { DrilldownRecord, DrilldownOpenRequest } from './record-drilldown/record-drilldown.component';\nimport {\n BuildVisualizeAgentContext,\n ResolveDrilldownRecord,\n CapVisualizeList,\n VISUALIZATION_MODES,\n VisualizationModeId,\n DrilldownRecordSummary,\n} from './visualize-agent-context';\nimport { ValidateEnumParam, ValidateStringParam } from '../../../shared/agent-tool-validation';\n\n/** Visualization modes hosted by this surface. */\nexport type VisualizationMode = 'clusters' | 'tagcloud';\n\ninterface ModeOption {\n ID: VisualizationMode;\n Label: string;\n Icon: string;\n}\n\n@RegisterClass(BaseResourceComponent, 'VisualizationResource')\n@Component({\n standalone: false,\n selector: 'app-visualize-resource',\n templateUrl: './visualize-resource.component.html',\n styleUrls: ['./visualize-resource.component.css'],\n})\nexport class VisualizeResourceComponent extends BaseResourceComponent implements AfterViewInit, OnDestroy {\n @ViewChild('tagCloud') TagCloud?: TagCloudComponent;\n\n /** @deprecated Use {@link TagCloud}. */\n get tagCloud(): TagCloudComponent | undefined {\n return this.TagCloud;\n }\n /** @deprecated Use {@link TagCloud}. */\n set tagCloud(value: TagCloudComponent | undefined) {\n this.TagCloud = value;\n }\n\n private cdr = inject(ChangeDetectorRef);\n protected override navigationService = inject(NavigationService);\n protected override destroy$ = new Subject<void>();\n\n // ================================================================\n // Resource overrides\n // ================================================================\n\n async GetResourceDisplayName(_data: ResourceData): Promise<string> {\n return 'Visualize';\n }\n\n async GetResourceIconClass(_data: ResourceData): Promise<string> {\n return 'fa-solid fa-circle-nodes';\n }\n\n // ================================================================\n // Mode switch\n // ================================================================\n\n public Modes: ModeOption[] = [\n { ID: 'clusters', Label: 'Clusters', Icon: 'fa-solid fa-circle-nodes' },\n { ID: 'tagcloud', Label: 'Tag Cloud', Icon: 'fa-solid fa-cloud' },\n ];\n\n public ActiveMode: VisualizationMode = 'clusters';\n\n // ================================================================\n // Shared drilldown state\n // ================================================================\n\n public DrilldownVisible = false;\n public DrilldownTitle = '';\n public DrilldownSubtitle = '';\n public DrilldownIcon = 'fa-solid fa-list';\n public DrilldownLoading = false;\n public DrilldownRecords: DrilldownRecord[] = [];\n\n // ================================================================\n // Preferences\n // ================================================================\n\n /** Current preference key for the active mode. */\n private static readonly PREFS_KEY = 'KH_Visualize_Mode';\n /** Legacy key (pre-rename) — read for back-compat only. */\n private static readonly LEGACY_PREFS_KEY = 'KH_Clusters_ActiveTab';\n\n // ================================================================\n // Lifecycle\n // ================================================================\n\n async ngAfterViewInit(): Promise<void> {\n await UserInfoEngine.Instance.Config(false);\n this.loadModePreference();\n this.emitAgentContext();\n this.registerAgentTools();\n // loadModePreference() may flip ActiveMode AFTER the view's first CD pass\n // (it runs post-`await`), which swaps the `@if (IsActiveMode('clusters'))`\n // branch and the embedded child's count bindings mid-cycle — surfacing an\n // NG0100. Flush once here so the mode is settled before the next checked render.\n this.cdr.detectChanges();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // ================================================================\n // Mode switching\n // ================================================================\n\n public SelectMode(mode: VisualizationMode): void {\n if (this.ActiveMode === mode) {\n return;\n }\n this.ActiveMode = mode;\n this.CloseDrilldown();\n this.persistModePreference();\n this.emitAgentContext();\n this.cdr.detectChanges();\n }\n\n public IsActiveMode(mode: VisualizationMode): boolean {\n return this.ActiveMode === mode;\n }\n\n public TrackByMode(_index: number, mode: ModeOption): string {\n return mode.ID;\n }\n\n // ================================================================\n // Drilldown — shared by both modes\n // ================================================================\n\n /** Cluster mode: open the underlying entity record directly. */\n public OnClusterOpenRecord(request: { EntityName: string; RecordID: string }): void {\n this.openEntityRecord(request.EntityName, request.RecordID);\n }\n\n /** Tag-cloud mode: list the records carrying the clicked tag in the drilldown. */\n public async OnTagSelected(selection: TagCloudSelection): Promise<void> {\n this.DrilldownVisible = true;\n this.DrilldownLoading = true;\n this.DrilldownIcon = 'fa-solid fa-tag';\n this.DrilldownTitle = selection.Tag;\n this.DrilldownSubtitle = `${selection.Count} tagged ${selection.Count === 1 ? 'record' : 'records'}`;\n this.DrilldownRecords = [];\n this.cdr.detectChanges();\n\n this.emitAgentContext();\n\n try {\n this.DrilldownRecords = await this.loadRecordsForTag(selection.Tag, selection.Scope);\n } catch (error) {\n console.error('[Visualize] Error loading tag records:', error);\n this.DrilldownRecords = [];\n } finally {\n this.DrilldownLoading = false;\n this.emitAgentContext();\n this.cdr.detectChanges();\n }\n }\n\n /** Drilldown open-record intent (from the shared panel). */\n public OnDrilldownOpenRecord(request: DrilldownOpenRequest): void {\n this.openEntityRecord(request.EntityName, request.RecordID);\n }\n\n public CloseDrilldown(): void {\n this.DrilldownVisible = false;\n this.DrilldownRecords = [];\n this.DrilldownLoading = false;\n this.emitAgentContext();\n this.cdr.detectChanges();\n }\n\n // ================================================================\n // Private helpers\n // ================================================================\n\n /**\n * Load the content-item records carrying a given tag, scoped to the same\n * content-source / content-type the cloud was built with. Each returned row\n * is a `MJ: Content Items` record the user can open.\n */\n private async loadRecordsForTag(tag: string, scope: TagCloudScope): Promise<DrilldownRecord[]> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const user = this.ProviderToUse.CurrentUser;\n\n // 1) Tag rows for this tag text → ItemID + Weight.\n const safeTag = tag.replace(/'/g, \"''\");\n const tagResult = await rv.RunView<{ ItemID: string; Item: string | null; Weight: number }>({\n EntityName: 'MJ: Content Item Tags',\n ExtraFilter: `Tag = '${safeTag}'`,\n Fields: ['ItemID', 'Item', 'Weight'],\n MaxRows: 200,\n ResultType: 'simple',\n }, user);\n\n if (!tagResult.Success || tagResult.Results.length === 0) {\n return [];\n }\n\n // De-dupe by ItemID, keep the highest weight seen.\n const byItem = new Map<string, { item: string | null; weight: number }>();\n for (const row of tagResult.Results) {\n const existing = byItem.get(row.ItemID);\n if (!existing || row.Weight > existing.weight) {\n byItem.set(row.ItemID, { item: row.Item, weight: row.Weight });\n }\n }\n const itemIDs = Array.from(byItem.keys());\n\n // 2) Resolve content-item details, narrowed by scope when present.\n const itemFilter = this.buildItemFilter(itemIDs, scope);\n const itemResult = await rv.RunView<{\n ID: string; Name: string | null; ContentSource: string | null; ContentType: string;\n }>({\n EntityName: 'MJ: Content Items',\n ExtraFilter: itemFilter,\n Fields: ['ID', 'Name', 'ContentSource', 'ContentType'],\n MaxRows: 200,\n ResultType: 'simple',\n }, user);\n\n if (!itemResult.Success) {\n return [];\n }\n\n return itemResult.Results.map(item => {\n const tagged = byItem.get(item.ID);\n const subtitleParts = [item.ContentType, item.ContentSource].filter(p => !!p);\n return {\n EntityName: 'MJ: Content Items',\n RecordID: item.ID,\n Title: item.Name || tagged?.item || 'Untitled',\n Subtitle: subtitleParts.join(' · '),\n Weight: tagged?.weight,\n } as DrilldownRecord;\n }).sort((a, b) => (b.Weight ?? 0) - (a.Weight ?? 0));\n }\n\n /** Build the `MJ: Content Items` filter: ID IN (...) plus optional scope. */\n private buildItemFilter(itemIDs: string[], scope: TagCloudScope): string {\n const fragments: string[] = [];\n if (itemIDs.length > 0) {\n const quoted = itemIDs.map(id => `'${id.replace(/'/g, \"''\")}'`).join(', ');\n fragments.push(`ID IN (${quoted})`);\n }\n if (scope.ContentSourceIDs && scope.ContentSourceIDs.length > 0) {\n const quoted = scope.ContentSourceIDs.map(id => `'${id.replace(/'/g, \"''\")}'`).join(', ');\n fragments.push(`ContentSourceID IN (${quoted})`);\n }\n if (scope.ContentTypeIDs && scope.ContentTypeIDs.length > 0) {\n const quoted = scope.ContentTypeIDs.map(id => `'${id.replace(/'/g, \"''\")}'`).join(', ');\n fragments.push(`ContentTypeID IN (${quoted})`);\n }\n return fragments.join(' AND ');\n }\n\n /** Open an entity record via NavigationService (single navigation path). */\n private openEntityRecord(entityName: string, recordID: string): void {\n if (!entityName || !recordID) {\n return;\n }\n const md = this.ProviderToUse;\n const pkey = CompositeKey.FromURLSegment(md.EntityByName(entityName), recordID);\n this.navigationService.OpenEntityRecord(entityName, pkey);\n }\n\n // ================================================================\n // Agent context + tools\n // ================================================================\n\n /**\n * Publish the host's state to the AI agent. Re-emitted whenever the mode\n * switches or the shared drilldown opens/loads/closes — so the streamed\n * context tracks what's on screen. Deepened to Data-Explorer depth: the\n * available modes plus the shared drilldown panel (open/loading state, what\n * it's showing, and the records it currently lists by id+title).\n */\n private emitAgentContext(): void {\n this.navigationService.SetAgentContext(this, BuildVisualizeAgentContext({\n ActiveMode: this.ActiveMode,\n AvailableModes: [...VISUALIZATION_MODES],\n DrilldownVisible: this.DrilldownVisible,\n DrilldownLoading: this.DrilldownLoading,\n DrilldownTitle: this.DrilldownTitle,\n DrilldownSubtitle: this.DrilldownSubtitle,\n DrilldownRecords: this.buildDrilldownSummaries(),\n }));\n }\n\n /** Map the loaded drilldown rows to bounded id+title+subtitle summaries for the agent. */\n private buildDrilldownSummaries(): DrilldownRecordSummary[] {\n return this.DrilldownRecords.map(r => ({\n RecordID: r.RecordID,\n Title: r.Title,\n Subtitle: r.Subtitle ?? '',\n }));\n }\n\n /**\n * 🚨 SAFETY BOUNDARY (Knowledge Hub · Visualize host)\n * ------------------------------------------------------------------\n * The agent may SWITCH the visualization mode, OPEN a record currently\n * listed in the shared drilldown (by id or title), and CLOSE the\n * drilldown. All are read-only navigations / view-state changes.\n *\n * Nothing here mutates, deletes, or re-tags content. The embedded\n * Clusters child registers its OWN deep tools when it is the standalone\n * surface; here it is Embedded, so cluster recompute is reached through\n * the child's UI, not duplicated on the host. Tolerant handlers: every\n * Handler returns { Success, Data?, ErrorMessage? } and never throws;\n * drilldown references resolve id→title→contains.\n */\n private registerAgentTools(): void {\n this.navigationService.SetAgentClientTools(this, [\n {\n Name: 'SwitchVisualizationMode',\n Description: 'Switch the Visualize surface mode (clusters or tagcloud)',\n ParameterSchema: {\n type: 'object',\n properties: { mode: { type: 'string', enum: [...VISUALIZATION_MODES] } },\n required: ['mode'],\n },\n Handler: async (params: Record<string, unknown>) => {\n const check = ValidateEnumParam(params['mode'], VISUALIZATION_MODES, 'mode');\n if (!check.ok) {\n return check.result;\n }\n this.SelectMode(check.value as VisualizationModeId);\n return { Success: true, Data: { ActiveMode: this.ActiveMode } };\n },\n },\n {\n Name: 'OpenDrilldownRecord',\n Description: 'Open one of the records currently listed in the shared drilldown panel, by record id or title. Only available while the drilldown is open.',\n ParameterSchema: {\n type: 'object',\n properties: { reference: { type: 'string', description: 'The record id or its on-screen title.' } },\n required: ['reference'],\n },\n Handler: async (params: Record<string, unknown>) => {\n const check = ValidateStringParam(params['reference'], 'reference');\n if (!check.ok) {\n return check.result;\n }\n if (!this.DrilldownVisible || this.DrilldownRecords.length === 0) {\n return { Success: false, ErrorMessage: 'The drilldown panel is empty — select a tag or cluster point first.' };\n }\n const candidates = this.DrilldownRecords.map(r => ({ RecordID: r.RecordID, Title: r.Title }));\n const match = ResolveDrilldownRecord(check.value, candidates);\n if (!match) {\n const titles = CapVisualizeList(candidates.map(c => c.Title));\n return { Success: false, ErrorMessage: `No drilldown record matches \"${check.value}\". Listed records include: ${titles.join(', ')}.` };\n }\n const full = this.DrilldownRecords.find(r => r.RecordID === match.RecordID);\n if (full) {\n this.openEntityRecord(full.EntityName, full.RecordID);\n }\n return { Success: true, Data: { Title: match.Title } };\n },\n },\n {\n Name: 'CloseDrilldown',\n Description: 'Close the shared drilldown panel.',\n ParameterSchema: { type: 'object', properties: {} },\n Handler: async () => {\n this.CloseDrilldown();\n return { Success: true };\n },\n },\n {\n Name: 'ListDrilldownRecords',\n Description: 'List the records currently shown in the shared drilldown panel (bounded).',\n ParameterSchema: { type: 'object', properties: {} },\n Handler: async () => {\n return {\n Success: true,\n Data: {\n DrilldownVisible: this.DrilldownVisible,\n DrilldownTitle: this.DrilldownTitle || null,\n Records: CapVisualizeList(this.buildDrilldownSummaries()),\n TotalCount: this.DrilldownRecords.length,\n },\n };\n },\n },\n ]);\n }\n\n // ================================================================\n // Preferences (with legacy back-compat)\n // ================================================================\n\n private persistModePreference(): void {\n UserInfoEngine.Instance.SetSettingDebounced(VisualizeResourceComponent.PREFS_KEY, this.ActiveMode);\n }\n\n private loadModePreference(): void {\n // Prefer the new key; fall back to the legacy \"Clusters\" tab key.\n const raw = UserInfoEngine.Instance.GetSetting(VisualizeResourceComponent.PREFS_KEY)\n ?? UserInfoEngine.Instance.GetSetting(VisualizeResourceComponent.LEGACY_PREFS_KEY);\n if (raw === 'clusters' || raw === 'tagcloud') {\n this.ActiveMode = raw;\n }\n }\n}\n\n/** Tree-shaking prevention */\nexport function LoadVisualizeResource(): void {\n // Prevents tree-shaking of the component\n}\n","<mj-page-layout>\n <mj-page-header\n Title=\"Visualize\"\n Icon=\"fa-solid fa-circle-nodes\"\n Subtitle=\"Explore your knowledge base as clusters or a tag cloud\">\n <div toolbar>\n <div class=\"mode-switch\" role=\"tablist\">\n @for (mode of Modes; track TrackByMode($index, mode)) {\n <button\n type=\"button\"\n class=\"mode-switch-btn\"\n role=\"tab\"\n [class.active]=\"IsActiveMode(mode.ID)\"\n [attr.aria-selected]=\"IsActiveMode(mode.ID)\"\n (click)=\"SelectMode(mode.ID)\">\n <i [class]=\"mode.Icon\"></i>\n <span>{{ mode.Label }}</span>\n </button>\n }\n </div>\n </div>\n </mj-page-header>\n\n <mj-page-body [Flex]=\"true\" [Padding]=\"false\">\n <div class=\"visualize-container\">\n <div class=\"visualize-main\">\n @if (IsActiveMode('clusters')) {\n <app-cluster-visualization-resource\n [Embedded]=\"true\"\n (OpenRecordRequested)=\"OnClusterOpenRecord($event)\">\n </app-cluster-visualization-resource>\n } @else {\n <app-kh-tag-cloud\n #tagCloud\n [Provider]=\"Provider\"\n (TagSelected)=\"OnTagSelected($event)\">\n </app-kh-tag-cloud>\n }\n </div>\n\n <app-kh-record-drilldown\n [Visible]=\"DrilldownVisible\"\n [IsLoading]=\"DrilldownLoading\"\n [Title]=\"DrilldownTitle\"\n [Subtitle]=\"DrilldownSubtitle\"\n [Icon]=\"DrilldownIcon\"\n [Records]=\"DrilldownRecords\"\n (Closed)=\"CloseDrilldown()\"\n (OpenRecord)=\"OnDrilldownOpenRecord($event)\">\n </app-kh-record-drilldown>\n </div>\n </mj-page-body>\n</mj-page-layout>\n"]}
|
|
1
|
+
{"version":3,"file":"visualize-resource.component.js","sourceRoot":"","sources":["../../../../src/KnowledgeHub/components/visualize/visualize-resource.component.ts","../../../../src/KnowledgeHub/components/visualize/visualize-resource.component.html"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAA4B,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAgB,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAIrF,OAAO,EACH,0BAA0B,EAC1B,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,GAGtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;;;;;;;;;;IC1BrF,kCAMgC;IAA9B,gNAAS,6BAAmB,KAAC;IAC7B,oBAA2B;IAC3B,4BAAM;IAAA,YAAgB;IACxB,AADwB,iBAAO,EACtB;;;;IALP,yDAAsC;;IAGnC,cAAmB;IAAnB,2BAAmB;IAChB,eAAgB;IAAhB,mCAA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,SAAS;mBAAC,UAAU;;kFADZ,0BAA0B;AAkYvC,8BAA8B;AAC9B,MAAM,UAAU,qBAAqB;IACjC,yCAAyC;AAC7C,CAAC","sourcesContent":["/**\n * @fileoverview Knowledge Hub \"Visualize\" Resource (host surface)\n *\n * Phase 5 host surface that replaces the standalone \"Clusters\" tab. It hosts two\n * visualization modes behind an internal segmented control:\n * - \"Clusters\" — the existing cluster scatter visualization (embedded child).\n * - \"Tag Cloud\" — a weighted tag cloud driven by TagCloudEngine.\n *\n * Both modes feed ONE shared record-drilldown panel:\n * - cluster point selection → a single record opened/listed.\n * - tag-cloud word selection → the records carrying that tag (via RunView).\n *\n * The host owns the resource lifecycle (NotifyLoadComplete), agent context\n * (ActiveVisualizationMode), and all navigation — the embedded children emit\n * open-record intents up to here.\n */\n\nimport { Component, ChangeDetectorRef, OnDestroy, AfterViewInit, inject, ViewChild } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { CompositeKey, RunView } from '@memberjunction/core';\nimport { ResourceData, UserInfoEngine } from '@memberjunction/core-entities';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';\nimport { TagCloudScope } from '@memberjunction/tag-engine-base';\nimport { TagCloudComponent, TagCloudSelection } from './tag-cloud/tag-cloud.component';\nimport { DrilldownRecord, DrilldownOpenRequest } from './record-drilldown/record-drilldown.component';\nimport {\n BuildVisualizeAgentContext,\n ResolveDrilldownRecord,\n CapVisualizeList,\n VISUALIZATION_MODES,\n VisualizationModeId,\n DrilldownRecordSummary,\n} from './visualize-agent-context';\nimport { ValidateEnumParam, ValidateStringParam } from '../../../shared/agent-tool-validation';\n\n/** Visualization modes hosted by this surface. */\nexport type VisualizationMode = 'clusters' | 'tagcloud' | 'graph';\n\ninterface ModeOption {\n ID: VisualizationMode;\n Label: string;\n Icon: string;\n}\n\n@RegisterClass(BaseResourceComponent, 'VisualizationResource')\n@Component({\n standalone: false,\n selector: 'app-visualize-resource',\n templateUrl: './visualize-resource.component.html',\n styleUrls: ['./visualize-resource.component.css'],\n})\nexport class VisualizeResourceComponent extends BaseResourceComponent implements AfterViewInit, OnDestroy {\n @ViewChild('tagCloud') TagCloud?: TagCloudComponent;\n\n /** @deprecated Use {@link TagCloud}. */\n get tagCloud(): TagCloudComponent | undefined {\n return this.TagCloud;\n }\n /** @deprecated Use {@link TagCloud}. */\n set tagCloud(value: TagCloudComponent | undefined) {\n this.TagCloud = value;\n }\n\n private cdr = inject(ChangeDetectorRef);\n protected override navigationService = inject(NavigationService);\n protected override destroy$ = new Subject<void>();\n\n // ================================================================\n // Resource overrides\n // ================================================================\n\n async GetResourceDisplayName(_data: ResourceData): Promise<string> {\n return 'Visualize';\n }\n\n async GetResourceIconClass(_data: ResourceData): Promise<string> {\n return 'fa-solid fa-circle-nodes';\n }\n\n // ================================================================\n // Mode switch\n // ================================================================\n\n public Modes: ModeOption[] = [\n { ID: 'clusters', Label: 'Clusters', Icon: 'fa-solid fa-circle-nodes' },\n { ID: 'tagcloud', Label: 'Tag Cloud', Icon: 'fa-solid fa-cloud' },\n { ID: 'graph', Label: 'Graphs & Canon', Icon: 'fa-solid fa-diagram-project' },\n ];\n\n public ActiveMode: VisualizationMode = 'clusters';\n\n // ================================================================\n // Shared drilldown state\n // ================================================================\n\n public DrilldownVisible = false;\n public DrilldownTitle = '';\n public DrilldownSubtitle = '';\n public DrilldownIcon = 'fa-solid fa-list';\n public DrilldownLoading = false;\n public DrilldownRecords: DrilldownRecord[] = [];\n\n // ================================================================\n // Preferences\n // ================================================================\n\n /** Current preference key for the active mode. */\n private static readonly PREFS_KEY = 'KH_Visualize_Mode';\n /** Legacy key (pre-rename) — read for back-compat only. */\n private static readonly LEGACY_PREFS_KEY = 'KH_Clusters_ActiveTab';\n\n // ================================================================\n // Lifecycle\n // ================================================================\n\n async ngAfterViewInit(): Promise<void> {\n await UserInfoEngine.Instance.Config(false);\n this.loadModePreference();\n this.emitAgentContext();\n this.registerAgentTools();\n // loadModePreference() may flip ActiveMode AFTER the view's first CD pass\n // (it runs post-`await`), which swaps the `@if (IsActiveMode('clusters'))`\n // branch and the embedded child's count bindings mid-cycle — surfacing an\n // NG0100. Flush once here so the mode is settled before the next checked render.\n this.cdr.detectChanges();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // ================================================================\n // Mode switching\n // ================================================================\n\n public SelectMode(mode: VisualizationMode): void {\n if (this.ActiveMode === mode) {\n return;\n }\n this.ActiveMode = mode;\n this.CloseDrilldown();\n this.persistModePreference();\n this.emitAgentContext();\n this.cdr.detectChanges();\n }\n\n public IsActiveMode(mode: VisualizationMode): boolean {\n return this.ActiveMode === mode;\n }\n\n public TrackByMode(_index: number, mode: ModeOption): string {\n return mode.ID;\n }\n\n // ================================================================\n // Drilldown — shared by both modes\n // ================================================================\n\n /** Cluster mode: open the underlying entity record directly. */\n public OnClusterOpenRecord(request: { EntityName: string; RecordID: string }): void {\n this.openEntityRecord(request.EntityName, request.RecordID);\n }\n\n /** Tag-cloud mode: list the records carrying the clicked tag in the drilldown. */\n public async OnTagSelected(selection: TagCloudSelection): Promise<void> {\n this.DrilldownVisible = true;\n this.DrilldownLoading = true;\n this.DrilldownIcon = 'fa-solid fa-tag';\n this.DrilldownTitle = selection.Tag;\n this.DrilldownSubtitle = `${selection.Count} tagged ${selection.Count === 1 ? 'record' : 'records'}`;\n this.DrilldownRecords = [];\n this.cdr.detectChanges();\n\n this.emitAgentContext();\n\n try {\n this.DrilldownRecords = await this.loadRecordsForTag(selection.Tag, selection.Scope);\n } catch (error) {\n console.error('[Visualize] Error loading tag records:', error);\n this.DrilldownRecords = [];\n } finally {\n this.DrilldownLoading = false;\n this.emitAgentContext();\n this.cdr.detectChanges();\n }\n }\n\n /** Drilldown open-record intent (from the shared panel). */\n public OnDrilldownOpenRecord(request: DrilldownOpenRequest): void {\n this.openEntityRecord(request.EntityName, request.RecordID);\n }\n\n public CloseDrilldown(): void {\n this.DrilldownVisible = false;\n this.DrilldownRecords = [];\n this.DrilldownLoading = false;\n this.emitAgentContext();\n this.cdr.detectChanges();\n }\n\n // ================================================================\n // Private helpers\n // ================================================================\n\n /**\n * Load the content-item records carrying a given tag, scoped to the same\n * content-source / content-type the cloud was built with. Each returned row\n * is a `MJ: Content Items` record the user can open.\n */\n private async loadRecordsForTag(tag: string, scope: TagCloudScope): Promise<DrilldownRecord[]> {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const user = this.ProviderToUse.CurrentUser;\n\n // 1) Tag rows for this tag text → ItemID + Weight.\n const safeTag = tag.replace(/'/g, \"''\");\n const tagResult = await rv.RunView<{ ItemID: string; Item: string | null; Weight: number }>({\n EntityName: 'MJ: Content Item Tags',\n ExtraFilter: `Tag = '${safeTag}'`,\n Fields: ['ItemID', 'Item', 'Weight'],\n MaxRows: 200,\n ResultType: 'simple',\n }, user);\n\n if (!tagResult.Success || tagResult.Results.length === 0) {\n return [];\n }\n\n // De-dupe by ItemID, keep the highest weight seen.\n const byItem = new Map<string, { item: string | null; weight: number }>();\n for (const row of tagResult.Results) {\n const existing = byItem.get(row.ItemID);\n if (!existing || row.Weight > existing.weight) {\n byItem.set(row.ItemID, { item: row.Item, weight: row.Weight });\n }\n }\n const itemIDs = Array.from(byItem.keys());\n\n // 2) Resolve content-item details, narrowed by scope when present.\n const itemFilter = this.buildItemFilter(itemIDs, scope);\n const itemResult = await rv.RunView<{\n ID: string; Name: string | null; ContentSource: string | null; ContentType: string;\n }>({\n EntityName: 'MJ: Content Items',\n ExtraFilter: itemFilter,\n Fields: ['ID', 'Name', 'ContentSource', 'ContentType'],\n MaxRows: 200,\n ResultType: 'simple',\n }, user);\n\n if (!itemResult.Success) {\n return [];\n }\n\n return itemResult.Results.map(item => {\n const tagged = byItem.get(item.ID);\n const subtitleParts = [item.ContentType, item.ContentSource].filter(p => !!p);\n return {\n EntityName: 'MJ: Content Items',\n RecordID: item.ID,\n Title: item.Name || tagged?.item || 'Untitled',\n Subtitle: subtitleParts.join(' · '),\n Weight: tagged?.weight,\n } as DrilldownRecord;\n }).sort((a, b) => (b.Weight ?? 0) - (a.Weight ?? 0));\n }\n\n /** Build the `MJ: Content Items` filter: ID IN (...) plus optional scope. */\n private buildItemFilter(itemIDs: string[], scope: TagCloudScope): string {\n const fragments: string[] = [];\n if (itemIDs.length > 0) {\n const quoted = itemIDs.map(id => `'${id.replace(/'/g, \"''\")}'`).join(', ');\n fragments.push(`ID IN (${quoted})`);\n }\n if (scope.ContentSourceIDs && scope.ContentSourceIDs.length > 0) {\n const quoted = scope.ContentSourceIDs.map(id => `'${id.replace(/'/g, \"''\")}'`).join(', ');\n fragments.push(`ContentSourceID IN (${quoted})`);\n }\n if (scope.ContentTypeIDs && scope.ContentTypeIDs.length > 0) {\n const quoted = scope.ContentTypeIDs.map(id => `'${id.replace(/'/g, \"''\")}'`).join(', ');\n fragments.push(`ContentTypeID IN (${quoted})`);\n }\n return fragments.join(' AND ');\n }\n\n /** Open an entity record via NavigationService (single navigation path). */\n private openEntityRecord(entityName: string, recordID: string): void {\n if (!entityName || !recordID) {\n return;\n }\n const md = this.ProviderToUse;\n const pkey = CompositeKey.FromURLSegment(md.EntityByName(entityName), recordID);\n this.navigationService.OpenEntityRecord(entityName, pkey);\n }\n\n // ================================================================\n // Agent context + tools\n // ================================================================\n\n /**\n * Publish the host's state to the AI agent. Re-emitted whenever the mode\n * switches or the shared drilldown opens/loads/closes — so the streamed\n * context tracks what's on screen. Deepened to Data-Explorer depth: the\n * available modes plus the shared drilldown panel (open/loading state, what\n * it's showing, and the records it currently lists by id+title).\n */\n private emitAgentContext(): void {\n this.navigationService.SetAgentContext(this, BuildVisualizeAgentContext({\n ActiveMode: this.ActiveMode,\n AvailableModes: [...VISUALIZATION_MODES],\n DrilldownVisible: this.DrilldownVisible,\n DrilldownLoading: this.DrilldownLoading,\n DrilldownTitle: this.DrilldownTitle,\n DrilldownSubtitle: this.DrilldownSubtitle,\n DrilldownRecords: this.buildDrilldownSummaries(),\n }));\n }\n\n /** Map the loaded drilldown rows to bounded id+title+subtitle summaries for the agent. */\n private buildDrilldownSummaries(): DrilldownRecordSummary[] {\n return this.DrilldownRecords.map(r => ({\n RecordID: r.RecordID,\n Title: r.Title,\n Subtitle: r.Subtitle ?? '',\n }));\n }\n\n /**\n * 🚨 SAFETY BOUNDARY (Knowledge Hub · Visualize host)\n * ------------------------------------------------------------------\n * The agent may SWITCH the visualization mode, OPEN a record currently\n * listed in the shared drilldown (by id or title), and CLOSE the\n * drilldown. All are read-only navigations / view-state changes.\n *\n * Nothing here mutates, deletes, or re-tags content. The embedded\n * Clusters child registers its OWN deep tools when it is the standalone\n * surface; here it is Embedded, so cluster recompute is reached through\n * the child's UI, not duplicated on the host. Tolerant handlers: every\n * Handler returns { Success, Data?, ErrorMessage? } and never throws;\n * drilldown references resolve id→title→contains.\n */\n private registerAgentTools(): void {\n this.navigationService.SetAgentClientTools(this, [\n {\n Name: 'SwitchVisualizationMode',\n Description: 'Switch the Visualize surface mode (clusters or tagcloud)',\n ParameterSchema: {\n type: 'object',\n properties: { mode: { type: 'string', enum: [...VISUALIZATION_MODES] } },\n required: ['mode'],\n },\n Handler: async (params: Record<string, unknown>) => {\n const check = ValidateEnumParam(params['mode'], VISUALIZATION_MODES, 'mode');\n if (!check.ok) {\n return check.result;\n }\n this.SelectMode(check.value as VisualizationModeId);\n return { Success: true, Data: { ActiveMode: this.ActiveMode } };\n },\n },\n {\n Name: 'OpenDrilldownRecord',\n Description: 'Open one of the records currently listed in the shared drilldown panel, by record id or title. Only available while the drilldown is open.',\n ParameterSchema: {\n type: 'object',\n properties: { reference: { type: 'string', description: 'The record id or its on-screen title.' } },\n required: ['reference'],\n },\n Handler: async (params: Record<string, unknown>) => {\n const check = ValidateStringParam(params['reference'], 'reference');\n if (!check.ok) {\n return check.result;\n }\n if (!this.DrilldownVisible || this.DrilldownRecords.length === 0) {\n return { Success: false, ErrorMessage: 'The drilldown panel is empty — select a tag or cluster point first.' };\n }\n const candidates = this.DrilldownRecords.map(r => ({ RecordID: r.RecordID, Title: r.Title }));\n const match = ResolveDrilldownRecord(check.value, candidates);\n if (!match) {\n const titles = CapVisualizeList(candidates.map(c => c.Title));\n return { Success: false, ErrorMessage: `No drilldown record matches \"${check.value}\". Listed records include: ${titles.join(', ')}.` };\n }\n const full = this.DrilldownRecords.find(r => r.RecordID === match.RecordID);\n if (full) {\n this.openEntityRecord(full.EntityName, full.RecordID);\n }\n return { Success: true, Data: { Title: match.Title } };\n },\n },\n {\n Name: 'CloseDrilldown',\n Description: 'Close the shared drilldown panel.',\n ParameterSchema: { type: 'object', properties: {} },\n Handler: async () => {\n this.CloseDrilldown();\n return { Success: true };\n },\n },\n {\n Name: 'ListDrilldownRecords',\n Description: 'List the records currently shown in the shared drilldown panel (bounded).',\n ParameterSchema: { type: 'object', properties: {} },\n Handler: async () => {\n return {\n Success: true,\n Data: {\n DrilldownVisible: this.DrilldownVisible,\n DrilldownTitle: this.DrilldownTitle || null,\n Records: CapVisualizeList(this.buildDrilldownSummaries()),\n TotalCount: this.DrilldownRecords.length,\n },\n };\n },\n },\n ]);\n }\n\n // ================================================================\n // Preferences (with legacy back-compat)\n // ================================================================\n\n private persistModePreference(): void {\n UserInfoEngine.Instance.SetSettingDebounced(VisualizeResourceComponent.PREFS_KEY, this.ActiveMode);\n }\n\n private loadModePreference(): void {\n // Prefer the new key; fall back to the legacy \"Clusters\" tab key.\n const raw = UserInfoEngine.Instance.GetSetting(VisualizeResourceComponent.PREFS_KEY)\n ?? UserInfoEngine.Instance.GetSetting(VisualizeResourceComponent.LEGACY_PREFS_KEY);\n if (raw === 'clusters' || raw === 'tagcloud' || raw === 'graph') {\n this.ActiveMode = raw;\n }\n }\n}\n\n/** Tree-shaking prevention */\nexport function LoadVisualizeResource(): void {\n // Prevents tree-shaking of the component\n}\n","<mj-page-layout>\n <mj-page-header\n Title=\"Visualize\"\n Icon=\"fa-solid fa-circle-nodes\"\n Subtitle=\"Explore your knowledge base as clusters or a tag cloud\">\n <div toolbar>\n <div class=\"mode-switch\" role=\"tablist\">\n @for (mode of Modes; track TrackByMode($index, mode)) {\n <button\n type=\"button\"\n class=\"mode-switch-btn\"\n role=\"tab\"\n [class.active]=\"IsActiveMode(mode.ID)\"\n [attr.aria-selected]=\"IsActiveMode(mode.ID)\"\n (click)=\"SelectMode(mode.ID)\">\n <i [class]=\"mode.Icon\"></i>\n <span>{{ mode.Label }}</span>\n </button>\n }\n </div>\n </div>\n </mj-page-header>\n\n <mj-page-body [Flex]=\"true\" [Padding]=\"false\">\n <div class=\"visualize-container\">\n <div class=\"visualize-main\">\n @if (IsActiveMode('clusters')) {\n <app-cluster-visualization-resource\n [Embedded]=\"true\"\n (OpenRecordRequested)=\"OnClusterOpenRecord($event)\">\n </app-cluster-visualization-resource>\n } @else if (IsActiveMode('tagcloud')) {\n <app-kh-tag-cloud\n #tagCloud\n [Provider]=\"Provider\"\n (TagSelected)=\"OnTagSelected($event)\">\n </app-kh-tag-cloud>\n } @else {\n <app-kh-semantic-graph\n [Provider]=\"Provider\"\n (OpenRecordRequested)=\"OnClusterOpenRecord($event)\">\n </app-kh-semantic-graph>\n }\n </div>\n\n <app-kh-record-drilldown\n [Visible]=\"DrilldownVisible\"\n [IsLoading]=\"DrilldownLoading\"\n [Title]=\"DrilldownTitle\"\n [Subtitle]=\"DrilldownSubtitle\"\n [Icon]=\"DrilldownIcon\"\n [Records]=\"DrilldownRecords\"\n (Closed)=\"CloseDrilldown()\"\n (OpenRecord)=\"OnDrilldownOpenRecord($event)\">\n </app-kh-record-drilldown>\n </div>\n </mj-page-body>\n</mj-page-layout>\n"]}
|
|
@@ -1539,7 +1539,7 @@ let ListsBrowseResource = class ListsBrowseResource extends BaseResourceComponen
|
|
|
1539
1539
|
BypassCache: true
|
|
1540
1540
|
})));
|
|
1541
1541
|
countResults.forEach((res, idx) => {
|
|
1542
|
-
itemCounts.set(lists[idx].ID, res.Success ? res.TotalRowCount : 0);
|
|
1542
|
+
itemCounts.set(lists[idx].ID, res.Success ? res.TotalRowCount ?? 0 : 0);
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
1545
|
// Build entity info
|