@declarion/react 0.52.0 → 0.54.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/{DraggableChildrenTable-CJCjc_cd.js → DraggableChildrenTable-CPoUY99R.js} +35 -35
- package/dist-lib/{Grid-DUjbQg3r.js → Grid--QAEby8k.js} +28 -28
- package/dist-lib/{LayoutRenderer-DbdxC-Bq.js → LayoutRenderer-BxZ7Nd9b.js} +920 -922
- package/dist-lib/{ListCardsBody-C8ofksQb.js → ListCardsBody-BPV4GPrv.js} +14 -14
- package/dist-lib/{MarkdownRenderer-B9_5fwuE.js → MarkdownRenderer-CIKuh_0i.js} +10 -10
- package/dist-lib/{record-documents-key-8fdm7C10.js → RecordIdBadge-CGxPR-8q.js} +1 -4
- package/dist-lib/{RefreshControl-C-8UCyau.js → RefreshControl-DMLkZP3R.js} +120 -122
- package/dist-lib/{SmartDetailPage.impl-DWjNQ052.js → SmartDetailPage.impl-SnNu6Ug-.js} +376 -377
- package/dist-lib/{SmartListPage.impl-yKBK7a8b.js → SmartListPage.impl-C73pR7Iw.js} +1098 -1099
- package/dist-lib/{SmartRecordListPage.impl-DRpU_DOC.js → SmartRecordListPage.impl-rJjQZe1V.js} +183 -183
- package/dist-lib/{SortHeaderMenu-CbihbEGd.js → SortHeaderMenu-DQ_KrkWk.js} +1 -1
- package/dist-lib/{action-dispatch-C28UhXXA.js → action-dispatch-DsuUS7ae.js} +382 -382
- package/dist-lib/api/agents.d.ts +0 -1
- package/dist-lib/api/events.d.ts +27 -5
- package/dist-lib/{cardProjection-Bp_ZPLUE.js → cardProjection-BadzqyeQ.js} +146 -204
- package/dist-lib/components/actions/ObjectActionBar.d.ts +1 -1
- package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -1
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -1
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +1 -1
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +1 -1
- package/dist-lib/components/layout/Layout.d.ts +1 -1
- package/dist-lib/components/layout/TopBar.d.ts +1 -1
- package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
- package/dist-lib/components/list/PeekFieldCell.d.ts +1 -1
- package/dist-lib/components/list/QuickPeek.d.ts +1 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +2 -2
- package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +1 -1
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +1 -1
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
- package/dist-lib/components/pages/list/columns.d.ts +1 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
- package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +1 -1
- package/dist-lib/components/pages/list/useListQuery.d.ts +6 -1
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +1 -1
- package/dist-lib/components/pages/list/useListViews.d.ts +1 -1
- package/dist-lib/components/pages/list/useRowMenu.d.ts +1 -1
- package/dist-lib/components/shared/RefreshControl.d.ts +7 -1
- package/dist-lib/components/shared/useOwnRefresh.d.ts +9 -0
- package/dist-lib/{field-classification-CeYJlsNq.js → field-classification-sMkkAEg9.js} +301 -320
- package/dist-lib/{format-count-C3N-WxEy.js → format-count-B5SLlNOb.js} +245 -245
- package/dist-lib/hooks/useMutations.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +24 -4
- package/dist-lib/index.js +1586 -1858
- package/dist-lib/lib/action-dispatch.d.ts +1 -1
- package/dist-lib/lib/document-templates.d.ts +1 -1
- package/dist-lib/lib/realtime-reconcile.d.ts +43 -0
- package/dist-lib/{peekDraftStore-D3sowXga.js → peekDraftStore-CbHFwz_F.js} +36 -36
- package/dist-lib/{registry-p6CejATt.js → registry-D0RhCnEL.js} +507 -507
- package/dist-lib/stores/realtime.d.ts +20 -0
- package/dist-lib/testing.js +35 -35
- package/dist-lib/types/api.d.ts +8 -4
- package/dist-lib/types/schema.d.ts +6 -0
- package/dist-lib/{useCurrentScreen-74x5yJNb.js → useCurrentScreen-DVTXCj_K.js} +2508 -1557
- package/dist-lib/{useListQuery-D75bgLLz.js → useListQuery-C2nq58YV.js} +13 -10
- package/dist-lib/{useProperties-C5fZp12D.js → useProperties-BcIz-MyO.js} +25 -25
- package/dist-lib/useTabSearchMirror-UYCsopxP.js +177 -0
- package/dist-lib/{value-DKekzcjz.js → value-CQzGOI0F.js} +25 -25
- package/package.json +14 -14
- package/dist-lib/useTabSearchMirror-D_wzoYRz.js +0 -406
|
@@ -3,7 +3,27 @@ interface RealtimeState {
|
|
|
3
3
|
degradedEntities: ReadonlySet<string>;
|
|
4
4
|
/** Mark one entity as auto-degraded. Idempotent. */
|
|
5
5
|
markDegraded: (entityCode: string) => void;
|
|
6
|
+
/** Realtime is delivering everything again; forget every degraded entity. */
|
|
7
|
+
clearDegraded: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* True while a presented resume position's replay has not landed. The rows
|
|
10
|
+
* keep rendering; what is not true is that they are up to date.
|
|
11
|
+
*/
|
|
12
|
+
replayPending: boolean;
|
|
13
|
+
setReplayPending: (pending: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* True while a row re-read was turned away for budget. The rows keep
|
|
16
|
+
* rendering, but only a refresh the person asks for will renew them.
|
|
17
|
+
*/
|
|
18
|
+
readRefused: boolean;
|
|
19
|
+
setReadRefused: (refused: boolean) => void;
|
|
6
20
|
}
|
|
7
21
|
export declare const useRealtimeStore: import("zustand").UseBoundStore<import("zustand").StoreApi<RealtimeState>>;
|
|
8
22
|
export declare function isEntityLive(realtimeFlag: boolean | undefined, degradedEntities: ReadonlySet<string>, entityCode: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether a screen showing this entity is CURRENT - a different question from
|
|
25
|
+
* isEntityLive, which answers whether the relay delivers at all. The rows keep
|
|
26
|
+
* rendering throughout; this is what says they may be behind. docs/realtime.md.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useScreenIsLive(realtimeFlag: boolean | undefined, entityCode: string): boolean;
|
|
9
29
|
export {};
|
package/dist-lib/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Er as e, Jt as t, Vt as n, nn as r, on as i, r as a, rn as o, t as s, tn as c } from "./useCurrentScreen-DVTXCj_K.js";
|
|
2
2
|
import { useState as l } from "react";
|
|
3
3
|
import { MemoryRouter as u, useLocation as d } from "react-router";
|
|
4
4
|
import { QueryClient as f, QueryClientProvider as p } from "@tanstack/react-query";
|
|
@@ -89,15 +89,15 @@ function E(e) {
|
|
|
89
89
|
}
|
|
90
90
|
return e;
|
|
91
91
|
}
|
|
92
|
-
function D(
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
let
|
|
96
|
-
|
|
97
|
-
let a =
|
|
92
|
+
function D(e) {
|
|
93
|
+
let n = e.entityData ?? {};
|
|
94
|
+
o((t, r) => {
|
|
95
|
+
let i = r;
|
|
96
|
+
e.onListRequest?.(t, i);
|
|
97
|
+
let a = n[t], o = typeof a == "function" ? a(i) : a;
|
|
98
98
|
if (o instanceof Error) throw o;
|
|
99
99
|
let s = E(o), c = s.meta?.per_page ?? 50, l = s.meta?.total ?? s.rows.length;
|
|
100
|
-
return
|
|
100
|
+
return r.count === "only" ? {
|
|
101
101
|
data: [],
|
|
102
102
|
meta: {
|
|
103
103
|
page: 1,
|
|
@@ -116,54 +116,54 @@ function D(r) {
|
|
|
116
116
|
...s.refs === void 0 ? {} : { $refs: s.refs }
|
|
117
117
|
};
|
|
118
118
|
});
|
|
119
|
-
let
|
|
120
|
-
|
|
121
|
-
let
|
|
122
|
-
if (
|
|
123
|
-
if (
|
|
124
|
-
let
|
|
125
|
-
if (
|
|
126
|
-
return { data:
|
|
119
|
+
let i = e.entityItems ?? {}, a = e.entityItemResponses ?? {};
|
|
120
|
+
r((e, n) => {
|
|
121
|
+
let r = typeof n == "string" ? n : t(n), o = a[e]?.[r];
|
|
122
|
+
if (o instanceof Error) throw o;
|
|
123
|
+
if (o !== void 0) return o;
|
|
124
|
+
let s = i[e]?.[r];
|
|
125
|
+
if (s instanceof Error) throw s;
|
|
126
|
+
return { data: s };
|
|
127
127
|
});
|
|
128
|
-
let s =
|
|
129
|
-
|
|
128
|
+
let s = e.actionResults ?? {};
|
|
129
|
+
c(async (e, t) => {
|
|
130
130
|
if (!(e in s)) throw Error(`renderWithDeclarion: no action result registered for "${e}" (seed it via actionResults)`);
|
|
131
131
|
let n = s[e];
|
|
132
132
|
return C(typeof n == "function" ? await n(t) : n);
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
function O() {
|
|
136
|
-
|
|
136
|
+
o(null), r(null), c(null), i.setState({
|
|
137
137
|
user: null,
|
|
138
138
|
isAuthenticated: !1,
|
|
139
139
|
activeTenant: null,
|
|
140
140
|
tenants: []
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
function k(
|
|
144
|
-
let
|
|
143
|
+
function k(t, r = {}) {
|
|
144
|
+
let i = new f({ defaultOptions: { queries: {
|
|
145
145
|
retry: !1,
|
|
146
146
|
gcTime: Infinity
|
|
147
147
|
} } });
|
|
148
|
-
T(),
|
|
149
|
-
let
|
|
150
|
-
code:
|
|
151
|
-
children:
|
|
152
|
-
}) :
|
|
153
|
-
client:
|
|
148
|
+
T(), i.setQueryData(["schema", !0], r.schema ?? v()), D(r);
|
|
149
|
+
let o = r.screenCode ? /* @__PURE__ */ h(s, {
|
|
150
|
+
code: r.screenCode,
|
|
151
|
+
children: t
|
|
152
|
+
}) : t, c = { current: r.route ?? "/" }, l = /* @__PURE__ */ g(p, {
|
|
153
|
+
client: i,
|
|
154
154
|
children: [/* @__PURE__ */ g(u, {
|
|
155
|
-
initialEntries: [
|
|
156
|
-
children: [/* @__PURE__ */ h(w, { into: c }), /* @__PURE__ */ h(
|
|
155
|
+
initialEntries: [r.route ?? "/"],
|
|
156
|
+
children: [/* @__PURE__ */ h(w, { into: c }), /* @__PURE__ */ h(a, { children: o })]
|
|
157
157
|
}), /* @__PURE__ */ h(m, {})]
|
|
158
|
-
}), d =
|
|
159
|
-
query:
|
|
158
|
+
}), d = r.embedQuery ? /* @__PURE__ */ h(n, {
|
|
159
|
+
query: r.embedQuery,
|
|
160
160
|
children: l
|
|
161
|
-
}) : l, y = _(
|
|
162
|
-
viewportOverride:
|
|
161
|
+
}) : l, y = _(r.viewport ? /* @__PURE__ */ h(e, {
|
|
162
|
+
viewportOverride: r.viewport,
|
|
163
163
|
children: d
|
|
164
164
|
}) : d);
|
|
165
165
|
return Object.assign(y, {
|
|
166
|
-
queryClient:
|
|
166
|
+
queryClient: i,
|
|
167
167
|
location: () => c.current
|
|
168
168
|
});
|
|
169
169
|
}
|
|
@@ -184,7 +184,7 @@ function A({ children: e, authenticated: t = !0, ...n }) {
|
|
|
184
184
|
client: r,
|
|
185
185
|
children: [/* @__PURE__ */ h(u, {
|
|
186
186
|
initialEntries: [n.route ?? "/"],
|
|
187
|
-
children: /* @__PURE__ */ h(
|
|
187
|
+
children: /* @__PURE__ */ h(a, { children: e })
|
|
188
188
|
}), /* @__PURE__ */ h(m, {})]
|
|
189
189
|
});
|
|
190
190
|
}
|
package/dist-lib/types/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AccentDef, LocalizedString } from "./schema";
|
|
1
|
+
import type { AccentDef, EntityField, LocalizedString } from "./schema";
|
|
2
2
|
import type { HydratedFile } from "./files";
|
|
3
3
|
import type { FilterNode } from "../lib/filters";
|
|
4
4
|
export interface ListMeta {
|
|
@@ -398,7 +398,7 @@ export interface ParamLookup {
|
|
|
398
398
|
/**
|
|
399
399
|
* One entry of the bulk `GET /api/params` response (and per-code resolution).
|
|
400
400
|
* Carries the declaration facets the admin UIs need to compute attachment,
|
|
401
|
-
* render structure editors, and render
|
|
401
|
+
* render structure editors, and render member selects, so the bulk endpoint is
|
|
402
402
|
* self-sufficient without a second schema fetch.
|
|
403
403
|
*/
|
|
404
404
|
export interface ResolvedParam {
|
|
@@ -413,8 +413,12 @@ export interface ResolvedParam {
|
|
|
413
413
|
scopes?: string[];
|
|
414
414
|
/** Structure code when `type === "structure"`. */
|
|
415
415
|
structure?: string;
|
|
416
|
-
/**
|
|
417
|
-
|
|
416
|
+
/** Members of a closed type - `enum`, or an enum-backed `string_array`.
|
|
417
|
+
* Carried whole rather than as bare codes so the editor can show a name. */
|
|
418
|
+
values?: EntityField["values"];
|
|
419
|
+
/** Shared enum this parameter names, when it names one rather than listing
|
|
420
|
+
* its members inline. Present for display; `values` is what to render. */
|
|
421
|
+
enum?: string;
|
|
418
422
|
}
|
|
419
423
|
export interface ParamOverride {
|
|
420
424
|
param_code: string;
|
|
@@ -301,6 +301,12 @@ export interface ParameterDef {
|
|
|
301
301
|
category?: string;
|
|
302
302
|
/** Override scopes accepted on writes. Subset of: env, tenant, role, user, object. Empty = all. */
|
|
303
303
|
scopes?: string[];
|
|
304
|
+
/** Members of a closed type - `enum`, or an enum-backed `string_array`. Resolved
|
|
305
|
+
* at load whether declared inline or by naming a shared enum, so this is the set
|
|
306
|
+
* the platform enforces. Same shape a field's members have. */
|
|
307
|
+
values?: EntityField["values"];
|
|
308
|
+
/** The shared enum this parameter names, when it names one. `values` is what to render. */
|
|
309
|
+
enum?: string;
|
|
304
310
|
}
|
|
305
311
|
export interface AssociationDisplay {
|
|
306
312
|
name?: LocalizedString;
|