@declarion/react 0.56.0 → 0.59.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/README.md +0 -2
- package/dist-lib/AgentChatPanel.impl-DBH1Ff4G.js +1200 -0
- package/dist-lib/DetailAuditStrip-GNRA_eP5.js +289 -0
- package/dist-lib/{DraggableChildrenTable-BV5sb8Uo.js → DraggableChildrenTable-4RZC351U.js} +87 -86
- package/dist-lib/Grid-CQabaBLx.js +405 -0
- package/dist-lib/{LayoutRenderer-C9AH9cXf.js → LayoutRenderer-DGKWZKpW.js} +1000 -1114
- package/dist-lib/{ListCardsBody-DXcDg536.js → ListCardsBody-DfGmyNIu.js} +84 -84
- package/dist-lib/MarkdownRenderer-BDbzDv_y.js +87 -0
- package/dist-lib/{RefreshControl-CNtN8zSl.js → RefreshControl-Bhoib0ZA.js} +126 -155
- package/dist-lib/SmartDetailPage.impl-Ds2RGg6K.js +1565 -0
- package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +3046 -0
- package/dist-lib/{SmartRecordListPage.impl-Bkl9aZJ8.js → SmartRecordListPage.impl-C1FJLr80.js} +281 -280
- package/dist-lib/SortHeaderMenu-Cijxk4cX.js +107 -0
- package/dist-lib/action-dispatch-DY0c8U81.js +1967 -0
- package/dist-lib/api/client.d.ts +5 -0
- package/dist-lib/api/data.d.ts +2 -4
- package/dist-lib/api/entities.d.ts +8 -15
- package/dist-lib/api/events.d.ts +3 -3
- package/dist-lib/cardProjection-Bkl2SSYz.js +499 -0
- package/dist-lib/components/actions/ResponsiveActionBar.d.ts +17 -16
- package/dist-lib/components/agents/AgentChatPanel.d.ts +3 -13
- package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +14 -0
- package/dist-lib/components/agents/AgentPicker.d.ts +1 -2
- package/dist-lib/components/chrome/PageShell.d.ts +7 -0
- package/dist-lib/components/chrome/RecordHeader.d.ts +1 -2
- package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -2
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -2
- package/dist-lib/components/detail-layout/blockMeta.d.ts +2 -1
- package/dist-lib/components/fields/BoolField.d.ts +1 -1
- package/dist-lib/components/fields/EnumField.d.ts +1 -1
- package/dist-lib/components/fields/IntArrayField.d.ts +1 -1
- package/dist-lib/components/fields/MultilangArrayField.d.ts +2 -0
- package/dist-lib/components/fields/MultilangField.d.ts +1 -1
- package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
- package/dist-lib/components/fields/NumberField.d.ts +1 -1
- package/dist-lib/components/fields/PasswordField.d.ts +1 -1
- package/dist-lib/components/fields/RefCombobox.d.ts +1 -1
- package/dist-lib/components/fields/SecretField.d.ts +1 -1
- package/dist-lib/components/fields/StringArrayField.d.ts +1 -1
- package/dist-lib/components/fields/TimestampField.d.ts +1 -1
- package/dist-lib/components/fields/cells/registry.d.ts +2 -1
- package/dist-lib/components/fields/index.d.ts +2 -1
- package/dist-lib/components/fields/langMap.d.ts +2 -0
- package/dist-lib/components/fields/secretValue.d.ts +2 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +3 -0
- package/dist-lib/components/file-widgets/UploadFailureText.d.ts +4 -0
- package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +4 -3
- package/dist-lib/components/file-widgets/types.d.ts +1 -0
- package/dist-lib/components/file-widgets/upload.d.ts +18 -3
- package/dist-lib/components/filters/filter-op-label.d.ts +3 -0
- package/dist-lib/components/layout/ImpersonationBanner.d.ts +1 -1
- package/dist-lib/components/layout/ImpersonationFrame.d.ts +1 -1
- package/dist-lib/components/layout/Layout.d.ts +2 -1
- package/dist-lib/components/layout/Sidebar.d.ts +2 -1
- package/dist-lib/components/layout/TenantChip.d.ts +1 -1
- package/dist-lib/components/list/ViewSwitcher.d.ts +4 -2
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -2
- package/dist-lib/components/pages/ExportMenu.d.ts +3 -5
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -2
- package/dist-lib/components/pages/auth/AuthShell.d.ts +4 -31
- package/dist-lib/components/pages/exportRequest.d.ts +4 -6
- package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +8 -0
- package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -2
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -1
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +2 -2
- package/dist-lib/components/pages/list/ListHeader.d.ts +2 -2
- package/dist-lib/components/pages/list/ListNoRows.d.ts +4 -5
- package/dist-lib/components/pages/list/ListToolbar.d.ts +3 -2
- package/dist-lib/components/pages/list/ListUrlBanner.d.ts +10 -0
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +2 -4
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -2
- package/dist-lib/components/pages/list/columns.d.ts +2 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +2 -1
- package/dist-lib/components/pages/list/useActiveView.d.ts +38 -0
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +6 -5
- package/dist-lib/components/pages/list/useListQuery.d.ts +4 -4
- package/dist-lib/components/pages/list/useListSort.d.ts +5 -4
- package/dist-lib/components/pages/list/useListViews.d.ts +18 -8
- package/dist-lib/components/pages/list/useRowMenu.d.ts +2 -3
- package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
- package/dist-lib/components/params/ParamsBlock.d.ts +1 -13
- package/dist-lib/components/params/param-editors.d.ts +3 -11
- package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -2
- package/dist-lib/components/shared/DynamicIcon.d.ts +2 -2
- package/dist-lib/components/shared/ErrorBoundary.d.ts +1 -1
- package/dist-lib/components/shared/LoadingSkeleton.d.ts +1 -0
- package/dist-lib/components/shared/LucideIcon.d.ts +1 -1
- package/dist-lib/components/shared/useOwnRefresh.d.ts +1 -1
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/theme.d.ts +1 -1
- package/dist-lib/embed/useEmbedNavigate.d.ts +1 -1
- package/dist-lib/failure-v-uGSpbX.js +158 -0
- package/dist-lib/{field-classification-D6xQYn-h.js → field-classification-C28XE-_P.js} +514 -307
- package/dist-lib/format-count-DA4wmmWR.js +1771 -0
- package/dist-lib/hooks/useEntityData.d.ts +1 -1
- package/dist-lib/hooks/useFilters.d.ts +7 -5
- package/dist-lib/hooks/useLanguage.d.ts +4 -0
- package/dist-lib/hooks/useParams.d.ts +4 -51
- package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +3 -3
- package/dist-lib/hooks/useTabTitle.d.ts +2 -0
- package/dist-lib/hooks/useText.d.ts +3 -3
- package/dist-lib/hooks/useVersionWatcher.d.ts +1 -1
- package/dist-lib/hooks/useViews.d.ts +20 -0
- package/dist-lib/index.d.ts +8 -7
- package/dist-lib/index.js +2716 -5795
- package/dist-lib/lib/action-dispatch.d.ts +2 -1
- package/dist-lib/lib/actions.d.ts +30 -42
- package/dist-lib/lib/anchor.d.ts +3 -4
- package/dist-lib/lib/decimal-text.d.ts +1 -0
- package/dist-lib/lib/document-templates.d.ts +1 -2
- package/dist-lib/lib/download.d.ts +2 -1
- package/dist-lib/lib/evidence-verdict.d.ts +2 -1
- package/dist-lib/lib/failure.d.ts +2 -0
- package/dist-lib/lib/field-classification.d.ts +3 -3
- package/dist-lib/lib/filters.d.ts +18 -2
- package/dist-lib/lib/format-count.d.ts +8 -7
- package/dist-lib/lib/language.d.ts +19 -0
- package/dist-lib/lib/mass-edit.d.ts +2 -1
- package/dist-lib/lib/realtime-query-keys.d.ts +1 -1
- package/dist-lib/lib/realtime-reconcile.d.ts +3 -4
- package/dist-lib/lib/screen-back.d.ts +4 -6
- package/dist-lib/lib/sort.d.ts +9 -9
- package/dist-lib/lib/timestamp.d.ts +5 -7
- package/dist-lib/lib/ui-actions.d.ts +2 -1
- package/dist-lib/peekDraftStore-D-cTbiIr.js +199 -0
- package/dist-lib/registry-Cb3W-czW.js +1950 -0
- package/dist-lib/safe-url-oSJw5pzO.js +34 -0
- package/dist-lib/stores/icon-registry.d.ts +2 -2
- package/dist-lib/stores/list-layout.d.ts +3 -4
- package/dist-lib/stores/realtime.d.ts +1 -1
- package/dist-lib/stores/tabs.d.ts +3 -2
- package/dist-lib/testing.d.ts +6 -0
- package/dist-lib/testing.js +98 -76
- package/dist-lib/types/api.d.ts +7 -8
- package/dist-lib/types/fieldType.d.ts +1 -1
- package/dist-lib/types/files.d.ts +4 -4
- package/dist-lib/types/schema.d.ts +44 -50
- package/dist-lib/useAgentConversation-D97IqE-J.js +623 -0
- package/dist-lib/{useCurrentScreen-CzwzQpoW.js → useCurrentScreen-BL5NZFCw.js} +2777 -3768
- package/dist-lib/useListQuery-BG1GyKtJ.js +103 -0
- package/dist-lib/useProperties-4Lg3odrt.js +83 -0
- package/dist-lib/{useTabSearchMirror-C39U85cg.js → useTabSearchMirror-ZVLlINBX.js} +49 -51
- package/dist-lib/useText-BFDCTUSo.js +952 -0
- package/dist-lib/{value-Bo8C8WMU.js → value-By1-WJ8J.js} +74 -76
- package/dist-lib/vite/fingerprint-plugin.d.ts +2 -3
- package/package.json +13 -12
- package/dist-lib/Grid-DWgUPuZ3.js +0 -404
- package/dist-lib/MarkdownRenderer-CcSFc2N3.js +0 -85
- package/dist-lib/RecordIdBadge-CGxPR-8q.js +0 -24
- package/dist-lib/SmartDetailPage.impl-lskCd-WG.js +0 -1846
- package/dist-lib/SmartListPage.impl-CrGbdzyK.js +0 -2854
- package/dist-lib/SortHeaderMenu-SYSAaqQJ.js +0 -106
- package/dist-lib/action-dispatch-CR4ajBtT.js +0 -1985
- package/dist-lib/cardProjection-CW5RIMko.js +0 -699
- package/dist-lib/components/pages/home/HomeStub.d.ts +0 -6
- package/dist-lib/components/pages/jobs/Jobs.d.ts +0 -1
- package/dist-lib/components/pages/pipeline/Pipeline.d.ts +0 -1
- package/dist-lib/format-count-Dobmi-Ji.js +0 -1551
- package/dist-lib/hooks/useUserLocale.d.ts +0 -1
- package/dist-lib/lib/messages.d.ts +0 -12
- package/dist-lib/peekDraftStore-5wQ7lq_V.js +0 -194
- package/dist-lib/registry-CjgUaF7C.js +0 -1768
- package/dist-lib/useListQuery-D7Hr5WM1.js +0 -96
- package/dist-lib/useProperties-CqtCzFCr.js +0 -81
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCallback as
|
|
1
|
+
import { H as e, K as t, U as n, at as r, c as i } from "./useText-BFDCTUSo.js";
|
|
2
|
+
import { useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
|
|
3
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
3
4
|
//#region src/embed/file-src.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
5
|
+
var f = "/api/files";
|
|
6
|
+
function p(e) {
|
|
6
7
|
if (typeof e != "object" || !e) return !1;
|
|
7
8
|
let t = e;
|
|
8
9
|
return typeof t.url == "string" && typeof t.proxy == "boolean";
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
+
function m(e, t) {
|
|
11
12
|
let n = encodeURIComponent(e);
|
|
12
|
-
return typeof t == "object" ? `${
|
|
13
|
+
return typeof t == "object" ? `${f}/${n}/derived/${encodeURIComponent(t.derivation)}/url` : `${f}/${n}/url`;
|
|
13
14
|
}
|
|
14
|
-
var
|
|
15
|
+
var h = class extends Error {
|
|
15
16
|
fileId;
|
|
16
17
|
key;
|
|
17
18
|
constructor(e, t) {
|
|
18
19
|
super(`derivation "${t}" of file ${e} is still generating`), this.fileId = e, this.key = t, this.name = "DerivationPendingError";
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
|
-
function
|
|
22
|
+
function g(e, t) {
|
|
22
23
|
return {
|
|
23
24
|
method: "GET",
|
|
24
25
|
credentials: "omit",
|
|
@@ -26,29 +27,29 @@ function f(e, t) {
|
|
|
26
27
|
signal: t
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
function
|
|
30
|
+
function _(e) {
|
|
30
31
|
return `${e}${e.includes("?") ? "&" : "?"}disposition=attachment`;
|
|
31
32
|
}
|
|
32
|
-
async function
|
|
33
|
-
let a = await e(), o = await fetch(t,
|
|
33
|
+
async function v(t, i) {
|
|
34
|
+
let a = await e(), o = await fetch(t, g(a, i));
|
|
34
35
|
if (o.status !== 401) return o;
|
|
35
|
-
await
|
|
36
|
+
await r(o), n();
|
|
36
37
|
let s = await e();
|
|
37
|
-
return fetch(t,
|
|
38
|
+
return fetch(t, g(s, i));
|
|
38
39
|
}
|
|
39
|
-
async function
|
|
40
|
+
async function y(e, n, r) {
|
|
40
41
|
if (!t()) throw Error("resolveEmbedFileSrc called outside embed token mode");
|
|
41
|
-
let i = await m(
|
|
42
|
-
if (i.status === 202 && typeof n == "object") throw new
|
|
42
|
+
let i = await v(m(e, n), r);
|
|
43
|
+
if (i.status === 202 && typeof n == "object") throw new h(e, n.derivation);
|
|
43
44
|
if (!i.ok) throw Error(`embed file url request failed: ${i.status} ${i.statusText}`);
|
|
44
45
|
let a = await i.json();
|
|
45
|
-
if (!
|
|
46
|
+
if (!p(a)) throw Error("embed file url response is malformed");
|
|
46
47
|
if (!a.proxy) return {
|
|
47
48
|
url: a.url,
|
|
48
49
|
kind: "direct"
|
|
49
50
|
};
|
|
50
51
|
if (!a.url.startsWith("/api/files/")) throw Error(`embed file proxy: refusing non-files-route URL ${JSON.stringify(a.url)}`);
|
|
51
|
-
let o = await
|
|
52
|
+
let o = await v(n === "download" ? _(a.url) : a.url, r);
|
|
52
53
|
if (!o.ok) throw Error(`embed file proxy fetch failed: ${o.status} ${o.statusText}`);
|
|
53
54
|
let s = await o.blob();
|
|
54
55
|
return {
|
|
@@ -57,30 +58,27 @@ async function h(e, n, r) {
|
|
|
57
58
|
};
|
|
58
59
|
}
|
|
59
60
|
//#endregion
|
|
60
|
-
//#region src/components/file-widgets/
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
for (let n of t) {
|
|
67
|
-
if (e[n]) return e[n];
|
|
68
|
-
let t = n.split("-")[0];
|
|
69
|
-
if (t && e[t]) return e[t];
|
|
70
|
-
}
|
|
71
|
-
for (let t of Object.values(e)) if (typeof t == "string" && t.length > 0) return t;
|
|
61
|
+
//#region src/components/file-widgets/UploadFailureText.tsx
|
|
62
|
+
function b({ failure: e }) {
|
|
63
|
+
return /* @__PURE__ */ d(l, { children: [e.message, e.detail && /* @__PURE__ */ d(l, { children: [" ", /* @__PURE__ */ u("span", {
|
|
64
|
+
className: "opacity-80",
|
|
65
|
+
children: e.detail
|
|
66
|
+
})] })] });
|
|
72
67
|
}
|
|
73
|
-
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/components/file-widgets/helpers.ts
|
|
70
|
+
var x = ["thumb_200", "thumb_300"];
|
|
71
|
+
function S(e, t, n, r, a) {
|
|
74
72
|
if (t) return t;
|
|
75
|
-
let
|
|
76
|
-
if (typeof
|
|
77
|
-
if (
|
|
78
|
-
let e =
|
|
79
|
-
if (
|
|
73
|
+
let o = e?.metadata?.alt_text;
|
|
74
|
+
if (typeof o == "string" && o.length > 0) return o;
|
|
75
|
+
if (o && typeof o == "object" && !Array.isArray(o)) {
|
|
76
|
+
let e = Object.fromEntries(Object.entries(o).filter((e) => e[0].length > 0 && typeof e[1] == "string")), t = i(e, r, a);
|
|
77
|
+
if (t) return t;
|
|
80
78
|
}
|
|
81
79
|
return n;
|
|
82
80
|
}
|
|
83
|
-
var
|
|
81
|
+
var C = /* @__PURE__ */ new Set([
|
|
84
82
|
"image/png",
|
|
85
83
|
"image/jpeg",
|
|
86
84
|
"image/webp",
|
|
@@ -88,30 +86,30 @@ var b = /* @__PURE__ */ new Set([
|
|
|
88
86
|
"image/avif",
|
|
89
87
|
"application/pdf"
|
|
90
88
|
]);
|
|
91
|
-
function
|
|
89
|
+
function w(e) {
|
|
92
90
|
let t = e.content_type?.toLowerCase().split(";")[0]?.trim() ?? "";
|
|
93
|
-
return
|
|
91
|
+
return C.has(t);
|
|
94
92
|
}
|
|
95
|
-
function
|
|
93
|
+
function T(e) {
|
|
96
94
|
return e.url ?? e.presigned_url;
|
|
97
95
|
}
|
|
98
|
-
function
|
|
99
|
-
return e.url ?
|
|
96
|
+
function E(e) {
|
|
97
|
+
return e.url ? k(e.url, "attachment") : e.presigned_url;
|
|
100
98
|
}
|
|
101
|
-
function
|
|
99
|
+
function D(e, t) {
|
|
102
100
|
if (!e) return;
|
|
103
101
|
let n = e.derivations ?? {};
|
|
104
102
|
if (t && n[t]) return n[t];
|
|
105
|
-
for (let e of
|
|
103
|
+
for (let e of x) if (n[e]) return n[e];
|
|
106
104
|
return e.url ?? e.presigned_url;
|
|
107
105
|
}
|
|
108
|
-
function
|
|
106
|
+
function O(e, t) {
|
|
109
107
|
let n = e?.derivations ?? {};
|
|
110
108
|
if (t && n[t]) return { derivation: t };
|
|
111
|
-
for (let e of
|
|
109
|
+
for (let e of x) if (n[e]) return { derivation: e };
|
|
112
110
|
return "preview";
|
|
113
111
|
}
|
|
114
|
-
function
|
|
112
|
+
function k(e, t) {
|
|
115
113
|
try {
|
|
116
114
|
let n = new URL(e, typeof window < "u" ? window.location.origin : "http://localhost");
|
|
117
115
|
return n.searchParams.set("disposition", t), /^https?:\/\//i.test(e) ? n.toString() : `${n.pathname}${n.search}${n.hash}`;
|
|
@@ -119,7 +117,7 @@ function E(e, t) {
|
|
|
119
117
|
return `${e}${e.includes("?") ? "&" : "?"}disposition=${t}`;
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
|
-
function
|
|
120
|
+
function A(e) {
|
|
123
121
|
let t = e?.metadata?.focal_point;
|
|
124
122
|
if (!t || typeof t != "object" || Array.isArray(t)) return null;
|
|
125
123
|
let n = t, r = typeof n.x == "number" ? n.x : NaN, i = typeof n.y == "number" ? n.y : NaN;
|
|
@@ -128,10 +126,10 @@ function D(e) {
|
|
|
128
126
|
y: i
|
|
129
127
|
};
|
|
130
128
|
}
|
|
131
|
-
function
|
|
129
|
+
function j(e) {
|
|
132
130
|
if (e) return `${e.x * 100}% ${e.y * 100}%`;
|
|
133
131
|
}
|
|
134
|
-
function
|
|
132
|
+
function M(e, t) {
|
|
135
133
|
return {
|
|
136
134
|
...e,
|
|
137
135
|
metadata: {
|
|
@@ -142,69 +140,69 @@ function k(e, t) {
|
|
|
142
140
|
}
|
|
143
141
|
//#endregion
|
|
144
142
|
//#region src/components/file-widgets/useEmbedFileSrc.ts
|
|
145
|
-
function
|
|
143
|
+
function N(e) {
|
|
146
144
|
return typeof e == "object" ? `derivation:${e.derivation}` : e;
|
|
147
145
|
}
|
|
148
|
-
function
|
|
146
|
+
function P(e) {
|
|
149
147
|
return e.startsWith("derivation:") ? { derivation: e.slice(11) } : e === "download" ? "download" : "preview";
|
|
150
148
|
}
|
|
151
|
-
function
|
|
152
|
-
let i =
|
|
153
|
-
return
|
|
154
|
-
t() ||
|
|
155
|
-
}, [r]),
|
|
149
|
+
function F(e, n, r) {
|
|
150
|
+
let i = N(n), [a, s] = c(() => t() ? void 0 : r);
|
|
151
|
+
return o(() => {
|
|
152
|
+
t() || s(r);
|
|
153
|
+
}, [r]), o(() => {
|
|
156
154
|
if (!t()) return;
|
|
157
155
|
if (!e) {
|
|
158
|
-
|
|
156
|
+
s(void 0);
|
|
159
157
|
return;
|
|
160
158
|
}
|
|
161
159
|
let n = null, r = !1, a = new AbortController();
|
|
162
|
-
return
|
|
160
|
+
return s(void 0), y(e, P(i), a.signal).then((e) => {
|
|
163
161
|
if (r) {
|
|
164
162
|
e.kind === "blob" && URL.revokeObjectURL(e.url);
|
|
165
163
|
return;
|
|
166
164
|
}
|
|
167
|
-
e.kind === "blob" && (n = e.url),
|
|
165
|
+
e.kind === "blob" && (n = e.url), s(e.url);
|
|
168
166
|
}).catch((e) => {
|
|
169
167
|
if (!r) {
|
|
170
|
-
if (e instanceof
|
|
171
|
-
|
|
168
|
+
if (e instanceof h) {
|
|
169
|
+
s(void 0);
|
|
172
170
|
return;
|
|
173
171
|
}
|
|
174
|
-
e instanceof DOMException && e.name === "AbortError" || (console.error("[declarion-embed] file src resolution failed:", e),
|
|
172
|
+
e instanceof DOMException && e.name === "AbortError" || (console.error("[declarion-embed] file src resolution failed:", e), s(void 0));
|
|
175
173
|
}
|
|
176
174
|
}), () => {
|
|
177
175
|
r = !0, a.abort(), n && URL.revokeObjectURL(n);
|
|
178
176
|
};
|
|
179
|
-
}, [e, i]),
|
|
177
|
+
}, [e, i]), a;
|
|
180
178
|
}
|
|
181
|
-
function
|
|
182
|
-
let e =
|
|
183
|
-
return
|
|
179
|
+
function I() {
|
|
180
|
+
let e = s([]);
|
|
181
|
+
return o(() => () => {
|
|
184
182
|
for (let t of e.current) URL.revokeObjectURL(t);
|
|
185
183
|
e.current = [];
|
|
186
|
-
}, []), { open:
|
|
184
|
+
}, []), { open: a((n, r, i) => {
|
|
187
185
|
if (!t()) {
|
|
188
186
|
i && window.open(i, "_blank", "noopener");
|
|
189
187
|
return;
|
|
190
188
|
}
|
|
191
|
-
n &&
|
|
189
|
+
n && y(n, r).then((t) => {
|
|
192
190
|
t.kind === "blob" && e.current.push(t.url), window.open(t.url, "_blank", "noopener");
|
|
193
191
|
}).catch((e) => {
|
|
194
|
-
e instanceof
|
|
192
|
+
e instanceof h || console.error("[declarion-embed] file open failed:", e);
|
|
195
193
|
});
|
|
196
194
|
}, []) };
|
|
197
195
|
}
|
|
198
196
|
//#endregion
|
|
199
197
|
//#region src/components/file-widgets/value.ts
|
|
200
|
-
function
|
|
198
|
+
function L(e) {
|
|
201
199
|
return typeof e == "object" && !!e && typeof e.id == "string";
|
|
202
200
|
}
|
|
203
|
-
function
|
|
204
|
-
return e ? Array.isArray(e) ? e.find(
|
|
201
|
+
function R(e) {
|
|
202
|
+
return e ? Array.isArray(e) ? e.find(L) ?? null : L(e) ? e : null : null;
|
|
205
203
|
}
|
|
206
|
-
function
|
|
207
|
-
return e ? Array.isArray(e) ? e.filter(
|
|
204
|
+
function z(e) {
|
|
205
|
+
return e ? Array.isArray(e) ? e.filter(L) : L(e) ? [e] : [] : [];
|
|
208
206
|
}
|
|
209
207
|
//#endregion
|
|
210
|
-
export {
|
|
208
|
+
export { w as a, D as c, A as d, S as f, F as i, O as l, b as m, R as n, E as o, M as p, I as r, j as s, z as t, T as u };
|
|
@@ -8,9 +8,8 @@ export interface DeclarionFingerprintPluginOptions {
|
|
|
8
8
|
assetsDir?: string;
|
|
9
9
|
/**
|
|
10
10
|
* Filename of the emitted fingerprint, written next to `index.html`.
|
|
11
|
-
* Defaults to "bundle-fingerprint.txt".
|
|
12
|
-
*
|
|
13
|
-
* customize.
|
|
11
|
+
* Defaults to "bundle-fingerprint.txt". The server reads the same name,
|
|
12
|
+
* so a custom name must match on the server side too.
|
|
14
13
|
*/
|
|
15
14
|
filename?: string;
|
|
16
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@declarion/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React SDK for Declarion, the schema-driven business apps platform.",
|
|
@@ -65,24 +65,24 @@
|
|
|
65
65
|
"@radix-ui/react-select": "^2.3.7",
|
|
66
66
|
"@radix-ui/react-separator": "^1.1.15",
|
|
67
67
|
"@radix-ui/react-slot": "^1.3.3",
|
|
68
|
-
"@tanstack/react-query": "^5.
|
|
68
|
+
"@tanstack/react-query": "^5.103.1",
|
|
69
69
|
"@tanstack/react-table": "^9.2.4",
|
|
70
70
|
"@tanstack/react-virtual": "^3.14.13",
|
|
71
71
|
"class-variance-authority": "^0.7.1",
|
|
72
72
|
"clsx": "^2.1.1",
|
|
73
73
|
"date-fns": "^4.4.0",
|
|
74
|
-
"lucide-react": "^1.
|
|
74
|
+
"lucide-react": "^1.47.0",
|
|
75
75
|
"mdast-util-to-string": "^4.0.0",
|
|
76
76
|
"monaco-editor": "^0.56.0",
|
|
77
77
|
"react-markdown": "^10.1.0",
|
|
78
|
-
"react-router": "^8.
|
|
78
|
+
"react-router": "^8.4.0",
|
|
79
79
|
"react-textarea-autosize": "^8.5.9",
|
|
80
80
|
"recharts": "^3.10.1",
|
|
81
81
|
"remark-breaks": "^4.0.0",
|
|
82
82
|
"remark-gfm": "^4.0.1",
|
|
83
83
|
"remark-parse": "^11.0.0",
|
|
84
84
|
"sonner": "^2.0.8",
|
|
85
|
-
"tailwind-merge": "^3.
|
|
85
|
+
"tailwind-merge": "^3.7.0",
|
|
86
86
|
"unified": "^11.0.5",
|
|
87
87
|
"vanilla-jsoneditor": "^3.13.0",
|
|
88
88
|
"zustand": "^5.0.15"
|
|
@@ -91,28 +91,29 @@
|
|
|
91
91
|
"@axe-core/react": "^4.13.0",
|
|
92
92
|
"@tailwindcss/typography": "^0.5.20",
|
|
93
93
|
"@tailwindcss/vite": "^4.3.3",
|
|
94
|
-
"@testing-library/dom": "^10.4.
|
|
94
|
+
"@testing-library/dom": "^10.4.2",
|
|
95
95
|
"@testing-library/jest-dom": "^7.0.1",
|
|
96
96
|
"@testing-library/react": "^16.3.3",
|
|
97
97
|
"@testing-library/user-event": "^14.6.7",
|
|
98
98
|
"@types/react": "^19.3.0",
|
|
99
99
|
"@types/react-dom": "^19.3.0",
|
|
100
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
100
101
|
"@vitejs/plugin-react": "^6.1.1",
|
|
101
|
-
"@vitest/coverage-v8": "^5.0.
|
|
102
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
102
103
|
"axe-core": "^4.13.0",
|
|
103
|
-
"eslint": "^10.
|
|
104
|
+
"eslint": "^10.11.0",
|
|
104
105
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
105
|
-
"jsdom": "^30.0
|
|
106
|
+
"jsdom": "^30.1.0",
|
|
106
107
|
"msw": "^2.15.0",
|
|
107
108
|
"publint": "^0.3.24",
|
|
108
109
|
"react": "^19.3.0",
|
|
109
110
|
"react-dom": "^19.3.0",
|
|
110
111
|
"tailwindcss": "^4.3.3",
|
|
111
112
|
"tsc-alias": "^1.9.5",
|
|
112
|
-
"typescript": "
|
|
113
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
113
114
|
"typescript-eslint": "^8.70.0",
|
|
114
115
|
"vite": "^8.3.0",
|
|
115
|
-
"vitest": "^5.0.
|
|
116
|
+
"vitest": "^5.0.1"
|
|
116
117
|
},
|
|
117
118
|
"scripts": {
|
|
118
119
|
"dev": "vite",
|
|
@@ -123,7 +124,7 @@
|
|
|
123
124
|
"check:pkg": "publint run",
|
|
124
125
|
"lint": "tsc --noEmit && eslint src --max-warnings=0",
|
|
125
126
|
"test": "vitest run",
|
|
126
|
-
"test:coverage": "vitest run --coverage",
|
|
127
|
+
"test:coverage": "vitest run --coverage --project sdk",
|
|
127
128
|
"preview": "vite preview"
|
|
128
129
|
}
|
|
129
130
|
}
|