admin-lib-cms 1.0.9 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -13
- package/dist/index.mjs +13 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1313,8 +1313,8 @@ function CollectionsSection() {
|
|
|
1313
1313
|
});
|
|
1314
1314
|
});
|
|
1315
1315
|
}, [ctx.adapter, collections]);
|
|
1316
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex h-full bg-slate-50", children: [
|
|
1317
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "w-72 shrink-0 border-r border-slate-200 bg-white/50 p-4", children: [
|
|
1316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col md:flex-row h-full bg-slate-50", children: [
|
|
1317
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "w-full md:w-72 shrink-0 border-b md:border-b-0 md:border-r border-slate-200 bg-white/50 p-4", children: [
|
|
1318
1318
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mb-3 px-2 text-xs font-bold uppercase tracking-widest text-slate-500", children: "Collections" }),
|
|
1319
1319
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("ul", { className: "space-y-1", children: [
|
|
1320
1320
|
collections.map((c) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
@@ -1334,7 +1334,7 @@ function CollectionsSection() {
|
|
|
1334
1334
|
collections.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { className: "px-3 py-6 text-center text-sm text-slate-500 bg-slate-50 rounded-lg border border-dashed border-slate-200", children: "No collections registered." })
|
|
1335
1335
|
] })
|
|
1336
1336
|
] }),
|
|
1337
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 overflow-auto p-8 relative", children: [
|
|
1337
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 overflow-auto p-4 md:p-8 relative", children: [
|
|
1338
1338
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute inset-0 bg-grid-slate-100 [mask-image:linear-gradient(0deg,white,rgba(255,255,255,0.6))] -z-10 pointer-events-none" }),
|
|
1339
1339
|
selected ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CollectionEditor, { collection: selected }, selected.id) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "grid h-full place-items-center text-sm text-slate-500", children: "Select a collection to manage its entries." })
|
|
1340
1340
|
] })
|
|
@@ -1595,16 +1595,16 @@ function CollectionEditor({ collection }) {
|
|
|
1595
1595
|
)
|
|
1596
1596
|
] })
|
|
1597
1597
|
] }),
|
|
1598
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "overflow-
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("table", { className: "w-full text-sm text-left", children: [
|
|
1599
1599
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("thead", { className: "bg-slate-50/80 border-b border-slate-200", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("tr", { children: [
|
|
1600
1600
|
visibleFields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider", children: f.label }, f.id)),
|
|
1601
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-right text-xs font-bold text-slate-500 uppercase tracking-wider", children: "Actions" })
|
|
1601
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-right text-xs font-bold text-slate-500 uppercase tracking-wider sticky right-0 bg-slate-50 border-l border-slate-200 z-10", children: "Actions" })
|
|
1602
1602
|
] }) }),
|
|
1603
1603
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("tbody", { className: "divide-y divide-slate-100", children: loadingEntries ? (
|
|
1604
1604
|
// Loading skeleton rows
|
|
1605
1605
|
Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("tr", { children: [
|
|
1606
1606
|
visibleFields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "h-4 bg-slate-100 rounded animate-pulse", style: { width: `${60 + i * 13 % 30}%` } }) }, f.id)),
|
|
1607
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "h-4 w-16 bg-slate-100 rounded animate-pulse ml-auto" }) })
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 sticky right-0 bg-white border-l border-slate-100", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "h-4 w-16 bg-slate-100 rounded animate-pulse ml-auto" }) })
|
|
1608
1608
|
] }, i))
|
|
1609
1609
|
) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
1610
1610
|
entries.map((e, idx) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
@@ -1618,7 +1618,7 @@ function CollectionEditor({ collection }) {
|
|
|
1618
1618
|
className: `hover:bg-slate-50/50 transition-colors group cursor-grab active:cursor-grabbing ${deletingId === e.id ? "opacity-50" : ""} ${dragOverIdx === idx ? "border-t-2 border-t-indigo-500" : ""}`,
|
|
1619
1619
|
children: [
|
|
1620
1620
|
visibleFields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-slate-700 max-w-[200px] truncate", children: f.type === "boolean" ? e[f.id] ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "inline-flex px-2 py-1 rounded bg-green-100 text-green-700 text-xs font-bold", children: "Yes" }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "inline-flex px-2 py-1 rounded bg-slate-100 text-slate-500 text-xs font-bold", children: "No" }) : f.type === "image" && e[f.id] ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src: String(e[f.id]), alt: "", className: "h-8 w-8 object-cover rounded shadow-sm ring-1 ring-slate-200" }) : f.type === "image" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "h-8 w-8 rounded bg-slate-100 ring-1 ring-slate-200/50 flex items-center justify-center text-slate-300", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) }) : String(e[f.id] ?? "") }, f.id)),
|
|
1621
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-right", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-end gap-2
|
|
1621
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-right sticky right-0 bg-white border-l border-slate-100 group-hover:bg-slate-50/50 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-end gap-2", children: [
|
|
1622
1622
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "p-2 text-slate-300 cursor-grab active:cursor-grabbing", title: "Drag to reorder", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "w-4 h-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M5.5 3C6.32843 3 7 3.67157 7 4.5C7 5.32843 6.32843 6 5.5 6C4.67157 6 4 5.32843 4 4.5C4 3.67157 4.67157 3 5.5 3ZM9.5 3C10.3284 3 11 3.67157 11 4.5C11 5.32843 10.3284 6 9.5 6C8.67157 6 8 5.32843 8 4.5C8 3.67157 8.67157 3 9.5 3ZM5.5 7.5C6.32843 7.5 7 8.17157 7 9C7 9.82843 6.32843 10.5 5.5 10.5C4.67157 10.5 4 9.82843 4 9C4 8.17157 4.67157 7.5 5.5 7.5ZM9.5 7.5C10.3284 7.5 11 8.17157 11 9C11 9.82843 10.3284 10.5 9.5 10.5C8.67157 10.5 8 9.82843 8 9C8 8.17157 8.67157 7.5 9.5 7.5ZM5.5 12C6.32843 12 7 12.6716 7 13.5C7 14.3284 6.32843 15 5.5 15C4.67157 15 4 14.3284 4 13.5C4 12.6716 4.67157 12 5.5 12ZM9.5 12C10.3284 12 11 12.6716 11 13.5C11 14.3284 10.3284 15 9.5 15C8.67157 15 8 14.3284 8 13.5C8 12.6716 8.67157 12 9.5 12Z", fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" }) }) }),
|
|
1623
1623
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1624
1624
|
"button",
|
|
@@ -1683,8 +1683,8 @@ function SubmissionsSection() {
|
|
|
1683
1683
|
setSelectedFormId(formIds[0]);
|
|
1684
1684
|
}
|
|
1685
1685
|
}, [formIds, selectedFormId]);
|
|
1686
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex h-full bg-slate-50", children: [
|
|
1687
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "w-72 shrink-0 border-r border-slate-200 bg-white/50 p-4", children: [
|
|
1686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col md:flex-row h-full bg-slate-50", children: [
|
|
1687
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "w-full md:w-72 shrink-0 border-b md:border-b-0 md:border-r border-slate-200 bg-white/50 p-4", children: [
|
|
1688
1688
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "mb-3 px-2 text-xs font-bold uppercase tracking-widest text-slate-500", children: "Data Collections" }),
|
|
1689
1689
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("ul", { className: "space-y-1", children: [
|
|
1690
1690
|
formIds.map((id) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
@@ -1704,7 +1704,7 @@ function SubmissionsSection() {
|
|
|
1704
1704
|
formIds.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { className: "px-3 py-6 text-center text-sm text-slate-500 bg-slate-50 rounded-lg border border-dashed border-slate-200", children: "No data collected." })
|
|
1705
1705
|
] })
|
|
1706
1706
|
] }),
|
|
1707
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 overflow-auto p-8 relative", children: [
|
|
1707
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-1 overflow-auto p-4 md:p-8 relative", children: [
|
|
1708
1708
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "absolute inset-0 bg-grid-slate-100 [mask-image:linear-gradient(0deg,white,rgba(255,255,255,0.6))] -z-10 pointer-events-none" }),
|
|
1709
1709
|
selectedFormId ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1710
1710
|
SubmissionsList,
|
|
@@ -1825,11 +1825,11 @@ function SubmissionsList({ formId, submissions, onLoad, loading }) {
|
|
|
1825
1825
|
}
|
|
1826
1826
|
)
|
|
1827
1827
|
] }),
|
|
1828
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 overflow-auto rounded-2xl border border-slate-200 bg-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("table", { className: "w-full text-sm text-left", children: [
|
|
1828
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("table", { className: "w-full text-sm text-left", children: [
|
|
1829
1829
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("thead", { className: "bg-slate-50/80 border-b border-slate-200 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("tr", { children: [
|
|
1830
1830
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider", children: "Summary" }),
|
|
1831
1831
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider", children: "Received" }),
|
|
1832
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-right text-xs font-bold text-slate-500 uppercase tracking-wider", children: "Actions" })
|
|
1832
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("th", { className: "px-6 py-4 text-right text-xs font-bold text-slate-500 uppercase tracking-wider sticky right-0 bg-slate-50 border-l border-slate-200 z-10", children: "Actions" })
|
|
1833
1833
|
] }) }),
|
|
1834
1834
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("tbody", { className: "divide-y divide-slate-100", children: [
|
|
1835
1835
|
paginated.map((s) => {
|
|
@@ -1846,7 +1846,7 @@ function SubmissionsList({ formId, submissions, onLoad, loading }) {
|
|
|
1846
1846
|
!s.read && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "ml-2 inline-block h-2 w-2 rounded-full bg-indigo-500" })
|
|
1847
1847
|
] }),
|
|
1848
1848
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-slate-500 whitespace-nowrap", children: formatDate(s.submittedAt) }),
|
|
1849
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-right", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-end gap-1
|
|
1849
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("td", { className: "px-6 py-4 text-right sticky right-0 bg-white border-l border-slate-100 group-hover:bg-slate-50/50 transition-colors", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1850
1850
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1851
1851
|
"button",
|
|
1852
1852
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -1310,8 +1310,8 @@ function CollectionsSection() {
|
|
|
1310
1310
|
});
|
|
1311
1311
|
});
|
|
1312
1312
|
}, [ctx.adapter, collections]);
|
|
1313
|
-
return /* @__PURE__ */ jsxs2("div", { className: "flex h-full bg-slate-50", children: [
|
|
1314
|
-
/* @__PURE__ */ jsxs2("div", { className: "w-72 shrink-0 border-r border-slate-200 bg-white/50 p-4", children: [
|
|
1313
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col md:flex-row h-full bg-slate-50", children: [
|
|
1314
|
+
/* @__PURE__ */ jsxs2("div", { className: "w-full md:w-72 shrink-0 border-b md:border-b-0 md:border-r border-slate-200 bg-white/50 p-4", children: [
|
|
1315
1315
|
/* @__PURE__ */ jsx5("div", { className: "mb-3 px-2 text-xs font-bold uppercase tracking-widest text-slate-500", children: "Collections" }),
|
|
1316
1316
|
/* @__PURE__ */ jsxs2("ul", { className: "space-y-1", children: [
|
|
1317
1317
|
collections.map((c) => /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs2(
|
|
@@ -1331,7 +1331,7 @@ function CollectionsSection() {
|
|
|
1331
1331
|
collections.length === 0 && /* @__PURE__ */ jsx5("li", { className: "px-3 py-6 text-center text-sm text-slate-500 bg-slate-50 rounded-lg border border-dashed border-slate-200", children: "No collections registered." })
|
|
1332
1332
|
] })
|
|
1333
1333
|
] }),
|
|
1334
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex-1 overflow-auto p-8 relative", children: [
|
|
1334
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex-1 overflow-auto p-4 md:p-8 relative", children: [
|
|
1335
1335
|
/* @__PURE__ */ jsx5("div", { className: "absolute inset-0 bg-grid-slate-100 [mask-image:linear-gradient(0deg,white,rgba(255,255,255,0.6))] -z-10 pointer-events-none" }),
|
|
1336
1336
|
selected ? /* @__PURE__ */ jsx5(CollectionEditor, { collection: selected }, selected.id) : /* @__PURE__ */ jsx5("div", { className: "grid h-full place-items-center text-sm text-slate-500", children: "Select a collection to manage its entries." })
|
|
1337
1337
|
] })
|
|
@@ -1592,16 +1592,16 @@ function CollectionEditor({ collection }) {
|
|
|
1592
1592
|
)
|
|
1593
1593
|
] })
|
|
1594
1594
|
] }),
|
|
1595
|
-
/* @__PURE__ */ jsx5("div", { className: "overflow-
|
|
1595
|
+
/* @__PURE__ */ jsx5("div", { className: "overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm", children: /* @__PURE__ */ jsxs2("table", { className: "w-full text-sm text-left", children: [
|
|
1596
1596
|
/* @__PURE__ */ jsx5("thead", { className: "bg-slate-50/80 border-b border-slate-200", children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1597
1597
|
visibleFields.map((f) => /* @__PURE__ */ jsx5("th", { className: "px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider", children: f.label }, f.id)),
|
|
1598
|
-
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 text-right text-xs font-bold text-slate-500 uppercase tracking-wider", children: "Actions" })
|
|
1598
|
+
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 text-right text-xs font-bold text-slate-500 uppercase tracking-wider sticky right-0 bg-slate-50 border-l border-slate-200 z-10", children: "Actions" })
|
|
1599
1599
|
] }) }),
|
|
1600
1600
|
/* @__PURE__ */ jsx5("tbody", { className: "divide-y divide-slate-100", children: loadingEntries ? (
|
|
1601
1601
|
// Loading skeleton rows
|
|
1602
1602
|
Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1603
1603
|
visibleFields.map((f) => /* @__PURE__ */ jsx5("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx5("div", { className: "h-4 bg-slate-100 rounded animate-pulse", style: { width: `${60 + i * 13 % 30}%` } }) }, f.id)),
|
|
1604
|
-
/* @__PURE__ */ jsx5("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx5("div", { className: "h-4 w-16 bg-slate-100 rounded animate-pulse ml-auto" }) })
|
|
1604
|
+
/* @__PURE__ */ jsx5("td", { className: "px-6 py-4 sticky right-0 bg-white border-l border-slate-100", children: /* @__PURE__ */ jsx5("div", { className: "h-4 w-16 bg-slate-100 rounded animate-pulse ml-auto" }) })
|
|
1605
1605
|
] }, i))
|
|
1606
1606
|
) : /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1607
1607
|
entries.map((e, idx) => /* @__PURE__ */ jsxs2(
|
|
@@ -1615,7 +1615,7 @@ function CollectionEditor({ collection }) {
|
|
|
1615
1615
|
className: `hover:bg-slate-50/50 transition-colors group cursor-grab active:cursor-grabbing ${deletingId === e.id ? "opacity-50" : ""} ${dragOverIdx === idx ? "border-t-2 border-t-indigo-500" : ""}`,
|
|
1616
1616
|
children: [
|
|
1617
1617
|
visibleFields.map((f) => /* @__PURE__ */ jsx5("td", { className: "px-6 py-4 text-slate-700 max-w-[200px] truncate", children: f.type === "boolean" ? e[f.id] ? /* @__PURE__ */ jsx5("span", { className: "inline-flex px-2 py-1 rounded bg-green-100 text-green-700 text-xs font-bold", children: "Yes" }) : /* @__PURE__ */ jsx5("span", { className: "inline-flex px-2 py-1 rounded bg-slate-100 text-slate-500 text-xs font-bold", children: "No" }) : f.type === "image" && e[f.id] ? /* @__PURE__ */ jsx5("img", { src: String(e[f.id]), alt: "", className: "h-8 w-8 object-cover rounded shadow-sm ring-1 ring-slate-200" }) : f.type === "image" ? /* @__PURE__ */ jsx5("div", { className: "h-8 w-8 rounded bg-slate-100 ring-1 ring-slate-200/50 flex items-center justify-center text-slate-300", children: /* @__PURE__ */ jsx5("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) }) : String(e[f.id] ?? "") }, f.id)),
|
|
1618
|
-
/* @__PURE__ */ jsx5("td", { className: "px-6 py-4 text-right", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-2
|
|
1618
|
+
/* @__PURE__ */ jsx5("td", { className: "px-6 py-4 text-right sticky right-0 bg-white border-l border-slate-100 group-hover:bg-slate-50/50 transition-colors", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-2", children: [
|
|
1619
1619
|
/* @__PURE__ */ jsx5("div", { className: "p-2 text-slate-300 cursor-grab active:cursor-grabbing", title: "Drag to reorder", children: /* @__PURE__ */ jsx5("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "w-4 h-4", children: /* @__PURE__ */ jsx5("path", { d: "M5.5 3C6.32843 3 7 3.67157 7 4.5C7 5.32843 6.32843 6 5.5 6C4.67157 6 4 5.32843 4 4.5C4 3.67157 4.67157 3 5.5 3ZM9.5 3C10.3284 3 11 3.67157 11 4.5C11 5.32843 10.3284 6 9.5 6C8.67157 6 8 5.32843 8 4.5C8 3.67157 8.67157 3 9.5 3ZM5.5 7.5C6.32843 7.5 7 8.17157 7 9C7 9.82843 6.32843 10.5 5.5 10.5C4.67157 10.5 4 9.82843 4 9C4 8.17157 4.67157 7.5 5.5 7.5ZM9.5 7.5C10.3284 7.5 11 8.17157 11 9C11 9.82843 10.3284 10.5 9.5 10.5C8.67157 10.5 8 9.82843 8 9C8 8.17157 8.67157 7.5 9.5 7.5ZM5.5 12C6.32843 12 7 12.6716 7 13.5C7 14.3284 6.32843 15 5.5 15C4.67157 15 4 14.3284 4 13.5C4 12.6716 4.67157 12 5.5 12ZM9.5 12C10.3284 12 11 12.6716 11 13.5C11 14.3284 10.3284 15 9.5 15C8.67157 15 8 14.3284 8 13.5C8 12.6716 8.67157 12 9.5 12Z", fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" }) }) }),
|
|
1620
1620
|
/* @__PURE__ */ jsx5(
|
|
1621
1621
|
"button",
|
|
@@ -1680,8 +1680,8 @@ function SubmissionsSection() {
|
|
|
1680
1680
|
setSelectedFormId(formIds[0]);
|
|
1681
1681
|
}
|
|
1682
1682
|
}, [formIds, selectedFormId]);
|
|
1683
|
-
return /* @__PURE__ */ jsxs2("div", { className: "flex h-full bg-slate-50", children: [
|
|
1684
|
-
/* @__PURE__ */ jsxs2("div", { className: "w-72 shrink-0 border-r border-slate-200 bg-white/50 p-4", children: [
|
|
1683
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col md:flex-row h-full bg-slate-50", children: [
|
|
1684
|
+
/* @__PURE__ */ jsxs2("div", { className: "w-full md:w-72 shrink-0 border-b md:border-b-0 md:border-r border-slate-200 bg-white/50 p-4", children: [
|
|
1685
1685
|
/* @__PURE__ */ jsx5("div", { className: "mb-3 px-2 text-xs font-bold uppercase tracking-widest text-slate-500", children: "Data Collections" }),
|
|
1686
1686
|
/* @__PURE__ */ jsxs2("ul", { className: "space-y-1", children: [
|
|
1687
1687
|
formIds.map((id) => /* @__PURE__ */ jsx5("li", { children: /* @__PURE__ */ jsxs2(
|
|
@@ -1701,7 +1701,7 @@ function SubmissionsSection() {
|
|
|
1701
1701
|
formIds.length === 0 && /* @__PURE__ */ jsx5("li", { className: "px-3 py-6 text-center text-sm text-slate-500 bg-slate-50 rounded-lg border border-dashed border-slate-200", children: "No data collected." })
|
|
1702
1702
|
] })
|
|
1703
1703
|
] }),
|
|
1704
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex-1 overflow-auto p-8 relative", children: [
|
|
1704
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex-1 overflow-auto p-4 md:p-8 relative", children: [
|
|
1705
1705
|
/* @__PURE__ */ jsx5("div", { className: "absolute inset-0 bg-grid-slate-100 [mask-image:linear-gradient(0deg,white,rgba(255,255,255,0.6))] -z-10 pointer-events-none" }),
|
|
1706
1706
|
selectedFormId ? /* @__PURE__ */ jsx5(
|
|
1707
1707
|
SubmissionsList,
|
|
@@ -1822,11 +1822,11 @@ function SubmissionsList({ formId, submissions, onLoad, loading }) {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
)
|
|
1824
1824
|
] }),
|
|
1825
|
-
/* @__PURE__ */ jsx5("div", { className: "flex-1 overflow-auto rounded-2xl border border-slate-200 bg-white shadow-sm", children: /* @__PURE__ */ jsxs2("table", { className: "w-full text-sm text-left", children: [
|
|
1825
|
+
/* @__PURE__ */ jsx5("div", { className: "flex-1 overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm", children: /* @__PURE__ */ jsxs2("table", { className: "w-full text-sm text-left", children: [
|
|
1826
1826
|
/* @__PURE__ */ jsx5("thead", { className: "bg-slate-50/80 border-b border-slate-200 sticky top-0", children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
1827
1827
|
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider", children: "Summary" }),
|
|
1828
1828
|
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider", children: "Received" }),
|
|
1829
|
-
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 text-right text-xs font-bold text-slate-500 uppercase tracking-wider", children: "Actions" })
|
|
1829
|
+
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 text-right text-xs font-bold text-slate-500 uppercase tracking-wider sticky right-0 bg-slate-50 border-l border-slate-200 z-10", children: "Actions" })
|
|
1830
1830
|
] }) }),
|
|
1831
1831
|
/* @__PURE__ */ jsxs2("tbody", { className: "divide-y divide-slate-100", children: [
|
|
1832
1832
|
paginated.map((s) => {
|
|
@@ -1843,7 +1843,7 @@ function SubmissionsList({ formId, submissions, onLoad, loading }) {
|
|
|
1843
1843
|
!s.read && /* @__PURE__ */ jsx5("span", { className: "ml-2 inline-block h-2 w-2 rounded-full bg-indigo-500" })
|
|
1844
1844
|
] }),
|
|
1845
1845
|
/* @__PURE__ */ jsx5("td", { className: "px-6 py-4 text-slate-500 whitespace-nowrap", children: formatDate(s.submittedAt) }),
|
|
1846
|
-
/* @__PURE__ */ jsx5("td", { className: "px-6 py-4 text-right", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-1
|
|
1846
|
+
/* @__PURE__ */ jsx5("td", { className: "px-6 py-4 text-right sticky right-0 bg-white border-l border-slate-100 group-hover:bg-slate-50/50 transition-colors", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1847
1847
|
/* @__PURE__ */ jsx5(
|
|
1848
1848
|
"button",
|
|
1849
1849
|
{
|