@declarion/react 0.65.0 → 0.66.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/api/access-expiry.js +32 -0
- package/dist-lib/api/agents.js +105 -0
- package/dist-lib/api/auth-redirect.js +30 -0
- package/dist-lib/api/auth.js +67 -0
- package/dist-lib/api/batch.js +34 -0
- package/dist-lib/api/client.js +241 -0
- package/dist-lib/api/data.js +122 -0
- package/dist-lib/api/entities.js +160 -0
- package/dist-lib/api/events.js +120 -0
- package/dist-lib/api/fileReferences.js +8 -0
- package/dist-lib/api/params.js +20 -0
- package/dist-lib/api/properties.js +25 -0
- package/dist-lib/api/request-bounds.js +28 -0
- package/dist-lib/api/schema.js +71 -0
- package/dist-lib/api/session-renewal.js +36 -0
- package/dist-lib/api/status.js +17 -0
- package/dist-lib/app.js +262 -0
- package/dist-lib/components/actions/ActionButton.js +116 -0
- package/dist-lib/{ActionDialog-C6EG-AmC.js → components/actions/ActionDialog.js} +63 -53
- package/dist-lib/{ActionResultDialog.impl-BATutW8J.js → components/actions/ActionResultDialog.impl.js} +53 -48
- package/dist-lib/components/actions/ActionResultDialog.js +12 -0
- package/dist-lib/components/actions/ActionRunner.js +274 -0
- package/dist-lib/components/actions/ObjectActionBar.js +127 -0
- package/dist-lib/components/actions/PropertyGridEditor.js +202 -0
- package/dist-lib/components/actions/ResponsiveActionBar.js +773 -0
- package/dist-lib/components/actions/RowActionsKebab.js +90 -0
- package/dist-lib/{AgentChatPanel.impl-D5y_qEex.js → components/agents/AgentChatPanel.impl.js} +314 -362
- package/dist-lib/components/agents/AgentChatPanel.js +12 -0
- package/dist-lib/components/agents/AgentConversationDrawer.js +59 -0
- package/dist-lib/components/agents/AgentElicitForm.js +152 -0
- package/dist-lib/components/agents/AgentOpenFollower.impl.js +7 -0
- package/dist-lib/components/agents/AgentOpenFollower.js +12 -0
- package/dist-lib/components/agents/AgentPicker.js +58 -0
- package/dist-lib/components/agents/transcript-runs.js +52 -0
- package/dist-lib/components/chrome/AssociationTabs.js +176 -0
- package/dist-lib/components/chrome/AuditMetaStrip.js +64 -0
- package/dist-lib/components/chrome/Breadcrumbs.js +67 -0
- package/dist-lib/components/chrome/HighlightsStrip.js +39 -0
- package/dist-lib/{PageHeader-DiwLe7CO.js → components/chrome/PageHeader.js} +19 -15
- package/dist-lib/{PageShell-BJz1MiTH.js → components/chrome/PageShell.js} +3 -3
- package/dist-lib/components/chrome/RecordHeader.js +119 -0
- package/dist-lib/{headerActionZone-bef-tZZ7.js → components/chrome/headerActionZone.js} +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.js +1244 -0
- package/dist-lib/components/detail-layout/AssociatedToolbar.js +87 -0
- package/dist-lib/components/detail-layout/ChildrenBlock.js +80 -0
- package/dist-lib/components/detail-layout/ChildrenCards.js +156 -0
- package/dist-lib/components/detail-layout/ChildrenList.js +135 -0
- package/dist-lib/components/detail-layout/ChildrenTable.js +189 -0
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +609 -0
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +40 -0
- package/dist-lib/components/detail-layout/DetailHighlights.js +54 -0
- package/dist-lib/{DraggableChildrenTable-Dd5SeuF6.js → components/detail-layout/DraggableChildrenTable.js} +56 -53
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +341 -0
- package/dist-lib/components/detail-layout/ErrorSummary.js +89 -0
- package/dist-lib/components/detail-layout/EvidenceBlock.js +66 -0
- package/dist-lib/{FieldRow-DedGIY9R.js → components/detail-layout/FieldRow.js} +8 -7
- package/dist-lib/components/detail-layout/FieldsBlock.js +74 -0
- package/dist-lib/components/detail-layout/LayoutColumn.js +16 -0
- package/dist-lib/components/detail-layout/LayoutRenderer.js +54 -0
- package/dist-lib/components/detail-layout/LayoutRow.js +83 -0
- package/dist-lib/components/detail-layout/LayoutTabs.js +195 -0
- package/dist-lib/components/detail-layout/PropertiesBlock.js +74 -0
- package/dist-lib/components/detail-layout/QuickAddForm.js +81 -0
- package/dist-lib/components/detail-layout/SectionBlock.js +48 -0
- package/dist-lib/components/detail-layout/StatusesBlock.js +18 -0
- package/dist-lib/components/detail-layout/TimelineComposer.js +205 -0
- package/dist-lib/components/detail-layout/blockMeta.js +27 -0
- package/dist-lib/components/detail-layout/useManualColumnResize.js +94 -0
- package/dist-lib/components/detail-layout/useQuickAdd.js +85 -0
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +295 -0
- package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +107 -0
- package/dist-lib/components/detail-layout/widgets/MonacoJson.js +47 -0
- package/dist-lib/components/detail-layout/widgets/WidgetHost.js +36 -0
- package/dist-lib/components/detail-layout/widgets/builtins.js +10 -0
- package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +32 -0
- package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +16 -0
- package/dist-lib/components/detail-layout/widgets/registry.js +13 -0
- package/dist-lib/components/fields/BoolField.js +13 -0
- package/dist-lib/components/fields/EmailField.js +16 -0
- package/dist-lib/components/fields/EnumField.js +38 -0
- package/dist-lib/components/fields/FileReferenceField.js +60 -0
- package/dist-lib/components/fields/IntArrayField.js +83 -0
- package/dist-lib/components/fields/JsonField.js +51 -0
- package/dist-lib/components/fields/MultilangArrayField.js +56 -0
- package/dist-lib/components/fields/MultilangField.js +65 -0
- package/dist-lib/components/fields/MultilangTextField.js +65 -0
- package/dist-lib/components/fields/NumberField.js +64 -0
- package/dist-lib/components/fields/PasswordField.js +34 -0
- package/dist-lib/components/fields/PhoneField.js +84 -0
- package/dist-lib/components/fields/RefCombobox.js +112 -0
- package/dist-lib/components/fields/RefField.js +45 -0
- package/dist-lib/components/fields/RichTextField.js +225 -0
- package/dist-lib/components/fields/SecretField.js +34 -0
- package/dist-lib/components/fields/StringArrayField.js +165 -0
- package/dist-lib/components/fields/StringField.js +39 -0
- package/dist-lib/components/fields/StructureField.js +221 -0
- package/dist-lib/components/fields/TextField.js +76 -0
- package/dist-lib/components/fields/TimestampField.js +110 -0
- package/dist-lib/components/fields/UrlField.js +18 -0
- package/dist-lib/components/fields/cells/factories/badge.js +42 -0
- package/dist-lib/components/fields/cells/factories/boolPill.js +17 -0
- package/dist-lib/components/fields/cells/factories/code.js +11 -0
- package/dist-lib/components/fields/cells/factories/date.js +30 -0
- package/dist-lib/components/fields/cells/factories/email.js +26 -0
- package/dist-lib/components/fields/cells/factories/emptyCell.js +10 -0
- package/dist-lib/components/fields/cells/factories/fileReference.js +17 -0
- package/dist-lib/components/fields/cells/factories/host-icons.js +146 -0
- package/dist-lib/components/fields/cells/factories/json.js +61 -0
- package/dist-lib/components/fields/cells/factories/link.js +32 -0
- package/dist-lib/components/fields/cells/factories/markdown.js +31 -0
- package/dist-lib/components/fields/cells/factories/markdownPreview.js +81 -0
- package/dist-lib/components/fields/cells/factories/money.js +37 -0
- package/dist-lib/components/fields/cells/factories/multilangInline.js +35 -0
- package/dist-lib/components/fields/cells/factories/nextRun.js +46 -0
- package/dist-lib/components/fields/cells/factories/number.js +42 -0
- package/dist-lib/components/fields/cells/factories/passwordMask.js +23 -0
- package/dist-lib/components/fields/cells/factories/phone.js +35 -0
- package/dist-lib/components/fields/cells/factories/refLink.js +57 -0
- package/dist-lib/components/fields/cells/factories/richTextPreview.js +34 -0
- package/dist-lib/components/fields/cells/factories/statusPill.js +35 -0
- package/dist-lib/components/fields/cells/factories/tagList.js +44 -0
- package/dist-lib/components/fields/cells/factories/text.js +5 -0
- package/dist-lib/components/fields/cells/factories/timestamp.js +18 -0
- package/dist-lib/components/fields/cells/factories/url-helpers.js +49 -0
- package/dist-lib/components/fields/cells/factories/url.js +45 -0
- package/dist-lib/components/fields/cells/registry.js +58 -0
- package/dist-lib/components/fields/index.js +80 -0
- package/dist-lib/components/fields/langMap.js +6 -0
- package/dist-lib/components/fields/secretValue.js +7 -0
- package/dist-lib/components/file-widgets/CircleImage.js +11 -0
- package/dist-lib/components/file-widgets/DocumentCard.js +277 -0
- package/dist-lib/components/file-widgets/FileList.js +213 -0
- package/dist-lib/{Grid-XUHm5SDe.js → components/file-widgets/Grid.js} +45 -40
- package/dist-lib/components/file-widgets/GridLazy.js +15 -0
- package/dist-lib/components/file-widgets/ImageWidget.js +354 -0
- package/dist-lib/components/file-widgets/LabeledSlots.js +69 -0
- package/dist-lib/components/file-widgets/SquareImage.js +11 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.js +22 -0
- package/dist-lib/components/file-widgets/UploadFailureText.js +10 -0
- package/dist-lib/components/file-widgets/WideBanner.js +11 -0
- package/dist-lib/components/file-widgets/builtins.js +15 -0
- package/dist-lib/components/file-widgets/cropper.js +13 -0
- package/dist-lib/components/file-widgets/draft-scope.js +59 -0
- package/dist-lib/components/file-widgets/helpers.js +75 -0
- package/dist-lib/components/file-widgets/host.js +75 -0
- package/dist-lib/{payload-DioMoxMX.js → components/file-widgets/payload.js} +14 -14
- package/dist-lib/components/file-widgets/registry.js +13 -0
- package/dist-lib/components/file-widgets/upload.js +180 -0
- package/dist-lib/components/file-widgets/useEmbedFileSrc.js +45 -0
- package/dist-lib/components/file-widgets/value.js +12 -0
- package/dist-lib/components/filters/FilterChips.js +123 -0
- package/dist-lib/components/filters/FilterConditionValue.js +40 -0
- package/dist-lib/components/filters/FilterDrawer.js +670 -0
- package/dist-lib/components/filters/FilterOmittedNotice.js +14 -0
- package/dist-lib/components/filters/filter-op-label.js +8 -0
- package/dist-lib/{CommandPalette.impl-DRI5kxVY.js → components/layout/CommandPalette.impl.js} +62 -61
- package/dist-lib/components/layout/CommandPalette.js +12 -0
- package/dist-lib/{DirtyTabsCloseDialog.impl-FhAiOmEb.js → components/layout/DirtyTabsCloseDialog.impl.js} +16 -14
- package/dist-lib/components/layout/DirtyTabsCloseDialog.js +12 -0
- package/dist-lib/{ImpersonationBanner.impl--g0iYwcV.js → components/layout/ImpersonationBanner.impl.js} +4 -3
- package/dist-lib/components/layout/ImpersonationBanner.js +12 -0
- package/dist-lib/components/layout/ImpersonationFrame.js +29 -0
- package/dist-lib/{ImpersonationStartModal.impl-BFBN0YJe.js → components/layout/ImpersonationStartModal.impl.js} +9 -9
- package/dist-lib/components/layout/ImpersonationStartModal.js +12 -0
- package/dist-lib/components/layout/Layout.js +755 -0
- package/dist-lib/components/layout/Rail.js +149 -0
- package/dist-lib/components/layout/Sidebar.js +362 -0
- package/dist-lib/components/layout/TabStrip.js +321 -0
- package/dist-lib/components/layout/TenantChip.js +355 -0
- package/dist-lib/components/layout/TopBar.js +305 -0
- package/dist-lib/components/layout/tab-close.js +24 -0
- package/dist-lib/components/list/ColumnPicker.js +112 -0
- package/dist-lib/components/list/InlineEditCell.js +107 -0
- package/dist-lib/components/list/PeekFieldCell.js +143 -0
- package/dist-lib/components/list/QuickPeek.js +263 -0
- package/dist-lib/components/list/ViewSwitcher.js +156 -0
- package/dist-lib/components/list/peekDraftStore.js +14 -0
- package/dist-lib/{AdminCatalogPage.impl-B-7MLqa1.js → components/pages/AdminCatalogPage.impl.js} +53 -49
- package/dist-lib/components/pages/AdminCatalogPage.js +12 -0
- package/dist-lib/components/pages/DocumentsMenu.js +150 -0
- package/dist-lib/components/pages/ExportMenu.js +123 -0
- package/dist-lib/{NotFoundPage.impl-BoX11u-P.js → components/pages/NotFoundPage.impl.js} +6 -4
- package/dist-lib/components/pages/NotFoundPage.js +12 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.js +230 -0
- package/dist-lib/components/pages/RecordNotesPanel.js +200 -0
- package/dist-lib/components/pages/RecordPanels.js +18 -0
- package/dist-lib/components/pages/SSOCallbackPage.impl.js +28 -0
- package/dist-lib/components/pages/SSOCallbackPage.js +12 -0
- package/dist-lib/components/pages/SmartDetailPage.impl.js +986 -0
- package/dist-lib/components/pages/SmartDetailPage.js +12 -0
- package/dist-lib/components/pages/SmartListPage.impl.js +708 -0
- package/dist-lib/components/pages/SmartListPage.js +12 -0
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +818 -0
- package/dist-lib/components/pages/SmartRecordListPage.js +12 -0
- package/dist-lib/components/pages/auth/AuthShell.js +350 -0
- package/dist-lib/{Forgot.impl-6tL6SBlS.js → components/pages/auth/Forgot.impl.js} +13 -12
- package/dist-lib/components/pages/auth/Forgot.js +12 -0
- package/dist-lib/{Reset.impl-D0pjhS6d.js → components/pages/auth/Reset.impl.js} +17 -15
- package/dist-lib/components/pages/auth/Reset.js +12 -0
- package/dist-lib/components/pages/auth/SignIn.js +252 -0
- package/dist-lib/{SignUp.impl-CfEXrUeg.js → components/pages/auth/SignUp.impl.js} +31 -27
- package/dist-lib/components/pages/auth/SignUp.js +12 -0
- package/dist-lib/{TwoFA.impl-B2HtPduH.js → components/pages/auth/TwoFA.impl.js} +9 -8
- package/dist-lib/components/pages/auth/TwoFA.js +12 -0
- package/dist-lib/components/pages/auth/icons.js +56 -0
- package/dist-lib/components/pages/exportRequest.js +17 -0
- package/dist-lib/components/pages/list/DataCell.js +27 -0
- package/dist-lib/components/pages/list/DeleteViewDialog.js +22 -0
- package/dist-lib/{ListCardsBody-BEoYjSZ2.js → components/pages/list/ListCardRow.js} +47 -72
- package/dist-lib/components/pages/list/ListCardsBody.js +31 -0
- package/dist-lib/components/pages/list/ListFloatbar.js +130 -0
- package/dist-lib/components/pages/list/ListFooter.js +138 -0
- package/dist-lib/components/pages/list/ListHeader.js +120 -0
- package/dist-lib/components/pages/list/ListNoRows.js +72 -0
- package/dist-lib/components/pages/list/ListTable.js +191 -0
- package/dist-lib/components/pages/list/ListTableRow.js +37 -0
- package/dist-lib/components/pages/list/ListToolbar.js +261 -0
- package/dist-lib/components/pages/list/ListUrlBanner.js +45 -0
- package/dist-lib/components/pages/list/RowActionsCell.js +49 -0
- package/dist-lib/components/pages/list/RowContextMenu.js +55 -0
- package/dist-lib/components/pages/list/SaveViewDialog.js +111 -0
- package/dist-lib/{SortHeaderMenu-Co5PvhTA.js → components/pages/list/SortHeaderMenu.js} +18 -17
- package/dist-lib/{cardProjection-Cxlogzh8.js → components/pages/list/cardProjection.js} +3 -3
- package/dist-lib/components/pages/list/column-sizing.js +17 -0
- package/dist-lib/components/pages/list/columns.js +168 -0
- package/dist-lib/components/pages/list/filter-meta.js +84 -0
- package/dist-lib/components/pages/list/page-size.js +11 -0
- package/dist-lib/components/pages/list/sortable-header.js +18 -0
- package/dist-lib/components/pages/list/table-features.js +11 -0
- package/dist-lib/components/pages/list/use-filter-value-labels.js +115 -0
- package/dist-lib/components/pages/list/useActiveView.js +98 -0
- package/dist-lib/components/pages/list/useHeaderReorder.js +93 -0
- package/dist-lib/components/pages/list/useListColumnLayout.js +56 -0
- package/dist-lib/components/pages/list/useListFilterPresentation.js +34 -0
- package/dist-lib/components/pages/list/useListQuery.js +101 -0
- package/dist-lib/components/pages/list/useListRowInteraction.js +120 -0
- package/dist-lib/components/pages/list/useListSelection.js +53 -0
- package/dist-lib/components/pages/list/useListSort.js +44 -0
- package/dist-lib/components/pages/list/useListViews.js +148 -0
- package/dist-lib/components/pages/list/useRowMenu.js +106 -0
- package/dist-lib/components/pages/list/visible-filters.js +19 -0
- package/dist-lib/{Preferences.impl-Ct5xwZtT.js → components/pages/profile/Preferences.impl.js} +34 -31
- package/dist-lib/components/pages/profile/Preferences.js +12 -0
- package/dist-lib/components/pages/profile/Profile.impl.js +437 -0
- package/dist-lib/components/pages/profile/Profile.js +12 -0
- package/dist-lib/{TenantParamsPage.impl-BGpdmEZg.js → components/pages/tenant-params/TenantParamsPage.impl.js} +45 -40
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +12 -0
- package/dist-lib/components/params/ParamsBlock.js +119 -0
- package/dist-lib/{param-editors-TYYU7HKK.js → components/params/param-editors.js} +32 -28
- package/dist-lib/components/primitives/Avatar.js +33 -0
- package/dist-lib/components/primitives/BoolToggle.js +35 -0
- package/dist-lib/components/primitives/BrandGlyph.js +38 -0
- package/dist-lib/components/primitives/BrandLogo.js +20 -0
- package/dist-lib/components/primitives/Btn.js +67 -0
- package/dist-lib/{Check-DAfMbQIw.js → components/primitives/Check.js} +2 -2
- package/dist-lib/components/primitives/Chip.js +44 -0
- package/dist-lib/components/primitives/ClassifiedFieldLocked.js +15 -0
- package/dist-lib/components/primitives/Dropdown.js +85 -0
- package/dist-lib/components/primitives/Fields.js +751 -0
- package/dist-lib/components/primitives/HoverCard.js +115 -0
- package/dist-lib/components/primitives/IconBtn.js +37 -0
- package/dist-lib/{Icons-lt-7lhYR.js → components/primitives/Icons.js} +1 -1
- package/dist-lib/{Kbd-CNttVu0z.js → components/primitives/Kbd.js} +2 -2
- package/dist-lib/components/primitives/MenuItem.js +57 -0
- package/dist-lib/{Pill-D-wsfRhx.js → components/primitives/Pill.js} +1 -1
- package/dist-lib/{RecordIdBadge-wbigZaFc.js → components/primitives/RecordIdBadge.js} +5 -5
- package/dist-lib/components/primitives/RowField.js +47 -0
- package/dist-lib/{SectionCard-BYHoHWJc.js → components/primitives/SectionCard.js} +10 -10
- package/dist-lib/components/primitives/Spinner.js +31 -0
- package/dist-lib/components/primitives/StatTile.js +108 -0
- package/dist-lib/components/primitives/Tooltip.js +115 -0
- package/dist-lib/{dataTableStyles-vwD1mVOP.js → components/primitives/dataTableStyles.js} +1 -1
- package/dist-lib/components/shared/BlankScreen.js +13 -0
- package/dist-lib/{ChangePasswordDialog.impl-5hDc0wpE.js → components/shared/ChangePasswordDialog.impl.js} +27 -22
- package/dist-lib/{ChangePasswordDialog-C_T_3pjl.js → components/shared/ChangePasswordDialog.js} +2 -2
- package/dist-lib/components/shared/ConfirmDialog.js +129 -0
- package/dist-lib/components/shared/ConnectionNotice.js +12 -0
- package/dist-lib/components/shared/CopyButton.js +25 -0
- package/dist-lib/components/shared/DynamicIcon.js +73 -0
- package/dist-lib/components/shared/EmptyState.js +56 -0
- package/dist-lib/components/shared/ErrorBoundary.js +96 -0
- package/dist-lib/components/shared/LoadingSkeleton.js +117 -0
- package/dist-lib/components/shared/LucideIcon.js +43 -0
- package/dist-lib/components/shared/Markdown.js +15 -0
- package/dist-lib/{MarkdownRenderer-sK2TRZS-.js → components/shared/MarkdownRenderer.js} +10 -9
- package/dist-lib/components/shared/RefreshControl.js +42 -0
- package/dist-lib/components/shared/StatusGroupsDisplay.js +123 -0
- package/dist-lib/components/shared/StatusStepper.js +70 -0
- package/dist-lib/components/shared/toast/DeclarionToast.js +308 -0
- package/dist-lib/components/shared/useOwnRefresh.js +19 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/EmbedAuthBootstrap.js +71 -0
- package/dist-lib/embed/EmbedContext.js +38 -0
- package/dist-lib/embed/EmbedDirtyReporter.js +17 -0
- package/dist-lib/embed/EmbedHistoryTracker.js +17 -0
- package/dist-lib/embed/EmbedLocationReporter.js +26 -0
- package/dist-lib/embed/EmbedResizeReporter.js +25 -0
- package/dist-lib/embed/EmbedUnsavedGuard.js +23 -0
- package/dist-lib/embed/embed-dirty.js +21 -0
- package/dist-lib/embed/embed-history.js +17 -0
- package/dist-lib/embed/embed-nav-guard.js +13 -0
- package/dist-lib/embed/file-src.js +60 -0
- package/dist-lib/embed/handshake.js +37 -0
- package/dist-lib/embed/params.js +45 -0
- package/dist-lib/embed/protocol.js +26 -0
- package/dist-lib/embed/screen-location.js +44 -0
- package/dist-lib/embed/theme.js +11 -0
- package/dist-lib/embed/token.js +54 -0
- package/dist-lib/embed/useEmbedNavigate.js +65 -0
- package/dist-lib/embed/useGlobalLinkInterceptor.js +63 -0
- package/dist-lib/hooks/useActionData.js +58 -0
- package/dist-lib/hooks/useAgentConversation.js +311 -0
- package/dist-lib/hooks/useAggregate.js +18 -0
- package/dist-lib/hooks/useAllEntityData.js +53 -0
- package/dist-lib/hooks/useAssociatedData.js +37 -0
- package/dist-lib/hooks/useAuth.js +56 -0
- package/dist-lib/hooks/useBranding.js +18 -0
- package/dist-lib/hooks/useBrandingChrome.js +58 -0
- package/dist-lib/hooks/useChildrenData.js +33 -0
- package/dist-lib/hooks/useColumns.js +44 -0
- package/dist-lib/hooks/useConnectionNotice.js +35 -0
- package/dist-lib/{useCurrentLocation-Bq1T72AW.js → hooks/useCurrentLocation.js} +2 -2
- package/dist-lib/hooks/useCurrentScreen.js +20 -0
- package/dist-lib/hooks/useCursorEntityData.js +77 -0
- package/dist-lib/hooks/useDebounce.js +11 -0
- package/dist-lib/hooks/useEntity.js +8 -0
- package/dist-lib/hooks/useEntityData.js +64 -0
- package/dist-lib/hooks/useFileReferenceJSON.js +29 -0
- package/dist-lib/hooks/useFilters.js +28 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +84 -0
- package/dist-lib/hooks/useImpersonation.js +40 -0
- package/dist-lib/hooks/useIntentPrefetch.js +43 -0
- package/dist-lib/hooks/useJsonSnapshot.js +8 -0
- package/dist-lib/hooks/useLanguage.js +21 -0
- package/dist-lib/hooks/useLiveObject.js +17 -0
- package/dist-lib/hooks/useLongPress.js +49 -0
- package/dist-lib/hooks/useMutations.js +70 -0
- package/dist-lib/{useObject-B45F96rC.js → hooks/useObject.js} +2 -2
- package/dist-lib/hooks/useObjectStatus.js +20 -0
- package/dist-lib/hooks/usePageState.js +18 -0
- package/dist-lib/hooks/usePageStateRuntime.js +46 -0
- package/dist-lib/hooks/usePageStateTtl.js +10 -0
- package/dist-lib/hooks/useParams.js +123 -0
- package/dist-lib/hooks/useProperties.js +32 -0
- package/dist-lib/hooks/useRealtimeThresholds.js +31 -0
- package/dist-lib/hooks/useRegisterScreenTab.js +28 -0
- package/dist-lib/hooks/useResponsiveMode.js +84 -0
- package/dist-lib/hooks/useSSE.js +307 -0
- package/dist-lib/hooks/useSchema.js +73 -0
- package/dist-lib/hooks/useScreen.js +8 -0
- package/dist-lib/hooks/useScreenBack.js +60 -0
- package/dist-lib/hooks/useScreenTab.js +11 -0
- package/dist-lib/hooks/useTabNavigate.js +82 -0
- package/dist-lib/hooks/useTabSearchMirror.js +19 -0
- package/dist-lib/{useTabTitle-KrzEo118.js → hooks/useTabTitle.js} +9 -7
- package/dist-lib/hooks/useText.js +15 -0
- package/dist-lib/hooks/useTimelineData.js +44 -0
- package/dist-lib/hooks/useUnsavedInput.js +18 -0
- package/dist-lib/hooks/useVersionWatcher.js +62 -0
- package/dist-lib/hooks/useViews.js +88 -0
- package/dist-lib/hooks/useWindowConversation.js +11 -0
- package/dist-lib/icons.js +5 -3
- package/dist-lib/index.d.ts +42 -20
- package/dist-lib/index.js +131 -3926
- package/dist-lib/lib/action-dispatch.js +7 -0
- package/dist-lib/lib/actions.js +279 -0
- package/dist-lib/lib/anchor.js +41 -0
- package/dist-lib/lib/brand-tokens.js +95 -0
- package/dist-lib/lib/branding.js +25 -0
- package/dist-lib/lib/canonical-url.js +17 -0
- package/dist-lib/lib/capabilityPrefetch.js +57 -0
- package/dist-lib/lib/child-config.js +111 -0
- package/dist-lib/lib/children-validation.js +52 -0
- package/dist-lib/lib/decimal-text.js +15 -0
- package/dist-lib/lib/display-value.js +19 -0
- package/dist-lib/lib/document-templates.js +6 -0
- package/dist-lib/lib/download.js +41 -0
- package/dist-lib/lib/evidence-verdict.js +23 -0
- package/dist-lib/lib/failure.js +9 -0
- package/dist-lib/lib/field-classification.js +58 -0
- package/dist-lib/lib/field-regions.js +13 -0
- package/dist-lib/lib/filter-evaluator.js +98 -0
- package/dist-lib/lib/filters.js +118 -0
- package/dist-lib/lib/format-count.js +24 -0
- package/dist-lib/lib/html-state.js +9 -0
- package/dist-lib/lib/language.js +52 -0
- package/dist-lib/lib/longPressGesture.js +34 -0
- package/dist-lib/lib/mass-edit.js +65 -0
- package/dist-lib/{page-inset-D_kkVwwN.js → lib/page-inset.js} +1 -1
- package/dist-lib/lib/phone.js +28 -0
- package/dist-lib/lib/query-retry.js +7 -0
- package/dist-lib/lib/quick-add.js +23 -0
- package/dist-lib/lib/realtime-query-keys.js +23 -0
- package/dist-lib/lib/realtime-reconcile.js +148 -0
- package/dist-lib/lib/realtime-resync.js +192 -0
- package/dist-lib/lib/record-documents-key.js +4 -0
- package/dist-lib/lib/ref-choices.js +6 -0
- package/dist-lib/lib/refetch-when-idle.js +25 -0
- package/dist-lib/lib/rich-text.js +46 -0
- package/dist-lib/lib/rowClickGesture.js +10 -0
- package/dist-lib/lib/safe-url.js +34 -0
- package/dist-lib/lib/schema-routing.js +51 -0
- package/dist-lib/{screen-back-BtbEp5sO.js → lib/screen-back.js} +2 -2
- package/dist-lib/lib/scroll-restoration.js +156 -0
- package/dist-lib/lib/size-value.js +22 -0
- package/dist-lib/lib/sort.js +59 -0
- package/dist-lib/lib/timestamp.js +97 -0
- package/dist-lib/lib/toast.js +78 -0
- package/dist-lib/lib/ui-actions.js +81 -0
- package/dist-lib/{utils-D_QDpB8_.js → lib/utils.js} +1 -1
- package/dist-lib/lib/variants.js +63 -0
- package/dist-lib/lib/versionTracker.js +102 -0
- package/dist-lib/lib/viewport-category.js +12 -0
- package/dist-lib/{window-election-CHIvIZwx.js → lib/window-election.js} +1 -1
- package/dist-lib/stores/auth.js +84 -0
- package/dist-lib/stores/icon-registry.js +24 -0
- package/dist-lib/stores/list-layout.js +178 -0
- package/dist-lib/{page-state-eA6J_KIR.js → stores/page-state.js} +1 -1
- package/dist-lib/stores/preferences.js +126 -0
- package/dist-lib/stores/realtime.js +115 -0
- package/dist-lib/stores/screen-registry.js +10 -0
- package/dist-lib/stores/tabs.js +220 -0
- package/dist-lib/test/seed-schema.js +8 -0
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +80 -76
- package/dist-lib/types/api.js +48 -0
- package/dist-lib/types/fieldType.js +4 -0
- package/dist-lib/types/ordmap.js +50 -0
- package/dist-lib/types/schema.js +173 -0
- package/dist-lib/{useResponsiveMode-DIR1bZfo.d.ts → useResponsiveMode-DmrpMbZX.d.ts} +44 -16
- package/package.json +13 -12
- package/dist-lib/ActionRunner-DdBFhqGe.js +0 -1440
- package/dist-lib/AgentOpenFollower.impl-BAs_wGEZ.js +0 -81
- package/dist-lib/AssociatedBlock-BOoPLOjw.js +0 -1515
- package/dist-lib/AuthShell-C8aVwHS7.js +0 -361
- package/dist-lib/BlankScreen-DVc7fh8C.js +0 -61
- package/dist-lib/CopyButton-DRIT_f0k.js +0 -119
- package/dist-lib/DynamicIcon-DuBSz6TZ.js +0 -133
- package/dist-lib/FilterChips-Cv1tlXyo.js +0 -1031
- package/dist-lib/LayoutRenderer-d-tXYPze.js +0 -3239
- package/dist-lib/MenuItem-CfkVXPvC.js +0 -140
- package/dist-lib/MonacoJson-BG3S3GHX.js +0 -60
- package/dist-lib/Profile.impl-Cypk27ah.js +0 -527
- package/dist-lib/PropertyGridEditor-XrP6TZ5s.js +0 -4378
- package/dist-lib/RecordHeader-BfQ0_4wq.js +0 -217
- package/dist-lib/RefreshControl-CRdWPoF5.js +0 -195
- package/dist-lib/SSOCallbackPage.impl-Cfi2pQ59.js +0 -31
- package/dist-lib/SmartDetailPage.impl-BiIX0n7K.js +0 -1609
- package/dist-lib/SmartListPage.impl-Cu83Gv_G.js +0 -2818
- package/dist-lib/SmartRecordListPage.impl-DR6lq7HA.js +0 -795
- package/dist-lib/format-count-lyB4CPen.js +0 -943
- package/dist-lib/peekDraftStore-CaimrOhW.js +0 -200
- package/dist-lib/registry-CGe5kCXN.js +0 -119
- package/dist-lib/use-filter-value-labels-D3YDgUzg.js +0 -413
- package/dist-lib/useAgentConversation-rru-7hnF.js +0 -612
- package/dist-lib/useBranding-zcxEic2k.js +0 -41
- package/dist-lib/useBrandingChrome-bxaR3G1R.js +0 -170
- package/dist-lib/useCurrentScreen-BZOHBGQZ.js +0 -2522
- package/dist-lib/useImpersonation-DBIRRR70.js +0 -35
- package/dist-lib/useOwnRefresh-DJjaje52.js +0 -435
- package/dist-lib/useParams-BFLJi4n3.js +0 -133
- package/dist-lib/useProperties-B7opZ-iy.js +0 -81
- package/dist-lib/useScreenBack-DENlz844.js +0 -71
- package/dist-lib/useTabNavigate-CUqOmcMj.js +0 -78
- package/dist-lib/value-BuQVYx52.js +0 -194
- package/dist-lib/variants-vUtfBbE6.js +0 -1961
- /package/dist-lib/{JsonEditor-Dz1PQHC8.js → components/fields/JsonEditor.js} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "../hooks/useChildrenData.js";
|
|
2
|
+
import "./record-documents-key.js";
|
|
3
|
+
import { CURSOR_ENTITY_DATA_KEY as e } from "../hooks/useCursorEntityData.js";
|
|
4
|
+
//#region src/lib/realtime-query-keys.ts
|
|
5
|
+
var t = ["entity-data", "entity-data-all"], n = [e], r = [...t, ...n], i = "generated_document", a = "entity-aggregate";
|
|
6
|
+
function o(e) {
|
|
7
|
+
return typeof e[0] == "string" && r.includes(e[0]);
|
|
8
|
+
}
|
|
9
|
+
function s(e) {
|
|
10
|
+
return n.includes(e[0]);
|
|
11
|
+
}
|
|
12
|
+
function c(e) {
|
|
13
|
+
return o(e) || e[0] === "entity-count" || e[0] === "entity-aggregate" || e[0] === "entity-item";
|
|
14
|
+
}
|
|
15
|
+
function l(e) {
|
|
16
|
+
let t = null;
|
|
17
|
+
return c(e) ? t = e[1] : e[0] === "entity-children" ? t = e[3] : e[0] === "record-documents" && (t = i), typeof t == "string" ? t : null;
|
|
18
|
+
}
|
|
19
|
+
function u(e) {
|
|
20
|
+
return l(e) !== null;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { a as ENTITY_AGGREGATE_KEY, i as GENERATED_DOCUMENT_ENTITY, r as LIST_CACHE_KEYS, t as NARROWED_LIST_CACHE_KEYS, n as REFETCH_ONLY_LIST_CACHE_KEYS, l as entityOfRealtimeQueryKey, c as isEntityRowsKey, o as isListCacheKey, u as isRealtimeBackedQueryKey, s as isRefetchOnlyListKey };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { ApiError as e } from "../types/api.js";
|
|
2
|
+
import { listEntities as t } from "../api/data.js";
|
|
3
|
+
import { entityCountQueryKey as n } from "../hooks/useEntityData.js";
|
|
4
|
+
import { parseSort as r } from "./sort.js";
|
|
5
|
+
import { isListCacheKey as i, isRefetchOnlyListKey as a } from "./realtime-query-keys.js";
|
|
6
|
+
import { openResync as o } from "./realtime-resync.js";
|
|
7
|
+
import { refetchWhenIdle as s } from "./refetch-when-idle.js";
|
|
8
|
+
//#region src/lib/realtime-reconcile.ts
|
|
9
|
+
async function c(e, t, n, r) {
|
|
10
|
+
let o = e.getQueryCache().findAll({ predicate: (e) => i(e.queryKey) && e.queryKey[1] === t }), c = !1, u = [];
|
|
11
|
+
for (let i of o) i.state.data !== void 0 && (i.getObserversCount() === 0 ? e.invalidateQueries({
|
|
12
|
+
queryKey: i.queryKey,
|
|
13
|
+
refetchType: "none"
|
|
14
|
+
}) : a(i.queryKey) ? s(e, i) : u.push(l(e, i, t, n, r).then((e) => {
|
|
15
|
+
e.refetchCount && (c = !0);
|
|
16
|
+
})));
|
|
17
|
+
return await Promise.all(u), c;
|
|
18
|
+
}
|
|
19
|
+
async function l(e, r, i, a, c) {
|
|
20
|
+
let l = r.state.data;
|
|
21
|
+
if (!l || !Array.isArray(l.data)) return s(e, r), {
|
|
22
|
+
refetchWindow: !0,
|
|
23
|
+
refetchCount: !0
|
|
24
|
+
};
|
|
25
|
+
let d = y(r), f = d.per_page ?? l.data.length;
|
|
26
|
+
if (a.length > f) return p(e, r);
|
|
27
|
+
let h, g = S(r), _ = r.state.dataUpdateCount;
|
|
28
|
+
try {
|
|
29
|
+
h = await t(i, m(d, a), { signal: c });
|
|
30
|
+
} catch (t) {
|
|
31
|
+
return b(t) ? (o(e, {
|
|
32
|
+
scope: { kind: "keys" },
|
|
33
|
+
keys: [r.queryKey, n(i, d)],
|
|
34
|
+
standing: !0
|
|
35
|
+
}), e.invalidateQueries({
|
|
36
|
+
queryKey: r.queryKey,
|
|
37
|
+
refetchType: "none"
|
|
38
|
+
}), {
|
|
39
|
+
refetchWindow: !1,
|
|
40
|
+
refetchCount: !1
|
|
41
|
+
}) : p(e, r);
|
|
42
|
+
}
|
|
43
|
+
return h.meta?.has_more || r.state.dataUpdateCount !== _ ? p(e, r) : u(e, r, l, d, a, h, g);
|
|
44
|
+
}
|
|
45
|
+
function u(e, t, n, i, a, o, c) {
|
|
46
|
+
let l = r(i.sort).map((e) => e.field), u = v(t, i), f = {
|
|
47
|
+
refetchWindow: !1,
|
|
48
|
+
refetchCount: !1
|
|
49
|
+
}, p = [], m = [];
|
|
50
|
+
for (let e of a) {
|
|
51
|
+
let t = o.data.find((t) => _(t, e.pk)), r = n.data.findIndex((t) => _(t, e.pk));
|
|
52
|
+
t && r >= 0 ? g(l, n.data[r], t) ? f.refetchWindow = !0 : p.push({
|
|
53
|
+
pk: e.pk,
|
|
54
|
+
row: t
|
|
55
|
+
}) : t ? (f.refetchWindow = !0, f.refetchCount = !0) : r >= 0 ? (m.push(e.pk), f.refetchWindow = !0, f.refetchCount = !0) : e.createdOnly || (f.refetchCount = !0, u || (f.refetchWindow = !0));
|
|
56
|
+
}
|
|
57
|
+
return (m.length > 0 || p.length > 0 && !f.refetchWindow) && d(e, t, p, m, o, c), f.refetchWindow && s(e, t), f;
|
|
58
|
+
}
|
|
59
|
+
function d(e, t, n, r, i, a) {
|
|
60
|
+
C(t, a) && e.setQueryData(t.queryKey, (e) => {
|
|
61
|
+
if (!e || !Array.isArray(e.data)) return e;
|
|
62
|
+
let t = e.data.map((e) => {
|
|
63
|
+
let t = n.find((t) => _(e, t.pk));
|
|
64
|
+
return t ? t.row : e;
|
|
65
|
+
});
|
|
66
|
+
return r.length > 0 && (t = t.filter((e) => !r.some((t) => _(e, t)))), {
|
|
67
|
+
...e,
|
|
68
|
+
data: t,
|
|
69
|
+
$refs: f(e.$refs, i.$refs)
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function f(e, t) {
|
|
74
|
+
if (!t) return e;
|
|
75
|
+
if (!e) return t;
|
|
76
|
+
let n = { ...e };
|
|
77
|
+
for (let [e, r] of Object.entries(t)) n[e] = {
|
|
78
|
+
...n[e] ?? {},
|
|
79
|
+
...r
|
|
80
|
+
};
|
|
81
|
+
return n;
|
|
82
|
+
}
|
|
83
|
+
function p(e, t) {
|
|
84
|
+
return s(e, t), {
|
|
85
|
+
refetchWindow: !0,
|
|
86
|
+
refetchCount: !0
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function m(e, t) {
|
|
90
|
+
let n = [...e.filters ?? [], h(t)];
|
|
91
|
+
return {
|
|
92
|
+
...e,
|
|
93
|
+
filters: n,
|
|
94
|
+
page: 1,
|
|
95
|
+
per_page: t.length,
|
|
96
|
+
count: "window"
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function h(e) {
|
|
100
|
+
let t = Object.keys(e[0]?.pk ?? {}).sort();
|
|
101
|
+
if (t.length === 1) {
|
|
102
|
+
let n = t[0];
|
|
103
|
+
return {
|
|
104
|
+
field: n,
|
|
105
|
+
op: "in",
|
|
106
|
+
value: e.map((e) => e.pk[n])
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return { or: e.map((e) => ({ and: t.map((t) => ({
|
|
110
|
+
field: t,
|
|
111
|
+
op: "eq",
|
|
112
|
+
value: e.pk[t]
|
|
113
|
+
})) })) };
|
|
114
|
+
}
|
|
115
|
+
function g(e, t, n) {
|
|
116
|
+
for (let r of e) {
|
|
117
|
+
let e = t[r], i = n[r];
|
|
118
|
+
if (e === void 0 || i === void 0 || !Object.is(e, i) && JSON.stringify(e) !== JSON.stringify(i)) return !0;
|
|
119
|
+
}
|
|
120
|
+
return !1;
|
|
121
|
+
}
|
|
122
|
+
function _(e, t) {
|
|
123
|
+
for (let [n, r] of Object.entries(t)) {
|
|
124
|
+
let t = e[n];
|
|
125
|
+
if (typeof t != "string" && typeof t != "number" || String(t) !== r) return !1;
|
|
126
|
+
}
|
|
127
|
+
return !0;
|
|
128
|
+
}
|
|
129
|
+
function v(e, t) {
|
|
130
|
+
return e.queryKey[0] === "entity-data-all" || (t.page ?? 1) === 1;
|
|
131
|
+
}
|
|
132
|
+
function y(e) {
|
|
133
|
+
let t = e.queryKey[2];
|
|
134
|
+
return t && typeof t == "object" ? { ...t } : {};
|
|
135
|
+
}
|
|
136
|
+
function b(t) {
|
|
137
|
+
return t instanceof e && t.status === 429;
|
|
138
|
+
}
|
|
139
|
+
var x = /* @__PURE__ */ new WeakMap();
|
|
140
|
+
function S(e) {
|
|
141
|
+
let t = (x.get(e) ?? 0) + 1;
|
|
142
|
+
return x.set(e, t), t;
|
|
143
|
+
}
|
|
144
|
+
function C(e, t) {
|
|
145
|
+
return (x.get(e) ?? 0) === t;
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
export { m as narrowedParams, c as reconcileListCaches };
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { useRealtimeStore as e } from "../stores/realtime.js";
|
|
2
|
+
import { entityOfRealtimeQueryKey as t } from "./realtime-query-keys.js";
|
|
3
|
+
import { useEffect as n } from "react";
|
|
4
|
+
import { hashKey as r } from "@tanstack/react-query";
|
|
5
|
+
//#region src/lib/realtime-resync.ts
|
|
6
|
+
var i = 3e3, a = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
function o(e) {
|
|
8
|
+
let t = a.get(e);
|
|
9
|
+
return t || (t = {
|
|
10
|
+
counter: 0,
|
|
11
|
+
inFlight: /* @__PURE__ */ new WeakMap(),
|
|
12
|
+
lastSettled: /* @__PURE__ */ new WeakMap(),
|
|
13
|
+
lastSuccess: /* @__PURE__ */ new WeakMap()
|
|
14
|
+
}, a.set(e, t)), t;
|
|
15
|
+
}
|
|
16
|
+
function s(e, t) {
|
|
17
|
+
if (t.type !== "updated") return;
|
|
18
|
+
let { query: n, action: r } = t;
|
|
19
|
+
switch (r.type) {
|
|
20
|
+
case "fetch":
|
|
21
|
+
e.inFlight.set(n, ++e.counter);
|
|
22
|
+
return;
|
|
23
|
+
case "success": {
|
|
24
|
+
if (r.manual) return;
|
|
25
|
+
let t = e.inFlight.get(n);
|
|
26
|
+
e.inFlight.delete(n), e.lastSettled.set(n, t), t !== void 0 && e.lastSuccess.set(n, t);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
case "error":
|
|
30
|
+
e.lastSettled.set(n, e.inFlight.get(n)), e.inFlight.delete(n);
|
|
31
|
+
return;
|
|
32
|
+
case "setState":
|
|
33
|
+
n.state.fetchStatus === "idle" && e.inFlight.delete(n);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function c(e) {
|
|
38
|
+
return e.getObserversCount() > 0 && !e.isDisabled() && !e.isStatic();
|
|
39
|
+
}
|
|
40
|
+
function l(e, n) {
|
|
41
|
+
if (e.kind === "keys") return !1;
|
|
42
|
+
let r = t(n);
|
|
43
|
+
return r === null ? !1 : e.kind === "all" || e.entities.has(r);
|
|
44
|
+
}
|
|
45
|
+
function u(t, n) {
|
|
46
|
+
let i = e.getState(), a = o(t).counter, s = n.carriedMarks ?? /* @__PURE__ */ new Map();
|
|
47
|
+
if (n.scope.kind === "all" && !n.standing) {
|
|
48
|
+
let e = i.resyncs.find((e) => e.scope.kind === "all" && !e.issued && !e.standing);
|
|
49
|
+
if (e) {
|
|
50
|
+
i.updateResync(e.id, {
|
|
51
|
+
generation: a,
|
|
52
|
+
jitter: e.jitter || n.jitter === !0,
|
|
53
|
+
carriedMarks: new Map([...e.carriedMarks, ...s])
|
|
54
|
+
});
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
let c = /* @__PURE__ */ new Map();
|
|
59
|
+
if (n.scope.kind === "keys") for (let e of n.keys ?? []) c.set(r(e), e);
|
|
60
|
+
else for (let e of t.getQueryCache().getAll()) l(n.scope, e.queryKey) && c.set(e.queryHash, e.queryKey);
|
|
61
|
+
i.addResync({
|
|
62
|
+
generation: a,
|
|
63
|
+
openedAt: Date.now(),
|
|
64
|
+
standing: n.standing === !0,
|
|
65
|
+
issued: !1,
|
|
66
|
+
jitter: n.jitter === !0,
|
|
67
|
+
scope: n.scope,
|
|
68
|
+
keys: c,
|
|
69
|
+
observed: /* @__PURE__ */ new Map(),
|
|
70
|
+
carriedMarks: s,
|
|
71
|
+
blocking: /* @__PURE__ */ new Set()
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
var d = class {
|
|
75
|
+
queryClient;
|
|
76
|
+
record;
|
|
77
|
+
timers = /* @__PURE__ */ new Map();
|
|
78
|
+
unsubscribers = [];
|
|
79
|
+
relayHeld;
|
|
80
|
+
running = !1;
|
|
81
|
+
dirty = !1;
|
|
82
|
+
constructor(t) {
|
|
83
|
+
this.queryClient = t, this.record = o(t), this.relayHeld = e.getState().relayInterruptedSince !== null;
|
|
84
|
+
}
|
|
85
|
+
start() {
|
|
86
|
+
this.unsubscribers.push(this.queryClient.getQueryCache().subscribe((e) => this.onCacheEvent(e)), e.subscribe((e, t) => {
|
|
87
|
+
(e.resyncs !== t.resyncs || e.relayInterruptedSince !== t.relayInterruptedSince) && this.reconcile();
|
|
88
|
+
})), this.reconcile();
|
|
89
|
+
}
|
|
90
|
+
stop() {
|
|
91
|
+
for (let e of this.unsubscribers.splice(0)) e();
|
|
92
|
+
for (let e of this.timers.values()) clearTimeout(e);
|
|
93
|
+
this.timers.clear();
|
|
94
|
+
}
|
|
95
|
+
onCacheEvent(t) {
|
|
96
|
+
s(this.record, t);
|
|
97
|
+
let n = e.getState().resyncs;
|
|
98
|
+
n.length !== 0 && ((t.type === "added" || t.type === "observerAdded") && this.takeInKey(n, t.query), t.type === "updated" && (t.action.type === "error" || t.action.type === "success" && !t.action.manual) && this.fetchAgainIfJoinedEarlier(n, t.query), this.reconcile());
|
|
99
|
+
}
|
|
100
|
+
takeInKey(t, n) {
|
|
101
|
+
let r = e.getState(), i = n.queryKey;
|
|
102
|
+
for (let e of t) !e.keys.has(n.queryHash) && l(e.scope, i) && r.updateResync(e.id, { keys: new Map([...e.keys, [n.queryHash, i]]) });
|
|
103
|
+
}
|
|
104
|
+
fetchAgainIfJoinedEarlier(e, t) {
|
|
105
|
+
let n = this.record.lastSettled.get(t);
|
|
106
|
+
e.some((e) => e.issued && !e.standing && e.keys.has(t.queryHash) && (n === void 0 || n <= e.generation)) && c(t) && this.queryClient.invalidateQueries({
|
|
107
|
+
queryKey: t.queryKey,
|
|
108
|
+
exact: !0
|
|
109
|
+
}, { cancelRefetch: !1 });
|
|
110
|
+
}
|
|
111
|
+
reconcile() {
|
|
112
|
+
if (this.running) this.dirty = !0;
|
|
113
|
+
else {
|
|
114
|
+
this.running = !0;
|
|
115
|
+
try {
|
|
116
|
+
do
|
|
117
|
+
this.dirty = !1, this.pass();
|
|
118
|
+
while (this.dirty);
|
|
119
|
+
} finally {
|
|
120
|
+
this.running = !1;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
pass() {
|
|
125
|
+
let t = e.getState(), n = t.relayInterruptedSince !== null;
|
|
126
|
+
if (this.relayHeld && !n) for (let e of t.resyncs) !e.issued && !e.standing && t.updateResync(e.id, { generation: this.record.counter });
|
|
127
|
+
this.relayHeld = n;
|
|
128
|
+
for (let t of e.getState().resyncs) this.schedule(t, n);
|
|
129
|
+
for (let t of e.getState().resyncs) this.evaluate(t);
|
|
130
|
+
for (let t of this.timers.keys()) e.getState().resyncs.some((e) => e.id === t) || this.clearTimer(t);
|
|
131
|
+
}
|
|
132
|
+
schedule(t, n) {
|
|
133
|
+
t.standing || t.issued || n ? this.clearTimer(t.id) : this.timers.has(t.id) || (t.jitter ? this.timers.set(t.id, setTimeout(() => {
|
|
134
|
+
this.timers.delete(t.id), e.getState().relayInterruptedSince === null && (this.issue(t.id), this.reconcile());
|
|
135
|
+
}, Math.random() * i)) : this.issue(t.id));
|
|
136
|
+
}
|
|
137
|
+
clearTimer(e) {
|
|
138
|
+
let t = this.timers.get(e);
|
|
139
|
+
t !== void 0 && (clearTimeout(t), this.timers.delete(e));
|
|
140
|
+
}
|
|
141
|
+
issue(t) {
|
|
142
|
+
let n = e.getState(), r = n.resyncs.find((e) => e.id === t);
|
|
143
|
+
if (!r || r.issued) return;
|
|
144
|
+
n.updateResync(t, { issued: !0 });
|
|
145
|
+
let i = this.queryClient.getQueryCache(), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
146
|
+
for (let e of r.keys.keys()) {
|
|
147
|
+
let t = i.get(e);
|
|
148
|
+
t && ((this.record.lastSuccess.get(t) ?? 0) > r.generation || (this.record.inFlight.get(t) ?? 0) > r.generation || (c(t) ? a.add(t) : o.add(t)));
|
|
149
|
+
}
|
|
150
|
+
o.size > 0 && this.queryClient.invalidateQueries({
|
|
151
|
+
predicate: (e) => o.has(e),
|
|
152
|
+
refetchType: "none"
|
|
153
|
+
}), a.size > 0 && this.queryClient.invalidateQueries({ predicate: (e) => a.has(e) }, { cancelRefetch: !1 });
|
|
154
|
+
}
|
|
155
|
+
evaluate(n) {
|
|
156
|
+
let r = this.queryClient.getQueryCache(), i = /* @__PURE__ */ new Set(), a = new Map(n.observed);
|
|
157
|
+
for (let [e, o] of n.keys) {
|
|
158
|
+
let s = t(o);
|
|
159
|
+
if (s === null) continue;
|
|
160
|
+
let l = r.get(e);
|
|
161
|
+
if (l && c(l)) {
|
|
162
|
+
a.set(e, l), (this.record.lastSuccess.get(l) ?? 0) <= n.generation && i.add(s);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
let u = a.get(e);
|
|
166
|
+
u && u !== l && c(u) ? i.add(s) : a.delete(e);
|
|
167
|
+
}
|
|
168
|
+
let o = e.getState();
|
|
169
|
+
i.size === 0 && (n.issued || n.standing) ? (o.removeResync(n.id), o.unmarkDegraded(n.carriedMarks)) : (!f(i, n.blocking) || !p(a, n.observed)) && o.updateResync(n.id, {
|
|
170
|
+
blocking: i,
|
|
171
|
+
observed: a
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
function f(e, t) {
|
|
176
|
+
if (e.size !== t.size) return !1;
|
|
177
|
+
for (let n of e) if (!t.has(n)) return !1;
|
|
178
|
+
return !0;
|
|
179
|
+
}
|
|
180
|
+
function p(e, t) {
|
|
181
|
+
if (e.size !== t.size) return !1;
|
|
182
|
+
for (let [n, r] of e) if (t.get(n) !== r) return !1;
|
|
183
|
+
return !0;
|
|
184
|
+
}
|
|
185
|
+
function m(e) {
|
|
186
|
+
n(() => {
|
|
187
|
+
let t = new d(e);
|
|
188
|
+
return t.start(), () => t.stop();
|
|
189
|
+
}, [e]);
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
export { u as openResync, m as useResyncEngine };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/lib/refetch-when-idle.ts
|
|
2
|
+
var e = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
if (n.state.fetchStatus !== "fetching") {
|
|
5
|
+
t.invalidateQueries({
|
|
6
|
+
queryKey: n.queryKey,
|
|
7
|
+
exact: !0
|
|
8
|
+
});
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
let r = e.get(t);
|
|
12
|
+
if (!r) {
|
|
13
|
+
let n = /* @__PURE__ */ new Set();
|
|
14
|
+
r = n, e.set(t, n), t.getQueryCache().subscribe((e) => {
|
|
15
|
+
let r = e.query;
|
|
16
|
+
e.type === "updated" && r.state.fetchStatus !== "fetching" && n.delete(r.queryHash) && t.invalidateQueries({
|
|
17
|
+
queryKey: r.queryKey,
|
|
18
|
+
exact: !0
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
r.add(n.queryHash);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { t as refetchWhenIdle };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region src/lib/rich-text.ts
|
|
2
|
+
var e = /declarion:\/\/file\/([0-9a-fA-F-]{36})/g;
|
|
3
|
+
function t(e) {
|
|
4
|
+
return typeof e == "string" ? e : l(e) && typeof e.markdown == "string" ? e.markdown : "";
|
|
5
|
+
}
|
|
6
|
+
function n(e, n) {
|
|
7
|
+
return {
|
|
8
|
+
markdown: t(e),
|
|
9
|
+
files: a(n)
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function r(e, t) {
|
|
13
|
+
let r = n(e, null);
|
|
14
|
+
return r.files[t.id] = t, r;
|
|
15
|
+
}
|
|
16
|
+
function i(e, t) {
|
|
17
|
+
let r = n(e, null);
|
|
18
|
+
for (let e of t) delete r.files[e];
|
|
19
|
+
return r;
|
|
20
|
+
}
|
|
21
|
+
function a(e) {
|
|
22
|
+
if (!Array.isArray(e)) return {};
|
|
23
|
+
let t = {};
|
|
24
|
+
for (let n of e) l(n) && typeof n.id == "string" && (t[n.id] = n);
|
|
25
|
+
return t;
|
|
26
|
+
}
|
|
27
|
+
function o(t) {
|
|
28
|
+
let n = /* @__PURE__ */ new Set(), r = [], i;
|
|
29
|
+
for (e.lastIndex = 0; (i = e.exec(t)) !== null;) {
|
|
30
|
+
let e = i[1];
|
|
31
|
+
n.has(e) || (n.add(e), r.push(e));
|
|
32
|
+
}
|
|
33
|
+
return r;
|
|
34
|
+
}
|
|
35
|
+
function s(e) {
|
|
36
|
+
return e ? /^declarion:\/\/file\/([0-9a-fA-F-]{36})$/.exec(e)?.[1] ?? null : null;
|
|
37
|
+
}
|
|
38
|
+
function c(e) {
|
|
39
|
+
let t = `declarion://file/${e.id}`;
|
|
40
|
+
return e.content_type.startsWith("image/") ? `` : `[${e.filename || e.id}](${t})`;
|
|
41
|
+
}
|
|
42
|
+
function l(e) {
|
|
43
|
+
return typeof e == "object" && !!e;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { n as createRichTextValue, s as extractDeclarionFileId, o as extractDeclarionFileIds, a as inlineFilesById, t as richTextMarkdown, c as richTextTokenForFile, r as withRichTextFile, i as withoutRichTextFiles };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/lib/rowClickGesture.ts
|
|
2
|
+
var e = "a, button, input, select, [role='button'], [role='menuitem']";
|
|
3
|
+
function t(e) {
|
|
4
|
+
return e instanceof Element && e.closest("a, button, input, select, [role='button'], [role='menuitem']") !== null;
|
|
5
|
+
}
|
|
6
|
+
function n(e, t) {
|
|
7
|
+
return e != null && e.rowId === t ? "double" : "single";
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as INTERACTIVE_ROW_TARGET, n as classifyRowClick, t as isInteractiveRowTarget };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/lib/safe-url.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"http:",
|
|
4
|
+
"https:",
|
|
5
|
+
"mailto:"
|
|
6
|
+
], t = /[\u0000-\u001f\u007f]/g;
|
|
7
|
+
function n(n) {
|
|
8
|
+
if (!n) return;
|
|
9
|
+
let r = n.trim();
|
|
10
|
+
if (!r) return;
|
|
11
|
+
let i = r.replace(t, "");
|
|
12
|
+
if (!i || i.startsWith("//")) return;
|
|
13
|
+
let a = i.match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);
|
|
14
|
+
if (a) {
|
|
15
|
+
let t = a[1].toLowerCase() + ":";
|
|
16
|
+
if (!e.includes(t)) return;
|
|
17
|
+
}
|
|
18
|
+
return i;
|
|
19
|
+
}
|
|
20
|
+
function r(e) {
|
|
21
|
+
if (!e) return !1;
|
|
22
|
+
if (e.startsWith("//")) return !0;
|
|
23
|
+
let t = typeof window < "u" ? window.location.href : "http://localhost/", n;
|
|
24
|
+
try {
|
|
25
|
+
n = new URL(e, t);
|
|
26
|
+
} catch {
|
|
27
|
+
return !1;
|
|
28
|
+
}
|
|
29
|
+
if (n.protocol !== "http:" && n.protocol !== "https:") return !0;
|
|
30
|
+
let r = typeof window < "u" ? window.location.origin : "http://localhost";
|
|
31
|
+
return n.origin !== r;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { r as isExternalHref, n as safeExternalUrl };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//#region src/lib/schema-routing.ts
|
|
2
|
+
var e = /* @__PURE__ */ new Set(["/preferences", "/admin/catalog"]);
|
|
3
|
+
function t(e) {
|
|
4
|
+
if (!e?.navigation) return null;
|
|
5
|
+
let t = e.areas ?? [];
|
|
6
|
+
if (t.length > 0) for (let n of t) for (let t of e.navigation) {
|
|
7
|
+
if ((t.area || "default") !== n.code) continue;
|
|
8
|
+
let r = a(e, t);
|
|
9
|
+
if (r) return r;
|
|
10
|
+
}
|
|
11
|
+
for (let t of e.navigation) {
|
|
12
|
+
let n = a(e, t);
|
|
13
|
+
if (n) return n;
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
function n(n, i) {
|
|
18
|
+
let a = t(i) || "/";
|
|
19
|
+
if (!i || n === "/" || n === "/admin") return a;
|
|
20
|
+
let c = r(n);
|
|
21
|
+
if (e.has(c)) return n;
|
|
22
|
+
for (let e of Object.values(i.screens ?? {})) if (e.route && o(i, e) && s(e.route).test(c)) return n;
|
|
23
|
+
return a;
|
|
24
|
+
}
|
|
25
|
+
function r(e) {
|
|
26
|
+
let t = e.indexOf("#"), n = t >= 0 ? e.slice(0, t) : e, r = n.indexOf("?");
|
|
27
|
+
return (r >= 0 ? n.slice(0, r) : n).replace(/\/+$/, "") || "/";
|
|
28
|
+
}
|
|
29
|
+
function i(e, t) {
|
|
30
|
+
let n = e.screens[t];
|
|
31
|
+
return !!n && o(e, n);
|
|
32
|
+
}
|
|
33
|
+
function a(e, t) {
|
|
34
|
+
if (t.screen && i(e, t.screen)) return e.screens[t.screen].route;
|
|
35
|
+
for (let n of [...t.items ?? [], ...t.children ?? []]) {
|
|
36
|
+
let t = a(e, n);
|
|
37
|
+
if (t) return t;
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
function o(e, t) {
|
|
42
|
+
if (t.type !== "list") return !0;
|
|
43
|
+
let n = t.entity;
|
|
44
|
+
return !(n ? e.entities?.[n] : void 0)?.singleton;
|
|
45
|
+
}
|
|
46
|
+
function s(e) {
|
|
47
|
+
let t = e.replace(/\/+$/, "").split("/").map((e) => e.startsWith(":") ? "[^/]+" : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
48
|
+
return RegExp("^" + t.join("/") + "$");
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { n as accessibleRedirectPath, t as schemaDefaultRoute };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isExcludedRoute as e, isSameOriginPath as t } from "../stores/tabs.js";
|
|
2
2
|
//#region src/lib/screen-back.ts
|
|
3
3
|
function n(e) {
|
|
4
4
|
return e ? e.startsWith("?") ? e.slice(1) : e : "";
|
|
@@ -41,4 +41,4 @@ function o(e, n, r) {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
|
-
export {
|
|
44
|
+
export { i as captureReturnTarget, o as resolveBackTarget, a as resolveBackVisibility, n as stripLeadingQuestion, r as toRouterSearch };
|