@declarion/react 0.142.0 → 0.147.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{Icons-Dzl-AkD_.d.ts → Icons-BdXCxyw3.d.ts} +0 -4
- package/dist-lib/api/access-expiry.js +1 -2
- package/dist-lib/api/agents.js +1 -2
- package/dist-lib/api/audience.js +1 -2
- package/dist-lib/api/auth-redirect.js +1 -2
- package/dist-lib/api/auth.js +1 -2
- package/dist-lib/api/batch.js +1 -2
- package/dist-lib/api/client.js +27 -28
- package/dist-lib/api/data.js +23 -24
- package/dist-lib/api/entities.js +36 -37
- package/dist-lib/api/events.js +6 -7
- package/dist-lib/api/fileReferences.js +1 -2
- package/dist-lib/api/params.js +1 -2
- package/dist-lib/api/properties.js +1 -2
- package/dist-lib/api/request-bounds.js +1 -2
- package/dist-lib/api/schema.js +5 -6
- package/dist-lib/api/session-renewal.js +6 -7
- package/dist-lib/api/status.js +1 -2
- package/dist-lib/app.js +154 -155
- package/dist-lib/components/actions/ActionButton.js +32 -33
- package/dist-lib/components/actions/ActionDialog.js +85 -86
- package/dist-lib/components/actions/ActionResultDialog.impl.js +48 -49
- package/dist-lib/components/actions/ActionResultDialog.js +1 -2
- package/dist-lib/components/actions/ActionRunner.js +96 -97
- package/dist-lib/components/actions/ObjectActionBar.js +49 -50
- package/dist-lib/components/actions/PropertyGridEditor.js +50 -51
- package/dist-lib/components/actions/ResponsiveActionBar.js +127 -128
- package/dist-lib/components/actions/RowActionsKebab.js +27 -28
- package/dist-lib/components/agents/AgentChatPanel.impl.js +317 -318
- package/dist-lib/components/agents/AgentChatPanel.js +1 -2
- package/dist-lib/components/agents/AgentConversationDrawer.js +6 -7
- package/dist-lib/components/agents/AgentElicitForm.js +13 -14
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +1 -2
- package/dist-lib/components/agents/AgentOpenFollower.js +1 -2
- package/dist-lib/components/agents/AgentPicker.js +1 -2
- package/dist-lib/components/agents/ChatAttachments.js +22 -23
- package/dist-lib/components/agents/transcript-runs.js +1 -2
- package/dist-lib/components/chrome/AssociationTabs.js +44 -45
- package/dist-lib/components/chrome/AuditMetaStrip.js +1 -2
- package/dist-lib/components/chrome/Breadcrumbs.js +1 -2
- package/dist-lib/components/chrome/HighlightsStrip.js +1 -2
- package/dist-lib/components/chrome/PageHeader.js +12 -13
- package/dist-lib/components/chrome/PageShell.js +1 -2
- package/dist-lib/components/chrome/RecordHeader.js +1 -2
- package/dist-lib/components/chrome/headerActionZone.js +0 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +463 -464
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +43 -44
- package/dist-lib/components/detail-layout/ChildrenBlock.js +24 -25
- package/dist-lib/components/detail-layout/ChildrenCards.js +29 -30
- package/dist-lib/components/detail-layout/ChildrenList.js +23 -24
- package/dist-lib/components/detail-layout/ChildrenTable.js +50 -51
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +164 -165
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +14 -15
- package/dist-lib/components/detail-layout/DetailHighlights.js +23 -24
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +76 -77
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +90 -91
- package/dist-lib/components/detail-layout/ErrorSummary.js +7 -8
- package/dist-lib/components/detail-layout/EvidenceBlock.js +15 -16
- package/dist-lib/components/detail-layout/FieldRow.js +11 -12
- package/dist-lib/components/detail-layout/FieldsBlock.js +31 -32
- package/dist-lib/components/detail-layout/LayoutColumn.js +1 -2
- package/dist-lib/components/detail-layout/LayoutRenderer.js +11 -12
- package/dist-lib/components/detail-layout/LayoutRow.js +1 -2
- package/dist-lib/components/detail-layout/LayoutTabs.js +23 -24
- package/dist-lib/components/detail-layout/PropertiesBlock.js +38 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +28 -29
- package/dist-lib/components/detail-layout/SectionBlock.js +9 -10
- package/dist-lib/components/detail-layout/StatusesBlock.js +1 -2
- package/dist-lib/components/detail-layout/TimelineComposer.js +19 -20
- package/dist-lib/components/detail-layout/blockMeta.js +1 -2
- package/dist-lib/components/detail-layout/useManualColumnResize.js +1 -2
- package/dist-lib/components/detail-layout/useQuickAdd.js +21 -22
- package/dist-lib/components/detail-layout/visibility.js +1 -2
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +25 -26
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +18 -19
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +10 -11
- package/dist-lib/components/detail-layout/widgets/builtins.js +1 -2
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +1 -2
- package/dist-lib/components/detail-layout/widgets/registry.js +1 -2
- package/dist-lib/components/fields/BoolField.js +1 -2
- package/dist-lib/components/fields/EmailField.js +5 -6
- package/dist-lib/components/fields/EnumField.js +7 -8
- package/dist-lib/components/fields/FileReferenceField.js +18 -19
- package/dist-lib/components/fields/IntArrayField.js +11 -12
- package/dist-lib/components/fields/JsonEditor.js +1 -2
- package/dist-lib/components/fields/JsonField.js +1 -2
- package/dist-lib/components/fields/MultilangArrayField.js +22 -23
- package/dist-lib/components/fields/MultilangField.js +13 -14
- package/dist-lib/components/fields/MultilangTextField.js +13 -14
- package/dist-lib/components/fields/NumberField.js +5 -6
- package/dist-lib/components/fields/PasswordField.js +1 -2
- package/dist-lib/components/fields/PhoneField.js +24 -25
- package/dist-lib/components/fields/RefCombobox.js +42 -43
- package/dist-lib/components/fields/RefField.js +14 -15
- package/dist-lib/components/fields/RichTextField.js +29 -30
- package/dist-lib/components/fields/SecretField.js +1 -2
- package/dist-lib/components/fields/StringArrayField.js +29 -30
- package/dist-lib/components/fields/StringField.js +12 -13
- package/dist-lib/components/fields/StructureField.js +60 -61
- package/dist-lib/components/fields/TextField.js +18 -19
- package/dist-lib/components/fields/TimestampField.js +17 -18
- package/dist-lib/components/fields/UrlField.js +5 -6
- package/dist-lib/components/fields/cells/factories/badge.js +5 -6
- package/dist-lib/components/fields/cells/factories/boolPill.js +1 -2
- package/dist-lib/components/fields/cells/factories/code.js +1 -2
- package/dist-lib/components/fields/cells/factories/date.js +1 -2
- package/dist-lib/components/fields/cells/factories/email.js +1 -2
- package/dist-lib/components/fields/cells/factories/emptyCell.js +0 -1
- package/dist-lib/components/fields/cells/factories/fileReference.js +1 -2
- package/dist-lib/components/fields/cells/factories/host-icons.js +1 -2
- package/dist-lib/components/fields/cells/factories/json.js +1 -2
- package/dist-lib/components/fields/cells/factories/link.js +10 -11
- package/dist-lib/components/fields/cells/factories/markdown.js +14 -15
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +1 -2
- package/dist-lib/components/fields/cells/factories/money.js +1 -2
- package/dist-lib/components/fields/cells/factories/multilangInline.js +1 -2
- package/dist-lib/components/fields/cells/factories/nextRun.js +8 -9
- package/dist-lib/components/fields/cells/factories/number.js +1 -2
- package/dist-lib/components/fields/cells/factories/passwordMask.js +1 -2
- package/dist-lib/components/fields/cells/factories/phone.js +1 -2
- package/dist-lib/components/fields/cells/factories/refLink.js +13 -14
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +16 -17
- package/dist-lib/components/fields/cells/factories/statusPill.js +5 -6
- package/dist-lib/components/fields/cells/factories/tagList.js +6 -7
- package/dist-lib/components/fields/cells/factories/text.js +1 -2
- package/dist-lib/components/fields/cells/factories/timestamp.js +1 -2
- package/dist-lib/components/fields/cells/factories/url-helpers.js +1 -2
- package/dist-lib/components/fields/cells/factories/url.js +13 -14
- package/dist-lib/components/fields/cells/registry.js +1 -2
- package/dist-lib/components/fields/index.js +19 -20
- package/dist-lib/components/fields/langMap.js +1 -2
- package/dist-lib/components/fields/secretValue.js +1 -2
- package/dist-lib/components/file-widgets/CircleImage.js +1 -2
- package/dist-lib/components/file-widgets/DocumentCard.js +101 -102
- package/dist-lib/components/file-widgets/FileList.js +35 -36
- package/dist-lib/components/file-widgets/Grid.js +119 -120
- package/dist-lib/components/file-widgets/GridLazy.js +1 -2
- package/dist-lib/components/file-widgets/ImageWidget.js +189 -190
- package/dist-lib/components/file-widgets/LabeledSlots.js +14 -15
- package/dist-lib/components/file-widgets/SquareImage.js +1 -2
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +1 -2
- package/dist-lib/components/file-widgets/UploadFailureText.js +1 -2
- package/dist-lib/components/file-widgets/WideBanner.js +1 -2
- package/dist-lib/components/file-widgets/builtins.js +1 -2
- package/dist-lib/components/file-widgets/cropper.js +1 -2
- package/dist-lib/components/file-widgets/draft-scope.js +1 -2
- package/dist-lib/components/file-widgets/helpers.js +1 -2
- package/dist-lib/components/file-widgets/host.js +33 -34
- package/dist-lib/components/file-widgets/payload.js +1 -2
- package/dist-lib/components/file-widgets/registry.js +1 -2
- package/dist-lib/components/file-widgets/upload.js +41 -42
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +12 -13
- package/dist-lib/components/file-widgets/useFileSelection.js +1 -2
- package/dist-lib/components/file-widgets/value.js +1 -2
- package/dist-lib/components/filters/FilterChips.js +15 -16
- package/dist-lib/components/filters/FilterConditionValue.js +15 -16
- package/dist-lib/components/filters/FilterDrawer.js +141 -142
- package/dist-lib/components/filters/FilterOmittedNotice.js +1 -2
- package/dist-lib/components/filters/filter-op-label.js +1 -2
- package/dist-lib/components/layout/CommandPalette.impl.js +24 -25
- package/dist-lib/components/layout/CommandPalette.js +1 -2
- package/dist-lib/components/layout/DirtyTabsCloseDialog.impl.js +15 -16
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +1 -2
- package/dist-lib/components/layout/ImpersonationBanner.impl.js +6 -7
- package/dist-lib/components/layout/ImpersonationBanner.js +1 -2
- package/dist-lib/components/layout/ImpersonationFrame.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.impl.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.js +1 -2
- package/dist-lib/components/layout/Layout.js +132 -140
- package/dist-lib/components/layout/Rail.js +11 -12
- package/dist-lib/components/layout/Sidebar.js +60 -61
- package/dist-lib/components/layout/TabStrip.js +66 -67
- package/dist-lib/components/layout/TenantChip.js +21 -22
- package/dist-lib/components/layout/TopBar.js +89 -90
- package/dist-lib/components/layout/tab-close.js +1 -2
- package/dist-lib/components/list/ColumnPicker.js +35 -36
- package/dist-lib/components/list/InlineEditCell.js +22 -23
- package/dist-lib/components/list/PeekFieldCell.js +7 -8
- package/dist-lib/components/list/QuickPeek.js +29 -30
- package/dist-lib/components/list/ViewSwitcher.js +44 -45
- package/dist-lib/components/list/peekDraftStore.js +1 -2
- package/dist-lib/components/pages/AdminCatalogPage.impl.js +59 -60
- package/dist-lib/components/pages/AdminCatalogPage.js +1 -2
- package/dist-lib/components/pages/DocumentsMenu.js +53 -54
- package/dist-lib/components/pages/ExportMenu.js +37 -38
- package/dist-lib/components/pages/NoScreensPage.impl.js +5 -6
- package/dist-lib/components/pages/NoScreensPage.js +1 -2
- package/dist-lib/components/pages/NotFoundPage.impl.js +7 -8
- package/dist-lib/components/pages/NotFoundPage.js +1 -2
- package/dist-lib/components/pages/RecordDocumentsPanel.js +40 -41
- package/dist-lib/components/pages/RecordNotesPanel.js +43 -44
- package/dist-lib/components/pages/RecordPanels.js +1 -2
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +6 -7
- package/dist-lib/components/pages/SSOCallbackPage.js +1 -2
- package/dist-lib/components/pages/SmartDetailPage.impl.js +501 -502
- package/dist-lib/components/pages/SmartDetailPage.js +1 -2
- package/dist-lib/components/pages/SmartListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartListPage.js +1 -2
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartRecordListPage.js +1 -2
- package/dist-lib/components/pages/auth/AuthShell.js +14 -15
- package/dist-lib/components/pages/auth/CodeInput.js +0 -1
- package/dist-lib/components/pages/auth/Forgot.impl.js +12 -13
- package/dist-lib/components/pages/auth/Forgot.js +1 -2
- package/dist-lib/components/pages/auth/Reset.impl.js +20 -21
- package/dist-lib/components/pages/auth/Reset.js +1 -2
- package/dist-lib/components/pages/auth/SignIn.js +44 -45
- package/dist-lib/components/pages/auth/SignUp.impl.js +35 -36
- package/dist-lib/components/pages/auth/SignUp.js +1 -2
- package/dist-lib/components/pages/auth/SignUpCode.js +17 -18
- package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -10
- package/dist-lib/components/pages/auth/TwoFA.js +1 -2
- package/dist-lib/components/pages/auth/icons.js +1 -2
- package/dist-lib/components/pages/exportRequest.js +1 -2
- package/dist-lib/components/pages/list/DataCell.js +1 -2
- package/dist-lib/components/pages/list/DeleteViewDialog.js +5 -6
- package/dist-lib/components/pages/list/ListCardRow.js +53 -54
- package/dist-lib/components/pages/list/ListCardsBody.js +1 -2
- package/dist-lib/components/pages/list/ListFloatbar.js +25 -26
- package/dist-lib/components/pages/list/ListFooter.js +17 -18
- package/dist-lib/components/pages/list/ListHeader.js +31 -32
- package/dist-lib/components/pages/list/ListNoRows.js +32 -33
- package/dist-lib/components/pages/list/ListTable.js +29 -30
- package/dist-lib/components/pages/list/ListTableRow.js +1 -2
- package/dist-lib/components/pages/list/ListToolbar.js +58 -59
- package/dist-lib/components/pages/list/ListUrlBanner.js +1 -2
- package/dist-lib/components/pages/list/RowActionsCell.js +6 -7
- package/dist-lib/components/pages/list/RowContextMenu.js +1 -2
- package/dist-lib/components/pages/list/SaveViewDialog.js +5 -6
- package/dist-lib/components/pages/list/SortHeaderMenu.js +25 -26
- package/dist-lib/components/pages/list/cardProjection.js +16 -17
- package/dist-lib/components/pages/list/column-sizing.js +1 -2
- package/dist-lib/components/pages/list/columns.js +74 -75
- package/dist-lib/components/pages/list/filter-meta.js +1 -2
- package/dist-lib/components/pages/list/page-size.js +1 -2
- package/dist-lib/components/pages/list/sortable-header.js +1 -2
- package/dist-lib/components/pages/list/table-features.js +1 -2
- package/dist-lib/components/pages/list/use-filter-value-labels.js +15 -16
- package/dist-lib/components/pages/list/useActiveView.js +1 -2
- package/dist-lib/components/pages/list/useHeaderReorder.js +1 -2
- package/dist-lib/components/pages/list/useListColumnLayout.js +6 -7
- package/dist-lib/components/pages/list/useListFilterPresentation.js +1 -2
- package/dist-lib/components/pages/list/useListQuery.js +1 -2
- package/dist-lib/components/pages/list/useListRowInteraction.js +37 -38
- package/dist-lib/components/pages/list/useListSelection.js +16 -17
- package/dist-lib/components/pages/list/useListSort.js +1 -2
- package/dist-lib/components/pages/list/useListViews.js +31 -32
- package/dist-lib/components/pages/list/useRowMenu.js +20 -21
- package/dist-lib/components/pages/list/visible-filters.js +1 -2
- package/dist-lib/components/pages/profile/Preferences.impl.js +44 -45
- package/dist-lib/components/pages/profile/Preferences.js +1 -2
- package/dist-lib/components/pages/profile/Profile.impl.js +223 -224
- package/dist-lib/components/pages/profile/Profile.js +1 -2
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +133 -134
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +1 -2
- package/dist-lib/components/params/ParamsBlock.js +30 -31
- package/dist-lib/components/params/param-editors.js +58 -59
- package/dist-lib/components/primitives/Avatar.js +1 -2
- package/dist-lib/components/primitives/BoolToggle.js +1 -2
- package/dist-lib/components/primitives/BrandGlyph.js +1 -2
- package/dist-lib/components/primitives/BrandLogo.js +1 -2
- package/dist-lib/components/primitives/Btn.js +1 -2
- package/dist-lib/components/primitives/Check.js +1 -2
- package/dist-lib/components/primitives/Chip.js +1 -2
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +1 -2
- package/dist-lib/components/primitives/Dropdown.js +2 -3
- package/dist-lib/components/primitives/Fields.js +128 -129
- package/dist-lib/components/primitives/HoverCard.js +2 -3
- package/dist-lib/components/primitives/IconBtn.js +1 -2
- package/dist-lib/components/primitives/Icons.js +1 -2
- package/dist-lib/components/primitives/Kbd.js +1 -2
- package/dist-lib/components/primitives/MenuItem.js +1 -2
- package/dist-lib/components/primitives/Pill.js +1 -2
- package/dist-lib/components/primitives/RecordIdBadge.js +1 -2
- package/dist-lib/components/primitives/RetryButton.js +5 -6
- package/dist-lib/components/primitives/RowField.js +1 -2
- package/dist-lib/components/primitives/SectionCard.js +1 -2
- package/dist-lib/components/primitives/Spinner.js +1 -2
- package/dist-lib/components/primitives/StatTile.js +1 -2
- package/dist-lib/components/primitives/Tooltip.js +1 -2
- package/dist-lib/components/primitives/dataTableStyles.js +1 -2
- package/dist-lib/components/shared/BlankScreen.js +1 -2
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +20 -21
- package/dist-lib/components/shared/ChangePasswordDialog.js +1 -2
- package/dist-lib/components/shared/ConfirmDialog.js +7 -8
- package/dist-lib/components/shared/ConnectionNotice.js +1 -2
- package/dist-lib/components/shared/CopyButton.js +1 -2
- package/dist-lib/components/shared/DynamicIcon.js +1 -2
- package/dist-lib/components/shared/EmptyState.js +1 -2
- package/dist-lib/components/shared/ErrorBoundary.js +10 -11
- package/dist-lib/components/shared/LoadingSkeleton.js +1 -2
- package/dist-lib/components/shared/LucideIcon.js +1 -2
- package/dist-lib/components/shared/Markdown.js +1 -2
- package/dist-lib/components/shared/MarkdownRenderer.js +22 -23
- package/dist-lib/components/shared/ModalFrame.js +1 -2
- package/dist-lib/components/shared/RefreshControl.js +6 -7
- package/dist-lib/components/shared/StatusGroupsDisplay.js +16 -17
- package/dist-lib/components/shared/StatusStepper.js +1 -2
- package/dist-lib/components/shared/toast/DeclarionToast.js +1 -2
- package/dist-lib/components/shared/useOwnRefresh.js +1 -2
- package/dist-lib/embed/EmbedAuthBootstrap.js +30 -31
- package/dist-lib/embed/EmbedContext.js +1 -2
- package/dist-lib/embed/EmbedDirtyReporter.js +6 -7
- package/dist-lib/embed/EmbedHistoryTracker.js +1 -2
- package/dist-lib/embed/EmbedLocationReporter.js +11 -12
- package/dist-lib/embed/EmbedResizeReporter.js +9 -10
- package/dist-lib/embed/EmbedUnsavedGuard.js +5 -6
- package/dist-lib/embed/embed-dirty.js +1 -2
- package/dist-lib/embed/embed-history.js +1 -2
- package/dist-lib/embed/embed-nav-guard.js +1 -2
- package/dist-lib/embed/file-src.js +12 -13
- package/dist-lib/embed/handshake.js +1 -2
- package/dist-lib/embed/params.js +1 -2
- package/dist-lib/embed/protocol.js +1 -2
- package/dist-lib/embed/screen-location.js +1 -2
- package/dist-lib/embed/theme.js +1 -2
- package/dist-lib/embed/token.js +1 -2
- package/dist-lib/embed/useEmbedNavigate.js +25 -26
- package/dist-lib/embed/useGlobalLinkInterceptor.js +9 -10
- package/dist-lib/hooks/useActionData.js +1 -2
- package/dist-lib/hooks/useActiveTabFollowsRoute.js +7 -8
- package/dist-lib/hooks/useAgentConversation.js +122 -123
- package/dist-lib/hooks/useAggregate.js +1 -2
- package/dist-lib/hooks/useAllEntityData.js +9 -10
- package/dist-lib/hooks/useAssociatedData.js +1 -2
- package/dist-lib/hooks/useAuth.js +26 -27
- package/dist-lib/hooks/useBranding.js +1 -2
- package/dist-lib/hooks/useBrandingChrome.js +16 -17
- package/dist-lib/hooks/useChildrenData.js +4 -5
- package/dist-lib/hooks/useColumns.js +1 -2
- package/dist-lib/hooks/useConnectionNotice.js +16 -17
- package/dist-lib/hooks/useCurrentLocation.js +1 -2
- package/dist-lib/hooks/useCurrentScreen.js +1 -2
- package/dist-lib/hooks/useCursorEntityData.js +1 -2
- package/dist-lib/hooks/useDebounce.js +1 -2
- package/dist-lib/hooks/useDisplayTimeZone.js +4 -5
- package/dist-lib/hooks/useDocumentTitle.js +5 -6
- package/dist-lib/hooks/useEntity.js +1 -2
- package/dist-lib/hooks/useEntityData.js +1 -2
- package/dist-lib/hooks/useFileReferenceJSON.js +9 -10
- package/dist-lib/hooks/useFilters.js +5 -6
- package/dist-lib/hooks/useFollowAgentOpen.js +40 -41
- package/dist-lib/hooks/useImpersonation.js +15 -16
- package/dist-lib/hooks/useIntentPrefetch.js +6 -7
- package/dist-lib/hooks/useJsonSnapshot.js +1 -2
- package/dist-lib/hooks/useLanguage.js +11 -12
- package/dist-lib/hooks/useLiveObject.js +6 -7
- package/dist-lib/hooks/useLongPress.js +1 -2
- package/dist-lib/hooks/useMutations.js +31 -32
- package/dist-lib/hooks/useObject.js +1 -2
- package/dist-lib/hooks/useObjectStatus.js +4 -5
- package/dist-lib/hooks/usePageState.js +9 -10
- package/dist-lib/hooks/usePageStateRuntime.js +16 -17
- package/dist-lib/hooks/usePageStateTtl.js +1 -2
- package/dist-lib/hooks/useParams.js +58 -59
- package/dist-lib/hooks/useProperties.js +5 -6
- package/dist-lib/hooks/useRealtimeThresholds.js +4 -5
- package/dist-lib/hooks/useRefRecords.js +31 -32
- package/dist-lib/hooks/useRegisterScreenTab.js +12 -13
- package/dist-lib/hooks/useResponsiveMode.js +1 -2
- package/dist-lib/hooks/useRowTenant.js +1 -2
- package/dist-lib/hooks/useSSE.js +100 -101
- package/dist-lib/hooks/useSchema.js +16 -17
- package/dist-lib/hooks/useScreen.js +1 -2
- package/dist-lib/hooks/useScreenBack.js +17 -18
- package/dist-lib/hooks/useScreenTab.js +1 -2
- package/dist-lib/hooks/useTabNavigate.js +25 -26
- package/dist-lib/hooks/useTabSearchMirror.js +6 -7
- package/dist-lib/hooks/useTabTitle.js +10 -11
- package/dist-lib/hooks/useText.js +6 -7
- package/dist-lib/hooks/useTimelineData.js +5 -6
- package/dist-lib/hooks/useUiPreferences.js +31 -32
- package/dist-lib/hooks/useUnsavedInput.js +1 -2
- package/dist-lib/hooks/useVersionWatcher.js +16 -17
- package/dist-lib/hooks/useViews.js +16 -17
- package/dist-lib/hooks/useWindowConversation.js +1 -2
- package/dist-lib/{icon-registry-CUT4eF63.d.ts → icon-registry-BY2tt-GF.d.ts} +0 -2
- package/dist-lib/icons.d.ts +2 -4
- package/dist-lib/icons.js +5 -5
- package/dist-lib/index.d.ts +4 -272
- package/dist-lib/index.js +129 -129
- package/dist-lib/lib/action-dispatch.js +1 -2
- package/dist-lib/lib/actions.js +26 -27
- package/dist-lib/lib/anchor.js +1 -2
- package/dist-lib/lib/brand-tokens.js +1 -2
- package/dist-lib/lib/branding.js +1 -2
- package/dist-lib/lib/canonical-url.js +1 -2
- package/dist-lib/lib/capabilityPrefetch.js +1 -2
- package/dist-lib/lib/child-config.js +1 -2
- package/dist-lib/lib/children-validation.js +2 -3
- package/dist-lib/lib/date-text.js +1 -2
- package/dist-lib/lib/decimal-text.js +1 -2
- package/dist-lib/lib/display-value.js +1 -2
- package/dist-lib/lib/document-templates.js +1 -2
- package/dist-lib/lib/download.js +13 -14
- package/dist-lib/lib/evidence-verdict.js +1 -2
- package/dist-lib/lib/failure.js +4 -5
- package/dist-lib/lib/field-classification.js +1 -2
- package/dist-lib/lib/field-regions.js +1 -2
- package/dist-lib/lib/filter-evaluator.js +1 -2
- package/dist-lib/lib/filters.js +1 -2
- package/dist-lib/lib/format-count.js +1 -2
- package/dist-lib/lib/html-state.js +1 -2
- package/dist-lib/lib/language.js +1 -2
- package/dist-lib/lib/longPressGesture.js +0 -1
- package/dist-lib/lib/mass-edit.js +1 -2
- package/dist-lib/lib/money-text.js +1 -2
- package/dist-lib/lib/number-text.js +1 -2
- package/dist-lib/lib/page-inset.js +1 -2
- package/dist-lib/lib/phone.js +1 -2
- package/dist-lib/lib/profile.js +1 -2
- package/dist-lib/lib/query-retry.js +1 -2
- package/dist-lib/lib/quick-add.js +1 -2
- package/dist-lib/lib/read-display-state.js +1 -2
- package/dist-lib/lib/realtime-query-keys.js +2 -3
- package/dist-lib/lib/realtime-reconcile.js +32 -33
- package/dist-lib/lib/realtime-resync.js +40 -41
- package/dist-lib/lib/record-documents-key.js +1 -2
- package/dist-lib/lib/ref-choices.js +1 -2
- package/dist-lib/lib/refetch-when-idle.js +1 -2
- package/dist-lib/lib/rich-text.js +1 -2
- package/dist-lib/lib/role-label.js +1 -2
- package/dist-lib/lib/rowClickGesture.js +1 -2
- package/dist-lib/lib/safe-url.js +1 -2
- package/dist-lib/lib/schema-routing.js +1 -2
- package/dist-lib/lib/screen-back.js +1 -2
- package/dist-lib/lib/scroll-restoration.js +21 -22
- package/dist-lib/lib/shortcut.js +1 -2
- package/dist-lib/lib/size-value.js +1 -2
- package/dist-lib/lib/sort.js +1 -2
- package/dist-lib/lib/timestamp.js +1 -2
- package/dist-lib/lib/toast.js +1 -2
- package/dist-lib/lib/ui-actions.js +43 -44
- package/dist-lib/lib/utils.js +1 -2
- package/dist-lib/lib/variants.js +1 -2
- package/dist-lib/lib/versionTracker.js +26 -27
- package/dist-lib/lib/viewport-category.js +1 -2
- package/dist-lib/lib/window-election.js +1 -2
- package/dist-lib/stores/auth.js +32 -33
- package/dist-lib/stores/icon-registry.js +1 -2
- package/dist-lib/stores/list-layout.js +0 -1
- package/dist-lib/stores/page-state.js +1 -2
- package/dist-lib/stores/preferences.js +1 -2
- package/dist-lib/stores/realtime.js +1 -2
- package/dist-lib/stores/screen-registry.js +1 -2
- package/dist-lib/stores/tabs.js +1 -2
- package/dist-lib/test/seed-schema.js +4 -5
- package/dist-lib/testing.d.ts +2 -4
- package/dist-lib/testing.js +49 -50
- package/dist-lib/types/api.js +1 -2
- package/dist-lib/types/fieldType.js +1 -2
- package/dist-lib/types/ordmap.js +1 -2
- package/dist-lib/types/schema.js +1 -2
- package/dist-lib/{useResponsiveMode-C4MeAgoS.d.ts → useResponsiveMode-BElw02Gh.d.ts} +1 -19
- package/dist-lib/vite/index.d.ts +0 -2
- package/dist-lib/vite/index.js +1 -2
- package/package.json +11 -11
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { Icon as e } from "../primitives/Icons.js";
|
|
2
|
+
import { Select as t, TextInput as n } from "../primitives/Fields.js";
|
|
3
|
+
import { useEntity as r } from "../../hooks/useEntity.js";
|
|
4
|
+
import { useEntityData as i } from "../../hooks/useEntityData.js";
|
|
5
|
+
import { refChoicesEntity as a } from "../../lib/ref-choices.js";
|
|
6
|
+
import { DISPLAY_KEY as o, fieldDisplayName as s } from "../../types/schema.js";
|
|
7
|
+
import { coerceDisplayString as c } from "../../lib/display-value.js";
|
|
8
|
+
import { useText as l } from "../../hooks/useText.js";
|
|
9
9
|
import { useMemo as u } from "react";
|
|
10
10
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
-
|
|
12
|
-
function p({ entity:
|
|
13
|
-
let g =
|
|
11
|
+
// src/components/detail-layout/AssociatedToolbar.tsx
|
|
12
|
+
function p({ entity: r, searchable: i, filterFields: a, searchValue: o, onSearchChange: c, filters: u, onFilterChange: p, allEntities: h }) {
|
|
13
|
+
let g = l(), _ = i === !0, v = a && a.length > 0;
|
|
14
14
|
return !_ && !v ? null : /* @__PURE__ */ f("div", {
|
|
15
15
|
style: {
|
|
16
16
|
display: "flex",
|
|
@@ -23,65 +23,64 @@ function p({ entity: e, searchable: t, filterFields: s, searchValue: c, onSearch
|
|
|
23
23
|
flex: 1,
|
|
24
24
|
maxWidth: 220
|
|
25
25
|
},
|
|
26
|
-
children: /* @__PURE__ */ d(
|
|
27
|
-
value:
|
|
28
|
-
onChange:
|
|
26
|
+
children: /* @__PURE__ */ d(n, {
|
|
27
|
+
value: o,
|
|
28
|
+
onChange: c,
|
|
29
29
|
placeholder: g("record.associated.search", "Search…"),
|
|
30
|
-
prefix: /* @__PURE__ */ d(
|
|
30
|
+
prefix: /* @__PURE__ */ d(e.search, { size: 12 })
|
|
31
31
|
})
|
|
32
|
-
}), v &&
|
|
33
|
-
let
|
|
34
|
-
if (!
|
|
35
|
-
let i = u[
|
|
36
|
-
if (
|
|
37
|
-
field:
|
|
38
|
-
label:
|
|
32
|
+
}), v && a.map((e) => {
|
|
33
|
+
let n = r.fields.get(e);
|
|
34
|
+
if (!n) return null;
|
|
35
|
+
let i = u[e] ?? "__all__", a = s(g, n, e, h);
|
|
36
|
+
if (n.type === "ref" && n.ref?.entity) return /* @__PURE__ */ d(m, {
|
|
37
|
+
field: n,
|
|
38
|
+
label: a,
|
|
39
39
|
value: i,
|
|
40
|
-
onChange: (
|
|
41
|
-
},
|
|
42
|
-
if (!
|
|
43
|
-
let
|
|
40
|
+
onChange: (t) => p(e, t)
|
|
41
|
+
}, e);
|
|
42
|
+
if (!n.values) return null;
|
|
43
|
+
let o = [{
|
|
44
44
|
value: "__all__",
|
|
45
|
-
label: g("record.associated.filter_all", "All {name}", { name:
|
|
46
|
-
}, ...
|
|
45
|
+
label: g("record.associated.filter_all", "All {name}", { name: a })
|
|
46
|
+
}, ...n.values.map((e) => ({
|
|
47
47
|
value: e.code,
|
|
48
48
|
label: g(e.name) || e.code
|
|
49
49
|
}))];
|
|
50
50
|
return /* @__PURE__ */ d("div", {
|
|
51
51
|
style: { width: 160 },
|
|
52
|
-
children: /* @__PURE__ */ d(
|
|
52
|
+
children: /* @__PURE__ */ d(t, {
|
|
53
53
|
value: i,
|
|
54
|
-
options:
|
|
55
|
-
onChange: (
|
|
56
|
-
placeholder:
|
|
54
|
+
options: o,
|
|
55
|
+
onChange: (t) => p(e, t),
|
|
56
|
+
placeholder: a
|
|
57
57
|
})
|
|
58
|
-
},
|
|
58
|
+
}, e);
|
|
59
59
|
})]
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function m({ field:
|
|
63
|
-
let p =
|
|
62
|
+
function m({ field: e, label: n, value: s, onChange: f }) {
|
|
63
|
+
let p = l(), m = r(a(e.ref?.entity)), h = e.display?.ref_display_field ?? m?.display?.display_field, g = u(() => m ? [...m.fields].find(([, e]) => e.primary)?.[0] ?? "id" : "id", [m]), { data: _ } = i(a(e.ref?.entity), {
|
|
64
64
|
per_page: 200,
|
|
65
65
|
sort: h ? `${h}:asc` : void 0
|
|
66
|
-
}), v = _?.data ?? [], y = (
|
|
66
|
+
}), v = _?.data ?? [], y = (e) => e == null ? "—" : typeof e == "object" && !Array.isArray(e) ? p(e) || "—" : c(e), b = [{
|
|
67
67
|
value: "__all__",
|
|
68
|
-
label: p("record.associated.filter_all", "All {name}", { name:
|
|
68
|
+
label: p("record.associated.filter_all", "All {name}", { name: n })
|
|
69
69
|
}, ...v.map((e) => {
|
|
70
|
-
let
|
|
70
|
+
let t = String(e[g]), n = e[o];
|
|
71
71
|
return {
|
|
72
|
-
value:
|
|
73
|
-
label: typeof
|
|
72
|
+
value: t,
|
|
73
|
+
label: typeof n == "string" && n !== "" ? n : h ? y(e[h] ?? t) : t
|
|
74
74
|
};
|
|
75
75
|
})];
|
|
76
76
|
return /* @__PURE__ */ d("div", {
|
|
77
77
|
style: { width: 160 },
|
|
78
|
-
children: /* @__PURE__ */ d(
|
|
79
|
-
value:
|
|
78
|
+
children: /* @__PURE__ */ d(t, {
|
|
79
|
+
value: s,
|
|
80
80
|
options: b,
|
|
81
81
|
onChange: f,
|
|
82
|
-
placeholder:
|
|
82
|
+
placeholder: n
|
|
83
83
|
})
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
//#endregion
|
|
87
86
|
export { p as AssociatedToolbar };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DynamicIcon as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
1
|
+
import { editsChildrenInline as e, findChildRelation as t, resolveChildConfig as n } from "../../lib/child-config.js";
|
|
2
|
+
import { TableSkeleton as r } from "../shared/LoadingSkeleton.js";
|
|
3
|
+
import { SectionCard as i } from "../primitives/SectionCard.js";
|
|
4
|
+
import { DynamicIcon as a } from "../shared/DynamicIcon.js";
|
|
5
|
+
import { resolveBlockIcon as o, resolveBlockLabel as s } from "./blockMeta.js";
|
|
6
|
+
import { ChildrenTable as c } from "./ChildrenTable.js";
|
|
7
|
+
import { ChildrenList as l } from "./ChildrenList.js";
|
|
8
|
+
import { ChildrenCards as u } from "./ChildrenCards.js";
|
|
9
|
+
import { ChildrenTimeline as d } from "./ChildrenTimeline.js";
|
|
10
|
+
import { EditableChildrenTable as f } from "./EditableChildrenTable.js";
|
|
11
|
+
import { useResponsiveMode as p } from "../../hooks/useResponsiveMode.js";
|
|
12
|
+
import { useText as m } from "../../hooks/useText.js";
|
|
13
13
|
import { Suspense as h, lazy as g } from "react";
|
|
14
14
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
15
|
-
|
|
15
|
+
// src/components/detail-layout/ChildrenBlock.tsx
|
|
16
16
|
var y = g(() => import("./DraggableChildrenTable.js").then((e) => ({ default: e.DraggableChildrenTable })));
|
|
17
17
|
function b({ node: g, ctx: b }) {
|
|
18
|
-
let x =
|
|
18
|
+
let x = m(), S = m("errors"), C = p(), w = g.children;
|
|
19
19
|
if (!w) return null;
|
|
20
20
|
let T = C.isPhone && b.relatedRecordsPresentation === "table";
|
|
21
21
|
if (b.isNew && b.mode !== "edit") return null;
|
|
22
|
-
let E =
|
|
22
|
+
let E = t(b.entity, w);
|
|
23
23
|
if (!E) return /* @__PURE__ */ v("div", {
|
|
24
24
|
className: "text-sm text-muted-foreground py-2",
|
|
25
25
|
children: [
|
|
@@ -30,18 +30,18 @@ function b({ node: g, ctx: b }) {
|
|
|
30
30
|
});
|
|
31
31
|
let D = b.schema.entities[E.entity];
|
|
32
32
|
if (!D) return null;
|
|
33
|
-
let O =
|
|
33
|
+
let O = n(E, D, g), k = s(g, b, x), A = o(g, b), j = (e) => O.mode === "timeline" || b.withinCard ? e : /* @__PURE__ */ _(i, {
|
|
34
34
|
title: k,
|
|
35
|
-
icon: A ? /* @__PURE__ */ _(
|
|
35
|
+
icon: A ? /* @__PURE__ */ _(a, {
|
|
36
36
|
name: A,
|
|
37
37
|
size: 14
|
|
38
38
|
}) : void 0,
|
|
39
39
|
children: e
|
|
40
40
|
});
|
|
41
|
-
if (b.mode === "edit" &&
|
|
42
|
-
let e = b.pendingChildren[w] ?? [], t = b.childValidationErrors?.[w], n = O.position_field ? C.isPhone && !T ?
|
|
41
|
+
if (b.mode === "edit" && e(O, D) && b.pendingChildren !== void 0 && b.onChildrenChange) {
|
|
42
|
+
let e = b.pendingChildren[w] ?? [], t = b.childValidationErrors?.[w], n = O.position_field ? C.isPhone && !T ? f : y : f;
|
|
43
43
|
return j(/* @__PURE__ */ _(h, {
|
|
44
|
-
fallback: /* @__PURE__ */ _(
|
|
44
|
+
fallback: /* @__PURE__ */ _(r, {}),
|
|
45
45
|
children: /* @__PURE__ */ _(n, {
|
|
46
46
|
config: O,
|
|
47
47
|
childEntity: D,
|
|
@@ -62,11 +62,10 @@ function b({ node: g, ctx: b }) {
|
|
|
62
62
|
schema: b.schema
|
|
63
63
|
};
|
|
64
64
|
switch (O.mode) {
|
|
65
|
-
case "list": return j(/* @__PURE__ */ _(
|
|
66
|
-
case "cards": return j(/* @__PURE__ */ _(
|
|
67
|
-
case "timeline": return j(/* @__PURE__ */ _(
|
|
68
|
-
default: return C.isPhone && !T ? j(/* @__PURE__ */ _(
|
|
65
|
+
case "list": return j(/* @__PURE__ */ _(l, { ...M }));
|
|
66
|
+
case "cards": return j(/* @__PURE__ */ _(u, { ...M }));
|
|
67
|
+
case "timeline": return j(/* @__PURE__ */ _(d, { ...M }));
|
|
68
|
+
default: return C.isPhone && !T ? j(/* @__PURE__ */ _(u, { ...M })) : j(/* @__PURE__ */ _(c, { ...M }));
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
//#endregion
|
|
72
71
|
export { b as ChildrenBlock };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Pill as e } from "../primitives/Pill.js";
|
|
2
2
|
import { fieldDisplayName as t } from "../../types/schema.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { renderField as n } from "../fields/index.js";
|
|
4
|
+
import { coerceDisplayString as r } from "../../lib/display-value.js";
|
|
5
|
+
import { useChildrenData as i } from "../../hooks/useChildrenData.js";
|
|
6
6
|
import { readDisplayState as a } from "../../lib/read-display-state.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { RetryButton as o } from "../primitives/RetryButton.js";
|
|
8
|
+
import { QuickAddForm as s } from "./QuickAddForm.js";
|
|
9
|
+
import { useText as c } from "../../hooks/useText.js";
|
|
10
10
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
|
-
|
|
11
|
+
// src/components/detail-layout/ChildrenCards.tsx
|
|
12
12
|
function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
13
|
-
let h = m.entities[d.entity], g =
|
|
13
|
+
let h = m.entities[d.entity], g = c(), _ = c("errors"), v = i(f, p, d.entity, d.foreign_key, d.sort, d.limit), y = v.data, b = a(v), x = y?.data ?? [], S = y?.$refs, C = d.columns, w = d.cards, T = w?.header_field ?? C[0], E = w?.badge_field, D = w?.columns_count ?? 3;
|
|
14
14
|
if (!h) return null;
|
|
15
15
|
let O = {
|
|
16
16
|
display: "grid",
|
|
17
17
|
gridTemplateColumns: `repeat(auto-fill, minmax(${D >= 4 ? 180 : 240}px, 1fr))`,
|
|
18
18
|
gap: 12
|
|
19
|
-
}, k = /* @__PURE__ */ l(
|
|
19
|
+
}, k = /* @__PURE__ */ l(s, {
|
|
20
20
|
config: d,
|
|
21
21
|
parentEntity: f,
|
|
22
22
|
parentId: p,
|
|
@@ -31,7 +31,7 @@ function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
|
31
31
|
children: [
|
|
32
32
|
_("record.related_rows_unreadable", "The related records could not be loaded."),
|
|
33
33
|
" ",
|
|
34
|
-
/* @__PURE__ */ l(
|
|
34
|
+
/* @__PURE__ */ l(o, { onRetry: b.retry })
|
|
35
35
|
]
|
|
36
36
|
})] });
|
|
37
37
|
if (b.loading) return /* @__PURE__ */ u("div", { children: [k, /* @__PURE__ */ l("div", {
|
|
@@ -57,7 +57,7 @@ function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
|
57
57
|
let A = C.filter((e) => e !== T && e !== E);
|
|
58
58
|
return /* @__PURE__ */ u("div", { children: [k, /* @__PURE__ */ l("div", {
|
|
59
59
|
style: O,
|
|
60
|
-
children: x.map((
|
|
60
|
+
children: x.map((i, a) => /* @__PURE__ */ u("div", {
|
|
61
61
|
style: {
|
|
62
62
|
background: "var(--surface)",
|
|
63
63
|
border: "1px solid var(--border)",
|
|
@@ -81,27 +81,27 @@ function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
|
81
81
|
textOverflow: "ellipsis",
|
|
82
82
|
whiteSpace: "nowrap"
|
|
83
83
|
},
|
|
84
|
-
children: T && h.fields.get(T) ?
|
|
84
|
+
children: T && h.fields.get(T) ? n({
|
|
85
85
|
field: h.fields.get(T),
|
|
86
86
|
fieldName: T,
|
|
87
|
-
value:
|
|
87
|
+
value: i[T],
|
|
88
88
|
mode: "display",
|
|
89
|
-
record:
|
|
89
|
+
record: i,
|
|
90
90
|
refs: S,
|
|
91
91
|
t: g
|
|
92
|
-
}) : g("record.related.card_title", "Record {number}", { number:
|
|
93
|
-
}), E &&
|
|
92
|
+
}) : g("record.related.card_title", "Record {number}", { number: a + 1 })
|
|
93
|
+
}), E && i[E] != null && /* @__PURE__ */ l(e, {
|
|
94
94
|
tone: "slate",
|
|
95
95
|
size: "xs",
|
|
96
|
-
children: h.fields.get(E) ?
|
|
96
|
+
children: h.fields.get(E) ? n({
|
|
97
97
|
field: h.fields.get(E),
|
|
98
98
|
fieldName: E,
|
|
99
|
-
value:
|
|
99
|
+
value: i[E],
|
|
100
100
|
mode: "display",
|
|
101
|
-
record:
|
|
101
|
+
record: i,
|
|
102
102
|
refs: S,
|
|
103
103
|
t: g
|
|
104
|
-
}) :
|
|
104
|
+
}) : r(i[E])
|
|
105
105
|
})]
|
|
106
106
|
}), A.length > 0 && /* @__PURE__ */ l("div", {
|
|
107
107
|
style: {
|
|
@@ -111,8 +111,8 @@ function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
|
111
111
|
gap: 4
|
|
112
112
|
},
|
|
113
113
|
children: A.slice(0, 4).map((e) => {
|
|
114
|
-
let
|
|
115
|
-
return
|
|
114
|
+
let r = h.fields.get(e);
|
|
115
|
+
return r ? /* @__PURE__ */ u("div", {
|
|
116
116
|
style: {
|
|
117
117
|
display: "flex",
|
|
118
118
|
alignItems: "baseline",
|
|
@@ -124,19 +124,19 @@ function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
|
124
124
|
color: "var(--text-3)",
|
|
125
125
|
flexShrink: 0
|
|
126
126
|
},
|
|
127
|
-
children: [t(g,
|
|
127
|
+
children: [t(g, r, e, m.entities), ":"]
|
|
128
128
|
}), /* @__PURE__ */ l("span", {
|
|
129
129
|
style: {
|
|
130
130
|
overflow: "hidden",
|
|
131
131
|
textOverflow: "ellipsis",
|
|
132
132
|
whiteSpace: "nowrap"
|
|
133
133
|
},
|
|
134
|
-
children:
|
|
135
|
-
field:
|
|
134
|
+
children: n({
|
|
135
|
+
field: r,
|
|
136
136
|
fieldName: e,
|
|
137
|
-
value:
|
|
137
|
+
value: i[e],
|
|
138
138
|
mode: "display",
|
|
139
|
-
record:
|
|
139
|
+
record: i,
|
|
140
140
|
refs: S,
|
|
141
141
|
t: g
|
|
142
142
|
})
|
|
@@ -144,8 +144,7 @@ function d({ config: d, parentEntity: f, parentId: p, schema: m }) {
|
|
|
144
144
|
}, e) : null;
|
|
145
145
|
})
|
|
146
146
|
})]
|
|
147
|
-
},
|
|
147
|
+
}, r(i.id ?? a)))
|
|
148
148
|
})] });
|
|
149
149
|
}
|
|
150
|
-
//#endregion
|
|
151
150
|
export { d as ChildrenCards };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { renderField as e } from "../fields/index.js";
|
|
2
|
+
import { coerceDisplayString as t } from "../../lib/display-value.js";
|
|
3
|
+
import { useChildrenData as n } from "../../hooks/useChildrenData.js";
|
|
4
|
+
import { readDisplayState as r } from "../../lib/read-display-state.js";
|
|
5
|
+
import { RetryButton as i } from "../primitives/RetryButton.js";
|
|
6
|
+
import { DISPLAY_KEY as a } from "../../types/schema.js";
|
|
7
|
+
import { QuickAddForm as o } from "./QuickAddForm.js";
|
|
8
|
+
import { useText as s } from "../../hooks/useText.js";
|
|
9
9
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/components/detail-layout/ChildrenList.tsx
|
|
11
11
|
function u({ config: u, parentEntity: d, parentId: f, schema: p }) {
|
|
12
|
-
let m = p.entities[u.entity], h =
|
|
12
|
+
let m = p.entities[u.entity], h = s(), g = s("errors"), _ = n(d, f, u.entity, u.foreign_key, u.sort, u.limit), v = _.data, y = r(_), b = v?.data ?? [], x = v?.$refs, S = u.columns;
|
|
13
13
|
if (!m) return null;
|
|
14
|
-
let C = /* @__PURE__ */ c(
|
|
14
|
+
let C = /* @__PURE__ */ c(o, {
|
|
15
15
|
config: u,
|
|
16
16
|
parentEntity: d,
|
|
17
17
|
parentId: f,
|
|
@@ -26,7 +26,7 @@ function u({ config: u, parentEntity: d, parentId: f, schema: p }) {
|
|
|
26
26
|
children: [
|
|
27
27
|
g("record.related_rows_unreadable", "The related records could not be loaded."),
|
|
28
28
|
" ",
|
|
29
|
-
/* @__PURE__ */ c(
|
|
29
|
+
/* @__PURE__ */ c(i, { onRetry: y.retry })
|
|
30
30
|
]
|
|
31
31
|
})] });
|
|
32
32
|
if (y.loading) return /* @__PURE__ */ l("div", { children: [C, /* @__PURE__ */ l("div", {
|
|
@@ -70,7 +70,7 @@ function u({ config: u, parentEntity: d, parentId: f, schema: p }) {
|
|
|
70
70
|
flexDirection: "column"
|
|
71
71
|
},
|
|
72
72
|
children: b.map((n, r) => {
|
|
73
|
-
let i = typeof n.$display == "string" ? n[
|
|
73
|
+
let i = typeof n.$display == "string" ? n[a] : "";
|
|
74
74
|
return /* @__PURE__ */ c("div", {
|
|
75
75
|
style: {
|
|
76
76
|
display: "flex",
|
|
@@ -91,7 +91,7 @@ function u({ config: u, parentEntity: d, parentId: f, schema: p }) {
|
|
|
91
91
|
textOverflow: "ellipsis",
|
|
92
92
|
whiteSpace: "nowrap"
|
|
93
93
|
},
|
|
94
|
-
children: i || (w && m.fields.get(w) ?
|
|
94
|
+
children: i || (w && m.fields.get(w) ? e({
|
|
95
95
|
field: m.fields.get(w),
|
|
96
96
|
fieldName: w,
|
|
97
97
|
value: n[w],
|
|
@@ -99,10 +99,10 @@ function u({ config: u, parentEntity: d, parentId: f, schema: p }) {
|
|
|
99
99
|
record: n,
|
|
100
100
|
refs: x,
|
|
101
101
|
t: h
|
|
102
|
-
}) : w && n[w] != null ?
|
|
102
|
+
}) : w && n[w] != null ? t(n[w]) : null)
|
|
103
103
|
}), S.length > 1 && (() => {
|
|
104
|
-
let
|
|
105
|
-
return
|
|
104
|
+
let t = S.slice(1, 3).filter((e) => n[e] != null);
|
|
105
|
+
return t.length === 0 ? null : /* @__PURE__ */ c("div", {
|
|
106
106
|
style: {
|
|
107
107
|
fontSize: 11.5,
|
|
108
108
|
color: "var(--text-3)",
|
|
@@ -110,21 +110,20 @@ function u({ config: u, parentEntity: d, parentId: f, schema: p }) {
|
|
|
110
110
|
textOverflow: "ellipsis",
|
|
111
111
|
whiteSpace: "nowrap"
|
|
112
112
|
},
|
|
113
|
-
children:
|
|
114
|
-
field: m.fields.get(
|
|
115
|
-
fieldName:
|
|
116
|
-
value: n[
|
|
113
|
+
children: t.map((t, r) => /* @__PURE__ */ l("span", { children: [r > 0 && " · ", m.fields.get(t) ? e({
|
|
114
|
+
field: m.fields.get(t),
|
|
115
|
+
fieldName: t,
|
|
116
|
+
value: n[t],
|
|
117
117
|
mode: "display",
|
|
118
118
|
record: n,
|
|
119
119
|
refs: x,
|
|
120
120
|
t: h
|
|
121
|
-
}) : String(n[
|
|
121
|
+
}) : String(n[t])] }, t))
|
|
122
122
|
});
|
|
123
123
|
})()]
|
|
124
124
|
})
|
|
125
|
-
},
|
|
125
|
+
}, t(n.id ?? r));
|
|
126
126
|
})
|
|
127
127
|
})] });
|
|
128
128
|
}
|
|
129
|
-
//#endregion
|
|
130
129
|
export { u as ChildrenList };
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
1
|
+
import { fieldDisplayName as e, resolveDetailRoute as t } from "../../types/schema.js";
|
|
2
|
+
import { resolveCellRenderer as n } from "../fields/cells/registry.js";
|
|
3
|
+
import { useChildrenData as r } from "../../hooks/useChildrenData.js";
|
|
4
|
+
import { readDisplayState as i } from "../../lib/read-display-state.js";
|
|
5
|
+
import { RetryButton as a } from "../primitives/RetryButton.js";
|
|
6
|
+
import { useOwnRefresh as o } from "../shared/useOwnRefresh.js";
|
|
7
|
+
import { findPrimaryKey as s } from "../../lib/child-config.js";
|
|
8
|
+
import { coerceDisplayString as c } from "../../lib/display-value.js";
|
|
9
|
+
import { Icon as l } from "../primitives/Icons.js";
|
|
10
|
+
import { IconBtn as u } from "../primitives/IconBtn.js";
|
|
11
|
+
import { Pill as d } from "../primitives/Pill.js";
|
|
12
|
+
import { Spinner as f } from "../primitives/Spinner.js";
|
|
13
|
+
import { dataTableCellStyle as p, dataTableHeadCellStyle as m, dataTableStyle as h } from "../primitives/dataTableStyles.js";
|
|
14
|
+
import { useScreenIsLive as g } from "../../stores/realtime.js";
|
|
15
|
+
import { QuickAddForm as _ } from "./QuickAddForm.js";
|
|
16
|
+
import { ManualResizeHandle as v, childLayoutKey as y, useManualColumnResize as b } from "./useManualColumnResize.js";
|
|
17
|
+
import { useText as x } from "../../hooks/useText.js";
|
|
18
18
|
import { useMemo as S, useRef as C } from "react";
|
|
19
19
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
20
|
-
|
|
20
|
+
// src/components/detail-layout/ChildrenTable.tsx
|
|
21
21
|
function E({ config: E, parentEntity: D, parentId: O, schema: k }) {
|
|
22
|
-
let A =
|
|
22
|
+
let A = x(), j = x("errors"), M = k.entities[E.entity], N = Array.isArray(E.foreign_key) ? E.foreign_key.join(",") : E.foreign_key, P = b(y(D, E.entity, N)), F = g(M?.realtime, E.entity), I = r(D, O, E.entity, E.foreign_key, E.sort, E.limit), L = I.data, R = i(I), { refreshing: z, refresh: B } = o(I.refetch), V = L?.data ?? [], H = L?.$refs, U = C(H);
|
|
23
23
|
U.current = H;
|
|
24
|
-
let W = E.columns, G = E.interaction === "navigate", K = W[0], q = G && M ?
|
|
24
|
+
let W = E.columns, G = E.interaction === "navigate", K = W[0], q = G && M ? t(void 0, M, k.screens) : null, J = M ? s(M) : void 0, Y = S(() => {
|
|
25
25
|
let e = /* @__PURE__ */ new Map();
|
|
26
26
|
if (!M) return e;
|
|
27
27
|
for (let t of W) {
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
field:
|
|
28
|
+
let r = M.fields.get(t);
|
|
29
|
+
r && e.set(t, n({
|
|
30
|
+
field: r,
|
|
31
31
|
fieldName: t,
|
|
32
32
|
surface: "list",
|
|
33
33
|
entity: M,
|
|
@@ -48,7 +48,7 @@ function E({ config: E, parentEntity: D, parentId: O, schema: k }) {
|
|
|
48
48
|
A
|
|
49
49
|
]);
|
|
50
50
|
if (!M) return null;
|
|
51
|
-
let X = /* @__PURE__ */ w(
|
|
51
|
+
let X = /* @__PURE__ */ w(_, {
|
|
52
52
|
config: E,
|
|
53
53
|
parentEntity: D,
|
|
54
54
|
parentId: O,
|
|
@@ -62,8 +62,8 @@ function E({ config: E, parentEntity: D, parentId: O, schema: k }) {
|
|
|
62
62
|
justifyContent: "flex-end"
|
|
63
63
|
},
|
|
64
64
|
children: [
|
|
65
|
-
P.hasWidths && /* @__PURE__ */ w(
|
|
66
|
-
icon: /* @__PURE__ */ w(
|
|
65
|
+
P.hasWidths && /* @__PURE__ */ w(u, {
|
|
66
|
+
icon: /* @__PURE__ */ w(l.columns, { size: 13 }),
|
|
67
67
|
title: A("record.related.reset_widths", "Reset column widths (this device)"),
|
|
68
68
|
size: 24,
|
|
69
69
|
onClick: P.resetWidths
|
|
@@ -73,19 +73,19 @@ function E({ config: E, parentEntity: D, parentId: O, schema: k }) {
|
|
|
73
73
|
role: "status",
|
|
74
74
|
"aria-label": Z,
|
|
75
75
|
title: F ? A("record.related.live_hint", "This table updates automatically in realtime.") : A("record.related.paused_hint", "Realtime updates are paused. Refresh manually to load the latest data."),
|
|
76
|
-
children: /* @__PURE__ */ w(
|
|
76
|
+
children: /* @__PURE__ */ w(d, {
|
|
77
77
|
tone: F ? "emerald" : "amber",
|
|
78
78
|
size: "xs",
|
|
79
79
|
dot: !0,
|
|
80
80
|
children: Z
|
|
81
81
|
})
|
|
82
82
|
}),
|
|
83
|
-
/* @__PURE__ */ w(
|
|
83
|
+
/* @__PURE__ */ w(u, {
|
|
84
84
|
icon: z ? /* @__PURE__ */ w("span", {
|
|
85
85
|
"data-testid": "children-refresh-spinner",
|
|
86
86
|
style: { display: "inline-flex" },
|
|
87
|
-
children: /* @__PURE__ */ w(
|
|
88
|
-
}) : /* @__PURE__ */ w(
|
|
87
|
+
children: /* @__PURE__ */ w(f, { size: 13 })
|
|
88
|
+
}) : /* @__PURE__ */ w(l.refresh, { size: 13 }),
|
|
89
89
|
title: A("record.related.refresh", "Refresh"),
|
|
90
90
|
size: 24,
|
|
91
91
|
disabled: z,
|
|
@@ -105,7 +105,7 @@ function E({ config: E, parentEntity: D, parentId: O, schema: k }) {
|
|
|
105
105
|
children: [
|
|
106
106
|
j("record.related_rows_unreadable", "The related records could not be loaded."),
|
|
107
107
|
" ",
|
|
108
|
-
/* @__PURE__ */ w(
|
|
108
|
+
/* @__PURE__ */ w(a, { onRetry: R.retry })
|
|
109
109
|
]
|
|
110
110
|
})
|
|
111
111
|
] }) : R.loading ? /* @__PURE__ */ T("div", { children: [
|
|
@@ -145,25 +145,25 @@ function E({ config: E, parentEntity: D, parentId: O, schema: k }) {
|
|
|
145
145
|
/* @__PURE__ */ w("div", {
|
|
146
146
|
style: { overflowX: "auto" },
|
|
147
147
|
children: /* @__PURE__ */ T("table", {
|
|
148
|
-
style:
|
|
149
|
-
children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ w("tr", { children: W.map((
|
|
150
|
-
let n = M.fields.get(
|
|
148
|
+
style: h,
|
|
149
|
+
children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ w("tr", { children: W.map((t) => {
|
|
150
|
+
let n = M.fields.get(t);
|
|
151
151
|
return /* @__PURE__ */ T("th", {
|
|
152
|
-
style: P.headerStyle(
|
|
153
|
-
children: [n ?
|
|
154
|
-
colId:
|
|
152
|
+
style: P.headerStyle(t, m),
|
|
153
|
+
children: [n ? e(A, n, t, k.entities) : t, /* @__PURE__ */ w(v, {
|
|
154
|
+
colId: t,
|
|
155
155
|
onMouseDown: P.onHandleMouseDown
|
|
156
156
|
})]
|
|
157
|
-
},
|
|
158
|
-
}) }) }), /* @__PURE__ */ w("tbody", { children: V.map((
|
|
159
|
-
let
|
|
160
|
-
return /* @__PURE__ */ w("tr", { children: W.map((
|
|
161
|
-
let
|
|
157
|
+
}, t);
|
|
158
|
+
}) }) }), /* @__PURE__ */ w("tbody", { children: V.map((e, t) => {
|
|
159
|
+
let n = J ? c(e[J]) : "", r = G && q && n ? q.replace(/:\w+/, n) : void 0;
|
|
160
|
+
return /* @__PURE__ */ w("tr", { children: W.map((t) => {
|
|
161
|
+
let n = t === K, i = Y.get(t), a = i ? i(e[t], e) : c(e[t]);
|
|
162
162
|
return /* @__PURE__ */ w("td", {
|
|
163
|
-
title: typeof
|
|
164
|
-
style: P.cellStyle(
|
|
165
|
-
children:
|
|
166
|
-
href:
|
|
163
|
+
title: typeof a == "string" ? a : void 0,
|
|
164
|
+
style: P.cellStyle(t, p),
|
|
165
|
+
children: n && r ? /* @__PURE__ */ w("a", {
|
|
166
|
+
href: r,
|
|
167
167
|
style: {
|
|
168
168
|
color: "var(--accent-text)",
|
|
169
169
|
textDecoration: "none",
|
|
@@ -171,14 +171,13 @@ function E({ config: E, parentEntity: D, parentId: O, schema: k }) {
|
|
|
171
171
|
},
|
|
172
172
|
onMouseEnter: (e) => e.currentTarget.style.textDecoration = "underline",
|
|
173
173
|
onMouseLeave: (e) => e.currentTarget.style.textDecoration = "none",
|
|
174
|
-
children:
|
|
175
|
-
}) :
|
|
176
|
-
},
|
|
177
|
-
}) }, e
|
|
174
|
+
children: a
|
|
175
|
+
}) : a
|
|
176
|
+
}, t);
|
|
177
|
+
}) }, c(e.id ?? t));
|
|
178
178
|
}) })]
|
|
179
179
|
})
|
|
180
180
|
})
|
|
181
181
|
] });
|
|
182
182
|
}
|
|
183
|
-
//#endregion
|
|
184
183
|
export { E as ChildrenTable };
|