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