@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
|
@@ -1,1609 +0,0 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, Cn as r, Ft as i, I as a, It as o, Nt as s, Q as c, W as l, Xt as u, Z as d, an as f, at as p, cn as m, et as h, fn as g, in as _, mn as v, mt as y, on as ee, pt as b, qn as x, rn as te, sn as S, ut as C, wn as w, wt as T, xn as ne, xt as re } from "./useCurrentScreen-BZOHBGQZ.js";
|
|
2
|
-
import { t as E } from "./Icons-lt-7lhYR.js";
|
|
3
|
-
import { n as ie, r as D, t as O } from "./CopyButton-DRIT_f0k.js";
|
|
4
|
-
import { t as k } from "./Pill-D-wsfRhx.js";
|
|
5
|
-
import { L as ae, Q as A, _ as j, f as oe, h as se, o as ce, y as le } from "./PropertyGridEditor-XrP6TZ5s.js";
|
|
6
|
-
import { n as M } from "./useBrandingChrome-bxaR3G1R.js";
|
|
7
|
-
import { t as N } from "./SectionCard-BYHoHWJc.js";
|
|
8
|
-
import { t as P } from "./DynamicIcon-DuBSz6TZ.js";
|
|
9
|
-
import { t as ue } from "./useScreenBack-DENlz844.js";
|
|
10
|
-
import { n as F } from "./useTabNavigate-CUqOmcMj.js";
|
|
11
|
-
import { r as de } from "./page-state-eA6J_KIR.js";
|
|
12
|
-
import { _ as fe, n as pe, v as me } from "./ActionRunner-DdBFhqGe.js";
|
|
13
|
-
import { a as he, c as ge, d as _e, h as ve, n as ye, s as be } from "./useOwnRefresh-DJjaje52.js";
|
|
14
|
-
import { n as xe, t as Se } from "./useObject-B45F96rC.js";
|
|
15
|
-
import { a as Ce, f as we, g as Te, l as Ee, m as De, n as Oe, p as ke, s as Ae, u as je } from "./variants-vUtfBbE6.js";
|
|
16
|
-
import { n as Me, t as Ne } from "./payload-DioMoxMX.js";
|
|
17
|
-
import { r as Pe, t as Fe } from "./RefreshControl-CRdWPoF5.js";
|
|
18
|
-
import { n as Ie, r as Le, t as Re } from "./dataTableStyles-vwD1mVOP.js";
|
|
19
|
-
import { a as ze, i as Be, o as Ve, r as He, s as Ue } from "./peekDraftStore-CaimrOhW.js";
|
|
20
|
-
import { n as We, t as Ge } from "./LayoutRenderer-d-tXYPze.js";
|
|
21
|
-
import { i as Ke } from "./FieldRow-DedGIY9R.js";
|
|
22
|
-
import { n as qe, t as Je } from "./RecordHeader-BfQ0_4wq.js";
|
|
23
|
-
import { t as Ye } from "./PageShell-BJz1MiTH.js";
|
|
24
|
-
import { t as Xe } from "./cardProjection-Cxlogzh8.js";
|
|
25
|
-
import { Fragment as I, useCallback as L, useEffect as R, useMemo as z, useRef as Ze, useState as B } from "react";
|
|
26
|
-
import { useQuery as Qe, useQueryClient as V } from "@tanstack/react-query";
|
|
27
|
-
import { Fragment as $e, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
28
|
-
import { useLocation as et, useParams as tt, useSearchParams as nt } from "react-router";
|
|
29
|
-
//#region src/components/chrome/AssociationTabs.tsx
|
|
30
|
-
function rt({ entityCode: e, recordId: t, associations: n, schema: r }) {
|
|
31
|
-
let i = T(), a = z(() => Object.entries(n), [n]), [o, s] = B(0);
|
|
32
|
-
if (a.length === 0) return null;
|
|
33
|
-
let [c, l] = a[o];
|
|
34
|
-
return /* @__PURE__ */ H(N, {
|
|
35
|
-
title: /* @__PURE__ */ H("div", {
|
|
36
|
-
style: {
|
|
37
|
-
display: "flex",
|
|
38
|
-
alignItems: "center",
|
|
39
|
-
gap: 4,
|
|
40
|
-
borderBottom: "1px solid var(--divider)",
|
|
41
|
-
margin: "-10px -14px 0 -14px",
|
|
42
|
-
padding: "0 14px"
|
|
43
|
-
},
|
|
44
|
-
children: a.map(([e, t], n) => {
|
|
45
|
-
let r = n === o;
|
|
46
|
-
return /* @__PURE__ */ U("button", {
|
|
47
|
-
onClick: (e) => {
|
|
48
|
-
e.stopPropagation(), s(n);
|
|
49
|
-
},
|
|
50
|
-
style: {
|
|
51
|
-
display: "inline-flex",
|
|
52
|
-
alignItems: "center",
|
|
53
|
-
gap: 6,
|
|
54
|
-
padding: "10px 12px",
|
|
55
|
-
fontSize: 12.5,
|
|
56
|
-
background: "transparent",
|
|
57
|
-
border: 0,
|
|
58
|
-
borderBottom: `2px solid ${r ? "var(--accent)" : "transparent"}`,
|
|
59
|
-
marginBottom: -1,
|
|
60
|
-
color: r ? "var(--text)" : "var(--text-3)",
|
|
61
|
-
cursor: "pointer",
|
|
62
|
-
fontWeight: r ? 600 : 500
|
|
63
|
-
},
|
|
64
|
-
children: [t.display?.icon && /* @__PURE__ */ H(P, {
|
|
65
|
-
name: t.display.icon,
|
|
66
|
-
size: 13
|
|
67
|
-
}), i(t.display?.name) || e]
|
|
68
|
-
}, e);
|
|
69
|
-
})
|
|
70
|
-
}),
|
|
71
|
-
collapsible: !1,
|
|
72
|
-
padding: "0",
|
|
73
|
-
children: /* @__PURE__ */ H(it, {
|
|
74
|
-
entityCode: e,
|
|
75
|
-
recordId: t,
|
|
76
|
-
assocKey: c,
|
|
77
|
-
association: l,
|
|
78
|
-
schema: r
|
|
79
|
-
})
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function it({ entityCode: e, recordId: t, assocKey: n, association: r, schema: i }) {
|
|
83
|
-
let o = T(), s = T("errors"), c = F(), l = `${e}.${n}`, { data: u, isLoading: d } = Qe({
|
|
84
|
-
queryKey: [
|
|
85
|
-
"association",
|
|
86
|
-
l,
|
|
87
|
-
t
|
|
88
|
-
],
|
|
89
|
-
queryFn: () => y(l, [t])
|
|
90
|
-
}), f = u?.target_entity ?? r.target, p = i.entities[f], m = z(() => u?.ids ?? [], [u?.ids]), h = z(() => p?.fields.names().find((e) => p.fields.get(e)?.primary) ?? "id", [p]), g = z(() => m.slice(0, 50), [m]), { data: _, isLoading: v } = Qe({
|
|
91
|
-
queryKey: [
|
|
92
|
-
"association-records",
|
|
93
|
-
f,
|
|
94
|
-
g
|
|
95
|
-
],
|
|
96
|
-
queryFn: () => b(f, {
|
|
97
|
-
per_page: 50,
|
|
98
|
-
filters: [{
|
|
99
|
-
field: h,
|
|
100
|
-
op: "in",
|
|
101
|
-
value: g
|
|
102
|
-
}]
|
|
103
|
-
}),
|
|
104
|
-
enabled: g.length > 0 && !!p
|
|
105
|
-
}), x = _?.data ?? [], te = _?.$refs, S = z(() => p ? p.fields.names().filter((e) => {
|
|
106
|
-
let t = p.fields.get(e);
|
|
107
|
-
return t && !t.primary && !t.auto && t.display?.is_listable !== !1;
|
|
108
|
-
}).slice(0, 6) : [], [p]), C = () => {
|
|
109
|
-
let e = a(i, f);
|
|
110
|
-
if (!e) return;
|
|
111
|
-
let t = o(r.display?.name) || n, s = new URLSearchParams();
|
|
112
|
-
s.set("filters", JSON.stringify([{
|
|
113
|
-
field: h,
|
|
114
|
-
op: "in",
|
|
115
|
-
value: m
|
|
116
|
-
}])), c(e.route, {
|
|
117
|
-
title: t,
|
|
118
|
-
icon: r.display?.icon || e.icon,
|
|
119
|
-
search: s.toString()
|
|
120
|
-
});
|
|
121
|
-
}, w = {
|
|
122
|
-
fontSize: 12.5,
|
|
123
|
-
color: "var(--text-3)",
|
|
124
|
-
padding: "14px 16px"
|
|
125
|
-
};
|
|
126
|
-
if (d || v) return /* @__PURE__ */ H("div", {
|
|
127
|
-
style: w,
|
|
128
|
-
children: o("shell.loading", "Loading…")
|
|
129
|
-
});
|
|
130
|
-
if (!p) return /* @__PURE__ */ H("div", {
|
|
131
|
-
style: w,
|
|
132
|
-
children: s("record.related_entity_not_found", "The related record type is not declared in this deployment.")
|
|
133
|
-
});
|
|
134
|
-
if (m.length === 0) return /* @__PURE__ */ H("div", {
|
|
135
|
-
style: w,
|
|
136
|
-
children: o("shell.association.empty", "No related records.")
|
|
137
|
-
});
|
|
138
|
-
let ne = a(i, f);
|
|
139
|
-
return /* @__PURE__ */ U("div", {
|
|
140
|
-
style: { padding: "8px 0" },
|
|
141
|
-
children: [
|
|
142
|
-
/* @__PURE__ */ U("table", {
|
|
143
|
-
style: Le,
|
|
144
|
-
children: [/* @__PURE__ */ H("thead", { children: /* @__PURE__ */ H("tr", { children: S.map((e) => /* @__PURE__ */ H("th", {
|
|
145
|
-
style: Ie,
|
|
146
|
-
children: ee(o, p.fields.get(e), e, i.entities)
|
|
147
|
-
}, e)) }) }), /* @__PURE__ */ H("tbody", { children: x.map((e, t) => /* @__PURE__ */ H("tr", { children: S.map((t) => {
|
|
148
|
-
let n = p.fields.get(t);
|
|
149
|
-
return n ? /* @__PURE__ */ H("td", {
|
|
150
|
-
style: Re,
|
|
151
|
-
children: oe({
|
|
152
|
-
field: n,
|
|
153
|
-
fieldName: t,
|
|
154
|
-
value: e[t],
|
|
155
|
-
mode: "display",
|
|
156
|
-
record: e,
|
|
157
|
-
refs: te,
|
|
158
|
-
t: o
|
|
159
|
-
})
|
|
160
|
-
}, t) : /* @__PURE__ */ H("td", {}, t);
|
|
161
|
-
}) }, t)) })]
|
|
162
|
-
}),
|
|
163
|
-
ne && u && u.count > x.length && /* @__PURE__ */ H("div", {
|
|
164
|
-
style: {
|
|
165
|
-
padding: "10px 16px",
|
|
166
|
-
textAlign: "center"
|
|
167
|
-
},
|
|
168
|
-
children: /* @__PURE__ */ H(D, {
|
|
169
|
-
icon: /* @__PURE__ */ H(E.external, { size: 12 }),
|
|
170
|
-
onClick: C,
|
|
171
|
-
children: o("shell.association.view_all", "View all {count} records", { count: u.count })
|
|
172
|
-
})
|
|
173
|
-
}),
|
|
174
|
-
ne && x.length > 0 && u && u.count <= x.length && /* @__PURE__ */ H("div", {
|
|
175
|
-
style: {
|
|
176
|
-
padding: "10px 16px",
|
|
177
|
-
textAlign: "center"
|
|
178
|
-
},
|
|
179
|
-
children: /* @__PURE__ */ H(D, {
|
|
180
|
-
kind: "ghost",
|
|
181
|
-
icon: /* @__PURE__ */ H(E.external, { size: 12 }),
|
|
182
|
-
onClick: C,
|
|
183
|
-
children: o("shell.association.open_list", "Open in list view")
|
|
184
|
-
})
|
|
185
|
-
})
|
|
186
|
-
]
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region src/components/pages/RecordDocumentsPanel.tsx
|
|
191
|
-
var W = 4e3, at = "pdf";
|
|
192
|
-
function G(e) {
|
|
193
|
-
return e?.some((e) => e.status === "pending") ? W : !1;
|
|
194
|
-
}
|
|
195
|
-
function ot({ entityCode: e, objectId: t, canGenerateOne: n, canManageTemplates: r }) {
|
|
196
|
-
let i = T(), a = T("errors"), { data: o, isLoading: s, error: l } = Qe({
|
|
197
|
-
queryKey: [
|
|
198
|
-
fe,
|
|
199
|
-
e,
|
|
200
|
-
t
|
|
201
|
-
],
|
|
202
|
-
queryFn: async () => (await C("document.object_links", {
|
|
203
|
-
entity: e,
|
|
204
|
-
object_id: t
|
|
205
|
-
})).result?.documents ?? [],
|
|
206
|
-
enabled: !!(e && t) && (!!n || !!r),
|
|
207
|
-
refetchInterval: (e) => G(e.state.data)
|
|
208
|
-
}), u = (o?.length ?? 0) > 0;
|
|
209
|
-
return !n && !u ? null : /* @__PURE__ */ U(N, {
|
|
210
|
-
title: /* @__PURE__ */ H(K, {}),
|
|
211
|
-
collapsible: !1,
|
|
212
|
-
padding: "0",
|
|
213
|
-
children: [
|
|
214
|
-
s && /* @__PURE__ */ H(ct, {
|
|
215
|
-
icon: /* @__PURE__ */ H(E.loader, { size: 14 }),
|
|
216
|
-
text: i("document.panel.loading", "Loading documents...")
|
|
217
|
-
}),
|
|
218
|
-
l && /* @__PURE__ */ H(ct, {
|
|
219
|
-
icon: /* @__PURE__ */ H(E.warning, { size: 14 }),
|
|
220
|
-
text: c(a, l)
|
|
221
|
-
}),
|
|
222
|
-
!s && !l && (o?.length ?? 0) === 0 && /* @__PURE__ */ H(ct, {
|
|
223
|
-
icon: /* @__PURE__ */ H(E.file, { size: 14 }),
|
|
224
|
-
text: i("document.panel.empty", "No generated documents")
|
|
225
|
-
}),
|
|
226
|
-
!s && !l && o && o.length > 0 && /* @__PURE__ */ H("div", {
|
|
227
|
-
style: {
|
|
228
|
-
display: "flex",
|
|
229
|
-
flexDirection: "column"
|
|
230
|
-
},
|
|
231
|
-
children: o.map((n) => /* @__PURE__ */ H(st, {
|
|
232
|
-
entityCode: e,
|
|
233
|
-
objectId: t,
|
|
234
|
-
doc: n
|
|
235
|
-
}, n.generated_document_id))
|
|
236
|
-
})
|
|
237
|
-
]
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
function K() {
|
|
241
|
-
let e = T();
|
|
242
|
-
return /* @__PURE__ */ U("div", {
|
|
243
|
-
style: {
|
|
244
|
-
display: "flex",
|
|
245
|
-
alignItems: "center",
|
|
246
|
-
gap: 6,
|
|
247
|
-
margin: "-10px -14px 0 -14px",
|
|
248
|
-
padding: "10px 14px",
|
|
249
|
-
fontSize: 12.5,
|
|
250
|
-
fontWeight: 600,
|
|
251
|
-
color: "var(--text)"
|
|
252
|
-
},
|
|
253
|
-
children: [/* @__PURE__ */ H(E.file, { size: 13 }), e("document.panel.title", "Documents")]
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
function st({ entityCode: t, objectId: n, doc: r }) {
|
|
257
|
-
let a = T(), { data: o } = i(), s = a(o?.entities?.generated_document?.fields.get("status")?.values?.find((e) => e.code === r.status)?.name) || r.status, l = T("errors"), u = V(), [d, f] = B(!1), [p, m] = B(!1), [g, _] = B(!1), [v, y] = B(!1), [ee, b] = B(null), x = a(r.title) || r.filename || r.template_code, te = r.status === "ready" && r.download_url && !v;
|
|
258
|
-
async function S() {
|
|
259
|
-
f(!0), b(null);
|
|
260
|
-
try {
|
|
261
|
-
let t = (await C("document.download_format", {
|
|
262
|
-
generated_document_id: r.generated_document_id,
|
|
263
|
-
format: at
|
|
264
|
-
})).result;
|
|
265
|
-
t?.download_url && await e(l, t.download_url, t.filename);
|
|
266
|
-
} catch (e) {
|
|
267
|
-
h(e) ? (y(!0), b(l("document.artifact_unavailable", "This generated file is not available."))) : b(c(l, e));
|
|
268
|
-
} finally {
|
|
269
|
-
f(!1);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
async function w() {
|
|
273
|
-
if (r.download_url) {
|
|
274
|
-
m(!0), b(null);
|
|
275
|
-
try {
|
|
276
|
-
await e(l, r.download_url, r.filename);
|
|
277
|
-
} catch (e) {
|
|
278
|
-
h(e) ? (y(!0), b(l("document.artifact_unavailable", "This generated file is not available."))) : b(c(l, e));
|
|
279
|
-
} finally {
|
|
280
|
-
m(!1);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
async function ne() {
|
|
285
|
-
_(!0), b(null);
|
|
286
|
-
try {
|
|
287
|
-
await C("document.generate", {
|
|
288
|
-
...r.input ?? {},
|
|
289
|
-
template_code: r.template_code,
|
|
290
|
-
template_source: r.template_source,
|
|
291
|
-
output_format: r.output_format
|
|
292
|
-
}), await u.invalidateQueries({ queryKey: [
|
|
293
|
-
fe,
|
|
294
|
-
t,
|
|
295
|
-
n
|
|
296
|
-
] });
|
|
297
|
-
} catch (e) {
|
|
298
|
-
b(c(l, e));
|
|
299
|
-
} finally {
|
|
300
|
-
_(!1);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
return /* @__PURE__ */ U("div", {
|
|
304
|
-
style: {
|
|
305
|
-
display: "grid",
|
|
306
|
-
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
307
|
-
gap: 12,
|
|
308
|
-
alignItems: "center",
|
|
309
|
-
padding: "11px 14px",
|
|
310
|
-
borderTop: "1px solid var(--divider)"
|
|
311
|
-
},
|
|
312
|
-
children: [/* @__PURE__ */ U("div", {
|
|
313
|
-
style: { minWidth: 0 },
|
|
314
|
-
children: [
|
|
315
|
-
/* @__PURE__ */ H("div", {
|
|
316
|
-
style: {
|
|
317
|
-
fontSize: 13,
|
|
318
|
-
fontWeight: 600,
|
|
319
|
-
color: "var(--text)",
|
|
320
|
-
overflow: "hidden",
|
|
321
|
-
textOverflow: "ellipsis",
|
|
322
|
-
whiteSpace: "nowrap"
|
|
323
|
-
},
|
|
324
|
-
children: x
|
|
325
|
-
}),
|
|
326
|
-
/* @__PURE__ */ U("div", {
|
|
327
|
-
style: {
|
|
328
|
-
marginTop: 3,
|
|
329
|
-
display: "flex",
|
|
330
|
-
gap: 8,
|
|
331
|
-
alignItems: "center",
|
|
332
|
-
color: "var(--text-3)",
|
|
333
|
-
fontSize: 11.5
|
|
334
|
-
},
|
|
335
|
-
children: [
|
|
336
|
-
/* @__PURE__ */ H("span", { children: r.output_format.toUpperCase() }),
|
|
337
|
-
/* @__PURE__ */ H("span", { children: v ? a("document.row.artifact_missing", "artifact unavailable") : s }),
|
|
338
|
-
/* @__PURE__ */ H("span", { children: r.ready_at || r.created_at })
|
|
339
|
-
]
|
|
340
|
-
}),
|
|
341
|
-
r.status === "failed" && r.error_text && /* @__PURE__ */ H("div", {
|
|
342
|
-
style: {
|
|
343
|
-
marginTop: 5,
|
|
344
|
-
color: "var(--danger)",
|
|
345
|
-
fontSize: 12
|
|
346
|
-
},
|
|
347
|
-
children: r.error_text
|
|
348
|
-
}),
|
|
349
|
-
ee && /* @__PURE__ */ H("div", {
|
|
350
|
-
style: {
|
|
351
|
-
marginTop: 5,
|
|
352
|
-
color: "var(--danger)",
|
|
353
|
-
fontSize: 12
|
|
354
|
-
},
|
|
355
|
-
children: ee
|
|
356
|
-
})
|
|
357
|
-
]
|
|
358
|
-
}), te ? /* @__PURE__ */ U("div", {
|
|
359
|
-
style: {
|
|
360
|
-
display: "flex",
|
|
361
|
-
gap: 6
|
|
362
|
-
},
|
|
363
|
-
children: [/* @__PURE__ */ H(D, {
|
|
364
|
-
kind: "ghost",
|
|
365
|
-
size: "sm",
|
|
366
|
-
icon: H(d ? E.loader : E.file, { size: 12 }),
|
|
367
|
-
onClick: S,
|
|
368
|
-
disabled: d,
|
|
369
|
-
children: at.toUpperCase()
|
|
370
|
-
}), /* @__PURE__ */ H(D, {
|
|
371
|
-
kind: "default",
|
|
372
|
-
size: "sm",
|
|
373
|
-
icon: H(p ? E.loader : E.download, { size: 12 }),
|
|
374
|
-
onClick: w,
|
|
375
|
-
disabled: p,
|
|
376
|
-
children: a("document.result.download", "Download")
|
|
377
|
-
})]
|
|
378
|
-
}) : v ? /* @__PURE__ */ H(D, {
|
|
379
|
-
kind: "ghost",
|
|
380
|
-
size: "sm",
|
|
381
|
-
icon: H(g ? E.loader : E.file, { size: 12 }),
|
|
382
|
-
onClick: ne,
|
|
383
|
-
disabled: g,
|
|
384
|
-
children: a("document.row.regenerate", "Regenerate")
|
|
385
|
-
}) : /* @__PURE__ */ H(D, {
|
|
386
|
-
kind: "ghost",
|
|
387
|
-
size: "sm",
|
|
388
|
-
disabled: !0,
|
|
389
|
-
children: r.status === "pending" ? a("document.row.pending", "Pending") : a("document.not_available", "Unavailable")
|
|
390
|
-
})]
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
function ct({ icon: e, text: t }) {
|
|
394
|
-
return /* @__PURE__ */ U("div", {
|
|
395
|
-
style: {
|
|
396
|
-
display: "flex",
|
|
397
|
-
alignItems: "center",
|
|
398
|
-
gap: 8,
|
|
399
|
-
padding: "14px",
|
|
400
|
-
color: "var(--text-3)",
|
|
401
|
-
fontSize: 12.5
|
|
402
|
-
},
|
|
403
|
-
children: [e, t]
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
//#endregion
|
|
407
|
-
//#region src/components/detail-layout/ErrorSummary.tsx
|
|
408
|
-
function lt({ errors: e, onJump: t }) {
|
|
409
|
-
let n = T();
|
|
410
|
-
return e.length === 0 ? null : /* @__PURE__ */ U("div", {
|
|
411
|
-
role: "alert",
|
|
412
|
-
style: {
|
|
413
|
-
display: "flex",
|
|
414
|
-
gap: 10,
|
|
415
|
-
padding: "10px 12px",
|
|
416
|
-
marginBottom: 12,
|
|
417
|
-
borderRadius: 8,
|
|
418
|
-
background: "var(--danger-soft)",
|
|
419
|
-
border: "1px solid var(--danger-border)",
|
|
420
|
-
color: "var(--text)"
|
|
421
|
-
},
|
|
422
|
-
children: [/* @__PURE__ */ H("span", {
|
|
423
|
-
style: {
|
|
424
|
-
color: "var(--danger)",
|
|
425
|
-
marginTop: 1,
|
|
426
|
-
display: "flex"
|
|
427
|
-
},
|
|
428
|
-
children: /* @__PURE__ */ H(E.warning, { size: 14 })
|
|
429
|
-
}), /* @__PURE__ */ U("div", {
|
|
430
|
-
style: {
|
|
431
|
-
flex: 1,
|
|
432
|
-
minWidth: 0
|
|
433
|
-
},
|
|
434
|
-
children: [/* @__PURE__ */ H("div", {
|
|
435
|
-
style: {
|
|
436
|
-
fontSize: 12.5,
|
|
437
|
-
fontWeight: 600,
|
|
438
|
-
marginBottom: 4
|
|
439
|
-
},
|
|
440
|
-
children: s(n, "record.errors.summary", e.length, {
|
|
441
|
-
one: "{count} field needs attention",
|
|
442
|
-
other: "{count} fields need attention"
|
|
443
|
-
})
|
|
444
|
-
}), /* @__PURE__ */ H("ul", {
|
|
445
|
-
style: {
|
|
446
|
-
margin: 0,
|
|
447
|
-
padding: 0,
|
|
448
|
-
listStyle: "none",
|
|
449
|
-
display: "flex",
|
|
450
|
-
flexDirection: "column",
|
|
451
|
-
gap: 2
|
|
452
|
-
},
|
|
453
|
-
children: e.map((e) => /* @__PURE__ */ H("li", { children: /* @__PURE__ */ U("button", {
|
|
454
|
-
type: "button",
|
|
455
|
-
onClick: t ? () => t(e.name) : void 0,
|
|
456
|
-
style: {
|
|
457
|
-
background: "transparent",
|
|
458
|
-
border: 0,
|
|
459
|
-
padding: 0,
|
|
460
|
-
cursor: t ? "pointer" : "default",
|
|
461
|
-
fontSize: 12,
|
|
462
|
-
textAlign: "left",
|
|
463
|
-
fontFamily: "inherit"
|
|
464
|
-
},
|
|
465
|
-
children: [
|
|
466
|
-
/* @__PURE__ */ H("span", {
|
|
467
|
-
style: {
|
|
468
|
-
color: "var(--danger)",
|
|
469
|
-
marginRight: 6
|
|
470
|
-
},
|
|
471
|
-
children: "•"
|
|
472
|
-
}),
|
|
473
|
-
/* @__PURE__ */ H("span", {
|
|
474
|
-
style: {
|
|
475
|
-
fontWeight: 500,
|
|
476
|
-
color: "var(--text-2)"
|
|
477
|
-
},
|
|
478
|
-
children: e.label
|
|
479
|
-
}),
|
|
480
|
-
/* @__PURE__ */ U("span", {
|
|
481
|
-
style: { color: "var(--text-3)" },
|
|
482
|
-
children: [" - ", e.message]
|
|
483
|
-
})
|
|
484
|
-
]
|
|
485
|
-
}) }, e.name))
|
|
486
|
-
})]
|
|
487
|
-
})]
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
//#endregion
|
|
491
|
-
//#region src/components/chrome/HighlightsStrip.tsx
|
|
492
|
-
function ut({ items: e }) {
|
|
493
|
-
return e.length === 0 ? null : /* @__PURE__ */ H("div", {
|
|
494
|
-
style: {
|
|
495
|
-
display: "flex",
|
|
496
|
-
alignItems: "center",
|
|
497
|
-
flexWrap: "wrap",
|
|
498
|
-
gap: "6px 0",
|
|
499
|
-
fontSize: 12
|
|
500
|
-
},
|
|
501
|
-
children: e.map((e, t) => /* @__PURE__ */ U(I, { children: [t > 0 && /* @__PURE__ */ H("span", { style: {
|
|
502
|
-
width: 1,
|
|
503
|
-
height: 12,
|
|
504
|
-
background: "var(--divider)",
|
|
505
|
-
marginInline: 12
|
|
506
|
-
} }), /* @__PURE__ */ U("span", {
|
|
507
|
-
style: {
|
|
508
|
-
display: "inline-flex",
|
|
509
|
-
alignItems: "center",
|
|
510
|
-
gap: 6,
|
|
511
|
-
lineHeight: 1.3
|
|
512
|
-
},
|
|
513
|
-
children: [/* @__PURE__ */ H("span", {
|
|
514
|
-
style: {
|
|
515
|
-
color: "var(--text-3)",
|
|
516
|
-
fontSize: 11.5
|
|
517
|
-
},
|
|
518
|
-
children: e.label
|
|
519
|
-
}), /* @__PURE__ */ H("span", {
|
|
520
|
-
style: { color: "var(--text)" },
|
|
521
|
-
children: e.value
|
|
522
|
-
})]
|
|
523
|
-
})] }, t))
|
|
524
|
-
});
|
|
525
|
-
}
|
|
526
|
-
//#endregion
|
|
527
|
-
//#region src/components/detail-layout/DetailHighlights.tsx
|
|
528
|
-
function dt({ screen: e, entity: t, entityCode: n, record: r, refs: i, objectStatuses: a, schema: o }) {
|
|
529
|
-
let s = T(), c = e.highlights;
|
|
530
|
-
if (!c || c.length === 0) return null;
|
|
531
|
-
let l = [];
|
|
532
|
-
for (let e of c) {
|
|
533
|
-
let c = t.status_groups?.[e];
|
|
534
|
-
if (c) {
|
|
535
|
-
let t = a?.find((t) => t.group_code === e), n = t ? c.statuses.find((e) => e.code === t.status_code) : void 0;
|
|
536
|
-
l.push({
|
|
537
|
-
label: s(c.name),
|
|
538
|
-
value: n ? /* @__PURE__ */ H(k, {
|
|
539
|
-
tone: n.color ?? "slate",
|
|
540
|
-
size: "xs",
|
|
541
|
-
children: s(n.name)
|
|
542
|
-
}) : /* @__PURE__ */ H("span", {
|
|
543
|
-
style: { color: "var(--text-4)" },
|
|
544
|
-
children: "—"
|
|
545
|
-
})
|
|
546
|
-
});
|
|
547
|
-
} else if (t.fields.get(e) || t.files?.get(e)) {
|
|
548
|
-
let a = ke({
|
|
549
|
-
entity: t,
|
|
550
|
-
entityCode: n,
|
|
551
|
-
fieldName: e,
|
|
552
|
-
record: r,
|
|
553
|
-
mode: "display",
|
|
554
|
-
refs: i,
|
|
555
|
-
entities: o.entities,
|
|
556
|
-
screens: o.screens,
|
|
557
|
-
surface: "list",
|
|
558
|
-
t: s
|
|
559
|
-
}), c = Ke(t.fields.get(e), r[e]);
|
|
560
|
-
l.push({
|
|
561
|
-
label: De(s, t, e, o.entities),
|
|
562
|
-
value: c ? /* @__PURE__ */ U($e, { children: [a, /* @__PURE__ */ H(O, {
|
|
563
|
-
value: c,
|
|
564
|
-
size: "sm",
|
|
565
|
-
title: s("record.field.copy_value", "Copy value")
|
|
566
|
-
})] }) : a
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
return l.length === 0 ? null : /* @__PURE__ */ H(ut, { items: l });
|
|
571
|
-
}
|
|
572
|
-
//#endregion
|
|
573
|
-
//#region src/components/detail-layout/EvidenceBlock.tsx
|
|
574
|
-
function q(e, t) {
|
|
575
|
-
if (!e) return;
|
|
576
|
-
let n = new Date(e);
|
|
577
|
-
if (!Number.isNaN(n.getTime())) return n.toLocaleString(t);
|
|
578
|
-
}
|
|
579
|
-
function ft({ evidence: e }) {
|
|
580
|
-
let t = T(), n = e?.verdict ?? "unverified", r = q(e?.verified_at, t.language), i = [];
|
|
581
|
-
return e?.seq && i.push(t("record.evidence.chain", "chain #{seq}", { seq: e.seq })), e?.generation && i.push(t("record.evidence.generation", "generation {number}", { number: e.generation })), /* @__PURE__ */ U("div", {
|
|
582
|
-
style: {
|
|
583
|
-
display: "flex",
|
|
584
|
-
flexDirection: "column",
|
|
585
|
-
gap: 6
|
|
586
|
-
},
|
|
587
|
-
children: [/* @__PURE__ */ U("div", {
|
|
588
|
-
style: {
|
|
589
|
-
display: "flex",
|
|
590
|
-
alignItems: "center",
|
|
591
|
-
gap: 10,
|
|
592
|
-
flexWrap: "wrap"
|
|
593
|
-
},
|
|
594
|
-
children: [
|
|
595
|
-
/* @__PURE__ */ H("span", {
|
|
596
|
-
style: {
|
|
597
|
-
fontSize: 12,
|
|
598
|
-
fontWeight: 600,
|
|
599
|
-
color: "var(--muted-foreground)"
|
|
600
|
-
},
|
|
601
|
-
children: t("record.evidence.title", "Evidence")
|
|
602
|
-
}),
|
|
603
|
-
i.length > 0 && /* @__PURE__ */ H("span", {
|
|
604
|
-
style: {
|
|
605
|
-
fontSize: 12,
|
|
606
|
-
color: "var(--muted-foreground)"
|
|
607
|
-
},
|
|
608
|
-
children: i.join(" · ")
|
|
609
|
-
}),
|
|
610
|
-
/* @__PURE__ */ H(k, {
|
|
611
|
-
tone: ze(n),
|
|
612
|
-
size: "sm",
|
|
613
|
-
dot: !0,
|
|
614
|
-
children: Be(t, n)
|
|
615
|
-
}),
|
|
616
|
-
r && /* @__PURE__ */ H("span", {
|
|
617
|
-
style: {
|
|
618
|
-
fontSize: 12,
|
|
619
|
-
color: "var(--muted-foreground)"
|
|
620
|
-
},
|
|
621
|
-
children: t("record.evidence.verified", "Verified {when}", { when: r })
|
|
622
|
-
})
|
|
623
|
-
]
|
|
624
|
-
}), e?.reason && /* @__PURE__ */ H("span", {
|
|
625
|
-
style: {
|
|
626
|
-
fontSize: 12,
|
|
627
|
-
color: "var(--destructive)"
|
|
628
|
-
},
|
|
629
|
-
children: e.reason
|
|
630
|
-
})]
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
//#endregion
|
|
634
|
-
//#region src/lib/children-validation.ts
|
|
635
|
-
function pt(e, t, n) {
|
|
636
|
-
let r = [];
|
|
637
|
-
for (let [i, a] of e.fields) {
|
|
638
|
-
if (!a.required || a.auto || n && a.primary || e.tenant_key && i === e.tenant_key || a.default !== void 0 && a.default !== null) continue;
|
|
639
|
-
let o = t[i];
|
|
640
|
-
(o == null || o === "") && r.push(i);
|
|
641
|
-
}
|
|
642
|
-
return r;
|
|
643
|
-
}
|
|
644
|
-
var mt = /^[^@\s]+@[^@\s]+\.[^@\s]+$/;
|
|
645
|
-
function ht(e, t) {
|
|
646
|
-
let n = [];
|
|
647
|
-
for (let [r, i] of e.fields) {
|
|
648
|
-
if (i.type !== "email") continue;
|
|
649
|
-
let e = t[r];
|
|
650
|
-
typeof e == "string" && e !== "" && !mt.test(e) && n.push(r);
|
|
651
|
-
}
|
|
652
|
-
return n;
|
|
653
|
-
}
|
|
654
|
-
function gt(e, t) {
|
|
655
|
-
let n = /* @__PURE__ */ new Set();
|
|
656
|
-
for (let r of Object.values(t.entities)) if (r.children) {
|
|
657
|
-
for (let t of r.children) if (t.entity === e && t.foreign_key) {
|
|
658
|
-
let e = Array.isArray(t.foreign_key) ? t.foreign_key : [t.foreign_key];
|
|
659
|
-
for (let t of e) n.add(t);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
return n;
|
|
663
|
-
}
|
|
664
|
-
function _t(e, t) {
|
|
665
|
-
if (!e || !t) return {};
|
|
666
|
-
let n = {};
|
|
667
|
-
for (let [r, i] of Object.entries(e)) {
|
|
668
|
-
let e = t.entities[r];
|
|
669
|
-
if (!e) continue;
|
|
670
|
-
let a = gt(r, t), o = [];
|
|
671
|
-
for (let [t, n] of e.fields) e.tenant_key && t === e.tenant_key || n.required && !n.auto && !n.primary && !a.has(t) && o.push(t);
|
|
672
|
-
if (o.length !== 0) for (let e of i) {
|
|
673
|
-
if (e._deleted) continue;
|
|
674
|
-
let t = [];
|
|
675
|
-
for (let n of o) {
|
|
676
|
-
let r = e[n];
|
|
677
|
-
(r == null || r === "") && t.push(n);
|
|
678
|
-
}
|
|
679
|
-
t.length > 0 && (n[r] || (n[r] = {}), n[r][e._key] = t);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
return n;
|
|
683
|
-
}
|
|
684
|
-
//#endregion
|
|
685
|
-
//#region src/components/pages/SmartDetailPage.impl.tsx
|
|
686
|
-
var vt = () => {}, yt = { expand: ["evidence"] };
|
|
687
|
-
function bt(e, t) {
|
|
688
|
-
return e.length === t.length && JSON.stringify(e) === JSON.stringify(t);
|
|
689
|
-
}
|
|
690
|
-
function xt({ entity: e, formData: t, record: n, isNew: r, pendingStatuses: i, pendingProperties: a, pendingChildren: o, childrenSnapshot: s }) {
|
|
691
|
-
let c = {}, l = Ne({
|
|
692
|
-
entity: e,
|
|
693
|
-
formData: t,
|
|
694
|
-
record: n,
|
|
695
|
-
isNew: r
|
|
696
|
-
}), u = Me(l);
|
|
697
|
-
if (r) for (let [n, r] of Object.entries(t)) {
|
|
698
|
-
if (e.files?.has(n)) continue;
|
|
699
|
-
let t = Te(e, n, r);
|
|
700
|
-
t !== "" && t != null && (c[n] = t);
|
|
701
|
-
}
|
|
702
|
-
else for (let [r, i] of Object.entries(t)) {
|
|
703
|
-
if (e.files?.has(r)) continue;
|
|
704
|
-
let t = n ? we(e, n, r) : void 0, a = Te(e, r, i), o = Te(e, r, t);
|
|
705
|
-
(a === "" ? null : a) !== (o === "" || o === void 0 ? null : o) && (c[r] = a);
|
|
706
|
-
}
|
|
707
|
-
if (Object.keys(l).length > 0 && (c.$files = l), Object.keys(i).length > 0 && (c.$statuses = Object.entries(i).map(([e, t]) => ({
|
|
708
|
-
status_group_code: e,
|
|
709
|
-
status_code: t
|
|
710
|
-
}))), Object.keys(a).length > 0 && (c.$properties = Object.entries(a).map(([e, t]) => ({
|
|
711
|
-
property_code: e,
|
|
712
|
-
value: t
|
|
713
|
-
}))), o) {
|
|
714
|
-
let e = {};
|
|
715
|
-
for (let [t, n] of Object.entries(o)) {
|
|
716
|
-
let i = n.filter((e) => !e._deleted).map((e) => {
|
|
717
|
-
let { _key: t, _deleted: n, _dirty: r, ...i } = e;
|
|
718
|
-
return i;
|
|
719
|
-
}), a = s?.[t] ?? [];
|
|
720
|
-
(r || !bt(i, a)) && (e[t] = i);
|
|
721
|
-
}
|
|
722
|
-
Object.keys(e).length > 0 && (c.$children = e);
|
|
723
|
-
}
|
|
724
|
-
return {
|
|
725
|
-
payload: c,
|
|
726
|
-
committedFileIds: u
|
|
727
|
-
};
|
|
728
|
-
}
|
|
729
|
-
function St(e, t) {
|
|
730
|
-
if (e) {
|
|
731
|
-
let n = f(e, t), r = v(n);
|
|
732
|
-
if (r.replace(/^\|+|\|+$/g, "")) return r;
|
|
733
|
-
}
|
|
734
|
-
return t.id == null ? crypto.randomUUID() : w(t.id);
|
|
735
|
-
}
|
|
736
|
-
function J({ screenCode: e }) {
|
|
737
|
-
return /* @__PURE__ */ H(se, { children: /* @__PURE__ */ H(Ct, { screenCode: e }) });
|
|
738
|
-
}
|
|
739
|
-
function Ct({ screenCode: e }) {
|
|
740
|
-
let t = T(), n = T("errors"), { id: a } = tt(), s = l(), [c, p] = nt(), { data: h } = i(), y = o((e) => e.user), b = j(), C = re(), w = h?.screens[e], D = w?.entity ? h?.entities[w.entity] : void 0, O = w?.entity, k = _(D, "create"), A = _(D, "update"), oe = _(D, "restore"), se = (() => {
|
|
741
|
-
if (!D || !D.singleton || !D.prefilter) return;
|
|
742
|
-
let e = m(D);
|
|
743
|
-
if (e.length !== 1) return;
|
|
744
|
-
let t = D.prefilter[e[0]];
|
|
745
|
-
if (t === "$caller.user_id") return y?.id;
|
|
746
|
-
if (t === "$caller.tenant_id") return y?.tenant?.id;
|
|
747
|
-
})(), M = se !== void 0, N = M ? se : a, P = !M && N === "new", F = z(() => {
|
|
748
|
-
if (!N || P) return;
|
|
749
|
-
if (!D) return N;
|
|
750
|
-
let e = m(D);
|
|
751
|
-
if (e.length === 1) return { [e[0]]: N };
|
|
752
|
-
let t = g(N, e.length);
|
|
753
|
-
if (!t) return;
|
|
754
|
-
let n = {};
|
|
755
|
-
for (let r = 0; r < e.length; r++) n[e[r]] = t[r] ?? "";
|
|
756
|
-
return n;
|
|
757
|
-
}, [
|
|
758
|
-
N,
|
|
759
|
-
P,
|
|
760
|
-
D
|
|
761
|
-
]), fe = z(() => {
|
|
762
|
-
if (F) return typeof F == "string" ? F : v(F);
|
|
763
|
-
}, [F]), pe = xe(O, F, yt), { data: Ce, isLoading: Te, error: Ee } = pe, De = me(D?.realtime, O ?? ""), ke = O ? De : !1;
|
|
764
|
-
_e(Se(O, F, yt), !P);
|
|
765
|
-
let Ae = he(O ?? ""), Fe = ge(O ?? ""), Ie = be(O ?? ""), Le = Object.keys(D?.status_groups ?? {}).length > 0, Re = Ce?.data, ze = Re?.$statuses, Be = Re?.$properties, Ue = c.get("edit") === "true", [Ke, Je] = B(P || Ue), [I, Qe] = B({}), [V, it] = B({}), [W, at] = B({}), [G, K] = B(void 0), [st, ct] = B(!1), [ut, q] = B(void 0), [mt, gt] = B(!1), bt = P ? k : A, J = Ke && bt, Ct = u();
|
|
766
|
-
d(J && !P, Ct.enabled);
|
|
767
|
-
let [Tt, Et] = B(() => {
|
|
768
|
-
let e = parseInt(w?.sidebar_width || "380", 10);
|
|
769
|
-
return isNaN(e) ? 380 : e;
|
|
770
|
-
}), Ot = Ze(null), Y = Ze(null), kt = L((e) => {
|
|
771
|
-
e.preventDefault();
|
|
772
|
-
let t = Ot.current;
|
|
773
|
-
if (!t) return;
|
|
774
|
-
let n = t.offsetWidth;
|
|
775
|
-
Y.current = {
|
|
776
|
-
startX: e.clientX,
|
|
777
|
-
startW: n
|
|
778
|
-
};
|
|
779
|
-
let r = (e) => {
|
|
780
|
-
if (!Y.current) return;
|
|
781
|
-
let n = Y.current.startX - e.clientX, r = Math.max(280, Math.min(800, Y.current.startW + n));
|
|
782
|
-
t.style.width = `${r}px`;
|
|
783
|
-
}, i = () => {
|
|
784
|
-
Y.current && t && Et(parseInt(t.style.width, 10) || Y.current.startW), Y.current = null, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i);
|
|
785
|
-
};
|
|
786
|
-
document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
|
|
787
|
-
}, []), X = Ce?.data, Z = Oe(D, w, X ?? {});
|
|
788
|
-
R(() => {
|
|
789
|
-
let e = parseInt(Z?.sidebar_width || "380", 10);
|
|
790
|
-
Et(Number.isNaN(e) ? 380 : e);
|
|
791
|
-
}, [Z?.sidebar_width]);
|
|
792
|
-
let Q = typeof X?.$row_version == "string" ? X.$row_version : void 0, At = X?.$refs, jt = Ze(Q);
|
|
793
|
-
R(() => {
|
|
794
|
-
if (!Q) return;
|
|
795
|
-
let e = jt.current;
|
|
796
|
-
jt.current = Q, e && e !== Q && Ke && ct(!0);
|
|
797
|
-
}, [Ke, Q]);
|
|
798
|
-
let Mt = !!D?.soft_delete && X != null && X[D.soft_delete] != null, Nt = et(), Pt = Ze(null);
|
|
799
|
-
Pe({ scrollElementRef: Pt });
|
|
800
|
-
let Ft = !P && Ee instanceof x && Ee.status === 404, It = P && !te(D), Lt = Ze(null);
|
|
801
|
-
R(() => {
|
|
802
|
-
if (!Ft) return;
|
|
803
|
-
let e = ve(Nt);
|
|
804
|
-
Lt.current !== e && (Lt.current = e, de.getState().kill(e));
|
|
805
|
-
}, [Ft, Nt]);
|
|
806
|
-
let { openTab: Rt, updateTabTitle: zt, findTabByPathname: Bt } = ae();
|
|
807
|
-
R(() => {
|
|
808
|
-
if (!D || M || Ct.enabled) return;
|
|
809
|
-
let e = Nt.pathname, n = t(Z?.display?.name) || t(D.display.name), r = Z?.display?.icon || D.display.icon;
|
|
810
|
-
Rt({
|
|
811
|
-
pathname: e,
|
|
812
|
-
search: "",
|
|
813
|
-
title: P ? t("record.new_title", "New {name}", { name: n }) : n,
|
|
814
|
-
derivedTitle: !P,
|
|
815
|
-
icon: r,
|
|
816
|
-
closable: !0
|
|
817
|
-
});
|
|
818
|
-
}, [
|
|
819
|
-
Nt.pathname,
|
|
820
|
-
t,
|
|
821
|
-
Z?.display?.icon,
|
|
822
|
-
D?.display.icon,
|
|
823
|
-
P,
|
|
824
|
-
M,
|
|
825
|
-
Ct.enabled
|
|
826
|
-
]), R(() => {
|
|
827
|
-
if (!X || !D || M || Ct.enabled) return;
|
|
828
|
-
let e = Bt(Nt.pathname);
|
|
829
|
-
if (e) {
|
|
830
|
-
let n = t(Z?.display?.name) || t(D.display.name), r = S(t, X, D), i = r && !String(r).startsWith("/") ? String(r) : n;
|
|
831
|
-
zt(e.id, i, i === n);
|
|
832
|
-
}
|
|
833
|
-
}, [
|
|
834
|
-
X,
|
|
835
|
-
t,
|
|
836
|
-
D?.display.display_field,
|
|
837
|
-
Nt.pathname,
|
|
838
|
-
M,
|
|
839
|
-
Ct.enabled
|
|
840
|
-
]);
|
|
841
|
-
let Vt = z(() => {
|
|
842
|
-
if (!D || !bt) return /* @__PURE__ */ new Set();
|
|
843
|
-
let e = /* @__PURE__ */ new Set();
|
|
844
|
-
for (let [t, n] of D.fields) !n.auto && !n.primary && e.add(t);
|
|
845
|
-
for (let [t] of D.files ?? []) e.add(t);
|
|
846
|
-
return e;
|
|
847
|
-
}, [D, bt]);
|
|
848
|
-
R(() => {
|
|
849
|
-
if (Ue && X && D && A) {
|
|
850
|
-
if (Ke || Je(!0), Object.keys(I).length === 0) {
|
|
851
|
-
let e = N ? He(N) : null;
|
|
852
|
-
if (e) {
|
|
853
|
-
let t = Ne({
|
|
854
|
-
entity: D,
|
|
855
|
-
formData: e,
|
|
856
|
-
record: void 0,
|
|
857
|
-
isNew: !0
|
|
858
|
-
});
|
|
859
|
-
Me(t).forEach((e) => {
|
|
860
|
-
b.registerDraft({
|
|
861
|
-
fileId: e,
|
|
862
|
-
discard: () => le(e)
|
|
863
|
-
});
|
|
864
|
-
});
|
|
865
|
-
}
|
|
866
|
-
let t = {};
|
|
867
|
-
Vt.forEach((n) => {
|
|
868
|
-
let r = e ? e[n] : void 0;
|
|
869
|
-
if (r !== void 0) {
|
|
870
|
-
t[n] = r;
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
let i = we(D, X, n);
|
|
874
|
-
t[n] = je(D, n) ? i ?? null : i ?? "";
|
|
875
|
-
}), Qe(t);
|
|
876
|
-
}
|
|
877
|
-
if (D.children !== void 0 && D.children.length > 0 && G === void 0) {
|
|
878
|
-
let e = X.$children;
|
|
879
|
-
if (e && Object.keys(e).length > 0) {
|
|
880
|
-
let t = {};
|
|
881
|
-
for (let [n, r] of Object.entries(e)) {
|
|
882
|
-
let e = h?.entities[n];
|
|
883
|
-
t[n] = r.map((t) => ({
|
|
884
|
-
...t,
|
|
885
|
-
_key: St(e, t)
|
|
886
|
-
}));
|
|
887
|
-
}
|
|
888
|
-
K(t), q(e);
|
|
889
|
-
} else K({}), q({});
|
|
890
|
-
}
|
|
891
|
-
p((e) => {
|
|
892
|
-
let t = new URLSearchParams(e);
|
|
893
|
-
return t.delete("edit"), t;
|
|
894
|
-
}, { replace: !0 });
|
|
895
|
-
}
|
|
896
|
-
}, [
|
|
897
|
-
Ue,
|
|
898
|
-
X,
|
|
899
|
-
Vt,
|
|
900
|
-
A,
|
|
901
|
-
D,
|
|
902
|
-
G,
|
|
903
|
-
h
|
|
904
|
-
]), R(() => {
|
|
905
|
-
P && k && D?.children && D.children.length !== 0 && G === void 0 && (K({}), q({}));
|
|
906
|
-
}, [
|
|
907
|
-
P,
|
|
908
|
-
k,
|
|
909
|
-
D?.children
|
|
910
|
-
]);
|
|
911
|
-
let Ht = L(async () => {
|
|
912
|
-
if (await b.flushAllDrafts(), P) {
|
|
913
|
-
let e = Z?.route?.replace("/:id", "") ?? "/";
|
|
914
|
-
s(e);
|
|
915
|
-
} else Je(!1), Qe({}), it({}), at({}), K(void 0), q(void 0), gt(!1);
|
|
916
|
-
}, [
|
|
917
|
-
b,
|
|
918
|
-
P,
|
|
919
|
-
Z,
|
|
920
|
-
s
|
|
921
|
-
]), Ut = L((e, t) => {
|
|
922
|
-
Qe((n) => ({
|
|
923
|
-
...n,
|
|
924
|
-
[e]: t
|
|
925
|
-
}));
|
|
926
|
-
}, []), $ = z(() => {
|
|
927
|
-
if (!Z?.route) return "/";
|
|
928
|
-
let e = Z.route.split("/");
|
|
929
|
-
return e.pop(), e.join("/") || "/";
|
|
930
|
-
}, [Z]), Wt = z(() => !h?.screens || !$ || $ === "/" ? !1 : Object.values(h.screens).some((e) => e.route === $), [h, $]), Gt = L(() => {
|
|
931
|
-
if (!Wt) {
|
|
932
|
-
s("/");
|
|
933
|
-
return;
|
|
934
|
-
}
|
|
935
|
-
let e = Bt($)?.search ?? "";
|
|
936
|
-
s(e ? `${$}?${e}` : $);
|
|
937
|
-
}, [
|
|
938
|
-
Wt,
|
|
939
|
-
$,
|
|
940
|
-
Bt,
|
|
941
|
-
s
|
|
942
|
-
]), Kt = ue({ fallback: Gt }), qt = !M && (Kt.hasOriginBack || Kt.allowFallbackBack && !!Wt), Jt = z(() => {
|
|
943
|
-
if (!D) return {};
|
|
944
|
-
let e = {};
|
|
945
|
-
for (let n of pt(D, I, P)) Vt.has(n) && (e[n] = t("record.field.required", "Required"));
|
|
946
|
-
for (let t of ht(D, I)) Vt.has(t) && (e[t] = n("record.email_invalid", "This is not a valid email address."));
|
|
947
|
-
return e;
|
|
948
|
-
}, [
|
|
949
|
-
t,
|
|
950
|
-
n,
|
|
951
|
-
D,
|
|
952
|
-
I,
|
|
953
|
-
P,
|
|
954
|
-
Vt
|
|
955
|
-
]), Yt = Object.keys(Jt).length > 0, Xt = z(() => D ? xt({
|
|
956
|
-
entity: D,
|
|
957
|
-
formData: I,
|
|
958
|
-
record: X,
|
|
959
|
-
isNew: P,
|
|
960
|
-
pendingStatuses: V,
|
|
961
|
-
pendingProperties: W,
|
|
962
|
-
pendingChildren: G,
|
|
963
|
-
childrenSnapshot: ut
|
|
964
|
-
}) : {
|
|
965
|
-
payload: {},
|
|
966
|
-
committedFileIds: []
|
|
967
|
-
}, [
|
|
968
|
-
D,
|
|
969
|
-
I,
|
|
970
|
-
X,
|
|
971
|
-
P,
|
|
972
|
-
V,
|
|
973
|
-
W,
|
|
974
|
-
G,
|
|
975
|
-
ut
|
|
976
|
-
]), Zt = Object.keys(Xt.payload).length > 0, Qt = J && (P || Zt);
|
|
977
|
-
ce(Qt);
|
|
978
|
-
let $t = L(() => {
|
|
979
|
-
if (!O || !D || P && !k || !P && !A || (gt(!0), Yt)) return;
|
|
980
|
-
let e = { ...Xt.payload }, { committedFileIds: t } = Xt;
|
|
981
|
-
if (!P && !Zt) {
|
|
982
|
-
Je(!1), it({}), at({}), K(void 0), q(void 0), gt(!1);
|
|
983
|
-
return;
|
|
984
|
-
}
|
|
985
|
-
!P && Q && (e.$row_version = Q);
|
|
986
|
-
let n = () => {
|
|
987
|
-
Je(!1), ct(!1), gt(!1), it({}), at({}), K(void 0), q(void 0);
|
|
988
|
-
};
|
|
989
|
-
P ? Ae.mutate(e, { onSuccess: (e) => {
|
|
990
|
-
t.forEach((e) => b.markCommitted(e));
|
|
991
|
-
let r = e.data, i = D ? f(D, r) : {}, a = v(i);
|
|
992
|
-
s(a ? `${$}/${encodeURIComponent(a)}` : $, { replace: !0 }), n();
|
|
993
|
-
} }) : F && Fe.mutate({
|
|
994
|
-
pkValues: F,
|
|
995
|
-
data: e
|
|
996
|
-
}, {
|
|
997
|
-
onSuccess: () => {
|
|
998
|
-
t.forEach((e) => b.markCommitted(e)), n();
|
|
999
|
-
},
|
|
1000
|
-
onError: (e) => {
|
|
1001
|
-
e instanceof x && e.code === "entity.stale_object" && ct(!0);
|
|
1002
|
-
}
|
|
1003
|
-
});
|
|
1004
|
-
}, [
|
|
1005
|
-
b,
|
|
1006
|
-
P,
|
|
1007
|
-
k,
|
|
1008
|
-
A,
|
|
1009
|
-
O,
|
|
1010
|
-
Yt,
|
|
1011
|
-
Xt,
|
|
1012
|
-
Zt,
|
|
1013
|
-
Ae,
|
|
1014
|
-
Fe,
|
|
1015
|
-
D,
|
|
1016
|
-
s,
|
|
1017
|
-
$,
|
|
1018
|
-
Q,
|
|
1019
|
-
F
|
|
1020
|
-
]), en = L((e, t) => {
|
|
1021
|
-
K((n) => ({
|
|
1022
|
-
...n ?? {},
|
|
1023
|
-
[e]: t
|
|
1024
|
-
}));
|
|
1025
|
-
}, []), tn = L(() => {
|
|
1026
|
-
F && !P && oe && Ie.mutate(F);
|
|
1027
|
-
}, [
|
|
1028
|
-
F,
|
|
1029
|
-
P,
|
|
1030
|
-
oe,
|
|
1031
|
-
Ie
|
|
1032
|
-
]), nn = z(() => _t(G, h), [G, h]), rn = Object.keys(nn).length > 0;
|
|
1033
|
-
if (!Z || !D) return null;
|
|
1034
|
-
if (!P && Te) return /* @__PURE__ */ H(ye, {});
|
|
1035
|
-
if (It) return /* @__PURE__ */ U("div", {
|
|
1036
|
-
style: { padding: 24 },
|
|
1037
|
-
children: [/* @__PURE__ */ U("div", {
|
|
1038
|
-
style: {
|
|
1039
|
-
display: "flex",
|
|
1040
|
-
alignItems: "center",
|
|
1041
|
-
gap: 8,
|
|
1042
|
-
marginBottom: 8
|
|
1043
|
-
},
|
|
1044
|
-
children: [qt && /* @__PURE__ */ H(ie, {
|
|
1045
|
-
icon: /* @__PURE__ */ H(E.back, { size: 14 }),
|
|
1046
|
-
onClick: Kt.goBack,
|
|
1047
|
-
title: t("record.back", "Back")
|
|
1048
|
-
}), /* @__PURE__ */ H("h1", {
|
|
1049
|
-
style: {
|
|
1050
|
-
margin: 0,
|
|
1051
|
-
fontSize: 18,
|
|
1052
|
-
fontWeight: 600,
|
|
1053
|
-
color: "var(--text)"
|
|
1054
|
-
},
|
|
1055
|
-
children: t("record.create_closed.title", "Not Available")
|
|
1056
|
-
})]
|
|
1057
|
-
}), /* @__PURE__ */ H("p", {
|
|
1058
|
-
style: { color: "var(--text-3)" },
|
|
1059
|
-
children: t("record.create_closed.body", "This record type is not created from a form.")
|
|
1060
|
-
})]
|
|
1061
|
-
});
|
|
1062
|
-
if (!P && !X || Ft) return /* @__PURE__ */ U("div", {
|
|
1063
|
-
style: { padding: 24 },
|
|
1064
|
-
children: [/* @__PURE__ */ U("div", {
|
|
1065
|
-
style: {
|
|
1066
|
-
display: "flex",
|
|
1067
|
-
alignItems: "center",
|
|
1068
|
-
gap: 8,
|
|
1069
|
-
marginBottom: 8
|
|
1070
|
-
},
|
|
1071
|
-
children: [qt && /* @__PURE__ */ H(ie, {
|
|
1072
|
-
icon: /* @__PURE__ */ H(E.back, { size: 14 }),
|
|
1073
|
-
onClick: Kt.goBack,
|
|
1074
|
-
title: t("record.back", "Back")
|
|
1075
|
-
}), /* @__PURE__ */ H("h1", {
|
|
1076
|
-
style: {
|
|
1077
|
-
margin: 0,
|
|
1078
|
-
fontSize: 18,
|
|
1079
|
-
fontWeight: 600,
|
|
1080
|
-
color: "var(--text)"
|
|
1081
|
-
},
|
|
1082
|
-
children: t("record.missing.title", "Not Found")
|
|
1083
|
-
})]
|
|
1084
|
-
}), /* @__PURE__ */ H("p", {
|
|
1085
|
-
style: { color: "var(--text-3)" },
|
|
1086
|
-
children: n("entity.not_found", "This record does not exist.")
|
|
1087
|
-
})]
|
|
1088
|
-
});
|
|
1089
|
-
let an = D.display, on = t(Z.display?.name) || t(an.name), sn = S(t, X, D), cn = P ? t("record.new_title", "New {name}", { name: on }) : sn ? String(sn) : on, ln = Ae.isPending || Fe.isPending, un = Z.responsive?.[C.category]?.layout, dn = un?.tabs ?? (C.isPhone ? "sections" : void 0), fn = un?.header_card === !0 ? Xe({
|
|
1090
|
-
entity: D,
|
|
1091
|
-
screen: Z
|
|
1092
|
-
}) : void 0, pn = {
|
|
1093
|
-
schema: h,
|
|
1094
|
-
entity: D,
|
|
1095
|
-
entityCode: O,
|
|
1096
|
-
recordId: fe ?? N ?? "",
|
|
1097
|
-
record: J ? {
|
|
1098
|
-
...X ?? {},
|
|
1099
|
-
...I
|
|
1100
|
-
} : X ?? {},
|
|
1101
|
-
isNew: P,
|
|
1102
|
-
mode: J ? "edit" : "display",
|
|
1103
|
-
onFieldChange: J ? Ut : void 0,
|
|
1104
|
-
refs: At,
|
|
1105
|
-
objectProperties: (() => {
|
|
1106
|
-
let e = Be ?? [];
|
|
1107
|
-
if (!J || Object.keys(W).length === 0) return e.length > 0 ? e : void 0;
|
|
1108
|
-
let t = e.map((e) => W[e.property_code] === void 0 ? e : {
|
|
1109
|
-
...e,
|
|
1110
|
-
value: W[e.property_code]
|
|
1111
|
-
});
|
|
1112
|
-
for (let [n, r] of Object.entries(W)) e.some((e) => e.property_code === n) || t.push({
|
|
1113
|
-
property_code: n,
|
|
1114
|
-
name: {},
|
|
1115
|
-
type: "string",
|
|
1116
|
-
value: r
|
|
1117
|
-
});
|
|
1118
|
-
return t;
|
|
1119
|
-
})(),
|
|
1120
|
-
onSetProperty: P || !A ? void 0 : J ? (e, t) => at((n) => ({
|
|
1121
|
-
...n,
|
|
1122
|
-
[e]: t
|
|
1123
|
-
})) : void 0,
|
|
1124
|
-
isPropertyPending: !1,
|
|
1125
|
-
objectStatuses: (() => {
|
|
1126
|
-
let e = ze ?? [];
|
|
1127
|
-
if (!J || Object.keys(V).length === 0) return e.length > 0 ? e : void 0;
|
|
1128
|
-
let t = e.map((e) => V[e.group_code] === void 0 ? e : {
|
|
1129
|
-
...e,
|
|
1130
|
-
status_code: V[e.group_code]
|
|
1131
|
-
});
|
|
1132
|
-
for (let [n, i] of Object.entries(V)) e.some((e) => e.group_code === n) || t.push({
|
|
1133
|
-
group_code: n,
|
|
1134
|
-
status_code: i,
|
|
1135
|
-
status_name: {},
|
|
1136
|
-
set_at: r()
|
|
1137
|
-
});
|
|
1138
|
-
return t;
|
|
1139
|
-
})(),
|
|
1140
|
-
onSetStatus: P || !A ? void 0 : J ? (e, t) => it((n) => ({
|
|
1141
|
-
...n,
|
|
1142
|
-
[e]: t
|
|
1143
|
-
})) : void 0,
|
|
1144
|
-
isStatusPending: !1,
|
|
1145
|
-
pendingChildren: J ? G : void 0,
|
|
1146
|
-
onChildrenChange: J ? en : void 0,
|
|
1147
|
-
childValidationErrors: J ? nn : void 0,
|
|
1148
|
-
fieldErrors: J && mt ? Jt : void 0,
|
|
1149
|
-
detailTabsPresentation: dn,
|
|
1150
|
-
relatedRecordsPresentation: un?.related_records
|
|
1151
|
-
}, mn = !!Z.sidebar && Z.sidebar.length > 0, hn = un?.sidebar === "hidden", gn = mn && !hn && !C.isDesktop, _n = mn && !hn && C.isDesktop, vn = !P && X ? /* @__PURE__ */ H(dt, {
|
|
1152
|
-
screen: Z,
|
|
1153
|
-
entity: D,
|
|
1154
|
-
entityCode: O,
|
|
1155
|
-
record: X,
|
|
1156
|
-
refs: At,
|
|
1157
|
-
objectStatuses: ze,
|
|
1158
|
-
schema: h
|
|
1159
|
-
}) : void 0, yn = /* @__PURE__ */ H(Dt, {
|
|
1160
|
-
title: cn,
|
|
1161
|
-
recordId: N,
|
|
1162
|
-
editing: J,
|
|
1163
|
-
isNew: P,
|
|
1164
|
-
isRecordDeleted: Mt,
|
|
1165
|
-
dirty: Qt,
|
|
1166
|
-
isSaving: ln,
|
|
1167
|
-
hasChildErrors: rn,
|
|
1168
|
-
hasFieldErrors: mt && Yt,
|
|
1169
|
-
canRestore: oe,
|
|
1170
|
-
entity: D,
|
|
1171
|
-
screen: Z,
|
|
1172
|
-
globalActions: h?.actions,
|
|
1173
|
-
entityCode: O,
|
|
1174
|
-
record: X,
|
|
1175
|
-
id: N,
|
|
1176
|
-
listRoute: $,
|
|
1177
|
-
listRouteExists: !!Wt,
|
|
1178
|
-
highlights: vn,
|
|
1179
|
-
showBack: qt,
|
|
1180
|
-
onBack: Kt.goBack,
|
|
1181
|
-
onCancelEdit: Ht,
|
|
1182
|
-
onSave: $t,
|
|
1183
|
-
onRestore: tn,
|
|
1184
|
-
isRestoring: Ie.isPending,
|
|
1185
|
-
refreshControl: {
|
|
1186
|
-
refetch: pe.refetch,
|
|
1187
|
-
isLoading: pe.isLoading,
|
|
1188
|
-
isLive: ke
|
|
1189
|
-
},
|
|
1190
|
-
isRealtimeEntity: D?.realtime === !0,
|
|
1191
|
-
canManageTemplates: Ve(h)
|
|
1192
|
-
}), bn = Mt && /* @__PURE__ */ U("div", {
|
|
1193
|
-
style: {
|
|
1194
|
-
display: "flex",
|
|
1195
|
-
alignItems: "center",
|
|
1196
|
-
gap: 8,
|
|
1197
|
-
padding: "10px 14px",
|
|
1198
|
-
marginBottom: 12,
|
|
1199
|
-
borderRadius: 8,
|
|
1200
|
-
border: "1px solid var(--danger)",
|
|
1201
|
-
background: "var(--danger-soft)",
|
|
1202
|
-
color: "var(--danger)",
|
|
1203
|
-
fontSize: 12.5
|
|
1204
|
-
},
|
|
1205
|
-
children: [/* @__PURE__ */ H(E.warning, { size: 14 }), /* @__PURE__ */ H("span", { children: t("record.deleted_banner", "This record was deleted on {date}", { date: ne(String(X[D.soft_delete])) }) })]
|
|
1206
|
-
}), xn = st && /* @__PURE__ */ U("div", {
|
|
1207
|
-
style: {
|
|
1208
|
-
display: "flex",
|
|
1209
|
-
alignItems: "center",
|
|
1210
|
-
gap: 8,
|
|
1211
|
-
padding: "10px 14px",
|
|
1212
|
-
marginBottom: 12,
|
|
1213
|
-
borderRadius: 8,
|
|
1214
|
-
border: "1px solid var(--warn)",
|
|
1215
|
-
background: "var(--warn-soft)",
|
|
1216
|
-
color: "var(--warn)",
|
|
1217
|
-
fontSize: 12.5
|
|
1218
|
-
},
|
|
1219
|
-
children: [/* @__PURE__ */ H(E.warning, { size: 14 }), /* @__PURE__ */ H("span", { children: t("record.changed_on_server", "This record changed on the server while you were viewing or editing it.") })]
|
|
1220
|
-
}), Sn = J && mt && Yt && /* @__PURE__ */ H(lt, {
|
|
1221
|
-
errors: Object.entries(Jt).map(([e, n]) => {
|
|
1222
|
-
let r = D.fields.get(e);
|
|
1223
|
-
return {
|
|
1224
|
-
name: e,
|
|
1225
|
-
label: r ? ee(t, r, e, h?.entities) : e,
|
|
1226
|
-
message: n
|
|
1227
|
-
};
|
|
1228
|
-
}),
|
|
1229
|
-
onJump: (e) => {
|
|
1230
|
-
let t = document.getElementById(`${O}-${e}`);
|
|
1231
|
-
t && (t.scrollIntoView({
|
|
1232
|
-
block: "center",
|
|
1233
|
-
behavior: "smooth"
|
|
1234
|
-
}), t.focus?.());
|
|
1235
|
-
}
|
|
1236
|
-
}), Cn = Le && !P && !(Z.items && Z.items.length > 0) && /* @__PURE__ */ H("div", {
|
|
1237
|
-
className: "mb-4",
|
|
1238
|
-
children: /* @__PURE__ */ H(We, {
|
|
1239
|
-
statusGroups: D.status_groups ?? {},
|
|
1240
|
-
objectStatuses: pn.objectStatuses,
|
|
1241
|
-
onSetStatus: A && J ? (e, t) => it((n) => ({
|
|
1242
|
-
...n,
|
|
1243
|
-
[e]: t
|
|
1244
|
-
})) : vt,
|
|
1245
|
-
isPending: !1,
|
|
1246
|
-
mode: J ? "edit" : "display"
|
|
1247
|
-
})
|
|
1248
|
-
}), wn = D.evidence_covered && !P && X && /* @__PURE__ */ H("div", {
|
|
1249
|
-
className: "mb-4",
|
|
1250
|
-
children: /* @__PURE__ */ H(ft, { evidence: X.$evidence })
|
|
1251
|
-
}), Tn = /* @__PURE__ */ U($e, { children: [
|
|
1252
|
-
fn && (X || P) && /* @__PURE__ */ H(wt, {
|
|
1253
|
-
card: fn,
|
|
1254
|
-
entity: D,
|
|
1255
|
-
record: pn.record,
|
|
1256
|
-
objectStatuses: pn.objectStatuses,
|
|
1257
|
-
objectProperties: pn.objectProperties
|
|
1258
|
-
}),
|
|
1259
|
-
Z.items && Z.items.length > 0 && (X || P) && h && /* @__PURE__ */ H(Ge, {
|
|
1260
|
-
nodes: Z.items,
|
|
1261
|
-
ctx: pn
|
|
1262
|
-
}),
|
|
1263
|
-
!P && N && O && D.associations && Object.keys(D.associations).length > 0 && h && /* @__PURE__ */ H(rt, {
|
|
1264
|
-
entityCode: O,
|
|
1265
|
-
recordId: fe ?? N ?? "",
|
|
1266
|
-
associations: D.associations,
|
|
1267
|
-
schema: h
|
|
1268
|
-
}),
|
|
1269
|
-
!P && N && O && /* @__PURE__ */ H(ot, {
|
|
1270
|
-
entityCode: O,
|
|
1271
|
-
objectId: fe ?? N,
|
|
1272
|
-
canGenerateOne: !!D?.documents?.generate_one,
|
|
1273
|
-
canManageTemplates: Ve(h)
|
|
1274
|
-
}),
|
|
1275
|
-
!P && X && h && /* @__PURE__ */ H(qe, {
|
|
1276
|
-
screen: Z,
|
|
1277
|
-
entity: D,
|
|
1278
|
-
entityCode: O,
|
|
1279
|
-
record: X,
|
|
1280
|
-
refs: At,
|
|
1281
|
-
schema: h
|
|
1282
|
-
})
|
|
1283
|
-
] }), En = /* @__PURE__ */ U($e, { children: [
|
|
1284
|
-
yn,
|
|
1285
|
-
xn,
|
|
1286
|
-
bn,
|
|
1287
|
-
Sn,
|
|
1288
|
-
Cn,
|
|
1289
|
-
wn
|
|
1290
|
-
] });
|
|
1291
|
-
return _n ? /* @__PURE__ */ U("div", {
|
|
1292
|
-
style: {
|
|
1293
|
-
height: "100%",
|
|
1294
|
-
display: "flex",
|
|
1295
|
-
overflow: "hidden",
|
|
1296
|
-
background: "var(--background)"
|
|
1297
|
-
},
|
|
1298
|
-
children: [
|
|
1299
|
-
/* @__PURE__ */ H("div", {
|
|
1300
|
-
style: {
|
|
1301
|
-
flex: 1,
|
|
1302
|
-
minWidth: 0,
|
|
1303
|
-
height: "100%"
|
|
1304
|
-
},
|
|
1305
|
-
children: /* @__PURE__ */ H(Ye, {
|
|
1306
|
-
scrollRef: Pt,
|
|
1307
|
-
header: En,
|
|
1308
|
-
children: Tn
|
|
1309
|
-
})
|
|
1310
|
-
}),
|
|
1311
|
-
/* @__PURE__ */ H("div", {
|
|
1312
|
-
className: "detail-resize-handle",
|
|
1313
|
-
onMouseDown: kt,
|
|
1314
|
-
title: t("record.layout.drag_to_resize", "Drag to resize"),
|
|
1315
|
-
children: /* @__PURE__ */ H("div", { style: {
|
|
1316
|
-
position: "absolute",
|
|
1317
|
-
top: 0,
|
|
1318
|
-
bottom: 0,
|
|
1319
|
-
left: "50%",
|
|
1320
|
-
transform: "translateX(-50%)",
|
|
1321
|
-
width: 1,
|
|
1322
|
-
background: "var(--border)"
|
|
1323
|
-
} })
|
|
1324
|
-
}),
|
|
1325
|
-
/* @__PURE__ */ H("div", {
|
|
1326
|
-
ref: Ot,
|
|
1327
|
-
style: {
|
|
1328
|
-
flexShrink: 0,
|
|
1329
|
-
height: "100%",
|
|
1330
|
-
width: `${Tt}px`
|
|
1331
|
-
},
|
|
1332
|
-
children: (X || P) && h && /* @__PURE__ */ H(Ge, {
|
|
1333
|
-
nodes: Z.sidebar,
|
|
1334
|
-
ctx: pn
|
|
1335
|
-
})
|
|
1336
|
-
})
|
|
1337
|
-
]
|
|
1338
|
-
}) : /* @__PURE__ */ U(Ye, {
|
|
1339
|
-
scrollRef: Pt,
|
|
1340
|
-
header: En,
|
|
1341
|
-
children: [Tn, gn && (X || P) && h && /* @__PURE__ */ H("div", {
|
|
1342
|
-
"data-testid": "detail-sidebar-inline",
|
|
1343
|
-
style: {
|
|
1344
|
-
display: "flex",
|
|
1345
|
-
flexDirection: "column",
|
|
1346
|
-
gap: 16,
|
|
1347
|
-
minWidth: 0
|
|
1348
|
-
},
|
|
1349
|
-
children: /* @__PURE__ */ H(Ge, {
|
|
1350
|
-
nodes: Z.sidebar,
|
|
1351
|
-
ctx: pn
|
|
1352
|
-
})
|
|
1353
|
-
})]
|
|
1354
|
-
});
|
|
1355
|
-
}
|
|
1356
|
-
function wt({ card: e, entity: t, record: n, objectStatuses: r, objectProperties: i }) {
|
|
1357
|
-
let a = T(), o = (e) => {
|
|
1358
|
-
let o = Tt(a, t, e, n, r, i);
|
|
1359
|
-
return o != null && w(o) !== "";
|
|
1360
|
-
}, s = (e) => {
|
|
1361
|
-
let o = Tt(a, t, e, n, r, i);
|
|
1362
|
-
return w(o) || /* @__PURE__ */ H("span", {
|
|
1363
|
-
style: { color: "var(--text-3)" },
|
|
1364
|
-
children: "-"
|
|
1365
|
-
});
|
|
1366
|
-
}, c = e.titleUsesDisplay ? S(a, n, t) : e.titleField ? Tt(a, t, e.titleField, n, r, i) : void 0, l = w(c) || a(t.display?.name) || a("record.fallback_title", "Record"), u = e.badgeFields.filter((t) => !e.hideEmptyFields || o(t)), d = e.bodyFields.filter((t) => !e.hideEmptyFields || o(t)), f = e.metaFields.filter((t) => !e.hideEmptyFields || o(t));
|
|
1367
|
-
return /* @__PURE__ */ U("section", {
|
|
1368
|
-
"data-testid": "detail-header-card",
|
|
1369
|
-
style: {
|
|
1370
|
-
width: "100%",
|
|
1371
|
-
minWidth: 0,
|
|
1372
|
-
border: "1px solid var(--border)",
|
|
1373
|
-
borderRadius: 8,
|
|
1374
|
-
background: "var(--surface)",
|
|
1375
|
-
boxShadow: "var(--shadow-xs)",
|
|
1376
|
-
padding: 14,
|
|
1377
|
-
boxSizing: "border-box"
|
|
1378
|
-
},
|
|
1379
|
-
children: [
|
|
1380
|
-
/* @__PURE__ */ U("div", {
|
|
1381
|
-
style: { minWidth: 0 },
|
|
1382
|
-
children: [/* @__PURE__ */ H("div", {
|
|
1383
|
-
style: {
|
|
1384
|
-
fontSize: 15,
|
|
1385
|
-
lineHeight: 1.25,
|
|
1386
|
-
fontWeight: 700,
|
|
1387
|
-
color: "var(--text)",
|
|
1388
|
-
overflowWrap: "anywhere"
|
|
1389
|
-
},
|
|
1390
|
-
children: l
|
|
1391
|
-
}), e.subtitleField && /* @__PURE__ */ H("div", {
|
|
1392
|
-
style: {
|
|
1393
|
-
marginTop: 4,
|
|
1394
|
-
fontSize: 12.5,
|
|
1395
|
-
lineHeight: 1.35,
|
|
1396
|
-
color: "var(--text-3)",
|
|
1397
|
-
overflowWrap: "anywhere"
|
|
1398
|
-
},
|
|
1399
|
-
children: s(e.subtitleField)
|
|
1400
|
-
})]
|
|
1401
|
-
}),
|
|
1402
|
-
u.length > 0 && /* @__PURE__ */ H("div", {
|
|
1403
|
-
style: {
|
|
1404
|
-
display: "flex",
|
|
1405
|
-
flexWrap: "wrap",
|
|
1406
|
-
gap: 6,
|
|
1407
|
-
marginTop: 10
|
|
1408
|
-
},
|
|
1409
|
-
children: u.map((e) => /* @__PURE__ */ H("span", {
|
|
1410
|
-
style: {
|
|
1411
|
-
minWidth: 0,
|
|
1412
|
-
maxWidth: "100%",
|
|
1413
|
-
borderRadius: 999,
|
|
1414
|
-
background: "var(--surface-2)",
|
|
1415
|
-
color: "var(--text-2)",
|
|
1416
|
-
padding: "2px 8px",
|
|
1417
|
-
fontSize: 12,
|
|
1418
|
-
lineHeight: 1.4,
|
|
1419
|
-
overflowWrap: "anywhere"
|
|
1420
|
-
},
|
|
1421
|
-
children: s(e)
|
|
1422
|
-
}, e))
|
|
1423
|
-
}),
|
|
1424
|
-
d.length > 0 && /* @__PURE__ */ H("dl", {
|
|
1425
|
-
style: {
|
|
1426
|
-
display: "grid",
|
|
1427
|
-
gridTemplateColumns: "minmax(84px, max-content) minmax(0, 1fr)",
|
|
1428
|
-
gap: "6px 10px",
|
|
1429
|
-
margin: "12px 0 0",
|
|
1430
|
-
fontSize: 12.5,
|
|
1431
|
-
lineHeight: 1.35
|
|
1432
|
-
},
|
|
1433
|
-
children: d.map((e) => /* @__PURE__ */ U("div", {
|
|
1434
|
-
style: { display: "contents" },
|
|
1435
|
-
children: [/* @__PURE__ */ H("dt", {
|
|
1436
|
-
style: { color: "var(--text-3)" },
|
|
1437
|
-
children: Et(a, t, e)
|
|
1438
|
-
}), /* @__PURE__ */ H("dd", {
|
|
1439
|
-
style: {
|
|
1440
|
-
margin: 0,
|
|
1441
|
-
color: "var(--text-2)",
|
|
1442
|
-
minWidth: 0,
|
|
1443
|
-
overflowWrap: "anywhere"
|
|
1444
|
-
},
|
|
1445
|
-
children: s(e)
|
|
1446
|
-
})]
|
|
1447
|
-
}, e))
|
|
1448
|
-
}),
|
|
1449
|
-
f.length > 0 && /* @__PURE__ */ H("div", {
|
|
1450
|
-
style: {
|
|
1451
|
-
display: "flex",
|
|
1452
|
-
flexWrap: "wrap",
|
|
1453
|
-
gap: 10,
|
|
1454
|
-
marginTop: 10,
|
|
1455
|
-
color: "var(--text-3)",
|
|
1456
|
-
fontSize: 11.5
|
|
1457
|
-
},
|
|
1458
|
-
children: f.map((e) => /* @__PURE__ */ U("span", {
|
|
1459
|
-
style: {
|
|
1460
|
-
minWidth: 0,
|
|
1461
|
-
overflowWrap: "anywhere"
|
|
1462
|
-
},
|
|
1463
|
-
children: [
|
|
1464
|
-
Et(a, t, e),
|
|
1465
|
-
": ",
|
|
1466
|
-
s(e)
|
|
1467
|
-
]
|
|
1468
|
-
}, e))
|
|
1469
|
-
})
|
|
1470
|
-
]
|
|
1471
|
-
});
|
|
1472
|
-
}
|
|
1473
|
-
function Tt(e, t, n, r, i, a) {
|
|
1474
|
-
if (n.startsWith("$status.")) {
|
|
1475
|
-
let t = n.slice(8), r = i?.find((e) => e.group_code === t);
|
|
1476
|
-
return e(r?.status_name) || r?.status_code;
|
|
1477
|
-
}
|
|
1478
|
-
if (n.startsWith("$property.")) {
|
|
1479
|
-
let e = n.slice(10);
|
|
1480
|
-
return a?.find((t) => t.property_code === e)?.value;
|
|
1481
|
-
}
|
|
1482
|
-
return we(t, r, n);
|
|
1483
|
-
}
|
|
1484
|
-
function Et(e, t, n) {
|
|
1485
|
-
if (n.startsWith("$status.")) return n.slice(8);
|
|
1486
|
-
if (n.startsWith("$property.")) return n.slice(10);
|
|
1487
|
-
let r = t.fields.get(n);
|
|
1488
|
-
return r ? ee(e, r, n) : n;
|
|
1489
|
-
}
|
|
1490
|
-
function Dt({ title: e, recordId: r, editing: i, isNew: a, isRecordDeleted: o, dirty: s, isSaving: c, hasChildErrors: u, hasFieldErrors: d, canRestore: f, entity: m, screen: h, globalActions: g, entityCode: _, record: v, id: y, listRoute: ee, listRouteExists: b, highlights: x, showBack: te, onBack: S, onCancelEdit: w, onSave: ne, onRestore: re, isRestoring: ie, refreshControl: O, isRealtimeEntity: k, canManageTemplates: ae }) {
|
|
1491
|
-
let j = T(), oe = T("errors"), { run: se } = pe(), ce = M("detail"), le = F(), N = l(), ue = n(h?.action_layout, m?.action_layout, m?.actions, g, "detail_toolbar"), fe = n(h?.action_layout, m?.action_layout, m?.actions, g, "detail"), me = t(j, fe, m?.actions, g, v ?? {}, [], Ce(m, v ?? {})), he = t(j, ue, m?.actions, g, v ?? {}, [], Ce(m, v ?? {})), ge = z(() => {
|
|
1492
|
-
if (!m) return;
|
|
1493
|
-
let e = y ? [y] : [];
|
|
1494
|
-
return {
|
|
1495
|
-
entity: m,
|
|
1496
|
-
entityCode: _ ?? "",
|
|
1497
|
-
screen: h,
|
|
1498
|
-
screenRoute: h?.route ?? "",
|
|
1499
|
-
selectedRows: v ? [v] : [],
|
|
1500
|
-
selectedIds: e,
|
|
1501
|
-
t: j,
|
|
1502
|
-
tabNavigate: (e, t) => le(e, {
|
|
1503
|
-
title: t?.title,
|
|
1504
|
-
icon: t?.icon,
|
|
1505
|
-
search: t?.search
|
|
1506
|
-
}),
|
|
1507
|
-
runActionApi: (e, t) => C(e, t),
|
|
1508
|
-
recordHref: (e) => e === y && h?.route ? h.route.replace(":id", encodeURIComponent(e)) : null
|
|
1509
|
-
};
|
|
1510
|
-
}, [
|
|
1511
|
-
m,
|
|
1512
|
-
_,
|
|
1513
|
-
h,
|
|
1514
|
-
y,
|
|
1515
|
-
v,
|
|
1516
|
-
j,
|
|
1517
|
-
le
|
|
1518
|
-
]), _e = (e, t) => {
|
|
1519
|
-
let n = Ee(oe, e, t, { row: v ?? void 0 });
|
|
1520
|
-
if (n === null) return;
|
|
1521
|
-
let r = y ? [y] : [], i = e === "__delete" && b ? ee : null;
|
|
1522
|
-
return se({
|
|
1523
|
-
action: t,
|
|
1524
|
-
title: j(t.display?.name) || e,
|
|
1525
|
-
row: v ?? void 0,
|
|
1526
|
-
execute: (e) => C(n, p(e, r)),
|
|
1527
|
-
onSuccess: i ? () => {
|
|
1528
|
-
de.getState().kill(ve(location)), N(i, { replace: !0 });
|
|
1529
|
-
} : void 0
|
|
1530
|
-
});
|
|
1531
|
-
}, ye = ce.isVisible("show_actions") && !a && y && me.length > 0 ? /* @__PURE__ */ H(Ae, {
|
|
1532
|
-
layout: me,
|
|
1533
|
-
row: v,
|
|
1534
|
-
onRun: _e,
|
|
1535
|
-
kind: "detail",
|
|
1536
|
-
entityActions: m?.actions,
|
|
1537
|
-
globalActions: g,
|
|
1538
|
-
reservedRightWidth: 0,
|
|
1539
|
-
widgetContext: ge
|
|
1540
|
-
}) : null, be = !a && y ? /* @__PURE__ */ H(Fe, {
|
|
1541
|
-
liveObject: O,
|
|
1542
|
-
realtime: k
|
|
1543
|
-
}) : null, xe = ce.isVisible("show_actions") && !a && y && he.length > 0 ? /* @__PURE__ */ U("div", {
|
|
1544
|
-
style: {
|
|
1545
|
-
display: "flex",
|
|
1546
|
-
justifyContent: "flex-end",
|
|
1547
|
-
alignItems: "center",
|
|
1548
|
-
gap: 8,
|
|
1549
|
-
marginTop: 10
|
|
1550
|
-
},
|
|
1551
|
-
children: [ye ? null : be, /* @__PURE__ */ H(Ae, {
|
|
1552
|
-
layout: he,
|
|
1553
|
-
row: v,
|
|
1554
|
-
onRun: _e,
|
|
1555
|
-
kind: "detail",
|
|
1556
|
-
entityActions: m?.actions,
|
|
1557
|
-
globalActions: g,
|
|
1558
|
-
reservedRightWidth: 0,
|
|
1559
|
-
widgetContext: ge,
|
|
1560
|
-
ariaLabel: ye ? j("record.toolbar_actions", "Detail toolbar actions") : j("record.page_actions", "Page actions")
|
|
1561
|
-
})]
|
|
1562
|
-
}) : null, Se = ce.isVisible("show_actions") && !a && y && _ ? /* @__PURE__ */ H(Ue, {
|
|
1563
|
-
entityCode: _,
|
|
1564
|
-
scope: "detail",
|
|
1565
|
-
objectIds: [y],
|
|
1566
|
-
capability: m?.documents,
|
|
1567
|
-
canManageTemplates: ae
|
|
1568
|
-
}) : null, we = o ? f ? /* @__PURE__ */ H(D, {
|
|
1569
|
-
kind: "primary",
|
|
1570
|
-
icon: H(ie ? A : E.refresh, { size: 13 }),
|
|
1571
|
-
onClick: re,
|
|
1572
|
-
disabled: ie,
|
|
1573
|
-
children: ie ? j("record.restoring", "Restoring…") : j("record.restore", "Restore")
|
|
1574
|
-
}) : null : i ? /* @__PURE__ */ U($e, { children: [/* @__PURE__ */ H(D, {
|
|
1575
|
-
icon: /* @__PURE__ */ H(E.x, { size: 13 }),
|
|
1576
|
-
onClick: w,
|
|
1577
|
-
disabled: c,
|
|
1578
|
-
children: j("dialog.cancel", "Cancel")
|
|
1579
|
-
}), /* @__PURE__ */ H(D, {
|
|
1580
|
-
kind: "primary",
|
|
1581
|
-
icon: H(c ? A : E.save, { size: 13 }),
|
|
1582
|
-
onClick: ne,
|
|
1583
|
-
disabled: c || u || d,
|
|
1584
|
-
title: u ? j("record.save.fix_child_rows", "Fix errors in child rows") : d ? j("record.save.fix_fields", "Fix the highlighted fields") : void 0,
|
|
1585
|
-
children: c ? j("dialog.saving", "Saving…") : j("dialog.save", "Save")
|
|
1586
|
-
})] }) : !a && y ? ye ? /* @__PURE__ */ U("span", {
|
|
1587
|
-
style: { display: "contents" },
|
|
1588
|
-
children: [Se, ye]
|
|
1589
|
-
}) : Se : null;
|
|
1590
|
-
return /* @__PURE__ */ U($e, { children: [/* @__PURE__ */ H(Je, {
|
|
1591
|
-
icon: m?.display.icon ? /* @__PURE__ */ H(P, {
|
|
1592
|
-
name: m.display.icon,
|
|
1593
|
-
size: 16
|
|
1594
|
-
}) : void 0,
|
|
1595
|
-
title: e,
|
|
1596
|
-
description: j(h?.display?.description) || j(m?.display?.description),
|
|
1597
|
-
recordId: r,
|
|
1598
|
-
highlights: x,
|
|
1599
|
-
identityControls: !o && !i && !a ? be : null,
|
|
1600
|
-
mode: a ? "create" : i ? "edit" : "display",
|
|
1601
|
-
dirty: s,
|
|
1602
|
-
showBack: te,
|
|
1603
|
-
onBack: S,
|
|
1604
|
-
right: we,
|
|
1605
|
-
showTitle: ce.isVisible("show_title")
|
|
1606
|
-
}), xe] });
|
|
1607
|
-
}
|
|
1608
|
-
//#endregion
|
|
1609
|
-
export { J as SmartDetailPage };
|