@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,5 +1,4 @@
|
|
|
1
1
|
import { CSSProperties, FC } from "react";
|
|
2
|
-
//#region src/components/shared/DynamicIcon.d.ts
|
|
3
2
|
interface DynamicIconProps {
|
|
4
3
|
name: string;
|
|
5
4
|
size?: number | string;
|
|
@@ -18,8 +17,6 @@ interface DynamicIconProps {
|
|
|
18
17
|
* 4. fallback `folder`
|
|
19
18
|
*/
|
|
20
19
|
declare function DynamicIcon({ name, size, className, style }: DynamicIconProps): import("react").JSX.Element;
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/components/primitives/Icons.d.ts
|
|
23
20
|
type IconProps = {
|
|
24
21
|
size?: number;
|
|
25
22
|
cls?: string;
|
|
@@ -155,5 +152,4 @@ declare const Icon: {
|
|
|
155
152
|
zap: FC<IconProps>;
|
|
156
153
|
};
|
|
157
154
|
type IconName = keyof typeof Icon;
|
|
158
|
-
//#endregion
|
|
159
155
|
export { DynamicIcon as i, IconName as n, IconProps as r, Icon as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/api/access-expiry.ts
|
|
2
2
|
var e = "declarion.auth.access.expiry";
|
|
3
3
|
function t(t) {
|
|
4
4
|
if (t && !Number.isNaN(Date.parse(t))) try {
|
|
@@ -28,5 +28,4 @@ function i(e, t) {
|
|
|
28
28
|
function a() {
|
|
29
29
|
return i(r(), Date.now());
|
|
30
30
|
}
|
|
31
|
-
//#endregion
|
|
32
31
|
export { n as clearAccessExpiry, t as recordAccessExpiry, i as startOrder, a as startOrderNow };
|
package/dist-lib/api/agents.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { callHandler as e } from "./client.js";
|
|
2
2
|
import { listEntities as t } from "./data.js";
|
|
3
|
-
|
|
3
|
+
// src/api/agents.ts
|
|
4
4
|
async function n() {
|
|
5
5
|
return (await e("agents.list_available", {})).agents ?? [];
|
|
6
6
|
}
|
|
@@ -103,5 +103,4 @@ async function h(e, n) {
|
|
|
103
103
|
if (o.length === 0) throw Error(`${e} pagination did not advance`);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
//#endregion
|
|
107
106
|
export { a as answerQuestion, s as approveInvocation, u as cancelConversation, l as cancelInvocation, r as createConversation, n as listAvailableAgents, d as listConversations, p as loadConversationInvocations, f as loadConversationTurns, m as loadHistory, c as rejectInvocation, o as sendElicitResponse, i as sendMessage };
|
package/dist-lib/api/audience.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/api/audience.ts
|
|
2
2
|
function e(e) {
|
|
3
3
|
if (!e.isLoading) return !e.isAuthenticated || !e.user ? null : {
|
|
4
4
|
user_id: e.user.id,
|
|
@@ -8,5 +8,4 @@ function e(e) {
|
|
|
8
8
|
function t(e, t) {
|
|
9
9
|
return e === t || e !== null && t !== null && e.user_id === t.user_id && e.tenant_id === t.tenant_id;
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { t as sameAudience, e as sessionCaller };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/api/auth-redirect.ts
|
|
2
2
|
var e = "/login", t = "/signup", n = "https://declarion.local";
|
|
3
3
|
function r(n) {
|
|
4
4
|
let r = n.split(/[?#]/, 1)[0];
|
|
@@ -26,5 +26,4 @@ function o() {
|
|
|
26
26
|
let { pathname: t, search: n, hash: r } = window.location;
|
|
27
27
|
return a(`${t}${n}${r}`);
|
|
28
28
|
}
|
|
29
|
-
//#endregion
|
|
30
29
|
export { o as loginPathForCurrentLocation, a as loginPathForRedirectPath, i as sanitizeRedirectPath };
|
package/dist-lib/api/auth.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { beginSessionInPage as e, callHandler as t, scheduleProactiveRefresh as n } from "./client.js";
|
|
2
|
-
|
|
2
|
+
// src/api/auth.ts
|
|
3
3
|
async function r() {
|
|
4
4
|
return t("auth.check_setup");
|
|
5
5
|
}
|
|
@@ -73,5 +73,4 @@ async function v(e, n) {
|
|
|
73
73
|
new_password: n
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { v as changePassword, r as checkSetup, o as confirmSignup, c as getMe, _ as impersonationRevoke, h as impersonationStart, g as impersonationStop, p as listIdentityProviders, u as listTenants, i as login, f as logout, l as probeSession, s as resendSignupCode, a as signup, m as ssoAuthorizeUrl, d as switchTenant };
|
package/dist-lib/api/batch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { callHandler as e } from "./client.js";
|
|
2
|
-
|
|
2
|
+
// src/api/batch.ts
|
|
3
3
|
var t = class {
|
|
4
4
|
ops = [];
|
|
5
5
|
call(e, t) {
|
|
@@ -30,5 +30,4 @@ var t = class {
|
|
|
30
30
|
function n(e) {
|
|
31
31
|
return e == null ? null : typeof e == "object" && !Array.isArray(e) ? e : { value: e };
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { t as Batch };
|
package/dist-lib/api/client.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ApiError as e, NetworkError as t, errorCodeOf as n, readProblem as r } from "../types/api.js";
|
|
2
2
|
import { loginPathForCurrentLocation as i } from "./auth-redirect.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { observe as a } from "../lib/versionTracker.js";
|
|
4
|
+
import { awaitEmbedToken as o, clearEmbedToken as s, getEmbedToken as c, isEmbedTokenMode as l } from "../embed/token.js";
|
|
5
5
|
import { REFRESH_TIMEOUT_MS as u, requestTimeoutMs as d } from "./request-bounds.js";
|
|
6
6
|
import { clearAccessExpiry as f, recordAccessExpiry as p } from "./access-expiry.js";
|
|
7
7
|
import { sameAudience as m } from "./audience.js";
|
|
8
|
-
|
|
8
|
+
// src/api/client.ts
|
|
9
9
|
var h = (e) => JSON.stringify(e ?? {}), g = null, _ = "declarion.auth.refresh.result", v = "declarion.auth.refresh";
|
|
10
10
|
function y(e = () => window.localStorage.getItem(_)) {
|
|
11
11
|
try {
|
|
@@ -26,7 +26,7 @@ function b(e) {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
function x(e) {
|
|
29
|
-
return e.ok ? (e.access_expires_at &&
|
|
29
|
+
return e.ok ? (e.access_expires_at && E(e.access_expires_at), null) : new C(e.status ?? 401);
|
|
30
30
|
}
|
|
31
31
|
async function S() {
|
|
32
32
|
let e = navigator.locks;
|
|
@@ -59,31 +59,31 @@ var C = class extends Error {
|
|
|
59
59
|
super(`refresh failed terminally (${e})`), this.status = e, this.name = "RefreshDeadError";
|
|
60
60
|
}
|
|
61
61
|
}, w = null;
|
|
62
|
-
function
|
|
62
|
+
function T() {
|
|
63
63
|
return w ??= import("./session-renewal.js").catch((e) => {
|
|
64
64
|
throw w = null, e;
|
|
65
65
|
}), w;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
67
|
+
function E(e) {
|
|
68
|
+
return O || (F = null, l() || p(e), typeof window > "u") ? Promise.resolve() : T().then((t) => t.scheduleRenewal(e), () => void 0);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function D() {
|
|
71
71
|
f(), w?.then((e) => e.cancelRenewal());
|
|
72
72
|
}
|
|
73
|
-
var
|
|
74
|
-
function O() {
|
|
75
|
-
D = !0, E();
|
|
76
|
-
}
|
|
73
|
+
var O = !1;
|
|
77
74
|
function k() {
|
|
78
|
-
|
|
75
|
+
O = !0, D();
|
|
76
|
+
}
|
|
77
|
+
function ee() {
|
|
78
|
+
return O;
|
|
79
79
|
}
|
|
80
80
|
function A(e) {
|
|
81
|
-
return
|
|
81
|
+
return O = !1, E(e);
|
|
82
82
|
}
|
|
83
83
|
typeof window < "u" && window.addEventListener("storage", (e) => {
|
|
84
|
-
if (e.key !== _ ||
|
|
84
|
+
if (e.key !== _ || l()) return;
|
|
85
85
|
let t = y(() => e.newValue);
|
|
86
|
-
t?.ok && t.access_expires_at &&
|
|
86
|
+
t?.ok && t.access_expires_at && E(t.access_expires_at);
|
|
87
87
|
});
|
|
88
88
|
async function j(e, n, r) {
|
|
89
89
|
let i = new AbortController(), a = setTimeout(() => i.abort(), r);
|
|
@@ -125,14 +125,14 @@ async function P() {
|
|
|
125
125
|
}
|
|
126
126
|
if (!t.ok) throw await r(t), new C(t.status);
|
|
127
127
|
let n = await M(t);
|
|
128
|
-
return
|
|
128
|
+
return E(n), n;
|
|
129
129
|
}
|
|
130
130
|
var F = null, I = /* @__PURE__ */ new Set(["auth.token_refresh_needed", "auth.unauthorized"]);
|
|
131
131
|
function L(n) {
|
|
132
132
|
return n instanceof t || n instanceof e;
|
|
133
133
|
}
|
|
134
134
|
async function R() {
|
|
135
|
-
if (
|
|
135
|
+
if (O) throw new C(401);
|
|
136
136
|
if (F !== null) throw new C(F);
|
|
137
137
|
return g || (g = S().catch((e) => {
|
|
138
138
|
throw e instanceof C && (F = e.status), e;
|
|
@@ -183,19 +183,19 @@ function X(e) {
|
|
|
183
183
|
return !t || !e.startsWith("/api/") || /[?&]language=/.test(e) ? e : `${e}${e.includes("?") ? "&" : "?"}language=${encodeURIComponent(t)}`;
|
|
184
184
|
}
|
|
185
185
|
async function Z(t, i, u, f) {
|
|
186
|
-
let p = X(t), m =
|
|
186
|
+
let p = X(t), m = l(), h = m ? "omit" : "include", g = U(i.headers, !!i.body, u, m ? c() : null), _ = d(t, i), v = await j(p, {
|
|
187
187
|
...i,
|
|
188
188
|
headers: g,
|
|
189
189
|
credentials: h
|
|
190
190
|
}, _);
|
|
191
|
-
if (
|
|
192
|
-
let { raw: t, body:
|
|
191
|
+
if (a(v.headers), !v.ok) {
|
|
192
|
+
let { raw: t, body: a } = await r(v), c = n(a.type), l = a.title ?? "";
|
|
193
193
|
if (v.status === 401 && I.has(c)) try {
|
|
194
194
|
let t = null;
|
|
195
|
-
m ? (
|
|
196
|
-
let
|
|
195
|
+
m ? (s(), t = await o()) : await R();
|
|
196
|
+
let a = U(i.headers, !!i.body, u, t), c = await j(p, {
|
|
197
197
|
...i,
|
|
198
|
-
headers:
|
|
198
|
+
headers: a,
|
|
199
199
|
credentials: h
|
|
200
200
|
}, _);
|
|
201
201
|
if (!c.ok) {
|
|
@@ -204,13 +204,13 @@ async function Z(t, i, u, f) {
|
|
|
204
204
|
}
|
|
205
205
|
return f(c);
|
|
206
206
|
} catch (n) {
|
|
207
|
-
throw L(n) ? n : (u.isSessionProbe || z(), new e(401,
|
|
207
|
+
throw L(n) ? n : (u.isSessionProbe || z(), new e(401, a, t));
|
|
208
208
|
}
|
|
209
209
|
throw v.status === 401 && !u.isSessionProbe && z(), H({
|
|
210
210
|
status: v.status,
|
|
211
211
|
code: c,
|
|
212
212
|
message: l
|
|
213
|
-
}), new e(v.status,
|
|
213
|
+
}), new e(v.status, a, t);
|
|
214
214
|
}
|
|
215
215
|
return f(v);
|
|
216
216
|
}
|
|
@@ -256,5 +256,4 @@ async function ie(e, t = {}, { isSessionProbe: n = !1, keepalive: r = !1 } = {})
|
|
|
256
256
|
isSessionProbe: n
|
|
257
257
|
}, Q)).result;
|
|
258
258
|
}
|
|
259
|
-
|
|
260
|
-
export { C as RefreshDeadError, te as apiFetch, re as apiFetchBlob, A as beginSessionInPage, ie as callHandler, E as cancelProactiveRefresh, Y as currentPublishedLanguage, O as endSessionInPage, R as ensureRefresh, V as getPersistentAuthFailureHandler, k as isSignedOutInPage, L as isTransientFailure, $ as parseContentDispositionFilename, J as publishLanguage, q as publishLanguageFor, T as scheduleProactiveRefresh, K as setLanguageReader, B as setPersistentAuthFailureHandler, X as withPublishedLanguage };
|
|
259
|
+
export { C as RefreshDeadError, te as apiFetch, re as apiFetchBlob, A as beginSessionInPage, ie as callHandler, D as cancelProactiveRefresh, Y as currentPublishedLanguage, k as endSessionInPage, R as ensureRefresh, V as getPersistentAuthFailureHandler, ee as isSignedOutInPage, L as isTransientFailure, $ as parseContentDispositionFilename, J as publishLanguage, q as publishLanguageFor, E as scheduleProactiveRefresh, K as setLanguageReader, B as setPersistentAuthFailureHandler, X as withPublishedLanguage };
|
package/dist-lib/api/data.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { apiFetch as e, apiFetchBlob as t } from "./client.js";
|
|
2
|
+
import { ApiError as n } from "../types/api.js";
|
|
3
|
+
// src/api/data.ts
|
|
4
4
|
function r(e, t) {
|
|
5
5
|
let n = new URL(`/api/data/${e}`, window.location.origin);
|
|
6
6
|
if (t.page && n.searchParams.set("page", String(t.page)), t.per_page && n.searchParams.set("per_page", String(t.per_page)), t.sort && n.searchParams.set("sort", t.sort), t.search && n.searchParams.set("search", t.search), t.filters && t.filters.length > 0 && n.searchParams.set("filters", JSON.stringify(t.filters)), t.include_deleted && n.searchParams.set("include_deleted", "true"), t.expand) for (let e of t.expand) n.searchParams.append("expand", e);
|
|
7
7
|
return t.select && t.select.length > 0 && n.searchParams.set("select", t.select.join(",")), t.screen && n.searchParams.set("screen", t.screen), t.preview && n.searchParams.set("preview", "true"), t.count && n.searchParams.set("count", t.count), n.pathname + n.search;
|
|
8
8
|
}
|
|
9
|
-
async function i(
|
|
9
|
+
async function i(t, n = {}, i = {}) {
|
|
10
10
|
if (y) {
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
11
|
+
let e = y(t, n);
|
|
12
|
+
if (e !== void 0) return e;
|
|
13
13
|
}
|
|
14
|
-
return
|
|
14
|
+
return e(r(t, n), { signal: i.signal });
|
|
15
15
|
}
|
|
16
|
-
async function a(
|
|
16
|
+
async function a(t, n, r = {}) {
|
|
17
17
|
let i = new URLSearchParams({ aggregate: n.aggregate.join(",") });
|
|
18
|
-
return n.group_by && i.set("group_by", n.group_by), n.filters && n.filters.length > 0 && i.set("filters", JSON.stringify(n.filters)), n.search && i.set("search", n.search), n.screen && i.set("screen", n.screen), n.include_deleted && i.set("include_deleted", "true"),
|
|
18
|
+
return n.group_by && i.set("group_by", n.group_by), n.filters && n.filters.length > 0 && i.set("filters", JSON.stringify(n.filters)), n.search && i.set("search", n.search), n.screen && i.set("screen", n.screen), n.include_deleted && i.set("include_deleted", "true"), e(`/api/data/${t}?${i.toString()}`, { signal: r.signal });
|
|
19
19
|
}
|
|
20
|
-
async function o(
|
|
20
|
+
async function o(t, n, r = {}) {
|
|
21
21
|
if (b) {
|
|
22
|
-
let
|
|
23
|
-
if (
|
|
22
|
+
let e = b(t, n);
|
|
23
|
+
if (e !== void 0) return e;
|
|
24
24
|
}
|
|
25
25
|
let i = new URLSearchParams();
|
|
26
26
|
if (typeof n == "string") i.set("id", n);
|
|
27
27
|
else for (let [e, t] of Object.entries(n)) i.set(e, t);
|
|
28
|
-
return r.expand?.length && i.set("expand", r.expand.join(",")),
|
|
28
|
+
return r.expand?.length && i.set("expand", r.expand.join(",")), e(`/api/data/${t}?${i.toString()}`);
|
|
29
29
|
}
|
|
30
30
|
async function s(e, t) {
|
|
31
31
|
return { data: ((await C(`${e}.__create`, {
|
|
@@ -59,10 +59,10 @@ async function d(e, t) {
|
|
|
59
59
|
entity: e
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
async function f(e,
|
|
63
|
-
let r = await
|
|
62
|
+
async function f(e, n) {
|
|
63
|
+
let r = await t(`/api/data/${e}/export`, {
|
|
64
64
|
method: "POST",
|
|
65
|
-
body: JSON.stringify(
|
|
65
|
+
body: JSON.stringify(n)
|
|
66
66
|
});
|
|
67
67
|
return {
|
|
68
68
|
blob: r.blob,
|
|
@@ -103,20 +103,19 @@ function S(e) {
|
|
|
103
103
|
let t = b;
|
|
104
104
|
return b = e, t;
|
|
105
105
|
}
|
|
106
|
-
async function C(
|
|
107
|
-
if (_) return _(
|
|
106
|
+
async function C(t, r) {
|
|
107
|
+
if (_) return _(t, r);
|
|
108
108
|
try {
|
|
109
|
-
return await
|
|
109
|
+
return await e(`/api/actions/${t}`, {
|
|
110
110
|
method: "POST",
|
|
111
111
|
body: JSON.stringify(r)
|
|
112
112
|
});
|
|
113
|
-
} catch (
|
|
114
|
-
throw
|
|
113
|
+
} catch (e) {
|
|
114
|
+
throw e instanceof n && h(e.raw) ? new m(e.status, e.raw) : e;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
async function w(
|
|
117
|
+
async function w(t, n) {
|
|
118
118
|
let r = new URLSearchParams();
|
|
119
|
-
return r.set("ids", n.join(",")),
|
|
119
|
+
return r.set("ids", n.join(",")), e(`/api/associations/${t}?${r.toString()}`);
|
|
120
120
|
}
|
|
121
|
-
//#endregion
|
|
122
121
|
export { m as ActionBatchError, a as aggregateEntities, g as buildActionBody, s as createEntity, l as deleteObject, u as encodeObjectId, p as eventsFailed, C as executeAction, f as exportEntities, o as getEntity, i as listEntities, w as resolveAssociation, d as restoreObject, v as setActionExecutor, S as setGetEntityResolver, x as setListEntitiesResolver, c as updateEntity };
|
package/dist-lib/api/entities.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { apiFetch as e, callHandler as t } from "./client.js";
|
|
2
|
+
import { executeAction as n } from "./data.js";
|
|
3
|
+
import { errorCodeOf as r, isCursorStaleError as i } from "../types/api.js";
|
|
4
|
+
// src/api/entities.ts
|
|
5
5
|
function a(e, t) {
|
|
6
6
|
return e.$statuses?.find((e) => e.group_code === t);
|
|
7
7
|
}
|
|
@@ -44,25 +44,25 @@ var u = class {
|
|
|
44
44
|
constructor(e, t) {
|
|
45
45
|
this.entity = e, this.refs = t ?? new c();
|
|
46
46
|
}
|
|
47
|
-
async get(
|
|
48
|
-
let
|
|
49
|
-
return s((await
|
|
47
|
+
async get(t) {
|
|
48
|
+
let n = new URLSearchParams(typeof t == "string" ? { id: t } : t);
|
|
49
|
+
return s((await e(`/api/data/${this.entity}?${n.toString()}`)).data);
|
|
50
50
|
}
|
|
51
|
-
async list(
|
|
52
|
-
let
|
|
51
|
+
async list(t = {}) {
|
|
52
|
+
let n, r = !1;
|
|
53
53
|
try {
|
|
54
|
-
|
|
54
|
+
n = await e(l(this.entity, t));
|
|
55
55
|
} catch (a) {
|
|
56
|
-
if (
|
|
57
|
-
let { after:
|
|
58
|
-
|
|
56
|
+
if (t.after && i(a)) {
|
|
57
|
+
let { after: i, ...a } = t;
|
|
58
|
+
n = await e(l(this.entity, a)), r = !0;
|
|
59
59
|
} else throw a;
|
|
60
60
|
}
|
|
61
|
-
return this.refs.merge(
|
|
62
|
-
data:
|
|
63
|
-
meta:
|
|
61
|
+
return this.refs.merge(n.$refs), {
|
|
62
|
+
data: n.data.map((e) => s(e)),
|
|
63
|
+
meta: n.meta,
|
|
64
64
|
$refs: this.refs.all(),
|
|
65
|
-
reset:
|
|
65
|
+
reset: r
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
async create(e) {
|
|
@@ -70,17 +70,17 @@ var u = class {
|
|
|
70
70
|
}
|
|
71
71
|
async createMany(e) {
|
|
72
72
|
if (e.length === 0) return [];
|
|
73
|
-
let
|
|
73
|
+
let n = e.map((e) => ({
|
|
74
74
|
action: `${this.entity}.__create`,
|
|
75
75
|
params: {
|
|
76
76
|
entity: this.entity,
|
|
77
77
|
fields: e
|
|
78
78
|
}
|
|
79
|
-
})),
|
|
80
|
-
actions:
|
|
79
|
+
})), r = await t("system.batch", {
|
|
80
|
+
actions: n,
|
|
81
81
|
atomic: !0
|
|
82
82
|
});
|
|
83
|
-
return d(
|
|
83
|
+
return d(r, `${this.entity}.__create`), r.results.map((e) => s(f(e)));
|
|
84
84
|
}
|
|
85
85
|
async update(e, t) {
|
|
86
86
|
return (await this.updateMany([{
|
|
@@ -90,24 +90,24 @@ var u = class {
|
|
|
90
90
|
}
|
|
91
91
|
async updateMany(e) {
|
|
92
92
|
if (e.length === 0) return [];
|
|
93
|
-
let
|
|
93
|
+
let n = e.map(({ id: e, ...t }) => ({
|
|
94
94
|
action: `${this.entity}.__update`,
|
|
95
95
|
params: {
|
|
96
96
|
object_ids: [e],
|
|
97
97
|
entity: this.entity,
|
|
98
98
|
fields: t
|
|
99
99
|
}
|
|
100
|
-
})),
|
|
101
|
-
actions:
|
|
100
|
+
})), r = await t("system.batch", {
|
|
101
|
+
actions: n,
|
|
102
102
|
atomic: !0
|
|
103
103
|
});
|
|
104
|
-
return d(
|
|
104
|
+
return d(r, `${this.entity}.__update`), r.results.map((e) => s(f(e)));
|
|
105
105
|
}
|
|
106
106
|
async delete(e) {
|
|
107
107
|
await this.deleteMany([e]);
|
|
108
108
|
}
|
|
109
109
|
async deleteMany(e) {
|
|
110
|
-
return e.length === 0 ? { count: 0 } : { count: (await
|
|
110
|
+
return e.length === 0 ? { count: 0 } : { count: (await n(`${this.entity}.__delete`, {
|
|
111
111
|
object_ids: e,
|
|
112
112
|
entity: this.entity
|
|
113
113
|
})).object_count ?? e.length };
|
|
@@ -116,7 +116,7 @@ var u = class {
|
|
|
116
116
|
await this.restoreMany([e]);
|
|
117
117
|
}
|
|
118
118
|
async restoreMany(e) {
|
|
119
|
-
return e.length === 0 ? { count: 0 } : { count: (await
|
|
119
|
+
return e.length === 0 ? { count: 0 } : { count: (await n(`${this.entity}.__restore`, {
|
|
120
120
|
object_ids: e,
|
|
121
121
|
entity: this.entity
|
|
122
122
|
})).object_count ?? e.length };
|
|
@@ -124,26 +124,26 @@ var u = class {
|
|
|
124
124
|
async upsert(e, t) {
|
|
125
125
|
return (await this.upsertMany([e], t))[0];
|
|
126
126
|
}
|
|
127
|
-
async upsertMany(e,
|
|
127
|
+
async upsertMany(e, n) {
|
|
128
128
|
if (e.length === 0) return [];
|
|
129
|
-
let
|
|
129
|
+
let r = e.map((e) => ({
|
|
130
130
|
action: `${this.entity}.__upsert`,
|
|
131
131
|
params: {
|
|
132
132
|
entity: this.entity,
|
|
133
133
|
fields: e,
|
|
134
|
-
unique_by:
|
|
134
|
+
unique_by: n
|
|
135
135
|
}
|
|
136
|
-
})), i = await
|
|
137
|
-
actions:
|
|
136
|
+
})), i = await t("system.batch", {
|
|
137
|
+
actions: r,
|
|
138
138
|
atomic: !0
|
|
139
139
|
});
|
|
140
140
|
return d(i, `${this.entity}.__upsert`), i.results.map((e) => s(p(e)));
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
function d(
|
|
144
|
-
if (
|
|
145
|
-
let
|
|
146
|
-
throw Error(`${
|
|
143
|
+
function d(e, t) {
|
|
144
|
+
if (e.committed) return;
|
|
145
|
+
let n = e.results.find((e) => !e.ok), i = n?.error ? `${r(n.error.type)}: ${n.error.title}` : "batch did not commit";
|
|
146
|
+
throw Error(`${t} batch failed: ${i}`);
|
|
147
147
|
}
|
|
148
148
|
function f(e) {
|
|
149
149
|
let t = e.result ?? {};
|
|
@@ -156,5 +156,4 @@ function p(e) {
|
|
|
156
156
|
function m(e, t) {
|
|
157
157
|
return new u(e, t);
|
|
158
158
|
}
|
|
159
|
-
//#endregion
|
|
160
159
|
export { u as EntityClient, c as RefCache, m as entityClient };
|
package/dist-lib/api/events.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { withPublishedLanguage as e } from "./client.js";
|
|
2
|
+
import { ApiError as t, readProblem as n } from "../types/api.js";
|
|
3
|
+
// src/api/events.ts
|
|
4
4
|
var r = new EventTarget(), i = "agent-frame", a = "agent-message-changed";
|
|
5
5
|
function o(e) {
|
|
6
6
|
r.dispatchEvent(new CustomEvent(i, { detail: e }));
|
|
@@ -16,14 +16,14 @@ function l() {
|
|
|
16
16
|
async function* u(i = {}) {
|
|
17
17
|
let l = new Headers();
|
|
18
18
|
i.lastEventID && l.set("Last-Event-ID", i.lastEventID), i.bearerToken && l.set("Authorization", `Bearer ${i.bearerToken}`);
|
|
19
|
-
let u = await fetch(
|
|
19
|
+
let u = await fetch(e("/api/events"), {
|
|
20
20
|
credentials: i.credentials ?? "include",
|
|
21
21
|
signal: i.signal,
|
|
22
22
|
headers: l
|
|
23
23
|
});
|
|
24
24
|
if (!u.ok || !u.body) {
|
|
25
|
-
let { raw:
|
|
26
|
-
throw u.status === 401 ? new s() : new
|
|
25
|
+
let { raw: e, body: r } = await n(u);
|
|
26
|
+
throw u.status === 401 ? new s() : new t(u.status, r, e);
|
|
27
27
|
}
|
|
28
28
|
if (c === void 0) {
|
|
29
29
|
let e = Date.parse(u.headers.get("Date") ?? "");
|
|
@@ -116,5 +116,4 @@ async function* u(i = {}) {
|
|
|
116
116
|
d.releaseLock();
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
//#endregion
|
|
120
119
|
export { i as AGENT_FRAME_EVENT, a as AGENT_MESSAGE_CHANGED_EVENT, s as SSEAuthError, r as agentBus, o as emitAgentFrame, l as eventStreamFirstOpenedAt, u as streamEvents };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { apiFetchBlob as e } from "./client.js";
|
|
2
|
-
|
|
2
|
+
// src/api/fileReferences.ts
|
|
3
3
|
function t(t, n, r, i = {}) {
|
|
4
4
|
let a = new URLSearchParams(typeof n == "string" ? { id: n } : n);
|
|
5
5
|
return e(`/api/files/references/${encodeURIComponent(t)}/${encodeURIComponent(r)}?${a.toString()}`, { signal: i.signal });
|
|
6
6
|
}
|
|
7
|
-
//#endregion
|
|
8
7
|
export { t as readFileReference };
|
package/dist-lib/api/params.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { apiFetch as e } from "./client.js";
|
|
2
|
-
|
|
2
|
+
// src/api/params.ts
|
|
3
3
|
async function t() {
|
|
4
4
|
let t = (await e("/api/params/public")).data;
|
|
5
5
|
if (Array.isArray(t)) return { parameters: t };
|
|
@@ -16,5 +16,4 @@ async function n(t, n = {}) {
|
|
|
16
16
|
async function r(t) {
|
|
17
17
|
return (await e(`/api/params${t === "tenant" ? "?resolution=tenant" : ""}`)).data ?? [];
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { r as fetchAllParams, n as fetchParam, t as fetchPublicParams };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { executeAction as e } from "./data.js";
|
|
2
|
-
|
|
2
|
+
// src/api/properties.ts
|
|
3
3
|
async function t(t, n, r, i) {
|
|
4
4
|
let a = (await e(`${t}.__update`, {
|
|
5
5
|
object_ids: [n],
|
|
@@ -21,5 +21,4 @@ async function n(t, n, r) {
|
|
|
21
21
|
}] }
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
//#endregion
|
|
25
24
|
export { n as deleteObjectProperty, t as setObjectProperty };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/api/request-bounds.ts
|
|
2
2
|
var e = 1e4, t = 3e4, n = 15e3, r = 75e3;
|
|
3
3
|
function i(e) {
|
|
4
4
|
return Math.floor(Math.random() * Math.min(3e4, 1e3 * 2 ** e));
|
|
@@ -24,5 +24,4 @@ function l(e, i) {
|
|
|
24
24
|
}
|
|
25
25
|
return r;
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { n as ACTION_NETWORK_MARGIN_MS, t as READ_TIMEOUT_MS, e as REFRESH_TIMEOUT_MS, r as UNKNOWN_ACTION_TIMEOUT_MS, i as backoffDelayMs, o as recordActionTimeouts, l as requestTimeoutMs };
|
package/dist-lib/api/schema.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { apiFetch as e, publishLanguageFor as t } from "./client.js";
|
|
2
|
+
import { recordActionTimeouts as n } from "./request-bounds.js";
|
|
3
3
|
import { OrderedMap as r } from "../types/ordmap.js";
|
|
4
|
-
|
|
4
|
+
// src/api/schema.ts
|
|
5
5
|
function i(e) {
|
|
6
6
|
return {
|
|
7
7
|
...e,
|
|
@@ -58,14 +58,13 @@ function s(e) {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
async function c() {
|
|
61
|
-
let r = performance.now(), { audience: i, ...a } = await
|
|
61
|
+
let r = performance.now(), { audience: i, ...a } = await e("/api/schema", { cache: "no-cache" });
|
|
62
62
|
if (i === void 0) throw Error("/api/schema answered without its audience");
|
|
63
63
|
let o = s(a);
|
|
64
|
-
return
|
|
64
|
+
return t(i, o.language), n(o), {
|
|
65
65
|
schema: o,
|
|
66
66
|
audience: i,
|
|
67
67
|
requestedAt: r
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
//#endregion
|
|
71
70
|
export { c as fetchSchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { backoffDelayMs as
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { RefreshDeadError as e, ensureRefresh as t, getPersistentAuthFailureHandler as n } from "./client.js";
|
|
2
|
+
import { backoffDelayMs as r } from "./request-bounds.js";
|
|
3
|
+
import { isEmbedTokenMode as i } from "../embed/token.js";
|
|
4
|
+
// src/api/session-renewal.ts
|
|
5
5
|
var a = 6e4, o = 5e3, s = null, c = null, l = 0, u = !1;
|
|
6
6
|
function d() {
|
|
7
7
|
s && clearTimeout(s), s = null;
|
|
@@ -12,8 +12,8 @@ function f(e) {
|
|
|
12
12
|
}, e);
|
|
13
13
|
}
|
|
14
14
|
function p() {
|
|
15
|
-
u ||
|
|
16
|
-
|
|
15
|
+
u || i() || (d(), u = !0, t().catch((t) => {
|
|
16
|
+
t instanceof e ? n()() : c !== null && f(r(l++));
|
|
17
17
|
}).finally(() => {
|
|
18
18
|
u = !1;
|
|
19
19
|
}));
|
|
@@ -32,5 +32,4 @@ function g() {
|
|
|
32
32
|
document.addEventListener("visibilitychange", () => {
|
|
33
33
|
document.visibilityState === "visible" && g();
|
|
34
34
|
}), document.addEventListener("resume", g), window.addEventListener("pageshow", g), window.addEventListener("online", g);
|
|
35
|
-
//#endregion
|
|
36
35
|
export { a as PROACTIVE_REFRESH_MARGIN_MS, h as cancelRenewal, m as scheduleRenewal };
|
package/dist-lib/api/status.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { executeAction as e } from "./data.js";
|
|
2
|
-
|
|
2
|
+
// src/api/status.ts
|
|
3
3
|
async function t(t, n, r, i, a) {
|
|
4
4
|
let o = {
|
|
5
5
|
status_group_code: r,
|
|
@@ -13,5 +13,4 @@ async function t(t, n, r, i, a) {
|
|
|
13
13
|
})).result?.rows?.[0]?.$statuses ?? [];
|
|
14
14
|
return s.find((e) => e.group_code === r) ?? s[0];
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { t as setObjectStatus };
|