@declarion/react 0.141.0 → 0.146.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,73 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { listEntities as e } from "../api/data.js";
|
|
2
|
+
import { coerceDisplayString as t } from "../lib/display-value.js";
|
|
3
|
+
import { getPrimaryKeyFields as n, resolveRefRecordLabel as r } from "../types/schema.js";
|
|
4
4
|
import { useQueries as i } from "@tanstack/react-query";
|
|
5
|
-
|
|
5
|
+
// src/hooks/useRefRecords.ts
|
|
6
6
|
var a = 200;
|
|
7
|
-
function o(e,
|
|
8
|
-
let r =
|
|
9
|
-
return e.field || (r ?
|
|
7
|
+
function o(e, t) {
|
|
8
|
+
let r = t?.[e.entity];
|
|
9
|
+
return e.field || (r ? n(r)[0] : "id") || "id";
|
|
10
10
|
}
|
|
11
|
-
function s(
|
|
12
|
-
let s =
|
|
11
|
+
function s(e, n, i, a, o) {
|
|
12
|
+
let s = t(a), c = n[i.entity]?.[s];
|
|
13
13
|
if (!c) return;
|
|
14
14
|
let l = i.display?.field ?? o?.[i.entity]?.display?.display_field;
|
|
15
|
-
return
|
|
15
|
+
return r(e, c, l, s);
|
|
16
16
|
}
|
|
17
|
-
function c(
|
|
17
|
+
function c(n, r, s) {
|
|
18
18
|
let c = /* @__PURE__ */ new Map();
|
|
19
|
-
for (let { ref:
|
|
20
|
-
let
|
|
21
|
-
if (!
|
|
22
|
-
let a = o(
|
|
19
|
+
for (let { ref: e, value: i } of n) {
|
|
20
|
+
let n = t(i);
|
|
21
|
+
if (!n || r?.[e.entity]?.[n]) continue;
|
|
22
|
+
let a = o(e, s), l = `${e.entity}::${a}`, u = c.get(l);
|
|
23
23
|
u || (u = {
|
|
24
24
|
key: l,
|
|
25
|
-
entity:
|
|
25
|
+
entity: e.entity,
|
|
26
26
|
lookupField: a,
|
|
27
27
|
values: []
|
|
28
|
-
}, c.set(l, u)), u.values.includes(
|
|
28
|
+
}, c.set(l, u)), u.values.includes(n) || u.values.push(n);
|
|
29
29
|
}
|
|
30
30
|
let l = [...c.values()];
|
|
31
31
|
for (let e of l) e.values.sort();
|
|
32
32
|
l.sort((e, t) => e.key.localeCompare(t.key));
|
|
33
|
-
let u = i({ queries: l.map((
|
|
34
|
-
let
|
|
33
|
+
let u = i({ queries: l.map((t) => {
|
|
34
|
+
let n = {
|
|
35
35
|
per_page: a,
|
|
36
36
|
filters: [{
|
|
37
|
-
field:
|
|
37
|
+
field: t.lookupField,
|
|
38
38
|
op: "in",
|
|
39
|
-
value:
|
|
39
|
+
value: t.values
|
|
40
40
|
}],
|
|
41
41
|
count: "window"
|
|
42
42
|
};
|
|
43
43
|
return {
|
|
44
44
|
queryKey: [
|
|
45
45
|
"entity-data",
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
t.entity,
|
|
47
|
+
n
|
|
48
48
|
],
|
|
49
|
-
queryFn: ({ signal:
|
|
49
|
+
queryFn: ({ signal: r }) => e(t.entity, n, { signal: r }),
|
|
50
50
|
staleTime: 6e4
|
|
51
51
|
};
|
|
52
52
|
}) }), d = {};
|
|
53
|
-
if (
|
|
53
|
+
if (r) for (let [e, t] of Object.entries(r)) d[e] = { ...t };
|
|
54
54
|
let f = /* @__PURE__ */ new Set();
|
|
55
|
-
return u.forEach((
|
|
55
|
+
return u.forEach((e, n) => {
|
|
56
56
|
let r = l[n];
|
|
57
57
|
if (!r) return;
|
|
58
|
-
let i =
|
|
58
|
+
let i = e.data?.data;
|
|
59
59
|
if (i) {
|
|
60
|
-
let
|
|
60
|
+
let e = d[r.entity] ??= {};
|
|
61
61
|
for (let n of i) {
|
|
62
|
-
let i =
|
|
63
|
-
i && (
|
|
62
|
+
let i = t(n[r.lookupField]);
|
|
63
|
+
i && (e[i] = n);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
if (
|
|
66
|
+
if (e.isLoading) for (let e of r.values) d[r.entity]?.[e] || f.add(`${r.entity}::${e}`);
|
|
67
67
|
}), {
|
|
68
68
|
refs: d,
|
|
69
69
|
isLoading: (e, t) => f.has(`${e}::${t}`)
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
//#endregion
|
|
73
72
|
export { s as refLabel, c as useRefRecords };
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTabStore as e } from "../stores/tabs.js";
|
|
2
|
+
import { useEmbed as t } from "../embed/EmbedContext.js";
|
|
3
|
+
import { useText as n } from "./useText.js";
|
|
4
4
|
import { useEffect as r } from "react";
|
|
5
|
-
|
|
6
|
-
function i(
|
|
7
|
-
let s =
|
|
5
|
+
// src/hooks/useRegisterScreenTab.ts
|
|
6
|
+
function i(n, i, a, o) {
|
|
7
|
+
let s = t();
|
|
8
8
|
r(() => {
|
|
9
|
-
|
|
10
|
-
pathname:
|
|
9
|
+
n && !s.enabled && e.getState().openTab({
|
|
10
|
+
pathname: n,
|
|
11
11
|
search: o,
|
|
12
12
|
title: i,
|
|
13
13
|
icon: a,
|
|
14
14
|
closable: !0
|
|
15
15
|
});
|
|
16
16
|
}, [
|
|
17
|
-
|
|
17
|
+
n,
|
|
18
18
|
i,
|
|
19
19
|
a,
|
|
20
20
|
s.enabled
|
|
21
21
|
]);
|
|
22
22
|
}
|
|
23
|
-
function a(e,
|
|
24
|
-
let a =
|
|
25
|
-
i(
|
|
23
|
+
function a(e, t, r) {
|
|
24
|
+
let a = n(), o = e?.route, s = t ? a(e?.display?.name) || a(t.display.name_plural) : "", c = e?.display?.icon || t?.display.icon;
|
|
25
|
+
i(t ? o : void 0, s, c, r);
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { a as useRegisterScreenTab, i as useScreenTabRegistration };
|
|
@@ -2,7 +2,7 @@ import { applyViewportAttribute as e } from "../lib/html-state.js";
|
|
|
2
2
|
import { DEFAULT_RESPONSIVE_BREAKPOINTS as t, resolveViewportCategory as n } from "../lib/viewport-category.js";
|
|
3
3
|
import { createContext as r, useContext as i, useEffect as a, useMemo as o, useState as s } from "react";
|
|
4
4
|
import { jsx as c } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/hooks/useResponsiveMode.tsx
|
|
6
6
|
var l = {
|
|
7
7
|
width: 1280,
|
|
8
8
|
height: 720
|
|
@@ -80,5 +80,4 @@ function h({ children: r, breakpoints: i = t, viewportOverride: l, viewport: f =
|
|
|
80
80
|
function g() {
|
|
81
81
|
return i(u);
|
|
82
82
|
}
|
|
83
|
-
//#endregion
|
|
84
83
|
export { t as DEFAULT_RESPONSIVE_BREAKPOINTS, h as ResponsiveModeProvider, n as resolveViewportCategory, g as useResponsiveMode };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useAuthStore as e } from "../stores/auth.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/useRowTenant.ts
|
|
4
4
|
function n() {
|
|
5
5
|
let n = e((e) => e.activeTenant?.id), r = e((e) => e.user?.id), i = e((e) => e.user?.email);
|
|
6
6
|
return t(() => ({
|
|
@@ -20,5 +20,4 @@ function r(e) {
|
|
|
20
20
|
...r
|
|
21
21
|
}), [e, r]);
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { n as useConditionCaller, r as useRowTenant };
|
package/dist-lib/hooks/useSSE.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { cachedSchema as c } from "./useSchema.js";
|
|
5
|
-
import { SSEAuthError as l, streamEvents as u } from "../api/events.js";
|
|
1
|
+
import { useAuthStore as e } from "../stores/auth.js";
|
|
2
|
+
import { SSEAuthError as t, streamEvents as n } from "../api/events.js";
|
|
3
|
+
import { RefreshDeadError as r, ensureRefresh as i, getPersistentAuthFailureHandler as a } from "../api/client.js";
|
|
6
4
|
import "./useChildrenData.js";
|
|
7
5
|
import "./useActionData.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { ENTITY_AGGREGATE_KEY as
|
|
12
|
-
import { openResync as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { useRealtimeThresholds as o } from "./useRealtimeThresholds.js";
|
|
7
|
+
import { RECORD_DOCUMENTS_KEY as s } from "../lib/record-documents-key.js";
|
|
8
|
+
import { reconcileListCaches as c } from "../lib/realtime-reconcile.js";
|
|
9
|
+
import { ENTITY_AGGREGATE_KEY as l, entityOfRealtimeQueryKey as u, isEntityRowsKey as d, isRealtimeBackedQueryKey as f } from "../lib/realtime-query-keys.js";
|
|
10
|
+
import { openResync as p, useResyncEngine as m } from "../lib/realtime-resync.js";
|
|
11
|
+
import { isEntityLive as h, useRealtimeStore as g } from "../stores/realtime.js";
|
|
12
|
+
import { cachedSchema as _ } from "./useSchema.js";
|
|
13
|
+
import { awaitEmbedToken as v, clearEmbedToken as y, getEmbedToken as b, isEmbedTokenMode as x } from "../embed/token.js";
|
|
14
|
+
import { refetchWhenIdle as S } from "../lib/refetch-when-idle.js";
|
|
15
15
|
import { useEffect as C, useRef as w, useState as T } from "react";
|
|
16
16
|
import { useQueryClient as E } from "@tanstack/react-query";
|
|
17
|
-
|
|
17
|
+
// src/hooks/useSSE.ts
|
|
18
18
|
var D = 3e4, O = 1e3, k = 50, A = "replay_gap";
|
|
19
19
|
function j() {
|
|
20
20
|
return typeof document > "u" || document.visibilityState !== "hidden";
|
|
@@ -50,8 +50,8 @@ async function N(e, t, n) {
|
|
|
50
50
|
for (let [t, a] of r) e.invalidateQueries({ predicate: (e) => {
|
|
51
51
|
let n = e.queryKey;
|
|
52
52
|
return n[0] === "entity-children" && n[3] === t;
|
|
53
|
-
} }), t === "generated_document" && e.invalidateQueries({ predicate: (e) => e.queryKey[0] ===
|
|
54
|
-
if (n) for (let n of ["entity-count",
|
|
53
|
+
} }), t === "generated_document" && e.invalidateQueries({ predicate: (e) => e.queryKey[0] === s }), a.keyless ? F(e, t, a.keylessReason) : (U(e, t, [...a.rows.values()].map((e) => e.pk)), i.push(c(e, t, [...a.rows.values()], n).then((n) => {
|
|
54
|
+
if (n) for (let n of ["entity-count", l]) for (let r of e.getQueryCache().findAll({ queryKey: [n, t] })) S(e, r);
|
|
55
55
|
})));
|
|
56
56
|
await Promise.all(i);
|
|
57
57
|
}
|
|
@@ -84,7 +84,7 @@ function R(e, t) {
|
|
|
84
84
|
return e === L || t === L ? L : e ?? t;
|
|
85
85
|
}
|
|
86
86
|
function z(e, t) {
|
|
87
|
-
return e[1] === t &&
|
|
87
|
+
return e[1] === t && d(e);
|
|
88
88
|
}
|
|
89
89
|
function B(e) {
|
|
90
90
|
return JSON.stringify(Object.keys(e).sort().map((t) => [t, e[t]]));
|
|
@@ -112,21 +112,21 @@ function U(e, t, n) {
|
|
|
112
112
|
} });
|
|
113
113
|
}
|
|
114
114
|
function W(e) {
|
|
115
|
-
return
|
|
115
|
+
return f(e) || e[0] === "action-data" || e[0] === "action-data-cursor";
|
|
116
116
|
}
|
|
117
117
|
function G(e) {
|
|
118
118
|
I(e, W);
|
|
119
119
|
}
|
|
120
120
|
function K(e, t) {
|
|
121
|
-
let n =
|
|
122
|
-
return t.filter((e) =>
|
|
121
|
+
let n = _(e), r = g.getState().degradedEntities;
|
|
122
|
+
return t.filter((e) => h(n?.entities?.[e.entity]?.realtime, r, e.entity));
|
|
123
123
|
}
|
|
124
124
|
function q(e) {
|
|
125
|
-
let t =
|
|
125
|
+
let t = _(e), n = g.getState().degradedEntities;
|
|
126
126
|
e.invalidateQueries({
|
|
127
127
|
predicate: (e) => {
|
|
128
|
-
let r =
|
|
129
|
-
return r !== null && !
|
|
128
|
+
let r = u(e.queryKey);
|
|
129
|
+
return r !== null && !h(t?.entities?.[r]?.realtime, n, r);
|
|
130
130
|
},
|
|
131
131
|
refetchType: "active"
|
|
132
132
|
});
|
|
@@ -135,33 +135,33 @@ function J(e, t) {
|
|
|
135
135
|
return e.snapshotPoint !== null && t !== void 0 && Number(t) > e.snapshotPoint;
|
|
136
136
|
}
|
|
137
137
|
function Y() {
|
|
138
|
-
let
|
|
139
|
-
|
|
140
|
-
let
|
|
141
|
-
if (!
|
|
142
|
-
|
|
138
|
+
let s = e((e) => e.isAuthenticated), c = e((e) => e.activeTenant?.id ?? ""), l = E(), u = w(null), d = w(""), f = w(""), h = w(Promise.resolve()), _ = w(0), S = M(), T = w(!S);
|
|
139
|
+
m(l), o(), C(() => {
|
|
140
|
+
let o = g.getState();
|
|
141
|
+
if (!s) {
|
|
142
|
+
d.current = "", f.current = "", T.current = !S, o.clearConnectionInterruption();
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
if (!S) {
|
|
146
|
-
T.current = !0,
|
|
146
|
+
T.current = !0, u.current?.abort(), u.current = null, o.clearConnectionInterruption();
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
let
|
|
151
|
-
|
|
149
|
+
o.holdConnectionInterruption(), T.current && (T.current = !1, d.current && q(l)), f.current !== c && (d.current = "", f.current = c);
|
|
150
|
+
let m = !0, C = 0, w = null, E = [], j = null, M = null, P = (e) => {
|
|
151
|
+
h.current = h.current.then(e).catch((e) => {
|
|
152
152
|
console.error("realtime: applying a change batch failed", e);
|
|
153
153
|
});
|
|
154
154
|
}, F = (e, t) => {
|
|
155
|
-
|
|
155
|
+
f.current === t && (d.current = e);
|
|
156
156
|
}, I = (e) => {
|
|
157
157
|
if (!e) return;
|
|
158
158
|
L();
|
|
159
|
-
let t =
|
|
159
|
+
let t = f.current;
|
|
160
160
|
P(() => F(e, t));
|
|
161
161
|
}, L = () => {
|
|
162
162
|
if (j !== null && (clearTimeout(j), j = null), E.length === 0) return;
|
|
163
|
-
let e = E.splice(0, E.length), t =
|
|
164
|
-
P(() => N(
|
|
163
|
+
let e = E.splice(0, E.length), t = u.current?.signal, n = f.current;
|
|
164
|
+
P(() => N(l, K(l, e), t).finally(() => {
|
|
165
165
|
for (let t of e) t.eventID && F(t.eventID, n);
|
|
166
166
|
}));
|
|
167
167
|
}, R = () => {
|
|
@@ -170,138 +170,137 @@ function Y() {
|
|
|
170
170
|
M !== null && (clearTimeout(M), M = null);
|
|
171
171
|
}, B = (e) => {
|
|
172
172
|
z();
|
|
173
|
-
let t =
|
|
173
|
+
let t = g.getState().thresholds;
|
|
174
174
|
t !== null && t !== "unreadable" && (M = setTimeout(() => {
|
|
175
|
-
M = null,
|
|
175
|
+
M = null, m && w === e && (e.silent = !0, g.getState().holdConnectionInterruption());
|
|
176
176
|
}, t.silenceMs));
|
|
177
177
|
}, V = (e) => {
|
|
178
|
-
|
|
179
|
-
}, H =
|
|
178
|
+
m && w === e && e.stated && (e.silent && (e.silent = !1, g.getState().clearConnectionInterruption()), B(e));
|
|
179
|
+
}, H = g.subscribe((e, t) => {
|
|
180
180
|
e.thresholds !== t.thresholds && w?.stated && !w.silent && B(w);
|
|
181
181
|
}), U = (e) => {
|
|
182
|
-
let t =
|
|
182
|
+
let t = g.getState(), n = new Set(e), r = /* @__PURE__ */ new Map();
|
|
183
183
|
for (let [e, { mark: i }] of t.degradedEntities) n.has(e) || r.set(e, i);
|
|
184
184
|
let i = [...n].filter((e) => !t.degradedEntities.has(e));
|
|
185
185
|
for (let e of n) t.markDegraded(e);
|
|
186
|
-
r.size > 0 &&
|
|
186
|
+
r.size > 0 && p(l, {
|
|
187
187
|
scope: {
|
|
188
188
|
kind: "entities",
|
|
189
189
|
entities: new Set(r.keys())
|
|
190
190
|
},
|
|
191
191
|
jitter: !0,
|
|
192
192
|
carriedMarks: r
|
|
193
|
-
}), i.length > 0 && N(
|
|
193
|
+
}), i.length > 0 && N(l, i.map((e) => ({
|
|
194
194
|
entity: e,
|
|
195
195
|
action: "updated",
|
|
196
196
|
ids: []
|
|
197
197
|
})));
|
|
198
198
|
};
|
|
199
199
|
async function W() {
|
|
200
|
-
for (;
|
|
201
|
-
let
|
|
202
|
-
|
|
203
|
-
let
|
|
204
|
-
seq: ++
|
|
205
|
-
presented:
|
|
200
|
+
for (; m;) {
|
|
201
|
+
let o = new AbortController();
|
|
202
|
+
u.current = o;
|
|
203
|
+
let s = x(), c = s ? b() : null, f = {
|
|
204
|
+
seq: ++_.current,
|
|
205
|
+
presented: d.current !== "",
|
|
206
206
|
stated: !1,
|
|
207
207
|
silent: !1,
|
|
208
208
|
snapshotPoint: null
|
|
209
209
|
};
|
|
210
|
-
w =
|
|
211
|
-
let
|
|
212
|
-
|
|
210
|
+
w = f;
|
|
211
|
+
let h = g.getState();
|
|
212
|
+
h.holdConnectionInterruption(), f.presented ? h.startReplay() : h.endReplay();
|
|
213
213
|
let S = /* @__PURE__ */ new Set();
|
|
214
214
|
try {
|
|
215
|
-
for await (let
|
|
216
|
-
signal:
|
|
217
|
-
lastEventID:
|
|
218
|
-
bearerToken:
|
|
219
|
-
credentials:
|
|
220
|
-
onActivity: () => V(
|
|
215
|
+
for await (let t of n({
|
|
216
|
+
signal: o.signal,
|
|
217
|
+
lastEventID: d.current,
|
|
218
|
+
bearerToken: c ?? void 0,
|
|
219
|
+
credentials: s ? "omit" : void 0,
|
|
220
|
+
onActivity: () => V(f)
|
|
221
221
|
})) {
|
|
222
|
-
if (!
|
|
223
|
-
let
|
|
224
|
-
if (
|
|
225
|
-
G(
|
|
222
|
+
if (!m) break;
|
|
223
|
+
let n = g.getState();
|
|
224
|
+
if (t.type === "session_refresh") {
|
|
225
|
+
G(l);
|
|
226
226
|
try {
|
|
227
|
-
|
|
227
|
+
s ? (y(), await v()) : await i(), l.invalidateQueries({ queryKey: ["schema"] }), e.getState().refreshMe();
|
|
228
228
|
} catch {}
|
|
229
229
|
break;
|
|
230
230
|
}
|
|
231
|
-
if (
|
|
232
|
-
C = 0,
|
|
233
|
-
let e =
|
|
234
|
-
e ?
|
|
235
|
-
} else if (
|
|
231
|
+
if (t.type === "snapshot_complete") {
|
|
232
|
+
C = 0, f.stated = !0, f.snapshotPoint = t.asOf ?? null, n.clearConnectionInterruption(), B(f);
|
|
233
|
+
let e = t.known && t.asOf !== void 0;
|
|
234
|
+
e ? n.clearRelayInterruption() : n.holdRelayInterruption(), f.presented || (t.asOf && I(String(t.asOf)), p(l, { scope: { kind: "all" } })), e && U(S ?? []), S = null;
|
|
235
|
+
} else if (t.type === "replay_complete") {
|
|
236
236
|
L();
|
|
237
|
-
let e =
|
|
237
|
+
let e = f.seq;
|
|
238
238
|
P(() => {
|
|
239
|
-
|
|
239
|
+
_.current === e && g.getState().endReplay();
|
|
240
240
|
});
|
|
241
|
-
} else if (
|
|
242
|
-
else if (
|
|
241
|
+
} else if (t.type === "checkpoint") I(t.eventID);
|
|
242
|
+
else if (t.type === "cache_reset") I(t.eventID), t.reason !== A && J(f, t.eventID) && n.holdRelayInterruption(), p(l, {
|
|
243
243
|
scope: { kind: "all" },
|
|
244
244
|
jitter: !0
|
|
245
245
|
});
|
|
246
|
-
else if (
|
|
247
|
-
if (I(
|
|
248
|
-
|
|
249
|
-
} else if (
|
|
246
|
+
else if (t.type === "realtime_streaming") {
|
|
247
|
+
if (I(t.eventID), !J(f, t.eventID)) continue;
|
|
248
|
+
n.clearRelayInterruption(), U(t.degraded);
|
|
249
|
+
} else if (t.type === "realtime_degraded") {
|
|
250
250
|
if (S !== null) {
|
|
251
|
-
S.add(
|
|
251
|
+
S.add(t.entity);
|
|
252
252
|
continue;
|
|
253
253
|
}
|
|
254
|
-
if (I(
|
|
255
|
-
|
|
256
|
-
entity:
|
|
254
|
+
if (I(t.eventID), !J(f, t.eventID)) continue;
|
|
255
|
+
n.markDegraded(t.entity), N(l, [{
|
|
256
|
+
entity: t.entity,
|
|
257
257
|
action: "updated",
|
|
258
258
|
ids: []
|
|
259
259
|
}]);
|
|
260
|
-
} else
|
|
261
|
-
entity:
|
|
262
|
-
action:
|
|
263
|
-
eventID:
|
|
264
|
-
ids:
|
|
265
|
-
objects:
|
|
266
|
-
reason:
|
|
260
|
+
} else t.type === "entity_changed" && (E.push({
|
|
261
|
+
entity: t.entity,
|
|
262
|
+
action: t.action,
|
|
263
|
+
eventID: t.eventID,
|
|
264
|
+
ids: t.ids,
|
|
265
|
+
objects: t.objects,
|
|
266
|
+
reason: t.reason
|
|
267
267
|
}), R());
|
|
268
268
|
}
|
|
269
|
-
} catch (
|
|
270
|
-
if (!
|
|
271
|
-
if (
|
|
272
|
-
if (
|
|
273
|
-
|
|
269
|
+
} catch (e) {
|
|
270
|
+
if (!m || e instanceof DOMException && e.name === "AbortError") break;
|
|
271
|
+
if (e instanceof t) {
|
|
272
|
+
if (g.getState().holdConnectionInterruption(), z(), s) try {
|
|
273
|
+
y(), await v(), C = 0;
|
|
274
274
|
continue;
|
|
275
275
|
} catch {
|
|
276
|
-
|
|
276
|
+
a()();
|
|
277
277
|
return;
|
|
278
278
|
}
|
|
279
279
|
try {
|
|
280
|
-
await
|
|
280
|
+
await i(), C = 0;
|
|
281
281
|
continue;
|
|
282
282
|
} catch (e) {
|
|
283
|
-
if (e instanceof
|
|
284
|
-
|
|
283
|
+
if (e instanceof r) {
|
|
284
|
+
a()();
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
if (z(), !
|
|
291
|
-
|
|
290
|
+
if (z(), !m) break;
|
|
291
|
+
g.getState().holdConnectionInterruption();
|
|
292
292
|
let T = Math.min(O * 2 ** C, D), k = T * .5 * Math.random();
|
|
293
293
|
await new Promise((e) => setTimeout(e, T + k)), C++;
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
return W(), () => {
|
|
297
|
-
|
|
297
|
+
m = !1, w = null, u.current?.abort(), u.current = null, z(), H(), L();
|
|
298
298
|
};
|
|
299
299
|
}, [
|
|
300
|
+
s,
|
|
300
301
|
c,
|
|
301
|
-
|
|
302
|
-
m,
|
|
302
|
+
l,
|
|
303
303
|
S
|
|
304
304
|
]);
|
|
305
305
|
}
|
|
306
|
-
//#endregion
|
|
307
306
|
export { N as applyEntityChanges, G as evictEntityBackedQueries, K as liveEntityChanges, q as refetchQueriesReplayDoesNotCover, P as settleOwnWrite, Y as useSSE };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { fetchSchema as e } from "../api/schema.js";
|
|
2
|
+
import { useEmbed as t } from "../embed/EmbedContext.js";
|
|
3
|
+
import { useAuthStore as n } from "../stores/auth.js";
|
|
4
|
+
import { sameAudience as r, sessionCaller as i } from "../api/audience.js";
|
|
5
5
|
import { useEffect as a } from "react";
|
|
6
6
|
import { useQuery as o, useQueryClient as s } from "@tanstack/react-query";
|
|
7
|
-
|
|
7
|
+
// src/hooks/useSchema.ts
|
|
8
8
|
var c = ["schema"];
|
|
9
|
-
function l(
|
|
10
|
-
if (
|
|
9
|
+
function l(e, t) {
|
|
10
|
+
if (e && t !== void 0 && r(e.audience, t)) return e.schema;
|
|
11
11
|
}
|
|
12
12
|
function u(e) {
|
|
13
|
-
return l(e.getQueryData(c),
|
|
13
|
+
return l(e.getQueryData(c), i(n.getState()));
|
|
14
14
|
}
|
|
15
15
|
function d(e, t) {
|
|
16
16
|
return {
|
|
@@ -27,22 +27,22 @@ function p(e) {
|
|
|
27
27
|
function m(e) {
|
|
28
28
|
if (e.rereading) return;
|
|
29
29
|
e.rereading = !0;
|
|
30
|
-
let t =
|
|
30
|
+
let t = n.getState();
|
|
31
31
|
(t.isAuthenticated ? t.reloadSession : t.recheckSession)().finally(() => {
|
|
32
|
-
e.rereadFor =
|
|
32
|
+
e.rereadFor = n.getState().identitySince, e.rereading = !1;
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
function h() {
|
|
36
|
-
let
|
|
37
|
-
isLoading:
|
|
36
|
+
let r = n((e) => e.isLoading), u = n((e) => e.isAuthenticated), d = n((e) => e.user), f = n((e) => e.activeTenant), h = n((e) => e.identitySince), g = i({
|
|
37
|
+
isLoading: r,
|
|
38
38
|
isAuthenticated: u,
|
|
39
39
|
user: d,
|
|
40
40
|
activeTenant: f
|
|
41
|
-
}), _ =
|
|
41
|
+
}), _ = n((e) => e.sessionPresumed), v = t().enabled, y = p(s()), b = o({
|
|
42
42
|
queryKey: c,
|
|
43
|
-
queryFn:
|
|
43
|
+
queryFn: e,
|
|
44
44
|
staleTime: Infinity,
|
|
45
|
-
enabled: v ? u : _ || !
|
|
45
|
+
enabled: v ? u : _ || !r
|
|
46
46
|
}), x = b.data, S = l(x, g), C = x !== void 0 && g !== void 0 && S === void 0, w = C && x.requestedAt <= h, { refetch: T, isFetching: E } = b, D = C && !w, O = y.rereadFor === h;
|
|
47
47
|
return a(() => {
|
|
48
48
|
w && !E && y.refetchedFor !== h && (y.refetchedFor = h, T({ cancelRefetch: !1 }));
|
|
@@ -64,5 +64,4 @@ function h() {
|
|
|
64
64
|
refetch: T
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
export { c as SCHEMA_QUERY_KEY, u as cachedSchema, d as schemaAnswerFor, l as schemaFor, t as sessionCaller, h as useSchema };
|
|
67
|
+
export { c as SCHEMA_QUERY_KEY, u as cachedSchema, d as schemaAnswerFor, l as schemaFor, i as sessionCaller, h as useSchema };
|