@llmnative/react 1.8.0 → 1.8.2
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +142 -145
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import Ae from "remark-gfm";
|
|
|
18
18
|
import je from "rehype-slug";
|
|
19
19
|
import Me from "rehype-autolink-headings";
|
|
20
20
|
import Ne from "rehype-sanitize";
|
|
21
|
-
import { endAt as Pe, equalTo as
|
|
21
|
+
import { endAt as Pe, equalTo as Fe, get as J, getDatabase as Ie, onValue as Le, orderByChild as Re, orderByKey as ze, orderByValue as Be, query as Ve, ref as He, remove as Ue, set as We, startAt as Ge, update as Ke } from "firebase/database";
|
|
22
22
|
import "react-dom/server";
|
|
23
23
|
//#region \0rolldown/runtime.js
|
|
24
24
|
var qe = Object.defineProperty, Je = (e, t) => {
|
|
@@ -10896,13 +10896,13 @@ var cd = (e) => {
|
|
|
10896
10896
|
xe.current[e] = t;
|
|
10897
10897
|
}, []), Pe = s((e) => {
|
|
10898
10898
|
delete xe.current[e];
|
|
10899
|
-
}, []),
|
|
10899
|
+
}, []), Fe = s((e) => {
|
|
10900
10900
|
be((t) => {
|
|
10901
10901
|
if (!t[e]) return t;
|
|
10902
10902
|
let { [e]: n, ...r } = t;
|
|
10903
10903
|
return r;
|
|
10904
10904
|
});
|
|
10905
|
-
}, []),
|
|
10905
|
+
}, []), J = s(async () => {
|
|
10906
10906
|
let e = {};
|
|
10907
10907
|
for (let [t, n] of Object.entries(xe.current)) {
|
|
10908
10908
|
let { required: r, label: i, validator: a } = n.current, o = t.split(".").reduce((e, t) => {
|
|
@@ -10967,7 +10967,7 @@ var cd = (e) => {
|
|
|
10967
10967
|
}), !1;
|
|
10968
10968
|
if (M(() => {
|
|
10969
10969
|
be({}), b && _e(void 0);
|
|
10970
|
-
}), !await
|
|
10970
|
+
}), !await J()) return b && _e({
|
|
10971
10971
|
message: N.noticeRequiredFields,
|
|
10972
10972
|
type: "warning"
|
|
10973
10973
|
}), !1;
|
|
@@ -10994,7 +10994,7 @@ var cd = (e) => {
|
|
|
10994
10994
|
U,
|
|
10995
10995
|
se,
|
|
10996
10996
|
b,
|
|
10997
|
-
|
|
10997
|
+
J
|
|
10998
10998
|
]), ze = s(async (e) => {
|
|
10999
10999
|
e?.preventDefault?.(), b && _e(void 0), H(!0);
|
|
11000
11000
|
try {
|
|
@@ -11117,12 +11117,12 @@ var cd = (e) => {
|
|
|
11117
11117
|
}, [F]), Ve = p(() => ({
|
|
11118
11118
|
registerField: Ne,
|
|
11119
11119
|
unregisterField: Pe,
|
|
11120
|
-
clearFieldError:
|
|
11120
|
+
clearFieldError: Fe,
|
|
11121
11121
|
errors: ye
|
|
11122
11122
|
}), [
|
|
11123
11123
|
Ne,
|
|
11124
11124
|
Pe,
|
|
11125
|
-
|
|
11125
|
+
Fe,
|
|
11126
11126
|
ye
|
|
11127
11127
|
]), He = p(() => ({
|
|
11128
11128
|
record: L,
|
|
@@ -15220,49 +15220,43 @@ function tm({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15220
15220
|
}
|
|
15221
15221
|
if (e.kind === "dateRange") {
|
|
15222
15222
|
let a = n;
|
|
15223
|
-
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex
|
|
15223
|
+
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeFrom), /* @__PURE__ */ t.createElement("input", {
|
|
15224
15224
|
type: "date",
|
|
15225
|
-
"aria-label": `${e.label} ${i.filtersRangeFrom}`,
|
|
15226
15225
|
className: em,
|
|
15227
15226
|
value: a.from,
|
|
15228
15227
|
onChange: (e) => r({
|
|
15229
15228
|
...a,
|
|
15230
15229
|
from: e.target.value
|
|
15231
15230
|
})
|
|
15232
|
-
}), /* @__PURE__ */ t.createElement("
|
|
15231
|
+
})), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeTo), /* @__PURE__ */ t.createElement("input", {
|
|
15233
15232
|
type: "date",
|
|
15234
|
-
"aria-label": `${e.label} ${i.filtersRangeTo}`,
|
|
15235
15233
|
className: em,
|
|
15236
15234
|
value: a.to,
|
|
15237
15235
|
onChange: (e) => r({
|
|
15238
15236
|
...a,
|
|
15239
15237
|
to: e.target.value
|
|
15240
15238
|
})
|
|
15241
|
-
})));
|
|
15239
|
+
}))));
|
|
15242
15240
|
}
|
|
15243
15241
|
if (e.kind === "numberRange") {
|
|
15244
15242
|
let a = n;
|
|
15245
|
-
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex
|
|
15243
|
+
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMin), /* @__PURE__ */ t.createElement("input", {
|
|
15246
15244
|
type: "number",
|
|
15247
|
-
placeholder: i.filtersRangeMin,
|
|
15248
|
-
"aria-label": `${e.label} ${i.filtersRangeMin}`,
|
|
15249
15245
|
className: em,
|
|
15250
15246
|
value: a.min ?? "",
|
|
15251
15247
|
onChange: (e) => r({
|
|
15252
15248
|
...a,
|
|
15253
15249
|
min: e.target.value === "" ? void 0 : Number(e.target.value)
|
|
15254
15250
|
})
|
|
15255
|
-
}), /* @__PURE__ */ t.createElement("
|
|
15251
|
+
})), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMax), /* @__PURE__ */ t.createElement("input", {
|
|
15256
15252
|
type: "number",
|
|
15257
|
-
placeholder: i.filtersRangeMax,
|
|
15258
|
-
"aria-label": `${e.label} ${i.filtersRangeMax}`,
|
|
15259
15253
|
className: em,
|
|
15260
15254
|
value: a.max ?? "",
|
|
15261
15255
|
onChange: (e) => r({
|
|
15262
15256
|
...a,
|
|
15263
15257
|
max: e.target.value === "" ? void 0 : Number(e.target.value)
|
|
15264
15258
|
})
|
|
15265
|
-
})));
|
|
15259
|
+
}))));
|
|
15266
15260
|
}
|
|
15267
15261
|
let a = n;
|
|
15268
15262
|
return /* @__PURE__ */ t.createElement("label", { className: "inline-flex cursor-pointer items-center gap-2 select-none" }, /* @__PURE__ */ t.createElement("span", { className: "relative inline-flex h-5 w-9 shrink-0 items-center" }, /* @__PURE__ */ t.createElement("input", {
|
|
@@ -15297,23 +15291,26 @@ function nm({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15297
15291
|
U,
|
|
15298
15292
|
M,
|
|
15299
15293
|
te
|
|
15300
|
-
]), se = M && M.length > 0 ? /* @__PURE__ */ t.createElement(
|
|
15294
|
+
]), se = M && M.length > 0 ? /* @__PURE__ */ t.createElement(Br, {
|
|
15301
15295
|
icon: "filter",
|
|
15302
|
-
|
|
15303
|
-
|
|
15296
|
+
ariaLabel: z.filtersButton,
|
|
15297
|
+
title: z.filtersButton,
|
|
15298
|
+
variant: "link",
|
|
15304
15299
|
badge: ae.length > 0 ? ae.length : void 0,
|
|
15305
15300
|
onClick: () => re(!0)
|
|
15306
|
-
}), ae.map((e) => /* @__PURE__ */ t.createElement(
|
|
15301
|
+
}) : null, ce = (M ?? []).length > 0 && ae.length > 0 ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-1.5" }, ae.map((e) => /* @__PURE__ */ t.createElement(Xn, {
|
|
15307
15302
|
key: e.key,
|
|
15308
|
-
|
|
15309
|
-
|
|
15310
|
-
|
|
15311
|
-
"
|
|
15312
|
-
|
|
15303
|
+
variant: "info",
|
|
15304
|
+
className: "inline-flex items-center gap-1"
|
|
15305
|
+
}, $p(e, te[e.key] ?? Xp(e), z), /* @__PURE__ */ t.createElement(Br, {
|
|
15306
|
+
icon: "x",
|
|
15307
|
+
variant: "link",
|
|
15308
|
+
ariaLabel: `${z.filtersClearAll} ${e.label}`,
|
|
15309
|
+
title: `${z.filtersClearAll} ${e.label}`,
|
|
15313
15310
|
onClick: () => ie(e)
|
|
15314
|
-
}
|
|
15311
|
+
})))) : null, le = !j && se ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, se, ce) : null, ue = ne && M && M.length > 0 ? /* @__PURE__ */ t.createElement(Ai, {
|
|
15315
15312
|
title: z.filtersPanelTitle,
|
|
15316
|
-
size: "
|
|
15313
|
+
size: "md",
|
|
15317
15314
|
position: "right",
|
|
15318
15315
|
onClose: () => re(!1),
|
|
15319
15316
|
footer: /* @__PURE__ */ t.createElement(Br, {
|
|
@@ -15328,42 +15325,42 @@ function nm({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15328
15325
|
value: te[e.key] ?? Xp(e),
|
|
15329
15326
|
onChange: (t) => K(e.key, t),
|
|
15330
15327
|
dict: z
|
|
15331
|
-
})))) : null,
|
|
15332
|
-
if (!
|
|
15333
|
-
let e =
|
|
15328
|
+
})))) : null, de = j === !0 ? {} : j || void 0, [fe, q] = h(""), pe = p(() => {
|
|
15329
|
+
if (!de || !fe.trim()) return oe;
|
|
15330
|
+
let e = fe.trim().toLowerCase(), t = de.fields?.map(String);
|
|
15334
15331
|
return oe.filter((n) => (t ?? Object.keys(n)).some((t) => {
|
|
15335
15332
|
let r = Mt(n, t);
|
|
15336
15333
|
return typeof r == "string" && r.toLowerCase().includes(e);
|
|
15337
15334
|
}));
|
|
15338
15335
|
}, [
|
|
15339
15336
|
oe,
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
]),
|
|
15337
|
+
de,
|
|
15338
|
+
fe
|
|
15339
|
+
]), me = de ? /* @__PURE__ */ t.createElement("div", { className: "flex min-w-0 flex-wrap items-center gap-2" }, /* @__PURE__ */ t.createElement("div", { className: "flex min-w-0 items-center gap-1" }, /* @__PURE__ */ t.createElement("input", {
|
|
15343
15340
|
type: "search",
|
|
15344
|
-
value:
|
|
15345
|
-
onChange: (e) =>
|
|
15346
|
-
placeholder:
|
|
15341
|
+
value: fe,
|
|
15342
|
+
onChange: (e) => q(e.target.value),
|
|
15343
|
+
placeholder: de.placeholder ?? B.search,
|
|
15347
15344
|
className: "w-full max-w-xs rounded-md border border-input bg-background px-2 py-1 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
|
|
15348
|
-
}), /* @__PURE__ */ t.createElement("span", { className: "shrink-0 text-xs text-muted-foreground" },
|
|
15345
|
+
}), se), ce, /* @__PURE__ */ t.createElement("span", { className: "shrink-0 text-xs text-muted-foreground" }, pe.length, " / ", oe.length)) : null, he = m ?? {}, ge = he.table ?? {}, _e = he.gallery ?? {}, [ve, ye] = h(f);
|
|
15349
15346
|
l(() => {
|
|
15350
|
-
|
|
15347
|
+
ye(f);
|
|
15351
15348
|
}, [f]);
|
|
15352
|
-
let [
|
|
15353
|
-
|
|
15349
|
+
let [be, xe] = h(() => new Set(ee.filter((e) => e.defaultVisible === !1).map((e) => String(e.key)))), Se = s((e) => {
|
|
15350
|
+
xe((t) => {
|
|
15354
15351
|
let n = new Set(t);
|
|
15355
15352
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
15356
15353
|
});
|
|
15357
|
-
}, []),
|
|
15358
|
-
|
|
15354
|
+
}, []), Ce = p(() => ee.filter((e) => !be.has(String(e.key))), [ee, be]), we = _e.fields ?? [], [Te, Ee] = h(() => new Set(we.filter((e) => e.defaultVisible === !1).map((e) => String(e.key)))), De = s((e) => {
|
|
15355
|
+
Ee((t) => {
|
|
15359
15356
|
let n = new Set(t);
|
|
15360
15357
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
15361
15358
|
});
|
|
15362
|
-
}, []),
|
|
15359
|
+
}, []), Oe = p(() => we.filter((e) => !Te.has(String(e.key))), [we, Te]), ke = p(() => {
|
|
15363
15360
|
let e = [];
|
|
15364
|
-
if (
|
|
15361
|
+
if (Oe.length) {
|
|
15365
15362
|
let n = /* @__PURE__ */ new Map();
|
|
15366
|
-
|
|
15363
|
+
Oe.forEach((e) => {
|
|
15367
15364
|
let t = e.position ?? "bottomLeft";
|
|
15368
15365
|
n.has(t) || n.set(t, []), n.get(t).push(e);
|
|
15369
15366
|
}), e.push(...Array.from(n.entries()).map(([e, n]) => ({
|
|
@@ -15377,9 +15374,9 @@ function nm({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15377
15374
|
}))
|
|
15378
15375
|
})));
|
|
15379
15376
|
}
|
|
15380
|
-
let n = [...
|
|
15377
|
+
let n = [..._e.overlays ?? [], ...e];
|
|
15381
15378
|
return n.length ? n : void 0;
|
|
15382
|
-
}, [
|
|
15379
|
+
}, [_e.overlays, Oe]), { mode: Ae, activeSelectionKeys: je, selectionState: Me, handleSelectionChange: Ne } = Jp({ selection: E }), { normalizedActions: Pe, activeAction: Fe, activeActionConfig: J, activeActionBody: Ie, activeKey: Le, runAction: Re, close: ze, getActionContext: Be, getModalActionContext: Ve, getRecordKey: He, formController: Ue } = Gp({
|
|
15383
15380
|
actions: a,
|
|
15384
15381
|
form: o,
|
|
15385
15382
|
editDeepLink: c,
|
|
@@ -15391,66 +15388,66 @@ function nm({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15391
15388
|
onDelete: P,
|
|
15392
15389
|
onComplete: F,
|
|
15393
15390
|
audit: I
|
|
15394
|
-
}),
|
|
15395
|
-
if (D?.(e), !
|
|
15396
|
-
let t =
|
|
15397
|
-
if (
|
|
15398
|
-
|
|
15391
|
+
}), We = Pe.edit, Ge = !!We && (We.kind !== "modal" || !!o), Ke = s((e) => {
|
|
15392
|
+
if (D?.(e), !Ge) return;
|
|
15393
|
+
let t = He(e);
|
|
15394
|
+
if (Fe?.actionKey === "edit" && Fe.record && He(Fe.record) === t) {
|
|
15395
|
+
ze();
|
|
15399
15396
|
return;
|
|
15400
15397
|
}
|
|
15401
|
-
|
|
15398
|
+
Re("edit", e);
|
|
15402
15399
|
}, [
|
|
15403
|
-
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15400
|
+
Fe?.actionKey,
|
|
15401
|
+
Fe?.record,
|
|
15402
|
+
Ge,
|
|
15403
|
+
ze,
|
|
15404
|
+
He,
|
|
15408
15405
|
D,
|
|
15409
|
-
|
|
15410
|
-
]),
|
|
15411
|
-
let i =
|
|
15406
|
+
Re
|
|
15407
|
+
]), qe = D || Ge ? Ke : void 0, Je = s((e, n, r) => {
|
|
15408
|
+
let i = Pe[e];
|
|
15412
15409
|
return !i || !Jf(i, n) ? null : /* @__PURE__ */ t.createElement(Br, {
|
|
15413
15410
|
className: r || (e === "add" ? "btn-primary" : void 0),
|
|
15414
15411
|
icon: i.icon,
|
|
15415
15412
|
label: Xf(e, i, V),
|
|
15416
15413
|
disabled: Yf(i, n),
|
|
15417
|
-
onClick: () =>
|
|
15414
|
+
onClick: () => Re(e, n)
|
|
15418
15415
|
});
|
|
15419
15416
|
}, [
|
|
15420
|
-
|
|
15421
|
-
|
|
15417
|
+
Pe,
|
|
15418
|
+
Re,
|
|
15422
15419
|
V
|
|
15423
|
-
]),
|
|
15420
|
+
]), Ye = p(() => Object.entries(Pe).filter(([e, t]) => e !== "edit" && e !== "delete" && Jf(t, void 0)).map(([e]) => e), [Pe]), Xe = p(() => ({
|
|
15424
15421
|
title: x,
|
|
15425
15422
|
records: U,
|
|
15426
|
-
selection:
|
|
15427
|
-
runAction:
|
|
15423
|
+
selection: Me,
|
|
15424
|
+
runAction: Re
|
|
15428
15425
|
}), [
|
|
15429
15426
|
U,
|
|
15430
|
-
|
|
15431
|
-
|
|
15427
|
+
Re,
|
|
15428
|
+
Me,
|
|
15432
15429
|
x
|
|
15433
|
-
]),
|
|
15430
|
+
]), Ze = p(() => ({
|
|
15434
15431
|
records: U,
|
|
15435
|
-
selection:
|
|
15436
|
-
runAction:
|
|
15432
|
+
selection: Me,
|
|
15433
|
+
runAction: Re
|
|
15437
15434
|
}), [
|
|
15438
15435
|
U,
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
]),
|
|
15436
|
+
Re,
|
|
15437
|
+
Me
|
|
15438
|
+
]), Qe = he.toggle ? /* @__PURE__ */ t.createElement("span", { className: "inline-flex rounded-md border border-border overflow-hidden" }, /* @__PURE__ */ t.createElement(Br, {
|
|
15442
15439
|
icon: "list",
|
|
15443
15440
|
ariaLabel: "Table view",
|
|
15444
15441
|
title: "Table view",
|
|
15445
|
-
className: "rounded-none border-0 " + (
|
|
15446
|
-
onClick: () =>
|
|
15442
|
+
className: "rounded-none border-0 " + (ve === "table" ? "bg-card text-foreground shadow-sm" : "bg-transparent text-muted-foreground"),
|
|
15443
|
+
onClick: () => ye("table")
|
|
15447
15444
|
}), /* @__PURE__ */ t.createElement(Br, {
|
|
15448
15445
|
icon: "layout-grid",
|
|
15449
15446
|
ariaLabel: "Gallery view",
|
|
15450
15447
|
title: "Gallery view",
|
|
15451
|
-
className: "rounded-none border-0 border-l border-border " + (
|
|
15452
|
-
onClick: () =>
|
|
15453
|
-
})) : null,
|
|
15448
|
+
className: "rounded-none border-0 border-l border-border " + (ve === "gallery" ? "bg-card text-foreground shadow-sm" : "bg-transparent text-muted-foreground"),
|
|
15449
|
+
onClick: () => ye("gallery")
|
|
15450
|
+
})) : null, $e = ge.columnPicker && ve === "table" ? /* @__PURE__ */ t.createElement(Ii, {
|
|
15454
15451
|
trigger: {
|
|
15455
15452
|
icon: "columns",
|
|
15456
15453
|
title: "Columns"
|
|
@@ -15464,122 +15461,122 @@ function nm({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15464
15461
|
className: "flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm hover:bg-accent"
|
|
15465
15462
|
}, /* @__PURE__ */ t.createElement("input", {
|
|
15466
15463
|
type: "checkbox",
|
|
15467
|
-
checked: !
|
|
15468
|
-
onChange: () =>
|
|
15464
|
+
checked: !be.has(n),
|
|
15465
|
+
onChange: () => Se(n)
|
|
15469
15466
|
}), e.label);
|
|
15470
|
-
})) : null,
|
|
15467
|
+
})) : null, et = _e.fieldPicker && ve === "gallery" && we.length ? /* @__PURE__ */ t.createElement(Ii, {
|
|
15471
15468
|
trigger: {
|
|
15472
15469
|
icon: "sliders-horizontal",
|
|
15473
15470
|
title: "Fields"
|
|
15474
15471
|
},
|
|
15475
15472
|
triggerClassName: "btn btn-outline-secondary",
|
|
15476
15473
|
position: "end"
|
|
15477
|
-
},
|
|
15474
|
+
}, we.map((e) => {
|
|
15478
15475
|
let n = String(e.key);
|
|
15479
15476
|
return /* @__PURE__ */ t.createElement("label", {
|
|
15480
15477
|
key: n,
|
|
15481
15478
|
className: "flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm hover:bg-accent"
|
|
15482
15479
|
}, /* @__PURE__ */ t.createElement("input", {
|
|
15483
15480
|
type: "checkbox",
|
|
15484
|
-
checked: !
|
|
15485
|
-
onChange: () =>
|
|
15481
|
+
checked: !Te.has(n),
|
|
15482
|
+
onChange: () => De(n)
|
|
15486
15483
|
}), e.label);
|
|
15487
|
-
})) : null,
|
|
15488
|
-
if (u !== void 0) return typeof u == "function" ? u(
|
|
15489
|
-
if (!(!x && !
|
|
15484
|
+
})) : null, tt = p(() => {
|
|
15485
|
+
if (u !== void 0) return typeof u == "function" ? u(Xe) : u;
|
|
15486
|
+
if (!(!x && !me && !le && !Ye.length && !Qe && !$e && !et)) return /* @__PURE__ */ t.createElement(t.Fragment, null, me || le ? /* @__PURE__ */ t.createElement("span", { className: "flex min-w-0 flex-1 items-center gap-3" }, x, me, le) : x || /* @__PURE__ */ t.createElement("span", null), Ye.length || Qe || $e || et ? /* @__PURE__ */ t.createElement("span", { className: "flex flex-wrap items-center gap-2" }, $e, et, Qe, Ye.map((e) => /* @__PURE__ */ t.createElement(t.Fragment, { key: e }, Je(e)))) : null);
|
|
15490
15487
|
}, [
|
|
15491
|
-
qe,
|
|
15492
|
-
u,
|
|
15493
15488
|
Je,
|
|
15489
|
+
u,
|
|
15494
15490
|
Ye,
|
|
15491
|
+
Xe,
|
|
15495
15492
|
x,
|
|
15496
|
-
Ze,
|
|
15497
15493
|
Qe,
|
|
15498
15494
|
$e,
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
|
|
15502
|
-
|
|
15503
|
-
|
|
15504
|
-
|
|
15495
|
+
et,
|
|
15496
|
+
me,
|
|
15497
|
+
le
|
|
15498
|
+
]), nt = p(() => {
|
|
15499
|
+
if (d !== void 0) return typeof d == "function" ? d(Ze) : d;
|
|
15500
|
+
}, [d, Ze]), rt = p(() => {
|
|
15501
|
+
if (!(!Fe || !J || J.kind !== "modal" && J.kind !== "delete")) return Ve(Fe.actionKey, Fe.record);
|
|
15505
15502
|
}, [
|
|
15506
|
-
|
|
15503
|
+
Fe,
|
|
15507
15504
|
J,
|
|
15508
|
-
|
|
15509
|
-
]),
|
|
15510
|
-
if (!(!J || J.kind !== "modal" && J.kind !== "delete" || J.header === void 0 || !
|
|
15511
|
-
}, [J,
|
|
15505
|
+
Ve
|
|
15506
|
+
]), it = p(() => {
|
|
15507
|
+
if (!(!J || J.kind !== "modal" && J.kind !== "delete" || J.header === void 0 || !rt)) return typeof J.header == "function" ? J.header(rt) : J.header;
|
|
15508
|
+
}, [J, rt]), at = p(() => {
|
|
15512
15509
|
if (!(!J || J.kind !== "modal" && J.kind !== "delete")) {
|
|
15513
15510
|
if (J.footer === !1) return !1;
|
|
15514
|
-
if (!(J.footer === void 0 || !
|
|
15511
|
+
if (!(J.footer === void 0 || !rt)) return typeof J.footer == "function" ? J.footer(rt) : J.footer;
|
|
15515
15512
|
}
|
|
15516
|
-
}, [J,
|
|
15513
|
+
}, [J, rt]), ot = Zf(w);
|
|
15517
15514
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ki, {
|
|
15518
15515
|
wrapperClassName: _,
|
|
15519
|
-
header:
|
|
15520
|
-
footer:
|
|
15516
|
+
header: tt,
|
|
15517
|
+
footer: nt,
|
|
15521
15518
|
className: X(R.Grid.Card.className, g ? `sticky-${g}` : "", v),
|
|
15522
15519
|
headerClassName: R.Grid.Card.headerClassName,
|
|
15523
15520
|
bodyClassName: X(R.Grid.Card.bodyClassName, y),
|
|
15524
15521
|
footerClassName: R.Grid.Card.footerClassName,
|
|
15525
15522
|
loading: b || W
|
|
15526
|
-
},
|
|
15527
|
-
records:
|
|
15523
|
+
}, ve === "gallery" ? /* @__PURE__ */ t.createElement(Wp, {
|
|
15524
|
+
records: pe,
|
|
15528
15525
|
recordId: n,
|
|
15529
|
-
sortable:
|
|
15526
|
+
sortable: ot || w,
|
|
15530
15527
|
pagination: T,
|
|
15531
|
-
selection:
|
|
15532
|
-
selectedKeys:
|
|
15533
|
-
onSelectionChange:
|
|
15534
|
-
onRowClick:
|
|
15528
|
+
selection: Ae,
|
|
15529
|
+
selectedKeys: je,
|
|
15530
|
+
onSelectionChange: Ae ? Ne : void 0,
|
|
15531
|
+
onRowClick: qe,
|
|
15535
15532
|
groupBy: A,
|
|
15536
15533
|
wrapperClassName: R.Grid.Gallery.wrapperClassName,
|
|
15537
15534
|
before: S,
|
|
15538
15535
|
after: C,
|
|
15539
|
-
columns:
|
|
15540
|
-
overlays:
|
|
15536
|
+
columns: _e.columns,
|
|
15537
|
+
overlays: ke
|
|
15541
15538
|
}) : /* @__PURE__ */ t.createElement(Qf, {
|
|
15542
|
-
records:
|
|
15539
|
+
records: pe,
|
|
15543
15540
|
recordId: n,
|
|
15544
|
-
columns:
|
|
15545
|
-
runAction:
|
|
15546
|
-
sortable:
|
|
15541
|
+
columns: Ce,
|
|
15542
|
+
runAction: Re,
|
|
15543
|
+
sortable: ot || w,
|
|
15547
15544
|
pagination: T,
|
|
15548
|
-
selection:
|
|
15549
|
-
selectedKeys:
|
|
15550
|
-
onSelectionChange:
|
|
15551
|
-
onRowClick:
|
|
15545
|
+
selection: Ae,
|
|
15546
|
+
selectedKeys: je,
|
|
15547
|
+
onSelectionChange: Ae ? Ne : void 0,
|
|
15548
|
+
onRowClick: qe,
|
|
15552
15549
|
reorderable: O,
|
|
15553
15550
|
onReorder: k,
|
|
15554
|
-
activeKey:
|
|
15551
|
+
activeKey: Le,
|
|
15555
15552
|
groupBy: A,
|
|
15556
15553
|
wrapperClassName: R.Grid.Table.wrapperClassName,
|
|
15557
|
-
className:
|
|
15558
|
-
heightClassName:
|
|
15559
|
-
scrollClassName:
|
|
15560
|
-
headerClassName:
|
|
15554
|
+
className: ge.className,
|
|
15555
|
+
heightClassName: ge.heightClassName,
|
|
15556
|
+
scrollClassName: ge.scrollClassName,
|
|
15557
|
+
headerClassName: ge.headerClassName,
|
|
15561
15558
|
before: S,
|
|
15562
15559
|
after: C
|
|
15563
|
-
})),
|
|
15560
|
+
})), ue, Fe && J && (J.kind === "modal" || J.kind === "delete") && /* @__PURE__ */ t.createElement(Ai, {
|
|
15564
15561
|
size: (J.kind === "modal" || J.kind === "delete") && J.size || R.Grid.Modal.size,
|
|
15565
15562
|
position: (J.kind === "modal" || J.kind === "delete") && J.position || R.Grid.Modal.position,
|
|
15566
|
-
header:
|
|
15567
|
-
title: Yp(
|
|
15568
|
-
onClose:
|
|
15569
|
-
onSave: J.kind === "modal" && J.footer === void 0 && (
|
|
15563
|
+
header: it,
|
|
15564
|
+
title: Yp(Fe.actionKey, J, J.kind === "modal" || J.kind === "delete" ? Ve(Fe.actionKey, Fe.record) : Be(Fe.actionKey, Fe.record), z.deleteConfirm, V),
|
|
15565
|
+
onClose: ze,
|
|
15566
|
+
onSave: J.kind === "modal" && J.footer === void 0 && (Fe.actionKey === "add" || Fe.actionKey === "edit") ? (e) => Ue.save(e) : void 0,
|
|
15570
15567
|
onDelete: J.kind === "delete" ? async () => {
|
|
15571
|
-
let e =
|
|
15568
|
+
let e = Fe.record;
|
|
15572
15569
|
if (!e) return !1;
|
|
15573
|
-
let t = P ? await P({ record: e }) : r ? `${r}/${
|
|
15570
|
+
let t = P ? await P({ record: e }) : r ? `${r}/${He(e)}` : void 0;
|
|
15574
15571
|
if (!t && !P) return !1;
|
|
15575
15572
|
t && await H.remove(t);
|
|
15576
15573
|
let n = await F?.({
|
|
15577
15574
|
record: e,
|
|
15578
15575
|
action: "delete"
|
|
15579
15576
|
}) ?? !0;
|
|
15580
|
-
return n &&
|
|
15581
|
-
} : J.kind === "modal" && J.footer === void 0 &&
|
|
15582
|
-
footer:
|
|
15577
|
+
return n && ze(), n;
|
|
15578
|
+
} : J.kind === "modal" && J.footer === void 0 && Fe.actionKey === "edit" && Fe.record && Pe.delete ? async () => (await Ve(Fe.actionKey, Fe.record).runAction("remove"), !1) : void 0,
|
|
15579
|
+
footer: at,
|
|
15583
15580
|
showCancel: J.kind === "modal" || J.kind === "delete" ? J.footer === void 0 : !0,
|
|
15584
15581
|
allowFullscreen: J.kind === "modal" || J.kind === "delete" ? J.allowFullscreen : !0,
|
|
15585
15582
|
wrapperClassName: R.Grid.Modal.wrapperClassName,
|
|
@@ -15588,7 +15585,7 @@ function nm({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15588
15585
|
titleClassName: R.Grid.Modal.titleClassName,
|
|
15589
15586
|
bodyClassName: R.Grid.Modal.bodyClassName,
|
|
15590
15587
|
footerClassName: R.Grid.Modal.footerClassName
|
|
15591
|
-
},
|
|
15588
|
+
}, Ie));
|
|
15592
15589
|
}
|
|
15593
15590
|
//#endregion
|
|
15594
15591
|
//#region src/components/widgets/grid-core/GridArray.tsx
|
|
@@ -15976,7 +15973,7 @@ var om = () => {
|
|
|
15976
15973
|
let { condition: s, clientCondition: c } = Dm(o);
|
|
15977
15974
|
switch (!0) {
|
|
15978
15975
|
case s.eq !== void 0: return {
|
|
15979
|
-
dbRef: Ve(a,
|
|
15976
|
+
dbRef: Ve(a, Fe(s.eq)),
|
|
15980
15977
|
clientWhere: Em(n, i)
|
|
15981
15978
|
};
|
|
15982
15979
|
case s.gte !== void 0 && s.lte !== void 0:
|
|
@@ -16091,7 +16088,7 @@ var om = () => {
|
|
|
16091
16088
|
read = async (e, { where: t, order: n, toArray: r = !1, exception: i = !1 } = {}) => {
|
|
16092
16089
|
let { dbRef: a, clientWhere: o } = km(He(wm(), e), n, t);
|
|
16093
16090
|
try {
|
|
16094
|
-
let t = await
|
|
16091
|
+
let t = await J(a);
|
|
16095
16092
|
if (t.exists()) {
|
|
16096
16093
|
`${e}`;
|
|
16097
16094
|
let i = Nm(t.val(), o, n);
|