@declarion/react 0.141.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,87 +1,87 @@
|
|
|
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 {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import { useCallback as
|
|
63
|
-
import { Fragment as
|
|
64
|
-
import { useLocation as
|
|
65
|
-
|
|
66
|
-
var
|
|
67
|
-
function
|
|
1
|
+
import { useFirstScreenSettled as e } from "../../lib/capabilityPrefetch.js";
|
|
2
|
+
import { formatOffsetTimestamp as t, formatWireDateTime as n } from "../../lib/timestamp.js";
|
|
3
|
+
import { Btn as r } from "../primitives/Btn.js";
|
|
4
|
+
import { Icon as i } from "../primitives/Icons.js";
|
|
5
|
+
import { IconBtn as a } from "../primitives/IconBtn.js";
|
|
6
|
+
import { Spinner as o } from "../primitives/Spinner.js";
|
|
7
|
+
import { RetryButton as s } from "../primitives/RetryButton.js";
|
|
8
|
+
import { readDisplayState as c } from "../../lib/read-display-state.js";
|
|
9
|
+
import { failureTitle as l } from "../../lib/failure.js";
|
|
10
|
+
import { useSchema as u } from "../../hooks/useSchema.js";
|
|
11
|
+
import { useAuthStore as ee } from "../../stores/auth.js";
|
|
12
|
+
import { objectQueryKey as d, useObject as f } from "../../hooks/useObject.js";
|
|
13
|
+
import { useRegisterRetainedQuery as p } from "../../hooks/usePageStateRuntime.js";
|
|
14
|
+
import { usePlainScrollRestoration as te } from "../../lib/scroll-restoration.js";
|
|
15
|
+
import { canonicalUrl as ne } from "../../lib/canonical-url.js";
|
|
16
|
+
import { usePageStateStore as re } from "../../stores/page-state.js";
|
|
17
|
+
import { useCreateObject as m, useRestoreEntity as h, useUpdateObject as ie } from "../../hooks/useMutations.js";
|
|
18
|
+
import { useResponsiveMode as ae } from "../../hooks/useResponsiveMode.js";
|
|
19
|
+
import { useBrandingChrome as oe } from "../../hooks/useBrandingChrome.js";
|
|
20
|
+
import { ApiError as se } from "../../types/api.js";
|
|
21
|
+
import { DetailSkeleton as ce } from "../shared/LoadingSkeleton.js";
|
|
22
|
+
import { useActionRunner as le } from "../actions/ActionRunner.js";
|
|
23
|
+
import { buildActionBody as g, executeAction as ue } from "../../api/data.js";
|
|
24
|
+
import { AssociationTabs as de } from "../chrome/AssociationTabs.js";
|
|
25
|
+
import { useTabStore as fe } from "../../stores/tabs.js";
|
|
26
|
+
import { applyRowState as pe, resolveActionLayoutForSlot as _ } from "../../lib/actions.js";
|
|
27
|
+
import { effectiveScreenForRecord as me, variantActionCodesForRecord as he } from "../../lib/variants.js";
|
|
28
|
+
import { dispatchAction as v } from "../../lib/action-dispatch.js";
|
|
29
|
+
import { ResponsiveActionBar as y } from "../actions/ResponsiveActionBar.js";
|
|
30
|
+
import { RefreshControl as b } from "../shared/RefreshControl.js";
|
|
31
|
+
import { DocumentsMenu as x } from "./DocumentsMenu.js";
|
|
32
|
+
import { RecordPanels as ge } from "./RecordPanels.js";
|
|
33
|
+
import { canManageDocumentTemplates as _e } from "../../lib/document-templates.js";
|
|
34
|
+
import { useTabNavigate as S } from "../../hooks/useTabNavigate.js";
|
|
35
|
+
import { useScreenBack as ve } from "../../hooks/useScreenBack.js";
|
|
36
|
+
import { useEmbed as ye } from "../../embed/EmbedContext.js";
|
|
37
|
+
import { useEmbedNavigate as be } from "../../embed/useEmbedNavigate.js";
|
|
38
|
+
import { useReportEmbedDirty as xe } from "../../embed/embed-dirty.js";
|
|
39
|
+
import { useScreenIsLive as C } from "../../stores/realtime.js";
|
|
40
|
+
import { entityAllowsCreateRoute as Se, entityAllowsMutation as Ce, extractPkValues as we, fieldDisplayName as w, getDisplayValue as Te, getPrimaryKeyFields as Ee, isUserEditableField as De, pkValuesFromId as Oe, pkValuesToId as ke, resolveRefRecordLabel as T, rowAllowsMutation as Ae, rowSetInTenant as je } from "../../types/schema.js";
|
|
41
|
+
import { LayoutRenderer as E } from "../detail-layout/LayoutRenderer.js";
|
|
42
|
+
import { ErrorSummary as Me } from "../detail-layout/ErrorSummary.js";
|
|
43
|
+
import { DetailHighlights as Ne, highlightedFieldCodes as Pe } from "../detail-layout/DetailHighlights.js";
|
|
44
|
+
import { DetailAuditStrip as Fe } from "../detail-layout/DetailAuditStrip.js";
|
|
45
|
+
import { StatusGroupsDisplay as Ie } from "../shared/StatusGroupsDisplay.js";
|
|
46
|
+
import { EvidenceBlock as Le } from "../detail-layout/EvidenceBlock.js";
|
|
47
|
+
import { RecordHeader as Re } from "../chrome/RecordHeader.js";
|
|
48
|
+
import { PageShell as ze } from "../chrome/PageShell.js";
|
|
49
|
+
import { DynamicIcon as Be } from "../shared/DynamicIcon.js";
|
|
50
|
+
import { findInvalidEmailFields as Ve, findMissingRequiredFields as He, validatePendingChildren as Ue } from "../../lib/children-validation.js";
|
|
51
|
+
import { takePeekDraft as We } from "../list/peekDraftStore.js";
|
|
52
|
+
import { coerceDisplayString as D } from "../../lib/display-value.js";
|
|
53
|
+
import { FileDraftScope as O, useFileDraftScope as Ge } from "../file-widgets/draft-scope.js";
|
|
54
|
+
import { discardFile as Ke } from "../file-widgets/upload.js";
|
|
55
|
+
import { buildFilesPayload as qe, collectCommittedFileIds as Je } from "../file-widgets/payload.js";
|
|
56
|
+
import { getEntityFileField as Ye, getSchemaFieldValue as Xe, serializeSchemaFieldValue as k } from "../file-widgets/host.js";
|
|
57
|
+
import { resolveCard as Ze } from "./list/cardProjection.js";
|
|
58
|
+
import { useText as Qe } from "../../hooks/useText.js";
|
|
59
|
+
import { useRowTenant as $e } from "../../hooks/useRowTenant.js";
|
|
60
|
+
import { useUnsavedInput as et } from "../../hooks/useUnsavedInput.js";
|
|
61
|
+
import { showsOnNewRecord as tt } from "../../lib/child-config.js";
|
|
62
|
+
import { useCallback as A, useEffect as j, useMemo as M, useRef as N, useState as P } from "react";
|
|
63
|
+
import { Fragment as nt, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
64
|
+
import { useLocation as rt, useParams as it, useSearchParams as at } from "react-router";
|
|
65
|
+
// src/components/pages/SmartDetailPage.impl.tsx
|
|
66
|
+
var ot = () => {}, st = { expand: ["evidence"] };
|
|
67
|
+
function L(e, t) {
|
|
68
68
|
return e.length === t.length && JSON.stringify(e) === JSON.stringify(t);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
let c = {}, l =
|
|
70
|
+
function ct({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, pendingProperties: a, pendingChildren: o, childrenSnapshot: s }) {
|
|
71
|
+
let c = {}, l = qe({
|
|
72
72
|
entity: e,
|
|
73
73
|
formData: t,
|
|
74
74
|
record: n,
|
|
75
75
|
isNew: r
|
|
76
|
-
}), u =
|
|
76
|
+
}), u = Je(l);
|
|
77
77
|
if (r) for (let [n, r] of Object.entries(t)) {
|
|
78
78
|
if (e.files?.has(n)) continue;
|
|
79
|
-
let t =
|
|
79
|
+
let t = k(e, n, r);
|
|
80
80
|
t !== "" && t != null && (c[n] = t);
|
|
81
81
|
}
|
|
82
82
|
else for (let [r, i] of Object.entries(t)) {
|
|
83
83
|
if (e.files?.has(r)) continue;
|
|
84
|
-
let t = n ?
|
|
84
|
+
let t = n ? Xe(e, n, r) : void 0, a = k(e, r, i), o = k(e, r, t);
|
|
85
85
|
(a === "" ? null : a) !== (o === "" || o === void 0 ? null : o) && (c[r] = a);
|
|
86
86
|
}
|
|
87
87
|
if (Object.keys(l).length > 0 && (c.$files = l), Object.keys(i).length > 0 && (c.$statuses = Object.entries(i).map(([e, t]) => ({
|
|
@@ -97,7 +97,7 @@ function dt({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, p
|
|
|
97
97
|
let { _key: t, _deleted: n, _dirty: r, ...i } = e;
|
|
98
98
|
return i;
|
|
99
99
|
}), a = s?.[t] ?? [];
|
|
100
|
-
(r || !
|
|
100
|
+
(r || !L(i, a)) && (e[t] = i);
|
|
101
101
|
}
|
|
102
102
|
Object.keys(e).length > 0 && (c.$children = e);
|
|
103
103
|
}
|
|
@@ -106,322 +106,322 @@ function dt({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, p
|
|
|
106
106
|
committedFileIds: u
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function lt(e, t) {
|
|
110
110
|
if (e) {
|
|
111
|
-
let
|
|
111
|
+
let n = we(e, t), r = ke(n);
|
|
112
112
|
if (r.replace(/^\|+|\|+$/g, "")) return r;
|
|
113
113
|
}
|
|
114
|
-
return
|
|
114
|
+
return t.id == null ? crypto.randomUUID() : D(t.id);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
return /* @__PURE__ */
|
|
116
|
+
function ut({ screenCode: e }) {
|
|
117
|
+
return /* @__PURE__ */ F(O, { children: /* @__PURE__ */ F(dt, { screenCode: e }) });
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
let
|
|
119
|
+
function dt({ screenCode: r }) {
|
|
120
|
+
let o = Qe(), oe = Qe("errors"), { id: le } = it(), g = be(), [ue, pe] = at(), { data: _ } = u(), he = ee((e) => e.user), v = Ge(), y = ae(), b = _?.screens[r], x = b?.entity ? _?.entities[b.entity] : void 0, S = b?.entity, T = Ce(x, "create"), Re = $e(x), Be = (() => {
|
|
121
121
|
if (!x || !x.singleton || !x.prefilter) return;
|
|
122
|
-
let e =
|
|
122
|
+
let e = Ee(x);
|
|
123
123
|
if (e.length !== 1) return;
|
|
124
124
|
let t = x.prefilter[e[0]];
|
|
125
|
-
if (t === "$caller.user_id") return
|
|
126
|
-
if (t === "$caller.tenant_id") return
|
|
127
|
-
})(),
|
|
128
|
-
if (!
|
|
129
|
-
if (!x) return
|
|
130
|
-
let e =
|
|
131
|
-
if (e.length === 1) return { [e[0]]:
|
|
132
|
-
let t =
|
|
125
|
+
if (t === "$caller.user_id") return he?.id;
|
|
126
|
+
if (t === "$caller.tenant_id") return he?.tenant?.id;
|
|
127
|
+
})(), D = Be !== void 0, O = D ? Be : le, k = !D && O === "new", L = M(() => {
|
|
128
|
+
if (!O || k) return;
|
|
129
|
+
if (!x) return O;
|
|
130
|
+
let e = Ee(x);
|
|
131
|
+
if (e.length === 1) return { [e[0]]: O };
|
|
132
|
+
let t = Oe(O, e.length);
|
|
133
133
|
if (!t) return;
|
|
134
134
|
let n = {};
|
|
135
135
|
for (let r = 0; r < e.length; r++) n[e[r]] = t[r] ?? "";
|
|
136
136
|
return n;
|
|
137
137
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
O,
|
|
139
|
+
k,
|
|
140
140
|
x
|
|
141
|
-
]),
|
|
142
|
-
if (
|
|
143
|
-
}, [
|
|
144
|
-
|
|
145
|
-
let
|
|
146
|
-
|
|
147
|
-
let
|
|
148
|
-
|
|
149
|
-
let [
|
|
141
|
+
]), ut = M(() => {
|
|
142
|
+
if (L) return typeof L == "string" ? L : ke(L);
|
|
143
|
+
}, [L]), dt = f(S, L, st), { data: R, isLoading: pt, error: ht } = dt, z = c(dt), vt = !k && z.error !== null && !(z.error instanceof se && z.error.status === 404);
|
|
144
|
+
e(!pt);
|
|
145
|
+
let yt = C(x?.realtime, S ?? ""), bt = S ? yt : !1;
|
|
146
|
+
p(d(S, L, st), !k);
|
|
147
|
+
let xt = m(S ?? ""), St = ie(S ?? ""), Ct = h(S ?? ""), wt = Object.keys(x?.status_groups ?? {}).length > 0, B = R?.data, V = Ae(x, "update", B, Re.tenantId), Tt = !!B && Ce(x, "update") && !je(x, B, Re.tenantId), Et = Ae(x, "restore", B, Re.tenantId), Dt = B?.$statuses, Ot = B?.$properties, kt = ue.get("edit") === "true", [At, jt] = P(k || kt), [H, Mt] = P({}), [U, Nt] = P({}), [Pt, Ft] = P({}), [W, G] = P(void 0), [It, Lt] = P(!1), [Rt, zt] = P(void 0), [Bt, Vt] = P(!1), Ht = k ? T : V, K = At && Ht, Ut = ye();
|
|
148
|
+
xe(K && !k, Ut.enabled);
|
|
149
|
+
let [Wt, Gt] = P(() => {
|
|
150
150
|
let e = parseInt(b?.sidebar_width || "380", 10);
|
|
151
151
|
return isNaN(e) ? 380 : e;
|
|
152
|
-
}),
|
|
152
|
+
}), Kt = N(null), q = N(null), qt = A((e) => {
|
|
153
153
|
e.preventDefault();
|
|
154
|
-
let t =
|
|
154
|
+
let t = Kt.current;
|
|
155
155
|
if (!t) return;
|
|
156
156
|
let n = t.offsetWidth;
|
|
157
|
-
|
|
157
|
+
q.current = {
|
|
158
158
|
startX: e.clientX,
|
|
159
159
|
startW: n
|
|
160
160
|
};
|
|
161
161
|
let r = (e) => {
|
|
162
|
-
if (!
|
|
163
|
-
let n =
|
|
162
|
+
if (!q.current) return;
|
|
163
|
+
let n = q.current.startX - e.clientX, r = Math.max(280, Math.min(800, q.current.startW + n));
|
|
164
164
|
t.style.width = `${r}px`;
|
|
165
165
|
}, i = () => {
|
|
166
|
-
|
|
166
|
+
q.current && t && Gt(parseInt(t.style.width, 10) || q.current.startW), q.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
|
|
167
167
|
};
|
|
168
168
|
document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
|
|
169
|
-
}, []),
|
|
170
|
-
|
|
171
|
-
let e = parseInt(
|
|
172
|
-
|
|
173
|
-
}, [
|
|
174
|
-
let
|
|
175
|
-
|
|
176
|
-
if (!
|
|
177
|
-
let e =
|
|
178
|
-
|
|
179
|
-
}, [
|
|
180
|
-
let
|
|
181
|
-
|
|
182
|
-
let
|
|
183
|
-
|
|
184
|
-
if (
|
|
185
|
-
let e =
|
|
186
|
-
|
|
187
|
-
}, [
|
|
188
|
-
let { openTab:
|
|
189
|
-
|
|
190
|
-
if (!x ||
|
|
191
|
-
let e =
|
|
192
|
-
|
|
169
|
+
}, []), J = R?.data, Y = me(x, b, J ?? {});
|
|
170
|
+
j(() => {
|
|
171
|
+
let e = parseInt(Y?.sidebar_width || "380", 10);
|
|
172
|
+
Gt(Number.isNaN(e) ? 380 : e);
|
|
173
|
+
}, [Y?.sidebar_width]);
|
|
174
|
+
let X = typeof J?.$row_version == "string" ? J.$row_version : void 0, Jt = J?.$refs, Yt = N(X);
|
|
175
|
+
j(() => {
|
|
176
|
+
if (!X) return;
|
|
177
|
+
let e = Yt.current;
|
|
178
|
+
Yt.current = X, e && e !== X && At && Lt(!0);
|
|
179
|
+
}, [At, X]);
|
|
180
|
+
let Xt = !!x?.soft_delete && J != null && J[x.soft_delete] != null, Z = rt(), Zt = N(null);
|
|
181
|
+
te({ scrollElementRef: Zt });
|
|
182
|
+
let Qt = !k && ht instanceof se && ht.status === 404, $t = k && !Se(x), en = N(null);
|
|
183
|
+
j(() => {
|
|
184
|
+
if (!Qt) return;
|
|
185
|
+
let e = ne(Z);
|
|
186
|
+
en.current !== e && (en.current = e, re.getState().kill(e));
|
|
187
|
+
}, [Qt, Z]);
|
|
188
|
+
let { openTab: tn, updateTabTitle: nn, findTabByPathname: rn } = fe();
|
|
189
|
+
j(() => {
|
|
190
|
+
if (!x || D || Ut.enabled) return;
|
|
191
|
+
let e = Z.pathname, t = o(Y?.display?.name) || o(x.display.name), n = Y?.display?.icon || x.display.icon;
|
|
192
|
+
tn({
|
|
193
193
|
pathname: e,
|
|
194
194
|
search: "",
|
|
195
|
-
title:
|
|
196
|
-
derivedTitle: !
|
|
195
|
+
title: k ? o("record.new_title", "New {name}", { name: t }) : t,
|
|
196
|
+
derivedTitle: !k,
|
|
197
197
|
icon: n,
|
|
198
198
|
closable: !0
|
|
199
199
|
});
|
|
200
200
|
}, [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
Z.pathname,
|
|
202
|
+
o,
|
|
203
|
+
Y?.display?.icon,
|
|
204
204
|
x?.display.icon,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
]),
|
|
209
|
-
if (!
|
|
210
|
-
let e =
|
|
205
|
+
k,
|
|
206
|
+
D,
|
|
207
|
+
Ut.enabled
|
|
208
|
+
]), j(() => {
|
|
209
|
+
if (!J || !x || D || Ut.enabled) return;
|
|
210
|
+
let e = rn(Z.pathname);
|
|
211
211
|
if (e) {
|
|
212
|
-
let t =
|
|
213
|
-
|
|
212
|
+
let t = o(Y?.display?.name) || o(x.display.name), n = Te(o, J, x), r = n && !String(n).startsWith("/") ? String(n) : t;
|
|
213
|
+
nn(e.id, r, r === t);
|
|
214
214
|
}
|
|
215
215
|
}, [
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
J,
|
|
217
|
+
o,
|
|
218
218
|
x?.display.display_field,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
Z.pathname,
|
|
220
|
+
D,
|
|
221
|
+
Ut.enabled
|
|
222
222
|
]);
|
|
223
|
-
let
|
|
224
|
-
if (!x || !
|
|
223
|
+
let an = M(() => {
|
|
224
|
+
if (!x || !Ht) return /* @__PURE__ */ new Set();
|
|
225
225
|
let e = /* @__PURE__ */ new Set();
|
|
226
|
-
for (let [t, n] of x.fields)
|
|
226
|
+
for (let [t, n] of x.fields) De(n) && e.add(t);
|
|
227
227
|
for (let [t] of x.files ?? []) e.add(t);
|
|
228
228
|
return e;
|
|
229
|
-
}, [x,
|
|
230
|
-
|
|
231
|
-
if (
|
|
232
|
-
if (
|
|
233
|
-
let e =
|
|
229
|
+
}, [x, Ht]), on = N(null);
|
|
230
|
+
j(() => {
|
|
231
|
+
if (kt && J && x && V && on.current !== Z.key) {
|
|
232
|
+
if (on.current = Z.key, At || jt(!0), Object.keys(H).length === 0) {
|
|
233
|
+
let e = O ? We(O) : null;
|
|
234
234
|
if (e) {
|
|
235
|
-
let t =
|
|
235
|
+
let t = qe({
|
|
236
236
|
entity: x,
|
|
237
237
|
formData: e,
|
|
238
238
|
record: void 0,
|
|
239
239
|
isNew: !0
|
|
240
240
|
});
|
|
241
|
-
|
|
241
|
+
Je(t).forEach((e) => {
|
|
242
242
|
v.registerDraft({
|
|
243
243
|
fileId: e,
|
|
244
|
-
discard: () =>
|
|
244
|
+
discard: () => Ke(e)
|
|
245
245
|
});
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
248
|
let t = {};
|
|
249
|
-
|
|
249
|
+
an.forEach((n) => {
|
|
250
250
|
let r = e ? e[n] : void 0;
|
|
251
251
|
if (r !== void 0) {
|
|
252
252
|
t[n] = r;
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
255
|
-
let i =
|
|
256
|
-
t[n] =
|
|
257
|
-
}),
|
|
255
|
+
let i = Xe(x, J, n);
|
|
256
|
+
t[n] = Ye(x, n) ? i ?? null : i ?? "";
|
|
257
|
+
}), Mt(t);
|
|
258
258
|
}
|
|
259
|
-
if (x.children !== void 0 && x.children.length > 0 &&
|
|
260
|
-
let e =
|
|
259
|
+
if (x.children !== void 0 && x.children.length > 0 && W === void 0) {
|
|
260
|
+
let e = J.$children;
|
|
261
261
|
if (e && Object.keys(e).length > 0) {
|
|
262
262
|
let t = {};
|
|
263
263
|
for (let [n, r] of Object.entries(e)) {
|
|
264
264
|
let e = _?.entities[n];
|
|
265
265
|
t[n] = r.map((t) => ({
|
|
266
266
|
...t,
|
|
267
|
-
_key:
|
|
267
|
+
_key: lt(e, t)
|
|
268
268
|
}));
|
|
269
269
|
}
|
|
270
|
-
|
|
271
|
-
} else
|
|
270
|
+
G(t), zt(e);
|
|
271
|
+
} else G({}), zt({});
|
|
272
272
|
}
|
|
273
|
-
|
|
273
|
+
pe((e) => {
|
|
274
274
|
let t = new URLSearchParams(e);
|
|
275
275
|
return t.delete("edit"), t;
|
|
276
276
|
}, { replace: !0 });
|
|
277
277
|
}
|
|
278
278
|
}, [
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
kt,
|
|
280
|
+
J,
|
|
281
|
+
an,
|
|
282
|
+
V,
|
|
283
283
|
x,
|
|
284
|
-
|
|
284
|
+
W,
|
|
285
285
|
_,
|
|
286
|
-
|
|
287
|
-
]),
|
|
288
|
-
|
|
286
|
+
Z.key
|
|
287
|
+
]), j(() => {
|
|
288
|
+
k && T && x?.children && x.children.length !== 0 && W === void 0 && (G({}), zt({}));
|
|
289
289
|
}, [
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
k,
|
|
291
|
+
T,
|
|
292
292
|
x?.children
|
|
293
293
|
]);
|
|
294
|
-
let
|
|
295
|
-
if (await v.flushAllDrafts(),
|
|
296
|
-
let e =
|
|
294
|
+
let sn = A(async () => {
|
|
295
|
+
if (await v.flushAllDrafts(), k) {
|
|
296
|
+
let e = Y?.route?.replace("/:id", "") ?? "/";
|
|
297
297
|
g(e);
|
|
298
|
-
} else
|
|
298
|
+
} else jt(!1), Mt({}), Nt({}), Ft({}), G(void 0), zt(void 0), Vt(!1);
|
|
299
299
|
}, [
|
|
300
300
|
v,
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
k,
|
|
302
|
+
Y,
|
|
303
303
|
g
|
|
304
|
-
]),
|
|
305
|
-
|
|
304
|
+
]), cn = A((e, t) => {
|
|
305
|
+
Mt((n) => ({
|
|
306
306
|
...n,
|
|
307
307
|
[e]: t
|
|
308
308
|
}));
|
|
309
|
-
}, []),
|
|
310
|
-
if (!
|
|
311
|
-
let e =
|
|
309
|
+
}, []), Q = M(() => {
|
|
310
|
+
if (!Y?.route) return "/";
|
|
311
|
+
let e = Y.route.split("/");
|
|
312
312
|
return e.pop(), e.join("/") || "/";
|
|
313
|
-
}, [
|
|
314
|
-
if (!
|
|
313
|
+
}, [Y]), ln = M(() => !_?.screens || !Q || Q === "/" ? !1 : Object.values(_.screens).some((e) => e.route === Q), [_, Q]), un = A(() => {
|
|
314
|
+
if (!ln) {
|
|
315
315
|
g("/");
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
|
-
let e =
|
|
319
|
-
g(e ? `${
|
|
318
|
+
let e = rn(Q)?.search ?? "";
|
|
319
|
+
g(e ? `${Q}?${e}` : Q);
|
|
320
320
|
}, [
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
ln,
|
|
322
|
+
Q,
|
|
323
|
+
rn,
|
|
324
324
|
g
|
|
325
|
-
]),
|
|
325
|
+
]), dn = ve({ fallback: un }), fn = !D && (dn.hasOriginBack || dn.allowFallbackBack && !!ln), pn = M(() => {
|
|
326
326
|
if (!x) return {};
|
|
327
327
|
let e = {};
|
|
328
|
-
for (let t of
|
|
329
|
-
for (let t of
|
|
328
|
+
for (let t of He(x, H, k)) an.has(t) && (e[t] = o("record.field.required", "Required"));
|
|
329
|
+
for (let t of Ve(x, H)) an.has(t) && (e[t] = oe("record.email_invalid", "This is not a valid email address."));
|
|
330
330
|
return e;
|
|
331
331
|
}, [
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
o,
|
|
333
|
+
oe,
|
|
334
334
|
x,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
]), mn = Object.keys(pn).length > 0, hn =
|
|
335
|
+
H,
|
|
336
|
+
k,
|
|
337
|
+
an
|
|
338
|
+
]), mn = Object.keys(pn).length > 0, hn = M(() => x ? ct({
|
|
339
339
|
entity: x,
|
|
340
|
-
formData:
|
|
341
|
-
record:
|
|
342
|
-
isNew:
|
|
343
|
-
pendingStatuses:
|
|
344
|
-
pendingProperties:
|
|
345
|
-
pendingChildren:
|
|
346
|
-
childrenSnapshot:
|
|
340
|
+
formData: H,
|
|
341
|
+
record: J,
|
|
342
|
+
isNew: k,
|
|
343
|
+
pendingStatuses: U,
|
|
344
|
+
pendingProperties: Pt,
|
|
345
|
+
pendingChildren: W,
|
|
346
|
+
childrenSnapshot: Rt
|
|
347
347
|
}) : {
|
|
348
348
|
payload: {},
|
|
349
349
|
committedFileIds: []
|
|
350
350
|
}, [
|
|
351
351
|
x,
|
|
352
|
-
z,
|
|
353
|
-
q,
|
|
354
|
-
E,
|
|
355
|
-
B,
|
|
356
|
-
V,
|
|
357
352
|
H,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
353
|
+
J,
|
|
354
|
+
k,
|
|
355
|
+
U,
|
|
356
|
+
Pt,
|
|
357
|
+
W,
|
|
358
|
+
Rt
|
|
359
|
+
]), gn = Object.keys(hn.payload).length > 0, _n = K && (k || gn);
|
|
360
|
+
et(_n);
|
|
361
|
+
let vn = A(() => {
|
|
362
|
+
if (!S || !x || k && !T || !k && !V || (Vt(!0), mn)) return;
|
|
363
|
+
let e = { ...hn.payload }, { committedFileIds: t } = hn;
|
|
364
|
+
if (!k && !gn) {
|
|
365
|
+
jt(!1), Nt({}), Ft({}), G(void 0), zt(void 0), Vt(!1);
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
!
|
|
369
|
-
let
|
|
370
|
-
|
|
368
|
+
!k && X && (e.$row_version = X);
|
|
369
|
+
let n = () => {
|
|
370
|
+
jt(!1), Lt(!1), Vt(!1), Nt({}), Ft({}), G(void 0), zt(void 0);
|
|
371
371
|
};
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
let
|
|
375
|
-
g(a ? `${
|
|
376
|
-
} }) :
|
|
377
|
-
pkValues:
|
|
378
|
-
data:
|
|
372
|
+
k ? xt.mutate(e, { onSuccess: (e) => {
|
|
373
|
+
t.forEach((e) => v.markCommitted(e));
|
|
374
|
+
let r = e.data, i = x ? we(x, r) : {}, a = ke(i);
|
|
375
|
+
g(a ? `${Q}/${encodeURIComponent(a)}` : Q, { replace: !0 }), n();
|
|
376
|
+
} }) : L && St.mutate({
|
|
377
|
+
pkValues: L,
|
|
378
|
+
data: e
|
|
379
379
|
}, {
|
|
380
380
|
onSuccess: () => {
|
|
381
|
-
|
|
381
|
+
t.forEach((e) => v.markCommitted(e)), n();
|
|
382
382
|
},
|
|
383
|
-
onError: (
|
|
384
|
-
|
|
383
|
+
onError: (e) => {
|
|
384
|
+
e instanceof se && e.code === "entity.stale_object" && Lt(!0);
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
387
|
}, [
|
|
388
388
|
v,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
389
|
+
k,
|
|
390
|
+
T,
|
|
391
|
+
V,
|
|
392
392
|
S,
|
|
393
393
|
mn,
|
|
394
394
|
hn,
|
|
395
395
|
gn,
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
xt,
|
|
397
|
+
St,
|
|
398
398
|
x,
|
|
399
399
|
g,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
]), yn =
|
|
404
|
-
|
|
400
|
+
Q,
|
|
401
|
+
X,
|
|
402
|
+
L
|
|
403
|
+
]), yn = A((e, t) => {
|
|
404
|
+
G((n) => ({
|
|
405
405
|
...n ?? {},
|
|
406
406
|
[e]: t
|
|
407
407
|
}));
|
|
408
|
-
}, []), bn =
|
|
409
|
-
|
|
408
|
+
}, []), bn = A(() => {
|
|
409
|
+
L && !k && Et && Ct.mutate(L);
|
|
410
410
|
}, [
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
]), xn =
|
|
416
|
-
if (!
|
|
417
|
-
if (!
|
|
418
|
-
if (
|
|
411
|
+
L,
|
|
412
|
+
k,
|
|
413
|
+
Et,
|
|
414
|
+
Ct
|
|
415
|
+
]), xn = M(() => Ue(W, _), [W, _]), Sn = Object.keys(xn).length > 0;
|
|
416
|
+
if (!Y || !x) return null;
|
|
417
|
+
if (!k && z.loading) return /* @__PURE__ */ F(ce, {});
|
|
418
|
+
if (vt && !R) return /* @__PURE__ */ I("div", {
|
|
419
419
|
style: { padding: 24 },
|
|
420
|
-
children: [fn && /* @__PURE__ */
|
|
421
|
-
icon: /* @__PURE__ */
|
|
422
|
-
onClick:
|
|
423
|
-
title:
|
|
424
|
-
}), /* @__PURE__ */
|
|
420
|
+
children: [fn && /* @__PURE__ */ F(a, {
|
|
421
|
+
icon: /* @__PURE__ */ F(i.back, { size: 14 }),
|
|
422
|
+
onClick: dn.goBack,
|
|
423
|
+
title: o("record.back", "Back")
|
|
424
|
+
}), /* @__PURE__ */ I("p", {
|
|
425
425
|
role: "alert",
|
|
426
426
|
style: {
|
|
427
427
|
color: "var(--danger)",
|
|
@@ -430,91 +430,91 @@ function mt({ screenCode: t }) {
|
|
|
430
430
|
gap: 8
|
|
431
431
|
},
|
|
432
432
|
children: [
|
|
433
|
-
|
|
433
|
+
l(oe, z.error),
|
|
434
434
|
" ",
|
|
435
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ F(s, { onRetry: z.retry })
|
|
436
436
|
]
|
|
437
437
|
})]
|
|
438
438
|
});
|
|
439
|
-
if (
|
|
439
|
+
if ($t) return /* @__PURE__ */ I("div", {
|
|
440
440
|
style: { padding: 24 },
|
|
441
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ I("div", {
|
|
442
442
|
style: {
|
|
443
443
|
display: "flex",
|
|
444
444
|
alignItems: "center",
|
|
445
445
|
gap: 8,
|
|
446
446
|
marginBottom: 8
|
|
447
447
|
},
|
|
448
|
-
children: [fn && /* @__PURE__ */
|
|
449
|
-
icon: /* @__PURE__ */
|
|
450
|
-
onClick:
|
|
451
|
-
title:
|
|
452
|
-
}), /* @__PURE__ */
|
|
448
|
+
children: [fn && /* @__PURE__ */ F(a, {
|
|
449
|
+
icon: /* @__PURE__ */ F(i.back, { size: 14 }),
|
|
450
|
+
onClick: dn.goBack,
|
|
451
|
+
title: o("record.back", "Back")
|
|
452
|
+
}), /* @__PURE__ */ F("h1", {
|
|
453
453
|
style: {
|
|
454
454
|
margin: 0,
|
|
455
455
|
fontSize: 18,
|
|
456
456
|
fontWeight: 600,
|
|
457
457
|
color: "var(--text)"
|
|
458
458
|
},
|
|
459
|
-
children:
|
|
459
|
+
children: o("record.create_closed.title", "Not Available")
|
|
460
460
|
})]
|
|
461
|
-
}), /* @__PURE__ */
|
|
461
|
+
}), /* @__PURE__ */ F("p", {
|
|
462
462
|
style: { color: "var(--text-3)" },
|
|
463
|
-
children:
|
|
463
|
+
children: o("record.create_closed.body", "This record type is not created from a form.")
|
|
464
464
|
})]
|
|
465
465
|
});
|
|
466
|
-
if (!
|
|
466
|
+
if (!k && !J || Qt) return /* @__PURE__ */ I("div", {
|
|
467
467
|
style: { padding: 24 },
|
|
468
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ I("div", {
|
|
469
469
|
style: {
|
|
470
470
|
display: "flex",
|
|
471
471
|
alignItems: "center",
|
|
472
472
|
gap: 8,
|
|
473
473
|
marginBottom: 8
|
|
474
474
|
},
|
|
475
|
-
children: [fn && /* @__PURE__ */
|
|
476
|
-
icon: /* @__PURE__ */
|
|
477
|
-
onClick:
|
|
478
|
-
title:
|
|
479
|
-
}), /* @__PURE__ */
|
|
475
|
+
children: [fn && /* @__PURE__ */ F(a, {
|
|
476
|
+
icon: /* @__PURE__ */ F(i.back, { size: 14 }),
|
|
477
|
+
onClick: dn.goBack,
|
|
478
|
+
title: o("record.back", "Back")
|
|
479
|
+
}), /* @__PURE__ */ F("h1", {
|
|
480
480
|
style: {
|
|
481
481
|
margin: 0,
|
|
482
482
|
fontSize: 18,
|
|
483
483
|
fontWeight: 600,
|
|
484
484
|
color: "var(--text)"
|
|
485
485
|
},
|
|
486
|
-
children:
|
|
486
|
+
children: o("record.missing.title", "Not Found")
|
|
487
487
|
})]
|
|
488
|
-
}), /* @__PURE__ */
|
|
488
|
+
}), /* @__PURE__ */ F("p", {
|
|
489
489
|
style: { color: "var(--text-3)" },
|
|
490
|
-
children:
|
|
490
|
+
children: oe("entity.not_found", "This record does not exist.")
|
|
491
491
|
})]
|
|
492
492
|
});
|
|
493
|
-
let Cn = x.display, wn =
|
|
493
|
+
let Cn = x.display, wn = o(Y.display?.name) || o(Cn.name), Tn = Te(o, J, x), En = k ? o("record.new_title", "New {name}", { name: wn }) : Tn ? String(Tn) : wn, Dn = xt.isPending || St.isPending, On = Y.responsive?.[y.category]?.layout, kn = On?.tabs ?? (y.isPhone ? "sections" : void 0), An = On?.header_card === !0 ? Ze({
|
|
494
494
|
entity: x,
|
|
495
|
-
screen:
|
|
495
|
+
screen: Y
|
|
496
496
|
}) : void 0, $ = {
|
|
497
497
|
schema: _,
|
|
498
498
|
entity: x,
|
|
499
499
|
entityCode: S,
|
|
500
|
-
recordId:
|
|
501
|
-
record:
|
|
502
|
-
...
|
|
503
|
-
...
|
|
504
|
-
} :
|
|
505
|
-
isNew:
|
|
506
|
-
mode:
|
|
507
|
-
onFieldChange:
|
|
508
|
-
refs:
|
|
509
|
-
headerFields: !
|
|
500
|
+
recordId: ut ?? O ?? "",
|
|
501
|
+
record: K ? {
|
|
502
|
+
...J ?? {},
|
|
503
|
+
...H
|
|
504
|
+
} : J ?? {},
|
|
505
|
+
isNew: k,
|
|
506
|
+
mode: K ? "edit" : "display",
|
|
507
|
+
onFieldChange: K ? cn : void 0,
|
|
508
|
+
refs: Jt,
|
|
509
|
+
headerFields: !k && J ? Pe(Y, x) : void 0,
|
|
510
510
|
objectProperties: (() => {
|
|
511
|
-
let e =
|
|
512
|
-
if (!
|
|
513
|
-
let t = e.map((e) =>
|
|
511
|
+
let e = Ot ?? [];
|
|
512
|
+
if (!K || Object.keys(Pt).length === 0) return e.length > 0 ? e : void 0;
|
|
513
|
+
let t = e.map((e) => Pt[e.property_code] === void 0 ? e : {
|
|
514
514
|
...e,
|
|
515
|
-
value:
|
|
515
|
+
value: Pt[e.property_code]
|
|
516
516
|
});
|
|
517
|
-
for (let [n, r] of Object.entries(
|
|
517
|
+
for (let [n, r] of Object.entries(Pt)) e.some((e) => e.property_code === n) || t.push({
|
|
518
518
|
property_code: n,
|
|
519
519
|
name: {},
|
|
520
520
|
type: "string",
|
|
@@ -522,96 +522,96 @@ function mt({ screenCode: t }) {
|
|
|
522
522
|
});
|
|
523
523
|
return t;
|
|
524
524
|
})(),
|
|
525
|
-
onSetProperty:
|
|
525
|
+
onSetProperty: k || !V ? void 0 : K ? (e, t) => Ft((n) => ({
|
|
526
526
|
...n,
|
|
527
527
|
[e]: t
|
|
528
528
|
})) : void 0,
|
|
529
529
|
isPropertyPending: !1,
|
|
530
530
|
objectStatuses: (() => {
|
|
531
|
-
let e =
|
|
532
|
-
if (!
|
|
533
|
-
let t = e.map((e) =>
|
|
531
|
+
let e = Dt ?? [];
|
|
532
|
+
if (!K || Object.keys(U).length === 0) return e.length > 0 ? e : void 0;
|
|
533
|
+
let t = e.map((e) => U[e.group_code] === void 0 ? e : {
|
|
534
534
|
...e,
|
|
535
|
-
status_code:
|
|
535
|
+
status_code: U[e.group_code]
|
|
536
536
|
});
|
|
537
|
-
for (let [
|
|
538
|
-
group_code:
|
|
537
|
+
for (let [r, i] of Object.entries(U)) e.some((e) => e.group_code === r) || t.push({
|
|
538
|
+
group_code: r,
|
|
539
539
|
status_code: i,
|
|
540
540
|
status_name: {},
|
|
541
|
-
set_at:
|
|
541
|
+
set_at: n()
|
|
542
542
|
});
|
|
543
543
|
return t;
|
|
544
544
|
})(),
|
|
545
|
-
onSetStatus:
|
|
545
|
+
onSetStatus: k || !V ? void 0 : K ? (e, t) => Nt((n) => ({
|
|
546
546
|
...n,
|
|
547
547
|
[e]: t
|
|
548
548
|
})) : void 0,
|
|
549
549
|
isStatusPending: !1,
|
|
550
|
-
pendingChildren:
|
|
551
|
-
onChildrenChange:
|
|
552
|
-
childValidationErrors:
|
|
553
|
-
fieldErrors:
|
|
550
|
+
pendingChildren: K ? W : void 0,
|
|
551
|
+
onChildrenChange: K ? yn : void 0,
|
|
552
|
+
childValidationErrors: K ? xn : void 0,
|
|
553
|
+
fieldErrors: K && Bt ? pn : void 0,
|
|
554
554
|
detailTabsPresentation: kn,
|
|
555
555
|
relatedRecordsPresentation: On?.related_records
|
|
556
|
-
}, jn = !!
|
|
557
|
-
screen:
|
|
556
|
+
}, jn = !!Y.sidebar && (k ? Y.sidebar.some((e) => tt(e, x, _?.entities ?? {})) : Y.sidebar.length > 0), Mn = On?.sidebar === "hidden", Nn = jn && !Mn && !y.isDesktop, Pn = jn && !Mn && y.isDesktop, Fn = !k && J ? /* @__PURE__ */ F(Ne, {
|
|
557
|
+
screen: Y,
|
|
558
558
|
entity: x,
|
|
559
559
|
entityCode: S,
|
|
560
|
-
record:
|
|
561
|
-
refs:
|
|
562
|
-
objectStatuses:
|
|
560
|
+
record: J,
|
|
561
|
+
refs: Jt,
|
|
562
|
+
objectStatuses: Dt,
|
|
563
563
|
schema: _
|
|
564
|
-
}) : void 0, In = /* @__PURE__ */
|
|
564
|
+
}) : void 0, In = /* @__PURE__ */ F(mt, {
|
|
565
565
|
title: En,
|
|
566
|
-
editing:
|
|
567
|
-
isNew:
|
|
568
|
-
isRecordDeleted:
|
|
566
|
+
editing: K,
|
|
567
|
+
isNew: k,
|
|
568
|
+
isRecordDeleted: Xt,
|
|
569
569
|
dirty: _n,
|
|
570
570
|
isSaving: Dn,
|
|
571
571
|
hasChildErrors: Sn,
|
|
572
|
-
hasFieldErrors:
|
|
573
|
-
canRestore:
|
|
572
|
+
hasFieldErrors: Bt && mn,
|
|
573
|
+
canRestore: Et,
|
|
574
574
|
entity: x,
|
|
575
|
-
screen:
|
|
575
|
+
screen: Y,
|
|
576
576
|
globalActions: _?.actions,
|
|
577
577
|
entityCode: S,
|
|
578
|
-
record:
|
|
579
|
-
id:
|
|
580
|
-
listRoute:
|
|
581
|
-
listRouteExists: !!
|
|
578
|
+
record: J,
|
|
579
|
+
id: O,
|
|
580
|
+
listRoute: Q,
|
|
581
|
+
listRouteExists: !!ln,
|
|
582
582
|
highlights: Fn,
|
|
583
583
|
showBack: fn,
|
|
584
|
-
onBack:
|
|
585
|
-
onCancelEdit:
|
|
584
|
+
onBack: dn.goBack,
|
|
585
|
+
onCancelEdit: sn,
|
|
586
586
|
onSave: vn,
|
|
587
587
|
onRestore: bn,
|
|
588
|
-
isRestoring:
|
|
588
|
+
isRestoring: Ct.isPending,
|
|
589
589
|
refreshControl: {
|
|
590
|
-
refetch:
|
|
591
|
-
isLoading:
|
|
592
|
-
isLive:
|
|
590
|
+
refetch: dt.refetch,
|
|
591
|
+
isLoading: dt.isLoading,
|
|
592
|
+
isLive: bt
|
|
593
593
|
},
|
|
594
594
|
isRealtimeEntity: x?.realtime === !0,
|
|
595
|
-
canManageTemplates:
|
|
596
|
-
}), Ln =
|
|
595
|
+
canManageTemplates: _e(_)
|
|
596
|
+
}), Ln = Xt && /* @__PURE__ */ F(gt, {
|
|
597
597
|
tone: "danger",
|
|
598
|
-
children:
|
|
599
|
-
zone:
|
|
598
|
+
children: o("record.deleted_banner", "This record was deleted on {date}", { date: t(String(J[x.soft_delete]), {
|
|
599
|
+
zone: o.timeZone,
|
|
600
600
|
declared: !!(x.fields.get(x.soft_delete)?.timezone || x.default_timezone)
|
|
601
601
|
}) })
|
|
602
|
-
}), Rn =
|
|
602
|
+
}), Rn = It && /* @__PURE__ */ F(gt, {
|
|
603
603
|
tone: "warn",
|
|
604
|
-
children:
|
|
605
|
-
}), zn =
|
|
604
|
+
children: o("record.changed_on_server", "This record changed on the server while you were viewing or editing it.")
|
|
605
|
+
}), zn = Tt && J ? _t(o, x, J, Jt) : void 0, Bn = Tt && /* @__PURE__ */ F(gt, {
|
|
606
606
|
tone: "info",
|
|
607
607
|
testId: "record-other-tenant-banner",
|
|
608
|
-
children: zn ?
|
|
609
|
-
}), Vn =
|
|
608
|
+
children: zn ? o("record.other_tenant_banner_named", "This record is set in the tenant {tenant}. Change it from that tenant.", { tenant: zn }) : o("record.other_tenant_banner", "This record is set in another tenant. Change it from that tenant.")
|
|
609
|
+
}), Vn = K && Bt && mn && /* @__PURE__ */ F(Me, {
|
|
610
610
|
errors: Object.entries(pn).map(([e, t]) => {
|
|
611
611
|
let n = x.fields.get(e);
|
|
612
612
|
return {
|
|
613
613
|
name: e,
|
|
614
|
-
label: n ?
|
|
614
|
+
label: n ? w(o, n, e, _?.entities) : e,
|
|
615
615
|
message: t
|
|
616
616
|
};
|
|
617
617
|
}),
|
|
@@ -622,55 +622,55 @@ function mt({ screenCode: t }) {
|
|
|
622
622
|
behavior: "smooth"
|
|
623
623
|
}), t.focus?.());
|
|
624
624
|
}
|
|
625
|
-
}), Hn =
|
|
625
|
+
}), Hn = wt && !k && !(Y.items && Y.items.length > 0) && /* @__PURE__ */ F("div", {
|
|
626
626
|
className: "mb-4",
|
|
627
|
-
children: /* @__PURE__ */
|
|
627
|
+
children: /* @__PURE__ */ F(Ie, {
|
|
628
628
|
statusGroups: x.status_groups ?? {},
|
|
629
629
|
objectStatuses: $.objectStatuses,
|
|
630
|
-
onSetStatus:
|
|
630
|
+
onSetStatus: V && K ? (e, t) => Nt((n) => ({
|
|
631
631
|
...n,
|
|
632
632
|
[e]: t
|
|
633
|
-
})) :
|
|
633
|
+
})) : ot,
|
|
634
634
|
isPending: !1,
|
|
635
|
-
mode:
|
|
635
|
+
mode: K ? "edit" : "display"
|
|
636
636
|
})
|
|
637
|
-
}), Un = x.evidence_covered && !
|
|
637
|
+
}), Un = x.evidence_covered && !k && J && /* @__PURE__ */ F("div", {
|
|
638
638
|
className: "mb-4",
|
|
639
|
-
children: /* @__PURE__ */
|
|
640
|
-
}), Wn = /* @__PURE__ */
|
|
641
|
-
An && (
|
|
639
|
+
children: /* @__PURE__ */ F(Le, { evidence: J.$evidence })
|
|
640
|
+
}), Wn = /* @__PURE__ */ I(nt, { children: [
|
|
641
|
+
An && (J || k) && /* @__PURE__ */ F(ft, {
|
|
642
642
|
card: An,
|
|
643
643
|
entity: x,
|
|
644
644
|
record: $.record,
|
|
645
645
|
objectStatuses: $.objectStatuses,
|
|
646
646
|
objectProperties: $.objectProperties
|
|
647
647
|
}),
|
|
648
|
-
|
|
649
|
-
nodes:
|
|
648
|
+
Y.items && Y.items.length > 0 && (J || k) && _ && /* @__PURE__ */ F(E, {
|
|
649
|
+
nodes: Y.items,
|
|
650
650
|
ctx: $
|
|
651
651
|
}),
|
|
652
|
-
!
|
|
652
|
+
!k && O && S && x.associations && Object.keys(x.associations).length > 0 && _ && /* @__PURE__ */ F(de, {
|
|
653
653
|
entityCode: S,
|
|
654
|
-
recordId:
|
|
654
|
+
recordId: ut ?? O ?? "",
|
|
655
655
|
associations: x.associations,
|
|
656
656
|
schema: _
|
|
657
657
|
}),
|
|
658
|
-
!
|
|
658
|
+
!k && O && S && /* @__PURE__ */ F(ge, {
|
|
659
659
|
entity: x,
|
|
660
660
|
entityCode: S,
|
|
661
|
-
objectId:
|
|
661
|
+
objectId: ut ?? O,
|
|
662
662
|
schema: _
|
|
663
663
|
}),
|
|
664
|
-
!
|
|
665
|
-
screen:
|
|
664
|
+
!k && J && _ && /* @__PURE__ */ F(Fe, {
|
|
665
|
+
screen: Y,
|
|
666
666
|
entity: x,
|
|
667
667
|
entityCode: S,
|
|
668
|
-
record:
|
|
669
|
-
recordId:
|
|
670
|
-
refs:
|
|
668
|
+
record: J,
|
|
669
|
+
recordId: ut ?? O,
|
|
670
|
+
refs: Jt,
|
|
671
671
|
schema: _
|
|
672
672
|
})
|
|
673
|
-
] }), Gn = /* @__PURE__ */
|
|
673
|
+
] }), Gn = /* @__PURE__ */ I(nt, { children: [
|
|
674
674
|
In,
|
|
675
675
|
Rn,
|
|
676
676
|
Ln,
|
|
@@ -679,7 +679,7 @@ function mt({ screenCode: t }) {
|
|
|
679
679
|
Hn,
|
|
680
680
|
Un
|
|
681
681
|
] });
|
|
682
|
-
return Pn ? /* @__PURE__ */
|
|
682
|
+
return Pn ? /* @__PURE__ */ I("div", {
|
|
683
683
|
style: {
|
|
684
684
|
height: "100%",
|
|
685
685
|
display: "flex",
|
|
@@ -687,23 +687,23 @@ function mt({ screenCode: t }) {
|
|
|
687
687
|
background: "var(--background)"
|
|
688
688
|
},
|
|
689
689
|
children: [
|
|
690
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ F("div", {
|
|
691
691
|
style: {
|
|
692
692
|
flex: 1,
|
|
693
693
|
minWidth: 0,
|
|
694
694
|
height: "100%"
|
|
695
695
|
},
|
|
696
|
-
children: /* @__PURE__ */
|
|
697
|
-
scrollRef:
|
|
696
|
+
children: /* @__PURE__ */ F(ze, {
|
|
697
|
+
scrollRef: Zt,
|
|
698
698
|
header: Gn,
|
|
699
699
|
children: Wn
|
|
700
700
|
})
|
|
701
701
|
}),
|
|
702
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ F("div", {
|
|
703
703
|
className: "detail-resize-handle",
|
|
704
|
-
onMouseDown:
|
|
705
|
-
title:
|
|
706
|
-
children: /* @__PURE__ */
|
|
704
|
+
onMouseDown: qt,
|
|
705
|
+
title: o("record.layout.drag_to_resize", "Drag to resize"),
|
|
706
|
+
children: /* @__PURE__ */ F("div", { style: {
|
|
707
707
|
position: "absolute",
|
|
708
708
|
top: 0,
|
|
709
709
|
bottom: 0,
|
|
@@ -713,23 +713,23 @@ function mt({ screenCode: t }) {
|
|
|
713
713
|
background: "var(--border)"
|
|
714
714
|
} })
|
|
715
715
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
ref:
|
|
716
|
+
/* @__PURE__ */ F("div", {
|
|
717
|
+
ref: Kt,
|
|
718
718
|
style: {
|
|
719
719
|
flexShrink: 0,
|
|
720
720
|
height: "100%",
|
|
721
|
-
width: `${
|
|
721
|
+
width: `${Wt}px`
|
|
722
722
|
},
|
|
723
|
-
children: (
|
|
724
|
-
nodes:
|
|
723
|
+
children: (J || k) && _ && /* @__PURE__ */ F(E, {
|
|
724
|
+
nodes: Y.sidebar,
|
|
725
725
|
ctx: $
|
|
726
726
|
})
|
|
727
727
|
})
|
|
728
728
|
]
|
|
729
|
-
}) : /* @__PURE__ */
|
|
730
|
-
scrollRef:
|
|
729
|
+
}) : /* @__PURE__ */ I(ze, {
|
|
730
|
+
scrollRef: Zt,
|
|
731
731
|
header: Gn,
|
|
732
|
-
children: [Wn, Nn && (
|
|
732
|
+
children: [Wn, Nn && (J || k) && _ && /* @__PURE__ */ F("div", {
|
|
733
733
|
"data-testid": "detail-sidebar-inline",
|
|
734
734
|
style: {
|
|
735
735
|
display: "flex",
|
|
@@ -737,25 +737,25 @@ function mt({ screenCode: t }) {
|
|
|
737
737
|
gap: 16,
|
|
738
738
|
minWidth: 0
|
|
739
739
|
},
|
|
740
|
-
children: /* @__PURE__ */
|
|
741
|
-
nodes:
|
|
740
|
+
children: /* @__PURE__ */ F(E, {
|
|
741
|
+
nodes: Y.sidebar,
|
|
742
742
|
ctx: $
|
|
743
743
|
})
|
|
744
744
|
})]
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
let
|
|
749
|
-
let
|
|
750
|
-
return
|
|
751
|
-
},
|
|
752
|
-
let
|
|
753
|
-
return
|
|
747
|
+
function ft({ card: e, entity: t, record: n, objectStatuses: r, objectProperties: i }) {
|
|
748
|
+
let a = Qe(), o = (e) => {
|
|
749
|
+
let o = R(a, t, e, n, r, i);
|
|
750
|
+
return o != null && D(o) !== "";
|
|
751
|
+
}, s = (e) => {
|
|
752
|
+
let o = R(a, t, e, n, r, i);
|
|
753
|
+
return D(o) || /* @__PURE__ */ F("span", {
|
|
754
754
|
style: { color: "var(--text-3)" },
|
|
755
755
|
children: "-"
|
|
756
756
|
});
|
|
757
|
-
},
|
|
758
|
-
return /* @__PURE__ */
|
|
757
|
+
}, c = e.titleUsesDisplay ? Te(a, n, t) : e.titleField ? R(a, t, e.titleField, n, r, i) : void 0, l = D(c) || a(t.display?.name) || a("record.fallback_title", "Record"), u = e.badgeFields.filter((t) => !e.hideEmptyFields || o(t)), ee = e.bodyFields.filter((t) => !e.hideEmptyFields || o(t)), d = e.metaFields.filter((t) => !e.hideEmptyFields || o(t));
|
|
758
|
+
return /* @__PURE__ */ I("section", {
|
|
759
759
|
"data-testid": "detail-header-card",
|
|
760
760
|
style: {
|
|
761
761
|
width: "100%",
|
|
@@ -768,9 +768,9 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
|
|
|
768
768
|
boxSizing: "border-box"
|
|
769
769
|
},
|
|
770
770
|
children: [
|
|
771
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ I("div", {
|
|
772
772
|
style: { minWidth: 0 },
|
|
773
|
-
children: [/* @__PURE__ */
|
|
773
|
+
children: [/* @__PURE__ */ F("div", {
|
|
774
774
|
style: {
|
|
775
775
|
fontSize: 15,
|
|
776
776
|
lineHeight: 1.25,
|
|
@@ -778,8 +778,8 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
|
|
|
778
778
|
color: "var(--text)",
|
|
779
779
|
overflowWrap: "anywhere"
|
|
780
780
|
},
|
|
781
|
-
children:
|
|
782
|
-
}), e.subtitleField && /* @__PURE__ */
|
|
781
|
+
children: l
|
|
782
|
+
}), e.subtitleField && /* @__PURE__ */ F("div", {
|
|
783
783
|
style: {
|
|
784
784
|
marginTop: 4,
|
|
785
785
|
fontSize: 12.5,
|
|
@@ -787,17 +787,17 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
|
|
|
787
787
|
color: "var(--text-3)",
|
|
788
788
|
overflowWrap: "anywhere"
|
|
789
789
|
},
|
|
790
|
-
children:
|
|
790
|
+
children: s(e.subtitleField)
|
|
791
791
|
})]
|
|
792
792
|
}),
|
|
793
|
-
|
|
793
|
+
u.length > 0 && /* @__PURE__ */ F("div", {
|
|
794
794
|
style: {
|
|
795
795
|
display: "flex",
|
|
796
796
|
flexWrap: "wrap",
|
|
797
797
|
gap: 6,
|
|
798
798
|
marginTop: 10
|
|
799
799
|
},
|
|
800
|
-
children:
|
|
800
|
+
children: u.map((e) => /* @__PURE__ */ F("span", {
|
|
801
801
|
style: {
|
|
802
802
|
minWidth: 0,
|
|
803
803
|
maxWidth: "100%",
|
|
@@ -809,10 +809,10 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
|
|
|
809
809
|
lineHeight: 1.4,
|
|
810
810
|
overflowWrap: "anywhere"
|
|
811
811
|
},
|
|
812
|
-
children:
|
|
812
|
+
children: s(e)
|
|
813
813
|
}, e))
|
|
814
814
|
}),
|
|
815
|
-
|
|
815
|
+
ee.length > 0 && /* @__PURE__ */ F("dl", {
|
|
816
816
|
style: {
|
|
817
817
|
display: "grid",
|
|
818
818
|
gridTemplateColumns: "minmax(84px, max-content) minmax(0, 1fr)",
|
|
@@ -821,23 +821,23 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
|
|
|
821
821
|
fontSize: 12.5,
|
|
822
822
|
lineHeight: 1.35
|
|
823
823
|
},
|
|
824
|
-
children:
|
|
824
|
+
children: ee.map((e) => /* @__PURE__ */ I("div", {
|
|
825
825
|
style: { display: "contents" },
|
|
826
|
-
children: [/* @__PURE__ */
|
|
826
|
+
children: [/* @__PURE__ */ F("dt", {
|
|
827
827
|
style: { color: "var(--text-3)" },
|
|
828
|
-
children:
|
|
829
|
-
}), /* @__PURE__ */
|
|
828
|
+
children: pt(a, t, e)
|
|
829
|
+
}), /* @__PURE__ */ F("dd", {
|
|
830
830
|
style: {
|
|
831
831
|
margin: 0,
|
|
832
832
|
color: "var(--text-2)",
|
|
833
833
|
minWidth: 0,
|
|
834
834
|
overflowWrap: "anywhere"
|
|
835
835
|
},
|
|
836
|
-
children:
|
|
836
|
+
children: s(e)
|
|
837
837
|
})]
|
|
838
838
|
}, e))
|
|
839
839
|
}),
|
|
840
|
-
|
|
840
|
+
d.length > 0 && /* @__PURE__ */ F("div", {
|
|
841
841
|
style: {
|
|
842
842
|
display: "flex",
|
|
843
843
|
flexWrap: "wrap",
|
|
@@ -846,22 +846,22 @@ function ht({ card: e, entity: n, record: r, objectStatuses: i, objectProperties
|
|
|
846
846
|
color: "var(--text-3)",
|
|
847
847
|
fontSize: 11.5
|
|
848
848
|
},
|
|
849
|
-
children:
|
|
849
|
+
children: d.map((e) => /* @__PURE__ */ I("span", {
|
|
850
850
|
style: {
|
|
851
851
|
minWidth: 0,
|
|
852
852
|
overflowWrap: "anywhere"
|
|
853
853
|
},
|
|
854
854
|
children: [
|
|
855
|
-
|
|
855
|
+
pt(a, t, e),
|
|
856
856
|
": ",
|
|
857
|
-
|
|
857
|
+
s(e)
|
|
858
858
|
]
|
|
859
859
|
}, e))
|
|
860
860
|
})
|
|
861
861
|
]
|
|
862
862
|
});
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function R(e, t, n, r, i, a) {
|
|
865
865
|
if (n.startsWith("$status.")) {
|
|
866
866
|
let t = n.slice(8), r = i?.find((e) => e.group_code === t);
|
|
867
867
|
return e(r?.status_name) || r?.status_code;
|
|
@@ -870,68 +870,68 @@ function F(e, t, n, r, i, a) {
|
|
|
870
870
|
let e = n.slice(10);
|
|
871
871
|
return a?.find((t) => t.property_code === e)?.value;
|
|
872
872
|
}
|
|
873
|
-
return
|
|
873
|
+
return Xe(t, r, n);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function pt(e, t, n) {
|
|
876
876
|
if (n.startsWith("$status.")) return n.slice(8);
|
|
877
877
|
if (n.startsWith("$property.")) return n.slice(10);
|
|
878
878
|
let r = t.fields.get(n);
|
|
879
|
-
return r ?
|
|
879
|
+
return r ? w(e, r, n) : n;
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
let
|
|
883
|
-
if (!
|
|
884
|
-
let e =
|
|
881
|
+
function mt({ title: e, editing: t, isNew: n, isRecordDeleted: a, dirty: s, isSaving: c, hasChildErrors: l, hasFieldErrors: u, canRestore: ee, entity: d, screen: f, globalActions: p, entityCode: te, record: m, id: h, listRoute: ie, listRouteExists: ae, highlights: se, showBack: ce, onBack: de, onCancelEdit: fe, onSave: me, onRestore: ge, isRestoring: _e, refreshControl: ve, isRealtimeEntity: ye, canManageTemplates: xe }) {
|
|
882
|
+
let C = Qe(), Se = Qe("errors"), Ce = $e(d), { run: we } = le(), w = oe("detail"), Te = S(), Ee = be(), De = _(f?.action_layout, d?.action_layout, d?.actions, p, "detail_toolbar"), Oe = _(f?.action_layout, d?.action_layout, d?.actions, p, "detail"), ke = pe(C, Oe, d?.actions, p, m ?? {}, [], Ce, he(d, m ?? {})), T = pe(C, De, d?.actions, p, m ?? {}, [], Ce, he(d, m ?? {})), Ae = M(() => {
|
|
883
|
+
if (!d) return;
|
|
884
|
+
let e = h ? [h] : [];
|
|
885
885
|
return {
|
|
886
|
-
entity:
|
|
887
|
-
entityCode:
|
|
888
|
-
screen:
|
|
889
|
-
screenRoute:
|
|
890
|
-
selectedRows:
|
|
886
|
+
entity: d,
|
|
887
|
+
entityCode: te ?? "",
|
|
888
|
+
screen: f,
|
|
889
|
+
screenRoute: f?.route ?? "",
|
|
890
|
+
selectedRows: m ? [m] : [],
|
|
891
891
|
selectedIds: e,
|
|
892
|
-
t:
|
|
893
|
-
tabNavigate: (e, t) =>
|
|
892
|
+
t: C,
|
|
893
|
+
tabNavigate: (e, t) => Te(e, {
|
|
894
894
|
title: t?.title,
|
|
895
895
|
icon: t?.icon,
|
|
896
896
|
search: t?.search
|
|
897
897
|
}),
|
|
898
|
-
runActionApi: (e, t) =>
|
|
899
|
-
recordHref: (e) => e ===
|
|
898
|
+
runActionApi: (e, t) => ue(e, t),
|
|
899
|
+
recordHref: (e) => e === h && f?.route ? f.route.replace(":id", encodeURIComponent(e)) : null
|
|
900
900
|
};
|
|
901
901
|
}, [
|
|
902
|
-
|
|
902
|
+
d,
|
|
903
|
+
te,
|
|
903
904
|
f,
|
|
904
|
-
|
|
905
|
+
h,
|
|
905
906
|
m,
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
x
|
|
907
|
+
C,
|
|
908
|
+
Te
|
|
909
909
|
]), je = (e, t) => {
|
|
910
|
-
let n =
|
|
910
|
+
let n = v(Se, e, t, { row: m ?? void 0 });
|
|
911
911
|
if (n === null) return;
|
|
912
|
-
let r =
|
|
912
|
+
let r = h ? [h] : [], i = e === "__delete" && ae ? ie : null;
|
|
913
913
|
return we({
|
|
914
914
|
action: t,
|
|
915
|
-
title:
|
|
916
|
-
row:
|
|
917
|
-
execute: (e) =>
|
|
915
|
+
title: C(t.display?.name) || e,
|
|
916
|
+
row: m ?? void 0,
|
|
917
|
+
execute: (e) => ue(n, g(e, r)),
|
|
918
918
|
onSuccess: i ? () => {
|
|
919
|
-
|
|
919
|
+
re.getState().kill(ne(location)), Ee(i, { replace: !0 });
|
|
920
920
|
} : void 0
|
|
921
921
|
});
|
|
922
|
-
},
|
|
923
|
-
layout:
|
|
924
|
-
row:
|
|
922
|
+
}, E = w.isVisible("show_actions") && !n && h && ke.length > 0 ? /* @__PURE__ */ F(y, {
|
|
923
|
+
layout: ke,
|
|
924
|
+
row: m,
|
|
925
925
|
onRun: je,
|
|
926
926
|
kind: "detail",
|
|
927
|
-
entityActions:
|
|
928
|
-
globalActions:
|
|
927
|
+
entityActions: d?.actions,
|
|
928
|
+
globalActions: p,
|
|
929
929
|
reservedRightWidth: 0,
|
|
930
930
|
widgetContext: Ae
|
|
931
|
-
}) : null,
|
|
932
|
-
liveObject:
|
|
933
|
-
realtime:
|
|
934
|
-
}) : null,
|
|
931
|
+
}) : null, Me = !n && h ? /* @__PURE__ */ F(b, {
|
|
932
|
+
liveObject: ve,
|
|
933
|
+
realtime: ye
|
|
934
|
+
}) : null, Ne = w.isVisible("show_actions") && !n && h && T.length > 0 ? /* @__PURE__ */ I("div", {
|
|
935
935
|
style: {
|
|
936
936
|
display: "flex",
|
|
937
937
|
justifyContent: "flex-end",
|
|
@@ -939,63 +939,63 @@ function _t({ title: e, editing: t, isNew: n, isRecordDeleted: r, dirty: i, isSa
|
|
|
939
939
|
gap: 8,
|
|
940
940
|
marginTop: 10
|
|
941
941
|
},
|
|
942
|
-
children: [
|
|
943
|
-
layout:
|
|
944
|
-
row:
|
|
942
|
+
children: [E ? null : Me, /* @__PURE__ */ F(y, {
|
|
943
|
+
layout: T,
|
|
944
|
+
row: m,
|
|
945
945
|
onRun: je,
|
|
946
946
|
kind: "detail",
|
|
947
|
-
entityActions:
|
|
948
|
-
globalActions:
|
|
947
|
+
entityActions: d?.actions,
|
|
948
|
+
globalActions: p,
|
|
949
949
|
reservedRightWidth: 0,
|
|
950
950
|
widgetContext: Ae,
|
|
951
|
-
ariaLabel:
|
|
951
|
+
ariaLabel: E ? C("record.toolbar_actions", "Detail toolbar actions") : C("record.page_actions", "Page actions")
|
|
952
952
|
})]
|
|
953
|
-
}) : null,
|
|
954
|
-
entityCode:
|
|
953
|
+
}) : null, Pe = w.isVisible("show_actions") && !n && h && te ? /* @__PURE__ */ F(x, {
|
|
954
|
+
entityCode: te,
|
|
955
955
|
scope: "detail",
|
|
956
|
-
objectIds: [
|
|
957
|
-
capability:
|
|
958
|
-
canManageTemplates:
|
|
959
|
-
}) : null,
|
|
956
|
+
objectIds: [h],
|
|
957
|
+
capability: d?.documents,
|
|
958
|
+
canManageTemplates: xe
|
|
959
|
+
}) : null, Fe = a ? ee ? /* @__PURE__ */ F(r, {
|
|
960
960
|
kind: "primary",
|
|
961
|
-
icon:
|
|
962
|
-
onClick:
|
|
963
|
-
disabled:
|
|
964
|
-
children:
|
|
965
|
-
}) : null : t ? /* @__PURE__ */
|
|
966
|
-
icon: /* @__PURE__ */
|
|
967
|
-
onClick:
|
|
968
|
-
disabled:
|
|
969
|
-
children:
|
|
970
|
-
}), /* @__PURE__ */
|
|
961
|
+
icon: F(_e ? o : i.refresh, { size: 13 }),
|
|
962
|
+
onClick: ge,
|
|
963
|
+
disabled: _e,
|
|
964
|
+
children: _e ? C("record.restoring", "Restoring…") : C("record.restore", "Restore")
|
|
965
|
+
}) : null : t ? /* @__PURE__ */ I(nt, { children: [/* @__PURE__ */ F(r, {
|
|
966
|
+
icon: /* @__PURE__ */ F(i.x, { size: 13 }),
|
|
967
|
+
onClick: fe,
|
|
968
|
+
disabled: c,
|
|
969
|
+
children: C("dialog.cancel", "Cancel")
|
|
970
|
+
}), /* @__PURE__ */ F(r, {
|
|
971
971
|
kind: "primary",
|
|
972
|
-
icon:
|
|
973
|
-
onClick:
|
|
974
|
-
disabled:
|
|
975
|
-
title:
|
|
976
|
-
children:
|
|
977
|
-
})] }) : !n &&
|
|
972
|
+
icon: F(c ? o : i.save, { size: 13 }),
|
|
973
|
+
onClick: me,
|
|
974
|
+
disabled: c || l || u,
|
|
975
|
+
title: l ? C("record.save.fix_child_rows", "Fix errors in child rows") : u ? C("record.save.fix_fields", "Fix the highlighted fields") : void 0,
|
|
976
|
+
children: c ? C("dialog.saving", "Saving…") : C("dialog.save", "Save")
|
|
977
|
+
})] }) : !n && h ? E ? /* @__PURE__ */ I("span", {
|
|
978
978
|
style: { display: "contents" },
|
|
979
|
-
children: [
|
|
980
|
-
}) :
|
|
981
|
-
return /* @__PURE__ */
|
|
982
|
-
icon:
|
|
983
|
-
name:
|
|
979
|
+
children: [Pe, E]
|
|
980
|
+
}) : Pe : null;
|
|
981
|
+
return /* @__PURE__ */ I(nt, { children: [/* @__PURE__ */ F(Re, {
|
|
982
|
+
icon: d?.display.icon ? /* @__PURE__ */ F(Be, {
|
|
983
|
+
name: d.display.icon,
|
|
984
984
|
size: 16
|
|
985
985
|
}) : void 0,
|
|
986
986
|
title: e,
|
|
987
|
-
description:
|
|
988
|
-
highlights:
|
|
989
|
-
identityControls: !
|
|
987
|
+
description: C(f?.display?.description) || C(d?.display?.description),
|
|
988
|
+
highlights: se,
|
|
989
|
+
identityControls: !a && !t && !n ? Me : null,
|
|
990
990
|
mode: n ? "create" : t ? "edit" : "display",
|
|
991
|
-
dirty:
|
|
992
|
-
showBack:
|
|
993
|
-
onBack:
|
|
994
|
-
right:
|
|
995
|
-
showTitle:
|
|
996
|
-
}),
|
|
991
|
+
dirty: s,
|
|
992
|
+
showBack: ce,
|
|
993
|
+
onBack: de,
|
|
994
|
+
right: Fe,
|
|
995
|
+
showTitle: w.isVisible("show_title")
|
|
996
|
+
}), Ne] });
|
|
997
997
|
}
|
|
998
|
-
var
|
|
998
|
+
var ht = {
|
|
999
999
|
danger: {
|
|
1000
1000
|
border: "var(--danger)",
|
|
1001
1001
|
background: "var(--danger-soft)",
|
|
@@ -1012,9 +1012,9 @@ var vt = {
|
|
|
1012
1012
|
color: "var(--accent)"
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
|
-
function
|
|
1016
|
-
let r =
|
|
1017
|
-
return /* @__PURE__ */
|
|
1015
|
+
function gt({ tone: e, testId: t, children: n }) {
|
|
1016
|
+
let r = ht[e];
|
|
1017
|
+
return /* @__PURE__ */ I("div", {
|
|
1018
1018
|
"data-testid": t,
|
|
1019
1019
|
style: {
|
|
1020
1020
|
display: "flex",
|
|
@@ -1028,14 +1028,13 @@ function yt({ tone: e, testId: t, children: n }) {
|
|
|
1028
1028
|
color: r.color,
|
|
1029
1029
|
fontSize: 12.5
|
|
1030
1030
|
},
|
|
1031
|
-
children: [
|
|
1031
|
+
children: [F(e === "info" ? i.info : i.warning, { size: 14 }), /* @__PURE__ */ F("span", { children: n })]
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function _t(e, t, n, r) {
|
|
1035
1035
|
let i = t.tenant_key, a = i ? t.fields.get(i) : void 0;
|
|
1036
1036
|
if (!i || !a?.ref?.entity) return;
|
|
1037
1037
|
let o = r?.[a.ref.entity]?.[String(n[i])];
|
|
1038
|
-
if (o) return
|
|
1038
|
+
if (o) return T(e, o, a.display?.ref_display_field || "$display", "") || void 0;
|
|
1039
1039
|
}
|
|
1040
|
-
|
|
1041
|
-
export { pt as SmartDetailPage };
|
|
1040
|
+
export { ut as SmartDetailPage };
|