@declarion/react 0.41.0 → 0.42.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-x_3rA4Rm.js → DraggableChildrenTable-G4Sw1XAD.js} +43 -43
- package/dist-lib/{Grid-CKvYZx69.js → Grid-CXn-IK3H.js} +2 -2
- package/dist-lib/{LayoutRenderer-Bxvllfdl.js → LayoutRenderer-DX8pFS5A.js} +906 -861
- package/dist-lib/MarkdownRenderer-CreI9x2m.js +85 -0
- package/dist-lib/{RefreshControl-Cxzbbj3F.js → RefreshControl-DFh0-gCb.js} +58 -60
- package/dist-lib/{SmartDetailPage.impl-RDaFEH3Y.js → SmartDetailPage.impl-K6Jj1-9z.js} +545 -545
- package/dist-lib/{SmartRecordListPage.impl-BDdULatb.js → SmartRecordListPage.impl-DQW_uVfL.js} +250 -250
- package/dist-lib/hooks/usePageStateTtl.d.ts +1 -1
- package/dist-lib/index.js +1216 -1216
- package/dist-lib/lib/brand-tokens.d.ts +1 -1
- package/dist-lib/lib/evidence-verdict.d.ts +0 -1
- package/dist-lib/lib/safe-url.d.ts +14 -0
- package/dist-lib/{registry-DsZmw4hy.js → registry-r4hiflwC.js} +501 -501
- package/dist-lib/testing.js +42 -42
- package/dist-lib/types/api.d.ts +1 -1
- package/dist-lib/{useCurrentScreen-D6LPBFOi.js → useCurrentScreen-CpQjVmrT.js} +1320 -1286
- package/dist-lib/{useProperties-DiwFyA4b.js → useProperties-CULxrNT4.js} +43 -43
- package/dist-lib/{value-BudY9GCn.js → value-fUHxMV4r.js} +20 -20
- package/package.json +1 -1
- package/dist-lib/MarkdownRenderer-BvWJ8pzN.js +0 -98
package/dist-lib/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as e, Et as t, Ot as n, er as r, jt as i, r as a, t as o, yt as s } from "./useCurrentScreen-CpQjVmrT.js";
|
|
2
2
|
import { useState as c } from "react";
|
|
3
3
|
import { MemoryRouter as l } from "react-router";
|
|
4
4
|
import { QueryClient as u, QueryClientProvider as d } from "@tanstack/react-query";
|
|
@@ -70,7 +70,7 @@ function S() {
|
|
|
70
70
|
created_at: "2026-01-01T00:00:00Z",
|
|
71
71
|
updated_at: "2026-01-01T00:00:00Z"
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
i.getState().setUser(t, e);
|
|
74
74
|
}
|
|
75
75
|
function C(e) {
|
|
76
76
|
if (e === void 0) return { rows: [] };
|
|
@@ -85,39 +85,39 @@ function C(e) {
|
|
|
85
85
|
}
|
|
86
86
|
return e;
|
|
87
87
|
}
|
|
88
|
-
function w(
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
let
|
|
88
|
+
function w(r) {
|
|
89
|
+
let i = r.entityData ?? {};
|
|
90
|
+
n((e, t) => {
|
|
91
|
+
let n = i[e], r = C(n), a = r.meta?.per_page ?? 50, o = r.meta?.total ?? r.rows.length;
|
|
92
92
|
return t.count === "only" ? {
|
|
93
93
|
data: [],
|
|
94
94
|
meta: {
|
|
95
95
|
page: 1,
|
|
96
96
|
per_page: a,
|
|
97
97
|
total: o,
|
|
98
|
-
total_pages:
|
|
99
|
-
count_mode:
|
|
98
|
+
total_pages: r.meta?.total_pages ?? Math.max(1, Math.ceil(o / a)),
|
|
99
|
+
count_mode: r.meta?.count_mode ?? "exact"
|
|
100
100
|
}
|
|
101
101
|
} : {
|
|
102
|
-
data:
|
|
102
|
+
data: r.rows,
|
|
103
103
|
meta: {
|
|
104
|
-
page:
|
|
104
|
+
page: r.meta?.page ?? 1,
|
|
105
105
|
per_page: a,
|
|
106
|
-
has_more:
|
|
106
|
+
has_more: r.meta?.has_more ?? !1
|
|
107
107
|
},
|
|
108
|
-
...
|
|
108
|
+
...r.refs === void 0 ? {} : { $refs: r.refs }
|
|
109
109
|
};
|
|
110
110
|
});
|
|
111
|
-
let
|
|
112
|
-
|
|
113
|
-
let n = typeof t == "string" ? t :
|
|
111
|
+
let a = r.entityItems ?? {}, o = r.entityItemResponses ?? {};
|
|
112
|
+
e((e, t) => {
|
|
113
|
+
let n = typeof t == "string" ? t : s(t), r = o[e]?.[n];
|
|
114
114
|
if (r instanceof Error) throw r;
|
|
115
115
|
if (r !== void 0) return r;
|
|
116
|
-
let
|
|
117
|
-
if (
|
|
118
|
-
return { data:
|
|
116
|
+
let i = a[e]?.[n];
|
|
117
|
+
if (i instanceof Error) throw i;
|
|
118
|
+
return { data: i };
|
|
119
119
|
});
|
|
120
|
-
let c =
|
|
120
|
+
let c = r.actionResults ?? {};
|
|
121
121
|
t(async (e, t) => {
|
|
122
122
|
if (!(e in c)) throw Error(`renderWithDeclarion: no action result registered for "${e}" (seed it via actionResults)`);
|
|
123
123
|
let n = c[e];
|
|
@@ -125,52 +125,52 @@ function w(e) {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
function T() {
|
|
128
|
-
|
|
128
|
+
n(null), e(null), t(null), i.setState({
|
|
129
129
|
user: null,
|
|
130
130
|
isAuthenticated: !1,
|
|
131
131
|
activeTenant: null,
|
|
132
132
|
tenants: []
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
function E(
|
|
136
|
-
let
|
|
135
|
+
function E(e, t = {}) {
|
|
136
|
+
let n = new u({ defaultOptions: { queries: {
|
|
137
137
|
retry: !1,
|
|
138
138
|
gcTime: Infinity
|
|
139
139
|
} } });
|
|
140
|
-
S(),
|
|
141
|
-
let i =
|
|
142
|
-
code:
|
|
143
|
-
children:
|
|
144
|
-
}) :
|
|
145
|
-
client:
|
|
140
|
+
S(), n.setQueryData(["schema", !0], t.schema ?? g()), w(t);
|
|
141
|
+
let i = t.screenCode ? /* @__PURE__ */ p(o, {
|
|
142
|
+
code: t.screenCode,
|
|
143
|
+
children: e
|
|
144
|
+
}) : e, s = /* @__PURE__ */ m(d, {
|
|
145
|
+
client: n,
|
|
146
146
|
children: [/* @__PURE__ */ p(l, {
|
|
147
|
-
initialEntries: [
|
|
148
|
-
children: /* @__PURE__ */ p(
|
|
147
|
+
initialEntries: [t.route ?? "/"],
|
|
148
|
+
children: /* @__PURE__ */ p(a, { children: i })
|
|
149
149
|
}), /* @__PURE__ */ p(f, {})]
|
|
150
|
-
}), c = h(
|
|
151
|
-
viewportOverride:
|
|
152
|
-
children:
|
|
153
|
-
}) :
|
|
154
|
-
return Object.assign(c, { queryClient:
|
|
150
|
+
}), c = h(t.viewport ? /* @__PURE__ */ p(r, {
|
|
151
|
+
viewportOverride: t.viewport,
|
|
152
|
+
children: s
|
|
153
|
+
}) : s);
|
|
154
|
+
return Object.assign(c, { queryClient: n });
|
|
155
155
|
}
|
|
156
|
-
function D({ children: e, authenticated: t = !0, ...
|
|
157
|
-
let [
|
|
156
|
+
function D({ children: e, authenticated: t = !0, ...n }) {
|
|
157
|
+
let [r] = c(() => {
|
|
158
158
|
let e = new u({ defaultOptions: { queries: {
|
|
159
159
|
retry: !1,
|
|
160
160
|
gcTime: Infinity
|
|
161
161
|
} } });
|
|
162
|
-
return t ? (S(), e.setQueryData(["schema", !0],
|
|
162
|
+
return t ? (S(), e.setQueryData(["schema", !0], n.schema ?? g())) : i.setState({
|
|
163
163
|
user: null,
|
|
164
164
|
isAuthenticated: !1,
|
|
165
165
|
activeTenant: null,
|
|
166
166
|
tenants: []
|
|
167
|
-
}), w(
|
|
167
|
+
}), w(n), e;
|
|
168
168
|
});
|
|
169
169
|
return /* @__PURE__ */ m(d, {
|
|
170
|
-
client:
|
|
170
|
+
client: r,
|
|
171
171
|
children: [/* @__PURE__ */ p(l, {
|
|
172
|
-
initialEntries: [
|
|
173
|
-
children: /* @__PURE__ */ p(
|
|
172
|
+
initialEntries: [n.route ?? "/"],
|
|
173
|
+
children: /* @__PURE__ */ p(a, { children: e })
|
|
174
174
|
}), /* @__PURE__ */ p(f, {})]
|
|
175
175
|
});
|
|
176
176
|
}
|
package/dist-lib/types/api.d.ts
CHANGED
|
@@ -465,7 +465,7 @@ export interface V2PropertyInstance {
|
|
|
465
465
|
* row's `$evidence` key (the evidence satellite, mirroring `$statuses`). Read
|
|
466
466
|
* cheaply from the stored verification result - never a live re-verify. Mirrors
|
|
467
467
|
* the Go `evidence.RowVerdict`. `verdict` is one of: `verified`, `unverified`,
|
|
468
|
-
* `tampered`, `
|
|
468
|
+
* `tampered`, `indeterminate`, `outside_coverage`.
|
|
469
469
|
*/
|
|
470
470
|
export interface EvidenceVerdict {
|
|
471
471
|
verdict: string;
|