@declarion/react 0.142.0 → 0.147.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{Icons-Dzl-AkD_.d.ts → Icons-BdXCxyw3.d.ts} +0 -4
- package/dist-lib/api/access-expiry.js +1 -2
- package/dist-lib/api/agents.js +1 -2
- package/dist-lib/api/audience.js +1 -2
- package/dist-lib/api/auth-redirect.js +1 -2
- package/dist-lib/api/auth.js +1 -2
- package/dist-lib/api/batch.js +1 -2
- package/dist-lib/api/client.js +27 -28
- package/dist-lib/api/data.js +23 -24
- package/dist-lib/api/entities.js +36 -37
- package/dist-lib/api/events.js +6 -7
- package/dist-lib/api/fileReferences.js +1 -2
- package/dist-lib/api/params.js +1 -2
- package/dist-lib/api/properties.js +1 -2
- package/dist-lib/api/request-bounds.js +1 -2
- package/dist-lib/api/schema.js +5 -6
- package/dist-lib/api/session-renewal.js +6 -7
- package/dist-lib/api/status.js +1 -2
- package/dist-lib/app.js +154 -155
- package/dist-lib/components/actions/ActionButton.js +32 -33
- package/dist-lib/components/actions/ActionDialog.js +85 -86
- package/dist-lib/components/actions/ActionResultDialog.impl.js +48 -49
- package/dist-lib/components/actions/ActionResultDialog.js +1 -2
- package/dist-lib/components/actions/ActionRunner.js +96 -97
- package/dist-lib/components/actions/ObjectActionBar.js +49 -50
- package/dist-lib/components/actions/PropertyGridEditor.js +50 -51
- package/dist-lib/components/actions/ResponsiveActionBar.js +127 -128
- package/dist-lib/components/actions/RowActionsKebab.js +27 -28
- package/dist-lib/components/agents/AgentChatPanel.impl.js +317 -318
- package/dist-lib/components/agents/AgentChatPanel.js +1 -2
- package/dist-lib/components/agents/AgentConversationDrawer.js +6 -7
- package/dist-lib/components/agents/AgentElicitForm.js +13 -14
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +1 -2
- package/dist-lib/components/agents/AgentOpenFollower.js +1 -2
- package/dist-lib/components/agents/AgentPicker.js +1 -2
- package/dist-lib/components/agents/ChatAttachments.js +22 -23
- package/dist-lib/components/agents/transcript-runs.js +1 -2
- package/dist-lib/components/chrome/AssociationTabs.js +44 -45
- package/dist-lib/components/chrome/AuditMetaStrip.js +1 -2
- package/dist-lib/components/chrome/Breadcrumbs.js +1 -2
- package/dist-lib/components/chrome/HighlightsStrip.js +1 -2
- package/dist-lib/components/chrome/PageHeader.js +12 -13
- package/dist-lib/components/chrome/PageShell.js +1 -2
- package/dist-lib/components/chrome/RecordHeader.js +1 -2
- package/dist-lib/components/chrome/headerActionZone.js +0 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +463 -464
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +43 -44
- package/dist-lib/components/detail-layout/ChildrenBlock.js +24 -25
- package/dist-lib/components/detail-layout/ChildrenCards.js +29 -30
- package/dist-lib/components/detail-layout/ChildrenList.js +23 -24
- package/dist-lib/components/detail-layout/ChildrenTable.js +50 -51
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +164 -165
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +14 -15
- package/dist-lib/components/detail-layout/DetailHighlights.js +23 -24
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +76 -77
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +90 -91
- package/dist-lib/components/detail-layout/ErrorSummary.js +7 -8
- package/dist-lib/components/detail-layout/EvidenceBlock.js +15 -16
- package/dist-lib/components/detail-layout/FieldRow.js +11 -12
- package/dist-lib/components/detail-layout/FieldsBlock.js +31 -32
- package/dist-lib/components/detail-layout/LayoutColumn.js +1 -2
- package/dist-lib/components/detail-layout/LayoutRenderer.js +11 -12
- package/dist-lib/components/detail-layout/LayoutRow.js +1 -2
- package/dist-lib/components/detail-layout/LayoutTabs.js +23 -24
- package/dist-lib/components/detail-layout/PropertiesBlock.js +38 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +28 -29
- package/dist-lib/components/detail-layout/SectionBlock.js +9 -10
- package/dist-lib/components/detail-layout/StatusesBlock.js +1 -2
- package/dist-lib/components/detail-layout/TimelineComposer.js +19 -20
- package/dist-lib/components/detail-layout/blockMeta.js +1 -2
- package/dist-lib/components/detail-layout/useManualColumnResize.js +1 -2
- package/dist-lib/components/detail-layout/useQuickAdd.js +21 -22
- package/dist-lib/components/detail-layout/visibility.js +1 -2
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +25 -26
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +18 -19
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +10 -11
- package/dist-lib/components/detail-layout/widgets/builtins.js +1 -2
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +1 -2
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +1 -2
- package/dist-lib/components/detail-layout/widgets/registry.js +1 -2
- package/dist-lib/components/fields/BoolField.js +1 -2
- package/dist-lib/components/fields/EmailField.js +5 -6
- package/dist-lib/components/fields/EnumField.js +7 -8
- package/dist-lib/components/fields/FileReferenceField.js +18 -19
- package/dist-lib/components/fields/IntArrayField.js +11 -12
- package/dist-lib/components/fields/JsonEditor.js +1 -2
- package/dist-lib/components/fields/JsonField.js +1 -2
- package/dist-lib/components/fields/MultilangArrayField.js +22 -23
- package/dist-lib/components/fields/MultilangField.js +13 -14
- package/dist-lib/components/fields/MultilangTextField.js +13 -14
- package/dist-lib/components/fields/NumberField.js +5 -6
- package/dist-lib/components/fields/PasswordField.js +1 -2
- package/dist-lib/components/fields/PhoneField.js +24 -25
- package/dist-lib/components/fields/RefCombobox.js +42 -43
- package/dist-lib/components/fields/RefField.js +14 -15
- package/dist-lib/components/fields/RichTextField.js +29 -30
- package/dist-lib/components/fields/SecretField.js +1 -2
- package/dist-lib/components/fields/StringArrayField.js +29 -30
- package/dist-lib/components/fields/StringField.js +12 -13
- package/dist-lib/components/fields/StructureField.js +60 -61
- package/dist-lib/components/fields/TextField.js +18 -19
- package/dist-lib/components/fields/TimestampField.js +17 -18
- package/dist-lib/components/fields/UrlField.js +5 -6
- package/dist-lib/components/fields/cells/factories/badge.js +5 -6
- package/dist-lib/components/fields/cells/factories/boolPill.js +1 -2
- package/dist-lib/components/fields/cells/factories/code.js +1 -2
- package/dist-lib/components/fields/cells/factories/date.js +1 -2
- package/dist-lib/components/fields/cells/factories/email.js +1 -2
- package/dist-lib/components/fields/cells/factories/emptyCell.js +0 -1
- package/dist-lib/components/fields/cells/factories/fileReference.js +1 -2
- package/dist-lib/components/fields/cells/factories/host-icons.js +1 -2
- package/dist-lib/components/fields/cells/factories/json.js +1 -2
- package/dist-lib/components/fields/cells/factories/link.js +10 -11
- package/dist-lib/components/fields/cells/factories/markdown.js +14 -15
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +1 -2
- package/dist-lib/components/fields/cells/factories/money.js +1 -2
- package/dist-lib/components/fields/cells/factories/multilangInline.js +1 -2
- package/dist-lib/components/fields/cells/factories/nextRun.js +8 -9
- package/dist-lib/components/fields/cells/factories/number.js +1 -2
- package/dist-lib/components/fields/cells/factories/passwordMask.js +1 -2
- package/dist-lib/components/fields/cells/factories/phone.js +1 -2
- package/dist-lib/components/fields/cells/factories/refLink.js +13 -14
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +16 -17
- package/dist-lib/components/fields/cells/factories/statusPill.js +5 -6
- package/dist-lib/components/fields/cells/factories/tagList.js +6 -7
- package/dist-lib/components/fields/cells/factories/text.js +1 -2
- package/dist-lib/components/fields/cells/factories/timestamp.js +1 -2
- package/dist-lib/components/fields/cells/factories/url-helpers.js +1 -2
- package/dist-lib/components/fields/cells/factories/url.js +13 -14
- package/dist-lib/components/fields/cells/registry.js +1 -2
- package/dist-lib/components/fields/index.js +19 -20
- package/dist-lib/components/fields/langMap.js +1 -2
- package/dist-lib/components/fields/secretValue.js +1 -2
- package/dist-lib/components/file-widgets/CircleImage.js +1 -2
- package/dist-lib/components/file-widgets/DocumentCard.js +101 -102
- package/dist-lib/components/file-widgets/FileList.js +35 -36
- package/dist-lib/components/file-widgets/Grid.js +119 -120
- package/dist-lib/components/file-widgets/GridLazy.js +1 -2
- package/dist-lib/components/file-widgets/ImageWidget.js +189 -190
- package/dist-lib/components/file-widgets/LabeledSlots.js +14 -15
- package/dist-lib/components/file-widgets/SquareImage.js +1 -2
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +1 -2
- package/dist-lib/components/file-widgets/UploadFailureText.js +1 -2
- package/dist-lib/components/file-widgets/WideBanner.js +1 -2
- package/dist-lib/components/file-widgets/builtins.js +1 -2
- package/dist-lib/components/file-widgets/cropper.js +1 -2
- package/dist-lib/components/file-widgets/draft-scope.js +1 -2
- package/dist-lib/components/file-widgets/helpers.js +1 -2
- package/dist-lib/components/file-widgets/host.js +33 -34
- package/dist-lib/components/file-widgets/payload.js +1 -2
- package/dist-lib/components/file-widgets/registry.js +1 -2
- package/dist-lib/components/file-widgets/upload.js +41 -42
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +12 -13
- package/dist-lib/components/file-widgets/useFileSelection.js +1 -2
- package/dist-lib/components/file-widgets/value.js +1 -2
- package/dist-lib/components/filters/FilterChips.js +15 -16
- package/dist-lib/components/filters/FilterConditionValue.js +15 -16
- package/dist-lib/components/filters/FilterDrawer.js +141 -142
- package/dist-lib/components/filters/FilterOmittedNotice.js +1 -2
- package/dist-lib/components/filters/filter-op-label.js +1 -2
- package/dist-lib/components/layout/CommandPalette.impl.js +24 -25
- package/dist-lib/components/layout/CommandPalette.js +1 -2
- package/dist-lib/components/layout/DirtyTabsCloseDialog.impl.js +15 -16
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +1 -2
- package/dist-lib/components/layout/ImpersonationBanner.impl.js +6 -7
- package/dist-lib/components/layout/ImpersonationBanner.js +1 -2
- package/dist-lib/components/layout/ImpersonationFrame.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.impl.js +4 -5
- package/dist-lib/components/layout/ImpersonationStartModal.js +1 -2
- package/dist-lib/components/layout/Layout.js +132 -140
- package/dist-lib/components/layout/Rail.js +11 -12
- package/dist-lib/components/layout/Sidebar.js +60 -61
- package/dist-lib/components/layout/TabStrip.js +66 -67
- package/dist-lib/components/layout/TenantChip.js +21 -22
- package/dist-lib/components/layout/TopBar.js +89 -90
- package/dist-lib/components/layout/tab-close.js +1 -2
- package/dist-lib/components/list/ColumnPicker.js +35 -36
- package/dist-lib/components/list/InlineEditCell.js +22 -23
- package/dist-lib/components/list/PeekFieldCell.js +7 -8
- package/dist-lib/components/list/QuickPeek.js +29 -30
- package/dist-lib/components/list/ViewSwitcher.js +44 -45
- package/dist-lib/components/list/peekDraftStore.js +1 -2
- package/dist-lib/components/pages/AdminCatalogPage.impl.js +59 -60
- package/dist-lib/components/pages/AdminCatalogPage.js +1 -2
- package/dist-lib/components/pages/DocumentsMenu.js +53 -54
- package/dist-lib/components/pages/ExportMenu.js +37 -38
- package/dist-lib/components/pages/NoScreensPage.impl.js +5 -6
- package/dist-lib/components/pages/NoScreensPage.js +1 -2
- package/dist-lib/components/pages/NotFoundPage.impl.js +7 -8
- package/dist-lib/components/pages/NotFoundPage.js +1 -2
- package/dist-lib/components/pages/RecordDocumentsPanel.js +40 -41
- package/dist-lib/components/pages/RecordNotesPanel.js +43 -44
- package/dist-lib/components/pages/RecordPanels.js +1 -2
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +6 -7
- package/dist-lib/components/pages/SSOCallbackPage.js +1 -2
- package/dist-lib/components/pages/SmartDetailPage.impl.js +501 -502
- package/dist-lib/components/pages/SmartDetailPage.js +1 -2
- package/dist-lib/components/pages/SmartListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartListPage.js +1 -2
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +316 -317
- package/dist-lib/components/pages/SmartRecordListPage.js +1 -2
- package/dist-lib/components/pages/auth/AuthShell.js +14 -15
- package/dist-lib/components/pages/auth/CodeInput.js +0 -1
- package/dist-lib/components/pages/auth/Forgot.impl.js +12 -13
- package/dist-lib/components/pages/auth/Forgot.js +1 -2
- package/dist-lib/components/pages/auth/Reset.impl.js +20 -21
- package/dist-lib/components/pages/auth/Reset.js +1 -2
- package/dist-lib/components/pages/auth/SignIn.js +44 -45
- package/dist-lib/components/pages/auth/SignUp.impl.js +35 -36
- package/dist-lib/components/pages/auth/SignUp.js +1 -2
- package/dist-lib/components/pages/auth/SignUpCode.js +17 -18
- package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -10
- package/dist-lib/components/pages/auth/TwoFA.js +1 -2
- package/dist-lib/components/pages/auth/icons.js +1 -2
- package/dist-lib/components/pages/exportRequest.js +1 -2
- package/dist-lib/components/pages/list/DataCell.js +1 -2
- package/dist-lib/components/pages/list/DeleteViewDialog.js +5 -6
- package/dist-lib/components/pages/list/ListCardRow.js +53 -54
- package/dist-lib/components/pages/list/ListCardsBody.js +1 -2
- package/dist-lib/components/pages/list/ListFloatbar.js +25 -26
- package/dist-lib/components/pages/list/ListFooter.js +17 -18
- package/dist-lib/components/pages/list/ListHeader.js +31 -32
- package/dist-lib/components/pages/list/ListNoRows.js +32 -33
- package/dist-lib/components/pages/list/ListTable.js +29 -30
- package/dist-lib/components/pages/list/ListTableRow.js +1 -2
- package/dist-lib/components/pages/list/ListToolbar.js +58 -59
- package/dist-lib/components/pages/list/ListUrlBanner.js +1 -2
- package/dist-lib/components/pages/list/RowActionsCell.js +6 -7
- package/dist-lib/components/pages/list/RowContextMenu.js +1 -2
- package/dist-lib/components/pages/list/SaveViewDialog.js +5 -6
- package/dist-lib/components/pages/list/SortHeaderMenu.js +25 -26
- package/dist-lib/components/pages/list/cardProjection.js +16 -17
- package/dist-lib/components/pages/list/column-sizing.js +1 -2
- package/dist-lib/components/pages/list/columns.js +74 -75
- package/dist-lib/components/pages/list/filter-meta.js +1 -2
- package/dist-lib/components/pages/list/page-size.js +1 -2
- package/dist-lib/components/pages/list/sortable-header.js +1 -2
- package/dist-lib/components/pages/list/table-features.js +1 -2
- package/dist-lib/components/pages/list/use-filter-value-labels.js +15 -16
- package/dist-lib/components/pages/list/useActiveView.js +1 -2
- package/dist-lib/components/pages/list/useHeaderReorder.js +1 -2
- package/dist-lib/components/pages/list/useListColumnLayout.js +6 -7
- package/dist-lib/components/pages/list/useListFilterPresentation.js +1 -2
- package/dist-lib/components/pages/list/useListQuery.js +1 -2
- package/dist-lib/components/pages/list/useListRowInteraction.js +37 -38
- package/dist-lib/components/pages/list/useListSelection.js +16 -17
- package/dist-lib/components/pages/list/useListSort.js +1 -2
- package/dist-lib/components/pages/list/useListViews.js +31 -32
- package/dist-lib/components/pages/list/useRowMenu.js +20 -21
- package/dist-lib/components/pages/list/visible-filters.js +1 -2
- package/dist-lib/components/pages/profile/Preferences.impl.js +44 -45
- package/dist-lib/components/pages/profile/Preferences.js +1 -2
- package/dist-lib/components/pages/profile/Profile.impl.js +223 -224
- package/dist-lib/components/pages/profile/Profile.js +1 -2
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +133 -134
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +1 -2
- package/dist-lib/components/params/ParamsBlock.js +30 -31
- package/dist-lib/components/params/param-editors.js +58 -59
- package/dist-lib/components/primitives/Avatar.js +1 -2
- package/dist-lib/components/primitives/BoolToggle.js +1 -2
- package/dist-lib/components/primitives/BrandGlyph.js +1 -2
- package/dist-lib/components/primitives/BrandLogo.js +1 -2
- package/dist-lib/components/primitives/Btn.js +1 -2
- package/dist-lib/components/primitives/Check.js +1 -2
- package/dist-lib/components/primitives/Chip.js +1 -2
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +1 -2
- package/dist-lib/components/primitives/Dropdown.js +2 -3
- package/dist-lib/components/primitives/Fields.js +128 -129
- package/dist-lib/components/primitives/HoverCard.js +2 -3
- package/dist-lib/components/primitives/IconBtn.js +1 -2
- package/dist-lib/components/primitives/Icons.js +1 -2
- package/dist-lib/components/primitives/Kbd.js +1 -2
- package/dist-lib/components/primitives/MenuItem.js +1 -2
- package/dist-lib/components/primitives/Pill.js +1 -2
- package/dist-lib/components/primitives/RecordIdBadge.js +1 -2
- package/dist-lib/components/primitives/RetryButton.js +5 -6
- package/dist-lib/components/primitives/RowField.js +1 -2
- package/dist-lib/components/primitives/SectionCard.js +1 -2
- package/dist-lib/components/primitives/Spinner.js +1 -2
- package/dist-lib/components/primitives/StatTile.js +1 -2
- package/dist-lib/components/primitives/Tooltip.js +1 -2
- package/dist-lib/components/primitives/dataTableStyles.js +1 -2
- package/dist-lib/components/shared/BlankScreen.js +1 -2
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +20 -21
- package/dist-lib/components/shared/ChangePasswordDialog.js +1 -2
- package/dist-lib/components/shared/ConfirmDialog.js +7 -8
- package/dist-lib/components/shared/ConnectionNotice.js +1 -2
- package/dist-lib/components/shared/CopyButton.js +1 -2
- package/dist-lib/components/shared/DynamicIcon.js +1 -2
- package/dist-lib/components/shared/EmptyState.js +1 -2
- package/dist-lib/components/shared/ErrorBoundary.js +10 -11
- package/dist-lib/components/shared/LoadingSkeleton.js +1 -2
- package/dist-lib/components/shared/LucideIcon.js +1 -2
- package/dist-lib/components/shared/Markdown.js +1 -2
- package/dist-lib/components/shared/MarkdownRenderer.js +22 -23
- package/dist-lib/components/shared/ModalFrame.js +1 -2
- package/dist-lib/components/shared/RefreshControl.js +6 -7
- package/dist-lib/components/shared/StatusGroupsDisplay.js +16 -17
- package/dist-lib/components/shared/StatusStepper.js +1 -2
- package/dist-lib/components/shared/toast/DeclarionToast.js +1 -2
- package/dist-lib/components/shared/useOwnRefresh.js +1 -2
- package/dist-lib/embed/EmbedAuthBootstrap.js +30 -31
- package/dist-lib/embed/EmbedContext.js +1 -2
- package/dist-lib/embed/EmbedDirtyReporter.js +6 -7
- package/dist-lib/embed/EmbedHistoryTracker.js +1 -2
- package/dist-lib/embed/EmbedLocationReporter.js +11 -12
- package/dist-lib/embed/EmbedResizeReporter.js +9 -10
- package/dist-lib/embed/EmbedUnsavedGuard.js +5 -6
- package/dist-lib/embed/embed-dirty.js +1 -2
- package/dist-lib/embed/embed-history.js +1 -2
- package/dist-lib/embed/embed-nav-guard.js +1 -2
- package/dist-lib/embed/file-src.js +12 -13
- package/dist-lib/embed/handshake.js +1 -2
- package/dist-lib/embed/params.js +1 -2
- package/dist-lib/embed/protocol.js +1 -2
- package/dist-lib/embed/screen-location.js +1 -2
- package/dist-lib/embed/theme.js +1 -2
- package/dist-lib/embed/token.js +1 -2
- package/dist-lib/embed/useEmbedNavigate.js +25 -26
- package/dist-lib/embed/useGlobalLinkInterceptor.js +9 -10
- package/dist-lib/hooks/useActionData.js +1 -2
- package/dist-lib/hooks/useActiveTabFollowsRoute.js +7 -8
- package/dist-lib/hooks/useAgentConversation.js +122 -123
- package/dist-lib/hooks/useAggregate.js +1 -2
- package/dist-lib/hooks/useAllEntityData.js +9 -10
- package/dist-lib/hooks/useAssociatedData.js +1 -2
- package/dist-lib/hooks/useAuth.js +26 -27
- package/dist-lib/hooks/useBranding.js +1 -2
- package/dist-lib/hooks/useBrandingChrome.js +16 -17
- package/dist-lib/hooks/useChildrenData.js +4 -5
- package/dist-lib/hooks/useColumns.js +1 -2
- package/dist-lib/hooks/useConnectionNotice.js +16 -17
- package/dist-lib/hooks/useCurrentLocation.js +1 -2
- package/dist-lib/hooks/useCurrentScreen.js +1 -2
- package/dist-lib/hooks/useCursorEntityData.js +1 -2
- package/dist-lib/hooks/useDebounce.js +1 -2
- package/dist-lib/hooks/useDisplayTimeZone.js +4 -5
- package/dist-lib/hooks/useDocumentTitle.js +5 -6
- package/dist-lib/hooks/useEntity.js +1 -2
- package/dist-lib/hooks/useEntityData.js +1 -2
- package/dist-lib/hooks/useFileReferenceJSON.js +9 -10
- package/dist-lib/hooks/useFilters.js +5 -6
- package/dist-lib/hooks/useFollowAgentOpen.js +40 -41
- package/dist-lib/hooks/useImpersonation.js +15 -16
- package/dist-lib/hooks/useIntentPrefetch.js +6 -7
- package/dist-lib/hooks/useJsonSnapshot.js +1 -2
- package/dist-lib/hooks/useLanguage.js +11 -12
- package/dist-lib/hooks/useLiveObject.js +6 -7
- package/dist-lib/hooks/useLongPress.js +1 -2
- package/dist-lib/hooks/useMutations.js +31 -32
- package/dist-lib/hooks/useObject.js +1 -2
- package/dist-lib/hooks/useObjectStatus.js +4 -5
- package/dist-lib/hooks/usePageState.js +9 -10
- package/dist-lib/hooks/usePageStateRuntime.js +16 -17
- package/dist-lib/hooks/usePageStateTtl.js +1 -2
- package/dist-lib/hooks/useParams.js +58 -59
- package/dist-lib/hooks/useProperties.js +5 -6
- package/dist-lib/hooks/useRealtimeThresholds.js +4 -5
- package/dist-lib/hooks/useRefRecords.js +31 -32
- package/dist-lib/hooks/useRegisterScreenTab.js +12 -13
- package/dist-lib/hooks/useResponsiveMode.js +1 -2
- package/dist-lib/hooks/useRowTenant.js +1 -2
- package/dist-lib/hooks/useSSE.js +100 -101
- package/dist-lib/hooks/useSchema.js +16 -17
- package/dist-lib/hooks/useScreen.js +1 -2
- package/dist-lib/hooks/useScreenBack.js +17 -18
- package/dist-lib/hooks/useScreenTab.js +1 -2
- package/dist-lib/hooks/useTabNavigate.js +25 -26
- package/dist-lib/hooks/useTabSearchMirror.js +6 -7
- package/dist-lib/hooks/useTabTitle.js +10 -11
- package/dist-lib/hooks/useText.js +6 -7
- package/dist-lib/hooks/useTimelineData.js +5 -6
- package/dist-lib/hooks/useUiPreferences.js +31 -32
- package/dist-lib/hooks/useUnsavedInput.js +1 -2
- package/dist-lib/hooks/useVersionWatcher.js +16 -17
- package/dist-lib/hooks/useViews.js +16 -17
- package/dist-lib/hooks/useWindowConversation.js +1 -2
- package/dist-lib/{icon-registry-CUT4eF63.d.ts → icon-registry-BY2tt-GF.d.ts} +0 -2
- package/dist-lib/icons.d.ts +2 -4
- package/dist-lib/icons.js +5 -5
- package/dist-lib/index.d.ts +4 -272
- package/dist-lib/index.js +129 -129
- package/dist-lib/lib/action-dispatch.js +1 -2
- package/dist-lib/lib/actions.js +26 -27
- package/dist-lib/lib/anchor.js +1 -2
- package/dist-lib/lib/brand-tokens.js +1 -2
- package/dist-lib/lib/branding.js +1 -2
- package/dist-lib/lib/canonical-url.js +1 -2
- package/dist-lib/lib/capabilityPrefetch.js +1 -2
- package/dist-lib/lib/child-config.js +1 -2
- package/dist-lib/lib/children-validation.js +2 -3
- package/dist-lib/lib/date-text.js +1 -2
- package/dist-lib/lib/decimal-text.js +1 -2
- package/dist-lib/lib/display-value.js +1 -2
- package/dist-lib/lib/document-templates.js +1 -2
- package/dist-lib/lib/download.js +13 -14
- package/dist-lib/lib/evidence-verdict.js +1 -2
- package/dist-lib/lib/failure.js +4 -5
- package/dist-lib/lib/field-classification.js +1 -2
- package/dist-lib/lib/field-regions.js +1 -2
- package/dist-lib/lib/filter-evaluator.js +1 -2
- package/dist-lib/lib/filters.js +1 -2
- package/dist-lib/lib/format-count.js +1 -2
- package/dist-lib/lib/html-state.js +1 -2
- package/dist-lib/lib/language.js +1 -2
- package/dist-lib/lib/longPressGesture.js +0 -1
- package/dist-lib/lib/mass-edit.js +1 -2
- package/dist-lib/lib/money-text.js +1 -2
- package/dist-lib/lib/number-text.js +1 -2
- package/dist-lib/lib/page-inset.js +1 -2
- package/dist-lib/lib/phone.js +1 -2
- package/dist-lib/lib/profile.js +1 -2
- package/dist-lib/lib/query-retry.js +1 -2
- package/dist-lib/lib/quick-add.js +1 -2
- package/dist-lib/lib/read-display-state.js +1 -2
- package/dist-lib/lib/realtime-query-keys.js +2 -3
- package/dist-lib/lib/realtime-reconcile.js +32 -33
- package/dist-lib/lib/realtime-resync.js +40 -41
- package/dist-lib/lib/record-documents-key.js +1 -2
- package/dist-lib/lib/ref-choices.js +1 -2
- package/dist-lib/lib/refetch-when-idle.js +1 -2
- package/dist-lib/lib/rich-text.js +1 -2
- package/dist-lib/lib/role-label.js +1 -2
- package/dist-lib/lib/rowClickGesture.js +1 -2
- package/dist-lib/lib/safe-url.js +1 -2
- package/dist-lib/lib/schema-routing.js +1 -2
- package/dist-lib/lib/screen-back.js +1 -2
- package/dist-lib/lib/scroll-restoration.js +21 -22
- package/dist-lib/lib/shortcut.js +1 -2
- package/dist-lib/lib/size-value.js +1 -2
- package/dist-lib/lib/sort.js +1 -2
- package/dist-lib/lib/timestamp.js +1 -2
- package/dist-lib/lib/toast.js +1 -2
- package/dist-lib/lib/ui-actions.js +43 -44
- package/dist-lib/lib/utils.js +1 -2
- package/dist-lib/lib/variants.js +1 -2
- package/dist-lib/lib/versionTracker.js +26 -27
- package/dist-lib/lib/viewport-category.js +1 -2
- package/dist-lib/lib/window-election.js +1 -2
- package/dist-lib/stores/auth.js +32 -33
- package/dist-lib/stores/icon-registry.js +1 -2
- package/dist-lib/stores/list-layout.js +0 -1
- package/dist-lib/stores/page-state.js +1 -2
- package/dist-lib/stores/preferences.js +1 -2
- package/dist-lib/stores/realtime.js +1 -2
- package/dist-lib/stores/screen-registry.js +1 -2
- package/dist-lib/stores/tabs.js +1 -2
- package/dist-lib/test/seed-schema.js +4 -5
- package/dist-lib/testing.d.ts +2 -4
- package/dist-lib/testing.js +49 -50
- package/dist-lib/types/api.js +1 -2
- package/dist-lib/types/fieldType.js +1 -2
- package/dist-lib/types/ordmap.js +1 -2
- package/dist-lib/types/schema.js +1 -2
- package/dist-lib/{useResponsiveMode-C4MeAgoS.d.ts → useResponsiveMode-BElw02Gh.d.ts} +1 -19
- package/dist-lib/vite/index.d.ts +0 -2
- package/dist-lib/vite/index.js +1 -2
- package/package.json +11 -11
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { PUBLIC_PARAMS_QUERY_KEY as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { toast as e } from "../lib/toast.js";
|
|
2
|
+
import { useText as t } from "./useText.js";
|
|
3
|
+
import { failureTitle as n } from "../lib/failure.js";
|
|
4
|
+
import { useAuthStore as r } from "../stores/auth.js";
|
|
5
|
+
import { peekTenantLandingPath as i } from "../stores/tabs.js";
|
|
6
|
+
import { usePageStateStore as a } from "../stores/page-state.js";
|
|
7
|
+
import { PUBLIC_PARAMS_QUERY_KEY as o } from "./useParams.js";
|
|
8
|
+
import { SCHEMA_QUERY_KEY as s } from "./useSchema.js";
|
|
9
|
+
import { confirmSignup as c, login as l, signup as u, switchTenant as d } from "../api/auth.js";
|
|
10
10
|
import { useMutation as f, useQueryClient as p } from "@tanstack/react-query";
|
|
11
11
|
import { useNavigate as m } from "react-router";
|
|
12
|
-
|
|
13
|
-
var h = /* @__PURE__ */ new Set([
|
|
12
|
+
// src/hooks/useAuth.ts
|
|
13
|
+
var h = /* @__PURE__ */ new Set([s[0], o[0]]);
|
|
14
14
|
function g() {
|
|
15
|
-
let { user:
|
|
16
|
-
mutationFn: ({ email: e, password:
|
|
15
|
+
let { user: o, isAuthenticated: s, isLoading: g, activeTenant: _, tenants: v, setUser: y, loadTenants: b, logout: x } = r(), S = m(), C = p(), w = t("errors"), T = f({
|
|
16
|
+
mutationFn: ({ email: e, password: t, remember: n }) => l(e, t, n ?? !0),
|
|
17
17
|
onSuccess: (e) => {
|
|
18
18
|
y(e.user, e.tenant), b();
|
|
19
19
|
}
|
|
20
20
|
}), E = f({
|
|
21
|
-
mutationFn: ({ email: e, password: t, displayName:
|
|
21
|
+
mutationFn: ({ email: e, password: t, displayName: n }) => u(e, t, n),
|
|
22
22
|
onSuccess: (e) => {
|
|
23
23
|
e.verification_required || (y(e.user, e.tenant), b());
|
|
24
24
|
},
|
|
25
|
-
onError: (
|
|
26
|
-
|
|
25
|
+
onError: (t) => {
|
|
26
|
+
e.error(n(w, t));
|
|
27
27
|
}
|
|
28
28
|
}), D = f({
|
|
29
|
-
mutationFn: ({ email:
|
|
29
|
+
mutationFn: ({ email: e, code: t }) => c(e, t),
|
|
30
30
|
onSuccess: (e) => {
|
|
31
31
|
y(e.user, e.tenant), b();
|
|
32
32
|
}
|
|
33
33
|
}), O = f({
|
|
34
|
-
mutationFn: (e) =>
|
|
34
|
+
mutationFn: (e) => d(e),
|
|
35
35
|
onSuccess: (e) => {
|
|
36
|
-
let t = e.tenant?.id, n = e.user?.id, r = t && n &&
|
|
36
|
+
let t = e.tenant?.id, n = e.user?.id, r = t && n && i(t, n) || "/";
|
|
37
37
|
window.location.assign(r);
|
|
38
38
|
},
|
|
39
|
-
onError: (
|
|
40
|
-
|
|
39
|
+
onError: (t) => {
|
|
40
|
+
e.error(n(w, t));
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
return {
|
|
44
|
-
user:
|
|
45
|
-
isAuthenticated:
|
|
44
|
+
user: o,
|
|
45
|
+
isAuthenticated: s,
|
|
46
46
|
isLoading: g,
|
|
47
47
|
activeTenant: _,
|
|
48
48
|
tenants: v,
|
|
@@ -51,9 +51,9 @@ function g() {
|
|
|
51
51
|
confirmSignup: D.mutate,
|
|
52
52
|
switchTenant: O.mutate,
|
|
53
53
|
logout: async () => {
|
|
54
|
-
let
|
|
55
|
-
C.removeQueries({ predicate: (e) => !h.has(e.queryKey[0]) }), C.getMutationCache().clear(),
|
|
56
|
-
|
|
54
|
+
let t = x();
|
|
55
|
+
C.removeQueries({ predicate: (e) => !h.has(e.queryKey[0]) }), C.getMutationCache().clear(), a.getState().clear(), S("/login"), await t.catch((t) => {
|
|
56
|
+
e.error(n(w, t));
|
|
57
57
|
});
|
|
58
58
|
},
|
|
59
59
|
isLoginPending: T.isPending,
|
|
@@ -62,5 +62,4 @@ function g() {
|
|
|
62
62
|
isSwitchingTenant: O.isPending
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
//#endregion
|
|
66
65
|
export { g as useAuth };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffectiveParam as e } from "./useParams.js";
|
|
2
2
|
import { BRANDING_PARAM_CODE as t, brandingFromValue as n } from "../lib/branding.js";
|
|
3
|
-
|
|
3
|
+
// src/hooks/useBranding.ts
|
|
4
4
|
function r() {
|
|
5
5
|
let r = e(t);
|
|
6
6
|
return {
|
|
@@ -14,5 +14,4 @@ function i() {
|
|
|
14
14
|
function a() {
|
|
15
15
|
return r().branding?.chrome;
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { r as useBranding, a as useBrandingChromeValue, i as useBrandingIdentity };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { useEmbed as e } from "../embed/EmbedContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useBrandingChromeValue as t } from "./useBranding.js";
|
|
3
|
+
import { DEFAULT_RESPONSIVE_BREAKPOINTS as n } from "../lib/viewport-category.js";
|
|
4
4
|
import { useMemo as r } from "react";
|
|
5
|
-
|
|
5
|
+
// src/hooks/useBrandingChrome.ts
|
|
6
6
|
function i() {
|
|
7
|
-
let
|
|
8
|
-
return (
|
|
7
|
+
let n = e(), r = t();
|
|
8
|
+
return (n.enabled ? r?.embed?.viewport : r?.full?.viewport) ?? "auto";
|
|
9
9
|
}
|
|
10
10
|
function a(e, t) {
|
|
11
11
|
return typeof e == "number" && Number.isFinite(e) && e > 0 ? e : t;
|
|
12
12
|
}
|
|
13
13
|
function o() {
|
|
14
|
-
let
|
|
14
|
+
let n = e(), i = t(), a = n.enabled ? i?.embed?.breakpoints : i?.full?.breakpoints, o = a?.phone_max, c = a?.tablet_max, l = a?.landscape_phone_max_height;
|
|
15
15
|
return r(() => s({
|
|
16
16
|
phone_max: o,
|
|
17
17
|
tablet_max: c,
|
|
@@ -23,17 +23,17 @@ function o() {
|
|
|
23
23
|
]);
|
|
24
24
|
}
|
|
25
25
|
function s(e) {
|
|
26
|
-
let
|
|
27
|
-
return i || console.error(`branding.chrome breakpoints: phone_max (${
|
|
28
|
-
phoneMax: i ?
|
|
29
|
-
tabletMax: i ? r :
|
|
30
|
-
landscapePhoneMaxHeight: a(e?.landscape_phone_max_height,
|
|
26
|
+
let t = a(e?.phone_max, n.phoneMax), r = a(e?.tablet_max, n.tabletMax), i = t < r;
|
|
27
|
+
return i || console.error(`branding.chrome breakpoints: phone_max (${t}) must be below tablet_max (${r}), or no viewport can ever resolve to the tablet class. Both bounds fall back to the SDK defaults.`), {
|
|
28
|
+
phoneMax: i ? t : n.phoneMax,
|
|
29
|
+
tabletMax: i ? r : n.tabletMax,
|
|
30
|
+
landscapePhoneMaxHeight: a(e?.landscape_phone_max_height, n.landscapePhoneMaxHeight)
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function c(
|
|
34
|
-
let i = e(), a =
|
|
33
|
+
function c(n) {
|
|
34
|
+
let i = e(), a = t();
|
|
35
35
|
return r(() => {
|
|
36
|
-
let e = { ...i.enabled ? a?.embed?.surfaces?.[
|
|
36
|
+
let e = { ...i.enabled ? a?.embed?.surfaces?.[n] : a?.full?.surfaces?.[n] };
|
|
37
37
|
return {
|
|
38
38
|
...e,
|
|
39
39
|
isVisible: (t) => e[t] !== !1
|
|
@@ -41,11 +41,11 @@ function c(t) {
|
|
|
41
41
|
}, [
|
|
42
42
|
a,
|
|
43
43
|
i.enabled,
|
|
44
|
-
|
|
44
|
+
n
|
|
45
45
|
]);
|
|
46
46
|
}
|
|
47
47
|
function l() {
|
|
48
|
-
let e =
|
|
48
|
+
let e = t();
|
|
49
49
|
return r(() => {
|
|
50
50
|
let t = { ...e?.full?.shell };
|
|
51
51
|
return {
|
|
@@ -54,5 +54,4 @@ function l() {
|
|
|
54
54
|
};
|
|
55
55
|
}, [e]);
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { s as resolveBreakpoints, o as useBrandingBreakpoints, c as useBrandingChrome, l as useBrandingShell, i as useBrandingViewport };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { apiFetch as e } from "../api/client.js";
|
|
2
2
|
import { pkValuesFromId as t } from "../types/schema.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { readableSort as n } from "../lib/field-classification.js";
|
|
4
|
+
import { useEntity as r } from "./useEntity.js";
|
|
5
5
|
import { useQuery as i } from "@tanstack/react-query";
|
|
6
|
-
|
|
6
|
+
// src/hooks/useChildrenData.ts
|
|
7
7
|
var a = "entity-children";
|
|
8
8
|
function o(o, s, c, l, u, d) {
|
|
9
|
-
let f =
|
|
9
|
+
let f = r(c), p = n(f, u), m = Array.isArray(l) ? l : [l], h = Array.isArray(l) ? t(s, m.length) : [s];
|
|
10
10
|
return i({
|
|
11
11
|
queryKey: [
|
|
12
12
|
a,
|
|
@@ -29,5 +29,4 @@ function o(o, s, c, l, u, d) {
|
|
|
29
29
|
enabled: !!o && !!s && !!c && !!l && h !== null
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { a as ENTITY_CHILDREN_KEY, o as useChildrenData };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback as e, useMemo as t } from "react";
|
|
2
2
|
import { useSearchParams as n } from "react-router";
|
|
3
|
-
|
|
3
|
+
// src/hooks/useColumns.ts
|
|
4
4
|
function r(r, a) {
|
|
5
5
|
let [o, s] = n(), c = t(() => {
|
|
6
6
|
let e = o.get("columns");
|
|
@@ -40,5 +40,4 @@ function r(r, a) {
|
|
|
40
40
|
function i(e, t) {
|
|
41
41
|
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
42
42
|
}
|
|
43
|
-
//#endregion
|
|
44
43
|
export { r as useColumns };
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toast as e } from "../lib/toast.js";
|
|
2
2
|
import { useText as t } from "./useText.js";
|
|
3
|
-
import {
|
|
3
|
+
import { NetworkError as n } from "../types/api.js";
|
|
4
4
|
import { useEffect as r, useRef as i } from "react";
|
|
5
5
|
import { useQueryClient as a } from "@tanstack/react-query";
|
|
6
|
-
|
|
6
|
+
// src/hooks/useConnectionNotice.ts
|
|
7
7
|
var o = "declarion-connection-lost";
|
|
8
|
-
function s(
|
|
9
|
-
let { fetchStatus:
|
|
10
|
-
return
|
|
8
|
+
function s(e) {
|
|
9
|
+
let { fetchStatus: t, fetchFailureReason: r } = e.state;
|
|
10
|
+
return t === "paused" || t === "fetching" && r instanceof n;
|
|
11
11
|
}
|
|
12
12
|
function c() {
|
|
13
|
-
let
|
|
13
|
+
let n = a(), c = t(), l = i(c);
|
|
14
14
|
r(() => {
|
|
15
15
|
l.current = c;
|
|
16
16
|
}, [c]), r(() => {
|
|
17
|
-
let t =
|
|
18
|
-
let
|
|
19
|
-
if (
|
|
20
|
-
if (r =
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
} else
|
|
17
|
+
let t = n.getQueryCache(), r = !1, i = () => {
|
|
18
|
+
let n = t.getAll().some(s);
|
|
19
|
+
if (n !== r) {
|
|
20
|
+
if (r = n, n) {
|
|
21
|
+
let t = l.current;
|
|
22
|
+
e.loading(t("shell.connection.lost", "No connection to the server"), t("shell.connection.retrying", "Retrying…"), { id: o });
|
|
23
|
+
} else e.dismiss(o);
|
|
24
24
|
}
|
|
25
25
|
}, a = t.subscribe(i);
|
|
26
26
|
return i(), () => {
|
|
27
|
-
a(), r &&
|
|
27
|
+
a(), r && e.dismiss(o);
|
|
28
28
|
};
|
|
29
|
-
}, [
|
|
29
|
+
}, [n]);
|
|
30
30
|
}
|
|
31
31
|
function l() {
|
|
32
32
|
return c(), null;
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { o as CONNECTION_TOAST_ID, l as ConnectionNotice, s as isWaitingOnConnection, c as useConnectionNotice };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSchema as e } from "./useSchema.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { matchRoutes as n, useLocation as r } from "react-router";
|
|
4
|
-
|
|
4
|
+
// src/hooks/useCurrentLocation.ts
|
|
5
5
|
function i(e, t) {
|
|
6
6
|
let r = Object.entries(t ?? {}).flatMap(([e, t]) => t.route ? [{
|
|
7
7
|
id: e,
|
|
@@ -18,5 +18,4 @@ function a() {
|
|
|
18
18
|
let { pathname: n } = r(), { data: a } = e();
|
|
19
19
|
return t(() => i(n, a?.screens), [n, a?.screens]);
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { i as locationFor, a as useCurrentLocation };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSchema as e } from "./useSchema.js";
|
|
2
2
|
import { createContext as t, useContext as n, useMemo as r } from "react";
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/hooks/useCurrentScreen.tsx
|
|
5
5
|
var a = t(void 0);
|
|
6
6
|
function o({ code: t, children: n }) {
|
|
7
7
|
let { data: o } = e(), s = r(() => ({
|
|
@@ -16,5 +16,4 @@ function o({ code: t, children: n }) {
|
|
|
16
16
|
function s() {
|
|
17
17
|
return n(a);
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { o as CurrentScreenProvider, s as useCurrentScreen };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EntityClient as e } from "../api/entities.js";
|
|
2
2
|
import { useEffect as t, useMemo as n } from "react";
|
|
3
3
|
import { useInfiniteQuery as r, useQueryClient as i } from "@tanstack/react-query";
|
|
4
|
-
|
|
4
|
+
// src/hooks/useCursorEntityData.ts
|
|
5
5
|
var a = "entity-data-cursor";
|
|
6
6
|
function o(e) {
|
|
7
7
|
return JSON.stringify({
|
|
@@ -73,5 +73,4 @@ function c(s, c, l) {
|
|
|
73
73
|
refetch: m.refetch
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { a as CURSOR_ENTITY_DATA_KEY, s as cursorEntityDataQueryKey, o as cursorEntityStableKey, c as useCursorEntityData };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect as e, useState as t } from "react";
|
|
2
|
-
|
|
2
|
+
// src/hooks/useDebounce.ts
|
|
3
3
|
function n(n, r) {
|
|
4
4
|
let [i, a] = t(n);
|
|
5
5
|
return e(() => {
|
|
@@ -7,5 +7,4 @@ function n(n, r) {
|
|
|
7
7
|
return () => clearTimeout(e);
|
|
8
8
|
}, [n, r]), i;
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as useDebounce };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { useAuthStore as e } from "../stores/auth.js";
|
|
2
|
+
import { resolveTimeZone as t } from "../lib/timestamp.js";
|
|
3
|
+
// src/hooks/useDisplayTimeZone.ts
|
|
4
4
|
function n() {
|
|
5
|
-
return e(
|
|
5
|
+
return t(e((e) => e.user?.timezone));
|
|
6
6
|
}
|
|
7
|
-
//#endregion
|
|
8
7
|
export { n as useDisplayTimeZone };
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { useBrandingIdentity as n } from "./useBranding.js";
|
|
4
4
|
import { useTabTitle as r } from "./useTabTitle.js";
|
|
5
5
|
import { useEffect as i } from "react";
|
|
6
|
-
|
|
6
|
+
// src/hooks/useDocumentTitle.ts
|
|
7
7
|
function a() {
|
|
8
|
-
let a =
|
|
8
|
+
let a = t(), o = r(), s = n()?.app_name?.trim() ?? "", c = e((e) => e.tabs.find((t) => t.id === e.activeTabId)), l = c ? o(c) : "";
|
|
9
9
|
i(() => {
|
|
10
10
|
if (!a.enabled) return document.title = [l, s].filter(Boolean).join(" – "), () => {
|
|
11
11
|
s && (document.title = s);
|
|
@@ -16,5 +16,4 @@ function a() {
|
|
|
16
16
|
s
|
|
17
17
|
]);
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { a as useDocumentTitle };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { listEntities as e } from "../api/data.js";
|
|
2
2
|
import { useQuery as t } from "@tanstack/react-query";
|
|
3
|
-
|
|
3
|
+
// src/hooks/useEntityData.ts
|
|
4
4
|
function n(e, t) {
|
|
5
5
|
return [
|
|
6
6
|
"entity-data",
|
|
@@ -60,5 +60,4 @@ function s(n, r, i = !0) {
|
|
|
60
60
|
placeholderData: (e, t) => t?.queryKey?.[1] === n ? e : void 0
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
//#endregion
|
|
64
63
|
export { o as entityCountQueryKey, n as entityDataQueryKey, r as entityDataQueryOptions, s as useEntityCount, i as useEntityData };
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { readFileReference as e } from "../api/fileReferences.js";
|
|
2
|
+
import { objectQueryKey as t } from "./useObject.js";
|
|
3
3
|
import { useQuery as n } from "@tanstack/react-query";
|
|
4
|
-
|
|
5
|
-
function r(
|
|
4
|
+
// src/hooks/useFileReferenceJSON.ts
|
|
5
|
+
function r(e, n, r, i) {
|
|
6
6
|
return [
|
|
7
7
|
"file-reference-json",
|
|
8
|
-
e
|
|
8
|
+
t(e, n),
|
|
9
9
|
r,
|
|
10
10
|
i ?? null
|
|
11
11
|
];
|
|
12
12
|
}
|
|
13
|
-
function i(
|
|
14
|
-
let s = r(
|
|
13
|
+
function i(t, i, a, o) {
|
|
14
|
+
let s = r(t, i, a, o);
|
|
15
15
|
return n({
|
|
16
16
|
queryKey: s,
|
|
17
17
|
queryFn: async ({ signal: n }) => {
|
|
18
|
-
let r = await (await t
|
|
18
|
+
let r = await (await e(t, i, a, { signal: n })).blob.text();
|
|
19
19
|
try {
|
|
20
20
|
return JSON.parse(r);
|
|
21
21
|
} catch (e) {
|
|
22
22
|
throw Error("The referenced file does not contain valid JSON.", { cause: e });
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
enabled: !!
|
|
25
|
+
enabled: !!t && !!i && i !== "new" && !!a && typeof o == "string" && o !== ""
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
//#endregion
|
|
29
28
|
export { r as fileReferenceJSONQueryKey, i as useFileReferenceJSON };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { countActiveFilters as e, parseFilterURLState as t, setFiltersInURL as n } from "../lib/filters.js";
|
|
2
|
+
import { useText as r } from "./useText.js";
|
|
3
3
|
import { useCallback as i, useMemo as a } from "react";
|
|
4
4
|
import { useSearchParams as o } from "react-router";
|
|
5
|
-
|
|
5
|
+
// src/hooks/useFilters.ts
|
|
6
6
|
var s = [];
|
|
7
7
|
function c({ defaults: c = s } = {}) {
|
|
8
|
-
let [l, u] = o(), d =
|
|
8
|
+
let [l, u] = o(), d = r("errors"), f = a(() => t(l), [l]), p = f.error === null && l.get("filters") !== null ? f.filters : c, m = a(() => e(p), [p]), h = i((e) => {
|
|
9
9
|
let t = new URLSearchParams(l);
|
|
10
|
-
|
|
10
|
+
n(e, t, c), t.set("page", "1"), u(t);
|
|
11
11
|
}, [
|
|
12
12
|
l,
|
|
13
13
|
u,
|
|
@@ -24,5 +24,4 @@ function c({ defaults: c = s } = {}) {
|
|
|
24
24
|
clearFilters: g
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { c as useFilters };
|
|
@@ -1,85 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { isSameOriginPath as c, useTabStore as l } from "../stores/tabs.js";
|
|
1
|
+
import { getEntity as e } from "../api/data.js";
|
|
2
|
+
import { AGENT_MESSAGE_CHANGED_EVENT as t, agentBus as n, eventStreamFirstOpenedAt as r } from "../api/events.js";
|
|
3
|
+
import { useEmbed as i } from "../embed/EmbedContext.js";
|
|
4
|
+
import { useEntity as a } from "./useEntity.js";
|
|
5
|
+
import { useSchema as o } from "./useSchema.js";
|
|
6
|
+
import { resolveTabTarget as s, useTabNavigate as c } from "./useTabNavigate.js";
|
|
7
|
+
import { useText as l } from "./useText.js";
|
|
9
8
|
import { stripLeadingQuestion as u } from "../lib/screen-back.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { toast as d } from "../lib/toast.js";
|
|
10
|
+
import { sharedWindowElection as f } from "../lib/window-election.js";
|
|
11
|
+
import { useAuthStore as p } from "../stores/auth.js";
|
|
12
|
+
import { isSameOriginPath as m, useTabStore as h } from "../stores/tabs.js";
|
|
13
|
+
import { getDisplayValue as g, screenTitleForPath as _ } from "../types/schema.js";
|
|
14
|
+
import { locationFor as v } from "./useCurrentLocation.js";
|
|
15
15
|
import { useCallback as y, useEffect as b, useRef as x } from "react";
|
|
16
|
-
|
|
16
|
+
// src/hooks/useFollowAgentOpen.ts
|
|
17
17
|
var S = "ui.open";
|
|
18
18
|
function C(e) {
|
|
19
19
|
let t = e.result;
|
|
20
|
-
return typeof t?.path == "string" &&
|
|
20
|
+
return typeof t?.path == "string" && m(t.path) ? t.path : void 0;
|
|
21
21
|
}
|
|
22
22
|
function w(e, t) {
|
|
23
23
|
return e.requester_user_id === t.id && (e.real_user_id ?? null) === (t.impersonation?.real_user_id ?? null);
|
|
24
24
|
}
|
|
25
25
|
async function T(t, n, r) {
|
|
26
|
-
let i =
|
|
27
|
-
if (i?.record &&
|
|
28
|
-
let n = await a
|
|
26
|
+
let i = v(n, r?.screens), a = i?.record ? r?.screens?.[i.screen]?.entity : void 0, o = a ? r?.entities?.[a] : void 0;
|
|
27
|
+
if (i?.record && a && o) try {
|
|
28
|
+
let n = await e(a, i.record), r = g(t, n.data, o);
|
|
29
29
|
return r && !String(r).startsWith("/") ? String(r) : void 0;
|
|
30
30
|
} catch {
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
function E(e) {
|
|
35
|
-
let t =
|
|
35
|
+
let t = r(), n = Date.parse(e.updated_at ?? "");
|
|
36
36
|
return t !== void 0 && !Number.isNaN(n) && n < t;
|
|
37
37
|
}
|
|
38
38
|
function D() {
|
|
39
|
-
let
|
|
39
|
+
let r = i(), m = a("agent_tool_invocation") !== void 0, g = !r.enabled && m, v = c(), D = l(), { data: O } = o(), k = x(/* @__PURE__ */ new Set()), A = y(async (t) => {
|
|
40
40
|
let n;
|
|
41
41
|
try {
|
|
42
|
-
n = (await
|
|
42
|
+
n = (await e("agent_tool_invocation", t)).data;
|
|
43
43
|
} catch (e) {
|
|
44
44
|
console.warn("agent_tool_invocation read failed; the opened screen is not followed", e);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
if (k.current.has(
|
|
48
|
-
let
|
|
49
|
-
if (
|
|
50
|
-
let
|
|
51
|
-
if (!
|
|
52
|
-
let
|
|
53
|
-
if (!
|
|
54
|
-
|
|
47
|
+
if (k.current.has(t)) return;
|
|
48
|
+
let r = n.tool_code === S;
|
|
49
|
+
if (r && n.status !== "succeeded" || (k.current.add(t), E(n))) return;
|
|
50
|
+
let i = C(n), a = p.getState().user;
|
|
51
|
+
if (!r || !i || !a || !w(n, a) || !f().isElected(n.conversation_id)) return;
|
|
52
|
+
let o = h.getState();
|
|
53
|
+
if (!o.tabs.find((e) => e.id === o.activeTabId)?.dirty) {
|
|
54
|
+
v(i);
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
let { pathname:
|
|
58
|
-
|
|
59
|
-
pathname:
|
|
60
|
-
search: u(
|
|
57
|
+
let { pathname: c, search: l } = s(i), m = _(D, c, O?.screens, O?.entities), g = await T(D, c, O), y = g ?? m?.title ?? c;
|
|
58
|
+
o.openTab({
|
|
59
|
+
pathname: c,
|
|
60
|
+
search: u(l),
|
|
61
61
|
title: y,
|
|
62
62
|
derivedTitle: g === void 0,
|
|
63
|
-
icon:
|
|
63
|
+
icon: m?.icon,
|
|
64
64
|
closable: !0
|
|
65
|
-
}, { activate: !1 }),
|
|
65
|
+
}, { activate: !1 }), d.info(D("shell.tabs.agent_opened.title", "{screen} is open in a background tab", { screen: y }), void 0, { action: {
|
|
66
66
|
label: D("shell.tabs.agent_opened.go", "Go there"),
|
|
67
|
-
onClick: () =>
|
|
67
|
+
onClick: () => v(i)
|
|
68
68
|
} });
|
|
69
69
|
}, [
|
|
70
|
-
|
|
70
|
+
v,
|
|
71
71
|
D,
|
|
72
72
|
O
|
|
73
73
|
]);
|
|
74
74
|
b(() => {
|
|
75
75
|
if (!g) return;
|
|
76
|
-
|
|
76
|
+
f();
|
|
77
77
|
let e = (e) => {
|
|
78
78
|
let t = e.detail;
|
|
79
|
-
t.entity !== "agent_tool_invocation" || k.current.has(t.rowId) || (
|
|
79
|
+
t.entity !== "agent_tool_invocation" || k.current.has(t.rowId) || (f().mayBeElected() ? A(t.rowId) : k.current.add(t.rowId));
|
|
80
80
|
};
|
|
81
|
-
return
|
|
81
|
+
return n.addEventListener(t, e), () => n.removeEventListener(t, e);
|
|
82
82
|
}, [g, A]);
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
export { D as useFollowAgentOpen };
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toast as e } from "../lib/toast.js";
|
|
2
|
+
import { useText as t } from "./useText.js";
|
|
3
|
+
import { failureTitle as n } from "../lib/failure.js";
|
|
2
4
|
import { useAuthStore as r } from "../stores/auth.js";
|
|
3
5
|
import { reresolveLanguage as i } from "./useLanguage.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useText as o } from "./useText.js";
|
|
6
|
-
import { toast as s } from "../lib/toast.js";
|
|
6
|
+
import { impersonationRevoke as a, impersonationStart as o, impersonationStop as s } from "../api/auth.js";
|
|
7
7
|
import { useMutation as c, useQueryClient as l } from "@tanstack/react-query";
|
|
8
|
-
|
|
8
|
+
// src/hooks/useImpersonation.ts
|
|
9
9
|
function u() {
|
|
10
|
-
let u = r((e) => e.user), d = r((e) => e.reloadSession), f = l(), p =
|
|
11
|
-
mutationFn: ({ targetUserId: e, reason:
|
|
10
|
+
let u = r((e) => e.user), d = r((e) => e.reloadSession), f = l(), p = t(), m = t("errors"), h = u?.impersonation ?? null, g = !!h, _ = c({
|
|
11
|
+
mutationFn: ({ targetUserId: e, reason: t, durationMinutes: n }) => o(e, t, n),
|
|
12
12
|
onSuccess: async () => {
|
|
13
|
-
await d(), await i(f), f.invalidateQueries(),
|
|
13
|
+
await d(), await i(f), f.invalidateQueries(), e.success(p("toast.impersonation.started", "Impersonation session started."));
|
|
14
14
|
},
|
|
15
|
-
onError: (
|
|
15
|
+
onError: (t) => e.error(n(m, t))
|
|
16
16
|
}), v = c({
|
|
17
|
-
mutationFn: () =>
|
|
17
|
+
mutationFn: () => s(),
|
|
18
18
|
onSuccess: async () => {
|
|
19
|
-
await d(), await i(f), f.invalidateQueries(),
|
|
19
|
+
await d(), await i(f), f.invalidateQueries(), e.success(p("toast.impersonation.returned", "Returned to your own session."));
|
|
20
20
|
},
|
|
21
|
-
onError: (
|
|
21
|
+
onError: (t) => e.error(n(m, t))
|
|
22
22
|
}), y = c({
|
|
23
|
-
mutationFn: (
|
|
23
|
+
mutationFn: (e) => a(e),
|
|
24
24
|
onSuccess: () => {
|
|
25
|
-
|
|
25
|
+
e.success(p("toast.impersonation.revoke_done", "Session revoked.")), f.invalidateQueries({ queryKey: ["impersonation_session"] });
|
|
26
26
|
},
|
|
27
|
-
onError: (
|
|
27
|
+
onError: (t) => e.error(n(m, t))
|
|
28
28
|
});
|
|
29
29
|
return {
|
|
30
30
|
info: h,
|
|
@@ -36,5 +36,4 @@ function u() {
|
|
|
36
36
|
isStopping: v.isPending
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
export { u as useImpersonation };
|