@wildo-ai/saas-frontend-lib 1.1.16 → 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/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.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +2 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -1
- 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/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/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/requests/wildo-http-client-manual-calls.frontend.service.d.ts +39 -4
- 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 +33 -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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSidebarResourceBrowser.js","sourceRoot":"","sources":["../../../../../src/components/navigation/app-level/useSidebarResourceBrowser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE1E,OA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ACL,KAAK;QACL,SAAS;QACT,SAAS,EAAE,eAAe;QAC1B,YAAY,EAAE,KAAK;QACnB,qBAAqB;QACrB,aAAa;QACb,UAAU,EAAE,+BAA+B,CAAC,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,CAAC;QAC9F,gBAAgB,EAAE,UAAU,CAAC,qBAAqB,CAAC,yBAAyB,EAAE,4BAA4B,CAAC;QAC3G,QAAQ;QACR,aAAa;KACd,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState, useRef, useCallback, useMemo } from 'react';\n\nimport {\n CoreResourceOperation,\n ResourcesConfig_OperationPathUtils,\n} from '@wildo-ai/saas-models';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\n\nimport { ApplicationLevelComponentType } from '~wildo-frontend-lib/core/config/app-level-components.frontend.schemas';\nimport { ScopeUtilsService } from '~wildo-frontend-lib/core/scope/scope.utils.frontend.service';\nimport { useAppScopeSafe } from '~wildo-frontend-lib/core/scope/useAppScope';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { frontendResourceUtils, FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { resolveResourceHeaderLabel } from '~wildo-frontend-lib/core/i18n/component-label-resolution.utils';\nimport { resolveSidebarBrowserEmptyLabel } from '~wildo-frontend-lib/components/navigation/app-level/sidebar-resource-browser-empty-label';\nimport { NavigationUtils } from '~wildo-frontend-lib/core/navigation/navigation.utils';\nimport { useNavigationController } from '~wildo-frontend-lib/core/navigation/useNavigationController';\nimport { IconCategory, type IconRequest_Resources } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { useUserFacingErrorMessage } from '~wildo-frontend-lib/core/errors/useUserFacingErrorMessage';\nimport type { ResourceBrowserClickContext } from '~wildo-frontend-lib/core/config/launcher-items.frontend.schemas';\nimport type { AnyFrontendResourceConfiguration, FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { resolveSidebarResourceBrowserOperation } from '~wildo-frontend-lib/core/navigation/sidebar-resource-browser-operation';\nimport { buildResourceLoadingScope } from '~wildo-frontend-lib/core/loading/loading-scope.frontend.utils';\nimport type { LoadingScope } from '~wildo-frontend-lib/core/loading/loading-types.frontend.schemas';\n\nconst logger: LoggerFrontendService = LoggerFrontendService.getLogger();\nconst logDebug: (message: string, context?: Record<string, unknown>) => void = logger.debugByType('sidebar-resource-browser');\nlogger.setDebugTypeLogging('sidebar-resource-browser', false);\n\n/** Both bundles this browser reads: its own words, and the generic list's `noItems` empty-state default. */\nexport const SIDEBAR_RESOURCE_BROWSER_LABEL_COMPONENTS = [\n FrontendComponentType.APPLICATION_LEVEL_SIDEBAR,\n FrontendComponentType.RESOURCES_LAYOUTS_LIST,\n];\n\n/** What a sidebar resource browser is showing, decided once here so every renderer shows the same thing (#1828). */\nexport enum SidebarResourceBrowserState {\n /** The resource type is not registered. The words are `unavailableLabel`; the identifier is logged. */\n UNREGISTERED = 'unregistered',\n /** The declared operation does not resolve on the resource: a configuration problem, `unavailableLabel` too. */\n OPERATION_UNRESOLVABLE = 'operation_unresolvable',\n /** The FIRST read is in flight: nothing has been read yet. A re-read keeps the state its data gives (see `isLoading`). */\n LOADING = 'loading',\n /** The read failed; `errorMessage` says why, in the person's words. */\n FAILED = 'failed',\n /** The read answered no instance (after `instanceFilter`); the words are `emptyLabel`. */\n EMPTY = 'empty',\n /** `instances` holds what to show. */\n READY = 'ready',\n}\n\n/** One instance the browser lists: its name, and what selecting it does. */\nexport interface SidebarResourceBrowserInstance {\n /** A stable render key: the record's id, else its position. */\n key: string;\n /** The record's id, as the click context and the navigation carry it (`''` when the record has none). */\n id: string;\n /** The record's name, through the shared label resolver. */\n label: string;\n /** The record as read, for an `onInstanceClick` that needs more than its id. */\n data: Record<string, unknown>;\n /** The authored `onInstanceClick`, else navigation to the record. */\n onSelect: () => void;\n}\n\nexport interface UseSidebarResourceBrowserOptions {\n resourceType: string;\n operation?: string;\n operationVariant?: string;\n navigateOperation?: string;\n navigateOperationVariant?: string;\n instanceFilter?: (instance: Record<string, unknown>) => boolean;\n onInstanceClick?: (context: ResourceBrowserClickContext) => void;\n}\n\n/**\n * The DATA of a sidebar resource browser (#1828): which instances to list, named, with what selecting each does, and the\n * state that decides what is shown. Data only, as the app-level behavior hooks are (`app-shell.schemas.ts`): no element,\n * no class, and the icon as a REFERENCE, so a renderer that is not the DOM lists the same instances.\n *\n * Reads the instances through `doOperation` with scope-aware `contextualParameters` (the bound operation defaults to\n * `LIST`), applies `instanceFilter` client-side, and navigates to an instance through `READ` unless `navigateOperation`\n * or a non-LIST `operation` names another.\n */\nexport interface SidebarResourceBrowserBehavior {\n state: SidebarResourceBrowserState;\n /**\n * A read is in flight, the first or a re-read. A re-read keeps the instances already read, and the state they give, until\n * it answers (#1828 review F1): a browser that blanked its list on every re-read would flash its empty text.\n */\n isLoading: boolean;\n instances: SidebarResourceBrowserInstance[];\n /** The failure in the person's words, when `state` is `FAILED`. */\n errorMessage: string | null;\n /** The resource's icon, as a reference; the renderer draws it. */\n resourceIconReference: IconRequest_Resources;\n /** The list's accessible name: the resource's title. */\n listAriaLabel: string;\n /** What an EMPTY browser says. */\n emptyLabel: string;\n /** What an UNREGISTERED or OPERATION_UNRESOLVABLE browser says. */\n unavailableLabel: string;\n /** The label bundles the browser's words come from, and the loading scope of its read, for a loading gate. */\n i18nKeys: string[];\n loadingScopes: LoadingScope[];\n}\n\nexport function useSidebarResourceBrowser({\n resourceType,\n operation,\n operationVariant,\n navigateOperation,\n navigateOperationVariant,\n instanceFilter,\n onInstanceClick,\n}: UseSidebarResourceBrowserOptions): SidebarResourceBrowserBehavior {\n const { registry, doOperation } = useResourceRegistry();\n const { navigateToResource } = useNavigationController();\n const appScope = useAppScopeSafe();\n const { tResourceHeader, tResourceEmptyState, t, tComponent, formatDate, formatDateTime } = useI18n({ resource: resourceType, component: SIDEBAR_RESOURCE_BROWSER_LABEL_COMPONENTS });\n // Stable identity, so the fetch effect below may call it without listing it.\n const toUserFacingErrorMessage = useUserFacingErrorMessage();\n\n const [instances, setInstances] = useState<Record<string, unknown>[]>([]);\n const [isLoading, setIsLoading] = useState(true);\n const [error, setError] = useState<string | null>(null);\n // A configuration problem, not a caught error: its words are a label.\n const [operationUnresolvable, setOperationUnresolvable] = useState(false);\n\n const doOperationRef = useRef(doOperation);\n doOperationRef.current = doOperation;\n\n const resourceConfig: AnyFrontendResourceConfiguration | undefined = registry.resourceConfigurations[resourceType];\n\n const boundOperation: FrontendResourceConfiguration_Operation<any, any, any> | undefined = useMemo(() => {\n if (!resourceConfig) return undefined;\n return resolveSidebarResourceBrowserOperation(resourceConfig, operation ?? CoreResourceOperation.LIST, operationVariant);\n }, [resourceConfig, operation, operationVariant]);\n\n const navigationOperationResolved: FrontendResourceConfiguration_Operation<any, any, any> | undefined = useMemo(() => {\n if (!resourceConfig) return undefined;\n\n if (navigateOperation) {\n return resolveSidebarResourceBrowserOperation(resourceConfig, navigateOperation, navigateOperationVariant);\n }\n\n if (operation && operation !== CoreResourceOperation.LIST) {\n return resolveSidebarResourceBrowserOperation(resourceConfig, operation, operationVariant);\n }\n\n return (\n resolveSidebarResourceBrowserOperation(resourceConfig, CoreResourceOperation.READ) ??\n boundOperation\n );\n }, [resourceConfig, navigateOperation, navigateOperationVariant, operation, operationVariant, boundOperation]);\n\n const scopedContextIdentifiers = useMemo((): Record<string, string> => {\n if (!resourceConfig) return {};\n\n const primaryScopeInitiatorIds = ScopeUtilsService.buildInitiatorIds({\n userId: appScope?.currentUserId,\n organizationId: appScope?.currentOrganizationId,\n applicationId: appScope?.currentApplicationId,\n anonymousUserId: appScope?.currentAnonymousUserId,\n });\n\n return {\n ...ScopeUtilsService.primaryScopeToContextIdentifiers(\n primaryScopeInitiatorIds,\n resourceConfig.resourcePrimaryScope,\n ),\n ...(appScope?.buildContextResourceIdentifiers() ?? {}),\n };\n }, [\n resourceConfig,\n appScope?.currentUserId,\n appScope?.currentOrganizationId,\n appScope?.currentApplicationId,\n appScope?.currentAnonymousUserId,\n appScope,\n ]);\n\n const operationPathKey = useMemo(() => {\n if (!boundOperation) return null;\n return ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(boundOperation);\n }, [boundOperation]);\n\n useEffect(() => {\n setOperationUnresolvable(Boolean(resourceConfig) && !operationPathKey);\n if (!operationPathKey || !resourceConfig) {\n setInstances([]);\n if (resourceConfig && !operationPathKey) {\n const message = `Sidebar resource browser cannot resolve operation \"${operation ?? CoreResourceOperation.LIST}\" on resource \"${resourceType}\".`;\n setError(null);\n logger.warn(message, {\n resourceType,\n operationIdentifier: operation ?? CoreResourceOperation.LIST,\n operationVariant,\n });\n } else {\n if (!resourceConfig) {\n // The person reads the `resourceBrowserUnavailable` label; the identifier belongs in the log.\n logger.warn(`Sidebar resource browser: resource type \"${resourceType}\" is not registered.`, { resourceType });\n }\n setError(null);\n }\n setIsLoading(false);\n return;\n }\n\n let cancelled = false;\n\n const fetchInstances = async () => {\n setIsLoading(true);\n setError(null);\n try {\n logDebug('Fetching resource instances', { resourceType, operationPathKey });\n const result = await doOperationRef.current(operationPathKey, {\n contextualParameters: scopedContextIdentifiers,\n queryParameters: { limit: 100 },\n });\n\n if (cancelled) return;\n\n const items = Array.isArray(result) ? result : (result as any)?.data ?? [];\n setInstances(items as Record<string, unknown>[]);\n logDebug('Fetched instances', { count: items.length });\n } catch (err) {\n if (cancelled) return;\n // Shown to the person, so resolved to localized text — `extractErrorInfo(err).message` was the\n // backend's i18n REFERENCE (#1160).\n setError(toUserFacingErrorMessage(err));\n logger.error('SidebarResourceBrowser fetch failed', { resourceType, error: err });\n } finally {\n if (!cancelled) setIsLoading(false);\n }\n };\n\n fetchInstances();\n return () => { cancelled = true; };\n }, [operationPathKey, resourceType, resourceConfig, scopedContextIdentifiers, operation, operationVariant]);\n\n const filteredInstances = useMemo(() => {\n if (!instanceFilter) return instances;\n return instances.filter(instanceFilter);\n }, [instances, instanceFilter]);\n\n const listAriaLabel = useMemo(\n () => resolveResourceHeaderLabel({\n tResourceHeader,\n resourceType,\n key: 'title',\n }),\n [resourceType, tResourceHeader],\n );\n\n const handleInstanceClick = useCallback((instance: Record<string, unknown>) => {\n const instanceId = (instance.id ?? instance._id ?? '') as string;\n\n if (onInstanceClick) {\n onInstanceClick({\n resourceType,\n instanceId,\n instanceData: instance,\n });\n return;\n }\n\n if (resourceConfig && navigationOperationResolved) {\n const contextIdentifiers: Record<string, string> = {\n ...scopedContextIdentifiers,\n [resourceType]: instanceId,\n };\n const parentResourcesRequirements = frontendResourceUtils.buildParentResourcesRequirements(\n resourceType as any,\n contextIdentifiers,\n registry,\n );\n\n const resourceContext = frontendResourceUtils.createFrontendResourceOperationContextFromOperation({\n resourceType: resourceType as any,\n operation: navigationOperationResolved,\n contextResourceIdentifiers: contextIdentifiers,\n parentResourcesRequirements,\n });\n navigateToResource(\n resourceContext,\n NavigationUtils.createAppLevelInitiator(ApplicationLevelComponentType.SIDEBAR),\n );\n return;\n }\n\n logger.warn('SidebarResourceBrowser navigation skipped: no navigation operation resolved', {\n resourceType,\n fetchOperationIdentifier: boundOperation?.operationIdentifier,\n navigationOperationIdentifier: navigateOperation ?? CoreResourceOperation.READ,\n navigationOperationVariant: navigateOperationVariant,\n instanceId,\n });\n }, [\n resourceType,\n onInstanceClick,\n resourceConfig,\n navigationOperationResolved,\n navigateOperation,\n navigateOperationVariant,\n scopedContextIdentifiers,\n registry,\n navigateToResource,\n boundOperation,\n ]);\n\n /*\n * A record's name through the ONE shared resolver, like every other surface that names a record (#1851). This\n * browser used to call the label callback itself with only `currentObject`, so a callback reading `t`, a date\n * formatter or the resource type threw, and the catch fell back to `name`/`title`/`id` — a product showed its id\n * here while its list row showed its word. The shared resolver's own fallback is the record's declared summary\n * fields, then its id.\n */\n const listedInstances = useMemo((): SidebarResourceBrowserInstance[] => filteredInstances.map((instance, index) => ({\n key: String(instance.id ?? instance._id ?? `sidebar-resource-${index}`),\n id: String(instance.id ?? instance._id ?? ''),\n label: FrontendResourceUtils.computeFrontendResourceLabel({\n resourceType,\n registry,\n currentObject: instance,\n t,\n formatDate,\n formatDateTime,\n }) ?? String(instance._id ?? ''),\n data: instance,\n onSelect: () => handleInstanceClick(instance),\n })), [filteredInstances, resourceType, registry, t, formatDate, formatDateTime, handleInstanceClick]);\n\n const loadingScopes = useMemo<LoadingScope[]>(() => {\n if (!boundOperation) return [];\n return [\n buildResourceLoadingScope({\n resourceType,\n operation: boundOperation.operationIdentifier,\n }),\n ];\n }, [resourceType, boundOperation]);\n\n const i18nKeys = useMemo(() => [`resources.${resourceType}`], [resourceType]);\n const resourceIconReference = useMemo((): IconRequest_Resources => ({ category: IconCategory.RESOURCES, resourceType }), [resourceType]);\n\n // A re-read keeps what was read: LOADING only while there is nothing yet, so the instances already shown stay drawn.\n const state = !resourceConfig\n ? SidebarResourceBrowserState.UNREGISTERED\n : operationUnresolvable\n ? SidebarResourceBrowserState.OPERATION_UNRESOLVABLE\n : error !== null\n ? SidebarResourceBrowserState.FAILED\n : listedInstances.length > 0\n ? SidebarResourceBrowserState.READY\n : isLoading\n ? SidebarResourceBrowserState.LOADING\n : SidebarResourceBrowserState.EMPTY;\n\n return {\n state,\n isLoading,\n instances: listedInstances,\n errorMessage: error,\n resourceIconReference,\n listAriaLabel,\n emptyLabel: resolveSidebarBrowserEmptyLabel({ resourceType, tResourceEmptyState, tComponent }),\n unavailableLabel: tComponent(FrontendComponentType.APPLICATION_LEVEL_SIDEBAR, 'resourceBrowserUnavailable'),\n i18nKeys,\n loadingScopes,\n };\n}\n"]}
|
|
@@ -13,6 +13,11 @@ export type CommandProps = React.ComponentProps<"div"> & {
|
|
|
13
13
|
surfacePolicyOverride?: DeepPartialSurfacePolicy;
|
|
14
14
|
};
|
|
15
15
|
export type CommandDialogProps = {
|
|
16
|
+
/**
|
|
17
|
+
* Whether the palette filters and sorts its items by the typed search itself (the default, `true`). `false` when the
|
|
18
|
+
* caller already passes only the matching items, in order: the command menu's behavior hook owns its search (#1828).
|
|
19
|
+
*/
|
|
20
|
+
shouldFilter?: boolean;
|
|
16
21
|
open?: boolean;
|
|
17
22
|
onOpenChange?: (open: boolean) => void;
|
|
18
23
|
defaultOpen?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/command.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA0C,KAAK,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAE3H,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAIvH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,wBAAwB,CAAA;CACjD,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,CAAA;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,CAAC,OAAO,CAG9I;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGhJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/components/navigation/command.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAiC,MAAM,qCAAqC,CAAA;AAC3H,OAAO,EAAE,+BAA+B,EAAE,MAAM,iFAAiF,CAAA;
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../src/components/navigation/command.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAiC,MAAM,qCAAqC,CAAA;AAC3H,OAAO,EAAE,+BAA+B,EAAE,MAAM,iFAAiF,CAAA;AAkFjI,mBAAmB;AAEnB,MAAM,OAAO,GAAG,+BAA+B,CAC7C,qBAAqB,CAAC,iBAAiB,EACvC,SAAS,EACT,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,CAC/E,CAAA;AAED,mBAAmB;AAEnB,MAAM,UAAU,OAAO,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAuC;IACzG,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACzB,OAAO,KAAC,CAAC,OAAK,KAAK,GAAI,CAAA;AACzB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAA6C;IACrH,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACzB,OAAO,KAAC,CAAC,CAAC,MAAM,OAAK,KAAK,GAAI,CAAA;AAChC,CAA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AA;IACzB,OAAO,KAAC,CAAC,CAAC,QAAQ,OAAK,KAAK,GAAI,CAAA;AAClC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAgD;IAC3H,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACzB,OAAO,KAAC,CAAC,CAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACnC,CAAC","sourcesContent":["import React from 'react'\nimport { FrontendComponentType, CorePresetNames, type DeepPartialSurfacePolicy } from '@wildo-ai/presets-components-models'\nimport { createCompoundComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\n\n// --- Contract ---\n\nexport type CommandProps = React.ComponentProps<\"div\"> & {\n label?: string\n shouldFilter?: boolean\n filter?: (value: string, search: string, keywords?: string[]) => number\n value?: string\n onValueChange?: (value: string) => void\n loop?: boolean\n disablePointerSelection?: boolean\n vimBindings?: boolean\n surfacePolicyOverride?: DeepPartialSurfacePolicy\n}\n\nexport type CommandDialogProps = {\n /**\n * Whether the palette filters and sorts its items by the typed search itself (the default, `true`). `false` when the\n * caller already passes only the matching items, in order: the command menu's behavior hook owns its search (#1828).\n */\n shouldFilter?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n defaultOpen?: boolean\n modal?: boolean\n children?: React.ReactNode\n title?: string\n description?: string\n className?: string\n showCloseButton?: boolean\n surfacePolicyOverride?: DeepPartialSurfacePolicy\n}\n\nexport type CommandInputProps = React.ComponentProps<\"input\"> & {\n asChild?: boolean\n value?: string\n onValueChange?: (search: string) => void\n}\n\nexport type CommandListProps = React.ComponentProps<\"div\"> & {\n label?: string\n}\n\nexport type CommandEmptyProps = React.ComponentProps<\"div\">\n\nexport type CommandGroupProps = React.ComponentProps<\"div\"> & {\n heading?: React.ReactNode\n forceMount?: boolean\n value?: string\n}\n\nexport type CommandItemProps = Omit<React.ComponentProps<\"div\">, 'onSelect'> & {\n disabled?: boolean\n onSelect?: (value: string) => void\n value?: string\n keywords?: string[]\n forceMount?: boolean\n}\n\nexport type CommandShortcutProps = React.ComponentProps<\"span\">\n\nexport type CommandSeparatorProps = React.ComponentProps<\"div\"> & {\n alwaysRender?: boolean\n forceMount?: boolean\n}\n\n// --- Compound type ---\n\nexport interface CommandCompound {\n (props: CommandProps): React.JSX.Element\n Dialog: React.FC<CommandDialogProps>\n Input: React.FC<CommandInputProps>\n List: React.FC<CommandListProps>\n Empty: React.FC<CommandEmptyProps>\n Group: React.FC<CommandGroupProps>\n Item: React.FC<CommandItemProps>\n Shortcut: React.FC<CommandShortcutProps>\n Separator: React.FC<CommandSeparatorProps>\n}\n\n// --- Resolver ---\n\nconst resolve = createCompoundComponentResolver<CommandCompound>(\n FrontendComponentType.LOW_LEVEL_COMMAND,\n 'Command',\n ['Dialog', 'Input', 'List', 'Empty', 'Group', 'Item', 'Shortcut', 'Separator']\n)\n\n// --- Wrappers ---\n\nexport function Command({ preset = CorePresetNames.DEFAULT, ...props }: CommandProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C {...props} />\n}\n\nexport function CommandDialog({ preset = CorePresetNames.DEFAULT, ...props }: CommandDialogProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C.Dialog {...props} />\n}\n\nexport function CommandInput({ preset = CorePresetNames.DEFAULT, ...props }: CommandInputProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C.Input {...props} />\n}\n\nexport function CommandList({ preset = CorePresetNames.DEFAULT, ...props }: CommandListProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C.List {...props} />\n}\n\nexport function CommandEmpty({ preset = CorePresetNames.DEFAULT, ...props }: CommandEmptyProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C.Empty {...props} />\n}\n\nexport function CommandGroup({ preset = CorePresetNames.DEFAULT, ...props }: CommandGroupProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C.Group {...props} />\n}\n\nexport function CommandItem({ preset = CorePresetNames.DEFAULT, ...props }: CommandItemProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C.Item {...props} />\n}\n\nexport function CommandShortcut({ preset = CorePresetNames.DEFAULT, ...props }: CommandShortcutProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C.Shortcut {...props} />\n}\n\nexport function CommandSeparator({ preset = CorePresetNames.DEFAULT, ...props }: CommandSeparatorProps & ComponentPresetProps): React.JSX.Element {\n const C = resolve(preset)\n return <C.Separator {...props} />\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceLayout_DangerZone.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_DangerZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAQvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAK9E,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,+DAA+D,CAAC;AAK7H,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAC;AAExH,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;
|
|
1
|
+
{"version":3,"file":"ResourceLayout_DangerZone.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_DangerZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAQvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAK9E,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,+DAA+D,CAAC;AAK7H,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAC;AAExH,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAK/F,MAAM,WAAW,4CAA6C,SAAQ,wBAAwB;IAC5F,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,gFAAgF;IAChF,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,uCAAuC,KAAK,IAAI,CAAC;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uCAAuC,GAAI,yGAOrD,4CAA4C,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IA4IrE,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,4CAA4C,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGhL"}
|
|
@@ -14,6 +14,7 @@ import { ResourceOperationDisplayMode, ResourceOperationRiskLevel } from '@wildo
|
|
|
14
14
|
import { CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';
|
|
15
15
|
import { createComponentResolver } from '../../core/components-registry/component-resolver.frontend.helper.js';
|
|
16
16
|
import { Heading } from '../../components/typography/heading.js';
|
|
17
|
+
import { useDocumentHeadingLevel } from '../../components/typography/document-heading-level.js';
|
|
17
18
|
/**
|
|
18
19
|
* GitHub-style "Danger Zone" — a fenced section at the bottom of a resource's
|
|
19
20
|
* read view holding the destructive (`DANGER_ZONE`-placement) operations, each
|
|
@@ -27,6 +28,8 @@ import { Heading } from '../../components/typography/heading.js';
|
|
|
27
28
|
*/
|
|
28
29
|
export const ResourceLayoutPreset_DangerZone_Default = ({ resourceContext, navigationZone, currentObject, onOperationExecuted, className, responsiveMaxWidth, }) => {
|
|
29
30
|
const { resourceType, operation } = resourceContext;
|
|
31
|
+
// The zone's title sits beside the CARD section headings, at the same outline level as theirs (#3867).
|
|
32
|
+
const headingLevel = useDocumentHeadingLevel();
|
|
30
33
|
const { tComponent, tResourceOperation } = useI18n({
|
|
31
34
|
component: FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE,
|
|
32
35
|
resource: resourceType,
|
|
@@ -88,14 +91,14 @@ export const ResourceLayoutPreset_DangerZone_Default = ({ resourceContext, navig
|
|
|
88
91
|
// - `flex flex-col gap-field-sm` — the SAME title↔card gap the ContentSection
|
|
89
92
|
// CARD branch puts between its heading and its body (was `space-y-item-xs`,
|
|
90
93
|
// a ~1px hairline that crammed the title onto the card).
|
|
91
|
-
// -
|
|
94
|
+
// - a heading at the outline's level, `text-base font-medium` — the same group-heading type as the CARD title.
|
|
92
95
|
// - `rounded-xl` on the card — matches the CARD surface recipe radius
|
|
93
96
|
// (`SurfaceVariant.CARD` = `rounded-xl`); the DangerZone primitive's own
|
|
94
97
|
// base is `rounded-lg`, one tier tighter, which read as a different corner.
|
|
95
98
|
// - `p-0` card + `px-card` rows — identical inset to the settings rows so the
|
|
96
99
|
// "Reset to defaults" copy lines up with the fields above; per-row dividers
|
|
97
100
|
// run full-bleed.
|
|
98
|
-
_jsxs("section", { "data-slot": "danger-zone-section", "data-inline-size-tier": responsiveMaxWidth, className: cn('mr-auto w-full flex flex-col gap-field-sm', className), style: optionalMaxInlineSizeStyle(responsiveMaxWidth), children: [_jsx(Heading, { level:
|
|
101
|
+
_jsxs("section", { "data-slot": "danger-zone-section", "data-inline-size-tier": responsiveMaxWidth, className: cn('mr-auto w-full flex flex-col gap-field-sm', className), style: optionalMaxInlineSizeStyle(responsiveMaxWidth), children: [_jsx(Heading, { level: headingLevel, children: heading }), _jsx(DangerZone, { className: "rounded-xl p-0 overflow-hidden divide-y divide-destructive/20", children: rows.map((row, index) => (_jsxs("div", { className: "flex flex-col gap-field px-card py-card sm:flex-row sm:items-center sm:justify-between", children: [_jsxs("div", { className: "flex flex-col gap-element-xs", children: [_jsx(Strong, { children: row.label }), _jsx(Text, { variant: TextVariant.MUTED, size: TextSize.SM, children: describe(row) })] }), _jsx(Button, { variant: resolveDrawnActionVariant(row.variant, actionBarItemCannotRun(row)), disabled: row.disabled, onClick: row.onClick, className: "shrink-0 self-start sm:self-auto", "data-operation-id": row.operationIdentifier, children: row.label })] }, index))) }), isConfirmDialogOpen && (_jsx(OperationsConfirmCritical, { open: isConfirmDialogOpen, onOpenChange: (open) => { if (!open)
|
|
99
102
|
onCancel(); }, cancelCallback: onCancel, validationCallback: onConfirm, label: confirmDialogLabel, description: confirmDialogDescription, confirmLabel: confirmDialogConfirmLabel, requireTypedConfirmation: confirmRequiresTypedConfirmation, confirmationPhrase: confirmConfirmationPhrase }))] }));
|
|
100
103
|
};
|
|
101
104
|
export function ResourceLayout_DangerZone({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceLayout_DangerZone.js","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_DangerZone.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAwB,MAAM,mDAAmD,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,qEAAqE,CAAC;AAChH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAEhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AAGhG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AC,IAAa,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI;oBAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAC3D,cAAc,EAAE,QAAQ,EACxB,kBAAkB,EAAE,SAAS,EAC7B,KAAK,EAAE,kBAAkB,EACzB,WAAW,EAAE,wBAAwB,EACrC,YAAY,EAAE,yBAAyB,EACvC,wBAAwB,EAAE,gCAAgC,EAC1D,kBAAkB,EAAE,yBAAyB,GAC7C,CACH,IACO,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAuE;IAC3J,MAAM,SAAS,GAAG,uBAAuB,CAA+C,qBAAqB,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;IAClL,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAC;AAClC,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { Button, resolveDrawnActionVariant } from '~wildo-frontend-lib/components/actions/button';\nimport { actionBarItemCannotRun, type ActionBarButton } from '~wildo-frontend-lib/components/actions/action-bar';\nimport { DangerZone } from '~wildo-frontend-lib/components/feedback/danger-zone';\nimport { Text, Strong, TextVariant, TextSize } from '~wildo-frontend-lib/components/typography/text';\nimport { OperationsConfirmCritical } from '~wildo-frontend-lib/components/feedback/operations-confirm-critical';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport type { ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';\nimport { optionalMaxInlineSizeStyle } from '~wildo-frontend-lib/components/sections/surface';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useResourceOperationActions } from '~wildo-frontend-lib/core/resources/useResourceOperationActions';\nimport { ActionPlacement } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\n\nimport { ResourceOperationDisplayMode, ResourceOperationRiskLevel } from '@wildo-ai/saas-models';\n\nimport { CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas';\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper';\nimport { BaseResourcesLayoutProps } from './component-props.resources-layout.frontend.schemas';\nimport { Heading } from '~wildo-frontend-lib/components/typography/heading';\n\n// --- Contract ---\nexport interface ResourceLayoutPreset_DangerZone_DefaultProps extends BaseResourcesLayoutProps {\n /** The loaded record — feeds `enabledCondition` evaluation + each op's target. */\n currentObject?: Record<string, any>;\n /** Called after a destructive op executes (e.g. navigate away after delete). */\n onOperationExecuted?: (operation: FrontendResourceConfiguration_Operation) => void;\n className?: string;\n /**\n * How wide the danger zone may grow, in the framework's shared width vocabulary.\n *\n * Left unset, nothing caps it here and the host decides. The read layout does so through `className`,\n * reading the width the record body derived (`--record-body-max-inline-size`: the reading measure, or\n * no cap when the body holds a list), so the destructive actions sit on the SAME edges as the body above\n * them. They once carried a `max-w-4xl` literal — 224px wider than the stack, for no reason anyone had\n * written down — and then a fixed `'measure'`, which left them narrow under a full-width list.\n */\n responsiveMaxWidth?: ResponsiveMaxWidth;\n}\n\n/**\n * GitHub-style \"Danger Zone\" — a fenced section at the bottom of a resource's\n * read view holding the destructive (`DANGER_ZONE`-placement) operations, each\n * as a row: title · caution description · action button. These ops are excluded\n * from the top action bar (which requests `placementFilter: PRIMARY`); this\n * section is their home.\n *\n * Reuses the single operation pipeline via `placementFilter: DANGER_ZONE`, so\n * `enabledCondition`, role gating, the critical-confirm dialog, and `actionVariant`\n * colour all behave exactly as in the bar — only the presentation differs.\n */\nexport const ResourceLayoutPreset_DangerZone_Default = ({\n resourceContext,\n navigationZone,\n currentObject,\n onOperationExecuted,\n className,\n responsiveMaxWidth,\n}: ResourceLayoutPreset_DangerZone_DefaultProps): React.JSX.Element | null => {\n const { resourceType, operation } = resourceContext;\n const { tComponent, tResourceOperation } = useI18n({\n component: FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE,\n resource: resourceType,\n });\n\n const {\n items,\n isConfirmDialogOpen,\n confirmDialogLabel,\n confirmDialogDescription,\n confirmDialogConfirmLabel,\n confirmRequiresTypedConfirmation,\n confirmConfirmationPhrase,\n onConfirm,\n onCancel,\n } = useResourceOperationActions({\n resourceType,\n displayMode: ResourceOperationDisplayMode.DETAIL,\n currentObject,\n contextResourceIdentifiers: resourceContext.contextResourceIdentifiers,\n parentResourcesRequirements: resourceContext.parentResourcesRequirements,\n additionalContext: resourceContext.additionalContext,\n navigationZone,\n sourceOperation: operation,\n placementFilter: ActionPlacement.DANGER_ZONE,\n onOperationExecuted,\n });\n\n // Flatten multi-variant ops (subgroups) into one row per concrete action.\n const rows = useMemo<ActionBarButton[]>(\n () =>\n items.flatMap((item) => {\n if (item.type === 'subgroup') {\n return item.items.filter(\n (sub): sub is ActionBarButton => sub.type !== 'separator' && sub.type !== 'subgroup',\n );\n }\n if (item.type === 'separator') return [];\n return [item];\n }),\n [items],\n );\n\n if (rows.length === 0) return null;\n\n // Every word here is a declared label (`ResourceLayout_DangerZone.labels.ts`); an ungenerated one\n // renders as its key path, which is what a missing label must look like. The English literals that\n // used to stand behind each key hid the gap in every locale (#1414).\n const label = (key: string): string => tComponent(FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE, key);\n const heading = label('title');\n // Risk-specific caution: CRITICAL emphasizes irreversibility, HIGH a significant\n // disruptive impact, everything else a generic caution.\n const describeRisk = (riskLevel: ResourceOperationRiskLevel | undefined): string => {\n switch (riskLevel) {\n case ResourceOperationRiskLevel.CRITICAL:\n return label('descriptionCritical');\n case ResourceOperationRiskLevel.HIGH:\n return label('descriptionHigh');\n default:\n return label('descriptionDefault');\n }\n };\n // Prefer an authored/generated per-operation description\n // (resources.{res}.operations.{op}.description) — accurate per action (e.g. Delete\n // \"permanent\" vs Suspend \"reversible\"). Falls back to the risk-based copy.\n // An operation DESCRIPTION is optional (few operations author one), so `tResourceOperation`\n // answers '' for a missing one and `||` chains cleanly. A missing TITLE is never empty (#1450).\n const describe = (row: ActionBarButton): string => {\n const perOp = row.operationIdentifier\n ? tResourceOperation(resourceType, row.operationIdentifier, 'description')\n : '';\n return perOp || describeRisk(row.riskLevel);\n };\n\n return (\n // Mirrors the CARD \"settings group\" shape EXACTLY so it reads as a sibling\n // of the cards above it, only tinted destructive:\n // - `flex flex-col gap-field-sm` — the SAME title↔card gap the ContentSection\n // CARD branch puts between its heading and its body (was `space-y-item-xs`,\n // a ~1px hairline that crammed the title onto the card).\n // - `<h3 text-base font-medium>` — the same group-heading type as the CARD title.\n // - `rounded-xl` on the card — matches the CARD surface recipe radius\n // (`SurfaceVariant.CARD` = `rounded-xl`); the DangerZone primitive's own\n // base is `rounded-lg`, one tier tighter, which read as a different corner.\n // - `p-0` card + `px-card` rows — identical inset to the settings rows so the\n // \"Reset to defaults\" copy lines up with the fields above; per-row dividers\n // run full-bleed.\n <section\n data-slot=\"danger-zone-section\"\n data-inline-size-tier={responsiveMaxWidth}\n className={cn('mr-auto w-full flex flex-col gap-field-sm', className)}\n style={optionalMaxInlineSizeStyle(responsiveMaxWidth)}\n >\n <Heading level={3}>{heading}</Heading>\n <DangerZone className=\"rounded-xl p-0 overflow-hidden divide-y divide-destructive/20\">\n {rows.map((row, index) => (\n <div\n key={index}\n className=\"flex flex-col gap-field px-card py-card sm:flex-row sm:items-center sm:justify-between\"\n >\n <div className=\"flex flex-col gap-element-xs\">\n <Strong>{row.label}</Strong>\n <Text variant={TextVariant.MUTED} size={TextSize.SM}>{describe(row)}</Text>\n </div>\n {/* Drawn through the bar's rule: an action that cannot run never keeps authored emphasis (see\n `resolveDrawnActionVariant`). Its risk colour (DESTRUCTIVE), which is how most rows here are drawn, stays. */}\n <Button\n variant={resolveDrawnActionVariant(row.variant, actionBarItemCannotRun(row))}\n disabled={row.disabled}\n onClick={row.onClick}\n className=\"shrink-0 self-start sm:self-auto\"\n // The automation hook every other action surface carries (`ActionButton`, the action bar's direct and\n // overflow items): the operation, i18n-independent. A delete moved here by its risk was the one\n // action a scenario could not address without reading translated text.\n data-operation-id={row.operationIdentifier}\n >\n {row.label}\n </Button>\n </div>\n ))}\n </DangerZone>\n {isConfirmDialogOpen && (\n <OperationsConfirmCritical\n open={isConfirmDialogOpen}\n onOpenChange={(open: boolean) => { if (!open) onCancel(); }}\n cancelCallback={onCancel}\n validationCallback={onConfirm}\n label={confirmDialogLabel}\n description={confirmDialogDescription}\n confirmLabel={confirmDialogConfirmLabel}\n requireTypedConfirmation={confirmRequiresTypedConfirmation}\n confirmationPhrase={confirmConfirmationPhrase}\n />\n )}\n </section>\n );\n};\n\nexport function ResourceLayout_DangerZone({ preset = CorePresetNames.DEFAULT, ...props }: ResourceLayoutPreset_DangerZone_DefaultProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<ResourceLayoutPreset_DangerZone_DefaultProps>(FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE, 'ResourceLayout_DangerZone')(preset);\n return <Component {...props} />;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ResourceLayout_DangerZone.js","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_DangerZone.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAwB,MAAM,mDAAmD,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,qEAAqE,CAAC;AAChH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAEhE,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EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC,EAC5E,QAAQ,EAAE,GAAG,CAAC,QAAQ,EACtB,OAAO,EAAE,GAAG,CAAC,OAAO,EACpB,SAAS,EAAC,kCAAkC,uBAIzB,GAAG,CAAC,mBAAmB,YAEzC,GAAG,CAAC,KAAK,GACH,KApBJ,KAAK,CAqBN,CACP,CAAC,GACS,EACZ,mBAAmB,IAAI,CACtB,KAAC,yBAAyB,IACxB,IAAI,EAAE,mBAAmB,EACzB,YAAY,EAAE,CAAC,IAAa,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI;oBAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAC3D,cAAc,EAAE,QAAQ,EACxB,kBAAkB,EAAE,SAAS,EAC7B,KAAK,EAAE,kBAAkB,EACzB,WAAW,EAAE,wBAAwB,EACrC,YAAY,EAAE,yBAAyB,EACvC,wBAAwB,EAAE,gCAAgC,EAC1D,kBAAkB,EAAE,yBAAyB,GAC7C,CACH,IACO,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAuE;IAC3J,MAAM,SAAS,GAAG,uBAAuB,CAA+C,qBAAqB,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;IAClL,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAC;AAClC,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { Button, resolveDrawnActionVariant } from '~wildo-frontend-lib/components/actions/button';\nimport { actionBarItemCannotRun, type ActionBarButton } from '~wildo-frontend-lib/components/actions/action-bar';\nimport { DangerZone } from '~wildo-frontend-lib/components/feedback/danger-zone';\nimport { Text, Strong, TextVariant, TextSize } from '~wildo-frontend-lib/components/typography/text';\nimport { OperationsConfirmCritical } from '~wildo-frontend-lib/components/feedback/operations-confirm-critical';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport type { ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';\nimport { optionalMaxInlineSizeStyle } from '~wildo-frontend-lib/components/sections/surface';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useResourceOperationActions } from '~wildo-frontend-lib/core/resources/useResourceOperationActions';\nimport { ActionPlacement } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\n\nimport { ResourceOperationDisplayMode, ResourceOperationRiskLevel } from '@wildo-ai/saas-models';\n\nimport { CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas';\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper';\nimport { BaseResourcesLayoutProps } from './component-props.resources-layout.frontend.schemas';\nimport { Heading } from '~wildo-frontend-lib/components/typography/heading';\nimport { useDocumentHeadingLevel } from '~wildo-frontend-lib/components/typography/document-heading-level';\n\n// --- Contract ---\nexport interface ResourceLayoutPreset_DangerZone_DefaultProps extends BaseResourcesLayoutProps {\n /** The loaded record — feeds `enabledCondition` evaluation + each op's target. */\n currentObject?: Record<string, any>;\n /** Called after a destructive op executes (e.g. navigate away after delete). */\n onOperationExecuted?: (operation: FrontendResourceConfiguration_Operation) => void;\n className?: string;\n /**\n * How wide the danger zone may grow, in the framework's shared width vocabulary.\n *\n * Left unset, nothing caps it here and the host decides. The read layout does so through `className`,\n * reading the width the record body derived (`--record-body-max-inline-size`: the reading measure, or\n * no cap when the body holds a list), so the destructive actions sit on the SAME edges as the body above\n * them. They once carried a `max-w-4xl` literal — 224px wider than the stack, for no reason anyone had\n * written down — and then a fixed `'measure'`, which left them narrow under a full-width list.\n */\n responsiveMaxWidth?: ResponsiveMaxWidth;\n}\n\n/**\n * GitHub-style \"Danger Zone\" — a fenced section at the bottom of a resource's\n * read view holding the destructive (`DANGER_ZONE`-placement) operations, each\n * as a row: title · caution description · action button. These ops are excluded\n * from the top action bar (which requests `placementFilter: PRIMARY`); this\n * section is their home.\n *\n * Reuses the single operation pipeline via `placementFilter: DANGER_ZONE`, so\n * `enabledCondition`, role gating, the critical-confirm dialog, and `actionVariant`\n * colour all behave exactly as in the bar — only the presentation differs.\n */\nexport const ResourceLayoutPreset_DangerZone_Default = ({\n resourceContext,\n navigationZone,\n currentObject,\n onOperationExecuted,\n className,\n responsiveMaxWidth,\n}: ResourceLayoutPreset_DangerZone_DefaultProps): React.JSX.Element | null => {\n const { resourceType, operation } = resourceContext;\n // The zone's title sits beside the CARD section headings, at the same outline level as theirs (#3867).\n const headingLevel = useDocumentHeadingLevel();\n const { tComponent, tResourceOperation } = useI18n({\n component: FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE,\n resource: resourceType,\n });\n\n const {\n items,\n isConfirmDialogOpen,\n confirmDialogLabel,\n confirmDialogDescription,\n confirmDialogConfirmLabel,\n confirmRequiresTypedConfirmation,\n confirmConfirmationPhrase,\n onConfirm,\n onCancel,\n } = useResourceOperationActions({\n resourceType,\n displayMode: ResourceOperationDisplayMode.DETAIL,\n currentObject,\n contextResourceIdentifiers: resourceContext.contextResourceIdentifiers,\n parentResourcesRequirements: resourceContext.parentResourcesRequirements,\n additionalContext: resourceContext.additionalContext,\n navigationZone,\n sourceOperation: operation,\n placementFilter: ActionPlacement.DANGER_ZONE,\n onOperationExecuted,\n });\n\n // Flatten multi-variant ops (subgroups) into one row per concrete action.\n const rows = useMemo<ActionBarButton[]>(\n () =>\n items.flatMap((item) => {\n if (item.type === 'subgroup') {\n return item.items.filter(\n (sub): sub is ActionBarButton => sub.type !== 'separator' && sub.type !== 'subgroup',\n );\n }\n if (item.type === 'separator') return [];\n return [item];\n }),\n [items],\n );\n\n if (rows.length === 0) return null;\n\n // Every word here is a declared label (`ResourceLayout_DangerZone.labels.ts`); an ungenerated one\n // renders as its key path, which is what a missing label must look like. The English literals that\n // used to stand behind each key hid the gap in every locale (#1414).\n const label = (key: string): string => tComponent(FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE, key);\n const heading = label('title');\n // Risk-specific caution: CRITICAL emphasizes irreversibility, HIGH a significant\n // disruptive impact, everything else a generic caution.\n const describeRisk = (riskLevel: ResourceOperationRiskLevel | undefined): string => {\n switch (riskLevel) {\n case ResourceOperationRiskLevel.CRITICAL:\n return label('descriptionCritical');\n case ResourceOperationRiskLevel.HIGH:\n return label('descriptionHigh');\n default:\n return label('descriptionDefault');\n }\n };\n // Prefer an authored/generated per-operation description\n // (resources.{res}.operations.{op}.description) — accurate per action (e.g. Delete\n // \"permanent\" vs Suspend \"reversible\"). Falls back to the risk-based copy.\n // An operation DESCRIPTION is optional (few operations author one), so `tResourceOperation`\n // answers '' for a missing one and `||` chains cleanly. A missing TITLE is never empty (#1450).\n const describe = (row: ActionBarButton): string => {\n const perOp = row.operationIdentifier\n ? tResourceOperation(resourceType, row.operationIdentifier, 'description')\n : '';\n return perOp || describeRisk(row.riskLevel);\n };\n\n return (\n // Mirrors the CARD \"settings group\" shape EXACTLY so it reads as a sibling\n // of the cards above it, only tinted destructive:\n // - `flex flex-col gap-field-sm` — the SAME title↔card gap the ContentSection\n // CARD branch puts between its heading and its body (was `space-y-item-xs`,\n // a ~1px hairline that crammed the title onto the card).\n // - a heading at the outline's level, `text-base font-medium` — the same group-heading type as the CARD title.\n // - `rounded-xl` on the card — matches the CARD surface recipe radius\n // (`SurfaceVariant.CARD` = `rounded-xl`); the DangerZone primitive's own\n // base is `rounded-lg`, one tier tighter, which read as a different corner.\n // - `p-0` card + `px-card` rows — identical inset to the settings rows so the\n // \"Reset to defaults\" copy lines up with the fields above; per-row dividers\n // run full-bleed.\n <section\n data-slot=\"danger-zone-section\"\n data-inline-size-tier={responsiveMaxWidth}\n className={cn('mr-auto w-full flex flex-col gap-field-sm', className)}\n style={optionalMaxInlineSizeStyle(responsiveMaxWidth)}\n >\n <Heading level={headingLevel}>{heading}</Heading>\n <DangerZone className=\"rounded-xl p-0 overflow-hidden divide-y divide-destructive/20\">\n {rows.map((row, index) => (\n <div\n key={index}\n className=\"flex flex-col gap-field px-card py-card sm:flex-row sm:items-center sm:justify-between\"\n >\n <div className=\"flex flex-col gap-element-xs\">\n <Strong>{row.label}</Strong>\n <Text variant={TextVariant.MUTED} size={TextSize.SM}>{describe(row)}</Text>\n </div>\n {/* Drawn through the bar's rule: an action that cannot run never keeps authored emphasis (see\n `resolveDrawnActionVariant`). Its risk colour (DESTRUCTIVE), which is how most rows here are drawn, stays. */}\n <Button\n variant={resolveDrawnActionVariant(row.variant, actionBarItemCannotRun(row))}\n disabled={row.disabled}\n onClick={row.onClick}\n className=\"shrink-0 self-start sm:self-auto\"\n // The automation hook every other action surface carries (`ActionButton`, the action bar's direct and\n // overflow items): the operation, i18n-independent. A delete moved here by its risk was the one\n // action a scenario could not address without reading translated text.\n data-operation-id={row.operationIdentifier}\n >\n {row.label}\n </Button>\n </div>\n ))}\n </DangerZone>\n {isConfirmDialogOpen && (\n <OperationsConfirmCritical\n open={isConfirmDialogOpen}\n onOpenChange={(open: boolean) => { if (!open) onCancel(); }}\n cancelCallback={onCancel}\n validationCallback={onConfirm}\n label={confirmDialogLabel}\n description={confirmDialogDescription}\n confirmLabel={confirmDialogConfirmLabel}\n requireTypedConfirmation={confirmRequiresTypedConfirmation}\n confirmationPhrase={confirmConfirmationPhrase}\n />\n )}\n </section>\n );\n};\n\nexport function ResourceLayout_DangerZone({ preset = CorePresetNames.DEFAULT, ...props }: ResourceLayoutPreset_DangerZone_DefaultProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<ResourceLayoutPreset_DangerZone_DefaultProps>(FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE, 'ResourceLayout_DangerZone')(preset);\n return <Component {...props} />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceLayout_InsertedViews.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_InsertedViews.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ResourceLayout_InsertedViews.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_InsertedViews.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAuB/E,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACpB,MAAM,wDAAwD,CAAC;AAahE,OAAO,KAAK,EACV,gCAAgC,EACjC,MAAM,+DAA+D,CAAC;AAqBvE;;;;;;;;;;;;;;GAcG;AACH,oBAAY,sBAAsB;IAChC,qEAAqE;IACrE,UAAU,eAAe;IACzB,sDAAsD;IACtD,iBAAiB,sBAAsB;IACvC,8EAA8E;IAC9E,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,MAAM,WAAW,iCAAiC;IAChD,eAAe,EAAE,gCAAgC,CAAC;IAClD,cAAc,EAAE,cAAc,CAAC;IAC/B,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAkDD,wBAAgB,4BAA4B,CAAC,EAC3C,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,SAAc,EACd,WAAiB,EACjB,UAAiB,EACjB,UAAuC,GACxC,EAAE,iCAAiC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgY9D;AA4HD,eAAe,4BAA4B,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { CoreResourceOperation, ErrorCustomMessageReference } from '@wildo-ai/sa
|
|
|
5
5
|
import { TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';
|
|
6
6
|
import { SectionLegendVoiceHost, useSectionLegendVoice } from '../../components/sections/section-legend-voice.js';
|
|
7
7
|
import { useUI } from '../../core/ui/useUI.js';
|
|
8
|
+
import { documentHeadingTag, useDocumentHeadingLevel } from '../../components/typography/document-heading-level.js';
|
|
8
9
|
import { buildResolvedInsertedChartDescriptor, buildResourceInsertedChartIdentity, } from '../../core/config/chart-view.frontend.schemas.js';
|
|
9
10
|
import { ChartView } from '../../components/views/chart-view/ChartView.lazy.js';
|
|
10
11
|
import { FeatureRouteGuard } from '../../core/features/FeatureRouteGuard.js';
|
|
@@ -115,6 +116,9 @@ export function ResourceLayout_InsertedViews({ resourceContext, navigationZone,
|
|
|
115
116
|
const inheritedLegendVoice = useSectionLegendVoice();
|
|
116
117
|
const legendVoice = currentBaseOperation === CoreResourceOperation.READ ? TypographyVariant.EYEBROW : inheritedLegendVoice;
|
|
117
118
|
const { getRecipe } = useUI();
|
|
119
|
+
// A chart card's title takes its level from the outline it sits in: under a record page's `h1` it is an `h2`.
|
|
120
|
+
// It was a hard-coded `h3`, which axe reported as a skipped level on the record read view (#3867).
|
|
121
|
+
const ChartTitleTag = documentHeadingTag(useDocumentHeadingLevel());
|
|
118
122
|
const currentSerializedOperationKey = useMemo(() => (isCurrentDefaultOperationHost
|
|
119
123
|
? currentBaseOperation
|
|
120
124
|
: serializeSurfaceOperation([currentBaseOperation, String(operationView.variantKey)])), [currentBaseOperation, isCurrentDefaultOperationHost, operationView.variantKey]);
|
|
@@ -273,7 +277,7 @@ export function ResourceLayout_InsertedViews({ resourceContext, navigationZone,
|
|
|
273
277
|
// the composite's own embedded host READ) won't re-embed it.
|
|
274
278
|
_jsx(ActiveEmbeddedCompositeRefsContext.Provider, { value: new Set([...activeEmbeddedCompositeRefs, segment.ref]), children: _jsx(EmbedResourceOwnedCompositeView, { resourceContext: resourceContext, viewRef: segment.ref, navigationZone: navigationZone, navigationInitiator: navigationInitiator }) }, `embedded-composite:${segment.ref}:${segmentIndex}`))
|
|
275
279
|
: segment.type === 'chart'
|
|
276
|
-
? (_jsxs("section", { className: "rounded-lg border border-border bg-card p-field shadow-sm", children: [segment.title && (_jsx(
|
|
280
|
+
? (_jsxs("section", { className: "rounded-lg border border-border bg-card p-field shadow-sm", children: [segment.title && (_jsx(ChartTitleTag, { className: cn('mb-element-sm', legendVoice ? getRecipe(UIBehavior.TYPOGRAPHY, legendVoice).base : 'text-sm font-medium text-foreground'), children: segment.title })), _jsx(FeatureRouteGuard, { requiredFeatures: segment.chartView.chartDefinition.requiredFeatures, children: _jsx(ChartView, { viewDefinition: segment.chartView, runtimeDescriptor: buildResolvedInsertedChartDescriptor({
|
|
277
281
|
identity: buildResourceInsertedChartIdentity(resourceContext.resourceType, segment.chartView),
|
|
278
282
|
chartView: segment.chartView,
|
|
279
283
|
contextResourceIdentifiers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceLayout_InsertedViews.js","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_InsertedViews.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE/E,OAAO,EAAE,oCAAoC,EAAE,MAAM,mEAAmE,CAAC;AACzH,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;AAC7H,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EACL,oCAAoC,EACpC,kCAAkC,GAEnC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,gEAAgE,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,M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4BAA4B,CAAC","sourcesContent":["import React, { createContext, useCallback, useContext, useMemo } from 'react';\n\nimport { RESOURCE_HEADER_NARROW_SR_ONLY_CLASS } from '~wildo-frontend-lib/components/resources/resource-header-geometry';\nimport { CoreResourceOperation, ErrorCustomMessageReference } from '@wildo-ai/saas-models';\nimport { TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { SectionLegendVoiceHost, useSectionLegendVoice } from '~wildo-frontend-lib/components/sections/section-legend-voice';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport {\n buildResolvedInsertedChartDescriptor,\n buildResourceInsertedChartIdentity,\n type InsertedChartDeclaration,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { ChartView } from '~wildo-frontend-lib/components/views/chart-view/ChartView.lazy';\nimport { FeatureRouteGuard } from '~wildo-frontend-lib/core/features/FeatureRouteGuard';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport {\n IconCategory,\n IconSize,\n} from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useNavigationController } from '~wildo-frontend-lib/core/navigation/useNavigationController';\nimport {\n NavigationContentType,\n type NavigationIconReference,\n type NavigationInitiatorContext,\n type NavigationZone,\n} from '~wildo-frontend-lib/core/navigation/navigation.schemas';\nimport { EmbedResourceOwnedCompositeView } from './ResourceOwnedViewEmbeds';\nimport {\n buildCompositeViewLabelKey,\n buildNavigationViewLabelKey,\n buildResourceViewTranslationRef,\n resolveNavigationViewTitle,\n} from '~wildo-frontend-lib/core/navigation/view-title-resolution';\nimport {\n resolveItemRef,\n type LauncherResolutionContext,\n type ResolvedNavigationTarget,\n} from '~wildo-frontend-lib/core/navigation/launcher-resolution';\nimport type {\n FrontendResourceOperationContext,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport {\n ButtonSize,\n NavigationViewLabelFamily,\n} from '@wildo-ai/presets-components-models';\nimport { LauncherItemTargetKind } from '~wildo-frontend-lib/core/config/launcher-items.frontend.schemas';\nimport { serializeSurfaceOperation } from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport {\n InsertedViewLauncherPlacement,\n resolveInsertedViewLauncherConfig,\n type InsertedViewLauncherConfig,\n} from '~wildo-frontend-lib/core/config/inserted-view-launcher.schemas';\n\nimport {\n areMandatoryParentRequirementsSatisfied,\n normalizeInsertedResourceViewContextResourceIdentifiers,\n} from './inserted-resource-view.frontend.utils';\n\n/**\n * WHICH SLOT of the host page this mount renders.\n *\n * A record page offers three distinct homes for a resource-owned view's entry\n * point, and each view chooses one via its authored\n * {@link InsertedViewLauncherPlacement}. The host mounts this component once per\n * slot; each mount renders only the launchers that asked for it.\n *\n * `CONTENT` additionally owns the segments that are not launchers at all —\n * inline charts and embedded composites — because those ARE content and belong\n * in the body flow after the record's fields.\n *\n * `ALL` renders everything in one block, for hosts that do not split the slots\n * (the semantic-operation fallback).\n */\nexport enum InsertedViewRenderSlot {\n /** Inside the record's action cluster, beside its own operations. */\n ACTION_BAR = 'action_bar',\n /** A ruled strip directly under the record header. */\n RECORD_NAVIGATION = 'record_navigation',\n /** The body flow: charts, embedded composites, and content-card launchers. */\n CONTENT = 'content',\n ALL = 'all',\n}\n\nexport interface ResourceLayout_InsertedViewsProps {\n resourceContext: FrontendResourceOperationContext;\n navigationZone: NavigationZone;\n navigationInitiator?: NavigationInitiatorContext;\n className?: string;\n chartHeight?: number;\n showCharts?: boolean;\n /**\n * Which slot this mount renders. Defaults to `ALL` so hosts that do not split\n * the slots keep rendering one combined block.\n */\n renderSlot?: InsertedViewRenderSlot;\n}\n\n/**\n * Composite refs currently being EMBEDDED inline up the tree (D1). A\n * non-addressable resource-owned composite is rendered in place by\n * `ResourceLayout_InsertedViews`; if that composite embeds its own host READ\n * (e.g. `task-workspace` → `EmbedHostResourceOperation(READ)`), the host read\n * renders another `ResourceLayout_InsertedViews` that would re-embed the SAME\n * composite → infinite recursion. Each inline embed adds its ref here; a\n * descendant InsertedViews whose composite ref is already active SKIPS the\n * re-embed. Mirrors `ActiveCustomViewOperationsContext` in `ResourceLayout_Read`.\n */\nconst ActiveEmbeddedCompositeRefsContext = createContext<ReadonlySet<string>>(new Set<string>());\n\ninterface ResourceOwnedLauncherView {\n kind: NavigationContentType.COMPOSITE_VIEW | NavigationContentType.EXECUTION_VIEW;\n ref: string;\n label: string;\n /** The resolved launcher icon, as a reference this component renders (#1828). */\n iconReference?: NavigationIconReference;\n urlPath: string;\n contextResourceIdentifiers?: Record<string, string>;\n requiredFeatures: unknown;\n /** Resolved presentation (placement / emphasis / label) for this launcher. */\n presentation: ReturnType<typeof resolveInsertedViewLauncherConfig>;\n}\n\ntype ResourceOwnedInsertedViewSegment =\n | {\n type: 'chart';\n ref: string;\n chartView: InsertedChartDeclaration;\n /**\n * Resolved display title (labelling pipeline: `views.chart.{translationRef}.title`).\n * Empty string only while the label bundle is still loading — the heading is then\n * omitted. A label that is not generated yet is its KEY PATH once settled (#1450):\n * labels are i18n-owned, never derived in code, and a missing one must look missing.\n */\n title: string;\n }\n | {\n type: 'launcher-group';\n views: ResourceOwnedLauncherView[];\n }\n | {\n /** D1: a non-addressable resource-owned composite embedded inline in place. */\n type: 'embedded-composite';\n ref: string;\n };\n\nexport function ResourceLayout_InsertedViews({\n resourceContext,\n navigationZone,\n navigationInitiator,\n className = '',\n chartHeight = 320,\n showCharts = true,\n renderSlot = InsertedViewRenderSlot.ALL,\n}: ResourceLayout_InsertedViewsProps): React.JSX.Element | null {\n const { registry } = useResourceRegistry();\n const activeEmbeddedCompositeRefs = useContext(ActiveEmbeddedCompositeRefsContext);\n const { navigate } = useNavigationController();\n const { renderIcon } = useIconRegistry();\n const frontendConfiguration = registry.resourceConfigurations[resourceContext.resourceType]?.frontendConfiguration;\n const compositeLabelKeys = useMemo(() => (\n (frontendConfiguration?.compositeViews ?? []).map((view) => (\n buildCompositeViewLabelKey(view.translationRef)\n ))\n ), [frontendConfiguration?.compositeViews]);\n const viewLabelKeys = useMemo(() => ([\n ...((frontendConfiguration?.chartViews ?? []).map((view) => (\n buildNavigationViewLabelKey({\n family: NavigationViewLabelFamily.CHART,\n translationRef: buildResourceViewTranslationRef(\n resourceContext.resourceType,\n view.ref,\n ),\n })\n ))),\n ...((frontendConfiguration?.executionViews ?? []).map((view) => (\n buildNavigationViewLabelKey({\n family: NavigationViewLabelFamily.EXECUTION,\n translationRef: buildResourceViewTranslationRef(\n resourceContext.resourceType,\n view.ref,\n ),\n })\n ))),\n ]), [\n frontendConfiguration?.chartViews,\n frontendConfiguration?.executionViews,\n resourceContext.resourceType,\n ]);\n const { tCompositeView, tResourceHeader, tResourceOperation, tView } = useI18n({\n keys: [...compositeLabelKeys, ...viewLabelKeys],\n });\n\n const contextResourceIdentifiers = useMemo(() => {\n return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);\n }, [resourceContext]);\n\n /**\n * Resource-owned view declarations are the **single source of truth** for\n * which inserted views surface inside a given operation host:\n *\n * - `compositeView.operationLike` / `chartView.operationLike` (single op) —\n * the view surfaces inside the default (non-variant) instance of that\n * core operation.\n * - `executionView.surfaceInOperations` (list of `OperationKey`) — the\n * view surfaces inside every listed host, including specific operation\n * variants (`[operationId, variantKey]`).\n *\n * We resolve the current operation's identity into a serialized\n * `OperationKey` and a base-op shortcut, then filter each family directly\n * — no per-operation compiled view list is consulted.\n */\n const operationView = resourceContext.operation;\n const isCurrentDefaultOperationHost =\n operationView.isOperationDefault === true || !operationView.variantKey;\n const currentBaseOperation = String(operationView.operationIdentifier);\n /*\n * On a record's READ page the inserted views belong to the read body, after it: a composite's section\n * titles and a chart's title name groups there just as `DisplayLayout`'s legends do, so they speak in\n * the same EYEBROW voice (measured 2026-10-01 on the Wonder Todos todo: \"Supporting Tasks\" at 16px under\n * eyebrow-voiced \"CHECKLIST\"). On any other host the voice is whatever that host chose.\n */\n const inheritedLegendVoice = useSectionLegendVoice();\n const legendVoice = currentBaseOperation === CoreResourceOperation.READ ? TypographyVariant.EYEBROW : inheritedLegendVoice;\n const { getRecipe } = useUI();\n const currentSerializedOperationKey = useMemo(() => (\n isCurrentDefaultOperationHost\n ? currentBaseOperation\n : serializeSurfaceOperation([currentBaseOperation, String(operationView.variantKey)])\n ), [currentBaseOperation, isCurrentDefaultOperationHost, operationView.variantKey]);\n\n // Beyond the operation-host match, every family is additionally gated on\n // MANDATORY parent-context satisfiability: a view whose declared parent id is\n // absent from the host's context would fetch/anchor against the wrong scope\n // (see `areMandatoryParentRequirementsSatisfied`).\n const applicableCompositeViews = useMemo(() => (\n isCurrentDefaultOperationHost\n ? (frontendConfiguration?.compositeViews ?? []).filter(\n (view) => String(view.operationLike) === currentBaseOperation\n && areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers),\n )\n : []\n ), [contextResourceIdentifiers, currentBaseOperation, frontendConfiguration?.compositeViews, isCurrentDefaultOperationHost]);\n\n const applicableChartViews = useMemo(() => (\n isCurrentDefaultOperationHost\n ? (frontendConfiguration?.chartViews ?? []).filter(\n (view) => String(view.operationLike) === currentBaseOperation\n && areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers),\n )\n : []\n ), [contextResourceIdentifiers, currentBaseOperation, frontendConfiguration?.chartViews, isCurrentDefaultOperationHost]);\n\n const applicableExecutionViews = useMemo(() => (\n (frontendConfiguration?.executionViews ?? []).filter((view) => (\n (view.surfaceInOperations ?? []).some(\n (op) => serializeSurfaceOperation(op) === currentSerializedOperationKey,\n )\n && areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers)\n ))\n ), [contextResourceIdentifiers, currentSerializedOperationKey, frontendConfiguration?.executionViews]);\n\n const insertedViewSegments = useMemo<ResourceOwnedInsertedViewSegment[]>(() => {\n if (\n applicableCompositeViews.length === 0\n && applicableChartViews.length === 0\n && applicableExecutionViews.length === 0\n ) {\n return [];\n }\n\n const resolutionContext: LauncherResolutionContext = {\n registry,\n contextResourceIdentifiers,\n views: {},\n tResourceHeader,\n tResourceOperation,\n tViewTitle: (viewRef, contentType) => resolveNavigationViewTitle({\n viewRef,\n contentType,\n tCompositeView,\n tView,\n }),\n t: (key) => key,\n // This context resolves resource-owned views only, never a settings row, so no section icon is ever asked for.\n settingsSectionIcon: () => undefined,\n // Nor its authored label.\n settingsSectionLabel: () => undefined,\n // Nor a settings row, so there is no section visibility to filter by.\n settingsSectionVisible: null,\n // These are the current resource's own views, already authorized by the page that hosts them: no role filter.\n viewerRoles: null,\n };\n\n const resolvedSegments: ResourceOwnedInsertedViewSegment[] = [];\n\n // Canonical rendering order — fixed by the framework now that there is\n // no author-controlled `additionalViews` list:\n // 1. composites (primary structured views)\n // 2. charts (at-a-glance metrics)\n // 3. executions (action runners)\n // Within each family, declaration iteration order is preserved: composites\n // and executions follow authored key order in the `ResourceCompositeViewsConfig`\n // / `ResourceExecutionViewsConfig` maps; charts follow the authored array\n // order in `chartViews`.\n\n for (const compositeView of applicableCompositeViews) {\n // D1: only an ADDRESSABLE composite gets a routing launcher (a\n // non-addressable one has no `urlPath`, so its launcher would no-op — the\n // dead-launcher bug). A non-addressable composite is EMBEDDED INLINE in\n // place instead, unless it is already being embedded up the tree (recursion\n // guard for composites that embed their own host READ).\n if (compositeView.isAddressable) {\n pushResourceOwnedLauncherView({\n resolvedSegments,\n resolutionContext,\n resourceType: resourceContext.resourceType,\n viewRef: compositeView.ref,\n operationIdentifier: operationView.operationIdentifier,\n familyLabel: 'composite',\n launcher: (compositeView as { launcher?: InsertedViewLauncherConfig }).launcher,\n });\n continue;\n }\n if (activeEmbeddedCompositeRefs.has(compositeView.ref)) {\n continue;\n }\n resolvedSegments.push({ type: 'embedded-composite', ref: compositeView.ref });\n }\n\n if (showCharts) {\n for (const chartView of applicableChartViews) {\n resolvedSegments.push({\n type: 'chart',\n ref: chartView.ref,\n chartView,\n title: tView(\n NavigationViewLabelFamily.CHART,\n buildResourceViewTranslationRef(resourceContext.resourceType, chartView.ref),\n 'title',\n ),\n });\n }\n }\n\n for (const executionView of applicableExecutionViews) {\n pushResourceOwnedLauncherView({\n resolvedSegments,\n resolutionContext,\n resourceType: resourceContext.resourceType,\n viewRef: executionView.ref,\n operationIdentifier: operationView.operationIdentifier,\n familyLabel: 'execution',\n launcher: (executionView as { launcher?: InsertedViewLauncherConfig }).launcher,\n });\n }\n\n return resolvedSegments;\n }, [\n activeEmbeddedCompositeRefs,\n applicableCompositeViews,\n applicableChartViews,\n applicableExecutionViews,\n contextResourceIdentifiers,\n operationView.operationIdentifier,\n registry,\n resourceContext.resourceType,\n showCharts,\n tCompositeView,\n tView,\n tResourceHeader,\n tResourceOperation,\n ]);\n\n const handleOpenView = useCallback((view: ResourceOwnedLauncherView) => {\n navigate({\n content: {\n contentType: view.kind,\n viewRef: view.ref,\n contextResourceIdentifiers: view.contextResourceIdentifiers,\n },\n initiator: {\n sourceZone: navigationZone,\n },\n urlPath: view.urlPath,\n });\n }, [navigate, navigationZone]);\n\n // Each launcher renders in the slot its own `placement` asked for; charts and\n // embedded composites are content and render only in the CONTENT slot. A\n // launcher group whose views all belong to other slots drops out entirely.\n const visibleSegments = useMemo(() => {\n if (renderSlot === InsertedViewRenderSlot.ALL) {\n return insertedViewSegments;\n }\n\n const slotForPlacement: Record<InsertedViewLauncherPlacement, InsertedViewRenderSlot> = {\n [InsertedViewLauncherPlacement.ACTION_BAR]: InsertedViewRenderSlot.ACTION_BAR,\n [InsertedViewLauncherPlacement.RECORD_NAVIGATION]: InsertedViewRenderSlot.RECORD_NAVIGATION,\n [InsertedViewLauncherPlacement.CONTENT_CARD]: InsertedViewRenderSlot.CONTENT,\n };\n\n return insertedViewSegments.flatMap((segment): ResourceOwnedInsertedViewSegment[] => {\n if (segment.type !== 'launcher-group') {\n return renderSlot === InsertedViewRenderSlot.CONTENT ? [segment] : [];\n }\n const views = segment.views.filter(\n (view) => slotForPlacement[view.presentation.placement] === renderSlot,\n );\n return views.length > 0 ? [{ ...segment, views }] : [];\n });\n }, [insertedViewSegments, renderSlot]);\n\n if (visibleSegments.length === 0) {\n return null;\n }\n\n return (\n <SectionLegendVoiceHost voice={legendVoice}>\n <div className={cn('space-y-section', className)} data-testid=\"resource-layout-inserted-views\">\n {visibleSegments.map((segment, segmentIndex) => (\n segment.type === 'embedded-composite'\n ? (\n // D1: render the non-addressable composite's BODY in place. The\n // provider marks this ref active so a nested InsertedViews (e.g. from\n // the composite's own embedded host READ) won't re-embed it.\n <ActiveEmbeddedCompositeRefsContext.Provider\n key={`embedded-composite:${segment.ref}:${segmentIndex}`}\n value={new Set<string>([...activeEmbeddedCompositeRefs, segment.ref])}\n >\n <EmbedResourceOwnedCompositeView\n resourceContext={resourceContext}\n viewRef={segment.ref}\n navigationZone={navigationZone}\n navigationInitiator={navigationInitiator}\n />\n </ActiveEmbeddedCompositeRefsContext.Provider>\n )\n : segment.type === 'chart'\n ? (\n <section\n key={`chart:${segment.ref}:${segmentIndex}`}\n className=\"rounded-lg border border-border bg-card p-field shadow-sm\"\n >\n {segment.title && (\n <h3 className={cn('mb-element-sm', legendVoice ? getRecipe(UIBehavior.TYPOGRAPHY, legendVoice).base : 'text-sm font-medium text-foreground')}>\n {segment.title}\n </h3>\n )}\n <FeatureRouteGuard requiredFeatures={segment.chartView.chartDefinition.requiredFeatures}>\n <ChartView\n viewDefinition={segment.chartView}\n runtimeDescriptor={buildResolvedInsertedChartDescriptor({\n identity: buildResourceInsertedChartIdentity(resourceContext.resourceType, segment.chartView),\n chartView: segment.chartView,\n contextResourceIdentifiers,\n })}\n height={chartHeight}\n // Inserted chart tile on a detail page → degrade locally, no\n // page-level toast (per-widget error isolation).\n localErrorOnly\n />\n </FeatureRouteGuard>\n </section>\n )\n : (\n /* Record-level secondary navigation: a quiet strip of routes into\n other views of THIS record, sitting under the record's identity\n rather than in a card of its own. A bordered card of OUTLINE\n buttons read as an actions panel — a peer of the record's content\n — which is why these launchers were previously mistaken for\n page-bottom controls. A bottom-ruled row of ghost items reads as\n navigation: same affordance vocabulary as the app's horizontal\n tabs, without claiming a selected state these routes do not have\n while the reader is on the record's own page. */\n /* Launcher presentation is per-slot chrome around the SAME buttons.\n ACTION_BAR contributes bare buttons into the record's action\n cluster (the host owns that row, so no wrapper here);\n RECORD_NAVIGATION is a ruled sub-navigation strip under the\n header; CONTENT_CARD keeps the standalone card in the body flow.\n TODO(i18n): name the RECORD_NAVIGATION landmark once a\n `RESOURCES_LAYOUTS_INSERTED_VIEWS` component label is registered and\n generated — an ungenerated key would render as its raw path, so it\n stays unnamed rather than mislabelled. */\n <LauncherSlotChrome\n key={`launcher-group:${segmentIndex}`}\n renderSlot={renderSlot}\n >\n {segment.views.map((view) => (\n <FeatureRouteGuard key={`${view.kind}:${view.ref}`} requiredFeatures={view.requiredFeatures}>\n <Button\n data-testid={`inserted-view-launcher-${view.ref}`}\n type=\"button\"\n // In the record navigation strip a quiet launcher is a GHOST item, so the strip reads as\n // navigation (see the chrome note above); elsewhere it keeps the outlined look.\n variant={view.presentation.emphasized\n ? ButtonVariants_Variant.DEFAULT\n : renderSlot === InsertedViewRenderSlot.RECORD_NAVIGATION\n ? ButtonVariants_Variant.GHOST\n : ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.SM}\n onClick={() => handleOpenView(view)}\n // An icon-only launcher must still announce itself.\n aria-label={view.presentation.showLabel ? undefined : view.label}\n title={view.presentation.showLabel && renderSlot !== InsertedViewRenderSlot.ACTION_BAR ? undefined : view.label}\n >\n {view.iconReference ? renderIcon(view.iconReference, { size: IconSize.SM }) : (\n view.kind === NavigationContentType.COMPOSITE_VIEW\n ? renderIcon(\n { category: IconCategory.COMPOSITE_VIEW, viewReference: view.ref },\n { size: IconSize.SM },\n )\n : renderIcon(\n { category: IconCategory.CUSTOM, customReference: `view-execution-${view.ref}` },\n { size: IconSize.SM },\n )\n )}\n {/* In the record header's action cluster the words yield to a narrow header (a split\n pane): the header puts the actions on its TITLE line, and a 200px labelled\n launcher is what pushed them off it (Wonder Todos, 2026-09-30). The words stay\n the accessible name and the tooltip; on a wide page they show. */}\n {view.presentation.showLabel && (\n <span className={renderSlot === InsertedViewRenderSlot.ACTION_BAR ? RESOURCE_HEADER_NARROW_SR_ONLY_CLASS : undefined}>\n {view.label}\n </span>\n )}\n </Button>\n </FeatureRouteGuard>\n ))}\n </LauncherSlotChrome>\n )\n ))}\n </div>\n </SectionLegendVoiceHost>\n );\n}\n\n/**\n * Per-slot wrapper around a group of launcher buttons.\n *\n * The buttons are identical in every slot — only the chrome around them differs,\n * which is what keeps \"where does this view's entry point live\" a placement\n * decision rather than three divergent renderers.\n */\nfunction LauncherSlotChrome({\n renderSlot,\n children,\n}: {\n renderSlot: InsertedViewRenderSlot;\n children: React.ReactNode;\n}): React.JSX.Element {\n if (renderSlot === InsertedViewRenderSlot.ACTION_BAR) {\n // The host action cluster owns the row; contribute buttons only.\n return <>{children}</>;\n }\n\n if (renderSlot === InsertedViewRenderSlot.RECORD_NAVIGATION) {\n return (\n <nav className=\"-mt-element flex flex-wrap items-center gap-item-xs border-b border-border pb-element-sm\">\n {children}\n </nav>\n );\n }\n\n return (\n <section className=\"rounded-lg border border-border bg-card p-field shadow-sm\">\n <div className=\"flex flex-wrap gap-item-sm\">{children}</div>\n </section>\n );\n}\n\nfunction isResourceOwnedLauncherView(\n resolvedView: ResolvedNavigationTarget | null,\n): resolvedView is ResolvedNavigationTarget & {\n contentType: NavigationContentType.COMPOSITE_VIEW | NavigationContentType.EXECUTION_VIEW;\n viewRef: string;\n label: string;\n} {\n return resolvedView?.contentType === NavigationContentType.COMPOSITE_VIEW\n || resolvedView?.contentType === NavigationContentType.EXECUTION_VIEW;\n}\n\n/**\n * Resolve a resource-owned composite/execution view ref into a launcher entry\n * and append it to `resolvedSegments`, grouping adjacent launchers into a\n * single `launcher-group` segment. Charts are handled inline at the call site\n * because they render as standalone segments with no grouping semantics.\n */\nfunction pushResourceOwnedLauncherView(params: {\n resolvedSegments: ResourceOwnedInsertedViewSegment[];\n resolutionContext: LauncherResolutionContext;\n resourceType: string;\n viewRef: string;\n operationIdentifier: string | number | symbol;\n familyLabel: 'composite' | 'execution';\n launcher?: InsertedViewLauncherConfig;\n}): void {\n const {\n resolvedSegments,\n resolutionContext,\n resourceType,\n viewRef,\n operationIdentifier,\n familyLabel,\n launcher,\n } = params;\n const resolvedView = resolveItemRef(\n {\n kind: LauncherItemTargetKind.RESOURCE_VIEW,\n resourceType,\n viewRef,\n },\n resolutionContext,\n );\n if (!resolvedView) {\n throw buildInsertedViewsConfigurationError(\n `Operation \"${String(operationIdentifier)}\" on resource \"${resourceType}\" could not resolve resource-owned ${familyLabel} view \"${viewRef}\".`,\n );\n }\n\n if (!isResourceOwnedLauncherView(resolvedView)) {\n throw buildInsertedViewsConfigurationError(\n `Operation \"${String(operationIdentifier)}\" on resource \"${resourceType}\" resolved ${familyLabel} view \"${viewRef}\" into unsupported content type \"${resolvedView.contentType}\".`,\n );\n }\n\n const launcherView: ResourceOwnedLauncherView = {\n kind: resolvedView.contentType,\n ref: resolvedView.viewRef,\n label: resolvedView.label,\n iconReference: resolvedView.iconReference,\n urlPath: resolvedView.urlPath,\n contextResourceIdentifiers: resolvedView.contextResourceIdentifiers,\n requiredFeatures: resolvedView.requiredFeatures,\n presentation: resolveInsertedViewLauncherConfig(launcher),\n };\n\n const previousSegment = resolvedSegments[resolvedSegments.length - 1];\n if (previousSegment?.type === 'launcher-group') {\n previousSegment.views.push(launcherView);\n return;\n }\n\n resolvedSegments.push({\n type: 'launcher-group',\n views: [launcherView],\n });\n}\n\nfunction buildInsertedViewsConfigurationError(message: string): Error {\n return FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n component: 'ResourceLayout_InsertedViews',\n message,\n },\n );\n}\n\nexport default ResourceLayout_InsertedViews;\n"]}
|
|
1
|
+
{"version":3,"file":"ResourceLayout_InsertedViews.js","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_InsertedViews.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE/E,OAAO,EAAE,oCAAoC,EAAE,MAAM,mEAAmE,CAAC;AACzH,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;AAC7H,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,kEAAkE,CAAC;AAC/H,OAAO,EACL,oCAAoC,EACpC,kCAAkC,GAEnC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,gEAAgE,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EACL,YAAY,EACZ,QAAQ,GACT,MAAM,+DAA+D,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;AACtG,OAAO,EACL,qBAAqB,GAItB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC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AY,cAAc,WAAW,UAAU,OAAO,oCAAoC,YAAY,CAAC,WAAW,IAAI,CAClL,CAAC;IACJ,CAAC;IAED,MAAM,YAAY,GAA8B;QAC9C,IAAI,EAAE,YAAY,CAAC,WAAW;QAC9B,GAAG,EAAE,YAAY,CAAC,OAAO;QACzB,KAAK,EAAE,YAAY,CAAC,KAAK;QACzB,aAAa,EAAE,YAAY,CAAC,aAAa;QACzC,OAAO,EAAE,YAAY,CAAC,OAAO;QAC7B,0BAA0B,EAAE,YAAY,CAAC,0BAA0B;QACnE,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;QAC/C,YAAY,EAAE,iCAAiC,CAAC,QAAQ,CAAC;KAC1D,CAAC;IAEF,MAAM,eAAe,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtE,IAAI,eAAe,EAAE,IAAI,KAAK,gBAAgB,EAAE,CAAC;QAC/C,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzC,OAAO;IACT,CAAC;IAED,gBAAgB,CAAC,IAAI,CAAC;QACpB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,CAAC,YAAY,CAAC;KACtB,CAAC,CAAC;AACL,CAAC;AAED,SAAS,oCAAoC,CAAC,OAAe;IAC3D,OAAO,qBAAqB,CAAC,uBAAuB,CAClD,2BAA2B,CAAC,aAAa,EACzC;QACE,SAAS,EAAE,8BAA8B;QACzC,OAAO;KACR,CACF,CAAC;AACJ,CAAC;AAED,eAAe,4BAA4B,CAAC","sourcesContent":["import React, { createContext, useCallback, useContext, useMemo } from 'react';\n\nimport { RESOURCE_HEADER_NARROW_SR_ONLY_CLASS } from '~wildo-frontend-lib/components/resources/resource-header-geometry';\nimport { CoreResourceOperation, ErrorCustomMessageReference } from '@wildo-ai/saas-models';\nimport { TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { SectionLegendVoiceHost, useSectionLegendVoice } from '~wildo-frontend-lib/components/sections/section-legend-voice';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { documentHeadingTag, useDocumentHeadingLevel } from '~wildo-frontend-lib/components/typography/document-heading-level';\nimport {\n buildResolvedInsertedChartDescriptor,\n buildResourceInsertedChartIdentity,\n type InsertedChartDeclaration,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { ChartView } from '~wildo-frontend-lib/components/views/chart-view/ChartView.lazy';\nimport { FeatureRouteGuard } from '~wildo-frontend-lib/core/features/FeatureRouteGuard';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport {\n IconCategory,\n IconSize,\n} from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useNavigationController } from '~wildo-frontend-lib/core/navigation/useNavigationController';\nimport {\n NavigationContentType,\n type NavigationIconReference,\n type NavigationInitiatorContext,\n type NavigationZone,\n} from '~wildo-frontend-lib/core/navigation/navigation.schemas';\nimport { EmbedResourceOwnedCompositeView } from './ResourceOwnedViewEmbeds';\nimport {\n buildCompositeViewLabelKey,\n buildNavigationViewLabelKey,\n buildResourceViewTranslationRef,\n resolveNavigationViewTitle,\n} from '~wildo-frontend-lib/core/navigation/view-title-resolution';\nimport {\n resolveItemRef,\n type LauncherResolutionContext,\n type ResolvedNavigationTarget,\n} from '~wildo-frontend-lib/core/navigation/launcher-resolution';\nimport type {\n FrontendResourceOperationContext,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport {\n ButtonSize,\n NavigationViewLabelFamily,\n} from '@wildo-ai/presets-components-models';\nimport { LauncherItemTargetKind } from '~wildo-frontend-lib/core/config/launcher-items.frontend.schemas';\nimport { serializeSurfaceOperation } from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport {\n InsertedViewLauncherPlacement,\n resolveInsertedViewLauncherConfig,\n type InsertedViewLauncherConfig,\n} from '~wildo-frontend-lib/core/config/inserted-view-launcher.schemas';\n\nimport {\n areMandatoryParentRequirementsSatisfied,\n normalizeInsertedResourceViewContextResourceIdentifiers,\n} from './inserted-resource-view.frontend.utils';\n\n/**\n * WHICH SLOT of the host page this mount renders.\n *\n * A record page offers three distinct homes for a resource-owned view's entry\n * point, and each view chooses one via its authored\n * {@link InsertedViewLauncherPlacement}. The host mounts this component once per\n * slot; each mount renders only the launchers that asked for it.\n *\n * `CONTENT` additionally owns the segments that are not launchers at all —\n * inline charts and embedded composites — because those ARE content and belong\n * in the body flow after the record's fields.\n *\n * `ALL` renders everything in one block, for hosts that do not split the slots\n * (the semantic-operation fallback).\n */\nexport enum InsertedViewRenderSlot {\n /** Inside the record's action cluster, beside its own operations. */\n ACTION_BAR = 'action_bar',\n /** A ruled strip directly under the record header. */\n RECORD_NAVIGATION = 'record_navigation',\n /** The body flow: charts, embedded composites, and content-card launchers. */\n CONTENT = 'content',\n ALL = 'all',\n}\n\nexport interface ResourceLayout_InsertedViewsProps {\n resourceContext: FrontendResourceOperationContext;\n navigationZone: NavigationZone;\n navigationInitiator?: NavigationInitiatorContext;\n className?: string;\n chartHeight?: number;\n showCharts?: boolean;\n /**\n * Which slot this mount renders. Defaults to `ALL` so hosts that do not split\n * the slots keep rendering one combined block.\n */\n renderSlot?: InsertedViewRenderSlot;\n}\n\n/**\n * Composite refs currently being EMBEDDED inline up the tree (D1). A\n * non-addressable resource-owned composite is rendered in place by\n * `ResourceLayout_InsertedViews`; if that composite embeds its own host READ\n * (e.g. `task-workspace` → `EmbedHostResourceOperation(READ)`), the host read\n * renders another `ResourceLayout_InsertedViews` that would re-embed the SAME\n * composite → infinite recursion. Each inline embed adds its ref here; a\n * descendant InsertedViews whose composite ref is already active SKIPS the\n * re-embed. Mirrors `ActiveCustomViewOperationsContext` in `ResourceLayout_Read`.\n */\nconst ActiveEmbeddedCompositeRefsContext = createContext<ReadonlySet<string>>(new Set<string>());\n\ninterface ResourceOwnedLauncherView {\n kind: NavigationContentType.COMPOSITE_VIEW | NavigationContentType.EXECUTION_VIEW;\n ref: string;\n label: string;\n /** The resolved launcher icon, as a reference this component renders (#1828). */\n iconReference?: NavigationIconReference;\n urlPath: string;\n contextResourceIdentifiers?: Record<string, string>;\n requiredFeatures: unknown;\n /** Resolved presentation (placement / emphasis / label) for this launcher. */\n presentation: ReturnType<typeof resolveInsertedViewLauncherConfig>;\n}\n\ntype ResourceOwnedInsertedViewSegment =\n | {\n type: 'chart';\n ref: string;\n chartView: InsertedChartDeclaration;\n /**\n * Resolved display title (labelling pipeline: `views.chart.{translationRef}.title`).\n * Empty string only while the label bundle is still loading — the heading is then\n * omitted. A label that is not generated yet is its KEY PATH once settled (#1450):\n * labels are i18n-owned, never derived in code, and a missing one must look missing.\n */\n title: string;\n }\n | {\n type: 'launcher-group';\n views: ResourceOwnedLauncherView[];\n }\n | {\n /** D1: a non-addressable resource-owned composite embedded inline in place. */\n type: 'embedded-composite';\n ref: string;\n };\n\nexport function ResourceLayout_InsertedViews({\n resourceContext,\n navigationZone,\n navigationInitiator,\n className = '',\n chartHeight = 320,\n showCharts = true,\n renderSlot = InsertedViewRenderSlot.ALL,\n}: ResourceLayout_InsertedViewsProps): React.JSX.Element | null {\n const { registry } = useResourceRegistry();\n const activeEmbeddedCompositeRefs = useContext(ActiveEmbeddedCompositeRefsContext);\n const { navigate } = useNavigationController();\n const { renderIcon } = useIconRegistry();\n const frontendConfiguration = registry.resourceConfigurations[resourceContext.resourceType]?.frontendConfiguration;\n const compositeLabelKeys = useMemo(() => (\n (frontendConfiguration?.compositeViews ?? []).map((view) => (\n buildCompositeViewLabelKey(view.translationRef)\n ))\n ), [frontendConfiguration?.compositeViews]);\n const viewLabelKeys = useMemo(() => ([\n ...((frontendConfiguration?.chartViews ?? []).map((view) => (\n buildNavigationViewLabelKey({\n family: NavigationViewLabelFamily.CHART,\n translationRef: buildResourceViewTranslationRef(\n resourceContext.resourceType,\n view.ref,\n ),\n })\n ))),\n ...((frontendConfiguration?.executionViews ?? []).map((view) => (\n buildNavigationViewLabelKey({\n family: NavigationViewLabelFamily.EXECUTION,\n translationRef: buildResourceViewTranslationRef(\n resourceContext.resourceType,\n view.ref,\n ),\n })\n ))),\n ]), [\n frontendConfiguration?.chartViews,\n frontendConfiguration?.executionViews,\n resourceContext.resourceType,\n ]);\n const { tCompositeView, tResourceHeader, tResourceOperation, tView } = useI18n({\n keys: [...compositeLabelKeys, ...viewLabelKeys],\n });\n\n const contextResourceIdentifiers = useMemo(() => {\n return normalizeInsertedResourceViewContextResourceIdentifiers(resourceContext);\n }, [resourceContext]);\n\n /**\n * Resource-owned view declarations are the **single source of truth** for\n * which inserted views surface inside a given operation host:\n *\n * - `compositeView.operationLike` / `chartView.operationLike` (single op) —\n * the view surfaces inside the default (non-variant) instance of that\n * core operation.\n * - `executionView.surfaceInOperations` (list of `OperationKey`) — the\n * view surfaces inside every listed host, including specific operation\n * variants (`[operationId, variantKey]`).\n *\n * We resolve the current operation's identity into a serialized\n * `OperationKey` and a base-op shortcut, then filter each family directly\n * — no per-operation compiled view list is consulted.\n */\n const operationView = resourceContext.operation;\n const isCurrentDefaultOperationHost =\n operationView.isOperationDefault === true || !operationView.variantKey;\n const currentBaseOperation = String(operationView.operationIdentifier);\n /*\n * On a record's READ page the inserted views belong to the read body, after it: a composite's section\n * titles and a chart's title name groups there just as `DisplayLayout`'s legends do, so they speak in\n * the same EYEBROW voice (measured 2026-10-01 on the Wonder Todos todo: \"Supporting Tasks\" at 16px under\n * eyebrow-voiced \"CHECKLIST\"). On any other host the voice is whatever that host chose.\n */\n const inheritedLegendVoice = useSectionLegendVoice();\n const legendVoice = currentBaseOperation === CoreResourceOperation.READ ? TypographyVariant.EYEBROW : inheritedLegendVoice;\n const { getRecipe } = useUI();\n // A chart card's title takes its level from the outline it sits in: under a record page's `h1` it is an `h2`.\n // It was a hard-coded `h3`, which axe reported as a skipped level on the record read view (#3867).\n const ChartTitleTag = documentHeadingTag(useDocumentHeadingLevel());\n const currentSerializedOperationKey = useMemo(() => (\n isCurrentDefaultOperationHost\n ? currentBaseOperation\n : serializeSurfaceOperation([currentBaseOperation, String(operationView.variantKey)])\n ), [currentBaseOperation, isCurrentDefaultOperationHost, operationView.variantKey]);\n\n // Beyond the operation-host match, every family is additionally gated on\n // MANDATORY parent-context satisfiability: a view whose declared parent id is\n // absent from the host's context would fetch/anchor against the wrong scope\n // (see `areMandatoryParentRequirementsSatisfied`).\n const applicableCompositeViews = useMemo(() => (\n isCurrentDefaultOperationHost\n ? (frontendConfiguration?.compositeViews ?? []).filter(\n (view) => String(view.operationLike) === currentBaseOperation\n && areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers),\n )\n : []\n ), [contextResourceIdentifiers, currentBaseOperation, frontendConfiguration?.compositeViews, isCurrentDefaultOperationHost]);\n\n const applicableChartViews = useMemo(() => (\n isCurrentDefaultOperationHost\n ? (frontendConfiguration?.chartViews ?? []).filter(\n (view) => String(view.operationLike) === currentBaseOperation\n && areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers),\n )\n : []\n ), [contextResourceIdentifiers, currentBaseOperation, frontendConfiguration?.chartViews, isCurrentDefaultOperationHost]);\n\n const applicableExecutionViews = useMemo(() => (\n (frontendConfiguration?.executionViews ?? []).filter((view) => (\n (view.surfaceInOperations ?? []).some(\n (op) => serializeSurfaceOperation(op) === currentSerializedOperationKey,\n )\n && areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers)\n ))\n ), [contextResourceIdentifiers, currentSerializedOperationKey, frontendConfiguration?.executionViews]);\n\n const insertedViewSegments = useMemo<ResourceOwnedInsertedViewSegment[]>(() => {\n if (\n applicableCompositeViews.length === 0\n && applicableChartViews.length === 0\n && applicableExecutionViews.length === 0\n ) {\n return [];\n }\n\n const resolutionContext: LauncherResolutionContext = {\n registry,\n contextResourceIdentifiers,\n views: {},\n tResourceHeader,\n tResourceOperation,\n tViewTitle: (viewRef, contentType) => resolveNavigationViewTitle({\n viewRef,\n contentType,\n tCompositeView,\n tView,\n }),\n t: (key) => key,\n // This context resolves resource-owned views only, never a settings row, so no section icon is ever asked for.\n settingsSectionIcon: () => undefined,\n // Nor its authored label.\n settingsSectionLabel: () => undefined,\n // Nor a settings row, so there is no section visibility to filter by.\n settingsSectionVisible: null,\n // These are the current resource's own views, already authorized by the page that hosts them: no role filter.\n viewerRoles: null,\n };\n\n const resolvedSegments: ResourceOwnedInsertedViewSegment[] = [];\n\n // Canonical rendering order — fixed by the framework now that there is\n // no author-controlled `additionalViews` list:\n // 1. composites (primary structured views)\n // 2. charts (at-a-glance metrics)\n // 3. executions (action runners)\n // Within each family, declaration iteration order is preserved: composites\n // and executions follow authored key order in the `ResourceCompositeViewsConfig`\n // / `ResourceExecutionViewsConfig` maps; charts follow the authored array\n // order in `chartViews`.\n\n for (const compositeView of applicableCompositeViews) {\n // D1: only an ADDRESSABLE composite gets a routing launcher (a\n // non-addressable one has no `urlPath`, so its launcher would no-op — the\n // dead-launcher bug). A non-addressable composite is EMBEDDED INLINE in\n // place instead, unless it is already being embedded up the tree (recursion\n // guard for composites that embed their own host READ).\n if (compositeView.isAddressable) {\n pushResourceOwnedLauncherView({\n resolvedSegments,\n resolutionContext,\n resourceType: resourceContext.resourceType,\n viewRef: compositeView.ref,\n operationIdentifier: operationView.operationIdentifier,\n familyLabel: 'composite',\n launcher: (compositeView as { launcher?: InsertedViewLauncherConfig }).launcher,\n });\n continue;\n }\n if (activeEmbeddedCompositeRefs.has(compositeView.ref)) {\n continue;\n }\n resolvedSegments.push({ type: 'embedded-composite', ref: compositeView.ref });\n }\n\n if (showCharts) {\n for (const chartView of applicableChartViews) {\n resolvedSegments.push({\n type: 'chart',\n ref: chartView.ref,\n chartView,\n title: tView(\n NavigationViewLabelFamily.CHART,\n buildResourceViewTranslationRef(resourceContext.resourceType, chartView.ref),\n 'title',\n ),\n });\n }\n }\n\n for (const executionView of applicableExecutionViews) {\n pushResourceOwnedLauncherView({\n resolvedSegments,\n resolutionContext,\n resourceType: resourceContext.resourceType,\n viewRef: executionView.ref,\n operationIdentifier: operationView.operationIdentifier,\n familyLabel: 'execution',\n launcher: (executionView as { launcher?: InsertedViewLauncherConfig }).launcher,\n });\n }\n\n return resolvedSegments;\n }, [\n activeEmbeddedCompositeRefs,\n applicableCompositeViews,\n applicableChartViews,\n applicableExecutionViews,\n contextResourceIdentifiers,\n operationView.operationIdentifier,\n registry,\n resourceContext.resourceType,\n showCharts,\n tCompositeView,\n tView,\n tResourceHeader,\n tResourceOperation,\n ]);\n\n const handleOpenView = useCallback((view: ResourceOwnedLauncherView) => {\n navigate({\n content: {\n contentType: view.kind,\n viewRef: view.ref,\n contextResourceIdentifiers: view.contextResourceIdentifiers,\n },\n initiator: {\n sourceZone: navigationZone,\n },\n urlPath: view.urlPath,\n });\n }, [navigate, navigationZone]);\n\n // Each launcher renders in the slot its own `placement` asked for; charts and\n // embedded composites are content and render only in the CONTENT slot. A\n // launcher group whose views all belong to other slots drops out entirely.\n const visibleSegments = useMemo(() => {\n if (renderSlot === InsertedViewRenderSlot.ALL) {\n return insertedViewSegments;\n }\n\n const slotForPlacement: Record<InsertedViewLauncherPlacement, InsertedViewRenderSlot> = {\n [InsertedViewLauncherPlacement.ACTION_BAR]: InsertedViewRenderSlot.ACTION_BAR,\n [InsertedViewLauncherPlacement.RECORD_NAVIGATION]: InsertedViewRenderSlot.RECORD_NAVIGATION,\n [InsertedViewLauncherPlacement.CONTENT_CARD]: InsertedViewRenderSlot.CONTENT,\n };\n\n return insertedViewSegments.flatMap((segment): ResourceOwnedInsertedViewSegment[] => {\n if (segment.type !== 'launcher-group') {\n return renderSlot === InsertedViewRenderSlot.CONTENT ? [segment] : [];\n }\n const views = segment.views.filter(\n (view) => slotForPlacement[view.presentation.placement] === renderSlot,\n );\n return views.length > 0 ? [{ ...segment, views }] : [];\n });\n }, [insertedViewSegments, renderSlot]);\n\n if (visibleSegments.length === 0) {\n return null;\n }\n\n return (\n <SectionLegendVoiceHost voice={legendVoice}>\n <div className={cn('space-y-section', className)} data-testid=\"resource-layout-inserted-views\">\n {visibleSegments.map((segment, segmentIndex) => (\n segment.type === 'embedded-composite'\n ? (\n // D1: render the non-addressable composite's BODY in place. The\n // provider marks this ref active so a nested InsertedViews (e.g. from\n // the composite's own embedded host READ) won't re-embed it.\n <ActiveEmbeddedCompositeRefsContext.Provider\n key={`embedded-composite:${segment.ref}:${segmentIndex}`}\n value={new Set<string>([...activeEmbeddedCompositeRefs, segment.ref])}\n >\n <EmbedResourceOwnedCompositeView\n resourceContext={resourceContext}\n viewRef={segment.ref}\n navigationZone={navigationZone}\n navigationInitiator={navigationInitiator}\n />\n </ActiveEmbeddedCompositeRefsContext.Provider>\n )\n : segment.type === 'chart'\n ? (\n <section\n key={`chart:${segment.ref}:${segmentIndex}`}\n className=\"rounded-lg border border-border bg-card p-field shadow-sm\"\n >\n {segment.title && (\n <ChartTitleTag className={cn('mb-element-sm', legendVoice ? getRecipe(UIBehavior.TYPOGRAPHY, legendVoice).base : 'text-sm font-medium text-foreground')}>\n {segment.title}\n </ChartTitleTag>\n )}\n <FeatureRouteGuard requiredFeatures={segment.chartView.chartDefinition.requiredFeatures}>\n <ChartView\n viewDefinition={segment.chartView}\n runtimeDescriptor={buildResolvedInsertedChartDescriptor({\n identity: buildResourceInsertedChartIdentity(resourceContext.resourceType, segment.chartView),\n chartView: segment.chartView,\n contextResourceIdentifiers,\n })}\n height={chartHeight}\n // Inserted chart tile on a detail page → degrade locally, no\n // page-level toast (per-widget error isolation).\n localErrorOnly\n />\n </FeatureRouteGuard>\n </section>\n )\n : (\n /* Record-level secondary navigation: a quiet strip of routes into\n other views of THIS record, sitting under the record's identity\n rather than in a card of its own. A bordered card of OUTLINE\n buttons read as an actions panel — a peer of the record's content\n — which is why these launchers were previously mistaken for\n page-bottom controls. A bottom-ruled row of ghost items reads as\n navigation: same affordance vocabulary as the app's horizontal\n tabs, without claiming a selected state these routes do not have\n while the reader is on the record's own page. */\n /* Launcher presentation is per-slot chrome around the SAME buttons.\n ACTION_BAR contributes bare buttons into the record's action\n cluster (the host owns that row, so no wrapper here);\n RECORD_NAVIGATION is a ruled sub-navigation strip under the\n header; CONTENT_CARD keeps the standalone card in the body flow.\n TODO(i18n): name the RECORD_NAVIGATION landmark once a\n `RESOURCES_LAYOUTS_INSERTED_VIEWS` component label is registered and\n generated — an ungenerated key would render as its raw path, so it\n stays unnamed rather than mislabelled. */\n <LauncherSlotChrome\n key={`launcher-group:${segmentIndex}`}\n renderSlot={renderSlot}\n >\n {segment.views.map((view) => (\n <FeatureRouteGuard key={`${view.kind}:${view.ref}`} requiredFeatures={view.requiredFeatures}>\n <Button\n data-testid={`inserted-view-launcher-${view.ref}`}\n type=\"button\"\n // In the record navigation strip a quiet launcher is a GHOST item, so the strip reads as\n // navigation (see the chrome note above); elsewhere it keeps the outlined look.\n variant={view.presentation.emphasized\n ? ButtonVariants_Variant.DEFAULT\n : renderSlot === InsertedViewRenderSlot.RECORD_NAVIGATION\n ? ButtonVariants_Variant.GHOST\n : ButtonVariants_Variant.OUTLINE}\n size={ButtonSize.SM}\n onClick={() => handleOpenView(view)}\n // An icon-only launcher must still announce itself.\n aria-label={view.presentation.showLabel ? undefined : view.label}\n title={view.presentation.showLabel && renderSlot !== InsertedViewRenderSlot.ACTION_BAR ? undefined : view.label}\n >\n {view.iconReference ? renderIcon(view.iconReference, { size: IconSize.SM }) : (\n view.kind === NavigationContentType.COMPOSITE_VIEW\n ? renderIcon(\n { category: IconCategory.COMPOSITE_VIEW, viewReference: view.ref },\n { size: IconSize.SM },\n )\n : renderIcon(\n { category: IconCategory.CUSTOM, customReference: `view-execution-${view.ref}` },\n { size: IconSize.SM },\n )\n )}\n {/* In the record header's action cluster the words yield to a narrow header (a split\n pane): the header puts the actions on its TITLE line, and a 200px labelled\n launcher is what pushed them off it (Wonder Todos, 2026-09-30). The words stay\n the accessible name and the tooltip; on a wide page they show. */}\n {view.presentation.showLabel && (\n <span className={renderSlot === InsertedViewRenderSlot.ACTION_BAR ? RESOURCE_HEADER_NARROW_SR_ONLY_CLASS : undefined}>\n {view.label}\n </span>\n )}\n </Button>\n </FeatureRouteGuard>\n ))}\n </LauncherSlotChrome>\n )\n ))}\n </div>\n </SectionLegendVoiceHost>\n );\n}\n\n/**\n * Per-slot wrapper around a group of launcher buttons.\n *\n * The buttons are identical in every slot — only the chrome around them differs,\n * which is what keeps \"where does this view's entry point live\" a placement\n * decision rather than three divergent renderers.\n */\nfunction LauncherSlotChrome({\n renderSlot,\n children,\n}: {\n renderSlot: InsertedViewRenderSlot;\n children: React.ReactNode;\n}): React.JSX.Element {\n if (renderSlot === InsertedViewRenderSlot.ACTION_BAR) {\n // The host action cluster owns the row; contribute buttons only.\n return <>{children}</>;\n }\n\n if (renderSlot === InsertedViewRenderSlot.RECORD_NAVIGATION) {\n return (\n <nav className=\"-mt-element flex flex-wrap items-center gap-item-xs border-b border-border pb-element-sm\">\n {children}\n </nav>\n );\n }\n\n return (\n <section className=\"rounded-lg border border-border bg-card p-field shadow-sm\">\n <div className=\"flex flex-wrap gap-item-sm\">{children}</div>\n </section>\n );\n}\n\nfunction isResourceOwnedLauncherView(\n resolvedView: ResolvedNavigationTarget | null,\n): resolvedView is ResolvedNavigationTarget & {\n contentType: NavigationContentType.COMPOSITE_VIEW | NavigationContentType.EXECUTION_VIEW;\n viewRef: string;\n label: string;\n} {\n return resolvedView?.contentType === NavigationContentType.COMPOSITE_VIEW\n || resolvedView?.contentType === NavigationContentType.EXECUTION_VIEW;\n}\n\n/**\n * Resolve a resource-owned composite/execution view ref into a launcher entry\n * and append it to `resolvedSegments`, grouping adjacent launchers into a\n * single `launcher-group` segment. Charts are handled inline at the call site\n * because they render as standalone segments with no grouping semantics.\n */\nfunction pushResourceOwnedLauncherView(params: {\n resolvedSegments: ResourceOwnedInsertedViewSegment[];\n resolutionContext: LauncherResolutionContext;\n resourceType: string;\n viewRef: string;\n operationIdentifier: string | number | symbol;\n familyLabel: 'composite' | 'execution';\n launcher?: InsertedViewLauncherConfig;\n}): void {\n const {\n resolvedSegments,\n resolutionContext,\n resourceType,\n viewRef,\n operationIdentifier,\n familyLabel,\n launcher,\n } = params;\n const resolvedView = resolveItemRef(\n {\n kind: LauncherItemTargetKind.RESOURCE_VIEW,\n resourceType,\n viewRef,\n },\n resolutionContext,\n );\n if (!resolvedView) {\n throw buildInsertedViewsConfigurationError(\n `Operation \"${String(operationIdentifier)}\" on resource \"${resourceType}\" could not resolve resource-owned ${familyLabel} view \"${viewRef}\".`,\n );\n }\n\n if (!isResourceOwnedLauncherView(resolvedView)) {\n throw buildInsertedViewsConfigurationError(\n `Operation \"${String(operationIdentifier)}\" on resource \"${resourceType}\" resolved ${familyLabel} view \"${viewRef}\" into unsupported content type \"${resolvedView.contentType}\".`,\n );\n }\n\n const launcherView: ResourceOwnedLauncherView = {\n kind: resolvedView.contentType,\n ref: resolvedView.viewRef,\n label: resolvedView.label,\n iconReference: resolvedView.iconReference,\n urlPath: resolvedView.urlPath,\n contextResourceIdentifiers: resolvedView.contextResourceIdentifiers,\n requiredFeatures: resolvedView.requiredFeatures,\n presentation: resolveInsertedViewLauncherConfig(launcher),\n };\n\n const previousSegment = resolvedSegments[resolvedSegments.length - 1];\n if (previousSegment?.type === 'launcher-group') {\n previousSegment.views.push(launcherView);\n return;\n }\n\n resolvedSegments.push({\n type: 'launcher-group',\n views: [launcherView],\n });\n}\n\nfunction buildInsertedViewsConfigurationError(message: string): Error {\n return FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n component: 'ResourceLayout_InsertedViews',\n message,\n },\n );\n}\n\nexport default ResourceLayout_InsertedViews;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceLayout_List.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ResourceLayout_List.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAejF,OAAO,EAOL,QAAQ,EAGT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,qBAAqB,EAOtB,MAAM,+DAA+D,CAAC;AAyEvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAOvH,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAA;AAI9F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wDAAwD,CAAC;AAO3G,MAAM,WAAW,sCAAuC,SAAQ,wBAAwB;IACtF,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,kBAAkB,CAAC,EAAE,4BAA4B,CAAC;IAClD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;CACzC;AAWD,eAAO,MAAM,iCAAiC,GAAI,oIAQ/C,sCAAsC,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IA6jD/D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,sCAAsC,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+B1I"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useCallback, useMemo, useEffect, useState, useRef } from 'react';
|
|
3
|
+
import { documentHeadingTag, useDocumentHeadingLevel } from '../../components/typography/document-heading-level.js';
|
|
3
4
|
import { COLLECTION_SURFACE_ATTRIBUTE } from '../../components/resources/skeleton/DisplayLayout.js';
|
|
4
5
|
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
5
6
|
import { useEventBus } from '../../core/events/useEventBus.js';
|
|
@@ -67,6 +68,8 @@ const logger = LoggerFrontendService.getLogger();
|
|
|
67
68
|
const logDebug = logger.debugByType('ResourceLayoutPreset_List_Default');
|
|
68
69
|
logger.setDebugTypeLogging('ResourceLayoutPreset_List_Default', false);
|
|
69
70
|
export const ResourceLayoutPreset_List_Default = ({ resourceContext, navigationZone, navigationInitiator, dataMode: propDataMode, sourceRelationship, showCharts = true, defaultViewMode = CollectionDisplayMode.CARDS, }) => {
|
|
71
|
+
// A bucket's label (a day, a group value) takes the outline's level under the page's `h1`; a fixed `h3` skipped one (#3867).
|
|
72
|
+
const GroupHeadingTag = documentHeadingTag(useDocumentHeadingLevel());
|
|
70
73
|
const { resourceType, operation, operationId, resourceConfig, operationInitiator, contextualParameters, resolvePreferredOperation, navigateToResourceOperation, } = useResourceOperationSurface({
|
|
71
74
|
resourceContext,
|
|
72
75
|
navigationZone,
|
|
@@ -1222,7 +1225,7 @@ export const ResourceLayoutPreset_List_Default = ({ resourceContext, navigationZ
|
|
|
1222
1225
|
// Page-GLOBAL row index (offset by all prior buckets' item counts) so
|
|
1223
1226
|
// "Select row N" aria labels don't restart at 1 in every day group.
|
|
1224
1227
|
const rowOffset = renderedGroups.slice(0, groupIndex).reduce((n, g) => n + g.items.length, 0);
|
|
1225
|
-
return (_jsxs("section", { className: "space-y-item-xs", children: [group.label && (_jsx(
|
|
1228
|
+
return (_jsxs("section", { className: "space-y-item-xs", children: [group.label && (_jsx(GroupHeadingTag, { className: "text-xs font-medium text-muted-foreground", children: group.label })), _jsx("ul", { role: "list", "aria-label": group.label ?? listLabel, className: resolveCardsContainerClass(cardGridColumns), style: resolveCardsGridStyle(cardGridColumns), children: group.items.map((item, i) => renderCardsItem(item, rowOffset + i)) })] }, `${group.key}:${groupIndex}`));
|
|
1226
1229
|
}) })) : (_jsx("ul", { role: "list", "aria-label": listLabel, className: resolveCardsContainerClass(cardGridColumns), style: resolveCardsGridStyle(cardGridColumns), children: items.map(renderCardsItem) })), !boardColumns && !displayWindows && (_jsx(ResourceLayout_Pagination, { pagination: pagination, onPaginationChange: setPagination }))] }) })] }));
|
|
1227
1230
|
};
|
|
1228
1231
|
export function ResourceLayout_List({ preset, ...props }) {
|