your-ai-workflow-firebase-os 1.2.21 → 1.2.22
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/your-ai-workflow-firebase-os.cjs.js +108 -160
- package/dist/your-ai-workflow-firebase-os.es.js +395 -476
- package/package.json +1 -1
- package/scripts/postinstall.js +14 -0
- package/src/prompts/pages/publicPage.ts +28 -32
- package/src/prompts/tabs/crud/admin.ts +18 -42
- package/src/prompts/tabs/crud/private.ts +19 -45
- package/src/prompts/tabs/crud/shared.ts +19 -43
- package/src/templates/PrivatePageTemplate.tsx +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, Ct as i, D as a, Dt as o, E as s, Et as c, F as l, G as u, H as d, I as f, J as p, K as m, L as h, M as g, N as _, O as v, P as y, Q as b, R as x, S, St as C, T as ee, Tt as w, U as te, V as T, W as E, X as D, Y as ne, Z as re, _ as ie, _t as ae, a as O, at as oe, b as k, bt as A, c as se, ct as ce, d as j, dt as M, et as le, f as ue, ft as de, g as N, gt as P, h as fe, ht as pe, i as F, it as me, j as I, k as L, l as he, lt as ge, m as R, mt as _e, n as z, nt as B, o as V, ot as H, p as
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, Ct as i, D as a, Dt as o, E as s, Et as c, F as l, G as u, H as d, I as f, J as p, K as m, L as h, M as g, N as _, O as v, P as y, Q as b, R as x, S, St as C, T as ee, Tt as w, U as te, V as T, W as E, X as D, Y as ne, Z as re, _ as ie, _t as ae, a as O, at as oe, b as k, bt as A, c as se, ct as ce, d as j, dt as M, et as le, f as ue, ft as de, g as N, gt as P, h as fe, ht as pe, i as F, it as me, j as I, k as L, l as he, lt as ge, m as R, mt as _e, n as z, nt as B, o as V, ot as H, p as U, pt as ve, q as ye, r as W, rt as be, s as xe, st as Se, t as Ce, tt as we, u as Te, ut as Ee, v as De, vt as Oe, w as ke, wt as Ae, x as je, xt as Me, y as Ne, yt as Pe, z as Fe } from "./ContactPopup-D0Fb80uS.js";
|
|
2
2
|
import { t as Ie } from "./theme.config-D05RQKVy.js";
|
|
3
3
|
import { t as Le } from "./contactForm.config-D9No8cBy.js";
|
|
4
4
|
import { t as Re } from "./supportForm.config-Dgl58gss.js";
|
|
@@ -251,7 +251,7 @@ function Mt() {
|
|
|
251
251
|
className: "w-full flex items-start gap-3 p-3 rounded-xl hover:bg-foreground/5 transition-all text-left group border border-transparent hover:border-[var(--panel-border)]",
|
|
252
252
|
children: [/* @__PURE__ */ X("div", {
|
|
253
253
|
className: "mt-0.5 w-8 h-8 rounded-full flex items-center justify-center shrink-0 bg-foreground/5 text-notification-icon",
|
|
254
|
-
children: e.type === "user" ? /* @__PURE__ */ X(j, { className: "w-4 h-4" }) : e.type === "submission" ? /* @__PURE__ */ X(L, { className: "w-4 h-4" }) : /* @__PURE__ */ X(
|
|
254
|
+
children: e.type === "user" ? /* @__PURE__ */ X(j, { className: "w-4 h-4" }) : e.type === "submission" ? /* @__PURE__ */ X(L, { className: "w-4 h-4" }) : /* @__PURE__ */ X(we, { className: "w-4 h-4" })
|
|
255
255
|
}), /* @__PURE__ */ Z("div", {
|
|
256
256
|
className: "flex flex-col flex-1 min-w-0 pr-2",
|
|
257
257
|
children: [
|
|
@@ -464,11 +464,11 @@ function Rt({ customMenu: e, standalone: n }) {
|
|
|
464
464
|
})]
|
|
465
465
|
})
|
|
466
466
|
}),
|
|
467
|
-
/* @__PURE__ */ X(O, { children: m && /* @__PURE__ */ X(
|
|
467
|
+
/* @__PURE__ */ X(O, { children: m && /* @__PURE__ */ X(Ce, {
|
|
468
468
|
formId: "contact",
|
|
469
469
|
onClose: () => g(!1)
|
|
470
470
|
}) }),
|
|
471
|
-
/* @__PURE__ */ X(O, { children: _ && /* @__PURE__ */ X(
|
|
471
|
+
/* @__PURE__ */ X(O, { children: _ && /* @__PURE__ */ X(Ce, {
|
|
472
472
|
formId: "support",
|
|
473
473
|
onClose: () => b(!1)
|
|
474
474
|
}) }),
|
|
@@ -491,7 +491,7 @@ function Rt({ customMenu: e, standalone: n }) {
|
|
|
491
491
|
children: M.map((e, t) => /* @__PURE__ */ Z("span", {
|
|
492
492
|
"data-measure-nav": !0,
|
|
493
493
|
className: "text-[13px] md:text-[14px] font-bold tracking-wide flex items-center gap-1.5 shrink-0",
|
|
494
|
-
children: [e.label, e.submenu && /* @__PURE__ */ X(
|
|
494
|
+
children: [e.label, e.submenu && /* @__PURE__ */ X(Se, { className: "w-3 h-3" })]
|
|
495
495
|
}, e.path || t))
|
|
496
496
|
}),
|
|
497
497
|
/* @__PURE__ */ Z("div", {
|
|
@@ -504,11 +504,11 @@ function Rt({ customMenu: e, standalone: n }) {
|
|
|
504
504
|
children: [e.path ? /* @__PURE__ */ Z(Q, {
|
|
505
505
|
to: e.path,
|
|
506
506
|
className: "text-[13px] md:text-[14px] font-bold tracking-wide text-foreground/50 hover:text-accent transition-all cursor-pointer flex items-center gap-1.5",
|
|
507
|
-
children: [e.label, e.submenu && /* @__PURE__ */ X(
|
|
507
|
+
children: [e.label, e.submenu && /* @__PURE__ */ X(Se, { className: "w-3 h-3" })]
|
|
508
508
|
}) : /* @__PURE__ */ Z("button", {
|
|
509
509
|
onClick: e.action,
|
|
510
510
|
className: "text-[13px] md:text-[14px] font-bold tracking-wide text-foreground/50 hover:text-accent transition-all flex items-center gap-1.5",
|
|
511
|
-
children: [e.label, e.submenu && /* @__PURE__ */ X(
|
|
511
|
+
children: [e.label, e.submenu && /* @__PURE__ */ X(Se, { className: "w-3 h-3" })]
|
|
512
512
|
}), e.submenu && u === e.label && /* @__PURE__ */ X("div", {
|
|
513
513
|
className: "absolute top-[100%] left-0 pt-2 z-50",
|
|
514
514
|
children: /* @__PURE__ */ X(F.div, {
|
|
@@ -825,7 +825,7 @@ function Rt({ customMenu: e, standalone: n }) {
|
|
|
825
825
|
className: "flex items-center w-full px-3 py-2.5 rounded-xl text-[13px] font-semibold tracking-wide hover:bg-foreground/5 text-foreground/80 hover:text-foreground transition-all gap-3",
|
|
826
826
|
children: [/* @__PURE__ */ X("span", {
|
|
827
827
|
className: "w-5 h-5 rounded-md bg-foreground/5 border border-[var(--panel-border)] flex items-center justify-center shrink-0",
|
|
828
|
-
children: /* @__PURE__ */ X(
|
|
828
|
+
children: /* @__PURE__ */ X(we, { className: "w-3 h-3 text-accent" })
|
|
829
829
|
}), "Requests"]
|
|
830
830
|
}),
|
|
831
831
|
/* @__PURE__ */ Z(Q, {
|
|
@@ -853,7 +853,7 @@ function Rt({ customMenu: e, standalone: n }) {
|
|
|
853
853
|
className: "flex items-center w-full px-3 py-2.5 rounded-xl text-[13px] font-semibold tracking-wide hover:bg-foreground/5 text-foreground/80 hover:text-foreground transition-all gap-3 text-left",
|
|
854
854
|
children: [/* @__PURE__ */ X("span", {
|
|
855
855
|
className: "w-5 h-5 rounded-md bg-foreground/5 border border-[var(--panel-border)] flex items-center justify-center shrink-0",
|
|
856
|
-
children: /* @__PURE__ */ X(
|
|
856
|
+
children: /* @__PURE__ */ X(we, { className: "w-3 h-3 text-accent" })
|
|
857
857
|
}), A]
|
|
858
858
|
})
|
|
859
859
|
]
|
|
@@ -986,7 +986,7 @@ function Rt({ customMenu: e, standalone: n }) {
|
|
|
986
986
|
onClick: () => l(!1),
|
|
987
987
|
className: "flex items-center gap-3 px-3 py-2.5 rounded-xl hover:bg-foreground/5 text-foreground/80 hover:text-foreground transition-all",
|
|
988
988
|
children: [
|
|
989
|
-
/* @__PURE__ */ X(
|
|
989
|
+
/* @__PURE__ */ X(we, { className: "w-4 h-4 text-accent/70" }),
|
|
990
990
|
" ",
|
|
991
991
|
/* @__PURE__ */ X("span", {
|
|
992
992
|
className: "text-[14px] font-semibold",
|
|
@@ -1013,7 +1013,7 @@ function Rt({ customMenu: e, standalone: n }) {
|
|
|
1013
1013
|
onClick: () => l(!1),
|
|
1014
1014
|
className: "flex items-center gap-3 px-3 py-2.5 rounded-xl hover:bg-foreground/5 text-foreground/80 hover:text-foreground transition-all w-full text-left",
|
|
1015
1015
|
children: [
|
|
1016
|
-
/* @__PURE__ */ X(
|
|
1016
|
+
/* @__PURE__ */ X(we, { className: "w-4 h-4 text-accent/70" }),
|
|
1017
1017
|
" ",
|
|
1018
1018
|
/* @__PURE__ */ X("span", {
|
|
1019
1019
|
className: "text-[14px] font-semibold",
|
|
@@ -1149,7 +1149,7 @@ function Bt() {
|
|
|
1149
1149
|
transition: { delay: .2 },
|
|
1150
1150
|
className: "inline-flex items-center gap-2 md:gap-3 px-5 md:px-6 py-2 md:py-2.5 mb-8 md:mb-10 text-[13px] md:text-[15px] font-semibold tracking-wide uppercase rounded-full glass-panel text-foreground glow-hover cursor-pointer",
|
|
1151
1151
|
children: [
|
|
1152
|
-
d === zt.hero.subtitle && /* @__PURE__ */ X(
|
|
1152
|
+
d === zt.hero.subtitle && /* @__PURE__ */ X(xe, { className: "w-4 h-4 text-accent" }),
|
|
1153
1153
|
" ",
|
|
1154
1154
|
d
|
|
1155
1155
|
]
|
|
@@ -1170,7 +1170,7 @@ function Bt() {
|
|
|
1170
1170
|
children: [h(p, "Start Building Free", "register", "w-full sm:w-auto px-6 md:px-8 py-3 md:py-3.5 rounded-xl font-semibold tracking-wide btn-primary text-[15px] shadow-xl transition-all duration-300 hover:-translate-y-1 active:scale-95 flex items-center justify-center"), h(m, "Sign In", "sign_in", "w-full sm:w-auto px-6 md:px-8 py-3 md:py-3.5 rounded-xl font-semibold tracking-wide btn-secondary text-[15px] transition-all duration-300 flex items-center justify-center hover:-translate-y-1")]
|
|
1171
1171
|
})
|
|
1172
1172
|
]
|
|
1173
|
-
}), /* @__PURE__ */ X(O, { children: e && /* @__PURE__ */ X(
|
|
1173
|
+
}), /* @__PURE__ */ X(O, { children: e && /* @__PURE__ */ X(Ce, {
|
|
1174
1174
|
onClose: () => t(null),
|
|
1175
1175
|
formId: e
|
|
1176
1176
|
}) })]
|
|
@@ -1237,13 +1237,13 @@ function Vt() {
|
|
|
1237
1237
|
children: [
|
|
1238
1238
|
/* @__PURE__ */ Z("div", {
|
|
1239
1239
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
1240
|
-
children: [/* @__PURE__ */ X(
|
|
1240
|
+
children: [/* @__PURE__ */ X(W, {
|
|
1241
1241
|
name: "firstName",
|
|
1242
1242
|
label: "First Name",
|
|
1243
1243
|
type: "text",
|
|
1244
1244
|
placeholder: "John",
|
|
1245
1245
|
required: !0
|
|
1246
|
-
}), /* @__PURE__ */ X(
|
|
1246
|
+
}), /* @__PURE__ */ X(W, {
|
|
1247
1247
|
name: "lastName",
|
|
1248
1248
|
label: "Last Name",
|
|
1249
1249
|
type: "text",
|
|
@@ -1251,14 +1251,14 @@ function Vt() {
|
|
|
1251
1251
|
required: !0
|
|
1252
1252
|
})]
|
|
1253
1253
|
}),
|
|
1254
|
-
/* @__PURE__ */ X(
|
|
1254
|
+
/* @__PURE__ */ X(W, {
|
|
1255
1255
|
name: "email",
|
|
1256
1256
|
label: "Email",
|
|
1257
1257
|
type: "email",
|
|
1258
1258
|
placeholder: "name@example.com",
|
|
1259
1259
|
required: !0
|
|
1260
1260
|
}),
|
|
1261
|
-
/* @__PURE__ */ X(
|
|
1261
|
+
/* @__PURE__ */ X(W, {
|
|
1262
1262
|
name: "password",
|
|
1263
1263
|
label: "Password",
|
|
1264
1264
|
type: "password",
|
|
@@ -1380,7 +1380,7 @@ function Ht() {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
},
|
|
1382
1382
|
children: [
|
|
1383
|
-
/* @__PURE__ */ X(
|
|
1383
|
+
/* @__PURE__ */ X(W, {
|
|
1384
1384
|
name: "email",
|
|
1385
1385
|
label: "Email",
|
|
1386
1386
|
type: "email",
|
|
@@ -1400,7 +1400,7 @@ function Ht() {
|
|
|
1400
1400
|
className: "text-[13px] md:text-[14px] text-accent hover:underline font-bold tracking-wide",
|
|
1401
1401
|
children: "Forgot Password?"
|
|
1402
1402
|
})]
|
|
1403
|
-
}), /* @__PURE__ */ X(
|
|
1403
|
+
}), /* @__PURE__ */ X(W, {
|
|
1404
1404
|
name: "password",
|
|
1405
1405
|
type: "password",
|
|
1406
1406
|
placeholder: "••••••••",
|
|
@@ -1602,7 +1602,7 @@ var Wt = {
|
|
|
1602
1602
|
requests: {
|
|
1603
1603
|
path: "/requests",
|
|
1604
1604
|
label: "Requests",
|
|
1605
|
-
icon:
|
|
1605
|
+
icon: we,
|
|
1606
1606
|
roles: ["admin"]
|
|
1607
1607
|
},
|
|
1608
1608
|
settings: {
|
|
@@ -1625,7 +1625,7 @@ var Wt = {
|
|
|
1625
1625
|
support: {
|
|
1626
1626
|
path: "/support",
|
|
1627
1627
|
label: "Support",
|
|
1628
|
-
icon:
|
|
1628
|
+
icon: we,
|
|
1629
1629
|
roles: [
|
|
1630
1630
|
"user",
|
|
1631
1631
|
"editor",
|
|
@@ -1882,7 +1882,7 @@ function Kt() {
|
|
|
1882
1882
|
y: -10
|
|
1883
1883
|
},
|
|
1884
1884
|
className: `p-4 mb-6 rounded-2xl border flex flex-col sm:flex-row sm:items-center gap-3 ${d.type === "error" ? "bg-red-500/10 border-red-500/20 text-red-400" : "bg-accent/10 border-accent/20 text-accent"}`,
|
|
1885
|
-
children: [d.type === "success" ? /* @__PURE__ */ X(B, { className: "w-5 h-5 shrink-0" }) : /* @__PURE__ */ X(
|
|
1885
|
+
children: [d.type === "success" ? /* @__PURE__ */ X(B, { className: "w-5 h-5 shrink-0" }) : /* @__PURE__ */ X(be, { className: "w-5 h-5 shrink-0" }), /* @__PURE__ */ X("span", {
|
|
1886
1886
|
className: "text-[14px] font-semibold tracking-wide leading-relaxed",
|
|
1887
1887
|
children: d.text
|
|
1888
1888
|
})]
|
|
@@ -2036,7 +2036,7 @@ function Kt() {
|
|
|
2036
2036
|
children: "Account Details"
|
|
2037
2037
|
}), /* @__PURE__ */ Z("div", {
|
|
2038
2038
|
className: "grid grid-cols-1 md:grid-cols-2 gap-5 md:gap-6",
|
|
2039
|
-
children: [/* @__PURE__ */ X(
|
|
2039
|
+
children: [/* @__PURE__ */ X(W, {
|
|
2040
2040
|
name: "name",
|
|
2041
2041
|
value: n,
|
|
2042
2042
|
onChange: (e) => r(e.target.value),
|
|
@@ -2044,7 +2044,7 @@ function Kt() {
|
|
|
2044
2044
|
placeholder: "John Doe"
|
|
2045
2045
|
}), /* @__PURE__ */ Z("div", {
|
|
2046
2046
|
className: "flex flex-col",
|
|
2047
|
-
children: [/* @__PURE__ */ X(
|
|
2047
|
+
children: [/* @__PURE__ */ X(W, {
|
|
2048
2048
|
name: "email",
|
|
2049
2049
|
type: "email",
|
|
2050
2050
|
value: i,
|
|
@@ -2066,14 +2066,14 @@ function Kt() {
|
|
|
2066
2066
|
children: "Change Password"
|
|
2067
2067
|
}), /* @__PURE__ */ Z("div", {
|
|
2068
2068
|
className: "grid grid-cols-1 md:grid-cols-2 gap-5 md:gap-6",
|
|
2069
|
-
children: [/* @__PURE__ */ X(
|
|
2069
|
+
children: [/* @__PURE__ */ X(W, {
|
|
2070
2070
|
name: "password",
|
|
2071
2071
|
type: "password",
|
|
2072
2072
|
label: "New Password",
|
|
2073
2073
|
value: p,
|
|
2074
2074
|
onChange: (e) => m(e.target.value),
|
|
2075
2075
|
placeholder: "Minimum 6 characters"
|
|
2076
|
-
}), /* @__PURE__ */ X(
|
|
2076
|
+
}), /* @__PURE__ */ X(W, {
|
|
2077
2077
|
name: "confirmPassword",
|
|
2078
2078
|
type: "password",
|
|
2079
2079
|
label: "Confirm Password",
|
|
@@ -2154,7 +2154,7 @@ function qt() {
|
|
|
2154
2154
|
s(e), a(e === 1 ? 60 : 120), t(!1);
|
|
2155
2155
|
}
|
|
2156
2156
|
},
|
|
2157
|
-
children: [/* @__PURE__ */ X(
|
|
2157
|
+
children: [/* @__PURE__ */ X(W, {
|
|
2158
2158
|
name: "email",
|
|
2159
2159
|
label: "Work Email",
|
|
2160
2160
|
type: "email",
|
|
@@ -2717,7 +2717,7 @@ function en() {
|
|
|
2717
2717
|
}), /* @__PURE__ */ Z("button", {
|
|
2718
2718
|
onClick: () => t("tabs"),
|
|
2719
2719
|
className: `w-full p-3 rounded-xl transition-all flex items-center gap-3 cursor-pointer ${e === "tabs" ? "bg-accent/10 text-accent font-bold" : "bg-transparent text-foreground/70 hover:bg-foreground/5 hover:text-foreground font-medium"}`,
|
|
2720
|
-
children: [/* @__PURE__ */ X(
|
|
2720
|
+
children: [/* @__PURE__ */ X(ve, { className: "w-4 h-4 shrink-0" }), /* @__PURE__ */ X("span", {
|
|
2721
2721
|
className: "text-[14px]",
|
|
2722
2722
|
children: "Tabs Settings"
|
|
2723
2723
|
})]
|
|
@@ -2766,7 +2766,7 @@ function en() {
|
|
|
2766
2766
|
disabled: f,
|
|
2767
2767
|
onClick: () => S(e, n.id, "down"),
|
|
2768
2768
|
className: "text-foreground/40 hover:text-accent disabled:opacity-20 -mt-1",
|
|
2769
|
-
children: /* @__PURE__ */ X(
|
|
2769
|
+
children: /* @__PURE__ */ X(Se, { className: "w-4 h-4" })
|
|
2770
2770
|
})]
|
|
2771
2771
|
}), /* @__PURE__ */ Z("div", {
|
|
2772
2772
|
className: "flex flex-col",
|
|
@@ -2784,7 +2784,7 @@ function en() {
|
|
|
2784
2784
|
onClick: () => y(n.id, e),
|
|
2785
2785
|
title: n.hidden ? "Show this page" : "Hide this page",
|
|
2786
2786
|
className: `p-2 rounded-xl transition-colors ${n.hidden ? "hover:bg-foreground/5 text-foreground/40" : "hover:bg-accent/10 text-accent"}`,
|
|
2787
|
-
children: n.hidden ? /* @__PURE__ */ X(
|
|
2787
|
+
children: n.hidden ? /* @__PURE__ */ X(ye, { className: "w-4 h-4" }) : /* @__PURE__ */ X(m, { className: "w-4 h-4" })
|
|
2788
2788
|
}), o && !l && /* @__PURE__ */ X("button", {
|
|
2789
2789
|
onClick: () => b(o, e),
|
|
2790
2790
|
className: "p-2 rounded-xl hover:bg-red-500/10 text-foreground/40 hover:text-red-500 transition-colors",
|
|
@@ -2979,7 +2979,7 @@ function tn() {
|
|
|
2979
2979
|
}),
|
|
2980
2980
|
/* @__PURE__ */ X("div", {
|
|
2981
2981
|
className: `p-1.5 rounded-xl glass-panel transition-transform ${n ? "rotate-180 bg-foreground/5" : ""}`,
|
|
2982
|
-
children: /* @__PURE__ */ X(
|
|
2982
|
+
children: /* @__PURE__ */ X(Se, { className: "w-4 h-4 text-foreground/50" })
|
|
2983
2983
|
})
|
|
2984
2984
|
]
|
|
2985
2985
|
})]
|
|
@@ -3044,7 +3044,7 @@ function tn() {
|
|
|
3044
3044
|
h.length,
|
|
3045
3045
|
" Archived Submission",
|
|
3046
3046
|
h.length === 1 ? "" : "s",
|
|
3047
|
-
/* @__PURE__ */ X(
|
|
3047
|
+
/* @__PURE__ */ X(Se, { className: `w-3.5 h-3.5 transition-transform duration-300 ${s ? "rotate-180" : ""}` })
|
|
3048
3048
|
]
|
|
3049
3049
|
})
|
|
3050
3050
|
}), /* @__PURE__ */ X(O, { children: s && /* @__PURE__ */ X(F.div, {
|
|
@@ -3115,7 +3115,7 @@ function tn() {
|
|
|
3115
3115
|
children: d(e.submittedAt)
|
|
3116
3116
|
}), /* @__PURE__ */ X("div", {
|
|
3117
3117
|
className: `p-2 rounded-xl glass-panel transition-transform ${n ? "rotate-180 bg-foreground/5" : ""}`,
|
|
3118
|
-
children: /* @__PURE__ */ X(
|
|
3118
|
+
children: /* @__PURE__ */ X(Se, { className: "w-4 h-4 text-foreground/50" })
|
|
3119
3119
|
})]
|
|
3120
3120
|
})]
|
|
3121
3121
|
}), /* @__PURE__ */ X(O, { children: n && /* @__PURE__ */ X(F.div, {
|
|
@@ -3275,7 +3275,7 @@ function nn() {
|
|
|
3275
3275
|
children: [
|
|
3276
3276
|
/* @__PURE__ */ X("div", {
|
|
3277
3277
|
className: "w-16 h-16 rounded-3xl bg-accent/10 border border-accent/20 flex items-center justify-center text-accent mx-auto mb-6 shadow-inner",
|
|
3278
|
-
children: /* @__PURE__ */ X(
|
|
3278
|
+
children: /* @__PURE__ */ X(we, { className: "w-6 h-6 outline-none" })
|
|
3279
3279
|
}),
|
|
3280
3280
|
/* @__PURE__ */ X("h2", {
|
|
3281
3281
|
className: "text-2xl font-extrabold text-foreground mb-2",
|
|
@@ -3375,7 +3375,7 @@ function nn() {
|
|
|
3375
3375
|
}),
|
|
3376
3376
|
/* @__PURE__ */ X("div", {
|
|
3377
3377
|
className: `p-1.5 rounded-xl glass-panel transition-transform ${n ? "rotate-180 bg-foreground/5" : ""}`,
|
|
3378
|
-
children: /* @__PURE__ */ X(
|
|
3378
|
+
children: /* @__PURE__ */ X(Se, { className: "w-4 h-4 text-foreground/50" })
|
|
3379
3379
|
})
|
|
3380
3380
|
]
|
|
3381
3381
|
})]
|
|
@@ -3403,7 +3403,7 @@ function nn() {
|
|
|
3403
3403
|
e.topic && /* @__PURE__ */ Z("div", {
|
|
3404
3404
|
className: "flex items-center gap-2 mb-4 text-[13px] text-foreground/70 bg-foreground/5 px-4 py-2.5 rounded-xl w-fit border border-[var(--panel-border)]",
|
|
3405
3405
|
children: [
|
|
3406
|
-
/* @__PURE__ */ X(
|
|
3406
|
+
/* @__PURE__ */ X(be, { className: "w-4 h-4 text-accent" }),
|
|
3407
3407
|
/* @__PURE__ */ X("span", {
|
|
3408
3408
|
className: "font-medium text-accent",
|
|
3409
3409
|
children: "Topic:"
|
|
@@ -3458,7 +3458,7 @@ function nn() {
|
|
|
3458
3458
|
m.length,
|
|
3459
3459
|
" Archived Request",
|
|
3460
3460
|
m.length === 1 ? "" : "s",
|
|
3461
|
-
/* @__PURE__ */ X(
|
|
3461
|
+
/* @__PURE__ */ X(Se, { className: `w-3.5 h-3.5 transition-transform duration-300 ${o ? "rotate-180" : ""}` })
|
|
3462
3462
|
]
|
|
3463
3463
|
})
|
|
3464
3464
|
}), /* @__PURE__ */ X(O, { children: o && /* @__PURE__ */ X(F.div, {
|
|
@@ -3543,7 +3543,7 @@ function nn() {
|
|
|
3543
3543
|
children: u(e.submittedAt)
|
|
3544
3544
|
}), /* @__PURE__ */ X("div", {
|
|
3545
3545
|
className: `p-2 rounded-xl glass-panel transition-transform ${n ? "rotate-180 bg-foreground/5" : ""}`,
|
|
3546
|
-
children: /* @__PURE__ */ X(
|
|
3546
|
+
children: /* @__PURE__ */ X(Se, { className: "w-4 h-4 text-foreground/50" })
|
|
3547
3547
|
})]
|
|
3548
3548
|
})]
|
|
3549
3549
|
}), /* @__PURE__ */ X(O, { children: n && /* @__PURE__ */ X(F.div, {
|
|
@@ -3570,7 +3570,7 @@ function nn() {
|
|
|
3570
3570
|
e.topic && /* @__PURE__ */ Z("div", {
|
|
3571
3571
|
className: "flex items-center gap-2 mb-4 text-[13px] text-foreground/70 bg-foreground/5 px-4 py-2.5 rounded-xl w-fit border border-[var(--panel-border)]",
|
|
3572
3572
|
children: [
|
|
3573
|
-
/* @__PURE__ */ X(
|
|
3573
|
+
/* @__PURE__ */ X(be, { className: "w-4 h-4 text-accent" }),
|
|
3574
3574
|
/* @__PURE__ */ X("span", {
|
|
3575
3575
|
className: "font-medium text-accent",
|
|
3576
3576
|
children: "Topic:"
|
|
@@ -3675,12 +3675,12 @@ function rn() {
|
|
|
3675
3675
|
}
|
|
3676
3676
|
}, B = h && i.find((e) => e._id === h) || null, V = (e) => {
|
|
3677
3677
|
Oe(!0), l(e ? x === "users_" && m ? `/drive/users/${m}/${e._id}` : `/drive/${y[x]}/${e._id}` : x === "users_" && m ? `/drive/users/${m}` : `/drive/${y[x]}`);
|
|
3678
|
-
}, [H,
|
|
3679
|
-
G(() => (B ||
|
|
3678
|
+
}, [H, U] = K(null), [ve, ye] = K(!1), [W, be] = K(null), [xe, Se] = K(!1), [Ce, we] = K(null), [Ee, Oe] = K(!0), [Ae, je] = K({}), [Me, Ne] = K(!1);
|
|
3679
|
+
G(() => (B || W || H || ue || Me ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
3680
3680
|
document.body.style.overflow = "";
|
|
3681
3681
|
}), [
|
|
3682
3682
|
B,
|
|
3683
|
-
|
|
3683
|
+
W,
|
|
3684
3684
|
H,
|
|
3685
3685
|
ue,
|
|
3686
3686
|
Me
|
|
@@ -3762,42 +3762,42 @@ function rn() {
|
|
|
3762
3762
|
re(!1);
|
|
3763
3763
|
}
|
|
3764
3764
|
}, Le = async () => {
|
|
3765
|
-
if (
|
|
3766
|
-
|
|
3765
|
+
if (W) {
|
|
3766
|
+
Se(!0);
|
|
3767
3767
|
try {
|
|
3768
3768
|
try {
|
|
3769
|
-
await gt(vt(o,
|
|
3769
|
+
await gt(vt(o, W.url));
|
|
3770
3770
|
} catch (e) {
|
|
3771
3771
|
console.warn("Storage item missing:", e);
|
|
3772
3772
|
}
|
|
3773
|
-
await Ke(J(w, `${
|
|
3773
|
+
await Ke(J(w, `${W.prefix}files`, W.id)), a((e) => e.filter((e) => e._id !== W.id)), be(null);
|
|
3774
3774
|
} catch (e) {
|
|
3775
3775
|
alert(e.message);
|
|
3776
3776
|
}
|
|
3777
|
-
|
|
3777
|
+
Se(!1);
|
|
3778
3778
|
}
|
|
3779
3779
|
}, Re = async () => {
|
|
3780
3780
|
if (!H || !H.name.trim()) {
|
|
3781
|
-
|
|
3781
|
+
U(null);
|
|
3782
3782
|
return;
|
|
3783
3783
|
}
|
|
3784
3784
|
let e = i.find((e) => e._id === H.id);
|
|
3785
3785
|
if (e && e.fileName === H.name.trim()) {
|
|
3786
|
-
|
|
3786
|
+
U(null);
|
|
3787
3787
|
return;
|
|
3788
3788
|
}
|
|
3789
|
-
|
|
3789
|
+
ye(!0);
|
|
3790
3790
|
try {
|
|
3791
3791
|
await nt(J(w, `${H.prefix}files`, H.id), { fileName: H.name.trim() }), a((e) => e.map((e) => e._id === H.id ? {
|
|
3792
3792
|
...e,
|
|
3793
3793
|
fileName: H.name.trim()
|
|
3794
|
-
} : e)),
|
|
3794
|
+
} : e)), U(null);
|
|
3795
3795
|
} catch (e) {
|
|
3796
3796
|
console.error("Rename failed:", e);
|
|
3797
3797
|
}
|
|
3798
|
-
|
|
3798
|
+
ye(!1);
|
|
3799
3799
|
}, ze = (e, t) => {
|
|
3800
|
-
navigator.clipboard.writeText(e),
|
|
3800
|
+
navigator.clipboard.writeText(e), we(t), setTimeout(() => we(null), 2e3);
|
|
3801
3801
|
}, Ve = (e) => {
|
|
3802
3802
|
if (e === 0) return "0 B";
|
|
3803
3803
|
let t = 1024, n = [
|
|
@@ -3988,11 +3988,11 @@ function rn() {
|
|
|
3988
3988
|
},
|
|
3989
3989
|
className: "p-1.5 hover:bg-foreground/5 rounded-md text-foreground/60 hover:text-emerald-500 transition-colors",
|
|
3990
3990
|
title: "Copy Link",
|
|
3991
|
-
children:
|
|
3991
|
+
children: Ce === e._id ? /* @__PURE__ */ X(ce, { className: "w-4 h-4 text-emerald-500" }) : /* @__PURE__ */ X(_, { className: "w-4 h-4" })
|
|
3992
3992
|
}),
|
|
3993
3993
|
He(e) && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("button", {
|
|
3994
3994
|
onClick: (t) => {
|
|
3995
|
-
t.stopPropagation(),
|
|
3995
|
+
t.stopPropagation(), U({
|
|
3996
3996
|
id: e._id,
|
|
3997
3997
|
name: e.fileName,
|
|
3998
3998
|
prefix: e.accessPrefix
|
|
@@ -4003,7 +4003,7 @@ function rn() {
|
|
|
4003
4003
|
children: /* @__PURE__ */ X(ke, { className: "w-4 h-4" })
|
|
4004
4004
|
}), /* @__PURE__ */ X("button", {
|
|
4005
4005
|
onClick: (t) => {
|
|
4006
|
-
t.stopPropagation(),
|
|
4006
|
+
t.stopPropagation(), be({
|
|
4007
4007
|
id: e._id,
|
|
4008
4008
|
url: e.downloadURL,
|
|
4009
4009
|
name: e.fileName,
|
|
@@ -4043,13 +4043,13 @@ function rn() {
|
|
|
4043
4043
|
autoFocus: !0,
|
|
4044
4044
|
type: "text",
|
|
4045
4045
|
value: H.name,
|
|
4046
|
-
onChange: (e) =>
|
|
4046
|
+
onChange: (e) => U({
|
|
4047
4047
|
...H,
|
|
4048
4048
|
name: e.target.value
|
|
4049
4049
|
}),
|
|
4050
4050
|
onBlur: () => Re(),
|
|
4051
4051
|
onKeyDown: (e) => {
|
|
4052
|
-
e.key === "Enter" && Re(), e.key === "Escape" &&
|
|
4052
|
+
e.key === "Enter" && Re(), e.key === "Escape" && U(null);
|
|
4053
4053
|
},
|
|
4054
4054
|
onClick: (e) => e.stopPropagation(),
|
|
4055
4055
|
className: "no-glow text-[12.5px] font-bold text-foreground bg-transparent border-b border-accent/30 outline-none pb-0.5 w-full"
|
|
@@ -4295,11 +4295,11 @@ function rn() {
|
|
|
4295
4295
|
onClick: () => ze(B.accessPrefix === "pub_" ? B.downloadURL : `${window.location.origin}/drive/${y[B.accessPrefix]}/${B._id}`, B._id),
|
|
4296
4296
|
className: "p-2.5 bg-foreground/5 hover:bg-foreground/10 text-foreground/70 transition-colors rounded-xl shadow-sm hover:text-emerald-500",
|
|
4297
4297
|
title: "Copy Link",
|
|
4298
|
-
children:
|
|
4298
|
+
children: Ce === B._id ? /* @__PURE__ */ X(ce, { className: "w-4 h-4 text-emerald-500" }) : /* @__PURE__ */ X(_, { className: "w-4 h-4" })
|
|
4299
4299
|
}),
|
|
4300
4300
|
He(B) && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("button", {
|
|
4301
4301
|
onClick: () => {
|
|
4302
|
-
V(null),
|
|
4302
|
+
V(null), U({
|
|
4303
4303
|
id: B._id,
|
|
4304
4304
|
name: B.fileName,
|
|
4305
4305
|
prefix: B.accessPrefix
|
|
@@ -4310,7 +4310,7 @@ function rn() {
|
|
|
4310
4310
|
children: /* @__PURE__ */ X(ke, { className: "w-4 h-4" })
|
|
4311
4311
|
}), /* @__PURE__ */ X("button", {
|
|
4312
4312
|
onClick: () => {
|
|
4313
|
-
V(null),
|
|
4313
|
+
V(null), be({
|
|
4314
4314
|
id: B._id,
|
|
4315
4315
|
url: B.downloadURL,
|
|
4316
4316
|
name: B.fileName,
|
|
@@ -4422,19 +4422,19 @@ function rn() {
|
|
|
4422
4422
|
})]
|
|
4423
4423
|
}) }),
|
|
4424
4424
|
/* @__PURE__ */ X(Yt, {
|
|
4425
|
-
isOpen: !!
|
|
4425
|
+
isOpen: !!W,
|
|
4426
4426
|
title: "Confirm Deletion",
|
|
4427
4427
|
message: /* @__PURE__ */ Z(Y, { children: [
|
|
4428
4428
|
"Are you sure you want to delete ",
|
|
4429
4429
|
/* @__PURE__ */ X("strong", {
|
|
4430
4430
|
className: "text-foreground block my-0.5 text-left overflow-hidden text-ellipsis whitespace-nowrap max-w-full",
|
|
4431
|
-
children:
|
|
4431
|
+
children: W?.name
|
|
4432
4432
|
}),
|
|
4433
4433
|
" This action is permanent."
|
|
4434
4434
|
] }),
|
|
4435
4435
|
onConfirm: Le,
|
|
4436
|
-
onCancel: () =>
|
|
4437
|
-
isProcessing:
|
|
4436
|
+
onCancel: () => be(null),
|
|
4437
|
+
isProcessing: xe,
|
|
4438
4438
|
confirmText: "Yes, Delete"
|
|
4439
4439
|
}),
|
|
4440
4440
|
/* @__PURE__ */ X(O, { children: pe && /* @__PURE__ */ X(F.div, {
|
|
@@ -4701,7 +4701,7 @@ function on() {
|
|
|
4701
4701
|
},
|
|
4702
4702
|
className: "space-y-4 w-full",
|
|
4703
4703
|
children: [
|
|
4704
|
-
/* @__PURE__ */ X(
|
|
4704
|
+
/* @__PURE__ */ X(W, {
|
|
4705
4705
|
label: "Favorite Service",
|
|
4706
4706
|
placeholder: "e.g. Design Consulting",
|
|
4707
4707
|
value: e.favoriteService,
|
|
@@ -4710,7 +4710,7 @@ function on() {
|
|
|
4710
4710
|
favoriteService: n.target.value
|
|
4711
4711
|
})
|
|
4712
4712
|
}),
|
|
4713
|
-
/* @__PURE__ */ X(
|
|
4713
|
+
/* @__PURE__ */ X(W, {
|
|
4714
4714
|
label: "Satisfaction Rating",
|
|
4715
4715
|
type: "number",
|
|
4716
4716
|
placeholder: "1 to 10",
|
|
@@ -4920,7 +4920,7 @@ function sn() {
|
|
|
4920
4920
|
},
|
|
4921
4921
|
className: "space-y-4 w-full",
|
|
4922
4922
|
children: [
|
|
4923
|
-
/* @__PURE__ */ X(
|
|
4923
|
+
/* @__PURE__ */ X(W, {
|
|
4924
4924
|
label: "Concept Name",
|
|
4925
4925
|
placeholder: "e.g. Project Apollo",
|
|
4926
4926
|
value: n.concept,
|
|
@@ -4929,7 +4929,7 @@ function sn() {
|
|
|
4929
4929
|
concept: e.target.value
|
|
4930
4930
|
})
|
|
4931
4931
|
}),
|
|
4932
|
-
/* @__PURE__ */ X(
|
|
4932
|
+
/* @__PURE__ */ X(W, {
|
|
4933
4933
|
label: "Feature Request",
|
|
4934
4934
|
placeholder: "e.g. Real-time sync",
|
|
4935
4935
|
value: n.featureRequest,
|
|
@@ -5006,7 +5006,7 @@ function cn() {
|
|
|
5006
5006
|
className: "flex items-center gap-4 w-full sm:w-auto",
|
|
5007
5007
|
children: [/* @__PURE__ */ X("div", {
|
|
5008
5008
|
className: "w-10 h-10 rounded-xl bg-red-500/10 flex items-center justify-center text-red-500 shrink-0",
|
|
5009
|
-
children: /* @__PURE__ */ X(
|
|
5009
|
+
children: /* @__PURE__ */ X(U, { className: "w-5 h-5" })
|
|
5010
5010
|
}), /* @__PURE__ */ Z("div", {
|
|
5011
5011
|
className: "min-w-0 pr-2",
|
|
5012
5012
|
children: [/* @__PURE__ */ X("h4", {
|
|
@@ -5142,42 +5142,38 @@ function cn() {
|
|
|
5142
5142
|
//#region src/prompts/pages/publicPage.ts
|
|
5143
5143
|
var ln = (e, t = []) => {
|
|
5144
5144
|
let n = (e.pageName || e.pageId || "custom_page").toLowerCase().replace(/[^a-z0-9]+/g, "_"), r = `${n.charAt(0).toUpperCase()}${n.slice(1)}Content`;
|
|
5145
|
-
return `
|
|
5145
|
+
return `Create a microcomponent for the Public Landing Page: \`${e.pageName}\`.
|
|
5146
5146
|
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
\`\`\`json
|
|
5151
|
-
${JSON.stringify({
|
|
5152
|
-
pageName: e.pageName,
|
|
5153
|
-
pageTitle: e.pageTitle,
|
|
5154
|
-
route: e.route,
|
|
5155
|
-
template: e.template
|
|
5156
|
-
}, null, 2)}
|
|
5157
|
-
\`\`\`
|
|
5147
|
+
### ── Context ────────────────────────────────────────────────────────────────
|
|
5148
|
+
- **Route**: \`${e.route}\`
|
|
5149
|
+
- **Examples Folder**: Check \`src/your-ai-workflow-firebase-os/microcomponents/\` for reference examples of how to build and insert microcomponents.
|
|
5158
5150
|
|
|
5159
5151
|
### ── Available Forms ────────────────────────────────────────────────────────
|
|
5160
|
-
The following public forms are available in the system. **These are for your information only—do NOT use them unless specifically needed.** Your priority is to listen to the user's specific input and decide if a particular modal, form, or component is actually required for the context of this page:
|
|
5161
5152
|
${t.length > 0 ? t.map((e) => `- ${e}`).join("\n") : "- No public forms found"}
|
|
5153
|
+
Use these only if specifically requested by the user.
|
|
5162
5154
|
|
|
5163
|
-
### ── Your
|
|
5164
|
-
1. **Create
|
|
5165
|
-
2. **Build
|
|
5166
|
-
3. **
|
|
5155
|
+
### ── Your Task ──────────────────────────────────────────────────────────────
|
|
5156
|
+
1. **Create Microcomponent**: Build \`src/microcomponents/${r}.tsx\`.
|
|
5157
|
+
2. **Build Content**: Implement landing page content (hero sections, features, etc).
|
|
5158
|
+
3. **Register Route**: In \`src/App.tsx\`, map your microcomponent to the \`customRoutes\` prop of \`<FirebaseOS>\`:
|
|
5167
5159
|
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
- **DO NOT** change the routing or page exports.
|
|
5171
|
-
- Focus exclusively on the inner content box using the micro-component strategy.
|
|
5160
|
+
\`\`\`tsx
|
|
5161
|
+
import { ${r} } from './microcomponents/${r}';
|
|
5172
5162
|
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5163
|
+
// Inside App.tsx:
|
|
5164
|
+
<FirebaseOS
|
|
5165
|
+
customRoutes={{
|
|
5166
|
+
'${e.route}': ${r}
|
|
5167
|
+
}}
|
|
5168
|
+
// ...
|
|
5169
|
+
/>
|
|
5170
|
+
\`\`\`
|
|
5178
5171
|
|
|
5179
|
-
### ──
|
|
5180
|
-
- **
|
|
5172
|
+
### ── Guidelines ─────────────────────────────────────────────────────────────
|
|
5173
|
+
- **Use Theme Tokens**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-border)\`.
|
|
5174
|
+
- **Pre-built UI**: Import \`{ Button, Input, ContactPopup }\` from \`your-ai-workflow-firebase-os\`.
|
|
5175
|
+
- **Layout**: Use \`glass-panel\` class for sections. DO NOT add redundant \`<h1>\` page titles (the layout handles this).
|
|
5176
|
+
- **DO NOT create React Router routes**. Only use the \`customRoutes\` mapping.
|
|
5181
5177
|
|
|
5182
5178
|
[WHAT SHOULD I BUILD ON THIS PUBLIC PAGE?]`;
|
|
5183
5179
|
}, un = "### Theme & Styling (Dynamic Firestore Theme)\nOur application uses a dynamic theme engine. You MUST use these global CSS variable tokens to ensure your design matches the user's active theme:\n- **Colors**: `var(--bg-color)`, `var(--fg-color)`, `var(--accent-color)`, `var(--accent-deep)`, `var(--panel-bg)`, `var(--panel-border)`.\n- **Text**: Use the `text-foreground` (standard), `text-accent` (primary), and `text-gradient` (headings) classes.\n- **Glassmorphism**: Always use the `.glass-panel` utility class for containers/cards.", dn = "- **<Button />**, **<Input />**, **<ConfirmModal />**, **<DashboardNav />**, **<ContactPopup />**, **<CustomSelect />**.", fn = "- **<Button />**, **<Input />**, **<ConfirmModal />**, **<DashboardNav />**, **<CustomSelect />**.", pn = (e, t, n, r = []) => `I need your help modifying the core Calendar Template which currently powers the "${e?.tabTitle || e?.tabName || t}" tab.
|
|
@@ -5466,182 +5462,107 @@ ${dn}
|
|
|
5466
5462
|
${un}
|
|
5467
5463
|
|
|
5468
5464
|
[DESCRIBE FEATURE TO ADD HERE]`, Sn = (e, t) => {
|
|
5469
|
-
let n = (e.tabName || e.pageId || "shared_page").toLowerCase().replace(/[^a-z0-9]+/g, "_")
|
|
5470
|
-
return
|
|
5471
|
-
|
|
5472
|
-
The "infrastructure" (real-time sync, collaborative routing) is entirely set up and functioning. Your goal is to design the "Community Content" that lives inside this specific shared view.
|
|
5473
|
-
|
|
5474
|
-
### ── Current View Configuration ──────────────────────────────────────────────
|
|
5475
|
-
\`\`\`json
|
|
5476
|
-
${JSON.stringify({
|
|
5477
|
-
viewName: e.tabName,
|
|
5478
|
-
viewTitle: e.tabTitle,
|
|
5479
|
-
route: e.route,
|
|
5480
|
-
template: e.template,
|
|
5481
|
-
storageEnabled: !!e.storage,
|
|
5482
|
-
showActionButton: !!e.showButton
|
|
5483
|
-
}, null, 2)}
|
|
5484
|
-
\`\`\`
|
|
5465
|
+
let n = (e.tabName || e.pageId || "shared_page").toLowerCase().replace(/[^a-z0-9]+/g, "_"), r = `${n.charAt(0).toUpperCase()}${n.slice(1)}Content`;
|
|
5466
|
+
return `Create a microcomponent for the Shared view: \`${e.tabName}\`.
|
|
5485
5467
|
|
|
5486
|
-
### ──
|
|
5487
|
-
**
|
|
5468
|
+
### ── Context ────────────────────────────────────────────────────────────────
|
|
5469
|
+
- **Route**: \`${e.route}\`
|
|
5470
|
+
- **Data Collection**: \`${t}\`
|
|
5471
|
+
- **Storage**: ${e.storage ? "Enabled (mem_files/)" : "Disabled"}
|
|
5472
|
+
- **Security**: Data is visible to all authenticated members. Only admins and the original creator can edit/delete.
|
|
5473
|
+
- **Examples Folder**: Check \`src/your-ai-workflow-firebase-os/microcomponents/\` for reference examples of how to build and insert microcomponents.
|
|
5488
5474
|
|
|
5489
|
-
### ──
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
- **Access Level**: Shared Member Access. Requires authentication.
|
|
5475
|
+
### ── Your Task ──────────────────────────────────────────────────────────────
|
|
5476
|
+
1. **Create Microcomponent**: Build \`src/microcomponents/${r}.tsx\`. Include \`<DashboardNav />\` from \`your-ai-workflow-firebase-os\` at the top.
|
|
5477
|
+
2. **Handle UX/UI**: Implement the required shared dashboard interface (charts, lists, management tools). Write your own Firebase queries using the provided collection. No forms are needed.
|
|
5478
|
+
3. **Register Route**: In \`src/App.tsx\`, map your microcomponent to the \`customRoutes\` prop of \`<FirebaseOS>\`:
|
|
5494
5479
|
|
|
5495
|
-
### ── Your Mission ────────────────────────────────────────────────────────────
|
|
5496
|
-
1. **Create the Page**: Create a full page component at \`src/pages/\${microName}Page.tsx\`. Include \`<DashboardNav />\` from \`your-ai-workflow-firebase-os\` at the top of the content area.
|
|
5497
|
-
2. **Handle UX/UI**: Inside this component, build the collaborative interface (group lists, message boards, shared resource trackers).
|
|
5498
|
-
3. **Register the Route**: Open \`src/App.tsx\` and map this component to the \`customRoutes\` prop of \`<FirebaseOS>\`:
|
|
5499
5480
|
\`\`\`tsx
|
|
5500
|
-
import {
|
|
5481
|
+
import { ${r} } from './microcomponents/${r}';
|
|
5501
5482
|
|
|
5502
5483
|
// Inside App.tsx:
|
|
5503
5484
|
<FirebaseOS
|
|
5504
5485
|
customRoutes={{
|
|
5505
|
-
'
|
|
5486
|
+
'${e.route}': ${r}
|
|
5506
5487
|
}}
|
|
5507
5488
|
// ...
|
|
5508
5489
|
/>
|
|
5509
5490
|
\`\`\`
|
|
5510
5491
|
|
|
5511
|
-
### ──
|
|
5512
|
-
- **
|
|
5513
|
-
- **
|
|
5514
|
-
- **
|
|
5515
|
-
|
|
5516
|
-
### ── Aesthetic & Performance (Theme System) ───────────────────────────────
|
|
5517
|
-
Build with the user's active theme in mind:
|
|
5518
|
-
- **CSS Variables**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-bg)\`, \`var(--panel-border)\`.
|
|
5519
|
-
- **Components**: Re-use \`<Button />\`, \`<Input />\`, \`<ConfirmModal />\`, and \`<DashboardNav />\` natively.
|
|
5520
|
-
- **Styles**: Use \`glass-panel\` and \`text-gradient\` for a premium look.
|
|
5521
|
-
- **Example**: See \`src/microcomponents/SharedExampleContent.tsx\` for a structural reference.
|
|
5522
|
-
|
|
5523
|
-
### ── Important Formatting Rules ──────────────────────────────────────────────
|
|
5524
|
-
- **NO REDUNDANT HEADERS**: The parent template already injects a large dynamic page title and action buttons. DO NOT add a main \`<h1>\` or \`<h2>\` page title at the top of your micro-component. Start directly with your cards, lists, or sub-sections.
|
|
5492
|
+
### ── Guidelines ─────────────────────────────────────────────────────────────
|
|
5493
|
+
- **Use Theme Tokens**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-border)\`.
|
|
5494
|
+
- **Pre-built UI**: Import \`{ Button, Input, ConfirmModal }\` from \`your-ai-workflow-firebase-os\`.
|
|
5495
|
+
- **Layout**: Use \`glass-panel\` class for cards. DO NOT add redundant \`<h1>\` page titles (the layout handles this).
|
|
5496
|
+
- **DO NOT create React Router routes**. Only use the \`customRoutes\` mapping.
|
|
5525
5497
|
|
|
5526
|
-
[WHAT
|
|
5498
|
+
[WHAT FEATURES SHOULD I ADD TO THIS SHARED VIEW?]`;
|
|
5527
5499
|
}, Cn = (e, t) => {
|
|
5528
|
-
let n = (e.tabName || e.pageId || "admin_page").toLowerCase().replace(/[^a-z0-9]+/g, "_")
|
|
5529
|
-
return
|
|
5500
|
+
let n = (e.tabName || e.pageId || "admin_page").toLowerCase().replace(/[^a-z0-9]+/g, "_"), r = `${n.charAt(0).toUpperCase()}${n.slice(1)}Content`;
|
|
5501
|
+
return `Create a microcomponent for the Admin view: \`${e.tabName}\`.
|
|
5530
5502
|
|
|
5531
|
-
|
|
5503
|
+
### ── Context ────────────────────────────────────────────────────────────────
|
|
5504
|
+
- **Route**: \`${e.route}\`
|
|
5505
|
+
- **Data Collection**: \`${t}\`
|
|
5506
|
+
- **Storage**: ${e.storage ? "Enabled (admin_files/)" : "Disabled"}
|
|
5507
|
+
- **Examples Folder**: Check \`src/your-ai-workflow-firebase-os/microcomponents/\` for reference examples of how to build and insert microcomponents.
|
|
5532
5508
|
|
|
5533
|
-
### ──
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
viewTitle: e.tabTitle,
|
|
5538
|
-
route: e.route,
|
|
5539
|
-
template: e.template,
|
|
5540
|
-
storageEnabled: !!e.storage,
|
|
5541
|
-
showActionButton: !!e.showButton,
|
|
5542
|
-
buttonStyle: e.buttonAction || "primary"
|
|
5543
|
-
}, null, 2)}
|
|
5544
|
-
\`\`\`
|
|
5509
|
+
### ── Your Task ──────────────────────────────────────────────────────────────
|
|
5510
|
+
1. **Create Microcomponent**: Build \`src/microcomponents/${r}.tsx\`. Include \`<DashboardNav />\` from \`your-ai-workflow-firebase-os\` at the top.
|
|
5511
|
+
2. **Handle UX/UI**: Implement the required admin dashboard interface (charts, lists, management tools). Write your own Firebase queries using the provided collection. No forms are needed.
|
|
5512
|
+
3. **Register Route**: In \`src/App.tsx\`, map your microcomponent to the \`customRoutes\` prop of \`<FirebaseOS>\`:
|
|
5545
5513
|
|
|
5546
|
-
### ── Note on Forms ──────────────────────────────────────────────────────────
|
|
5547
|
-
**No forms are needed for this view.** Focus on building the administrative dashboard and management tools requested by the user.
|
|
5548
|
-
|
|
5549
|
-
### ── Data & Storage Architecture ─────────────────────────────────────────────
|
|
5550
|
-
The app is already configured to handle data for this specific view using these paths:
|
|
5551
|
-
- **Firestore Collection**: \`${t}\` (Use this for all view data).
|
|
5552
|
-
- **Storage Layer**: ${e.storage ? "Enabled. Uploads are handled via `admin_files/` folder in Storage and mirrored to a shared Firestore collection for tracking." : "Disabled for this view."}
|
|
5553
|
-
- **Access Level**: Full Admin Access. This view is only visible to users with the 'admin' role.
|
|
5554
|
-
|
|
5555
|
-
### ── Your Mission ────────────────────────────────────────────────────────────
|
|
5556
|
-
1. **Create the Page**: Create a full page component at \`src/pages/\${microName}Page.tsx\`. Include \`<DashboardNav />\` from \`your-ai-workflow-firebase-os\` at the top of the content area.
|
|
5557
|
-
2. **Handle UX/UI**: Inside this component, build the interface (lists, charts, management forms, or any feature requested).
|
|
5558
|
-
3. **Register the Route**: Open \`src/App.tsx\` and map this component to the \`customRoutes\` prop of \`<FirebaseOS>\`:
|
|
5559
5514
|
\`\`\`tsx
|
|
5560
|
-
import {
|
|
5515
|
+
import { ${r} } from './microcomponents/${r}';
|
|
5561
5516
|
|
|
5562
5517
|
// Inside App.tsx:
|
|
5563
5518
|
<FirebaseOS
|
|
5564
5519
|
customRoutes={{
|
|
5565
|
-
'
|
|
5520
|
+
'${e.route}': ${r}
|
|
5566
5521
|
}}
|
|
5567
5522
|
// ...
|
|
5568
5523
|
/>
|
|
5569
5524
|
\`\`\`
|
|
5570
5525
|
|
|
5571
|
-
### ──
|
|
5572
|
-
- **
|
|
5573
|
-
- **
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
Build with the user's active theme in mind:
|
|
5577
|
-
- **CSS Variables**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-bg)\`, \`var(--panel-border)\`.
|
|
5578
|
-
- **Components**: Re-use \`<Button />\`, \`<Input />\`, \`<ConfirmModal />\`, and \`<DashboardNav />\` natively.
|
|
5579
|
-
- **Styles**: Use \`glass-panel\` and \`text-gradient\` for a premium look.
|
|
5580
|
-
- **Example**: See \`src/microcomponents/AdminExampleContent.tsx\` for a structural reference.
|
|
5581
|
-
|
|
5582
|
-
### ── Important Formatting Rules ──────────────────────────────────────────────
|
|
5583
|
-
- **NO REDUNDANT HEADERS**: The parent template already injects a large dynamic page title and action buttons. DO NOT add a main \`<h1>\` or \`<h2>\` page title at the top of your micro-component. Start directly with your cards, lists, or sub-sections.
|
|
5526
|
+
### ── Guidelines ─────────────────────────────────────────────────────────────
|
|
5527
|
+
- **Use Theme Tokens**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-border)\`.
|
|
5528
|
+
- **Pre-built UI**: Import \`{ Button, Input, ConfirmModal }\` from \`your-ai-workflow-firebase-os\`.
|
|
5529
|
+
- **Layout**: Use \`glass-panel\` class for cards. DO NOT add redundant \`<h1>\` page titles (the layout handles this).
|
|
5530
|
+
- **DO NOT create React Router routes**. Only use the \`customRoutes\` mapping.
|
|
5584
5531
|
|
|
5585
5532
|
[WHAT FEATURES SHOULD I ADD TO THIS ADMIN VIEW?]`;
|
|
5586
|
-
}, wn = (e, t
|
|
5587
|
-
let
|
|
5588
|
-
return
|
|
5589
|
-
|
|
5590
|
-
The "infrastructure" (auth-guards, dynamic routing, navigation menus, database sync) is entirely set up and functioning. Your task is strictly to design the "Dashboard Content" that lives inside this specific user view.
|
|
5533
|
+
}, wn = (e, t) => {
|
|
5534
|
+
let n = (e.tabName || e.pageId || "private_page").toLowerCase().replace(/[^a-z0-9]+/g, "_"), r = `${n.charAt(0).toUpperCase()}${n.slice(1)}Content`;
|
|
5535
|
+
return `Create a microcomponent for the Private view: \`${e.tabName}\`.
|
|
5591
5536
|
|
|
5592
|
-
### ──
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
template: e.template,
|
|
5599
|
-
storageEnabled: !!e.storage,
|
|
5600
|
-
showActionButton: !!e.showButton,
|
|
5601
|
-
availablePrivateForms: n
|
|
5602
|
-
}, null, 2)}
|
|
5603
|
-
\`\`\`
|
|
5537
|
+
### ── Context ────────────────────────────────────────────────────────────────
|
|
5538
|
+
- **Route**: \`${e.route}\`
|
|
5539
|
+
- **Data Collection**: \`${t}\`
|
|
5540
|
+
- **Storage**: ${e.storage ? "Enabled (user_files/)" : "Disabled"}
|
|
5541
|
+
- **Security**: Data must be filtered by \`where('uid', '==', user.uid)\`.
|
|
5542
|
+
- **Examples Folder**: Check \`src/your-ai-workflow-firebase-os/microcomponents/\` for reference examples of how to build and insert microcomponents.
|
|
5604
5543
|
|
|
5605
|
-
### ──
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
### ── Data & Storage Architecture ─────────────────────────────────────────────
|
|
5610
|
-
Every user sees their own unique data on this page. The system is rigged to handle this isolation:
|
|
5611
|
-
- **Firestore Collection**: \`${t}\`. The template already filters this by \`uid == current_user.uid\`. Use this for all record storage.
|
|
5612
|
-
- **Storage Layer**: ${e.storage ? "Enabled. User files are saved to `user_files/` and strictly isolated by user ID." : "Disabled for this view."}
|
|
5613
|
-
- **Access Level**: Private. Only the owner of the data can view or modify these records.
|
|
5544
|
+
### ── Your Task ──────────────────────────────────────────────────────────────
|
|
5545
|
+
1. **Create Microcomponent**: Build \`src/microcomponents/${r}.tsx\`. Include \`<DashboardNav />\` from \`your-ai-workflow-firebase-os\` at the top.
|
|
5546
|
+
2. **Handle UX/UI**: Implement the required private dashboard interface (charts, lists, management tools). Write your own Firebase queries using the provided collection. No forms are needed.
|
|
5547
|
+
3. **Register Route**: In \`src/App.tsx\`, map your microcomponent to the \`customRoutes\` prop of \`<FirebaseOS>\`:
|
|
5614
5548
|
|
|
5615
|
-
### ── Your Mission ────────────────────────────────────────────────────────────
|
|
5616
|
-
1. **Create the Page**: Create a full page component at \`src/pages/\${microName}Page.tsx\`. Include \`<DashboardNav />\` from \`your-ai-workflow-firebase-os\` at the top of the content area.
|
|
5617
|
-
2. **Handle UX/UI**: Inside this component, build the interface (lists, charts, forms, etc).
|
|
5618
|
-
3. **Register the Route**: Open \`src/App.tsx\` and map this component to the \`customRoutes\` prop of \`<FirebaseOS>\`:
|
|
5619
5549
|
\`\`\`tsx
|
|
5620
|
-
import {
|
|
5550
|
+
import { ${r} } from './microcomponents/${r}';
|
|
5621
5551
|
|
|
5622
5552
|
// Inside App.tsx:
|
|
5623
5553
|
<FirebaseOS
|
|
5624
5554
|
customRoutes={{
|
|
5625
|
-
'
|
|
5555
|
+
'${e.route}': ${r}
|
|
5626
5556
|
}}
|
|
5627
5557
|
// ...
|
|
5628
5558
|
/>
|
|
5629
5559
|
\`\`\`
|
|
5630
5560
|
|
|
5631
|
-
### ──
|
|
5632
|
-
- **
|
|
5633
|
-
- **
|
|
5634
|
-
-
|
|
5635
|
-
|
|
5636
|
-
### ── Aesthetic & Performance (Theme System) ───────────────────────────────
|
|
5637
|
-
Build with the user's active theme in mind:
|
|
5638
|
-
- **CSS Variables**: Use \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-bg)\`, \`var(--panel-border)\`.
|
|
5639
|
-
- **Components**: Re-use \`<Button />\`, \`<Input />\`, \`<ConfirmModal />\`, and \`<DashboardNav />\` natively.
|
|
5640
|
-
- **Styles**: Use \`glass-panel\` and \`text-gradient\` for a premium look.
|
|
5641
|
-
- **Example**: See \`src/microcomponents/PrivateExampleContent.tsx\` for a structural reference.
|
|
5642
|
-
|
|
5643
|
-
### ── Important Formatting Rules ──────────────────────────────────────────────
|
|
5644
|
-
- **NO REDUNDANT HEADERS**: The parent template already injects a large dynamic page title and action buttons. DO NOT add a main \`<h1>\` or \`<h2>\` page title at the top of your micro-component. Start directly with your cards, lists, or sub-sections.
|
|
5561
|
+
### ── Guidelines ─────────────────────────────────────────────────────────────
|
|
5562
|
+
- **Use Theme Tokens**: \`var(--bg-color)\`, \`var(--fg-color)\`, \`var(--accent-color)\`, \`var(--panel-border)\`.
|
|
5563
|
+
- **Pre-built UI**: Import \`{ Button, Input, ConfirmModal }\` from \`your-ai-workflow-firebase-os\`.
|
|
5564
|
+
- **Layout**: Use \`glass-panel\` class for cards. DO NOT add redundant \`<h1>\` page titles (the layout handles this).
|
|
5565
|
+
- **DO NOT create React Router routes**. Only use the \`customRoutes\` mapping.
|
|
5645
5566
|
|
|
5646
5567
|
[WHAT SHOULD I BUILD INSIDE THIS PRIVATE VIEW?]`;
|
|
5647
5568
|
}, Tn = [
|
|
@@ -5826,15 +5747,15 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
5826
5747
|
key: "",
|
|
5827
5748
|
value: ""
|
|
5828
5749
|
}), ne(r);
|
|
5829
|
-
},
|
|
5750
|
+
}, U = (e, t) => {
|
|
5830
5751
|
e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("taskId", t), ie(t);
|
|
5831
|
-
},
|
|
5752
|
+
}, ve = (e, t) => {
|
|
5832
5753
|
e.preventDefault(), e.stopPropagation(), t !== re && oe(t);
|
|
5833
|
-
},
|
|
5754
|
+
}, ye = (e, t) => {
|
|
5834
5755
|
e.preventDefault(), e.stopPropagation(), A(t);
|
|
5835
|
-
},
|
|
5756
|
+
}, W = (e) => {
|
|
5836
5757
|
e.preventDefault(), oe(null), A(null);
|
|
5837
|
-
},
|
|
5758
|
+
}, be = async (e, t, n) => {
|
|
5838
5759
|
e.preventDefault(), e.stopPropagation(), oe(null), A(null);
|
|
5839
5760
|
let r = e.dataTransfer.getData("taskId");
|
|
5840
5761
|
if (!r || r === n) {
|
|
@@ -5858,7 +5779,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
5858
5779
|
};
|
|
5859
5780
|
s && (r.uid = s.uid), tt(J(w, i, e.id), r, { merge: !0 });
|
|
5860
5781
|
}), ie(null);
|
|
5861
|
-
},
|
|
5782
|
+
}, xe = async (e) => {
|
|
5862
5783
|
let t = T.id || `item_${Date.now()}`, n = T.name.trim(), r = n || "Untitled Item", a = D.filter((e) => e.key.trim() !== "" || e.value.trim() !== ""), o = !0, c = T.id ? g.find((e) => e.id === T.id) : null;
|
|
5863
5784
|
if (c) {
|
|
5864
5785
|
let e = JSON.stringify(c.fields || []), t = JSON.stringify(a);
|
|
@@ -5877,13 +5798,13 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
5877
5798
|
s && !T.id && (l.uid = s.uid), await tt(J(w, i, t), l, { merge: !0 }), setTimeout(() => {
|
|
5878
5799
|
C(null), te(null), M(null);
|
|
5879
5800
|
}, 400);
|
|
5880
|
-
},
|
|
5801
|
+
}, Se = (e, t) => {
|
|
5881
5802
|
L({
|
|
5882
5803
|
type: "item",
|
|
5883
5804
|
id: e,
|
|
5884
5805
|
title: t
|
|
5885
5806
|
});
|
|
5886
|
-
},
|
|
5807
|
+
}, Ce = async () => {
|
|
5887
5808
|
let e = `cat_${Date.now()}`, t = {
|
|
5888
5809
|
title: "",
|
|
5889
5810
|
createdAt: Date.now()
|
|
@@ -5895,7 +5816,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
5895
5816
|
behavior: "smooth"
|
|
5896
5817
|
});
|
|
5897
5818
|
}, 150);
|
|
5898
|
-
},
|
|
5819
|
+
}, we = async (e) => {
|
|
5899
5820
|
pe.trim() ? await tt(J(w, a, e), { title: pe }, { merge: !0 }) : await Ke(J(w, a, e)), fe(null);
|
|
5900
5821
|
}, Te = (e, t) => {
|
|
5901
5822
|
L({
|
|
@@ -5980,7 +5901,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
5980
5901
|
children: X(he ? ce : de, { className: "w-4 h-4" })
|
|
5981
5902
|
}), d && /* @__PURE__ */ X(z, {
|
|
5982
5903
|
variant: p === "secondary" ? "secondary" : void 0,
|
|
5983
|
-
onClick:
|
|
5904
|
+
onClick: Ce,
|
|
5984
5905
|
className: "flex-1 sm:flex-none px-3 py-2.5 text-[14px] font-bold rounded-xl shadow-lg hover:-translate-y-0.5 transition-all shrink-0",
|
|
5985
5906
|
children: f === "+" ? /* @__PURE__ */ X(r, { className: "w-4 h-4" }) : f
|
|
5986
5907
|
})]
|
|
@@ -6017,16 +5938,16 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6017
5938
|
/* @__PURE__ */ X("div", {
|
|
6018
5939
|
className: "fixed inset-0 z-[-1]",
|
|
6019
5940
|
onClick: (t) => {
|
|
6020
|
-
t.stopPropagation(),
|
|
5941
|
+
t.stopPropagation(), we(e.id);
|
|
6021
5942
|
}
|
|
6022
5943
|
}),
|
|
6023
5944
|
/* @__PURE__ */ X("input", {
|
|
6024
5945
|
value: pe,
|
|
6025
5946
|
onChange: (e) => me(e.target.value),
|
|
6026
5947
|
onBlur: (t) => {
|
|
6027
|
-
t.relatedTarget?.closest(".category-color-picker") ||
|
|
5948
|
+
t.relatedTarget?.closest(".category-color-picker") || we(e.id);
|
|
6028
5949
|
},
|
|
6029
|
-
onKeyDown: (t) => t.key === "Enter" &&
|
|
5950
|
+
onKeyDown: (t) => t.key === "Enter" && we(e.id),
|
|
6030
5951
|
className: `bg-transparent border-none outline-none font-bold text-[14px] w-full p-0 ${e.color || "text-foreground/80"}`,
|
|
6031
5952
|
placeholder: "Category name"
|
|
6032
5953
|
}),
|
|
@@ -6076,9 +5997,9 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6076
5997
|
})
|
|
6077
5998
|
}), /* @__PURE__ */ Z("div", {
|
|
6078
5999
|
className: `flex flex-col gap-2.5 flex-1 overflow-y-auto styled-scrollbars pr-1 relative min-h-[150px] rounded-xl transition-all ${k === e.id && !ae ? "bg-foreground/5 scale-[1.01] border-dashed border border-accent/20" : ""}`,
|
|
6079
|
-
onDragOver: (t) =>
|
|
6080
|
-
onDragLeave:
|
|
6081
|
-
onDrop: (t) =>
|
|
6000
|
+
onDragOver: (t) => ye(t, e.id),
|
|
6001
|
+
onDragLeave: W,
|
|
6002
|
+
onDrop: (t) => be(t, e.id),
|
|
6082
6003
|
children: [/* @__PURE__ */ X(O, { children: n.map((t) => ee === t.id ? /* @__PURE__ */ Z(F.div, {
|
|
6083
6004
|
initial: {
|
|
6084
6005
|
opacity: 0,
|
|
@@ -6093,7 +6014,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6093
6014
|
/* @__PURE__ */ X("div", {
|
|
6094
6015
|
className: "fixed inset-0 z-[-1]",
|
|
6095
6016
|
onClick: (t) => {
|
|
6096
|
-
t.stopPropagation(),
|
|
6017
|
+
t.stopPropagation(), xe(e.id);
|
|
6097
6018
|
}
|
|
6098
6019
|
}),
|
|
6099
6020
|
/* @__PURE__ */ X("textarea", {
|
|
@@ -6105,7 +6026,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6105
6026
|
name: e.target.value
|
|
6106
6027
|
}),
|
|
6107
6028
|
onKeyDown: (t) => {
|
|
6108
|
-
t.key === "Enter" && !t.shiftKey && (t.preventDefault(),
|
|
6029
|
+
t.key === "Enter" && !t.shiftKey && (t.preventDefault(), xe(e.id));
|
|
6109
6030
|
}
|
|
6110
6031
|
}),
|
|
6111
6032
|
/* @__PURE__ */ X("div", {
|
|
@@ -6117,7 +6038,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6117
6038
|
placeholder: m,
|
|
6118
6039
|
value: t.key,
|
|
6119
6040
|
onChange: (e) => H(n, e.target.value, t.value),
|
|
6120
|
-
onKeyDown: (t) => t.key === "Enter" &&
|
|
6041
|
+
onKeyDown: (t) => t.key === "Enter" && xe(e.id),
|
|
6121
6042
|
className: "no-glow bg-transparent outline-none text-[11px] text-foreground/50 font-bold placeholder:text-foreground/30 relative top-[1px] shrink-0",
|
|
6122
6043
|
style: { width: `${Math.max(3, t.key.length || m.length)}ch` }
|
|
6123
6044
|
}),
|
|
@@ -6135,7 +6056,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6135
6056
|
t.style.height = "auto", t.style.height = t.scrollHeight + "px";
|
|
6136
6057
|
},
|
|
6137
6058
|
onKeyDown: (t) => {
|
|
6138
|
-
t.key === "Enter" && !t.shiftKey && (t.preventDefault(),
|
|
6059
|
+
t.key === "Enter" && !t.shiftKey && (t.preventDefault(), xe(e.id));
|
|
6139
6060
|
},
|
|
6140
6061
|
className: "no-glow bg-transparent outline-none text-[12px] text-foreground/90 font-medium flex-1 min-w-[40px] placeholder:opacity-40 resize-none overflow-hidden leading-tight relative top-[1px]"
|
|
6141
6062
|
})
|
|
@@ -6149,10 +6070,10 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6149
6070
|
]
|
|
6150
6071
|
}, t.id) : /* @__PURE__ */ Z(F.div, {
|
|
6151
6072
|
draggable: !0,
|
|
6152
|
-
onDragStart: (e) =>
|
|
6153
|
-
onDragOver: (e) =>
|
|
6154
|
-
onDragLeave:
|
|
6155
|
-
onDrop: (n) =>
|
|
6073
|
+
onDragStart: (e) => U(e, t.id),
|
|
6074
|
+
onDragOver: (e) => ve(e, t.id),
|
|
6075
|
+
onDragLeave: W,
|
|
6076
|
+
onDrop: (n) => be(n, e.id, t.id),
|
|
6156
6077
|
initial: {
|
|
6157
6078
|
opacity: 0,
|
|
6158
6079
|
scale: .95
|
|
@@ -6173,7 +6094,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6173
6094
|
children: /* @__PURE__ */ X(ke, { className: "w-3.5 h-3.5" })
|
|
6174
6095
|
}), /* @__PURE__ */ X("button", {
|
|
6175
6096
|
onClick: (e) => {
|
|
6176
|
-
e.stopPropagation(),
|
|
6097
|
+
e.stopPropagation(), Se(t.id, t.name);
|
|
6177
6098
|
},
|
|
6178
6099
|
className: "p-1 hover:bg-red-500/10 rounded-md text-foreground/60 hover:text-red-500 transition-colors",
|
|
6179
6100
|
children: /* @__PURE__ */ X(R, { className: "w-3.5 h-3.5" })
|
|
@@ -6235,7 +6156,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6235
6156
|
/* @__PURE__ */ X("div", {
|
|
6236
6157
|
className: "fixed inset-0 z-[-1]",
|
|
6237
6158
|
onClick: (t) => {
|
|
6238
|
-
t.stopPropagation(),
|
|
6159
|
+
t.stopPropagation(), xe(e.id);
|
|
6239
6160
|
}
|
|
6240
6161
|
}),
|
|
6241
6162
|
/* @__PURE__ */ X("textarea", {
|
|
@@ -6247,7 +6168,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6247
6168
|
name: e.target.value
|
|
6248
6169
|
}),
|
|
6249
6170
|
onKeyDown: (t) => {
|
|
6250
|
-
t.key === "Enter" && !t.shiftKey && (t.preventDefault(),
|
|
6171
|
+
t.key === "Enter" && !t.shiftKey && (t.preventDefault(), xe(e.id));
|
|
6251
6172
|
},
|
|
6252
6173
|
autoFocus: !0
|
|
6253
6174
|
}),
|
|
@@ -6261,7 +6182,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6261
6182
|
style: { width: `${Math.max(3, t.key.length || m.length)}ch` },
|
|
6262
6183
|
value: t.key,
|
|
6263
6184
|
onChange: (e) => H(n, e.target.value, t.value),
|
|
6264
|
-
onKeyDown: (t) => t.key === "Enter" &&
|
|
6185
|
+
onKeyDown: (t) => t.key === "Enter" && xe(e.id),
|
|
6265
6186
|
className: "no-glow bg-transparent outline-none text-[11px] text-foreground/50 font-bold placeholder:text-foreground/30 relative top-[1px]"
|
|
6266
6187
|
}),
|
|
6267
6188
|
/* @__PURE__ */ X("span", {
|
|
@@ -6278,7 +6199,7 @@ function En({ title: e = "Board View", subtitle: t = "/templates/board", backUrl
|
|
|
6278
6199
|
t.style.height = "auto", t.style.height = t.scrollHeight + "px";
|
|
6279
6200
|
},
|
|
6280
6201
|
onKeyDown: (t) => {
|
|
6281
|
-
t.key === "Enter" && !t.shiftKey && (t.preventDefault(),
|
|
6202
|
+
t.key === "Enter" && !t.shiftKey && (t.preventDefault(), xe(e.id));
|
|
6282
6203
|
},
|
|
6283
6204
|
className: "no-glow bg-transparent outline-none text-[12px] text-foreground/90 font-medium flex-1 min-w-[40px] placeholder:opacity-40 resize-none overflow-hidden leading-tight relative top-[1px]"
|
|
6284
6205
|
})
|
|
@@ -7626,11 +7547,11 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7626
7547
|
rows: []
|
|
7627
7548
|
}, H = async (e) => {
|
|
7628
7549
|
V.id && (o && i.startsWith("user_") && (e.uid = o.uid), await tt(J(w, i, V.id), e, { merge: !0 }));
|
|
7629
|
-
},
|
|
7550
|
+
}, U = () => {
|
|
7630
7551
|
if (!V.rows || V.rows.length === 0) return;
|
|
7631
7552
|
let e = V.columns.join(","), t = V.rows.map((e) => V.columns.map((t) => `"${e[t] || ""}"`).join(",")).join("\n"), n = new Blob([`${e}\n${t}`], { type: "text/csv" }), r = window.URL.createObjectURL(n), i = document.createElement("a");
|
|
7632
7553
|
i.href = r, i.download = `export_${V.name || "table"}.csv`, i.click(), window.URL.revokeObjectURL(r);
|
|
7633
|
-
},
|
|
7554
|
+
}, ve = (e, t, n) => {
|
|
7634
7555
|
H({
|
|
7635
7556
|
...V,
|
|
7636
7557
|
rows: V.rows.map((r) => r.id === e ? {
|
|
@@ -7638,18 +7559,18 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7638
7559
|
[t]: n
|
|
7639
7560
|
} : r)
|
|
7640
7561
|
});
|
|
7641
|
-
},
|
|
7562
|
+
}, ye = () => {
|
|
7642
7563
|
let e = { id: Date.now().toString() };
|
|
7643
7564
|
V.columns.forEach((t) => e[t] = ""), H({
|
|
7644
7565
|
...V,
|
|
7645
7566
|
rows: [...V.rows || [], e]
|
|
7646
7567
|
});
|
|
7647
|
-
},
|
|
7568
|
+
}, W = (e) => {
|
|
7648
7569
|
H({
|
|
7649
7570
|
...V,
|
|
7650
7571
|
rows: V.rows.filter((t) => t.id !== e)
|
|
7651
7572
|
});
|
|
7652
|
-
},
|
|
7573
|
+
}, be = () => {
|
|
7653
7574
|
let e = `Column ${(V.columns?.length || 0) + 1}`;
|
|
7654
7575
|
V.columns?.includes(e) || (H({
|
|
7655
7576
|
...V,
|
|
@@ -7661,7 +7582,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7661
7582
|
behavior: "smooth"
|
|
7662
7583
|
});
|
|
7663
7584
|
}, 100));
|
|
7664
|
-
},
|
|
7585
|
+
}, xe = (e) => {
|
|
7665
7586
|
let t = (V.columns || []).filter((t) => t !== e), n = (V.rows || []).map((t) => {
|
|
7666
7587
|
let n = { ...t };
|
|
7667
7588
|
return delete n[e], n;
|
|
@@ -7672,9 +7593,9 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7672
7593
|
rows: n,
|
|
7673
7594
|
colColors: r
|
|
7674
7595
|
});
|
|
7675
|
-
},
|
|
7596
|
+
}, Ce = async (e) => {
|
|
7676
7597
|
e.trim() && V.id && e !== V.name && await tt(J(w, i, V.id), { name: e }, { merge: !0 });
|
|
7677
|
-
},
|
|
7598
|
+
}, we = async () => {
|
|
7678
7599
|
E(!0), b(!1);
|
|
7679
7600
|
let e = `tbl_${Date.now()}`;
|
|
7680
7601
|
await tt(J(w, i, e), {
|
|
@@ -7782,13 +7703,13 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7782
7703
|
}),
|
|
7783
7704
|
p && /* @__PURE__ */ X(z, {
|
|
7784
7705
|
variant: "secondary",
|
|
7785
|
-
onClick:
|
|
7706
|
+
onClick: U,
|
|
7786
7707
|
className: "px-3 py-2.5 font-bold rounded-xl shadow-sm border border-[var(--panel-border)] flex items-center gap-2",
|
|
7787
7708
|
children: /* @__PURE__ */ X(ne, { className: "w-4 h-4" })
|
|
7788
7709
|
}),
|
|
7789
7710
|
u && /* @__PURE__ */ X(z, {
|
|
7790
7711
|
variant: f === "primary" ? void 0 : "secondary",
|
|
7791
|
-
onClick:
|
|
7712
|
+
onClick: ye,
|
|
7792
7713
|
className: "px-3 py-2.5 font-bold rounded-xl border border-[var(--panel-border)] shadow-sm flex items-center gap-2",
|
|
7793
7714
|
children: d === "+" ? /* @__PURE__ */ X(r, { className: "w-4 h-4" }) : d
|
|
7794
7715
|
})
|
|
@@ -7820,7 +7741,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7820
7741
|
contentEditable: !0,
|
|
7821
7742
|
suppressContentEditableWarning: !0,
|
|
7822
7743
|
onBlur: (e) => {
|
|
7823
|
-
S(!1),
|
|
7744
|
+
S(!1), Ce(e.currentTarget.textContent || "");
|
|
7824
7745
|
},
|
|
7825
7746
|
onKeyDown: (e) => {
|
|
7826
7747
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
@@ -7866,7 +7787,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7866
7787
|
}),
|
|
7867
7788
|
/* @__PURE__ */ X("div", { className: "w-full h-[1px] bg-[var(--panel-border)]/50 my-1" }),
|
|
7868
7789
|
/* @__PURE__ */ Z("button", {
|
|
7869
|
-
onClick:
|
|
7790
|
+
onClick: we,
|
|
7870
7791
|
className: "w-full px-4 py-2.5 text-[13px] font-bold text-left text-foreground/70 hover:text-foreground hover:bg-foreground/5 transition-colors flex items-center gap-2",
|
|
7871
7792
|
children: [/* @__PURE__ */ X(r, { className: "w-4 h-4" }), " Create New Table"]
|
|
7872
7793
|
})
|
|
@@ -7875,7 +7796,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7875
7796
|
}), /* @__PURE__ */ X("button", {
|
|
7876
7797
|
onClick: () => b(!y),
|
|
7877
7798
|
className: "p-1 px-1.5 rounded-lg hover:bg-foreground/5 transition-colors text-foreground/40 hover:text-foreground shrink-0 border border-transparent hover:border-[var(--panel-border)]",
|
|
7878
|
-
children: /* @__PURE__ */ X(
|
|
7799
|
+
children: /* @__PURE__ */ X(Se, { className: `w-4 h-4 transition-transform ${y ? "rotate-180 text-accent" : ""}` })
|
|
7879
7800
|
})]
|
|
7880
7801
|
}), /* @__PURE__ */ Z("span", {
|
|
7881
7802
|
className: "opacity-40 text-[11px] font-bold mt-1 uppercase tracking-wider",
|
|
@@ -7968,7 +7889,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
7968
7889
|
}),
|
|
7969
7890
|
(V.columns || []).length > 1 && /* @__PURE__ */ X("button", {
|
|
7970
7891
|
onClick: (t) => {
|
|
7971
|
-
t.stopPropagation(),
|
|
7892
|
+
t.stopPropagation(), xe(e);
|
|
7972
7893
|
},
|
|
7973
7894
|
className: "p-1.5 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-500/10 text-foreground/30 hover:text-red-500",
|
|
7974
7895
|
title: "Delete column",
|
|
@@ -8071,7 +7992,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
8071
7992
|
]
|
|
8072
7993
|
})] }),
|
|
8073
7994
|
/* @__PURE__ */ X("button", {
|
|
8074
|
-
onClick:
|
|
7995
|
+
onClick: be,
|
|
8075
7996
|
className: "p-1.5 rounded-lg text-foreground/40 hover:text-accent hover:bg-accent/10 transition-colors flex items-center justify-center",
|
|
8076
7997
|
children: /* @__PURE__ */ X(r, { className: "w-4 h-4" })
|
|
8077
7998
|
})
|
|
@@ -8120,7 +8041,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
8120
8041
|
children: [i ? /* @__PURE__ */ X("textarea", {
|
|
8121
8042
|
autoFocus: !0,
|
|
8122
8043
|
value: e[r] || "",
|
|
8123
|
-
onChange: (t) =>
|
|
8044
|
+
onChange: (t) => ve(e.id, r, t.target.value),
|
|
8124
8045
|
onBlur: () => M(null),
|
|
8125
8046
|
onKeyDown: (e) => {
|
|
8126
8047
|
e.key === "Enter" && !e.shiftKey && M(null);
|
|
@@ -8192,7 +8113,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
8192
8113
|
]
|
|
8193
8114
|
})] }),
|
|
8194
8115
|
/* @__PURE__ */ X("button", {
|
|
8195
|
-
onClick: () =>
|
|
8116
|
+
onClick: () => W(e.id),
|
|
8196
8117
|
className: "p-2 ml-auto rounded-lg text-foreground/20 hover:text-red-500 hover:bg-red-500/10 transition-colors flex items-center justify-center",
|
|
8197
8118
|
children: /* @__PURE__ */ X(R, { className: "w-4 h-4" })
|
|
8198
8119
|
})
|
|
@@ -8217,7 +8138,7 @@ function ti({ title: e = "Table View", subtitle: t = "/templates/table", backUrl
|
|
|
8217
8138
|
children: /* @__PURE__ */ X("div", {
|
|
8218
8139
|
className: "flex items-center gap-4",
|
|
8219
8140
|
children: /* @__PURE__ */ X("button", {
|
|
8220
|
-
onClick:
|
|
8141
|
+
onClick: ye,
|
|
8221
8142
|
className: "p-1.5 rounded-lg text-foreground/40 hover:text-accent hover:bg-accent/10 transition-colors flex items-center justify-center ml-2 border border-transparent hover:border-accent/20",
|
|
8222
8143
|
children: /* @__PURE__ */ X(r, { className: "w-4 h-4" })
|
|
8223
8144
|
})
|
|
@@ -8334,17 +8255,17 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
8334
8255
|
if (e === "list" || e === "month") return e;
|
|
8335
8256
|
} catch {}
|
|
8336
8257
|
return h === "board" ? "list" : "month";
|
|
8337
|
-
}), [x, S] = K([]), [C, ee] = K([]), [te, T] = K(!1), [E, D] = K(null), [ne, re] = K(!1), [ie, ae] = K(!1), [k, A] = K(null), [j, ue] = K(ri), [N, fe] = K(/* @__PURE__ */ new Date()), [pe, me] = K(!1), [I, he] = K(null), [ge, _e] = K(null), [B, V] = K(!1),
|
|
8258
|
+
}), [x, S] = K([]), [C, ee] = K([]), [te, T] = K(!1), [E, D] = K(null), [ne, re] = K(!1), [ie, ae] = K(!1), [k, A] = K(null), [j, ue] = K(ri), [N, fe] = K(/* @__PURE__ */ new Date()), [pe, me] = K(!1), [I, he] = K(null), [ge, _e] = K(null), [B, V] = K(!1), U = `cal_24h_${i}`, [ve, ye] = K(() => {
|
|
8338
8259
|
try {
|
|
8339
|
-
let e = localStorage.getItem(
|
|
8260
|
+
let e = localStorage.getItem(U);
|
|
8340
8261
|
if (e !== null) return e === "true";
|
|
8341
8262
|
} catch {}
|
|
8342
8263
|
return a === "24h";
|
|
8343
|
-
}),
|
|
8344
|
-
let e = !
|
|
8345
|
-
|
|
8264
|
+
}), be = () => {
|
|
8265
|
+
let e = !ve;
|
|
8266
|
+
ye(e);
|
|
8346
8267
|
try {
|
|
8347
|
-
localStorage.setItem(
|
|
8268
|
+
localStorage.setItem(U, String(e));
|
|
8348
8269
|
} catch {}
|
|
8349
8270
|
};
|
|
8350
8271
|
G(() => {
|
|
@@ -8360,19 +8281,19 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
8360
8281
|
i,
|
|
8361
8282
|
v
|
|
8362
8283
|
]);
|
|
8363
|
-
let
|
|
8284
|
+
let xe = () => {
|
|
8364
8285
|
let e = y === "month" ? "list" : "month";
|
|
8365
8286
|
b(e);
|
|
8366
8287
|
try {
|
|
8367
8288
|
localStorage.setItem(`cal_view_${i}`, e);
|
|
8368
8289
|
} catch {}
|
|
8369
|
-
},
|
|
8290
|
+
}, Se = () => {
|
|
8370
8291
|
try {
|
|
8371
8292
|
return sessionStorage.getItem("cal_guest_email") || "";
|
|
8372
8293
|
} catch {
|
|
8373
8294
|
return "";
|
|
8374
8295
|
}
|
|
8375
|
-
},
|
|
8296
|
+
}, Ce = (e) => {
|
|
8376
8297
|
try {
|
|
8377
8298
|
sessionStorage.setItem("cal_guest_email", e);
|
|
8378
8299
|
} catch {}
|
|
@@ -8407,9 +8328,9 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
8407
8328
|
I?.uid,
|
|
8408
8329
|
B
|
|
8409
8330
|
]);
|
|
8410
|
-
let
|
|
8331
|
+
let we = (e) => !!I && I.uid === e.uid, Te = (e) => v === "public" ? !1 : v === "private" ? !!I : we(e), Ee = (e) => {
|
|
8411
8332
|
if (!e) return "";
|
|
8412
|
-
if (
|
|
8333
|
+
if (ve) return e;
|
|
8413
8334
|
let [t, n] = e.split(":"), r = parseInt(t, 10), i = r >= 12 ? "PM" : "AM";
|
|
8414
8335
|
return r = r % 12 || 12, `${r}:${n} ${i}`;
|
|
8415
8336
|
}, De = (e) => {
|
|
@@ -8453,7 +8374,7 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
8453
8374
|
...ri,
|
|
8454
8375
|
dateStr: e || Me(t),
|
|
8455
8376
|
time: `${n}:00`,
|
|
8456
|
-
guestEmail: v === "public" ?
|
|
8377
|
+
guestEmail: v === "public" ? Se() : "",
|
|
8457
8378
|
customFields: {}
|
|
8458
8379
|
}), T(!0);
|
|
8459
8380
|
}, Ue = (e) => {
|
|
@@ -8487,7 +8408,7 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
8487
8408
|
};
|
|
8488
8409
|
if (j.color && (e.color = j.color), _.length > 0 && (e.customFields = j.customFields), !j.id) if (v === "public") {
|
|
8489
8410
|
let t = j.guestEmail.trim();
|
|
8490
|
-
e.creatorEmail = t,
|
|
8411
|
+
e.creatorEmail = t, Ce(t);
|
|
8491
8412
|
} else v === "private" || v === "shared" ? (e.uid = I?.uid, e.creatorEmail = I?.email || "", e.creatorName = I?.displayName || "", e.creatorAvatar = I?.photoURL || "") : v === "admin_only" && (e.uid = I?.uid, e.creatorEmail = ge?.email || I?.email || "", e.creatorName = ge?.displayName || ge?.name || "", e.creatorAvatar = ge?.avatar || ge?.avatarUrl || I?.photoURL || "");
|
|
8492
8413
|
j.id ? (await tt(J(w, i, j.id), e, { merge: !0 }), E?.id === j.id && D({
|
|
8493
8414
|
...E,
|
|
@@ -8616,14 +8537,14 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
8616
8537
|
/* @__PURE__ */ X(F.button, {
|
|
8617
8538
|
whileHover: { scale: 1.05 },
|
|
8618
8539
|
whileTap: { scale: .95 },
|
|
8619
|
-
onClick:
|
|
8540
|
+
onClick: be,
|
|
8620
8541
|
className: "w-10 h-10 flex items-center justify-center rounded-xl transition-all duration-300 cursor-pointer btn-secondary text-[12px] font-extrabold",
|
|
8621
|
-
children:
|
|
8542
|
+
children: ve ? "24h" : "12h"
|
|
8622
8543
|
}),
|
|
8623
8544
|
f && /* @__PURE__ */ X(F.button, {
|
|
8624
8545
|
whileHover: { scale: 1.05 },
|
|
8625
8546
|
whileTap: { scale: .95 },
|
|
8626
|
-
onClick:
|
|
8547
|
+
onClick: xe,
|
|
8627
8548
|
title: y === "month" ? "Switch to Board" : "Switch to Calendar",
|
|
8628
8549
|
className: `w-10 h-10 flex items-center justify-center rounded-xl transition-all duration-300 cursor-pointer ${p === "primary" ? "btn-primary" : "btn-secondary"}`,
|
|
8629
8550
|
children: X(y === "month" ? l : M, { className: "w-4 h-4" })
|
|
@@ -8982,7 +8903,7 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
8982
8903
|
onSubmit: We,
|
|
8983
8904
|
className: "space-y-4",
|
|
8984
8905
|
children: [
|
|
8985
|
-
v === "public" && !j.id && /* @__PURE__ */ X(
|
|
8906
|
+
v === "public" && !j.id && /* @__PURE__ */ X(W, {
|
|
8986
8907
|
label: "Your Email",
|
|
8987
8908
|
type: "email",
|
|
8988
8909
|
value: j.guestEmail,
|
|
@@ -8993,7 +8914,7 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
8993
8914
|
placeholder: "you@example.com",
|
|
8994
8915
|
required: !0
|
|
8995
8916
|
}),
|
|
8996
|
-
/* @__PURE__ */ X(
|
|
8917
|
+
/* @__PURE__ */ X(W, {
|
|
8997
8918
|
label: "Event Title",
|
|
8998
8919
|
value: j.title,
|
|
8999
8920
|
onChange: (e) => ue({
|
|
@@ -9018,7 +8939,7 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
9018
8939
|
className: "block min-h-[80px] w-full rounded-xl text-[15px] text-foreground px-4 py-3 transition-all duration-300 placeholder:text-foreground/40 focus:outline-none focus:border-accent glow-focus glass-panel styled-scrollbars resize-none"
|
|
9019
8940
|
})]
|
|
9020
8941
|
}),
|
|
9021
|
-
_.map((e) => /* @__PURE__ */ X(
|
|
8942
|
+
_.map((e) => /* @__PURE__ */ X(W, {
|
|
9022
8943
|
label: e,
|
|
9023
8944
|
value: j.customFields[e] || "",
|
|
9024
8945
|
onChange: (t) => ue({
|
|
@@ -9033,7 +8954,7 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
9033
8954
|
/* @__PURE__ */ X("style", { children: "\n input[type=\"date\"]::-webkit-calendar-picker-indicator{background:transparent;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto;z-index:10}\n input[type=\"number\"]::-webkit-inner-spin-button,input[type=\"number\"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n input[type=\"number\"]{-moz-appearance:textfield}\n " }),
|
|
9034
8955
|
/* @__PURE__ */ Z("div", {
|
|
9035
8956
|
className: "relative group/date flex flex-col w-full",
|
|
9036
|
-
children: [/* @__PURE__ */ X(
|
|
8957
|
+
children: [/* @__PURE__ */ X(W, {
|
|
9037
8958
|
type: "date",
|
|
9038
8959
|
label: "Date",
|
|
9039
8960
|
required: !0,
|
|
@@ -9050,7 +8971,7 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
9050
8971
|
}),
|
|
9051
8972
|
/* @__PURE__ */ Z("div", {
|
|
9052
8973
|
className: "grid grid-cols-2 gap-4",
|
|
9053
|
-
children: [
|
|
8974
|
+
children: [ve ? /* @__PURE__ */ X(W, {
|
|
9054
8975
|
type: "time",
|
|
9055
8976
|
label: "Time",
|
|
9056
8977
|
value: j.time,
|
|
@@ -9107,7 +9028,7 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
9107
9028
|
]
|
|
9108
9029
|
})]
|
|
9109
9030
|
});
|
|
9110
|
-
})(), /* @__PURE__ */ X(
|
|
9031
|
+
})(), /* @__PURE__ */ X(W, {
|
|
9111
9032
|
type: "number",
|
|
9112
9033
|
min: "1",
|
|
9113
9034
|
max: "1440",
|
|
@@ -9243,13 +9164,13 @@ function ii({ title: e = "Calendar View", subtitle: t = "/templates/calendar", b
|
|
|
9243
9164
|
children: [
|
|
9244
9165
|
/* @__PURE__ */ X(z, {
|
|
9245
9166
|
variant: "secondary",
|
|
9246
|
-
onClick:
|
|
9167
|
+
onClick: be,
|
|
9247
9168
|
className: "px-3 h-10 text-[12px] font-bold rounded-xl flex items-center justify-center border-[var(--panel-border)] border shrink-0 hover:bg-foreground/5 shadow-sm text-foreground/70",
|
|
9248
|
-
children:
|
|
9169
|
+
children: ve ? "24h" : "12h"
|
|
9249
9170
|
}),
|
|
9250
9171
|
/* @__PURE__ */ X(z, {
|
|
9251
9172
|
variant: "secondary",
|
|
9252
|
-
onClick:
|
|
9173
|
+
onClick: xe,
|
|
9253
9174
|
className: "w-10 h-10 p-0 text-[14px] font-bold rounded-xl flex items-center justify-center border-[var(--panel-border)] border shrink-0",
|
|
9254
9175
|
children: X(y === "month" ? l : M, { className: "w-4 h-4 text-foreground/70" })
|
|
9255
9176
|
}),
|
|
@@ -10597,7 +10518,7 @@ var di = {
|
|
|
10597
10518
|
onClick: () => t(!e),
|
|
10598
10519
|
title: e ? "Page Active" : "Page Hidden",
|
|
10599
10520
|
className: `p-1.5 transition-colors rounded-lg flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity ${r} ${e ? "text-accent hover:bg-accent/10" : "text-foreground/40 hover:bg-foreground/5"} ${n ? "!opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
10600
|
-
children: X(e ? m :
|
|
10521
|
+
children: X(e ? m : ye, { className: "w-4 h-4" })
|
|
10601
10522
|
});
|
|
10602
10523
|
function _i() {
|
|
10603
10524
|
let { userRole: e } = jt(), t = wt(), n = i(), [a, s] = K(hi), [c, l] = K(() => {
|
|
@@ -10793,7 +10714,7 @@ function _i() {
|
|
|
10793
10714
|
console.error("Failed to reset home config:", e);
|
|
10794
10715
|
}
|
|
10795
10716
|
setTimeout(() => k(!1), 500);
|
|
10796
|
-
},
|
|
10717
|
+
}, U = async (e, t, n) => {
|
|
10797
10718
|
e.stopPropagation(), x((e) => ({
|
|
10798
10719
|
...e,
|
|
10799
10720
|
[t]: !0
|
|
@@ -10801,7 +10722,7 @@ function _i() {
|
|
|
10801
10722
|
...e,
|
|
10802
10723
|
[t]: !1
|
|
10803
10724
|
})), 500);
|
|
10804
|
-
},
|
|
10725
|
+
}, ve = (e) => {
|
|
10805
10726
|
let t = "draft_" + Math.floor(Math.random() * 1e4);
|
|
10806
10727
|
s([...a, {
|
|
10807
10728
|
id: t,
|
|
@@ -10854,7 +10775,7 @@ function _i() {
|
|
|
10854
10775
|
]
|
|
10855
10776
|
})
|
|
10856
10777
|
});
|
|
10857
|
-
let
|
|
10778
|
+
let ye = async (e, t, n) => {
|
|
10858
10779
|
let r = n === "public", i = r ? "page_order" : "tab_order", o = r ? M : ue, c = (r ? A : ce).has(e);
|
|
10859
10780
|
s(a.map((t) => t.id === e ? {
|
|
10860
10781
|
...t,
|
|
@@ -10868,9 +10789,9 @@ function _i() {
|
|
|
10868
10789
|
...l[u],
|
|
10869
10790
|
hidden: !c
|
|
10870
10791
|
}, await tt(J(w, "sys_configs", i), { order: l });
|
|
10871
|
-
},
|
|
10792
|
+
}, W = (e, t) => {
|
|
10872
10793
|
t || C(e);
|
|
10873
|
-
},
|
|
10794
|
+
}, be = async () => {
|
|
10874
10795
|
if (S) {
|
|
10875
10796
|
T(!0);
|
|
10876
10797
|
try {
|
|
@@ -10944,7 +10865,7 @@ function _i() {
|
|
|
10944
10865
|
}
|
|
10945
10866
|
T(!1), C(null);
|
|
10946
10867
|
}
|
|
10947
|
-
},
|
|
10868
|
+
}, xe = (e) => {
|
|
10948
10869
|
let t = e.id + "_" + Math.floor(Math.random() * 1e3), n = {
|
|
10949
10870
|
...e,
|
|
10950
10871
|
id: t,
|
|
@@ -10970,7 +10891,7 @@ function _i() {
|
|
|
10970
10891
|
block: "center"
|
|
10971
10892
|
});
|
|
10972
10893
|
}, 100);
|
|
10973
|
-
},
|
|
10894
|
+
}, Ce = [
|
|
10974
10895
|
{
|
|
10975
10896
|
id: "public",
|
|
10976
10897
|
title: "Public Pages",
|
|
@@ -11003,7 +10924,7 @@ function _i() {
|
|
|
11003
10924
|
description: "Internal dashboard tabs for admin users only.",
|
|
11004
10925
|
filter: (e) => e.type === "admin"
|
|
11005
10926
|
}
|
|
11006
|
-
], [
|
|
10927
|
+
], [we, Te] = K(!1), [Ee, Oe] = K(!1);
|
|
11007
10928
|
return /* @__PURE__ */ Z("main", {
|
|
11008
10929
|
className: "flex-1 w-full max-w-7xl mx-auto p-4 md:p-8 z-10 flex flex-col",
|
|
11009
10930
|
children: [
|
|
@@ -11082,7 +11003,7 @@ function _i() {
|
|
|
11082
11003
|
"admin"
|
|
11083
11004
|
].map((e) => /* @__PURE__ */ Z("button", {
|
|
11084
11005
|
onClick: () => {
|
|
11085
|
-
|
|
11006
|
+
ve(e), f(!1);
|
|
11086
11007
|
},
|
|
11087
11008
|
className: "text-left px-3 py-2 text-[13px] font-bold uppercase tracking-wider text-foreground/70 hover:text-foreground hover:bg-foreground/5 rounded-lg transition-colors cursor-pointer",
|
|
11088
11009
|
children: [e, " Page"]
|
|
@@ -11105,7 +11026,7 @@ function _i() {
|
|
|
11105
11026
|
children: "Synchronizing Architecture..."
|
|
11106
11027
|
})]
|
|
11107
11028
|
})
|
|
11108
|
-
}) }),
|
|
11029
|
+
}) }), Ce.map((e, t) => {
|
|
11109
11030
|
let n = a.filter(e.filter), r = e.id === "public" ? M : ue, i = n.sort((e, t) => {
|
|
11110
11031
|
let n = r.findIndex((t) => t.id === e.id), i = r.findIndex((e) => e.id === t.id);
|
|
11111
11032
|
return n === -1 && i === -1 ? 0 : n === -1 ? 1 : i === -1 ? -1 : n - i;
|
|
@@ -11160,7 +11081,7 @@ function _i() {
|
|
|
11160
11081
|
"templates"
|
|
11161
11082
|
].includes(t.id) ? /* @__PURE__ */ X("button", {
|
|
11162
11083
|
onClick: (e) => {
|
|
11163
|
-
e.stopPropagation(),
|
|
11084
|
+
e.stopPropagation(), xe(t);
|
|
11164
11085
|
},
|
|
11165
11086
|
className: "p-1.5 hover:bg-accent/10 text-foreground/40 hover:text-accent transition-colors rounded-lg flex items-center justify-center shrink-0",
|
|
11166
11087
|
title: "Duplicate Page",
|
|
@@ -11170,12 +11091,12 @@ function _i() {
|
|
|
11170
11091
|
className: "flex items-center justify-end w-8 shrink-0",
|
|
11171
11092
|
children: t.id === "home" ? /* @__PURE__ */ X("div", { className: "w-[28px] shrink-0" }) : /* @__PURE__ */ X(gi, {
|
|
11172
11093
|
enabled: !s(t),
|
|
11173
|
-
onChange: () =>
|
|
11094
|
+
onChange: () => ye(t.id, t.isSystem, t.type)
|
|
11174
11095
|
})
|
|
11175
11096
|
}),
|
|
11176
11097
|
t.isSystem ? /* @__PURE__ */ X("div", { className: "w-[28px] shrink-0" }) : /* @__PURE__ */ X("button", {
|
|
11177
11098
|
onClick: (e) => {
|
|
11178
|
-
e.stopPropagation(),
|
|
11099
|
+
e.stopPropagation(), W(t.id, t.isSystem);
|
|
11179
11100
|
},
|
|
11180
11101
|
className: "p-1.5 hover:bg-red-500/10 text-foreground/30 hover:text-red-500 transition-colors rounded-lg flex items-center justify-center shrink-0",
|
|
11181
11102
|
title: "Delete Page",
|
|
@@ -11259,7 +11180,7 @@ function _i() {
|
|
|
11259
11180
|
children: [/* @__PURE__ */ Z("div", {
|
|
11260
11181
|
className: "absolute top-4 right-4 flex items-center gap-1 z-20",
|
|
11261
11182
|
children: [/* @__PURE__ */ X("button", {
|
|
11262
|
-
onClick: (e) =>
|
|
11183
|
+
onClick: (e) => U(e, t.id, t.type === "admin" ? pi : t.type === "shared" ? mi : t.type === "public" ? di : fi),
|
|
11263
11184
|
className: "w-8 h-8 p-0 border-transparent bg-transparent hover:bg-red-500/10 rounded-lg flex items-center justify-center shrink-0 transition-colors group",
|
|
11264
11185
|
title: "Reset to Defaults",
|
|
11265
11186
|
children: b[t.id] ? /* @__PURE__ */ X(g, { className: "w-3.5 h-3.5 text-red-500 animate-spin" }) : /* @__PURE__ */ X(je, { className: "w-3.5 h-3.5 text-foreground/40 group-hover:text-red-500 transition-colors" })
|
|
@@ -11375,7 +11296,7 @@ function _i() {
|
|
|
11375
11296
|
children: [/* @__PURE__ */ Z("summary", {
|
|
11376
11297
|
className: "text-[11px] font-bold uppercase tracking-wider text-foreground/40 cursor-pointer list-none flex items-center gap-2 select-none hover:text-foreground/70 transition-colors w-fit pb-1 ml-1 outline-none",
|
|
11377
11298
|
children: [
|
|
11378
|
-
/* @__PURE__ */ X(
|
|
11299
|
+
/* @__PURE__ */ X(Se, { className: "w-3.5 h-3.5 group-open/details:-rotate-180 transition-transform" }),
|
|
11379
11300
|
"Hidden pages (",
|
|
11380
11301
|
d.length,
|
|
11381
11302
|
")"
|
|
@@ -11386,7 +11307,7 @@ function _i() {
|
|
|
11386
11307
|
})]
|
|
11387
11308
|
})]
|
|
11388
11309
|
}),
|
|
11389
|
-
t <
|
|
11310
|
+
t < Ce.length - 1 && /* @__PURE__ */ X("div", { className: "w-full border-t border-[var(--panel-border)]/70 my-10" })
|
|
11390
11311
|
]
|
|
11391
11312
|
}, e.id);
|
|
11392
11313
|
})]
|
|
@@ -11394,7 +11315,7 @@ function _i() {
|
|
|
11394
11315
|
})]
|
|
11395
11316
|
}),
|
|
11396
11317
|
/* @__PURE__ */ X(Yt, {
|
|
11397
|
-
isOpen:
|
|
11318
|
+
isOpen: we,
|
|
11398
11319
|
onCancel: () => Te(!1),
|
|
11399
11320
|
onConfirm: async () => {
|
|
11400
11321
|
Oe(!0);
|
|
@@ -11416,7 +11337,7 @@ function _i() {
|
|
|
11416
11337
|
/* @__PURE__ */ X(Yt, {
|
|
11417
11338
|
isOpen: !!S,
|
|
11418
11339
|
onCancel: () => C(null),
|
|
11419
|
-
onConfirm:
|
|
11340
|
+
onConfirm: be,
|
|
11420
11341
|
title: "Delete Page",
|
|
11421
11342
|
message: "Are you sure you want to delete this page? This action cannot be undone and will remove all associated configurations.",
|
|
11422
11343
|
confirmText: "Remove Page",
|
|
@@ -11578,7 +11499,7 @@ function yi() {
|
|
|
11578
11499
|
children: /* @__PURE__ */ Z("div", {
|
|
11579
11500
|
className: "flex flex-col items-center justify-center flex-1",
|
|
11580
11501
|
children: [
|
|
11581
|
-
/* @__PURE__ */ X(
|
|
11502
|
+
/* @__PURE__ */ X(U, { className: "w-12 h-12 text-red-500 mb-4" }),
|
|
11582
11503
|
/* @__PURE__ */ X("h2", {
|
|
11583
11504
|
className: "text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-br from-red-400 to-red-600",
|
|
11584
11505
|
children: "Access Restricted"
|
|
@@ -11849,7 +11770,7 @@ function yi() {
|
|
|
11849
11770
|
confirmText: "Delete form",
|
|
11850
11771
|
isProcessing: b
|
|
11851
11772
|
}),
|
|
11852
|
-
f && /* @__PURE__ */ X(
|
|
11773
|
+
f && /* @__PURE__ */ X(Ce, {
|
|
11853
11774
|
formConfig: f,
|
|
11854
11775
|
onClose: () => p(null)
|
|
11855
11776
|
})
|
|
@@ -11943,7 +11864,7 @@ function bi({ config: e }) {
|
|
|
11943
11864
|
]
|
|
11944
11865
|
})
|
|
11945
11866
|
}),
|
|
11946
|
-
/* @__PURE__ */ X(O, { children: i && /* @__PURE__ */ X(
|
|
11867
|
+
/* @__PURE__ */ X(O, { children: i && /* @__PURE__ */ X(Ce, {
|
|
11947
11868
|
onClose: () => a(null),
|
|
11948
11869
|
formId: i
|
|
11949
11870
|
}) })
|
|
@@ -11958,11 +11879,9 @@ function xi({ config: e }) {
|
|
|
11958
11879
|
let t = e.fileType || "";
|
|
11959
11880
|
M(t.startsWith("image/") || t.startsWith("video/") || t === "application/pdf");
|
|
11960
11881
|
}
|
|
11961
|
-
}, A = ie, [j, M] = K(!0), [le, N] = K(!1), [P, pe] = K(null), [me, I] = K(""), [L, ge] = K(""), [R, _e] = K([]), B = We(null),
|
|
11882
|
+
}, A = ie, [j, M] = K(!0), [le, N] = K(!1), [P, pe] = K(null), [me, I] = K(""), [L, ge] = K(""), [R, _e] = K([]), B = We(null), H = (e.tabName || e.pageId || "private_page").toLowerCase().replace(/[^a-z0-9]+/g, "_"), U = `user_${H}_records`;
|
|
11962
11883
|
G(() => {
|
|
11963
|
-
document.title = e.tabTitle || e.tabName || i.appName || "Firebase OS", Ye(q(w, "sys_forms")).then((e) => {
|
|
11964
|
-
ve(e.docs.filter((e) => e.data().formType === "private").map((e) => e.id));
|
|
11965
|
-
});
|
|
11884
|
+
document.title = e.tabTitle || e.tabName || i.appName || "Firebase OS", Ye(q(w, "sys_forms")).then((e) => {});
|
|
11966
11885
|
}, [
|
|
11967
11886
|
e.tabTitle,
|
|
11968
11887
|
e.tabName,
|
|
@@ -11970,7 +11889,7 @@ function xi({ config: e }) {
|
|
|
11970
11889
|
]), G(() => {
|
|
11971
11890
|
if (!t) return;
|
|
11972
11891
|
try {
|
|
11973
|
-
let e = localStorage.getItem(`fbos_records_${
|
|
11892
|
+
let e = localStorage.getItem(`fbos_records_${U}`);
|
|
11974
11893
|
e ? (s(JSON.parse(e)), l(!1)) : l(!0);
|
|
11975
11894
|
} catch {}
|
|
11976
11895
|
let e = (e) => e.map((e) => {
|
|
@@ -11983,24 +11902,24 @@ function xi({ config: e }) {
|
|
|
11983
11902
|
});
|
|
11984
11903
|
(async () => {
|
|
11985
11904
|
try {
|
|
11986
|
-
let n = e((await Ye($e(q(w,
|
|
11987
|
-
n.sort((e, t) => (t.createdAt || 0) - (e.createdAt || 0)), s(n), l(!1), localStorage.setItem(`fbos_records_${
|
|
11905
|
+
let n = e((await Ye($e(q(w, U), rt("uid", "==", t.uid), Xe(150)))).docs);
|
|
11906
|
+
n.sort((e, t) => (t.createdAt || 0) - (e.createdAt || 0)), s(n), l(!1), localStorage.setItem(`fbos_records_${U}`, JSON.stringify(n));
|
|
11988
11907
|
} catch (e) {
|
|
11989
11908
|
console.error("Error fetching records:", e), l(!1);
|
|
11990
11909
|
}
|
|
11991
11910
|
})();
|
|
11992
|
-
}, [t,
|
|
11993
|
-
c || localStorage.setItem(`fbos_records_${
|
|
11911
|
+
}, [t, U]), G(() => {
|
|
11912
|
+
c || localStorage.setItem(`fbos_records_${U}`, JSON.stringify(a));
|
|
11994
11913
|
}, [
|
|
11995
11914
|
a,
|
|
11996
11915
|
c,
|
|
11997
|
-
|
|
11916
|
+
U
|
|
11998
11917
|
]);
|
|
11999
|
-
let
|
|
11918
|
+
let ve = async (e) => {
|
|
12000
11919
|
if (e.preventDefault(), !(!t || !p.trim())) {
|
|
12001
11920
|
x(!0);
|
|
12002
11921
|
try {
|
|
12003
|
-
let e = await Ge(q(w,
|
|
11922
|
+
let e = await Ge(q(w, U), {
|
|
12004
11923
|
name: p.trim(),
|
|
12005
11924
|
note: h.trim(),
|
|
12006
11925
|
uid: t.uid,
|
|
@@ -12020,7 +11939,7 @@ function xi({ config: e }) {
|
|
|
12020
11939
|
}
|
|
12021
11940
|
x(!1);
|
|
12022
11941
|
}
|
|
12023
|
-
},
|
|
11942
|
+
}, ye = async (e) => {
|
|
12024
11943
|
let n = e.target.files?.[0];
|
|
12025
11944
|
if (!(!n || !t)) {
|
|
12026
11945
|
te(!0);
|
|
@@ -12035,13 +11954,13 @@ function xi({ config: e }) {
|
|
|
12035
11954
|
downloadURL: r,
|
|
12036
11955
|
uid: t.uid,
|
|
12037
11956
|
uploaderEmail: t.email || "user",
|
|
12038
|
-
sourceTab:
|
|
11957
|
+
sourceTab: H,
|
|
12039
11958
|
accessPrefix: "user_",
|
|
12040
11959
|
createdAt: et()
|
|
12041
11960
|
});
|
|
12042
|
-
let i = await Ge(q(w,
|
|
11961
|
+
let i = await Ge(q(w, U), {
|
|
12043
11962
|
name: n.name,
|
|
12044
|
-
note: `${n.type || "File"} · ${
|
|
11963
|
+
note: `${n.type || "File"} · ${Re(n.size)}`,
|
|
12045
11964
|
uid: t.uid,
|
|
12046
11965
|
recordType: "file",
|
|
12047
11966
|
fileName: n.name,
|
|
@@ -12053,7 +11972,7 @@ function xi({ config: e }) {
|
|
|
12053
11972
|
s((e) => [{
|
|
12054
11973
|
id: i.id,
|
|
12055
11974
|
name: n.name,
|
|
12056
|
-
note: `${n.type || "File"} · ${
|
|
11975
|
+
note: `${n.type || "File"} · ${Re(n.size)}`,
|
|
12057
11976
|
uid: t.uid,
|
|
12058
11977
|
recordType: "file",
|
|
12059
11978
|
fileName: n.name,
|
|
@@ -12067,12 +11986,12 @@ function xi({ config: e }) {
|
|
|
12067
11986
|
}
|
|
12068
11987
|
te(!1), B.current && (B.current.value = "");
|
|
12069
11988
|
}
|
|
12070
|
-
},
|
|
11989
|
+
}, W = async () => {
|
|
12071
11990
|
if (D) {
|
|
12072
11991
|
N(!0);
|
|
12073
11992
|
try {
|
|
12074
11993
|
let e = a.find((e) => e.id === D);
|
|
12075
|
-
if (await Ke(J(w,
|
|
11994
|
+
if (await Ke(J(w, U, D)), e?.recordType === "file" && e.downloadURL) try {
|
|
12076
11995
|
let t = e.downloadURL.split("user_files%2F")[1]?.split("?")[0];
|
|
12077
11996
|
t && await gt(vt(o, `user_files/${decodeURIComponent(t)}`)).catch(() => {});
|
|
12078
11997
|
let n = await Ye($e(q(w, "user_files"), rt("downloadURL", "==", e.downloadURL)));
|
|
@@ -12086,9 +12005,9 @@ function xi({ config: e }) {
|
|
|
12086
12005
|
}
|
|
12087
12006
|
N(!1);
|
|
12088
12007
|
}
|
|
12089
|
-
}, [
|
|
12008
|
+
}, [be, xe] = K(null), [Se, Ce] = K(""), [we, Te] = K(!1), [Ee, De] = K(null), Oe = We([]), Ae = (e) => {
|
|
12090
12009
|
if (e.recordType === "file") {
|
|
12091
|
-
|
|
12010
|
+
xe(e.id), Ce(e.name);
|
|
12092
12011
|
return;
|
|
12093
12012
|
}
|
|
12094
12013
|
pe(e.id), I(e.name), ge(e.note || "");
|
|
@@ -12106,42 +12025,42 @@ function xi({ config: e }) {
|
|
|
12106
12025
|
key: e,
|
|
12107
12026
|
value: String(t ?? "")
|
|
12108
12027
|
}));
|
|
12109
|
-
_e(n),
|
|
12110
|
-
},
|
|
12111
|
-
if (!
|
|
12112
|
-
|
|
12028
|
+
_e(n), Oe.current = n.map((e) => e.key);
|
|
12029
|
+
}, je = async () => {
|
|
12030
|
+
if (!be || !Se.trim()) {
|
|
12031
|
+
xe(null);
|
|
12113
12032
|
return;
|
|
12114
12033
|
}
|
|
12115
|
-
let e = a.find((e) => e.id ===
|
|
12116
|
-
if (e && e.name ===
|
|
12117
|
-
|
|
12034
|
+
let e = a.find((e) => e.id === be);
|
|
12035
|
+
if (e && e.name === Se.trim()) {
|
|
12036
|
+
xe(null);
|
|
12118
12037
|
return;
|
|
12119
12038
|
}
|
|
12120
|
-
|
|
12039
|
+
Te(!0);
|
|
12121
12040
|
try {
|
|
12122
|
-
await nt(J(w,
|
|
12041
|
+
await nt(J(w, U, be), { name: Se.trim() }), s((e) => e.map((e) => e.id === be ? {
|
|
12123
12042
|
...e,
|
|
12124
|
-
name:
|
|
12043
|
+
name: Se.trim()
|
|
12125
12044
|
} : e));
|
|
12126
12045
|
} catch (e) {
|
|
12127
12046
|
console.error("Error renaming file:", e);
|
|
12128
12047
|
}
|
|
12129
|
-
|
|
12130
|
-
},
|
|
12131
|
-
await
|
|
12132
|
-
},
|
|
12048
|
+
Te(!1), xe(null);
|
|
12049
|
+
}, Ne = async () => {
|
|
12050
|
+
await Pe(), pe(null);
|
|
12051
|
+
}, Pe = async () => {
|
|
12133
12052
|
if (!P || !me.trim()) return;
|
|
12134
12053
|
x(!0);
|
|
12135
12054
|
let e = {};
|
|
12136
12055
|
R.forEach(({ key: t, value: n }) => {
|
|
12137
12056
|
t.trim() && (e[t.trim()] = n);
|
|
12138
12057
|
});
|
|
12139
|
-
let t = R.map((e) => e.key.trim()).filter(Boolean), n =
|
|
12058
|
+
let t = R.map((e) => e.key.trim()).filter(Boolean), n = Oe.current.filter((e) => !t.includes(e));
|
|
12140
12059
|
n.forEach((t) => {
|
|
12141
12060
|
e[t] = qe();
|
|
12142
12061
|
});
|
|
12143
12062
|
try {
|
|
12144
|
-
await nt(J(w,
|
|
12063
|
+
await nt(J(w, U, P), {
|
|
12145
12064
|
name: me.trim(),
|
|
12146
12065
|
note: L.trim(),
|
|
12147
12066
|
...e
|
|
@@ -12157,15 +12076,15 @@ function xi({ config: e }) {
|
|
|
12157
12076
|
}), R.forEach(({ key: e, value: n }) => {
|
|
12158
12077
|
e.trim() && (t[e.trim()] = n);
|
|
12159
12078
|
}), t;
|
|
12160
|
-
})),
|
|
12079
|
+
})), Oe.current = t;
|
|
12161
12080
|
} catch (e) {
|
|
12162
12081
|
console.error("Error saving record:", e);
|
|
12163
12082
|
}
|
|
12164
12083
|
x(!1);
|
|
12165
|
-
},
|
|
12084
|
+
}, Fe = (e, t) => e ? e.startsWith("image/") ? t ? /* @__PURE__ */ X("div", {
|
|
12166
12085
|
className: "w-9 h-9 rounded-xl bg-cover bg-center shrink-0",
|
|
12167
12086
|
style: { backgroundImage: `url(${t})` }
|
|
12168
|
-
}) : /* @__PURE__ */ X(T, { className: "w-4 h-4" }) : e.startsWith("video/") || e.startsWith("audio/") ? /* @__PURE__ */ X(he, { className: "w-4 h-4" }) : e.includes("pdf") || e.includes("word") || e.includes("text") ? /* @__PURE__ */ X(u, { className: "w-4 h-4" }) : e.includes("zip") || e.includes("rar") || e.includes("archive") ? /* @__PURE__ */ X(ae, { className: "w-4 h-4" }) : e.includes("html") || e.includes("csv") || e.includes("json") ? /* @__PURE__ */ X(b, { className: "w-4 h-4" }) : /* @__PURE__ */ X(E, { className: "w-4 h-4" }) : /* @__PURE__ */ X(u, { className: "w-4 h-4" }),
|
|
12087
|
+
}) : /* @__PURE__ */ X(T, { className: "w-4 h-4" }) : e.startsWith("video/") || e.startsWith("audio/") ? /* @__PURE__ */ X(he, { className: "w-4 h-4" }) : e.includes("pdf") || e.includes("word") || e.includes("text") ? /* @__PURE__ */ X(u, { className: "w-4 h-4" }) : e.includes("zip") || e.includes("rar") || e.includes("archive") ? /* @__PURE__ */ X(ae, { className: "w-4 h-4" }) : e.includes("html") || e.includes("csv") || e.includes("json") ? /* @__PURE__ */ X(b, { className: "w-4 h-4" }) : /* @__PURE__ */ X(E, { className: "w-4 h-4" }) : /* @__PURE__ */ X(u, { className: "w-4 h-4" }), Ie = (e) => e ? e.startsWith("image/") ? "bg-emerald-500/10 text-emerald-500" : e.startsWith("video/") || e.startsWith("audio/") ? "bg-purple-500/10 text-purple-500" : e.includes("pdf") || e.includes("word") || e.includes("text") ? "bg-blue-500/10 text-blue-500" : e.includes("zip") || e.includes("rar") || e.includes("archive") ? "bg-yellow-500/10 text-yellow-500" : e.includes("html") || e.includes("csv") || e.includes("json") ? "bg-emerald-500/10 text-emerald-500" : "bg-foreground/5 text-foreground/40" : "bg-foreground/5 text-foreground/40", Le = (e) => {
|
|
12169
12088
|
if (!e) return "FILE";
|
|
12170
12089
|
let t = {
|
|
12171
12090
|
"application/pdf": "PDF",
|
|
@@ -12195,7 +12114,7 @@ function xi({ config: e }) {
|
|
|
12195
12114
|
if (t[n]) return t[n];
|
|
12196
12115
|
let r = n.split("/");
|
|
12197
12116
|
return r[r.length - 1].replace(/^x-/, "").replace(/^vnd\..*\./, "").toUpperCase().slice(0, 10);
|
|
12198
|
-
},
|
|
12117
|
+
}, Re = (e) => {
|
|
12199
12118
|
if (!e) return "0 B";
|
|
12200
12119
|
let t = 1024, n = [
|
|
12201
12120
|
"B",
|
|
@@ -12204,7 +12123,7 @@ function xi({ config: e }) {
|
|
|
12204
12123
|
"GB"
|
|
12205
12124
|
], r = Math.floor(Math.log(e) / Math.log(t));
|
|
12206
12125
|
return parseFloat((e / t ** +r).toFixed(2)) + " " + n[r];
|
|
12207
|
-
},
|
|
12126
|
+
}, ze = (e) => {
|
|
12208
12127
|
if (!e) return "";
|
|
12209
12128
|
let t = e.toMillis ? e.toMillis() : e;
|
|
12210
12129
|
return new Date(t).toLocaleDateString("en-US", {
|
|
@@ -12212,12 +12131,12 @@ function xi({ config: e }) {
|
|
|
12212
12131
|
day: "numeric",
|
|
12213
12132
|
year: "numeric"
|
|
12214
12133
|
});
|
|
12215
|
-
},
|
|
12216
|
-
navigator.clipboard.writeText(
|
|
12217
|
-
},
|
|
12134
|
+
}, Be = wn(e, U), Ve = () => {
|
|
12135
|
+
navigator.clipboard.writeText(Be), C(!0), setTimeout(() => C(!1), 2e3);
|
|
12136
|
+
}, He = (() => {
|
|
12218
12137
|
let t = (e.buttonStorageIcon || "upload").trim(), n = t.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
12219
12138
|
return V[n] ? V[n] : V[t] ? V[t] : ue || r;
|
|
12220
|
-
})(),
|
|
12139
|
+
})(), Ue = e.buttonStyle !== "secondary", Je = e.buttonStorageStyle === "primary";
|
|
12221
12140
|
return /* @__PURE__ */ Z("main", {
|
|
12222
12141
|
className: "flex-1 w-full max-w-7xl mx-auto p-4 md:p-8 z-10 flex flex-col",
|
|
12223
12142
|
children: [
|
|
@@ -12270,7 +12189,7 @@ function xi({ config: e }) {
|
|
|
12270
12189
|
e.showPrompt && /* @__PURE__ */ X(F.button, {
|
|
12271
12190
|
whileHover: { scale: 1.05 },
|
|
12272
12191
|
whileTap: { scale: .95 },
|
|
12273
|
-
onClick:
|
|
12192
|
+
onClick: Ve,
|
|
12274
12193
|
title: S ? "Copied!" : "Copy Developer Prompt",
|
|
12275
12194
|
className: `w-10 h-10 flex items-center justify-center rounded-xl transition-all duration-300 cursor-pointer ${S ? "bg-emerald-500/10 text-emerald-500" : "btn-secondary"}`,
|
|
12276
12195
|
children: X(S ? ce : de, { className: "w-4 h-4" })
|
|
@@ -12278,7 +12197,7 @@ function xi({ config: e }) {
|
|
|
12278
12197
|
e.storage !== !1 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("input", {
|
|
12279
12198
|
type: "file",
|
|
12280
12199
|
ref: B,
|
|
12281
|
-
onChange:
|
|
12200
|
+
onChange: ye,
|
|
12282
12201
|
className: "hidden"
|
|
12283
12202
|
}), /* @__PURE__ */ Z(F.button, {
|
|
12284
12203
|
whileHover: { scale: 1.05 },
|
|
@@ -12286,8 +12205,8 @@ function xi({ config: e }) {
|
|
|
12286
12205
|
onClick: () => B.current?.click(),
|
|
12287
12206
|
disabled: ee,
|
|
12288
12207
|
title: e.buttonStorageText || "Upload File",
|
|
12289
|
-
className: `h-10 flex items-center justify-center gap-2 rounded-xl transition-all duration-300 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed ${e.buttonStorageText ? "px-4" : "w-10"} ${
|
|
12290
|
-
children: [ee ? /* @__PURE__ */ X(g, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ X(
|
|
12208
|
+
className: `h-10 flex items-center justify-center gap-2 rounded-xl transition-all duration-300 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed ${e.buttonStorageText ? "px-4" : "w-10"} ${Je ? "btn-primary" : "btn-secondary"}`,
|
|
12209
|
+
children: [ee ? /* @__PURE__ */ X(g, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ X(He, { className: "w-4 h-4" }), e.buttonStorageText && /* @__PURE__ */ X("span", {
|
|
12291
12210
|
className: "text-[13px] font-bold",
|
|
12292
12211
|
children: e.buttonStorageText
|
|
12293
12212
|
})]
|
|
@@ -12297,7 +12216,7 @@ function xi({ config: e }) {
|
|
|
12297
12216
|
whileTap: { scale: .95 },
|
|
12298
12217
|
onClick: () => f(!0),
|
|
12299
12218
|
title: "Add New",
|
|
12300
|
-
className: `h-10 flex items-center justify-center gap-2 rounded-xl transition-all duration-300 cursor-pointer ${e.buttonText && e.buttonText !== "+" ? "px-5" : "w-10"} ${
|
|
12219
|
+
className: `h-10 flex items-center justify-center gap-2 rounded-xl transition-all duration-300 cursor-pointer ${e.buttonText && e.buttonText !== "+" ? "px-5" : "w-10"} ${Ue ? "btn-primary" : "btn-secondary"}`,
|
|
12301
12220
|
children: e.buttonText === "+" || !e.buttonText ? /* @__PURE__ */ X(r, { className: "w-4 h-4" }) : /* @__PURE__ */ X("span", {
|
|
12302
12221
|
className: "text-[13px] font-bold",
|
|
12303
12222
|
children: e.buttonText
|
|
@@ -12359,7 +12278,7 @@ function xi({ config: e }) {
|
|
|
12359
12278
|
delay: t * .03,
|
|
12360
12279
|
duration: .25
|
|
12361
12280
|
},
|
|
12362
|
-
onClick: () =>
|
|
12281
|
+
onClick: () => Ae(e),
|
|
12363
12282
|
className: `group flex flex-col bg-background border rounded-2xl p-5 transition-all relative cursor-pointer ${n ? "border-accent/40 shadow-lg ring-1 ring-accent/20" : "border-[var(--panel-border)] hover:border-accent/30 hover:shadow-lg"}`,
|
|
12364
12283
|
children: [
|
|
12365
12284
|
/* @__PURE__ */ Z("div", {
|
|
@@ -12367,11 +12286,11 @@ function xi({ config: e }) {
|
|
|
12367
12286
|
children: [
|
|
12368
12287
|
e.recordType === "file" && e.downloadURL && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("button", {
|
|
12369
12288
|
onClick: (t) => {
|
|
12370
|
-
t.stopPropagation(), navigator.clipboard.writeText(e.downloadURL),
|
|
12289
|
+
t.stopPropagation(), navigator.clipboard.writeText(e.downloadURL), De(e.id), setTimeout(() => De(null), 2e3);
|
|
12371
12290
|
},
|
|
12372
12291
|
className: "p-1.5 rounded-lg text-foreground/25 hover:text-emerald-500 hover:bg-emerald-500/10 transition-all cursor-pointer",
|
|
12373
12292
|
title: "Copy Link",
|
|
12374
|
-
children:
|
|
12293
|
+
children: Ee === e.id ? /* @__PURE__ */ X(ce, { className: "w-3.5 h-3.5 text-emerald-500" }) : /* @__PURE__ */ X(_, { className: "w-3.5 h-3.5" })
|
|
12375
12294
|
}), /* @__PURE__ */ X("a", {
|
|
12376
12295
|
href: e.downloadURL,
|
|
12377
12296
|
target: "_blank",
|
|
@@ -12383,7 +12302,7 @@ function xi({ config: e }) {
|
|
|
12383
12302
|
})] }),
|
|
12384
12303
|
/* @__PURE__ */ X("button", {
|
|
12385
12304
|
onClick: (t) => {
|
|
12386
|
-
t.stopPropagation(),
|
|
12305
|
+
t.stopPropagation(), Ae(e);
|
|
12387
12306
|
},
|
|
12388
12307
|
className: "p-1.5 rounded-lg text-foreground/25 hover:text-accent hover:bg-accent/10 transition-all cursor-pointer",
|
|
12389
12308
|
title: "Edit",
|
|
@@ -12405,19 +12324,19 @@ function xi({ config: e }) {
|
|
|
12405
12324
|
onClick: (t) => {
|
|
12406
12325
|
t.stopPropagation(), e.recordType === "file" && k(e);
|
|
12407
12326
|
},
|
|
12408
|
-
className: `w-9 h-9 rounded-xl flex items-center justify-center shrink-0 ${e.recordType === "file" ? `cursor-pointer hover:scale-105 transition-transform ${
|
|
12409
|
-
children: e.recordType === "file" ?
|
|
12327
|
+
className: `w-9 h-9 rounded-xl flex items-center justify-center shrink-0 ${e.recordType === "file" ? `cursor-pointer hover:scale-105 transition-transform ${Ie(e.fileType)}` : "bg-accent/10 text-accent"}`,
|
|
12328
|
+
children: e.recordType === "file" ? Fe(e.fileType, e.downloadURL) : /* @__PURE__ */ X("div", { className: "w-2 h-2 rounded-full bg-current" })
|
|
12410
12329
|
}), /* @__PURE__ */ Z("div", {
|
|
12411
12330
|
className: "flex flex-col min-w-0 flex-1 relative",
|
|
12412
12331
|
children: [
|
|
12413
|
-
|
|
12332
|
+
be === e.id ? /* @__PURE__ */ X("input", {
|
|
12414
12333
|
autoFocus: !0,
|
|
12415
12334
|
type: "text",
|
|
12416
|
-
value:
|
|
12417
|
-
onChange: (e) =>
|
|
12418
|
-
onBlur: () =>
|
|
12335
|
+
value: Se,
|
|
12336
|
+
onChange: (e) => Ce(e.target.value),
|
|
12337
|
+
onBlur: () => je(),
|
|
12419
12338
|
onKeyDown: (e) => {
|
|
12420
|
-
e.key === "Enter" &&
|
|
12339
|
+
e.key === "Enter" && je(), e.key === "Escape" && xe(null);
|
|
12421
12340
|
},
|
|
12422
12341
|
onClick: (e) => e.stopPropagation(),
|
|
12423
12342
|
className: "no-glow text-[14px] font-bold text-foreground bg-transparent border-b border-accent/30 outline-none pb-0.5 w-full pr-12"
|
|
@@ -12431,7 +12350,7 @@ function xi({ config: e }) {
|
|
|
12431
12350
|
}),
|
|
12432
12351
|
/* @__PURE__ */ X("span", {
|
|
12433
12352
|
className: "text-[11px] text-foreground/35 font-bold uppercase tracking-wider mt-0.5",
|
|
12434
|
-
children:
|
|
12353
|
+
children: ze(e.createdAt)
|
|
12435
12354
|
})
|
|
12436
12355
|
]
|
|
12437
12356
|
})]
|
|
@@ -12477,7 +12396,7 @@ function xi({ config: e }) {
|
|
|
12477
12396
|
"Each user sees their own data only · Edit and delete available on all items · Records: ",
|
|
12478
12397
|
/* @__PURE__ */ X("code", {
|
|
12479
12398
|
className: "text-foreground/40 font-mono text-[10px]",
|
|
12480
|
-
children:
|
|
12399
|
+
children: U
|
|
12481
12400
|
}),
|
|
12482
12401
|
" · Files: ",
|
|
12483
12402
|
/* @__PURE__ */ X("code", {
|
|
@@ -12518,7 +12437,7 @@ function xi({ config: e }) {
|
|
|
12518
12437
|
transition: { duration: .2 },
|
|
12519
12438
|
className: "w-full max-w-[360px] border-[var(--panel-border)] border rounded-2xl relative z-10 glass-panel shadow-2xl bg-background overflow-hidden",
|
|
12520
12439
|
children: /* @__PURE__ */ Z("form", {
|
|
12521
|
-
onSubmit:
|
|
12440
|
+
onSubmit: ve,
|
|
12522
12441
|
className: "p-5 flex flex-col gap-3",
|
|
12523
12442
|
children: [
|
|
12524
12443
|
/* @__PURE__ */ Z("div", {
|
|
@@ -12608,9 +12527,9 @@ function xi({ config: e }) {
|
|
|
12608
12527
|
}), /* @__PURE__ */ Z("span", {
|
|
12609
12528
|
className: "text-[12px] text-foreground/70 font-bold uppercase tracking-wider mt-1",
|
|
12610
12529
|
children: [
|
|
12611
|
-
|
|
12530
|
+
Le(A.fileType),
|
|
12612
12531
|
" • ",
|
|
12613
|
-
|
|
12532
|
+
Re(A.fileSize || 0)
|
|
12614
12533
|
]
|
|
12615
12534
|
})]
|
|
12616
12535
|
}), /* @__PURE__ */ Z("div", {
|
|
@@ -12618,15 +12537,15 @@ function xi({ config: e }) {
|
|
|
12618
12537
|
children: [
|
|
12619
12538
|
/* @__PURE__ */ X("button", {
|
|
12620
12539
|
onClick: () => {
|
|
12621
|
-
navigator.clipboard.writeText(A.downloadURL),
|
|
12540
|
+
navigator.clipboard.writeText(A.downloadURL), De("preview"), setTimeout(() => De(null), 2e3);
|
|
12622
12541
|
},
|
|
12623
12542
|
className: "p-2.5 bg-foreground/5 hover:bg-foreground/10 text-foreground/70 transition-colors rounded-xl shadow-sm hover:text-emerald-500 cursor-pointer",
|
|
12624
12543
|
title: "Copy Link",
|
|
12625
|
-
children:
|
|
12544
|
+
children: Ee === "preview" ? /* @__PURE__ */ X(ce, { className: "w-4 h-4 text-emerald-500" }) : /* @__PURE__ */ X(_, { className: "w-4 h-4" })
|
|
12626
12545
|
}),
|
|
12627
12546
|
/* @__PURE__ */ X("button", {
|
|
12628
12547
|
onClick: () => {
|
|
12629
|
-
k(null),
|
|
12548
|
+
k(null), xe(A.id), Ce(A.name);
|
|
12630
12549
|
},
|
|
12631
12550
|
className: "p-2.5 bg-foreground/5 hover:bg-foreground/10 text-foreground/70 hover:text-accent transition-colors rounded-xl shadow-sm cursor-pointer",
|
|
12632
12551
|
title: "Rename",
|
|
@@ -12709,7 +12628,7 @@ function xi({ config: e }) {
|
|
|
12709
12628
|
/* @__PURE__ */ X(O, { children: P && /* @__PURE__ */ Z("div", {
|
|
12710
12629
|
className: "fixed inset-0 z-[120] flex items-center justify-center p-4",
|
|
12711
12630
|
children: [/* @__PURE__ */ X(F.div, {
|
|
12712
|
-
onClick: () =>
|
|
12631
|
+
onClick: () => Ne(),
|
|
12713
12632
|
initial: { opacity: 0 },
|
|
12714
12633
|
animate: { opacity: 1 },
|
|
12715
12634
|
exit: { opacity: 0 },
|
|
@@ -12744,7 +12663,7 @@ function xi({ config: e }) {
|
|
|
12744
12663
|
}), y && /* @__PURE__ */ X(g, { className: "w-3 h-3 animate-spin text-foreground/40" })]
|
|
12745
12664
|
}), /* @__PURE__ */ X("button", {
|
|
12746
12665
|
type: "button",
|
|
12747
|
-
onClick: () =>
|
|
12666
|
+
onClick: () => Ne(),
|
|
12748
12667
|
className: "text-foreground/30 hover:text-foreground/60 transition-colors cursor-pointer",
|
|
12749
12668
|
children: /* @__PURE__ */ X(se, { className: "w-4 h-4" })
|
|
12750
12669
|
})]
|
|
@@ -12767,7 +12686,7 @@ function xi({ config: e }) {
|
|
|
12767
12686
|
onKeyDown: (e) => {
|
|
12768
12687
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
12769
12688
|
},
|
|
12770
|
-
onBlur: () =>
|
|
12689
|
+
onBlur: () => Pe(),
|
|
12771
12690
|
placeholder: "Name *",
|
|
12772
12691
|
className: "no-glow bg-transparent text-[13px] font-medium text-foreground outline-none placeholder:text-foreground/15 pb-1 caret-foreground/50"
|
|
12773
12692
|
}),
|
|
@@ -12793,7 +12712,7 @@ function xi({ config: e }) {
|
|
|
12793
12712
|
onKeyDown: (e) => {
|
|
12794
12713
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), e.target.blur());
|
|
12795
12714
|
},
|
|
12796
|
-
onBlur: () =>
|
|
12715
|
+
onBlur: () => Pe(),
|
|
12797
12716
|
placeholder: "Add a note...",
|
|
12798
12717
|
rows: 1,
|
|
12799
12718
|
className: "no-glow bg-transparent text-[13px] font-medium text-foreground outline-none placeholder:text-foreground/15 pb-1 caret-foreground/50 resize-none overflow-hidden"
|
|
@@ -12814,7 +12733,7 @@ function xi({ config: e }) {
|
|
|
12814
12733
|
onKeyDown: (e) => {
|
|
12815
12734
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
12816
12735
|
},
|
|
12817
|
-
onBlur: () =>
|
|
12736
|
+
onBlur: () => Pe(),
|
|
12818
12737
|
className: "no-glow bg-transparent text-[10px] font-bold text-foreground/30 uppercase tracking-[0.15em] outline-none placeholder:text-foreground/15 pt-3 pb-0.5 caret-foreground/40"
|
|
12819
12738
|
}),
|
|
12820
12739
|
/* @__PURE__ */ X("input", {
|
|
@@ -12827,7 +12746,7 @@ function xi({ config: e }) {
|
|
|
12827
12746
|
onKeyDown: (e) => {
|
|
12828
12747
|
e.key === "Enter" && (e.preventDefault(), e.currentTarget.blur());
|
|
12829
12748
|
},
|
|
12830
|
-
onBlur: () =>
|
|
12749
|
+
onBlur: () => Pe(),
|
|
12831
12750
|
className: "no-glow bg-transparent text-[13px] font-medium text-foreground outline-none placeholder:text-foreground/15 pt-1.5 pb-1 caret-foreground/50"
|
|
12832
12751
|
}),
|
|
12833
12752
|
/* @__PURE__ */ X("div", { className: "border-b border-dashed border-[var(--panel-border)]/60" }),
|
|
@@ -12856,7 +12775,7 @@ function xi({ config: e }) {
|
|
|
12856
12775
|
/* @__PURE__ */ X(Yt, {
|
|
12857
12776
|
isOpen: !!D,
|
|
12858
12777
|
onCancel: () => re(null),
|
|
12859
|
-
onConfirm:
|
|
12778
|
+
onConfirm: W,
|
|
12860
12779
|
title: "Delete Record",
|
|
12861
12780
|
message: /* @__PURE__ */ Z(Y, { children: [
|
|
12862
12781
|
"Are you sure you want to delete ",
|
|
@@ -12880,7 +12799,7 @@ function Si({ config: e }) {
|
|
|
12880
12799
|
let t = e.fileType || "";
|
|
12881
12800
|
M(t.startsWith("image/") || t.startsWith("video/") || t === "application/pdf");
|
|
12882
12801
|
}
|
|
12883
|
-
}, A = ie, [j, M] = K(!0), [le, N] = K(!1), [P, pe] = K(null), [me, I] = K(""), [L, ge] = K(""), [R, _e] = K([]), B = We(null), [H,
|
|
12802
|
+
}, A = ie, [j, M] = K(!0), [le, N] = K(!1), [P, pe] = K(null), [me, I] = K(""), [L, ge] = K(""), [R, _e] = K([]), B = We(null), [H, U] = K(null), ve = We([]), ye = (e.tabName || e.pageId || "admin_page").toLowerCase().replace(/[^a-z0-9]+/g, "_"), W = `admin_${ye}_records`;
|
|
12884
12803
|
G(() => {
|
|
12885
12804
|
document.title = e.tabTitle || e.tabName || i.appName || "Firebase OS";
|
|
12886
12805
|
}, [
|
|
@@ -12888,7 +12807,7 @@ function Si({ config: e }) {
|
|
|
12888
12807
|
e.tabName,
|
|
12889
12808
|
i.appName
|
|
12890
12809
|
]);
|
|
12891
|
-
let
|
|
12810
|
+
let be = () => ({
|
|
12892
12811
|
name: t.displayName || t.email?.split("@")[0] || "Admin",
|
|
12893
12812
|
email: t.email || "",
|
|
12894
12813
|
avatar: t.photoURL || ""
|
|
@@ -12896,7 +12815,7 @@ function Si({ config: e }) {
|
|
|
12896
12815
|
G(() => {
|
|
12897
12816
|
if (!t) return;
|
|
12898
12817
|
try {
|
|
12899
|
-
let e = localStorage.getItem(`fbos_records_${
|
|
12818
|
+
let e = localStorage.getItem(`fbos_records_${W}`);
|
|
12900
12819
|
e ? (s(JSON.parse(e)), l(!1)) : l(!0);
|
|
12901
12820
|
} catch {}
|
|
12902
12821
|
let e = (e) => e.map((e) => {
|
|
@@ -12906,25 +12825,25 @@ function Si({ config: e }) {
|
|
|
12906
12825
|
...t,
|
|
12907
12826
|
createdAt: t.createdAt?.toMillis ? t.createdAt.toMillis() : t.createdAt
|
|
12908
12827
|
};
|
|
12909
|
-
}), n = Ze($e(q(w,
|
|
12828
|
+
}), n = Ze($e(q(w, W), Qe("createdAt", "desc"), Xe(150)), (t) => {
|
|
12910
12829
|
let n = e(t.docs);
|
|
12911
|
-
s(n), l(!1), localStorage.setItem(`fbos_records_${
|
|
12830
|
+
s(n), l(!1), localStorage.setItem(`fbos_records_${W}`, JSON.stringify(n));
|
|
12912
12831
|
}, (t) => {
|
|
12913
12832
|
console.error("Error listening to admin records:", t);
|
|
12914
|
-
let n = Ze($e(q(w,
|
|
12833
|
+
let n = Ze($e(q(w, W), Xe(150)), (t) => {
|
|
12915
12834
|
let n = e(t.docs);
|
|
12916
|
-
n.sort((e, t) => (t.createdAt || 0) - (e.createdAt || 0)), s(n), l(!1), localStorage.setItem(`fbos_records_${
|
|
12835
|
+
n.sort((e, t) => (t.createdAt || 0) - (e.createdAt || 0)), s(n), l(!1), localStorage.setItem(`fbos_records_${W}`, JSON.stringify(n));
|
|
12917
12836
|
});
|
|
12918
12837
|
return () => n();
|
|
12919
12838
|
});
|
|
12920
12839
|
return () => n();
|
|
12921
|
-
}, [t,
|
|
12922
|
-
let
|
|
12840
|
+
}, [t, W]);
|
|
12841
|
+
let xe = async (e) => {
|
|
12923
12842
|
if (e.preventDefault(), !(!t || !p.trim())) {
|
|
12924
12843
|
x(!0);
|
|
12925
12844
|
try {
|
|
12926
|
-
let e =
|
|
12927
|
-
await Ge(q(w,
|
|
12845
|
+
let e = be();
|
|
12846
|
+
await Ge(q(w, W), {
|
|
12928
12847
|
name: p.trim(),
|
|
12929
12848
|
note: h.trim(),
|
|
12930
12849
|
uid: t.uid,
|
|
@@ -12939,14 +12858,14 @@ function Si({ config: e }) {
|
|
|
12939
12858
|
}
|
|
12940
12859
|
x(!1);
|
|
12941
12860
|
}
|
|
12942
|
-
},
|
|
12861
|
+
}, Se = async (e) => {
|
|
12943
12862
|
let n = e.target.files?.[0];
|
|
12944
12863
|
if (!(!n || !t)) {
|
|
12945
12864
|
te(!0);
|
|
12946
12865
|
try {
|
|
12947
12866
|
let e = vt(o, `admin_files/${`${Date.now()}_${n.name.replace(/[^a-zA-Z0-9.-]/g, "_")}`}`);
|
|
12948
12867
|
await yt(e, n, { customMetadata: { ownerId: t.uid } });
|
|
12949
|
-
let r = await _t(e), i =
|
|
12868
|
+
let r = await _t(e), i = be();
|
|
12950
12869
|
await Ge(q(w, "admin_files"), {
|
|
12951
12870
|
fileName: n.name,
|
|
12952
12871
|
fileType: n.type || "unknown",
|
|
@@ -12954,13 +12873,13 @@ function Si({ config: e }) {
|
|
|
12954
12873
|
downloadURL: r,
|
|
12955
12874
|
uid: t.uid,
|
|
12956
12875
|
uploaderEmail: t.email || "admin",
|
|
12957
|
-
sourceTab:
|
|
12876
|
+
sourceTab: ye,
|
|
12958
12877
|
accessPrefix: "admin_",
|
|
12959
12878
|
creatorName: i.name,
|
|
12960
12879
|
creatorEmail: i.email,
|
|
12961
12880
|
creatorAvatar: i.avatar,
|
|
12962
12881
|
createdAt: et()
|
|
12963
|
-
}), await Ge(q(w,
|
|
12882
|
+
}), await Ge(q(w, W), {
|
|
12964
12883
|
name: n.name,
|
|
12965
12884
|
note: `${n.type || "File"} · ${ze(n.size)}`,
|
|
12966
12885
|
uid: t.uid,
|
|
@@ -12979,12 +12898,12 @@ function Si({ config: e }) {
|
|
|
12979
12898
|
}
|
|
12980
12899
|
te(!1), B.current && (B.current.value = "");
|
|
12981
12900
|
}
|
|
12982
|
-
},
|
|
12901
|
+
}, Ce = async () => {
|
|
12983
12902
|
if (D) {
|
|
12984
12903
|
N(!0);
|
|
12985
12904
|
try {
|
|
12986
12905
|
let e = a.find((e) => e.id === D);
|
|
12987
|
-
if (await Ke(J(w,
|
|
12906
|
+
if (await Ke(J(w, W, D)), e?.recordType === "file" && e.downloadURL) try {
|
|
12988
12907
|
let t = e.downloadURL.split("admin_files%2F")[1]?.split("?")[0];
|
|
12989
12908
|
t && await gt(vt(o, `admin_files/${decodeURIComponent(t)}`)).catch(() => {});
|
|
12990
12909
|
let n = await Ye($e(q(w, "admin_files"), rt("downloadURL", "==", e.downloadURL)));
|
|
@@ -12998,7 +12917,7 @@ function Si({ config: e }) {
|
|
|
12998
12917
|
}
|
|
12999
12918
|
N(!1);
|
|
13000
12919
|
}
|
|
13001
|
-
}, [
|
|
12920
|
+
}, [we, Te] = K(null), [Ee, De] = K(""), [Oe, Ae] = K(!1), je = (e) => {
|
|
13002
12921
|
if (e.recordType === "file") {
|
|
13003
12922
|
Te(e.id), De(e.name);
|
|
13004
12923
|
return;
|
|
@@ -13021,20 +12940,20 @@ function Si({ config: e }) {
|
|
|
13021
12940
|
key: e,
|
|
13022
12941
|
value: String(t ?? "")
|
|
13023
12942
|
}));
|
|
13024
|
-
_e(n),
|
|
12943
|
+
_e(n), ve.current = n.map((e) => e.key);
|
|
13025
12944
|
}, Ne = async () => {
|
|
13026
|
-
if (!
|
|
12945
|
+
if (!we || !Ee.trim()) {
|
|
13027
12946
|
Te(null);
|
|
13028
12947
|
return;
|
|
13029
12948
|
}
|
|
13030
|
-
let e = a.find((e) => e.id ===
|
|
12949
|
+
let e = a.find((e) => e.id === we);
|
|
13031
12950
|
if (e && e.name === Ee.trim()) {
|
|
13032
12951
|
Te(null);
|
|
13033
12952
|
return;
|
|
13034
12953
|
}
|
|
13035
12954
|
Ae(!0);
|
|
13036
12955
|
try {
|
|
13037
|
-
await nt(J(w,
|
|
12956
|
+
await nt(J(w, W, we), { name: Ee.trim() }), s((e) => e.map((e) => e.id === we ? {
|
|
13038
12957
|
...e,
|
|
13039
12958
|
name: Ee.trim()
|
|
13040
12959
|
} : e));
|
|
@@ -13052,12 +12971,12 @@ function Si({ config: e }) {
|
|
|
13052
12971
|
R.forEach(({ key: t, value: n }) => {
|
|
13053
12972
|
t.trim() && (e[t.trim()] = n);
|
|
13054
12973
|
});
|
|
13055
|
-
let t = R.map((e) => e.key.trim()).filter(Boolean), n =
|
|
12974
|
+
let t = R.map((e) => e.key.trim()).filter(Boolean), n = ve.current.filter((e) => !t.includes(e));
|
|
13056
12975
|
n.forEach((t) => {
|
|
13057
12976
|
e[t] = qe();
|
|
13058
12977
|
});
|
|
13059
12978
|
try {
|
|
13060
|
-
await nt(J(w,
|
|
12979
|
+
await nt(J(w, W, P), {
|
|
13061
12980
|
name: me.trim(),
|
|
13062
12981
|
note: L.trim(),
|
|
13063
12982
|
...e
|
|
@@ -13073,7 +12992,7 @@ function Si({ config: e }) {
|
|
|
13073
12992
|
}), R.forEach(({ key: e, value: n }) => {
|
|
13074
12993
|
e.trim() && (t[e.trim()] = n);
|
|
13075
12994
|
}), t;
|
|
13076
|
-
})),
|
|
12995
|
+
})), ve.current = t;
|
|
13077
12996
|
} catch (e) {
|
|
13078
12997
|
console.error("Error updating record:", e);
|
|
13079
12998
|
}
|
|
@@ -13084,12 +13003,12 @@ function Si({ config: e }) {
|
|
|
13084
13003
|
R.forEach(({ key: t, value: n }) => {
|
|
13085
13004
|
t.trim() && (e[t.trim()] = n);
|
|
13086
13005
|
});
|
|
13087
|
-
let t = R.map((e) => e.key.trim()).filter(Boolean), n =
|
|
13006
|
+
let t = R.map((e) => e.key.trim()).filter(Boolean), n = ve.current.filter((e) => !t.includes(e));
|
|
13088
13007
|
n.forEach((t) => {
|
|
13089
13008
|
e[t] = qe();
|
|
13090
13009
|
});
|
|
13091
13010
|
try {
|
|
13092
|
-
await nt(J(w,
|
|
13011
|
+
await nt(J(w, W, P), {
|
|
13093
13012
|
name: me.trim(),
|
|
13094
13013
|
note: L.trim(),
|
|
13095
13014
|
...e
|
|
@@ -13105,7 +13024,7 @@ function Si({ config: e }) {
|
|
|
13105
13024
|
}), R.forEach(({ key: e, value: n }) => {
|
|
13106
13025
|
e.trim() && (t[e.trim()] = n);
|
|
13107
13026
|
}), t;
|
|
13108
|
-
})),
|
|
13027
|
+
})), ve.current = t;
|
|
13109
13028
|
} catch (e) {
|
|
13110
13029
|
console.error("Error silently saving record:", e);
|
|
13111
13030
|
}
|
|
@@ -13159,7 +13078,7 @@ function Si({ config: e }) {
|
|
|
13159
13078
|
day: "numeric",
|
|
13160
13079
|
year: "numeric"
|
|
13161
13080
|
});
|
|
13162
|
-
}, Ve = Cn(e,
|
|
13081
|
+
}, Ve = Cn(e, W), He = () => {
|
|
13163
13082
|
navigator.clipboard.writeText(Ve), C(!0), setTimeout(() => C(!1), 2e3);
|
|
13164
13083
|
}, Ue = (() => {
|
|
13165
13084
|
let t = (e.buttonStorageIcon || "upload").trim(), n = t.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
@@ -13247,7 +13166,7 @@ function Si({ config: e }) {
|
|
|
13247
13166
|
e.storage !== !1 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("input", {
|
|
13248
13167
|
type: "file",
|
|
13249
13168
|
ref: B,
|
|
13250
|
-
onChange:
|
|
13169
|
+
onChange: Se,
|
|
13251
13170
|
className: "hidden"
|
|
13252
13171
|
}), /* @__PURE__ */ Z(F.button, {
|
|
13253
13172
|
whileHover: { scale: 1.05 },
|
|
@@ -13328,7 +13247,7 @@ function Si({ config: e }) {
|
|
|
13328
13247
|
className: "absolute top-3 right-3 flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-all z-10",
|
|
13329
13248
|
children: [e.recordType === "file" && e.downloadURL && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("button", {
|
|
13330
13249
|
onClick: (t) => {
|
|
13331
|
-
t.stopPropagation(), navigator.clipboard.writeText(e.downloadURL),
|
|
13250
|
+
t.stopPropagation(), navigator.clipboard.writeText(e.downloadURL), U(e.id), setTimeout(() => U(null), 2e3);
|
|
13332
13251
|
},
|
|
13333
13252
|
className: "p-1.5 rounded-lg text-foreground/25 hover:text-emerald-500 hover:bg-emerald-500/10 transition-all cursor-pointer",
|
|
13334
13253
|
title: "Copy Link",
|
|
@@ -13368,7 +13287,7 @@ function Si({ config: e }) {
|
|
|
13368
13287
|
}), /* @__PURE__ */ Z("div", {
|
|
13369
13288
|
className: "flex flex-col min-w-0 flex-1 relative",
|
|
13370
13289
|
children: [
|
|
13371
|
-
|
|
13290
|
+
we === e.id ? /* @__PURE__ */ X("input", {
|
|
13372
13291
|
autoFocus: !0,
|
|
13373
13292
|
type: "text",
|
|
13374
13293
|
value: Ee,
|
|
@@ -13436,7 +13355,7 @@ function Si({ config: e }) {
|
|
|
13436
13355
|
"Shared between all admins · Edit and delete available on your own items only · Records: ",
|
|
13437
13356
|
/* @__PURE__ */ X("code", {
|
|
13438
13357
|
className: "text-foreground/40 font-mono text-[10px]",
|
|
13439
|
-
children:
|
|
13358
|
+
children: W
|
|
13440
13359
|
}),
|
|
13441
13360
|
" · Files: ",
|
|
13442
13361
|
/* @__PURE__ */ X("code", {
|
|
@@ -13477,7 +13396,7 @@ function Si({ config: e }) {
|
|
|
13477
13396
|
transition: { duration: .2 },
|
|
13478
13397
|
className: "w-full max-w-[360px] border-[var(--panel-border)] border rounded-2xl relative z-10 glass-panel shadow-2xl bg-background overflow-hidden",
|
|
13479
13398
|
children: /* @__PURE__ */ Z("form", {
|
|
13480
|
-
onSubmit:
|
|
13399
|
+
onSubmit: xe,
|
|
13481
13400
|
className: "p-5 flex flex-col gap-3",
|
|
13482
13401
|
children: [
|
|
13483
13402
|
/* @__PURE__ */ Z("div", {
|
|
@@ -13577,7 +13496,7 @@ function Si({ config: e }) {
|
|
|
13577
13496
|
children: [
|
|
13578
13497
|
/* @__PURE__ */ X("button", {
|
|
13579
13498
|
onClick: () => {
|
|
13580
|
-
navigator.clipboard.writeText(A.downloadURL),
|
|
13499
|
+
navigator.clipboard.writeText(A.downloadURL), U("preview"), setTimeout(() => U(null), 2e3);
|
|
13581
13500
|
},
|
|
13582
13501
|
className: "p-2.5 bg-foreground/5 hover:bg-foreground/10 text-foreground/70 transition-colors rounded-xl shadow-sm hover:text-emerald-500 cursor-pointer",
|
|
13583
13502
|
title: "Copy Link",
|
|
@@ -13815,7 +13734,7 @@ function Si({ config: e }) {
|
|
|
13815
13734
|
/* @__PURE__ */ X(Yt, {
|
|
13816
13735
|
isOpen: !!D,
|
|
13817
13736
|
onCancel: () => re(null),
|
|
13818
|
-
onConfirm:
|
|
13737
|
+
onConfirm: Ce,
|
|
13819
13738
|
title: "Delete Record",
|
|
13820
13739
|
message: /* @__PURE__ */ Z(Y, { children: [
|
|
13821
13740
|
"Are you sure you want to delete ",
|
|
@@ -13839,7 +13758,7 @@ function Ci({ config: e }) {
|
|
|
13839
13758
|
let t = e.fileType || "";
|
|
13840
13759
|
M(t.startsWith("image/") || t.startsWith("video/") || t === "application/pdf");
|
|
13841
13760
|
}
|
|
13842
|
-
}, A = ie, [j, M] = K(!0), [le, N] = K(!1), [P, pe] = K(null), [me, I] = K(""), [L, ge] = K(""), [R, _e] = K([]), B = We(null), [H,
|
|
13761
|
+
}, A = ie, [j, M] = K(!0), [le, N] = K(!1), [P, pe] = K(null), [me, I] = K(""), [L, ge] = K(""), [R, _e] = K([]), B = We(null), [H, U] = K(null), ve = We([]), ye = (e.tabName || e.pageId || "shared_page").toLowerCase().replace(/[^a-z0-9]+/g, "_"), W = `mem_${ye}_records`;
|
|
13843
13762
|
G(() => {
|
|
13844
13763
|
document.title = e.tabTitle || e.tabName || i.appName || "Firebase OS";
|
|
13845
13764
|
}, [
|
|
@@ -13849,7 +13768,7 @@ function Ci({ config: e }) {
|
|
|
13849
13768
|
]), G(() => {
|
|
13850
13769
|
if (!t) return;
|
|
13851
13770
|
try {
|
|
13852
|
-
let e = localStorage.getItem(`fbos_records_${
|
|
13771
|
+
let e = localStorage.getItem(`fbos_records_${W}`);
|
|
13853
13772
|
e ? (s(JSON.parse(e)), l(!1)) : l(!0);
|
|
13854
13773
|
} catch {}
|
|
13855
13774
|
let e = (e) => e.map((e) => {
|
|
@@ -13859,29 +13778,29 @@ function Ci({ config: e }) {
|
|
|
13859
13778
|
...t,
|
|
13860
13779
|
createdAt: t.createdAt?.toMillis ? t.createdAt.toMillis() : t.createdAt
|
|
13861
13780
|
};
|
|
13862
|
-
}), n = Ze($e(q(w,
|
|
13781
|
+
}), n = Ze($e(q(w, W), Qe("createdAt", "desc"), Xe(150)), (t) => {
|
|
13863
13782
|
let n = e(t.docs);
|
|
13864
|
-
s(n), l(!1), localStorage.setItem(`fbos_records_${
|
|
13783
|
+
s(n), l(!1), localStorage.setItem(`fbos_records_${W}`, JSON.stringify(n));
|
|
13865
13784
|
}, (t) => {
|
|
13866
13785
|
console.error("Error listening to shared records:", t);
|
|
13867
|
-
let n = Ze($e(q(w,
|
|
13786
|
+
let n = Ze($e(q(w, W), Xe(150)), (t) => {
|
|
13868
13787
|
let n = e(t.docs);
|
|
13869
|
-
n.sort((e, t) => (t.createdAt || 0) - (e.createdAt || 0)), s(n), l(!1), localStorage.setItem(`fbos_records_${
|
|
13788
|
+
n.sort((e, t) => (t.createdAt || 0) - (e.createdAt || 0)), s(n), l(!1), localStorage.setItem(`fbos_records_${W}`, JSON.stringify(n));
|
|
13870
13789
|
});
|
|
13871
13790
|
return () => n();
|
|
13872
13791
|
});
|
|
13873
13792
|
return () => n();
|
|
13874
|
-
}, [t,
|
|
13875
|
-
let
|
|
13793
|
+
}, [t, W]);
|
|
13794
|
+
let be = () => ({
|
|
13876
13795
|
name: t.displayName || t.email?.split("@")[0] || "Member",
|
|
13877
13796
|
email: t.email || "",
|
|
13878
13797
|
avatar: t.photoURL || ""
|
|
13879
|
-
}),
|
|
13798
|
+
}), xe = async (e) => {
|
|
13880
13799
|
if (e.preventDefault(), !(!t || !p.trim())) {
|
|
13881
13800
|
x(!0);
|
|
13882
13801
|
try {
|
|
13883
|
-
let e =
|
|
13884
|
-
await Ge(q(w,
|
|
13802
|
+
let e = be();
|
|
13803
|
+
await Ge(q(w, W), {
|
|
13885
13804
|
name: p.trim(),
|
|
13886
13805
|
note: h.trim(),
|
|
13887
13806
|
uid: t.uid,
|
|
@@ -13896,14 +13815,14 @@ function Ci({ config: e }) {
|
|
|
13896
13815
|
}
|
|
13897
13816
|
x(!1);
|
|
13898
13817
|
}
|
|
13899
|
-
},
|
|
13818
|
+
}, Se = async (e) => {
|
|
13900
13819
|
let n = e.target.files?.[0];
|
|
13901
13820
|
if (!(!n || !t)) {
|
|
13902
13821
|
te(!0);
|
|
13903
13822
|
try {
|
|
13904
13823
|
let e = vt(o, `mem_files/${`${Date.now()}_${n.name.replace(/[^a-zA-Z0-9.-]/g, "_")}`}`);
|
|
13905
13824
|
await yt(e, n, { customMetadata: { ownerId: t.uid } });
|
|
13906
|
-
let r = await _t(e), i =
|
|
13825
|
+
let r = await _t(e), i = be();
|
|
13907
13826
|
await Ge(q(w, "mem_files"), {
|
|
13908
13827
|
fileName: n.name,
|
|
13909
13828
|
fileType: n.type || "unknown",
|
|
@@ -13911,13 +13830,13 @@ function Ci({ config: e }) {
|
|
|
13911
13830
|
downloadURL: r,
|
|
13912
13831
|
uid: t.uid,
|
|
13913
13832
|
uploaderEmail: t.email || "member",
|
|
13914
|
-
sourceTab:
|
|
13833
|
+
sourceTab: ye,
|
|
13915
13834
|
accessPrefix: "mem_",
|
|
13916
13835
|
creatorName: i.name,
|
|
13917
13836
|
creatorEmail: i.email,
|
|
13918
13837
|
creatorAvatar: i.avatar,
|
|
13919
13838
|
createdAt: et()
|
|
13920
|
-
}), await Ge(q(w,
|
|
13839
|
+
}), await Ge(q(w, W), {
|
|
13921
13840
|
name: n.name,
|
|
13922
13841
|
note: `${n.type || "File"} · ${ze(n.size)}`,
|
|
13923
13842
|
uid: t.uid,
|
|
@@ -13936,12 +13855,12 @@ function Ci({ config: e }) {
|
|
|
13936
13855
|
}
|
|
13937
13856
|
te(!1), B.current && (B.current.value = "");
|
|
13938
13857
|
}
|
|
13939
|
-
},
|
|
13858
|
+
}, Ce = async () => {
|
|
13940
13859
|
if (D) {
|
|
13941
13860
|
N(!0);
|
|
13942
13861
|
try {
|
|
13943
13862
|
let e = a.find((e) => e.id === D);
|
|
13944
|
-
if (await Ke(J(w,
|
|
13863
|
+
if (await Ke(J(w, W, D)), e?.recordType === "file" && e.downloadURL) try {
|
|
13945
13864
|
let t = e.downloadURL.split("mem_files%2F")[1]?.split("?")[0];
|
|
13946
13865
|
t && await gt(vt(o, `mem_files/${decodeURIComponent(t)}`)).catch(() => {});
|
|
13947
13866
|
let n = await Ye($e(q(w, "mem_files"), rt("downloadURL", "==", e.downloadURL)));
|
|
@@ -13955,7 +13874,7 @@ function Ci({ config: e }) {
|
|
|
13955
13874
|
}
|
|
13956
13875
|
N(!1);
|
|
13957
13876
|
}
|
|
13958
|
-
}, [
|
|
13877
|
+
}, [we, Te] = K(null), [Ee, De] = K(""), [Oe, Ae] = K(!1), je = (e) => {
|
|
13959
13878
|
if (e.recordType === "file") {
|
|
13960
13879
|
Te(e.id), De(e.name);
|
|
13961
13880
|
return;
|
|
@@ -13978,20 +13897,20 @@ function Ci({ config: e }) {
|
|
|
13978
13897
|
key: e,
|
|
13979
13898
|
value: String(t ?? "")
|
|
13980
13899
|
}));
|
|
13981
|
-
_e(n),
|
|
13900
|
+
_e(n), ve.current = n.map((e) => e.key);
|
|
13982
13901
|
}, Ne = async () => {
|
|
13983
|
-
if (!
|
|
13902
|
+
if (!we || !Ee.trim()) {
|
|
13984
13903
|
Te(null);
|
|
13985
13904
|
return;
|
|
13986
13905
|
}
|
|
13987
|
-
let e = a.find((e) => e.id ===
|
|
13906
|
+
let e = a.find((e) => e.id === we);
|
|
13988
13907
|
if (e && e.name === Ee.trim()) {
|
|
13989
13908
|
Te(null);
|
|
13990
13909
|
return;
|
|
13991
13910
|
}
|
|
13992
13911
|
Ae(!0);
|
|
13993
13912
|
try {
|
|
13994
|
-
await nt(J(w,
|
|
13913
|
+
await nt(J(w, W, we), { name: Ee.trim() }), s((e) => e.map((e) => e.id === we ? {
|
|
13995
13914
|
...e,
|
|
13996
13915
|
name: Ee.trim()
|
|
13997
13916
|
} : e));
|
|
@@ -14008,12 +13927,12 @@ function Ci({ config: e }) {
|
|
|
14008
13927
|
R.forEach(({ key: t, value: n }) => {
|
|
14009
13928
|
t.trim() && (e[t.trim()] = n);
|
|
14010
13929
|
});
|
|
14011
|
-
let t = R.map((e) => e.key.trim()).filter(Boolean), n =
|
|
13930
|
+
let t = R.map((e) => e.key.trim()).filter(Boolean), n = ve.current.filter((e) => !t.includes(e));
|
|
14012
13931
|
n.forEach((t) => {
|
|
14013
13932
|
e[t] = qe();
|
|
14014
13933
|
});
|
|
14015
13934
|
try {
|
|
14016
|
-
await nt(J(w,
|
|
13935
|
+
await nt(J(w, W, P), {
|
|
14017
13936
|
name: me.trim(),
|
|
14018
13937
|
note: L.trim(),
|
|
14019
13938
|
...e
|
|
@@ -14029,7 +13948,7 @@ function Ci({ config: e }) {
|
|
|
14029
13948
|
}), R.forEach(({ key: e, value: n }) => {
|
|
14030
13949
|
e.trim() && (t[e.trim()] = n);
|
|
14031
13950
|
}), t;
|
|
14032
|
-
})),
|
|
13951
|
+
})), ve.current = t;
|
|
14033
13952
|
} catch (e) {
|
|
14034
13953
|
console.error("Error saving record:", e);
|
|
14035
13954
|
}
|
|
@@ -14087,7 +14006,7 @@ function Ci({ config: e }) {
|
|
|
14087
14006
|
}, Ve = (() => {
|
|
14088
14007
|
let t = (e.buttonStorageIcon || "upload").trim(), n = t.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
14089
14008
|
return V[n] ? V[n] : V[t] ? V[t] : ue || r;
|
|
14090
|
-
})(), He = e.buttonStyle !== "secondary", Ue = e.buttonStorageStyle === "primary", Je = (e) => e.uid === t?.uid, tt = Sn(e,
|
|
14009
|
+
})(), He = e.buttonStyle !== "secondary", Ue = e.buttonStorageStyle === "primary", Je = (e) => e.uid === t?.uid, tt = Sn(e, W), it = () => {
|
|
14091
14010
|
navigator.clipboard.writeText(tt), C(!0), setTimeout(() => C(!1), 2e3);
|
|
14092
14011
|
}, at = ({ record: e }) => {
|
|
14093
14012
|
let t = e.creatorName || e.creatorEmail?.split("@")[0] || "Member", n = e.creatorEmail || "", r = e.creatorAvatar || "", i = t.split(" ").map((e) => e[0]).join("").toUpperCase().slice(0, 2);
|
|
@@ -14172,7 +14091,7 @@ function Ci({ config: e }) {
|
|
|
14172
14091
|
e.storage !== !1 && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("input", {
|
|
14173
14092
|
type: "file",
|
|
14174
14093
|
ref: B,
|
|
14175
|
-
onChange:
|
|
14094
|
+
onChange: Se,
|
|
14176
14095
|
className: "hidden"
|
|
14177
14096
|
}), /* @__PURE__ */ Z(F.button, {
|
|
14178
14097
|
whileHover: { scale: 1.05 },
|
|
@@ -14253,7 +14172,7 @@ function Ci({ config: e }) {
|
|
|
14253
14172
|
className: "absolute top-3 right-3 flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-all z-10",
|
|
14254
14173
|
children: [e.recordType === "file" && e.downloadURL && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("button", {
|
|
14255
14174
|
onClick: (t) => {
|
|
14256
|
-
t.stopPropagation(), navigator.clipboard.writeText(e.downloadURL),
|
|
14175
|
+
t.stopPropagation(), navigator.clipboard.writeText(e.downloadURL), U(e.id), setTimeout(() => U(null), 2e3);
|
|
14257
14176
|
},
|
|
14258
14177
|
className: "p-1.5 rounded-lg text-foreground/25 hover:text-emerald-500 hover:bg-emerald-500/10 transition-all cursor-pointer",
|
|
14259
14178
|
title: "Copy Link",
|
|
@@ -14293,7 +14212,7 @@ function Ci({ config: e }) {
|
|
|
14293
14212
|
}), /* @__PURE__ */ Z("div", {
|
|
14294
14213
|
className: "flex flex-col min-w-0 flex-1 relative",
|
|
14295
14214
|
children: [
|
|
14296
|
-
|
|
14215
|
+
we === e.id ? /* @__PURE__ */ X("input", {
|
|
14297
14216
|
autoFocus: !0,
|
|
14298
14217
|
type: "text",
|
|
14299
14218
|
value: Ee,
|
|
@@ -14361,7 +14280,7 @@ function Ci({ config: e }) {
|
|
|
14361
14280
|
"Shared between all members · Edit and delete available on your own items only · Records: ",
|
|
14362
14281
|
/* @__PURE__ */ X("code", {
|
|
14363
14282
|
className: "text-foreground/40 font-mono text-[10px]",
|
|
14364
|
-
children:
|
|
14283
|
+
children: W
|
|
14365
14284
|
}),
|
|
14366
14285
|
" · Files: ",
|
|
14367
14286
|
/* @__PURE__ */ X("code", {
|
|
@@ -14402,7 +14321,7 @@ function Ci({ config: e }) {
|
|
|
14402
14321
|
transition: { duration: .2 },
|
|
14403
14322
|
className: "w-full max-w-[360px] border-[var(--panel-border)] border rounded-2xl relative z-10 glass-panel shadow-2xl bg-background overflow-hidden",
|
|
14404
14323
|
children: /* @__PURE__ */ Z("form", {
|
|
14405
|
-
onSubmit:
|
|
14324
|
+
onSubmit: xe,
|
|
14406
14325
|
className: "p-5 flex flex-col gap-3",
|
|
14407
14326
|
children: [
|
|
14408
14327
|
/* @__PURE__ */ Z("div", {
|
|
@@ -14502,7 +14421,7 @@ function Ci({ config: e }) {
|
|
|
14502
14421
|
children: [
|
|
14503
14422
|
/* @__PURE__ */ X("button", {
|
|
14504
14423
|
onClick: () => {
|
|
14505
|
-
navigator.clipboard.writeText(A.downloadURL),
|
|
14424
|
+
navigator.clipboard.writeText(A.downloadURL), U("preview"), setTimeout(() => U(null), 2e3);
|
|
14506
14425
|
},
|
|
14507
14426
|
className: "p-2.5 bg-foreground/5 hover:bg-foreground/10 text-foreground/70 transition-colors rounded-xl shadow-sm hover:text-emerald-500 cursor-pointer",
|
|
14508
14427
|
title: "Copy Link",
|
|
@@ -14740,7 +14659,7 @@ function Ci({ config: e }) {
|
|
|
14740
14659
|
/* @__PURE__ */ X(Yt, {
|
|
14741
14660
|
isOpen: !!D,
|
|
14742
14661
|
onCancel: () => re(null),
|
|
14743
|
-
onConfirm:
|
|
14662
|
+
onConfirm: Ce,
|
|
14744
14663
|
title: "Delete Record",
|
|
14745
14664
|
message: /* @__PURE__ */ Z(Y, { children: [
|
|
14746
14665
|
"Are you sure you want to delete ",
|
|
@@ -14957,14 +14876,14 @@ function wi() {
|
|
|
14957
14876
|
}
|
|
14958
14877
|
return r.template === "inline_form" ? /* @__PURE__ */ X("div", {
|
|
14959
14878
|
className: "flex-1 flex flex-col items-center justify-start mt-8 relative z-10 w-full min-h-[60vh]",
|
|
14960
|
-
children: /* @__PURE__ */ X(
|
|
14879
|
+
children: /* @__PURE__ */ X(Ce, {
|
|
14961
14880
|
isInline: !0,
|
|
14962
14881
|
formId: r.form,
|
|
14963
14882
|
formConfig: r.formConfigOverride
|
|
14964
14883
|
})
|
|
14965
14884
|
}) : /* @__PURE__ */ X("div", {
|
|
14966
14885
|
className: "flex-1 flex flex-col items-center justify-center relative z-10 w-full min-h-[60vh]",
|
|
14967
|
-
children: /* @__PURE__ */ X(
|
|
14886
|
+
children: /* @__PURE__ */ X(Ce, {
|
|
14968
14887
|
formId: r.form,
|
|
14969
14888
|
formConfig: r.formConfigOverride,
|
|
14970
14889
|
onClose: () => window.history.back()
|
|
@@ -15324,7 +15243,7 @@ function Qi({ standalone: e }) {
|
|
|
15324
15243
|
className: "flex items-center gap-2.5 text-[13px]",
|
|
15325
15244
|
children: [/* @__PURE__ */ X("div", {
|
|
15326
15245
|
className: "w-8 h-8 rounded-full bg-red-500/10 border border-red-500/20 flex items-center justify-center shrink-0",
|
|
15327
|
-
children: /* @__PURE__ */ X(
|
|
15246
|
+
children: /* @__PURE__ */ X(be, { className: "w-4 h-4 text-red-500" })
|
|
15328
15247
|
}), /* @__PURE__ */ X("span", {
|
|
15329
15248
|
className: "font-bold text-foreground/70",
|
|
15330
15249
|
children: r.empty && r.empty.length > 0 ? /* @__PURE__ */ Z(Y, { children: [
|
|
@@ -15368,7 +15287,7 @@ function Qi({ standalone: e }) {
|
|
|
15368
15287
|
className: "flex items-center gap-2.5 mt-2 bg-yellow-500/5 border border-yellow-500/10 p-4 rounded-2xl",
|
|
15369
15288
|
children: [/* @__PURE__ */ X("div", {
|
|
15370
15289
|
className: "w-8 h-8 rounded-full bg-yellow-500/10 border border-yellow-500/20 flex items-center justify-center shrink-0",
|
|
15371
|
-
children: /* @__PURE__ */ X(
|
|
15290
|
+
children: /* @__PURE__ */ X(be, { className: "w-4 h-4 text-yellow-500" })
|
|
15372
15291
|
}), /* @__PURE__ */ X("span", {
|
|
15373
15292
|
className: "text-[13px] font-bold text-yellow-500",
|
|
15374
15293
|
children: "Warning: No Admin Emails configured. App is operational. Redirecting…"
|
|
@@ -16020,4 +15939,4 @@ function la(e) {
|
|
|
16020
15939
|
});
|
|
16021
15940
|
}
|
|
16022
15941
|
//#endregion
|
|
16023
|
-
export {
|
|
15942
|
+
export { Ce as ContactPopup, la as FirebaseOS, Ae as auth, w as db, zt as defaultHomeConfig, o as storage, jt as useAuth, i as useConfig, Me as useTheme };
|