@declarion/react 0.65.0 → 0.66.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/api/access-expiry.js +32 -0
- package/dist-lib/api/agents.js +105 -0
- package/dist-lib/api/auth-redirect.js +30 -0
- package/dist-lib/api/auth.js +67 -0
- package/dist-lib/api/batch.js +34 -0
- package/dist-lib/api/client.js +241 -0
- package/dist-lib/api/data.js +122 -0
- package/dist-lib/api/entities.js +160 -0
- package/dist-lib/api/events.js +120 -0
- package/dist-lib/api/fileReferences.js +8 -0
- package/dist-lib/api/params.js +20 -0
- package/dist-lib/api/properties.js +25 -0
- package/dist-lib/api/request-bounds.js +28 -0
- package/dist-lib/api/schema.js +71 -0
- package/dist-lib/api/session-renewal.js +36 -0
- package/dist-lib/api/status.js +17 -0
- package/dist-lib/app.js +262 -0
- package/dist-lib/components/actions/ActionButton.js +116 -0
- package/dist-lib/{ActionDialog-C6EG-AmC.js → components/actions/ActionDialog.js} +63 -53
- package/dist-lib/{ActionResultDialog.impl-BATutW8J.js → components/actions/ActionResultDialog.impl.js} +53 -48
- package/dist-lib/components/actions/ActionResultDialog.js +12 -0
- package/dist-lib/components/actions/ActionRunner.js +274 -0
- package/dist-lib/components/actions/ObjectActionBar.js +127 -0
- package/dist-lib/components/actions/PropertyGridEditor.js +202 -0
- package/dist-lib/components/actions/ResponsiveActionBar.js +773 -0
- package/dist-lib/components/actions/RowActionsKebab.js +90 -0
- package/dist-lib/{AgentChatPanel.impl-D5y_qEex.js → components/agents/AgentChatPanel.impl.js} +314 -362
- package/dist-lib/components/agents/AgentChatPanel.js +12 -0
- package/dist-lib/components/agents/AgentConversationDrawer.js +59 -0
- package/dist-lib/components/agents/AgentElicitForm.js +152 -0
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +7 -0
- package/dist-lib/components/agents/AgentOpenFollower.js +12 -0
- package/dist-lib/components/agents/AgentPicker.js +58 -0
- package/dist-lib/components/agents/transcript-runs.js +52 -0
- package/dist-lib/components/chrome/AssociationTabs.js +176 -0
- package/dist-lib/components/chrome/AuditMetaStrip.js +64 -0
- package/dist-lib/components/chrome/Breadcrumbs.js +67 -0
- package/dist-lib/components/chrome/HighlightsStrip.js +39 -0
- package/dist-lib/{PageHeader-DiwLe7CO.js → components/chrome/PageHeader.js} +19 -15
- package/dist-lib/{PageShell-BJz1MiTH.js → components/chrome/PageShell.js} +3 -3
- package/dist-lib/components/chrome/RecordHeader.js +119 -0
- package/dist-lib/{headerActionZone-bef-tZZ7.js → components/chrome/headerActionZone.js} +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +1244 -0
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +87 -0
- package/dist-lib/components/detail-layout/ChildrenBlock.js +80 -0
- package/dist-lib/components/detail-layout/ChildrenCards.js +156 -0
- package/dist-lib/components/detail-layout/ChildrenList.js +135 -0
- package/dist-lib/components/detail-layout/ChildrenTable.js +189 -0
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +609 -0
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +40 -0
- package/dist-lib/components/detail-layout/DetailHighlights.js +54 -0
- package/dist-lib/{DraggableChildrenTable-Dd5SeuF6.js → components/detail-layout/DraggableChildrenTable.js} +56 -53
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +341 -0
- package/dist-lib/components/detail-layout/ErrorSummary.js +89 -0
- package/dist-lib/components/detail-layout/EvidenceBlock.js +66 -0
- package/dist-lib/{FieldRow-DedGIY9R.js → components/detail-layout/FieldRow.js} +8 -7
- package/dist-lib/components/detail-layout/FieldsBlock.js +74 -0
- package/dist-lib/components/detail-layout/LayoutColumn.js +16 -0
- package/dist-lib/components/detail-layout/LayoutRenderer.js +54 -0
- package/dist-lib/components/detail-layout/LayoutRow.js +83 -0
- package/dist-lib/components/detail-layout/LayoutTabs.js +195 -0
- package/dist-lib/components/detail-layout/PropertiesBlock.js +74 -0
- package/dist-lib/components/detail-layout/QuickAddForm.js +81 -0
- package/dist-lib/components/detail-layout/SectionBlock.js +48 -0
- package/dist-lib/components/detail-layout/StatusesBlock.js +18 -0
- package/dist-lib/components/detail-layout/TimelineComposer.js +205 -0
- package/dist-lib/components/detail-layout/blockMeta.js +27 -0
- package/dist-lib/components/detail-layout/useManualColumnResize.js +94 -0
- package/dist-lib/components/detail-layout/useQuickAdd.js +85 -0
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +295 -0
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +107 -0
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +47 -0
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +36 -0
- package/dist-lib/components/detail-layout/widgets/builtins.js +10 -0
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +32 -0
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +16 -0
- package/dist-lib/components/detail-layout/widgets/registry.js +13 -0
- package/dist-lib/components/fields/BoolField.js +13 -0
- package/dist-lib/components/fields/EmailField.js +16 -0
- package/dist-lib/components/fields/EnumField.js +38 -0
- package/dist-lib/components/fields/FileReferenceField.js +60 -0
- package/dist-lib/components/fields/IntArrayField.js +83 -0
- package/dist-lib/components/fields/JsonField.js +51 -0
- package/dist-lib/components/fields/MultilangArrayField.js +56 -0
- package/dist-lib/components/fields/MultilangField.js +65 -0
- package/dist-lib/components/fields/MultilangTextField.js +65 -0
- package/dist-lib/components/fields/NumberField.js +64 -0
- package/dist-lib/components/fields/PasswordField.js +34 -0
- package/dist-lib/components/fields/PhoneField.js +84 -0
- package/dist-lib/components/fields/RefCombobox.js +112 -0
- package/dist-lib/components/fields/RefField.js +45 -0
- package/dist-lib/components/fields/RichTextField.js +225 -0
- package/dist-lib/components/fields/SecretField.js +34 -0
- package/dist-lib/components/fields/StringArrayField.js +165 -0
- package/dist-lib/components/fields/StringField.js +39 -0
- package/dist-lib/components/fields/StructureField.js +221 -0
- package/dist-lib/components/fields/TextField.js +76 -0
- package/dist-lib/components/fields/TimestampField.js +110 -0
- package/dist-lib/components/fields/UrlField.js +18 -0
- package/dist-lib/components/fields/cells/factories/badge.js +42 -0
- package/dist-lib/components/fields/cells/factories/boolPill.js +17 -0
- package/dist-lib/components/fields/cells/factories/code.js +11 -0
- package/dist-lib/components/fields/cells/factories/date.js +30 -0
- package/dist-lib/components/fields/cells/factories/email.js +26 -0
- package/dist-lib/components/fields/cells/factories/emptyCell.js +10 -0
- package/dist-lib/components/fields/cells/factories/fileReference.js +17 -0
- package/dist-lib/components/fields/cells/factories/host-icons.js +146 -0
- package/dist-lib/components/fields/cells/factories/json.js +61 -0
- package/dist-lib/components/fields/cells/factories/link.js +32 -0
- package/dist-lib/components/fields/cells/factories/markdown.js +31 -0
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +81 -0
- package/dist-lib/components/fields/cells/factories/money.js +37 -0
- package/dist-lib/components/fields/cells/factories/multilangInline.js +35 -0
- package/dist-lib/components/fields/cells/factories/nextRun.js +46 -0
- package/dist-lib/components/fields/cells/factories/number.js +42 -0
- package/dist-lib/components/fields/cells/factories/passwordMask.js +23 -0
- package/dist-lib/components/fields/cells/factories/phone.js +35 -0
- package/dist-lib/components/fields/cells/factories/refLink.js +57 -0
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +34 -0
- package/dist-lib/components/fields/cells/factories/statusPill.js +35 -0
- package/dist-lib/components/fields/cells/factories/tagList.js +44 -0
- package/dist-lib/components/fields/cells/factories/text.js +5 -0
- package/dist-lib/components/fields/cells/factories/timestamp.js +18 -0
- package/dist-lib/components/fields/cells/factories/url-helpers.js +49 -0
- package/dist-lib/components/fields/cells/factories/url.js +45 -0
- package/dist-lib/components/fields/cells/registry.js +58 -0
- package/dist-lib/components/fields/index.js +80 -0
- package/dist-lib/components/fields/langMap.js +6 -0
- package/dist-lib/components/fields/secretValue.js +7 -0
- package/dist-lib/components/file-widgets/CircleImage.js +11 -0
- package/dist-lib/components/file-widgets/DocumentCard.js +277 -0
- package/dist-lib/components/file-widgets/FileList.js +213 -0
- package/dist-lib/{Grid-XUHm5SDe.js → components/file-widgets/Grid.js} +45 -40
- package/dist-lib/components/file-widgets/GridLazy.js +15 -0
- package/dist-lib/components/file-widgets/ImageWidget.js +354 -0
- package/dist-lib/components/file-widgets/LabeledSlots.js +69 -0
- package/dist-lib/components/file-widgets/SquareImage.js +11 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +22 -0
- package/dist-lib/components/file-widgets/UploadFailureText.js +10 -0
- package/dist-lib/components/file-widgets/WideBanner.js +11 -0
- package/dist-lib/components/file-widgets/builtins.js +15 -0
- package/dist-lib/components/file-widgets/cropper.js +13 -0
- package/dist-lib/components/file-widgets/draft-scope.js +59 -0
- package/dist-lib/components/file-widgets/helpers.js +75 -0
- package/dist-lib/components/file-widgets/host.js +75 -0
- package/dist-lib/{payload-DioMoxMX.js → components/file-widgets/payload.js} +14 -14
- package/dist-lib/components/file-widgets/registry.js +13 -0
- package/dist-lib/components/file-widgets/upload.js +180 -0
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +45 -0
- package/dist-lib/components/file-widgets/value.js +12 -0
- package/dist-lib/components/filters/FilterChips.js +123 -0
- package/dist-lib/components/filters/FilterConditionValue.js +40 -0
- package/dist-lib/components/filters/FilterDrawer.js +670 -0
- package/dist-lib/components/filters/FilterOmittedNotice.js +14 -0
- package/dist-lib/components/filters/filter-op-label.js +8 -0
- package/dist-lib/{CommandPalette.impl-DRI5kxVY.js → components/layout/CommandPalette.impl.js} +62 -61
- package/dist-lib/components/layout/CommandPalette.js +12 -0
- package/dist-lib/{DirtyTabsCloseDialog.impl-FhAiOmEb.js → components/layout/DirtyTabsCloseDialog.impl.js} +16 -14
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +12 -0
- package/dist-lib/{ImpersonationBanner.impl--g0iYwcV.js → components/layout/ImpersonationBanner.impl.js} +4 -3
- package/dist-lib/components/layout/ImpersonationBanner.js +12 -0
- package/dist-lib/components/layout/ImpersonationFrame.js +29 -0
- package/dist-lib/{ImpersonationStartModal.impl-BFBN0YJe.js → components/layout/ImpersonationStartModal.impl.js} +9 -9
- package/dist-lib/components/layout/ImpersonationStartModal.js +12 -0
- package/dist-lib/components/layout/Layout.js +755 -0
- package/dist-lib/components/layout/Rail.js +149 -0
- package/dist-lib/components/layout/Sidebar.js +362 -0
- package/dist-lib/components/layout/TabStrip.js +321 -0
- package/dist-lib/components/layout/TenantChip.js +355 -0
- package/dist-lib/components/layout/TopBar.js +305 -0
- package/dist-lib/components/layout/tab-close.js +24 -0
- package/dist-lib/components/list/ColumnPicker.js +112 -0
- package/dist-lib/components/list/InlineEditCell.js +107 -0
- package/dist-lib/components/list/PeekFieldCell.js +143 -0
- package/dist-lib/components/list/QuickPeek.js +263 -0
- package/dist-lib/components/list/ViewSwitcher.js +156 -0
- package/dist-lib/components/list/peekDraftStore.js +14 -0
- package/dist-lib/{AdminCatalogPage.impl-B-7MLqa1.js → components/pages/AdminCatalogPage.impl.js} +53 -49
- package/dist-lib/components/pages/AdminCatalogPage.js +12 -0
- package/dist-lib/components/pages/DocumentsMenu.js +150 -0
- package/dist-lib/components/pages/ExportMenu.js +123 -0
- package/dist-lib/{NotFoundPage.impl-BoX11u-P.js → components/pages/NotFoundPage.impl.js} +6 -4
- package/dist-lib/components/pages/NotFoundPage.js +12 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.js +230 -0
- package/dist-lib/components/pages/RecordNotesPanel.js +200 -0
- package/dist-lib/components/pages/RecordPanels.js +18 -0
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +28 -0
- package/dist-lib/components/pages/SSOCallbackPage.js +12 -0
- package/dist-lib/components/pages/SmartDetailPage.impl.js +986 -0
- package/dist-lib/components/pages/SmartDetailPage.js +12 -0
- package/dist-lib/components/pages/SmartListPage.impl.js +708 -0
- package/dist-lib/components/pages/SmartListPage.js +12 -0
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +818 -0
- package/dist-lib/components/pages/SmartRecordListPage.js +12 -0
- package/dist-lib/components/pages/auth/AuthShell.js +350 -0
- package/dist-lib/{Forgot.impl-6tL6SBlS.js → components/pages/auth/Forgot.impl.js} +13 -12
- package/dist-lib/components/pages/auth/Forgot.js +12 -0
- package/dist-lib/{Reset.impl-D0pjhS6d.js → components/pages/auth/Reset.impl.js} +17 -15
- package/dist-lib/components/pages/auth/Reset.js +12 -0
- package/dist-lib/components/pages/auth/SignIn.js +252 -0
- package/dist-lib/{SignUp.impl-CfEXrUeg.js → components/pages/auth/SignUp.impl.js} +31 -27
- package/dist-lib/components/pages/auth/SignUp.js +12 -0
- package/dist-lib/{TwoFA.impl-B2HtPduH.js → components/pages/auth/TwoFA.impl.js} +9 -8
- package/dist-lib/components/pages/auth/TwoFA.js +12 -0
- package/dist-lib/components/pages/auth/icons.js +56 -0
- package/dist-lib/components/pages/exportRequest.js +17 -0
- package/dist-lib/components/pages/list/DataCell.js +27 -0
- package/dist-lib/components/pages/list/DeleteViewDialog.js +22 -0
- package/dist-lib/{ListCardsBody-BEoYjSZ2.js → components/pages/list/ListCardRow.js} +47 -72
- package/dist-lib/components/pages/list/ListCardsBody.js +31 -0
- package/dist-lib/components/pages/list/ListFloatbar.js +130 -0
- package/dist-lib/components/pages/list/ListFooter.js +138 -0
- package/dist-lib/components/pages/list/ListHeader.js +120 -0
- package/dist-lib/components/pages/list/ListNoRows.js +72 -0
- package/dist-lib/components/pages/list/ListTable.js +191 -0
- package/dist-lib/components/pages/list/ListTableRow.js +37 -0
- package/dist-lib/components/pages/list/ListToolbar.js +261 -0
- package/dist-lib/components/pages/list/ListUrlBanner.js +45 -0
- package/dist-lib/components/pages/list/RowActionsCell.js +49 -0
- package/dist-lib/components/pages/list/RowContextMenu.js +55 -0
- package/dist-lib/components/pages/list/SaveViewDialog.js +111 -0
- package/dist-lib/{SortHeaderMenu-Co5PvhTA.js → components/pages/list/SortHeaderMenu.js} +18 -17
- package/dist-lib/{cardProjection-Cxlogzh8.js → components/pages/list/cardProjection.js} +3 -3
- package/dist-lib/components/pages/list/column-sizing.js +17 -0
- package/dist-lib/components/pages/list/columns.js +168 -0
- package/dist-lib/components/pages/list/filter-meta.js +84 -0
- package/dist-lib/components/pages/list/page-size.js +11 -0
- package/dist-lib/components/pages/list/sortable-header.js +18 -0
- package/dist-lib/components/pages/list/table-features.js +11 -0
- package/dist-lib/components/pages/list/use-filter-value-labels.js +115 -0
- package/dist-lib/components/pages/list/useActiveView.js +98 -0
- package/dist-lib/components/pages/list/useHeaderReorder.js +93 -0
- package/dist-lib/components/pages/list/useListColumnLayout.js +56 -0
- package/dist-lib/components/pages/list/useListFilterPresentation.js +34 -0
- package/dist-lib/components/pages/list/useListQuery.js +101 -0
- package/dist-lib/components/pages/list/useListRowInteraction.js +120 -0
- package/dist-lib/components/pages/list/useListSelection.js +53 -0
- package/dist-lib/components/pages/list/useListSort.js +44 -0
- package/dist-lib/components/pages/list/useListViews.js +148 -0
- package/dist-lib/components/pages/list/useRowMenu.js +106 -0
- package/dist-lib/components/pages/list/visible-filters.js +19 -0
- package/dist-lib/{Preferences.impl-Ct5xwZtT.js → components/pages/profile/Preferences.impl.js} +34 -31
- package/dist-lib/components/pages/profile/Preferences.js +12 -0
- package/dist-lib/components/pages/profile/Profile.impl.js +437 -0
- package/dist-lib/components/pages/profile/Profile.js +12 -0
- package/dist-lib/{TenantParamsPage.impl-BGpdmEZg.js → components/pages/tenant-params/TenantParamsPage.impl.js} +45 -40
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +12 -0
- package/dist-lib/components/params/ParamsBlock.js +119 -0
- package/dist-lib/{param-editors-TYYU7HKK.js → components/params/param-editors.js} +32 -28
- package/dist-lib/components/primitives/Avatar.js +33 -0
- package/dist-lib/components/primitives/BoolToggle.js +35 -0
- package/dist-lib/components/primitives/BrandGlyph.js +38 -0
- package/dist-lib/components/primitives/BrandLogo.js +20 -0
- package/dist-lib/components/primitives/Btn.js +67 -0
- package/dist-lib/{Check-DAfMbQIw.js → components/primitives/Check.js} +2 -2
- package/dist-lib/components/primitives/Chip.js +44 -0
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +15 -0
- package/dist-lib/components/primitives/Dropdown.js +85 -0
- package/dist-lib/components/primitives/Fields.js +751 -0
- package/dist-lib/components/primitives/HoverCard.js +115 -0
- package/dist-lib/components/primitives/IconBtn.js +37 -0
- package/dist-lib/{Icons-lt-7lhYR.js → components/primitives/Icons.js} +1 -1
- package/dist-lib/{Kbd-CNttVu0z.js → components/primitives/Kbd.js} +2 -2
- package/dist-lib/components/primitives/MenuItem.js +57 -0
- package/dist-lib/{Pill-D-wsfRhx.js → components/primitives/Pill.js} +1 -1
- package/dist-lib/{RecordIdBadge-wbigZaFc.js → components/primitives/RecordIdBadge.js} +5 -5
- package/dist-lib/components/primitives/RowField.js +47 -0
- package/dist-lib/{SectionCard-BYHoHWJc.js → components/primitives/SectionCard.js} +10 -10
- package/dist-lib/components/primitives/Spinner.js +31 -0
- package/dist-lib/components/primitives/StatTile.js +108 -0
- package/dist-lib/components/primitives/Tooltip.js +115 -0
- package/dist-lib/{dataTableStyles-vwD1mVOP.js → components/primitives/dataTableStyles.js} +1 -1
- package/dist-lib/components/shared/BlankScreen.js +13 -0
- package/dist-lib/{ChangePasswordDialog.impl-5hDc0wpE.js → components/shared/ChangePasswordDialog.impl.js} +27 -22
- package/dist-lib/{ChangePasswordDialog-C_T_3pjl.js → components/shared/ChangePasswordDialog.js} +2 -2
- package/dist-lib/components/shared/ConfirmDialog.js +129 -0
- package/dist-lib/components/shared/ConnectionNotice.js +12 -0
- package/dist-lib/components/shared/CopyButton.js +25 -0
- package/dist-lib/components/shared/DynamicIcon.js +73 -0
- package/dist-lib/components/shared/EmptyState.js +56 -0
- package/dist-lib/components/shared/ErrorBoundary.js +96 -0
- package/dist-lib/components/shared/LoadingSkeleton.js +117 -0
- package/dist-lib/components/shared/LucideIcon.js +43 -0
- package/dist-lib/components/shared/Markdown.js +15 -0
- package/dist-lib/{MarkdownRenderer-sK2TRZS-.js → components/shared/MarkdownRenderer.js} +10 -9
- package/dist-lib/components/shared/RefreshControl.js +42 -0
- package/dist-lib/components/shared/StatusGroupsDisplay.js +123 -0
- package/dist-lib/components/shared/StatusStepper.js +70 -0
- package/dist-lib/components/shared/toast/DeclarionToast.js +308 -0
- package/dist-lib/components/shared/useOwnRefresh.js +19 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/EmbedAuthBootstrap.js +71 -0
- package/dist-lib/embed/EmbedContext.js +38 -0
- package/dist-lib/embed/EmbedDirtyReporter.js +17 -0
- package/dist-lib/embed/EmbedHistoryTracker.js +17 -0
- package/dist-lib/embed/EmbedLocationReporter.js +26 -0
- package/dist-lib/embed/EmbedResizeReporter.js +25 -0
- package/dist-lib/embed/EmbedUnsavedGuard.js +23 -0
- package/dist-lib/embed/embed-dirty.js +21 -0
- package/dist-lib/embed/embed-history.js +17 -0
- package/dist-lib/embed/embed-nav-guard.js +13 -0
- package/dist-lib/embed/file-src.js +60 -0
- package/dist-lib/embed/handshake.js +37 -0
- package/dist-lib/embed/params.js +45 -0
- package/dist-lib/embed/protocol.js +26 -0
- package/dist-lib/embed/screen-location.js +44 -0
- package/dist-lib/embed/theme.js +11 -0
- package/dist-lib/embed/token.js +54 -0
- package/dist-lib/embed/useEmbedNavigate.js +65 -0
- package/dist-lib/embed/useGlobalLinkInterceptor.js +63 -0
- package/dist-lib/hooks/useActionData.js +58 -0
- package/dist-lib/hooks/useAgentConversation.js +311 -0
- package/dist-lib/hooks/useAggregate.js +18 -0
- package/dist-lib/hooks/useAllEntityData.js +53 -0
- package/dist-lib/hooks/useAssociatedData.js +37 -0
- package/dist-lib/hooks/useAuth.js +56 -0
- package/dist-lib/hooks/useBranding.js +18 -0
- package/dist-lib/hooks/useBrandingChrome.js +58 -0
- package/dist-lib/hooks/useChildrenData.js +33 -0
- package/dist-lib/hooks/useColumns.js +44 -0
- package/dist-lib/hooks/useConnectionNotice.js +35 -0
- package/dist-lib/{useCurrentLocation-Bq1T72AW.js → hooks/useCurrentLocation.js} +2 -2
- package/dist-lib/hooks/useCurrentScreen.js +20 -0
- package/dist-lib/hooks/useCursorEntityData.js +77 -0
- package/dist-lib/hooks/useDebounce.js +11 -0
- package/dist-lib/hooks/useEntity.js +8 -0
- package/dist-lib/hooks/useEntityData.js +64 -0
- package/dist-lib/hooks/useFileReferenceJSON.js +29 -0
- package/dist-lib/hooks/useFilters.js +28 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +84 -0
- package/dist-lib/hooks/useImpersonation.js +40 -0
- package/dist-lib/hooks/useIntentPrefetch.js +43 -0
- package/dist-lib/hooks/useJsonSnapshot.js +8 -0
- package/dist-lib/hooks/useLanguage.js +21 -0
- package/dist-lib/hooks/useLiveObject.js +17 -0
- package/dist-lib/hooks/useLongPress.js +49 -0
- package/dist-lib/hooks/useMutations.js +70 -0
- package/dist-lib/{useObject-B45F96rC.js → hooks/useObject.js} +2 -2
- package/dist-lib/hooks/useObjectStatus.js +20 -0
- package/dist-lib/hooks/usePageState.js +18 -0
- package/dist-lib/hooks/usePageStateRuntime.js +46 -0
- package/dist-lib/hooks/usePageStateTtl.js +10 -0
- package/dist-lib/hooks/useParams.js +123 -0
- package/dist-lib/hooks/useProperties.js +32 -0
- package/dist-lib/hooks/useRealtimeThresholds.js +31 -0
- package/dist-lib/hooks/useRegisterScreenTab.js +28 -0
- package/dist-lib/hooks/useResponsiveMode.js +84 -0
- package/dist-lib/hooks/useSSE.js +307 -0
- package/dist-lib/hooks/useSchema.js +73 -0
- package/dist-lib/hooks/useScreen.js +8 -0
- package/dist-lib/hooks/useScreenBack.js +60 -0
- package/dist-lib/hooks/useScreenTab.js +11 -0
- package/dist-lib/hooks/useTabNavigate.js +82 -0
- package/dist-lib/hooks/useTabSearchMirror.js +19 -0
- package/dist-lib/{useTabTitle-KrzEo118.js → hooks/useTabTitle.js} +9 -7
- package/dist-lib/hooks/useText.js +15 -0
- package/dist-lib/hooks/useTimelineData.js +44 -0
- package/dist-lib/hooks/useUnsavedInput.js +18 -0
- package/dist-lib/hooks/useVersionWatcher.js +62 -0
- package/dist-lib/hooks/useViews.js +88 -0
- package/dist-lib/hooks/useWindowConversation.js +11 -0
- package/dist-lib/icons.js +5 -3
- package/dist-lib/index.d.ts +42 -20
- package/dist-lib/index.js +131 -3926
- package/dist-lib/lib/action-dispatch.js +7 -0
- package/dist-lib/lib/actions.js +279 -0
- package/dist-lib/lib/anchor.js +41 -0
- package/dist-lib/lib/brand-tokens.js +95 -0
- package/dist-lib/lib/branding.js +25 -0
- package/dist-lib/lib/canonical-url.js +17 -0
- package/dist-lib/lib/capabilityPrefetch.js +57 -0
- package/dist-lib/lib/child-config.js +111 -0
- package/dist-lib/lib/children-validation.js +52 -0
- package/dist-lib/lib/decimal-text.js +15 -0
- package/dist-lib/lib/display-value.js +19 -0
- package/dist-lib/lib/document-templates.js +6 -0
- package/dist-lib/lib/download.js +41 -0
- package/dist-lib/lib/evidence-verdict.js +23 -0
- package/dist-lib/lib/failure.js +9 -0
- package/dist-lib/lib/field-classification.js +58 -0
- package/dist-lib/lib/field-regions.js +13 -0
- package/dist-lib/lib/filter-evaluator.js +98 -0
- package/dist-lib/lib/filters.js +118 -0
- package/dist-lib/lib/format-count.js +24 -0
- package/dist-lib/lib/html-state.js +9 -0
- package/dist-lib/lib/language.js +52 -0
- package/dist-lib/lib/longPressGesture.js +34 -0
- package/dist-lib/lib/mass-edit.js +65 -0
- package/dist-lib/{page-inset-D_kkVwwN.js → lib/page-inset.js} +1 -1
- package/dist-lib/lib/phone.js +28 -0
- package/dist-lib/lib/query-retry.js +7 -0
- package/dist-lib/lib/quick-add.js +23 -0
- package/dist-lib/lib/realtime-query-keys.js +23 -0
- package/dist-lib/lib/realtime-reconcile.js +148 -0
- package/dist-lib/lib/realtime-resync.js +192 -0
- package/dist-lib/lib/record-documents-key.js +4 -0
- package/dist-lib/lib/ref-choices.js +6 -0
- package/dist-lib/lib/refetch-when-idle.js +25 -0
- package/dist-lib/lib/rich-text.js +46 -0
- package/dist-lib/lib/rowClickGesture.js +10 -0
- package/dist-lib/lib/safe-url.js +34 -0
- package/dist-lib/lib/schema-routing.js +51 -0
- package/dist-lib/{screen-back-BtbEp5sO.js → lib/screen-back.js} +2 -2
- package/dist-lib/lib/scroll-restoration.js +156 -0
- package/dist-lib/lib/size-value.js +22 -0
- package/dist-lib/lib/sort.js +59 -0
- package/dist-lib/lib/timestamp.js +97 -0
- package/dist-lib/lib/toast.js +78 -0
- package/dist-lib/lib/ui-actions.js +81 -0
- package/dist-lib/{utils-D_QDpB8_.js → lib/utils.js} +1 -1
- package/dist-lib/lib/variants.js +63 -0
- package/dist-lib/lib/versionTracker.js +102 -0
- package/dist-lib/lib/viewport-category.js +12 -0
- package/dist-lib/{window-election-CHIvIZwx.js → lib/window-election.js} +1 -1
- package/dist-lib/stores/auth.js +84 -0
- package/dist-lib/stores/icon-registry.js +24 -0
- package/dist-lib/stores/list-layout.js +178 -0
- package/dist-lib/{page-state-eA6J_KIR.js → stores/page-state.js} +1 -1
- package/dist-lib/stores/preferences.js +126 -0
- package/dist-lib/stores/realtime.js +115 -0
- package/dist-lib/stores/screen-registry.js +10 -0
- package/dist-lib/stores/tabs.js +220 -0
- package/dist-lib/test/seed-schema.js +8 -0
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +80 -76
- package/dist-lib/types/api.js +48 -0
- package/dist-lib/types/fieldType.js +4 -0
- package/dist-lib/types/ordmap.js +50 -0
- package/dist-lib/types/schema.js +173 -0
- package/dist-lib/{useResponsiveMode-DIR1bZfo.d.ts → useResponsiveMode-DmrpMbZX.d.ts} +44 -16
- package/package.json +13 -12
- package/dist-lib/ActionRunner-DdBFhqGe.js +0 -1440
- package/dist-lib/AgentOpenFollower.impl-BAs_wGEZ.js +0 -81
- package/dist-lib/AssociatedBlock-BOoPLOjw.js +0 -1515
- package/dist-lib/AuthShell-C8aVwHS7.js +0 -361
- package/dist-lib/BlankScreen-DVc7fh8C.js +0 -61
- package/dist-lib/CopyButton-DRIT_f0k.js +0 -119
- package/dist-lib/DynamicIcon-DuBSz6TZ.js +0 -133
- package/dist-lib/FilterChips-Cv1tlXyo.js +0 -1031
- package/dist-lib/LayoutRenderer-d-tXYPze.js +0 -3239
- package/dist-lib/MenuItem-CfkVXPvC.js +0 -140
- package/dist-lib/MonacoJson-BG3S3GHX.js +0 -60
- package/dist-lib/Profile.impl-Cypk27ah.js +0 -527
- package/dist-lib/PropertyGridEditor-XrP6TZ5s.js +0 -4378
- package/dist-lib/RecordHeader-BfQ0_4wq.js +0 -217
- package/dist-lib/RefreshControl-CRdWPoF5.js +0 -195
- package/dist-lib/SSOCallbackPage.impl-Cfi2pQ59.js +0 -31
- package/dist-lib/SmartDetailPage.impl-BiIX0n7K.js +0 -1609
- package/dist-lib/SmartListPage.impl-Cu83Gv_G.js +0 -2818
- package/dist-lib/SmartRecordListPage.impl-DR6lq7HA.js +0 -795
- package/dist-lib/format-count-lyB4CPen.js +0 -943
- package/dist-lib/peekDraftStore-CaimrOhW.js +0 -200
- package/dist-lib/registry-CGe5kCXN.js +0 -119
- package/dist-lib/use-filter-value-labels-D3YDgUzg.js +0 -413
- package/dist-lib/useAgentConversation-rru-7hnF.js +0 -612
- package/dist-lib/useBranding-zcxEic2k.js +0 -41
- package/dist-lib/useBrandingChrome-bxaR3G1R.js +0 -170
- package/dist-lib/useCurrentScreen-BZOHBGQZ.js +0 -2522
- package/dist-lib/useImpersonation-DBIRRR70.js +0 -35
- package/dist-lib/useOwnRefresh-DJjaje52.js +0 -435
- package/dist-lib/useParams-BFLJi4n3.js +0 -133
- package/dist-lib/useProperties-B7opZ-iy.js +0 -81
- package/dist-lib/useScreenBack-DENlz844.js +0 -71
- package/dist-lib/useTabNavigate-CUqOmcMj.js +0 -78
- package/dist-lib/value-BuQVYx52.js +0 -194
- package/dist-lib/variants-vUtfBbE6.js +0 -1961
- /package/dist-lib/{JsonEditor-Dz1PQHC8.js → components/fields/JsonEditor.js} +0 -0
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
import { coerceDisplayString as e } from "../../lib/display-value.js";
|
|
2
|
+
import { entityAllowsMutation as t, fieldDisplayName as n, getDisplayValue as r, singlePkValues as i } from "../../types/schema.js";
|
|
3
|
+
import { useFirstScreenSettled as a } from "../../lib/capabilityPrefetch.js";
|
|
4
|
+
import { useSchema as o } from "../../hooks/useSchema.js";
|
|
5
|
+
import { textWithNodes as s } from "../../lib/language.js";
|
|
6
|
+
import { Icon as c } from "../primitives/Icons.js";
|
|
7
|
+
import { Btn as l } from "../primitives/Btn.js";
|
|
8
|
+
import { IconBtn as u } from "../primitives/IconBtn.js";
|
|
9
|
+
import { useText as d } from "../../hooks/useText.js";
|
|
10
|
+
import { useResponsiveMode as f } from "../../hooks/useResponsiveMode.js";
|
|
11
|
+
import { Spinner as p } from "../primitives/Spinner.js";
|
|
12
|
+
import { TextInput as m } from "../primitives/Fields.js";
|
|
13
|
+
import { pageInsetX as ee } from "../../lib/page-inset.js";
|
|
14
|
+
import { readableSort as te } from "../../lib/field-classification.js";
|
|
15
|
+
import { stripUnsupportedSortSegments as ne } from "../../lib/sort.js";
|
|
16
|
+
import { useObject as re } from "../../hooks/useObject.js";
|
|
17
|
+
import { useDebounce as ie } from "../../hooks/useDebounce.js";
|
|
18
|
+
import { FileDraftScope as h, useFileDraftScope as ae } from "../file-widgets/draft-scope.js";
|
|
19
|
+
import { getEntityFileField as g, getSchemaFieldValue as _, renderSchemaField as v, schemaFieldHasValue as y, serializeSchemaFieldValue as b } from "../file-widgets/host.js";
|
|
20
|
+
import { buildFilesPayload as x, collectCommittedFileIds as oe } from "../file-widgets/payload.js";
|
|
21
|
+
import { useUpdateObject as se } from "../../hooks/useMutations.js";
|
|
22
|
+
import { useSetStatus as S } from "../../hooks/useObjectStatus.js";
|
|
23
|
+
import { useSetProperty as C } from "../../hooks/useProperties.js";
|
|
24
|
+
import { countActiveFilters as ce, parseFilterURLState as le, removeFilterAtPath as w, setFiltersInURL as T } from "../../lib/filters.js";
|
|
25
|
+
import { useScreenBack as E } from "../../hooks/useScreenBack.js";
|
|
26
|
+
import { useRegisterScreenTab as D } from "../../hooks/useRegisterScreenTab.js";
|
|
27
|
+
import { useTabSearchMirror as O } from "../../hooks/useTabSearchMirror.js";
|
|
28
|
+
import { DetailSkeleton as k } from "../shared/LoadingSkeleton.js";
|
|
29
|
+
import { FilterDrawer as A } from "../filters/FilterDrawer.js";
|
|
30
|
+
import { FilterChips as j } from "../filters/FilterChips.js";
|
|
31
|
+
import { LayoutRenderer as ue } from "../detail-layout/LayoutRenderer.js";
|
|
32
|
+
import { resolveCard as de, resolveListProjection as fe } from "./list/cardProjection.js";
|
|
33
|
+
import { useListFilterPresentation as M } from "./list/useListFilterPresentation.js";
|
|
34
|
+
import { FilterOmittedNotice as N } from "../filters/FilterOmittedNotice.js";
|
|
35
|
+
import { useListQuery as P } from "./list/useListQuery.js";
|
|
36
|
+
import { listLoadErrorDescription as pe } from "./list/ListNoRows.js";
|
|
37
|
+
import { useFilterValueLabels as me } from "./list/use-filter-value-labels.js";
|
|
38
|
+
import { useCallback as F, useEffect as I, useMemo as L, useRef as R, useState as z } from "react";
|
|
39
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
40
|
+
import { useSearchParams as he } from "react-router";
|
|
41
|
+
//#region src/components/pages/SmartRecordListPage.impl.tsx
|
|
42
|
+
var ge = 200, _e = "items:";
|
|
43
|
+
function U({ screenCode: t }) {
|
|
44
|
+
let n = d(), r = d("errors"), [i, s] = he(), { data: p, refetch: re } = o(), h = f(), [ae, g] = z(!1), _ = p?.screens[t], v = _?.entity ? p?.entities[_.entity] : void 0, y = _?.entity;
|
|
45
|
+
D(_, v, i.toString()), O(_?.route);
|
|
46
|
+
let b = E(), x = i.get("selected") ?? null, oe = i.get("search") ?? "", se = ie(oe, 300), S = i.get("sort") ?? te(v, _?.sort_default) ?? "", C = L(() => le(i), [i]), { visibleFilterState: k, filterFieldMeta: ue, allFilterFieldMeta: _e, filterFieldName: U } = M(_, v, p?.entities, C.filters), W = k.filters, G = F((e) => {
|
|
47
|
+
s((t) => {
|
|
48
|
+
let n = new URLSearchParams(t);
|
|
49
|
+
return T(e, n), n;
|
|
50
|
+
}, { replace: !0 });
|
|
51
|
+
}, [s]), K = L(() => _?.columns ?? v?.fields.names().filter((e) => !v.fields.get(e)?.primary && !v.fields.get(e)?.auto && v.fields.get(e)?.display?.is_listable !== !1).slice(0, 4) ?? [], [_?.columns, v]), q = L(() => {
|
|
52
|
+
let e = _?.responsive?.[h.category]?.presentation;
|
|
53
|
+
return h.category === "phone" ? "drilldown" : e === "split" || e === "drilldown" || e === "stacked" ? e : "split";
|
|
54
|
+
}, [_?.responsive, h.category]), J = L(() => {
|
|
55
|
+
let e = _?.responsive?.[h.category];
|
|
56
|
+
return e?.list?.presentation === "table" || e?.list?.presentation === "cards" ? e.list.presentation : e?.presentation === "table" || e?.presentation === "cards" ? e.presentation : h.category === "phone" ? "cards" : "table";
|
|
57
|
+
}, [_?.responsive, h.category]), be = _?.responsive?.[h.category]?.layout?.related_records, xe = L(() => de({
|
|
58
|
+
entity: v,
|
|
59
|
+
screen: _
|
|
60
|
+
}), [v, _]), Se = L(() => fe({
|
|
61
|
+
entity: v,
|
|
62
|
+
screen: _,
|
|
63
|
+
presentation: J,
|
|
64
|
+
visibleColumns: K,
|
|
65
|
+
card: xe,
|
|
66
|
+
sort: S
|
|
67
|
+
}), [
|
|
68
|
+
v,
|
|
69
|
+
_,
|
|
70
|
+
J,
|
|
71
|
+
K,
|
|
72
|
+
xe,
|
|
73
|
+
S
|
|
74
|
+
]), Y = P({
|
|
75
|
+
entity: v,
|
|
76
|
+
entityCode: y,
|
|
77
|
+
screen: _,
|
|
78
|
+
screenCode: t,
|
|
79
|
+
page: 1,
|
|
80
|
+
perPage: ge,
|
|
81
|
+
sortForRequest: ne(S),
|
|
82
|
+
debouncedSearch: se,
|
|
83
|
+
filters: W,
|
|
84
|
+
includeDeleted: !1,
|
|
85
|
+
expand: Se.expandFields,
|
|
86
|
+
select: Se.selectFields,
|
|
87
|
+
isHeld: !v,
|
|
88
|
+
retryHeld: () => {
|
|
89
|
+
re();
|
|
90
|
+
},
|
|
91
|
+
runCountQuery: !1,
|
|
92
|
+
urlKey: `${y ?? ""}|${i.toString()}`
|
|
93
|
+
}), Ce = Y.rows, we = Y.refs, Te = Y.isLoading;
|
|
94
|
+
a(!Te);
|
|
95
|
+
let { labelFor: Ee, refs: De } = me(_e, W, we, p?.entities), Oe = L(() => v?.fields.names().find((e) => v.fields.get(e)?.primary) ?? "id", [v]), ke = F((e, t) => {
|
|
96
|
+
s((t) => {
|
|
97
|
+
let n = new URLSearchParams(t);
|
|
98
|
+
return e ? n.set("selected", e) : n.delete("selected"), n;
|
|
99
|
+
}, { replace: t?.replace ?? !0 });
|
|
100
|
+
}, [s]), Ae = F((e) => {
|
|
101
|
+
s((t) => {
|
|
102
|
+
let n = new URLSearchParams(t);
|
|
103
|
+
return e ? n.set("search", e) : n.delete("search"), n;
|
|
104
|
+
}, { replace: !0 });
|
|
105
|
+
}, [s]), X = (_?.list_resizable ?? !1) && q === "split" && h.category !== "phone" && !h.touch, je = R(null), [Z, Q] = z(null), Me = R(!1), $ = _?.list_width;
|
|
106
|
+
I(() => {
|
|
107
|
+
X && $?.endsWith("%") && Q(null);
|
|
108
|
+
}, [
|
|
109
|
+
X,
|
|
110
|
+
$,
|
|
111
|
+
h.width,
|
|
112
|
+
h.height
|
|
113
|
+
]), I(() => {
|
|
114
|
+
if (!X || Z !== null) return;
|
|
115
|
+
let e = je.current;
|
|
116
|
+
if (e) {
|
|
117
|
+
if ($ && $.endsWith("%")) {
|
|
118
|
+
let t = parseFloat($) / 100;
|
|
119
|
+
Q(Math.round(e.getBoundingClientRect().width * t));
|
|
120
|
+
} else Q($ && parseInt($, 10) || 320);
|
|
121
|
+
}
|
|
122
|
+
}, [
|
|
123
|
+
X,
|
|
124
|
+
$,
|
|
125
|
+
Z,
|
|
126
|
+
v
|
|
127
|
+
]);
|
|
128
|
+
let Ne = R(null);
|
|
129
|
+
I(() => () => {
|
|
130
|
+
Ne.current?.();
|
|
131
|
+
}, []);
|
|
132
|
+
let Pe = F((e) => {
|
|
133
|
+
e.preventDefault(), Me.current = !0;
|
|
134
|
+
let t = e.clientX, n = Z ?? 320, r = (e) => {
|
|
135
|
+
if (!Me.current) return;
|
|
136
|
+
let r = (je.current?.getBoundingClientRect().width ?? window.innerWidth) - 300, i = Math.max(200, Math.min(r, n + e.clientX - t));
|
|
137
|
+
Q(i);
|
|
138
|
+
}, i = () => {
|
|
139
|
+
Me.current = !1, document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", i), document.body.style.cursor = "", document.body.style.userSelect = "", Ne.current = null;
|
|
140
|
+
};
|
|
141
|
+
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", document.addEventListener("mousemove", r), document.addEventListener("mouseup", i), Ne.current = i;
|
|
142
|
+
}, [Z]);
|
|
143
|
+
if (!p || !_ || !v) return null;
|
|
144
|
+
let Fe = ce(W), Ie = q === "split" || q === "stacked" || !x, Le = q === "split" || q === "stacked" || !!x, Re = q !== "split" && x ? () => ke(null, { replace: !0 }) : void 0, ze = q === "split" ? X && Z !== null ? Z : _.list_width ?? "320px" : "100%";
|
|
145
|
+
return /* @__PURE__ */ H("div", {
|
|
146
|
+
ref: je,
|
|
147
|
+
"data-record-list-presentation": q,
|
|
148
|
+
style: {
|
|
149
|
+
display: "flex",
|
|
150
|
+
flexDirection: q === "stacked" ? "column" : "row",
|
|
151
|
+
height: "100%",
|
|
152
|
+
minWidth: 0,
|
|
153
|
+
overflow: "hidden"
|
|
154
|
+
},
|
|
155
|
+
children: [
|
|
156
|
+
Ie && /* @__PURE__ */ H("div", {
|
|
157
|
+
"data-testid": "record-list-panel",
|
|
158
|
+
style: {
|
|
159
|
+
flex: q === "split" ? "none" : "1 1 auto",
|
|
160
|
+
display: "flex",
|
|
161
|
+
flexDirection: "column",
|
|
162
|
+
overflow: "hidden",
|
|
163
|
+
borderRight: q === "split" && !X ? "1px solid var(--divider)" : "none",
|
|
164
|
+
borderBottom: q === "stacked" ? "1px solid var(--divider)" : "none",
|
|
165
|
+
width: ze,
|
|
166
|
+
minWidth: 0,
|
|
167
|
+
height: q === "stacked" ? "50%" : "100%"
|
|
168
|
+
},
|
|
169
|
+
children: [/* @__PURE__ */ H("div", {
|
|
170
|
+
style: {
|
|
171
|
+
paddingTop: 12,
|
|
172
|
+
paddingBottom: 12,
|
|
173
|
+
...ee(12),
|
|
174
|
+
display: "flex",
|
|
175
|
+
flexDirection: "column",
|
|
176
|
+
gap: 8,
|
|
177
|
+
borderBottom: "1px solid var(--divider)"
|
|
178
|
+
},
|
|
179
|
+
children: [
|
|
180
|
+
b.hasOriginBack && /* @__PURE__ */ H("div", {
|
|
181
|
+
style: {
|
|
182
|
+
display: "flex",
|
|
183
|
+
alignItems: "center",
|
|
184
|
+
gap: 8
|
|
185
|
+
},
|
|
186
|
+
children: [/* @__PURE__ */ V(u, {
|
|
187
|
+
icon: /* @__PURE__ */ V(c.back, { size: 14 }),
|
|
188
|
+
title: n("list.header.back", "Back"),
|
|
189
|
+
onClick: b.goBack
|
|
190
|
+
}), /* @__PURE__ */ V("span", {
|
|
191
|
+
style: {
|
|
192
|
+
fontSize: 12.5,
|
|
193
|
+
fontWeight: 600,
|
|
194
|
+
color: "var(--text)"
|
|
195
|
+
},
|
|
196
|
+
children: n(_.display?.name) || n(v.display.name_plural)
|
|
197
|
+
})]
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ V(m, {
|
|
200
|
+
value: oe,
|
|
201
|
+
onChange: Ae,
|
|
202
|
+
placeholder: n("list.toolbar.search_placeholder", "Search {name}…", { name: n(v.display.name_plural) }),
|
|
203
|
+
prefix: /* @__PURE__ */ V(c.search, { size: 13 })
|
|
204
|
+
}),
|
|
205
|
+
C.error && /* @__PURE__ */ H("div", {
|
|
206
|
+
role: "alert",
|
|
207
|
+
"data-testid": "record-list-filter-url-error",
|
|
208
|
+
style: {
|
|
209
|
+
padding: "7px 9px",
|
|
210
|
+
border: "1px solid var(--danger)",
|
|
211
|
+
borderRadius: "var(--radius-md)",
|
|
212
|
+
color: "var(--danger)",
|
|
213
|
+
fontSize: 11.5
|
|
214
|
+
},
|
|
215
|
+
children: [
|
|
216
|
+
r(C.errorCode ?? "", C.error),
|
|
217
|
+
" ",
|
|
218
|
+
n("list.filters.invalid_suffix", "Showing this list without URL filters.")
|
|
219
|
+
]
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ H(l, {
|
|
222
|
+
size: "xs",
|
|
223
|
+
icon: /* @__PURE__ */ V(c.filter, { size: 12 }),
|
|
224
|
+
onClick: () => g(!0),
|
|
225
|
+
children: [n("filter.drawer.title", "Filters"), Fe > 0 ? ` (${Fe})` : ""]
|
|
226
|
+
}),
|
|
227
|
+
k.omitted && /* @__PURE__ */ V(N, {}),
|
|
228
|
+
/* @__PURE__ */ V(j, {
|
|
229
|
+
filters: W,
|
|
230
|
+
resolveValue: Ee,
|
|
231
|
+
fieldLabel: U,
|
|
232
|
+
onRemoveAtPath: (e) => G(w(W, e)),
|
|
233
|
+
onClearAll: () => G([]),
|
|
234
|
+
onChipClick: () => g(!0)
|
|
235
|
+
}),
|
|
236
|
+
/* @__PURE__ */ V("div", {
|
|
237
|
+
style: {
|
|
238
|
+
display: "flex",
|
|
239
|
+
alignItems: "center",
|
|
240
|
+
justifyContent: "space-between",
|
|
241
|
+
fontSize: 11,
|
|
242
|
+
color: "var(--text-3)"
|
|
243
|
+
},
|
|
244
|
+
children: /* @__PURE__ */ V("span", { children: Te ? n("list.records.loading", "Loading…") : Y.isError ? r("list.rows_unreadable", "The records could not be loaded.") : n("list.records.count", "{count} {name}", {
|
|
245
|
+
count: Ce.length,
|
|
246
|
+
name: n(v.display.name_plural)
|
|
247
|
+
}) })
|
|
248
|
+
})
|
|
249
|
+
]
|
|
250
|
+
}), /* @__PURE__ */ V("div", {
|
|
251
|
+
style: {
|
|
252
|
+
flex: 1,
|
|
253
|
+
overflowY: "auto",
|
|
254
|
+
padding: J === "cards" ? 10 : 0,
|
|
255
|
+
display: J === "cards" ? "flex" : "block",
|
|
256
|
+
flexDirection: "column",
|
|
257
|
+
gap: J === "cards" ? 10 : void 0
|
|
258
|
+
},
|
|
259
|
+
children: Te ? /* @__PURE__ */ V("div", {
|
|
260
|
+
style: {
|
|
261
|
+
padding: 12,
|
|
262
|
+
display: "flex",
|
|
263
|
+
flexDirection: "column",
|
|
264
|
+
gap: 6
|
|
265
|
+
},
|
|
266
|
+
children: Array.from({ length: 8 }).map((e, t) => /* @__PURE__ */ V("div", { style: {
|
|
267
|
+
height: 48,
|
|
268
|
+
borderRadius: "var(--radius-md)",
|
|
269
|
+
background: "var(--surface-3)"
|
|
270
|
+
} }, t))
|
|
271
|
+
}) : Y.isError ? /* @__PURE__ */ H("div", {
|
|
272
|
+
role: "alert",
|
|
273
|
+
style: {
|
|
274
|
+
padding: 16,
|
|
275
|
+
color: "var(--text-2)"
|
|
276
|
+
},
|
|
277
|
+
children: [pe(n, r, v, Y.error), /* @__PURE__ */ V(l, {
|
|
278
|
+
size: "xs",
|
|
279
|
+
onClick: () => {
|
|
280
|
+
Y.retry();
|
|
281
|
+
},
|
|
282
|
+
children: n("list.rows.retry", "Retry")
|
|
283
|
+
})]
|
|
284
|
+
}) : Ce.length === 0 ? /* @__PURE__ */ V("div", {
|
|
285
|
+
style: {
|
|
286
|
+
padding: 28,
|
|
287
|
+
textAlign: "center",
|
|
288
|
+
fontSize: 12.5,
|
|
289
|
+
color: "var(--text-3)"
|
|
290
|
+
},
|
|
291
|
+
children: n("list.records.none", "No records found")
|
|
292
|
+
}) : /* @__PURE__ */ H(B, { children: [Ce.map((t) => {
|
|
293
|
+
let n = e(t[Oe]);
|
|
294
|
+
return /* @__PURE__ */ V(ve, {
|
|
295
|
+
record: t,
|
|
296
|
+
entity: v,
|
|
297
|
+
columns: K,
|
|
298
|
+
card: xe,
|
|
299
|
+
presentation: J,
|
|
300
|
+
refs: we,
|
|
301
|
+
isSelected: n === x,
|
|
302
|
+
onClick: () => ke(n, { replace: q === "split" })
|
|
303
|
+
}, n);
|
|
304
|
+
}), Y.isCursor && Y.hasMorePages && /* @__PURE__ */ V("button", {
|
|
305
|
+
type: "button",
|
|
306
|
+
"data-testid": "record-list-load-more",
|
|
307
|
+
onClick: Y.fetchNextPage,
|
|
308
|
+
disabled: Y.isFetchingNextPage,
|
|
309
|
+
style: {
|
|
310
|
+
width: "100%",
|
|
311
|
+
padding: "8px 12px",
|
|
312
|
+
fontSize: 12,
|
|
313
|
+
background: "transparent",
|
|
314
|
+
border: "none",
|
|
315
|
+
borderTop: "1px solid var(--divider)",
|
|
316
|
+
color: "var(--text-2)",
|
|
317
|
+
cursor: Y.isFetchingNextPage ? "default" : "pointer"
|
|
318
|
+
},
|
|
319
|
+
children: Y.isFetchingNextPage ? n("list.records.loading", "Loading…") : n("list.footer.load_more", "Load more")
|
|
320
|
+
})] })
|
|
321
|
+
})]
|
|
322
|
+
}),
|
|
323
|
+
X && /* @__PURE__ */ V("div", {
|
|
324
|
+
"data-testid": "record-list-resize-handle",
|
|
325
|
+
onMouseDown: Pe,
|
|
326
|
+
style: {
|
|
327
|
+
flex: "none",
|
|
328
|
+
width: 1,
|
|
329
|
+
cursor: "col-resize",
|
|
330
|
+
background: "var(--divider)",
|
|
331
|
+
transition: "background-color .12s"
|
|
332
|
+
},
|
|
333
|
+
onMouseEnter: (e) => e.currentTarget.style.background = "var(--border-strong)",
|
|
334
|
+
onMouseLeave: (e) => e.currentTarget.style.background = "var(--divider)"
|
|
335
|
+
}),
|
|
336
|
+
Le && /* @__PURE__ */ H("div", {
|
|
337
|
+
"data-testid": "record-detail-panel",
|
|
338
|
+
style: {
|
|
339
|
+
flex: 1,
|
|
340
|
+
display: "flex",
|
|
341
|
+
flexDirection: "column",
|
|
342
|
+
minWidth: 0,
|
|
343
|
+
overflow: "hidden",
|
|
344
|
+
height: q === "stacked" ? "50%" : "100%"
|
|
345
|
+
},
|
|
346
|
+
children: [!Ie && k.omitted && /* @__PURE__ */ V(N, { className: "p-4" }), /* @__PURE__ */ V("div", {
|
|
347
|
+
style: {
|
|
348
|
+
flex: 1,
|
|
349
|
+
minHeight: 0
|
|
350
|
+
},
|
|
351
|
+
children: x ? /* @__PURE__ */ V(ye, {
|
|
352
|
+
entityCode: y,
|
|
353
|
+
recordId: x,
|
|
354
|
+
items: _.items,
|
|
355
|
+
schema: p,
|
|
356
|
+
entity: v,
|
|
357
|
+
onBackToList: Re,
|
|
358
|
+
onOpenFilters: Ie ? void 0 : () => g(!0),
|
|
359
|
+
relatedRecordsPresentation: be
|
|
360
|
+
}, x) : /* @__PURE__ */ V("div", {
|
|
361
|
+
style: {
|
|
362
|
+
display: "flex",
|
|
363
|
+
alignItems: "center",
|
|
364
|
+
justifyContent: "center",
|
|
365
|
+
height: "100%",
|
|
366
|
+
color: "var(--text-3)"
|
|
367
|
+
},
|
|
368
|
+
children: /* @__PURE__ */ V("p", {
|
|
369
|
+
style: { fontSize: 12.5 },
|
|
370
|
+
children: n("list.detail.select_prompt", "Select a {name} to view details", { name: n(v.display.name) })
|
|
371
|
+
})
|
|
372
|
+
})
|
|
373
|
+
})]
|
|
374
|
+
}),
|
|
375
|
+
/* @__PURE__ */ V(A, {
|
|
376
|
+
open: ae,
|
|
377
|
+
onClose: () => g(!1),
|
|
378
|
+
filters: W,
|
|
379
|
+
onApply: G,
|
|
380
|
+
availableFields: ue,
|
|
381
|
+
allFields: _e,
|
|
382
|
+
fieldLabel: U,
|
|
383
|
+
resolveValue: Ee,
|
|
384
|
+
defaultFilters: _.default_filters,
|
|
385
|
+
refs: De
|
|
386
|
+
})
|
|
387
|
+
]
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
function ve({ record: e, entity: t, columns: n, card: r, presentation: i, refs: a, isSelected: o, onClick: s }) {
|
|
391
|
+
let c = d();
|
|
392
|
+
if (i === "cards") {
|
|
393
|
+
let n = r.badgeFields.filter((n) => y(t, e, n)), i = r.bodyFields.filter((n) => y(t, e, n)), l = r.metaFields.filter((n) => y(t, e, n));
|
|
394
|
+
return /* @__PURE__ */ H("button", {
|
|
395
|
+
type: "button",
|
|
396
|
+
"data-testid": "record-list-card",
|
|
397
|
+
"aria-current": o ? "true" : void 0,
|
|
398
|
+
onClick: s,
|
|
399
|
+
style: {
|
|
400
|
+
width: "100%",
|
|
401
|
+
textAlign: "left",
|
|
402
|
+
padding: 12,
|
|
403
|
+
border: "1px solid var(--border)",
|
|
404
|
+
borderRadius: "var(--radius-md)",
|
|
405
|
+
background: o ? "var(--row-selected-bg)" : "var(--surface)",
|
|
406
|
+
color: "var(--text)",
|
|
407
|
+
cursor: "pointer",
|
|
408
|
+
display: "flex",
|
|
409
|
+
flexDirection: "column",
|
|
410
|
+
gap: 8,
|
|
411
|
+
boxShadow: o ? "inset 3px 0 0 var(--accent)" : "none"
|
|
412
|
+
},
|
|
413
|
+
children: [
|
|
414
|
+
/* @__PURE__ */ V(W, {
|
|
415
|
+
entity: t,
|
|
416
|
+
record: e,
|
|
417
|
+
field: r.titleField,
|
|
418
|
+
refs: a
|
|
419
|
+
}),
|
|
420
|
+
r.subtitleField && /* @__PURE__ */ V("div", {
|
|
421
|
+
style: {
|
|
422
|
+
fontSize: 12,
|
|
423
|
+
color: "var(--text-3)",
|
|
424
|
+
overflowWrap: "anywhere"
|
|
425
|
+
},
|
|
426
|
+
children: v({
|
|
427
|
+
entity: t,
|
|
428
|
+
fieldName: r.subtitleField,
|
|
429
|
+
record: e,
|
|
430
|
+
mode: "display",
|
|
431
|
+
refs: a,
|
|
432
|
+
t: c
|
|
433
|
+
})
|
|
434
|
+
}),
|
|
435
|
+
n.length > 0 && /* @__PURE__ */ V("div", {
|
|
436
|
+
style: {
|
|
437
|
+
display: "flex",
|
|
438
|
+
flexWrap: "wrap",
|
|
439
|
+
gap: 6
|
|
440
|
+
},
|
|
441
|
+
children: n.map((n) => /* @__PURE__ */ V("span", {
|
|
442
|
+
style: {
|
|
443
|
+
border: "1px solid var(--border)",
|
|
444
|
+
borderRadius: 999,
|
|
445
|
+
padding: "2px 7px",
|
|
446
|
+
fontSize: 11,
|
|
447
|
+
color: "var(--text-2)",
|
|
448
|
+
maxWidth: "100%",
|
|
449
|
+
overflowWrap: "anywhere"
|
|
450
|
+
},
|
|
451
|
+
children: v({
|
|
452
|
+
entity: t,
|
|
453
|
+
fieldName: n,
|
|
454
|
+
record: e,
|
|
455
|
+
mode: "display",
|
|
456
|
+
refs: a,
|
|
457
|
+
t: c
|
|
458
|
+
})
|
|
459
|
+
}, n))
|
|
460
|
+
}),
|
|
461
|
+
i.length > 0 && /* @__PURE__ */ V("dl", {
|
|
462
|
+
style: {
|
|
463
|
+
display: "grid",
|
|
464
|
+
gridTemplateColumns: "minmax(72px, max-content) minmax(0, 1fr)",
|
|
465
|
+
gap: "5px 10px",
|
|
466
|
+
margin: 0
|
|
467
|
+
},
|
|
468
|
+
children: i.map((n) => /* @__PURE__ */ V(G, {
|
|
469
|
+
entity: t,
|
|
470
|
+
record: e,
|
|
471
|
+
fieldName: n,
|
|
472
|
+
refs: a
|
|
473
|
+
}, n))
|
|
474
|
+
}),
|
|
475
|
+
l.length > 0 && /* @__PURE__ */ V("div", {
|
|
476
|
+
style: {
|
|
477
|
+
display: "flex",
|
|
478
|
+
flexWrap: "wrap",
|
|
479
|
+
gap: 8,
|
|
480
|
+
fontSize: 11,
|
|
481
|
+
color: "var(--text-3)"
|
|
482
|
+
},
|
|
483
|
+
children: l.map((n) => /* @__PURE__ */ V("span", {
|
|
484
|
+
style: {
|
|
485
|
+
minWidth: 0,
|
|
486
|
+
overflowWrap: "anywhere"
|
|
487
|
+
},
|
|
488
|
+
children: v({
|
|
489
|
+
entity: t,
|
|
490
|
+
fieldName: n,
|
|
491
|
+
record: e,
|
|
492
|
+
mode: "display",
|
|
493
|
+
refs: a,
|
|
494
|
+
t: c
|
|
495
|
+
})
|
|
496
|
+
}, n))
|
|
497
|
+
})
|
|
498
|
+
]
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
let l = n[0], u = n[1], f = n.slice(2, 4);
|
|
502
|
+
return /* @__PURE__ */ H("button", {
|
|
503
|
+
onClick: s,
|
|
504
|
+
style: {
|
|
505
|
+
width: "100%",
|
|
506
|
+
textAlign: "left",
|
|
507
|
+
padding: "10px 12px",
|
|
508
|
+
borderBottom: "1px solid var(--divider)",
|
|
509
|
+
background: o ? "var(--row-selected-bg)" : "transparent",
|
|
510
|
+
borderLeft: o ? "2px solid var(--accent)" : "2px solid transparent",
|
|
511
|
+
cursor: "pointer",
|
|
512
|
+
transition: "background-color .12s",
|
|
513
|
+
display: "flex",
|
|
514
|
+
flexDirection: "column",
|
|
515
|
+
gap: 2,
|
|
516
|
+
border: "1px solid transparent",
|
|
517
|
+
borderBottomColor: "var(--divider)"
|
|
518
|
+
},
|
|
519
|
+
onMouseEnter: (e) => {
|
|
520
|
+
o || (e.currentTarget.style.background = "var(--surface-3)");
|
|
521
|
+
},
|
|
522
|
+
onMouseLeave: (e) => {
|
|
523
|
+
o || (e.currentTarget.style.background = "transparent");
|
|
524
|
+
},
|
|
525
|
+
children: [l && /* @__PURE__ */ V("div", {
|
|
526
|
+
style: {
|
|
527
|
+
fontSize: 12.5,
|
|
528
|
+
fontWeight: 500,
|
|
529
|
+
overflow: "hidden",
|
|
530
|
+
textOverflow: "ellipsis",
|
|
531
|
+
whiteSpace: "nowrap",
|
|
532
|
+
color: "var(--text)"
|
|
533
|
+
},
|
|
534
|
+
children: v({
|
|
535
|
+
entity: t,
|
|
536
|
+
fieldName: l,
|
|
537
|
+
record: e,
|
|
538
|
+
mode: "display",
|
|
539
|
+
refs: a,
|
|
540
|
+
t: c
|
|
541
|
+
})
|
|
542
|
+
}), /* @__PURE__ */ H("div", {
|
|
543
|
+
style: {
|
|
544
|
+
display: "flex",
|
|
545
|
+
alignItems: "center",
|
|
546
|
+
gap: 6
|
|
547
|
+
},
|
|
548
|
+
children: [u && /* @__PURE__ */ V("div", {
|
|
549
|
+
style: {
|
|
550
|
+
fontSize: 11,
|
|
551
|
+
color: "var(--text-3)",
|
|
552
|
+
flex: 1,
|
|
553
|
+
overflow: "hidden",
|
|
554
|
+
textOverflow: "ellipsis",
|
|
555
|
+
whiteSpace: "nowrap"
|
|
556
|
+
},
|
|
557
|
+
children: v({
|
|
558
|
+
entity: t,
|
|
559
|
+
fieldName: u,
|
|
560
|
+
record: e,
|
|
561
|
+
mode: "display",
|
|
562
|
+
refs: a,
|
|
563
|
+
t: c
|
|
564
|
+
})
|
|
565
|
+
}), /* @__PURE__ */ V("div", {
|
|
566
|
+
style: {
|
|
567
|
+
display: "flex",
|
|
568
|
+
alignItems: "center",
|
|
569
|
+
gap: 4,
|
|
570
|
+
flexShrink: 0
|
|
571
|
+
},
|
|
572
|
+
children: f.map((n) => _(t, e, n) == null ? null : /* @__PURE__ */ V("div", {
|
|
573
|
+
style: { fontSize: 11 },
|
|
574
|
+
children: v({
|
|
575
|
+
entity: t,
|
|
576
|
+
fieldName: n,
|
|
577
|
+
record: e,
|
|
578
|
+
mode: "display",
|
|
579
|
+
refs: a,
|
|
580
|
+
t: c
|
|
581
|
+
})
|
|
582
|
+
}, n))
|
|
583
|
+
})]
|
|
584
|
+
})]
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
function W({ entity: e, record: t, field: n, refs: i }) {
|
|
588
|
+
let a = d(), o = r(a, t, e), s = n ? v({
|
|
589
|
+
entity: e,
|
|
590
|
+
fieldName: n,
|
|
591
|
+
record: t,
|
|
592
|
+
mode: "display",
|
|
593
|
+
refs: i,
|
|
594
|
+
t: a
|
|
595
|
+
}) : o;
|
|
596
|
+
return /* @__PURE__ */ V("div", {
|
|
597
|
+
style: {
|
|
598
|
+
fontSize: 13.5,
|
|
599
|
+
fontWeight: 600,
|
|
600
|
+
color: "var(--text)",
|
|
601
|
+
overflowWrap: "anywhere"
|
|
602
|
+
},
|
|
603
|
+
children: s || a(e.display.name)
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
function G({ entity: e, record: t, fieldName: r, refs: i }) {
|
|
607
|
+
let a = d(), o = _(e, t, r);
|
|
608
|
+
if (o == null || o === "") return null;
|
|
609
|
+
let s = e.fields.get(r);
|
|
610
|
+
return s ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("dt", {
|
|
611
|
+
style: {
|
|
612
|
+
color: "var(--text-3)",
|
|
613
|
+
fontSize: 11.5,
|
|
614
|
+
minWidth: 0,
|
|
615
|
+
overflowWrap: "anywhere"
|
|
616
|
+
},
|
|
617
|
+
children: n(a, s, r)
|
|
618
|
+
}), /* @__PURE__ */ V("dd", {
|
|
619
|
+
style: {
|
|
620
|
+
margin: 0,
|
|
621
|
+
color: "var(--text)",
|
|
622
|
+
fontSize: 12,
|
|
623
|
+
minWidth: 0,
|
|
624
|
+
overflowWrap: "anywhere"
|
|
625
|
+
},
|
|
626
|
+
children: v({
|
|
627
|
+
entity: e,
|
|
628
|
+
fieldName: r,
|
|
629
|
+
record: t,
|
|
630
|
+
mode: "display",
|
|
631
|
+
refs: i,
|
|
632
|
+
t: a
|
|
633
|
+
})
|
|
634
|
+
})] }) : null;
|
|
635
|
+
}
|
|
636
|
+
function ye({ entityCode: e, recordId: t, items: n, schema: r, entity: i, onBackToList: a, onOpenFilters: o, relatedRecordsPresentation: s }) {
|
|
637
|
+
return /* @__PURE__ */ V(h, { children: /* @__PURE__ */ V(K, {
|
|
638
|
+
entityCode: e,
|
|
639
|
+
recordId: t,
|
|
640
|
+
items: n,
|
|
641
|
+
schema: r,
|
|
642
|
+
entity: i,
|
|
643
|
+
onBackToList: a,
|
|
644
|
+
onOpenFilters: o,
|
|
645
|
+
relatedRecordsPresentation: s
|
|
646
|
+
}) });
|
|
647
|
+
}
|
|
648
|
+
function K({ entityCode: n, recordId: a, items: o, schema: f, entity: m, onBackToList: te, onOpenFilters: ne, relatedRecordsPresentation: ie }) {
|
|
649
|
+
let h = d(), v = t(m, "update"), y = L(() => a ? i(m, a) : void 0, [a, m]), { data: ce, isLoading: le } = re(n, y), w = se(n), T = ae(), [E, D] = z(!1), [O, A] = z({}), j = ce?.data, de = j?.$statuses, fe = j?.$properties, M = S(n, a), N = C(n, a), P = L(() => {
|
|
650
|
+
let e = /* @__PURE__ */ new Set();
|
|
651
|
+
for (let [t, n] of m.fields) !n.auto && !n.primary && e.add(t);
|
|
652
|
+
for (let [t] of m.files ?? []) e.add(t);
|
|
653
|
+
return e;
|
|
654
|
+
}, [m]), pe = F(() => {
|
|
655
|
+
if (j) {
|
|
656
|
+
let e = {};
|
|
657
|
+
P.forEach((t) => {
|
|
658
|
+
let n = _(m, j, t);
|
|
659
|
+
e[t] = g(m, t) ? n ?? null : n ?? "";
|
|
660
|
+
}), A(e);
|
|
661
|
+
}
|
|
662
|
+
D(!0);
|
|
663
|
+
}, [
|
|
664
|
+
j,
|
|
665
|
+
P,
|
|
666
|
+
m
|
|
667
|
+
]), me = F(async () => {
|
|
668
|
+
await T.flushAllDrafts(), D(!1), A({});
|
|
669
|
+
}, [T]), I = F(() => {
|
|
670
|
+
let e = {}, t = x({
|
|
671
|
+
entity: m,
|
|
672
|
+
formData: O,
|
|
673
|
+
record: j,
|
|
674
|
+
isNew: !1
|
|
675
|
+
}), n = oe(t);
|
|
676
|
+
for (let [t, n] of Object.entries(O)) m.files?.has(t) || (e[t] = b(m, t, n));
|
|
677
|
+
Object.keys(t).length > 0 && (e.$files = t), Object.keys(e).length === 0 ? (D(!1), A({})) : w.mutate({
|
|
678
|
+
pkValues: a,
|
|
679
|
+
data: e
|
|
680
|
+
}, { onSuccess: () => {
|
|
681
|
+
n.forEach((e) => T.markCommitted(e)), D(!1), A({});
|
|
682
|
+
} });
|
|
683
|
+
}, [
|
|
684
|
+
T,
|
|
685
|
+
w,
|
|
686
|
+
a,
|
|
687
|
+
m,
|
|
688
|
+
O,
|
|
689
|
+
j
|
|
690
|
+
]), R = F((e, t) => {
|
|
691
|
+
A((n) => ({
|
|
692
|
+
...n,
|
|
693
|
+
[e]: t
|
|
694
|
+
}));
|
|
695
|
+
}, []);
|
|
696
|
+
if (le) return /* @__PURE__ */ V(k, {});
|
|
697
|
+
if (!j) return null;
|
|
698
|
+
let he = r(h, j, m), ge = m.display?.display_field, U = he ? void 0 : ge ? j[ge] : j[m.fields.names()[0]], ve = he || (U != null && typeof U != "object" ? e(U) : h(m.display.name)), W = j?.$refs, G = {
|
|
699
|
+
schema: f,
|
|
700
|
+
entity: m,
|
|
701
|
+
entityCode: n,
|
|
702
|
+
recordId: a,
|
|
703
|
+
record: E ? {
|
|
704
|
+
...j,
|
|
705
|
+
...O
|
|
706
|
+
} : j,
|
|
707
|
+
isNew: !1,
|
|
708
|
+
mode: E ? "edit" : "display",
|
|
709
|
+
onFieldChange: E ? R : void 0,
|
|
710
|
+
refs: W,
|
|
711
|
+
objectProperties: fe ?? void 0,
|
|
712
|
+
onSetProperty: v ? (e, t) => N.mutate({
|
|
713
|
+
propertyCode: e,
|
|
714
|
+
value: t
|
|
715
|
+
}) : void 0,
|
|
716
|
+
isPropertyPending: N.isPending,
|
|
717
|
+
objectStatuses: de ?? void 0,
|
|
718
|
+
onSetStatus: v ? (e, t) => M.mutate({
|
|
719
|
+
groupCode: e,
|
|
720
|
+
statusCode: t
|
|
721
|
+
}) : void 0,
|
|
722
|
+
isStatusPending: M.isPending,
|
|
723
|
+
relatedRecordsPresentation: ie
|
|
724
|
+
};
|
|
725
|
+
return /* @__PURE__ */ H("div", {
|
|
726
|
+
style: {
|
|
727
|
+
display: "flex",
|
|
728
|
+
flexDirection: "column",
|
|
729
|
+
height: "100%"
|
|
730
|
+
},
|
|
731
|
+
children: [/* @__PURE__ */ H("div", {
|
|
732
|
+
style: {
|
|
733
|
+
display: "flex",
|
|
734
|
+
alignItems: "center",
|
|
735
|
+
justifyContent: "space-between",
|
|
736
|
+
paddingTop: 10,
|
|
737
|
+
paddingBottom: 10,
|
|
738
|
+
...ee(16),
|
|
739
|
+
borderBottom: "1px solid var(--divider)",
|
|
740
|
+
position: "sticky",
|
|
741
|
+
top: 0,
|
|
742
|
+
background: "var(--surface)",
|
|
743
|
+
zIndex: 10
|
|
744
|
+
},
|
|
745
|
+
children: [/* @__PURE__ */ V("h2", {
|
|
746
|
+
style: {
|
|
747
|
+
margin: 0,
|
|
748
|
+
fontSize: 13,
|
|
749
|
+
fontWeight: 600,
|
|
750
|
+
overflow: "hidden",
|
|
751
|
+
textOverflow: "ellipsis",
|
|
752
|
+
whiteSpace: "nowrap",
|
|
753
|
+
color: "var(--text)"
|
|
754
|
+
},
|
|
755
|
+
children: ve
|
|
756
|
+
}), /* @__PURE__ */ H("div", {
|
|
757
|
+
style: {
|
|
758
|
+
display: "flex",
|
|
759
|
+
alignItems: "center",
|
|
760
|
+
gap: 6
|
|
761
|
+
},
|
|
762
|
+
children: [
|
|
763
|
+
te && /* @__PURE__ */ V(u, {
|
|
764
|
+
icon: /* @__PURE__ */ V(c.back, { size: 14 }),
|
|
765
|
+
title: h("list.detail.back_to_list", "Back to list"),
|
|
766
|
+
onClick: te
|
|
767
|
+
}),
|
|
768
|
+
ne && /* @__PURE__ */ V(u, {
|
|
769
|
+
icon: /* @__PURE__ */ V(c.filter, { size: 14 }),
|
|
770
|
+
title: h("filter.drawer.title", "Filters"),
|
|
771
|
+
onClick: ne
|
|
772
|
+
}),
|
|
773
|
+
v && (E ? /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V(l, {
|
|
774
|
+
size: "xs",
|
|
775
|
+
icon: /* @__PURE__ */ V(c.x, { size: 12 }),
|
|
776
|
+
onClick: me,
|
|
777
|
+
children: h("dialog.cancel", "Cancel")
|
|
778
|
+
}), /* @__PURE__ */ V(l, {
|
|
779
|
+
kind: "primary",
|
|
780
|
+
size: "xs",
|
|
781
|
+
icon: w.isPending ? /* @__PURE__ */ V(p, { size: 12 }) : /* @__PURE__ */ V(c.save, { size: 12 }),
|
|
782
|
+
onClick: I,
|
|
783
|
+
disabled: w.isPending,
|
|
784
|
+
children: w.isPending ? h("dialog.saving", "Saving…") : h("dialog.save", "Save")
|
|
785
|
+
})] }) : /* @__PURE__ */ V(l, {
|
|
786
|
+
size: "xs",
|
|
787
|
+
icon: /* @__PURE__ */ V(c.edit, { size: 12 }),
|
|
788
|
+
onClick: pe,
|
|
789
|
+
children: h("list.record.edit", "Edit")
|
|
790
|
+
}))
|
|
791
|
+
]
|
|
792
|
+
})]
|
|
793
|
+
}), /* @__PURE__ */ V("div", {
|
|
794
|
+
style: {
|
|
795
|
+
flex: 1,
|
|
796
|
+
overflowY: "auto",
|
|
797
|
+
paddingTop: 16,
|
|
798
|
+
paddingBottom: 16,
|
|
799
|
+
...ee(16),
|
|
800
|
+
display: "flex",
|
|
801
|
+
flexDirection: "column",
|
|
802
|
+
gap: 12
|
|
803
|
+
},
|
|
804
|
+
children: o && o.length > 0 ? /* @__PURE__ */ V(ue, {
|
|
805
|
+
nodes: o,
|
|
806
|
+
ctx: G
|
|
807
|
+
}) : /* @__PURE__ */ V("p", {
|
|
808
|
+
style: {
|
|
809
|
+
fontSize: 12.5,
|
|
810
|
+
color: "var(--text-3)"
|
|
811
|
+
},
|
|
812
|
+
children: s(h("list.detail.no_layout", "No layout configured. Add {key} to the screen definition."), { key: /* @__PURE__ */ V("code", { children: _e }) })
|
|
813
|
+
})
|
|
814
|
+
})]
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
//#endregion
|
|
818
|
+
export { U as SmartRecordListPage };
|