@declarion/react 0.38.1 → 0.39.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-CI5a0Emm.js → DraggableChildrenTable-DziCVhq6.js} +1 -1
- package/dist-lib/{Grid-BZEMUmjI.js → Grid-BTX2tkCT.js} +2 -2
- package/dist-lib/{LayoutRenderer-CnKUYh8M.js → LayoutRenderer-CwMERoPJ.js} +387 -285
- package/dist-lib/{MarkdownRenderer-DNmOqp_M.js → MarkdownRenderer-dHOTEhUa.js} +1 -1
- package/dist-lib/{RefreshControl-DsEXi6WF.js → RefreshControl--UAgflh7.js} +257 -175
- package/dist-lib/{SmartDetailPage.impl-DhSpZTLw.js → SmartDetailPage.impl-Bj7MtHxi.js} +474 -414
- package/dist-lib/{SmartRecordListPage.impl-Bi_FPbGy.js → SmartRecordListPage.impl-CZXzVhPC.js} +164 -164
- package/dist-lib/api/params.d.ts +12 -11
- package/dist-lib/components/columns/ColumnPicker.d.ts +11 -1
- package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +6 -0
- package/dist-lib/components/detail-layout/useManualColumnResize.d.ts +25 -0
- package/dist-lib/components/list/QuickPeek.d.ts +11 -2
- package/dist-lib/components/pages/list/{ListBulkBar.d.ts → ListFloatbar.d.ts} +3 -3
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +8 -10
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +29 -0
- package/dist-lib/components/pages/list/SaveViewDialog.d.ts +5 -1
- package/dist-lib/components/pages/list/cardProjection.d.ts +1 -1
- package/dist-lib/components/pages/list/column-sizing.d.ts +15 -0
- package/dist-lib/components/pages/list/columns.d.ts +3 -0
- package/dist-lib/components/pages/list/useHeaderReorder.d.ts +26 -0
- package/dist-lib/components/pages/list/useRowMenu.d.ts +47 -0
- package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +2 -0
- package/dist-lib/components/params/ParamsBlock.d.ts +25 -0
- package/dist-lib/components/params/param-editors.d.ts +28 -0
- package/dist-lib/components/primitives/Dropdown.d.ts +10 -1
- package/dist-lib/components/shared/ActionDialog.d.ts +2 -2
- package/dist-lib/components/shared/ActionRunner.d.ts +15 -0
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +45 -23
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/hooks/useParams.d.ts +45 -1
- package/dist-lib/index.d.ts +0 -2
- package/dist-lib/index.js +3074 -2189
- package/dist-lib/lib/actions.d.ts +17 -3
- package/dist-lib/lib/evidence-verdict.d.ts +11 -0
- package/dist-lib/lib/rowClickGesture.d.ts +14 -0
- package/dist-lib/{registry-B_AmhRdj.js → registry-DXNFRlbB.js} +780 -559
- package/dist-lib/stores/list-layout.d.ts +86 -0
- package/dist-lib/testing.js +1 -1
- package/dist-lib/types/api.d.ts +29 -1
- package/dist-lib/types/schema.d.ts +15 -0
- package/dist-lib/{useCurrentScreen-CcsD2NAk.js → useCurrentScreen-BA2lb-d7.js} +860 -835
- package/dist-lib/{useProperties-CPtQIWXp.js → useProperties-Br2DeOQh.js} +81 -81
- package/dist-lib/{value-BCjHI_Ai.js → value-C91loRXp.js} +1 -1
- package/package.json +1 -1
- package/dist-lib/components/list/RowMenu.d.ts +0 -23
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { $ as e, $t as t, Mt as n, U as r, bn as i, jt as a, ot as o, un as s } from "./useCurrentScreen-
|
|
2
|
-
import {
|
|
3
|
-
import { useEffect as l,
|
|
4
|
-
import { useSearchParams as
|
|
5
|
-
import { useInfiniteQuery as
|
|
1
|
+
import { $ as e, $t as t, Mt as n, U as r, bn as i, jt as a, ot as o, un as s } from "./useCurrentScreen-BA2lb-d7.js";
|
|
2
|
+
import { wt as c } from "./registry-DXNFRlbB.js";
|
|
3
|
+
import { useEffect as l, useLayoutEffect as u, useMemo as d } from "react";
|
|
4
|
+
import { useSearchParams as f } from "react-router-dom";
|
|
5
|
+
import { useInfiniteQuery as p, useMutation as m, useQueryClient as h } from "@tanstack/react-query";
|
|
6
6
|
//#region src/api/entities.ts
|
|
7
|
-
function
|
|
7
|
+
function g(e, t) {
|
|
8
8
|
return e.$statuses?.find((e) => e.group_code === t);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function _(e, t) {
|
|
11
11
|
return e.$properties?.find((e) => e.property_code === t);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function v(e) {
|
|
14
14
|
let t = { ...e };
|
|
15
|
-
return t.$status = (e) =>
|
|
15
|
+
return t.$status = (e) => g(t, e), t.$property = (e) => _(t, e), t;
|
|
16
16
|
}
|
|
17
|
-
var
|
|
17
|
+
var y = class {
|
|
18
18
|
cache = {};
|
|
19
19
|
merge(e) {
|
|
20
20
|
if (e) for (let t of Object.keys(e)) {
|
|
@@ -36,32 +36,32 @@ var v = class {
|
|
|
36
36
|
this.cache = {};
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
function
|
|
39
|
+
function b(e, t) {
|
|
40
40
|
let n = new URL(`/api/data/${e}`, window.location.origin);
|
|
41
41
|
return t.select && t.select.length > 0 && n.searchParams.set("select", t.select.join(",")), t.expand && t.expand.length > 0 && n.searchParams.set("expand", t.expand.join(",")), t.sort && n.searchParams.set("sort", t.sort), t.search && n.searchParams.set("search", t.search), t.limit && n.searchParams.set("limit", String(t.limit)), t.after && n.searchParams.set("after", t.after), t.count && n.searchParams.set("count", "with"), t.screen && n.searchParams.set("screen", t.screen), t.preview && n.searchParams.set("preview", "true"), t.include_deleted && n.searchParams.set("include_deleted", "true"), t.filters && t.filters.length > 0 && n.searchParams.set("filters", JSON.stringify(t.filters)), n.pathname + n.search;
|
|
42
42
|
}
|
|
43
|
-
var
|
|
43
|
+
var x = class {
|
|
44
44
|
entity;
|
|
45
45
|
refs;
|
|
46
46
|
constructor(e, t) {
|
|
47
|
-
this.entity = e, this.refs = t ?? new
|
|
47
|
+
this.entity = e, this.refs = t ?? new y();
|
|
48
48
|
}
|
|
49
49
|
async get(e) {
|
|
50
50
|
let t = new URLSearchParams(typeof e == "string" ? { id: e } : e);
|
|
51
|
-
return
|
|
51
|
+
return v((await a(`/api/data/${this.entity}?${t.toString()}`)).data);
|
|
52
52
|
}
|
|
53
53
|
async list(e = {}) {
|
|
54
54
|
let n, r = !1;
|
|
55
55
|
try {
|
|
56
|
-
n = await a(
|
|
56
|
+
n = await a(b(this.entity, e));
|
|
57
57
|
} catch (i) {
|
|
58
58
|
if (e.after && t(i)) {
|
|
59
59
|
let { after: t, ...i } = e;
|
|
60
|
-
n = await a(
|
|
60
|
+
n = await a(b(this.entity, i)), r = !0;
|
|
61
61
|
} else throw i;
|
|
62
62
|
}
|
|
63
63
|
return this.refs.merge(n.$refs), {
|
|
64
|
-
data: n.data.map((e) =>
|
|
64
|
+
data: n.data.map((e) => v(e)),
|
|
65
65
|
meta: n.meta,
|
|
66
66
|
$refs: this.refs.all(),
|
|
67
67
|
reset: r
|
|
@@ -82,7 +82,7 @@ var b = class {
|
|
|
82
82
|
})),
|
|
83
83
|
atomic: !0
|
|
84
84
|
});
|
|
85
|
-
return
|
|
85
|
+
return S(t, `${this.entity}.__create`), t.results.map((e) => v(C(e)));
|
|
86
86
|
}
|
|
87
87
|
async update(e, t) {
|
|
88
88
|
return (await this.updateMany([{
|
|
@@ -103,7 +103,7 @@ var b = class {
|
|
|
103
103
|
})),
|
|
104
104
|
atomic: !0
|
|
105
105
|
});
|
|
106
|
-
return
|
|
106
|
+
return S(t, `${this.entity}.__update`), t.results.map((e) => v(C(e)));
|
|
107
107
|
}
|
|
108
108
|
async delete(e) {
|
|
109
109
|
await this.deleteMany([e]);
|
|
@@ -139,29 +139,29 @@ var b = class {
|
|
|
139
139
|
})),
|
|
140
140
|
atomic: !0
|
|
141
141
|
});
|
|
142
|
-
return
|
|
142
|
+
return S(r, `${this.entity}.__upsert`), r.results.map((e) => v(w(e)));
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
|
-
function
|
|
145
|
+
function S(e, t) {
|
|
146
146
|
if (e.committed) return;
|
|
147
147
|
let n = e.results.find((e) => !e.ok), r = n ? `${n.error_code ?? "ERROR"}: ${n.error ?? "unknown"}` : "batch did not commit";
|
|
148
148
|
throw Error(`${t} batch failed: ${r}`);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function C(e) {
|
|
151
151
|
let t = e.result ?? {};
|
|
152
152
|
return (Array.isArray(t.rows) ? t.rows[0] : void 0) ?? {};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function w(e) {
|
|
155
155
|
let t = e.result ?? {};
|
|
156
156
|
return (Array.isArray(t.rows) ? t.rows[0] : void 0)?.row ?? {};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
return new
|
|
158
|
+
function T(e, t) {
|
|
159
|
+
return new x(e, t);
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/hooks/useCursorEntityData.ts
|
|
163
|
-
var
|
|
164
|
-
function
|
|
163
|
+
var E = "entity-data-cursor";
|
|
164
|
+
function D(e) {
|
|
165
165
|
return JSON.stringify({
|
|
166
166
|
sort: e.sort,
|
|
167
167
|
filters: e.filters,
|
|
@@ -174,19 +174,19 @@ function E(e) {
|
|
|
174
174
|
limit: e.limit
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function O(e, t) {
|
|
178
178
|
return [
|
|
179
|
-
|
|
179
|
+
E,
|
|
180
180
|
e,
|
|
181
|
-
|
|
181
|
+
D(t)
|
|
182
182
|
];
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
let r =
|
|
186
|
-
|
|
184
|
+
function k(e, t, n) {
|
|
185
|
+
let r = h(), i = d(() => new x(e ?? ""), [e]), a = d(() => D(t), [t]), o = d(() => [
|
|
186
|
+
E,
|
|
187
187
|
e,
|
|
188
188
|
a
|
|
189
|
-
], [e, a]), s =
|
|
189
|
+
], [e, a]), s = p({
|
|
190
190
|
queryKey: o,
|
|
191
191
|
queryFn: ({ pageParam: e }) => i.list({
|
|
192
192
|
sort: t.sort,
|
|
@@ -205,21 +205,21 @@ function O(e, t, n) {
|
|
|
205
205
|
initialPageParam: void 0,
|
|
206
206
|
enabled: !!e && n,
|
|
207
207
|
placeholderData: (t, n) => n?.queryKey?.[1] === e ? t : void 0
|
|
208
|
-
}), c = s.data?.pages,
|
|
208
|
+
}), c = s.data?.pages, u = c && c.length > 1 ? c[c.length - 1]?.reset : !1;
|
|
209
209
|
l(() => {
|
|
210
|
-
|
|
210
|
+
u && r.resetQueries({ queryKey: o });
|
|
211
211
|
}, [
|
|
212
|
-
|
|
212
|
+
u,
|
|
213
213
|
r,
|
|
214
214
|
o
|
|
215
215
|
]);
|
|
216
|
-
let
|
|
216
|
+
let f = d(() => (s.data?.pages ?? []).flatMap((e) => e.data), [s.data?.pages]), m = s.data?.pages?.[0]?.meta;
|
|
217
217
|
return {
|
|
218
|
-
rows:
|
|
218
|
+
rows: f,
|
|
219
219
|
refs: s.data?.pages?.[s.data.pages.length - 1]?.$refs,
|
|
220
|
-
total:
|
|
221
|
-
countMode:
|
|
222
|
-
countUnknown:
|
|
220
|
+
total: m && !m.count_unknown ? m.total : void 0,
|
|
221
|
+
countMode: m?.count_mode,
|
|
222
|
+
countUnknown: m?.count_unknown ?? !1,
|
|
223
223
|
hasMore: s.hasNextPage,
|
|
224
224
|
fetchNextPage: s.fetchNextPage,
|
|
225
225
|
isFetchingNextPage: s.isFetchingNextPage,
|
|
@@ -232,9 +232,9 @@ function O(e, t, n) {
|
|
|
232
232
|
}
|
|
233
233
|
//#endregion
|
|
234
234
|
//#region src/hooks/useTabSearchMirror.ts
|
|
235
|
-
function
|
|
236
|
-
let n = e(), [r] =
|
|
237
|
-
|
|
235
|
+
function A(t) {
|
|
236
|
+
let n = e(), [r] = f();
|
|
237
|
+
u(() => {
|
|
238
238
|
if (!t || n.enabled) return;
|
|
239
239
|
let e = c.getState(), i = e.findTabByPathname(t);
|
|
240
240
|
i && e.updateTabSearch(i.id, r.toString());
|
|
@@ -246,7 +246,7 @@ function k(t) {
|
|
|
246
246
|
}
|
|
247
247
|
//#endregion
|
|
248
248
|
//#region src/hooks/useRegisterScreenTab.ts
|
|
249
|
-
function
|
|
249
|
+
function j(t, n, r, i) {
|
|
250
250
|
let a = e();
|
|
251
251
|
l(() => {
|
|
252
252
|
!t || a.enabled || c.getState().openTab({
|
|
@@ -263,13 +263,13 @@ function A(t, n, r, i) {
|
|
|
263
263
|
a.enabled
|
|
264
264
|
]);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function M(e, t, n) {
|
|
267
267
|
let r = e?.route, i = t ? s(e?.display?.name) || s(t.display.name_plural) : "", a = e?.display?.icon || t?.display.icon;
|
|
268
|
-
|
|
268
|
+
j(t ? r : void 0, i, a, n);
|
|
269
269
|
}
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/lib/filters.ts
|
|
272
|
-
var
|
|
272
|
+
var N = /* @__PURE__ */ new Set([
|
|
273
273
|
"is_empty",
|
|
274
274
|
"is_not_empty",
|
|
275
275
|
"today",
|
|
@@ -279,7 +279,7 @@ var M = /* @__PURE__ */ new Set([
|
|
|
279
279
|
"last_30_days",
|
|
280
280
|
"last_hour",
|
|
281
281
|
"last_24_hours"
|
|
282
|
-
]),
|
|
282
|
+
]), P = {
|
|
283
283
|
eq: "is",
|
|
284
284
|
not_eq: "is not",
|
|
285
285
|
gt: ">",
|
|
@@ -301,7 +301,7 @@ var M = /* @__PURE__ */ new Set([
|
|
|
301
301
|
last_hour: "last hour",
|
|
302
302
|
last_24_hours: "last 24 hours"
|
|
303
303
|
};
|
|
304
|
-
function
|
|
304
|
+
function F(e) {
|
|
305
305
|
let t = e.get("filters");
|
|
306
306
|
if (!t) return [];
|
|
307
307
|
try {
|
|
@@ -311,27 +311,27 @@ function P(e) {
|
|
|
311
311
|
return [];
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function I(e, t) {
|
|
315
315
|
e.length === 0 ? t.delete("filters") : t.set("filters", JSON.stringify(e));
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function L(e) {
|
|
318
318
|
return e.some((e) => e.or != null);
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function R(e) {
|
|
321
321
|
let t = [];
|
|
322
322
|
for (let n of e) if (!(!n || typeof n != "object")) {
|
|
323
|
-
if (n.field && n.op && t.push(n), n.or) for (let e of n.or) t.push(...
|
|
324
|
-
n.and && t.push(...
|
|
323
|
+
if (n.field && n.op && t.push(n), n.or) for (let e of n.or) t.push(...R(e));
|
|
324
|
+
n.and && t.push(...R(n.and));
|
|
325
325
|
}
|
|
326
326
|
return t;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
return
|
|
328
|
+
function z(e) {
|
|
329
|
+
return R(e).length;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function B(e, t) {
|
|
332
332
|
if (!e.field || !e.op) return "";
|
|
333
|
-
let n =
|
|
334
|
-
if (
|
|
333
|
+
let n = P[e.op] || e.op;
|
|
334
|
+
if (N.has(e.op)) return `${n}`;
|
|
335
335
|
let r = e.field, a = (e) => {
|
|
336
336
|
if (t) {
|
|
337
337
|
let n = t(r, e);
|
|
@@ -341,18 +341,18 @@ function z(e, t) {
|
|
|
341
341
|
};
|
|
342
342
|
return `${n} ${Array.isArray(e.value) ? e.value.map(a).join(", ") : a(e.value)}`;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function V(e, t) {
|
|
345
345
|
return {
|
|
346
346
|
field: e,
|
|
347
347
|
op: "eq",
|
|
348
348
|
value: t
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function H(e, t) {
|
|
352
352
|
let n = [];
|
|
353
353
|
for (let r of e) if (r.field !== t) {
|
|
354
354
|
if (r.or) {
|
|
355
|
-
let e = r.or.map((e) =>
|
|
355
|
+
let e = r.or.map((e) => H(e, t)).filter((e) => e.length > 0);
|
|
356
356
|
e.length > 0 && n.push({
|
|
357
357
|
...r,
|
|
358
358
|
or: e
|
|
@@ -360,7 +360,7 @@ function V(e, t) {
|
|
|
360
360
|
continue;
|
|
361
361
|
}
|
|
362
362
|
if (r.and) {
|
|
363
|
-
let e =
|
|
363
|
+
let e = H(r.and, t);
|
|
364
364
|
e.length > 0 && n.push({
|
|
365
365
|
...r,
|
|
366
366
|
and: e
|
|
@@ -373,7 +373,7 @@ function V(e, t) {
|
|
|
373
373
|
}
|
|
374
374
|
//#endregion
|
|
375
375
|
//#region src/api/status.ts
|
|
376
|
-
async function
|
|
376
|
+
async function U(e, t, n, r, i) {
|
|
377
377
|
let a = {
|
|
378
378
|
status_group_code: n,
|
|
379
379
|
status_code: r
|
|
@@ -388,10 +388,10 @@ async function H(e, t, n, r, i) {
|
|
|
388
388
|
}
|
|
389
389
|
//#endregion
|
|
390
390
|
//#region src/hooks/useObjectStatus.ts
|
|
391
|
-
function
|
|
392
|
-
let n =
|
|
393
|
-
return
|
|
394
|
-
mutationFn: ({ groupCode: n, statusCode: r, note: i }) =>
|
|
391
|
+
function W(e, t) {
|
|
392
|
+
let n = h();
|
|
393
|
+
return m({
|
|
394
|
+
mutationFn: ({ groupCode: n, statusCode: r, note: i }) => U(e, t, n, r, i),
|
|
395
395
|
onSuccess: () => {
|
|
396
396
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
397
397
|
},
|
|
@@ -402,7 +402,7 @@ function U(e, t) {
|
|
|
402
402
|
}
|
|
403
403
|
//#endregion
|
|
404
404
|
//#region src/api/properties.ts
|
|
405
|
-
async function
|
|
405
|
+
async function G(e, t, n, r) {
|
|
406
406
|
let i = (await o(`${e}.__update`, {
|
|
407
407
|
object_ids: [t],
|
|
408
408
|
entity: e,
|
|
@@ -413,7 +413,7 @@ async function W(e, t, n, r) {
|
|
|
413
413
|
})).result?.rows?.[0]?.$properties ?? [];
|
|
414
414
|
return i.find((e) => e.property_code === n) ?? i[0];
|
|
415
415
|
}
|
|
416
|
-
async function
|
|
416
|
+
async function K(e, t, n) {
|
|
417
417
|
await o(`${e}.__update`, {
|
|
418
418
|
object_ids: [t],
|
|
419
419
|
entity: e,
|
|
@@ -425,10 +425,10 @@ async function G(e, t, n) {
|
|
|
425
425
|
}
|
|
426
426
|
//#endregion
|
|
427
427
|
//#region src/hooks/useProperties.ts
|
|
428
|
-
function
|
|
429
|
-
let n =
|
|
430
|
-
return
|
|
431
|
-
mutationFn: ({ propertyCode: n, value: r }) =>
|
|
428
|
+
function q(e, t) {
|
|
429
|
+
let n = h();
|
|
430
|
+
return m({
|
|
431
|
+
mutationFn: ({ propertyCode: n, value: r }) => G(e, t, n, r),
|
|
432
432
|
onSuccess: () => {
|
|
433
433
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
434
434
|
},
|
|
@@ -437,10 +437,10 @@ function K(e, t) {
|
|
|
437
437
|
}
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
let n =
|
|
442
|
-
return
|
|
443
|
-
mutationFn: (n) =>
|
|
440
|
+
function J(e, t) {
|
|
441
|
+
let n = h();
|
|
442
|
+
return m({
|
|
443
|
+
mutationFn: (n) => K(e, t, n),
|
|
444
444
|
onSuccess: () => {
|
|
445
445
|
n.invalidateQueries({ queryKey: ["entity-item", e] });
|
|
446
446
|
},
|
|
@@ -450,4 +450,4 @@ function q(e, t) {
|
|
|
450
450
|
});
|
|
451
451
|
}
|
|
452
452
|
//#endregion
|
|
453
|
-
export {
|
|
453
|
+
export { T as C, y as S, E as _, P as a, k as b, R as c, F as d, H as f, A as g, j as h, N as i, B as l, M as m, q as n, z as o, I as p, W as r, V as s, J as t, L as u, O as v, x, D as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as e, Ut as t, zt as n } from "./useCurrentScreen-
|
|
1
|
+
import { Bt as e, Ut as t, zt as n } from "./useCurrentScreen-BA2lb-d7.js";
|
|
2
2
|
import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
|
|
3
3
|
//#region src/embed/file-src.ts
|
|
4
4
|
var s = "/api/files";
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
export interface RowMenuEntry {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
icon?: ReactNode;
|
|
6
|
-
destructive?: boolean;
|
|
7
|
-
kbd?: ReactNode;
|
|
8
|
-
onRun: () => void;
|
|
9
|
-
}
|
|
10
|
-
export interface RowMenuProps {
|
|
11
|
-
x: number;
|
|
12
|
-
y: number;
|
|
13
|
-
onClose: () => void;
|
|
14
|
-
onPeek?: () => void;
|
|
15
|
-
onOpen?: () => void;
|
|
16
|
-
onEditInline?: () => void;
|
|
17
|
-
onDuplicate?: () => void;
|
|
18
|
-
onCopyLink?: () => void;
|
|
19
|
-
onDelete?: () => void;
|
|
20
|
-
/** Extra schema-driven entries placed between copy-link and Delete. */
|
|
21
|
-
actions?: RowMenuEntry[];
|
|
22
|
-
}
|
|
23
|
-
export declare function RowMenu({ x, y, onClose, onPeek, onOpen, onEditInline, onDuplicate, onCopyLink, onDelete, actions, }: RowMenuProps): import("react").JSX.Element;
|