@memberjunction/ng-dashboards 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AI/components/agents/agent-configuration.component.d.ts +24 -0
- package/dist/AI/components/agents/agent-configuration.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-configuration.component.js +198 -111
- package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
- package/dist/AI/components/models/model-management.component.d.ts +23 -0
- package/dist/AI/components/models/model-management.component.d.ts.map +1 -1
- package/dist/AI/components/models/model-management.component.js +189 -83
- package/dist/AI/components/models/model-management.component.js.map +1 -1
- package/dist/AI/components/prompts/prompt-management.component.d.ts +23 -0
- package/dist/AI/components/prompts/prompt-management.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/prompt-management.component.js +135 -30
- package/dist/AI/components/prompts/prompt-management.component.js.map +1 -1
- package/dist/APIKeys/api-applications-panel.component.d.ts +169 -0
- package/dist/APIKeys/api-applications-panel.component.d.ts.map +1 -0
- package/dist/APIKeys/api-applications-panel.component.js +1058 -0
- package/dist/APIKeys/api-applications-panel.component.js.map +1 -0
- package/dist/APIKeys/api-key-create-dialog.component.d.ts +125 -0
- package/dist/APIKeys/api-key-create-dialog.component.d.ts.map +1 -0
- package/dist/APIKeys/api-key-create-dialog.component.js +768 -0
- package/dist/APIKeys/api-key-create-dialog.component.js.map +1 -0
- package/dist/APIKeys/api-key-edit-panel.component.d.ts +149 -0
- package/dist/APIKeys/api-key-edit-panel.component.d.ts.map +1 -0
- package/dist/APIKeys/api-key-edit-panel.component.js +1074 -0
- package/dist/APIKeys/api-key-edit-panel.component.js.map +1 -0
- package/dist/APIKeys/api-key-list.component.d.ts +131 -0
- package/dist/APIKeys/api-key-list.component.d.ts.map +1 -0
- package/dist/APIKeys/api-key-list.component.js +818 -0
- package/dist/APIKeys/api-key-list.component.js.map +1 -0
- package/dist/APIKeys/api-keys-resource.component.d.ts +211 -0
- package/dist/APIKeys/api-keys-resource.component.d.ts.map +1 -0
- package/dist/APIKeys/api-keys-resource.component.js +1150 -0
- package/dist/APIKeys/api-keys-resource.component.js.map +1 -0
- package/dist/APIKeys/api-scopes-panel.component.d.ts +98 -0
- package/dist/APIKeys/api-scopes-panel.component.d.ts.map +1 -0
- package/dist/APIKeys/api-scopes-panel.component.js +652 -0
- package/dist/APIKeys/api-scopes-panel.component.js.map +1 -0
- package/dist/APIKeys/api-usage-panel.component.d.ts +174 -0
- package/dist/APIKeys/api-usage-panel.component.d.ts.map +1 -0
- package/dist/APIKeys/api-usage-panel.component.js +1013 -0
- package/dist/APIKeys/api-usage-panel.component.js.map +1 -0
- package/dist/APIKeys/index.d.ts +7 -0
- package/dist/APIKeys/index.d.ts.map +1 -0
- package/dist/APIKeys/index.js +8 -0
- package/dist/APIKeys/index.js.map +1 -0
- package/dist/Actions/components/explorer/action-breadcrumb.component.d.ts +22 -0
- package/dist/Actions/components/explorer/action-breadcrumb.component.d.ts.map +1 -0
- package/dist/Actions/components/explorer/action-breadcrumb.component.js +139 -0
- package/dist/Actions/components/explorer/action-breadcrumb.component.js.map +1 -0
- package/dist/Actions/components/explorer/action-card.component.d.ts +39 -0
- package/dist/Actions/components/explorer/action-card.component.d.ts.map +1 -0
- package/dist/Actions/components/explorer/action-card.component.js +410 -0
- package/dist/Actions/components/explorer/action-card.component.js.map +1 -0
- package/dist/Actions/components/explorer/action-explorer.component.d.ts +62 -0
- package/dist/Actions/components/explorer/action-explorer.component.d.ts.map +1 -0
- package/dist/Actions/components/explorer/action-explorer.component.js +527 -0
- package/dist/Actions/components/explorer/action-explorer.component.js.map +1 -0
- package/dist/Actions/components/explorer/action-list-item.component.d.ts +24 -0
- package/dist/Actions/components/explorer/action-list-item.component.d.ts.map +1 -0
- package/dist/Actions/components/explorer/action-list-item.component.js +210 -0
- package/dist/Actions/components/explorer/action-list-item.component.js.map +1 -0
- package/dist/Actions/components/explorer/action-toolbar.component.d.ts +63 -0
- package/dist/Actions/components/explorer/action-toolbar.component.d.ts.map +1 -0
- package/dist/Actions/components/explorer/action-toolbar.component.js +483 -0
- package/dist/Actions/components/explorer/action-toolbar.component.js.map +1 -0
- package/dist/Actions/components/explorer/action-tree-panel.component.d.ts +57 -0
- package/dist/Actions/components/explorer/action-tree-panel.component.d.ts.map +1 -0
- package/dist/Actions/components/explorer/action-tree-panel.component.js +454 -0
- package/dist/Actions/components/explorer/action-tree-panel.component.js.map +1 -0
- package/dist/Actions/components/explorer/index.d.ts +10 -0
- package/dist/Actions/components/explorer/index.d.ts.map +1 -0
- package/dist/Actions/components/explorer/index.js +14 -0
- package/dist/Actions/components/explorer/index.js.map +1 -0
- package/dist/Actions/components/explorer/new-action-panel.component.d.ts +49 -0
- package/dist/Actions/components/explorer/new-action-panel.component.d.ts.map +1 -0
- package/dist/Actions/components/explorer/new-action-panel.component.js +359 -0
- package/dist/Actions/components/explorer/new-action-panel.component.js.map +1 -0
- package/dist/Actions/components/explorer/new-category-panel.component.d.ts +37 -0
- package/dist/Actions/components/explorer/new-category-panel.component.d.ts.map +1 -0
- package/dist/Actions/components/explorer/new-category-panel.component.js +282 -0
- package/dist/Actions/components/explorer/new-category-panel.component.js.map +1 -0
- package/dist/Actions/index.d.ts +3 -0
- package/dist/Actions/index.d.ts.map +1 -1
- package/dist/Actions/index.js +5 -0
- package/dist/Actions/index.js.map +1 -1
- package/dist/Actions/services/action-explorer-state.service.d.ts +104 -0
- package/dist/Actions/services/action-explorer-state.service.d.ts.map +1 -0
- package/dist/Actions/services/action-explorer-state.service.js +352 -0
- package/dist/Actions/services/action-explorer-state.service.js.map +1 -0
- package/dist/Communication/communication-dashboard.component.d.ts +2 -6
- package/dist/Communication/communication-dashboard.component.d.ts.map +1 -1
- package/dist/Communication/communication-dashboard.component.js +142 -93
- package/dist/Communication/communication-dashboard.component.js.map +1 -1
- package/dist/Communication/communication-logs-resource.component.d.ts +10 -4
- package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-logs-resource.component.js +253 -121
- package/dist/Communication/communication-logs-resource.component.js.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.d.ts +38 -3
- package/dist/Communication/communication-monitor-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.js +431 -157
- package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
- package/dist/Communication/communication-providers-resource.component.d.ts +16 -5
- package/dist/Communication/communication-providers-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-providers-resource.component.js +229 -118
- package/dist/Communication/communication-providers-resource.component.js.map +1 -1
- package/dist/Communication/communication-runs-resource.component.d.ts +4 -2
- package/dist/Communication/communication-runs-resource.component.d.ts.map +1 -1
- package/dist/Communication/communication-runs-resource.component.js +155 -149
- package/dist/Communication/communication-runs-resource.component.js.map +1 -1
- package/dist/Communication/communication-templates-resource.component.d.ts +43 -0
- package/dist/Communication/communication-templates-resource.component.d.ts.map +1 -0
- package/dist/Communication/communication-templates-resource.component.js +371 -0
- package/dist/Communication/communication-templates-resource.component.js.map +1 -0
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts +69 -267
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.js +698 -1802
- package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts +68 -0
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js +401 -0
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js.map +1 -0
- package/dist/ComponentStudio/components/browser/component-browser.component.d.ts +44 -0
- package/dist/ComponentStudio/components/browser/component-browser.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/browser/component-browser.component.js +636 -0
- package/dist/ComponentStudio/components/browser/component-browser.component.js.map +1 -0
- package/dist/ComponentStudio/components/editors/code-editor-panel.component.d.ts +35 -0
- package/dist/ComponentStudio/components/editors/code-editor-panel.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/editors/code-editor-panel.component.js +380 -0
- package/dist/ComponentStudio/components/editors/code-editor-panel.component.js.map +1 -0
- package/dist/ComponentStudio/components/editors/data-requirements-editor.component.d.ts +24 -0
- package/dist/ComponentStudio/components/editors/data-requirements-editor.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/editors/data-requirements-editor.component.js +221 -0
- package/dist/ComponentStudio/components/editors/data-requirements-editor.component.js.map +1 -0
- package/dist/ComponentStudio/components/editors/requirements-editor.component.d.ts +28 -0
- package/dist/ComponentStudio/components/editors/requirements-editor.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/editors/requirements-editor.component.js +263 -0
- package/dist/ComponentStudio/components/editors/requirements-editor.component.js.map +1 -0
- package/dist/ComponentStudio/components/editors/spec-editor.component.d.ts +34 -0
- package/dist/ComponentStudio/components/editors/spec-editor.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/editors/spec-editor.component.js +307 -0
- package/dist/ComponentStudio/components/editors/spec-editor.component.js.map +1 -0
- package/dist/ComponentStudio/components/new-component-dialog/new-component-dialog.component.d.ts +29 -0
- package/dist/ComponentStudio/components/new-component-dialog/new-component-dialog.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/new-component-dialog/new-component-dialog.component.js +159 -0
- package/dist/ComponentStudio/components/new-component-dialog/new-component-dialog.component.js.map +1 -0
- package/dist/ComponentStudio/components/save-version-dialog/save-version-dialog.component.d.ts +20 -0
- package/dist/ComponentStudio/components/save-version-dialog/save-version-dialog.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/save-version-dialog/save-version-dialog.component.js +192 -0
- package/dist/ComponentStudio/components/save-version-dialog/save-version-dialog.component.js.map +1 -0
- package/dist/ComponentStudio/components/workspace/component-preview.component.d.ts +57 -0
- package/dist/ComponentStudio/components/workspace/component-preview.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/workspace/component-preview.component.js +342 -0
- package/dist/ComponentStudio/components/workspace/component-preview.component.js.map +1 -0
- package/dist/ComponentStudio/components/workspace/editor-tabs.component.d.ts +15 -0
- package/dist/ComponentStudio/components/workspace/editor-tabs.component.d.ts.map +1 -0
- package/dist/ComponentStudio/components/workspace/editor-tabs.component.js +144 -0
- package/dist/ComponentStudio/components/workspace/editor-tabs.component.js.map +1 -0
- package/dist/ComponentStudio/services/component-studio-state.service.d.ts +203 -0
- package/dist/ComponentStudio/services/component-studio-state.service.d.ts.map +1 -0
- package/dist/ComponentStudio/services/component-studio-state.service.js +651 -0
- package/dist/ComponentStudio/services/component-studio-state.service.js.map +1 -0
- package/dist/ComponentStudio/services/component-version.service.d.ts +120 -0
- package/dist/ComponentStudio/services/component-version.service.d.ts.map +1 -0
- package/dist/ComponentStudio/services/component-version.service.js +394 -0
- package/dist/ComponentStudio/services/component-version.service.js.map +1 -0
- package/dist/Credentials/components/credentials-categories-resource.component.d.ts +1 -1
- package/dist/Credentials/components/credentials-categories-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-categories-resource.component.js +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.d.ts +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.d.ts +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-types-resource.component.js +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js +4 -2
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
- package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.d.ts +2 -2
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +3 -3
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +22 -6
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/EntityAdmin/entity-admin-dashboard.component.js +2 -2
- package/dist/MCP/components/mcp-connection-dialog.component.d.ts +72 -0
- package/dist/MCP/components/mcp-connection-dialog.component.d.ts.map +1 -0
- package/dist/MCP/components/mcp-connection-dialog.component.js +529 -0
- package/dist/MCP/components/mcp-connection-dialog.component.js.map +1 -0
- package/dist/MCP/components/mcp-log-detail-panel.component.d.ts +77 -0
- package/dist/MCP/components/mcp-log-detail-panel.component.d.ts.map +1 -0
- package/dist/MCP/components/mcp-log-detail-panel.component.js +535 -0
- package/dist/MCP/components/mcp-log-detail-panel.component.js.map +1 -0
- package/dist/MCP/components/mcp-server-dialog.component.d.ts +77 -0
- package/dist/MCP/components/mcp-server-dialog.component.d.ts.map +1 -0
- package/dist/MCP/components/mcp-server-dialog.component.js +437 -0
- package/dist/MCP/components/mcp-server-dialog.component.js.map +1 -0
- package/dist/MCP/components/mcp-test-tool-dialog.component.d.ts +271 -0
- package/dist/MCP/components/mcp-test-tool-dialog.component.d.ts.map +1 -0
- package/dist/MCP/components/mcp-test-tool-dialog.component.js +1300 -0
- package/dist/MCP/components/mcp-test-tool-dialog.component.js.map +1 -0
- package/dist/MCP/index.d.ts +11 -0
- package/dist/MCP/index.d.ts.map +1 -0
- package/dist/MCP/index.js +15 -0
- package/dist/MCP/index.js.map +1 -0
- package/dist/MCP/mcp-dashboard.component.d.ts +409 -0
- package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -0
- package/dist/MCP/mcp-dashboard.component.js +2486 -0
- package/dist/MCP/mcp-dashboard.component.js.map +1 -0
- package/dist/MCP/mcp-resource.component.d.ts +20 -0
- package/dist/MCP/mcp-resource.component.d.ts.map +1 -0
- package/dist/MCP/mcp-resource.component.js +55 -0
- package/dist/MCP/mcp-resource.component.js.map +1 -0
- package/dist/MCP/mcp.module.d.ts +27 -0
- package/dist/MCP/mcp.module.d.ts.map +1 -0
- package/dist/MCP/mcp.module.js +122 -0
- package/dist/MCP/mcp.module.js.map +1 -0
- package/dist/MCP/services/mcp-tools.service.d.ts +109 -0
- package/dist/MCP/services/mcp-tools.service.d.ts.map +1 -0
- package/dist/MCP/services/mcp-tools.service.js +222 -0
- package/dist/MCP/services/mcp-tools.service.js.map +1 -0
- package/dist/Scheduling/components/index.d.ts +5 -8
- package/dist/Scheduling/components/index.d.ts.map +1 -1
- package/dist/Scheduling/components/index.js +6 -9
- package/dist/Scheduling/components/index.js.map +1 -1
- package/dist/Scheduling/components/job-slideout.component.d.ts +45 -0
- package/dist/Scheduling/components/job-slideout.component.d.ts.map +1 -0
- package/dist/Scheduling/components/job-slideout.component.js +458 -0
- package/dist/Scheduling/components/job-slideout.component.js.map +1 -0
- package/dist/Scheduling/components/scheduling-activity-resource.component.d.ts +19 -0
- package/dist/Scheduling/components/scheduling-activity-resource.component.d.ts.map +1 -0
- package/dist/Scheduling/components/scheduling-activity-resource.component.js +51 -0
- package/dist/Scheduling/components/scheduling-activity-resource.component.js.map +1 -0
- package/dist/Scheduling/components/scheduling-activity.component.d.ts +71 -0
- package/dist/Scheduling/components/scheduling-activity.component.d.ts.map +1 -0
- package/dist/Scheduling/components/scheduling-activity.component.js +714 -0
- package/dist/Scheduling/components/scheduling-activity.component.js.map +1 -0
- package/dist/Scheduling/components/scheduling-jobs-resource.component.d.ts +3 -4
- package/dist/Scheduling/components/scheduling-jobs-resource.component.d.ts.map +1 -1
- package/dist/Scheduling/components/scheduling-jobs-resource.component.js +3 -7
- package/dist/Scheduling/components/scheduling-jobs-resource.component.js.map +1 -1
- package/dist/Scheduling/components/scheduling-jobs.component.d.ts +52 -34
- package/dist/Scheduling/components/scheduling-jobs.component.d.ts.map +1 -1
- package/dist/Scheduling/components/scheduling-jobs.component.js +446 -261
- package/dist/Scheduling/components/scheduling-jobs.component.js.map +1 -1
- package/dist/Scheduling/components/scheduling-overview-resource.component.d.ts +19 -0
- package/dist/Scheduling/components/scheduling-overview-resource.component.d.ts.map +1 -0
- package/dist/Scheduling/components/scheduling-overview-resource.component.js +51 -0
- package/dist/Scheduling/components/scheduling-overview-resource.component.js.map +1 -0
- package/dist/Scheduling/components/scheduling-overview.component.d.ts +43 -0
- package/dist/Scheduling/components/scheduling-overview.component.d.ts.map +1 -0
- package/dist/Scheduling/components/scheduling-overview.component.js +595 -0
- package/dist/Scheduling/components/scheduling-overview.component.js.map +1 -0
- package/dist/Scheduling/scheduling-dashboard.component.d.ts +22 -32
- package/dist/Scheduling/scheduling-dashboard.component.d.ts.map +1 -1
- package/dist/Scheduling/scheduling-dashboard.component.js +175 -169
- package/dist/Scheduling/scheduling-dashboard.component.js.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts +49 -6
- package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.js +218 -149
- package/dist/Scheduling/services/scheduling-instrumentation.service.js.map +1 -1
- package/dist/Testing/components/index.d.ts +7 -8
- package/dist/Testing/components/index.d.ts.map +1 -1
- package/dist/Testing/components/index.js +8 -9
- package/dist/Testing/components/index.js.map +1 -1
- package/dist/Testing/components/testing-analytics-resource.component.d.ts +0 -4
- package/dist/Testing/components/testing-analytics-resource.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-analytics-resource.component.js +1 -7
- package/dist/Testing/components/testing-analytics-resource.component.js.map +1 -1
- package/dist/Testing/components/testing-analytics.component.d.ts +52 -37
- package/dist/Testing/components/testing-analytics.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-analytics.component.js +1023 -569
- package/dist/Testing/components/testing-analytics.component.js.map +1 -1
- package/dist/Testing/components/testing-dashboard-tab-resource.component.d.ts +16 -0
- package/dist/Testing/components/testing-dashboard-tab-resource.component.d.ts.map +1 -0
- package/dist/Testing/components/testing-dashboard-tab-resource.component.js +47 -0
- package/dist/Testing/components/testing-dashboard-tab-resource.component.js.map +1 -0
- package/dist/Testing/components/testing-dashboard-tab.component.d.ts +57 -0
- package/dist/Testing/components/testing-dashboard-tab.component.d.ts.map +1 -0
- package/dist/Testing/components/testing-dashboard-tab.component.js +649 -0
- package/dist/Testing/components/testing-dashboard-tab.component.js.map +1 -0
- package/dist/{Scheduling/components/scheduling-types-resource.component.d.ts → Testing/components/testing-explorer-resource.component.d.ts} +5 -9
- package/dist/Testing/components/testing-explorer-resource.component.d.ts.map +1 -0
- package/dist/Testing/components/testing-explorer-resource.component.js +47 -0
- package/dist/Testing/components/testing-explorer-resource.component.js.map +1 -0
- package/dist/Testing/components/testing-explorer.component.d.ts +193 -0
- package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -0
- package/dist/Testing/components/testing-explorer.component.js +2212 -0
- package/dist/Testing/components/testing-explorer.component.js.map +1 -0
- package/dist/Testing/components/testing-review-resource.component.d.ts +16 -0
- package/dist/Testing/components/testing-review-resource.component.d.ts.map +1 -0
- package/dist/Testing/components/testing-review-resource.component.js +47 -0
- package/dist/Testing/components/testing-review-resource.component.js.map +1 -0
- package/dist/Testing/components/testing-review.component.d.ts +60 -0
- package/dist/Testing/components/testing-review.component.d.ts.map +1 -0
- package/dist/Testing/components/testing-review.component.js +985 -0
- package/dist/Testing/components/testing-review.component.js.map +1 -0
- package/dist/Testing/components/testing-runs-resource.component.d.ts +16 -0
- package/dist/Testing/components/testing-runs-resource.component.d.ts.map +1 -0
- package/dist/Testing/components/testing-runs-resource.component.js +47 -0
- package/dist/Testing/components/testing-runs-resource.component.js.map +1 -0
- package/dist/Testing/components/testing-runs.component.d.ts +82 -0
- package/dist/Testing/components/testing-runs.component.d.ts.map +1 -0
- package/dist/Testing/components/testing-runs.component.js +1067 -0
- package/dist/Testing/components/testing-runs.component.js.map +1 -0
- package/dist/Testing/testing-dashboard.component.d.ts +12 -15
- package/dist/Testing/testing-dashboard.component.d.ts.map +1 -1
- package/dist/Testing/testing-dashboard.component.js +46 -68
- package/dist/Testing/testing-dashboard.component.js.map +1 -1
- package/dist/module.d.ts +121 -97
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +227 -95
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +12 -3
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +47 -16
- package/dist/public-api.js.map +1 -1
- package/dist/shared/pipes/highlight-search.pipe.d.ts +17 -0
- package/dist/shared/pipes/highlight-search.pipe.d.ts.map +1 -0
- package/dist/shared/pipes/highlight-search.pipe.js +40 -0
- package/dist/shared/pipes/highlight-search.pipe.js.map +1 -0
- package/dist/shared/pipes/index.d.ts +2 -0
- package/dist/shared/pipes/index.d.ts.map +1 -0
- package/dist/shared/pipes/index.js +2 -0
- package/dist/shared/pipes/index.js.map +1 -0
- package/dist/shared/shared-pipes.module.d.ts +11 -0
- package/dist/shared/shared-pipes.module.d.ts.map +1 -0
- package/dist/shared/shared-pipes.module.js +24 -0
- package/dist/shared/shared-pipes.module.js.map +1 -0
- package/package.json +39 -32
- package/dist/Credentials/components/credential-category-edit-panel.component.d.ts +0 -44
- package/dist/Credentials/components/credential-category-edit-panel.component.d.ts.map +0 -1
- package/dist/Credentials/components/credential-category-edit-panel.component.js +0 -456
- package/dist/Credentials/components/credential-category-edit-panel.component.js.map +0 -1
- package/dist/Credentials/components/credential-edit-panel.component.d.ts +0 -70
- package/dist/Credentials/components/credential-edit-panel.component.d.ts.map +0 -1
- package/dist/Credentials/components/credential-edit-panel.component.js +0 -694
- package/dist/Credentials/components/credential-edit-panel.component.js.map +0 -1
- package/dist/Credentials/components/credential-type-edit-panel.component.d.ts +0 -56
- package/dist/Credentials/components/credential-type-edit-panel.component.d.ts.map +0 -1
- package/dist/Credentials/components/credential-type-edit-panel.component.js +0 -563
- package/dist/Credentials/components/credential-type-edit-panel.component.js.map +0 -1
- package/dist/Scheduling/components/scheduling-health-resource.component.d.ts +0 -20
- package/dist/Scheduling/components/scheduling-health-resource.component.d.ts.map +0 -1
- package/dist/Scheduling/components/scheduling-health-resource.component.js +0 -55
- package/dist/Scheduling/components/scheduling-health-resource.component.js.map +0 -1
- package/dist/Scheduling/components/scheduling-health.component.d.ts +0 -30
- package/dist/Scheduling/components/scheduling-health.component.d.ts.map +0 -1
- package/dist/Scheduling/components/scheduling-health.component.js +0 -315
- package/dist/Scheduling/components/scheduling-health.component.js.map +0 -1
- package/dist/Scheduling/components/scheduling-history-resource.component.d.ts +0 -20
- package/dist/Scheduling/components/scheduling-history-resource.component.d.ts.map +0 -1
- package/dist/Scheduling/components/scheduling-history-resource.component.js +0 -55
- package/dist/Scheduling/components/scheduling-history-resource.component.js.map +0 -1
- package/dist/Scheduling/components/scheduling-history.component.d.ts +0 -48
- package/dist/Scheduling/components/scheduling-history.component.d.ts.map +0 -1
- package/dist/Scheduling/components/scheduling-history.component.js +0 -377
- package/dist/Scheduling/components/scheduling-history.component.js.map +0 -1
- package/dist/Scheduling/components/scheduling-monitor-resource.component.d.ts +0 -20
- package/dist/Scheduling/components/scheduling-monitor-resource.component.d.ts.map +0 -1
- package/dist/Scheduling/components/scheduling-monitor-resource.component.js +0 -55
- package/dist/Scheduling/components/scheduling-monitor-resource.component.js.map +0 -1
- package/dist/Scheduling/components/scheduling-monitoring.component.d.ts +0 -37
- package/dist/Scheduling/components/scheduling-monitoring.component.d.ts.map +0 -1
- package/dist/Scheduling/components/scheduling-monitoring.component.js +0 -488
- package/dist/Scheduling/components/scheduling-monitoring.component.js.map +0 -1
- package/dist/Scheduling/components/scheduling-types-resource.component.d.ts.map +0 -1
- package/dist/Scheduling/components/scheduling-types-resource.component.js +0 -55
- package/dist/Scheduling/components/scheduling-types-resource.component.js.map +0 -1
- package/dist/Scheduling/components/scheduling-types.component.d.ts +0 -22
- package/dist/Scheduling/components/scheduling-types.component.d.ts.map +0 -1
- package/dist/Scheduling/components/scheduling-types.component.js +0 -165
- package/dist/Scheduling/components/scheduling-types.component.js.map +0 -1
- package/dist/Testing/components/testing-execution-resource.component.d.ts +0 -20
- package/dist/Testing/components/testing-execution-resource.component.d.ts.map +0 -1
- package/dist/Testing/components/testing-execution-resource.component.js +0 -55
- package/dist/Testing/components/testing-execution-resource.component.js.map +0 -1
- package/dist/Testing/components/testing-execution.component.d.ts +0 -71
- package/dist/Testing/components/testing-execution.component.d.ts.map +0 -1
- package/dist/Testing/components/testing-execution.component.js +0 -845
- package/dist/Testing/components/testing-execution.component.js.map +0 -1
- package/dist/Testing/components/testing-feedback-resource.component.d.ts +0 -20
- package/dist/Testing/components/testing-feedback-resource.component.d.ts.map +0 -1
- package/dist/Testing/components/testing-feedback-resource.component.js +0 -55
- package/dist/Testing/components/testing-feedback-resource.component.js.map +0 -1
- package/dist/Testing/components/testing-feedback.component.d.ts +0 -111
- package/dist/Testing/components/testing-feedback.component.d.ts.map +0 -1
- package/dist/Testing/components/testing-feedback.component.js +0 -1486
- package/dist/Testing/components/testing-feedback.component.js.map +0 -1
- package/dist/Testing/components/testing-overview-resource.component.d.ts +0 -20
- package/dist/Testing/components/testing-overview-resource.component.d.ts.map +0 -1
- package/dist/Testing/components/testing-overview-resource.component.js +0 -55
- package/dist/Testing/components/testing-overview-resource.component.js.map +0 -1
- package/dist/Testing/components/testing-overview.component.d.ts +0 -30
- package/dist/Testing/components/testing-overview.component.d.ts.map +0 -1
- package/dist/Testing/components/testing-overview.component.js +0 -361
- package/dist/Testing/components/testing-overview.component.js.map +0 -1
- package/dist/Testing/components/testing-version-comparison.component.d.ts +0 -62
- package/dist/Testing/components/testing-version-comparison.component.d.ts.map +0 -1
- package/dist/Testing/components/testing-version-comparison.component.js +0 -815
- package/dist/Testing/components/testing-version-comparison.component.js.map +0 -1
- package/dist/Testing/components/testing-version-resource.component.d.ts +0 -20
- package/dist/Testing/components/testing-version-resource.component.d.ts.map +0 -1
- package/dist/Testing/components/testing-version-resource.component.js +0 -55
- package/dist/Testing/components/testing-version-resource.component.js.map +0 -1
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
import { Injectable, EventEmitter } from '@angular/core';
|
|
2
|
+
import { RunView, CompositeKey, Metadata } from '@memberjunction/core';
|
|
3
|
+
import { ParseJSONRecursive } from '@memberjunction/global';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Central state management service for Component Studio.
|
|
7
|
+
* Decouples state from components so sub-components can share state.
|
|
8
|
+
*/
|
|
9
|
+
export class ComponentStudioStateService {
|
|
10
|
+
// --- Component Data ---
|
|
11
|
+
_dbComponents = [];
|
|
12
|
+
_fileLoadedComponents = [];
|
|
13
|
+
get DbComponents() { return this._dbComponents; }
|
|
14
|
+
get FileLoadedComponents() { return this._fileLoadedComponents; }
|
|
15
|
+
/** Combined list of all components (file-loaded first, then DB) */
|
|
16
|
+
get AllComponents() {
|
|
17
|
+
return [
|
|
18
|
+
...this._fileLoadedComponents,
|
|
19
|
+
...this._dbComponents
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
// --- Filtered Components ---
|
|
23
|
+
_filteredComponents = [];
|
|
24
|
+
get FilteredComponents() { return this._filteredComponents; }
|
|
25
|
+
// --- Selection & Running ---
|
|
26
|
+
_selectedComponent = null;
|
|
27
|
+
_expandedComponent = null;
|
|
28
|
+
_componentSpec = null;
|
|
29
|
+
_isRunning = false;
|
|
30
|
+
get SelectedComponent() { return this._selectedComponent; }
|
|
31
|
+
set SelectedComponent(value) { this._selectedComponent = value; }
|
|
32
|
+
get ExpandedComponent() { return this._expandedComponent; }
|
|
33
|
+
set ExpandedComponent(value) { this._expandedComponent = value; }
|
|
34
|
+
get ComponentSpec() { return this._componentSpec; }
|
|
35
|
+
set ComponentSpec(value) { this._componentSpec = value; }
|
|
36
|
+
get IsRunning() { return this._isRunning; }
|
|
37
|
+
set IsRunning(value) { this._isRunning = value; }
|
|
38
|
+
// --- Loading ---
|
|
39
|
+
_isLoading = true;
|
|
40
|
+
get IsLoading() { return this._isLoading; }
|
|
41
|
+
// --- Error ---
|
|
42
|
+
_currentError = null;
|
|
43
|
+
get CurrentError() { return this._currentError; }
|
|
44
|
+
set CurrentError(value) { this._currentError = value; }
|
|
45
|
+
// --- Filters ---
|
|
46
|
+
_searchQuery = '';
|
|
47
|
+
_selectedCategories = new Set();
|
|
48
|
+
_showOnlyFavorites = false;
|
|
49
|
+
_showDeprecatedComponents = false;
|
|
50
|
+
_showAllCategories = false;
|
|
51
|
+
_isFilterPanelExpanded = false;
|
|
52
|
+
get SearchQuery() { return this._searchQuery; }
|
|
53
|
+
set SearchQuery(value) {
|
|
54
|
+
this._searchQuery = value;
|
|
55
|
+
this.ApplyFilters();
|
|
56
|
+
}
|
|
57
|
+
get SelectedCategories() { return this._selectedCategories; }
|
|
58
|
+
get ShowOnlyFavorites() { return this._showOnlyFavorites; }
|
|
59
|
+
get ShowDeprecatedComponents() { return this._showDeprecatedComponents; }
|
|
60
|
+
get ShowAllCategories() { return this._showAllCategories; }
|
|
61
|
+
get IsFilterPanelExpanded() { return this._isFilterPanelExpanded; }
|
|
62
|
+
// --- Favorites ---
|
|
63
|
+
_favoriteComponents = new Set();
|
|
64
|
+
get FavoriteComponents() { return this._favoriteComponents; }
|
|
65
|
+
// --- Categories ---
|
|
66
|
+
_availableCategories = [];
|
|
67
|
+
get AvailableCategories() { return this._availableCategories; }
|
|
68
|
+
// --- Editor State ---
|
|
69
|
+
_editableSpec = '';
|
|
70
|
+
_editableCode = '';
|
|
71
|
+
_codeSections = [];
|
|
72
|
+
_isEditingSpec = false;
|
|
73
|
+
_isEditingCode = false;
|
|
74
|
+
_activeTab = 0;
|
|
75
|
+
_isDetailsPaneCollapsed = true;
|
|
76
|
+
get EditableSpec() { return this._editableSpec; }
|
|
77
|
+
set EditableSpec(value) { this._editableSpec = value; }
|
|
78
|
+
get EditableCode() { return this._editableCode; }
|
|
79
|
+
set EditableCode(value) { this._editableCode = value; }
|
|
80
|
+
get CodeSections() { return this._codeSections; }
|
|
81
|
+
get IsEditingSpec() { return this._isEditingSpec; }
|
|
82
|
+
set IsEditingSpec(value) { this._isEditingSpec = value; }
|
|
83
|
+
get IsEditingCode() { return this._isEditingCode; }
|
|
84
|
+
set IsEditingCode(value) { this._isEditingCode = value; }
|
|
85
|
+
get ActiveTab() { return this._activeTab; }
|
|
86
|
+
set ActiveTab(value) { this._activeTab = value; }
|
|
87
|
+
get IsDetailsPaneCollapsed() { return this._isDetailsPaneCollapsed; }
|
|
88
|
+
set IsDetailsPaneCollapsed(value) { this._isDetailsPaneCollapsed = value; }
|
|
89
|
+
// --- Unsaved changes tracking ---
|
|
90
|
+
_hasUnsavedChanges = false;
|
|
91
|
+
get HasUnsavedChanges() { return this._hasUnsavedChanges; }
|
|
92
|
+
set HasUnsavedChanges(value) { this._hasUnsavedChanges = value; }
|
|
93
|
+
// --- AI Panel ---
|
|
94
|
+
_isAIPanelCollapsed = false;
|
|
95
|
+
get IsAIPanelCollapsed() { return this._isAIPanelCollapsed; }
|
|
96
|
+
set IsAIPanelCollapsed(value) { this._isAIPanelCollapsed = value; }
|
|
97
|
+
// --- Events ---
|
|
98
|
+
/** Emitted when state changes require UI update */
|
|
99
|
+
StateChanged = new EventEmitter();
|
|
100
|
+
/** Emitted when the running component needs to refresh */
|
|
101
|
+
RefreshComponent = new EventEmitter();
|
|
102
|
+
/** Emitted when an error should be sent to AI for diagnosis */
|
|
103
|
+
SendErrorToAI = new EventEmitter();
|
|
104
|
+
/** Emitted when a component spec is updated (e.g. by AI) */
|
|
105
|
+
SpecUpdated = new EventEmitter();
|
|
106
|
+
metadata = new Metadata();
|
|
107
|
+
// ============================================================
|
|
108
|
+
// DATA LOADING
|
|
109
|
+
// ============================================================
|
|
110
|
+
async LoadComponents() {
|
|
111
|
+
this._isLoading = true;
|
|
112
|
+
this.StateChanged.emit();
|
|
113
|
+
try {
|
|
114
|
+
const rv = new RunView();
|
|
115
|
+
const result = await rv.RunView({
|
|
116
|
+
EntityName: 'MJ: Components',
|
|
117
|
+
ExtraFilter: 'HasRequiredCustomProps = 0',
|
|
118
|
+
OrderBy: 'Name',
|
|
119
|
+
MaxRows: 1000,
|
|
120
|
+
ResultType: 'entity_object'
|
|
121
|
+
});
|
|
122
|
+
if (result.Success) {
|
|
123
|
+
this._dbComponents = result.Results || [];
|
|
124
|
+
this.ApplyFilters();
|
|
125
|
+
this._isLoading = false;
|
|
126
|
+
this.StateChanged.emit();
|
|
127
|
+
// Load favorites in background
|
|
128
|
+
this.loadFavorites();
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
console.error('Failed to load components:', result.ErrorMessage);
|
|
132
|
+
this._isLoading = false;
|
|
133
|
+
this.StateChanged.emit();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
console.error('Error loading components:', error);
|
|
138
|
+
this._isLoading = false;
|
|
139
|
+
this.StateChanged.emit();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
async loadFavorites() {
|
|
143
|
+
const currentUserId = this.metadata.CurrentUser?.ID;
|
|
144
|
+
if (!currentUserId)
|
|
145
|
+
return;
|
|
146
|
+
this._favoriteComponents.clear();
|
|
147
|
+
const favoritePromises = this._dbComponents.map(component => this.metadata.GetRecordFavoriteStatus(currentUserId, 'MJ: Components', CompositeKey.FromID(component.ID))
|
|
148
|
+
.then(isFavorite => ({ componentId: component.ID, isFavorite }))
|
|
149
|
+
.catch(() => ({ componentId: component.ID, isFavorite: false })));
|
|
150
|
+
const results = await Promise.all(favoritePromises);
|
|
151
|
+
for (const result of results) {
|
|
152
|
+
if (result.isFavorite) {
|
|
153
|
+
this._favoriteComponents.add(result.componentId);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
this.StateChanged.emit();
|
|
157
|
+
}
|
|
158
|
+
// ============================================================
|
|
159
|
+
// FILTERING
|
|
160
|
+
// ============================================================
|
|
161
|
+
ApplyFilters() {
|
|
162
|
+
this.buildCategories();
|
|
163
|
+
let filtered = [...this.AllComponents];
|
|
164
|
+
// Filter out deprecated
|
|
165
|
+
if (!this._showDeprecatedComponents) {
|
|
166
|
+
filtered = filtered.filter(c => this.GetComponentStatus(c) !== 'Deprecated');
|
|
167
|
+
}
|
|
168
|
+
// Favorites filter
|
|
169
|
+
if (this._showOnlyFavorites) {
|
|
170
|
+
filtered = filtered.filter(c => this.IsFavorite(c));
|
|
171
|
+
}
|
|
172
|
+
// Category filter
|
|
173
|
+
if (this._selectedCategories.size > 0) {
|
|
174
|
+
filtered = filtered.filter(c => {
|
|
175
|
+
const namespace = this.GetComponentNamespace(c) || 'Uncategorized';
|
|
176
|
+
const category = this.extractCategoryFromNamespace(namespace);
|
|
177
|
+
return this._selectedCategories.has(category);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
// Search filter
|
|
181
|
+
if (this._searchQuery) {
|
|
182
|
+
const query = this._searchQuery.toLowerCase();
|
|
183
|
+
filtered = filtered.filter(c => {
|
|
184
|
+
const name = this.GetComponentName(c)?.toLowerCase() || '';
|
|
185
|
+
const description = this.GetComponentDescription(c)?.toLowerCase() || '';
|
|
186
|
+
const type = this.GetComponentType(c)?.toLowerCase() || '';
|
|
187
|
+
const namespace = this.GetComponentNamespace(c)?.toLowerCase() || '';
|
|
188
|
+
return name.includes(query) || description.includes(query) || type.includes(query) || namespace.includes(query);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
this._filteredComponents = filtered;
|
|
192
|
+
}
|
|
193
|
+
buildCategories() {
|
|
194
|
+
const categoryMap = new Map();
|
|
195
|
+
for (const component of this.AllComponents) {
|
|
196
|
+
const namespace = this.GetComponentNamespace(component) || 'Uncategorized';
|
|
197
|
+
const category = this.extractCategoryFromNamespace(namespace);
|
|
198
|
+
categoryMap.set(category, (categoryMap.get(category) || 0) + 1);
|
|
199
|
+
}
|
|
200
|
+
this._availableCategories = Array.from(categoryMap.entries())
|
|
201
|
+
.map(([name, count]) => ({
|
|
202
|
+
name,
|
|
203
|
+
count,
|
|
204
|
+
color: this.getCategoryColor(name)
|
|
205
|
+
}))
|
|
206
|
+
.sort((a, b) => b.count - a.count);
|
|
207
|
+
}
|
|
208
|
+
extractCategoryFromNamespace(namespace) {
|
|
209
|
+
if (!namespace || namespace === 'Uncategorized')
|
|
210
|
+
return 'Uncategorized';
|
|
211
|
+
const parts = namespace.split('/').filter(p => p.length > 0);
|
|
212
|
+
return parts[0] || 'Uncategorized';
|
|
213
|
+
}
|
|
214
|
+
getCategoryColor(category) {
|
|
215
|
+
const colors = [
|
|
216
|
+
'#3B82F6', '#8B5CF6', '#10B981', '#F97316', '#06B6D4',
|
|
217
|
+
'#EC4899', '#6366F1', '#14B8A6', '#EAB308', '#EF4444',
|
|
218
|
+
];
|
|
219
|
+
let hash = 0;
|
|
220
|
+
for (let i = 0; i < category.length; i++) {
|
|
221
|
+
hash = category.charCodeAt(i) + ((hash << 5) - hash);
|
|
222
|
+
}
|
|
223
|
+
return colors[Math.abs(hash) % colors.length];
|
|
224
|
+
}
|
|
225
|
+
ToggleFilterPanel() {
|
|
226
|
+
this._isFilterPanelExpanded = !this._isFilterPanelExpanded;
|
|
227
|
+
this.StateChanged.emit();
|
|
228
|
+
}
|
|
229
|
+
ToggleCategory(category) {
|
|
230
|
+
if (this._selectedCategories.has(category)) {
|
|
231
|
+
this._selectedCategories.delete(category);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
this._selectedCategories.add(category);
|
|
235
|
+
}
|
|
236
|
+
this.ApplyFilters();
|
|
237
|
+
this.StateChanged.emit();
|
|
238
|
+
}
|
|
239
|
+
ToggleShowOnlyFavorites() {
|
|
240
|
+
this._showOnlyFavorites = !this._showOnlyFavorites;
|
|
241
|
+
this.ApplyFilters();
|
|
242
|
+
this.StateChanged.emit();
|
|
243
|
+
}
|
|
244
|
+
ToggleShowDeprecatedComponents() {
|
|
245
|
+
this._showDeprecatedComponents = !this._showDeprecatedComponents;
|
|
246
|
+
this.ApplyFilters();
|
|
247
|
+
this.StateChanged.emit();
|
|
248
|
+
}
|
|
249
|
+
ToggleShowAllCategories() {
|
|
250
|
+
this._showAllCategories = !this._showAllCategories;
|
|
251
|
+
this.StateChanged.emit();
|
|
252
|
+
}
|
|
253
|
+
ClearAllFilters() {
|
|
254
|
+
this._selectedCategories.clear();
|
|
255
|
+
this._showOnlyFavorites = false;
|
|
256
|
+
this._showDeprecatedComponents = false;
|
|
257
|
+
this.ApplyFilters();
|
|
258
|
+
this.StateChanged.emit();
|
|
259
|
+
}
|
|
260
|
+
GetActiveFilterCount() {
|
|
261
|
+
let count = 0;
|
|
262
|
+
if (this._showOnlyFavorites)
|
|
263
|
+
count++;
|
|
264
|
+
if (this._showDeprecatedComponents)
|
|
265
|
+
count++;
|
|
266
|
+
count += this._selectedCategories.size;
|
|
267
|
+
return count;
|
|
268
|
+
}
|
|
269
|
+
GetDeprecatedCount() {
|
|
270
|
+
return this.AllComponents.filter(c => this.GetComponentStatus(c) === 'Deprecated').length;
|
|
271
|
+
}
|
|
272
|
+
GetVisibleCategories() {
|
|
273
|
+
return this._showAllCategories ? this._availableCategories : this._availableCategories.slice(0, 5);
|
|
274
|
+
}
|
|
275
|
+
IsCategorySelected(category) {
|
|
276
|
+
return this._selectedCategories.has(category);
|
|
277
|
+
}
|
|
278
|
+
// ============================================================
|
|
279
|
+
// FAVORITES
|
|
280
|
+
// ============================================================
|
|
281
|
+
IsFavorite(component) {
|
|
282
|
+
if (this.IsFileLoadedComponent(component))
|
|
283
|
+
return false;
|
|
284
|
+
return this._favoriteComponents.has(this.GetComponentId(component));
|
|
285
|
+
}
|
|
286
|
+
async ToggleFavorite(component) {
|
|
287
|
+
if (this.IsFileLoadedComponent(component))
|
|
288
|
+
return;
|
|
289
|
+
const currentUserId = this.metadata.CurrentUser?.ID;
|
|
290
|
+
if (!currentUserId)
|
|
291
|
+
return;
|
|
292
|
+
const componentId = this.GetComponentId(component);
|
|
293
|
+
const isFavorite = this._favoriteComponents.has(componentId);
|
|
294
|
+
try {
|
|
295
|
+
await this.metadata.SetRecordFavoriteStatus(currentUserId, 'MJ: Components', CompositeKey.FromID(componentId), !isFavorite);
|
|
296
|
+
if (isFavorite) {
|
|
297
|
+
this._favoriteComponents.delete(componentId);
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
this._favoriteComponents.add(componentId);
|
|
301
|
+
}
|
|
302
|
+
this.StateChanged.emit();
|
|
303
|
+
}
|
|
304
|
+
catch (error) {
|
|
305
|
+
console.error('Error toggling favorite status:', error);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
// ============================================================
|
|
309
|
+
// COMPONENT ACCESSORS (for union type)
|
|
310
|
+
// ============================================================
|
|
311
|
+
IsFileLoadedComponent(component) {
|
|
312
|
+
return component.isFileLoaded === true;
|
|
313
|
+
}
|
|
314
|
+
GetComponentName(component) {
|
|
315
|
+
return component.isFileLoaded ? component.name : component.Name;
|
|
316
|
+
}
|
|
317
|
+
GetComponentDescription(component) {
|
|
318
|
+
return component.isFileLoaded ? component.description : (component.Description || undefined);
|
|
319
|
+
}
|
|
320
|
+
GetComponentType(component) {
|
|
321
|
+
return component.isFileLoaded ? component.type : (component.Type || undefined);
|
|
322
|
+
}
|
|
323
|
+
GetComponentStatus(component) {
|
|
324
|
+
return component.isFileLoaded ? component.status : (component.Status || undefined);
|
|
325
|
+
}
|
|
326
|
+
GetComponentVersion(component) {
|
|
327
|
+
return component.isFileLoaded ? '1.0.0' : (component.Version || '1.0.0');
|
|
328
|
+
}
|
|
329
|
+
GetComponentSpec(component) {
|
|
330
|
+
return component.isFileLoaded ? component.specification : JSON.parse(component.Specification);
|
|
331
|
+
}
|
|
332
|
+
GetComponentId(component) {
|
|
333
|
+
return component.isFileLoaded ? component.id : component.ID;
|
|
334
|
+
}
|
|
335
|
+
GetComponentNamespace(component) {
|
|
336
|
+
if (component.isFileLoaded) {
|
|
337
|
+
return component.specification.namespace;
|
|
338
|
+
}
|
|
339
|
+
return component.Namespace || undefined;
|
|
340
|
+
}
|
|
341
|
+
GetComponentFilename(component) {
|
|
342
|
+
return component.isFileLoaded ? component.filename : undefined;
|
|
343
|
+
}
|
|
344
|
+
GetComponentLoadedAt(component) {
|
|
345
|
+
return component.isFileLoaded ? component.loadedAt : undefined;
|
|
346
|
+
}
|
|
347
|
+
GetComponentUpdatedAt(component) {
|
|
348
|
+
return !component.isFileLoaded && component.__mj_UpdatedAt ? component.__mj_UpdatedAt : undefined;
|
|
349
|
+
}
|
|
350
|
+
// ============================================================
|
|
351
|
+
// COMPONENT RUNNING
|
|
352
|
+
// ============================================================
|
|
353
|
+
StartComponent(component) {
|
|
354
|
+
this._selectedComponent = component;
|
|
355
|
+
this._componentSpec = this.GetComponentSpec(component);
|
|
356
|
+
this._isRunning = true;
|
|
357
|
+
this._currentError = null;
|
|
358
|
+
this._isDetailsPaneCollapsed = false;
|
|
359
|
+
this._hasUnsavedChanges = false;
|
|
360
|
+
this.InitializeEditors();
|
|
361
|
+
this.StateChanged.emit();
|
|
362
|
+
}
|
|
363
|
+
StopComponent() {
|
|
364
|
+
this._isRunning = false;
|
|
365
|
+
this._selectedComponent = null;
|
|
366
|
+
this._componentSpec = null;
|
|
367
|
+
this._currentError = null;
|
|
368
|
+
this._hasUnsavedChanges = false;
|
|
369
|
+
this.StateChanged.emit();
|
|
370
|
+
}
|
|
371
|
+
RunComponent(component) {
|
|
372
|
+
const componentId = this.GetComponentId(component);
|
|
373
|
+
const selectedId = this._selectedComponent ? this.GetComponentId(this._selectedComponent) : null;
|
|
374
|
+
if (this._isRunning && selectedId !== componentId) {
|
|
375
|
+
this.StopComponent();
|
|
376
|
+
}
|
|
377
|
+
this.StartComponent(component);
|
|
378
|
+
}
|
|
379
|
+
// ============================================================
|
|
380
|
+
// EDITORS
|
|
381
|
+
// ============================================================
|
|
382
|
+
InitializeEditors() {
|
|
383
|
+
if (!this._selectedComponent)
|
|
384
|
+
return;
|
|
385
|
+
const spec = this.GetComponentSpec(this._selectedComponent);
|
|
386
|
+
const parseOptions = {
|
|
387
|
+
extractInlineJson: true,
|
|
388
|
+
maxDepth: 100,
|
|
389
|
+
debug: false
|
|
390
|
+
};
|
|
391
|
+
const parsed = ParseJSONRecursive(spec, parseOptions);
|
|
392
|
+
this._editableSpec = JSON.stringify(parsed, null, 2);
|
|
393
|
+
this._editableCode = spec.code || '// No code available';
|
|
394
|
+
this.BuildCodeSections();
|
|
395
|
+
this._isEditingSpec = false;
|
|
396
|
+
this._isEditingCode = false;
|
|
397
|
+
this._hasUnsavedChanges = false;
|
|
398
|
+
}
|
|
399
|
+
BuildCodeSections() {
|
|
400
|
+
if (!this._selectedComponent) {
|
|
401
|
+
this._codeSections = [];
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
// Use the in-memory spec (which may be the resolved version from the React bridge)
|
|
405
|
+
// rather than re-parsing from the entity's raw Specification field.
|
|
406
|
+
const spec = this._componentSpec || this.GetComponentSpec(this._selectedComponent);
|
|
407
|
+
const sections = [];
|
|
408
|
+
const mainCode = spec.code || '// No code available';
|
|
409
|
+
sections.push({
|
|
410
|
+
title: spec.name || 'Main Component',
|
|
411
|
+
code: mainCode,
|
|
412
|
+
originalCode: mainCode,
|
|
413
|
+
isDependency: false
|
|
414
|
+
});
|
|
415
|
+
if (spec.dependencies && Array.isArray(spec.dependencies)) {
|
|
416
|
+
spec.dependencies.forEach((dep, index) => {
|
|
417
|
+
const depCode = dep.code || '// No code available';
|
|
418
|
+
sections.push({
|
|
419
|
+
title: dep.name || `Dependency ${index + 1}`,
|
|
420
|
+
code: depCode,
|
|
421
|
+
originalCode: depCode,
|
|
422
|
+
isDependency: true,
|
|
423
|
+
index
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
this._codeSections = sections;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Apply spec changes from the JSON editor back to the component
|
|
431
|
+
*/
|
|
432
|
+
ApplySpecChanges() {
|
|
433
|
+
try {
|
|
434
|
+
const parsed = JSON.parse(this._editableSpec);
|
|
435
|
+
if (this._selectedComponent) {
|
|
436
|
+
if (this.IsFileLoadedComponent(this._selectedComponent)) {
|
|
437
|
+
this._selectedComponent.specification = parsed;
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
this._selectedComponent.Specification = JSON.stringify(parsed);
|
|
441
|
+
}
|
|
442
|
+
this._componentSpec = parsed;
|
|
443
|
+
this._editableCode = parsed.code || '// No code available';
|
|
444
|
+
this.BuildCodeSections();
|
|
445
|
+
this._isEditingSpec = false;
|
|
446
|
+
this._hasUnsavedChanges = true;
|
|
447
|
+
this.RefreshComponent.emit();
|
|
448
|
+
this.StateChanged.emit();
|
|
449
|
+
return true;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
catch (error) {
|
|
453
|
+
console.error('Invalid JSON in spec editor:', error);
|
|
454
|
+
}
|
|
455
|
+
return false;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Apply code changes from the code editor back to the spec
|
|
459
|
+
*/
|
|
460
|
+
ApplyCodeChanges() {
|
|
461
|
+
if (!this._selectedComponent)
|
|
462
|
+
return false;
|
|
463
|
+
try {
|
|
464
|
+
const spec = JSON.parse(this._editableSpec);
|
|
465
|
+
if (this._codeSections.length > 0) {
|
|
466
|
+
spec.code = this._codeSections[0].code;
|
|
467
|
+
if (this._codeSections.length > 1 && spec.dependencies) {
|
|
468
|
+
for (let i = 1; i < this._codeSections.length; i++) {
|
|
469
|
+
const section = this._codeSections[i];
|
|
470
|
+
if (section.index !== undefined && spec.dependencies[section.index]) {
|
|
471
|
+
spec.dependencies[section.index].code = section.code;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
const parseOptions = {
|
|
477
|
+
extractInlineJson: true,
|
|
478
|
+
maxDepth: 100,
|
|
479
|
+
debug: false
|
|
480
|
+
};
|
|
481
|
+
const parsed = ParseJSONRecursive(spec, parseOptions);
|
|
482
|
+
this._editableSpec = JSON.stringify(parsed, null, 2);
|
|
483
|
+
if (this.IsFileLoadedComponent(this._selectedComponent)) {
|
|
484
|
+
this._selectedComponent.specification = spec;
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
this._selectedComponent.Specification = JSON.stringify(spec);
|
|
488
|
+
}
|
|
489
|
+
this._componentSpec = spec;
|
|
490
|
+
this._isEditingCode = false;
|
|
491
|
+
this._hasUnsavedChanges = true;
|
|
492
|
+
this.RefreshComponent.emit();
|
|
493
|
+
this.StateChanged.emit();
|
|
494
|
+
return true;
|
|
495
|
+
}
|
|
496
|
+
catch (error) {
|
|
497
|
+
console.error('Error applying code changes:', error);
|
|
498
|
+
}
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Update the internal spec with the fully resolved version returned by the
|
|
503
|
+
* React bridge after it loads the component hierarchy. This replaces
|
|
504
|
+
* registry-reference stubs with real code so code sections show actual source.
|
|
505
|
+
* Does NOT mark the component as having unsaved changes or trigger a re-render.
|
|
506
|
+
*/
|
|
507
|
+
UpdateWithResolvedSpec(resolvedSpec) {
|
|
508
|
+
if (!this._selectedComponent)
|
|
509
|
+
return;
|
|
510
|
+
// Only update if the resolved spec actually differs (has real code)
|
|
511
|
+
const current = this._componentSpec;
|
|
512
|
+
if (!current || current === resolvedSpec)
|
|
513
|
+
return;
|
|
514
|
+
this._componentSpec = resolvedSpec;
|
|
515
|
+
// Update editable spec JSON so Spec/Requirements/Design/Data tabs reflect resolved data
|
|
516
|
+
const parseOptions = {
|
|
517
|
+
extractInlineJson: true,
|
|
518
|
+
maxDepth: 100,
|
|
519
|
+
debug: false
|
|
520
|
+
};
|
|
521
|
+
const parsed = ParseJSONRecursive(resolvedSpec, parseOptions);
|
|
522
|
+
this._editableSpec = JSON.stringify(parsed, null, 2);
|
|
523
|
+
// Update editable code with the resolved main code
|
|
524
|
+
this._editableCode = resolvedSpec.code || '// No code available';
|
|
525
|
+
// Rebuild code sections so the editor shows resolved dependency code
|
|
526
|
+
this.BuildCodeSections();
|
|
527
|
+
this.StateChanged.emit();
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Update the component spec directly (e.g., from AI)
|
|
531
|
+
*/
|
|
532
|
+
UpdateSpec(newSpec) {
|
|
533
|
+
if (!this._selectedComponent)
|
|
534
|
+
return;
|
|
535
|
+
if (this.IsFileLoadedComponent(this._selectedComponent)) {
|
|
536
|
+
this._selectedComponent.specification = newSpec;
|
|
537
|
+
}
|
|
538
|
+
else {
|
|
539
|
+
this._selectedComponent.Specification = JSON.stringify(newSpec);
|
|
540
|
+
}
|
|
541
|
+
this._componentSpec = newSpec;
|
|
542
|
+
const parseOptions = {
|
|
543
|
+
extractInlineJson: true,
|
|
544
|
+
maxDepth: 100,
|
|
545
|
+
debug: false
|
|
546
|
+
};
|
|
547
|
+
const parsed = ParseJSONRecursive(newSpec, parseOptions);
|
|
548
|
+
this._editableSpec = JSON.stringify(parsed, null, 2);
|
|
549
|
+
this._editableCode = newSpec.code || '// No code available';
|
|
550
|
+
this.BuildCodeSections();
|
|
551
|
+
this._isEditingSpec = false;
|
|
552
|
+
this._isEditingCode = false;
|
|
553
|
+
this._hasUnsavedChanges = true;
|
|
554
|
+
this.SpecUpdated.emit(newSpec);
|
|
555
|
+
this.RefreshComponent.emit();
|
|
556
|
+
this.StateChanged.emit();
|
|
557
|
+
}
|
|
558
|
+
// ============================================================
|
|
559
|
+
// FILE-LOADED COMPONENT MANAGEMENT
|
|
560
|
+
// ============================================================
|
|
561
|
+
AddFileLoadedComponent(component) {
|
|
562
|
+
this._fileLoadedComponents.push(component);
|
|
563
|
+
this.ApplyFilters();
|
|
564
|
+
this.StateChanged.emit();
|
|
565
|
+
}
|
|
566
|
+
RemoveFileLoadedComponent(component) {
|
|
567
|
+
const index = this._fileLoadedComponents.indexOf(component);
|
|
568
|
+
if (index > -1) {
|
|
569
|
+
this._fileLoadedComponents.splice(index, 1);
|
|
570
|
+
if (this._selectedComponent === component) {
|
|
571
|
+
this.StopComponent();
|
|
572
|
+
}
|
|
573
|
+
if (this._expandedComponent === component) {
|
|
574
|
+
this._expandedComponent = null;
|
|
575
|
+
}
|
|
576
|
+
this.ApplyFilters();
|
|
577
|
+
this.StateChanged.emit();
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
GenerateId() {
|
|
581
|
+
return 'file-' + Date.now() + '-' + Math.random().toString(36).substr(2, 9);
|
|
582
|
+
}
|
|
583
|
+
// ============================================================
|
|
584
|
+
// UI HELPERS
|
|
585
|
+
// ============================================================
|
|
586
|
+
GetComponentTypeIcon(type) {
|
|
587
|
+
const icons = {
|
|
588
|
+
'Report': 'fa-file-alt',
|
|
589
|
+
'Dashboard': 'fa-tachometer-alt',
|
|
590
|
+
'Form': 'fa-edit',
|
|
591
|
+
'Chart': 'fa-chart-bar',
|
|
592
|
+
'Table': 'fa-table',
|
|
593
|
+
'Widget': 'fa-cube',
|
|
594
|
+
'Navigation': 'fa-compass',
|
|
595
|
+
'Search': 'fa-search',
|
|
596
|
+
'Utility': 'fa-cog'
|
|
597
|
+
};
|
|
598
|
+
return icons[type || ''] || 'fa-puzzle-piece';
|
|
599
|
+
}
|
|
600
|
+
GetComponentTypeColor(type) {
|
|
601
|
+
const colors = {
|
|
602
|
+
'Report': '#3B82F6',
|
|
603
|
+
'Dashboard': '#8B5CF6',
|
|
604
|
+
'Form': '#10B981',
|
|
605
|
+
'Chart': '#F97316',
|
|
606
|
+
'Table': '#06B6D4',
|
|
607
|
+
'Widget': '#EC4899',
|
|
608
|
+
'Navigation': '#6366F1',
|
|
609
|
+
'Search': '#14B8A6',
|
|
610
|
+
'Utility': '#64748B'
|
|
611
|
+
};
|
|
612
|
+
return colors[type || ''] || '#9CA3AF';
|
|
613
|
+
}
|
|
614
|
+
GetNamespaceColor(namespace) {
|
|
615
|
+
if (!namespace || namespace === 'Uncategorized')
|
|
616
|
+
return '#6C757D';
|
|
617
|
+
const category = this.extractCategoryFromNamespace(namespace);
|
|
618
|
+
return this.getCategoryColor(category);
|
|
619
|
+
}
|
|
620
|
+
FormatNamespace(namespace) {
|
|
621
|
+
if (!namespace || namespace === 'Uncategorized')
|
|
622
|
+
return 'Uncategorized';
|
|
623
|
+
const parts = namespace.split('/').filter(p => p.length > 0);
|
|
624
|
+
if (parts.length > 3) {
|
|
625
|
+
return `${parts[0]} / ... / ${parts[parts.length - 1]}`;
|
|
626
|
+
}
|
|
627
|
+
return parts.join(' / ');
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Get the current spec, preferring edited version if available
|
|
631
|
+
*/
|
|
632
|
+
GetCurrentSpec() {
|
|
633
|
+
if (!this._selectedComponent || !this._componentSpec)
|
|
634
|
+
return null;
|
|
635
|
+
if (this._isEditingSpec || this._isEditingCode) {
|
|
636
|
+
try {
|
|
637
|
+
return JSON.parse(this._editableSpec);
|
|
638
|
+
}
|
|
639
|
+
catch {
|
|
640
|
+
return this._componentSpec;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return this._componentSpec;
|
|
644
|
+
}
|
|
645
|
+
static ɵfac = function ComponentStudioStateService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ComponentStudioStateService)(); };
|
|
646
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ComponentStudioStateService, factory: ComponentStudioStateService.ɵfac });
|
|
647
|
+
}
|
|
648
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ComponentStudioStateService, [{
|
|
649
|
+
type: Injectable
|
|
650
|
+
}], null, null); })();
|
|
651
|
+
//# sourceMappingURL=component-studio-state.service.js.map
|