@declarion/react 0.54.0 → 0.54.1
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-CPoUY99R.js → DraggableChildrenTable-Djc7QDzR.js} +32 -32
- package/dist-lib/{Grid--QAEby8k.js → Grid-Bd2r0_4J.js} +45 -45
- package/dist-lib/{LayoutRenderer-BxZ7Nd9b.js → LayoutRenderer-V6nf9aa_.js} +716 -714
- package/dist-lib/{ListCardsBody-BPV4GPrv.js → ListCardsBody-Cdsvu0Vs.js} +29 -29
- package/dist-lib/{MarkdownRenderer-CIKuh_0i.js → MarkdownRenderer-CZo5ZgM7.js} +1 -1
- package/dist-lib/{RefreshControl-DMLkZP3R.js → RefreshControl-CJm3vz9p.js} +40 -40
- package/dist-lib/{SmartDetailPage.impl-SnNu6Ug-.js → SmartDetailPage.impl-DoIjCzjQ.js} +492 -492
- package/dist-lib/{SmartListPage.impl-C73pR7Iw.js → SmartListPage.impl-DnM8e14t.js} +743 -742
- package/dist-lib/{SmartRecordListPage.impl-rJjQZe1V.js → SmartRecordListPage.impl-BmHGYbD9.js} +128 -128
- package/dist-lib/{SortHeaderMenu-DQ_KrkWk.js → SortHeaderMenu-CA53NerB.js} +1 -1
- package/dist-lib/{action-dispatch-DsuUS7ae.js → action-dispatch-JcUrLFaW.js} +177 -177
- package/dist-lib/api/events.d.ts +13 -4
- package/dist-lib/{cardProjection-BadzqyeQ.js → cardProjection-Q2kwqv8V.js} +19 -19
- package/dist-lib/components/pages/list/ListToolbar.d.ts +5 -3
- package/dist-lib/components/pages/list/useListQuery.d.ts +1 -5
- package/dist-lib/{field-classification-sMkkAEg9.js → field-classification-ssZvtr8J.js} +268 -397
- package/dist-lib/{format-count-B5SLlNOb.js → format-count-DHuivNT7.js} +236 -236
- package/dist-lib/hooks/useEntityData.d.ts +7 -0
- package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
- package/dist-lib/hooks/useSSE.d.ts +0 -1
- package/dist-lib/index.js +806 -806
- package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
- package/dist-lib/lib/realtime-reconcile.d.ts +0 -9
- package/dist-lib/lib/realtime-resync.d.ts +23 -0
- package/dist-lib/{peekDraftStore-CbHFwz_F.js → peekDraftStore-lm9ViVLA.js} +17 -17
- package/dist-lib/{registry-D0RhCnEL.js → registry-DsQFhEAD.js} +511 -511
- package/dist-lib/stores/realtime.d.ts +86 -19
- package/dist-lib/testing.js +40 -40
- package/dist-lib/{useCurrentScreen-DVTXCj_K.js → useCurrentScreen-aHx9HH1m.js} +2472 -1963
- package/dist-lib/useListQuery-DZn2BAxY.js +96 -0
- package/dist-lib/{useProperties-BcIz-MyO.js → useProperties-CAqKmUKg.js} +25 -25
- package/dist-lib/{useTabSearchMirror-UYCsopxP.js → useTabSearchMirror-DYW9WoK7.js} +10 -10
- package/dist-lib/{value-CQzGOI0F.js → value-CzKQPJOp.js} +4 -4
- package/package.json +4 -4
- package/dist-lib/useListQuery-C2nq58YV.js +0 -90
package/dist-lib/api/events.d.ts
CHANGED
|
@@ -29,15 +29,19 @@ export type SSEEvent = {
|
|
|
29
29
|
} | {
|
|
30
30
|
type: "replay_complete";
|
|
31
31
|
seq?: number;
|
|
32
|
+
} | {
|
|
33
|
+
type: "snapshot_complete";
|
|
34
|
+
known: boolean;
|
|
35
|
+
asOf?: number;
|
|
36
|
+
} | {
|
|
37
|
+
type: "realtime_streaming";
|
|
38
|
+
eventID?: string;
|
|
39
|
+
degraded: string[];
|
|
32
40
|
} | {
|
|
33
41
|
type: "realtime_degraded";
|
|
34
42
|
eventID?: string;
|
|
35
43
|
entity: string;
|
|
36
44
|
degradedSeq?: number;
|
|
37
|
-
} | {
|
|
38
|
-
type: "realtime_restored";
|
|
39
|
-
eventID?: string;
|
|
40
|
-
restoredSeq?: number;
|
|
41
45
|
} | {
|
|
42
46
|
type: "cache_reset";
|
|
43
47
|
eventID?: string;
|
|
@@ -78,5 +82,10 @@ export interface StreamEventsOptions {
|
|
|
78
82
|
* header, so a sent cookie would bypass the scoped embed token.
|
|
79
83
|
*/
|
|
80
84
|
credentials?: RequestCredentials;
|
|
85
|
+
/**
|
|
86
|
+
* Called for every chunk read from the stream, heartbeat comments included:
|
|
87
|
+
* what proves the connection is still alive on a tenant with nothing to say.
|
|
88
|
+
*/
|
|
89
|
+
onActivity?: () => void;
|
|
81
90
|
}
|
|
82
91
|
export declare function streamEvents(options?: StreamEventsOptions): AsyncGenerator<SSEEvent>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as i, f as a, u as o } from "./action-dispatch-
|
|
1
|
+
import { h as e, mt as t, pt as n, tr as r } from "./useCurrentScreen-aHx9HH1m.js";
|
|
2
|
+
import { d as i, f as a, u as o } from "./action-dispatch-JcUrLFaW.js";
|
|
3
3
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/file-widgets/payload.ts
|
|
5
5
|
function u(e) {
|
|
@@ -75,9 +75,9 @@ function v(e) {
|
|
|
75
75
|
for (let n of Object.values(e)) for (let e of n.set ?? []) t.push(e.file_id);
|
|
76
76
|
return t;
|
|
77
77
|
}
|
|
78
|
-
function y(e,
|
|
78
|
+
function y(e, r) {
|
|
79
79
|
if (e.mode !== "rich_text_inline") return { clear: !0 };
|
|
80
|
-
let i =
|
|
80
|
+
let i = n(t(r));
|
|
81
81
|
return i.length === 0 ? { clear: !0 } : { set: i.map((e, t) => ({
|
|
82
82
|
file_id: e,
|
|
83
83
|
position: t
|
|
@@ -474,17 +474,17 @@ function K(e, t) {
|
|
|
474
474
|
let n = Q(e, t);
|
|
475
475
|
return n.kind === "file" ? n.file.mode !== "single" : n.kind === "field" && re.has(n.field.type);
|
|
476
476
|
}
|
|
477
|
-
function se(
|
|
478
|
-
if (!
|
|
479
|
-
let
|
|
480
|
-
for (let i of e
|
|
481
|
-
let i = L(
|
|
482
|
-
i && (
|
|
483
|
-
for (let
|
|
484
|
-
let i = L(
|
|
485
|
-
i && (
|
|
477
|
+
function se(e, t) {
|
|
478
|
+
if (!e) return [];
|
|
479
|
+
let n = new $();
|
|
480
|
+
for (let i of r(e)) n.add(i), t.addField(i, "identity");
|
|
481
|
+
let i = L(e, e.display.display_field, { explicit: !0 });
|
|
482
|
+
i && (n.add(i), t.addField(i, "display"), Z(e, i, t, "display"));
|
|
483
|
+
for (let r of ce(e.display.display_template)) {
|
|
484
|
+
let i = L(e, r, { explicit: !0 });
|
|
485
|
+
i && (n.add(i), t.addField(i, "display_template"), Z(e, i, t, "display_template"));
|
|
486
486
|
}
|
|
487
|
-
return
|
|
487
|
+
return n.values();
|
|
488
488
|
}
|
|
489
489
|
function ce(e) {
|
|
490
490
|
if (!e) return [];
|
|
@@ -548,11 +548,11 @@ function de(e, t, n) {
|
|
|
548
548
|
}
|
|
549
549
|
return r.values();
|
|
550
550
|
}
|
|
551
|
-
function fe(
|
|
552
|
-
let i = typeof n == "string" ?
|
|
553
|
-
for (let
|
|
554
|
-
let n = L(
|
|
555
|
-
n && (a.add(n), r.addField(n, "sort"), Z(
|
|
551
|
+
function fe(t, n, r) {
|
|
552
|
+
let i = typeof n == "string" ? e(n) : n ?? [], a = new $();
|
|
553
|
+
for (let e of i) {
|
|
554
|
+
let n = L(t, e.field, { explicit: !0 });
|
|
555
|
+
n && (a.add(n), r.addField(n, "sort"), Z(t, n, r, "sort"));
|
|
556
556
|
}
|
|
557
557
|
return a.values();
|
|
558
558
|
}
|
|
@@ -35,9 +35,11 @@ interface ListToolbarProps {
|
|
|
35
35
|
includeDeleted: boolean;
|
|
36
36
|
canViewDeleted: boolean;
|
|
37
37
|
onToggleDeleted: () => void;
|
|
38
|
-
/** The entity
|
|
39
|
-
* the
|
|
38
|
+
/** The entity is declared `realtime: true`, so the refresh control carries
|
|
39
|
+
* the indicator in every state. */
|
|
40
|
+
realtime: boolean;
|
|
41
|
+
/** The screen is current - useScreenIsLive. */
|
|
40
42
|
isLive: boolean;
|
|
41
43
|
}
|
|
42
|
-
export declare function ListToolbar({ screen, entity, entityCode, schema, screenCode, screenName, locale, isPhone, isCardsPresentation, sort, columns, views, query, selection, filters, searchValue, onSearchChange, onSaveView, page, perPage, includeDeleted, canViewDeleted, onToggleDeleted, isLive, }: ListToolbarProps): import("react").JSX.Element;
|
|
44
|
+
export declare function ListToolbar({ screen, entity, entityCode, schema, screenCode, screenName, locale, isPhone, isCardsPresentation, sort, columns, views, query, selection, filters, searchValue, onSearchChange, onSaveView, page, perPage, includeDeleted, canViewDeleted, onToggleDeleted, realtime, isLive, }: ListToolbarProps): import("react").JSX.Element;
|
|
43
45
|
export {};
|
|
@@ -39,11 +39,7 @@ export interface ListQueryResult {
|
|
|
39
39
|
error: unknown;
|
|
40
40
|
/** True while a load has been running long enough to be worth saying so. */
|
|
41
41
|
isLoadingStale: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Cancels this query's in-flight fetch and refetches it, resolving when both
|
|
44
|
-
* have settled - in that order. Returning nothing made every completion-based
|
|
45
|
-
* state silently instant, so a control that waited on it never waited.
|
|
46
|
-
*/
|
|
42
|
+
/** Refetches this list's window and count, resolving when both have settled. */
|
|
47
43
|
retry: () => Promise<void>;
|
|
48
44
|
/** The total, and how it was produced. Undefined while the count is in flight
|
|
49
45
|
* or after it failed - a caller degrades to the loaded row count. */
|