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