@jini-ai/ui 0.5.4 → 0.5.6
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/CHANGELOG.md +10 -0
- package/dist/core/theme/validation.js +40 -38
- package/dist/features/a2ui/renderer.js +15 -13
- package/dist/features/about/react/components/AboutTab.js +64 -34
- package/dist/features/about/rules.d.ts +2 -2
- package/dist/features/about/rules.js +156 -129
- package/dist/features/admin-widgets/components/ImagePreviewModal.d.ts +4 -3
- package/dist/features/admin-widgets/components/ImagePreviewModal.js +6 -10
- package/dist/features/admin-widgets/components/InfoTip.d.ts +3 -2
- package/dist/features/admin-widgets/components/InfoTip.hooks.js +2 -0
- package/dist/features/admin-widgets/components/InfoTip.js +34 -7
- package/dist/features/admin-widgets/components/InfoTip.rules.d.ts +13 -0
- package/dist/features/admin-widgets/components/InfoTip.rules.js +43 -10
- package/dist/features/admin-widgets/components/Lightbox/Lightbox.d.ts +30 -0
- package/dist/features/admin-widgets/components/Lightbox/Lightbox.hooks.d.ts +40 -0
- package/dist/features/admin-widgets/components/Lightbox/Lightbox.hooks.js +128 -0
- package/dist/features/admin-widgets/components/Lightbox/Lightbox.js +18 -0
- package/dist/features/admin-widgets/components/MiddleTruncate.d.ts +14 -0
- package/dist/features/admin-widgets/components/MiddleTruncate.js +12 -0
- package/dist/features/admin-widgets/components/MiddleTruncate.rules.d.ts +20 -0
- package/dist/features/admin-widgets/components/MiddleTruncate.rules.js +21 -0
- package/dist/features/admin-widgets/components/ScrollJump/ScrollJump.d.ts +18 -0
- package/dist/features/admin-widgets/components/ScrollJump/ScrollJump.hooks.d.ts +16 -0
- package/dist/features/admin-widgets/components/ScrollJump/ScrollJump.hooks.js +45 -0
- package/dist/features/admin-widgets/components/ScrollJump/ScrollJump.js +18 -0
- package/dist/features/admin-widgets/components/ScrollJump/ScrollJump.rules.d.ts +32 -0
- package/dist/features/admin-widgets/components/ScrollJump/ScrollJump.rules.js +26 -0
- package/dist/features/admin-widgets/components/Select/Select.hooks.d.ts +21 -0
- package/dist/features/admin-widgets/components/Select/Select.hooks.js +24 -2
- package/dist/features/admin-widgets/components/Select/Select.js +4 -3
- package/dist/features/admin-widgets/components/SuggestInput/SuggestInput.hooks.js +29 -14
- package/dist/features/admin-widgets/index.d.ts +14 -2
- package/dist/features/admin-widgets/index.js +7 -1
- package/dist/features/admin-widgets/styles/admin-widgets.css +1 -0
- package/dist/features/asset-grid/react/components/AssetCard.js +7 -1
- package/dist/features/asset-grid/react/components/AssetGrid.d.ts +1 -1
- package/dist/features/asset-grid/react/components/AssetGrid.js +38 -18
- package/dist/features/asset-grid/react/components/useAssetGridFilters.d.ts +21 -0
- package/dist/features/asset-grid/react/components/useAssetGridFilters.js +19 -0
- package/dist/features/asset-grid/react/hooks/useAssetGridKeyboardShortcuts.js +16 -11
- package/dist/features/asset-grid/react/hooks/useAssetGridLiveUpdates.d.ts +2 -0
- package/dist/features/asset-grid/react/hooks/useAssetGridLiveUpdates.js +35 -11
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowser.d.ts +6 -6
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowser.js +10 -129
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowserParts.d.ts +50 -0
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowserParts.js +95 -0
- package/dist/features/asset-tree-browser/react/components/useAssetTreeBrowserController.d.ts +56 -0
- package/dist/features/asset-tree-browser/react/components/useAssetTreeBrowserController.js +80 -0
- package/dist/features/asset-tree-browser/rules.js +40 -22
- package/dist/features/browser-chrome/rules.js +74 -70
- package/dist/features/charts/browser.js +11 -5
- package/dist/features/charts/react.js +2 -2
- package/dist/features/charts/table.js +2 -2
- package/dist/features/command-palette/react/hooks/useCommandPalette.js +3 -9
- package/dist/features/connectors/ConnectorsBrowser.d.ts +4 -4
- package/dist/features/connectors/ConnectorsBrowser.js +26 -14
- package/dist/features/connectors/components/ConnectorCard.js +67 -38
- package/dist/features/connectors/components/ConnectorDetailDrawer.js +62 -31
- package/dist/features/connectors/components/ConnectorGrid.js +11 -6
- package/dist/features/connectors/hooks/useConnectorAuthorization.js +6 -0
- package/dist/features/connectors/hooks/useConnectorCatalog.d.ts +2 -0
- package/dist/features/connectors/hooks/useConnectorCatalog.js +32 -13
- package/dist/features/connectors/hooks/useWiredConnectorsBrowser.d.ts +3 -3
- package/dist/features/connectors/rules.d.ts +8 -1
- package/dist/features/connectors/rules.js +42 -20
- package/dist/features/connectors/types.d.ts +11 -0
- package/dist/features/execution/constants.d.ts +4 -10
- package/dist/features/execution/constants.js +9 -94
- package/dist/features/execution/react/components/ByokProviderForm.d.ts +2 -4
- package/dist/features/execution/react/components/ByokProviderForm.js +140 -43
- package/dist/features/execution/react/components/ExecutionTab.d.ts +1 -2
- package/dist/features/execution/react/components/ExecutionTab.js +52 -30
- package/dist/features/execution/react/components/LocalCliAgentCard.js +12 -3
- package/dist/features/execution/react/components/LocalCliAgentList.js +14 -3
- package/dist/features/execution/react/components/LocalCliAgentSettings.js +14 -3
- package/dist/features/execution/react/hooks/useLocalCliAgentCard.js +54 -36
- package/dist/features/execution/react/hooks/useReasoningControl.d.ts +1 -1
- package/dist/features/execution/react/hooks/useReasoningControl.js +116 -75
- package/dist/features/execution/rules.d.ts +13 -2
- package/dist/features/execution/rules.js +51 -11
- package/dist/features/execution/types.d.ts +6 -42
- package/dist/features/execution/types.js +0 -17
- package/dist/features/external-mcp/react/components/ExternalMcpTab.d.ts +6 -2
- package/dist/features/external-mcp/react/components/ExternalMcpTab.js +9 -2
- package/dist/features/file-dropzone/react/components/FileDropzone.js +24 -25
- package/dist/features/file-dropzone/react/components/FileDropzoneLightbox.d.ts +2 -2
- package/dist/features/file-dropzone/react/components/FileDropzoneLightbox.js +35 -30
- package/dist/features/file-dropzone/react/components/FileDropzoneThumbnailGrid.js +30 -24
- package/dist/features/file-dropzone/react/components/FileDropzoneZone.d.ts +14 -0
- package/dist/features/file-dropzone/react/components/FileDropzoneZone.js +26 -0
- package/dist/features/html-editor/canvas-content-wrapper.js +13 -13
- package/dist/features/html-editor/canvas-embed-placeholders.js +46 -37
- package/dist/features/html-editor/css.js +76 -69
- package/dist/features/html-editor/editor-blocks.js +47 -33
- package/dist/features/html-editor/editor-serialization.js +6 -5
- package/dist/features/html-editor/protected-elements.js +39 -28
- package/dist/features/html-editor/react/hooks/useInteractiveHtmlEditor.js +4 -4
- package/dist/features/html-editor/source-splice.js +51 -30
- package/dist/features/i18n/dictionaries/settings-dialog.ja.js +1 -0
- package/dist/features/i18n/dictionaries/settings-dialog.zh-CN.js +1 -0
- package/dist/features/i18n/dictionaries/settings-dialog.zh-TW.js +1 -0
- package/dist/features/i18n/locale.js +20 -16
- package/dist/features/iframe-pool/react/dom-sync.js +8 -6
- package/dist/features/integrations/react/components/CodexInstallToggleButton.js +19 -4
- package/dist/features/integrations/react/components/IntegrationsTab.js +60 -14
- package/dist/features/interactive-ui/interactive-ui.css +1 -1
- package/dist/features/interactive-ui/providers/native/data-table.manifest.d.ts +6 -6
- package/dist/features/interactive-ui/providers/shadcn/data-table.js +10 -7
- package/dist/features/interactive-ui/providers/shadcn/data-table.manifest.d.ts +6 -6
- package/dist/features/lexical-rich-text-editor/mention-parser.js +60 -57
- package/dist/features/lexical-rich-text-editor/react/hooks/useKeyboardCommands.js +33 -38
- package/dist/features/lexical-rich-text-editor/rules.js +87 -74
- package/dist/features/lexical-rich-text-editor/serialize.js +27 -25
- package/dist/features/mcp-ui/secret-card.js +111 -61
- package/dist/features/mcp-ui/surfaces/confirmation.js +39 -21
- package/dist/features/mcp-ui/surfaces/document.d.ts +1 -1
- package/dist/features/mcp-ui/surfaces/document.js +10 -2
- package/dist/features/mcp-ui/surfaces/fields.js +30 -50
- package/dist/features/mcp-ui/surfaces/form.d.ts +6 -0
- package/dist/features/mcp-ui/surfaces/form.js +43 -21
- package/dist/features/mcp-ui/surfaces/outcome.js +30 -20
- package/dist/features/mcp-ui/surfaces/text-input.js +33 -21
- package/dist/features/mcp-ui/surfaces/tokens.d.ts +6 -1
- package/dist/features/mcp-ui/surfaces/tokens.js +5 -2
- package/dist/features/media-providers/constants.d.ts +1 -0
- package/dist/features/media-providers/constants.js +2 -81
- package/dist/features/media-providers/index.d.ts +1 -1
- package/dist/features/media-providers/ports.d.ts +2 -0
- package/dist/features/media-providers/react/components/MediaProviderCard.d.ts +22 -0
- package/dist/features/media-providers/react/components/MediaProviderCard.js +50 -0
- package/dist/features/media-providers/react/components/MediaProvidersTab.d.ts +5 -6
- package/dist/features/media-providers/react/components/MediaProvidersTab.js +40 -72
- package/dist/features/media-providers/react/components/media-providers-tab-labels.d.ts +11 -0
- package/dist/features/media-providers/react/components/media-providers-tab-labels.js +57 -0
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.d.ts +4 -2
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.js +37 -23
- package/dist/features/media-providers/rules.js +17 -10
- package/dist/features/media-providers/types.d.ts +4 -22
- package/dist/features/media-providers/types.js +3 -8
- package/dist/features/memory/formatters.js +127 -92
- package/dist/features/memory/react/components/MemoryConnectedPanel.js +92 -36
- package/dist/features/memory/react/components/MemoryList.js +37 -18
- package/dist/features/memory/react/hooks/useMemoryExtractions.store.js +42 -36
- package/dist/features/notifications/react/components/NotificationsTab.js +28 -28
- package/dist/features/observability/long-task.d.ts +0 -12
- package/dist/features/observability/long-task.js +15 -19
- package/dist/features/observability/resource-error.d.ts +0 -10
- package/dist/features/observability/resource-error.js +18 -13
- package/dist/features/observability/stuck-run.js +10 -6
- package/dist/features/observability/telemetry-url.d.ts +6 -0
- package/dist/features/observability/telemetry-url.js +16 -0
- package/dist/features/observability/white-screen.js +12 -24
- package/dist/features/panel-kit/fetch-query/adapter.react.d.ts +2 -2
- package/dist/features/panel-kit/fetch-query/adapter.react.js +4 -2
- package/dist/features/panel-kit/fetch-query/adapter.tanstack.js +46 -33
- package/dist/features/panel-kit/helpers/standing-draft-local-backup.js +3 -1
- package/dist/features/panel-kit/hooks/use-settings-slice.hooks.js +3 -1
- package/dist/features/privacy/react/components/PrivacyTab.js +24 -13
- package/dist/features/progress-card/components/ProgressCard.js +7 -3
- package/dist/features/progress-card/reference-adapters.js +59 -54
- package/dist/features/project-locations/react/components/ProjectLocationsTab.js +24 -15
- package/dist/features/project-locations/react/hooks/useProjectLocationsTab.d.ts +8 -0
- package/dist/features/project-locations/react/hooks/useProjectLocationsTab.js +31 -23
- package/dist/features/resource-dashboard/react/components/ResourceBoard.js +6 -47
- package/dist/features/resource-dashboard/react/components/ResourceBoardView.d.ts +2 -2
- package/dist/features/resource-dashboard/react/components/ResourceBoardView.js +3 -6
- package/dist/features/resource-dashboard/react/components/ResourceBoardViewParts.d.ts +15 -0
- package/dist/features/resource-dashboard/react/components/ResourceBoardViewParts.js +35 -0
- package/dist/features/resource-dashboard/react/components/ResourceCard.js +5 -16
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.d.ts +34 -0
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.js +34 -0
- package/dist/features/resource-dashboard/react/components/ResourceRowList.js +3 -1
- package/dist/features/resource-dashboard/react/components/ResourceRowListItem.js +2 -2
- package/dist/features/resource-dashboard/react/components/ResourceRowListItemParts.d.ts +19 -0
- package/dist/features/resource-dashboard/react/components/ResourceRowListItemParts.js +11 -0
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.js +4 -4
- package/dist/features/resource-dashboard/react/components/ResourceRowListViewParts.d.ts +10 -0
- package/dist/features/resource-dashboard/react/components/ResourceRowListViewParts.js +20 -0
- package/dist/features/resource-dashboard/react/components/resourceBoardProps.d.ts +48 -0
- package/dist/features/resource-dashboard/react/components/resourceBoardProps.js +70 -0
- package/dist/features/resource-dashboard/react/components/resourceRowListProps.d.ts +19 -0
- package/dist/features/resource-dashboard/react/components/resourceRowListProps.js +14 -0
- package/dist/features/resource-dashboard/react/components/translatedErrorLabelProps.d.ts +16 -0
- package/dist/features/resource-dashboard/react/components/translatedErrorLabelProps.js +13 -0
- package/dist/features/resource-dashboard/rules.js +2 -8
- package/dist/features/sketch-editor/dom.js +150 -99
- package/dist/features/sketch-editor/react/components/SketchEditor.js +26 -15
- package/dist/features/skills/react/components/SkillDraftForm.js +13 -19
- package/dist/features/skills/react/components/SkillDraftForm.labels.d.ts +31 -0
- package/dist/features/skills/react/components/SkillDraftForm.labels.js +54 -0
- package/dist/features/skills/react/components/SkillRow.js +38 -18
- package/dist/features/skills/react/components/SkillRow.labels.d.ts +7 -0
- package/dist/features/skills/react/components/SkillRow.labels.js +18 -0
- package/dist/features/skills/react/components/SkillsTab.js +24 -14
- package/dist/features/skills/react/components/SkillsTab.labels.d.ts +7 -0
- package/dist/features/skills/react/components/SkillsTab.labels.js +11 -0
- package/dist/features/skills/rules.js +32 -23
- package/dist/features/source-config-list/agent-handles.js +2 -1
- package/dist/features/source-config-list/dependencies.js +53 -49
- package/dist/features/source-config-list/index.d.ts +3 -3
- package/dist/features/source-config-list/react/components/SourceConfigAddForm.d.ts +6 -5
- package/dist/features/source-config-list/react/components/SourceConfigAddForm.js +38 -7
- package/dist/features/source-config-list/react/components/SourceConfigField.js +69 -25
- package/dist/features/source-config-list/react/components/SourceConfigItemCard.d.ts +6 -5
- package/dist/features/source-config-list/react/components/SourceConfigItemCard.js +76 -20
- package/dist/features/source-config-list/react/components/SourceConfigListView.d.ts +5 -3
- package/dist/features/source-config-list/react/components/SourceConfigListView.js +33 -3
- package/dist/features/source-config-list/react/components/SourceConfigTestControl.js +17 -1
- package/dist/features/source-config-list/react/components/SourceConfigTrustOptions.d.ts +11 -0
- package/dist/features/source-config-list/react/components/SourceConfigTrustOptions.js +12 -0
- package/dist/features/source-config-list/types.d.ts +14 -0
- package/dist/features/tab-launcher-menu/react/components/TabLauncherMenu.js +25 -1
- package/dist/features/tab-launcher-menu/react/hooks/useTabLauncherMenu.js +15 -16
- package/dist/features/tab-strip/react/components/TabBar.js +8 -1
- package/dist/features/tabbed-dialog/react/components/TabbedDialog.js +8 -30
- package/dist/features/tabbed-dialog/react/components/TabbedDialogChrome.d.ts +15 -0
- package/dist/features/tabbed-dialog/react/components/TabbedDialogChrome.js +8 -0
- package/dist/features/tabbed-dialog/react/components/TabbedDialogHeader.d.ts +12 -0
- package/dist/features/tabbed-dialog/react/components/TabbedDialogHeader.js +6 -0
- package/dist/features/tabbed-dialog/react/components/TabbedDialogSidebar.d.ts +27 -0
- package/dist/features/tabbed-dialog/react/components/TabbedDialogSidebar.js +12 -0
- package/dist/features/tabbed-dialog/react/components/tabbedDialogView.d.ts +43 -0
- package/dist/features/tabbed-dialog/react/components/tabbedDialogView.js +59 -0
- package/dist/features/version-manager/dependencies.d.ts +3 -1
- package/dist/features/version-manager/dependencies.js +3 -2
- package/dist/features/version-manager/react/components/VersionManagerModal.js +10 -6
- package/dist/features/version-manager/react/hooks/useVersionManager.js +7 -4
- package/dist/features/viewer-shell/react/components/CommentSidePanel.js +103 -50
- package/dist/features/viewer-shell/react/components/MarkdownSplitPane.js +28 -8
- package/dist/features/viewer-shell/react/hooks/useCommentReorder.js +22 -16
- package/dist/features/viewer-shell/rules.js +19 -23
- package/dist/react/components/CustomSelect.d.ts +38 -1
- package/dist/react/components/CustomSelect.js +94 -38
- package/dist/react/components/OnboardingDropdown.js +20 -8
- package/dist/react/components/RemixIcon.stylesheet.js +3 -1
- package/dist/react/components/Toast.js +13 -2
- package/dist/react/components/TooltipLayer.js +5 -14
- package/dist/react/components/WorkingDirPicker.js +78 -50
- package/dist/react/components/remixicon-font-recovery.js +38 -30
- package/dist/react/components/select-popover.d.ts +8 -6
- package/dist/react/components/select-popover.js +33 -29
- package/dist/react/mcp-ui/McpUiHost.d.ts +1 -1
- package/dist/react/mcp-ui/McpUiHost.js +10 -11
- package/dist/react/mcp-ui/host-message-source.d.ts +14 -2
- package/dist/react/mcp-ui/host-message-source.js +15 -5
- package/dist/react/mcp-ui/mcp-ui-host-frame.d.ts +41 -0
- package/dist/react/mcp-ui/mcp-ui-host-frame.js +39 -0
- package/dist/renderers/annotation-canvas/react/components/AnnotationCanvas.js +97 -69
- package/dist/renderers/preview-modal-shell/react/components/PreviewModalShell.js +59 -30
- package/dist/renderers/preview-modal-shell/react/components/icons.js +4 -1
- package/dist/renderers/react/components/ArtifactView.js +9 -6
- package/dist/renderers/srcdoc/build.d.ts +4 -1
- package/dist/renderers/srcdoc/build.js +62 -48
- package/dist/styles/admin.css +29 -14
- package/dist/styles/lightbox.css +142 -0
- package/dist/styles/variables.css +128 -0
- package/dist/theme/apply.js +9 -5
- package/dist/utils/auto-open-file.d.ts +2 -1
- package/dist/utils/auto-open-file.js +69 -85
- package/dist/utils/markdown-scroll-sync.js +108 -87
- package/dist/utils/polygon-selection.js +25 -26
- package/dist/utils/smooth-scroll-to-top.d.ts +1 -1
- package/dist/utils/smooth-scroll-to-top.js +2 -32
- package/dist/utils/sse.js +26 -26
- package/dist/utils/unit-bezier.d.ts +7 -0
- package/dist/utils/unit-bezier.js +38 -0
- package/package.json +7 -10
- package/dist/features/admin-widgets/components/ImagePreviewModal.hooks.d.ts +0 -13
- package/dist/features/admin-widgets/components/ImagePreviewModal.hooks.js +0 -46
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { ResourceCard } from './ResourceCard.js';
|
|
4
|
-
import { ResourceKanbanBoard } from './ResourceKanbanBoard.js';
|
|
2
|
+
import { ResourceBoardAlerts, ResourceBoardContent, ResourceBoardViewToolbar } from './ResourceBoardViewParts.js';
|
|
5
3
|
/**
|
|
6
4
|
* Pure composition (props in, JSX out): the toolbar, then either the empty
|
|
7
5
|
* state, the card grid, or the kanban board — DesignsTab's own
|
|
8
6
|
* `filtered.length === 0 ? empty : view === "grid" ? grid : kanban` branch.
|
|
9
7
|
*/
|
|
10
|
-
export function ResourceBoardView(
|
|
11
|
-
|
|
12
|
-
return (_jsxs("div", { className: `resource-board${viewMode === 'kanban' ? ' is-kanban' : ''}`, children: [_jsx(ResourceBoardToolbar, { sortOptions: sortOptions, ...(activeSort !== undefined ? { activeSort } : {}), onSortChange: onSortChange, sortAriaLabel: sortAriaLabel, query: query, onQueryChange: onQueryChange, searchPlaceholder: searchPlaceholder, viewMode: viewMode, onViewModeChange: onViewModeChange, viewToggleAriaLabel: viewToggleAriaLabel, gridViewLabel: gridViewLabel, kanbanViewLabel: kanbanViewLabel, enableBulkDelete: enableBulkDelete, selectMode: selectMode, selectedCount: selected.size, bulkDeleteBusy: bulkDeleteBusy, onEnterSelectMode: onEnterSelectMode, onExitSelectMode: onExitSelectMode, onBulkDelete: onBulkDelete, selectModeLabel: selectModeLabel, selectedCountLabel: selectedCountLabel, deleteSelectedLabel: deleteSelectedLabel, cancelSelectLabel: cancelSelectLabel, ...(createLabel !== undefined ? { createLabel } : {}), ...(onCreate !== undefined ? { onCreate } : {}) }), error ? (_jsx("div", { className: "resource-board-error", role: "alert", children: errorLabel ?? error })) : null, actionError ? (_jsx("div", { className: "resource-board-action-error", role: "alert", children: actionErrorLabel ?? actionError })) : null, loading ? (_jsx("div", { className: "resource-board-loading", role: "status" })) : isEmpty ? (_jsx("div", { className: "resource-board-empty", children: hasAnyItems ? emptyStateNoMatch : emptyStateTitle })) : viewMode === 'grid' ? (_jsx("div", { className: "resource-board-grid", "data-testid": "resource-board-grid", children: items.map((item) => (_jsx(ResourceCard, { item: item, selectMode: selectMode, selected: selected.has(item.id), menuOpen: openMenuId === item.id, busy: isItemBusy(item.id), ...(item.status ? { statusLabel: statusLabel(item.status) } : {}), ...(toneMap ? { toneMap } : {}), ...(menuActionLabel ? { menuActionLabel } : {}), moreLabel: moreLabel, ...(menuContainerRef ? { menuContainerRef } : {}), ...(renderBody ? { renderBody } : {}), onOpen: () => onOpenItem(item.id), onToggleSelected: () => onToggleSelected(item.id), onToggleMenu: () => onToggleMenu(item.id), onAction: (kind) => onItemAction(item.id, kind) }, item.id))) })) : (_jsx(ResourceKanbanBoard, { columns: kanbanColumns, emptyColumnLabel: emptyColumnLabel, deleteLabel: deleteLabel, deleteAriaLabel: deleteAriaLabel, isBusy: isItemBusy, onOpen: onOpenItem, ...(onKanbanDelete ? { onDelete: onKanbanDelete } : {}) }))] }));
|
|
8
|
+
export function ResourceBoardView(props) {
|
|
9
|
+
return (_jsxs("div", { className: `resource-board${props.viewMode === 'kanban' ? ' is-kanban' : ''}`, children: [_jsx(ResourceBoardViewToolbar, { ...props }), _jsx(ResourceBoardAlerts, { ...props }), _jsx(ResourceBoardContent, { ...props })] }));
|
|
13
10
|
}
|
|
14
11
|
//# sourceMappingURL=ResourceBoardView.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ResourceBoardViewProps } from './ResourceBoardView.js';
|
|
2
|
+
/** Maps the view's props onto `ResourceBoardToolbar` (sort, search, view toggle, select-mode/bulk-delete, create CTA). */
|
|
3
|
+
export declare function ResourceBoardViewToolbar<TBody>(props: ResourceBoardViewProps<TBody>): import("react").JSX.Element;
|
|
4
|
+
/** The LOAD-failure banner and, independently, the single-item action-failure banner (shown ABOVE the still-visible item list). */
|
|
5
|
+
export declare function ResourceBoardAlerts<TBody>({ error, errorLabel, actionError, actionErrorLabel, }: Pick<ResourceBoardViewProps<TBody>, 'error' | 'errorLabel' | 'actionError' | 'actionErrorLabel'>): import("react").JSX.Element;
|
|
6
|
+
/** The card grid: one `ResourceCard` per item, with the item's id bound into each per-card callback. */
|
|
7
|
+
export declare function ResourceBoardGrid<TBody>({ items, selectMode, selected, openMenuId, isItemBusy, statusLabel, toneMap, menuActionLabel, moreLabel, menuContainerRef, renderBody, onOpenItem, onToggleSelected, onToggleMenu, onItemAction, }: ResourceBoardViewProps<TBody>): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* DesignsTab's own `filtered.length === 0 ? empty : view === "grid" ? grid : kanban`
|
|
10
|
+
* branch, behind a loading state. The empty state is suppressed while a load
|
|
11
|
+
* error is showing, and picks "search matched nothing" over "nothing exists
|
|
12
|
+
* yet" whenever the port returned any item at all.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ResourceBoardContent<TBody>(props: ResourceBoardViewProps<TBody>): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=ResourceBoardViewParts.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ResourceBoardToolbar } from './ResourceBoardToolbar.js';
|
|
3
|
+
import { ResourceCard } from './ResourceCard.js';
|
|
4
|
+
import { ResourceKanbanBoard } from './ResourceKanbanBoard.js';
|
|
5
|
+
/** Maps the view's props onto `ResourceBoardToolbar` (sort, search, view toggle, select-mode/bulk-delete, create CTA). */
|
|
6
|
+
export function ResourceBoardViewToolbar(props) {
|
|
7
|
+
const { activeSort, createLabel, onCreate } = props;
|
|
8
|
+
return (_jsx(ResourceBoardToolbar, { sortOptions: props.sortOptions, ...(activeSort !== undefined ? { activeSort } : {}), onSortChange: props.onSortChange, sortAriaLabel: props.sortAriaLabel, query: props.query, onQueryChange: props.onQueryChange, searchPlaceholder: props.searchPlaceholder, viewMode: props.viewMode, onViewModeChange: props.onViewModeChange, viewToggleAriaLabel: props.viewToggleAriaLabel, gridViewLabel: props.gridViewLabel, kanbanViewLabel: props.kanbanViewLabel, enableBulkDelete: props.enableBulkDelete, selectMode: props.selectMode, selectedCount: props.selected.size, bulkDeleteBusy: props.bulkDeleteBusy, onEnterSelectMode: props.onEnterSelectMode, onExitSelectMode: props.onExitSelectMode, onBulkDelete: props.onBulkDelete, selectModeLabel: props.selectModeLabel, selectedCountLabel: props.selectedCountLabel, deleteSelectedLabel: props.deleteSelectedLabel, cancelSelectLabel: props.cancelSelectLabel, ...(createLabel !== undefined ? { createLabel } : {}), ...(onCreate !== undefined ? { onCreate } : {}) }));
|
|
9
|
+
}
|
|
10
|
+
/** The LOAD-failure banner and, independently, the single-item action-failure banner (shown ABOVE the still-visible item list). */
|
|
11
|
+
export function ResourceBoardAlerts({ error, errorLabel, actionError, actionErrorLabel, }) {
|
|
12
|
+
return (_jsxs(_Fragment, { children: [error ? (_jsx("div", { className: "resource-board-error", role: "alert", children: errorLabel ?? error })) : null, actionError ? (_jsx("div", { className: "resource-board-action-error", role: "alert", children: actionErrorLabel ?? actionError })) : null] }));
|
|
13
|
+
}
|
|
14
|
+
/** The card grid: one `ResourceCard` per item, with the item's id bound into each per-card callback. */
|
|
15
|
+
export function ResourceBoardGrid({ items, selectMode, selected, openMenuId, isItemBusy, statusLabel, toneMap, menuActionLabel, moreLabel, menuContainerRef, renderBody, onOpenItem, onToggleSelected, onToggleMenu, onItemAction, }) {
|
|
16
|
+
return (_jsx("div", { className: "resource-board-grid", "data-testid": "resource-board-grid", children: items.map((item) => (_jsx(ResourceCard, { item: item, selectMode: selectMode, selected: selected.has(item.id), menuOpen: openMenuId === item.id, busy: isItemBusy(item.id), ...(item.status ? { statusLabel: statusLabel(item.status) } : {}), ...(toneMap ? { toneMap } : {}), ...(menuActionLabel ? { menuActionLabel } : {}), moreLabel: moreLabel, ...(menuContainerRef ? { menuContainerRef } : {}), ...(renderBody ? { renderBody } : {}), onOpen: () => onOpenItem(item.id), onToggleSelected: () => onToggleSelected(item.id), onToggleMenu: () => onToggleMenu(item.id), onAction: (kind) => onItemAction(item.id, kind) }, item.id))) }));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* DesignsTab's own `filtered.length === 0 ? empty : view === "grid" ? grid : kanban`
|
|
20
|
+
* branch, behind a loading state. The empty state is suppressed while a load
|
|
21
|
+
* error is showing, and picks "search matched nothing" over "nothing exists
|
|
22
|
+
* yet" whenever the port returned any item at all.
|
|
23
|
+
*/
|
|
24
|
+
export function ResourceBoardContent(props) {
|
|
25
|
+
const { loading, error, items, hasAnyItems, viewMode, onKanbanDelete } = props;
|
|
26
|
+
if (loading)
|
|
27
|
+
return _jsx("div", { className: "resource-board-loading", role: "status" });
|
|
28
|
+
if (!error && items.length === 0) {
|
|
29
|
+
return _jsx("div", { className: "resource-board-empty", children: hasAnyItems ? props.emptyStateNoMatch : props.emptyStateTitle });
|
|
30
|
+
}
|
|
31
|
+
if (viewMode === 'grid')
|
|
32
|
+
return _jsx(ResourceBoardGrid, { ...props });
|
|
33
|
+
return (_jsx(ResourceKanbanBoard, { columns: props.kanbanColumns, emptyColumnLabel: props.emptyColumnLabel, deleteLabel: props.deleteLabel, deleteAriaLabel: props.deleteAriaLabel, isBusy: props.isItemBusy, onOpen: props.onOpenItem, ...(onKanbanDelete ? { onDelete: onKanbanDelete } : {}) }));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=ResourceBoardViewParts.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { isCardActivationKey, resourceCardClassName, ResourceCardMenu, ResourceCardMeta } from './ResourceCardParts.js';
|
|
3
3
|
/**
|
|
4
4
|
* One dashboard card: DesignsTab's `design-card` grid item — clickable to
|
|
5
5
|
* open (or, in select-mode, to toggle selection), a select-mode checkbox OR
|
|
@@ -15,23 +15,12 @@ export function ResourceCard({ item, selectMode, selected, menuOpen, busy, statu
|
|
|
15
15
|
else
|
|
16
16
|
onOpen();
|
|
17
17
|
};
|
|
18
|
-
const
|
|
19
|
-
return (_jsxs("div", { className:
|
|
20
|
-
if (event
|
|
18
|
+
const menuActions = selectMode ? [] : (item.menuActions ?? []);
|
|
19
|
+
return (_jsxs("div", { className: resourceCardClassName({ selected, selectMode }), role: "button", tabIndex: 0, "data-testid": "resource-board-card", onClick: handleActivate, onKeyDown: (event) => {
|
|
20
|
+
if (isCardActivationKey(event)) {
|
|
21
21
|
event.preventDefault();
|
|
22
22
|
handleActivate();
|
|
23
23
|
}
|
|
24
|
-
}, children: [selectMode ? (_jsx("span", { className: `resource-board-card-checkbox${selected ? ' checked' : ''}`, "aria-hidden": true, "data-testid": "resource-board-card-checkbox" })) :
|
|
25
|
-
event.stopPropagation();
|
|
26
|
-
onToggleMenu();
|
|
27
|
-
},
|
|
28
|
-
// `stopPropagation` on `onClick` above only stops the CLICK the
|
|
29
|
-
// browser synthesizes from an Enter/Space keydown — the raw
|
|
30
|
-
// keydown event itself still bubbles to the outer card's own
|
|
31
|
-
// `onKeyDown` (a separate event), which would otherwise ALSO
|
|
32
|
-
// treat that same keypress as "activate the card" and open/
|
|
33
|
-
// toggle-select it at the same time this button's own action
|
|
34
|
-
// runs. Stop it here too.
|
|
35
|
-
onKeyDown: (event) => event.stopPropagation(), children: moreLabel }), menuOpen ? (_jsx("div", { className: "resource-board-card-menu", role: "menu", onClick: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), children: item.menuActions.map((action) => (_jsx("button", { type: "button", role: "menuitem", className: action.danger ? 'danger' : undefined, disabled: busy, onClick: () => onAction(action.kind), children: menuActionLabel ? menuActionLabel(action.kind, action.label) : action.label }, action.kind))) })) : null] })) : null, _jsx("div", { className: "resource-board-card-body", children: renderBody ? renderBody(item) : null }), _jsxs("div", { className: "resource-board-card-meta", children: [_jsx("div", { className: "resource-board-card-title", title: item.title, children: item.title }), item.subtitle ? _jsx("div", { className: "resource-board-card-subtitle", children: item.subtitle }) : null, item.status && statusLabel ? _jsx(StatusPill, { status: item.status, label: statusLabel, ...(toneMap ? { toneMap } : {}) }) : null] })] }));
|
|
24
|
+
}, children: [selectMode ? (_jsx("span", { className: `resource-board-card-checkbox${selected ? ' checked' : ''}`, "aria-hidden": true, "data-testid": "resource-board-card-checkbox" })) : null, menuActions.length > 0 ? (_jsx(ResourceCardMenu, { menuActions: menuActions, menuOpen: menuOpen, busy: busy, moreLabel: moreLabel, menuContainerRef: menuContainerRef, menuActionLabel: menuActionLabel, onToggleMenu: onToggleMenu, onAction: onAction })) : null, _jsx("div", { className: "resource-board-card-body", children: renderBody ? renderBody(item) : null }), _jsx(ResourceCardMeta, { item: item, statusLabel: statusLabel, toneMap: toneMap })] }));
|
|
36
25
|
}
|
|
37
26
|
//# sourceMappingURL=ResourceCard.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { KeyboardEvent, RefObject } from 'react';
|
|
2
|
+
import type { ResourceBoardItem, ResourceMenuActionSpec, ResourceStatusToneMap } from '../../types.js';
|
|
3
|
+
/** The card's own class list: `is-selected` and `select-mode` modifiers on top of the base class. */
|
|
4
|
+
export declare function resourceCardClassName({ selected, selectMode }: {
|
|
5
|
+
selected: boolean;
|
|
6
|
+
selectMode: boolean;
|
|
7
|
+
}): string;
|
|
8
|
+
/** Enter/Space activate the card (open, or toggle selection in select-mode), matching a native button. */
|
|
9
|
+
export declare function isCardActivationKey(event: KeyboardEvent): boolean;
|
|
10
|
+
/** The open kebab menu's items — clicks and keydowns inside it never bubble to the card. */
|
|
11
|
+
export declare function ResourceCardMenuItems({ menuActions, busy, menuActionLabel, onAction, }: {
|
|
12
|
+
menuActions: ResourceMenuActionSpec[];
|
|
13
|
+
busy: boolean;
|
|
14
|
+
menuActionLabel: ((kind: string, fallback: string) => string) | undefined;
|
|
15
|
+
onAction: (kind: string) => void;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
/** The kebab "more" button plus, while `menuOpen`, its menu — `menuContainerRef` is attached only while open (see `ResourceCardProps.menuContainerRef`). */
|
|
18
|
+
export declare function ResourceCardMenu({ menuActions, menuOpen, busy, moreLabel, menuContainerRef, menuActionLabel, onToggleMenu, onAction, }: {
|
|
19
|
+
menuActions: ResourceMenuActionSpec[];
|
|
20
|
+
menuOpen: boolean;
|
|
21
|
+
busy: boolean;
|
|
22
|
+
moreLabel: string;
|
|
23
|
+
menuContainerRef: RefObject<HTMLDivElement | null> | undefined;
|
|
24
|
+
menuActionLabel: ((kind: string, fallback: string) => string) | undefined;
|
|
25
|
+
onToggleMenu: () => void;
|
|
26
|
+
onAction: (kind: string) => void;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
28
|
+
/** Title, optional subtitle, and the status badge (only when the item has a status AND a pre-translated label). */
|
|
29
|
+
export declare function ResourceCardMeta<TBody>({ item, statusLabel, toneMap, }: {
|
|
30
|
+
item: ResourceBoardItem<TBody>;
|
|
31
|
+
statusLabel: string | undefined;
|
|
32
|
+
toneMap: ResourceStatusToneMap | undefined;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=ResourceCardParts.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { StatusPill } from './StatusPill.js';
|
|
3
|
+
/** The card's own class list: `is-selected` and `select-mode` modifiers on top of the base class. */
|
|
4
|
+
export function resourceCardClassName({ selected, selectMode }) {
|
|
5
|
+
return `resource-board-card${selected ? ' is-selected' : ''}${selectMode ? ' select-mode' : ''}`;
|
|
6
|
+
}
|
|
7
|
+
/** Enter/Space activate the card (open, or toggle selection in select-mode), matching a native button. */
|
|
8
|
+
export function isCardActivationKey(event) {
|
|
9
|
+
return event.key === 'Enter' || event.key === ' ';
|
|
10
|
+
}
|
|
11
|
+
/** The open kebab menu's items — clicks and keydowns inside it never bubble to the card. */
|
|
12
|
+
export function ResourceCardMenuItems({ menuActions, busy, menuActionLabel, onAction, }) {
|
|
13
|
+
return (_jsx("div", { className: "resource-board-card-menu", role: "menu", onClick: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), children: menuActions.map((action) => (_jsx("button", { type: "button", role: "menuitem", className: action.danger ? 'danger' : undefined, disabled: busy, onClick: () => onAction(action.kind), children: menuActionLabel ? menuActionLabel(action.kind, action.label) : action.label }, action.kind))) }));
|
|
14
|
+
}
|
|
15
|
+
/** The kebab "more" button plus, while `menuOpen`, its menu — `menuContainerRef` is attached only while open (see `ResourceCardProps.menuContainerRef`). */
|
|
16
|
+
export function ResourceCardMenu({ menuActions, menuOpen, busy, moreLabel, menuContainerRef, menuActionLabel, onToggleMenu, onAction, }) {
|
|
17
|
+
return (_jsxs("div", { className: "resource-board-card-menu-anchor", ref: menuOpen ? menuContainerRef : undefined, children: [_jsx("button", { type: "button", className: "resource-board-card-more", "aria-label": moreLabel, "aria-haspopup": "menu", "aria-expanded": menuOpen, onClick: (event) => {
|
|
18
|
+
event.stopPropagation();
|
|
19
|
+
onToggleMenu();
|
|
20
|
+
},
|
|
21
|
+
// `stopPropagation` on `onClick` above only stops the CLICK the
|
|
22
|
+
// browser synthesizes from an Enter/Space keydown — the raw
|
|
23
|
+
// keydown event itself still bubbles to the outer card's own
|
|
24
|
+
// `onKeyDown` (a separate event), which would otherwise ALSO
|
|
25
|
+
// treat that same keypress as "activate the card" and open/
|
|
26
|
+
// toggle-select it at the same time this button's own action
|
|
27
|
+
// runs. Stop it here too.
|
|
28
|
+
onKeyDown: (event) => event.stopPropagation(), children: moreLabel }), menuOpen ? _jsx(ResourceCardMenuItems, { menuActions: menuActions, busy: busy, menuActionLabel: menuActionLabel, onAction: onAction }) : null] }));
|
|
29
|
+
}
|
|
30
|
+
/** Title, optional subtitle, and the status badge (only when the item has a status AND a pre-translated label). */
|
|
31
|
+
export function ResourceCardMeta({ item, statusLabel, toneMap, }) {
|
|
32
|
+
return (_jsxs("div", { className: "resource-board-card-meta", children: [_jsx("div", { className: "resource-board-card-title", title: item.title, children: item.title }), item.subtitle ? _jsx("div", { className: "resource-board-card-subtitle", children: item.subtitle }) : null, item.status && statusLabel ? _jsx(StatusPill, { status: item.status, label: statusLabel, ...(toneMap ? { toneMap } : {}) }) : null] }));
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=ResourceCardParts.js.map
|
|
@@ -2,6 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useT } from '../../../i18n/index.js';
|
|
3
3
|
import { useWiredResourceRowList } from '../hooks/useResourceRowList.js';
|
|
4
4
|
import { ResourceRowListView } from './ResourceRowListView.js';
|
|
5
|
+
import { rowListHeaderProps } from './resourceRowListProps.js';
|
|
6
|
+
import { translatedErrorLabelProps } from './translatedErrorLabelProps.js';
|
|
5
7
|
/**
|
|
6
8
|
* The TasksView-shaped orchestrator: wires `useWiredResourceRowList` +
|
|
7
9
|
* `useT()` + `ResourceRowListView`.
|
|
@@ -13,7 +15,7 @@ export function ResourceRowList({ dependencies, title, eyebrow, lede, metrics =
|
|
|
13
15
|
...(refreshToken !== undefined ? { refreshToken } : {}),
|
|
14
16
|
});
|
|
15
17
|
const statusLabel = (status) => t(statusOptions.find((option) => option.value === status)?.label ?? status);
|
|
16
|
-
return (_jsx(ResourceRowListView, { ...(
|
|
18
|
+
return (_jsx(ResourceRowListView, { ...rowListHeaderProps({ t }, { eyebrow, lede, createLabel, onCreate }), title: title, metrics: metrics, metricsAriaLabel: t('Summary'), loading: list.loading, error: list.error, actionError: list.actionError, ...translatedErrorLabelProps({ t, error: list.error, actionError: list.actionError }), sectionLabel: t('Your items'), loadingLabel: t('Loading…'), emptyTitle: t('Nothing here yet'), emptyBody: t('Create one to get started.'), rows: list.rows, isRowBusy: list.isRowBusy, statusLabel: statusLabel, ...(toneMap ? { toneMap } : {}), canExpandHistory: list.canExpandHistory, expandedRowId: list.expandedRowId, historyLoadingRowId: list.historyLoadingRowId, historyByRowId: list.historyByRowId, showHistoryLabel: t('History'), hideHistoryLabel: t('Hide history'), historyTitleLabel: t('Run history'), historyLoadingLabel: t('Loading…'), historyEmptyLabel: t('No runs yet.'), onToggleExpand: list.toggleExpand, onRowAction: (id, kind) => {
|
|
17
19
|
// `dispatchRowAction` still re-throws on a `run()` rejection (its
|
|
18
20
|
// documented "propagates to the caller" contract), so this
|
|
19
21
|
// fire-and-forget call site must attach its own catch — otherwise
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { ResourceRowListItemActions, ResourceRowListItemContent } from './ResourceRowListItemParts.js';
|
|
3
3
|
import { ResourceRunHistoryList } from './ResourceRunHistoryList.js';
|
|
4
4
|
/**
|
|
5
5
|
* One row in the flat "your automations"-shaped list — TasksView's
|
|
@@ -9,6 +9,6 @@ import { ResourceRunHistoryList } from './ResourceRunHistoryList.js';
|
|
|
9
9
|
* `ResourceRunHistoryList` sublist.
|
|
10
10
|
*/
|
|
11
11
|
export function ResourceRowListItem({ row, busy, statusLabel, toneMap, canExpandHistory, expanded, showHistoryLabel, hideHistoryLabel, historyItems, historyLoading, historyTitleLabel, historyLoadingLabel, historyEmptyLabel, onToggleExpand, onAction, onHistoryItemAction, }) {
|
|
12
|
-
return (_jsxs("li", { className: `resource-row-list-item${row.paused ? ' is-paused' : ''}`, "data-testid": "resource-row-list-item", children: [_jsx("div", { className: "resource-row-list-item-main", children:
|
|
12
|
+
return (_jsxs("li", { className: `resource-row-list-item${row.paused ? ' is-paused' : ''}`, "data-testid": "resource-row-list-item", children: [_jsx("div", { className: "resource-row-list-item-main", children: _jsx(ResourceRowListItemContent, { row: row, statusLabel: statusLabel, toneMap: toneMap }) }), _jsx(ResourceRowListItemActions, { row: row, busy: busy, canExpandHistory: canExpandHistory, expanded: expanded, showHistoryLabel: showHistoryLabel, hideHistoryLabel: hideHistoryLabel, onToggleExpand: onToggleExpand, onAction: onAction }), expanded ? (_jsx(ResourceRunHistoryList, { items: historyItems, loading: historyLoading, titleLabel: historyTitleLabel, loadingLabel: historyLoadingLabel, emptyLabel: historyEmptyLabel, statusLabel: statusLabel, ...(toneMap ? { toneMap } : {}), ...(onHistoryItemAction ? { onAction: onHistoryItemAction } : {}) })) : null] }));
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=ResourceRowListItem.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ResourceRowItem, ResourceStatusToneMap } from '../../types.js';
|
|
2
|
+
/** Title/meta/detail lines plus the last-run `StatusPill` + label of one `ResourceRowListItem`. */
|
|
3
|
+
export declare function ResourceRowListItemContent({ row, statusLabel, toneMap, }: {
|
|
4
|
+
row: ResourceRowItem;
|
|
5
|
+
statusLabel: (status: string) => string;
|
|
6
|
+
toneMap: ResourceStatusToneMap | undefined;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
/** Always-visible inline action buttons (never a kebab menu, unlike `ResourceCard`) plus the optional history-expand toggle. */
|
|
9
|
+
export declare function ResourceRowListItemActions({ row, busy, canExpandHistory, expanded, showHistoryLabel, hideHistoryLabel, onToggleExpand, onAction, }: {
|
|
10
|
+
row: ResourceRowItem;
|
|
11
|
+
busy: boolean;
|
|
12
|
+
canExpandHistory: boolean;
|
|
13
|
+
expanded: boolean;
|
|
14
|
+
showHistoryLabel: string;
|
|
15
|
+
hideHistoryLabel: string;
|
|
16
|
+
onToggleExpand: () => void;
|
|
17
|
+
onAction: (kind: string) => void;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=ResourceRowListItemParts.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { StatusPill } from './StatusPill.js';
|
|
3
|
+
/** Title/meta/detail lines plus the last-run `StatusPill` + label of one `ResourceRowListItem`. */
|
|
4
|
+
export function ResourceRowListItemContent({ row, statusLabel, toneMap, }) {
|
|
5
|
+
return (_jsxs("div", { className: "resource-row-list-item-content", children: [_jsx("span", { className: "resource-row-list-item-title", children: row.title }), row.metaLine ? _jsx("span", { className: "resource-row-list-item-meta", children: row.metaLine }) : null, row.detailLine ? _jsx("span", { className: "resource-row-list-item-detail", children: row.detailLine }) : null, row.lastRunStatus ? (_jsxs("span", { className: "resource-row-list-item-last-run", children: [_jsx(StatusPill, { status: row.lastRunStatus, label: statusLabel(row.lastRunStatus), ...(toneMap ? { toneMap } : {}) }), row.lastRunLabel ? _jsx("span", { children: row.lastRunLabel }) : null] })) : null] }));
|
|
6
|
+
}
|
|
7
|
+
/** Always-visible inline action buttons (never a kebab menu, unlike `ResourceCard`) plus the optional history-expand toggle. */
|
|
8
|
+
export function ResourceRowListItemActions({ row, busy, canExpandHistory, expanded, showHistoryLabel, hideHistoryLabel, onToggleExpand, onAction, }) {
|
|
9
|
+
return (_jsxs("div", { className: "resource-row-list-item-actions", children: [row.actions.map((action) => (_jsx("button", { type: "button", className: action.danger ? 'danger' : undefined, disabled: busy || action.disabled, onClick: () => onAction(action.kind), children: action.label }, action.kind))), canExpandHistory ? (_jsx("button", { type: "button", "aria-expanded": expanded, onClick: onToggleExpand, children: expanded ? hideHistoryLabel : showHistoryLabel })) : null] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ResourceRowListItemParts.js.map
|
|
@@ -44,5 +44,5 @@ export interface ResourceRowListViewProps {
|
|
|
44
44
|
* list (create-flow and automation-evolution-specific concerns, no
|
|
45
45
|
* DesignsTab analog at all).
|
|
46
46
|
*/
|
|
47
|
-
export declare function ResourceRowListView(
|
|
47
|
+
export declare function ResourceRowListView(props: ResourceRowListViewProps): import("react").JSX.Element;
|
|
48
48
|
//# sourceMappingURL=ResourceRowListView.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { ResourceRowListItem } from './ResourceRowListItem.js';
|
|
2
|
+
import { ResourceRowListAlerts, ResourceRowListEmpty, ResourceRowListHero, ResourceRowListRows } from './ResourceRowListViewParts.js';
|
|
4
3
|
/**
|
|
5
4
|
* Pure composition (props in, JSX out): TasksView's hero header (eyebrow +
|
|
6
5
|
* title + lede + metric tiles + a primary create CTA) followed by the flat
|
|
@@ -11,8 +10,9 @@ import { ResourceRowListItem } from './ResourceRowListItem.js';
|
|
|
11
10
|
* list (create-flow and automation-evolution-specific concerns, no
|
|
12
11
|
* DesignsTab analog at all).
|
|
13
12
|
*/
|
|
14
|
-
export function ResourceRowListView(
|
|
13
|
+
export function ResourceRowListView(props) {
|
|
14
|
+
const { loading, rows, sectionLabel, loadingLabel } = props;
|
|
15
15
|
const isEmpty = !loading && rows.length === 0;
|
|
16
|
-
return (_jsxs("section", { className: "resource-row-list", children: [
|
|
16
|
+
return (_jsxs("section", { className: "resource-row-list", children: [_jsx(ResourceRowListHero, { ...props }), _jsx(ResourceRowListAlerts, { ...props }), _jsxs("section", { className: "resource-row-list-saved", "aria-label": sectionLabel, children: [_jsxs("div", { className: "resource-row-list-section-head", children: [_jsx("h2", { children: sectionLabel }), loading ? _jsx("span", { className: "resource-row-list-section-meta", children: loadingLabel }) : null] }), isEmpty ? _jsx(ResourceRowListEmpty, { ...props }) : rows.length > 0 ? _jsx(ResourceRowListRows, { ...props }) : null] })] }));
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=ResourceRowListView.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResourceRowListViewProps } from './ResourceRowListView.js';
|
|
2
|
+
/** TasksView's hero header: eyebrow + title + lede, the metric tiles, and the primary create CTA (only when there is both a handler and a label). */
|
|
3
|
+
export declare function ResourceRowListHero({ eyebrow, title, lede, metrics, metricsAriaLabel, createLabel, onCreate, }: Pick<ResourceRowListViewProps, 'eyebrow' | 'title' | 'lede' | 'metrics' | 'metricsAriaLabel' | 'createLabel' | 'onCreate'>): import("react").JSX.Element;
|
|
4
|
+
/** The LOAD-failure banner and, independently, the row-action-failure banner (which sits ALONGSIDE the still-visible row list). */
|
|
5
|
+
export declare function ResourceRowListAlerts({ error, errorLabel, actionError, actionErrorLabel, }: Pick<ResourceRowListViewProps, 'error' | 'errorLabel' | 'actionError' | 'actionErrorLabel'>): import("react").JSX.Element;
|
|
6
|
+
/** The empty state — TasksView's own empty state is itself the create button, so it is clickable only when `onCreate` is given. */
|
|
7
|
+
export declare function ResourceRowListEmpty({ emptyTitle, emptyBody, onCreate }: Pick<ResourceRowListViewProps, 'emptyTitle' | 'emptyBody' | 'onCreate'>): import("react").JSX.Element;
|
|
8
|
+
/** The `<ul>` of `ResourceRowListItem`s, binding each row's id into its per-row callbacks and busy/expanded/history-loading state. */
|
|
9
|
+
export declare function ResourceRowListRows({ rows, isRowBusy, statusLabel, toneMap, canExpandHistory, expandedRowId, historyLoadingRowId, historyByRowId, showHistoryLabel, hideHistoryLabel, historyTitleLabel, historyLoadingLabel, historyEmptyLabel, onToggleExpand, onRowAction, onHistoryItemAction, }: Pick<ResourceRowListViewProps, 'rows' | 'isRowBusy' | 'statusLabel' | 'toneMap' | 'canExpandHistory' | 'expandedRowId' | 'historyLoadingRowId' | 'historyByRowId' | 'showHistoryLabel' | 'hideHistoryLabel' | 'historyTitleLabel' | 'historyLoadingLabel' | 'historyEmptyLabel' | 'onToggleExpand' | 'onRowAction' | 'onHistoryItemAction'>): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ResourceRowListViewParts.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ResourceMetrics } from './ResourceMetrics.js';
|
|
3
|
+
import { ResourceRowListItem } from './ResourceRowListItem.js';
|
|
4
|
+
/** TasksView's hero header: eyebrow + title + lede, the metric tiles, and the primary create CTA (only when there is both a handler and a label). */
|
|
5
|
+
export function ResourceRowListHero({ eyebrow, title, lede, metrics, metricsAriaLabel, createLabel, onCreate, }) {
|
|
6
|
+
return (_jsxs("header", { className: "resource-row-list-hero", children: [_jsxs("div", { className: "resource-row-list-hero-copy", children: [eyebrow ? _jsx("span", { className: "resource-row-list-hero-eyebrow", children: eyebrow }) : null, _jsx("h1", { className: "resource-row-list-hero-title", children: title }), lede ? _jsx("p", { className: "resource-row-list-hero-lede", children: lede }) : null] }), _jsxs("div", { className: "resource-row-list-hero-actions", children: [_jsx(ResourceMetrics, { metrics: metrics, ariaLabel: metricsAriaLabel }), onCreate && createLabel ? (_jsx("button", { type: "button", className: "resource-row-list-new", onClick: onCreate, children: createLabel })) : null] })] }));
|
|
7
|
+
}
|
|
8
|
+
/** The LOAD-failure banner and, independently, the row-action-failure banner (which sits ALONGSIDE the still-visible row list). */
|
|
9
|
+
export function ResourceRowListAlerts({ error, errorLabel, actionError, actionErrorLabel, }) {
|
|
10
|
+
return (_jsxs(_Fragment, { children: [error ? (_jsx("div", { className: "resource-row-list-error", role: "alert", children: errorLabel ?? error })) : null, actionError ? (_jsx("div", { className: "resource-row-list-action-error", role: "alert", children: actionErrorLabel ?? actionError })) : null] }));
|
|
11
|
+
}
|
|
12
|
+
/** The empty state — TasksView's own empty state is itself the create button, so it is clickable only when `onCreate` is given. */
|
|
13
|
+
export function ResourceRowListEmpty({ emptyTitle, emptyBody, onCreate }) {
|
|
14
|
+
return onCreate ? (_jsxs("button", { type: "button", className: "resource-row-list-empty", onClick: onCreate, children: [_jsx("strong", { children: emptyTitle }), _jsx("span", { children: emptyBody })] })) : (_jsxs("div", { className: "resource-row-list-empty", children: [_jsx("strong", { children: emptyTitle }), _jsx("span", { children: emptyBody })] }));
|
|
15
|
+
}
|
|
16
|
+
/** The `<ul>` of `ResourceRowListItem`s, binding each row's id into its per-row callbacks and busy/expanded/history-loading state. */
|
|
17
|
+
export function ResourceRowListRows({ rows, isRowBusy, statusLabel, toneMap, canExpandHistory, expandedRowId, historyLoadingRowId, historyByRowId, showHistoryLabel, hideHistoryLabel, historyTitleLabel, historyLoadingLabel, historyEmptyLabel, onToggleExpand, onRowAction, onHistoryItemAction, }) {
|
|
18
|
+
return (_jsx("ul", { className: "resource-row-list-items", children: rows.map((row) => (_jsx(ResourceRowListItem, { row: row, busy: isRowBusy(row.id), statusLabel: statusLabel, ...(toneMap ? { toneMap } : {}), canExpandHistory: canExpandHistory, expanded: expandedRowId === row.id, showHistoryLabel: showHistoryLabel, hideHistoryLabel: hideHistoryLabel, historyItems: historyByRowId[row.id], historyLoading: historyLoadingRowId === row.id, historyTitleLabel: historyTitleLabel, historyLoadingLabel: historyLoadingLabel, historyEmptyLabel: historyEmptyLabel, onToggleExpand: () => onToggleExpand(row.id), onAction: (kind) => onRowAction(row.id, kind), ...(onHistoryItemAction ? { onHistoryItemAction: (historyItemId, kind) => onHistoryItemAction(row.id, historyItemId, kind) } : {}) }, row.id))) }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ResourceRowListViewParts.js.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { useT } from '../../../i18n/index.js';
|
|
2
|
+
import type { ResourceBoardController, UseWiredResourceBoardParams } from '../hooks/useResourceBoard.js';
|
|
3
|
+
import type { ResourceKanbanColumn } from './ResourceKanbanBoard.js';
|
|
4
|
+
import type { ResourceBoardViewProps } from './ResourceBoardView.js';
|
|
5
|
+
import type { ResourceBoardItem, ResourceBoardViewMode, ResourceStatusOption } from '../../types.js';
|
|
6
|
+
type Translate = ReturnType<typeof useT>;
|
|
7
|
+
/** `useWiredResourceBoard` params: the column order comes from `statusOptions`, and each optional setting is forwarded only when the host set it. */
|
|
8
|
+
export declare function resourceBoardHookParams<TItem extends ResourceBoardItem>({ dependencies, statusOptions }: Pick<UseWiredResourceBoardParams<TItem>, 'dependencies'> & {
|
|
9
|
+
statusOptions: ResourceStatusOption[];
|
|
10
|
+
}, { defaultStatus, normalizeStatus, initialSort, storageScopeKey, defaultViewMode, refreshToken, }: {
|
|
11
|
+
defaultStatus?: string | undefined;
|
|
12
|
+
normalizeStatus?: ((status: string) => string) | undefined;
|
|
13
|
+
initialSort?: string | undefined;
|
|
14
|
+
storageScopeKey?: string | undefined;
|
|
15
|
+
defaultViewMode?: ResourceBoardViewMode | undefined;
|
|
16
|
+
refreshToken?: string | number | undefined;
|
|
17
|
+
}): UseWiredResourceBoardParams<TItem>;
|
|
18
|
+
/** One translated kanban column per status option (in order), plus a trailing translated "Other" column only when some item matched no option. */
|
|
19
|
+
export declare function buildKanbanColumns<TItem extends ResourceBoardItem<TBody>, TBody>({ statusOptions, columns, t, }: {
|
|
20
|
+
statusOptions: ResourceStatusOption[];
|
|
21
|
+
columns: Map<string, TItem[]>;
|
|
22
|
+
t: Translate;
|
|
23
|
+
}): ResourceKanbanColumn<TBody>[];
|
|
24
|
+
/**
|
|
25
|
+
* Routes a kebab-menu action: `delete`/`duplicate` run in-hook, `rename`
|
|
26
|
+
* bubbles to `onRenameRequest` with the item's current title, anything else
|
|
27
|
+
* bubbles to `onCustomItemAction` — the menu is closed before either bubble.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createItemActionHandler<TItem extends ResourceBoardItem>({ board }: {
|
|
30
|
+
board: Pick<ResourceBoardController<TItem>, 'remove' | 'duplicate' | 'closeMenu' | 'visibleItems'>;
|
|
31
|
+
}, { onRenameRequest, onCustomItemAction, }: {
|
|
32
|
+
onRenameRequest?: ((id: string, currentTitle: string) => void) | undefined;
|
|
33
|
+
onCustomItemAction?: ((id: string, kind: string) => void) | undefined;
|
|
34
|
+
}): (id: string, kind: string) => void;
|
|
35
|
+
/** The create CTA's props: `createLabel` (defaulting to the translated "New") is only forwarded alongside `onCreate`, since the toolbar renders the button only when it has a handler. */
|
|
36
|
+
export declare function boardCreateProps({ t }: {
|
|
37
|
+
t: Translate;
|
|
38
|
+
}, { createLabel, onCreate }: {
|
|
39
|
+
createLabel?: string | undefined;
|
|
40
|
+
onCreate?: (() => void) | undefined;
|
|
41
|
+
}): Pick<ResourceBoardViewProps, 'createLabel' | 'onCreate'>;
|
|
42
|
+
/** Resolves a status value to its translated option label, falling back to the raw value as the translation key for a status no option covers. */
|
|
43
|
+
export declare function statusLabelFor({ t, statusOptions }: {
|
|
44
|
+
t: Translate;
|
|
45
|
+
statusOptions: ResourceStatusOption[];
|
|
46
|
+
}): (status: string) => string;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=resourceBoardProps.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { UNMATCHED_STATUS_BUCKET } from '../../constants.js';
|
|
2
|
+
/** `useWiredResourceBoard` params: the column order comes from `statusOptions`, and each optional setting is forwarded only when the host set it. */
|
|
3
|
+
export function resourceBoardHookParams({ dependencies, statusOptions }, { defaultStatus, normalizeStatus, initialSort, storageScopeKey, defaultViewMode, refreshToken, }) {
|
|
4
|
+
return {
|
|
5
|
+
dependencies,
|
|
6
|
+
statusOrder: statusOptions.map((option) => option.value),
|
|
7
|
+
...(defaultStatus !== undefined ? { defaultStatus } : {}),
|
|
8
|
+
...(normalizeStatus !== undefined ? { normalizeStatus } : {}),
|
|
9
|
+
...(initialSort !== undefined ? { initialSort } : {}),
|
|
10
|
+
...(storageScopeKey !== undefined ? { storageScopeKey } : {}),
|
|
11
|
+
...(defaultViewMode !== undefined ? { defaultViewMode } : {}),
|
|
12
|
+
...(refreshToken !== undefined ? { refreshToken } : {}),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/** One translated kanban column per status option (in order), plus a trailing translated "Other" column only when some item matched no option. */
|
|
16
|
+
export function buildKanbanColumns({ statusOptions, columns, t, }) {
|
|
17
|
+
const kanbanColumns = statusOptions.map((option) => ({
|
|
18
|
+
status: option.value,
|
|
19
|
+
label: t(option.label),
|
|
20
|
+
// Non-null: `useWiredResourceBoard` (in `ResourceBoard`, via
|
|
21
|
+
// `resourceBoardHookParams` above) is called with `statusOrder:
|
|
22
|
+
// statusOptions.map(option => option.value)`, and `groupItemsByStatus`
|
|
23
|
+
// (rules.ts) always seeds one Map entry per `statusOrder` value before
|
|
24
|
+
// placing any item — so every `option.value` here is guaranteed present.
|
|
25
|
+
items: columns.get(option.value),
|
|
26
|
+
}));
|
|
27
|
+
const unmatched = columns.get(UNMATCHED_STATUS_BUCKET);
|
|
28
|
+
if (unmatched && unmatched.length > 0) {
|
|
29
|
+
kanbanColumns.push({ status: UNMATCHED_STATUS_BUCKET, label: t('Other'), items: unmatched });
|
|
30
|
+
}
|
|
31
|
+
return kanbanColumns;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Routes a kebab-menu action: `delete`/`duplicate` run in-hook, `rename`
|
|
35
|
+
* bubbles to `onRenameRequest` with the item's current title, anything else
|
|
36
|
+
* bubbles to `onCustomItemAction` — the menu is closed before either bubble.
|
|
37
|
+
*/
|
|
38
|
+
export function createItemActionHandler({ board }, { onRenameRequest, onCustomItemAction, }) {
|
|
39
|
+
return (id, kind) => {
|
|
40
|
+
if (kind === 'delete') {
|
|
41
|
+
void board.remove(id);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (kind === 'duplicate') {
|
|
45
|
+
void board.duplicate(id);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (kind === 'rename') {
|
|
49
|
+
board.closeMenu();
|
|
50
|
+
// Non-null: `id` only ever reaches this handler via a menu-action
|
|
51
|
+
// click closure `ResourceBoardView` builds per rendered item (from
|
|
52
|
+
// this SAME render's `board.visibleItems`), so the item is always
|
|
53
|
+
// still present in the array at lookup time.
|
|
54
|
+
const current = board.visibleItems.find((item) => item.id === id);
|
|
55
|
+
onRenameRequest?.(id, current.title);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
board.closeMenu();
|
|
59
|
+
onCustomItemAction?.(id, kind);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** The create CTA's props: `createLabel` (defaulting to the translated "New") is only forwarded alongside `onCreate`, since the toolbar renders the button only when it has a handler. */
|
|
63
|
+
export function boardCreateProps({ t }, { createLabel, onCreate }) {
|
|
64
|
+
return onCreate ? { createLabel: createLabel ?? t('New'), onCreate } : {};
|
|
65
|
+
}
|
|
66
|
+
/** Resolves a status value to its translated option label, falling back to the raw value as the translation key for a status no option covers. */
|
|
67
|
+
export function statusLabelFor({ t, statusOptions }) {
|
|
68
|
+
return (status) => t(statusOptions.find((option) => option.value === status)?.label ?? status);
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=resourceBoardProps.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { useT } from '../../../i18n/index.js';
|
|
2
|
+
import type { ResourceRowListViewProps } from './ResourceRowListView.js';
|
|
3
|
+
type Translate = ReturnType<typeof useT>;
|
|
4
|
+
/**
|
|
5
|
+
* The optional hero-header props `ResourceRowList` hands `ResourceRowListView`.
|
|
6
|
+
* `createLabel` (defaulting to the translated "New") is only forwarded
|
|
7
|
+
* alongside `onCreate`: the view renders the create CTA only when it has a
|
|
8
|
+
* handler to call, so a label with no handler would be dead weight.
|
|
9
|
+
*/
|
|
10
|
+
export declare function rowListHeaderProps({ t }: {
|
|
11
|
+
t: Translate;
|
|
12
|
+
}, { eyebrow, lede, createLabel, onCreate }: {
|
|
13
|
+
eyebrow?: string | undefined;
|
|
14
|
+
lede?: string | undefined;
|
|
15
|
+
createLabel?: string | undefined;
|
|
16
|
+
onCreate?: (() => void) | undefined;
|
|
17
|
+
}): Pick<ResourceRowListViewProps, 'eyebrow' | 'lede' | 'createLabel' | 'onCreate'>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=resourceRowListProps.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The optional hero-header props `ResourceRowList` hands `ResourceRowListView`.
|
|
3
|
+
* `createLabel` (defaulting to the translated "New") is only forwarded
|
|
4
|
+
* alongside `onCreate`: the view renders the create CTA only when it has a
|
|
5
|
+
* handler to call, so a label with no handler would be dead weight.
|
|
6
|
+
*/
|
|
7
|
+
export function rowListHeaderProps({ t }, { eyebrow, lede, createLabel, onCreate }) {
|
|
8
|
+
return {
|
|
9
|
+
...(eyebrow !== undefined ? { eyebrow } : {}),
|
|
10
|
+
...(lede !== undefined ? { lede } : {}),
|
|
11
|
+
...(onCreate ? { createLabel: createLabel ?? t('New'), onCreate } : {}),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=resourceRowListProps.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { useT } from '../../../i18n/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Translated labels for a view's LOAD failure (`error`) and its per-item
|
|
4
|
+
* action failure (`actionError`), each forwarded only while that error is
|
|
5
|
+
* set — shared by `ResourceBoard` and `ResourceRowList`, whose views both
|
|
6
|
+
* fall back to the raw error string when no label is given.
|
|
7
|
+
*/
|
|
8
|
+
export declare function translatedErrorLabelProps({ t, error, actionError, }: {
|
|
9
|
+
t: ReturnType<typeof useT>;
|
|
10
|
+
error: string | null;
|
|
11
|
+
actionError: string | null;
|
|
12
|
+
}): {
|
|
13
|
+
errorLabel?: string;
|
|
14
|
+
actionErrorLabel?: string;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=translatedErrorLabelProps.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translated labels for a view's LOAD failure (`error`) and its per-item
|
|
3
|
+
* action failure (`actionError`), each forwarded only while that error is
|
|
4
|
+
* set — shared by `ResourceBoard` and `ResourceRowList`, whose views both
|
|
5
|
+
* fall back to the raw error string when no label is given.
|
|
6
|
+
*/
|
|
7
|
+
export function translatedErrorLabelProps({ t, error, actionError, }) {
|
|
8
|
+
return {
|
|
9
|
+
...(error ? { errorLabel: t(error) } : {}),
|
|
10
|
+
...(actionError ? { actionErrorLabel: t(actionError) } : {}),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=translatedErrorLabelProps.js.map
|
|
@@ -46,14 +46,8 @@ export function groupItemsByStatus(items, statusOrder, options) {
|
|
|
46
46
|
const unmatched = [];
|
|
47
47
|
for (const item of items) {
|
|
48
48
|
const raw = item.status ?? fallback;
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
if (bucket) {
|
|
52
|
-
bucket.push(item);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
unmatched.push(item);
|
|
56
|
-
}
|
|
49
|
+
const bucket = raw === undefined ? undefined : columns.get(normalize(raw));
|
|
50
|
+
(bucket ?? unmatched).push(item);
|
|
57
51
|
}
|
|
58
52
|
if (unmatched.length > 0)
|
|
59
53
|
columns.set(UNMATCHED_STATUS_BUCKET, unmatched);
|