@wildo-ai/saas-frontend-lib 1.1.15 → 1.1.17
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/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js +17 -6
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -1
- package/dist/esm/components/data-display/approval-seal.d.ts +7 -5
- package/dist/esm/components/data-display/approval-seal.d.ts.map +1 -1
- package/dist/esm/components/data-display/approval-seal.js +10 -4
- package/dist/esm/components/data-display/approval-seal.js.map +1 -1
- package/dist/esm/components/data-display/signature-requests.d.ts +81 -0
- package/dist/esm/components/data-display/signature-requests.d.ts.map +1 -0
- package/dist/esm/components/data-display/signature-requests.js +123 -0
- package/dist/esm/components/data-display/signature-requests.js.map +1 -0
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +8 -15
- package/dist/esm/components/flows-actors/approval.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.js +3 -0
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/task-detail.d.ts +12 -1
- package/dist/esm/components/flows-actors/task-detail.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/task-detail.js +2 -2
- package/dist/esm/components/flows-actors/task-detail.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +44 -29
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts +16 -0
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.js +14 -2
- package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts +5 -13
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +30 -255
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts +22 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +57 -26
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +35 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +26 -4
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts +31 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js +42 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts +76 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js +268 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js.map +1 -0
- package/dist/esm/components/navigation/command.d.ts +5 -0
- package/dist/esm/components/navigation/command.d.ts.map +1 -1
- package/dist/esm/components/navigation/command.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +5 -2
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +5 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.js +4 -1
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +4 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js +4 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js +4 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js +4 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.js +4 -1
- package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.js +11 -7
- package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
- package/dist/esm/components/sections/content-section.d.ts +1 -3
- package/dist/esm/components/sections/content-section.d.ts.map +1 -1
- package/dist/esm/components/sections/content-section.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts +79 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +272 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.labels.d.ts +3 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.labels.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.labels.js +66 -0
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.labels.js.map +1 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +12 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +28 -6
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +6 -0
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/typography/document-heading-level.d.ts +28 -0
- package/dist/esm/components/typography/document-heading-level.d.ts.map +1 -0
- package/dist/esm/components/typography/document-heading-level.js +63 -0
- package/dist/esm/components/typography/document-heading-level.js.map +1 -0
- package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.js +20 -16
- package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.js +7 -0
- package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +12 -3
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +18 -11
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js +7 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js +6 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +7 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js +13 -9
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +4 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js +5 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +4 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
- package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.js +12 -2
- package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/ConversationLinkPage.d.ts +57 -0
- package/dist/esm/components/views/flows-actors-view/ConversationLinkPage.d.ts.map +1 -0
- package/dist/esm/components/views/flows-actors-view/ConversationLinkPage.js +136 -0
- package/dist/esm/components/views/flows-actors-view/ConversationLinkPage.js.map +1 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +20 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +139 -22
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.js +5 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.d.ts +4 -0
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.js +19 -0
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/linked-conversation.context.d.ts +26 -0
- package/dist/esm/components/views/flows-actors-view/linked-conversation.context.d.ts.map +1 -0
- package/dist/esm/components/views/flows-actors-view/linked-conversation.context.js +3 -0
- package/dist/esm/components/views/flows-actors-view/linked-conversation.context.js.map +1 -0
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts +87 -16
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.js +16 -0
- package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.d.ts.map +1 -1
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js +1 -0
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts +19 -0
- package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +23 -0
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.js +3 -0
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +12 -0
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js +12 -0
- package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.d.ts +16 -0
- package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +10 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +12 -3
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/flows-actors/conversation-history.model.d.ts +19 -1
- package/dist/esm/core/flows-actors/conversation-history.model.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/conversation-history.model.js +45 -4
- package/dist/esm/core/flows-actors/conversation-history.model.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts +0 -5
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +27 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/core/navigation/navigation.schemas.d.ts +20 -0
- package/dist/esm/core/navigation/navigation.schemas.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation.schemas.js +4 -0
- package/dist/esm/core/navigation/navigation.schemas.js.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.js +5 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +59 -5
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +58 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.js +41 -3
- package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +2 -1
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +6 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js +7 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
- package/dist/esm/core/search/command-score.d.ts +33 -0
- package/dist/esm/core/search/command-score.d.ts.map +1 -0
- package/dist/esm/core/search/command-score.js +109 -0
- package/dist/esm/core/search/command-score.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsHub.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/SettingsHub.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAkD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsHub.d.ts","sourceRoot":"","sources":["../../../../src/components/settings/SettingsHub.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAkD,MAAM,OAAO,CAAC;AAyPvE,MAAM,WAAW,gBAAgB;IAC/B,iHAAiH;IACjH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAyU1F"}
|
|
@@ -40,6 +40,7 @@ import { ExternalProvider_Connection_OwnerScope } from '@wildo-ai/external-conne
|
|
|
40
40
|
import { AppPage_ConnectedAccountsSettings } from './AppPage_ConnectedAccountsSettings.js';
|
|
41
41
|
import { AppPage_AgentWorkOverrideRateSettings } from './AppPage_AgentWorkOverrideRateSettings.js';
|
|
42
42
|
import { AppPage_AutonomousAgentsSettings } from './AppPage_AutonomousAgentsSettings.js';
|
|
43
|
+
import { AgentActivityScope, AppPage_AgentActivitySettings } from './AppPage_AgentActivitySettings.js';
|
|
43
44
|
import { AppPage_ModelCostBreakdownSettings, ModelCostBreakdownScope } from './AppPage_ModelCostBreakdownSettings.js';
|
|
44
45
|
import { AppPage_RepresentativeActivitySettings } from './AppPage_RepresentativeActivitySettings.js';
|
|
45
46
|
import { AppPage_AgentWorkEvaluationExportSettings } from './AppPage_AgentWorkEvaluationExportSettings.js';
|
|
@@ -119,6 +120,11 @@ function SettingsEnginePanel({ panelRef }) {
|
|
|
119
120
|
return _jsx(AppPage_AgentWorkOverrideRateSettings, {});
|
|
120
121
|
case SettingsPanelRef.AUTONOMOUS_AGENTS:
|
|
121
122
|
return _jsx(AppPage_AutonomousAgentsSettings, {});
|
|
123
|
+
case SettingsPanelRef.AGENT_ACTIVITY:
|
|
124
|
+
// Whose runs are passed EXPLICITLY at both sites, as for connected accounts above (#3990).
|
|
125
|
+
return _jsx(AppPage_AgentActivitySettings, { scope: AgentActivityScope.ORGANIZATION });
|
|
126
|
+
case SettingsPanelRef.APPLICATION_AGENT_ACTIVITY:
|
|
127
|
+
return _jsx(AppPage_AgentActivitySettings, { scope: AgentActivityScope.APPLICATION });
|
|
122
128
|
case SettingsPanelRef.MODEL_COST_BREAKDOWN:
|
|
123
129
|
// Whose cost is passed EXPLICITLY at both sites, as for connected accounts above.
|
|
124
130
|
return _jsx(AppPage_ModelCostBreakdownSettings, { scope: ModelCostBreakdownScope.APPLICATION });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsHub.js","sourceRoot":"","sources":["../../../../src/components/settings/SettingsHub.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAC/I,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAChH,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,EAA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S,EAAC,cAAc,YAAC,KAAC,WAAW,IAAC,SAAS,EAAE,SAAS,YAAG,QAAQ,GAAe,GAAM,CAAC;IACzG,CAAC;IACD,OAAO,CACL,eAAK,SAAS,EAAC,cAAc,aAC3B,KAAC,KAAK,IAAC,OAAO,EAAC,MAAM,YACnB,KAAC,gBAAgB,cAAE,uBAAuB,GAAoB,GACxD,EAEP,cAAc,IAAI,KAAC,WAAW,IAAC,SAAS,EAAE,SAAS,YAAG,IAAI,GAAe,EACzE,QAAQ,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * SettingsHub — the unified settings surface.\n *\n * Renders the declarative `ResolvedSettingsHubConfig` as a vertical NAVIGATION rail beside a\n * content panel. Categories become labelled groups of links, each destination addressed by its own\n * URL. A section's `target` resolves to a framework panel, an auto-rendered resource surface, a\n * custom component, or a set of horizontal sub-tabs.\n *\n * The rail was a `Tabs`/`TabsList` until 2026-09-19, chosen so that section state and keyboard\n * roving came from the primitive rather than being hand-rolled. It became navigation because a\n * tablist switches panels WITHIN a view while these are thirty destinations that each own a URL —\n * and the keyboard argument dissolves rather than transferring: roving tabindex is a tablist\n * requirement, and navigation wants ordinary Tab order through links. See the rail's own comment.\n *\n * The SUB-TABS are still `Tabs`, correctly: Configuration/Connections inside one destination is\n * exactly what a tablist is for.\n *\n * Mounted by `NavigationContentRenderer` for `NavigationContentType.SETTINGS_HUB`\n * (always in the overlay zone). The `sectionRef` prop names the open\n * section: it wins whenever the gated config admits it (see `active` below).\n */\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { Link, useNavigate } from 'react-router';\nimport { ViewportBreakpoint } from '@wildo-ai/zod-decorators';\nimport { CorePresetNames, FrontendComponentType, SelectableVariant, TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '~wildo-frontend-lib/components/sections/tabs';\nimport { Separator } from '~wildo-frontend-lib/components/layout/separator';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport { IconSize, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { AppPage_SecuritySettings } from '~wildo-frontend-lib/components/auth/admin-config/AppPage_SecuritySettings';\nimport { AppPage_AppearanceSettings } from './AppPage_AppearanceSettings';\nimport { AppPage_InvitationsSettings } from './AppPage_InvitationsSettings';\nimport { AppPage_BillingSettings } from './AppPage_BillingSettings';\nimport { ExternalProvider_Connection_OwnerScope } from '@wildo-ai/external-connectors-models';\nimport { AppPage_ConnectedAccountsSettings } from './AppPage_ConnectedAccountsSettings';\nimport { AppPage_AgentWorkOverrideRateSettings } from './AppPage_AgentWorkOverrideRateSettings';\nimport { AppPage_AutonomousAgentsSettings } from './AppPage_AutonomousAgentsSettings';\nimport { AppPage_ModelCostBreakdownSettings, ModelCostBreakdownScope } from './AppPage_ModelCostBreakdownSettings';\nimport { AppPage_RepresentativeActivitySettings } from './AppPage_RepresentativeActivitySettings';\nimport { AppPage_AgentWorkEvaluationExportSettings } from './AppPage_AgentWorkEvaluationExportSettings';\nimport { ComponentRegistryService } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.service';\nimport { ComponentNotInjected } from '~wildo-frontend-lib/core/components-registry/ComponentNotInjected';\nimport { SettingsPanelRef, SettingsSectionTargetKind } from '~wildo-frontend-lib/core/config/settings-hub.frontend.schemas';\nimport type {\n ResolvedSettingsHubConfig,\n SettingsCategory,\n SettingsCategoryGroup,\n SettingsSection,\n SettingsSectionTarget,\n SettingsSubTabsTarget,\n} from '~wildo-frontend-lib/core/config/settings-hub.frontend.schemas';\nimport { CommonRoutePaths } from '~wildo-frontend-lib/core/runtime/routes.frontend.definitions';\nimport { useVisibleSettingsHubConfig } from '~wildo-frontend-lib/core/config/useVisibleSettingsHubConfig';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { FeatureGate } from '~wildo-frontend-lib/core/features/FeatureGate';\nimport { useFeatureAvailability } from '~wildo-frontend-lib/core/features/useFeatureAvailability';\nimport { Alert, AlertDescription } from '~wildo-frontend-lib/components/overlays/containers/alert';\nimport { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';\nimport { LoadingGate } from '~wildo-frontend-lib/core/loading/LoadingGate';\nimport { SettingsResourceOperationPanel } from './SettingsResourceOperationPanel';\n\n// ──────────────────────────────────────────────────────────────\n// Config helpers\n// ──────────────────────────────────────────────────────────────\n\nfunction orderedCategories(config: ResolvedSettingsHubConfig): SettingsCategory[] {\n return [...config.categories].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n}\n\nfunction sectionsForCategory(config: ResolvedSettingsHubConfig, categoryRef: string): SettingsSection[] {\n return config.sections\n .filter(section => section.categoryRef === categoryRef)\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n}\n\n/**\n * A category's rail in sub-category blocks (#2329): its ungrouped sections first, with no heading, then each declared\n * group in order with its sections. A group no placed section names draws nothing, and a section naming an undeclared\n * group (refused by the DEV verifier) is drawn with the ungrouped ones rather than lost.\n */\nfunction railBlocks(category: SettingsCategory, sections: SettingsSection[]): Array<{ group?: SettingsCategoryGroup; sections: SettingsSection[] }> {\n const groups = [...(category.groups ?? [])].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n const declared = new Set(groups.map(group => group.ref));\n const ungrouped = sections.filter(section => section.groupRef === undefined || !declared.has(section.groupRef));\n return [\n ...(ungrouped.length > 0 ? [{ sections: ungrouped }] : []),\n ...groups\n .map(group => ({ group, sections: sections.filter(section => section.groupRef === group.ref) }))\n .filter(block => block.sections.length > 0),\n ];\n}\n\n/** Resolve the section to open: requested → config default → first section. */\nfunction resolveActiveSection(config: ResolvedSettingsHubConfig, sectionRef?: string): string | undefined {\n if (sectionRef && config.sections.some(section => section.ref === sectionRef)) return sectionRef;\n if (config.defaultSectionRef && config.sections.some(section => section.ref === config.defaultSectionRef)) {\n return config.defaultSectionRef;\n }\n return config.sections[0]?.ref;\n}\n\n// ──────────────────────────────────────────────────────────────\n// Target rendering (function declarations → hoisted for mutual recursion\n// between a SUB_TABS target and its leaf targets)\n// ──────────────────────────────────────────────────────────────\n\nfunction SettingsEnginePanel({ panelRef }: { panelRef: SettingsPanelRef }): React.JSX.Element {\n switch (panelRef) {\n case SettingsPanelRef.SECURITY:\n return <AppPage_SecuritySettings />;\n case SettingsPanelRef.APPEARANCE:\n return <AppPage_AppearanceSettings />;\n case SettingsPanelRef.INVITATIONS:\n return <AppPage_InvitationsSettings />;\n case SettingsPanelRef.BILLING:\n return <AppPage_BillingSettings />;\n case SettingsPanelRef.CONNECTED_ACCOUNTS:\n return <AppPage_ConnectedAccountsSettings ownerScope={ExternalProvider_Connection_OwnerScope.USER} />;\n case SettingsPanelRef.ORGANIZATION_CONNECTED_ACCOUNTS:\n // The scope is passed EXPLICITLY at both sites rather than left to the component's default.\n // A default is invisible at the call site, and the one thing a reader must be able to see here\n // is whose account each panel connects.\n return <AppPage_ConnectedAccountsSettings ownerScope={ExternalProvider_Connection_OwnerScope.ORGANIZATION} />;\n case SettingsPanelRef.APPLICATION_CONNECTED_ACCOUNTS:\n // The application's own account (#3579): the third owner, passed explicitly for the same reason.\n return <AppPage_ConnectedAccountsSettings ownerScope={ExternalProvider_Connection_OwnerScope.APPLICATION} />;\n case SettingsPanelRef.AGENT_WORK_OVERRIDE_RATE:\n return <AppPage_AgentWorkOverrideRateSettings />;\n case SettingsPanelRef.AUTONOMOUS_AGENTS:\n return <AppPage_AutonomousAgentsSettings />;\n case SettingsPanelRef.MODEL_COST_BREAKDOWN:\n // Whose cost is passed EXPLICITLY at both sites, as for connected accounts above.\n return <AppPage_ModelCostBreakdownSettings scope={ModelCostBreakdownScope.APPLICATION} />;\n case SettingsPanelRef.REPRESENTING_ORGANIZATION_MODEL_COST_BREAKDOWN:\n return <AppPage_ModelCostBreakdownSettings scope={ModelCostBreakdownScope.REPRESENTING_ORGANIZATION} />;\n case SettingsPanelRef.REPRESENTATIVE_ACTIVITY:\n return <AppPage_RepresentativeActivitySettings />;\n case SettingsPanelRef.AGENT_WORK_EVALUATION_EXPORT:\n return <AppPage_AgentWorkEvaluationExportSettings />;\n }\n}\n\n/** Resolves a display label for a section/sub-tab ref, falling back to the authored label. */\ntype SettingsLabelResolver = (ref: string, fallbackLabel: string) => string;\n\nfunction SettingsTargetRenderer({\n target,\n resolveSubTabLabel,\n subTabRef,\n onSubTabChange,\n}: {\n target: SettingsSectionTarget;\n resolveSubTabLabel: SettingsLabelResolver;\n subTabRef?: string;\n onSubTabChange?: (subTabRef: string) => void;\n}): React.JSX.Element {\n switch (target.kind) {\n case SettingsSectionTargetKind.ENGINE_PANEL:\n return <SettingsEnginePanel panelRef={target.panelRef} />;\n case SettingsSectionTargetKind.CUSTOM_COMPONENT: {\n const CustomComponent = ComponentRegistryService.resolve(\n target.componentRef,\n CorePresetNames.DEFAULT,\n );\n if (!CustomComponent) {\n return <ComponentNotInjected componentType={target.componentRef} componentName={target.componentRef} />;\n }\n return (\n <React.Suspense fallback={<div className=\"h-8 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}>\n <CustomComponent />\n </React.Suspense>\n );\n }\n case SettingsSectionTargetKind.RESOURCE_OPERATION:\n return (\n <SettingsResourceOperationPanel\n resourceType={target.resourceType}\n operation={target.operation}\n operationVariant={target.operationVariant}\n />\n );\n case SettingsSectionTargetKind.SUB_TABS:\n return (\n <SettingsSubTabs\n target={target}\n resolveSubTabLabel={resolveSubTabLabel}\n subTabRef={subTabRef}\n onSubTabChange={onSubTabChange}\n />\n );\n }\n}\n\n/**\n * The sub-tab strip inside one section.\n *\n * The active tab is URL-DRIVEN since 2026-09-17. It used to be `useState(target.subTabs[0]?.ref)` —\n * local state that read nothing from the URL — so all twenty-one sub-tab panels in the shipped\n * catalogue were unaddressable: every link to a sub-tabbed section opened its FIRST tab, and\n * \"Single sign-on → Connections\" could not be sent to anybody. That contradicted the hub's own\n * contract, which is that the URL is its single source of truth, and it made the outcome banner a\n * connect-callback renders depend on tab ORDER rather than on the URL it returns to.\n *\n * A `subTabRef` the section does not declare is IGNORED rather than refused: the tab falls back to\n * the first entry, so a stale bookmark or a hand-typed segment still opens the section instead of an\n * error. `onSubTabChange` writes the selection back, which is what makes the strip a navigation\n * control rather than a widget with a URL beside it.\n */\nfunction SettingsSubTabs({\n target,\n resolveSubTabLabel,\n subTabRef,\n onSubTabChange,\n}: {\n target: SettingsSubTabsTarget;\n resolveSubTabLabel: SettingsLabelResolver;\n subTabRef?: string;\n onSubTabChange?: (subTabRef: string) => void;\n}): React.JSX.Element | null {\n const active = target.subTabs.some(subTab => subTab.ref === subTabRef)\n ? subTabRef\n : target.subTabs[0]?.ref;\n if (target.subTabs.length === 0) return null;\n return (\n <Tabs value={active} onValueChange={next => onSubTabChange?.(next)}>\n <TabsList>\n {target.subTabs.map(subTab => (\n // `data-ref` is the i18n-independent automation hook (labels are\n // runtime-translated; e2e drives must never key off them).\n <TabsTrigger key={subTab.ref} value={subTab.ref} data-ref={subTab.ref}>\n {resolveSubTabLabel(subTab.ref, subTab.label)}\n </TabsTrigger>\n ))}\n </TabsList>\n {target.subTabs.map(subTab => (\n <TabsContent key={subTab.ref} value={subTab.ref}>\n {/* Leaf targets only (schema forbids nested sub-tabs); the resolver is\n still threaded to satisfy the shared renderer signature. */}\n <SettingsTargetRenderer target={subTab.target} resolveSubTabLabel={resolveSubTabLabel} />\n </TabsContent>\n ))}\n </Tabs>\n );\n}\n\n/**\n * A rail item's layout classes — full-width, left-aligned, icon-tolerant.\n *\n * Carried here rather than reused from the tab trigger because the rail is no longer a tab: this is\n * a navigation item and owns its own shape. Only the SELECTED treatment is shared, and that comes\n * from the theme recipe rather than from a copied class string, so a theme change still reaches\n * both.\n */\nconst RAIL_ITEM_CLASSES =\n \"inline-flex w-full cursor-pointer items-center justify-start gap-1.5 whitespace-nowrap rounded-md px-card-sm py-item text-sm font-medium no-underline [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\";\n\n// ──────────────────────────────────────────────────────────────\n// Hub\n// ──────────────────────────────────────────────────────────────\n\nexport interface SettingsHubProps {\n /** The section the URL names. It is open whenever the gated config admits it; until then, the config default. */\n sectionRef?: string;\n /** Sub-tab of `sectionRef` to pre-open; ignored when the section declares no such tab. */\n subTabRef?: string;\n}\n\nexport function SettingsHub({ sectionRef, subTabRef }: SettingsHubProps): React.JSX.Element {\n const config = useVisibleSettingsHubConfig();\n const categories = useMemo(() => orderedCategories(config), [config]);\n /*\n * The open section is DERIVED from the URL and the gated config, on every render. It is not\n * state, and it was until 2026-10-02 (#2190), when it held a fallback that outlived its reason.\n *\n * The gated config arrives in stages: on a cold load the first answer is built before the\n * organization's features resolve, so a feature-gated destination (`sso`, `scim`) is absent from\n * it. The old state machine resolved `/settings/sso` against that first config, fell back to the\n * first section (Profile), then kept Profile when `sso` joined the config, because Profile was\n * still selectable. Its URL effect did not help, since `sectionRef` never changed. A deep link or\n * a reload of a gated destination therefore opened the wrong pane for good, while a rail click\n * opened the right one.\n *\n * Deriving it removes the \"current choice\" that a fallback could become. The URL can stand for\n * the person's choice because the rail's links write it (`to` + `replace`) and nothing else\n * selects a section, so `sectionRef` is always the section the person last asked for. Whenever it\n * is selectable it is the open section, whatever order the gating signals land in. When it is not\n * (yet) selectable, the default stands in, and the requested section takes over the moment the\n * config admits it. The earlier concern that kept `config` out of the sync effect, config\n * identity churning and resetting a rail click, has no purchase here: a click changes\n * `sectionRef` itself, so a re-derivation can only re-confirm it.\n */\n const active = useMemo(() => resolveActiveSection(config, sectionRef), [config, sectionRef]);\n const routerNavigate = useNavigate();\n\n /*\n * In-hub navigation WRITES the URL. Until 2026-09-17 it did not, at either level: the rail set\n * local state and the sub-tab strip held its own, so the address bar kept whatever section the\n * hub was opened at. Deep-linking IN worked and linking OUT never did — you could be looking at\n * Administration → Single sign-on → Connections with `/settings/profile` in the address bar, and\n * no sequence of clicks produced a URL for where you were.\n *\n * REPLACE rather than push, deliberately. A settings rail is a switcher, not a trail: pushing\n * would make Back walk every section a person browsed before leaving the hub, which is the\n * behaviour the overlay's own dismiss already owns. Replace keeps the address bar truthful and\n * leaves Back meaning \"leave settings\".\n *\n * The overlay reconciler converges on the new URL — it keys on section AND sub-tab, so a tab\n * switch inside one section is seen as a change rather than as already-correct. There is no loop:\n * only a user gesture calls these, and the reconciler emits no navigation of its own.\n */\n // The SECTION half of this used to be `navigateToSection`, which the rail's triggers called. The\n // rail's links now carry `to` + `replace` themselves, and `active` is derived from the URL\n // (see its declaration above) — so the helper had no caller left. The SUB-TAB half stays: those really are tabs.\n\n const handleSubTabChange = useCallback((nextSubTabRef: string) => {\n if (!active) return;\n routerNavigate(`${CommonRoutePaths.settings}/${active}/${nextSubTabRef}`, { replace: true });\n }, [active, routerNavigate]);\n\n /*\n * On a small screen the hub is a BACK-STACK rather than two panes.\n *\n * It had no responsive treatment at all before 2026-09-17 — a fixed `w-60 shrink-0` rail at every\n * width, which is 240px of a ~375px viewport, and the rail is now thirty entries rather than\n * sixteen. The back-stack is chosen over a drawer or a collapsed select because the panel BELOW\n * already works this way: `SettingsSectionNavigationHost` keeps a section's own drill-ins\n * (view → edit → back) inside the panel, so mobile becomes the same mechanism one level up\n * instead of a second navigation concept.\n *\n * WHICH screen shows is the URL's business, not local state: `/settings` is the list and\n * `/settings/:sectionRef` is a section. That falls out of the hub's own contract — the URL is its\n * single source of truth — and it means Back, a deep link and a shared link all agree without any\n * of them being special-cased.\n *\n * Both panes stay MOUNTED and only their classes change. `field-chrome-and-sections.md` Gotcha 1b\n * records what the alternative costs: a chrome that swapped element structure across a breakpoint\n * remounted its control and dropped a pending edit on resize. Hiding is a class here for exactly\n * that reason.\n */\n const { UIConfig, getRecipe } = useUI();\n /*\n * The rail item's SELECTED styling comes from the theme's SELECTABLE/FILLED recipe — the same one\n * the vertical tab trigger used, so the rail looks exactly as it did and still follows whatever a\n * theme dresses it in. The recipe keys on `data-state`, which each link sets from `active`.\n */\n const railItemRecipe = getRecipe(UIBehavior.SELECTABLE, SelectableVariant.FILLED);\n const eyebrowRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.EYEBROW);\n // A sub-category heading (#2329) sits one step below its category's eyebrow.\n const groupHeadingRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.LABEL);\n const { renderIcon } = useIconRegistry();\n const isMobile = UIConfig?.currentBreakpoint === ViewportBreakpoint.MOBILE;\n const mobileShowsSection = isMobile && Boolean(sectionRef);\n\n const handleBackToSections = useCallback(() => {\n routerNavigate(CommonRoutePaths.settings, { replace: true });\n }, [routerNavigate]);\n\n\n const { tComponent, tSettingsHubCategory, tSettingsHubGroup, tSettingsHubSection, isReady } = useI18n({\n component: FrontendComponentType.APP_LAYOUTS_SETTINGS_HUB,\n });\n // Hub chrome labels (title, rail aria-label) read from the scoped component\n // namespace. Copy is owned by the labelling pipeline (declared in the sibling\n // `.labels.ts`), so there are deliberately no inline fallback strings — the\n // hub gates on `isReady` below, the same convention as the panels it hosts\n // (`AppPage_SecuritySettings` / `AppPage_AppearanceSettings`). The dynamic\n // category/section labels keep their config-authored `fallbackLabel` (the\n // required contract of `tSettingsHubCategory` / `tSettingsHubSection`).\n const t = useCallback(\n (key: string) => tComponent(FrontendComponentType.APP_LAYOUTS_SETTINGS_HUB, key),\n [tComponent],\n );\n\n /** The pushed section's own label — the mobile header's only cue for where you are. */\n const activeSectionLabel = useMemo(() => {\n const section = config.sections.find(candidate => candidate.ref === active);\n return section ? tSettingsHubSection(section.ref, section.label) : undefined;\n }, [config.sections, active, tSettingsHubSection]);\n\n /*\n * Bring the OPEN section into view when it is not — and only then.\n *\n * The rail carries thirty destinations and scrolls, so a cold load or a deep link at a section\n * near the bottom (`/settings/webhooks`) renders a list scrolled to the top with nothing on it\n * marked: the one cue that says where you are is off screen, and the reader has to scroll a list\n * of thirty to find out.\n *\n * `block: 'nearest'` is what makes this safe to run on every section change rather than only on\n * mount: it is defined to move the container by the MINIMUM needed, so an item already fully\n * visible — the ordinary case when somebody clicks the rail — is not scrolled at all. That is the\n * whole reason it is 'nearest' and not 'center', which would yank the list on every click and\n * replace one annoyance with another.\n *\n * It pairs with, and does not substitute for, the key fix in `getContentKey`: this positions the\n * rail, that one stops the rail being rebuilt (and its scroll offset discarded) on every click.\n * Without the key fix this would fire into a freshly mounted `<nav>` each time and merely make the\n * reset land somewhere else.\n */\n const activeRailItemRef = useRef<HTMLAnchorElement | null>(null);\n useEffect(() => {\n if (!active) return;\n activeRailItemRef.current?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }, [active]);\n\n /*\n * Gate on label readiness so the hub chrome never flashes raw key paths — copy is pipeline-owned\n * with no inline fallback, matching the hosted panels.\n *\n * Through `LoadingGate` rather than `if (!isReady) return null`, which is what this was until\n * 2026-09-17. Returning null is correct about the raw keys and wrong about everything else: the\n * overlay is already open and mounted by the time the hub renders, so a null gave a person an\n * empty dialog with no indication that anything was coming — and the wait got longer as the rail\n * grew. `LoadingGate` keeps the same guarantee (children are not rendered until ready) and lets\n * the ENCLOSING SURFACE POLICY choose the treatment, which for an overlay is to overlay the\n * children rather than to blank them. The hub does not pick a visual here on purpose: that choice\n * belongs to the surface it is hosted in, and hard-coding a skeleton would override a policy the\n * design system already owns.\n */\n return (\n <LoadingGate readiness={[{ id: 'settings-hub-labels', isReady }]}>\n {/*\n `min-w-0` is REQUIRED: this is the grid item of the (fixed-width) dialog surface.\n Without it the item keeps its default `min-width: auto` and cannot shrink below its\n content's min-content width — a wide field row (e.g. a file card with a long\n filename, or a text input) then pushes the whole two-pane body past the dialog edge,\n and the dialog's `overflow-x: hidden` clips the right side of every field. `min-w-0`\n lets the item fit the track so the content pane (and its form) reflow within it.\n */}\n <div className=\"flex h-full min-h-0 flex-col min-w-0\">\n <header className=\"flex h-14 shrink-0 items-center gap-item border-b px-card-lg\">\n {mobileShowsSection && (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.ICON_SM}\n aria-label={t('backToSections')}\n onClick={handleBackToSections}\n >\n {renderIcon(StandardIconReference.BACK, { size: IconSize.SM })}\n </Button>\n )}\n {/* On mobile the header names the SECTION you pushed into — without it the back-stack loses\n the one cue that says where you are, since the rail that said so is off screen. */}\n <h2 className=\"truncate text-base font-semibold tracking-tight\">\n {mobileShowsSection ? activeSectionLabel ?? t('title') : t('title')}\n </h2>\n </header>\n <div className=\"flex min-h-0 flex-1\">\n {/*\n * The rail is NAVIGATION, not a tablist, and until 2026-09-19 it was rendered as one —\n * thirty `<button role=\"tab\">` in a `TabsList`. Three things followed, all measured on the\n * running application:\n *\n * - No destination could be OPENED any other way. `/settings/members` is a real route the\n * hub already writes to the address bar, but with no `href` there was nothing to\n * ⌘-click, middle-click or \"copy link address\" — the one gesture an operator uses to\n * send a colleague to a setting.\n * - The ARIA pattern was wrong for what this is. A tablist switches panels WITHIN a view;\n * a list of destinations that each own a URL is navigation (WAI-ARIA APG). That is not a\n * preference — it decides what an assistive technology announces and how it is reached.\n * - The category headings carried `role=\"presentation\"`, so they were invisible to\n * assistive technology, and a tablist cannot nest labelled groups anyway. That left AT\n * users with a flat list of thirty items containing NINE duplicated names — \"General\",\n * \"Entitlements\", \"API keys\", \"Connected accounts\", \"Single sign-on\", \"User\n * provisioning\", \"Audit streaming\", \"Webhooks\" and \"Audit log\" each appear under two\n * scopes — with nothing to tell the pairs apart.\n *\n * A `<nav>` of grouped links fixes all three at once, and the keyboard concern the previous\n * shape was chosen for DISSOLVES rather than needing to be reimplemented: roving tabindex\n * is a tablist requirement. Navigation uses ordinary Tab order through links, which is what\n * a reader expects and what the browser already does.\n *\n * `replace` is kept from the old `navigateToSection` and for its reason: a settings rail is\n * a switcher, not a trail, so Back means \"leave settings\" rather than walking every section\n * somebody browsed.\n */}\n <nav\n aria-label={t('sectionsNavLabel')}\n className={cn(\n 'overflow-y-auto px-card-sm py-card',\n // Desktop: the fixed rail beside the content. Mobile: the full-width first screen of the\n // back-stack, with no divider because there is nothing beside it.\n isMobile ? 'w-full flex-1' : 'w-60 shrink-0 border-e',\n mobileShowsSection && 'hidden',\n )}\n >\n {categories.map((category, index) => {\n const sections = sectionsForCategory(config, category.ref);\n if (sections.length === 0) return null;\n const categoryLabelId = `settings-hub-category-${category.ref}`;\n return (\n <React.Fragment key={category.ref}>\n {index > 0 && <Separator className=\"my-item\" />}\n {/* Named, not decorative: this heading is the ONLY thing distinguishing the nine\n section labels that appear under two scopes, so it has to reach AT. */}\n <div\n id={categoryLabelId}\n className={cn(\"px-card-sm py-card-sm\", eyebrowRecipe.base)}\n >\n {tSettingsHubCategory(category.ref, category.label)}\n </div>\n <div role=\"group\" aria-labelledby={categoryLabelId}>\n {railBlocks(category, sections).map(block => (\n <React.Fragment key={block.group?.ref ?? '__ungrouped'}>\n {block.group && (\n <div\n id={`${categoryLabelId}-group-${block.group.ref}`}\n className={cn('px-card-sm pt-card-sm pb-item-xs text-muted-foreground', groupHeadingRecipe.base)}\n >\n {tSettingsHubGroup(category.ref, block.group.ref, block.group.label)}\n </div>\n )}\n <div role={block.group ? 'group' : undefined} aria-labelledby={block.group ? `${categoryLabelId}-group-${block.group.ref}` : undefined}>\n {block.sections.map(section => {\n const isActive = section.ref === active;\n return (\n // `data-ref` = i18n-independent automation hook (see sub-tabs above).\n <Link\n key={section.ref}\n // Only the OPEN item is tracked — the effect above needs one element, and a\n // ref on all thirty would be thirty callbacks re-created every render.\n ref={isActive ? activeRailItemRef : undefined}\n to={`${CommonRoutePaths.settings}/${section.ref}`}\n replace\n data-ref={section.ref}\n aria-current={isActive ? 'page' : undefined}\n data-state={isActive ? 'active' : 'inactive'}\n className={cn(\n RAIL_ITEM_CLASSES,\n // Composed part by part, exactly as the tab trigger does — `getRecipe`\n // returns a STRUCTURE (base / states / motion), not a class string, and\n // handing the object to `cn()` silently yields nothing. That is how the\n // first cut of this lost the selected fill while every other class held.\n railItemRecipe.base,\n railItemRecipe.states.focus,\n railItemRecipe.states.selected,\n railItemRecipe.motion.transition,\n )}\n >\n {/* The destination's glyph, sized by the rail item's own `[&_svg]:size-4`. Declared on every\n engine destination (#2378); a section that names none is drawn by its words alone. */}\n {section.icon && renderIcon(section.icon, { size: IconSize.SM })}\n {tSettingsHubSection(section.ref, section.label)}\n </Link>\n );\n })}\n </div>\n </React.Fragment>\n ))}\n </div>\n </React.Fragment>\n );\n })}\n </nav>\n <div\n className={cn(\n 'min-w-0 flex-1 overflow-y-auto p-card-lg',\n isMobile && !mobileShowsSection && 'hidden',\n )}\n >\n {/*\n * ONE section renders — the active one. `TabsContent` unmounts its inactive panels\n * anyway, so this is the same mounting behaviour written directly rather than delegated\n * to a primitive the rail no longer uses.\n */}\n {config.sections.filter(section => section.ref === active).map(section => (\n <React.Fragment key={section.ref}>\n {section.entitlementFeatureId ? (\n // Section SURVIVED because the app OFFERS this feature (`runtimeAvailability`\n // capability = plan-independent `isFeatureOffered`), or because something is still\n // configured here (#3126). Render its body through the entitlement gate: entitled →\n // the config surface; offered-but-not-entitled → the policy-driven upgrade/add-on\n // prompt; configured but sold by no plan → the kept-configuration notice alone.\n // Never a silent disappearance.\n <EntitlementGatedSettingsSection featureId={section.entitlementFeatureId} keptConfigurationNotice={t('entitlementLapsedConfigurationKept')}>\n <SettingsTargetRenderer\n target={section.target}\n resolveSubTabLabel={tSettingsHubSection}\n subTabRef={section.ref === active ? subTabRef : undefined}\n onSubTabChange={handleSubTabChange}\n />\n </EntitlementGatedSettingsSection>\n ) : (\n <SettingsTargetRenderer\n target={section.target}\n resolveSubTabLabel={tSettingsHubSection}\n subTabRef={section.ref === active ? subTabRef : undefined}\n onSubTabChange={handleSubTabChange}\n />\n )}\n </React.Fragment>\n ))}\n </div>\n </div>\n </div>\n </LoadingGate>\n );\n}\n\n/**\n * A settings section whose content the organization must be ENTITLED to (#2367).\n *\n * Not entitled: a notice says what happened to whatever was configured there. The backend keeps that configuration and\n * stops applying it while the entitlement is missing (single sign-on stops being required, a directory may only read\n * and remove access, security events stop being exported, webhooks stop being delivered), and it applies again on its\n * own once the entitlement returns. Without the notice an administrator whose plan lapsed would read the prompt as\n * \"this was never set up\", or as \"it was deleted\". Where a plan sells the feature, the upgrade prompt follows it.\n *\n * Then the section's CONTENT, still (#3162). An action that REMOVES access stays usable under a lapse: revoking a SCIM\n * token, switching security-event export off, removing an SSO connection. Only an action that ADDS or USES the\n * capability is gated, and each such operation already declares the feature it needs (`requiredFeatures`, enforced by\n * the backend), which the action bar renders locked with the upgrade path. The content used to be REPLACED by the\n * prompt, so a live directory token that only revocation can retire could be revoked through the API alone: the one\n * action an administrator most needs after a lapse was the one the screen hid. Fail closed means a credential can\n * always be cut off from the product, never that the product hides it.\n *\n * A feature whose unavailability behaviour is HIDE renders nothing, notice and content included.\n *\n * The rail also keeps such a section when the feature is not offered at all but something is still configured there\n * (#3126: a lapse no plan in the catalogue sells). Then there is no upgrade to offer, so the section shows the notice\n * and its content: an upgrade prompt whose \"View Upgrade Options\" leads to no plan that grants the feature would send\n * the administrator looking for a purchase that does not exist.\n *\n * Keyed on the absence of an upgrade path rather than on the unavailability behaviour, deliberately: the only sections\n * that reach this unentitled with no upgrade path are the engine's configured-survival case, since an offered feature\n * always has one. An application section declaring `entitlementFeatureId` without a runtime gate would also land here\n * and lose a CONTACT_ADMIN or DISABLE prompt; none exists, and such a section should pair the declaration with its\n * runtime gate as `SettingsSection.entitlementFeatureId` asks.\n */\nfunction EntitlementGatedSettingsSection({ featureId, keptConfigurationNotice, children }: {\n featureId: string;\n keptConfigurationNotice: string;\n children: React.ReactNode;\n}): React.JSX.Element {\n const availability = useFeatureAvailability(featureId);\n const showsNotice = !availability.isAvailable && availability.behavior !== FeatureUnavailabilityBehavior.HIDE;\n const hasUpgradePath = (availability.upgradeOptions?.length ?? 0) > 0;\n if (!showsNotice) {\n // Entitled, or a HIDE feature: the gate renders the content, or nothing.\n return <div className=\"space-y-card\"><FeatureGate featureId={featureId}>{children}</FeatureGate></div>;\n }\n return (\n <div className=\"space-y-card\">\n <Alert variant=\"info\">\n <AlertDescription>{keptConfigurationNotice}</AlertDescription>\n </Alert>\n {/* The prompt alone: the gate renders its prompt in place of nothing, since the feature is unavailable here. */}\n {hasUpgradePath && <FeatureGate featureId={featureId}>{null}</FeatureGate>}\n {children}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SettingsHub.js","sourceRoot":"","sources":["../../../../src/components/settings/SettingsHub.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAC/I,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAChH,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,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AAY,CAAC,WAAW,IAAI,YAAY,CAAC,QAAQ,KAAK,6BAA6B,CAAC,IAAI,CAAC;IAC9G,MAAM,cAAc,GAAG,CAAC,YAAY,CAAC,cAAc,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACtE,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,yEAAyE;QACzE,OAAO,cAAK,SAAS,EAAC,cAAc,YAAC,KAAC,WAAW,IAAC,SAAS,EAAE,SAAS,YAAG,QAAQ,GAAe,GAAM,CAAC;IACzG,CAAC;IACD,OAAO,CACL,eAAK,SAAS,EAAC,cAAc,aAC3B,KAAC,KAAK,IAAC,OAAO,EAAC,MAAM,YACnB,KAAC,gBAAgB,cAAE,uBAAuB,GAAoB,GACxD,EAEP,cAAc,IAAI,KAAC,WAAW,IAAC,SAAS,EAAE,SAAS,YAAG,IAAI,GAAe,EACzE,QAAQ,IACL,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n * SettingsHub — the unified settings surface.\n *\n * Renders the declarative `ResolvedSettingsHubConfig` as a vertical NAVIGATION rail beside a\n * content panel. Categories become labelled groups of links, each destination addressed by its own\n * URL. A section's `target` resolves to a framework panel, an auto-rendered resource surface, a\n * custom component, or a set of horizontal sub-tabs.\n *\n * The rail was a `Tabs`/`TabsList` until 2026-09-19, chosen so that section state and keyboard\n * roving came from the primitive rather than being hand-rolled. It became navigation because a\n * tablist switches panels WITHIN a view while these are thirty destinations that each own a URL —\n * and the keyboard argument dissolves rather than transferring: roving tabindex is a tablist\n * requirement, and navigation wants ordinary Tab order through links. See the rail's own comment.\n *\n * The SUB-TABS are still `Tabs`, correctly: Configuration/Connections inside one destination is\n * exactly what a tablist is for.\n *\n * Mounted by `NavigationContentRenderer` for `NavigationContentType.SETTINGS_HUB`\n * (always in the overlay zone). The `sectionRef` prop names the open\n * section: it wins whenever the gated config admits it (see `active` below).\n */\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { Link, useNavigate } from 'react-router';\nimport { ViewportBreakpoint } from '@wildo-ai/zod-decorators';\nimport { CorePresetNames, FrontendComponentType, SelectableVariant, TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { Tabs, TabsList, TabsTrigger, TabsContent } from '~wildo-frontend-lib/components/sections/tabs';\nimport { Separator } from '~wildo-frontend-lib/components/layout/separator';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport { IconSize, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { AppPage_SecuritySettings } from '~wildo-frontend-lib/components/auth/admin-config/AppPage_SecuritySettings';\nimport { AppPage_AppearanceSettings } from './AppPage_AppearanceSettings';\nimport { AppPage_InvitationsSettings } from './AppPage_InvitationsSettings';\nimport { AppPage_BillingSettings } from './AppPage_BillingSettings';\nimport { ExternalProvider_Connection_OwnerScope } from '@wildo-ai/external-connectors-models';\nimport { AppPage_ConnectedAccountsSettings } from './AppPage_ConnectedAccountsSettings';\nimport { AppPage_AgentWorkOverrideRateSettings } from './AppPage_AgentWorkOverrideRateSettings';\nimport { AppPage_AutonomousAgentsSettings } from './AppPage_AutonomousAgentsSettings';\nimport { AgentActivityScope, AppPage_AgentActivitySettings } from './AppPage_AgentActivitySettings';\nimport { AppPage_ModelCostBreakdownSettings, ModelCostBreakdownScope } from './AppPage_ModelCostBreakdownSettings';\nimport { AppPage_RepresentativeActivitySettings } from './AppPage_RepresentativeActivitySettings';\nimport { AppPage_AgentWorkEvaluationExportSettings } from './AppPage_AgentWorkEvaluationExportSettings';\nimport { ComponentRegistryService } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.service';\nimport { ComponentNotInjected } from '~wildo-frontend-lib/core/components-registry/ComponentNotInjected';\nimport { SettingsPanelRef, SettingsSectionTargetKind } from '~wildo-frontend-lib/core/config/settings-hub.frontend.schemas';\nimport type {\n ResolvedSettingsHubConfig,\n SettingsCategory,\n SettingsCategoryGroup,\n SettingsSection,\n SettingsSectionTarget,\n SettingsSubTabsTarget,\n} from '~wildo-frontend-lib/core/config/settings-hub.frontend.schemas';\nimport { CommonRoutePaths } from '~wildo-frontend-lib/core/runtime/routes.frontend.definitions';\nimport { useVisibleSettingsHubConfig } from '~wildo-frontend-lib/core/config/useVisibleSettingsHubConfig';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { FeatureGate } from '~wildo-frontend-lib/core/features/FeatureGate';\nimport { useFeatureAvailability } from '~wildo-frontend-lib/core/features/useFeatureAvailability';\nimport { Alert, AlertDescription } from '~wildo-frontend-lib/components/overlays/containers/alert';\nimport { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';\nimport { LoadingGate } from '~wildo-frontend-lib/core/loading/LoadingGate';\nimport { SettingsResourceOperationPanel } from './SettingsResourceOperationPanel';\n\n// ──────────────────────────────────────────────────────────────\n// Config helpers\n// ──────────────────────────────────────────────────────────────\n\nfunction orderedCategories(config: ResolvedSettingsHubConfig): SettingsCategory[] {\n return [...config.categories].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n}\n\nfunction sectionsForCategory(config: ResolvedSettingsHubConfig, categoryRef: string): SettingsSection[] {\n return config.sections\n .filter(section => section.categoryRef === categoryRef)\n .sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n}\n\n/**\n * A category's rail in sub-category blocks (#2329): its ungrouped sections first, with no heading, then each declared\n * group in order with its sections. A group no placed section names draws nothing, and a section naming an undeclared\n * group (refused by the DEV verifier) is drawn with the ungrouped ones rather than lost.\n */\nfunction railBlocks(category: SettingsCategory, sections: SettingsSection[]): Array<{ group?: SettingsCategoryGroup; sections: SettingsSection[] }> {\n const groups = [...(category.groups ?? [])].sort((a, b) => (a.order ?? 0) - (b.order ?? 0));\n const declared = new Set(groups.map(group => group.ref));\n const ungrouped = sections.filter(section => section.groupRef === undefined || !declared.has(section.groupRef));\n return [\n ...(ungrouped.length > 0 ? [{ sections: ungrouped }] : []),\n ...groups\n .map(group => ({ group, sections: sections.filter(section => section.groupRef === group.ref) }))\n .filter(block => block.sections.length > 0),\n ];\n}\n\n/** Resolve the section to open: requested → config default → first section. */\nfunction resolveActiveSection(config: ResolvedSettingsHubConfig, sectionRef?: string): string | undefined {\n if (sectionRef && config.sections.some(section => section.ref === sectionRef)) return sectionRef;\n if (config.defaultSectionRef && config.sections.some(section => section.ref === config.defaultSectionRef)) {\n return config.defaultSectionRef;\n }\n return config.sections[0]?.ref;\n}\n\n// ──────────────────────────────────────────────────────────────\n// Target rendering (function declarations → hoisted for mutual recursion\n// between a SUB_TABS target and its leaf targets)\n// ──────────────────────────────────────────────────────────────\n\nfunction SettingsEnginePanel({ panelRef }: { panelRef: SettingsPanelRef }): React.JSX.Element {\n switch (panelRef) {\n case SettingsPanelRef.SECURITY:\n return <AppPage_SecuritySettings />;\n case SettingsPanelRef.APPEARANCE:\n return <AppPage_AppearanceSettings />;\n case SettingsPanelRef.INVITATIONS:\n return <AppPage_InvitationsSettings />;\n case SettingsPanelRef.BILLING:\n return <AppPage_BillingSettings />;\n case SettingsPanelRef.CONNECTED_ACCOUNTS:\n return <AppPage_ConnectedAccountsSettings ownerScope={ExternalProvider_Connection_OwnerScope.USER} />;\n case SettingsPanelRef.ORGANIZATION_CONNECTED_ACCOUNTS:\n // The scope is passed EXPLICITLY at both sites rather than left to the component's default.\n // A default is invisible at the call site, and the one thing a reader must be able to see here\n // is whose account each panel connects.\n return <AppPage_ConnectedAccountsSettings ownerScope={ExternalProvider_Connection_OwnerScope.ORGANIZATION} />;\n case SettingsPanelRef.APPLICATION_CONNECTED_ACCOUNTS:\n // The application's own account (#3579): the third owner, passed explicitly for the same reason.\n return <AppPage_ConnectedAccountsSettings ownerScope={ExternalProvider_Connection_OwnerScope.APPLICATION} />;\n case SettingsPanelRef.AGENT_WORK_OVERRIDE_RATE:\n return <AppPage_AgentWorkOverrideRateSettings />;\n case SettingsPanelRef.AUTONOMOUS_AGENTS:\n return <AppPage_AutonomousAgentsSettings />;\n case SettingsPanelRef.AGENT_ACTIVITY:\n // Whose runs are passed EXPLICITLY at both sites, as for connected accounts above (#3990).\n return <AppPage_AgentActivitySettings scope={AgentActivityScope.ORGANIZATION} />;\n case SettingsPanelRef.APPLICATION_AGENT_ACTIVITY:\n return <AppPage_AgentActivitySettings scope={AgentActivityScope.APPLICATION} />;\n case SettingsPanelRef.MODEL_COST_BREAKDOWN:\n // Whose cost is passed EXPLICITLY at both sites, as for connected accounts above.\n return <AppPage_ModelCostBreakdownSettings scope={ModelCostBreakdownScope.APPLICATION} />;\n case SettingsPanelRef.REPRESENTING_ORGANIZATION_MODEL_COST_BREAKDOWN:\n return <AppPage_ModelCostBreakdownSettings scope={ModelCostBreakdownScope.REPRESENTING_ORGANIZATION} />;\n case SettingsPanelRef.REPRESENTATIVE_ACTIVITY:\n return <AppPage_RepresentativeActivitySettings />;\n case SettingsPanelRef.AGENT_WORK_EVALUATION_EXPORT:\n return <AppPage_AgentWorkEvaluationExportSettings />;\n }\n}\n\n/** Resolves a display label for a section/sub-tab ref, falling back to the authored label. */\ntype SettingsLabelResolver = (ref: string, fallbackLabel: string) => string;\n\nfunction SettingsTargetRenderer({\n target,\n resolveSubTabLabel,\n subTabRef,\n onSubTabChange,\n}: {\n target: SettingsSectionTarget;\n resolveSubTabLabel: SettingsLabelResolver;\n subTabRef?: string;\n onSubTabChange?: (subTabRef: string) => void;\n}): React.JSX.Element {\n switch (target.kind) {\n case SettingsSectionTargetKind.ENGINE_PANEL:\n return <SettingsEnginePanel panelRef={target.panelRef} />;\n case SettingsSectionTargetKind.CUSTOM_COMPONENT: {\n const CustomComponent = ComponentRegistryService.resolve(\n target.componentRef,\n CorePresetNames.DEFAULT,\n );\n if (!CustomComponent) {\n return <ComponentNotInjected componentType={target.componentRef} componentName={target.componentRef} />;\n }\n return (\n <React.Suspense fallback={<div className=\"h-8 animate-pulse motion-reduce:animate-none bg-muted rounded\" aria-hidden=\"true\" />}>\n <CustomComponent />\n </React.Suspense>\n );\n }\n case SettingsSectionTargetKind.RESOURCE_OPERATION:\n return (\n <SettingsResourceOperationPanel\n resourceType={target.resourceType}\n operation={target.operation}\n operationVariant={target.operationVariant}\n />\n );\n case SettingsSectionTargetKind.SUB_TABS:\n return (\n <SettingsSubTabs\n target={target}\n resolveSubTabLabel={resolveSubTabLabel}\n subTabRef={subTabRef}\n onSubTabChange={onSubTabChange}\n />\n );\n }\n}\n\n/**\n * The sub-tab strip inside one section.\n *\n * The active tab is URL-DRIVEN since 2026-09-17. It used to be `useState(target.subTabs[0]?.ref)` —\n * local state that read nothing from the URL — so all twenty-one sub-tab panels in the shipped\n * catalogue were unaddressable: every link to a sub-tabbed section opened its FIRST tab, and\n * \"Single sign-on → Connections\" could not be sent to anybody. That contradicted the hub's own\n * contract, which is that the URL is its single source of truth, and it made the outcome banner a\n * connect-callback renders depend on tab ORDER rather than on the URL it returns to.\n *\n * A `subTabRef` the section does not declare is IGNORED rather than refused: the tab falls back to\n * the first entry, so a stale bookmark or a hand-typed segment still opens the section instead of an\n * error. `onSubTabChange` writes the selection back, which is what makes the strip a navigation\n * control rather than a widget with a URL beside it.\n */\nfunction SettingsSubTabs({\n target,\n resolveSubTabLabel,\n subTabRef,\n onSubTabChange,\n}: {\n target: SettingsSubTabsTarget;\n resolveSubTabLabel: SettingsLabelResolver;\n subTabRef?: string;\n onSubTabChange?: (subTabRef: string) => void;\n}): React.JSX.Element | null {\n const active = target.subTabs.some(subTab => subTab.ref === subTabRef)\n ? subTabRef\n : target.subTabs[0]?.ref;\n if (target.subTabs.length === 0) return null;\n return (\n <Tabs value={active} onValueChange={next => onSubTabChange?.(next)}>\n <TabsList>\n {target.subTabs.map(subTab => (\n // `data-ref` is the i18n-independent automation hook (labels are\n // runtime-translated; e2e drives must never key off them).\n <TabsTrigger key={subTab.ref} value={subTab.ref} data-ref={subTab.ref}>\n {resolveSubTabLabel(subTab.ref, subTab.label)}\n </TabsTrigger>\n ))}\n </TabsList>\n {target.subTabs.map(subTab => (\n <TabsContent key={subTab.ref} value={subTab.ref}>\n {/* Leaf targets only (schema forbids nested sub-tabs); the resolver is\n still threaded to satisfy the shared renderer signature. */}\n <SettingsTargetRenderer target={subTab.target} resolveSubTabLabel={resolveSubTabLabel} />\n </TabsContent>\n ))}\n </Tabs>\n );\n}\n\n/**\n * A rail item's layout classes — full-width, left-aligned, icon-tolerant.\n *\n * Carried here rather than reused from the tab trigger because the rail is no longer a tab: this is\n * a navigation item and owns its own shape. Only the SELECTED treatment is shared, and that comes\n * from the theme recipe rather than from a copied class string, so a theme change still reaches\n * both.\n */\nconst RAIL_ITEM_CLASSES =\n \"inline-flex w-full cursor-pointer items-center justify-start gap-1.5 whitespace-nowrap rounded-md px-card-sm py-item text-sm font-medium no-underline [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\";\n\n// ──────────────────────────────────────────────────────────────\n// Hub\n// ──────────────────────────────────────────────────────────────\n\nexport interface SettingsHubProps {\n /** The section the URL names. It is open whenever the gated config admits it; until then, the config default. */\n sectionRef?: string;\n /** Sub-tab of `sectionRef` to pre-open; ignored when the section declares no such tab. */\n subTabRef?: string;\n}\n\nexport function SettingsHub({ sectionRef, subTabRef }: SettingsHubProps): React.JSX.Element {\n const config = useVisibleSettingsHubConfig();\n const categories = useMemo(() => orderedCategories(config), [config]);\n /*\n * The open section is DERIVED from the URL and the gated config, on every render. It is not\n * state, and it was until 2026-10-02 (#2190), when it held a fallback that outlived its reason.\n *\n * The gated config arrives in stages: on a cold load the first answer is built before the\n * organization's features resolve, so a feature-gated destination (`sso`, `scim`) is absent from\n * it. The old state machine resolved `/settings/sso` against that first config, fell back to the\n * first section (Profile), then kept Profile when `sso` joined the config, because Profile was\n * still selectable. Its URL effect did not help, since `sectionRef` never changed. A deep link or\n * a reload of a gated destination therefore opened the wrong pane for good, while a rail click\n * opened the right one.\n *\n * Deriving it removes the \"current choice\" that a fallback could become. The URL can stand for\n * the person's choice because the rail's links write it (`to` + `replace`) and nothing else\n * selects a section, so `sectionRef` is always the section the person last asked for. Whenever it\n * is selectable it is the open section, whatever order the gating signals land in. When it is not\n * (yet) selectable, the default stands in, and the requested section takes over the moment the\n * config admits it. The earlier concern that kept `config` out of the sync effect, config\n * identity churning and resetting a rail click, has no purchase here: a click changes\n * `sectionRef` itself, so a re-derivation can only re-confirm it.\n */\n const active = useMemo(() => resolveActiveSection(config, sectionRef), [config, sectionRef]);\n const routerNavigate = useNavigate();\n\n /*\n * In-hub navigation WRITES the URL. Until 2026-09-17 it did not, at either level: the rail set\n * local state and the sub-tab strip held its own, so the address bar kept whatever section the\n * hub was opened at. Deep-linking IN worked and linking OUT never did — you could be looking at\n * Administration → Single sign-on → Connections with `/settings/profile` in the address bar, and\n * no sequence of clicks produced a URL for where you were.\n *\n * REPLACE rather than push, deliberately. A settings rail is a switcher, not a trail: pushing\n * would make Back walk every section a person browsed before leaving the hub, which is the\n * behaviour the overlay's own dismiss already owns. Replace keeps the address bar truthful and\n * leaves Back meaning \"leave settings\".\n *\n * The overlay reconciler converges on the new URL — it keys on section AND sub-tab, so a tab\n * switch inside one section is seen as a change rather than as already-correct. There is no loop:\n * only a user gesture calls these, and the reconciler emits no navigation of its own.\n */\n // The SECTION half of this used to be `navigateToSection`, which the rail's triggers called. The\n // rail's links now carry `to` + `replace` themselves, and `active` is derived from the URL\n // (see its declaration above) — so the helper had no caller left. The SUB-TAB half stays: those really are tabs.\n\n const handleSubTabChange = useCallback((nextSubTabRef: string) => {\n if (!active) return;\n routerNavigate(`${CommonRoutePaths.settings}/${active}/${nextSubTabRef}`, { replace: true });\n }, [active, routerNavigate]);\n\n /*\n * On a small screen the hub is a BACK-STACK rather than two panes.\n *\n * It had no responsive treatment at all before 2026-09-17 — a fixed `w-60 shrink-0` rail at every\n * width, which is 240px of a ~375px viewport, and the rail is now thirty entries rather than\n * sixteen. The back-stack is chosen over a drawer or a collapsed select because the panel BELOW\n * already works this way: `SettingsSectionNavigationHost` keeps a section's own drill-ins\n * (view → edit → back) inside the panel, so mobile becomes the same mechanism one level up\n * instead of a second navigation concept.\n *\n * WHICH screen shows is the URL's business, not local state: `/settings` is the list and\n * `/settings/:sectionRef` is a section. That falls out of the hub's own contract — the URL is its\n * single source of truth — and it means Back, a deep link and a shared link all agree without any\n * of them being special-cased.\n *\n * Both panes stay MOUNTED and only their classes change. `field-chrome-and-sections.md` Gotcha 1b\n * records what the alternative costs: a chrome that swapped element structure across a breakpoint\n * remounted its control and dropped a pending edit on resize. Hiding is a class here for exactly\n * that reason.\n */\n const { UIConfig, getRecipe } = useUI();\n /*\n * The rail item's SELECTED styling comes from the theme's SELECTABLE/FILLED recipe — the same one\n * the vertical tab trigger used, so the rail looks exactly as it did and still follows whatever a\n * theme dresses it in. The recipe keys on `data-state`, which each link sets from `active`.\n */\n const railItemRecipe = getRecipe(UIBehavior.SELECTABLE, SelectableVariant.FILLED);\n const eyebrowRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.EYEBROW);\n // A sub-category heading (#2329) sits one step below its category's eyebrow.\n const groupHeadingRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.LABEL);\n const { renderIcon } = useIconRegistry();\n const isMobile = UIConfig?.currentBreakpoint === ViewportBreakpoint.MOBILE;\n const mobileShowsSection = isMobile && Boolean(sectionRef);\n\n const handleBackToSections = useCallback(() => {\n routerNavigate(CommonRoutePaths.settings, { replace: true });\n }, [routerNavigate]);\n\n\n const { tComponent, tSettingsHubCategory, tSettingsHubGroup, tSettingsHubSection, isReady } = useI18n({\n component: FrontendComponentType.APP_LAYOUTS_SETTINGS_HUB,\n });\n // Hub chrome labels (title, rail aria-label) read from the scoped component\n // namespace. Copy is owned by the labelling pipeline (declared in the sibling\n // `.labels.ts`), so there are deliberately no inline fallback strings — the\n // hub gates on `isReady` below, the same convention as the panels it hosts\n // (`AppPage_SecuritySettings` / `AppPage_AppearanceSettings`). The dynamic\n // category/section labels keep their config-authored `fallbackLabel` (the\n // required contract of `tSettingsHubCategory` / `tSettingsHubSection`).\n const t = useCallback(\n (key: string) => tComponent(FrontendComponentType.APP_LAYOUTS_SETTINGS_HUB, key),\n [tComponent],\n );\n\n /** The pushed section's own label — the mobile header's only cue for where you are. */\n const activeSectionLabel = useMemo(() => {\n const section = config.sections.find(candidate => candidate.ref === active);\n return section ? tSettingsHubSection(section.ref, section.label) : undefined;\n }, [config.sections, active, tSettingsHubSection]);\n\n /*\n * Bring the OPEN section into view when it is not — and only then.\n *\n * The rail carries thirty destinations and scrolls, so a cold load or a deep link at a section\n * near the bottom (`/settings/webhooks`) renders a list scrolled to the top with nothing on it\n * marked: the one cue that says where you are is off screen, and the reader has to scroll a list\n * of thirty to find out.\n *\n * `block: 'nearest'` is what makes this safe to run on every section change rather than only on\n * mount: it is defined to move the container by the MINIMUM needed, so an item already fully\n * visible — the ordinary case when somebody clicks the rail — is not scrolled at all. That is the\n * whole reason it is 'nearest' and not 'center', which would yank the list on every click and\n * replace one annoyance with another.\n *\n * It pairs with, and does not substitute for, the key fix in `getContentKey`: this positions the\n * rail, that one stops the rail being rebuilt (and its scroll offset discarded) on every click.\n * Without the key fix this would fire into a freshly mounted `<nav>` each time and merely make the\n * reset land somewhere else.\n */\n const activeRailItemRef = useRef<HTMLAnchorElement | null>(null);\n useEffect(() => {\n if (!active) return;\n activeRailItemRef.current?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }, [active]);\n\n /*\n * Gate on label readiness so the hub chrome never flashes raw key paths — copy is pipeline-owned\n * with no inline fallback, matching the hosted panels.\n *\n * Through `LoadingGate` rather than `if (!isReady) return null`, which is what this was until\n * 2026-09-17. Returning null is correct about the raw keys and wrong about everything else: the\n * overlay is already open and mounted by the time the hub renders, so a null gave a person an\n * empty dialog with no indication that anything was coming — and the wait got longer as the rail\n * grew. `LoadingGate` keeps the same guarantee (children are not rendered until ready) and lets\n * the ENCLOSING SURFACE POLICY choose the treatment, which for an overlay is to overlay the\n * children rather than to blank them. The hub does not pick a visual here on purpose: that choice\n * belongs to the surface it is hosted in, and hard-coding a skeleton would override a policy the\n * design system already owns.\n */\n return (\n <LoadingGate readiness={[{ id: 'settings-hub-labels', isReady }]}>\n {/*\n `min-w-0` is REQUIRED: this is the grid item of the (fixed-width) dialog surface.\n Without it the item keeps its default `min-width: auto` and cannot shrink below its\n content's min-content width — a wide field row (e.g. a file card with a long\n filename, or a text input) then pushes the whole two-pane body past the dialog edge,\n and the dialog's `overflow-x: hidden` clips the right side of every field. `min-w-0`\n lets the item fit the track so the content pane (and its form) reflow within it.\n */}\n <div className=\"flex h-full min-h-0 flex-col min-w-0\">\n <header className=\"flex h-14 shrink-0 items-center gap-item border-b px-card-lg\">\n {mobileShowsSection && (\n <Button\n variant={ButtonVariants_Variant.GHOST}\n size={ButtonSize.ICON_SM}\n aria-label={t('backToSections')}\n onClick={handleBackToSections}\n >\n {renderIcon(StandardIconReference.BACK, { size: IconSize.SM })}\n </Button>\n )}\n {/* On mobile the header names the SECTION you pushed into — without it the back-stack loses\n the one cue that says where you are, since the rail that said so is off screen. */}\n <h2 className=\"truncate text-base font-semibold tracking-tight\">\n {mobileShowsSection ? activeSectionLabel ?? t('title') : t('title')}\n </h2>\n </header>\n <div className=\"flex min-h-0 flex-1\">\n {/*\n * The rail is NAVIGATION, not a tablist, and until 2026-09-19 it was rendered as one —\n * thirty `<button role=\"tab\">` in a `TabsList`. Three things followed, all measured on the\n * running application:\n *\n * - No destination could be OPENED any other way. `/settings/members` is a real route the\n * hub already writes to the address bar, but with no `href` there was nothing to\n * ⌘-click, middle-click or \"copy link address\" — the one gesture an operator uses to\n * send a colleague to a setting.\n * - The ARIA pattern was wrong for what this is. A tablist switches panels WITHIN a view;\n * a list of destinations that each own a URL is navigation (WAI-ARIA APG). That is not a\n * preference — it decides what an assistive technology announces and how it is reached.\n * - The category headings carried `role=\"presentation\"`, so they were invisible to\n * assistive technology, and a tablist cannot nest labelled groups anyway. That left AT\n * users with a flat list of thirty items containing NINE duplicated names — \"General\",\n * \"Entitlements\", \"API keys\", \"Connected accounts\", \"Single sign-on\", \"User\n * provisioning\", \"Audit streaming\", \"Webhooks\" and \"Audit log\" each appear under two\n * scopes — with nothing to tell the pairs apart.\n *\n * A `<nav>` of grouped links fixes all three at once, and the keyboard concern the previous\n * shape was chosen for DISSOLVES rather than needing to be reimplemented: roving tabindex\n * is a tablist requirement. Navigation uses ordinary Tab order through links, which is what\n * a reader expects and what the browser already does.\n *\n * `replace` is kept from the old `navigateToSection` and for its reason: a settings rail is\n * a switcher, not a trail, so Back means \"leave settings\" rather than walking every section\n * somebody browsed.\n */}\n <nav\n aria-label={t('sectionsNavLabel')}\n className={cn(\n 'overflow-y-auto px-card-sm py-card',\n // Desktop: the fixed rail beside the content. Mobile: the full-width first screen of the\n // back-stack, with no divider because there is nothing beside it.\n isMobile ? 'w-full flex-1' : 'w-60 shrink-0 border-e',\n mobileShowsSection && 'hidden',\n )}\n >\n {categories.map((category, index) => {\n const sections = sectionsForCategory(config, category.ref);\n if (sections.length === 0) return null;\n const categoryLabelId = `settings-hub-category-${category.ref}`;\n return (\n <React.Fragment key={category.ref}>\n {index > 0 && <Separator className=\"my-item\" />}\n {/* Named, not decorative: this heading is the ONLY thing distinguishing the nine\n section labels that appear under two scopes, so it has to reach AT. */}\n <div\n id={categoryLabelId}\n className={cn(\"px-card-sm py-card-sm\", eyebrowRecipe.base)}\n >\n {tSettingsHubCategory(category.ref, category.label)}\n </div>\n <div role=\"group\" aria-labelledby={categoryLabelId}>\n {railBlocks(category, sections).map(block => (\n <React.Fragment key={block.group?.ref ?? '__ungrouped'}>\n {block.group && (\n <div\n id={`${categoryLabelId}-group-${block.group.ref}`}\n className={cn('px-card-sm pt-card-sm pb-item-xs text-muted-foreground', groupHeadingRecipe.base)}\n >\n {tSettingsHubGroup(category.ref, block.group.ref, block.group.label)}\n </div>\n )}\n <div role={block.group ? 'group' : undefined} aria-labelledby={block.group ? `${categoryLabelId}-group-${block.group.ref}` : undefined}>\n {block.sections.map(section => {\n const isActive = section.ref === active;\n return (\n // `data-ref` = i18n-independent automation hook (see sub-tabs above).\n <Link\n key={section.ref}\n // Only the OPEN item is tracked — the effect above needs one element, and a\n // ref on all thirty would be thirty callbacks re-created every render.\n ref={isActive ? activeRailItemRef : undefined}\n to={`${CommonRoutePaths.settings}/${section.ref}`}\n replace\n data-ref={section.ref}\n aria-current={isActive ? 'page' : undefined}\n data-state={isActive ? 'active' : 'inactive'}\n className={cn(\n RAIL_ITEM_CLASSES,\n // Composed part by part, exactly as the tab trigger does — `getRecipe`\n // returns a STRUCTURE (base / states / motion), not a class string, and\n // handing the object to `cn()` silently yields nothing. That is how the\n // first cut of this lost the selected fill while every other class held.\n railItemRecipe.base,\n railItemRecipe.states.focus,\n railItemRecipe.states.selected,\n railItemRecipe.motion.transition,\n )}\n >\n {/* The destination's glyph, sized by the rail item's own `[&_svg]:size-4`. Declared on every\n engine destination (#2378); a section that names none is drawn by its words alone. */}\n {section.icon && renderIcon(section.icon, { size: IconSize.SM })}\n {tSettingsHubSection(section.ref, section.label)}\n </Link>\n );\n })}\n </div>\n </React.Fragment>\n ))}\n </div>\n </React.Fragment>\n );\n })}\n </nav>\n <div\n className={cn(\n 'min-w-0 flex-1 overflow-y-auto p-card-lg',\n isMobile && !mobileShowsSection && 'hidden',\n )}\n >\n {/*\n * ONE section renders — the active one. `TabsContent` unmounts its inactive panels\n * anyway, so this is the same mounting behaviour written directly rather than delegated\n * to a primitive the rail no longer uses.\n */}\n {config.sections.filter(section => section.ref === active).map(section => (\n <React.Fragment key={section.ref}>\n {section.entitlementFeatureId ? (\n // Section SURVIVED because the app OFFERS this feature (`runtimeAvailability`\n // capability = plan-independent `isFeatureOffered`), or because something is still\n // configured here (#3126). Render its body through the entitlement gate: entitled →\n // the config surface; offered-but-not-entitled → the policy-driven upgrade/add-on\n // prompt; configured but sold by no plan → the kept-configuration notice alone.\n // Never a silent disappearance.\n <EntitlementGatedSettingsSection featureId={section.entitlementFeatureId} keptConfigurationNotice={t('entitlementLapsedConfigurationKept')}>\n <SettingsTargetRenderer\n target={section.target}\n resolveSubTabLabel={tSettingsHubSection}\n subTabRef={section.ref === active ? subTabRef : undefined}\n onSubTabChange={handleSubTabChange}\n />\n </EntitlementGatedSettingsSection>\n ) : (\n <SettingsTargetRenderer\n target={section.target}\n resolveSubTabLabel={tSettingsHubSection}\n subTabRef={section.ref === active ? subTabRef : undefined}\n onSubTabChange={handleSubTabChange}\n />\n )}\n </React.Fragment>\n ))}\n </div>\n </div>\n </div>\n </LoadingGate>\n );\n}\n\n/**\n * A settings section whose content the organization must be ENTITLED to (#2367).\n *\n * Not entitled: a notice says what happened to whatever was configured there. The backend keeps that configuration and\n * stops applying it while the entitlement is missing (single sign-on stops being required, a directory may only read\n * and remove access, security events stop being exported, webhooks stop being delivered), and it applies again on its\n * own once the entitlement returns. Without the notice an administrator whose plan lapsed would read the prompt as\n * \"this was never set up\", or as \"it was deleted\". Where a plan sells the feature, the upgrade prompt follows it.\n *\n * Then the section's CONTENT, still (#3162). An action that REMOVES access stays usable under a lapse: revoking a SCIM\n * token, switching security-event export off, removing an SSO connection. Only an action that ADDS or USES the\n * capability is gated, and each such operation already declares the feature it needs (`requiredFeatures`, enforced by\n * the backend), which the action bar renders locked with the upgrade path. The content used to be REPLACED by the\n * prompt, so a live directory token that only revocation can retire could be revoked through the API alone: the one\n * action an administrator most needs after a lapse was the one the screen hid. Fail closed means a credential can\n * always be cut off from the product, never that the product hides it.\n *\n * A feature whose unavailability behaviour is HIDE renders nothing, notice and content included.\n *\n * The rail also keeps such a section when the feature is not offered at all but something is still configured there\n * (#3126: a lapse no plan in the catalogue sells). Then there is no upgrade to offer, so the section shows the notice\n * and its content: an upgrade prompt whose \"View Upgrade Options\" leads to no plan that grants the feature would send\n * the administrator looking for a purchase that does not exist.\n *\n * Keyed on the absence of an upgrade path rather than on the unavailability behaviour, deliberately: the only sections\n * that reach this unentitled with no upgrade path are the engine's configured-survival case, since an offered feature\n * always has one. An application section declaring `entitlementFeatureId` without a runtime gate would also land here\n * and lose a CONTACT_ADMIN or DISABLE prompt; none exists, and such a section should pair the declaration with its\n * runtime gate as `SettingsSection.entitlementFeatureId` asks.\n */\nfunction EntitlementGatedSettingsSection({ featureId, keptConfigurationNotice, children }: {\n featureId: string;\n keptConfigurationNotice: string;\n children: React.ReactNode;\n}): React.JSX.Element {\n const availability = useFeatureAvailability(featureId);\n const showsNotice = !availability.isAvailable && availability.behavior !== FeatureUnavailabilityBehavior.HIDE;\n const hasUpgradePath = (availability.upgradeOptions?.length ?? 0) > 0;\n if (!showsNotice) {\n // Entitled, or a HIDE feature: the gate renders the content, or nothing.\n return <div className=\"space-y-card\"><FeatureGate featureId={featureId}>{children}</FeatureGate></div>;\n }\n return (\n <div className=\"space-y-card\">\n <Alert variant=\"info\">\n <AlertDescription>{keptConfigurationNotice}</AlertDescription>\n </Alert>\n {/* The prompt alone: the gate renders its prompt in place of nothing, since the feature is unavailable here. */}\n {hasUpgradePath && <FeatureGate featureId={featureId}>{null}</FeatureGate>}\n {children}\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A heading level in the document outline, `h1` … `h6`.
|
|
4
|
+
*/
|
|
5
|
+
export type DocumentHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
/** The level a heading rendered here takes. */
|
|
7
|
+
export declare function useDocumentHeadingLevel(): DocumentHeadingLevel;
|
|
8
|
+
/** One level deeper than `level`, stopping at 6. */
|
|
9
|
+
export declare function nestedDocumentHeadingLevel(level: DocumentHeadingLevel): DocumentHeadingLevel;
|
|
10
|
+
/** The tag name for a level: `'h1'` … `'h6'`. */
|
|
11
|
+
export declare function documentHeadingTag(level: DocumentHeadingLevel): 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
12
|
+
/**
|
|
13
|
+
* Set the level headings beneath take. A surface that renders its own heading above framework chrome without
|
|
14
|
+
* wrapping that chrome in {@link NestedDocumentHeadingLevel} (a custom page with an `h2` of its own, say) uses it to
|
|
15
|
+
* place the chrome correctly in its outline.
|
|
16
|
+
*/
|
|
17
|
+
export declare function DocumentHeadingLevelHost({ level, children }: {
|
|
18
|
+
level: DocumentHeadingLevel;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}): React.ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* Wrap the content a heading owns, so a heading inside it takes the next level. Render the heading itself OUTSIDE
|
|
23
|
+
* it, at {@link useDocumentHeadingLevel}.
|
|
24
|
+
*/
|
|
25
|
+
export declare function NestedDocumentHeadingLevel({ children }: {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
}): React.ReactElement;
|
|
28
|
+
//# sourceMappingURL=document-heading-level.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-heading-level.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/document-heading-level.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAoCxD,+CAA+C;AAC/C,wBAAgB,uBAAuB,IAAI,oBAAoB,CAE9D;AAED,oDAAoD;AACpD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,CAE5F;AAED,iDAAiD;AACjD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAEvG;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,oBAAoB,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAE5I;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAG1G"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The level the NEXT heading takes where it is rendered, decided by what is above it in the page, never by the
|
|
4
|
+
* component drawing it.
|
|
5
|
+
*
|
|
6
|
+
* ## Why the chrome cannot pick its own level
|
|
7
|
+
*
|
|
8
|
+
* A heading's level is a fact about the OUTLINE: it says which heading this one belongs under. The framework's
|
|
9
|
+
* chrome (a field group, a chart card, a section panel, a list's group label) renders the same component in places
|
|
10
|
+
* whose outlines differ: directly under the page's `h1` on a record page, under a section panel's heading, under a
|
|
11
|
+
* collapsible-all heading. Every one of them was a hard-coded `h3`, so on a record page the outline went `h1 → h3`
|
|
12
|
+
* and the levels skipped. The first live accessibility audit of Wonder Todos (axe-core `heading-order`, #3867)
|
|
13
|
+
* reported exactly that on the record read view (a chart card's "My Week by Status" `h3`) and the create form (the
|
|
14
|
+
* "Workflow" group `h3`), each with the record title `h1` the only heading above it.
|
|
15
|
+
*
|
|
16
|
+
* spec-cite: WCAG 2.2 SC 1.3.1 (Info and Relationships), technique H42; axe-core rule id `heading-order`, which
|
|
17
|
+
* reports a heading whose level is more than one deeper than the heading before it.
|
|
18
|
+
*
|
|
19
|
+
* ## The rule
|
|
20
|
+
*
|
|
21
|
+
* - With no host the level is **2**: a framework surface renders beneath its page title, which is the page's one
|
|
22
|
+
* `h1` (`ResourceHeaderTitleHeading`, `ViewLayout_Header`). A surface with no `h1` above it then starts its
|
|
23
|
+
* outline at `h2`, which skips nothing.
|
|
24
|
+
* - A component that DRAWS a heading reads {@link useDocumentHeadingLevel} for its own level, and wraps the content
|
|
25
|
+
* that heading owns in {@link NestedDocumentHeadingLevel}, so a heading inside it is one level deeper.
|
|
26
|
+
* - A `<legend>` is not a heading, so a section named by a legend does not nest its content.
|
|
27
|
+
* - The level stops at 6: HTML has no `h7`, and an outline six levels deep has bigger problems than its last tag.
|
|
28
|
+
*
|
|
29
|
+
* Rejected: a `level` prop threaded through each chrome component. Every caller would have to know its outline
|
|
30
|
+
* position, which is precisely the knowledge a reused component does not have — the `titleTag: 'h4'` a collapsible
|
|
31
|
+
* container passed to its panels was the one place that did this, and it was right only while that container sat
|
|
32
|
+
* directly under an `h2`.
|
|
33
|
+
*/
|
|
34
|
+
const DocumentHeadingLevelContext = React.createContext(2);
|
|
35
|
+
/** The level a heading rendered here takes. */
|
|
36
|
+
export function useDocumentHeadingLevel() {
|
|
37
|
+
return React.useContext(DocumentHeadingLevelContext);
|
|
38
|
+
}
|
|
39
|
+
/** One level deeper than `level`, stopping at 6. */
|
|
40
|
+
export function nestedDocumentHeadingLevel(level) {
|
|
41
|
+
return Math.min(level + 1, 6);
|
|
42
|
+
}
|
|
43
|
+
/** The tag name for a level: `'h1'` … `'h6'`. */
|
|
44
|
+
export function documentHeadingTag(level) {
|
|
45
|
+
return `h${level}`;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Set the level headings beneath take. A surface that renders its own heading above framework chrome without
|
|
49
|
+
* wrapping that chrome in {@link NestedDocumentHeadingLevel} (a custom page with an `h2` of its own, say) uses it to
|
|
50
|
+
* place the chrome correctly in its outline.
|
|
51
|
+
*/
|
|
52
|
+
export function DocumentHeadingLevelHost({ level, children }) {
|
|
53
|
+
return React.createElement(DocumentHeadingLevelContext.Provider, { value: level }, children);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Wrap the content a heading owns, so a heading inside it takes the next level. Render the heading itself OUTSIDE
|
|
57
|
+
* it, at {@link useDocumentHeadingLevel}.
|
|
58
|
+
*/
|
|
59
|
+
export function NestedDocumentHeadingLevel({ children }) {
|
|
60
|
+
const level = useDocumentHeadingLevel();
|
|
61
|
+
return React.createElement(DocumentHeadingLevelContext.Provider, { value: nestedDocumentHeadingLevel(level) }, children);
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=document-heading-level.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-heading-level.js","sourceRoot":"","sources":["../../../../src/components/typography/document-heading-level.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB,CAAC,CAAC,CAAA;AAEhF,+CAA+C;AAC/C,MAAM,UAAU,uBAAuB;IACrC,OAAO,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAA;AACtD,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,0BAA0B,CAAC,KAA2B;IACpE,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAyB,CAAA;AACvD,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,kBAAkB,CAAC,KAA2B;IAC5D,OAAO,IAAI,KAAK,EAAW,CAAA;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAA8D;IACtH,OAAO,KAAK,CAAC,aAAa,CAAC,2BAA2B,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAA;AAC9F,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAE,QAAQ,EAAiC;IACpF,MAAM,KAAK,GAAG,uBAAuB,EAAE,CAAA;IACvC,OAAO,KAAK,CAAC,aAAa,CAAC,2BAA2B,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,0BAA0B,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;AAC1H,CAAC","sourcesContent":["import React from 'react'\n\n/**\n * A heading level in the document outline, `h1` … `h6`.\n */\nexport type DocumentHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6\n\n/**\n * The level the NEXT heading takes where it is rendered, decided by what is above it in the page, never by the\n * component drawing it.\n *\n * ## Why the chrome cannot pick its own level\n *\n * A heading's level is a fact about the OUTLINE: it says which heading this one belongs under. The framework's\n * chrome (a field group, a chart card, a section panel, a list's group label) renders the same component in places\n * whose outlines differ: directly under the page's `h1` on a record page, under a section panel's heading, under a\n * collapsible-all heading. Every one of them was a hard-coded `h3`, so on a record page the outline went `h1 → h3`\n * and the levels skipped. The first live accessibility audit of Wonder Todos (axe-core `heading-order`, #3867)\n * reported exactly that on the record read view (a chart card's \"My Week by Status\" `h3`) and the create form (the\n * \"Workflow\" group `h3`), each with the record title `h1` the only heading above it.\n *\n * spec-cite: WCAG 2.2 SC 1.3.1 (Info and Relationships), technique H42; axe-core rule id `heading-order`, which\n * reports a heading whose level is more than one deeper than the heading before it.\n *\n * ## The rule\n *\n * - With no host the level is **2**: a framework surface renders beneath its page title, which is the page's one\n * `h1` (`ResourceHeaderTitleHeading`, `ViewLayout_Header`). A surface with no `h1` above it then starts its\n * outline at `h2`, which skips nothing.\n * - A component that DRAWS a heading reads {@link useDocumentHeadingLevel} for its own level, and wraps the content\n * that heading owns in {@link NestedDocumentHeadingLevel}, so a heading inside it is one level deeper.\n * - A `<legend>` is not a heading, so a section named by a legend does not nest its content.\n * - The level stops at 6: HTML has no `h7`, and an outline six levels deep has bigger problems than its last tag.\n *\n * Rejected: a `level` prop threaded through each chrome component. Every caller would have to know its outline\n * position, which is precisely the knowledge a reused component does not have — the `titleTag: 'h4'` a collapsible\n * container passed to its panels was the one place that did this, and it was right only while that container sat\n * directly under an `h2`.\n */\nconst DocumentHeadingLevelContext = React.createContext<DocumentHeadingLevel>(2)\n\n/** The level a heading rendered here takes. */\nexport function useDocumentHeadingLevel(): DocumentHeadingLevel {\n return React.useContext(DocumentHeadingLevelContext)\n}\n\n/** One level deeper than `level`, stopping at 6. */\nexport function nestedDocumentHeadingLevel(level: DocumentHeadingLevel): DocumentHeadingLevel {\n return Math.min(level + 1, 6) as DocumentHeadingLevel\n}\n\n/** The tag name for a level: `'h1'` … `'h6'`. */\nexport function documentHeadingTag(level: DocumentHeadingLevel): 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' {\n return `h${level}` as const\n}\n\n/**\n * Set the level headings beneath take. A surface that renders its own heading above framework chrome without\n * wrapping that chrome in {@link NestedDocumentHeadingLevel} (a custom page with an `h2` of its own, say) uses it to\n * place the chrome correctly in its outline.\n */\nexport function DocumentHeadingLevelHost({ level, children }: { level: DocumentHeadingLevel; children: React.ReactNode }): React.ReactElement {\n return React.createElement(DocumentHeadingLevelContext.Provider, { value: level }, children)\n}\n\n/**\n * Wrap the content a heading owns, so a heading inside it takes the next level. Render the heading itself OUTSIDE\n * it, at {@link useDocumentHeadingLevel}.\n */\nexport function NestedDocumentHeadingLevel({ children }: { children: React.ReactNode }): React.ReactElement {\n const level = useDocumentHeadingLevel()\n return React.createElement(DocumentHeadingLevelContext.Provider, { value: nestedDocumentHeadingLevel(level) }, children)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartView.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;oEAQoE;AAEpE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAa,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAmB/F,OAAO,KAAK,EACV,wBAAwB,EACxB,+BAA+B,EAChC,MAAM,6DAA6D,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartView.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;oEAQoE;AAEpE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAa,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAmB/F,OAAO,KAAK,EACV,wBAAwB,EACxB,+BAA+B,EAChC,MAAM,6DAA6D,CAAC;AAUrE,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,kFAAkF;IAClF,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,+BAA+B,CAAC;IACpD,8DAA8D;IAC9D,0BAA0B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,qFAAqF;IACrF,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,aAAa;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmN9C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/** ──────────────────────────────────────────────────────────────
|
|
3
3
|
* ChartView — ECharts-based chart component
|
|
4
4
|
*
|
|
@@ -31,6 +31,7 @@ import { useResourceRegistry } from '../../../core/resources/useResourceRegistry
|
|
|
31
31
|
// ECharts stays behind this file's app-level React.lazy boundary via WildoEChart's
|
|
32
32
|
// static `echarts-setup` import.
|
|
33
33
|
import { WildoEChart } from './WildoEChart.js';
|
|
34
|
+
import { Text } from '../../../components/typography/text.js';
|
|
34
35
|
/**
|
|
35
36
|
* ChartView — renders an ECharts chart from a ChartDefinition.
|
|
36
37
|
*
|
|
@@ -166,21 +167,24 @@ export const ChartView = ({ viewRef, document: documentProp, viewDefinition: vie
|
|
|
166
167
|
}
|
|
167
168
|
if (!isReady || !isResourceLabelsReady)
|
|
168
169
|
return null;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
170
|
+
// #4084: groups of a resource declaring `auditReads` too small to show carry no figures, and are drawn as no value
|
|
171
|
+
// (`measureValueOrNull`). The line says so, so a missing slice or bar is not read as an empty group.
|
|
172
|
+
const suppressedGroupCount = data?.queryMeta?.suppressedGroupCount ?? 0;
|
|
173
|
+
return (_jsxs("div", { ref: containerRefCallback, className: cn('chart-view', className), style: { width, height, position: 'relative', display: 'flex', flexDirection: 'column' }, children: [_jsx("div", { style: { flex: 1, minHeight: 0 }, children: _jsx(WildoEChart
|
|
174
|
+
// Remount on dark-mode toggle: the theme name is stable but its content
|
|
175
|
+
// is re-registered, and ECharts bakes the theme at init time.
|
|
176
|
+
, { option: option, theme: getWildoThemeName(), style: { width: '100%', height: '100%' }, notMerge: true,
|
|
177
|
+
// lazyUpdate MUST stay false. With lazyUpdate={true}, ECharts 6 defers
|
|
178
|
+
// the setOption flush to its next animation frame (`_onframe`); ECharts
|
|
179
|
+
// 6.0.0 then crashes on that deferred path for cartesian charts —
|
|
180
|
+
// `CartesianAxisView.render` dereferences `axisModel.axis.axisBuilder
|
|
181
|
+
// .group` while `axisBuilder` is still undefined (ECharts 6 "promoted"
|
|
182
|
+
// axis-element building to the coordinate-system resize stage, but the
|
|
183
|
+
// deferred-flush ordering skips it). Symptom: `TypeError: Cannot read
|
|
184
|
+
// properties of undefined (reading 'group')`. A synchronous flush runs
|
|
185
|
+
// the full resize→render pipeline in order and renders cleanly with
|
|
186
|
+
// animation intact.
|
|
187
|
+
lazyUpdate: false, onChartReady: onChartReady }, isDark ? 'dark' : 'light') }), suppressedGroupCount > 0 && (_jsx(Text, { className: "text-xs text-muted-foreground", children: t('suppressedGroupsNotice', { count: suppressedGroupCount }) }))] }));
|
|
184
188
|
};
|
|
185
189
|
export default ChartView;
|
|
186
190
|
//# sourceMappingURL=ChartView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartView.js","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.tsx"],"names":[],"mappings":";AAAA;;;;;;;;oEAQoE;AAEpE,OAAc,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,SAAS,EAA+C,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EA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M,EAAE,MAAM,EAAE,MAAM,EAAE,EACxC,QAAQ,EAAE,IAAI;YACZ,uEAAuE;YACvE,wEAAwE;YACxE,kEAAkE;YAClE,sEAAsE;YACtE,uEAAuE;YACvE,uEAAuE;YACvE,sEAAsE;YACtE,uEAAuE;YACvE,oEAAoE;YACpE,oBAAoB;YACtB,UAAU,EAAE,KAAK,EACjB,YAAY,EAAE,YAAY,IAhBrB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAiB9B,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * ChartView — ECharts-based chart component\n *\n * Fetches data from backend via POST /api/charts/:chartRef/data,\n * combines with the visual encoding from the chart definition,\n * and renders via ECharts.\n *\n * This file is lazy-loaded via React.lazy() in AppRouter.\n * ────────────────────────────────────────────────────────────── */\n\nimport React, { useRef, useCallback, useMemo } from 'react';\nimport { ChartType, type ChartDefinition, type ChartInputValues } from '@wildo-ai/saas-models';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { ViewNotFound } from '~wildo-frontend-lib/components/views/ViewNotFound';\nimport { useChartData } from './chart-view.utils';\nimport { useResolvedChartRuntimeDescriptor } from './chart-runtime.utils';\nimport { useChartTheme, getWildoThemeName } from './chart-theme-bridge';\nimport { buildDimensionEnumMeta } from './enum-color-bridge';\nimport { buildEChartsOption } from './option-builder/echarts-option-builder';\nimport { ChartLoadingSkeleton } from './ChartLoadingSkeleton';\nimport { ChartErrorState } from './ChartErrorState';\nimport { ChartEmptyState } from './ChartEmptyState';\nimport { ChartKpiFigure } from './ChartKpiFigure';\nimport {\n buildResolvedInsertedChartDescriptor,\n resolveInsertedChartView,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport type {\n InsertedChartDeclaration,\n ResolvedInsertedChartDescriptor,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\n\n// Direct ECharts binding. Replaces `echarts-for-react`, whose `'finished'`-gated\n// double-init hangs on ECharts 6.0.0 (see WildoEChart for the full analysis).\n// ECharts stays behind this file's app-level React.lazy boundary via WildoEChart's\n// static `echarts-setup` import.\nimport { WildoEChart } from './WildoEChart';\n\nexport interface ChartViewProps {\n /** View reference — resolved from UIContext internally. */\n viewRef?: string;\n /** Pre-resolved bare chart definition. Useful for dev previews and direct renderers. */\n document?: ChartDefinition;\n /** Pre-resolved chart surface definition. When provided, `viewRef` is ignored. */\n viewDefinition?: InsertedChartDeclaration;\n /** Pre-resolved runtime descriptor for inserted or already-bound charts. */\n runtimeDescriptor?: ResolvedInsertedChartDescriptor;\n /** Explicit navigation-time or host-time context bindings. */\n contextResourceIdentifiers?: Record<string, string>;\n /** Explicit standalone-route URL param values for URL_PARAM chart bindings. */\n urlParamValues?: Record<string, string>;\n /** Explicit chart input overrides. These win over binding/default-derived values. */\n inputs?: ChartInputValues;\n /** Custom class name */\n className?: string;\n /** Width */\n width?: string | number;\n /** Height */\n height?: string | number;\n /**\n * When true, a data-fetch failure degrades LOCALLY (this chart card shows the\n * error, with retry) WITHOUT raising the global error toast. Set by EMBEDDED\n * hosts (composite tiles, detail-page charts) so one sub-surface's 403/5xx does\n * not read as a page-level failure. Standalone chart pages leave it `false` and\n * keep the global error pipeline. The error is still emitted/logged either way.\n */\n localErrorOnly?: boolean;\n}\n\n/**\n * ChartView — renders an ECharts chart from a ChartDefinition.\n *\n * Data flow:\n * 1. Resolve definition from UIContext or props\n * 2. Fetch aggregated data from backend\n * 3. Build ECharts option from definition + data\n * 4. Render with echarts-for-react\n */\nexport const ChartView: React.FC<ChartViewProps> = ({\n viewRef,\n document: documentProp,\n viewDefinition: viewDefinitionProp,\n runtimeDescriptor,\n contextResourceIdentifiers,\n urlParamValues,\n inputs,\n className = '',\n width = '100%',\n height = 400,\n localErrorOnly = false,\n}) => {\n const { registry } = useResourceRegistry();\n const { getChartStylePreset, isDark } = useUI();\n const chartStylePreset = getChartStylePreset();\n const { t, isReady, resolvedRegionalPreferences } = useI18n({ component: FrontendComponentType.HIGH_LEVEL_VIEWS_CHART });\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n const echartsRef = useRef<any>(null);\n\n // Register/update chart theme with current style preset\n useChartTheme(chartStylePreset);\n\n const resolvedInsertedChart = useMemo(\n () => (viewDefinitionProp ? undefined : resolveInsertedChartView({ viewRef, registry })),\n [viewDefinitionProp, viewRef, registry],\n );\n const viewDefinition = viewDefinitionProp ?? resolvedInsertedChart?.chartView;\n const effectiveRuntimeDescriptor = useMemo(\n () => runtimeDescriptor ?? (\n resolvedInsertedChart\n ? buildResolvedInsertedChartDescriptor({\n identity: resolvedInsertedChart.identity,\n chartView: resolvedInsertedChart.chartView,\n contextResourceIdentifiers: contextResourceIdentifiers ?? {},\n })\n : undefined\n ),\n [runtimeDescriptor, resolvedInsertedChart, contextResourceIdentifiers],\n );\n const runtime = useResolvedChartRuntimeDescriptor({\n surfaceDefinition: viewDefinition,\n chartDefinition: documentProp,\n runtimeDescriptor: effectiveRuntimeDescriptor,\n explicitContextResourceIdentifiers: contextResourceIdentifiers,\n explicitInputs: inputs,\n urlParamValues,\n });\n const definition = runtime?.chartDefinition;\n\n // Fetch chart data\n const { data, loading, error, refetch } = useChartData(\n definition,\n runtime?.executionChartRef,\n runtime?.resolvedInputs,\n runtime?.contextResourceIdentifiers,\n urlParamValues,\n localErrorOnly,\n resolvedRegionalPreferences.timezone,\n );\n\n // ResizeObserver for container.\n //\n // ECharts reflows to the container natively via `instance.resize()`; we do NOT\n // rebuild the ECharts `option` on resize. An earlier implementation pushed the\n // observed size into React state (a `containerSize` that fed `buildEChartsOption`\n // and sat in the `option` useMemo deps), so every resize tick produced a brand-new\n // option object. Combined with `notMerge`+`lazyUpdate` below, that scheduled a\n // frame-deferred atomic option replacement that raced the in-flight `resize()`\n // relayout — surfacing as `Cannot read properties of undefined (reading 'group')`\n // in ECharts' `CartesianAxisView.render` one frame late, plus the tell-tale\n // \"ResizeObserver loop completed with undelivered notifications\" (the observer\n // callback's state update re-triggered layout). `containerSize` was in any case\n // dead context — no chart-type builder reads it — so dropping the rebuild is\n // behaviour-preserving. Native resize is the whole job here.\n // The observer must arm when the REAL container mounts, which happens strictly\n // AFTER the loading/error/empty early returns below stop short-circuiting —\n // i.e. potentially many renders after the initial mount. A mount-time\n // `useEffect(…, [])` reading a plain ref (the previous implementation) ran\n // exactly once, while the container was still null (the first render always\n // takes the loading/skeleton branch), so the observer NEVER armed and charts\n // never reflowed to container resizes. A callback ref is the structural fix:\n // React invokes it at the moment the container node attaches (and with `null`\n // when it detaches, including unmount), so arming/disarming exactly tracks the\n // real DOM node regardless of which render branch produced it.\n const containerRefCallback = useCallback((el: HTMLDivElement | null) => {\n resizeObserverRef.current?.disconnect();\n resizeObserverRef.current = null;\n if (!el) return;\n\n const observer = new ResizeObserver(() => {\n const instance = echartsRef.current?.getEchartsInstance?.();\n // Guard against a disposed instance: on theme toggle the chart remounts\n // (see the `key` prop below) and the observer closure can fire against an\n // instance that ECharts has already torn down — `resize()` would throw.\n if (instance && !instance.isDisposed?.()) {\n instance.resize();\n }\n });\n\n observer.observe(el);\n resizeObserverRef.current = observer;\n }, []);\n\n // Save echarts instance ref\n const onChartReady = useCallback((instance: unknown) => {\n echartsRef.current = { getEchartsInstance: () => instance };\n }, []);\n\n // Build ECharts option — memoized, placed before early returns to respect Rules of Hooks.\n // Deliberately NOT keyed on container size: the option carries no size-dependent\n // fields (no builder reads `containerSize`), and rebuilding it on resize is what\n // raced the native `resize()` into the `CartesianAxisView` crash (see the observer\n // above). The option now rebuilds only on genuine content/appearance changes.\n // Enum coherence: when a chart dimension is an enum, resolve — once, from the\n // resource registry's decorated schema — both the value→color map (slices/bars\n // match the value's badge) and the enum's declared member order (categories sort\n // by declaration order, not the backend's alphabetical order). Keyed on `isDark`\n // because the colors resolve live CSS vars (`--info`, `--muted-foreground`, …)\n // that flip with the theme; ChartView does not remount on toggle (only its child\n // chart does), so without this the memo would keep the previous mode's colors.\n // See `enum-color-bridge.ts`.\n //\n // Labels ride the same pass: an enum dimension's values are DISPLAYED through the i18n tree (axis\n // categories, slice and split names) while the data stays keyed on the raw value. The resource's\n // label bundle is requested here so its enum labels are loaded before the chart renders.\n const { tResourceFieldEnumValue, isReady: isResourceLabelsReady } = useI18n({ resource: definition?.dataQuery.mainResourceType });\n const dimensionEnumMeta = useMemo(\n () => (definition\n ? buildDimensionEnumMeta(definition, (type) => registry.resourceConfigurations[type], tResourceFieldEnumValue)\n : { colors: {}, order: {}, labels: {} }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [definition, registry, isDark, tResourceFieldEnumValue, isResourceLabelsReady],\n );\n\n // A KPI is a figure, not a drawing (#2299): it builds no ECharts option and renders `ChartKpiFigure` below.\n const isKpi = definition?.chartType === ChartType.KPI;\n const option = useMemo(\n () => (definition && !isKpi && data && data.data.length > 0)\n ? buildEChartsOption(definition, data, undefined, chartStylePreset, t, dimensionEnumMeta, resolvedRegionalPreferences.locale)\n : null,\n [definition, isKpi, data, chartStylePreset, t, dimensionEnumMeta, resolvedRegionalPreferences.locale],\n );\n\n // Not found\n if (!definition) {\n return <ViewNotFound viewKind=\"chart\" viewRef={viewRef} />;\n }\n\n // Loading\n if (loading && !data) {\n return <ChartLoadingSkeleton height={height} />;\n }\n\n // Error\n if (error) {\n return <ChartErrorState error={error} onRetry={refetch} />;\n }\n\n // A figure: one row, always, from a backend that completes an empty scope; no row only from one that does not.\n if (isKpi) {\n return data && data.data.length > 0\n ? <ChartKpiFigure definition={definition} data={data} className={className} />\n : <ChartEmptyState />;\n }\n\n // Empty\n if (!option) {\n return <ChartEmptyState />;\n }\n\n if (!isReady || !isResourceLabelsReady) return null;\n\n return (\n <div\n ref={containerRefCallback}\n className={cn('chart-view', className)}\n style={{ width, height, position: 'relative' }}\n >\n <WildoEChart\n // Remount on dark-mode toggle: the theme name is stable but its content\n // is re-registered, and ECharts bakes the theme at init time.\n key={isDark ? 'dark' : 'light'}\n option={option}\n theme={getWildoThemeName()}\n style={{ width: '100%', height: '100%' }}\n notMerge={true}\n // lazyUpdate MUST stay false. With lazyUpdate={true}, ECharts 6 defers\n // the setOption flush to its next animation frame (`_onframe`); ECharts\n // 6.0.0 then crashes on that deferred path for cartesian charts —\n // `CartesianAxisView.render` dereferences `axisModel.axis.axisBuilder\n // .group` while `axisBuilder` is still undefined (ECharts 6 \"promoted\"\n // axis-element building to the coordinate-system resize stage, but the\n // deferred-flush ordering skips it). Symptom: `TypeError: Cannot read\n // properties of undefined (reading 'group')`. A synchronous flush runs\n // the full resize→render pipeline in order and renders cleanly with\n // animation intact.\n lazyUpdate={false}\n onChartReady={onChartReady}\n />\n </div>\n );\n};\n\nexport default ChartView;\n"]}
|
|
1
|
+
{"version":3,"file":"ChartView.js","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.tsx"],"names":[],"mappings":";AAAA;;;;;;;;oEAQoE;AAEpE,OAAc,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,SAAS,EAA+C,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC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AY,EAAE,SAAS,CAAC,EACtC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,aAExF,cAAK,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,YACrC,KAAC,WAAW;gBACV,wEAAwE;gBACxE,8DAA8D;oBAE9D,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,iBAAiB,EAAE,EAC1B,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EACxC,QAAQ,EAAE,IAAI;oBACZ,uEAAuE;oBACvE,wEAAwE;oBACxE,kEAAkE;oBAClE,sEAAsE;oBACtE,uEAAuE;oBACvE,uEAAuE;oBACvE,sEAAsE;oBACtE,uEAAuE;oBACvE,oEAAoE;oBACpE,oBAAoB;oBACtB,UAAU,EAAE,KAAK,EACjB,YAAY,EAAE,YAAY,IAhBrB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAiB9B,GACI,EACL,oBAAoB,GAAG,CAAC,IAAI,CAC3B,KAAC,IAAI,IAAC,SAAS,EAAC,+BAA+B,YAAE,CAAC,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,GAAQ,CACtH,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * ChartView — ECharts-based chart component\n *\n * Fetches data from backend via POST /api/charts/:chartRef/data,\n * combines with the visual encoding from the chart definition,\n * and renders via ECharts.\n *\n * This file is lazy-loaded via React.lazy() in AppRouter.\n * ────────────────────────────────────────────────────────────── */\n\nimport React, { useRef, useCallback, useMemo } from 'react';\nimport { ChartType, type ChartDefinition, type ChartInputValues } from '@wildo-ai/saas-models';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { ViewNotFound } from '~wildo-frontend-lib/components/views/ViewNotFound';\nimport { useChartData } from './chart-view.utils';\nimport { useResolvedChartRuntimeDescriptor } from './chart-runtime.utils';\nimport { useChartTheme, getWildoThemeName } from './chart-theme-bridge';\nimport { buildDimensionEnumMeta } from './enum-color-bridge';\nimport { buildEChartsOption } from './option-builder/echarts-option-builder';\nimport { ChartLoadingSkeleton } from './ChartLoadingSkeleton';\nimport { ChartErrorState } from './ChartErrorState';\nimport { ChartEmptyState } from './ChartEmptyState';\nimport { ChartKpiFigure } from './ChartKpiFigure';\nimport {\n buildResolvedInsertedChartDescriptor,\n resolveInsertedChartView,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport type {\n InsertedChartDeclaration,\n ResolvedInsertedChartDescriptor,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\n\n// Direct ECharts binding. Replaces `echarts-for-react`, whose `'finished'`-gated\n// double-init hangs on ECharts 6.0.0 (see WildoEChart for the full analysis).\n// ECharts stays behind this file's app-level React.lazy boundary via WildoEChart's\n// static `echarts-setup` import.\nimport { WildoEChart } from './WildoEChart';\nimport { Text } from '~wildo-frontend-lib/components/typography/text';\n\nexport interface ChartViewProps {\n /** View reference — resolved from UIContext internally. */\n viewRef?: string;\n /** Pre-resolved bare chart definition. Useful for dev previews and direct renderers. */\n document?: ChartDefinition;\n /** Pre-resolved chart surface definition. When provided, `viewRef` is ignored. */\n viewDefinition?: InsertedChartDeclaration;\n /** Pre-resolved runtime descriptor for inserted or already-bound charts. */\n runtimeDescriptor?: ResolvedInsertedChartDescriptor;\n /** Explicit navigation-time or host-time context bindings. */\n contextResourceIdentifiers?: Record<string, string>;\n /** Explicit standalone-route URL param values for URL_PARAM chart bindings. */\n urlParamValues?: Record<string, string>;\n /** Explicit chart input overrides. These win over binding/default-derived values. */\n inputs?: ChartInputValues;\n /** Custom class name */\n className?: string;\n /** Width */\n width?: string | number;\n /** Height */\n height?: string | number;\n /**\n * When true, a data-fetch failure degrades LOCALLY (this chart card shows the\n * error, with retry) WITHOUT raising the global error toast. Set by EMBEDDED\n * hosts (composite tiles, detail-page charts) so one sub-surface's 403/5xx does\n * not read as a page-level failure. Standalone chart pages leave it `false` and\n * keep the global error pipeline. The error is still emitted/logged either way.\n */\n localErrorOnly?: boolean;\n}\n\n/**\n * ChartView — renders an ECharts chart from a ChartDefinition.\n *\n * Data flow:\n * 1. Resolve definition from UIContext or props\n * 2. Fetch aggregated data from backend\n * 3. Build ECharts option from definition + data\n * 4. Render with echarts-for-react\n */\nexport const ChartView: React.FC<ChartViewProps> = ({\n viewRef,\n document: documentProp,\n viewDefinition: viewDefinitionProp,\n runtimeDescriptor,\n contextResourceIdentifiers,\n urlParamValues,\n inputs,\n className = '',\n width = '100%',\n height = 400,\n localErrorOnly = false,\n}) => {\n const { registry } = useResourceRegistry();\n const { getChartStylePreset, isDark } = useUI();\n const chartStylePreset = getChartStylePreset();\n const { t, isReady, resolvedRegionalPreferences } = useI18n({ component: FrontendComponentType.HIGH_LEVEL_VIEWS_CHART });\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n const echartsRef = useRef<any>(null);\n\n // Register/update chart theme with current style preset\n useChartTheme(chartStylePreset);\n\n const resolvedInsertedChart = useMemo(\n () => (viewDefinitionProp ? undefined : resolveInsertedChartView({ viewRef, registry })),\n [viewDefinitionProp, viewRef, registry],\n );\n const viewDefinition = viewDefinitionProp ?? resolvedInsertedChart?.chartView;\n const effectiveRuntimeDescriptor = useMemo(\n () => runtimeDescriptor ?? (\n resolvedInsertedChart\n ? buildResolvedInsertedChartDescriptor({\n identity: resolvedInsertedChart.identity,\n chartView: resolvedInsertedChart.chartView,\n contextResourceIdentifiers: contextResourceIdentifiers ?? {},\n })\n : undefined\n ),\n [runtimeDescriptor, resolvedInsertedChart, contextResourceIdentifiers],\n );\n const runtime = useResolvedChartRuntimeDescriptor({\n surfaceDefinition: viewDefinition,\n chartDefinition: documentProp,\n runtimeDescriptor: effectiveRuntimeDescriptor,\n explicitContextResourceIdentifiers: contextResourceIdentifiers,\n explicitInputs: inputs,\n urlParamValues,\n });\n const definition = runtime?.chartDefinition;\n\n // Fetch chart data\n const { data, loading, error, refetch } = useChartData(\n definition,\n runtime?.executionChartRef,\n runtime?.resolvedInputs,\n runtime?.contextResourceIdentifiers,\n urlParamValues,\n localErrorOnly,\n resolvedRegionalPreferences.timezone,\n );\n\n // ResizeObserver for container.\n //\n // ECharts reflows to the container natively via `instance.resize()`; we do NOT\n // rebuild the ECharts `option` on resize. An earlier implementation pushed the\n // observed size into React state (a `containerSize` that fed `buildEChartsOption`\n // and sat in the `option` useMemo deps), so every resize tick produced a brand-new\n // option object. Combined with `notMerge`+`lazyUpdate` below, that scheduled a\n // frame-deferred atomic option replacement that raced the in-flight `resize()`\n // relayout — surfacing as `Cannot read properties of undefined (reading 'group')`\n // in ECharts' `CartesianAxisView.render` one frame late, plus the tell-tale\n // \"ResizeObserver loop completed with undelivered notifications\" (the observer\n // callback's state update re-triggered layout). `containerSize` was in any case\n // dead context — no chart-type builder reads it — so dropping the rebuild is\n // behaviour-preserving. Native resize is the whole job here.\n // The observer must arm when the REAL container mounts, which happens strictly\n // AFTER the loading/error/empty early returns below stop short-circuiting —\n // i.e. potentially many renders after the initial mount. A mount-time\n // `useEffect(…, [])` reading a plain ref (the previous implementation) ran\n // exactly once, while the container was still null (the first render always\n // takes the loading/skeleton branch), so the observer NEVER armed and charts\n // never reflowed to container resizes. A callback ref is the structural fix:\n // React invokes it at the moment the container node attaches (and with `null`\n // when it detaches, including unmount), so arming/disarming exactly tracks the\n // real DOM node regardless of which render branch produced it.\n const containerRefCallback = useCallback((el: HTMLDivElement | null) => {\n resizeObserverRef.current?.disconnect();\n resizeObserverRef.current = null;\n if (!el) return;\n\n const observer = new ResizeObserver(() => {\n const instance = echartsRef.current?.getEchartsInstance?.();\n // Guard against a disposed instance: on theme toggle the chart remounts\n // (see the `key` prop below) and the observer closure can fire against an\n // instance that ECharts has already torn down — `resize()` would throw.\n if (instance && !instance.isDisposed?.()) {\n instance.resize();\n }\n });\n\n observer.observe(el);\n resizeObserverRef.current = observer;\n }, []);\n\n // Save echarts instance ref\n const onChartReady = useCallback((instance: unknown) => {\n echartsRef.current = { getEchartsInstance: () => instance };\n }, []);\n\n // Build ECharts option — memoized, placed before early returns to respect Rules of Hooks.\n // Deliberately NOT keyed on container size: the option carries no size-dependent\n // fields (no builder reads `containerSize`), and rebuilding it on resize is what\n // raced the native `resize()` into the `CartesianAxisView` crash (see the observer\n // above). The option now rebuilds only on genuine content/appearance changes.\n // Enum coherence: when a chart dimension is an enum, resolve — once, from the\n // resource registry's decorated schema — both the value→color map (slices/bars\n // match the value's badge) and the enum's declared member order (categories sort\n // by declaration order, not the backend's alphabetical order). Keyed on `isDark`\n // because the colors resolve live CSS vars (`--info`, `--muted-foreground`, …)\n // that flip with the theme; ChartView does not remount on toggle (only its child\n // chart does), so without this the memo would keep the previous mode's colors.\n // See `enum-color-bridge.ts`.\n //\n // Labels ride the same pass: an enum dimension's values are DISPLAYED through the i18n tree (axis\n // categories, slice and split names) while the data stays keyed on the raw value. The resource's\n // label bundle is requested here so its enum labels are loaded before the chart renders.\n const { tResourceFieldEnumValue, isReady: isResourceLabelsReady } = useI18n({ resource: definition?.dataQuery.mainResourceType });\n const dimensionEnumMeta = useMemo(\n () => (definition\n ? buildDimensionEnumMeta(definition, (type) => registry.resourceConfigurations[type], tResourceFieldEnumValue)\n : { colors: {}, order: {}, labels: {} }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [definition, registry, isDark, tResourceFieldEnumValue, isResourceLabelsReady],\n );\n\n // A KPI is a figure, not a drawing (#2299): it builds no ECharts option and renders `ChartKpiFigure` below.\n const isKpi = definition?.chartType === ChartType.KPI;\n const option = useMemo(\n () => (definition && !isKpi && data && data.data.length > 0)\n ? buildEChartsOption(definition, data, undefined, chartStylePreset, t, dimensionEnumMeta, resolvedRegionalPreferences.locale)\n : null,\n [definition, isKpi, data, chartStylePreset, t, dimensionEnumMeta, resolvedRegionalPreferences.locale],\n );\n\n // Not found\n if (!definition) {\n return <ViewNotFound viewKind=\"chart\" viewRef={viewRef} />;\n }\n\n // Loading\n if (loading && !data) {\n return <ChartLoadingSkeleton height={height} />;\n }\n\n // Error\n if (error) {\n return <ChartErrorState error={error} onRetry={refetch} />;\n }\n\n // A figure: one row, always, from a backend that completes an empty scope; no row only from one that does not.\n if (isKpi) {\n return data && data.data.length > 0\n ? <ChartKpiFigure definition={definition} data={data} className={className} />\n : <ChartEmptyState />;\n }\n\n // Empty\n if (!option) {\n return <ChartEmptyState />;\n }\n\n if (!isReady || !isResourceLabelsReady) return null;\n\n // #4084: groups of a resource declaring `auditReads` too small to show carry no figures, and are drawn as no value\n // (`measureValueOrNull`). The line says so, so a missing slice or bar is not read as an empty group.\n const suppressedGroupCount = data?.queryMeta?.suppressedGroupCount ?? 0;\n\n return (\n <div\n ref={containerRefCallback}\n className={cn('chart-view', className)}\n style={{ width, height, position: 'relative', display: 'flex', flexDirection: 'column' }}\n >\n <div style={{ flex: 1, minHeight: 0 }}>\n <WildoEChart\n // Remount on dark-mode toggle: the theme name is stable but its content\n // is re-registered, and ECharts bakes the theme at init time.\n key={isDark ? 'dark' : 'light'}\n option={option}\n theme={getWildoThemeName()}\n style={{ width: '100%', height: '100%' }}\n notMerge={true}\n // lazyUpdate MUST stay false. With lazyUpdate={true}, ECharts 6 defers\n // the setOption flush to its next animation frame (`_onframe`); ECharts\n // 6.0.0 then crashes on that deferred path for cartesian charts —\n // `CartesianAxisView.render` dereferences `axisModel.axis.axisBuilder\n // .group` while `axisBuilder` is still undefined (ECharts 6 \"promoted\"\n // axis-element building to the coordinate-system resize stage, but the\n // deferred-flush ordering skips it). Symptom: `TypeError: Cannot read\n // properties of undefined (reading 'group')`. A synchronous flush runs\n // the full resize→render pipeline in order and renders cleanly with\n // animation intact.\n lazyUpdate={false}\n onChartReady={onChartReady}\n />\n </div>\n {suppressedGroupCount > 0 && (\n <Text className=\"text-xs text-muted-foreground\">{t('suppressedGroupsNotice', { count: suppressedGroupCount })}</Text>\n )}\n </div>\n );\n};\n\nexport default ChartView;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartView.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAM7C,eAAO,MAAM,yBAAyB,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ChartView.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAM7C,eAAO,MAAM,yBAAyB,EAAE,mBAAmB,EAoC1D,CAAC"}
|
|
@@ -16,6 +16,13 @@ export const HighLevelViewsChartLabels = [
|
|
|
16
16
|
{ ref: 'errorLoading', kind: LabelKind.MESSAGE, purpose: 'Error-state text shown when the chart fails to load its data' },
|
|
17
17
|
{ ref: 'loading', kind: LabelKind.MESSAGE, purpose: 'Loading-state text shown while the chart data is being fetched' },
|
|
18
18
|
{ ref: 'retry', kind: LabelKind.BUTTON, purpose: 'Button that re-attempts the chart data fetch after a load error' },
|
|
19
|
+
{
|
|
20
|
+
ref: 'suppressedGroupsNotice',
|
|
21
|
+
kind: LabelKind.MESSAGE,
|
|
22
|
+
purpose: 'Line under a chart saying that some of its groups hold too few records to show their figures, so they are drawn with no value (a privacy protection on data whose reads are audited)',
|
|
23
|
+
params: [{ key: 'count', meaning: 'How many groups had their figures withheld', isCount: true }],
|
|
24
|
+
notes: ['Say the figures are withheld because the groups are too small, not that data is missing or an error occurred.'],
|
|
25
|
+
},
|
|
19
26
|
// Waterfall chart series labels
|
|
20
27
|
{ ref: 'waterfallGainLabel', kind: LabelKind.LABEL, purpose: 'Default series name for positive (gain) bars in a waterfall chart', notes: ['Default: "Increase"'] },
|
|
21
28
|
{ ref: 'waterfallLossLabel', kind: LabelKind.LABEL, purpose: 'Default series name for negative (loss) bars in a waterfall chart', notes: ['Default: "Decrease"'] },
|