@declarion/react 0.65.1 → 0.66.1
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/api/access-expiry.js +32 -0
- package/dist-lib/api/agents.js +105 -0
- package/dist-lib/api/auth-redirect.js +30 -0
- package/dist-lib/api/auth.js +67 -0
- package/dist-lib/api/batch.js +34 -0
- package/dist-lib/api/client.js +241 -0
- package/dist-lib/api/data.js +122 -0
- package/dist-lib/api/entities.js +160 -0
- package/dist-lib/api/events.js +120 -0
- package/dist-lib/api/fileReferences.js +8 -0
- package/dist-lib/api/params.js +20 -0
- package/dist-lib/api/properties.js +25 -0
- package/dist-lib/api/request-bounds.js +28 -0
- package/dist-lib/api/schema.js +71 -0
- package/dist-lib/api/session-renewal.js +36 -0
- package/dist-lib/api/status.js +17 -0
- package/dist-lib/app.js +262 -0
- package/dist-lib/components/actions/ActionButton.js +116 -0
- package/dist-lib/{ActionDialog-C6EG-AmC.js → components/actions/ActionDialog.js} +63 -53
- package/dist-lib/{ActionResultDialog.impl-BATutW8J.js → components/actions/ActionResultDialog.impl.js} +53 -48
- package/dist-lib/components/actions/ActionResultDialog.js +12 -0
- package/dist-lib/components/actions/ActionRunner.js +274 -0
- package/dist-lib/components/actions/ObjectActionBar.js +127 -0
- package/dist-lib/components/actions/PropertyGridEditor.js +202 -0
- package/dist-lib/components/actions/ResponsiveActionBar.js +773 -0
- package/dist-lib/components/actions/RowActionsKebab.js +90 -0
- package/dist-lib/{AgentChatPanel.impl-D5y_qEex.js → components/agents/AgentChatPanel.impl.js} +314 -362
- package/dist-lib/components/agents/AgentChatPanel.js +12 -0
- package/dist-lib/components/agents/AgentConversationDrawer.js +59 -0
- package/dist-lib/components/agents/AgentElicitForm.js +152 -0
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +7 -0
- package/dist-lib/components/agents/AgentOpenFollower.js +12 -0
- package/dist-lib/components/agents/AgentPicker.js +58 -0
- package/dist-lib/components/agents/transcript-runs.js +52 -0
- package/dist-lib/components/chrome/AssociationTabs.js +176 -0
- package/dist-lib/components/chrome/AuditMetaStrip.js +64 -0
- package/dist-lib/components/chrome/Breadcrumbs.js +67 -0
- package/dist-lib/components/chrome/HighlightsStrip.js +39 -0
- package/dist-lib/{PageHeader-DiwLe7CO.js → components/chrome/PageHeader.js} +19 -15
- package/dist-lib/{PageShell-BJz1MiTH.js → components/chrome/PageShell.js} +3 -3
- package/dist-lib/components/chrome/RecordHeader.js +119 -0
- package/dist-lib/{headerActionZone-bef-tZZ7.js → components/chrome/headerActionZone.js} +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +1244 -0
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +87 -0
- package/dist-lib/components/detail-layout/ChildrenBlock.js +80 -0
- package/dist-lib/components/detail-layout/ChildrenCards.js +156 -0
- package/dist-lib/components/detail-layout/ChildrenList.js +135 -0
- package/dist-lib/components/detail-layout/ChildrenTable.js +189 -0
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +609 -0
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +40 -0
- package/dist-lib/components/detail-layout/DetailHighlights.js +54 -0
- package/dist-lib/{DraggableChildrenTable-Dd5SeuF6.js → components/detail-layout/DraggableChildrenTable.js} +56 -53
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +341 -0
- package/dist-lib/components/detail-layout/ErrorSummary.js +89 -0
- package/dist-lib/components/detail-layout/EvidenceBlock.js +66 -0
- package/dist-lib/{FieldRow-DedGIY9R.js → components/detail-layout/FieldRow.js} +8 -7
- package/dist-lib/components/detail-layout/FieldsBlock.js +74 -0
- package/dist-lib/components/detail-layout/LayoutColumn.js +16 -0
- package/dist-lib/components/detail-layout/LayoutRenderer.js +54 -0
- package/dist-lib/components/detail-layout/LayoutRow.js +83 -0
- package/dist-lib/components/detail-layout/LayoutTabs.js +195 -0
- package/dist-lib/components/detail-layout/PropertiesBlock.js +74 -0
- package/dist-lib/components/detail-layout/QuickAddForm.js +81 -0
- package/dist-lib/components/detail-layout/SectionBlock.js +48 -0
- package/dist-lib/components/detail-layout/StatusesBlock.js +18 -0
- package/dist-lib/components/detail-layout/TimelineComposer.js +205 -0
- package/dist-lib/components/detail-layout/blockMeta.js +27 -0
- package/dist-lib/components/detail-layout/useManualColumnResize.js +94 -0
- package/dist-lib/components/detail-layout/useQuickAdd.js +85 -0
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +295 -0
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +107 -0
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +47 -0
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +36 -0
- package/dist-lib/components/detail-layout/widgets/builtins.js +10 -0
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +32 -0
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +16 -0
- package/dist-lib/components/detail-layout/widgets/registry.js +13 -0
- package/dist-lib/components/fields/BoolField.js +13 -0
- package/dist-lib/components/fields/EmailField.js +16 -0
- package/dist-lib/components/fields/EnumField.js +38 -0
- package/dist-lib/components/fields/FileReferenceField.js +60 -0
- package/dist-lib/components/fields/IntArrayField.js +83 -0
- package/dist-lib/components/fields/JsonField.js +51 -0
- package/dist-lib/components/fields/MultilangArrayField.js +56 -0
- package/dist-lib/components/fields/MultilangField.js +65 -0
- package/dist-lib/components/fields/MultilangTextField.js +65 -0
- package/dist-lib/components/fields/NumberField.js +64 -0
- package/dist-lib/components/fields/PasswordField.js +34 -0
- package/dist-lib/components/fields/PhoneField.js +84 -0
- package/dist-lib/components/fields/RefCombobox.js +112 -0
- package/dist-lib/components/fields/RefField.js +45 -0
- package/dist-lib/components/fields/RichTextField.js +225 -0
- package/dist-lib/components/fields/SecretField.js +34 -0
- package/dist-lib/components/fields/StringArrayField.js +165 -0
- package/dist-lib/components/fields/StringField.js +39 -0
- package/dist-lib/components/fields/StructureField.js +221 -0
- package/dist-lib/components/fields/TextField.js +76 -0
- package/dist-lib/components/fields/TimestampField.js +110 -0
- package/dist-lib/components/fields/UrlField.js +18 -0
- package/dist-lib/components/fields/cells/factories/badge.js +42 -0
- package/dist-lib/components/fields/cells/factories/boolPill.js +17 -0
- package/dist-lib/components/fields/cells/factories/code.js +11 -0
- package/dist-lib/components/fields/cells/factories/date.js +30 -0
- package/dist-lib/components/fields/cells/factories/email.js +26 -0
- package/dist-lib/components/fields/cells/factories/emptyCell.js +10 -0
- package/dist-lib/components/fields/cells/factories/fileReference.js +17 -0
- package/dist-lib/components/fields/cells/factories/host-icons.js +146 -0
- package/dist-lib/components/fields/cells/factories/json.js +61 -0
- package/dist-lib/components/fields/cells/factories/link.js +32 -0
- package/dist-lib/components/fields/cells/factories/markdown.js +31 -0
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +81 -0
- package/dist-lib/components/fields/cells/factories/money.js +37 -0
- package/dist-lib/components/fields/cells/factories/multilangInline.js +35 -0
- package/dist-lib/components/fields/cells/factories/nextRun.js +46 -0
- package/dist-lib/components/fields/cells/factories/number.js +42 -0
- package/dist-lib/components/fields/cells/factories/passwordMask.js +23 -0
- package/dist-lib/components/fields/cells/factories/phone.js +35 -0
- package/dist-lib/components/fields/cells/factories/refLink.js +57 -0
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +34 -0
- package/dist-lib/components/fields/cells/factories/statusPill.js +35 -0
- package/dist-lib/components/fields/cells/factories/tagList.js +44 -0
- package/dist-lib/components/fields/cells/factories/text.js +5 -0
- package/dist-lib/components/fields/cells/factories/timestamp.js +18 -0
- package/dist-lib/components/fields/cells/factories/url-helpers.js +49 -0
- package/dist-lib/components/fields/cells/factories/url.js +45 -0
- package/dist-lib/components/fields/cells/registry.js +58 -0
- package/dist-lib/components/fields/index.js +80 -0
- package/dist-lib/components/fields/langMap.js +6 -0
- package/dist-lib/components/fields/secretValue.js +7 -0
- package/dist-lib/components/file-widgets/CircleImage.js +11 -0
- package/dist-lib/components/file-widgets/DocumentCard.js +277 -0
- package/dist-lib/components/file-widgets/FileList.js +213 -0
- package/dist-lib/{Grid-XUHm5SDe.js → components/file-widgets/Grid.js} +45 -40
- package/dist-lib/components/file-widgets/GridLazy.js +15 -0
- package/dist-lib/components/file-widgets/ImageWidget.js +354 -0
- package/dist-lib/components/file-widgets/LabeledSlots.js +69 -0
- package/dist-lib/components/file-widgets/SquareImage.js +11 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +22 -0
- package/dist-lib/components/file-widgets/UploadFailureText.js +10 -0
- package/dist-lib/components/file-widgets/WideBanner.js +11 -0
- package/dist-lib/components/file-widgets/builtins.js +15 -0
- package/dist-lib/components/file-widgets/cropper.js +13 -0
- package/dist-lib/components/file-widgets/draft-scope.js +59 -0
- package/dist-lib/components/file-widgets/helpers.js +75 -0
- package/dist-lib/components/file-widgets/host.js +75 -0
- package/dist-lib/{payload-DioMoxMX.js → components/file-widgets/payload.js} +14 -14
- package/dist-lib/components/file-widgets/registry.js +13 -0
- package/dist-lib/components/file-widgets/upload.js +180 -0
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +45 -0
- package/dist-lib/components/file-widgets/value.js +12 -0
- package/dist-lib/components/filters/FilterChips.js +123 -0
- package/dist-lib/components/filters/FilterConditionValue.js +40 -0
- package/dist-lib/components/filters/FilterDrawer.js +670 -0
- package/dist-lib/components/filters/FilterOmittedNotice.js +14 -0
- package/dist-lib/components/filters/filter-op-label.js +8 -0
- package/dist-lib/{CommandPalette.impl-DRI5kxVY.js → components/layout/CommandPalette.impl.js} +62 -61
- package/dist-lib/components/layout/CommandPalette.js +12 -0
- package/dist-lib/{DirtyTabsCloseDialog.impl-FhAiOmEb.js → components/layout/DirtyTabsCloseDialog.impl.js} +16 -14
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +12 -0
- package/dist-lib/{ImpersonationBanner.impl--g0iYwcV.js → components/layout/ImpersonationBanner.impl.js} +4 -3
- package/dist-lib/components/layout/ImpersonationBanner.js +12 -0
- package/dist-lib/components/layout/ImpersonationFrame.js +29 -0
- package/dist-lib/{ImpersonationStartModal.impl-BFBN0YJe.js → components/layout/ImpersonationStartModal.impl.js} +9 -9
- package/dist-lib/components/layout/ImpersonationStartModal.js +12 -0
- package/dist-lib/components/layout/Layout.js +755 -0
- package/dist-lib/components/layout/Rail.js +149 -0
- package/dist-lib/components/layout/Sidebar.js +362 -0
- package/dist-lib/components/layout/TabStrip.js +321 -0
- package/dist-lib/components/layout/TenantChip.js +355 -0
- package/dist-lib/components/layout/TopBar.js +305 -0
- package/dist-lib/components/layout/tab-close.js +24 -0
- package/dist-lib/components/list/ColumnPicker.js +112 -0
- package/dist-lib/components/list/InlineEditCell.js +107 -0
- package/dist-lib/components/list/PeekFieldCell.js +143 -0
- package/dist-lib/components/list/QuickPeek.js +263 -0
- package/dist-lib/components/list/ViewSwitcher.js +156 -0
- package/dist-lib/components/list/peekDraftStore.js +14 -0
- package/dist-lib/{AdminCatalogPage.impl-B-7MLqa1.js → components/pages/AdminCatalogPage.impl.js} +53 -49
- package/dist-lib/components/pages/AdminCatalogPage.js +12 -0
- package/dist-lib/components/pages/DocumentsMenu.js +150 -0
- package/dist-lib/components/pages/ExportMenu.js +123 -0
- package/dist-lib/{NotFoundPage.impl-BoX11u-P.js → components/pages/NotFoundPage.impl.js} +6 -4
- package/dist-lib/components/pages/NotFoundPage.js +12 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.js +230 -0
- package/dist-lib/components/pages/RecordNotesPanel.js +200 -0
- package/dist-lib/components/pages/RecordPanels.js +18 -0
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +28 -0
- package/dist-lib/components/pages/SSOCallbackPage.js +12 -0
- package/dist-lib/components/pages/SmartDetailPage.impl.js +986 -0
- package/dist-lib/components/pages/SmartDetailPage.js +12 -0
- package/dist-lib/components/pages/SmartListPage.impl.js +708 -0
- package/dist-lib/components/pages/SmartListPage.js +12 -0
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +818 -0
- package/dist-lib/components/pages/SmartRecordListPage.js +12 -0
- package/dist-lib/components/pages/auth/AuthShell.js +350 -0
- package/dist-lib/{Forgot.impl-6tL6SBlS.js → components/pages/auth/Forgot.impl.js} +13 -12
- package/dist-lib/components/pages/auth/Forgot.js +12 -0
- package/dist-lib/{Reset.impl-D0pjhS6d.js → components/pages/auth/Reset.impl.js} +17 -15
- package/dist-lib/components/pages/auth/Reset.js +12 -0
- package/dist-lib/components/pages/auth/SignIn.js +252 -0
- package/dist-lib/{SignUp.impl-CfEXrUeg.js → components/pages/auth/SignUp.impl.js} +31 -27
- package/dist-lib/components/pages/auth/SignUp.js +12 -0
- package/dist-lib/{TwoFA.impl-B2HtPduH.js → components/pages/auth/TwoFA.impl.js} +9 -8
- package/dist-lib/components/pages/auth/TwoFA.js +12 -0
- package/dist-lib/components/pages/auth/icons.js +56 -0
- package/dist-lib/components/pages/exportRequest.js +17 -0
- package/dist-lib/components/pages/list/DataCell.js +27 -0
- package/dist-lib/components/pages/list/DeleteViewDialog.js +22 -0
- package/dist-lib/{ListCardsBody-BEoYjSZ2.js → components/pages/list/ListCardRow.js} +47 -72
- package/dist-lib/components/pages/list/ListCardsBody.js +31 -0
- package/dist-lib/components/pages/list/ListFloatbar.js +130 -0
- package/dist-lib/components/pages/list/ListFooter.js +138 -0
- package/dist-lib/components/pages/list/ListHeader.js +120 -0
- package/dist-lib/components/pages/list/ListNoRows.js +72 -0
- package/dist-lib/components/pages/list/ListTable.js +191 -0
- package/dist-lib/components/pages/list/ListTableRow.js +37 -0
- package/dist-lib/components/pages/list/ListToolbar.js +261 -0
- package/dist-lib/components/pages/list/ListUrlBanner.js +45 -0
- package/dist-lib/components/pages/list/RowActionsCell.js +49 -0
- package/dist-lib/components/pages/list/RowContextMenu.js +55 -0
- package/dist-lib/components/pages/list/SaveViewDialog.js +111 -0
- package/dist-lib/{SortHeaderMenu-Co5PvhTA.js → components/pages/list/SortHeaderMenu.js} +18 -17
- package/dist-lib/{cardProjection-Cxlogzh8.js → components/pages/list/cardProjection.js} +3 -3
- package/dist-lib/components/pages/list/column-sizing.js +17 -0
- package/dist-lib/components/pages/list/columns.js +168 -0
- package/dist-lib/components/pages/list/filter-meta.js +84 -0
- package/dist-lib/components/pages/list/page-size.js +11 -0
- package/dist-lib/components/pages/list/sortable-header.js +18 -0
- package/dist-lib/components/pages/list/table-features.js +11 -0
- package/dist-lib/components/pages/list/use-filter-value-labels.js +115 -0
- package/dist-lib/components/pages/list/useActiveView.js +98 -0
- package/dist-lib/components/pages/list/useHeaderReorder.js +93 -0
- package/dist-lib/components/pages/list/useListColumnLayout.js +56 -0
- package/dist-lib/components/pages/list/useListFilterPresentation.js +34 -0
- package/dist-lib/components/pages/list/useListQuery.js +101 -0
- package/dist-lib/components/pages/list/useListRowInteraction.js +120 -0
- package/dist-lib/components/pages/list/useListSelection.js +53 -0
- package/dist-lib/components/pages/list/useListSort.js +44 -0
- package/dist-lib/components/pages/list/useListViews.js +148 -0
- package/dist-lib/components/pages/list/useRowMenu.js +106 -0
- package/dist-lib/components/pages/list/visible-filters.js +19 -0
- package/dist-lib/{Preferences.impl-Ct5xwZtT.js → components/pages/profile/Preferences.impl.js} +34 -31
- package/dist-lib/components/pages/profile/Preferences.js +12 -0
- package/dist-lib/components/pages/profile/Profile.impl.js +437 -0
- package/dist-lib/components/pages/profile/Profile.js +12 -0
- package/dist-lib/{TenantParamsPage.impl-BGpdmEZg.js → components/pages/tenant-params/TenantParamsPage.impl.js} +45 -40
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +12 -0
- package/dist-lib/components/params/ParamsBlock.js +119 -0
- package/dist-lib/{param-editors-TYYU7HKK.js → components/params/param-editors.js} +32 -28
- package/dist-lib/components/primitives/Avatar.js +33 -0
- package/dist-lib/components/primitives/BoolToggle.js +35 -0
- package/dist-lib/components/primitives/BrandGlyph.js +38 -0
- package/dist-lib/components/primitives/BrandLogo.js +20 -0
- package/dist-lib/components/primitives/Btn.js +67 -0
- package/dist-lib/{Check-DAfMbQIw.js → components/primitives/Check.js} +2 -2
- package/dist-lib/components/primitives/Chip.js +44 -0
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +15 -0
- package/dist-lib/components/primitives/Dropdown.js +85 -0
- package/dist-lib/components/primitives/Fields.js +751 -0
- package/dist-lib/components/primitives/HoverCard.js +115 -0
- package/dist-lib/components/primitives/IconBtn.js +37 -0
- package/dist-lib/{Icons-lt-7lhYR.js → components/primitives/Icons.js} +1 -1
- package/dist-lib/{Kbd-CNttVu0z.js → components/primitives/Kbd.js} +2 -2
- package/dist-lib/components/primitives/MenuItem.js +57 -0
- package/dist-lib/{Pill-D-wsfRhx.js → components/primitives/Pill.js} +1 -1
- package/dist-lib/{RecordIdBadge-wbigZaFc.js → components/primitives/RecordIdBadge.js} +5 -5
- package/dist-lib/components/primitives/RowField.js +47 -0
- package/dist-lib/{SectionCard-BYHoHWJc.js → components/primitives/SectionCard.js} +10 -10
- package/dist-lib/components/primitives/Spinner.js +31 -0
- package/dist-lib/components/primitives/StatTile.js +108 -0
- package/dist-lib/components/primitives/Tooltip.js +115 -0
- package/dist-lib/{dataTableStyles-vwD1mVOP.js → components/primitives/dataTableStyles.js} +1 -1
- package/dist-lib/components/shared/BlankScreen.js +13 -0
- package/dist-lib/{ChangePasswordDialog.impl-5hDc0wpE.js → components/shared/ChangePasswordDialog.impl.js} +27 -22
- package/dist-lib/{ChangePasswordDialog-C_T_3pjl.js → components/shared/ChangePasswordDialog.js} +2 -2
- package/dist-lib/components/shared/ConfirmDialog.js +129 -0
- package/dist-lib/components/shared/ConnectionNotice.js +12 -0
- package/dist-lib/components/shared/CopyButton.js +25 -0
- package/dist-lib/components/shared/DynamicIcon.js +73 -0
- package/dist-lib/components/shared/EmptyState.js +56 -0
- package/dist-lib/components/shared/ErrorBoundary.js +96 -0
- package/dist-lib/components/shared/LoadingSkeleton.js +117 -0
- package/dist-lib/components/shared/LucideIcon.js +43 -0
- package/dist-lib/components/shared/Markdown.js +15 -0
- package/dist-lib/{MarkdownRenderer-sK2TRZS-.js → components/shared/MarkdownRenderer.js} +10 -9
- package/dist-lib/components/shared/RefreshControl.js +42 -0
- package/dist-lib/components/shared/StatusGroupsDisplay.js +123 -0
- package/dist-lib/components/shared/StatusStepper.js +70 -0
- package/dist-lib/components/shared/toast/DeclarionToast.js +308 -0
- package/dist-lib/components/shared/useOwnRefresh.js +19 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/EmbedAuthBootstrap.js +71 -0
- package/dist-lib/embed/EmbedContext.js +38 -0
- package/dist-lib/embed/EmbedDirtyReporter.js +17 -0
- package/dist-lib/embed/EmbedHistoryTracker.js +17 -0
- package/dist-lib/embed/EmbedLocationReporter.js +26 -0
- package/dist-lib/embed/EmbedResizeReporter.js +25 -0
- package/dist-lib/embed/EmbedUnsavedGuard.js +23 -0
- package/dist-lib/embed/embed-dirty.js +21 -0
- package/dist-lib/embed/embed-history.js +17 -0
- package/dist-lib/embed/embed-nav-guard.js +13 -0
- package/dist-lib/embed/file-src.js +60 -0
- package/dist-lib/embed/handshake.js +37 -0
- package/dist-lib/embed/params.js +45 -0
- package/dist-lib/embed/protocol.js +26 -0
- package/dist-lib/embed/screen-location.js +44 -0
- package/dist-lib/embed/theme.js +11 -0
- package/dist-lib/embed/token.js +54 -0
- package/dist-lib/embed/useEmbedNavigate.js +65 -0
- package/dist-lib/embed/useGlobalLinkInterceptor.js +63 -0
- package/dist-lib/hooks/useActionData.js +58 -0
- package/dist-lib/hooks/useAgentConversation.js +311 -0
- package/dist-lib/hooks/useAggregate.js +18 -0
- package/dist-lib/hooks/useAllEntityData.js +53 -0
- package/dist-lib/hooks/useAssociatedData.js +37 -0
- package/dist-lib/hooks/useAuth.js +56 -0
- package/dist-lib/hooks/useBranding.js +18 -0
- package/dist-lib/hooks/useBrandingChrome.js +58 -0
- package/dist-lib/hooks/useChildrenData.js +33 -0
- package/dist-lib/hooks/useColumns.js +44 -0
- package/dist-lib/hooks/useConnectionNotice.js +35 -0
- package/dist-lib/{useCurrentLocation-Bq1T72AW.js → hooks/useCurrentLocation.js} +2 -2
- package/dist-lib/hooks/useCurrentScreen.js +20 -0
- package/dist-lib/hooks/useCursorEntityData.js +77 -0
- package/dist-lib/hooks/useDebounce.js +11 -0
- package/dist-lib/hooks/useEntity.js +8 -0
- package/dist-lib/hooks/useEntityData.js +64 -0
- package/dist-lib/hooks/useFileReferenceJSON.js +29 -0
- package/dist-lib/hooks/useFilters.js +28 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +84 -0
- package/dist-lib/hooks/useImpersonation.js +40 -0
- package/dist-lib/hooks/useIntentPrefetch.js +43 -0
- package/dist-lib/hooks/useJsonSnapshot.js +8 -0
- package/dist-lib/hooks/useLanguage.js +21 -0
- package/dist-lib/hooks/useLiveObject.js +17 -0
- package/dist-lib/hooks/useLongPress.js +49 -0
- package/dist-lib/hooks/useMutations.js +70 -0
- package/dist-lib/{useObject-B45F96rC.js → hooks/useObject.js} +2 -2
- package/dist-lib/hooks/useObjectStatus.js +20 -0
- package/dist-lib/hooks/usePageState.js +18 -0
- package/dist-lib/hooks/usePageStateRuntime.js +46 -0
- package/dist-lib/hooks/usePageStateTtl.js +10 -0
- package/dist-lib/hooks/useParams.js +123 -0
- package/dist-lib/hooks/useProperties.js +32 -0
- package/dist-lib/hooks/useRealtimeThresholds.js +31 -0
- package/dist-lib/hooks/useRegisterScreenTab.js +28 -0
- package/dist-lib/hooks/useResponsiveMode.js +84 -0
- package/dist-lib/hooks/useSSE.js +307 -0
- package/dist-lib/hooks/useSchema.js +73 -0
- package/dist-lib/hooks/useScreen.js +8 -0
- package/dist-lib/hooks/useScreenBack.js +60 -0
- package/dist-lib/hooks/useScreenTab.js +11 -0
- package/dist-lib/hooks/useTabNavigate.js +82 -0
- package/dist-lib/hooks/useTabSearchMirror.js +19 -0
- package/dist-lib/{useTabTitle-KrzEo118.js → hooks/useTabTitle.js} +9 -7
- package/dist-lib/hooks/useText.js +15 -0
- package/dist-lib/hooks/useTimelineData.js +44 -0
- package/dist-lib/hooks/useUnsavedInput.js +18 -0
- package/dist-lib/hooks/useVersionWatcher.js +62 -0
- package/dist-lib/hooks/useViews.js +88 -0
- package/dist-lib/hooks/useWindowConversation.js +11 -0
- package/dist-lib/icons.js +5 -3
- package/dist-lib/index.d.ts +42 -20
- package/dist-lib/index.js +131 -3926
- package/dist-lib/lib/action-dispatch.js +7 -0
- package/dist-lib/lib/actions.js +279 -0
- package/dist-lib/lib/anchor.js +41 -0
- package/dist-lib/lib/brand-tokens.js +95 -0
- package/dist-lib/lib/branding.js +25 -0
- package/dist-lib/lib/canonical-url.js +17 -0
- package/dist-lib/lib/capabilityPrefetch.js +57 -0
- package/dist-lib/lib/child-config.js +111 -0
- package/dist-lib/lib/children-validation.js +52 -0
- package/dist-lib/lib/decimal-text.js +15 -0
- package/dist-lib/lib/display-value.js +19 -0
- package/dist-lib/lib/document-templates.js +6 -0
- package/dist-lib/lib/download.js +41 -0
- package/dist-lib/lib/evidence-verdict.js +23 -0
- package/dist-lib/lib/failure.js +9 -0
- package/dist-lib/lib/field-classification.js +58 -0
- package/dist-lib/lib/field-regions.js +13 -0
- package/dist-lib/lib/filter-evaluator.js +98 -0
- package/dist-lib/lib/filters.js +118 -0
- package/dist-lib/lib/format-count.js +24 -0
- package/dist-lib/lib/html-state.js +9 -0
- package/dist-lib/lib/language.js +52 -0
- package/dist-lib/lib/longPressGesture.js +34 -0
- package/dist-lib/lib/mass-edit.js +65 -0
- package/dist-lib/{page-inset-D_kkVwwN.js → lib/page-inset.js} +1 -1
- package/dist-lib/lib/phone.js +28 -0
- package/dist-lib/lib/query-retry.js +7 -0
- package/dist-lib/lib/quick-add.js +23 -0
- package/dist-lib/lib/realtime-query-keys.js +23 -0
- package/dist-lib/lib/realtime-reconcile.js +148 -0
- package/dist-lib/lib/realtime-resync.js +192 -0
- package/dist-lib/lib/record-documents-key.js +4 -0
- package/dist-lib/lib/ref-choices.js +6 -0
- package/dist-lib/lib/refetch-when-idle.js +25 -0
- package/dist-lib/lib/rich-text.js +46 -0
- package/dist-lib/lib/rowClickGesture.js +10 -0
- package/dist-lib/lib/safe-url.js +34 -0
- package/dist-lib/lib/schema-routing.js +51 -0
- package/dist-lib/{screen-back-BtbEp5sO.js → lib/screen-back.js} +2 -2
- package/dist-lib/lib/scroll-restoration.js +156 -0
- package/dist-lib/lib/size-value.js +22 -0
- package/dist-lib/lib/sort.js +59 -0
- package/dist-lib/lib/timestamp.js +97 -0
- package/dist-lib/lib/toast.js +78 -0
- package/dist-lib/lib/ui-actions.js +81 -0
- package/dist-lib/{utils-D_QDpB8_.js → lib/utils.js} +1 -1
- package/dist-lib/lib/variants.js +63 -0
- package/dist-lib/lib/versionTracker.js +102 -0
- package/dist-lib/lib/viewport-category.js +12 -0
- package/dist-lib/{window-election-CHIvIZwx.js → lib/window-election.js} +1 -1
- package/dist-lib/stores/auth.js +84 -0
- package/dist-lib/stores/icon-registry.js +24 -0
- package/dist-lib/stores/list-layout.js +178 -0
- package/dist-lib/{page-state-eA6J_KIR.js → stores/page-state.js} +1 -1
- package/dist-lib/stores/preferences.js +126 -0
- package/dist-lib/stores/realtime.js +115 -0
- package/dist-lib/stores/screen-registry.js +10 -0
- package/dist-lib/stores/tabs.js +220 -0
- package/dist-lib/test/seed-schema.js +8 -0
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +80 -76
- package/dist-lib/types/api.js +48 -0
- package/dist-lib/types/fieldType.js +4 -0
- package/dist-lib/types/ordmap.js +50 -0
- package/dist-lib/types/schema.js +173 -0
- package/dist-lib/{useResponsiveMode-DIR1bZfo.d.ts → useResponsiveMode-DmrpMbZX.d.ts} +44 -16
- package/package.json +13 -12
- package/dist-lib/ActionRunner-DdBFhqGe.js +0 -1440
- package/dist-lib/AgentOpenFollower.impl-BAs_wGEZ.js +0 -81
- package/dist-lib/AssociatedBlock-BOoPLOjw.js +0 -1515
- package/dist-lib/AuthShell-C8aVwHS7.js +0 -361
- package/dist-lib/BlankScreen-DVc7fh8C.js +0 -61
- package/dist-lib/CopyButton-DRIT_f0k.js +0 -119
- package/dist-lib/DynamicIcon-DuBSz6TZ.js +0 -133
- package/dist-lib/FilterChips-Cv1tlXyo.js +0 -1031
- package/dist-lib/LayoutRenderer-d-tXYPze.js +0 -3239
- package/dist-lib/MenuItem-CfkVXPvC.js +0 -140
- package/dist-lib/MonacoJson-BG3S3GHX.js +0 -60
- package/dist-lib/Profile.impl-Cypk27ah.js +0 -527
- package/dist-lib/PropertyGridEditor-XrP6TZ5s.js +0 -4378
- package/dist-lib/RecordHeader-BfQ0_4wq.js +0 -217
- package/dist-lib/RefreshControl-CRdWPoF5.js +0 -195
- package/dist-lib/SSOCallbackPage.impl-Cfi2pQ59.js +0 -31
- package/dist-lib/SmartDetailPage.impl-BiIX0n7K.js +0 -1609
- package/dist-lib/SmartListPage.impl-Cu83Gv_G.js +0 -2818
- package/dist-lib/SmartRecordListPage.impl-DR6lq7HA.js +0 -795
- package/dist-lib/format-count-lyB4CPen.js +0 -943
- package/dist-lib/peekDraftStore-CaimrOhW.js +0 -200
- package/dist-lib/registry-CGe5kCXN.js +0 -119
- package/dist-lib/use-filter-value-labels-D3YDgUzg.js +0 -413
- package/dist-lib/useAgentConversation-rru-7hnF.js +0 -612
- package/dist-lib/useBranding-zcxEic2k.js +0 -41
- package/dist-lib/useBrandingChrome-bxaR3G1R.js +0 -170
- package/dist-lib/useCurrentScreen-BZOHBGQZ.js +0 -2522
- package/dist-lib/useImpersonation-DBIRRR70.js +0 -35
- package/dist-lib/useOwnRefresh-DJjaje52.js +0 -435
- package/dist-lib/useParams-BFLJi4n3.js +0 -133
- package/dist-lib/useProperties-B7opZ-iy.js +0 -81
- package/dist-lib/useScreenBack-DENlz844.js +0 -71
- package/dist-lib/useTabNavigate-CUqOmcMj.js +0 -78
- package/dist-lib/value-BuQVYx52.js +0 -194
- package/dist-lib/variants-vUtfBbE6.js +0 -1961
- /package/dist-lib/{JsonEditor-Dz1PQHC8.js → components/fields/JsonEditor.js} +0 -0
|
@@ -0,0 +1,609 @@
|
|
|
1
|
+
import { coerceDisplayString as e } from "../../lib/display-value.js";
|
|
2
|
+
import { extractPkValues as t, fieldDisplayName as n } from "../../types/schema.js";
|
|
3
|
+
import { textWithNodes as r } from "../../lib/language.js";
|
|
4
|
+
import { Icon as i } from "../primitives/Icons.js";
|
|
5
|
+
import { Btn as a } from "../primitives/Btn.js";
|
|
6
|
+
import { IconBtn as o } from "../primitives/IconBtn.js";
|
|
7
|
+
import { Pill as s } from "../primitives/Pill.js";
|
|
8
|
+
import { HoverCard as c } from "../primitives/HoverCard.js";
|
|
9
|
+
import { useText as l } from "../../hooks/useText.js";
|
|
10
|
+
import { Spinner as ee } from "../primitives/Spinner.js";
|
|
11
|
+
import { deleteObject as u, encodeObjectId as d, updateEntity as f } from "../../api/data.js";
|
|
12
|
+
import { failureTitle as p } from "../../lib/failure.js";
|
|
13
|
+
import { toast as m } from "../../lib/toast.js";
|
|
14
|
+
import { ENTITY_CHILDREN_KEY as te } from "../../hooks/useChildrenData.js";
|
|
15
|
+
import { renderField as h } from "../fields/index.js";
|
|
16
|
+
import { useTimelineData as g } from "../../hooks/useTimelineData.js";
|
|
17
|
+
import { TimelineComposer as _ } from "./TimelineComposer.js";
|
|
18
|
+
import { useCallback as v, useEffect as y, useLayoutEffect as b, useMemo as x, useRef as S, useState as C } from "react";
|
|
19
|
+
import { useMutation as w, useQueryClient as T } from "@tanstack/react-query";
|
|
20
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
21
|
+
//#region src/components/detail-layout/ChildrenTimeline.tsx
|
|
22
|
+
var k = 80, A = 200, j = 6, M = 2e4, N = 280;
|
|
23
|
+
function P(e) {
|
|
24
|
+
if (e.length > N) return !0;
|
|
25
|
+
let t = 0;
|
|
26
|
+
for (let n of e) if (n === "\n" && ++t >= j) return !0;
|
|
27
|
+
return !1;
|
|
28
|
+
}
|
|
29
|
+
function F(n, r) {
|
|
30
|
+
if (I(r)) {
|
|
31
|
+
let t = r.id;
|
|
32
|
+
return t == null ? "" : e(t);
|
|
33
|
+
}
|
|
34
|
+
return d(t(n, r));
|
|
35
|
+
}
|
|
36
|
+
function I(e) {
|
|
37
|
+
return e.__optimistic === !0;
|
|
38
|
+
}
|
|
39
|
+
function L({ config: e, parentEntity: t, parentId: n, schema: r }) {
|
|
40
|
+
let i = l(), o = l("errors"), s = r.entities[e.entity], { rows: c, refs: u, fetchNextPage: d, hasOlder: f, isFetchingOlder: p, isLoading: m, isError: te } = g(t, n, e.entity, e.foreign_key, e.timeline?.time_field, e.limit), h = e.timeline, w = h?.scroll ?? !1, T = (e.sort ?? "").endsWith(":asc"), j = x(() => T ? [...c].reverse() : c, [c, T]), M = h?.auto_scroll ?? "none", N = S(null), P = S(null), L = S(!1), z = S(0), U = S(null), W = S(null), G = S(!0), K = S(null);
|
|
41
|
+
y(() => {
|
|
42
|
+
L.current = !1, z.current = 0, U.current = null, W.current = null, G.current = !0, K.current = null;
|
|
43
|
+
}, [n]), b(() => {
|
|
44
|
+
p && N.current && (K.current = {
|
|
45
|
+
scrollHeight: N.current.scrollHeight,
|
|
46
|
+
scrollTop: N.current.scrollTop
|
|
47
|
+
});
|
|
48
|
+
}, [p]), b(() => {
|
|
49
|
+
let e = N.current;
|
|
50
|
+
if (!e || j.length === 0 || !s) {
|
|
51
|
+
z.current = j.length;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
let t = F(s, j[0]), n = F(s, j[j.length - 1]), r = !L.current, i = j.length > z.current && z.current > 0, a = i && (T && t !== U.current && n === W.current || !T && n !== W.current && t === U.current), o = i && !a;
|
|
55
|
+
if (r) T && M === "bottom" && (e.scrollTop = e.scrollHeight), L.current = !0;
|
|
56
|
+
else if (a && K.current) {
|
|
57
|
+
let t = K.current;
|
|
58
|
+
T && (e.scrollTop = t.scrollTop + (e.scrollHeight - t.scrollHeight)), K.current = null;
|
|
59
|
+
} else o && T && G.current && (e.scrollTop = e.scrollHeight);
|
|
60
|
+
z.current = j.length, U.current = t, W.current = n;
|
|
61
|
+
}, [
|
|
62
|
+
j,
|
|
63
|
+
M,
|
|
64
|
+
T,
|
|
65
|
+
s
|
|
66
|
+
]);
|
|
67
|
+
let q = v(() => {
|
|
68
|
+
let e = N.current;
|
|
69
|
+
e && (G.current = e.scrollHeight - e.scrollTop - e.clientHeight < k);
|
|
70
|
+
}, []);
|
|
71
|
+
y(() => {
|
|
72
|
+
let e = P.current;
|
|
73
|
+
if (!e || typeof IntersectionObserver > "u") return;
|
|
74
|
+
let t = new IntersectionObserver((e) => {
|
|
75
|
+
for (let t of e) t.isIntersecting && f && !p && d();
|
|
76
|
+
}, {
|
|
77
|
+
root: N.current ?? null,
|
|
78
|
+
rootMargin: `${A}px 0px 0px 0px`,
|
|
79
|
+
threshold: 0
|
|
80
|
+
});
|
|
81
|
+
return t.observe(e), () => t.disconnect();
|
|
82
|
+
}, [
|
|
83
|
+
f,
|
|
84
|
+
p,
|
|
85
|
+
d
|
|
86
|
+
]);
|
|
87
|
+
let [J, Y] = C(null);
|
|
88
|
+
if (!s) return /* @__PURE__ */ D("div", {
|
|
89
|
+
style: {
|
|
90
|
+
fontSize: 12.5,
|
|
91
|
+
color: "var(--text-3)",
|
|
92
|
+
padding: "8px 0"
|
|
93
|
+
},
|
|
94
|
+
children: o("record.related_entity_not_found", "The related record type is not declared in this deployment.")
|
|
95
|
+
});
|
|
96
|
+
let X = e.quick_add?.fields ?? [h?.content_field].filter(Boolean), Z = i(s.display?.name_plural) || i(s.display?.name) || e.entity, Q = f ? /* @__PURE__ */ D("div", {
|
|
97
|
+
style: {
|
|
98
|
+
display: "flex",
|
|
99
|
+
justifyContent: "center",
|
|
100
|
+
padding: "6px 0"
|
|
101
|
+
},
|
|
102
|
+
children: /* @__PURE__ */ D(a, {
|
|
103
|
+
size: "xs",
|
|
104
|
+
onClick: () => d(),
|
|
105
|
+
disabled: p,
|
|
106
|
+
icon: p ? /* @__PURE__ */ D(ee, { size: 11 }) : void 0,
|
|
107
|
+
children: p ? i("record.loading", "Loading…") : i("record.timeline.load_older", "Load older")
|
|
108
|
+
})
|
|
109
|
+
}) : null, ne = /* @__PURE__ */ D("div", {
|
|
110
|
+
ref: P,
|
|
111
|
+
"aria-hidden": "true",
|
|
112
|
+
style: { height: 1 }
|
|
113
|
+
}), $;
|
|
114
|
+
if (te) $ = /* @__PURE__ */ D("div", {
|
|
115
|
+
style: {
|
|
116
|
+
fontSize: 12.5,
|
|
117
|
+
color: "var(--danger)",
|
|
118
|
+
padding: 12
|
|
119
|
+
},
|
|
120
|
+
children: o("record.related_rows_unreadable", "The related records could not be loaded.")
|
|
121
|
+
});
|
|
122
|
+
else if (m) $ = /* @__PURE__ */ O("div", {
|
|
123
|
+
style: {
|
|
124
|
+
display: "flex",
|
|
125
|
+
flexDirection: "column",
|
|
126
|
+
gap: 8,
|
|
127
|
+
padding: 12
|
|
128
|
+
},
|
|
129
|
+
children: [/* @__PURE__ */ D("div", { style: {
|
|
130
|
+
height: 64,
|
|
131
|
+
background: "var(--surface-3)",
|
|
132
|
+
borderRadius: "var(--radius-md)"
|
|
133
|
+
} }), /* @__PURE__ */ D("div", { style: {
|
|
134
|
+
height: 64,
|
|
135
|
+
background: "var(--surface-3)",
|
|
136
|
+
borderRadius: "var(--radius-md)"
|
|
137
|
+
} })]
|
|
138
|
+
});
|
|
139
|
+
else if (j.length === 0) $ = /* @__PURE__ */ O(E, { children: [ne, /* @__PURE__ */ D("div", {
|
|
140
|
+
style: {
|
|
141
|
+
fontSize: 12.5,
|
|
142
|
+
color: "var(--text-3)",
|
|
143
|
+
padding: 12
|
|
144
|
+
},
|
|
145
|
+
children: i("record.timeline.empty", "No activity yet.")
|
|
146
|
+
})] });
|
|
147
|
+
else {
|
|
148
|
+
let a = (i, a) => {
|
|
149
|
+
let o = F(s, i) || String(a);
|
|
150
|
+
return /* @__PURE__ */ D(R, {
|
|
151
|
+
row: i,
|
|
152
|
+
rowId: o,
|
|
153
|
+
childEntity: s,
|
|
154
|
+
entityCode: e.entity,
|
|
155
|
+
parentEntity: t,
|
|
156
|
+
parentId: n,
|
|
157
|
+
timeline: h,
|
|
158
|
+
editableFields: X,
|
|
159
|
+
refs: u,
|
|
160
|
+
isEditing: J === o,
|
|
161
|
+
onStartEdit: () => Y(o),
|
|
162
|
+
onCancelEdit: () => Y(null),
|
|
163
|
+
onSaved: () => Y(null),
|
|
164
|
+
schema: r,
|
|
165
|
+
optimistic: I(i)
|
|
166
|
+
}, o);
|
|
167
|
+
}, o = h?.time_field, c;
|
|
168
|
+
if (o) {
|
|
169
|
+
let e = [];
|
|
170
|
+
j.forEach((t, n) => {
|
|
171
|
+
let r = t[o], a = B(r), s = e[e.length - 1];
|
|
172
|
+
!s || s.key !== a ? e.push({
|
|
173
|
+
key: a,
|
|
174
|
+
label: V(i, r),
|
|
175
|
+
rows: [{
|
|
176
|
+
row: t,
|
|
177
|
+
idx: n
|
|
178
|
+
}]
|
|
179
|
+
}) : s.rows.push({
|
|
180
|
+
row: t,
|
|
181
|
+
idx: n
|
|
182
|
+
});
|
|
183
|
+
}), c = e.map((e) => /* @__PURE__ */ O("div", {
|
|
184
|
+
style: {
|
|
185
|
+
display: "flex",
|
|
186
|
+
flexDirection: "column",
|
|
187
|
+
gap: 8
|
|
188
|
+
},
|
|
189
|
+
children: [/* @__PURE__ */ D(H, {
|
|
190
|
+
label: e.label,
|
|
191
|
+
count: e.rows.length
|
|
192
|
+
}), e.rows.map(({ row: e, idx: t }) => a(e, t))]
|
|
193
|
+
}, `day-${e.key}`));
|
|
194
|
+
} else c = j.map((e, t) => a(e, t));
|
|
195
|
+
$ = /* @__PURE__ */ O(E, { children: [
|
|
196
|
+
ne,
|
|
197
|
+
Q,
|
|
198
|
+
c
|
|
199
|
+
] });
|
|
200
|
+
}
|
|
201
|
+
return w ? /* @__PURE__ */ O("div", {
|
|
202
|
+
style: {
|
|
203
|
+
display: "flex",
|
|
204
|
+
flexDirection: "column",
|
|
205
|
+
height: "100%",
|
|
206
|
+
borderLeft: "1px solid var(--border)",
|
|
207
|
+
background: "var(--surface-2)",
|
|
208
|
+
color: "var(--text)"
|
|
209
|
+
},
|
|
210
|
+
children: [
|
|
211
|
+
/* @__PURE__ */ D("div", {
|
|
212
|
+
style: {
|
|
213
|
+
padding: "10px 16px",
|
|
214
|
+
borderBottom: "1px solid var(--divider)",
|
|
215
|
+
background: "var(--surface)"
|
|
216
|
+
},
|
|
217
|
+
children: /* @__PURE__ */ D("h3", {
|
|
218
|
+
style: {
|
|
219
|
+
margin: 0,
|
|
220
|
+
fontSize: 12.5,
|
|
221
|
+
fontWeight: 600
|
|
222
|
+
},
|
|
223
|
+
children: Z
|
|
224
|
+
})
|
|
225
|
+
}),
|
|
226
|
+
/* @__PURE__ */ D("div", {
|
|
227
|
+
ref: N,
|
|
228
|
+
onScroll: q,
|
|
229
|
+
style: {
|
|
230
|
+
flex: 1,
|
|
231
|
+
overflowY: "auto",
|
|
232
|
+
padding: 12,
|
|
233
|
+
display: "flex",
|
|
234
|
+
flexDirection: "column",
|
|
235
|
+
gap: 8
|
|
236
|
+
},
|
|
237
|
+
children: $
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ D(_, {
|
|
240
|
+
config: e,
|
|
241
|
+
parentEntity: t,
|
|
242
|
+
parentId: n,
|
|
243
|
+
schema: r
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
}) : /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("div", {
|
|
247
|
+
style: {
|
|
248
|
+
display: "flex",
|
|
249
|
+
flexDirection: "column",
|
|
250
|
+
gap: 8
|
|
251
|
+
},
|
|
252
|
+
children: $
|
|
253
|
+
}), /* @__PURE__ */ D(_, {
|
|
254
|
+
config: e,
|
|
255
|
+
parentEntity: t,
|
|
256
|
+
parentId: n,
|
|
257
|
+
schema: r
|
|
258
|
+
})] });
|
|
259
|
+
}
|
|
260
|
+
function R({ row: t, rowId: c, childEntity: d, entityCode: g, parentEntity: _, parentId: y, timeline: b, editableFields: x, refs: S, isEditing: E, onStartEdit: k, onCancelEdit: A, onSaved: j, schema: M, optimistic: N = !1 }) {
|
|
261
|
+
let P = l(), F = l("errors"), I = T(), [L, R] = C({}), B = v(() => {
|
|
262
|
+
I.invalidateQueries({ queryKey: [
|
|
263
|
+
te,
|
|
264
|
+
_,
|
|
265
|
+
y,
|
|
266
|
+
g
|
|
267
|
+
] });
|
|
268
|
+
}, [
|
|
269
|
+
I,
|
|
270
|
+
_,
|
|
271
|
+
y,
|
|
272
|
+
g
|
|
273
|
+
]), V = w({
|
|
274
|
+
mutationFn: (e) => {
|
|
275
|
+
let n = t.$row_version, r = typeof n == "string" && n !== "" ? {
|
|
276
|
+
...e,
|
|
277
|
+
$row_version: n
|
|
278
|
+
} : e;
|
|
279
|
+
return f(g, c, r);
|
|
280
|
+
},
|
|
281
|
+
onSuccess: () => {
|
|
282
|
+
B(), m.success(P("record.timeline.updated", "Updated")), j();
|
|
283
|
+
},
|
|
284
|
+
onError: (e) => m.error(p(F, e))
|
|
285
|
+
}), H = w({
|
|
286
|
+
mutationFn: () => u(g, c),
|
|
287
|
+
onSuccess: () => {
|
|
288
|
+
B(), m.success(P("record.timeline.deleted", "Deleted"));
|
|
289
|
+
},
|
|
290
|
+
onError: (e) => m.error(p(F, e))
|
|
291
|
+
}), W = v(() => {
|
|
292
|
+
let e = {};
|
|
293
|
+
for (let n of x) e[n] = t[n] ?? "";
|
|
294
|
+
R(e), k();
|
|
295
|
+
}, [
|
|
296
|
+
t,
|
|
297
|
+
x,
|
|
298
|
+
k
|
|
299
|
+
]), G = v((e, t) => {
|
|
300
|
+
R((n) => ({
|
|
301
|
+
...n,
|
|
302
|
+
[e]: t
|
|
303
|
+
}));
|
|
304
|
+
}, []), K = b?.time_field, q = b?.type_field, J = b?.summary_field, Y = b?.content_field, X = b?.author_field, Z = b?.direction_field, Q = b?.intent_field;
|
|
305
|
+
return E ? /* @__PURE__ */ O("div", {
|
|
306
|
+
style: {
|
|
307
|
+
borderRadius: "var(--radius-lg)",
|
|
308
|
+
border: "1px solid var(--accent)",
|
|
309
|
+
background: "var(--surface)",
|
|
310
|
+
padding: 12,
|
|
311
|
+
display: "flex",
|
|
312
|
+
flexDirection: "column",
|
|
313
|
+
gap: 8
|
|
314
|
+
},
|
|
315
|
+
children: [x.map((e) => {
|
|
316
|
+
let t = d.fields.get(e);
|
|
317
|
+
return t ? /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
318
|
+
style: {
|
|
319
|
+
fontSize: 11,
|
|
320
|
+
color: "var(--text-3)",
|
|
321
|
+
marginBottom: 4,
|
|
322
|
+
display: "block"
|
|
323
|
+
},
|
|
324
|
+
children: n(P, t, e, M.entities)
|
|
325
|
+
}), h({
|
|
326
|
+
field: t,
|
|
327
|
+
fieldName: e,
|
|
328
|
+
value: L[e] ?? "",
|
|
329
|
+
mode: "edit",
|
|
330
|
+
onChange: (t) => G(e, t),
|
|
331
|
+
record: L,
|
|
332
|
+
t: P
|
|
333
|
+
})] }, e) : null;
|
|
334
|
+
}), /* @__PURE__ */ O("div", {
|
|
335
|
+
style: {
|
|
336
|
+
display: "flex",
|
|
337
|
+
alignItems: "center",
|
|
338
|
+
gap: 6,
|
|
339
|
+
paddingTop: 4
|
|
340
|
+
},
|
|
341
|
+
children: [/* @__PURE__ */ D(a, {
|
|
342
|
+
kind: "primary",
|
|
343
|
+
size: "xs",
|
|
344
|
+
icon: V.isPending ? /* @__PURE__ */ D(ee, { size: 12 }) : /* @__PURE__ */ D(i.check, { size: 12 }),
|
|
345
|
+
onClick: () => V.mutate(L),
|
|
346
|
+
disabled: V.isPending,
|
|
347
|
+
children: V.isPending ? P("dialog.saving", "Saving…") : P("dialog.save", "Save")
|
|
348
|
+
}), /* @__PURE__ */ D(a, {
|
|
349
|
+
size: "xs",
|
|
350
|
+
icon: /* @__PURE__ */ D(i.x, { size: 12 }),
|
|
351
|
+
onClick: () => {
|
|
352
|
+
R({}), A();
|
|
353
|
+
},
|
|
354
|
+
disabled: V.isPending,
|
|
355
|
+
children: P("dialog.cancel", "Cancel")
|
|
356
|
+
})]
|
|
357
|
+
})]
|
|
358
|
+
}) : /* @__PURE__ */ O("div", {
|
|
359
|
+
className: "group",
|
|
360
|
+
"data-optimistic": N || void 0,
|
|
361
|
+
style: {
|
|
362
|
+
borderRadius: "var(--radius-lg)",
|
|
363
|
+
border: "1px solid var(--border)",
|
|
364
|
+
background: "var(--surface)",
|
|
365
|
+
padding: 12,
|
|
366
|
+
transition: "border-color .12s",
|
|
367
|
+
opacity: N ? .6 : 1
|
|
368
|
+
},
|
|
369
|
+
onMouseEnter: (e) => e.currentTarget.style.borderColor = "var(--border-strong)",
|
|
370
|
+
onMouseLeave: (e) => e.currentTarget.style.borderColor = "var(--border)",
|
|
371
|
+
children: [
|
|
372
|
+
/* @__PURE__ */ O("div", {
|
|
373
|
+
style: {
|
|
374
|
+
display: "flex",
|
|
375
|
+
alignItems: "center",
|
|
376
|
+
gap: 6,
|
|
377
|
+
flexWrap: "wrap",
|
|
378
|
+
fontSize: 11.5,
|
|
379
|
+
color: "var(--text-3)"
|
|
380
|
+
},
|
|
381
|
+
children: [
|
|
382
|
+
K && t[K] != null && d.fields.get(K) && /* @__PURE__ */ D("span", {
|
|
383
|
+
style: { fontWeight: 500 },
|
|
384
|
+
children: h({
|
|
385
|
+
field: d.fields.get(K),
|
|
386
|
+
fieldName: K,
|
|
387
|
+
value: t[K],
|
|
388
|
+
mode: "display",
|
|
389
|
+
record: t,
|
|
390
|
+
refs: S,
|
|
391
|
+
t: P
|
|
392
|
+
})
|
|
393
|
+
}),
|
|
394
|
+
q && t[q] != null && d.fields.get(q) && /* @__PURE__ */ D(s, {
|
|
395
|
+
tone: "slate",
|
|
396
|
+
size: "xs",
|
|
397
|
+
children: h({
|
|
398
|
+
field: d.fields.get(q),
|
|
399
|
+
fieldName: q,
|
|
400
|
+
value: t[q],
|
|
401
|
+
mode: "display",
|
|
402
|
+
record: t,
|
|
403
|
+
refs: S,
|
|
404
|
+
t: P
|
|
405
|
+
})
|
|
406
|
+
}),
|
|
407
|
+
Z && t[Z] != null && d.fields.get(Z) && /* @__PURE__ */ D(U, {
|
|
408
|
+
value: t[Z],
|
|
409
|
+
field: d.fields.get(Z)
|
|
410
|
+
}),
|
|
411
|
+
Q && t[Q] != null && d.fields.get(Q) && /* @__PURE__ */ D(s, {
|
|
412
|
+
tone: "slate",
|
|
413
|
+
size: "xs",
|
|
414
|
+
children: h({
|
|
415
|
+
field: d.fields.get(Q),
|
|
416
|
+
fieldName: Q,
|
|
417
|
+
value: t[Q],
|
|
418
|
+
mode: "display",
|
|
419
|
+
record: t,
|
|
420
|
+
refs: S,
|
|
421
|
+
t: P
|
|
422
|
+
})
|
|
423
|
+
}),
|
|
424
|
+
X && t[X] != null && d.fields.get(X) && /* @__PURE__ */ D("span", { children: r(P("record.timeline.by_author", "by {author}"), { author: h({
|
|
425
|
+
field: d.fields.get(X),
|
|
426
|
+
fieldName: X,
|
|
427
|
+
value: t[X],
|
|
428
|
+
mode: "display",
|
|
429
|
+
record: t,
|
|
430
|
+
refs: S,
|
|
431
|
+
t: P
|
|
432
|
+
}) }) }),
|
|
433
|
+
!N && /* @__PURE__ */ O("div", {
|
|
434
|
+
style: {
|
|
435
|
+
marginLeft: "auto",
|
|
436
|
+
display: "flex",
|
|
437
|
+
alignItems: "center",
|
|
438
|
+
gap: 2
|
|
439
|
+
},
|
|
440
|
+
children: [/* @__PURE__ */ D(o, {
|
|
441
|
+
size: 22,
|
|
442
|
+
icon: /* @__PURE__ */ D(i.edit, { size: 11 }),
|
|
443
|
+
onClick: W,
|
|
444
|
+
title: P("record.action.edit", "Edit")
|
|
445
|
+
}), /* @__PURE__ */ D(o, {
|
|
446
|
+
size: 22,
|
|
447
|
+
icon: /* @__PURE__ */ D(i.trash, { size: 11 }),
|
|
448
|
+
onClick: () => H.mutate(),
|
|
449
|
+
title: P("record.action.delete", "Delete")
|
|
450
|
+
})]
|
|
451
|
+
})
|
|
452
|
+
]
|
|
453
|
+
}),
|
|
454
|
+
J && t[J] != null && d.fields.get(J) && /* @__PURE__ */ D("div", {
|
|
455
|
+
style: {
|
|
456
|
+
fontSize: 12.5,
|
|
457
|
+
fontWeight: 500,
|
|
458
|
+
marginTop: 6
|
|
459
|
+
},
|
|
460
|
+
children: h({
|
|
461
|
+
field: d.fields.get(J),
|
|
462
|
+
fieldName: J,
|
|
463
|
+
value: t[J],
|
|
464
|
+
mode: "display",
|
|
465
|
+
record: t,
|
|
466
|
+
refs: S,
|
|
467
|
+
t: P
|
|
468
|
+
})
|
|
469
|
+
}),
|
|
470
|
+
Y && t[Y] != null && Y !== J && d.fields.get(Y) && /* @__PURE__ */ D(z, {
|
|
471
|
+
rendered: h({
|
|
472
|
+
field: d.fields.get(Y),
|
|
473
|
+
fieldName: Y,
|
|
474
|
+
value: t[Y],
|
|
475
|
+
mode: "display",
|
|
476
|
+
record: t,
|
|
477
|
+
refs: S,
|
|
478
|
+
t: P
|
|
479
|
+
}),
|
|
480
|
+
text: e(t[Y])
|
|
481
|
+
})
|
|
482
|
+
]
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
function z({ rendered: e, text: t }) {
|
|
486
|
+
let n = l(), r = {
|
|
487
|
+
fontSize: 12.5,
|
|
488
|
+
fontWeight: 400,
|
|
489
|
+
marginTop: 6
|
|
490
|
+
};
|
|
491
|
+
if (!P(t)) return /* @__PURE__ */ D("div", {
|
|
492
|
+
style: r,
|
|
493
|
+
children: e
|
|
494
|
+
});
|
|
495
|
+
let i = t.length > M, a = i ? t.slice(0, M) : t;
|
|
496
|
+
return /* @__PURE__ */ D("div", {
|
|
497
|
+
style: {
|
|
498
|
+
...r,
|
|
499
|
+
display: "-webkit-box",
|
|
500
|
+
WebkitBoxOrient: "vertical",
|
|
501
|
+
WebkitLineClamp: j,
|
|
502
|
+
overflow: "hidden",
|
|
503
|
+
whiteSpace: "pre-wrap",
|
|
504
|
+
overflowWrap: "anywhere"
|
|
505
|
+
},
|
|
506
|
+
children: /* @__PURE__ */ D(c, {
|
|
507
|
+
width: 380,
|
|
508
|
+
content: /* @__PURE__ */ O("div", {
|
|
509
|
+
style: {
|
|
510
|
+
fontSize: 12.5,
|
|
511
|
+
whiteSpace: "pre-wrap",
|
|
512
|
+
overflowWrap: "anywhere"
|
|
513
|
+
},
|
|
514
|
+
children: [a, i && /* @__PURE__ */ D("div", {
|
|
515
|
+
style: {
|
|
516
|
+
marginTop: 8,
|
|
517
|
+
fontSize: 11,
|
|
518
|
+
color: "var(--text-3)"
|
|
519
|
+
},
|
|
520
|
+
children: n("record.timeline.truncated", "Truncated for display - open the record for the full text.")
|
|
521
|
+
})]
|
|
522
|
+
}),
|
|
523
|
+
children: e
|
|
524
|
+
})
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
function B(t) {
|
|
528
|
+
if (t == null) return "";
|
|
529
|
+
let n = new Date(e(t));
|
|
530
|
+
return Number.isNaN(n.getTime()) ? "" : `${n.getFullYear()}-${n.getMonth()}-${n.getDate()}`;
|
|
531
|
+
}
|
|
532
|
+
function V(t, n) {
|
|
533
|
+
if (n == null) return "—";
|
|
534
|
+
let r = new Date(e(n));
|
|
535
|
+
if (Number.isNaN(r.getTime())) return "—";
|
|
536
|
+
let i = /* @__PURE__ */ new Date(), a = /* @__PURE__ */ new Date();
|
|
537
|
+
a.setDate(i.getDate() - 1);
|
|
538
|
+
let o = (e, t) => e.toDateString() === t.toDateString();
|
|
539
|
+
return o(r, i) ? t("record.timeline.today", "Today") : o(r, a) ? t("record.timeline.yesterday", "Yesterday") : r.toLocaleDateString(t.language, {
|
|
540
|
+
weekday: "short",
|
|
541
|
+
month: "short",
|
|
542
|
+
day: "numeric"
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
function H({ label: e, count: t }) {
|
|
546
|
+
return /* @__PURE__ */ O("div", {
|
|
547
|
+
style: {
|
|
548
|
+
position: "sticky",
|
|
549
|
+
top: -4,
|
|
550
|
+
zIndex: 1,
|
|
551
|
+
display: "flex",
|
|
552
|
+
alignItems: "center",
|
|
553
|
+
gap: 8,
|
|
554
|
+
padding: "4px 2px",
|
|
555
|
+
background: "linear-gradient(180deg, var(--surface-2) 0%, var(--surface-2) 65%, transparent 100%)"
|
|
556
|
+
},
|
|
557
|
+
children: [
|
|
558
|
+
/* @__PURE__ */ D("span", {
|
|
559
|
+
style: {
|
|
560
|
+
fontSize: 11,
|
|
561
|
+
fontWeight: 600,
|
|
562
|
+
color: "var(--text-3)"
|
|
563
|
+
},
|
|
564
|
+
children: e
|
|
565
|
+
}),
|
|
566
|
+
/* @__PURE__ */ D("span", { style: {
|
|
567
|
+
flex: 1,
|
|
568
|
+
height: 1,
|
|
569
|
+
background: "var(--divider)"
|
|
570
|
+
} }),
|
|
571
|
+
/* @__PURE__ */ D("span", {
|
|
572
|
+
className: "num",
|
|
573
|
+
style: {
|
|
574
|
+
fontSize: 10.5,
|
|
575
|
+
color: "var(--text-4)"
|
|
576
|
+
},
|
|
577
|
+
children: t
|
|
578
|
+
})
|
|
579
|
+
]
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
function U({ value: e, field: t }) {
|
|
583
|
+
let n = l(), r = W(e, t);
|
|
584
|
+
return r === null ? null : /* @__PURE__ */ O("span", {
|
|
585
|
+
style: {
|
|
586
|
+
display: "inline-flex",
|
|
587
|
+
alignItems: "center",
|
|
588
|
+
gap: 3,
|
|
589
|
+
padding: "1px 6px 1px 4px",
|
|
590
|
+
borderRadius: 999,
|
|
591
|
+
fontSize: 10.5,
|
|
592
|
+
fontWeight: 600,
|
|
593
|
+
background: r ? "var(--accent-soft)" : "var(--info-soft)",
|
|
594
|
+
color: r ? "var(--accent)" : "var(--info)"
|
|
595
|
+
},
|
|
596
|
+
children: [D(r ? i.arrowUp : i.arrowDown, { size: 10 }), r ? n("record.timeline.outbound", "Out") : n("record.timeline.inbound", "In")]
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
function W(e, t) {
|
|
600
|
+
if (t.type === "bool") return e === !0;
|
|
601
|
+
if (typeof e == "string") {
|
|
602
|
+
let t = e.toLowerCase();
|
|
603
|
+
if (t === "outbound" || t === "out") return !0;
|
|
604
|
+
if (t === "inbound" || t === "in") return !1;
|
|
605
|
+
}
|
|
606
|
+
return null;
|
|
607
|
+
}
|
|
608
|
+
//#endregion
|
|
609
|
+
export { L as ChildrenTimeline };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useText as e } from "../../hooks/useText.js";
|
|
2
|
+
import { renderSchemaField as t } from "../file-widgets/host.js";
|
|
3
|
+
import { AuditMetaStrip as n } from "../chrome/AuditMetaStrip.js";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/detail-layout/DetailAuditStrip.tsx
|
|
6
|
+
function i({ screen: i, entity: a, entityCode: o, record: s, refs: c, schema: l }) {
|
|
7
|
+
let u = e(), d = i.audit;
|
|
8
|
+
if (d?.enabled === !1) return null;
|
|
9
|
+
let f = (e) => {
|
|
10
|
+
if (!e || !a.fields.get(e)) return;
|
|
11
|
+
let n = s[e];
|
|
12
|
+
if (n != null && n !== "") return t({
|
|
13
|
+
entity: a,
|
|
14
|
+
entityCode: o,
|
|
15
|
+
fieldName: e,
|
|
16
|
+
record: s,
|
|
17
|
+
mode: "display",
|
|
18
|
+
refs: c,
|
|
19
|
+
entities: l.entities,
|
|
20
|
+
screens: l.screens,
|
|
21
|
+
surface: "list",
|
|
22
|
+
t: u
|
|
23
|
+
});
|
|
24
|
+
}, p = d?.lines && d.lines.length > 0 ? d.lines.map((e) => ({
|
|
25
|
+
label: u(e.label),
|
|
26
|
+
at: f(e.at),
|
|
27
|
+
by: f(e.by)
|
|
28
|
+
})) : [{
|
|
29
|
+
label: u("record.audit.created", "Created"),
|
|
30
|
+
at: f("created_at"),
|
|
31
|
+
by: f("created_by")
|
|
32
|
+
}, {
|
|
33
|
+
label: u("record.audit.updated", "Updated"),
|
|
34
|
+
at: f("updated_at"),
|
|
35
|
+
by: f("updated_by")
|
|
36
|
+
}];
|
|
37
|
+
return /* @__PURE__ */ r(n, { lines: p });
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { i as DetailAuditStrip };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Pill as e } from "../primitives/Pill.js";
|
|
2
|
+
import { useText as t } from "../../hooks/useText.js";
|
|
3
|
+
import { CopyButton as n } from "../shared/CopyButton.js";
|
|
4
|
+
import { renderSchemaField as r, resolveSchemaFieldLabel as i } from "../file-widgets/host.js";
|
|
5
|
+
import { copyableValue as a } from "./FieldRow.js";
|
|
6
|
+
import { HighlightsStrip as o } from "../chrome/HighlightsStrip.js";
|
|
7
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/detail-layout/DetailHighlights.tsx
|
|
9
|
+
function u({ screen: u, entity: d, entityCode: f, record: p, refs: m, objectStatuses: h, schema: g }) {
|
|
10
|
+
let _ = t(), v = u.highlights;
|
|
11
|
+
if (!v || v.length === 0) return null;
|
|
12
|
+
let y = [];
|
|
13
|
+
for (let t of v) {
|
|
14
|
+
let o = d.status_groups?.[t];
|
|
15
|
+
if (o) {
|
|
16
|
+
let n = h?.find((e) => e.group_code === t), r = n ? o.statuses.find((e) => e.code === n.status_code) : void 0;
|
|
17
|
+
y.push({
|
|
18
|
+
label: _(o.name),
|
|
19
|
+
value: r ? /* @__PURE__ */ c(e, {
|
|
20
|
+
tone: r.color ?? "slate",
|
|
21
|
+
size: "xs",
|
|
22
|
+
children: _(r.name)
|
|
23
|
+
}) : /* @__PURE__ */ c("span", {
|
|
24
|
+
style: { color: "var(--text-4)" },
|
|
25
|
+
children: "—"
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
} else if (d.fields.get(t) || d.files?.get(t)) {
|
|
29
|
+
let e = r({
|
|
30
|
+
entity: d,
|
|
31
|
+
entityCode: f,
|
|
32
|
+
fieldName: t,
|
|
33
|
+
record: p,
|
|
34
|
+
mode: "display",
|
|
35
|
+
refs: m,
|
|
36
|
+
entities: g.entities,
|
|
37
|
+
screens: g.screens,
|
|
38
|
+
surface: "list",
|
|
39
|
+
t: _
|
|
40
|
+
}), o = a(d.fields.get(t), p[t]);
|
|
41
|
+
y.push({
|
|
42
|
+
label: i(_, d, t, g.entities),
|
|
43
|
+
value: o ? /* @__PURE__ */ l(s, { children: [e, /* @__PURE__ */ c(n, {
|
|
44
|
+
value: o,
|
|
45
|
+
size: "sm",
|
|
46
|
+
title: _("record.field.copy_value", "Copy value")
|
|
47
|
+
})] }) : e
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return y.length === 0 ? null : /* @__PURE__ */ c(o, { items: y });
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { u as DetailHighlights };
|