@declarion/react 0.65.1 → 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,156 @@
|
|
|
1
|
+
import { usePageStateStore as e } from "../stores/page-state.js";
|
|
2
|
+
import { canonicalUrl as t } from "./canonical-url.js";
|
|
3
|
+
import { useEffect as n, useRef as r } from "react";
|
|
4
|
+
import { useLocation as i } from "react-router";
|
|
5
|
+
//#region src/lib/scroll-restoration.ts
|
|
6
|
+
var a = "scroll", o = 120, s = 24, c = 600;
|
|
7
|
+
function l(e, t) {
|
|
8
|
+
return Number.isFinite(e) ? Math.max(0, Math.min(e, Number.isFinite(t) && t > 0 ? t : 0)) : 0;
|
|
9
|
+
}
|
|
10
|
+
function u(e, t, n) {
|
|
11
|
+
let r = Number.isFinite(e) ? e : 0;
|
|
12
|
+
if (t) {
|
|
13
|
+
let e = n[t.index];
|
|
14
|
+
if (e !== void 0) return {
|
|
15
|
+
key: e,
|
|
16
|
+
delta: Math.max(0, r - t.start),
|
|
17
|
+
offset: r
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
key: "",
|
|
22
|
+
delta: 0,
|
|
23
|
+
offset: r
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function d(e, t, n, r) {
|
|
27
|
+
if (!e) return null;
|
|
28
|
+
if (e.key) {
|
|
29
|
+
let i = t.indexOf(e.key);
|
|
30
|
+
if (i >= 0) {
|
|
31
|
+
let t = n(i);
|
|
32
|
+
if (t !== void 0) return l(t + e.delta, r);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return l(e.offset, r);
|
|
36
|
+
}
|
|
37
|
+
function f(n = a) {
|
|
38
|
+
let o = i(), s = r(null);
|
|
39
|
+
if (s.current === null) {
|
|
40
|
+
let r = t(o), i = e.getState().read(r, n);
|
|
41
|
+
s.current = i && Number.isFinite(i.offset) ? Math.max(0, i.offset) : 0;
|
|
42
|
+
}
|
|
43
|
+
return s.current;
|
|
44
|
+
}
|
|
45
|
+
function p(e) {
|
|
46
|
+
let t = 0, n = null, r = () => {
|
|
47
|
+
n = null, t = Date.now(), e();
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
trigger() {
|
|
51
|
+
let e = Date.now() - t;
|
|
52
|
+
e >= o ? r() : n === null && (n = setTimeout(r, o - e));
|
|
53
|
+
},
|
|
54
|
+
flush() {
|
|
55
|
+
n !== null && (clearTimeout(n), n = null), e();
|
|
56
|
+
},
|
|
57
|
+
cancel() {
|
|
58
|
+
n !== null && (clearTimeout(n), n = null);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function m(a) {
|
|
63
|
+
let { virtualizer: o, scrollElementRef: c, rowKeys: l } = a, f = a.stateKey ?? "scroll", p = a.enabled ?? !0, m = i(), g = t(m), _ = r(o);
|
|
64
|
+
_.current = o;
|
|
65
|
+
let v = r(l);
|
|
66
|
+
v.current = l;
|
|
67
|
+
let y = r(null);
|
|
68
|
+
n(() => {
|
|
69
|
+
y.current !== g && (y.current = null);
|
|
70
|
+
}, [g]), n(() => {
|
|
71
|
+
if (!p) return;
|
|
72
|
+
let t = _.current;
|
|
73
|
+
if (!t || l.length === 0) return;
|
|
74
|
+
let n = e.getState().read(g, f), r = y.current !== g;
|
|
75
|
+
if (y.current = g, !n) {
|
|
76
|
+
r && t.scrollToOffset(0, {
|
|
77
|
+
align: "start",
|
|
78
|
+
behavior: "auto"
|
|
79
|
+
});
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
let i = 0, a = 0, o = NaN, c = () => {
|
|
83
|
+
let e = _.current;
|
|
84
|
+
if (!e) return;
|
|
85
|
+
let t = d(n, v.current, (t) => e.getOffsetForIndex(t, "start")?.[0], e.getTotalSize());
|
|
86
|
+
t !== null && (Number.isNaN(o) || Math.abs(t - o) > 1) && (e.scrollToOffset(t, {
|
|
87
|
+
align: "start",
|
|
88
|
+
behavior: "auto"
|
|
89
|
+
}), o = t, a++ < s && (i = requestAnimationFrame(c)));
|
|
90
|
+
};
|
|
91
|
+
return c(), () => {
|
|
92
|
+
i && cancelAnimationFrame(i);
|
|
93
|
+
};
|
|
94
|
+
}, [
|
|
95
|
+
p,
|
|
96
|
+
g,
|
|
97
|
+
l,
|
|
98
|
+
f
|
|
99
|
+
]), h(c, p, g, f, (e) => {
|
|
100
|
+
let t = _.current;
|
|
101
|
+
if (!t) return null;
|
|
102
|
+
let n = e.scrollTop, r = n > 0 ? n : t.scrollOffset ?? 0;
|
|
103
|
+
return u(r, t.getVirtualItemForOffset(r), v.current);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function h(t, i, a, o, s) {
|
|
107
|
+
let l = r(s);
|
|
108
|
+
l.current = s, n(() => {
|
|
109
|
+
if (!i) return;
|
|
110
|
+
let n = 0, r = c, s = null, u = null, d = (t) => {
|
|
111
|
+
let n = l.current(t);
|
|
112
|
+
n && e.getState().set(a, o, n);
|
|
113
|
+
}, f = () => u?.trigger(), m = () => {
|
|
114
|
+
let e = t.current;
|
|
115
|
+
e ? (s = e, u = p(() => d(e)), e.addEventListener("scroll", f, { passive: !0 })) : r-- > 0 && (n = requestAnimationFrame(m));
|
|
116
|
+
};
|
|
117
|
+
return m(), () => {
|
|
118
|
+
n && cancelAnimationFrame(n), s && s.removeEventListener("scroll", f), u?.flush();
|
|
119
|
+
};
|
|
120
|
+
}, [
|
|
121
|
+
i,
|
|
122
|
+
t,
|
|
123
|
+
a,
|
|
124
|
+
o
|
|
125
|
+
]);
|
|
126
|
+
}
|
|
127
|
+
function g(a) {
|
|
128
|
+
let { scrollElementRef: o } = a, s = a.stateKey ?? "scroll", l = a.enabled ?? !0, u = i(), d = t(u), f = r(null);
|
|
129
|
+
n(() => {
|
|
130
|
+
if (!l || f.current === d) return;
|
|
131
|
+
let t = 0, n = c, r = () => {
|
|
132
|
+
let i = o.current;
|
|
133
|
+
if (!i) {
|
|
134
|
+
n-- > 0 && (t = requestAnimationFrame(r));
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
f.current = d;
|
|
138
|
+
let a = e.getState().read(d, s);
|
|
139
|
+
a && (i.scrollTop = Number.isFinite(a.offset) ? Math.max(0, a.offset) : 0);
|
|
140
|
+
};
|
|
141
|
+
return r(), () => {
|
|
142
|
+
t && cancelAnimationFrame(t);
|
|
143
|
+
};
|
|
144
|
+
}, [
|
|
145
|
+
l,
|
|
146
|
+
d,
|
|
147
|
+
s,
|
|
148
|
+
o
|
|
149
|
+
]), h(o, l, d, s, (e) => ({
|
|
150
|
+
key: "",
|
|
151
|
+
delta: 0,
|
|
152
|
+
offset: e.scrollTop
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
export { a as SCROLL_STATE_KEY, u as captureScrollAnchor, d as resolveScrollOffset, g as usePlainScrollRestoration, f as useSavedScrollOffset, m as useVirtualScrollRestoration };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/lib/size-value.ts
|
|
2
|
+
var e = /^(\d+)px$/;
|
|
3
|
+
function t(t) {
|
|
4
|
+
if (t == null || t === "") return null;
|
|
5
|
+
if (t === "auto") return { kind: "auto" };
|
|
6
|
+
if (t === "fill") return { kind: "fill" };
|
|
7
|
+
let n = e.exec(t);
|
|
8
|
+
if (n) {
|
|
9
|
+
let e = parseInt(n[1], 10);
|
|
10
|
+
return e > 0 ? {
|
|
11
|
+
kind: "px",
|
|
12
|
+
value: e
|
|
13
|
+
} : null;
|
|
14
|
+
}
|
|
15
|
+
let r = parseInt(t, 10);
|
|
16
|
+
return !isNaN(r) && String(r) === t && r > 0 ? {
|
|
17
|
+
kind: "weight",
|
|
18
|
+
value: r
|
|
19
|
+
} : null;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { t as parseSizeValue };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//#region src/lib/sort.ts
|
|
2
|
+
var e = {
|
|
3
|
+
nulls_first: "first",
|
|
4
|
+
nulls_last: "last"
|
|
5
|
+
};
|
|
6
|
+
function t(t) {
|
|
7
|
+
if (!t) return [];
|
|
8
|
+
let n = [];
|
|
9
|
+
for (let r of t.split(",")) {
|
|
10
|
+
let t = r.trim();
|
|
11
|
+
if (!t) continue;
|
|
12
|
+
let i = t.split(":"), a = i[0]?.trim();
|
|
13
|
+
if (!a || a.startsWith("$property.")) continue;
|
|
14
|
+
let o = {
|
|
15
|
+
field: a,
|
|
16
|
+
dir: i[1]?.trim().toLowerCase() === "desc" ? "desc" : "asc"
|
|
17
|
+
}, s = i[2]?.trim().toLowerCase();
|
|
18
|
+
if (s) {
|
|
19
|
+
let t = e[s];
|
|
20
|
+
t && (o.nulls = t);
|
|
21
|
+
}
|
|
22
|
+
n.push(o);
|
|
23
|
+
}
|
|
24
|
+
return n;
|
|
25
|
+
}
|
|
26
|
+
function n(e) {
|
|
27
|
+
if (!e) return;
|
|
28
|
+
let t = [];
|
|
29
|
+
for (let n of e.split(",")) {
|
|
30
|
+
let e = n.trim();
|
|
31
|
+
if (!e) continue;
|
|
32
|
+
let r = e.split(":")[0]?.trim();
|
|
33
|
+
r && r.startsWith("$property.") || t.push(e);
|
|
34
|
+
}
|
|
35
|
+
return t.length > 0 ? t.join(",") : void 0;
|
|
36
|
+
}
|
|
37
|
+
function r(e) {
|
|
38
|
+
return e.map((e) => {
|
|
39
|
+
let t = `${e.field}:${e.dir}`;
|
|
40
|
+
return e.nulls === "first" ? `${t}:nulls_first` : e.nulls === "last" ? `${t}:nulls_last` : t;
|
|
41
|
+
}).join(",");
|
|
42
|
+
}
|
|
43
|
+
function i(e, t) {
|
|
44
|
+
let n = e.findIndex((e) => e.field === t);
|
|
45
|
+
return n >= 0 ? [...e.slice(0, n), ...e.slice(n + 1)] : e.length >= 5 ? e : [...e, {
|
|
46
|
+
field: t,
|
|
47
|
+
dir: "asc"
|
|
48
|
+
}];
|
|
49
|
+
}
|
|
50
|
+
function a(e, t) {
|
|
51
|
+
let n = e.filter((e) => e.field !== t.field);
|
|
52
|
+
return n.length >= 5 ? e : [...n, t];
|
|
53
|
+
}
|
|
54
|
+
function o(e, t) {
|
|
55
|
+
let n = e.findIndex((e) => e.field === t);
|
|
56
|
+
return n < 0 ? e : [...e.slice(0, n), ...e.slice(n + 1)];
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { a as applyAppendSort, i as applyShiftClickSort, t as parseSort, o as removeSortField, r as serializeSort, n as stripUnsupportedSortSegments };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { formatISO as e } from "date-fns";
|
|
2
|
+
//#region src/lib/timestamp.ts
|
|
3
|
+
function t(t = /* @__PURE__ */ new Date()) {
|
|
4
|
+
return e(t);
|
|
5
|
+
}
|
|
6
|
+
function n(e, t, n) {
|
|
7
|
+
let r = e.match(/([+-]\d{2}:\d{2})$/), i = e.endsWith("Z"), a = new Date(e);
|
|
8
|
+
if (isNaN(a.getTime())) return e;
|
|
9
|
+
if (r || i) {
|
|
10
|
+
let e;
|
|
11
|
+
if (i) e = "UTC";
|
|
12
|
+
else if (r) {
|
|
13
|
+
let t = r[1].charAt(0), n = parseInt(r[1].substring(1, 3), 10);
|
|
14
|
+
parseInt(r[1].substring(4, 6), 10) === 0 && (e = n === 0 ? "UTC" : `Etc/GMT${t === "+" ? "-" : "+"}${n}`);
|
|
15
|
+
}
|
|
16
|
+
if (e) try {
|
|
17
|
+
return new Intl.DateTimeFormat(n, {
|
|
18
|
+
...t,
|
|
19
|
+
timeZone: e
|
|
20
|
+
}).format(a);
|
|
21
|
+
} catch {}
|
|
22
|
+
if (r) {
|
|
23
|
+
let e = r[1].charAt(0) === "+" ? 1 : -1, i = parseInt(r[1].substring(1, 3), 10), o = parseInt(r[1].substring(4, 6), 10), s = e * (i * 60 + o) * 60 * 1e3;
|
|
24
|
+
return new Intl.DateTimeFormat(n, {
|
|
25
|
+
...t,
|
|
26
|
+
timeZone: "UTC"
|
|
27
|
+
}).format(new Date(a.getTime() + s));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return new Intl.DateTimeFormat(n, t).format(a);
|
|
31
|
+
}
|
|
32
|
+
function r(e) {
|
|
33
|
+
return n(e, {
|
|
34
|
+
day: "2-digit",
|
|
35
|
+
month: "2-digit",
|
|
36
|
+
year: "numeric",
|
|
37
|
+
hour: "2-digit",
|
|
38
|
+
minute: "2-digit",
|
|
39
|
+
hour12: !1
|
|
40
|
+
}, "en-GB").replace(/\//g, "-").replace(",", "");
|
|
41
|
+
}
|
|
42
|
+
var i = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
43
|
+
function a(e) {
|
|
44
|
+
let t = i.exec(e);
|
|
45
|
+
if (!t) return null;
|
|
46
|
+
let [, n, r, a] = t;
|
|
47
|
+
return new Date(Number(n), Number(r) - 1, Number(a));
|
|
48
|
+
}
|
|
49
|
+
function o(t, n, i = /* @__PURE__ */ new Date()) {
|
|
50
|
+
if (n == null || n === "") return {
|
|
51
|
+
text: "—",
|
|
52
|
+
absolute: ""
|
|
53
|
+
};
|
|
54
|
+
let o = typeof n == "string" ? a(n) : null, s = n instanceof Date ? n : o ?? new Date(String(n));
|
|
55
|
+
if (isNaN(s.getTime())) {
|
|
56
|
+
let e = String(n);
|
|
57
|
+
return {
|
|
58
|
+
text: e,
|
|
59
|
+
absolute: e
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
let c = o ? String(n) : r(typeof n == "string" ? n : s.toISOString()), u = i.getTime() - s.getTime();
|
|
63
|
+
return Math.abs(u) > 2592e6 ? {
|
|
64
|
+
text: e(s, { representation: "date" }),
|
|
65
|
+
absolute: c
|
|
66
|
+
} : {
|
|
67
|
+
text: l(t, s, i),
|
|
68
|
+
absolute: c
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
var s = [
|
|
72
|
+
{
|
|
73
|
+
unit: "second",
|
|
74
|
+
ms: 1e3,
|
|
75
|
+
limit: 60
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
unit: "minute",
|
|
79
|
+
ms: 6e4,
|
|
80
|
+
limit: 60
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
unit: "hour",
|
|
84
|
+
ms: 36e5,
|
|
85
|
+
limit: 24
|
|
86
|
+
}
|
|
87
|
+
], c = 864e5;
|
|
88
|
+
function l(e, t, n) {
|
|
89
|
+
let r = t.getTime() - n.getTime(), i = new Intl.RelativeTimeFormat(e, { numeric: "always" }), a = (e) => r > 0 ? e : -e;
|
|
90
|
+
for (let { unit: e, ms: t, limit: n } of s) {
|
|
91
|
+
let o = Math.round(Math.abs(r) / t);
|
|
92
|
+
if (o < n) return i.format(a(o), e);
|
|
93
|
+
}
|
|
94
|
+
return i.format(a(Math.round(Math.abs(r) / c)), "day");
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
export { a as civilDateAsLocal, n as formatInOffsetZone, r as formatOffsetTimestamp, o as formatRelativeOrAbsolute, t as formatWireDateTime };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { DeclarionToast as e } from "../components/shared/toast/DeclarionToast.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { toast as n } from "sonner";
|
|
4
|
+
//#region src/lib/toast.tsx
|
|
5
|
+
var r = {
|
|
6
|
+
success: 4e3,
|
|
7
|
+
info: 6e3,
|
|
8
|
+
warning: 8e3,
|
|
9
|
+
error: 0,
|
|
10
|
+
loading: 0
|
|
11
|
+
}, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = 0, s = () => `dz-${++o}`;
|
|
12
|
+
function c(r) {
|
|
13
|
+
n.custom(() => /* @__PURE__ */ t(e, {
|
|
14
|
+
model: r,
|
|
15
|
+
onClose: () => n.dismiss(r.id)
|
|
16
|
+
}), {
|
|
17
|
+
id: r.id,
|
|
18
|
+
duration: Infinity,
|
|
19
|
+
onDismiss: () => {
|
|
20
|
+
i.delete(String(r.id)), r.group && a.get(r.group) === r.id && a.delete(r.group);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function l(e, t, n, o = {}) {
|
|
25
|
+
if (o.group) {
|
|
26
|
+
let e = a.get(o.group);
|
|
27
|
+
if (e && i.has(e)) {
|
|
28
|
+
let r = i.get(e), a = {
|
|
29
|
+
...r,
|
|
30
|
+
title: t,
|
|
31
|
+
message: n,
|
|
32
|
+
count: (r.count ?? 1) + 1,
|
|
33
|
+
createdAt: Date.now()
|
|
34
|
+
};
|
|
35
|
+
return i.set(e, a), c(a), e;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
let l = o.id ?? s(), u = o.duration ?? r[e], d = {
|
|
39
|
+
id: l,
|
|
40
|
+
type: e,
|
|
41
|
+
title: t,
|
|
42
|
+
message: n,
|
|
43
|
+
duration: u,
|
|
44
|
+
sticky: o.sticky ?? u === 0,
|
|
45
|
+
action: o.action,
|
|
46
|
+
requestId: o.requestId,
|
|
47
|
+
details: o.details,
|
|
48
|
+
count: 1,
|
|
49
|
+
createdAt: Date.now(),
|
|
50
|
+
group: o.group
|
|
51
|
+
};
|
|
52
|
+
return i.set(l, d), o.group && a.set(o.group, l), c(d), l;
|
|
53
|
+
}
|
|
54
|
+
function u(e, t) {
|
|
55
|
+
let n = i.get(e);
|
|
56
|
+
if (!n) return;
|
|
57
|
+
let a = t.type ?? n.type, o = t.duration ?? (t.type ? r[a] : n.duration), s = {
|
|
58
|
+
...n,
|
|
59
|
+
...t,
|
|
60
|
+
type: a,
|
|
61
|
+
duration: o,
|
|
62
|
+
sticky: t.sticky ?? o === 0,
|
|
63
|
+
createdAt: Date.now()
|
|
64
|
+
};
|
|
65
|
+
i.set(e, s), c(s);
|
|
66
|
+
}
|
|
67
|
+
var d = {
|
|
68
|
+
success: (e, t, n) => l("success", e, t, n),
|
|
69
|
+
info: (e, t, n) => l("info", e, t, n),
|
|
70
|
+
warning: (e, t, n) => l("warning", e, t, n),
|
|
71
|
+
error: (e, t, n) => l("error", e, t, n),
|
|
72
|
+
loading: (e, t, n) => l("loading", e, t, n),
|
|
73
|
+
update: u,
|
|
74
|
+
dismiss: (e) => n.dismiss(e),
|
|
75
|
+
dismissAll: () => n.dismiss()
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
export { d as toast };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { coerceDisplayString as e } from "./display-value.js";
|
|
2
|
+
import { formatWireDateTime as t } from "./timestamp.js";
|
|
3
|
+
import { failureTitle as n } from "./failure.js";
|
|
4
|
+
import { toast as r } from "./toast.js";
|
|
5
|
+
import { getFieldRegion as i } from "./field-regions.js";
|
|
6
|
+
import { parseAnchorOffsetMs as a } from "./anchor.js";
|
|
7
|
+
//#region src/lib/ui-actions.ts
|
|
8
|
+
var o = /\$\{\s*([^}]+?)\s*\}/g, s = /^\s*\$\{\s*([^}]+?)\s*\}\s*$/, c = Symbol("unresolved");
|
|
9
|
+
function l(t, n) {
|
|
10
|
+
let r = t.match(s);
|
|
11
|
+
if (r) {
|
|
12
|
+
let e = u(r[1], n);
|
|
13
|
+
return e === c ? t : e;
|
|
14
|
+
}
|
|
15
|
+
return t.replace(o, (t, r) => {
|
|
16
|
+
let i = u(r, n);
|
|
17
|
+
return i === c ? t : e(i);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function u(e, n) {
|
|
21
|
+
if (e.startsWith("now")) {
|
|
22
|
+
let n = a(e);
|
|
23
|
+
return n === null ? c : t(new Date(Date.now() + n));
|
|
24
|
+
}
|
|
25
|
+
let [r, ...o] = e.split(".");
|
|
26
|
+
if (r === "row") return !n.row || o.length === 0 ? c : d(n.row, o);
|
|
27
|
+
if (r === "field" && o.length >= 2) {
|
|
28
|
+
let [e, t] = o, n = i(e);
|
|
29
|
+
return n ? n.getField(t) : c;
|
|
30
|
+
}
|
|
31
|
+
return r === "params" ? !n.params || o.length === 0 ? c : d(n.params, o) : c;
|
|
32
|
+
}
|
|
33
|
+
function d(e, t) {
|
|
34
|
+
return t.reduce((e, t) => {
|
|
35
|
+
if (e && typeof e == "object") return e[t];
|
|
36
|
+
}, e);
|
|
37
|
+
}
|
|
38
|
+
async function f(e, t, i) {
|
|
39
|
+
for (let a of t) try {
|
|
40
|
+
await p(a, i);
|
|
41
|
+
} catch (t) {
|
|
42
|
+
r.error(e("action.ui_step_failed", "A client-side step of this action failed."), n(e, t));
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async function p(e, t) {
|
|
47
|
+
if (e.copy_to_clipboard != null) {
|
|
48
|
+
let n = h(e.copy_to_clipboard, t);
|
|
49
|
+
await navigator.clipboard.writeText(n);
|
|
50
|
+
} else if (e.set_field) {
|
|
51
|
+
let { target: n, value: r } = e.set_field, { region: a, field: o } = g(n), s = i(a);
|
|
52
|
+
if (!s) throw Error(`region "${a}" not registered`);
|
|
53
|
+
s.setField(o, m(r, t));
|
|
54
|
+
} else if (e.focus_field) {
|
|
55
|
+
let { region: t, field: n } = g(e.focus_field), r = i(t);
|
|
56
|
+
if (!r) throw Error(`region "${t}" not registered`);
|
|
57
|
+
r.focusField(n);
|
|
58
|
+
} else if (e.show_toast) {
|
|
59
|
+
let n = h(e.show_toast.message, t), i = e.show_toast.kind ?? "info";
|
|
60
|
+
i === "success" ? r.success(n) : i === "error" ? r.error(n) : r.info(n);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function m(e, t) {
|
|
64
|
+
return typeof e == "string" ? l(e, t) : e;
|
|
65
|
+
}
|
|
66
|
+
function h(t, n) {
|
|
67
|
+
return e(l(t, n));
|
|
68
|
+
}
|
|
69
|
+
function g(e) {
|
|
70
|
+
let t = e.indexOf(".");
|
|
71
|
+
if (t <= 0) throw Error(`invalid path "${e}" (expected "region.field")`);
|
|
72
|
+
return {
|
|
73
|
+
region: e.slice(0, t),
|
|
74
|
+
field: e.slice(t + 1)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function _(e) {
|
|
78
|
+
return !e.handler && !!e.ui_steps && e.ui_steps.length > 0;
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { f as executeUISteps, l as interpolate, _ as isUIAction };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { evaluateFilterTree as e } from "./filter-evaluator.js";
|
|
2
|
+
//#region src/lib/variants.ts
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
let r = t.variants;
|
|
5
|
+
if (!r || r.length === 0) return;
|
|
6
|
+
let i = {};
|
|
7
|
+
for (let [e, n] of t.fields) i[e] = n;
|
|
8
|
+
for (let [t, a] of r) if (t !== "default" && a.when && e(a.when, i, n)) return t;
|
|
9
|
+
return r.has("default") ? "default" : void 0;
|
|
10
|
+
}
|
|
11
|
+
function n(e, n) {
|
|
12
|
+
let r = e?.variants;
|
|
13
|
+
if (!r || !r.items().some((e) => e.actions !== void 0)) return;
|
|
14
|
+
let i = t(e, n), a = r.get("default"), o = (i ? r.get(i)?.actions : void 0) ?? a?.actions ?? [];
|
|
15
|
+
return new Set(o);
|
|
16
|
+
}
|
|
17
|
+
function r(e, t) {
|
|
18
|
+
if (t.length === 0) return;
|
|
19
|
+
let r = t.map((t) => n(e, t));
|
|
20
|
+
if (r.every((e) => e === void 0)) return;
|
|
21
|
+
let i = r[0] ?? /* @__PURE__ */ new Set(), a = new Set(i);
|
|
22
|
+
for (let e of r.slice(1)) {
|
|
23
|
+
if (!e) {
|
|
24
|
+
a.clear();
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
for (let t of a) e.has(t) || a.delete(t);
|
|
28
|
+
}
|
|
29
|
+
return a;
|
|
30
|
+
}
|
|
31
|
+
function i(n, r, i) {
|
|
32
|
+
if (!r.variants || r.variants.length === 0) return;
|
|
33
|
+
if (n.variants) {
|
|
34
|
+
let e = t(n, i) ?? "default";
|
|
35
|
+
return r.variants.has(e) ? e : "default";
|
|
36
|
+
}
|
|
37
|
+
let a = {};
|
|
38
|
+
for (let [e, t] of n.fields) a[e] = t;
|
|
39
|
+
for (let [t, n] of r.variants) if (t !== "default" && n.when && e(n.when, a, i)) return t;
|
|
40
|
+
return "default";
|
|
41
|
+
}
|
|
42
|
+
var a = [
|
|
43
|
+
"items",
|
|
44
|
+
"sidebar",
|
|
45
|
+
"sidebar_width",
|
|
46
|
+
"highlights",
|
|
47
|
+
"audit",
|
|
48
|
+
"actions",
|
|
49
|
+
"row_actions",
|
|
50
|
+
"action_layout",
|
|
51
|
+
"card",
|
|
52
|
+
"quick_peek"
|
|
53
|
+
];
|
|
54
|
+
function o(e, t, n) {
|
|
55
|
+
if (!e || !t?.variants) return t;
|
|
56
|
+
let r = i(e, t, n), o = r ? t.variants.get(r) : void 0;
|
|
57
|
+
if (!o) return t;
|
|
58
|
+
let s = { ...t };
|
|
59
|
+
for (let e of a) o[e] !== void 0 && (s[e] = o[e]);
|
|
60
|
+
return s;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { r as commonVariantActionCodes, o as effectiveScreenForRecord, t as resolveEntityVariantCode, i as resolveScreenVariantCode, n as variantActionCodesForRecord };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { readProblem as e } from "../types/api.js";
|
|
2
|
+
import { EMBED_MESSAGE_TYPES as t, postToParent as n } from "../embed/protocol.js";
|
|
3
|
+
import { getEmbedParentOrigin as r, isEmbedTokenMode as i } from "../embed/token.js";
|
|
4
|
+
//#region src/lib/versionTracker.ts
|
|
5
|
+
var a = "X-Declarion-Version", o = "declarion-version";
|
|
6
|
+
function s() {
|
|
7
|
+
if (typeof BroadcastChannel > "u") return null;
|
|
8
|
+
try {
|
|
9
|
+
return new BroadcastChannel(o);
|
|
10
|
+
} catch {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
var c = {
|
|
15
|
+
firstSeen: null,
|
|
16
|
+
firstComponents: null,
|
|
17
|
+
hasReportedDrift: !1,
|
|
18
|
+
pendingReload: null,
|
|
19
|
+
listeners: /* @__PURE__ */ new Set(),
|
|
20
|
+
channel: null
|
|
21
|
+
};
|
|
22
|
+
function l() {
|
|
23
|
+
c.channel || typeof BroadcastChannel > "u" || (c.channel = s(), c.channel && c.channel.addEventListener("message", (e) => {
|
|
24
|
+
let t = e.data;
|
|
25
|
+
if (t && t.type === "drift" && t.delta && !c.hasReportedDrift) {
|
|
26
|
+
c.hasReportedDrift = !0;
|
|
27
|
+
for (let e of c.listeners) e(t.delta);
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
function u(e) {
|
|
32
|
+
if (l(), !e) return;
|
|
33
|
+
let t = e.get(a);
|
|
34
|
+
t && (c.firstSeen ? t !== c.firstSeen && (c.hasReportedDrift || d().catch(() => {
|
|
35
|
+
p({
|
|
36
|
+
kind: "unknown",
|
|
37
|
+
observed: t
|
|
38
|
+
});
|
|
39
|
+
})) : c.firstSeen = t);
|
|
40
|
+
}
|
|
41
|
+
async function d() {
|
|
42
|
+
l();
|
|
43
|
+
let t;
|
|
44
|
+
try {
|
|
45
|
+
let e = {};
|
|
46
|
+
c.firstSeen && (e["If-None-Match"] = `"${c.firstSeen}"`), t = await fetch("/api/version", {
|
|
47
|
+
method: "GET",
|
|
48
|
+
credentials: i() ? "omit" : "include",
|
|
49
|
+
headers: e
|
|
50
|
+
});
|
|
51
|
+
} catch {
|
|
52
|
+
throw Error("version probe network error");
|
|
53
|
+
}
|
|
54
|
+
if (t.status === 304) return;
|
|
55
|
+
if (!t.ok) throw await e(t), Error(`version probe ${t.status}`);
|
|
56
|
+
let n;
|
|
57
|
+
try {
|
|
58
|
+
n = await t.json();
|
|
59
|
+
} catch {
|
|
60
|
+
throw Error("version probe malformed body");
|
|
61
|
+
}
|
|
62
|
+
let r = n.fingerprint;
|
|
63
|
+
if (typeof r != "string" || r === "") throw Error("version probe missing fingerprint");
|
|
64
|
+
let a = typeof n.schema_fingerprint == "string" && typeof n.asset_fingerprint == "string" && typeof n.binary_fingerprint == "string" ? {
|
|
65
|
+
schema: n.schema_fingerprint,
|
|
66
|
+
asset: n.asset_fingerprint,
|
|
67
|
+
binary: n.binary_fingerprint
|
|
68
|
+
} : void 0;
|
|
69
|
+
c.firstSeen ||= r, !c.firstComponents && a && r === c.firstSeen && (c.firstComponents = a), r !== c.firstSeen && p({
|
|
70
|
+
kind: f(c.firstComponents, a),
|
|
71
|
+
observed: r,
|
|
72
|
+
components: a
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function f(e, t) {
|
|
76
|
+
if (!e || !t) return "unknown";
|
|
77
|
+
let n = e.schema !== t.schema, r = e.asset !== t.asset, i = e.binary !== t.binary;
|
|
78
|
+
return n && !r && !i ? "schema-only" : r || i ? "asset-or-binary" : "unknown";
|
|
79
|
+
}
|
|
80
|
+
function p(e) {
|
|
81
|
+
if (!c.hasReportedDrift) {
|
|
82
|
+
c.hasReportedDrift = !0, e.kind !== "schema-only" && (c.pendingReload = e);
|
|
83
|
+
for (let t of c.listeners) t(e);
|
|
84
|
+
if (c.channel) try {
|
|
85
|
+
c.channel.postMessage({
|
|
86
|
+
type: "drift",
|
|
87
|
+
delta: e
|
|
88
|
+
});
|
|
89
|
+
} catch {}
|
|
90
|
+
i() && e.kind !== "schema-only" && n(r(), t.reloadRequired, { reason: `version drift: ${e.kind}` });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function m() {
|
|
94
|
+
return c.pendingReload;
|
|
95
|
+
}
|
|
96
|
+
function h(e) {
|
|
97
|
+
return c.listeners.add(e), () => {
|
|
98
|
+
c.listeners.delete(e);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { d as fetchProbe, u as observe, m as pendingReload, h as subscribe };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/lib/viewport-category.ts
|
|
2
|
+
var e = {
|
|
3
|
+
phoneMax: 639,
|
|
4
|
+
tabletMax: 1023,
|
|
5
|
+
landscapePhoneMaxHeight: 520
|
|
6
|
+
};
|
|
7
|
+
function t(t, n = e) {
|
|
8
|
+
let { width: r, height: i, touch: a = !1 } = t;
|
|
9
|
+
return !Number.isFinite(r) || r <= 0 ? "desktop" : r <= n.phoneMax ? "phone" : r <= n.tabletMax ? a && Number.isFinite(i) && i > 0 && i <= n.landscapePhoneMaxHeight ? "phone" : "tablet" : "desktop";
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as DEFAULT_RESPONSIVE_BREAKPOINTS, t as resolveViewportCategory };
|