@declarion/react 0.65.1 → 0.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/api/access-expiry.js +32 -0
- package/dist-lib/api/agents.js +105 -0
- package/dist-lib/api/auth-redirect.js +30 -0
- package/dist-lib/api/auth.js +67 -0
- package/dist-lib/api/batch.js +34 -0
- package/dist-lib/api/client.js +241 -0
- package/dist-lib/api/data.js +122 -0
- package/dist-lib/api/entities.js +160 -0
- package/dist-lib/api/events.js +120 -0
- package/dist-lib/api/fileReferences.js +8 -0
- package/dist-lib/api/params.js +20 -0
- package/dist-lib/api/properties.js +25 -0
- package/dist-lib/api/request-bounds.js +28 -0
- package/dist-lib/api/schema.js +71 -0
- package/dist-lib/api/session-renewal.js +36 -0
- package/dist-lib/api/status.js +17 -0
- package/dist-lib/app.js +262 -0
- package/dist-lib/components/actions/ActionButton.js +116 -0
- package/dist-lib/{ActionDialog-C6EG-AmC.js → components/actions/ActionDialog.js} +63 -53
- package/dist-lib/{ActionResultDialog.impl-BATutW8J.js → components/actions/ActionResultDialog.impl.js} +53 -48
- package/dist-lib/components/actions/ActionResultDialog.js +12 -0
- package/dist-lib/components/actions/ActionRunner.js +274 -0
- package/dist-lib/components/actions/ObjectActionBar.js +127 -0
- package/dist-lib/components/actions/PropertyGridEditor.js +202 -0
- package/dist-lib/components/actions/ResponsiveActionBar.js +773 -0
- package/dist-lib/components/actions/RowActionsKebab.js +90 -0
- package/dist-lib/{AgentChatPanel.impl-D5y_qEex.js → components/agents/AgentChatPanel.impl.js} +314 -362
- package/dist-lib/components/agents/AgentChatPanel.js +12 -0
- package/dist-lib/components/agents/AgentConversationDrawer.js +59 -0
- package/dist-lib/components/agents/AgentElicitForm.js +152 -0
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +7 -0
- package/dist-lib/components/agents/AgentOpenFollower.js +12 -0
- package/dist-lib/components/agents/AgentPicker.js +58 -0
- package/dist-lib/components/agents/transcript-runs.js +52 -0
- package/dist-lib/components/chrome/AssociationTabs.js +176 -0
- package/dist-lib/components/chrome/AuditMetaStrip.js +64 -0
- package/dist-lib/components/chrome/Breadcrumbs.js +67 -0
- package/dist-lib/components/chrome/HighlightsStrip.js +39 -0
- package/dist-lib/{PageHeader-DiwLe7CO.js → components/chrome/PageHeader.js} +19 -15
- package/dist-lib/{PageShell-BJz1MiTH.js → components/chrome/PageShell.js} +3 -3
- package/dist-lib/components/chrome/RecordHeader.js +119 -0
- package/dist-lib/{headerActionZone-bef-tZZ7.js → components/chrome/headerActionZone.js} +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +1244 -0
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +87 -0
- package/dist-lib/components/detail-layout/ChildrenBlock.js +80 -0
- package/dist-lib/components/detail-layout/ChildrenCards.js +156 -0
- package/dist-lib/components/detail-layout/ChildrenList.js +135 -0
- package/dist-lib/components/detail-layout/ChildrenTable.js +189 -0
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +609 -0
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +40 -0
- package/dist-lib/components/detail-layout/DetailHighlights.js +54 -0
- package/dist-lib/{DraggableChildrenTable-Dd5SeuF6.js → components/detail-layout/DraggableChildrenTable.js} +56 -53
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +341 -0
- package/dist-lib/components/detail-layout/ErrorSummary.js +89 -0
- package/dist-lib/components/detail-layout/EvidenceBlock.js +66 -0
- package/dist-lib/{FieldRow-DedGIY9R.js → components/detail-layout/FieldRow.js} +8 -7
- package/dist-lib/components/detail-layout/FieldsBlock.js +74 -0
- package/dist-lib/components/detail-layout/LayoutColumn.js +16 -0
- package/dist-lib/components/detail-layout/LayoutRenderer.js +54 -0
- package/dist-lib/components/detail-layout/LayoutRow.js +83 -0
- package/dist-lib/components/detail-layout/LayoutTabs.js +195 -0
- package/dist-lib/components/detail-layout/PropertiesBlock.js +74 -0
- package/dist-lib/components/detail-layout/QuickAddForm.js +81 -0
- package/dist-lib/components/detail-layout/SectionBlock.js +48 -0
- package/dist-lib/components/detail-layout/StatusesBlock.js +18 -0
- package/dist-lib/components/detail-layout/TimelineComposer.js +205 -0
- package/dist-lib/components/detail-layout/blockMeta.js +27 -0
- package/dist-lib/components/detail-layout/useManualColumnResize.js +94 -0
- package/dist-lib/components/detail-layout/useQuickAdd.js +85 -0
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +295 -0
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +107 -0
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +47 -0
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +36 -0
- package/dist-lib/components/detail-layout/widgets/builtins.js +10 -0
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +32 -0
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +16 -0
- package/dist-lib/components/detail-layout/widgets/registry.js +13 -0
- package/dist-lib/components/fields/BoolField.js +13 -0
- package/dist-lib/components/fields/EmailField.js +16 -0
- package/dist-lib/components/fields/EnumField.js +38 -0
- package/dist-lib/components/fields/FileReferenceField.js +60 -0
- package/dist-lib/components/fields/IntArrayField.js +83 -0
- package/dist-lib/components/fields/JsonField.js +51 -0
- package/dist-lib/components/fields/MultilangArrayField.js +56 -0
- package/dist-lib/components/fields/MultilangField.js +65 -0
- package/dist-lib/components/fields/MultilangTextField.js +65 -0
- package/dist-lib/components/fields/NumberField.js +64 -0
- package/dist-lib/components/fields/PasswordField.js +34 -0
- package/dist-lib/components/fields/PhoneField.js +84 -0
- package/dist-lib/components/fields/RefCombobox.js +112 -0
- package/dist-lib/components/fields/RefField.js +45 -0
- package/dist-lib/components/fields/RichTextField.js +225 -0
- package/dist-lib/components/fields/SecretField.js +34 -0
- package/dist-lib/components/fields/StringArrayField.js +165 -0
- package/dist-lib/components/fields/StringField.js +39 -0
- package/dist-lib/components/fields/StructureField.js +221 -0
- package/dist-lib/components/fields/TextField.js +76 -0
- package/dist-lib/components/fields/TimestampField.js +110 -0
- package/dist-lib/components/fields/UrlField.js +18 -0
- package/dist-lib/components/fields/cells/factories/badge.js +42 -0
- package/dist-lib/components/fields/cells/factories/boolPill.js +17 -0
- package/dist-lib/components/fields/cells/factories/code.js +11 -0
- package/dist-lib/components/fields/cells/factories/date.js +30 -0
- package/dist-lib/components/fields/cells/factories/email.js +26 -0
- package/dist-lib/components/fields/cells/factories/emptyCell.js +10 -0
- package/dist-lib/components/fields/cells/factories/fileReference.js +17 -0
- package/dist-lib/components/fields/cells/factories/host-icons.js +146 -0
- package/dist-lib/components/fields/cells/factories/json.js +61 -0
- package/dist-lib/components/fields/cells/factories/link.js +32 -0
- package/dist-lib/components/fields/cells/factories/markdown.js +31 -0
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +81 -0
- package/dist-lib/components/fields/cells/factories/money.js +37 -0
- package/dist-lib/components/fields/cells/factories/multilangInline.js +35 -0
- package/dist-lib/components/fields/cells/factories/nextRun.js +46 -0
- package/dist-lib/components/fields/cells/factories/number.js +42 -0
- package/dist-lib/components/fields/cells/factories/passwordMask.js +23 -0
- package/dist-lib/components/fields/cells/factories/phone.js +35 -0
- package/dist-lib/components/fields/cells/factories/refLink.js +57 -0
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +34 -0
- package/dist-lib/components/fields/cells/factories/statusPill.js +35 -0
- package/dist-lib/components/fields/cells/factories/tagList.js +44 -0
- package/dist-lib/components/fields/cells/factories/text.js +5 -0
- package/dist-lib/components/fields/cells/factories/timestamp.js +18 -0
- package/dist-lib/components/fields/cells/factories/url-helpers.js +49 -0
- package/dist-lib/components/fields/cells/factories/url.js +45 -0
- package/dist-lib/components/fields/cells/registry.js +58 -0
- package/dist-lib/components/fields/index.js +80 -0
- package/dist-lib/components/fields/langMap.js +6 -0
- package/dist-lib/components/fields/secretValue.js +7 -0
- package/dist-lib/components/file-widgets/CircleImage.js +11 -0
- package/dist-lib/components/file-widgets/DocumentCard.js +277 -0
- package/dist-lib/components/file-widgets/FileList.js +213 -0
- package/dist-lib/{Grid-XUHm5SDe.js → components/file-widgets/Grid.js} +45 -40
- package/dist-lib/components/file-widgets/GridLazy.js +15 -0
- package/dist-lib/components/file-widgets/ImageWidget.js +354 -0
- package/dist-lib/components/file-widgets/LabeledSlots.js +69 -0
- package/dist-lib/components/file-widgets/SquareImage.js +11 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +22 -0
- package/dist-lib/components/file-widgets/UploadFailureText.js +10 -0
- package/dist-lib/components/file-widgets/WideBanner.js +11 -0
- package/dist-lib/components/file-widgets/builtins.js +15 -0
- package/dist-lib/components/file-widgets/cropper.js +13 -0
- package/dist-lib/components/file-widgets/draft-scope.js +59 -0
- package/dist-lib/components/file-widgets/helpers.js +75 -0
- package/dist-lib/components/file-widgets/host.js +75 -0
- package/dist-lib/{payload-DioMoxMX.js → components/file-widgets/payload.js} +14 -14
- package/dist-lib/components/file-widgets/registry.js +13 -0
- package/dist-lib/components/file-widgets/upload.js +180 -0
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +45 -0
- package/dist-lib/components/file-widgets/value.js +12 -0
- package/dist-lib/components/filters/FilterChips.js +123 -0
- package/dist-lib/components/filters/FilterConditionValue.js +40 -0
- package/dist-lib/components/filters/FilterDrawer.js +670 -0
- package/dist-lib/components/filters/FilterOmittedNotice.js +14 -0
- package/dist-lib/components/filters/filter-op-label.js +8 -0
- package/dist-lib/{CommandPalette.impl-DRI5kxVY.js → components/layout/CommandPalette.impl.js} +62 -61
- package/dist-lib/components/layout/CommandPalette.js +12 -0
- package/dist-lib/{DirtyTabsCloseDialog.impl-FhAiOmEb.js → components/layout/DirtyTabsCloseDialog.impl.js} +16 -14
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +12 -0
- package/dist-lib/{ImpersonationBanner.impl--g0iYwcV.js → components/layout/ImpersonationBanner.impl.js} +4 -3
- package/dist-lib/components/layout/ImpersonationBanner.js +12 -0
- package/dist-lib/components/layout/ImpersonationFrame.js +29 -0
- package/dist-lib/{ImpersonationStartModal.impl-BFBN0YJe.js → components/layout/ImpersonationStartModal.impl.js} +9 -9
- package/dist-lib/components/layout/ImpersonationStartModal.js +12 -0
- package/dist-lib/components/layout/Layout.js +755 -0
- package/dist-lib/components/layout/Rail.js +149 -0
- package/dist-lib/components/layout/Sidebar.js +362 -0
- package/dist-lib/components/layout/TabStrip.js +321 -0
- package/dist-lib/components/layout/TenantChip.js +355 -0
- package/dist-lib/components/layout/TopBar.js +305 -0
- package/dist-lib/components/layout/tab-close.js +24 -0
- package/dist-lib/components/list/ColumnPicker.js +112 -0
- package/dist-lib/components/list/InlineEditCell.js +107 -0
- package/dist-lib/components/list/PeekFieldCell.js +143 -0
- package/dist-lib/components/list/QuickPeek.js +263 -0
- package/dist-lib/components/list/ViewSwitcher.js +156 -0
- package/dist-lib/components/list/peekDraftStore.js +14 -0
- package/dist-lib/{AdminCatalogPage.impl-B-7MLqa1.js → components/pages/AdminCatalogPage.impl.js} +53 -49
- package/dist-lib/components/pages/AdminCatalogPage.js +12 -0
- package/dist-lib/components/pages/DocumentsMenu.js +150 -0
- package/dist-lib/components/pages/ExportMenu.js +123 -0
- package/dist-lib/{NotFoundPage.impl-BoX11u-P.js → components/pages/NotFoundPage.impl.js} +6 -4
- package/dist-lib/components/pages/NotFoundPage.js +12 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.js +230 -0
- package/dist-lib/components/pages/RecordNotesPanel.js +200 -0
- package/dist-lib/components/pages/RecordPanels.js +18 -0
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +28 -0
- package/dist-lib/components/pages/SSOCallbackPage.js +12 -0
- package/dist-lib/components/pages/SmartDetailPage.impl.js +986 -0
- package/dist-lib/components/pages/SmartDetailPage.js +12 -0
- package/dist-lib/components/pages/SmartListPage.impl.js +708 -0
- package/dist-lib/components/pages/SmartListPage.js +12 -0
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +818 -0
- package/dist-lib/components/pages/SmartRecordListPage.js +12 -0
- package/dist-lib/components/pages/auth/AuthShell.js +350 -0
- package/dist-lib/{Forgot.impl-6tL6SBlS.js → components/pages/auth/Forgot.impl.js} +13 -12
- package/dist-lib/components/pages/auth/Forgot.js +12 -0
- package/dist-lib/{Reset.impl-D0pjhS6d.js → components/pages/auth/Reset.impl.js} +17 -15
- package/dist-lib/components/pages/auth/Reset.js +12 -0
- package/dist-lib/components/pages/auth/SignIn.js +252 -0
- package/dist-lib/{SignUp.impl-CfEXrUeg.js → components/pages/auth/SignUp.impl.js} +31 -27
- package/dist-lib/components/pages/auth/SignUp.js +12 -0
- package/dist-lib/{TwoFA.impl-B2HtPduH.js → components/pages/auth/TwoFA.impl.js} +9 -8
- package/dist-lib/components/pages/auth/TwoFA.js +12 -0
- package/dist-lib/components/pages/auth/icons.js +56 -0
- package/dist-lib/components/pages/exportRequest.js +17 -0
- package/dist-lib/components/pages/list/DataCell.js +27 -0
- package/dist-lib/components/pages/list/DeleteViewDialog.js +22 -0
- package/dist-lib/{ListCardsBody-BEoYjSZ2.js → components/pages/list/ListCardRow.js} +47 -72
- package/dist-lib/components/pages/list/ListCardsBody.js +31 -0
- package/dist-lib/components/pages/list/ListFloatbar.js +130 -0
- package/dist-lib/components/pages/list/ListFooter.js +138 -0
- package/dist-lib/components/pages/list/ListHeader.js +120 -0
- package/dist-lib/components/pages/list/ListNoRows.js +72 -0
- package/dist-lib/components/pages/list/ListTable.js +191 -0
- package/dist-lib/components/pages/list/ListTableRow.js +37 -0
- package/dist-lib/components/pages/list/ListToolbar.js +261 -0
- package/dist-lib/components/pages/list/ListUrlBanner.js +45 -0
- package/dist-lib/components/pages/list/RowActionsCell.js +49 -0
- package/dist-lib/components/pages/list/RowContextMenu.js +55 -0
- package/dist-lib/components/pages/list/SaveViewDialog.js +111 -0
- package/dist-lib/{SortHeaderMenu-Co5PvhTA.js → components/pages/list/SortHeaderMenu.js} +18 -17
- package/dist-lib/{cardProjection-Cxlogzh8.js → components/pages/list/cardProjection.js} +3 -3
- package/dist-lib/components/pages/list/column-sizing.js +17 -0
- package/dist-lib/components/pages/list/columns.js +168 -0
- package/dist-lib/components/pages/list/filter-meta.js +84 -0
- package/dist-lib/components/pages/list/page-size.js +11 -0
- package/dist-lib/components/pages/list/sortable-header.js +18 -0
- package/dist-lib/components/pages/list/table-features.js +11 -0
- package/dist-lib/components/pages/list/use-filter-value-labels.js +115 -0
- package/dist-lib/components/pages/list/useActiveView.js +98 -0
- package/dist-lib/components/pages/list/useHeaderReorder.js +93 -0
- package/dist-lib/components/pages/list/useListColumnLayout.js +56 -0
- package/dist-lib/components/pages/list/useListFilterPresentation.js +34 -0
- package/dist-lib/components/pages/list/useListQuery.js +101 -0
- package/dist-lib/components/pages/list/useListRowInteraction.js +120 -0
- package/dist-lib/components/pages/list/useListSelection.js +53 -0
- package/dist-lib/components/pages/list/useListSort.js +44 -0
- package/dist-lib/components/pages/list/useListViews.js +148 -0
- package/dist-lib/components/pages/list/useRowMenu.js +106 -0
- package/dist-lib/components/pages/list/visible-filters.js +19 -0
- package/dist-lib/{Preferences.impl-Ct5xwZtT.js → components/pages/profile/Preferences.impl.js} +34 -31
- package/dist-lib/components/pages/profile/Preferences.js +12 -0
- package/dist-lib/components/pages/profile/Profile.impl.js +437 -0
- package/dist-lib/components/pages/profile/Profile.js +12 -0
- package/dist-lib/{TenantParamsPage.impl-BGpdmEZg.js → components/pages/tenant-params/TenantParamsPage.impl.js} +45 -40
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +12 -0
- package/dist-lib/components/params/ParamsBlock.js +119 -0
- package/dist-lib/{param-editors-TYYU7HKK.js → components/params/param-editors.js} +32 -28
- package/dist-lib/components/primitives/Avatar.js +33 -0
- package/dist-lib/components/primitives/BoolToggle.js +35 -0
- package/dist-lib/components/primitives/BrandGlyph.js +38 -0
- package/dist-lib/components/primitives/BrandLogo.js +20 -0
- package/dist-lib/components/primitives/Btn.js +67 -0
- package/dist-lib/{Check-DAfMbQIw.js → components/primitives/Check.js} +2 -2
- package/dist-lib/components/primitives/Chip.js +44 -0
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +15 -0
- package/dist-lib/components/primitives/Dropdown.js +85 -0
- package/dist-lib/components/primitives/Fields.js +751 -0
- package/dist-lib/components/primitives/HoverCard.js +115 -0
- package/dist-lib/components/primitives/IconBtn.js +37 -0
- package/dist-lib/{Icons-lt-7lhYR.js → components/primitives/Icons.js} +1 -1
- package/dist-lib/{Kbd-CNttVu0z.js → components/primitives/Kbd.js} +2 -2
- package/dist-lib/components/primitives/MenuItem.js +57 -0
- package/dist-lib/{Pill-D-wsfRhx.js → components/primitives/Pill.js} +1 -1
- package/dist-lib/{RecordIdBadge-wbigZaFc.js → components/primitives/RecordIdBadge.js} +5 -5
- package/dist-lib/components/primitives/RowField.js +47 -0
- package/dist-lib/{SectionCard-BYHoHWJc.js → components/primitives/SectionCard.js} +10 -10
- package/dist-lib/components/primitives/Spinner.js +31 -0
- package/dist-lib/components/primitives/StatTile.js +108 -0
- package/dist-lib/components/primitives/Tooltip.js +115 -0
- package/dist-lib/{dataTableStyles-vwD1mVOP.js → components/primitives/dataTableStyles.js} +1 -1
- package/dist-lib/components/shared/BlankScreen.js +13 -0
- package/dist-lib/{ChangePasswordDialog.impl-5hDc0wpE.js → components/shared/ChangePasswordDialog.impl.js} +27 -22
- package/dist-lib/{ChangePasswordDialog-C_T_3pjl.js → components/shared/ChangePasswordDialog.js} +2 -2
- package/dist-lib/components/shared/ConfirmDialog.js +129 -0
- package/dist-lib/components/shared/ConnectionNotice.js +12 -0
- package/dist-lib/components/shared/CopyButton.js +25 -0
- package/dist-lib/components/shared/DynamicIcon.js +73 -0
- package/dist-lib/components/shared/EmptyState.js +56 -0
- package/dist-lib/components/shared/ErrorBoundary.js +96 -0
- package/dist-lib/components/shared/LoadingSkeleton.js +117 -0
- package/dist-lib/components/shared/LucideIcon.js +43 -0
- package/dist-lib/components/shared/Markdown.js +15 -0
- package/dist-lib/{MarkdownRenderer-sK2TRZS-.js → components/shared/MarkdownRenderer.js} +10 -9
- package/dist-lib/components/shared/RefreshControl.js +42 -0
- package/dist-lib/components/shared/StatusGroupsDisplay.js +123 -0
- package/dist-lib/components/shared/StatusStepper.js +70 -0
- package/dist-lib/components/shared/toast/DeclarionToast.js +308 -0
- package/dist-lib/components/shared/useOwnRefresh.js +19 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/EmbedAuthBootstrap.js +71 -0
- package/dist-lib/embed/EmbedContext.js +38 -0
- package/dist-lib/embed/EmbedDirtyReporter.js +17 -0
- package/dist-lib/embed/EmbedHistoryTracker.js +17 -0
- package/dist-lib/embed/EmbedLocationReporter.js +26 -0
- package/dist-lib/embed/EmbedResizeReporter.js +25 -0
- package/dist-lib/embed/EmbedUnsavedGuard.js +23 -0
- package/dist-lib/embed/embed-dirty.js +21 -0
- package/dist-lib/embed/embed-history.js +17 -0
- package/dist-lib/embed/embed-nav-guard.js +13 -0
- package/dist-lib/embed/file-src.js +60 -0
- package/dist-lib/embed/handshake.js +37 -0
- package/dist-lib/embed/params.js +45 -0
- package/dist-lib/embed/protocol.js +26 -0
- package/dist-lib/embed/screen-location.js +44 -0
- package/dist-lib/embed/theme.js +11 -0
- package/dist-lib/embed/token.js +54 -0
- package/dist-lib/embed/useEmbedNavigate.js +65 -0
- package/dist-lib/embed/useGlobalLinkInterceptor.js +63 -0
- package/dist-lib/hooks/useActionData.js +58 -0
- package/dist-lib/hooks/useAgentConversation.js +311 -0
- package/dist-lib/hooks/useAggregate.js +18 -0
- package/dist-lib/hooks/useAllEntityData.js +53 -0
- package/dist-lib/hooks/useAssociatedData.js +37 -0
- package/dist-lib/hooks/useAuth.js +56 -0
- package/dist-lib/hooks/useBranding.js +18 -0
- package/dist-lib/hooks/useBrandingChrome.js +58 -0
- package/dist-lib/hooks/useChildrenData.js +33 -0
- package/dist-lib/hooks/useColumns.js +44 -0
- package/dist-lib/hooks/useConnectionNotice.js +35 -0
- package/dist-lib/{useCurrentLocation-Bq1T72AW.js → hooks/useCurrentLocation.js} +2 -2
- package/dist-lib/hooks/useCurrentScreen.js +20 -0
- package/dist-lib/hooks/useCursorEntityData.js +77 -0
- package/dist-lib/hooks/useDebounce.js +11 -0
- package/dist-lib/hooks/useEntity.js +8 -0
- package/dist-lib/hooks/useEntityData.js +64 -0
- package/dist-lib/hooks/useFileReferenceJSON.js +29 -0
- package/dist-lib/hooks/useFilters.js +28 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +84 -0
- package/dist-lib/hooks/useImpersonation.js +40 -0
- package/dist-lib/hooks/useIntentPrefetch.js +43 -0
- package/dist-lib/hooks/useJsonSnapshot.js +8 -0
- package/dist-lib/hooks/useLanguage.js +21 -0
- package/dist-lib/hooks/useLiveObject.js +17 -0
- package/dist-lib/hooks/useLongPress.js +49 -0
- package/dist-lib/hooks/useMutations.js +70 -0
- package/dist-lib/{useObject-B45F96rC.js → hooks/useObject.js} +2 -2
- package/dist-lib/hooks/useObjectStatus.js +20 -0
- package/dist-lib/hooks/usePageState.js +18 -0
- package/dist-lib/hooks/usePageStateRuntime.js +46 -0
- package/dist-lib/hooks/usePageStateTtl.js +10 -0
- package/dist-lib/hooks/useParams.js +123 -0
- package/dist-lib/hooks/useProperties.js +32 -0
- package/dist-lib/hooks/useRealtimeThresholds.js +31 -0
- package/dist-lib/hooks/useRegisterScreenTab.js +28 -0
- package/dist-lib/hooks/useResponsiveMode.js +84 -0
- package/dist-lib/hooks/useSSE.js +307 -0
- package/dist-lib/hooks/useSchema.js +73 -0
- package/dist-lib/hooks/useScreen.js +8 -0
- package/dist-lib/hooks/useScreenBack.js +60 -0
- package/dist-lib/hooks/useScreenTab.js +11 -0
- package/dist-lib/hooks/useTabNavigate.js +82 -0
- package/dist-lib/hooks/useTabSearchMirror.js +19 -0
- package/dist-lib/{useTabTitle-KrzEo118.js → hooks/useTabTitle.js} +9 -7
- package/dist-lib/hooks/useText.js +15 -0
- package/dist-lib/hooks/useTimelineData.js +44 -0
- package/dist-lib/hooks/useUnsavedInput.js +18 -0
- package/dist-lib/hooks/useVersionWatcher.js +62 -0
- package/dist-lib/hooks/useViews.js +88 -0
- package/dist-lib/hooks/useWindowConversation.js +11 -0
- package/dist-lib/icons.js +5 -3
- package/dist-lib/index.d.ts +42 -20
- package/dist-lib/index.js +131 -3926
- package/dist-lib/lib/action-dispatch.js +7 -0
- package/dist-lib/lib/actions.js +279 -0
- package/dist-lib/lib/anchor.js +41 -0
- package/dist-lib/lib/brand-tokens.js +95 -0
- package/dist-lib/lib/branding.js +25 -0
- package/dist-lib/lib/canonical-url.js +17 -0
- package/dist-lib/lib/capabilityPrefetch.js +57 -0
- package/dist-lib/lib/child-config.js +111 -0
- package/dist-lib/lib/children-validation.js +52 -0
- package/dist-lib/lib/decimal-text.js +15 -0
- package/dist-lib/lib/display-value.js +19 -0
- package/dist-lib/lib/document-templates.js +6 -0
- package/dist-lib/lib/download.js +41 -0
- package/dist-lib/lib/evidence-verdict.js +23 -0
- package/dist-lib/lib/failure.js +9 -0
- package/dist-lib/lib/field-classification.js +58 -0
- package/dist-lib/lib/field-regions.js +13 -0
- package/dist-lib/lib/filter-evaluator.js +98 -0
- package/dist-lib/lib/filters.js +118 -0
- package/dist-lib/lib/format-count.js +24 -0
- package/dist-lib/lib/html-state.js +9 -0
- package/dist-lib/lib/language.js +52 -0
- package/dist-lib/lib/longPressGesture.js +34 -0
- package/dist-lib/lib/mass-edit.js +65 -0
- package/dist-lib/{page-inset-D_kkVwwN.js → lib/page-inset.js} +1 -1
- package/dist-lib/lib/phone.js +28 -0
- package/dist-lib/lib/query-retry.js +7 -0
- package/dist-lib/lib/quick-add.js +23 -0
- package/dist-lib/lib/realtime-query-keys.js +23 -0
- package/dist-lib/lib/realtime-reconcile.js +148 -0
- package/dist-lib/lib/realtime-resync.js +192 -0
- package/dist-lib/lib/record-documents-key.js +4 -0
- package/dist-lib/lib/ref-choices.js +6 -0
- package/dist-lib/lib/refetch-when-idle.js +25 -0
- package/dist-lib/lib/rich-text.js +46 -0
- package/dist-lib/lib/rowClickGesture.js +10 -0
- package/dist-lib/lib/safe-url.js +34 -0
- package/dist-lib/lib/schema-routing.js +51 -0
- package/dist-lib/{screen-back-BtbEp5sO.js → lib/screen-back.js} +2 -2
- package/dist-lib/lib/scroll-restoration.js +156 -0
- package/dist-lib/lib/size-value.js +22 -0
- package/dist-lib/lib/sort.js +59 -0
- package/dist-lib/lib/timestamp.js +97 -0
- package/dist-lib/lib/toast.js +78 -0
- package/dist-lib/lib/ui-actions.js +81 -0
- package/dist-lib/{utils-D_QDpB8_.js → lib/utils.js} +1 -1
- package/dist-lib/lib/variants.js +63 -0
- package/dist-lib/lib/versionTracker.js +102 -0
- package/dist-lib/lib/viewport-category.js +12 -0
- package/dist-lib/{window-election-CHIvIZwx.js → lib/window-election.js} +1 -1
- package/dist-lib/stores/auth.js +84 -0
- package/dist-lib/stores/icon-registry.js +24 -0
- package/dist-lib/stores/list-layout.js +178 -0
- package/dist-lib/{page-state-eA6J_KIR.js → stores/page-state.js} +1 -1
- package/dist-lib/stores/preferences.js +126 -0
- package/dist-lib/stores/realtime.js +115 -0
- package/dist-lib/stores/screen-registry.js +10 -0
- package/dist-lib/stores/tabs.js +220 -0
- package/dist-lib/test/seed-schema.js +8 -0
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +80 -76
- package/dist-lib/types/api.js +48 -0
- package/dist-lib/types/fieldType.js +4 -0
- package/dist-lib/types/ordmap.js +50 -0
- package/dist-lib/types/schema.js +173 -0
- package/dist-lib/{useResponsiveMode-DIR1bZfo.d.ts → useResponsiveMode-DmrpMbZX.d.ts} +44 -16
- package/package.json +13 -12
- package/dist-lib/ActionRunner-DdBFhqGe.js +0 -1440
- package/dist-lib/AgentOpenFollower.impl-BAs_wGEZ.js +0 -81
- package/dist-lib/AssociatedBlock-BOoPLOjw.js +0 -1515
- package/dist-lib/AuthShell-C8aVwHS7.js +0 -361
- package/dist-lib/BlankScreen-DVc7fh8C.js +0 -61
- package/dist-lib/CopyButton-DRIT_f0k.js +0 -119
- package/dist-lib/DynamicIcon-DuBSz6TZ.js +0 -133
- package/dist-lib/FilterChips-Cv1tlXyo.js +0 -1031
- package/dist-lib/LayoutRenderer-d-tXYPze.js +0 -3239
- package/dist-lib/MenuItem-CfkVXPvC.js +0 -140
- package/dist-lib/MonacoJson-BG3S3GHX.js +0 -60
- package/dist-lib/Profile.impl-Cypk27ah.js +0 -527
- package/dist-lib/PropertyGridEditor-XrP6TZ5s.js +0 -4378
- package/dist-lib/RecordHeader-BfQ0_4wq.js +0 -217
- package/dist-lib/RefreshControl-CRdWPoF5.js +0 -195
- package/dist-lib/SSOCallbackPage.impl-Cfi2pQ59.js +0 -31
- package/dist-lib/SmartDetailPage.impl-BiIX0n7K.js +0 -1609
- package/dist-lib/SmartListPage.impl-Cu83Gv_G.js +0 -2818
- package/dist-lib/SmartRecordListPage.impl-DR6lq7HA.js +0 -795
- package/dist-lib/format-count-lyB4CPen.js +0 -943
- package/dist-lib/peekDraftStore-CaimrOhW.js +0 -200
- package/dist-lib/registry-CGe5kCXN.js +0 -119
- package/dist-lib/use-filter-value-labels-D3YDgUzg.js +0 -413
- package/dist-lib/useAgentConversation-rru-7hnF.js +0 -612
- package/dist-lib/useBranding-zcxEic2k.js +0 -41
- package/dist-lib/useBrandingChrome-bxaR3G1R.js +0 -170
- package/dist-lib/useCurrentScreen-BZOHBGQZ.js +0 -2522
- package/dist-lib/useImpersonation-DBIRRR70.js +0 -35
- package/dist-lib/useOwnRefresh-DJjaje52.js +0 -435
- package/dist-lib/useParams-BFLJi4n3.js +0 -133
- package/dist-lib/useProperties-B7opZ-iy.js +0 -81
- package/dist-lib/useScreenBack-DENlz844.js +0 -71
- package/dist-lib/useTabNavigate-CUqOmcMj.js +0 -78
- package/dist-lib/value-BuQVYx52.js +0 -194
- package/dist-lib/variants-vUtfBbE6.js +0 -1961
- /package/dist-lib/{JsonEditor-Dz1PQHC8.js → components/fields/JsonEditor.js} +0 -0
|
@@ -0,0 +1,1244 @@
|
|
|
1
|
+
import { OrderedMap as e } from "../../types/ordmap.js";
|
|
2
|
+
import { coerceDisplayString as t } from "../../lib/display-value.js";
|
|
3
|
+
import { entityAllowsMutation as n, extractPkValues as r, fieldDisplayName as i, getPrimaryKeyFields as a, resolveDetailRoute as o } from "../../types/schema.js";
|
|
4
|
+
import { Icon as s } from "../primitives/Icons.js";
|
|
5
|
+
import { Btn as c } from "../primitives/Btn.js";
|
|
6
|
+
import { IconBtn as l } from "../primitives/IconBtn.js";
|
|
7
|
+
import { useText as u } from "../../hooks/useText.js";
|
|
8
|
+
import { SectionCard as d } from "../primitives/SectionCard.js";
|
|
9
|
+
import { useResponsiveMode as f } from "../../hooks/useResponsiveMode.js";
|
|
10
|
+
import { Spinner as p } from "../primitives/Spinner.js";
|
|
11
|
+
import { DynamicIcon as m } from "../shared/DynamicIcon.js";
|
|
12
|
+
import { buildActionBody as h, createEntity as g, deleteObject as _, encodeObjectId as v, executeAction as y, updateEntity as b } from "../../api/data.js";
|
|
13
|
+
import { failureTitle as x } from "../../lib/failure.js";
|
|
14
|
+
import { useTabNavigate as S } from "../../hooks/useTabNavigate.js";
|
|
15
|
+
import { applyRowState as C, defaultFlatForSlot as w } from "../../lib/actions.js";
|
|
16
|
+
import { ENTITY_CHILDREN_KEY as T, useChildrenData as E } from "../../hooks/useChildrenData.js";
|
|
17
|
+
import { useActionRunner as D } from "../actions/ActionRunner.js";
|
|
18
|
+
import { renderField as O } from "../fields/index.js";
|
|
19
|
+
import { dispatchAction as k } from "../../lib/action-dispatch.js";
|
|
20
|
+
import { ResponsiveActionBar as A } from "../actions/ResponsiveActionBar.js";
|
|
21
|
+
import { dataTableCellStyle as j, dataTableHeadCellStyle as M, dataTableStyle as N } from "../primitives/dataTableStyles.js";
|
|
22
|
+
import { useAssociatedData as P } from "../../hooks/useAssociatedData.js";
|
|
23
|
+
import { ActionButton as F } from "../actions/ActionButton.js";
|
|
24
|
+
import { RowActionsKebab as I } from "../actions/RowActionsKebab.js";
|
|
25
|
+
import { AssociatedToolbar as L } from "./AssociatedToolbar.js";
|
|
26
|
+
import { useCallback as R, useEffect as ee, useId as z, useMemo as B, useRef as V, useState as H } from "react";
|
|
27
|
+
import { useQueryClient as U } from "@tanstack/react-query";
|
|
28
|
+
import { Fragment as te, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
29
|
+
//#region src/components/detail-layout/AssociatedBlock.tsx
|
|
30
|
+
function ne(e) {
|
|
31
|
+
if (!e) return [];
|
|
32
|
+
let t = [];
|
|
33
|
+
for (let [n, r] of Object.entries(e)) (r.visibility ?? []).includes("list_row") && (r.association || r.href || n.startsWith("__") || t.push({
|
|
34
|
+
code: n,
|
|
35
|
+
action: r
|
|
36
|
+
}));
|
|
37
|
+
return t;
|
|
38
|
+
}
|
|
39
|
+
function K(t, n, r) {
|
|
40
|
+
if (!t) return [];
|
|
41
|
+
let i = [];
|
|
42
|
+
for (let [a, o] of Object.entries(t)) {
|
|
43
|
+
if (!(o.visibility ?? []).includes("list_toolbar") || o.association || a.startsWith("__")) continue;
|
|
44
|
+
let t = {
|
|
45
|
+
...o,
|
|
46
|
+
resolved_hidden_defaults: {
|
|
47
|
+
...o.resolved_hidden_defaults ?? {},
|
|
48
|
+
[n]: r
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
if (o.resolved_params?.has(n)) {
|
|
52
|
+
let r = o.resolved_params.items().filter((e) => e.name !== n);
|
|
53
|
+
t = {
|
|
54
|
+
...t,
|
|
55
|
+
resolved_params: new e(r)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
i.push({
|
|
59
|
+
code: a,
|
|
60
|
+
action: t
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return i;
|
|
64
|
+
}
|
|
65
|
+
function re(e, t, n) {
|
|
66
|
+
let r = e[n];
|
|
67
|
+
if (!r) return null;
|
|
68
|
+
let i = e[t], a = i?.children?.find((e) => e.entity === n);
|
|
69
|
+
if (a) {
|
|
70
|
+
let e = a.foreign_key;
|
|
71
|
+
if (typeof e == "string") return e;
|
|
72
|
+
if (Array.isArray(e) && e.length === 1) return e[0];
|
|
73
|
+
}
|
|
74
|
+
let o = i?.table;
|
|
75
|
+
for (let [n, i] of r.fields) {
|
|
76
|
+
let r = i.ref?.entity;
|
|
77
|
+
if (r) {
|
|
78
|
+
if (r === t) return n;
|
|
79
|
+
if (o) {
|
|
80
|
+
let t = e[r]?.table;
|
|
81
|
+
if (t && t === o) return n;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
function ie(e, t, n) {
|
|
88
|
+
let r = new Set(a(e));
|
|
89
|
+
return new Set(t.filter((t) => {
|
|
90
|
+
if (t === n || r.has(t)) return !1;
|
|
91
|
+
let i = e.fields.get(t);
|
|
92
|
+
return !(!i || i.auto || i.primary || i.source);
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
function ae(e, t, n) {
|
|
96
|
+
return new Set(t.filter((t) => {
|
|
97
|
+
if (t === n) return !1;
|
|
98
|
+
let r = e.fields.get(t);
|
|
99
|
+
return !(!r || r.auto);
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
function oe(e, t, n, r) {
|
|
103
|
+
let i = [];
|
|
104
|
+
for (let a of t) {
|
|
105
|
+
let t = n.fields.get(a);
|
|
106
|
+
if (!t || !t.required || t.auto || t.generate || t.primary || a === r || n.tenant_key && a === n.tenant_key) continue;
|
|
107
|
+
let o = e[a];
|
|
108
|
+
(o == null || o === "") && i.push(a);
|
|
109
|
+
}
|
|
110
|
+
return i;
|
|
111
|
+
}
|
|
112
|
+
function q({ node: e, ctx: t }) {
|
|
113
|
+
let n = u("errors"), r = e.associated;
|
|
114
|
+
if (!r || t.isNew) return null;
|
|
115
|
+
let i = t.schema.entities[r];
|
|
116
|
+
if (!i) return /* @__PURE__ */ G("div", {
|
|
117
|
+
style: {
|
|
118
|
+
fontSize: 12.5,
|
|
119
|
+
color: "var(--text-3)",
|
|
120
|
+
padding: "8px 0"
|
|
121
|
+
},
|
|
122
|
+
children: [
|
|
123
|
+
n("record.related_entity_not_found", "The related record type is not declared in this deployment."),
|
|
124
|
+
" ",
|
|
125
|
+
/* @__PURE__ */ W("code", { children: r })
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
let a = e.foreign_key ?? re(t.schema.entities, t.entityCode, r);
|
|
129
|
+
return a ? /* @__PURE__ */ W(J, {
|
|
130
|
+
node: e,
|
|
131
|
+
ctx: t,
|
|
132
|
+
assocCode: r,
|
|
133
|
+
assocEntity: i,
|
|
134
|
+
fkField: a
|
|
135
|
+
}) : /* @__PURE__ */ G("div", {
|
|
136
|
+
style: {
|
|
137
|
+
fontSize: 12.5,
|
|
138
|
+
color: "var(--text-3)",
|
|
139
|
+
padding: "8px 0"
|
|
140
|
+
},
|
|
141
|
+
children: [
|
|
142
|
+
n("record.associated_foreign_key_not_found", "No foreign key joins these two entities."),
|
|
143
|
+
" ",
|
|
144
|
+
r,
|
|
145
|
+
" → ",
|
|
146
|
+
t.entityCode
|
|
147
|
+
]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function J({ node: e, ctx: t, assocCode: r, assocEntity: i, fkField: a }) {
|
|
151
|
+
let o = u(), l = u("errors"), f = e.columns && e.columns.length > 0 ? e.columns.filter((e) => e !== a && !!i.fields.get(e)) : i.fields.names().filter((e) => {
|
|
152
|
+
if (e === a) return !1;
|
|
153
|
+
let t = i.fields.get(e);
|
|
154
|
+
return !(!t || t.primary || t.display?.is_listable === !1);
|
|
155
|
+
}), p = n(i, "update"), g = e.interaction ?? "navigate", _ = (g === "inline_edit" || g === "row_edit") && p && e.editable !== !1, v = o(i.display?.name_plural) || o(i.display?.name) || r, b = e.searchable === !0 || e.filters && e.filters.length > 0, x = B(() => K(i.actions, a, t.recordId), [
|
|
156
|
+
i.actions,
|
|
157
|
+
a,
|
|
158
|
+
t.recordId
|
|
159
|
+
]), T = B(() => {
|
|
160
|
+
let e = {};
|
|
161
|
+
for (let { code: t, action: n } of x) e[t] = n;
|
|
162
|
+
return e;
|
|
163
|
+
}, [x]), E = B(() => {
|
|
164
|
+
let e = i.action_layout ?? null;
|
|
165
|
+
return C(o, e ?? w(T, "list_toolbar"), T, void 0, {}, []);
|
|
166
|
+
}, [
|
|
167
|
+
o,
|
|
168
|
+
i.action_layout,
|
|
169
|
+
T
|
|
170
|
+
]), { run: O } = D(), j = S(), M = B(() => ({
|
|
171
|
+
entity: i,
|
|
172
|
+
entityCode: r,
|
|
173
|
+
screenRoute: typeof window < "u" ? window.location.pathname : "",
|
|
174
|
+
selectedRows: [],
|
|
175
|
+
selectedIds: [],
|
|
176
|
+
t: o,
|
|
177
|
+
tabNavigate: (e, t) => j(e, {
|
|
178
|
+
title: t?.title,
|
|
179
|
+
icon: t?.icon,
|
|
180
|
+
search: t?.search
|
|
181
|
+
}),
|
|
182
|
+
runActionApi: (e, t) => y(e, t)
|
|
183
|
+
}), [
|
|
184
|
+
i,
|
|
185
|
+
r,
|
|
186
|
+
o,
|
|
187
|
+
j
|
|
188
|
+
]), N = U(), P = R(() => {
|
|
189
|
+
N.invalidateQueries({ predicate: (e) => {
|
|
190
|
+
let t = e.queryKey;
|
|
191
|
+
return t[0] === "entity-children" && t[3] === r;
|
|
192
|
+
} });
|
|
193
|
+
}, [N, r]), I = R((e, t) => {
|
|
194
|
+
let n = k(l, e, t, {}, r);
|
|
195
|
+
if (n !== null) return O({
|
|
196
|
+
action: t,
|
|
197
|
+
title: o(t.display?.name) || e,
|
|
198
|
+
execute: async (e) => {
|
|
199
|
+
let t = await y(n, h(e, void 0));
|
|
200
|
+
return P(), t;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}, [
|
|
204
|
+
o,
|
|
205
|
+
l,
|
|
206
|
+
O,
|
|
207
|
+
r,
|
|
208
|
+
P
|
|
209
|
+
]), [L, ee] = H(0), z = /* @__PURE__ */ G("div", {
|
|
210
|
+
style: {
|
|
211
|
+
display: "flex",
|
|
212
|
+
alignItems: "center",
|
|
213
|
+
gap: 6,
|
|
214
|
+
flex: "1 1 auto",
|
|
215
|
+
minWidth: 0,
|
|
216
|
+
justifyContent: "flex-end"
|
|
217
|
+
},
|
|
218
|
+
children: [i.action_layout ? E.length > 0 && /* @__PURE__ */ W(A, {
|
|
219
|
+
kind: "toolbar",
|
|
220
|
+
layout: E,
|
|
221
|
+
entityActions: T,
|
|
222
|
+
onRun: I,
|
|
223
|
+
widgetContext: M,
|
|
224
|
+
ariaLabel: o("record.associated.toolbar_actions", "{name} toolbar actions", { name: v })
|
|
225
|
+
}) : x.map(({ code: e, action: t }) => /* @__PURE__ */ W(F, {
|
|
226
|
+
actionCode: e,
|
|
227
|
+
action: t,
|
|
228
|
+
entityCode: r,
|
|
229
|
+
variant: "ghost",
|
|
230
|
+
size: "sm",
|
|
231
|
+
onSuccess: P
|
|
232
|
+
}, e)), _ && /* @__PURE__ */ W(c, {
|
|
233
|
+
kind: "ghost",
|
|
234
|
+
size: "xs",
|
|
235
|
+
icon: /* @__PURE__ */ W(s.plus, { size: 12 }),
|
|
236
|
+
onClick: () => ee((e) => e + 1),
|
|
237
|
+
children: o("record.row.add", "Add row")
|
|
238
|
+
})]
|
|
239
|
+
}), V = b ? /* @__PURE__ */ W(se, {
|
|
240
|
+
entityCode: r,
|
|
241
|
+
entity: i,
|
|
242
|
+
parentEntity: t.entityCode,
|
|
243
|
+
parentId: t.recordId,
|
|
244
|
+
foreignKey: a,
|
|
245
|
+
columns: f,
|
|
246
|
+
editable: _,
|
|
247
|
+
interaction: g,
|
|
248
|
+
ctx: t,
|
|
249
|
+
searchable: e.searchable,
|
|
250
|
+
filterFields: e.filters,
|
|
251
|
+
sort: e.sort,
|
|
252
|
+
startDraftSignal: L
|
|
253
|
+
}) : /* @__PURE__ */ W(Y, {
|
|
254
|
+
entityCode: r,
|
|
255
|
+
entity: i,
|
|
256
|
+
parentEntity: t.entityCode,
|
|
257
|
+
parentId: t.recordId,
|
|
258
|
+
foreignKey: a,
|
|
259
|
+
columns: f,
|
|
260
|
+
editable: _,
|
|
261
|
+
interaction: g,
|
|
262
|
+
ctx: t,
|
|
263
|
+
sort: e.sort,
|
|
264
|
+
startDraftSignal: L
|
|
265
|
+
});
|
|
266
|
+
return t.withinCard ? /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("div", {
|
|
267
|
+
style: {
|
|
268
|
+
display: "flex",
|
|
269
|
+
justifyContent: "flex-end",
|
|
270
|
+
marginBottom: 8
|
|
271
|
+
},
|
|
272
|
+
children: z
|
|
273
|
+
}), V] }) : /* @__PURE__ */ W(d, {
|
|
274
|
+
title: v,
|
|
275
|
+
icon: i.display?.icon ? /* @__PURE__ */ W(m, {
|
|
276
|
+
name: i.display.icon,
|
|
277
|
+
size: 14
|
|
278
|
+
}) : void 0,
|
|
279
|
+
right: z,
|
|
280
|
+
children: V
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
function Y({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: c, sort: l, startDraftSignal: u }) {
|
|
284
|
+
let d = U(), { data: f, isLoading: p, isError: m } = E(n, r, e, i, l), h = f?.data ?? [], g = f?.$refs, _ = R(() => {
|
|
285
|
+
d.invalidateQueries({ queryKey: [
|
|
286
|
+
T,
|
|
287
|
+
n,
|
|
288
|
+
r,
|
|
289
|
+
e
|
|
290
|
+
] });
|
|
291
|
+
}, [
|
|
292
|
+
d,
|
|
293
|
+
n,
|
|
294
|
+
r,
|
|
295
|
+
e
|
|
296
|
+
]);
|
|
297
|
+
return /* @__PURE__ */ W(X, {
|
|
298
|
+
entityCode: e,
|
|
299
|
+
entity: t,
|
|
300
|
+
parentId: r,
|
|
301
|
+
foreignKey: i,
|
|
302
|
+
columns: a,
|
|
303
|
+
editable: o,
|
|
304
|
+
interaction: s,
|
|
305
|
+
ctx: c,
|
|
306
|
+
rows: h,
|
|
307
|
+
refs: g,
|
|
308
|
+
isLoading: p,
|
|
309
|
+
isError: m,
|
|
310
|
+
invalidateQuery: _,
|
|
311
|
+
startDraftSignal: u
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
function se({ entityCode: e, entity: t, parentEntity: n, parentId: r, foreignKey: i, columns: a, editable: o, interaction: s, ctx: l, searchable: d, filterFields: f, sort: m, startDraftSignal: h }) {
|
|
315
|
+
let g = u(), _ = U(), [v, y] = H(""), [b, x] = H(""), [S, C] = H({}), w = V(void 0);
|
|
316
|
+
ee(() => (w.current && clearTimeout(w.current), w.current = setTimeout(() => {
|
|
317
|
+
x(v);
|
|
318
|
+
}, 300), () => {
|
|
319
|
+
w.current && clearTimeout(w.current);
|
|
320
|
+
}), [v]);
|
|
321
|
+
let T = R((e, t) => {
|
|
322
|
+
C((n) => {
|
|
323
|
+
if (t === "__all__") {
|
|
324
|
+
let { [e]: t, ...r } = n;
|
|
325
|
+
return r;
|
|
326
|
+
}
|
|
327
|
+
return {
|
|
328
|
+
...n,
|
|
329
|
+
[e]: t
|
|
330
|
+
};
|
|
331
|
+
});
|
|
332
|
+
}, []), E = B(() => Object.keys(S).length > 0 ? S : void 0, [S]), { data: D, isLoading: O, isError: k, hasNextPage: A, fetchNextPage: j, isFetchingNextPage: M } = P(n, r, e, i, m, void 0, b || void 0, E), { rows: N, refs: F } = B(() => {
|
|
333
|
+
if (!D?.pages) return {
|
|
334
|
+
rows: [],
|
|
335
|
+
refs: void 0
|
|
336
|
+
};
|
|
337
|
+
let e = [], t;
|
|
338
|
+
for (let n of D.pages) if (e.push(...n.data), n.$refs) {
|
|
339
|
+
if (!t) t = { ...n.$refs };
|
|
340
|
+
else for (let [e, r] of Object.entries(n.$refs)) t[e] = {
|
|
341
|
+
...t[e],
|
|
342
|
+
...r
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
return {
|
|
346
|
+
rows: e,
|
|
347
|
+
refs: t
|
|
348
|
+
};
|
|
349
|
+
}, [D]), I = R(() => {
|
|
350
|
+
_.invalidateQueries({ predicate: (t) => {
|
|
351
|
+
let n = t.queryKey;
|
|
352
|
+
return n[0] === "entity-children" && n[3] === e;
|
|
353
|
+
} });
|
|
354
|
+
}, [_, e]);
|
|
355
|
+
return /* @__PURE__ */ G("div", { children: [
|
|
356
|
+
/* @__PURE__ */ W(L, {
|
|
357
|
+
entity: t,
|
|
358
|
+
searchable: d,
|
|
359
|
+
filterFields: f,
|
|
360
|
+
searchValue: v,
|
|
361
|
+
onSearchChange: y,
|
|
362
|
+
filters: S,
|
|
363
|
+
onFilterChange: T,
|
|
364
|
+
allEntities: l.schema.entities
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ W(X, {
|
|
367
|
+
entityCode: e,
|
|
368
|
+
entity: t,
|
|
369
|
+
parentId: r,
|
|
370
|
+
foreignKey: i,
|
|
371
|
+
columns: a,
|
|
372
|
+
editable: o,
|
|
373
|
+
interaction: s,
|
|
374
|
+
ctx: l,
|
|
375
|
+
rows: N,
|
|
376
|
+
refs: F,
|
|
377
|
+
isLoading: O,
|
|
378
|
+
isError: k,
|
|
379
|
+
invalidateQuery: I,
|
|
380
|
+
startDraftSignal: h
|
|
381
|
+
}),
|
|
382
|
+
A && /* @__PURE__ */ W("div", {
|
|
383
|
+
style: { marginTop: 4 },
|
|
384
|
+
children: /* @__PURE__ */ W(c, {
|
|
385
|
+
kind: "ghost",
|
|
386
|
+
size: "xs",
|
|
387
|
+
icon: M ? /* @__PURE__ */ W(p, { size: 12 }) : void 0,
|
|
388
|
+
onClick: () => j(),
|
|
389
|
+
disabled: M,
|
|
390
|
+
children: g("record.associated.load_more", "Load more")
|
|
391
|
+
})
|
|
392
|
+
})
|
|
393
|
+
] });
|
|
394
|
+
}
|
|
395
|
+
function X({ entityCode: e, entity: t, parentId: n, foreignKey: a, columns: s, editable: c, interaction: l, ctx: d, rows: p, refs: m, isLoading: h, isError: y, invalidateQuery: S, startDraftSignal: C }) {
|
|
396
|
+
let w = u(), T = u("errors"), E = f(), O = E.isPhone && d.relatedRecordsPresentation === "table", k = s.find((e) => e !== a), A = B(() => l === "navigate" ? o(void 0, t, d.schema.screens) : null, [
|
|
397
|
+
l,
|
|
398
|
+
t,
|
|
399
|
+
d.schema.screens
|
|
400
|
+
]), j = B(() => c ? ie(t, s, a) : /* @__PURE__ */ new Set(), [
|
|
401
|
+
s,
|
|
402
|
+
a,
|
|
403
|
+
t,
|
|
404
|
+
c
|
|
405
|
+
]), P = B(() => ae(t, s, a), [
|
|
406
|
+
s,
|
|
407
|
+
a,
|
|
408
|
+
t
|
|
409
|
+
]), F = B(() => {
|
|
410
|
+
let e = /* @__PURE__ */ new Map();
|
|
411
|
+
for (let n of p) {
|
|
412
|
+
let i = r(t, n);
|
|
413
|
+
e.set(v(i), i);
|
|
414
|
+
}
|
|
415
|
+
return e;
|
|
416
|
+
}, [p, t]), I = B(() => {
|
|
417
|
+
let e = /* @__PURE__ */ new Map();
|
|
418
|
+
for (let n of p) {
|
|
419
|
+
let i = n.$row_version;
|
|
420
|
+
typeof i == "string" && i !== "" && e.set(v(r(t, n)), i);
|
|
421
|
+
}
|
|
422
|
+
return e;
|
|
423
|
+
}, [p, t]), L = B(() => ne(t.actions), [t.actions]), [z, U] = H(null), [te, K] = H(null), [re, q] = H([]), [J, Y] = H({}), se = V(J);
|
|
424
|
+
se.current = J;
|
|
425
|
+
let X = V({});
|
|
426
|
+
ee(() => {
|
|
427
|
+
let e = X.current;
|
|
428
|
+
return () => {
|
|
429
|
+
for (let t of Object.values(e)) clearTimeout(t);
|
|
430
|
+
};
|
|
431
|
+
}, []);
|
|
432
|
+
let [Z, Q] = H(null), [fe, $] = H([]), [pe, me] = H(!1), { run: he } = D(), [ge, _e] = H(/* @__PURE__ */ new Set()), ve = R(async (t, n, r) => {
|
|
433
|
+
Y((e) => ({
|
|
434
|
+
...e,
|
|
435
|
+
[t]: {
|
|
436
|
+
...e[t],
|
|
437
|
+
saving: !0,
|
|
438
|
+
error: void 0
|
|
439
|
+
}
|
|
440
|
+
}));
|
|
441
|
+
try {
|
|
442
|
+
let i = I.get(t), a = i ? {
|
|
443
|
+
...n,
|
|
444
|
+
$row_version: i
|
|
445
|
+
} : n;
|
|
446
|
+
return await b(e, F.get(t) ?? t, a), Y((e) => {
|
|
447
|
+
let n = e[t];
|
|
448
|
+
if (!n) return e;
|
|
449
|
+
if (n.ver > r) return {
|
|
450
|
+
...e,
|
|
451
|
+
[t]: {
|
|
452
|
+
...n,
|
|
453
|
+
saving: !1
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
let { [t]: i, ...a } = e;
|
|
457
|
+
return a;
|
|
458
|
+
}), S(), !0;
|
|
459
|
+
} catch (e) {
|
|
460
|
+
let n = x(T, e);
|
|
461
|
+
return Y((e) => ({
|
|
462
|
+
...e,
|
|
463
|
+
[t]: {
|
|
464
|
+
...e[t],
|
|
465
|
+
saving: !1,
|
|
466
|
+
error: n
|
|
467
|
+
}
|
|
468
|
+
})), !1;
|
|
469
|
+
}
|
|
470
|
+
}, [
|
|
471
|
+
e,
|
|
472
|
+
T,
|
|
473
|
+
S,
|
|
474
|
+
F,
|
|
475
|
+
I
|
|
476
|
+
]), ye = R((e, t, n) => {
|
|
477
|
+
Y((r) => {
|
|
478
|
+
let i = r[e] ?? {
|
|
479
|
+
buffer: {},
|
|
480
|
+
ver: 0,
|
|
481
|
+
saving: !1
|
|
482
|
+
}, a = i.ver + 1;
|
|
483
|
+
return {
|
|
484
|
+
...r,
|
|
485
|
+
[e]: {
|
|
486
|
+
...i,
|
|
487
|
+
buffer: {
|
|
488
|
+
...i.buffer,
|
|
489
|
+
[t]: n
|
|
490
|
+
},
|
|
491
|
+
ver: a
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
}), l === "inline_edit" && (X.current[e] && clearTimeout(X.current[e]), X.current[e] = setTimeout(() => {
|
|
495
|
+
let t = se.current[e];
|
|
496
|
+
t && Object.keys(t.buffer).length > 0 && ve(e, { ...t.buffer }, t.ver);
|
|
497
|
+
}, 500));
|
|
498
|
+
}, [ve, l]), be = R(() => {
|
|
499
|
+
let e = {};
|
|
500
|
+
e[a] = n;
|
|
501
|
+
for (let n of s) {
|
|
502
|
+
let r = t.fields.get(n);
|
|
503
|
+
r && (r.default === void 0 ? r.type === "bool" && (e[n] = !1) : e[n] = r.default);
|
|
504
|
+
}
|
|
505
|
+
Q(e), $([]);
|
|
506
|
+
}, [
|
|
507
|
+
a,
|
|
508
|
+
n,
|
|
509
|
+
s,
|
|
510
|
+
t.fields
|
|
511
|
+
]), xe = V(C);
|
|
512
|
+
ee(() => {
|
|
513
|
+
C !== void 0 && C !== xe.current && (xe.current = C, !Z && be());
|
|
514
|
+
}, [
|
|
515
|
+
C,
|
|
516
|
+
Z,
|
|
517
|
+
be
|
|
518
|
+
]);
|
|
519
|
+
let Se = R(async () => {
|
|
520
|
+
if (!Z) return;
|
|
521
|
+
let n = oe(Z, s, t, a);
|
|
522
|
+
if (n.length > 0) $(n);
|
|
523
|
+
else {
|
|
524
|
+
me(!0);
|
|
525
|
+
try {
|
|
526
|
+
await g(e, Z), Q(null), $([]), S();
|
|
527
|
+
} catch (e) {
|
|
528
|
+
let t = x(T, e);
|
|
529
|
+
$([`_error:${t}`]);
|
|
530
|
+
} finally {
|
|
531
|
+
me(!1);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}, [
|
|
535
|
+
Z,
|
|
536
|
+
s,
|
|
537
|
+
t,
|
|
538
|
+
a,
|
|
539
|
+
e,
|
|
540
|
+
T,
|
|
541
|
+
S
|
|
542
|
+
]), Ce = R((e) => {
|
|
543
|
+
Y({}), q([]), K(e);
|
|
544
|
+
}, []), we = R(async (e) => {
|
|
545
|
+
let n = se.current[e], i = n?.buffer ?? {};
|
|
546
|
+
if (Object.keys(i).length === 0) {
|
|
547
|
+
K(null), q([]);
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
let o = oe({
|
|
551
|
+
...p.find((n) => v(r(t, n)) === e) ?? {},
|
|
552
|
+
...i
|
|
553
|
+
}, s, t, a);
|
|
554
|
+
o.length > 0 ? q(o) : await ve(e, { ...i }, n?.ver ?? 0) && (K(null), q([]));
|
|
555
|
+
}, [
|
|
556
|
+
p,
|
|
557
|
+
t,
|
|
558
|
+
s,
|
|
559
|
+
a,
|
|
560
|
+
ve
|
|
561
|
+
]), Te = R((e) => {
|
|
562
|
+
Y((t) => {
|
|
563
|
+
if (!t[e]) return t;
|
|
564
|
+
let { [e]: n, ...r } = t;
|
|
565
|
+
return r;
|
|
566
|
+
}), q([]), K(null);
|
|
567
|
+
}, []), Ee = R((n, r) => {
|
|
568
|
+
let i = F.get(n) ?? n;
|
|
569
|
+
return he({
|
|
570
|
+
action: t.actions?.__delete,
|
|
571
|
+
destructive: !0,
|
|
572
|
+
title: w(t.display?.name) || w("record.action.delete", "Delete"),
|
|
573
|
+
row: r,
|
|
574
|
+
entity: e,
|
|
575
|
+
execute: async () => {
|
|
576
|
+
_e((e) => new Set(e).add(n));
|
|
577
|
+
try {
|
|
578
|
+
return await _(e, i);
|
|
579
|
+
} finally {
|
|
580
|
+
_e((e) => {
|
|
581
|
+
let t = new Set(e);
|
|
582
|
+
return t.delete(n), t;
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
onSuccess: () => S()
|
|
587
|
+
});
|
|
588
|
+
}, [
|
|
589
|
+
w,
|
|
590
|
+
he,
|
|
591
|
+
t,
|
|
592
|
+
e,
|
|
593
|
+
S,
|
|
594
|
+
F
|
|
595
|
+
]);
|
|
596
|
+
if (y) return /* @__PURE__ */ W("div", {
|
|
597
|
+
style: {
|
|
598
|
+
fontSize: 12.5,
|
|
599
|
+
color: "var(--danger)",
|
|
600
|
+
padding: "8px 0"
|
|
601
|
+
},
|
|
602
|
+
children: T("record.related_rows_unreadable", "The related records could not be loaded.")
|
|
603
|
+
});
|
|
604
|
+
if (h) return /* @__PURE__ */ G("div", {
|
|
605
|
+
style: {
|
|
606
|
+
display: "flex",
|
|
607
|
+
flexDirection: "column",
|
|
608
|
+
gap: 8,
|
|
609
|
+
padding: "8px 0"
|
|
610
|
+
},
|
|
611
|
+
children: [/* @__PURE__ */ W("div", { style: {
|
|
612
|
+
height: 32,
|
|
613
|
+
background: "var(--surface-3)",
|
|
614
|
+
borderRadius: "var(--radius-md)"
|
|
615
|
+
} }), /* @__PURE__ */ W("div", { style: {
|
|
616
|
+
height: 32,
|
|
617
|
+
background: "var(--surface-3)",
|
|
618
|
+
borderRadius: "var(--radius-md)"
|
|
619
|
+
} })]
|
|
620
|
+
});
|
|
621
|
+
let De = p.length === 0 && !Z;
|
|
622
|
+
return E.isPhone && !O ? /* @__PURE__ */ G("div", { children: [De && /* @__PURE__ */ W("div", {
|
|
623
|
+
style: {
|
|
624
|
+
fontSize: 12.5,
|
|
625
|
+
color: "var(--text-3)",
|
|
626
|
+
padding: "12px 0"
|
|
627
|
+
},
|
|
628
|
+
children: w("record.related.empty", "No records yet.")
|
|
629
|
+
}), !De && /* @__PURE__ */ G("div", {
|
|
630
|
+
style: {
|
|
631
|
+
display: "flex",
|
|
632
|
+
flexDirection: "column",
|
|
633
|
+
gap: 10
|
|
634
|
+
},
|
|
635
|
+
children: [p.map((n) => {
|
|
636
|
+
let i = v(r(t, n)), a = ge.has(i), o = J[i], u = A && i ? A.replace(/:\w+/, i) : void 0;
|
|
637
|
+
return /* @__PURE__ */ W(ce, {
|
|
638
|
+
rowId: i,
|
|
639
|
+
row: n,
|
|
640
|
+
entity: t,
|
|
641
|
+
entities: d.schema.entities,
|
|
642
|
+
screens: d.schema.screens,
|
|
643
|
+
columns: s,
|
|
644
|
+
editableColumns: j,
|
|
645
|
+
editable: c,
|
|
646
|
+
interaction: l,
|
|
647
|
+
isEditing: te === i,
|
|
648
|
+
editErrors: re,
|
|
649
|
+
isDeleting: a,
|
|
650
|
+
activeCell: z,
|
|
651
|
+
setActiveCell: U,
|
|
652
|
+
rowState: o,
|
|
653
|
+
onCellChange: ye,
|
|
654
|
+
onDeleteClick: (e) => void Ee(e, n),
|
|
655
|
+
onStartEdit: Ce,
|
|
656
|
+
onConfirmEdit: we,
|
|
657
|
+
onCancelEdit: Te,
|
|
658
|
+
refs: m,
|
|
659
|
+
identityCol: k,
|
|
660
|
+
href: u,
|
|
661
|
+
rowActions: L,
|
|
662
|
+
entityCode: e,
|
|
663
|
+
onRowActionSuccess: S
|
|
664
|
+
}, i);
|
|
665
|
+
}), Z && /* @__PURE__ */ W(de, {
|
|
666
|
+
draftRow: Z,
|
|
667
|
+
entity: t,
|
|
668
|
+
columns: s,
|
|
669
|
+
editableColumns: P,
|
|
670
|
+
foreignKey: a,
|
|
671
|
+
draftErrors: fe,
|
|
672
|
+
draftSaving: pe,
|
|
673
|
+
onChange: (e, t) => Q((n) => n && {
|
|
674
|
+
...n,
|
|
675
|
+
[e]: t
|
|
676
|
+
}),
|
|
677
|
+
onConfirm: Se,
|
|
678
|
+
onCancel: () => {
|
|
679
|
+
Q(null), $([]);
|
|
680
|
+
},
|
|
681
|
+
refs: m
|
|
682
|
+
})]
|
|
683
|
+
})] }) : /* @__PURE__ */ G("div", { children: [De && /* @__PURE__ */ W("div", {
|
|
684
|
+
style: {
|
|
685
|
+
fontSize: 12.5,
|
|
686
|
+
color: "var(--text-3)",
|
|
687
|
+
padding: "12px 0"
|
|
688
|
+
},
|
|
689
|
+
children: w("record.related.empty", "No records yet.")
|
|
690
|
+
}), !De && /* @__PURE__ */ W("div", {
|
|
691
|
+
style: { overflowX: "auto" },
|
|
692
|
+
children: /* @__PURE__ */ G("table", {
|
|
693
|
+
style: N,
|
|
694
|
+
children: [/* @__PURE__ */ W("thead", { children: /* @__PURE__ */ G("tr", { children: [
|
|
695
|
+
s.map((e) => {
|
|
696
|
+
let n = t.fields.get(e);
|
|
697
|
+
return /* @__PURE__ */ W("th", {
|
|
698
|
+
style: M,
|
|
699
|
+
children: n ? i(w, n, e, d.schema.entities) : e
|
|
700
|
+
}, e);
|
|
701
|
+
}),
|
|
702
|
+
c && /* @__PURE__ */ W("th", { style: {
|
|
703
|
+
height: 30,
|
|
704
|
+
width: 72
|
|
705
|
+
} }),
|
|
706
|
+
!c && L.length > 0 && /* @__PURE__ */ W("th", { style: {
|
|
707
|
+
height: 30,
|
|
708
|
+
width: 40
|
|
709
|
+
} })
|
|
710
|
+
] }) }), /* @__PURE__ */ G("tbody", { children: [p.map((n) => {
|
|
711
|
+
let i = v(r(t, n)), a = ge.has(i), o = J[i], u = A && i ? A.replace(/:\w+/, i) : void 0;
|
|
712
|
+
return /* @__PURE__ */ W(le, {
|
|
713
|
+
rowId: i,
|
|
714
|
+
row: n,
|
|
715
|
+
entity: t,
|
|
716
|
+
entities: d.schema.entities,
|
|
717
|
+
screens: d.schema.screens,
|
|
718
|
+
columns: s,
|
|
719
|
+
editableColumns: j,
|
|
720
|
+
editable: c,
|
|
721
|
+
interaction: l,
|
|
722
|
+
isEditing: te === i,
|
|
723
|
+
editErrors: re,
|
|
724
|
+
isDeleting: a,
|
|
725
|
+
activeCell: z,
|
|
726
|
+
setActiveCell: U,
|
|
727
|
+
rowState: o,
|
|
728
|
+
onCellChange: ye,
|
|
729
|
+
onDeleteClick: (e) => void Ee(e, n),
|
|
730
|
+
onStartEdit: Ce,
|
|
731
|
+
onConfirmEdit: we,
|
|
732
|
+
onCancelEdit: Te,
|
|
733
|
+
refs: m,
|
|
734
|
+
identityCol: k,
|
|
735
|
+
href: u,
|
|
736
|
+
rowActions: L,
|
|
737
|
+
entityCode: e,
|
|
738
|
+
onRowActionSuccess: S
|
|
739
|
+
}, i);
|
|
740
|
+
}), Z && /* @__PURE__ */ W(ue, {
|
|
741
|
+
draftRow: Z,
|
|
742
|
+
entity: t,
|
|
743
|
+
columns: s,
|
|
744
|
+
editableColumns: P,
|
|
745
|
+
foreignKey: a,
|
|
746
|
+
draftErrors: fe,
|
|
747
|
+
draftSaving: pe,
|
|
748
|
+
onChange: (e, t) => Q((n) => n && {
|
|
749
|
+
...n,
|
|
750
|
+
[e]: t
|
|
751
|
+
}),
|
|
752
|
+
onConfirm: Se,
|
|
753
|
+
onCancel: () => {
|
|
754
|
+
Q(null), $([]);
|
|
755
|
+
},
|
|
756
|
+
refs: m
|
|
757
|
+
})] })]
|
|
758
|
+
})
|
|
759
|
+
})] });
|
|
760
|
+
}
|
|
761
|
+
function ce({ rowId: e, row: n, entity: r, entities: a, screens: o, columns: c, editableColumns: d, editable: f, interaction: m, isEditing: h, editErrors: g, isDeleting: _, rowState: v, onCellChange: y, onDeleteClick: b, onStartEdit: x, onConfirmEdit: S, onCancelEdit: C, refs: w, identityCol: T, href: E, rowActions: D, onRowActionSuccess: k }) {
|
|
762
|
+
let A = u(), j = z(), M = B(() => !v || Object.keys(v.buffer).length === 0 ? n : {
|
|
763
|
+
...n,
|
|
764
|
+
...v.buffer
|
|
765
|
+
}, [n, v]);
|
|
766
|
+
if (m === "row_edit" && h) {
|
|
767
|
+
let t = v?.error ? [...g, `_error:${v.error}`] : g;
|
|
768
|
+
return /* @__PURE__ */ W(Q, {
|
|
769
|
+
values: M,
|
|
770
|
+
entity: r,
|
|
771
|
+
columns: c,
|
|
772
|
+
editableColumns: d,
|
|
773
|
+
errors: t,
|
|
774
|
+
saving: v?.saving ?? !1,
|
|
775
|
+
onChange: (t, n) => y(e, t, n),
|
|
776
|
+
onConfirm: () => S(e),
|
|
777
|
+
onCancel: () => C(e),
|
|
778
|
+
refs: w
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
return /* @__PURE__ */ G("div", {
|
|
782
|
+
style: {
|
|
783
|
+
border: "1px solid var(--border)",
|
|
784
|
+
borderRadius: "var(--radius-md)",
|
|
785
|
+
background: "var(--surface)",
|
|
786
|
+
opacity: _ ? .58 : 1,
|
|
787
|
+
overflow: "hidden"
|
|
788
|
+
},
|
|
789
|
+
children: [/* @__PURE__ */ W("div", {
|
|
790
|
+
style: {
|
|
791
|
+
padding: 10,
|
|
792
|
+
display: "flex",
|
|
793
|
+
flexDirection: "column",
|
|
794
|
+
gap: 12
|
|
795
|
+
},
|
|
796
|
+
children: c.map((n) => {
|
|
797
|
+
let s = r.fields.get(n), c = f && m === "inline_edit" && d.has(n), l = E && n === T, u = s ? i(A, s, n, a) : n, p = `${j}-${e}-${n}`, h = `${p}-label`, g = {
|
|
798
|
+
fontSize: 11.5,
|
|
799
|
+
fontWeight: 600,
|
|
800
|
+
color: "var(--text-3)"
|
|
801
|
+
}, _ = s ? O({
|
|
802
|
+
field: s,
|
|
803
|
+
fieldName: n,
|
|
804
|
+
value: M[n],
|
|
805
|
+
mode: c ? "edit" : "display",
|
|
806
|
+
onChange: c ? (t) => y(e, n, t) : void 0,
|
|
807
|
+
record: M,
|
|
808
|
+
refs: w,
|
|
809
|
+
compact: c,
|
|
810
|
+
entity: r,
|
|
811
|
+
entities: a,
|
|
812
|
+
screens: l ? void 0 : o,
|
|
813
|
+
fieldId: p,
|
|
814
|
+
labelId: h,
|
|
815
|
+
t: A
|
|
816
|
+
}) : t(M[n]);
|
|
817
|
+
return /* @__PURE__ */ G("div", {
|
|
818
|
+
style: {
|
|
819
|
+
display: "flex",
|
|
820
|
+
flexDirection: "column",
|
|
821
|
+
gap: 5,
|
|
822
|
+
minWidth: 0
|
|
823
|
+
},
|
|
824
|
+
children: [c && s ? /* @__PURE__ */ W("label", {
|
|
825
|
+
id: h,
|
|
826
|
+
htmlFor: p,
|
|
827
|
+
style: g,
|
|
828
|
+
children: u
|
|
829
|
+
}) : /* @__PURE__ */ W("div", {
|
|
830
|
+
id: h,
|
|
831
|
+
style: g,
|
|
832
|
+
children: u
|
|
833
|
+
}), /* @__PURE__ */ W("div", {
|
|
834
|
+
style: { minWidth: 0 },
|
|
835
|
+
children: l && !c ? /* @__PURE__ */ W("a", {
|
|
836
|
+
href: E,
|
|
837
|
+
style: {
|
|
838
|
+
color: "var(--accent-text)",
|
|
839
|
+
textDecoration: "none",
|
|
840
|
+
fontWeight: 500
|
|
841
|
+
},
|
|
842
|
+
children: _
|
|
843
|
+
}) : _
|
|
844
|
+
})]
|
|
845
|
+
}, n);
|
|
846
|
+
})
|
|
847
|
+
}), (f || D && D.length > 0) && /* @__PURE__ */ G("div", {
|
|
848
|
+
style: {
|
|
849
|
+
minHeight: 42,
|
|
850
|
+
padding: "6px 8px",
|
|
851
|
+
borderTop: "1px solid var(--divider)",
|
|
852
|
+
display: "flex",
|
|
853
|
+
alignItems: "center",
|
|
854
|
+
justifyContent: "flex-end",
|
|
855
|
+
gap: 6
|
|
856
|
+
},
|
|
857
|
+
children: [f && /* @__PURE__ */ G(te, { children: [
|
|
858
|
+
v?.saving && /* @__PURE__ */ W(p, { size: 12 }),
|
|
859
|
+
v?.error && /* @__PURE__ */ W("span", {
|
|
860
|
+
style: {
|
|
861
|
+
fontSize: 11,
|
|
862
|
+
color: "var(--danger)"
|
|
863
|
+
},
|
|
864
|
+
title: v.error,
|
|
865
|
+
children: "!"
|
|
866
|
+
}),
|
|
867
|
+
m === "row_edit" && /* @__PURE__ */ W(l, {
|
|
868
|
+
size: 32,
|
|
869
|
+
icon: /* @__PURE__ */ W(s.edit, { size: 14 }),
|
|
870
|
+
onClick: () => x(e),
|
|
871
|
+
title: A("record.row.edit", "Edit row")
|
|
872
|
+
}),
|
|
873
|
+
/* @__PURE__ */ W(l, {
|
|
874
|
+
size: 32,
|
|
875
|
+
icon: /* @__PURE__ */ W(s.trash, { size: 14 }),
|
|
876
|
+
onClick: () => b(e),
|
|
877
|
+
title: A("record.row.delete", "Delete row")
|
|
878
|
+
})
|
|
879
|
+
] }), !f && D && D.length > 0 && /* @__PURE__ */ W(I, {
|
|
880
|
+
entity: r,
|
|
881
|
+
actions: D,
|
|
882
|
+
objectIds: [e],
|
|
883
|
+
row: M,
|
|
884
|
+
onSuccess: k
|
|
885
|
+
})]
|
|
886
|
+
})]
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
function le({ rowId: e, row: n, entity: r, entities: i, screens: a, columns: o, editableColumns: c, editable: d, interaction: f, isEditing: m, editErrors: h, isDeleting: g, activeCell: _, setActiveCell: v, rowState: y, onCellChange: b, onDeleteClick: x, onStartEdit: S, onConfirmEdit: C, onCancelEdit: w, refs: T, identityCol: E, href: D, rowActions: k, onRowActionSuccess: A }) {
|
|
890
|
+
let M = u(), N = B(() => !y || Object.keys(y.buffer).length === 0 ? n : {
|
|
891
|
+
...n,
|
|
892
|
+
...y.buffer
|
|
893
|
+
}, [n, y]);
|
|
894
|
+
if (f === "row_edit" && m) {
|
|
895
|
+
let t = y?.error ? [...h, `_error:${y.error}`] : h;
|
|
896
|
+
return /* @__PURE__ */ W(Z, {
|
|
897
|
+
values: N,
|
|
898
|
+
entity: r,
|
|
899
|
+
columns: o,
|
|
900
|
+
editableColumns: c,
|
|
901
|
+
errors: t,
|
|
902
|
+
saving: y?.saving ?? !1,
|
|
903
|
+
onChange: (t, n) => b(e, t, n),
|
|
904
|
+
onConfirm: () => C(e),
|
|
905
|
+
onCancel: () => w(e),
|
|
906
|
+
refs: T
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
let P = j, F = {
|
|
910
|
+
padding: "4px 4px",
|
|
911
|
+
borderBottom: "1px solid var(--divider)",
|
|
912
|
+
verticalAlign: "middle"
|
|
913
|
+
}, L = f === "inline_edit";
|
|
914
|
+
return /* @__PURE__ */ G("tr", {
|
|
915
|
+
style: { opacity: g ? .5 : 1 },
|
|
916
|
+
children: [
|
|
917
|
+
o.map((n) => {
|
|
918
|
+
let o = r.fields.get(n), s = c.has(n);
|
|
919
|
+
if (L && _?.rowId === e && _?.col === n && s) return /* @__PURE__ */ W("td", {
|
|
920
|
+
style: F,
|
|
921
|
+
children: o ? O({
|
|
922
|
+
field: o,
|
|
923
|
+
fieldName: n,
|
|
924
|
+
value: N[n],
|
|
925
|
+
mode: "edit",
|
|
926
|
+
onChange: (t) => b(e, n, t),
|
|
927
|
+
record: N,
|
|
928
|
+
refs: T,
|
|
929
|
+
compact: !0,
|
|
930
|
+
t: M
|
|
931
|
+
}) : t(N[n])
|
|
932
|
+
}, n);
|
|
933
|
+
let l = D && n === E, u = o ? O({
|
|
934
|
+
field: o,
|
|
935
|
+
fieldName: n,
|
|
936
|
+
value: N[n],
|
|
937
|
+
mode: "display",
|
|
938
|
+
record: N,
|
|
939
|
+
refs: T,
|
|
940
|
+
entity: r,
|
|
941
|
+
entities: i,
|
|
942
|
+
screens: l ? void 0 : a,
|
|
943
|
+
t: M
|
|
944
|
+
}) : t(N[n]), d = L && s && !g;
|
|
945
|
+
return /* @__PURE__ */ W("td", {
|
|
946
|
+
style: {
|
|
947
|
+
...P,
|
|
948
|
+
cursor: d ? "pointer" : "default"
|
|
949
|
+
},
|
|
950
|
+
onClick: d ? () => v({
|
|
951
|
+
rowId: e,
|
|
952
|
+
col: n
|
|
953
|
+
}) : void 0,
|
|
954
|
+
children: l ? /* @__PURE__ */ W("a", {
|
|
955
|
+
href: D,
|
|
956
|
+
style: {
|
|
957
|
+
color: "var(--accent-text)",
|
|
958
|
+
textDecoration: "none",
|
|
959
|
+
fontWeight: 500
|
|
960
|
+
},
|
|
961
|
+
onMouseEnter: (e) => e.currentTarget.style.textDecoration = "underline",
|
|
962
|
+
onMouseLeave: (e) => e.currentTarget.style.textDecoration = "none",
|
|
963
|
+
children: u
|
|
964
|
+
}) : u
|
|
965
|
+
}, n);
|
|
966
|
+
}),
|
|
967
|
+
d && /* @__PURE__ */ W("td", {
|
|
968
|
+
style: {
|
|
969
|
+
padding: "4px 8px",
|
|
970
|
+
borderBottom: "1px solid var(--divider)",
|
|
971
|
+
verticalAlign: "middle"
|
|
972
|
+
},
|
|
973
|
+
children: /* @__PURE__ */ G("div", {
|
|
974
|
+
style: {
|
|
975
|
+
display: "flex",
|
|
976
|
+
alignItems: "center",
|
|
977
|
+
gap: 4
|
|
978
|
+
},
|
|
979
|
+
children: [
|
|
980
|
+
y?.saving && /* @__PURE__ */ W(p, { size: 12 }),
|
|
981
|
+
y?.error && /* @__PURE__ */ W("span", {
|
|
982
|
+
style: {
|
|
983
|
+
fontSize: 11,
|
|
984
|
+
color: "var(--danger)"
|
|
985
|
+
},
|
|
986
|
+
title: y.error,
|
|
987
|
+
children: "!"
|
|
988
|
+
}),
|
|
989
|
+
f === "row_edit" && /* @__PURE__ */ W(l, {
|
|
990
|
+
size: 24,
|
|
991
|
+
icon: /* @__PURE__ */ W(s.edit, { size: 12 }),
|
|
992
|
+
onClick: () => S(e),
|
|
993
|
+
title: M("record.row.edit", "Edit row")
|
|
994
|
+
}),
|
|
995
|
+
/* @__PURE__ */ W(l, {
|
|
996
|
+
size: 24,
|
|
997
|
+
icon: /* @__PURE__ */ W(s.trash, { size: 12 }),
|
|
998
|
+
onClick: () => x(e),
|
|
999
|
+
title: M("record.row.delete", "Delete row")
|
|
1000
|
+
})
|
|
1001
|
+
]
|
|
1002
|
+
})
|
|
1003
|
+
}),
|
|
1004
|
+
!d && k && k.length > 0 && /* @__PURE__ */ W("td", {
|
|
1005
|
+
style: {
|
|
1006
|
+
padding: "4px 8px",
|
|
1007
|
+
borderBottom: "1px solid var(--divider)",
|
|
1008
|
+
verticalAlign: "middle"
|
|
1009
|
+
},
|
|
1010
|
+
children: /* @__PURE__ */ W(I, {
|
|
1011
|
+
entity: r,
|
|
1012
|
+
actions: k,
|
|
1013
|
+
objectIds: [e],
|
|
1014
|
+
row: N,
|
|
1015
|
+
onSuccess: A
|
|
1016
|
+
})
|
|
1017
|
+
})
|
|
1018
|
+
]
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
function Z({ values: e, entity: n, columns: r, editableColumns: i, errors: a, saving: o, onChange: c, onConfirm: d, onCancel: f, refs: m, accent: h }) {
|
|
1022
|
+
let g = u(), _ = a.find((e) => e.startsWith("_error:")), v = new Set(a.filter((e) => !e.startsWith("_error:"))), y = {
|
|
1023
|
+
padding: "6px 12px",
|
|
1024
|
+
borderBottom: "1px solid var(--divider)",
|
|
1025
|
+
verticalAlign: "middle",
|
|
1026
|
+
height: 40,
|
|
1027
|
+
minWidth: 0
|
|
1028
|
+
}, b = {
|
|
1029
|
+
display: "block",
|
|
1030
|
+
width: "100%",
|
|
1031
|
+
maxWidth: "100%",
|
|
1032
|
+
minWidth: 0
|
|
1033
|
+
};
|
|
1034
|
+
return /* @__PURE__ */ G("tr", {
|
|
1035
|
+
style: h ? { boxShadow: "inset 3px 0 0 var(--accent)" } : void 0,
|
|
1036
|
+
onKeyDown: (e) => {
|
|
1037
|
+
e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), d()) : e.key === "Escape" && (e.preventDefault(), f());
|
|
1038
|
+
},
|
|
1039
|
+
children: [r.map((r) => {
|
|
1040
|
+
let a = n.fields.get(r), o = i.has(r), s = v.has(r);
|
|
1041
|
+
return o ? /* @__PURE__ */ W("td", {
|
|
1042
|
+
style: {
|
|
1043
|
+
...y,
|
|
1044
|
+
outline: s ? "1px solid var(--danger)" : "none",
|
|
1045
|
+
outlineOffset: -1
|
|
1046
|
+
},
|
|
1047
|
+
title: s ? g("record.row.field_required", "{field} is required", { field: r }) : void 0,
|
|
1048
|
+
children: /* @__PURE__ */ W("div", {
|
|
1049
|
+
style: b,
|
|
1050
|
+
children: a ? O({
|
|
1051
|
+
field: a,
|
|
1052
|
+
fieldName: r,
|
|
1053
|
+
value: e[r],
|
|
1054
|
+
mode: "edit",
|
|
1055
|
+
onChange: (e) => c(r, e),
|
|
1056
|
+
record: e,
|
|
1057
|
+
refs: m,
|
|
1058
|
+
compact: !0,
|
|
1059
|
+
t: g
|
|
1060
|
+
}) : t(e[r])
|
|
1061
|
+
})
|
|
1062
|
+
}, r) : /* @__PURE__ */ W("td", {
|
|
1063
|
+
style: {
|
|
1064
|
+
...y,
|
|
1065
|
+
color: "var(--text-3)"
|
|
1066
|
+
},
|
|
1067
|
+
children: a?.auto ? "—" : t(e[r])
|
|
1068
|
+
}, r);
|
|
1069
|
+
}), /* @__PURE__ */ W("td", {
|
|
1070
|
+
style: y,
|
|
1071
|
+
children: /* @__PURE__ */ G("div", {
|
|
1072
|
+
style: {
|
|
1073
|
+
display: "flex",
|
|
1074
|
+
alignItems: "center",
|
|
1075
|
+
gap: 4,
|
|
1076
|
+
justifyContent: "flex-end"
|
|
1077
|
+
},
|
|
1078
|
+
children: [
|
|
1079
|
+
_ && /* @__PURE__ */ W("span", {
|
|
1080
|
+
style: {
|
|
1081
|
+
fontSize: 11,
|
|
1082
|
+
color: "var(--danger)"
|
|
1083
|
+
},
|
|
1084
|
+
title: _.slice(7),
|
|
1085
|
+
children: "!"
|
|
1086
|
+
}),
|
|
1087
|
+
/* @__PURE__ */ W(l, {
|
|
1088
|
+
size: 24,
|
|
1089
|
+
icon: W(o ? p : s.check, { size: 12 }),
|
|
1090
|
+
onClick: d,
|
|
1091
|
+
title: g("record.row.confirm", "Confirm (Enter)")
|
|
1092
|
+
}),
|
|
1093
|
+
/* @__PURE__ */ W(l, {
|
|
1094
|
+
size: 24,
|
|
1095
|
+
icon: /* @__PURE__ */ W(s.x, { size: 12 }),
|
|
1096
|
+
onClick: f,
|
|
1097
|
+
title: g("record.row.cancel", "Cancel (Esc)")
|
|
1098
|
+
})
|
|
1099
|
+
]
|
|
1100
|
+
})
|
|
1101
|
+
})]
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
function Q({ values: e, entity: n, columns: r, editableColumns: a, errors: o, saving: c, onChange: d, onConfirm: f, onCancel: m, refs: h, accent: g }) {
|
|
1105
|
+
let _ = u(), v = z(), y = o.find((e) => e.startsWith("_error:")), b = new Set(o.filter((e) => !e.startsWith("_error:")));
|
|
1106
|
+
return /* @__PURE__ */ G("div", {
|
|
1107
|
+
style: {
|
|
1108
|
+
border: "1px solid var(--border)",
|
|
1109
|
+
borderRadius: "var(--radius-md)",
|
|
1110
|
+
background: "var(--surface)",
|
|
1111
|
+
overflow: "hidden",
|
|
1112
|
+
boxShadow: g ? "inset 3px 0 0 var(--accent)" : void 0
|
|
1113
|
+
},
|
|
1114
|
+
onKeyDown: (e) => {
|
|
1115
|
+
e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), f()) : e.key === "Escape" && (e.preventDefault(), m());
|
|
1116
|
+
},
|
|
1117
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1118
|
+
style: {
|
|
1119
|
+
padding: 10,
|
|
1120
|
+
display: "flex",
|
|
1121
|
+
flexDirection: "column",
|
|
1122
|
+
gap: 12
|
|
1123
|
+
},
|
|
1124
|
+
children: r.map((r) => {
|
|
1125
|
+
let o = n.fields.get(r), s = a.has(r), c = b.has(r), l = o ? i(_, o, r) : r, u = `${v}-${r}`, f = `${u}-label`, p = {
|
|
1126
|
+
fontSize: 11.5,
|
|
1127
|
+
fontWeight: 600,
|
|
1128
|
+
color: "var(--text-3)"
|
|
1129
|
+
};
|
|
1130
|
+
return /* @__PURE__ */ G("div", {
|
|
1131
|
+
style: {
|
|
1132
|
+
display: "flex",
|
|
1133
|
+
flexDirection: "column",
|
|
1134
|
+
gap: 5,
|
|
1135
|
+
minWidth: 0
|
|
1136
|
+
},
|
|
1137
|
+
children: [s && o ? /* @__PURE__ */ W("label", {
|
|
1138
|
+
id: f,
|
|
1139
|
+
htmlFor: u,
|
|
1140
|
+
style: p,
|
|
1141
|
+
children: l
|
|
1142
|
+
}) : /* @__PURE__ */ W("div", {
|
|
1143
|
+
id: f,
|
|
1144
|
+
style: p,
|
|
1145
|
+
children: l
|
|
1146
|
+
}), /* @__PURE__ */ W("div", {
|
|
1147
|
+
style: {
|
|
1148
|
+
minWidth: 0,
|
|
1149
|
+
outline: c ? "1px solid var(--danger)" : "none",
|
|
1150
|
+
outlineOffset: 3,
|
|
1151
|
+
borderRadius: c ? "var(--radius-sm)" : 0
|
|
1152
|
+
},
|
|
1153
|
+
title: c ? _("record.row.field_required", "{field} is required", { field: r }) : void 0,
|
|
1154
|
+
children: s ? o ? O({
|
|
1155
|
+
field: o,
|
|
1156
|
+
fieldName: r,
|
|
1157
|
+
value: e[r],
|
|
1158
|
+
mode: "edit",
|
|
1159
|
+
onChange: (e) => d(r, e),
|
|
1160
|
+
record: e,
|
|
1161
|
+
refs: h,
|
|
1162
|
+
compact: !0,
|
|
1163
|
+
fieldId: u,
|
|
1164
|
+
labelId: f,
|
|
1165
|
+
t: _
|
|
1166
|
+
}) : t(e[r]) : o?.auto ? "—" : t(e[r])
|
|
1167
|
+
})]
|
|
1168
|
+
}, r);
|
|
1169
|
+
})
|
|
1170
|
+
}), /* @__PURE__ */ G("div", {
|
|
1171
|
+
style: {
|
|
1172
|
+
minHeight: 42,
|
|
1173
|
+
padding: "6px 8px",
|
|
1174
|
+
borderTop: "1px solid var(--divider)",
|
|
1175
|
+
display: "flex",
|
|
1176
|
+
alignItems: "center",
|
|
1177
|
+
justifyContent: "flex-end",
|
|
1178
|
+
gap: 6
|
|
1179
|
+
},
|
|
1180
|
+
children: [
|
|
1181
|
+
y && /* @__PURE__ */ W("span", {
|
|
1182
|
+
style: {
|
|
1183
|
+
fontSize: 11,
|
|
1184
|
+
color: "var(--danger)"
|
|
1185
|
+
},
|
|
1186
|
+
title: y.slice(7),
|
|
1187
|
+
children: "!"
|
|
1188
|
+
}),
|
|
1189
|
+
/* @__PURE__ */ W(l, {
|
|
1190
|
+
size: 32,
|
|
1191
|
+
icon: W(c ? p : s.check, { size: 14 }),
|
|
1192
|
+
onClick: f,
|
|
1193
|
+
title: _("record.row.confirm", "Confirm (Enter)")
|
|
1194
|
+
}),
|
|
1195
|
+
/* @__PURE__ */ W(l, {
|
|
1196
|
+
size: 32,
|
|
1197
|
+
icon: /* @__PURE__ */ W(s.x, { size: 14 }),
|
|
1198
|
+
onClick: m,
|
|
1199
|
+
title: _("record.row.cancel", "Cancel (Esc)")
|
|
1200
|
+
})
|
|
1201
|
+
]
|
|
1202
|
+
})]
|
|
1203
|
+
});
|
|
1204
|
+
}
|
|
1205
|
+
function ue({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey: i, draftErrors: a, draftSaving: o, onChange: s, onConfirm: c, onCancel: l, refs: u }) {
|
|
1206
|
+
let d = B(() => {
|
|
1207
|
+
let e = new Set(r);
|
|
1208
|
+
return e.delete(i), e;
|
|
1209
|
+
}, [r, i]);
|
|
1210
|
+
return /* @__PURE__ */ W(Z, {
|
|
1211
|
+
values: e,
|
|
1212
|
+
entity: t,
|
|
1213
|
+
columns: n,
|
|
1214
|
+
editableColumns: d,
|
|
1215
|
+
errors: a,
|
|
1216
|
+
saving: o,
|
|
1217
|
+
onChange: s,
|
|
1218
|
+
onConfirm: c,
|
|
1219
|
+
onCancel: l,
|
|
1220
|
+
refs: u,
|
|
1221
|
+
accent: !0
|
|
1222
|
+
});
|
|
1223
|
+
}
|
|
1224
|
+
function de({ draftRow: e, entity: t, columns: n, editableColumns: r, foreignKey: i, draftErrors: a, draftSaving: o, onChange: s, onConfirm: c, onCancel: l, refs: u }) {
|
|
1225
|
+
let d = B(() => {
|
|
1226
|
+
let e = new Set(r);
|
|
1227
|
+
return e.delete(i), e;
|
|
1228
|
+
}, [r, i]);
|
|
1229
|
+
return /* @__PURE__ */ W(Q, {
|
|
1230
|
+
values: e,
|
|
1231
|
+
entity: t,
|
|
1232
|
+
columns: n,
|
|
1233
|
+
editableColumns: d,
|
|
1234
|
+
errors: a,
|
|
1235
|
+
saving: o,
|
|
1236
|
+
onChange: s,
|
|
1237
|
+
onConfirm: c,
|
|
1238
|
+
onCancel: l,
|
|
1239
|
+
refs: u,
|
|
1240
|
+
accent: !0
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1243
|
+
//#endregion
|
|
1244
|
+
export { q as AssociatedBlock, ae as associatedDraftEditableColumns, ie as associatedEditableColumns, oe as findMissingRequiredAssociatedFields, re as resolveAssociatedForeignKey, ne as resolveAssociatedRowActions, K as resolveAssociatedToolbarActions };
|