@declarion/react 0.142.0 → 0.146.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,26 +1,26 @@
|
|
|
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 {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
1
|
+
import { Btn as e } from "../primitives/Btn.js";
|
|
2
|
+
import { HoverCard as t } from "../primitives/HoverCard.js";
|
|
3
|
+
import { Icon as n } from "../primitives/Icons.js";
|
|
4
|
+
import { IconBtn as r } from "../primitives/IconBtn.js";
|
|
5
|
+
import { Pill as i } from "../primitives/Pill.js";
|
|
6
|
+
import { Spinner as a } from "../primitives/Spinner.js";
|
|
7
|
+
import { RetryButton as o } from "../primitives/RetryButton.js";
|
|
8
|
+
import { renderField as s } from "../fields/index.js";
|
|
9
|
+
import { coerceDisplayString as c } from "../../lib/display-value.js";
|
|
10
|
+
import { displayDay as l } from "../../lib/timestamp.js";
|
|
11
|
+
import { ENTITY_CHILDREN_KEY as u } from "../../hooks/useChildrenData.js";
|
|
12
|
+
import { useTimelineData as d } from "../../hooks/useTimelineData.js";
|
|
13
|
+
import { deleteObject as f, encodeObjectId as p, updateEntity as m } from "../../api/data.js";
|
|
14
|
+
import { toast as h } from "../../lib/toast.js";
|
|
15
|
+
import { extractPkValues as g, fieldDisplayName as _ } from "../../types/schema.js";
|
|
16
|
+
import { TimelineComposer as v } from "./TimelineComposer.js";
|
|
17
|
+
import { useText as y } from "../../hooks/useText.js";
|
|
18
|
+
import { failureTitle as b } from "../../lib/failure.js";
|
|
19
|
+
import { textWithNodes as x } from "../../lib/language.js";
|
|
20
20
|
import { useCallback as S, useEffect as C, useLayoutEffect as w, useMemo as ee, useRef as T, useState as te } from "react";
|
|
21
21
|
import { useMutation as E, useQueryClient as D } from "@tanstack/react-query";
|
|
22
22
|
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
23
|
-
|
|
23
|
+
// src/components/detail-layout/ChildrenTimeline.tsx
|
|
24
24
|
var j = 80, M = 200, N = 6, P = 2e4, F = 280;
|
|
25
25
|
function I(e) {
|
|
26
26
|
if (e.length > F) return !0;
|
|
@@ -28,43 +28,43 @@ function I(e) {
|
|
|
28
28
|
for (let n of e) if (n === "\n" && ++t >= N) return !0;
|
|
29
29
|
return !1;
|
|
30
30
|
}
|
|
31
|
-
function L(
|
|
32
|
-
if (R(
|
|
33
|
-
let
|
|
34
|
-
return
|
|
31
|
+
function L(e, t) {
|
|
32
|
+
if (R(t)) {
|
|
33
|
+
let e = t.id;
|
|
34
|
+
return e == null ? "" : c(e);
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return p(g(e, t));
|
|
37
37
|
}
|
|
38
38
|
function R(e) {
|
|
39
39
|
return e.__optimistic === !0;
|
|
40
40
|
}
|
|
41
|
-
function z({ config:
|
|
42
|
-
let
|
|
41
|
+
function z({ config: t, parentEntity: n, parentId: r, schema: i }) {
|
|
42
|
+
let s = y(), c = y("errors"), l = i.entities[t.entity], { rows: u, refs: f, fetchNextPage: p, hasOlder: m, isFetchingOlder: h, isLoading: g, isError: _, retry: b } = d(n, r, t.entity, t.foreign_key, t.timeline?.time_field, t.limit), x = t.timeline, E = x?.scroll ?? !1, D = (t.sort ?? "").endsWith(":asc"), N = ee(() => D ? [...u].reverse() : u, [u, D]), P = x?.auto_scroll ?? "none", F = T(null), I = T(null), z = T(!1), V = T(0), G = T(null), K = T(null), q = T(!0), J = T(null);
|
|
43
43
|
C(() => {
|
|
44
44
|
z.current = !1, V.current = 0, G.current = null, K.current = null, q.current = !0, J.current = null;
|
|
45
|
-
}, [
|
|
46
|
-
|
|
45
|
+
}, [r]), w(() => {
|
|
46
|
+
h && F.current && (J.current = {
|
|
47
47
|
scrollHeight: F.current.scrollHeight,
|
|
48
48
|
scrollTop: F.current.scrollTop
|
|
49
49
|
});
|
|
50
|
-
}, [
|
|
50
|
+
}, [h]), w(() => {
|
|
51
51
|
let e = F.current;
|
|
52
|
-
if (!e || N.length === 0 || !
|
|
52
|
+
if (!e || N.length === 0 || !l) {
|
|
53
53
|
V.current = N.length;
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
let t = L(
|
|
56
|
+
let t = L(l, N[0]), n = L(l, N[N.length - 1]), r = !z.current, i = N.length > V.current && V.current > 0, a = i && (D && t !== G.current && n === K.current || !D && n !== K.current && t === G.current), o = i && !a;
|
|
57
57
|
if (r) D && P === "bottom" && (e.scrollTop = e.scrollHeight), z.current = !0;
|
|
58
58
|
else if (a && J.current) {
|
|
59
59
|
let t = J.current;
|
|
60
60
|
D && (e.scrollTop = t.scrollTop + (e.scrollHeight - t.scrollHeight)), J.current = null;
|
|
61
|
-
} else
|
|
61
|
+
} else o && D && q.current && (e.scrollTop = e.scrollHeight);
|
|
62
62
|
V.current = N.length, G.current = t, K.current = n;
|
|
63
63
|
}, [
|
|
64
64
|
N,
|
|
65
65
|
P,
|
|
66
66
|
D,
|
|
67
|
-
|
|
67
|
+
l
|
|
68
68
|
]);
|
|
69
69
|
let Y = S(() => {
|
|
70
70
|
let e = F.current;
|
|
@@ -74,7 +74,7 @@ function z({ config: e, parentEntity: t, parentId: n, schema: r }) {
|
|
|
74
74
|
let e = I.current;
|
|
75
75
|
if (!e || typeof IntersectionObserver > "u") return;
|
|
76
76
|
let t = new IntersectionObserver((e) => {
|
|
77
|
-
for (let t of e) t.isIntersecting &&
|
|
77
|
+
for (let t of e) t.isIntersecting && m && !h && p();
|
|
78
78
|
}, {
|
|
79
79
|
root: F.current ?? null,
|
|
80
80
|
rootMargin: `${M}px 0px 0px 0px`,
|
|
@@ -82,24 +82,24 @@ function z({ config: e, parentEntity: t, parentId: n, schema: r }) {
|
|
|
82
82
|
});
|
|
83
83
|
return t.observe(e), () => t.disconnect();
|
|
84
84
|
}, [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
m,
|
|
86
|
+
h,
|
|
87
|
+
p
|
|
88
88
|
]);
|
|
89
89
|
let [X, Z] = te(null);
|
|
90
|
-
if (!
|
|
91
|
-
let Q =
|
|
90
|
+
if (!l) return null;
|
|
91
|
+
let Q = t.quick_add?.fields ?? [x?.content_field].filter(Boolean), ne = s(l.display?.name_plural) || s(l.display?.name) || t.entity, re = m ? /* @__PURE__ */ k("div", {
|
|
92
92
|
style: {
|
|
93
93
|
display: "flex",
|
|
94
94
|
justifyContent: "center",
|
|
95
95
|
padding: "6px 0"
|
|
96
96
|
},
|
|
97
|
-
children: /* @__PURE__ */ k(
|
|
97
|
+
children: /* @__PURE__ */ k(e, {
|
|
98
98
|
size: "xs",
|
|
99
|
-
onClick: () =>
|
|
100
|
-
disabled:
|
|
101
|
-
icon:
|
|
102
|
-
children:
|
|
99
|
+
onClick: () => p(),
|
|
100
|
+
disabled: h,
|
|
101
|
+
icon: h ? /* @__PURE__ */ k(a, { size: 11 }) : void 0,
|
|
102
|
+
children: h ? s("record.loading", "Loading…") : s("record.timeline.load_older", "Load older")
|
|
103
103
|
})
|
|
104
104
|
}) : null, ie = /* @__PURE__ */ k("div", {
|
|
105
105
|
ref: I,
|
|
@@ -113,12 +113,12 @@ function z({ config: e, parentEntity: t, parentId: n, schema: r }) {
|
|
|
113
113
|
padding: 12
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
|
-
|
|
116
|
+
c("record.related_rows_unreadable", "The related records could not be loaded."),
|
|
117
117
|
" ",
|
|
118
|
-
/* @__PURE__ */ k(
|
|
118
|
+
/* @__PURE__ */ k(o, { onRetry: b })
|
|
119
119
|
]
|
|
120
120
|
});
|
|
121
|
-
else if (
|
|
121
|
+
else if (g) $ = /* @__PURE__ */ A("div", {
|
|
122
122
|
style: {
|
|
123
123
|
display: "flex",
|
|
124
124
|
flexDirection: "column",
|
|
@@ -141,63 +141,63 @@ function z({ config: e, parentEntity: t, parentId: n, schema: r }) {
|
|
|
141
141
|
color: "var(--text-3)",
|
|
142
142
|
padding: 12
|
|
143
143
|
},
|
|
144
|
-
children:
|
|
144
|
+
children: s("record.timeline.empty", "No activity yet.")
|
|
145
145
|
})] });
|
|
146
146
|
else {
|
|
147
|
-
let
|
|
148
|
-
let
|
|
147
|
+
let e = (e, a) => {
|
|
148
|
+
let o = L(l, e) || String(a);
|
|
149
149
|
return /* @__PURE__ */ k(B, {
|
|
150
|
-
row:
|
|
151
|
-
rowId:
|
|
152
|
-
childEntity:
|
|
153
|
-
entityCode:
|
|
154
|
-
parentEntity:
|
|
155
|
-
parentId:
|
|
156
|
-
timeline:
|
|
150
|
+
row: e,
|
|
151
|
+
rowId: o,
|
|
152
|
+
childEntity: l,
|
|
153
|
+
entityCode: t.entity,
|
|
154
|
+
parentEntity: n,
|
|
155
|
+
parentId: r,
|
|
156
|
+
timeline: x,
|
|
157
157
|
editableFields: Q,
|
|
158
|
-
refs:
|
|
159
|
-
isEditing: X ===
|
|
160
|
-
onStartEdit: () => Z(
|
|
158
|
+
refs: f,
|
|
159
|
+
isEditing: X === o,
|
|
160
|
+
onStartEdit: () => Z(o),
|
|
161
161
|
onCancelEdit: () => Z(null),
|
|
162
162
|
onSaved: () => Z(null),
|
|
163
|
-
schema:
|
|
164
|
-
optimistic: R(
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
if (
|
|
168
|
-
let
|
|
169
|
-
zone:
|
|
170
|
-
declared: !!(
|
|
163
|
+
schema: i,
|
|
164
|
+
optimistic: R(e)
|
|
165
|
+
}, o);
|
|
166
|
+
}, a = x?.time_field, o;
|
|
167
|
+
if (a) {
|
|
168
|
+
let t = [], n = l?.fields?.get(a), r = {
|
|
169
|
+
zone: s.timeZone,
|
|
170
|
+
declared: !!(n?.timezone || l?.default_timezone)
|
|
171
171
|
};
|
|
172
|
-
N.forEach((
|
|
173
|
-
let
|
|
174
|
-
!c || c.key !== o ?
|
|
172
|
+
N.forEach((e, n) => {
|
|
173
|
+
let i = e[a], o = H(i, r), c = t[t.length - 1];
|
|
174
|
+
!c || c.key !== o ? t.push({
|
|
175
175
|
key: o,
|
|
176
|
-
label: U(
|
|
176
|
+
label: U(s, i, r),
|
|
177
177
|
rows: [{
|
|
178
|
-
row:
|
|
179
|
-
idx:
|
|
178
|
+
row: e,
|
|
179
|
+
idx: n
|
|
180
180
|
}]
|
|
181
181
|
}) : c.rows.push({
|
|
182
|
-
row:
|
|
183
|
-
idx:
|
|
182
|
+
row: e,
|
|
183
|
+
idx: n
|
|
184
184
|
});
|
|
185
|
-
}),
|
|
185
|
+
}), o = t.map((t) => /* @__PURE__ */ A("div", {
|
|
186
186
|
style: {
|
|
187
187
|
display: "flex",
|
|
188
188
|
flexDirection: "column",
|
|
189
189
|
gap: 8
|
|
190
190
|
},
|
|
191
191
|
children: [/* @__PURE__ */ k(W, {
|
|
192
|
-
label:
|
|
193
|
-
count:
|
|
194
|
-
}),
|
|
195
|
-
}, `day-${
|
|
196
|
-
} else
|
|
192
|
+
label: t.label,
|
|
193
|
+
count: t.rows.length
|
|
194
|
+
}), t.rows.map(({ row: t, idx: n }) => e(t, n))]
|
|
195
|
+
}, `day-${t.key}`));
|
|
196
|
+
} else o = N.map((t, n) => e(t, n));
|
|
197
197
|
$ = /* @__PURE__ */ A(O, { children: [
|
|
198
198
|
ie,
|
|
199
199
|
re,
|
|
200
|
-
|
|
200
|
+
o
|
|
201
201
|
] });
|
|
202
202
|
}
|
|
203
203
|
return E ? /* @__PURE__ */ A("div", {
|
|
@@ -238,11 +238,11 @@ function z({ config: e, parentEntity: t, parentId: n, schema: r }) {
|
|
|
238
238
|
},
|
|
239
239
|
children: $
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */ k(
|
|
242
|
-
config:
|
|
243
|
-
parentEntity:
|
|
244
|
-
parentId:
|
|
245
|
-
schema:
|
|
241
|
+
/* @__PURE__ */ k(v, {
|
|
242
|
+
config: t,
|
|
243
|
+
parentEntity: n,
|
|
244
|
+
parentId: r,
|
|
245
|
+
schema: i
|
|
246
246
|
})
|
|
247
247
|
]
|
|
248
248
|
}) : /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("div", {
|
|
@@ -252,44 +252,44 @@ function z({ config: e, parentEntity: t, parentId: n, schema: r }) {
|
|
|
252
252
|
gap: 8
|
|
253
253
|
},
|
|
254
254
|
children: $
|
|
255
|
-
}), /* @__PURE__ */ k(
|
|
256
|
-
config:
|
|
257
|
-
parentEntity:
|
|
258
|
-
parentId:
|
|
259
|
-
schema:
|
|
255
|
+
}), /* @__PURE__ */ k(v, {
|
|
256
|
+
config: t,
|
|
257
|
+
parentEntity: n,
|
|
258
|
+
parentId: r,
|
|
259
|
+
schema: i
|
|
260
260
|
})] });
|
|
261
261
|
}
|
|
262
|
-
function B({ row: t, rowId:
|
|
263
|
-
let P =
|
|
262
|
+
function B({ row: t, rowId: o, childEntity: l, entityCode: d, parentEntity: p, parentId: g, timeline: v, editableFields: C, refs: w, isEditing: ee, onStartEdit: T, onCancelEdit: O, onSaved: j, schema: M, optimistic: N = !1 }) {
|
|
263
|
+
let P = y(), F = y("errors"), I = D(), [L, R] = te({}), z = S(() => {
|
|
264
264
|
I.invalidateQueries({ queryKey: [
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
265
|
+
u,
|
|
266
|
+
p,
|
|
267
|
+
g,
|
|
268
|
+
d
|
|
269
269
|
] });
|
|
270
270
|
}, [
|
|
271
271
|
I,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
p,
|
|
273
|
+
g,
|
|
274
|
+
d
|
|
275
275
|
]), B = E({
|
|
276
276
|
mutationFn: (e) => {
|
|
277
|
-
let
|
|
277
|
+
let n = t.$row_version, r = typeof n == "string" && n !== "" ? {
|
|
278
278
|
...e,
|
|
279
|
-
$row_version:
|
|
279
|
+
$row_version: n
|
|
280
280
|
} : e;
|
|
281
|
-
return
|
|
281
|
+
return m(d, o, r);
|
|
282
282
|
},
|
|
283
283
|
onSuccess: () => {
|
|
284
|
-
z(),
|
|
284
|
+
z(), h.success(P("record.timeline.updated", "Updated")), j();
|
|
285
285
|
},
|
|
286
|
-
onError: (e) =>
|
|
286
|
+
onError: (e) => h.error(b(F, e))
|
|
287
287
|
}), H = E({
|
|
288
|
-
mutationFn: () =>
|
|
288
|
+
mutationFn: () => f(d, o),
|
|
289
289
|
onSuccess: () => {
|
|
290
|
-
z(),
|
|
290
|
+
z(), h.success(P("record.timeline.deleted", "Deleted"));
|
|
291
291
|
},
|
|
292
|
-
onError: (e) =>
|
|
292
|
+
onError: (e) => h.error(b(F, e))
|
|
293
293
|
}), U = S(() => {
|
|
294
294
|
let e = {};
|
|
295
295
|
for (let n of C) e[n] = t[n] ?? "";
|
|
@@ -303,7 +303,7 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
303
303
|
...n,
|
|
304
304
|
[e]: t
|
|
305
305
|
}));
|
|
306
|
-
}, []), K =
|
|
306
|
+
}, []), K = v?.time_field, q = v?.type_field, J = v?.summary_field, Y = v?.content_field, X = v?.author_field, Z = v?.direction_field, Q = v?.intent_field;
|
|
307
307
|
return ee ? /* @__PURE__ */ A("div", {
|
|
308
308
|
style: {
|
|
309
309
|
borderRadius: "var(--radius-lg)",
|
|
@@ -315,7 +315,7 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
315
315
|
gap: 8
|
|
316
316
|
},
|
|
317
317
|
children: [C.map((e) => {
|
|
318
|
-
let t =
|
|
318
|
+
let t = l.fields.get(e);
|
|
319
319
|
return t ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
320
320
|
style: {
|
|
321
321
|
fontSize: 11,
|
|
@@ -323,8 +323,8 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
323
323
|
marginBottom: 4,
|
|
324
324
|
display: "block"
|
|
325
325
|
},
|
|
326
|
-
children:
|
|
327
|
-
}),
|
|
326
|
+
children: _(P, t, e, M.entities)
|
|
327
|
+
}), s({
|
|
328
328
|
field: t,
|
|
329
329
|
fieldName: e,
|
|
330
330
|
value: L[e] ?? "",
|
|
@@ -340,16 +340,16 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
340
340
|
gap: 6,
|
|
341
341
|
paddingTop: 4
|
|
342
342
|
},
|
|
343
|
-
children: [/* @__PURE__ */ k(
|
|
343
|
+
children: [/* @__PURE__ */ k(e, {
|
|
344
344
|
kind: "primary",
|
|
345
345
|
size: "xs",
|
|
346
|
-
icon: B.isPending ? /* @__PURE__ */ k(
|
|
346
|
+
icon: B.isPending ? /* @__PURE__ */ k(a, { size: 12 }) : /* @__PURE__ */ k(n.check, { size: 12 }),
|
|
347
347
|
onClick: () => B.mutate(L),
|
|
348
348
|
disabled: B.isPending,
|
|
349
349
|
children: B.isPending ? P("dialog.saving", "Saving…") : P("dialog.save", "Save")
|
|
350
|
-
}), /* @__PURE__ */ k(
|
|
350
|
+
}), /* @__PURE__ */ k(e, {
|
|
351
351
|
size: "xs",
|
|
352
|
-
icon: /* @__PURE__ */ k(
|
|
352
|
+
icon: /* @__PURE__ */ k(n.x, { size: 12 }),
|
|
353
353
|
onClick: () => {
|
|
354
354
|
R({}), O();
|
|
355
355
|
},
|
|
@@ -381,10 +381,10 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
381
381
|
color: "var(--text-3)"
|
|
382
382
|
},
|
|
383
383
|
children: [
|
|
384
|
-
K && t[K] != null &&
|
|
384
|
+
K && t[K] != null && l.fields.get(K) && /* @__PURE__ */ k("span", {
|
|
385
385
|
style: { fontWeight: 500 },
|
|
386
|
-
children:
|
|
387
|
-
field:
|
|
386
|
+
children: s({
|
|
387
|
+
field: l.fields.get(K),
|
|
388
388
|
fieldName: K,
|
|
389
389
|
value: t[K],
|
|
390
390
|
mode: "display",
|
|
@@ -393,11 +393,11 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
393
393
|
t: P
|
|
394
394
|
})
|
|
395
395
|
}),
|
|
396
|
-
q && t[q] != null &&
|
|
396
|
+
q && t[q] != null && l.fields.get(q) && /* @__PURE__ */ k(i, {
|
|
397
397
|
tone: "slate",
|
|
398
398
|
size: "xs",
|
|
399
|
-
children:
|
|
400
|
-
field:
|
|
399
|
+
children: s({
|
|
400
|
+
field: l.fields.get(q),
|
|
401
401
|
fieldName: q,
|
|
402
402
|
value: t[q],
|
|
403
403
|
mode: "display",
|
|
@@ -406,15 +406,15 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
406
406
|
t: P
|
|
407
407
|
})
|
|
408
408
|
}),
|
|
409
|
-
Z && t[Z] != null &&
|
|
409
|
+
Z && t[Z] != null && l.fields.get(Z) && /* @__PURE__ */ k(G, {
|
|
410
410
|
value: t[Z],
|
|
411
|
-
field:
|
|
411
|
+
field: l.fields.get(Z)
|
|
412
412
|
}),
|
|
413
|
-
Q && t[Q] != null &&
|
|
413
|
+
Q && t[Q] != null && l.fields.get(Q) && /* @__PURE__ */ k(i, {
|
|
414
414
|
tone: "slate",
|
|
415
415
|
size: "xs",
|
|
416
|
-
children:
|
|
417
|
-
field:
|
|
416
|
+
children: s({
|
|
417
|
+
field: l.fields.get(Q),
|
|
418
418
|
fieldName: Q,
|
|
419
419
|
value: t[Q],
|
|
420
420
|
mode: "display",
|
|
@@ -423,8 +423,8 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
423
423
|
t: P
|
|
424
424
|
})
|
|
425
425
|
}),
|
|
426
|
-
X && t[X] != null &&
|
|
427
|
-
field:
|
|
426
|
+
X && t[X] != null && l.fields.get(X) && /* @__PURE__ */ k("span", { children: x(P("record.timeline.by_author", "by {author}"), { author: s({
|
|
427
|
+
field: l.fields.get(X),
|
|
428
428
|
fieldName: X,
|
|
429
429
|
value: t[X],
|
|
430
430
|
mode: "display",
|
|
@@ -439,28 +439,28 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
439
439
|
alignItems: "center",
|
|
440
440
|
gap: 2
|
|
441
441
|
},
|
|
442
|
-
children: [/* @__PURE__ */ k(
|
|
442
|
+
children: [/* @__PURE__ */ k(r, {
|
|
443
443
|
size: 22,
|
|
444
|
-
icon: /* @__PURE__ */ k(
|
|
444
|
+
icon: /* @__PURE__ */ k(n.edit, { size: 11 }),
|
|
445
445
|
onClick: U,
|
|
446
446
|
title: P("record.action.edit", "Edit")
|
|
447
|
-
}), /* @__PURE__ */ k(
|
|
447
|
+
}), /* @__PURE__ */ k(r, {
|
|
448
448
|
size: 22,
|
|
449
|
-
icon: /* @__PURE__ */ k(
|
|
449
|
+
icon: /* @__PURE__ */ k(n.trash, { size: 11 }),
|
|
450
450
|
onClick: () => H.mutate(),
|
|
451
451
|
title: P("record.action.delete", "Delete")
|
|
452
452
|
})]
|
|
453
453
|
})
|
|
454
454
|
]
|
|
455
455
|
}),
|
|
456
|
-
J && t[J] != null &&
|
|
456
|
+
J && t[J] != null && l.fields.get(J) && /* @__PURE__ */ k("div", {
|
|
457
457
|
style: {
|
|
458
458
|
fontSize: 12.5,
|
|
459
459
|
fontWeight: 500,
|
|
460
460
|
marginTop: 6
|
|
461
461
|
},
|
|
462
|
-
children:
|
|
463
|
-
field:
|
|
462
|
+
children: s({
|
|
463
|
+
field: l.fields.get(J),
|
|
464
464
|
fieldName: J,
|
|
465
465
|
value: t[J],
|
|
466
466
|
mode: "display",
|
|
@@ -469,9 +469,9 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
469
469
|
t: P
|
|
470
470
|
})
|
|
471
471
|
}),
|
|
472
|
-
Y && t[Y] != null && Y !== J &&
|
|
473
|
-
rendered:
|
|
474
|
-
field:
|
|
472
|
+
Y && t[Y] != null && Y !== J && l.fields.get(Y) && /* @__PURE__ */ k(V, {
|
|
473
|
+
rendered: s({
|
|
474
|
+
field: l.fields.get(Y),
|
|
475
475
|
fieldName: Y,
|
|
476
476
|
value: t[Y],
|
|
477
477
|
mode: "display",
|
|
@@ -479,25 +479,25 @@ function B({ row: t, rowId: n, childEntity: o, entityCode: p, parentEntity: h, p
|
|
|
479
479
|
refs: w,
|
|
480
480
|
t: P
|
|
481
481
|
}),
|
|
482
|
-
text:
|
|
482
|
+
text: c(t[Y])
|
|
483
483
|
})
|
|
484
484
|
]
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
|
-
function V({ rendered: e, text:
|
|
488
|
-
let
|
|
487
|
+
function V({ rendered: e, text: n }) {
|
|
488
|
+
let r = y(), i = {
|
|
489
489
|
fontSize: 12.5,
|
|
490
490
|
fontWeight: 400,
|
|
491
491
|
marginTop: 6
|
|
492
492
|
};
|
|
493
|
-
if (!I(
|
|
494
|
-
style:
|
|
493
|
+
if (!I(n)) return /* @__PURE__ */ k("div", {
|
|
494
|
+
style: i,
|
|
495
495
|
children: e
|
|
496
496
|
});
|
|
497
|
-
let
|
|
497
|
+
let a = n.length > P, o = a ? n.slice(0, P) : n;
|
|
498
498
|
return /* @__PURE__ */ k("div", {
|
|
499
499
|
style: {
|
|
500
|
-
...
|
|
500
|
+
...i,
|
|
501
501
|
display: "-webkit-box",
|
|
502
502
|
WebkitBoxOrient: "vertical",
|
|
503
503
|
WebkitLineClamp: N,
|
|
@@ -505,7 +505,7 @@ function V({ rendered: e, text: t }) {
|
|
|
505
505
|
whiteSpace: "pre-wrap",
|
|
506
506
|
overflowWrap: "anywhere"
|
|
507
507
|
},
|
|
508
|
-
children: /* @__PURE__ */ k(
|
|
508
|
+
children: /* @__PURE__ */ k(t, {
|
|
509
509
|
width: 380,
|
|
510
510
|
content: /* @__PURE__ */ A("div", {
|
|
511
511
|
style: {
|
|
@@ -513,27 +513,27 @@ function V({ rendered: e, text: t }) {
|
|
|
513
513
|
whiteSpace: "pre-wrap",
|
|
514
514
|
overflowWrap: "anywhere"
|
|
515
515
|
},
|
|
516
|
-
children: [
|
|
516
|
+
children: [o, a && /* @__PURE__ */ k("div", {
|
|
517
517
|
style: {
|
|
518
518
|
marginTop: 8,
|
|
519
519
|
fontSize: 11,
|
|
520
520
|
color: "var(--text-3)"
|
|
521
521
|
},
|
|
522
|
-
children:
|
|
522
|
+
children: r("record.timeline.truncated", "Truncated for display - open the record for the full text.")
|
|
523
523
|
})]
|
|
524
524
|
}),
|
|
525
525
|
children: e
|
|
526
526
|
})
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
|
-
function H(
|
|
530
|
-
return
|
|
529
|
+
function H(e, t) {
|
|
530
|
+
return e == null ? "" : l(c(e), t) ?? "";
|
|
531
531
|
}
|
|
532
|
-
function U(
|
|
533
|
-
let
|
|
534
|
-
if (!
|
|
535
|
-
let
|
|
536
|
-
return
|
|
532
|
+
function U(e, t, n) {
|
|
533
|
+
let r = t == null ? null : l(c(t), n);
|
|
534
|
+
if (!r) return "—";
|
|
535
|
+
let i = Date.now();
|
|
536
|
+
return r === l(new Date(i).toISOString(), n) ? e("record.timeline.today", "Today") : r === l((/* @__PURE__ */ new Date(i - 864e5)).toISOString(), n) ? e("record.timeline.yesterday", "Yesterday") : (/* @__PURE__ */ new Date(`${r}T12:00:00Z`)).toLocaleDateString(e.language, {
|
|
537
537
|
weekday: "short",
|
|
538
538
|
month: "short",
|
|
539
539
|
day: "numeric",
|
|
@@ -578,8 +578,8 @@ function W({ label: e, count: t }) {
|
|
|
578
578
|
});
|
|
579
579
|
}
|
|
580
580
|
function G({ value: e, field: t }) {
|
|
581
|
-
let
|
|
582
|
-
return
|
|
581
|
+
let r = y(), i = K(e, t);
|
|
582
|
+
return i === null ? null : /* @__PURE__ */ A("span", {
|
|
583
583
|
style: {
|
|
584
584
|
display: "inline-flex",
|
|
585
585
|
alignItems: "center",
|
|
@@ -588,10 +588,10 @@ function G({ value: e, field: t }) {
|
|
|
588
588
|
borderRadius: 999,
|
|
589
589
|
fontSize: 10.5,
|
|
590
590
|
fontWeight: 600,
|
|
591
|
-
background:
|
|
592
|
-
color:
|
|
591
|
+
background: i ? "var(--accent-soft)" : "var(--info-soft)",
|
|
592
|
+
color: i ? "var(--accent)" : "var(--info)"
|
|
593
593
|
},
|
|
594
|
-
children: [k(
|
|
594
|
+
children: [k(i ? n.arrowUp : n.arrowDown, { size: 10 }), i ? r("record.timeline.outbound", "Out") : r("record.timeline.inbound", "In")]
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
597
|
function K(e, t) {
|
|
@@ -603,5 +603,4 @@ function K(e, t) {
|
|
|
603
603
|
}
|
|
604
604
|
return null;
|
|
605
605
|
}
|
|
606
|
-
//#endregion
|
|
607
606
|
export { z as ChildrenTimeline };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { renderSchemaField as e } from "../file-widgets/host.js";
|
|
2
|
+
import { AuditMetaStrip as t } from "../chrome/AuditMetaStrip.js";
|
|
3
|
+
import { useText as n } from "../../hooks/useText.js";
|
|
4
|
+
import { RecordIdBadge as r } from "../primitives/RecordIdBadge.js";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/detail-layout/DetailAuditStrip.tsx
|
|
7
7
|
function a({ screen: a, entity: o, entityCode: s, record: c, recordId: l, refs: u, schema: d }) {
|
|
8
|
-
let f =
|
|
8
|
+
let f = n(), p = a.audit, m = l ? [{
|
|
9
9
|
label: f("record.audit.id", "ID"),
|
|
10
|
-
by: /* @__PURE__ */ i(
|
|
10
|
+
by: /* @__PURE__ */ i(r, { value: l })
|
|
11
11
|
}] : [];
|
|
12
|
-
if (p?.enabled === !1) return /* @__PURE__ */ i(
|
|
13
|
-
let h = (
|
|
14
|
-
if (!
|
|
15
|
-
let
|
|
16
|
-
if (
|
|
12
|
+
if (p?.enabled === !1) return /* @__PURE__ */ i(t, { lines: m });
|
|
13
|
+
let h = (t) => {
|
|
14
|
+
if (!t || !o.fields.get(t)) return;
|
|
15
|
+
let n = c[t];
|
|
16
|
+
if (n != null && n !== "") return e({
|
|
17
17
|
entity: o,
|
|
18
18
|
entityCode: s,
|
|
19
|
-
fieldName:
|
|
19
|
+
fieldName: t,
|
|
20
20
|
record: c,
|
|
21
21
|
mode: "display",
|
|
22
22
|
refs: u,
|
|
@@ -38,7 +38,6 @@ function a({ screen: a, entity: o, entityCode: s, record: c, recordId: l, refs:
|
|
|
38
38
|
at: h("updated_at"),
|
|
39
39
|
by: h("updated_by")
|
|
40
40
|
}];
|
|
41
|
-
return /* @__PURE__ */ i(
|
|
41
|
+
return /* @__PURE__ */ i(t, { lines: [...m, ...g] });
|
|
42
42
|
}
|
|
43
|
-
//#endregion
|
|
44
43
|
export { a as DetailAuditStrip };
|