@llmnative/react 1.19.0 → 1.19.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/README.md +4 -2
- package/dist/index.css +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +150 -139
- package/dist/index.mjs.map +1 -1
- package/dist/logHeader-Busbc8OO.mjs.map +1 -1
- package/dist/logHeader-CUsdmGAo.js +2 -0
- package/dist/{logHeader-CbzOhx-u.js.map → logHeader-CUsdmGAo.js.map} +1 -1
- package/dist/vite.js +2 -2
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/vite.mjs.map +1 -1
- package/llms-full.txt +1140 -0
- package/llms.txt +82 -0
- package/package.json +48 -43
- package/scripts/cli/setup-project.js +60 -36
- package/templates/_shared/layouts/Default.tsx +23 -0
- package/templates/_shared/sections/Footer.tsx +9 -0
- package/templates/_shared/sections/Header.tsx +24 -0
- package/templates/_shared/sections/PageHeader.tsx +10 -0
- package/templates/_shared/sections/Sidebar.tsx +22 -0
- package/templates/admin/conf/menu.ts +14 -0
- package/templates/admin/data/mockData.ts +21 -0
- package/templates/admin/pages/home/HomePage.tsx +32 -0
- package/templates/admin/pages/roles/RolesPage.tsx +25 -0
- package/templates/admin/pages/settings/SettingsPage.tsx +24 -0
- package/templates/admin/pages/users/UsersPage.tsx +54 -0
- package/templates/blank/conf/menu.ts +8 -0
- package/templates/blank/data/mockData.ts +6 -0
- package/templates/blank/pages/home/HomePage.tsx +25 -0
- package/templates/crm/conf/menu.ts +14 -0
- package/templates/crm/data/mockData.ts +24 -0
- package/templates/crm/pages/companies/CompaniesPage.tsx +42 -0
- package/templates/crm/pages/contacts/ContactsPage.tsx +48 -0
- package/templates/crm/pages/deals/DealsPage.tsx +61 -0
- package/templates/crm/pages/home/HomePage.tsx +35 -0
- package/templates/inventory/conf/menu.ts +12 -0
- package/templates/inventory/data/mockData.ts +16 -0
- package/templates/inventory/pages/categories/CategoriesPage.tsx +23 -0
- package/templates/inventory/pages/home/HomePage.tsx +35 -0
- package/templates/inventory/pages/products/ProductsPage.tsx +56 -0
- package/templates/project/conf/menu.ts +14 -0
- package/templates/project/data/mockData.ts +21 -0
- package/templates/project/pages/home/HomePage.tsx +33 -0
- package/templates/project/pages/projects/ProjectsPage.tsx +50 -0
- package/templates/project/pages/tasks/TasksPage.tsx +67 -0
- package/templates/project/pages/team/TeamPage.tsx +25 -0
- package/dist/logHeader-CbzOhx-u.js +0 -2
package/dist/index.mjs
CHANGED
|
@@ -288,9 +288,10 @@ var pt = (e, t) => e.split(t).length - 1, mt = (e, t) => e.replace(/\$(\d+)/g, (
|
|
|
288
288
|
let n = /* @__PURE__ */ new Set();
|
|
289
289
|
return e.filter((e) => {
|
|
290
290
|
let r = e[t];
|
|
291
|
-
return n.has(r)
|
|
291
|
+
return !n.has(r) && (n.add(r), !0);
|
|
292
292
|
});
|
|
293
|
-
}
|
|
293
|
+
}
|
|
294
|
+
return [...new Set(e)];
|
|
294
295
|
}, St = (e) => e == null || e === "" || e === !1 || e === "0" || e === 0 || typeof e == "object" && !!e && Object.keys(e).length === 0;
|
|
295
296
|
function Ct(e, n = /* @__PURE__ */ new WeakMap()) {
|
|
296
297
|
if (typeof e != "object" || !e || t.isValidElement(e)) return e;
|
|
@@ -364,7 +365,7 @@ var kt = (e) => {
|
|
|
364
365
|
let n = At(e, t);
|
|
365
366
|
return n ? URL.createObjectURL(n) : void 0;
|
|
366
367
|
}, Mt = (e, t) => {
|
|
367
|
-
if (
|
|
368
|
+
if (e && t) return t.split(".").reduce((e, t) => {
|
|
368
369
|
if (e != null && !(typeof e != "object" || Array.isArray(e))) return e[t];
|
|
369
370
|
}, e);
|
|
370
371
|
}, Nt = (e) => {
|
|
@@ -396,7 +397,7 @@ function Ft(e, t) {
|
|
|
396
397
|
for (let e of a) {
|
|
397
398
|
if (!e) continue;
|
|
398
399
|
let t = r[e], n = i[e];
|
|
399
|
-
if (
|
|
400
|
+
if ((t !== void 0 || n !== void 0) && !Ft(t, n)) return !1;
|
|
400
401
|
}
|
|
401
402
|
return !0;
|
|
402
403
|
}
|
|
@@ -441,26 +442,28 @@ async function Ut(e, t = null, n = globalThis.fetch) {
|
|
|
441
442
|
headers: t?.headers || {},
|
|
442
443
|
signal: t?.signal
|
|
443
444
|
};
|
|
444
|
-
if (t?.body)
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
445
|
+
if (t?.body) {
|
|
446
|
+
if (["GET", "HEAD"].includes(r.method)) e += (e.includes("?") ? "&" : "?") + new URLSearchParams(t.body);
|
|
447
|
+
else switch (Ht(t)) {
|
|
448
|
+
case "application/json":
|
|
449
|
+
r.body = JSON.stringify(t.body);
|
|
450
|
+
break;
|
|
451
|
+
case "application/x-www-form-urlencoded":
|
|
452
|
+
r.body = new URLSearchParams(t.body);
|
|
453
|
+
break;
|
|
454
|
+
case "multipart/form-data": {
|
|
455
|
+
let e = new FormData(), n = t.body;
|
|
456
|
+
for (let t in n) e.append(t, n[t]);
|
|
457
|
+
r.body = e;
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
case "text/html":
|
|
461
|
+
case "text/plain":
|
|
462
|
+
if (typeof t.body != "string") throw Error("Fetch: Body must be a string for text/plain or text/html content types.");
|
|
463
|
+
r.body = t.body;
|
|
464
|
+
break;
|
|
465
|
+
default: throw Error("Fetch: Unsupported Content-Type");
|
|
457
466
|
}
|
|
458
|
-
case "text/html":
|
|
459
|
-
case "text/plain":
|
|
460
|
-
if (typeof t.body != "string") throw Error("Fetch: Body must be a string for text/plain or text/html content types.");
|
|
461
|
-
r.body = t.body;
|
|
462
|
-
break;
|
|
463
|
-
default: throw Error("Fetch: Unsupported Content-Type");
|
|
464
467
|
}
|
|
465
468
|
return n(e, r).then((e) => {
|
|
466
469
|
if (!e.ok) return e.text().then((t) => {
|
|
@@ -484,7 +487,8 @@ async function Ut(e, t = null, n = globalThis.fetch) {
|
|
|
484
487
|
if (n === "application/json" && (a.startsWith("{") || a.startsWith("["))) {
|
|
485
488
|
let t = JSON.parse(a);
|
|
486
489
|
return console.warn("fetch: Error", Vt(e), Bt(r), i.status, t), t;
|
|
487
|
-
}
|
|
490
|
+
}
|
|
491
|
+
{
|
|
488
492
|
let o = t?.headers?.Accept?.split(";")[0] || "", s = o === n ? o === "application/json" ? "Request Accept header is application/json but response is not JSON" : null : "Request Accept header does not match response Content-Type (Accept: " + o + ", Content-Type: " + n + ")";
|
|
489
493
|
return console.warn(`fetch: ${s}`, Vt(e), Bt(r), i.status, a), s && o === "application/json" ? {
|
|
490
494
|
error: a,
|
|
@@ -2302,7 +2306,7 @@ function dn(e) {
|
|
|
2302
2306
|
}
|
|
2303
2307
|
var fn = "llmnative.theme.activeTheme", pn = "llmnative.theme.mode";
|
|
2304
2308
|
function mn(e) {
|
|
2305
|
-
if (
|
|
2309
|
+
if (typeof window < "u") try {
|
|
2306
2310
|
let t = window.localStorage.getItem(fn);
|
|
2307
2311
|
return t && e[t] ? t : void 0;
|
|
2308
2312
|
} catch {
|
|
@@ -2310,7 +2314,7 @@ function mn(e) {
|
|
|
2310
2314
|
}
|
|
2311
2315
|
}
|
|
2312
2316
|
function hn() {
|
|
2313
|
-
if (
|
|
2317
|
+
if (typeof window < "u") try {
|
|
2314
2318
|
let e = window.localStorage.getItem(pn);
|
|
2315
2319
|
return e === "light" || e === "dark" || e === "system" ? e : void 0;
|
|
2316
2320
|
} catch {
|
|
@@ -2318,7 +2322,7 @@ function hn() {
|
|
|
2318
2322
|
}
|
|
2319
2323
|
}
|
|
2320
2324
|
function gn(e, t) {
|
|
2321
|
-
if (
|
|
2325
|
+
if (typeof window < "u") try {
|
|
2322
2326
|
window.localStorage.setItem(fn, e), window.localStorage.setItem(pn, t);
|
|
2323
2327
|
} catch {}
|
|
2324
2328
|
}
|
|
@@ -2648,14 +2652,14 @@ function On(e, t) {
|
|
|
2648
2652
|
};
|
|
2649
2653
|
return r(e, t);
|
|
2650
2654
|
}
|
|
2651
|
-
var kn = "llmnative_locale", An =
|
|
2655
|
+
var kn = "llmnative_locale", An = 31536e3;
|
|
2652
2656
|
function jn() {
|
|
2653
2657
|
if (typeof document > "u") return null;
|
|
2654
2658
|
let e = document.cookie.match(/(?:^|;\s*)llmnative_locale=([^;]+)/);
|
|
2655
2659
|
return e ? decodeURIComponent(e[1]) : null;
|
|
2656
2660
|
}
|
|
2657
2661
|
function Mn(e) {
|
|
2658
|
-
typeof document
|
|
2662
|
+
typeof document < "u" && (document.cookie = `${kn}=${encodeURIComponent(e)}; max-age=${An}; path=/; SameSite=Lax`);
|
|
2659
2663
|
}
|
|
2660
2664
|
var Nn = a(null), Pn = ({ children: e, config: n }) => {
|
|
2661
2665
|
let [r, i] = h({}), a = p(() => {
|
|
@@ -2745,7 +2749,7 @@ var In = "mx-auto w-full px-3 sm:max-w-[540px] md:max-w-[720px] lg:max-w-[960px]
|
|
|
2745
2749
|
}, e), Jn = ({ children: e = void 0, className: n = void 0, style: r = void 0, defaultSize: i = void 0, xxl: a = void 0, xl: o = void 0, lg: s = void 0, md: c = void 0, sm: l = void 0, xs: u = void 0 }) => {
|
|
2746
2750
|
let d = u ?? i, f = [
|
|
2747
2751
|
Rn,
|
|
2748
|
-
d
|
|
2752
|
+
d === void 0 && l === void 0 && c === void 0 && s === void 0 && o === void 0 && a === void 0 ? zn : d === void 0 ? Bn : Gn("xs", d),
|
|
2749
2753
|
l === void 0 ? void 0 : Gn("sm", l),
|
|
2750
2754
|
c === void 0 ? void 0 : Gn("md", c),
|
|
2751
2755
|
s === void 0 ? void 0 : Gn("lg", s),
|
|
@@ -2764,7 +2768,7 @@ function Yn(e) {
|
|
|
2764
2768
|
return typeof e == "object" && !!e && !t.isValidElement(e) && "content" in e;
|
|
2765
2769
|
}
|
|
2766
2770
|
function Xn(e, t = "info", n) {
|
|
2767
|
-
if (
|
|
2771
|
+
if (e != null && e !== !1) return Yn(e) ? {
|
|
2768
2772
|
...e,
|
|
2769
2773
|
variant: e.variant || t,
|
|
2770
2774
|
className: X(e.className, n)
|
|
@@ -2929,7 +2933,8 @@ function ur(e) {
|
|
|
2929
2933
|
var dr = class {
|
|
2930
2934
|
id = "lucide";
|
|
2931
2935
|
resolve(e) {
|
|
2932
|
-
|
|
2936
|
+
let t = lr[e] ?? ur(e);
|
|
2937
|
+
return T[t] ?? null;
|
|
2933
2938
|
}
|
|
2934
2939
|
}, fr = {
|
|
2935
2940
|
add: "Plus",
|
|
@@ -2975,13 +2980,13 @@ var mr = class {
|
|
|
2975
2980
|
resolve(e) {
|
|
2976
2981
|
let n = this._cache.get(e);
|
|
2977
2982
|
if (n) return n;
|
|
2978
|
-
let r =
|
|
2979
|
-
if (!
|
|
2980
|
-
let
|
|
2981
|
-
weight:
|
|
2983
|
+
let r = fr[e] ?? pr(e), i = A[r];
|
|
2984
|
+
if (!i) return null;
|
|
2985
|
+
let a = this.weight, o = (e) => t.createElement(i, {
|
|
2986
|
+
weight: a,
|
|
2982
2987
|
...e
|
|
2983
2988
|
});
|
|
2984
|
-
return this._cache.set(e,
|
|
2989
|
+
return this._cache.set(e, o), o;
|
|
2985
2990
|
}
|
|
2986
2991
|
}, hr = t.createContext(null), gr = t.createContext(null), _r = {
|
|
2987
2992
|
lucide: new dr(),
|
|
@@ -3301,7 +3306,7 @@ var Tr = new dr(), Q = ({ name: e, size: n = 16, className: r, style: i, provide
|
|
|
3301
3306
|
}
|
|
3302
3307
|
_(e);
|
|
3303
3308
|
let n = Number(localStorage.getItem(D) || 0);
|
|
3304
|
-
n && Date.now() - n <
|
|
3309
|
+
n && Date.now() - n < 864e5 || fetch(e).then((e) => {
|
|
3305
3310
|
if (!e.ok) throw Error(`HTTP ${e.status}`);
|
|
3306
3311
|
return e.blob();
|
|
3307
3312
|
}).then((e) => {
|
|
@@ -3368,7 +3373,7 @@ var Tr = new dr(), Q = ({ name: e, size: n = 16, className: r, style: i, provide
|
|
|
3368
3373
|
return { configured: !0 };
|
|
3369
3374
|
}, ci = "/__/authorize", li = "auths";
|
|
3370
3375
|
function ui() {
|
|
3371
|
-
let e = new Uint32Array(
|
|
3376
|
+
let e = /* @__PURE__ */ new Uint32Array(28);
|
|
3372
3377
|
return window.crypto.getRandomValues(e), Array.from(e, (e) => `0${e.toString(16)}`.substr(-2)).join("");
|
|
3373
3378
|
}
|
|
3374
3379
|
async function di(e) {
|
|
@@ -3440,7 +3445,7 @@ var mi = (e, t, n) => {
|
|
|
3440
3445
|
}
|
|
3441
3446
|
}).then((n) => (mi(e, t, n), n.access_token)).catch((e) => (console.error("Error:", e), localStorage.removeItem(li), null)), _i = (e, t = !0) => {
|
|
3442
3447
|
let [n] = Xr(li), r = n?.[e] || {}, i = Math.floor(Date.now() / 1e3) >= (r?.iat ?? 0) + (r?.expires_in ?? 0);
|
|
3443
|
-
return !!(r && r?.access_token && (!i || t && i && r.refresh_token && (gi(r.server ?? "", r.client_id ?? "", r.refresh_token) ||
|
|
3448
|
+
return !!(r && r?.access_token && (!i || t && i && r.refresh_token && (gi(r.server ?? "", r.client_id ?? "", r.refresh_token) || 1)));
|
|
3444
3449
|
}, vi = (e) => Zr(li)?.[e], yi = (e) => {
|
|
3445
3450
|
let t = Zr(li) || {};
|
|
3446
3451
|
t[e] && (delete t[e], Qr(t, li));
|
|
@@ -3520,7 +3525,7 @@ var mi = (e, t, n) => {
|
|
|
3520
3525
|
cursor: "not-allowed"
|
|
3521
3526
|
},
|
|
3522
3527
|
onClick: (e) => {
|
|
3523
|
-
e.preventDefault(), e.stopPropagation(),
|
|
3528
|
+
e.preventDefault(), e.stopPropagation(), b && !f && E((e) => !e);
|
|
3524
3529
|
}
|
|
3525
3530
|
}, /* @__PURE__ */ t.createElement(ii, {
|
|
3526
3531
|
src: x?.photoURL ?? "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='50' fill='%23eef2f7'/%3E%3Ccircle cx='50' cy='38' r='16' fill='%2364758b'/%3E%3Cpath d='M22 84c3.8-20 19-31 28-31s24.2 11 28 31c.5 2.8-1.7 5-4.5 5h-47c-2.8 0-5-2.2-4.5-5z' fill='%2364758b'/%3E%3C/svg%3E",
|
|
@@ -4797,10 +4802,10 @@ var za = "_key", Ba = (e) => e.replace(/^\/+|\/+$/g, ""), Va = (e) => Ba(e).spli
|
|
|
4797
4802
|
...t.data()
|
|
4798
4803
|
};
|
|
4799
4804
|
}
|
|
4800
|
-
let s = Ga(t, n), c =
|
|
4801
|
-
`${
|
|
4802
|
-
let
|
|
4803
|
-
return r ?
|
|
4805
|
+
let s = Ga(t, n), c = s.length ? pe(ae(o, a), ...s) : ae(o, a), l = await ue(c);
|
|
4806
|
+
`${l.size}${e}`;
|
|
4807
|
+
let u = qa(l);
|
|
4808
|
+
return r ? u : Ja(u);
|
|
4804
4809
|
} catch (t) {
|
|
4805
4810
|
Ua(`reading data in Firestore for ${e}`, t, i);
|
|
4806
4811
|
}
|
|
@@ -4859,8 +4864,8 @@ var za = "_key", Ba = (e) => e.replace(/^\/+|\/+$/g, ""), Va = (e) => Ba(e).spli
|
|
|
4859
4864
|
...e.data()
|
|
4860
4865
|
}]);
|
|
4861
4866
|
}, (e) => console.error("Firestore onSnapshot error:", e));
|
|
4862
|
-
let c = Ga(n, r);
|
|
4863
|
-
return fe(
|
|
4867
|
+
let c = Ga(n, r), l = c.length ? pe(ae(o, s), ...c) : ae(o, s);
|
|
4868
|
+
return fe(l, (e) => {
|
|
4864
4869
|
if (e.metadata?.fromCache && e.size === 0) return;
|
|
4865
4870
|
let n = qa(e, i);
|
|
4866
4871
|
if (a) {
|
|
@@ -5234,7 +5239,7 @@ var go = class {
|
|
|
5234
5239
|
}
|
|
5235
5240
|
}
|
|
5236
5241
|
saveStore() {
|
|
5237
|
-
if (
|
|
5242
|
+
if (this.persistKey && typeof window < "u") try {
|
|
5238
5243
|
window.localStorage.setItem(this.persistKey, JSON.stringify(this.store));
|
|
5239
5244
|
} catch {}
|
|
5240
5245
|
}
|
|
@@ -5345,7 +5350,11 @@ var yo = (e) => e ? Ce(P(), e) : Ce(), bo = (e) => ({
|
|
|
5345
5350
|
upload = async (e, t, n = {}) => {
|
|
5346
5351
|
if (e) try {
|
|
5347
5352
|
let r = Te(yo(this.resolveBucket(n.bucket)), t);
|
|
5348
|
-
|
|
5353
|
+
if (typeof e == "string") {
|
|
5354
|
+
let t = await De(r, e, "data_url");
|
|
5355
|
+
return await xe(t.ref);
|
|
5356
|
+
}
|
|
5357
|
+
return await new Promise((t, i) => {
|
|
5349
5358
|
let a = n.contentType ? { contentType: n.contentType } : e instanceof File && e.type ? { contentType: e.type } : void 0, o = Ee(r, e, a);
|
|
5350
5359
|
n.onProgress && o.on("state_changed", (e) => {
|
|
5351
5360
|
let t = e.totalBytes > 0 ? Math.round(e.bytesTransferred / e.totalBytes * 100) : 0;
|
|
@@ -5363,7 +5372,8 @@ var yo = (e) => e ? Ce(P(), e) : Ce(), bo = (e) => ({
|
|
|
5363
5372
|
return {
|
|
5364
5373
|
url: (async () => {
|
|
5365
5374
|
if (!t) try {
|
|
5366
|
-
|
|
5375
|
+
let t = await De(r, e, "data_url");
|
|
5376
|
+
return await xe(t.ref);
|
|
5367
5377
|
} catch {
|
|
5368
5378
|
return;
|
|
5369
5379
|
}
|
|
@@ -5375,26 +5385,26 @@ var yo = (e) => e ? Ce(P(), e) : Ce(), bo = (e) => ({
|
|
|
5375
5385
|
}
|
|
5376
5386
|
};
|
|
5377
5387
|
}
|
|
5378
|
-
let i =
|
|
5379
|
-
return n.onProgress &&
|
|
5388
|
+
let i = n.contentType ? { contentType: n.contentType } : e instanceof File && e.type ? { contentType: e.type } : void 0, a = Ee(r, e, i);
|
|
5389
|
+
return n.onProgress && a.on("state_changed", (e) => {
|
|
5380
5390
|
let t = e.totalBytes > 0 ? Math.round(e.bytesTransferred / e.totalBytes * 100) : 0;
|
|
5381
5391
|
n.onProgress(t);
|
|
5382
5392
|
}), {
|
|
5383
5393
|
url: (async () => {
|
|
5384
5394
|
try {
|
|
5385
|
-
return await xe((await
|
|
5395
|
+
return await xe((await a).ref);
|
|
5386
5396
|
} catch {
|
|
5387
5397
|
return;
|
|
5388
5398
|
}
|
|
5389
5399
|
})(),
|
|
5390
5400
|
pause: () => {
|
|
5391
|
-
|
|
5401
|
+
a.pause();
|
|
5392
5402
|
},
|
|
5393
5403
|
resume: () => {
|
|
5394
|
-
|
|
5404
|
+
a.resume();
|
|
5395
5405
|
},
|
|
5396
5406
|
cancel: () => {
|
|
5397
|
-
|
|
5407
|
+
a.cancel();
|
|
5398
5408
|
}
|
|
5399
5409
|
};
|
|
5400
5410
|
};
|
|
@@ -5468,16 +5478,16 @@ var yo = (e) => e ? Ce(P(), e) : Ce(), bo = (e) => ({
|
|
|
5468
5478
|
};
|
|
5469
5479
|
_deleteFolder = async (e, t) => {
|
|
5470
5480
|
try {
|
|
5471
|
-
let
|
|
5472
|
-
await Promise.all(
|
|
5481
|
+
let n = Te(yo(this.resolveBucket(t.bucket)), e), { items: r, prefixes: i } = await we(n), a = 0;
|
|
5482
|
+
await Promise.all(r.map(async (e) => {
|
|
5473
5483
|
try {
|
|
5474
|
-
await be(e),
|
|
5484
|
+
await be(e), a++;
|
|
5475
5485
|
} catch (t) {
|
|
5476
5486
|
t.code !== "storage/object-not-found" && console.error(`[FirebaseStorage] delete failed for ${e.fullPath}:`, t);
|
|
5477
5487
|
}
|
|
5478
5488
|
}));
|
|
5479
|
-
let
|
|
5480
|
-
return
|
|
5489
|
+
let o = await Promise.all(i.map((e) => this._deleteFolder(e.fullPath, t)));
|
|
5490
|
+
return a + o.reduce((e, t) => e + t, 0);
|
|
5481
5491
|
} catch (t) {
|
|
5482
5492
|
return console.error(`[FirebaseStorage] deleteFolder error for ${e}:`, t), 0;
|
|
5483
5493
|
}
|
|
@@ -5486,14 +5496,14 @@ var yo = (e) => e ? Ce(P(), e) : Ce(), bo = (e) => ({
|
|
|
5486
5496
|
_listLevel = async (e, t) => {
|
|
5487
5497
|
let n = t.includeFiles !== !1, r = t.includeFolders === !0;
|
|
5488
5498
|
try {
|
|
5489
|
-
let
|
|
5499
|
+
let i = Te(yo(this.resolveBucket(t.bucket)), e), { items: a, prefixes: o } = await we(i), s = n ? t.metadata ? await Promise.all(a.map(xo)) : a.map(bo) : [], c = r ? o.map((e) => ({
|
|
5490
5500
|
name: e.name,
|
|
5491
5501
|
path: e.fullPath,
|
|
5492
5502
|
isFolder: !0
|
|
5493
|
-
})) : [],
|
|
5494
|
-
if (!t.recursive ||
|
|
5495
|
-
let
|
|
5496
|
-
return [...
|
|
5503
|
+
})) : [], l = [...s, ...c];
|
|
5504
|
+
if (!t.recursive || o.length === 0) return l;
|
|
5505
|
+
let u = await Promise.all(o.map((e) => this._listLevel(e.fullPath, t)));
|
|
5506
|
+
return [...l, ...u.flat()];
|
|
5497
5507
|
} catch (t) {
|
|
5498
5508
|
return console.error(`[FirebaseStorage] list error for ${e}:`, t), [];
|
|
5499
5509
|
}
|
|
@@ -5901,10 +5911,13 @@ var Po = {
|
|
|
5901
5911
|
size: 16,
|
|
5902
5912
|
className: "shrink-0"
|
|
5903
5913
|
}), e);
|
|
5904
|
-
if (i === "fixed")
|
|
5905
|
-
let e =
|
|
5906
|
-
|
|
5907
|
-
|
|
5914
|
+
if (i === "fixed") {
|
|
5915
|
+
let e = (() => {
|
|
5916
|
+
let e = "__alert-portal-fixed__", t = document.getElementById(e);
|
|
5917
|
+
return t || (t = document.createElement("div"), t.id = e, t.style.cssText = "position:fixed;top:0;left:0;right:0;z-index:9999;width:100%", document.body.appendChild(t)), t;
|
|
5918
|
+
})();
|
|
5919
|
+
return j(b, e);
|
|
5920
|
+
}
|
|
5908
5921
|
if (i === "sticky") return _ ? j(b, _) : null;
|
|
5909
5922
|
let x = p ?? (u || d ? "flex items-center gap-2" : void 0);
|
|
5910
5923
|
return /* @__PURE__ */ t.createElement(Z, { className: x }, u, b, d);
|
|
@@ -6292,7 +6305,7 @@ var as = "mb-1 block text-sm font-medium leading-5 text-foreground", os = "mt-1
|
|
|
6292
6305
|
name: e,
|
|
6293
6306
|
value: T,
|
|
6294
6307
|
handleChange: E
|
|
6295
|
-
}), M =
|
|
6308
|
+
}), M = !(w !== "floating" || !a || d || f || p), N = M ? " " : i;
|
|
6296
6309
|
return /* @__PURE__ */ t.createElement(Z, { className: D }, !M && a && /* @__PURE__ */ t.createElement(Is, {
|
|
6297
6310
|
label: a,
|
|
6298
6311
|
required: s,
|
|
@@ -6467,7 +6480,7 @@ var as = "mb-1 block text-sm font-medium leading-5 text-foreground", os = "mt-1
|
|
|
6467
6480
|
name: e,
|
|
6468
6481
|
value: D,
|
|
6469
6482
|
handleChange: O
|
|
6470
|
-
}), F = t.useRef(null), I =
|
|
6483
|
+
}), F = t.useRef(null), I = !(E !== "floating" || !a || m || h), L = I ? " " : i;
|
|
6471
6484
|
return l(() => {
|
|
6472
6485
|
if (!F.current) return;
|
|
6473
6486
|
let e = F.current;
|
|
@@ -7001,7 +7014,7 @@ var uc = a(null), dc = ({ registry: e, defaultKey: n, children: r }) => {
|
|
|
7001
7014
|
let t, n = !1;
|
|
7002
7015
|
return (async () => {
|
|
7003
7016
|
let [{ default: a }] = await Promise.all([import("tui-image-editor"), import("tui-image-editor/dist/tui-image-editor.css")]);
|
|
7004
|
-
n
|
|
7017
|
+
!n && f.current && (t = new a(f.current, {
|
|
7005
7018
|
cssMaxWidth: r,
|
|
7006
7019
|
cssMaxHeight: i,
|
|
7007
7020
|
selectionStyle: {
|
|
@@ -7037,7 +7050,7 @@ var uc = a(null), dc = ({ registry: e, defaultKey: n, children: r }) => {
|
|
|
7037
7050
|
}, [r, i]);
|
|
7038
7051
|
let y = s(() => {
|
|
7039
7052
|
let t = p.current;
|
|
7040
|
-
|
|
7053
|
+
e && t && t.loadImageFromURL(e, "Sample Image").then(() => {
|
|
7041
7054
|
o?.(), t.clearUndoStack(), t.clearRedoStack();
|
|
7042
7055
|
}).catch((e) => {
|
|
7043
7056
|
console.error("Error loading image:", e);
|
|
@@ -7092,14 +7105,11 @@ var uc = a(null), dc = ({ registry: e, defaultKey: n, children: r }) => {
|
|
|
7092
7105
|
break;
|
|
7093
7106
|
case "circle":
|
|
7094
7107
|
case "rect":
|
|
7095
|
-
case "triangle":
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
}), n.startDrawingMode("SHAPE");
|
|
7101
|
-
break;
|
|
7102
|
-
default: break;
|
|
7108
|
+
case "triangle": n.setDrawingShape(t, {
|
|
7109
|
+
fill: g.fill,
|
|
7110
|
+
stroke: g.color,
|
|
7111
|
+
strokeWidth: 3
|
|
7112
|
+
}), n.startDrawingMode("SHAPE");
|
|
7103
7113
|
}
|
|
7104
7114
|
};
|
|
7105
7115
|
l(() => {
|
|
@@ -7504,7 +7514,7 @@ var uc = a(null), dc = ({ registry: e, defaultKey: n, children: r }) => {
|
|
|
7504
7514
|
let t = c.current;
|
|
7505
7515
|
if (!t) return;
|
|
7506
7516
|
let { width: n, height: r } = t.getBoundingClientRect();
|
|
7507
|
-
if (
|
|
7517
|
+
if (n && r && (D((e) => e && e.width === n && e.height === r ? e : {
|
|
7508
7518
|
width: n,
|
|
7509
7519
|
height: r
|
|
7510
7520
|
}), !M.current[v])) {
|
|
@@ -8408,7 +8418,7 @@ var ll = (e, t) => {
|
|
|
8408
8418
|
...c instanceof ReadableStream ? { duplex: "half" } : {},
|
|
8409
8419
|
signal: t?.signal ?? (e instanceof Request ? e.signal : void 0)
|
|
8410
8420
|
});
|
|
8411
|
-
}, ul = () => ll, dl = () => !!sl?.enabled, fl = "https://models.dev/api.json", pl = "ai.pricing.modelsdev", ml =
|
|
8421
|
+
}, ul = () => ll, dl = () => !!sl?.enabled, fl = "https://models.dev/api.json", pl = "ai.pricing.modelsdev", ml = 864e5, hl = {
|
|
8412
8422
|
openai: ["openai"],
|
|
8413
8423
|
openrouter: ["openrouter"],
|
|
8414
8424
|
opencode: ["opencode"],
|
|
@@ -8430,7 +8440,7 @@ var ll = (e, t) => {
|
|
|
8430
8440
|
return null;
|
|
8431
8441
|
}
|
|
8432
8442
|
}, vl = (e) => {
|
|
8433
|
-
if (
|
|
8443
|
+
if (typeof localStorage < "u") try {
|
|
8434
8444
|
localStorage.setItem(pl, JSON.stringify({
|
|
8435
8445
|
fetchedAt: Date.now(),
|
|
8436
8446
|
index: e
|
|
@@ -8486,7 +8496,7 @@ var ll = (e, t) => {
|
|
|
8486
8496
|
pricing: r
|
|
8487
8497
|
} : t;
|
|
8488
8498
|
});
|
|
8489
|
-
}, wl = "ai.models.v3.", Tl =
|
|
8499
|
+
}, wl = "ai.models.v3.", Tl = 864e5, El = (e) => {
|
|
8490
8500
|
if (e instanceof Error) return e.message;
|
|
8491
8501
|
if (typeof e == "object" && e) {
|
|
8492
8502
|
let t = e;
|
|
@@ -8522,7 +8532,7 @@ var ll = (e, t) => {
|
|
|
8522
8532
|
return null;
|
|
8523
8533
|
}
|
|
8524
8534
|
}, Al = (e, t) => {
|
|
8525
|
-
if (
|
|
8535
|
+
if (typeof localStorage < "u") try {
|
|
8526
8536
|
localStorage.setItem(`${wl}${e}`, JSON.stringify({
|
|
8527
8537
|
fetchedAt: Date.now(),
|
|
8528
8538
|
items: t
|
|
@@ -8550,7 +8560,7 @@ var ll = (e, t) => {
|
|
|
8550
8560
|
}
|
|
8551
8561
|
})), r = n.reduce((e, [t, n]) => (e[t] = n, e), {}), i = n.reduce((e, [t, n]) => (e[t] = n.models, e), {}), a = /* @__PURE__ */ new Set();
|
|
8552
8562
|
return {
|
|
8553
|
-
models: n.flatMap(([, e]) => e.models).filter((e) => a.has(e.id)
|
|
8563
|
+
models: n.flatMap(([, e]) => e.models).filter((e) => !a.has(e.id) && (a.add(e.id), !0)),
|
|
8554
8564
|
modelsByProvider: i,
|
|
8555
8565
|
capabilitiesByProvider: r
|
|
8556
8566
|
};
|
|
@@ -8865,13 +8875,13 @@ var ll = (e, t) => {
|
|
|
8865
8875
|
]);
|
|
8866
8876
|
d(_, () => ({
|
|
8867
8877
|
moveNext: () => {
|
|
8868
|
-
|
|
8878
|
+
D.open && O.length !== 0 && C((e) => (e + 1) % O.length);
|
|
8869
8879
|
},
|
|
8870
8880
|
movePrev: () => {
|
|
8871
|
-
|
|
8881
|
+
D.open && O.length !== 0 && C((e) => (e - 1 + O.length) % O.length);
|
|
8872
8882
|
},
|
|
8873
8883
|
selectActive: () => {
|
|
8874
|
-
|
|
8884
|
+
D.open && O.length !== 0 && A(O[S] ?? O[0]);
|
|
8875
8885
|
},
|
|
8876
8886
|
close: () => {
|
|
8877
8887
|
k();
|
|
@@ -8906,7 +8916,7 @@ var ll = (e, t) => {
|
|
|
8906
8916
|
return;
|
|
8907
8917
|
}
|
|
8908
8918
|
let a = eu(n, i), o = tu(n, e);
|
|
8909
|
-
|
|
8919
|
+
a && o && T({
|
|
8910
8920
|
open: !0,
|
|
8911
8921
|
anchorPosition: a,
|
|
8912
8922
|
query: i.query,
|
|
@@ -9055,9 +9065,9 @@ function hu({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9055
9065
|
}));
|
|
9056
9066
|
R((e) => [...e, ...t]);
|
|
9057
9067
|
}, []), le = s((e) => {
|
|
9058
|
-
|
|
9068
|
+
f && e.dataTransfer.types.includes("Files") && (e.preventDefault(), V.current += 1, B(!0));
|
|
9059
9069
|
}, [f]), ue = s((e) => {
|
|
9060
|
-
|
|
9070
|
+
f && e.dataTransfer.types.includes("Files") && e.preventDefault();
|
|
9061
9071
|
}, [f]), de = s((e) => {
|
|
9062
9072
|
f && (e.preventDefault(), V.current = Math.max(0, V.current - 1), V.current === 0 && B(!1));
|
|
9063
9073
|
}, [f]), fe = s((e) => {
|
|
@@ -9921,7 +9931,7 @@ var Eu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9921
9931
|
return;
|
|
9922
9932
|
}
|
|
9923
9933
|
let r = e.view.coordsAtPos(t.from), i = td(e.view, ee);
|
|
9924
|
-
|
|
9934
|
+
r && i && H({
|
|
9925
9935
|
open: !0,
|
|
9926
9936
|
query: n.query,
|
|
9927
9937
|
anchorPosition: {
|
|
@@ -10251,7 +10261,7 @@ var Eu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10251
10261
|
gridTemplateColumns: `repeat(${ld}, 18px)`,
|
|
10252
10262
|
width: "fit-content"
|
|
10253
10263
|
}
|
|
10254
|
-
}, Array.from({ length:
|
|
10264
|
+
}, Array.from({ length: 64 }, (e, n) => {
|
|
10255
10265
|
let r = Math.floor(n / ld) + 1, c = n % ld + 1, u = r <= i && c <= o;
|
|
10256
10266
|
return /* @__PURE__ */ t.createElement("button", {
|
|
10257
10267
|
key: `${r}-${c}`,
|
|
@@ -10778,7 +10788,7 @@ var Eu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10778
10788
|
}
|
|
10779
10789
|
}), pe = m(r);
|
|
10780
10790
|
l(() => {
|
|
10781
|
-
|
|
10791
|
+
q && r !== pe.current && (pe.current = r, r !== (i === "json" ? JSON.stringify(q.getJSON()) : i === "text" ? q.getText() : q.getHTML().replace(/<a([^>]*?)data-href="([^"]*?)"/g, "<a$1href=\"$2\"").replace(/data-target="([^"]*?)"/g, "target=\"$1\"")) && q.commands.setContent(i === "json" && r ? JSON.parse(r) : r || ""));
|
|
10782
10792
|
}, [
|
|
10783
10793
|
r,
|
|
10784
10794
|
q,
|
|
@@ -10813,7 +10823,7 @@ var Eu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10813
10823
|
return;
|
|
10814
10824
|
}
|
|
10815
10825
|
let o = q.view.coordsAtPos(e.from), s = fe(q, K);
|
|
10816
|
-
|
|
10826
|
+
o && s && ne({
|
|
10817
10827
|
open: !0,
|
|
10818
10828
|
query: a.query,
|
|
10819
10829
|
anchorPosition: {
|
|
@@ -12257,10 +12267,10 @@ var sf = {}, cf = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12257
12267
|
j.pathname,
|
|
12258
12268
|
j.hash,
|
|
12259
12269
|
o
|
|
12260
|
-
]), se = !!(_ || o || !G), ce =
|
|
12261
|
-
|
|
12270
|
+
]), se = !!(_ || o || !G), ce = !(!v && G), le = p(() => !Ft(B, te.current), [B, te.current]), ue = P.noChangesToSave ?? "No changes to save", de = P.draftRestoreTitle ?? "Unsaved changes found", fe = P.draftRestoreMessage ?? "A local draft is available for this form. Restore it or discard it.", q = P.draftRestoreAction ?? "Restore", pe = P.draftDiscardAction ?? "Discard", me = P.draftRestoredTitle ?? "Draft restored", he = P.draftRestoredMessage ?? "The local draft has been restored. You can still discard it for a few seconds.", ge = s(() => {
|
|
12271
|
+
oe && typeof localStorage < "u" && localStorage.removeItem(oe);
|
|
12262
12272
|
}, [oe]), _e = s(() => {
|
|
12263
|
-
if (
|
|
12273
|
+
if (oe && typeof localStorage < "u") return af(localStorage.getItem(oe));
|
|
12264
12274
|
}, [oe]), ve = s(() => {
|
|
12265
12275
|
V(wt(te.current));
|
|
12266
12276
|
}, []), [ye, be] = h(void 0), xe = s(({ message: e, type: t = "danger" }) => {
|
|
@@ -12463,7 +12473,7 @@ var sf = {}, cf = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12463
12473
|
B
|
|
12464
12474
|
]), l(() => () => {
|
|
12465
12475
|
let { storageKey: e, record: t, isDirty: n } = ae.current;
|
|
12466
|
-
if (
|
|
12476
|
+
if (e && n && t && typeof localStorage < "u") try {
|
|
12467
12477
|
localStorage.setItem(e, JSON.stringify(Nt(t)));
|
|
12468
12478
|
} catch {}
|
|
12469
12479
|
}, []), l(() => {
|
|
@@ -12510,7 +12520,7 @@ var sf = {}, cf = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12510
12520
|
B
|
|
12511
12521
|
]), l(() => () => zd(I), [L]);
|
|
12512
12522
|
let Ue = s((e) => {
|
|
12513
|
-
e.defaultPrevented || !
|
|
12523
|
+
e.defaultPrevented || !e.ctrlKey && !e.metaKey || e.key.toLowerCase() !== "s" || I.saveDisabled || (e.preventDefault(), I.save());
|
|
12514
12524
|
}, [I]), We = p(() => ({
|
|
12515
12525
|
registerField: J,
|
|
12516
12526
|
unregisterField: Ie,
|
|
@@ -12886,7 +12896,7 @@ function Cf(e, t) {
|
|
|
12886
12896
|
//#region src/components/ui/Table.tsx
|
|
12887
12897
|
function wf({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRowClick: i = void 0, onReorder: a = void 0, onSelectionChange: o = void 0, selection: c = "multiple", sortable: d = !1, pagination: f = void 0, activeKey: g = void 0, selectedKeys: _ = void 0, groupBy: v = void 0, recordId: y = void 0, before: b = void 0, after: x = void 0, wrapperClassName: S = void 0, className: C = void 0, headerClassName: w = void 0, bodyClassName: T = void 0, footerClassName: A = void 0, heightClassName: j = void 0, scrollClassName: M = void 0, selectedClassName: N = void 0, renderCell: P = void 0 }) {
|
|
12888
12898
|
let F = Y("table"), I = Fn("table"), L = N || F.Table.selectedClassName, [R, z] = h(n || []), B = p(() => {
|
|
12889
|
-
if (
|
|
12899
|
+
if (d && typeof d != "boolean") return d;
|
|
12890
12900
|
}, [typeof d == "object" ? d?.dir : void 0, typeof d == "object" ? d?.field : void 0]), V = d !== !1, [H, U] = h(B), [W, ee] = h(null), [G, te] = h(null), [ne, re] = h(null), [K, ie] = h(null), [ae, oe] = h(null), se = m(!1), ce = s((e) => {
|
|
12891
12901
|
e && ee(e);
|
|
12892
12902
|
}, []), le = u(), ue = !!a, de = V || !!Hs.normalize(B), fe = ue && de, q = !fe && V, pe = fe ? void 0 : B;
|
|
@@ -12895,7 +12905,7 @@ function wf({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12895
12905
|
}, [n]), l(() => {
|
|
12896
12906
|
U(pe);
|
|
12897
12907
|
}, [pe?.field, pe?.dir]), l(() => {
|
|
12898
|
-
|
|
12908
|
+
fe && !se.current && (console.warn("Table: `onReorder` cannot be combined with sortable sorting on the same view. Manual reorder takes precedence and sorting is ignored."), se.current = !0);
|
|
12899
12909
|
}, [fe]);
|
|
12900
12910
|
let me = Cf("row", y), he = s((e, t) => me(e, t), [me]), { activeSelectedKeys: ge, selectionState: _e, showSelection: ve, updateSelection: ye } = Sf({
|
|
12901
12911
|
records: R,
|
|
@@ -13156,7 +13166,7 @@ var Tf = 12, Ef = 12, Df = (e, t, n) => Math.max(t, Math.min(n, e)), Of = (e) =>
|
|
|
13156
13166
|
return (n[n.length - 1] || t).trim();
|
|
13157
13167
|
}, kf = (e, t) => {
|
|
13158
13168
|
let n = e - t.left, r = t.width / Tf;
|
|
13159
|
-
return Df(Math.floor(n / r), 0,
|
|
13169
|
+
return Df(Math.floor(n / r), 0, 11);
|
|
13160
13170
|
}, Af = () => `${Date.now()}_${Math.random().toString(16).slice(2)}`, jf = (e, t, n) => {
|
|
13161
13171
|
let r = (e) => {
|
|
13162
13172
|
let r = e + t;
|
|
@@ -13821,7 +13831,7 @@ var Xf = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13821
13831
|
}), S ? /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border border-border overflow-hidden" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-3 px-3 py-3" }, /* @__PURE__ */ t.createElement("div", { className: "w-9 h-9 rounded-md bg-emerald-500/10 flex items-center justify-center shrink-0" }, /* @__PURE__ */ t.createElement(Q, {
|
|
13822
13832
|
name: "file-text",
|
|
13823
13833
|
className: "w-4 h-4 text-emerald-600"
|
|
13824
|
-
})), /* @__PURE__ */ t.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ t.createElement("p", { className: "text-sm font-medium truncate" }, S.name), /* @__PURE__ */ t.createElement("p", { className: "text-xs text-muted-foreground" }, ((e) => e < 1024 ? `${e} B` : e <
|
|
13834
|
+
})), /* @__PURE__ */ t.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ t.createElement("p", { className: "text-sm font-medium truncate" }, S.name), /* @__PURE__ */ t.createElement("p", { className: "text-xs text-muted-foreground" }, ((e) => e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB`)(S.size))), /* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-1 text-xs text-emerald-600 font-medium shrink-0" }, /* @__PURE__ */ t.createElement(Q, {
|
|
13825
13835
|
name: "check-circle",
|
|
13826
13836
|
className: "w-4 h-4"
|
|
13827
13837
|
}), _.loaded), /* @__PURE__ */ t.createElement("button", {
|
|
@@ -14094,7 +14104,7 @@ function lp({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
14094
14104
|
//#region src/components/widgets/grid-core/useGridDBRecords.ts
|
|
14095
14105
|
function up({ path: e, where: t, order: n, fieldMap: r }) {
|
|
14096
14106
|
let i = Ti(), [a, o] = h([]), s = p(() => {
|
|
14097
|
-
if (
|
|
14107
|
+
if (t || n || r) return {
|
|
14098
14108
|
where: t,
|
|
14099
14109
|
order: n,
|
|
14100
14110
|
fieldMap: r
|
|
@@ -14175,12 +14185,12 @@ var pp = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^
|
|
|
14175
14185
|
}
|
|
14176
14186
|
let i = n[0];
|
|
14177
14187
|
return i ? Object.entries(i).reduce((e, [n, r]) => (n.startsWith("_") || (t.isValidElement(r) || typeof r != "object" || Array.isArray(r)) && e.push(_p(n)), e), []) : [];
|
|
14178
|
-
}, bp = (e, t) => Array.isArray(e) ? e.reduce((e, t) => (t === "delete" ?
|
|
14188
|
+
}, bp = (e, t) => Array.isArray(e) ? e.reduce((e, t) => (e[t] = t === "delete" ? { kind: "delete" } : { kind: "modal" }, e), {}) : e ? Object.entries(e).reduce((e, [t, n]) => (n && (e[t] = n), e), {}) : t ? {
|
|
14179
14189
|
add: { kind: "modal" },
|
|
14180
14190
|
edit: { kind: "modal" },
|
|
14181
14191
|
delete: { kind: "delete" }
|
|
14182
14192
|
} : {}, xp = (e, t) => e?.visible ? typeof e.visible == "function" ? e.visible(t) : e.visible : !0, Sp = (e, t) => e?.disabled ? typeof e.disabled == "function" ? e.disabled(t) : e.disabled : !1, Cp = (e, t, n) => t?.label ? t.label : e === "add" ? n?.add ?? "Add" : e === "edit" ? n?.edit ?? "Edit" : e === "delete" ? n?.delete ?? "Delete" : et.toCamel(e, " "), wp = (e) => {
|
|
14183
|
-
if (
|
|
14193
|
+
if (e && typeof e != "boolean") return e;
|
|
14184
14194
|
};
|
|
14185
14195
|
//#endregion
|
|
14186
14196
|
//#region src/components/widgets/grid-core/GridTableView.tsx
|
|
@@ -15397,11 +15407,11 @@ function bm({ records: e, onLoad: t }) {
|
|
|
15397
15407
|
//#endregion
|
|
15398
15408
|
//#region src/components/widgets/grid-core/useGridSelection.ts
|
|
15399
15409
|
function xm({ selection: e }) {
|
|
15400
|
-
let t = e !== null && e !== !1 && typeof e == "object", n = e ? typeof e == "string" ? e : e.mode : !1, r = t ? e.defaultKeys : void 0, i = t ? e.onChange : void 0, [a, o] = h(r ?? []), [c, u] = h([]);
|
|
15410
|
+
let t = e !== null && e !== !1 && typeof e == "object", n = e ? typeof e == "string" ? e : e.mode : !1, r = t ? e.defaultKeys : void 0, i = t ? e.onChange : void 0, [a, o] = h(r ?? []), [c, u] = h([]), d = r?.join("\0") ?? "";
|
|
15401
15411
|
l(() => {
|
|
15402
15412
|
o(r ?? []), u([]);
|
|
15403
|
-
}, [
|
|
15404
|
-
let
|
|
15413
|
+
}, [d]);
|
|
15414
|
+
let f = s(() => {
|
|
15405
15415
|
o([]), u([]), i?.({
|
|
15406
15416
|
keys: [],
|
|
15407
15417
|
records: [],
|
|
@@ -15416,9 +15426,9 @@ function xm({ selection: e }) {
|
|
|
15416
15426
|
keys: a,
|
|
15417
15427
|
records: c,
|
|
15418
15428
|
hasSelection: a.length > 0,
|
|
15419
|
-
clear:
|
|
15429
|
+
clear: f
|
|
15420
15430
|
}), [
|
|
15421
|
-
|
|
15431
|
+
f,
|
|
15422
15432
|
a,
|
|
15423
15433
|
c
|
|
15424
15434
|
]),
|
|
@@ -15780,7 +15790,7 @@ function km({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15780
15790
|
}), e.label);
|
|
15781
15791
|
})) : null, tt = p(() => {
|
|
15782
15792
|
if (u !== void 0) return typeof u == "function" ? u(Xe) : u;
|
|
15783
|
-
if (
|
|
15793
|
+
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);
|
|
15784
15794
|
}, [
|
|
15785
15795
|
Je,
|
|
15786
15796
|
u,
|
|
@@ -15795,17 +15805,17 @@ function km({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15795
15805
|
]), nt = p(() => {
|
|
15796
15806
|
if (d !== void 0) return typeof d == "function" ? d(Ze) : d;
|
|
15797
15807
|
}, [d, Ze]), rt = p(() => {
|
|
15798
|
-
if (
|
|
15808
|
+
if (Fe && J && (J.kind === "modal" || J.kind === "delete")) return Ve(Fe.actionKey, Fe.record);
|
|
15799
15809
|
}, [
|
|
15800
15810
|
Fe,
|
|
15801
15811
|
J,
|
|
15802
15812
|
Ve
|
|
15803
15813
|
]), it = p(() => {
|
|
15804
|
-
if (
|
|
15814
|
+
if (J && (J.kind === "modal" || J.kind === "delete") && J.header !== void 0 && rt) return typeof J.header == "function" ? J.header(rt) : J.header;
|
|
15805
15815
|
}, [J, rt]), at = p(() => {
|
|
15806
15816
|
if (!(!J || J.kind !== "modal" && J.kind !== "delete")) {
|
|
15807
15817
|
if (J.footer === !1) return !1;
|
|
15808
|
-
if (
|
|
15818
|
+
if (J.footer !== void 0 && rt) return typeof J.footer == "function" ? J.footer(rt) : J.footer;
|
|
15809
15819
|
}
|
|
15810
15820
|
}, [J, rt]), ot = wp(w);
|
|
15811
15821
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ji, {
|
|
@@ -16055,7 +16065,7 @@ var Nm = () => {
|
|
|
16055
16065
|
};
|
|
16056
16066
|
sendReport = () => {
|
|
16057
16067
|
let { error: e, errorInfo: t } = this.state, { reportUrl: n } = this.props;
|
|
16058
|
-
|
|
16068
|
+
e && n && (this.setState({ reportState: "sending" }), fetch(n, {
|
|
16059
16069
|
method: "POST",
|
|
16060
16070
|
headers: { "Content-Type": "application/json" },
|
|
16061
16071
|
body: JSON.stringify(zm(e, t))
|
|
@@ -16132,10 +16142,10 @@ var Nm = () => {
|
|
|
16132
16142
|
r(/* @__PURE__ */ Error("GoogleAuthProvider: Firebase auth is not initialized."));
|
|
16133
16143
|
return;
|
|
16134
16144
|
}
|
|
16135
|
-
let o = await G(a,
|
|
16145
|
+
let o = L.credential(t), s = await G(a, o), c = z(s);
|
|
16136
16146
|
Qr({
|
|
16137
|
-
...
|
|
16138
|
-
profile:
|
|
16147
|
+
...s.user,
|
|
16148
|
+
profile: c?.profile ?? i
|
|
16139
16149
|
}, "user"), e.scopes?.length && await this.getAccessToken(e.scopes), n(this.getUser());
|
|
16140
16150
|
} catch (e) {
|
|
16141
16151
|
r(e);
|
|
@@ -16295,9 +16305,7 @@ var Nm = () => {
|
|
|
16295
16305
|
case s.lte !== void 0:
|
|
16296
16306
|
a = Ve(a, Pe(s.lte));
|
|
16297
16307
|
break;
|
|
16298
|
-
case s.lt !== void 0:
|
|
16299
|
-
a = Ve(a, Pe(s.lt));
|
|
16300
|
-
break;
|
|
16308
|
+
case s.lt !== void 0: a = Ve(a, Pe(s.lt));
|
|
16301
16309
|
}
|
|
16302
16310
|
return {
|
|
16303
16311
|
dbRef: a,
|
|
@@ -16391,7 +16399,8 @@ var Nm = () => {
|
|
|
16391
16399
|
`${e}`;
|
|
16392
16400
|
let i = oh(t.val(), o, n);
|
|
16393
16401
|
return r ? Object.values(i) : i;
|
|
16394
|
-
}
|
|
16402
|
+
}
|
|
16403
|
+
i && Qm(`Data not found in Firebase for path ${e}`, null, i);
|
|
16395
16404
|
} catch (t) {
|
|
16396
16405
|
Qm(`reading data in Firebase for ${e}`, t, i);
|
|
16397
16406
|
}
|
|
@@ -16411,14 +16420,15 @@ var Nm = () => {
|
|
|
16411
16420
|
}
|
|
16412
16421
|
};
|
|
16413
16422
|
setChunks = async (e, t, { chunkSize: n = 1e3, purge: r = !1, onProgress: i } = {}) => {
|
|
16414
|
-
let a =
|
|
16423
|
+
let a = Zm(), o = He(a, e);
|
|
16415
16424
|
try {
|
|
16416
|
-
r && (await Ue(
|
|
16417
|
-
let
|
|
16418
|
-
for (let e = 0; e <
|
|
16419
|
-
|
|
16420
|
-
|
|
16421
|
-
|
|
16425
|
+
r && (await Ue(o), i?.(0, 0, `Purging existing data at ${e}`));
|
|
16426
|
+
let a = Object.entries(Nt(t)), s = Math.ceil(a.length / n);
|
|
16427
|
+
for (let e = 0; e < a.length; e += n) {
|
|
16428
|
+
let t = Object.fromEntries(a.slice(e, e + n));
|
|
16429
|
+
await Ke(o, t);
|
|
16430
|
+
let r = Math.floor(e / n) + 1;
|
|
16431
|
+
i?.(r, s, `Saving chunk ${r}/${s}`);
|
|
16422
16432
|
}
|
|
16423
16433
|
} catch (t) {
|
|
16424
16434
|
Qm(`setting data in chunks in Firebase for ${e}`, t, !1);
|
|
@@ -16496,7 +16506,8 @@ var lh = {
|
|
|
16496
16506
|
facebook: "facebook.com"
|
|
16497
16507
|
};
|
|
16498
16508
|
function uh(e) {
|
|
16499
|
-
|
|
16509
|
+
let t = lh[e] ?? e;
|
|
16510
|
+
return new R(t);
|
|
16500
16511
|
}
|
|
16501
16512
|
function dh(e) {
|
|
16502
16513
|
return e ? {
|
|
@@ -17133,7 +17144,7 @@ var Lh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
17133
17144
|
let n = t.find((t) => typeof t?.unit == "string" && t.unit.toLowerCase().includes(e));
|
|
17134
17145
|
return n && (n.currency === void 0 || n.currency === "USD") ? Number(n.price) : NaN;
|
|
17135
17146
|
}, r = n("input"), i = n("output");
|
|
17136
|
-
if (
|
|
17147
|
+
if (Number.isFinite(r) && Number.isFinite(i)) return {
|
|
17137
17148
|
input: r,
|
|
17138
17149
|
output: i,
|
|
17139
17150
|
currency: "USD",
|
|
@@ -17607,7 +17618,7 @@ function kg(e = {}) {
|
|
|
17607
17618
|
}, n = (e) => t[e] ??= {};
|
|
17608
17619
|
for (let [t, r] of Object.entries(Tg)) {
|
|
17609
17620
|
let i = e[t];
|
|
17610
|
-
if (i !== void 0) for (let [e, t] of Object.entries(r)) t.when
|
|
17621
|
+
if (i !== void 0) for (let [e, t] of Object.entries(r)) (!t.when || t.when(i)) && (n(t.service)[e] = t.create(i));
|
|
17611
17622
|
}
|
|
17612
17623
|
for (let [t, r] of Object.entries(e.custom ?? {})) Dg(n(t), r);
|
|
17613
17624
|
Object.keys(t.data).length === 0 && (t.data.mock = new go()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new Um());
|
|
@@ -17681,12 +17692,12 @@ function Pg({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, chil
|
|
|
17681
17692
|
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(Eg, null) }, /* @__PURE__ */ t.createElement(d, null))))
|
|
17682
17693
|
});
|
|
17683
17694
|
}
|
|
17684
|
-
let u = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && l(t, e, n), e.children && u({ children: e.children })].filter(Boolean)));
|
|
17695
|
+
let u = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && l(t, e, n), e.children && u({ children: e.children })].filter(Boolean))), d = (e, t) => e.some((e) => e.path === t || !!e.children && d(e.children, t)), f = Object.values(Ag).some((e) => d(e, "/")) ? {} : { default: [{ path: "/" }] };
|
|
17685
17696
|
return /* @__PURE__ */ t.createElement(Ng, o, a, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(y, {
|
|
17686
17697
|
path: ci,
|
|
17687
17698
|
element: /* @__PURE__ */ t.createElement(hi, null)
|
|
17688
17699
|
}), /* @__PURE__ */ t.createElement(t.Fragment, null, u({
|
|
17689
|
-
|
|
17700
|
+
...f,
|
|
17690
17701
|
...Ag,
|
|
17691
17702
|
_auth: [{
|
|
17692
17703
|
path: "/users",
|