@declarion/react 0.32.0 → 0.35.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/README.md +1 -1
- package/dist-lib/{ActionRunner-CaSrGpBi.js → ActionRunner-Bkkb_YMa.js} +1332 -1310
- package/dist-lib/{DraggableChildrenTable-CAHg7paQ.js → DraggableChildrenTable-TNni9y0Q.js} +55 -55
- package/dist-lib/DynamicIcon-BWO6QtNF.js +261 -0
- package/dist-lib/{Grid-DDbBhqcl.js → Grid-DOtBLx3n.js} +2 -2
- package/dist-lib/{JsonEditor-KelPV-OQ.js → JsonEditor-DoNmyrYd.js} +2 -2
- package/dist-lib/{LayoutRenderer-CelsqsZ6.js → LayoutRenderer-CMuVgKev.js} +748 -746
- package/dist-lib/{MarkdownRenderer-DThy2ixe.js → MarkdownRenderer-DWOlvx8k.js} +1 -1
- package/dist-lib/{MonacoJson-DVjwsaBK.js → MonacoJson-BfpzZ1iT.js} +1 -1
- package/dist-lib/RefreshControl-CgU8mNEp.js +835 -0
- package/dist-lib/SmartDetailPage.impl-Bjl7EFzU.js +1774 -0
- package/dist-lib/{SmartRecordListPage.impl-BKIpTNK7.js → SmartRecordListPage.impl-D2eE-g5J.js} +91 -91
- package/dist-lib/assets/OFL-Inter.txt +93 -0
- package/dist-lib/assets/OFL-JetBrainsMono.txt +93 -0
- package/dist-lib/assets/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist-lib/assets/inter-latin-wght-normal.woff2 +0 -0
- package/dist-lib/assets/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist-lib/assets/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist-lib/components/fields/cells/factories/host-icons.d.ts +9 -1
- package/dist-lib/components/layout/TopBar.d.ts +2 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +22 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +42 -0
- package/dist-lib/components/pages/list/DataCell.d.ts +1 -2
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -11
- package/dist-lib/components/primitives/Btn.d.ts +1 -1
- package/dist-lib/components/primitives/Icons.d.ts +1 -0
- package/dist-lib/components/primitives/Tooltip.d.ts +30 -0
- package/dist-lib/components/primitives/index.d.ts +2 -0
- package/dist-lib/components/shared/ActionResultDialog.d.ts +4 -0
- package/dist-lib/components/shared/RecordHeader.d.ts +2 -1
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +9 -1
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/theme.d.ts +8 -8
- package/dist-lib/hooks/useBrandingChrome.d.ts +28 -2
- package/dist-lib/hooks/useResponsiveMode.d.ts +17 -1
- package/dist-lib/icons.js +1 -1
- package/dist-lib/index.js +2430 -2441
- package/dist-lib/lib/brand-tokens.d.ts +43 -0
- package/dist-lib/lib/document-templates.d.ts +12 -0
- package/dist-lib/lib/download.d.ts +20 -0
- package/dist-lib/lib/html-state.d.ts +11 -0
- package/dist-lib/lib/record-documents-key.d.ts +1 -0
- package/dist-lib/lib/versionTracker.d.ts +6 -0
- package/dist-lib/{registry-KQyyL5Gt.js → registry-GTwsJEYp.js} +1469 -1343
- package/dist-lib/stores/page-state.d.ts +1 -1
- package/dist-lib/stores/preferences.d.ts +37 -0
- package/dist-lib/testing.js +5 -5
- package/dist-lib/types/api.d.ts +95 -23
- package/dist-lib/types/schema.d.ts +32 -1
- package/dist-lib/{useProperties-D74hyWIa.js → useProperties-oNGJ7HwM.js} +67 -67
- package/dist-lib/{value-BfXXl5EE.js → value-DNs5L0Ad.js} +82 -82
- package/dist-lib/vite/fingerprint-plugin.d.ts +1 -1
- package/package.json +17 -16
- package/dist-lib/DynamicIcon-DCRdxxZ7.js +0 -260
- package/dist-lib/RefreshControl-CorluL6r.js +0 -582
- package/dist-lib/SmartDetailPage.impl-USIxbl-8.js +0 -1532
- package/dist-lib/stores/appearance.d.ts +0 -37
|
@@ -1,11 +1,68 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Lt as e, Rt as t, Vt as n } from "./ActionRunner-Bkkb_YMa.js";
|
|
2
2
|
import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
3
|
+
//#region src/embed/file-src.ts
|
|
4
|
+
var s = "/api/files";
|
|
5
|
+
function c(e) {
|
|
6
|
+
if (typeof e != "object" || !e) return !1;
|
|
7
|
+
let t = e;
|
|
8
|
+
return typeof t.url == "string" && typeof t.proxy == "boolean";
|
|
9
|
+
}
|
|
10
|
+
function l(e, t) {
|
|
11
|
+
let n = encodeURIComponent(e);
|
|
12
|
+
return typeof t == "object" ? `${s}/${n}/derived/${encodeURIComponent(t.derivation)}/url` : `${s}/${n}/url`;
|
|
13
|
+
}
|
|
14
|
+
var u = class extends Error {
|
|
15
|
+
fileId;
|
|
16
|
+
key;
|
|
17
|
+
constructor(e, t) {
|
|
18
|
+
super(`derivation "${t}" of file ${e} is still generating`), this.fileId = e, this.key = t, this.name = "DerivationPendingError";
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function d(e, t) {
|
|
22
|
+
return {
|
|
23
|
+
method: "GET",
|
|
24
|
+
credentials: "omit",
|
|
25
|
+
headers: { Authorization: `Bearer ${e}` },
|
|
26
|
+
signal: t
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function f(e) {
|
|
30
|
+
return `${e}${e.includes("?") ? "&" : "?"}disposition=attachment`;
|
|
31
|
+
}
|
|
32
|
+
async function p(n, r) {
|
|
33
|
+
let i = await e(), a = await fetch(n, d(i, r));
|
|
34
|
+
if (a.status !== 401) return a;
|
|
35
|
+
t();
|
|
36
|
+
let o = await e();
|
|
37
|
+
return fetch(n, d(o, r));
|
|
38
|
+
}
|
|
39
|
+
async function m(e, t, r) {
|
|
40
|
+
if (!n()) throw Error("resolveEmbedFileSrc called outside embed token mode");
|
|
41
|
+
let i = await p(l(e, t), r);
|
|
42
|
+
if (i.status === 202 && typeof t == "object") throw new u(e, t.derivation);
|
|
43
|
+
if (!i.ok) throw Error(`embed file url request failed: ${i.status} ${i.statusText}`);
|
|
44
|
+
let a = await i.json();
|
|
45
|
+
if (!c(a)) throw Error("embed file url response is malformed");
|
|
46
|
+
if (!a.proxy) return {
|
|
47
|
+
url: a.url,
|
|
48
|
+
kind: "direct"
|
|
49
|
+
};
|
|
50
|
+
if (!a.url.startsWith("/api/files/")) throw Error(`embed file proxy: refusing non-files-route URL ${JSON.stringify(a.url)}`);
|
|
51
|
+
let o = await p(t === "download" ? f(a.url) : a.url, r);
|
|
52
|
+
if (!o.ok) throw Error(`embed file proxy fetch failed: ${o.status} ${o.statusText}`);
|
|
53
|
+
let s = await o.blob();
|
|
54
|
+
return {
|
|
55
|
+
url: URL.createObjectURL(s),
|
|
56
|
+
kind: "blob"
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
3
60
|
//#region src/components/file-widgets/helpers.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
61
|
+
var h = ["thumb_200", "thumb_300"];
|
|
62
|
+
function g() {
|
|
6
63
|
return typeof navigator > "u" ? ["en"] : (navigator.languages?.length ? navigator.languages : [navigator.language]).filter((e) => typeof e == "string" && e.length > 0);
|
|
7
64
|
}
|
|
8
|
-
function
|
|
65
|
+
function _(e, t) {
|
|
9
66
|
for (let n of t) {
|
|
10
67
|
if (e[n]) return e[n];
|
|
11
68
|
let t = n.split("-")[0];
|
|
@@ -13,17 +70,17 @@ function l(e, t) {
|
|
|
13
70
|
}
|
|
14
71
|
for (let t of Object.values(e)) if (typeof t == "string" && t.length > 0) return t;
|
|
15
72
|
}
|
|
16
|
-
function
|
|
73
|
+
function v(e, t, n) {
|
|
17
74
|
if (t) return t;
|
|
18
75
|
let r = e?.metadata?.alt_text;
|
|
19
76
|
if (typeof r == "string" && r.length > 0) return r;
|
|
20
77
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
21
|
-
let e =
|
|
78
|
+
let e = _(Object.fromEntries(Object.entries(r).filter((e) => e[0].length > 0 && typeof e[1] == "string")), g());
|
|
22
79
|
if (e) return e;
|
|
23
80
|
}
|
|
24
81
|
return n;
|
|
25
82
|
}
|
|
26
|
-
var
|
|
83
|
+
var y = /* @__PURE__ */ new Set([
|
|
27
84
|
"image/png",
|
|
28
85
|
"image/jpeg",
|
|
29
86
|
"image/webp",
|
|
@@ -31,30 +88,30 @@ var d = /* @__PURE__ */ new Set([
|
|
|
31
88
|
"image/avif",
|
|
32
89
|
"application/pdf"
|
|
33
90
|
]);
|
|
34
|
-
function
|
|
91
|
+
function b(e) {
|
|
35
92
|
let t = e.content_type?.toLowerCase().split(";")[0]?.trim() ?? "";
|
|
36
|
-
return
|
|
93
|
+
return y.has(t);
|
|
37
94
|
}
|
|
38
|
-
function
|
|
95
|
+
function x(e) {
|
|
39
96
|
return e.url ?? e.presigned_url;
|
|
40
97
|
}
|
|
41
|
-
function
|
|
42
|
-
return e.url ?
|
|
98
|
+
function S(e) {
|
|
99
|
+
return e.url ? T(e.url, "attachment") : e.presigned_url;
|
|
43
100
|
}
|
|
44
|
-
function
|
|
101
|
+
function C(e, t) {
|
|
45
102
|
if (!e) return;
|
|
46
103
|
let n = e.derivations ?? {};
|
|
47
104
|
if (t && n[t]) return n[t];
|
|
48
|
-
for (let e of
|
|
105
|
+
for (let e of h) if (n[e]) return n[e];
|
|
49
106
|
return e.url ?? e.presigned_url;
|
|
50
107
|
}
|
|
51
|
-
function
|
|
108
|
+
function w(e, t) {
|
|
52
109
|
let n = e?.derivations ?? {};
|
|
53
110
|
if (t && n[t]) return { derivation: t };
|
|
54
|
-
for (let e of
|
|
111
|
+
for (let e of h) if (n[e]) return { derivation: e };
|
|
55
112
|
return "preview";
|
|
56
113
|
}
|
|
57
|
-
function
|
|
114
|
+
function T(e, t) {
|
|
58
115
|
try {
|
|
59
116
|
let n = new URL(e, typeof window < "u" ? window.location.origin : "http://localhost");
|
|
60
117
|
return n.searchParams.set("disposition", t), /^https?:\/\//i.test(e) ? n.toString() : `${n.pathname}${n.search}${n.hash}`;
|
|
@@ -62,7 +119,7 @@ function _(e, t) {
|
|
|
62
119
|
return `${e}${e.includes("?") ? "&" : "?"}disposition=${t}`;
|
|
63
120
|
}
|
|
64
121
|
}
|
|
65
|
-
function
|
|
122
|
+
function E(e) {
|
|
66
123
|
let t = e?.metadata?.focal_point;
|
|
67
124
|
if (!t || typeof t != "object" || Array.isArray(t)) return null;
|
|
68
125
|
let n = t, r = typeof n.x == "number" ? n.x : NaN, i = typeof n.y == "number" ? n.y : NaN;
|
|
@@ -71,10 +128,10 @@ function v(e) {
|
|
|
71
128
|
y: i
|
|
72
129
|
};
|
|
73
130
|
}
|
|
74
|
-
function
|
|
131
|
+
function D(e) {
|
|
75
132
|
if (e) return `${e.x * 100}% ${e.y * 100}%`;
|
|
76
133
|
}
|
|
77
|
-
function
|
|
134
|
+
function O(e, t) {
|
|
78
135
|
return {
|
|
79
136
|
...e,
|
|
80
137
|
metadata: {
|
|
@@ -84,63 +141,6 @@ function b(e, t) {
|
|
|
84
141
|
};
|
|
85
142
|
}
|
|
86
143
|
//#endregion
|
|
87
|
-
//#region src/embed/file-src.ts
|
|
88
|
-
var x = "/api/files";
|
|
89
|
-
function S(e) {
|
|
90
|
-
if (typeof e != "object" || !e) return !1;
|
|
91
|
-
let t = e;
|
|
92
|
-
return typeof t.url == "string" && typeof t.proxy == "boolean";
|
|
93
|
-
}
|
|
94
|
-
function C(e, t) {
|
|
95
|
-
let n = encodeURIComponent(e);
|
|
96
|
-
return typeof t == "object" ? `${x}/${n}/derived/${encodeURIComponent(t.derivation)}/url` : `${x}/${n}/url`;
|
|
97
|
-
}
|
|
98
|
-
var w = class extends Error {
|
|
99
|
-
fileId;
|
|
100
|
-
key;
|
|
101
|
-
constructor(e, t) {
|
|
102
|
-
super(`derivation "${t}" of file ${e} is still generating`), this.fileId = e, this.key = t, this.name = "DerivationPendingError";
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
function T(e, t) {
|
|
106
|
-
return {
|
|
107
|
-
method: "GET",
|
|
108
|
-
credentials: "omit",
|
|
109
|
-
headers: { Authorization: `Bearer ${e}` },
|
|
110
|
-
signal: t
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
function E(e) {
|
|
114
|
-
return `${e}${e.includes("?") ? "&" : "?"}disposition=attachment`;
|
|
115
|
-
}
|
|
116
|
-
async function D(n, r) {
|
|
117
|
-
let i = await e(), a = await fetch(n, T(i, r));
|
|
118
|
-
if (a.status !== 401) return a;
|
|
119
|
-
t();
|
|
120
|
-
let o = await e();
|
|
121
|
-
return fetch(n, T(o, r));
|
|
122
|
-
}
|
|
123
|
-
async function O(e, t, r) {
|
|
124
|
-
if (!n()) throw Error("resolveEmbedFileSrc called outside embed token mode");
|
|
125
|
-
let i = await D(C(e, t), r);
|
|
126
|
-
if (i.status === 202 && typeof t == "object") throw new w(e, t.derivation);
|
|
127
|
-
if (!i.ok) throw Error(`embed file url request failed: ${i.status} ${i.statusText}`);
|
|
128
|
-
let a = await i.json();
|
|
129
|
-
if (!S(a)) throw Error("embed file url response is malformed");
|
|
130
|
-
if (!a.proxy) return {
|
|
131
|
-
url: a.url,
|
|
132
|
-
kind: "direct"
|
|
133
|
-
};
|
|
134
|
-
if (!a.url.startsWith("/api/files/")) throw Error(`embed file proxy: refusing non-files-route URL ${JSON.stringify(a.url)}`);
|
|
135
|
-
let o = await D(t === "download" ? E(a.url) : a.url, r);
|
|
136
|
-
if (!o.ok) throw Error(`embed file proxy fetch failed: ${o.status} ${o.statusText}`);
|
|
137
|
-
let s = await o.blob();
|
|
138
|
-
return {
|
|
139
|
-
url: URL.createObjectURL(s),
|
|
140
|
-
kind: "blob"
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
//#endregion
|
|
144
144
|
//#region src/components/file-widgets/useEmbedFileSrc.ts
|
|
145
145
|
function k(e) {
|
|
146
146
|
return typeof e == "object" ? `derivation:${e.derivation}` : e;
|
|
@@ -159,7 +159,7 @@ function j(e, t, r) {
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
let t = null, r = !1, i = new AbortController();
|
|
162
|
-
return c(void 0),
|
|
162
|
+
return c(void 0), m(e, A(a), i.signal).then((e) => {
|
|
163
163
|
if (r) {
|
|
164
164
|
e.kind === "blob" && URL.revokeObjectURL(e.url);
|
|
165
165
|
return;
|
|
@@ -167,7 +167,7 @@ function j(e, t, r) {
|
|
|
167
167
|
e.kind === "blob" && (t = e.url), c(e.url);
|
|
168
168
|
}).catch((e) => {
|
|
169
169
|
if (!r) {
|
|
170
|
-
if (e instanceof
|
|
170
|
+
if (e instanceof u) {
|
|
171
171
|
c(void 0);
|
|
172
172
|
return;
|
|
173
173
|
}
|
|
@@ -188,10 +188,10 @@ function M() {
|
|
|
188
188
|
i && window.open(i, "_blank", "noopener");
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
|
-
t &&
|
|
191
|
+
t && m(t, r).then((t) => {
|
|
192
192
|
t.kind === "blob" && e.current.push(t.url), window.open(t.url, "_blank", "noopener");
|
|
193
193
|
}).catch((e) => {
|
|
194
|
-
e instanceof
|
|
194
|
+
e instanceof u || console.error("[declarion-embed] file open failed:", e);
|
|
195
195
|
});
|
|
196
196
|
}, []) };
|
|
197
197
|
}
|
|
@@ -207,4 +207,4 @@ function F(e) {
|
|
|
207
207
|
return e ? Array.isArray(e) ? e.filter(N) : N(e) ? [e] : [] : [];
|
|
208
208
|
}
|
|
209
209
|
//#endregion
|
|
210
|
-
export {
|
|
210
|
+
export { b as a, C as c, E as d, v as f, j as i, w as l, P as n, S as o, O as p, M as r, D as s, F as t, x as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@declarion/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React SDK for Declarion, the schema-driven business apps platform.",
|
|
@@ -58,26 +58,26 @@
|
|
|
58
58
|
"@dnd-kit/sortable": "^10.0.0",
|
|
59
59
|
"@dnd-kit/utilities": "^3.2.2",
|
|
60
60
|
"@monaco-editor/react": "^4.7.0",
|
|
61
|
-
"@radix-ui/react-alert-dialog": "^1.1.
|
|
62
|
-
"@radix-ui/react-dialog": "^1.1.
|
|
63
|
-
"@radix-ui/react-dropdown-menu": "^2.1.
|
|
64
|
-
"@radix-ui/react-label": "^2.1.
|
|
65
|
-
"@radix-ui/react-select": "^2.3.
|
|
66
|
-
"@radix-ui/react-separator": "^1.1.
|
|
61
|
+
"@radix-ui/react-alert-dialog": "^1.1.18",
|
|
62
|
+
"@radix-ui/react-dialog": "^1.1.18",
|
|
63
|
+
"@radix-ui/react-dropdown-menu": "^2.1.19",
|
|
64
|
+
"@radix-ui/react-label": "^2.1.11",
|
|
65
|
+
"@radix-ui/react-select": "^2.3.2",
|
|
66
|
+
"@radix-ui/react-separator": "^1.1.11",
|
|
67
67
|
"@radix-ui/react-slot": "^1.3.0",
|
|
68
68
|
"@tanstack/react-query": "^5.101.2",
|
|
69
69
|
"@tanstack/react-table": "^8.21.3",
|
|
70
|
-
"@tanstack/react-virtual": "^3.14.
|
|
70
|
+
"@tanstack/react-virtual": "^3.14.5",
|
|
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.23.0",
|
|
75
75
|
"mdast-util-to-string": "^4.0.0",
|
|
76
76
|
"monaco-editor": "^0.55.1",
|
|
77
77
|
"react-markdown": "^10.1.0",
|
|
78
78
|
"react-router-dom": "^7.18.1",
|
|
79
79
|
"react-textarea-autosize": "^8.5.9",
|
|
80
|
-
"recharts": "^3.9.
|
|
80
|
+
"recharts": "^3.9.2",
|
|
81
81
|
"remark-breaks": "^4.0.0",
|
|
82
82
|
"remark-gfm": "^4.0.1",
|
|
83
83
|
"remark-parse": "^11.0.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@types/react": "^19.2.17",
|
|
99
99
|
"@types/react-dom": "^19.2.3",
|
|
100
100
|
"@vitejs/plugin-react": "^6.0.3",
|
|
101
|
-
"@vitest/coverage-v8": "^4.1.
|
|
101
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
102
102
|
"axe-core": "^4.12.1",
|
|
103
103
|
"eslint": "^10.6.0",
|
|
104
104
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -108,17 +108,18 @@
|
|
|
108
108
|
"react": "^19.2.7",
|
|
109
109
|
"react-dom": "^19.2.7",
|
|
110
110
|
"tailwindcss": "^4.3.2",
|
|
111
|
-
"tsc-alias": "^1.
|
|
111
|
+
"tsc-alias": "^1.9.0",
|
|
112
112
|
"typescript": "^6.0.3",
|
|
113
|
-
"typescript-eslint": "^8.
|
|
114
|
-
"vite": "^8.1.
|
|
115
|
-
"vitest": "^4.1.
|
|
113
|
+
"typescript-eslint": "^8.63.0",
|
|
114
|
+
"vite": "^8.1.3",
|
|
115
|
+
"vitest": "^4.1.10"
|
|
116
116
|
},
|
|
117
117
|
"scripts": {
|
|
118
118
|
"dev": "vite",
|
|
119
119
|
"build": "tsc -p tsconfig.app.json --noEmit && vite build",
|
|
120
|
-
"build:lib": "vite build --config vite.lib.config.ts && vite build --config vite.plugin.config.ts && tsc -p tsconfig.lib.json && tsc-alias -p tsconfig.lib.json && pnpm run check:bundle && pnpm run check:pkg",
|
|
120
|
+
"build:lib": "vite build --config vite.lib.config.ts && vite build --config vite.plugin.config.ts && tsc -p tsconfig.lib.json && tsc-alias -p tsconfig.lib.json && pnpm run check:bundle && pnpm run check:fonts && pnpm run check:pkg",
|
|
121
121
|
"check:bundle": "node scripts/check-eager-bundle.mjs",
|
|
122
|
+
"check:fonts": "node scripts/check-fonts.mjs",
|
|
122
123
|
"check:pkg": "publint run",
|
|
123
124
|
"lint": "tsc --noEmit && eslint src --max-warnings=0",
|
|
124
125
|
"test": "vitest run",
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { useEffect as e, useState as t, useSyncExternalStore as n } from "react";
|
|
2
|
-
import { Activity as r, ArrowDown as i, ArrowLeft as a, ArrowUp as o, ArrowUpDown as s, BadgeDollarSign as c, Ban as l, Bell as ee, Bolt as te, Box as u, Boxes as d, Briefcase as ne, Building as f, Building2 as re, Calendar as ie, CalendarClock as ae, Check as oe, ChevronDown as p, ChevronLeft as se, ChevronRight as ce, ChevronUp as le, CircleDot as ue, ClipboardCheck as de, Clock as fe, Code as pe, Columns as me, Columns3 as he, Command as ge, Copy as m, Cpu as h, CreditCard as g, Database as _, Dot as v, Download as y, Edit as b, ExternalLink as x, Eye as S, EyeOff as C, File as w, FileDiff as T, Filter as E, Folder as D, FormInput as O, GitBranch as k, Globe as A, Grid as j, Group as M, Hash as N, Home as P, Inbox as F, Info as I, Key as L, KeyRound as R, Layers as _e, Layout as ve, LayoutDashboard as ye, Link as be, List as xe, ListChecks as Se, Loader as Ce, Lock as we, LogIn as Te, LogOut as Ee, Mail as De, Menu as Oe, Minus as ke, Moon as Ae, MoreHorizontal as je, Package as Me, Paperclip as Ne, Play as Pe, PlayCircle as Fe, Plus as Ie, PlusCircle as Le, ReceiptText as Re, RefreshCw as ze, Repeat as Be, Save as Ve, ScrollText as He, Search as Ue, Settings as We, Settings2 as Ge, Shield as Ke, ShieldCheck as qe, ShieldPlus as Je, ShoppingCart as Ye, Sliders as Xe, SlidersHorizontal as Ze, Smartphone as Qe, Sparkle as $e, Sparkles as et, Star as tt, Sun as nt, Table2 as rt, Tag as it, Tags as at, ToggleRight as ot, Trash as st, Trash2 as ct, TriangleAlert as lt, Undo2 as ut, Upload as dt, User as ft, UserPlus as pt, Users as z, UsersRound as mt, WalletCards as ht, Webhook as gt, Workflow as _t, X as vt, Zap as B } from "lucide-react";
|
|
3
|
-
import { jsx as V } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/primitives/Icons.tsx
|
|
5
|
-
var H = (e) => function({ size: t = 14, cls: n = "", style: r = {} }) {
|
|
6
|
-
return /* @__PURE__ */ V(e, {
|
|
7
|
-
size: t,
|
|
8
|
-
className: n,
|
|
9
|
-
style: r
|
|
10
|
-
});
|
|
11
|
-
}, U = {
|
|
12
|
-
action: H(B),
|
|
13
|
-
activity: H(r),
|
|
14
|
-
ai: H(et),
|
|
15
|
-
arrowDown: H(i),
|
|
16
|
-
arrowUp: H(o),
|
|
17
|
-
audit: H(de),
|
|
18
|
-
back: H(a),
|
|
19
|
-
"badge-dollar-sign": H(c),
|
|
20
|
-
ban: H(l),
|
|
21
|
-
bell: H(ee),
|
|
22
|
-
bolt: H(te),
|
|
23
|
-
box: H(u),
|
|
24
|
-
boxes: H(d),
|
|
25
|
-
branch: H(k),
|
|
26
|
-
building: H(f),
|
|
27
|
-
calendar: H(ie),
|
|
28
|
-
check: H(oe),
|
|
29
|
-
cheveron: H(p),
|
|
30
|
-
"circle-dot": H(ue),
|
|
31
|
-
clock: H(fe),
|
|
32
|
-
code: H(pe),
|
|
33
|
-
columns: H(me),
|
|
34
|
-
"columns-3": H(he),
|
|
35
|
-
command: H(ge),
|
|
36
|
-
company: H(re),
|
|
37
|
-
copy: H(m),
|
|
38
|
-
cpu: H(h),
|
|
39
|
-
"credit-card": H(g),
|
|
40
|
-
database: H(_),
|
|
41
|
-
dbtable: H(rt),
|
|
42
|
-
device: H(Qe),
|
|
43
|
-
dot: H(v),
|
|
44
|
-
down: H(p),
|
|
45
|
-
download: H(y),
|
|
46
|
-
edit: H(b),
|
|
47
|
-
email: H(De),
|
|
48
|
-
entity: H(u),
|
|
49
|
-
external: H(x),
|
|
50
|
-
eye: H(S),
|
|
51
|
-
eyeOff: H(C),
|
|
52
|
-
field: H(O),
|
|
53
|
-
file: H(w),
|
|
54
|
-
"file-diff": H(T),
|
|
55
|
-
filter: H(E),
|
|
56
|
-
flow: H(_t),
|
|
57
|
-
folder: H(D),
|
|
58
|
-
"git-branch": H(k),
|
|
59
|
-
globe: H(A),
|
|
60
|
-
grid: H(j),
|
|
61
|
-
group: H(M),
|
|
62
|
-
handlers: H(gt),
|
|
63
|
-
hash: H(N),
|
|
64
|
-
home: H(P),
|
|
65
|
-
idp: H(R),
|
|
66
|
-
inbox: H(F),
|
|
67
|
-
info: H(I),
|
|
68
|
-
jobs: H(ne),
|
|
69
|
-
key: H(L),
|
|
70
|
-
"key-round": H(R),
|
|
71
|
-
layers: H(_e),
|
|
72
|
-
layout: H(ve),
|
|
73
|
-
"layout-dashboard": H(ye),
|
|
74
|
-
leads: H(z),
|
|
75
|
-
left: H(se),
|
|
76
|
-
link: H(be),
|
|
77
|
-
list: H(xe),
|
|
78
|
-
"list-checks": H(Se),
|
|
79
|
-
loader: H(Ce),
|
|
80
|
-
lock: H(we),
|
|
81
|
-
log: H(He),
|
|
82
|
-
"log-in": H(Te),
|
|
83
|
-
logout: H(Ee),
|
|
84
|
-
menu: H(Oe),
|
|
85
|
-
minus: H(ke),
|
|
86
|
-
moon: H(Ae),
|
|
87
|
-
more: H(je),
|
|
88
|
-
package: H(Me),
|
|
89
|
-
paperclip: H(Ne),
|
|
90
|
-
pipeline: H(k),
|
|
91
|
-
play: H(Pe),
|
|
92
|
-
"play-circle": H(Fe),
|
|
93
|
-
plus: H(Ie),
|
|
94
|
-
"plus-circle": H(Le),
|
|
95
|
-
"receipt-text": H(Re),
|
|
96
|
-
refresh: H(ze),
|
|
97
|
-
repeat: H(Be),
|
|
98
|
-
right: H(ce),
|
|
99
|
-
save: H(Ve),
|
|
100
|
-
sched: H(ae),
|
|
101
|
-
search: H(Ue),
|
|
102
|
-
settings: H(We),
|
|
103
|
-
"settings-2": H(Ge),
|
|
104
|
-
shield: H(Ke),
|
|
105
|
-
"shield-check": H(qe),
|
|
106
|
-
"shield-plus": H(Je),
|
|
107
|
-
"shopping-cart": H(Ye),
|
|
108
|
-
sliders: H(Xe),
|
|
109
|
-
"sliders-horizontal": H(Ze),
|
|
110
|
-
sort: H(s),
|
|
111
|
-
sparkle: H($e),
|
|
112
|
-
star: H(tt),
|
|
113
|
-
sun: H(nt),
|
|
114
|
-
tag: H(it),
|
|
115
|
-
tags: H(at),
|
|
116
|
-
tenant: H(f),
|
|
117
|
-
"toggle-right": H(ot),
|
|
118
|
-
trash: H(st),
|
|
119
|
-
"trash-2": H(ct),
|
|
120
|
-
"undo-2": H(ut),
|
|
121
|
-
up: H(le),
|
|
122
|
-
upload: H(dt),
|
|
123
|
-
user: H(ft),
|
|
124
|
-
"user-plus": H(pt),
|
|
125
|
-
users: H(z),
|
|
126
|
-
"users-round": H(mt),
|
|
127
|
-
"wallet-cards": H(ht),
|
|
128
|
-
warning: H(lt),
|
|
129
|
-
x: H(vt),
|
|
130
|
-
zap: H(B)
|
|
131
|
-
}, W = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Set(), K = 0;
|
|
132
|
-
function q() {
|
|
133
|
-
K += 1;
|
|
134
|
-
for (let e of G) e();
|
|
135
|
-
}
|
|
136
|
-
function yt(e) {
|
|
137
|
-
W.clear();
|
|
138
|
-
for (let [t, n] of Object.entries(e)) W.set(t, n);
|
|
139
|
-
q();
|
|
140
|
-
}
|
|
141
|
-
function J(e) {
|
|
142
|
-
return W.get(e);
|
|
143
|
-
}
|
|
144
|
-
function Y(e) {
|
|
145
|
-
return G.add(e), () => {
|
|
146
|
-
G.delete(e);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function X() {
|
|
150
|
-
return K;
|
|
151
|
-
}
|
|
152
|
-
//#endregion
|
|
153
|
-
//#region src/components/shared/LucideIcon.tsx
|
|
154
|
-
var Z = /* @__PURE__ */ new Map(), Q = null;
|
|
155
|
-
function bt() {
|
|
156
|
-
return Q ||= import("lucide-react/dynamicIconImports").then((e) => e.default ?? e), Q;
|
|
157
|
-
}
|
|
158
|
-
function $({ name: n, size: r = 14, className: i, style: a }) {
|
|
159
|
-
let [o, s] = t(() => Z.get(n)), [c, l] = t(!1);
|
|
160
|
-
if (e(() => {
|
|
161
|
-
let e = Z.get(n);
|
|
162
|
-
if (e) {
|
|
163
|
-
s(() => e), l(!1);
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
s(void 0), l(!1);
|
|
167
|
-
let t = !0;
|
|
168
|
-
return bt().then((e) => {
|
|
169
|
-
let r = e[n];
|
|
170
|
-
if (!r) {
|
|
171
|
-
t && l(!0);
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
return r().then((e) => {
|
|
175
|
-
Z.set(n, e.default), t && (s(() => e.default), l(!1));
|
|
176
|
-
});
|
|
177
|
-
}), () => {
|
|
178
|
-
t = !1;
|
|
179
|
-
};
|
|
180
|
-
}, [n]), c) {
|
|
181
|
-
let e = U.folder;
|
|
182
|
-
return /* @__PURE__ */ V(e, {
|
|
183
|
-
size: r,
|
|
184
|
-
cls: i,
|
|
185
|
-
style: a
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
return o ? /* @__PURE__ */ V(o, {
|
|
189
|
-
size: r,
|
|
190
|
-
className: i,
|
|
191
|
-
style: a
|
|
192
|
-
}) : null;
|
|
193
|
-
}
|
|
194
|
-
//#endregion
|
|
195
|
-
//#region src/components/shared/DynamicIcon.tsx
|
|
196
|
-
var xt = "lucide:";
|
|
197
|
-
function St({ name: e, size: t, className: r, style: i }) {
|
|
198
|
-
n(Y, X, X);
|
|
199
|
-
let a = typeof t == "number" ? t : typeof t == "string" ? parseFloat(t) : 14, o = J(e);
|
|
200
|
-
if (o) return /* @__PURE__ */ V(Ct, {
|
|
201
|
-
def: o,
|
|
202
|
-
size: a,
|
|
203
|
-
className: r,
|
|
204
|
-
style: i
|
|
205
|
-
});
|
|
206
|
-
let s = U[e];
|
|
207
|
-
return s ? /* @__PURE__ */ V(s, {
|
|
208
|
-
size: a,
|
|
209
|
-
cls: r,
|
|
210
|
-
style: i
|
|
211
|
-
}) : /* @__PURE__ */ V($, {
|
|
212
|
-
name: e.startsWith(xt) ? e.slice(7) : e,
|
|
213
|
-
size: a,
|
|
214
|
-
className: r,
|
|
215
|
-
style: i
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
function Ct({ def: e, size: t, className: n, style: r }) {
|
|
219
|
-
switch (e.kind) {
|
|
220
|
-
case "svg": return /* @__PURE__ */ V(wt, {
|
|
221
|
-
paths: e.paths,
|
|
222
|
-
size: t,
|
|
223
|
-
className: n,
|
|
224
|
-
style: r
|
|
225
|
-
});
|
|
226
|
-
case "url": return /* @__PURE__ */ V("img", {
|
|
227
|
-
src: e.src,
|
|
228
|
-
alt: "",
|
|
229
|
-
"aria-hidden": "true",
|
|
230
|
-
width: t,
|
|
231
|
-
height: t,
|
|
232
|
-
className: n,
|
|
233
|
-
style: r
|
|
234
|
-
});
|
|
235
|
-
case "lucide": return /* @__PURE__ */ V($, {
|
|
236
|
-
name: e.name,
|
|
237
|
-
size: t,
|
|
238
|
-
className: n,
|
|
239
|
-
style: r
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
function wt({ paths: e, size: t, className: n, style: r }) {
|
|
244
|
-
return /* @__PURE__ */ V("svg", {
|
|
245
|
-
width: t,
|
|
246
|
-
height: t,
|
|
247
|
-
viewBox: "0 0 24 24",
|
|
248
|
-
fill: "none",
|
|
249
|
-
stroke: "currentColor",
|
|
250
|
-
strokeWidth: 1.5,
|
|
251
|
-
strokeLinecap: "round",
|
|
252
|
-
strokeLinejoin: "round",
|
|
253
|
-
className: n,
|
|
254
|
-
style: r,
|
|
255
|
-
"aria-hidden": "true",
|
|
256
|
-
children: e.map((e, t) => /* @__PURE__ */ V("path", { d: e }, t))
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
//#endregion
|
|
260
|
-
export { yt as a, X as i, $ as n, Y as o, J as r, U as s, St as t };
|