@declarion/react 0.446.0 → 0.516.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/components/agents/AgentChatPanel.impl.js +349 -332
- package/dist-lib/components/detail-layout/DetailAuditStrip.js +1 -1
- package/dist-lib/components/detail-layout/EvidenceBlock.js +36 -24
- package/dist-lib/components/detail-layout/FieldRow.js +56 -60
- package/dist-lib/components/detail-layout/FieldsBlock.js +48 -47
- package/dist-lib/components/detail-layout/PropertiesBlock.js +42 -41
- package/dist-lib/components/detail-layout/labelLayout.js +35 -0
- package/dist-lib/components/fields/JsonField.js +128 -125
- package/dist-lib/components/fields/StringField.js +10 -25
- package/dist-lib/components/fields/StructureField.js +125 -167
- package/dist-lib/components/fields/ValueRows.js +114 -0
- package/dist-lib/components/fields/cells/factories/id.js +10 -0
- package/dist-lib/components/fields/cells/factories/nextRun.js +18 -27
- package/dist-lib/components/fields/cells/factories/refLink.js +15 -41
- package/dist-lib/components/fields/cells/registry.js +25 -23
- package/dist-lib/components/file-widgets/DocumentCard.js +142 -142
- package/dist-lib/components/file-widgets/helpers.js +32 -19
- package/dist-lib/components/file-widgets/host.js +4 -1
- package/dist-lib/components/list/PeekFieldCell.js +57 -55
- package/dist-lib/components/list/QuickPeek.js +109 -121
- package/dist-lib/components/pages/SmartDetailPage.impl.js +403 -400
- package/dist-lib/components/pages/SmartListPage.impl.js +260 -260
- package/dist-lib/components/pages/list/ListCardRow.js +101 -100
- package/dist-lib/components/pages/list/cardProjection.js +117 -112
- package/dist-lib/components/pages/list/useListQuery.js +1 -1
- package/dist-lib/components/pages/list/useListRowInteraction.js +68 -65
- package/dist-lib/components/primitives/IdBadge.js +27 -0
- package/dist-lib/components/primitives/RowField.js +11 -43
- package/dist-lib/components/shared/CopyButton.js +13 -18
- package/dist-lib/components/shared/RefChip.js +33 -0
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/hooks/useAgentConversation.js +134 -110
- package/dist-lib/hooks/useCopy.js +18 -0
- package/dist-lib/index.d.ts +55 -20
- package/dist-lib/index.js +116 -111
- package/dist-lib/lib/realtime-reconcile.js +70 -59
- package/dist-lib/lib/reference.js +52 -34
- package/dist-lib/lib/short-id.js +12 -0
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/types/schema.js +84 -80
- package/dist-lib/{useResponsiveMode-3hOLBkey.d.ts → useResponsiveMode-BObVfNyN.d.ts} +7 -2
- package/package.json +1 -1
- package/dist-lib/components/primitives/RecordIdBadge.js +0 -25
package/dist-lib/index.js
CHANGED
|
@@ -22,114 +22,119 @@ import { useAllEntityData as J } from "./hooks/useAllEntityData.js";
|
|
|
22
22
|
import { objectQueryKey as Y, useObject as X } from "./hooks/useObject.js";
|
|
23
23
|
import { fileReferenceJSONQueryKey as Z, useFileReferenceJSON as Q } from "./hooks/useFileReferenceJSON.js";
|
|
24
24
|
import { StructureField as $ } from "./components/fields/StructureField.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
100
|
-
import {
|
|
101
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import {
|
|
104
|
-
import {
|
|
105
|
-
import {
|
|
106
|
-
import {
|
|
107
|
-
import {
|
|
108
|
-
import {
|
|
109
|
-
import {
|
|
110
|
-
import {
|
|
111
|
-
import {
|
|
112
|
-
import {
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
|
|
25
|
+
import { ValueRows as ee } from "./components/fields/ValueRows.js";
|
|
26
|
+
import { shortId as te } from "./lib/short-id.js";
|
|
27
|
+
import { useCopy as ne } from "./hooks/useCopy.js";
|
|
28
|
+
import { isNestable as re, jsonRows as ie, parseJsonText as ae } from "./components/fields/JsonField.js";
|
|
29
|
+
import { FieldRow as oe, FieldsGrid as se } from "./components/detail-layout/FieldRow.js";
|
|
30
|
+
import { useLiveObject as ce } from "./hooks/useLiveObject.js";
|
|
31
|
+
import { ACTION_DATA_CURSOR_KEY as le, ACTION_DATA_KEY as ue, actionDataQueryKey as de, cursorActionDataQueryKey as fe, useActionData as pe, useCursorActionData as me } from "./hooks/useActionData.js";
|
|
32
|
+
import { useCreateObject as he, useDeleteObject as ge, useUpdateObject as _e } from "./hooks/useMutations.js";
|
|
33
|
+
import { useDebounce as ve } from "./hooks/useDebounce.js";
|
|
34
|
+
import { ResponsiveModeProvider as ye, useResponsiveMode as be } from "./hooks/useResponsiveMode.js";
|
|
35
|
+
import { useEffectiveParam as xe, useParam as Se, usePublicParams as Ce, useResolvedParam as we } from "./hooks/useParams.js";
|
|
36
|
+
import { useSetStatus as Te } from "./hooks/useObjectStatus.js";
|
|
37
|
+
import { useDeleteProperty as Ee, useSetProperty as De } from "./hooks/useProperties.js";
|
|
38
|
+
import { useFilters as Oe } from "./hooks/useFilters.js";
|
|
39
|
+
import { useColumns as ke } from "./hooks/useColumns.js";
|
|
40
|
+
import { useViews as Ae } from "./hooks/useViews.js";
|
|
41
|
+
import { registerScreen as je } from "./stores/screen-registry.js";
|
|
42
|
+
import { getIcon as Me, setIconRegistry as Ne } from "./stores/icon-registry.js";
|
|
43
|
+
import { getLayoutWidget as Pe, hasLayoutWidget as Fe, registerLayoutWidget as Ie } from "./components/detail-layout/widgets/registry.js";
|
|
44
|
+
import { reresolveLanguage as Le, useDeploymentLanguage as Re, useLanguage as ze } from "./hooks/useLanguage.js";
|
|
45
|
+
import { useText as Be } from "./hooks/useText.js";
|
|
46
|
+
import { MANDATORY_LANGUAGE as Ve, makeTextFn as He, pickLocalized as Ue, pluralText as We, textWithNodes as Ge } from "./lib/language.js";
|
|
47
|
+
import { failureTitle as Ke } from "./lib/failure.js";
|
|
48
|
+
import { readDisplayState as qe } from "./lib/read-display-state.js";
|
|
49
|
+
import { useTabStore as Je } from "./stores/tabs.js";
|
|
50
|
+
import { useTabNavigate as Ye } from "./hooks/useTabNavigate.js";
|
|
51
|
+
import { DEFAULT_RESPONSIVE_BREAKPOINTS as Xe, resolveViewportCategory as Ze } from "./lib/viewport-category.js";
|
|
52
|
+
import { useScreenBack as Qe } from "./hooks/useScreenBack.js";
|
|
53
|
+
import { usePageState as $e } from "./hooks/usePageState.js";
|
|
54
|
+
import { canonicalUrl as et } from "./lib/canonical-url.js";
|
|
55
|
+
import { useRegisterRetainedQuery as tt } from "./hooks/usePageStateRuntime.js";
|
|
56
|
+
import { PAGE_STATE_TTL_PARAM as nt, usePageStateTtl as rt } from "./hooks/usePageStateTtl.js";
|
|
57
|
+
import { useScreenTab as it } from "./hooks/useScreenTab.js";
|
|
58
|
+
import { useTabSearchMirror as at } from "./hooks/useTabSearchMirror.js";
|
|
59
|
+
import { SCROLL_STATE_KEY as ot, usePlainScrollRestoration as st, useSavedScrollOffset as ct, useVirtualScrollRestoration as lt } from "./lib/scroll-restoration.js";
|
|
60
|
+
import { SmartListPage as ut } from "./components/pages/SmartListPage.js";
|
|
61
|
+
import { SmartDetailPage as dt } from "./components/pages/SmartDetailPage.js";
|
|
62
|
+
import { SmartRecordListPage as ft } from "./components/pages/SmartRecordListPage.js";
|
|
63
|
+
import { DynamicIcon as pt } from "./components/shared/DynamicIcon.js";
|
|
64
|
+
import { PageHeader as mt } from "./components/chrome/PageHeader.js";
|
|
65
|
+
import { EmptyState as ht } from "./components/shared/EmptyState.js";
|
|
66
|
+
import { ConfirmDialog as gt } from "./components/shared/ConfirmDialog.js";
|
|
67
|
+
import { FilterDrawer as _t } from "./components/filters/FilterDrawer.js";
|
|
68
|
+
import { FilterChips as vt } from "./components/filters/FilterChips.js";
|
|
69
|
+
import { ColumnPicker as yt } from "./components/list/ColumnPicker.js";
|
|
70
|
+
import { ViewSwitcher as bt } from "./components/list/ViewSwitcher.js";
|
|
71
|
+
import { ActionRunnerProvider as xt, useActionRunner as St } from "./components/actions/ActionRunner.js";
|
|
72
|
+
import { ObjectActionBar as Ct, useObjectActions as wt } from "./components/actions/ObjectActionBar.js";
|
|
73
|
+
import { RefreshControl as Tt } from "./components/shared/RefreshControl.js";
|
|
74
|
+
import { RefCombobox as Et } from "./components/fields/RefCombobox.js";
|
|
75
|
+
import { QuickPeek as Dt } from "./components/list/QuickPeek.js";
|
|
76
|
+
import { InlineEditCell as Ot } from "./components/list/InlineEditCell.js";
|
|
77
|
+
import { SignIn as kt } from "./components/pages/auth/SignIn.js";
|
|
78
|
+
import { SignUp as At } from "./components/pages/auth/SignUp.js";
|
|
79
|
+
import { Forgot as jt } from "./components/pages/auth/Forgot.js";
|
|
80
|
+
import { Reset as Mt } from "./components/pages/auth/Reset.js";
|
|
81
|
+
import { TwoFA as Nt } from "./components/pages/auth/TwoFA.js";
|
|
82
|
+
import { AuthShell as Pt } from "./components/pages/auth/AuthShell.js";
|
|
83
|
+
import { Profile as Ft } from "./components/pages/profile/Profile.js";
|
|
84
|
+
import { Preferences as It } from "./components/pages/profile/Preferences.js";
|
|
85
|
+
import { ChangePasswordDialog as Lt } from "./components/shared/ChangePasswordDialog.js";
|
|
86
|
+
import { Icon as Rt } from "./components/primitives/Icons.js";
|
|
87
|
+
import { Btn as zt } from "./components/primitives/Btn.js";
|
|
88
|
+
import { IconBtn as Bt } from "./components/primitives/IconBtn.js";
|
|
89
|
+
import { PILL_TONES as Vt, Pill as Ht, pillColor as Ut, pillForeground as Wt, pillToneStyle as Gt } from "./components/primitives/Pill.js";
|
|
90
|
+
import { Kbd as Kt } from "./components/primitives/Kbd.js";
|
|
91
|
+
import { Avatar as qt } from "./components/primitives/Avatar.js";
|
|
92
|
+
import { BrandGlyph as Jt } from "./components/primitives/BrandGlyph.js";
|
|
93
|
+
import { Dropdown as Yt } from "./components/primitives/Dropdown.js";
|
|
94
|
+
import { HoverCard as Xt } from "./components/primitives/HoverCard.js";
|
|
95
|
+
import { InfoTooltip as Zt, Tooltip as Qt } from "./components/primitives/Tooltip.js";
|
|
96
|
+
import { Chip as $t } from "./components/primitives/Chip.js";
|
|
97
|
+
import { SectionCard as en } from "./components/primitives/SectionCard.js";
|
|
98
|
+
import { StatTile as tn } from "./components/primitives/StatTile.js";
|
|
99
|
+
import { IdBadge as nn } from "./components/primitives/IdBadge.js";
|
|
100
|
+
import { RowField as rn } from "./components/primitives/RowField.js";
|
|
101
|
+
import { BoolToggle as an } from "./components/primitives/BoolToggle.js";
|
|
102
|
+
import { MenuItem as on } from "./components/primitives/MenuItem.js";
|
|
103
|
+
import { Check as sn } from "./components/primitives/Check.js";
|
|
104
|
+
import { Spinner as cn } from "./components/primitives/Spinner.js";
|
|
105
|
+
import { DateInput as ln, FieldLabel as un, JsonField as dn, MultiSelect as fn, PasswordInput as pn, QuickEditCell as mn, RefField as hn, Select as gn, TagsInput as _n, TextArea as vn, TextInput as yn, ViewField as bn } from "./components/primitives/Fields.js";
|
|
106
|
+
import { SquareImage as xn } from "./components/file-widgets/SquareImage.js";
|
|
107
|
+
import { CircleImage as Sn } from "./components/file-widgets/CircleImage.js";
|
|
108
|
+
import { WideBanner as Cn } from "./components/file-widgets/WideBanner.js";
|
|
109
|
+
import { getFileWidget as wn, hasFileWidget as Tn, registerFileWidget as En } from "./components/file-widgets/registry.js";
|
|
110
|
+
import { UploadError as Dn, discardFile as On, formatBytes as kn, uploadFile as An, validateClientSide as jn } from "./components/file-widgets/upload.js";
|
|
111
|
+
import { getImageCropper as Mn, setImageCropper as Nn } from "./components/file-widgets/cropper.js";
|
|
112
|
+
import { FileDraftScope as Pn, useDraftRegistration as Fn, useFileDraftScope as In } from "./components/file-widgets/draft-scope.js";
|
|
113
|
+
import { fileSelectionReducer as Ln, summarizeFileSelections as Rn, useFileSelection as zn } from "./components/file-widgets/useFileSelection.js";
|
|
114
|
+
import { Rail as Bn } from "./components/layout/Rail.js";
|
|
115
|
+
import { Sidebar as Vn, buildSections as Hn } from "./components/layout/Sidebar.js";
|
|
116
|
+
import { TopBar as Un } from "./components/layout/TopBar.js";
|
|
117
|
+
import { TenantChip as Wn, envTone as Gn } from "./components/layout/TenantChip.js";
|
|
118
|
+
import { TabStrip as Kn } from "./components/layout/TabStrip.js";
|
|
119
|
+
import { ImpersonationBanner as qn } from "./components/layout/ImpersonationBanner.js";
|
|
120
|
+
import { ImpersonationFrame as Jn } from "./components/layout/ImpersonationFrame.js";
|
|
121
|
+
import { ImpersonationStartModal as Yn } from "./components/layout/ImpersonationStartModal.js";
|
|
122
|
+
import { useImpersonation as Xn } from "./hooks/useImpersonation.js";
|
|
123
|
+
import { CommandPalette as Zn } from "./components/layout/CommandPalette.js";
|
|
124
|
+
import { AgentChatPanel as Qn } from "./components/agents/AgentChatPanel.js";
|
|
125
|
+
import { AgentElicitForm as $n } from "./components/agents/AgentElicitForm.js";
|
|
126
|
+
import { AgentPicker as er } from "./components/agents/AgentPicker.js";
|
|
127
|
+
import { AgentConversationDrawer as tr } from "./components/agents/AgentConversationDrawer.js";
|
|
128
|
+
import { useAgentConversation as nr } from "./hooks/useAgentConversation.js";
|
|
129
|
+
import { answerQuestion as rr, approveInvocation as ir, cancelConversation as ar, cancelInvocation as or, createConversation as sr, listAvailableAgents as cr, listConversations as lr, loadConversationInvocations as ur, loadConversationTurns as dr, loadHistory as fr, rejectInvocation as pr, sendElicitResponse as mr, sendMessage as hr } from "./api/agents.js";
|
|
130
|
+
import { Breadcrumbs as gr } from "./components/chrome/Breadcrumbs.js";
|
|
131
|
+
import { NO_VALUE_OPS as _r, OP_LABELS as vr, countActiveFilters as yr, hasOrGroups as br, parseFilterURLState as xr, parseFiltersFromURL as Sr, setFiltersInURL as Cr } from "./lib/filters.js";
|
|
132
|
+
import { evaluateFilterTree as wr } from "./lib/filter-evaluator.js";
|
|
133
|
+
import { commonVariantActionCodes as Tr, effectiveScreenForRecord as Er, resolveEntityVariantCode as Dr, resolveScreenVariantCode as Or, variantActionCodesForRecord as kr } from "./lib/variants.js";
|
|
134
|
+
import { formatCount as Ar, formatEstimatedCount as jr, formatExactCount as Mr } from "./lib/format-count.js";
|
|
135
|
+
import { buildMassEditTargets as Nr, parseTargetFilter as Pr } from "./lib/mass-edit.js";
|
|
136
|
+
import { MULTIPLE_VALUES as Fr, PropertyGridEditor as Ir, detectCommonValue as Lr } from "./components/actions/PropertyGridEditor.js";
|
|
137
|
+
import { ClassifiedFieldLocked as Rr } from "./components/primitives/ClassifiedFieldLocked.js";
|
|
138
|
+
import { classificationTier as zr, fieldAccessInfo as Br, fieldClassification as Vr, fieldRequiredPermission as Hr, isFieldReadable as Ur, isFieldSoDProtected as Wr, isFieldWritable as Gr } from "./lib/field-classification.js";
|
|
139
|
+
import { useLocation as Kr, useNavigate as qr, useParams as Jr, useSearchParams as Yr } from "react-router";
|
|
140
|
+
export { le as ACTION_DATA_CURSOR_KEY, ue as ACTION_DATA_KEY, E as ActionBatchError, xt as ActionRunnerProvider, Qn as AgentChatPanel, tr as AgentConversationDrawer, $n as AgentElicitForm, er as AgentPicker, e as App, Pt as AuthShell, qt as Avatar, j as Batch, an as BoolToggle, Jt as BrandGlyph, gr as Breadcrumbs, zt as Btn, p as CURSOR_LANGUAGE_CHANGED, m as CURSOR_SEMANTICS_MISMATCH, Lt as ChangePasswordDialog, sn as Check, $t as Chip, Sn as CircleImage, Rr as ClassifiedFieldLocked, yt as ColumnPicker, Zn as CommandPalette, gt as ConfirmDialog, R as CurrentScreenProvider, Xe as DEFAULT_RESPONSIVE_BREAKPOINTS, ln as DateInput, e as Declarion, Yt as Dropdown, pt as DynamicIcon, ht as EmptyState, C as EntityClient, un as FieldLabel, oe as FieldRow, se as FieldsGrid, Pn as FileDraftScope, vt as FilterChips, _t as FilterDrawer, jt as Forgot, Xt as HoverCard, Rt as Icon, Bt as IconBtn, nn as IdBadge, qn as ImpersonationBanner, Jn as ImpersonationFrame, Yn as ImpersonationStartModal, Zt as InfoTooltip, Ot as InlineEditCell, dn as JsonField, Kt as Kbd, Ve as MANDATORY_LANGUAGE, Fr as MULTIPLE_VALUES, on as MenuItem, fn as MultiSelect, _r as NO_VALUE_OPS, vr as OP_LABELS, Ct as ObjectActionBar, t as OrderedMap, nt as PAGE_STATE_TTL_PARAM, Vt as PILL_TONES, mt as PageHeader, pn as PasswordInput, Ht as Pill, It as Preferences, Ft as Profile, Ir as PropertyGridEditor, mn as QuickEditCell, Dt as QuickPeek, Bn as Rail, w as RefCache, Et as RefCombobox, hn as RefField, Tt as RefreshControl, Mt as Reset, ye as ResponsiveModeProvider, rn as RowField, ot as SCROLL_STATE_KEY, en as SectionCard, gn as Select, Vn as Sidebar, kt as SignIn, At as SignUp, dt as SmartDetailPage, ut as SmartListPage, ft as SmartRecordListPage, cn as Spinner, xn as SquareImage, tn as StatTile, $ as StructureField, Kn as TabStrip, _n as TagsInput, Wn as TenantChip, vn as TextArea, yn as TextInput, Qt as Tooltip, Un as TopBar, Nt as TwoFA, Dn as UploadError, ee as ValueRows, bn as ViewField, bt as ViewSwitcher, Cn as WideBanner, de as actionDataQueryKey, rr as answerQuestion, ir as approveInvocation, D as buildActionBody, n as buildDetailHrefFromId, r as buildEntityDetailHref, Nr as buildMassEditTargets, i as buildRowDetailHref, Hn as buildSections, ar as cancelConversation, or as cancelInvocation, et as canonicalUrl, zr as classificationTier, _ as coerceDisplayString, Tr as commonVariantActionCodes, yr as countActiveFilters, sr as createConversation, fe as cursorActionDataQueryKey, G as cursorEntityDataQueryKey, K as cursorEntityStableKey, O as deleteObject, Lr as detectCommonValue, On as discardFile, v as editorWallClock, y as editorWireValue, Er as effectiveScreenForRecord, T as entityClient, V as entityDataQueryKey, Gn as envTone, h as errorCodeOf, wr as evaluateFilterTree, k as executeAction, a as extractPkValues, Ke as failureTitle, Br as fieldAccessInfo, Vr as fieldClassification, o as fieldDisplayName, Hr as fieldRequiredPermission, Z as fileReferenceJSONQueryKey, Ln as fileSelectionReducer, kn as formatBytes, Ar as formatCount, jr as formatEstimatedCount, Mr as formatExactCount, S as formatMoneyText, b as formatOffsetTimestamp, wn as getFileWidget, Me as getIcon, Mn as getImageCropper, Pe as getLayoutWidget, s as getPrimaryKeyFields, Tn as hasFileWidget, Fe as hasLayoutWidget, br as hasOrGroups, g as isCursorStaleError, Ur as isFieldReadable, Wr as isFieldSoDProtected, Gr as isFieldWritable, re as isNestable, ie as jsonRows, cr as listAvailableAgents, lr as listConversations, ur as loadConversationInvocations, dr as loadConversationTurns, fr as loadHistory, He as makeTextFn, Y as objectQueryKey, xr as parseFilterURLState, Sr as parseFiltersFromURL, ae as parseJsonText, Pr as parseTargetFilter, Ue as pickLocalized, Ut as pillColor, Wt as pillForeground, Gt as pillToneStyle, c as pkValuePartsToId, l as pkValuesFromId, u as pkValuesToDetailId, d as pkValuesToId, We as pluralText, qe as readDisplayState, En as registerFileWidget, Ie as registerLayoutWidget, je as registerScreen, pr as rejectInvocation, Le as reresolveLanguage, f as resolveDetailRoute, Dr as resolveEntityVariantCode, Or as resolveScreenVariantCode, Ze as resolveViewportCategory, A as restoreObject, mr as sendElicitResponse, hr as sendMessage, Cr as setFiltersInURL, Ne as setIconRegistry, Nn as setImageCropper, te as shortId, Rn as summarizeFileSelections, Ge as textWithNodes, An as uploadFile, pe as useActionData, St as useActionRunner, nr as useAgentConversation, W as useAggregate, J as useAllEntityData, B as useAuth, ke as useColumns, ne as useCopy, he as useCreateObject, z as useCurrentScreen, me as useCursorActionData, q as useCursorEntityData, ve as useDebounce, N as useDeclaredEnum, P as useDeclaredField, F as useDeclaredStatuses, ge as useDeleteObject, Ee as useDeleteProperty, Re as useDeploymentLanguage, Fn as useDraftRegistration, xe as useEffectiveParam, I as useEntity, H as useEntityCount, U as useEntityData, In as useFileDraftScope, Q as useFileReferenceJSON, zn as useFileSelection, Oe as useFilters, Xn as useImpersonation, ze as useLanguage, ce as useLiveObject, Kr as useLocation, qr as useNavigate, X as useObject, wt as useObjectActions, $e as usePageState, rt as usePageStateTtl, Se as useParam, Jr as useParams, st as usePlainScrollRestoration, Ce as usePublicParams, tt as useRegisterRetainedQuery, we as useResolvedParam, be as useResponsiveMode, ct as useSavedScrollOffset, M as useSchema, L as useScreen, Qe as useScreenBack, it as useScreenTab, Yr as useSearchParams, De as useSetProperty, Te as useSetStatus, Ye as useTabNavigate, at as useTabSearchMirror, Je as useTabStore, Be as useText, _e as useUpdateObject, Ae as useViews, lt as useVirtualScrollRestoration, jn as validateClientSide, kr as variantActionCodesForRecord, x as zoneMark };
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { listEntities as e } from "../api/data.js";
|
|
2
2
|
import { entityCountQueryKey as t } from "../hooks/useEntityData.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { bindRowReferences as n, bindUnboundRowReferences as r } from "./reference.js";
|
|
4
|
+
import { parseSort as i } from "./sort.js";
|
|
5
|
+
import { isListCacheKey as a, isRefetchOnlyListKey as o } from "./realtime-query-keys.js";
|
|
6
|
+
import { openResync as s } from "./realtime-resync.js";
|
|
7
|
+
import { refetchWhenIdle as c } from "./refetch-when-idle.js";
|
|
8
|
+
import { ApiError as l } from "../types/api.js";
|
|
8
9
|
// src/lib/realtime-reconcile.ts
|
|
9
|
-
async function
|
|
10
|
-
let
|
|
11
|
-
for (let
|
|
12
|
-
queryKey:
|
|
10
|
+
async function u(e, t, n, r) {
|
|
11
|
+
let i = e.getQueryCache().findAll({ predicate: (e) => a(e.queryKey) && e.queryKey[1] === t }), s = !1, l = [];
|
|
12
|
+
for (let a of i) a.state.data !== void 0 && (a.getObserversCount() === 0 ? e.invalidateQueries({
|
|
13
|
+
queryKey: a.queryKey,
|
|
13
14
|
refetchType: "none"
|
|
14
|
-
}) :
|
|
15
|
-
e.refetchCount && (
|
|
15
|
+
}) : o(a.queryKey) ? c(e, a) : l.push(d(e, a, t, n, r).then((e) => {
|
|
16
|
+
e.refetchCount && (s = !0);
|
|
16
17
|
})));
|
|
17
|
-
return await Promise.all(
|
|
18
|
+
return await Promise.all(l), s;
|
|
18
19
|
}
|
|
19
|
-
async function
|
|
20
|
+
async function d(n, r, i, a, o) {
|
|
20
21
|
let l = r.state.data;
|
|
21
|
-
if (!l || !Array.isArray(l.data)) return
|
|
22
|
+
if (!l || !Array.isArray(l.data)) return c(n, r), {
|
|
22
23
|
refetchWindow: !0,
|
|
23
24
|
refetchCount: !0
|
|
24
25
|
};
|
|
25
|
-
let
|
|
26
|
-
if (
|
|
27
|
-
let
|
|
26
|
+
let u = S(r), d = u.per_page ?? l.data.length;
|
|
27
|
+
if (a.length > d) return g(n, r);
|
|
28
|
+
let p, m = T(r), h = r.state.dataUpdateCount;
|
|
28
29
|
try {
|
|
29
|
-
|
|
30
|
+
p = await e(i, _(u, a), { signal: o });
|
|
30
31
|
} catch (e) {
|
|
31
|
-
return
|
|
32
|
+
return C(e) ? (s(n, {
|
|
32
33
|
scope: { kind: "keys" },
|
|
33
|
-
keys: [r.queryKey, t(i,
|
|
34
|
+
keys: [r.queryKey, t(i, u)],
|
|
34
35
|
standing: !0
|
|
35
36
|
}), n.invalidateQueries({
|
|
36
37
|
queryKey: r.queryKey,
|
|
@@ -38,56 +39,66 @@ async function l(n, r, i, s, c) {
|
|
|
38
39
|
}), {
|
|
39
40
|
refetchWindow: !1,
|
|
40
41
|
refetchCount: !1
|
|
41
|
-
}) :
|
|
42
|
+
}) : g(n, r);
|
|
42
43
|
}
|
|
43
|
-
return
|
|
44
|
+
return p.meta?.has_more || r.state.dataUpdateCount !== h ? g(n, r) : f(n, r, l, u, a, p, m);
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
let l =
|
|
46
|
+
function f(e, t, n, r, a, o, s) {
|
|
47
|
+
let l = i(r.sort).map((e) => e.field), u = x(t, r), d = {
|
|
47
48
|
refetchWindow: !1,
|
|
48
49
|
refetchCount: !1
|
|
49
|
-
},
|
|
50
|
+
}, f = [], m = [];
|
|
50
51
|
for (let e of a) {
|
|
51
|
-
let t =
|
|
52
|
-
t &&
|
|
52
|
+
let t = o.data.find((t) => b(t, e.pk)), r = n.data.findIndex((t) => b(t, e.pk));
|
|
53
|
+
t && r >= 0 ? y(l, n.data[r], t) ? d.refetchWindow = !0 : f.push({
|
|
53
54
|
pk: e.pk,
|
|
54
55
|
row: t
|
|
55
|
-
}) : t ? (
|
|
56
|
+
}) : t ? (d.refetchWindow = !0, d.refetchCount = !0) : r >= 0 ? (m.push(e.pk), d.refetchWindow = !0, d.refetchCount = !0) : e.createdOnly || (d.refetchCount = !0, u || (d.refetchWindow = !0));
|
|
56
57
|
}
|
|
57
|
-
return (m.length > 0 ||
|
|
58
|
+
return (m.length > 0 || f.length > 0 && !d.refetchWindow) && p(e, t, f, m, o, s), d.refetchWindow && c(e, t), d;
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
60
|
+
function p(e, t, i, a, o, s) {
|
|
61
|
+
E(t, s) && e.setQueryData(t.queryKey, (e) => {
|
|
61
62
|
if (!e || !Array.isArray(e.data)) return e;
|
|
62
|
-
let t = e.data.map((
|
|
63
|
-
let
|
|
64
|
-
return
|
|
63
|
+
let t = e.data.map((t) => {
|
|
64
|
+
let a = i.find((e) => b(t, e.pk));
|
|
65
|
+
return a ? n([a.row], o.$refs)[0] : r([t], e.$refs)[0];
|
|
65
66
|
});
|
|
66
|
-
return
|
|
67
|
+
return a.length > 0 && (t = t.filter((e) => !a.some((t) => b(e, t)))), {
|
|
67
68
|
...e,
|
|
68
69
|
data: t,
|
|
69
|
-
$refs:
|
|
70
|
+
$refs: m(e.$refs, o.$refs)
|
|
70
71
|
};
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function m(e, t) {
|
|
74
75
|
if (!t) return e;
|
|
75
76
|
if (!e) return t;
|
|
76
77
|
let n = { ...e };
|
|
77
|
-
for (let [e, r] of Object.entries(t))
|
|
78
|
-
...n[e] ?? {}
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
for (let [e, r] of Object.entries(t)) {
|
|
79
|
+
let t = { ...n[e] ?? {} };
|
|
80
|
+
for (let [e, n] of Object.entries(r)) {
|
|
81
|
+
let r = t[e];
|
|
82
|
+
t[e] = r && h(r, n) ? {
|
|
83
|
+
...r,
|
|
84
|
+
...n
|
|
85
|
+
} : n;
|
|
86
|
+
}
|
|
87
|
+
n[e] = t;
|
|
88
|
+
}
|
|
81
89
|
return n;
|
|
82
90
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
91
|
+
function h(e, t) {
|
|
92
|
+
return e.id != null && e.id === t.id;
|
|
93
|
+
}
|
|
94
|
+
function g(e, t) {
|
|
95
|
+
return c(e, t), {
|
|
85
96
|
refetchWindow: !0,
|
|
86
97
|
refetchCount: !0
|
|
87
98
|
};
|
|
88
99
|
}
|
|
89
|
-
function
|
|
90
|
-
let n = [...e.filters ?? [],
|
|
100
|
+
function _(e, t) {
|
|
101
|
+
let n = [...e.filters ?? [], v(t)];
|
|
91
102
|
return {
|
|
92
103
|
...e,
|
|
93
104
|
filters: n,
|
|
@@ -96,7 +107,7 @@ function m(e, t) {
|
|
|
96
107
|
count: "window"
|
|
97
108
|
};
|
|
98
109
|
}
|
|
99
|
-
function
|
|
110
|
+
function v(e) {
|
|
100
111
|
let t = Object.keys(e[0]?.pk ?? {}).sort();
|
|
101
112
|
if (t.length === 1) {
|
|
102
113
|
let n = t[0];
|
|
@@ -112,36 +123,36 @@ function h(e) {
|
|
|
112
123
|
value: e.pk[t]
|
|
113
124
|
})) })) };
|
|
114
125
|
}
|
|
115
|
-
function
|
|
126
|
+
function y(e, t, n) {
|
|
116
127
|
for (let r of e) {
|
|
117
128
|
let e = t[r], i = n[r];
|
|
118
129
|
if (e === void 0 || i === void 0 || !Object.is(e, i) && JSON.stringify(e) !== JSON.stringify(i)) return !0;
|
|
119
130
|
}
|
|
120
131
|
return !1;
|
|
121
132
|
}
|
|
122
|
-
function
|
|
133
|
+
function b(e, t) {
|
|
123
134
|
for (let [n, r] of Object.entries(t)) {
|
|
124
135
|
let t = e[n];
|
|
125
136
|
if (typeof t != "string" && typeof t != "number" || String(t) !== r) return !1;
|
|
126
137
|
}
|
|
127
138
|
return !0;
|
|
128
139
|
}
|
|
129
|
-
function
|
|
140
|
+
function x(e, t) {
|
|
130
141
|
return e.queryKey[0] === "entity-data-all" || (t.page ?? 1) === 1;
|
|
131
142
|
}
|
|
132
|
-
function
|
|
143
|
+
function S(e) {
|
|
133
144
|
let t = e.queryKey[2];
|
|
134
145
|
return t && typeof t == "object" ? { ...t } : {};
|
|
135
146
|
}
|
|
136
|
-
function
|
|
137
|
-
return e instanceof
|
|
147
|
+
function C(e) {
|
|
148
|
+
return e instanceof l && e.status === 429;
|
|
138
149
|
}
|
|
139
|
-
var
|
|
140
|
-
function
|
|
141
|
-
let t = (
|
|
142
|
-
return
|
|
150
|
+
var w = /* @__PURE__ */ new WeakMap();
|
|
151
|
+
function T(e) {
|
|
152
|
+
let t = (w.get(e) ?? 0) + 1;
|
|
153
|
+
return w.set(e, t), t;
|
|
143
154
|
}
|
|
144
|
-
function
|
|
145
|
-
return (
|
|
155
|
+
function E(e, t) {
|
|
156
|
+
return (w.get(e) ?? 0) === t;
|
|
146
157
|
}
|
|
147
|
-
export { m as narrowedParams,
|
|
158
|
+
export { m as mergeResponseRefs, _ as narrowedParams, u as reconcileListCaches };
|
|
@@ -1,53 +1,71 @@
|
|
|
1
1
|
import { coerceDisplayString as e } from "./display-value.js";
|
|
2
|
-
import { DISPLAY_KEY as t, getPrimaryKeyFields as n,
|
|
2
|
+
import { DISPLAY_KEY as t, getPrimaryKeyFields as n, refRecordHasLabel as r, resolveRefRecordLabel as i } from "../types/schema.js";
|
|
3
3
|
// src/lib/reference.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
4
|
+
var a = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
function o(e) {
|
|
6
6
|
return e.includes("@");
|
|
7
7
|
}
|
|
8
|
-
function o(e, t) {
|
|
9
|
-
for (let n of e) i.set(n, t);
|
|
10
|
-
return e;
|
|
11
|
-
}
|
|
12
8
|
function s(e, t) {
|
|
13
|
-
|
|
9
|
+
for (let n of e) a.set(n, t);
|
|
10
|
+
return e;
|
|
14
11
|
}
|
|
15
12
|
function c(e, t) {
|
|
16
|
-
|
|
13
|
+
for (let n of e) a.has(n) || a.set(n, t);
|
|
14
|
+
return e;
|
|
17
15
|
}
|
|
18
16
|
function l(e, t) {
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
function u(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
return a.has(e) && a.set(t, a.get(e)), t;
|
|
18
|
+
}
|
|
19
|
+
function u(e, t) {
|
|
20
|
+
return e && Object.hasOwn(e, t) ? e[t] : void 0;
|
|
21
|
+
}
|
|
22
|
+
function d(e, t) {
|
|
23
|
+
return a.has(e) ? a.get(e) : u(e, "$refs") ?? t;
|
|
24
|
+
}
|
|
25
|
+
function f(e, n, a, o, s) {
|
|
26
|
+
let c = u(u(n, a), s);
|
|
27
|
+
if (!c) return {
|
|
28
|
+
label: s,
|
|
29
|
+
resolved: !1,
|
|
30
|
+
labelled: !1
|
|
31
|
+
};
|
|
32
|
+
let l = u(e.entities, o), d = e.detailScreen || l?.detail_screen, f = d ? u(e.screens, d) : void 0, p = l && f?.entity === o && f.type === "detail" ? f.route : void 0, m = s !== "new" && s !== "." && s !== ".." && !s.includes("%2F") && !!p?.split("/").includes(":id");
|
|
33
|
+
return {
|
|
34
|
+
label: i(e.t, c, t, s),
|
|
35
|
+
resolved: !0,
|
|
36
|
+
labelled: r(e.t, c, t),
|
|
37
|
+
icon: l?.display?.icon,
|
|
38
|
+
href: m ? p.replace(":id", encodeURIComponent(s)) : void 0
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function p(t) {
|
|
42
|
+
let a = t.field.ref, o = !!a?.entity_field, s = /* @__PURE__ */ new Map();
|
|
43
|
+
function c(e) {
|
|
44
|
+
let r = s.get(e);
|
|
45
|
+
if (r) return r;
|
|
46
|
+
let i = u(t.entities, e), a = t.detailScreen || i?.detail_screen, o = {
|
|
47
|
+
route: (a ? u(t.screens, a) : void 0)?.route,
|
|
48
|
+
icon: i?.display?.icon,
|
|
49
|
+
key: i ? n(i)[0] ?? "id" : "id"
|
|
30
50
|
};
|
|
31
|
-
return s.set(e,
|
|
51
|
+
return s.set(e, o), o;
|
|
32
52
|
}
|
|
33
|
-
return (n, s,
|
|
34
|
-
let
|
|
35
|
-
if (!
|
|
36
|
-
label:
|
|
37
|
-
resolved: !1
|
|
38
|
-
|
|
39
|
-
let m = o ? `${i.fieldName}@${p}` : p, h = c(c(o ? l(s, d) : d, m), f);
|
|
40
|
-
if (o && !h) return {
|
|
41
|
-
label: f,
|
|
42
|
-
resolved: !1
|
|
53
|
+
return (n, s, l) => {
|
|
54
|
+
let p = n == null || n === "" ? "" : e(n), m = a?.entity_field ? u(s, a.entity_field) : a?.entity;
|
|
55
|
+
if (!p || typeof m != "string" || !m) return {
|
|
56
|
+
label: p || "—",
|
|
57
|
+
resolved: !1,
|
|
58
|
+
labelled: !1
|
|
43
59
|
};
|
|
44
|
-
|
|
60
|
+
if (o) return f(t, d(s, l), `${t.fieldName}@${m}`, m, p);
|
|
61
|
+
let h = u(u(l, m), p), g = t.field.display?.ref_display_field || "$display", _ = h ? i(t.t, h, g, p) : p, v = c(m), y = h ? u(h, v.key) : void 0, b = y == null ? p : e(y);
|
|
45
62
|
return {
|
|
46
63
|
label: _,
|
|
47
64
|
resolved: !!h,
|
|
65
|
+
labelled: !!h && r(t.t, h, g),
|
|
48
66
|
icon: v.icon,
|
|
49
|
-
href:
|
|
67
|
+
href: v.route?.replace(":id", encodeURIComponent(b))
|
|
50
68
|
};
|
|
51
69
|
};
|
|
52
70
|
}
|
|
53
|
-
export {
|
|
71
|
+
export { s as bindRowReferences, c as bindUnboundRowReferences, f as bucketReference, l as inheritRowReferences, o as isPolymorphicReferenceBucket, d as referenceBucketsForRow, p as referenceResolver };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { isUuid as e } from "./uuid.js";
|
|
2
|
+
// src/lib/short-id.ts
|
|
3
|
+
var t = 8, n = /^(0x)?[0-9a-f]{16,}$/i, r = "sha256:", i = /^[0-9A-HJKMNP-TV-Z]{26}$/;
|
|
4
|
+
function a(a) {
|
|
5
|
+
let o = a.startsWith(r) ? a.slice(7) : a;
|
|
6
|
+
if (e(o) || n.test(o) || i.test(o)) {
|
|
7
|
+
let e = o.startsWith("0x") ? 2 : 0;
|
|
8
|
+
return `${o.slice(0, e + t)}…`;
|
|
9
|
+
}
|
|
10
|
+
return a;
|
|
11
|
+
}
|
|
12
|
+
export { a as shortId };
|