@oneclick.dev/cms-core-modules 0.0.123 → 0.0.125
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/AppointmentListTable-CWzbwqR-.js +1 -0
- package/dist/AppointmentListTable-DoZuBstk.mjs +270 -0
- package/dist/ContentEditor-BlNbqkAz.js +324 -0
- package/dist/{ContentEditor-MDGolnIP.mjs → ContentEditor-D754iLJS.mjs} +7985 -26820
- package/dist/{Detail-Dk8E6_uF.mjs → Detail-BOxWQ1QQ.mjs} +15 -14
- package/dist/{Detail-Cn9Bk0u0.mjs → Detail-BfKW0uZE.mjs} +26 -25
- package/dist/Detail-DFVu2F38.mjs +11 -0
- package/dist/Detail-DJea_fCd.js +1 -0
- package/dist/Detail-DPJacXfm.js +1 -0
- package/dist/Detail-DSLZ7_bM.js +1 -0
- package/dist/Detail-DUGThL9Y.js +1 -0
- package/dist/{Detail-B_scnidb.mjs → Detail-D_LlEeHu.mjs} +35 -34
- package/dist/Editor-D4evcdhv.mjs +768 -0
- package/dist/Editor-gLLtuJbY.js +1 -0
- package/dist/FormStatusBadge.vue_vue_type_script_setup_true_lang-BjKpsqT9.js +1 -0
- package/dist/FormStatusBadge.vue_vue_type_script_setup_true_lang-D5v5AhLe.mjs +76 -0
- package/dist/Knowledge-B66vxz--.js +1 -0
- package/dist/Knowledge-BnMTTuJ7.mjs +742 -0
- package/dist/Overview-0hFXiuYo.js +1 -0
- package/dist/Overview-BE4uYPx0.mjs +745 -0
- package/dist/Overview-BTx5LF4J.js +1 -0
- package/dist/Overview-CCu2PHai.mjs +289 -0
- package/dist/Overview-CQRpFhbJ.mjs +286 -0
- package/dist/Overview-CTs7sX4d.js +1 -0
- package/dist/Overview-Cj89XXKN.js +1 -0
- package/dist/Overview-D2u-leeO.js +1 -0
- package/dist/Overview-D_2wozCG.mjs +1733 -0
- package/dist/Overview-D_c18mbR.mjs +248 -0
- package/dist/Overview-Dffo-zH4.mjs +11 -0
- package/dist/Overview-g4Rcj245.js +1 -0
- package/dist/{TableCalculationWidget-CrqcLGfU.mjs → TableCalculationWidget-B_LFoOYm.mjs} +3 -3
- package/dist/{TableCalculationWidget-CkQPrVUd.js → TableCalculationWidget-CahOIcbk.js} +1 -1
- package/dist/TableDataWidget-BwqWFH4A.js +1 -0
- package/dist/TableDataWidget-RsVxcDsL.mjs +112 -0
- package/dist/TableOverviewCard-BPWCqo56.js +1 -0
- package/dist/{TableOverviewCard-Ci0d4o4w.mjs → TableOverviewCard-D667DDag.mjs} +113 -127
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-C3XiOXgb.js +1 -0
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-sp0TLio0.mjs +547 -0
- package/dist/{TableRowActionCard-BhdnnPaq.mjs → TableRowActionCard-BPYJ-Kjy.mjs} +95 -101
- package/dist/TableRowActionCard-Bnqj1YIe.js +1 -0
- package/dist/TableView-CwhZ9YN2.js +4 -0
- package/dist/TableView-DX9PKS8N.mjs +9673 -0
- package/dist/TemplateBuilder.vue_vue_type_script_setup_true_lang-BgDdzbLe.js +1 -0
- package/dist/TemplateBuilder.vue_vue_type_script_setup_true_lang-D85V4nrQ.mjs +2886 -0
- package/dist/Test-CzmOmi53.mjs +447 -0
- package/dist/Test-USDtNFY1.js +1 -0
- package/dist/UserDetail-DpUL3mhk.mjs +1483 -0
- package/dist/UserDetail-KRIfxaYd.js +1 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/dateRangePresets-CaPVagHY.mjs +453 -0
- package/dist/dateRangePresets-gxQCiZ6c.js +1 -0
- package/dist/index-6hZ6MYY6.js +1 -0
- package/dist/index-BVmmicu3.mjs +14 -0
- package/dist/index-CQuN5rKx.js +1 -0
- package/dist/index-ChHD_1Cf.js +144 -0
- package/dist/index-CnDGeInm.js +1 -0
- package/dist/index-CqDTc5Ig.mjs +20 -0
- package/dist/index-CvV4nVWI.js +1 -0
- package/dist/index-CyvvAdt4.js +1 -0
- package/dist/index-DH2z0W_w.mjs +19012 -0
- package/dist/index-DIRD7t5_.mjs +20 -0
- package/dist/index-DZKzj48V.mjs +17 -0
- package/dist/index-OJuBYR60.mjs +57 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +480 -103
- package/dist/orders-C_sz8J9b.js +1 -0
- package/dist/{orders-BfTLIm7U.mjs → orders-Cgdggzvx.mjs} +84 -84
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +2696 -605
- package/dist/src/appointments/chat-components/AppointmentListTable.vue.d.ts +3 -0
- package/dist/src/appointments/index.d.ts +93 -3
- package/dist/src/appointments/reservation-summary.d.ts +48 -0
- package/dist/src/appointments/server.d.ts +1 -0
- package/dist/src/appointments/tools.d.ts +93 -3
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Container.d.ts +1 -1
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Row.d.ts +7 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Stack.d.ts +7 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/resizeHistory.d.ts +9 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +3 -1
- package/dist/src/filezone/config.d.ts +31 -0
- package/dist/src/filezone/index.d.ts +43 -0
- package/dist/src/filezone/index.vue.d.ts +2 -0
- package/dist/src/filezone/metadata.d.ts +2 -0
- package/dist/src/filezone/pages/Overview.vue.d.ts +4 -0
- package/dist/src/filezone/permissions.d.ts +5 -0
- package/dist/src/filezone/routes.d.ts +5 -0
- package/dist/src/filezone/server.d.ts +36 -0
- package/dist/src/firebaseAuthManager/components/DeleteUserDialog.vue.d.ts +25 -0
- package/dist/src/firebaseAuthManager/components/ReasonActionDialog.vue.d.ts +23 -0
- package/dist/src/firebaseAuthManager/components/UserStatusBadge.vue.d.ts +5 -0
- package/dist/src/firebaseAuthManager/config.d.ts +151 -0
- package/dist/src/firebaseAuthManager/index.d.ts +163 -0
- package/dist/src/firebaseAuthManager/index.vue.d.ts +14 -0
- package/dist/src/firebaseAuthManager/metadata.d.ts +2 -0
- package/dist/src/firebaseAuthManager/pages/Overview.vue.d.ts +2 -0
- package/dist/src/firebaseAuthManager/pages/UserDetail.vue.d.ts +2 -0
- package/dist/src/firebaseAuthManager/permissions.d.ts +5 -0
- package/dist/src/firebaseAuthManager/routes.d.ts +5 -0
- package/dist/src/firebaseAuthManager/server.d.ts +162 -0
- package/dist/src/firebaseAuthManager/types.d.ts +84 -0
- package/dist/src/formBuilder/components/FormPreviewDialog.vue.d.ts +12 -0
- package/dist/src/formBuilder/components/FormStatusBadge.vue.d.ts +9 -0
- package/dist/src/formBuilder/config.d.ts +31 -0
- package/dist/src/formBuilder/index.d.ts +44 -0
- package/dist/src/formBuilder/index.vue.d.ts +14 -0
- package/dist/src/formBuilder/lib/forms.d.ts +11 -0
- package/dist/src/formBuilder/metadata.d.ts +2 -0
- package/dist/src/formBuilder/pages/Editor.vue.d.ts +2 -0
- package/dist/src/formBuilder/pages/Overview.vue.d.ts +2 -0
- package/dist/src/formBuilder/permissions.d.ts +5 -0
- package/dist/src/formBuilder/routes.d.ts +5 -0
- package/dist/src/formBuilder/server.d.ts +87 -0
- package/dist/src/formBuilder/tools.d.ts +1 -0
- package/dist/src/formBuilder/types.d.ts +46 -0
- package/dist/src/helpbot/composables/useHelpbotApi.d.ts +18 -0
- package/dist/src/helpbot/config.d.ts +17 -0
- package/dist/src/helpbot/index.d.ts +29 -0
- package/dist/src/helpbot/index.vue.d.ts +2 -0
- package/dist/src/helpbot/metadata.d.ts +2 -0
- package/dist/src/helpbot/pages/Knowledge.vue.d.ts +4 -0
- package/dist/src/helpbot/pages/Overview.vue.d.ts +2 -0
- package/dist/src/helpbot/pages/Test.vue.d.ts +4 -0
- package/dist/src/helpbot/permissions.d.ts +5 -0
- package/dist/src/helpbot/routes.d.ts +5 -0
- package/dist/src/helpbot/types.d.ts +42 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/mailTemplates/builder-types.d.ts +40 -0
- package/dist/src/mailTemplates/components/BlockRenderer.vue.d.ts +24 -0
- package/dist/src/mailTemplates/components/DesignPanel.vue.d.ts +13 -0
- package/dist/src/mailTemplates/components/EmailCanvas.vue.d.ts +44 -0
- package/dist/src/mailTemplates/components/RichTextEditor.vue.d.ts +10 -0
- package/dist/src/mailTemplates/components/RightSidebar.vue.d.ts +18 -0
- package/dist/src/mailTemplates/components/SettingsPanel.vue.d.ts +15 -0
- package/dist/src/mailTemplates/components/TemplateBuilder.vue.d.ts +2 -0
- package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +19 -1
- package/dist/src/mailTemplates/components/rich-text.d.ts +6 -0
- package/dist/src/mailTemplates/config.d.ts +10 -4
- package/dist/src/mailTemplates/defaults.d.ts +10 -0
- package/dist/src/mailTemplates/editor-state.d.ts +21 -0
- package/dist/src/mailTemplates/index.d.ts +11 -5
- package/dist/src/mailTemplates/index.vue.d.ts +2 -4
- package/dist/src/mailTemplates/metadata.d.ts +1 -1
- package/dist/src/mailTemplates/pages/Detail.vue.d.ts +1 -13
- package/dist/src/mailTemplates/pages/Overview.vue.d.ts +1 -13
- package/dist/src/mailTemplates/server.d.ts +23 -0
- package/dist/src/server-handlers.d.ts +6 -0
- package/dist/src/table/badge-filter-utils.d.ts +8 -0
- package/dist/src/table/chat-components/TableOverviewCard.vue.d.ts +2 -7
- package/dist/src/table/chat-components/TableResultView.vue.d.ts +3 -7
- package/dist/src/table/components/TableDisplayCell.vue.d.ts +8 -0
- package/dist/src/table/components/columns/BadgeColumnSettings.vue.d.ts +9 -0
- package/dist/src/table/components/columns/ColumnColorSelect.vue.d.ts +11 -0
- package/dist/src/table/components/columns/ColumnDisplaySettings.vue.d.ts +9 -0
- package/dist/src/table/components/columns/ColumnTypeSelect.vue.d.ts +11 -0
- package/dist/src/table/components/columns/ColumnValueSourceInput.vue.d.ts +15 -0
- package/dist/src/table/components/columns/DialogTableColumnItem.vue.d.ts +8 -11
- package/dist/src/table/components/columns/ProgressColumnSettings.vue.d.ts +8 -0
- package/dist/src/table/components/stats/StatDialog.vue.d.ts +6 -10
- package/dist/src/table/components/stats/Stats.vue.d.ts +9 -15
- package/dist/src/table/composables/useTableClock.d.ts +4 -0
- package/dist/src/table/display-utils.d.ts +35 -0
- package/dist/src/table/row-value.d.ts +1 -0
- package/dist/src/table/stat-utils.d.ts +9 -0
- package/dist/src/table/tool-utils.d.ts +1 -1
- package/dist/src/table/types.d.ts +54 -1
- package/dist/src/whatsappBusiness/analytics.d.ts +4 -0
- package/dist/src/whatsappBusiness/components/AccountPanel.vue.d.ts +2 -0
- package/dist/src/whatsappBusiness/components/InsightsPanel.vue.d.ts +5 -0
- package/dist/src/whatsappBusiness/components/TemplateDialog.vue.d.ts +14 -0
- package/dist/src/whatsappBusiness/components/TemplatesPanel.vue.d.ts +5 -0
- package/dist/src/whatsappBusiness/components/presentation.d.ts +4 -0
- package/dist/src/whatsappBusiness/config.d.ts +51 -0
- package/dist/src/whatsappBusiness/connection.d.ts +77 -0
- package/dist/src/whatsappBusiness/index.d.ts +63 -0
- package/dist/src/whatsappBusiness/index.vue.d.ts +5 -0
- package/dist/src/whatsappBusiness/metadata.d.ts +2 -0
- package/dist/src/whatsappBusiness/pages/Overview.vue.d.ts +2 -0
- package/dist/src/whatsappBusiness/permissions.d.ts +5 -0
- package/dist/src/whatsappBusiness/provider.d.ts +21 -0
- package/dist/src/whatsappBusiness/routes.d.ts +5 -0
- package/dist/src/whatsappBusiness/server.d.ts +14 -0
- package/dist/src/whatsappBusiness/templates.d.ts +94 -0
- package/dist/src/whatsappBusiness/types.d.ts +162 -0
- package/dist/{tool-sandbox-DoF1PsyS.js → tool-sandbox-BSkKdH7V.js} +1 -1
- package/dist/{tool-sandbox-DdkMLkDK.mjs → tool-sandbox-DU9b1B7v.mjs} +1 -1
- package/dist/types-9N-DKxNj.mjs +250 -0
- package/dist/types-B5MifmeF.mjs +2696 -0
- package/dist/types-Cem0vPo_.js +1 -0
- package/dist/types-D5dgTskW.js +1 -0
- package/dist/useHelpbotApi-BIIungOh.js +1 -0
- package/dist/useHelpbotApi-HC9JSiSn.mjs +229 -0
- package/dist/{useTableAgentTools-D5mzGf3A.js → useTableAgentTools-BrUot49I.js} +1 -1
- package/dist/{useTableAgentTools-DcN3kYRL.mjs → useTableAgentTools-r5InEI4p.mjs} +8 -8
- package/dist/vee-validate-zod-CWZwNTWE.js +1 -0
- package/dist/vee-validate-zod-D0WaDgDZ.mjs +1780 -0
- package/package.json +2 -2
- package/src/appointments/tools.ts +52 -2
- package/src/formBuilder/tools.ts +1 -0
- package/dist/AppointmentListTable-DZJNmTMb.mjs +0 -177
- package/dist/AppointmentListTable-Dieu9US_.js +0 -1
- package/dist/ContentEditor-C-Wm48ai.js +0 -467
- package/dist/Detail-BCUUNWvp.js +0 -1
- package/dist/Detail-Byk781b4.mjs +0 -26
- package/dist/Detail-DGg_xXZc.js +0 -1
- package/dist/Detail-Sc2qZdxj.js +0 -1
- package/dist/Detail-mvSGbnFU.js +0 -1
- package/dist/Overview-BDlBCUI_.js +0 -1
- package/dist/Overview-Su8ZUbMs.mjs +0 -26
- package/dist/TableDataWidget-7qvC3Egd.js +0 -1
- package/dist/TableDataWidget-DMTSoGRO.mjs +0 -121
- package/dist/TableOverviewCard-AFq-puJs.js +0 -1
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-CBn-Oxl9.mjs +0 -534
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-C_Lv-SmJ.js +0 -1
- package/dist/TableRowActionCard-IzB6tNN-.js +0 -1
- package/dist/TableView-BkwoKREo.js +0 -4
- package/dist/TableView-C4Zyp8d7.mjs +0 -8228
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +0 -1
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs +0 -40
- package/dist/dateRangePresets-B-l5b_wR.mjs +0 -48
- package/dist/dateRangePresets-CPWqst_x.js +0 -1
- package/dist/orders-DUa2PVoa.js +0 -1
- package/dist/vee-validate-zod-SjDT8X35.mjs +0 -4404
- package/dist/vee-validate-zod-VCmLnrtQ.js +0 -1
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
import { r as c, g as U, b as re, c as oe, _ as Z, f as le, d as pe } from "./dateRangePresets-CaPVagHY.mjs";
|
|
2
|
+
import { defineComponent as ue, computed as _, openBlock as d, createElementBlock as f, createElementVNode as C, createVNode as $, unref as o, toDisplayString as h, createCommentVNode as T, Fragment as O, renderList as M, createBlock as z, createTextVNode as B, normalizeClass as X, renderSlot as de } from "vue";
|
|
3
|
+
import { Table2 as G, Columns3 as ce, Image as P, ExternalLink as Q, Check as ee, X as te } from "lucide-vue-next";
|
|
4
|
+
const W = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
5
|
+
function ne(t) {
|
|
6
|
+
return t.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_.-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (e) => e.toUpperCase());
|
|
7
|
+
}
|
|
8
|
+
function fe(t, e) {
|
|
9
|
+
const i = t.toLowerCase().replace(/[_.-]/g, "");
|
|
10
|
+
if (/email$/.test(i)) return "email";
|
|
11
|
+
if (/(phone|mobile|telephone|tel)$/.test(i)) return "phone";
|
|
12
|
+
if (/(image|photo|avatar|thumbnail|logo|picture)$/.test(i)) return "image";
|
|
13
|
+
if (/(url|link|website|href)$/.test(i)) return "URL";
|
|
14
|
+
if (/(price|amount|cost|total|revenue|salary|fee)$/.test(i)) return "currency";
|
|
15
|
+
if (/(createdat|updatedat|timestamp)$/.test(i)) return "datetime";
|
|
16
|
+
if (/date$/.test(i)) return "date";
|
|
17
|
+
const p = e.filter((a) => a != null && a !== "");
|
|
18
|
+
return p.length ? p.every((a) => typeof a == "boolean") ? "boolean" : p.every((a) => typeof a == "number") ? "number" : p.every((a) => Array.isArray(a)) ? "array" : p.every((a) => typeof a == "string" && /^\d{4}-\d{2}-\d{2}(?:T|$)/.test(a)) ? p.some((a) => String(a).includes("T")) ? "datetime" : "date" : "text" : "text";
|
|
19
|
+
}
|
|
20
|
+
function Qe(t) {
|
|
21
|
+
if (t == null) return [];
|
|
22
|
+
const e = Array.isArray(t) ? t : Array.isArray(t?.data) ? t.data : Array.isArray(t?.items) ? t.items : Array.isArray(t?.rows) ? t.rows : null;
|
|
23
|
+
if (!e)
|
|
24
|
+
throw new Error("The Fetch items flow must return an array of rows.");
|
|
25
|
+
return e.map((i) => i && typeof i == "object" && !Array.isArray(i) ? i : { value: i });
|
|
26
|
+
}
|
|
27
|
+
function et(t) {
|
|
28
|
+
return Array.isArray(t) ? t.filter((e) => e && typeof e.property == "string" && e.property.trim()).map((e, i) => ({
|
|
29
|
+
...e,
|
|
30
|
+
id: typeof e.id == "string" ? e.id : `column-${i}`,
|
|
31
|
+
property: e.property.trim(),
|
|
32
|
+
label: typeof e.label == "string" && e.label.trim() ? e.label.trim() : ne(e.property),
|
|
33
|
+
type: typeof e.type == "string" && e.type ? e.type : "text",
|
|
34
|
+
visible: e.visible !== !1
|
|
35
|
+
})) : [];
|
|
36
|
+
}
|
|
37
|
+
function se(t, e, i, p) {
|
|
38
|
+
if (!(!t || typeof t != "object" || Array.isArray(t) || p >= 2))
|
|
39
|
+
for (const [a, l] of Object.entries(t)) {
|
|
40
|
+
if (W.has(a)) continue;
|
|
41
|
+
const y = e ? `${e}.${a}` : a;
|
|
42
|
+
l && typeof l == "object" && !Array.isArray(l) && !(l instanceof Date) ? se(l, y, i, p + 1) : i.add(y);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function ye(t) {
|
|
46
|
+
const e = /* @__PURE__ */ new Set();
|
|
47
|
+
for (const i of t.slice(0, 10)) se(i, "", e, 0);
|
|
48
|
+
return Array.from(e).slice(0, 40).map((i, p) => ({
|
|
49
|
+
id: `inferred-${p}`,
|
|
50
|
+
property: i,
|
|
51
|
+
label: ne(i),
|
|
52
|
+
type: fe(i, t.map((a) => c(a, i))),
|
|
53
|
+
visible: !0
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
function J(t, e) {
|
|
57
|
+
const i = String(t || "").trim().toLocaleLowerCase();
|
|
58
|
+
return i && (e.find((p) => U(p).toLocaleLowerCase() === i) || e.find((p) => p.property.toLocaleLowerCase() === i) || e.find((p) => String(p.label || "").trim().toLocaleLowerCase() === i) || e.find((p) => String(p.id || "").trim().toLocaleLowerCase() === i)) || null;
|
|
59
|
+
}
|
|
60
|
+
function S(t) {
|
|
61
|
+
return t == null || t === "" || Array.isArray(t) && t.length === 0;
|
|
62
|
+
}
|
|
63
|
+
function me(t) {
|
|
64
|
+
return typeof t == "boolean" ? t : typeof t != "string" ? null : t.toLowerCase() === "true" ? !0 : t.toLowerCase() === "false" ? !1 : null;
|
|
65
|
+
}
|
|
66
|
+
function ge(t, e) {
|
|
67
|
+
if (typeof e == "number") {
|
|
68
|
+
const i = Number(t);
|
|
69
|
+
return Number.isFinite(i) ? i : t;
|
|
70
|
+
}
|
|
71
|
+
return typeof e == "boolean" ? me(t) ?? t : t;
|
|
72
|
+
}
|
|
73
|
+
function D(t, e) {
|
|
74
|
+
const i = ge(e, t);
|
|
75
|
+
if (typeof t == "string" && typeof i == "string")
|
|
76
|
+
return t.toLocaleLowerCase() === i.toLocaleLowerCase();
|
|
77
|
+
if (t instanceof Date) {
|
|
78
|
+
const p = new Date(i);
|
|
79
|
+
return !Number.isNaN(p.getTime()) && t.getTime() === p.getTime();
|
|
80
|
+
}
|
|
81
|
+
return Object.is(t, i);
|
|
82
|
+
}
|
|
83
|
+
function L(t) {
|
|
84
|
+
if (t instanceof Date) return t.getTime();
|
|
85
|
+
if (typeof t == "number") return t;
|
|
86
|
+
if (typeof t == "boolean") return t ? 1 : 0;
|
|
87
|
+
if (typeof t == "string") {
|
|
88
|
+
const e = t.trim(), i = Number(e);
|
|
89
|
+
if (e && Number.isFinite(i)) return i;
|
|
90
|
+
if (/^\d{4}-\d{2}-\d{2}(?:T|$)/.test(e)) {
|
|
91
|
+
const p = new Date(e).getTime();
|
|
92
|
+
if (!Number.isNaN(p)) return p;
|
|
93
|
+
}
|
|
94
|
+
return e.toLocaleLowerCase();
|
|
95
|
+
}
|
|
96
|
+
return String(t ?? "").toLocaleLowerCase();
|
|
97
|
+
}
|
|
98
|
+
function be(t, e, i, p) {
|
|
99
|
+
const a = J(e.property, i), l = a?.type === "progress" ? re(t, a, p) : c(t, a?.property || e.property), y = e.operator || "==", u = Array.isArray(e.values) ? e.values : (y === "in" || y === "notIn") && typeof e.value == "string" ? e.value.split(",").map((m) => m.trim()) : [];
|
|
100
|
+
if ([">", ">=", "<", "<="].includes(y) && (S(l) || S(e.value)))
|
|
101
|
+
return !1;
|
|
102
|
+
switch (y) {
|
|
103
|
+
case "==":
|
|
104
|
+
case "equals":
|
|
105
|
+
return D(l, e.value);
|
|
106
|
+
case "!=":
|
|
107
|
+
case "not_equals":
|
|
108
|
+
return !D(l, e.value);
|
|
109
|
+
case ">":
|
|
110
|
+
return L(l) > L(e.value);
|
|
111
|
+
case ">=":
|
|
112
|
+
return L(l) >= L(e.value);
|
|
113
|
+
case "<":
|
|
114
|
+
return L(l) < L(e.value);
|
|
115
|
+
case "<=":
|
|
116
|
+
return L(l) <= L(e.value);
|
|
117
|
+
case "contains":
|
|
118
|
+
return Array.isArray(l) ? l.some((m) => D(m, e.value)) : String(l ?? "").toLocaleLowerCase().includes(String(e.value ?? "").toLocaleLowerCase());
|
|
119
|
+
case "startsWith":
|
|
120
|
+
return String(l ?? "").toLocaleLowerCase().startsWith(String(e.value ?? "").toLocaleLowerCase());
|
|
121
|
+
case "endsWith":
|
|
122
|
+
return String(l ?? "").toLocaleLowerCase().endsWith(String(e.value ?? "").toLocaleLowerCase());
|
|
123
|
+
case "in":
|
|
124
|
+
return u.some((m) => D(l, m));
|
|
125
|
+
case "notIn":
|
|
126
|
+
return !u.some((m) => D(l, m));
|
|
127
|
+
case "isEmpty":
|
|
128
|
+
return S(l);
|
|
129
|
+
case "isNotEmpty":
|
|
130
|
+
return !S(l);
|
|
131
|
+
default:
|
|
132
|
+
throw new Error(`Unsupported table filter operator "${y}".`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function tt(t, e, i = []) {
|
|
136
|
+
if (!Array.isArray(e) || !e.length) return [...t];
|
|
137
|
+
for (const a of e) {
|
|
138
|
+
if (!a || typeof a.property != "string" || !a.property.trim())
|
|
139
|
+
throw new Error("Every table filter needs a property.");
|
|
140
|
+
if (i.length && !J(a.property, i))
|
|
141
|
+
throw new Error(`Unknown table filter property "${a.property}". Use a property or label reported by inspectTable.`);
|
|
142
|
+
}
|
|
143
|
+
const p = Date.now();
|
|
144
|
+
return t.filter((a) => e.every((l) => be(a, l, i, p)));
|
|
145
|
+
}
|
|
146
|
+
function rt(t, e, i = "asc", p = []) {
|
|
147
|
+
if (!e) return [...t];
|
|
148
|
+
const a = J(e, p);
|
|
149
|
+
if (p.length && !a)
|
|
150
|
+
throw new Error(`Unknown table sort property "${e}". Use a property or label reported by inspectTable.`);
|
|
151
|
+
const l = i === "desc" ? -1 : 1, y = Date.now(), u = (m) => a?.type === "progress" ? re(m, a, y) : c(m, a?.property || e);
|
|
152
|
+
return t.map((m, x) => ({ row: m, index: x })).sort((m, x) => {
|
|
153
|
+
const k = u(m.row), A = u(x.row);
|
|
154
|
+
if (S(k) && S(A)) return m.index - x.index;
|
|
155
|
+
if (S(k)) return 1;
|
|
156
|
+
if (S(A)) return -1;
|
|
157
|
+
const E = L(k), V = L(A);
|
|
158
|
+
return E < V ? -1 * l : E > V ? 1 * l : m.index - x.index;
|
|
159
|
+
}).map((m) => m.row);
|
|
160
|
+
}
|
|
161
|
+
function nt(t, e, i, p) {
|
|
162
|
+
return t.filter((a) => {
|
|
163
|
+
const l = c(a, e);
|
|
164
|
+
if (l == null || l === "") return !1;
|
|
165
|
+
const u = (l instanceof Date ? l : typeof l == "string" && /^\d{4}-\d{2}-\d{2}$/.test(l) ? /* @__PURE__ */ new Date(`${l}T00:00:00.000`) : new Date(l)).getTime();
|
|
166
|
+
return !Number.isNaN(u) && u >= i.getTime() && u <= p.getTime();
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function he(t) {
|
|
170
|
+
return t === null || ["string", "number", "boolean"].includes(typeof t);
|
|
171
|
+
}
|
|
172
|
+
function st(t, e, i = []) {
|
|
173
|
+
const p = ["id", "_id", "uuid", "key", "email", "slug"], a = i.length ? i : ye(e), l = Array.from(/* @__PURE__ */ new Set([
|
|
174
|
+
...p,
|
|
175
|
+
...a.map((m) => m.property),
|
|
176
|
+
...Object.keys(t || {})
|
|
177
|
+
])).filter((m) => !W.has(m)), y = [];
|
|
178
|
+
let u = [...e];
|
|
179
|
+
for (const m of l) {
|
|
180
|
+
const x = c(t, m);
|
|
181
|
+
if (!he(x) || x === "") continue;
|
|
182
|
+
const k = u.filter((A) => D(c(A, m), x));
|
|
183
|
+
if (k.length) {
|
|
184
|
+
if (u.length === 1) return [{ property: m, value: x }];
|
|
185
|
+
if (k.length !== u.length) {
|
|
186
|
+
if (y.push({ property: m, value: x }), u = k, u.length === 1) return y;
|
|
187
|
+
if (y.length >= 3) break;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return u.length === 1 && y.length ? y : null;
|
|
192
|
+
}
|
|
193
|
+
function it(t, e = 512 * 1024) {
|
|
194
|
+
const i = /* @__PURE__ */ new WeakSet(), p = JSON.stringify(t, (l, y) => {
|
|
195
|
+
if (!W.has(l)) {
|
|
196
|
+
if (typeof y == "bigint") return String(y);
|
|
197
|
+
if (y instanceof Date) return y.toISOString();
|
|
198
|
+
if (y && typeof y == "object") {
|
|
199
|
+
if (i.has(y)) return "[Circular]";
|
|
200
|
+
i.add(y);
|
|
201
|
+
}
|
|
202
|
+
return y;
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
if (p === void 0) throw new Error("The table result is not JSON serializable.");
|
|
206
|
+
const a = new TextEncoder().encode(p).byteLength;
|
|
207
|
+
if (a > e)
|
|
208
|
+
throw new Error(`The table result is too large to store (${Math.ceil(a / 1024)} KB). Narrow the query or lower the row limit.`);
|
|
209
|
+
return JSON.parse(p);
|
|
210
|
+
}
|
|
211
|
+
const xe = { class: "w-full min-w-0 overflow-hidden rounded-xl border bg-background" }, we = {
|
|
212
|
+
key: 0,
|
|
213
|
+
class: "flex items-start gap-2.5 border-b bg-muted/30 px-3 py-2.5"
|
|
214
|
+
}, ke = { class: "mt-0.5 flex size-7 shrink-0 items-center justify-center rounded-lg bg-primary/10" }, ve = { class: "min-w-0 flex-1" }, _e = {
|
|
215
|
+
key: 0,
|
|
216
|
+
class: "truncate text-xs font-semibold"
|
|
217
|
+
}, Ce = {
|
|
218
|
+
key: 1,
|
|
219
|
+
class: "mt-0.5 text-[11px] leading-relaxed text-muted-foreground"
|
|
220
|
+
}, Le = {
|
|
221
|
+
key: 0,
|
|
222
|
+
class: "shrink-0 rounded-full bg-muted px-2 py-0.5 text-[10px] tabular-nums text-muted-foreground"
|
|
223
|
+
}, Se = {
|
|
224
|
+
key: 1,
|
|
225
|
+
class: "flex flex-col items-center px-4 py-8 text-center"
|
|
226
|
+
}, Ae = { class: "text-xs text-muted-foreground" }, $e = {
|
|
227
|
+
key: 2,
|
|
228
|
+
class: "flex flex-col items-center px-4 py-8 text-center"
|
|
229
|
+
}, Te = {
|
|
230
|
+
key: 3,
|
|
231
|
+
class: "grid gap-x-5 gap-y-3 p-3 sm:grid-cols-2"
|
|
232
|
+
}, Ne = { class: "mb-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground" }, ze = ["src", "alt"], De = {
|
|
233
|
+
key: 2,
|
|
234
|
+
class: "flex size-16 items-center justify-center rounded-lg border bg-muted/30"
|
|
235
|
+
}, Ee = ["href"], Re = ["href"], je = ["href"], Ue = ["title"], Ve = {
|
|
236
|
+
key: 4,
|
|
237
|
+
class: "overflow-x-auto"
|
|
238
|
+
}, Fe = { class: "w-full min-w-max text-left text-xs" }, Oe = { class: "border-b bg-muted/30" }, Me = ["src", "alt"], Ie = {
|
|
239
|
+
key: 2,
|
|
240
|
+
class: "flex size-8 items-center justify-center rounded-md border bg-muted/30"
|
|
241
|
+
}, Be = ["href"], We = { class: "truncate" }, Je = ["href"], He = ["href"], Ke = ["title"], qe = {
|
|
242
|
+
key: 5,
|
|
243
|
+
class: "flex flex-wrap items-center gap-x-3 gap-y-1 border-t bg-muted/20 px-3 py-2 text-[10px] text-muted-foreground"
|
|
244
|
+
}, Ye = { key: 0 }, Ze = { key: 1 }, at = /* @__PURE__ */ ue({
|
|
245
|
+
__name: "TableResultView",
|
|
246
|
+
props: {
|
|
247
|
+
rows: { default: () => [] },
|
|
248
|
+
columns: { default: () => [] },
|
|
249
|
+
title: { default: "" },
|
|
250
|
+
description: { default: "" },
|
|
251
|
+
totalCount: { default: void 0 },
|
|
252
|
+
emptyText: { default: "No matching rows found." },
|
|
253
|
+
maxRows: { default: 20 },
|
|
254
|
+
maxColumns: { default: 12 },
|
|
255
|
+
currency: { default: "EUR" },
|
|
256
|
+
view: { default: "auto" }
|
|
257
|
+
},
|
|
258
|
+
setup(t) {
|
|
259
|
+
const e = t;
|
|
260
|
+
oe();
|
|
261
|
+
const i = _(() => E(e.maxRows, 1, 100, 20)), p = _(() => E(e.maxColumns, 1, 20, 12)), a = _(
|
|
262
|
+
() => (Array.isArray(e.rows) ? e.rows : []).filter((r) => r != null).map((r) => typeof r == "object" && !Array.isArray(r) ? r : { value: r })
|
|
263
|
+
), l = _(() => {
|
|
264
|
+
const r = Array.isArray(e.columns) ? e.columns : [], g = r.filter((s) => s && s.visible !== !1 && !s._remove && (s.property || s.key)).map((s, b) => {
|
|
265
|
+
const j = String(s.property || s.key);
|
|
266
|
+
return {
|
|
267
|
+
id: String(s.id || j || b),
|
|
268
|
+
property: j,
|
|
269
|
+
label: s.label || K(j),
|
|
270
|
+
type: s.type || q(j, a.value.map((ae) => c(ae, j))),
|
|
271
|
+
visible: !0,
|
|
272
|
+
numberDisplay: s.numberDisplay,
|
|
273
|
+
textDisplay: s.textDisplay,
|
|
274
|
+
dateDisplay: s.dateDisplay,
|
|
275
|
+
progress: s.progress,
|
|
276
|
+
badge: s.badge
|
|
277
|
+
};
|
|
278
|
+
});
|
|
279
|
+
if (r.length > 0) return V(g);
|
|
280
|
+
const n = [], w = /* @__PURE__ */ new Set();
|
|
281
|
+
for (const s of a.value.slice(0, 10))
|
|
282
|
+
for (const b of Object.keys(s))
|
|
283
|
+
w.has(b) || (w.add(b), n.push(b));
|
|
284
|
+
return n.map((s) => ({
|
|
285
|
+
id: s,
|
|
286
|
+
property: s,
|
|
287
|
+
label: K(s),
|
|
288
|
+
type: q(s, a.value.map((b) => c(b, s))),
|
|
289
|
+
visible: !0
|
|
290
|
+
}));
|
|
291
|
+
}), y = _(() => l.value.slice(0, p.value)), u = _(() => a.value.slice(0, i.value)), m = _(() => Math.max(l.value.length - y.value.length, 0)), x = _(() => {
|
|
292
|
+
const r = Number(e.totalCount);
|
|
293
|
+
return Number.isFinite(r) && r >= a.value.length ? r : a.value.length;
|
|
294
|
+
}), k = _(() => Math.max(x.value - u.value.length, 0)), A = _(() => u.value.length === 1 && (e.view === "card" || e.view === "metric" || e.view === "auto" && x.value === 1));
|
|
295
|
+
function E(r, g, n, w) {
|
|
296
|
+
const s = Number(r);
|
|
297
|
+
return Number.isFinite(s) ? Math.min(Math.max(Math.floor(s), g), n) : w;
|
|
298
|
+
}
|
|
299
|
+
function V(r) {
|
|
300
|
+
const g = /* @__PURE__ */ new Set();
|
|
301
|
+
return r.filter((n) => {
|
|
302
|
+
const w = U(n);
|
|
303
|
+
return g.has(w) ? !1 : (g.add(w), !0);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
function H(r) {
|
|
307
|
+
return ["date", "datetime", "progress", "badge"].includes(r.type);
|
|
308
|
+
}
|
|
309
|
+
function K(r) {
|
|
310
|
+
return r.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_.-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (g) => g.toUpperCase());
|
|
311
|
+
}
|
|
312
|
+
function q(r, g) {
|
|
313
|
+
const w = r.toLowerCase().replace(/[_.-]/g, "");
|
|
314
|
+
if (/(image|photo|avatar|thumbnail|logo|picture)$/.test(w)) return "image";
|
|
315
|
+
if (/(email)$/.test(w)) return "email";
|
|
316
|
+
if (/(phone|mobile|telephone|tel)$/.test(w)) return "phone";
|
|
317
|
+
if (/(url|link|website|href)$/.test(w)) return "URL";
|
|
318
|
+
if (/(price|amount|cost|total|revenue|salary|fee)$/.test(w)) return "currency";
|
|
319
|
+
if (/(date|createdat|updatedat|timestamp)$/.test(w)) return "datetime";
|
|
320
|
+
const s = g.filter((b) => b != null && b !== "");
|
|
321
|
+
return s.length === 0 ? "text" : s.every((b) => typeof b == "boolean") ? "boolean" : s.every((b) => Array.isArray(b)) ? "array" : s.every((b) => typeof b == "number") ? "number" : s.every((b) => typeof b == "string" && /^https?:\/\//i.test(b)) ? "URL" : s.every((b) => typeof b == "string" && /^\d{4}-\d{2}-\d{2}(?:T|$)/.test(b)) ? s.some((b) => String(b).includes("T")) ? "datetime" : "date" : "text";
|
|
322
|
+
}
|
|
323
|
+
function N(r) {
|
|
324
|
+
return r == null || r === "";
|
|
325
|
+
}
|
|
326
|
+
function I(r) {
|
|
327
|
+
if (typeof r != "string") return !1;
|
|
328
|
+
try {
|
|
329
|
+
const g = new URL(r, typeof window > "u" ? "https://localhost" : window.location.origin);
|
|
330
|
+
return g.protocol === "http:" || g.protocol === "https:";
|
|
331
|
+
} catch {
|
|
332
|
+
return !1;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
function Y(r) {
|
|
336
|
+
return I(r) || typeof r == "string" && /^data:image\/(?:png|jpe?g|gif|webp|avif);base64,/i.test(r);
|
|
337
|
+
}
|
|
338
|
+
function v(r, g) {
|
|
339
|
+
if (N(r)) return "—";
|
|
340
|
+
switch (g.type) {
|
|
341
|
+
case "text":
|
|
342
|
+
return F(pe(r, g, R), 180);
|
|
343
|
+
case "boolean":
|
|
344
|
+
return r ? "Yes" : "No";
|
|
345
|
+
case "number":
|
|
346
|
+
return le(r, g, (n) => n.toLocaleString(void 0, { maximumFractionDigits: 2 }));
|
|
347
|
+
case "currency": {
|
|
348
|
+
const n = typeof r == "number" ? r : Number(String(r).replace(",", "."));
|
|
349
|
+
if (!Number.isFinite(n)) return String(r);
|
|
350
|
+
try {
|
|
351
|
+
return new Intl.NumberFormat(void 0, { style: "currency", currency: e.currency }).format(n);
|
|
352
|
+
} catch {
|
|
353
|
+
return `${n.toLocaleString(void 0, { maximumFractionDigits: 2 })} ${e.currency}`;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
case "date":
|
|
357
|
+
case "datetime": {
|
|
358
|
+
const n = new Date(r);
|
|
359
|
+
return Number.isNaN(n.getTime()) ? String(r) : g.type === "date" ? n.toLocaleDateString() : n.toLocaleString();
|
|
360
|
+
}
|
|
361
|
+
case "array-counter":
|
|
362
|
+
return Array.isArray(r) ? String(r.length) : "0";
|
|
363
|
+
case "array":
|
|
364
|
+
return Array.isArray(r) ? F(r.map(R).join(", "), 160) : String(r);
|
|
365
|
+
case "html":
|
|
366
|
+
return F(ie(String(r)), 160);
|
|
367
|
+
default:
|
|
368
|
+
return F(R(r), 180);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
function R(r) {
|
|
372
|
+
if (N(r)) return "—";
|
|
373
|
+
if (r instanceof Date) return r.toLocaleString();
|
|
374
|
+
if (typeof r == "string") return r;
|
|
375
|
+
if (typeof r == "number" || typeof r == "boolean" || typeof r == "bigint") return String(r);
|
|
376
|
+
try {
|
|
377
|
+
return JSON.stringify(r);
|
|
378
|
+
} catch {
|
|
379
|
+
return String(r);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function ie(r) {
|
|
383
|
+
if (typeof document > "u") return r.replace(/<[^>]*>/g, " ");
|
|
384
|
+
const g = document.createElement("div");
|
|
385
|
+
return g.innerHTML = r, g.textContent || "";
|
|
386
|
+
}
|
|
387
|
+
function F(r, g) {
|
|
388
|
+
return r.length > g ? `${r.slice(0, g - 1)}…` : r;
|
|
389
|
+
}
|
|
390
|
+
return (r, g) => (d(), f("div", xe, [
|
|
391
|
+
t.title || t.description ? (d(), f("div", we, [
|
|
392
|
+
C("div", ke, [
|
|
393
|
+
$(o(G), { class: "size-3.5 text-primary" })
|
|
394
|
+
]),
|
|
395
|
+
C("div", ve, [
|
|
396
|
+
t.title ? (d(), f("p", _e, h(t.title), 1)) : T("", !0),
|
|
397
|
+
t.description ? (d(), f("p", Ce, h(t.description), 1)) : T("", !0)
|
|
398
|
+
]),
|
|
399
|
+
x.value > 0 ? (d(), f("span", Le, h(x.value) + " " + h(x.value === 1 ? "row" : "rows"), 1)) : T("", !0)
|
|
400
|
+
])) : T("", !0),
|
|
401
|
+
u.value.length === 0 ? (d(), f("div", Se, [
|
|
402
|
+
$(o(G), { class: "mb-2 size-7 text-muted-foreground/50" }),
|
|
403
|
+
C("p", Ae, h(t.emptyText), 1)
|
|
404
|
+
])) : y.value.length === 0 ? (d(), f("div", $e, [
|
|
405
|
+
$(o(ce), { class: "mb-2 size-7 text-muted-foreground/50" }),
|
|
406
|
+
g[0] || (g[0] = C("p", { class: "text-xs text-muted-foreground" }, "No visible columns are configured.", -1))
|
|
407
|
+
])) : A.value ? (d(), f("div", Te, [
|
|
408
|
+
(d(!0), f(O, null, M(y.value, (n) => (d(), f("div", {
|
|
409
|
+
key: o(U)(n),
|
|
410
|
+
class: "min-w-0"
|
|
411
|
+
}, [
|
|
412
|
+
C("p", Ne, h(n.label), 1),
|
|
413
|
+
H(n) ? (d(), z(Z, {
|
|
414
|
+
key: 0,
|
|
415
|
+
row: u.value[0],
|
|
416
|
+
column: n
|
|
417
|
+
}, null, 8, ["row", "column"])) : n.type === "image" && Y(o(c)(u.value[0], n.property)) ? (d(), f("img", {
|
|
418
|
+
key: 1,
|
|
419
|
+
src: o(c)(u.value[0], n.property),
|
|
420
|
+
alt: n.label,
|
|
421
|
+
class: "size-16 rounded-lg border object-cover"
|
|
422
|
+
}, null, 8, ze)) : n.type === "image" ? (d(), f("div", De, [
|
|
423
|
+
$(o(P), { class: "size-5 text-muted-foreground/50" })
|
|
424
|
+
])) : n.type === "URL" && I(o(c)(u.value[0], n.property)) ? (d(), f("a", {
|
|
425
|
+
key: 3,
|
|
426
|
+
href: o(c)(u.value[0], n.property),
|
|
427
|
+
target: "_blank",
|
|
428
|
+
rel: "noopener noreferrer",
|
|
429
|
+
class: "inline-flex max-w-full items-center gap-1 break-all text-xs text-primary hover:underline"
|
|
430
|
+
}, [
|
|
431
|
+
B(h(v(o(c)(u.value[0], n.property), n)) + " ", 1),
|
|
432
|
+
$(o(Q), { class: "size-3 shrink-0" })
|
|
433
|
+
], 8, Ee)) : n.type === "email" && !N(o(c)(u.value[0], n.property)) ? (d(), f("a", {
|
|
434
|
+
key: 4,
|
|
435
|
+
href: `mailto:${o(c)(u.value[0], n.property)}`,
|
|
436
|
+
class: "break-all text-xs text-primary hover:underline"
|
|
437
|
+
}, h(v(o(c)(u.value[0], n.property), n)), 9, Re)) : n.type === "phone" && !N(o(c)(u.value[0], n.property)) ? (d(), f("a", {
|
|
438
|
+
key: 5,
|
|
439
|
+
href: `tel:${o(c)(u.value[0], n.property)}`,
|
|
440
|
+
class: "text-xs text-primary hover:underline"
|
|
441
|
+
}, h(v(o(c)(u.value[0], n.property), n)), 9, je)) : n.type === "boolean" ? (d(), f("span", {
|
|
442
|
+
key: 6,
|
|
443
|
+
class: X(["inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium", o(c)(u.value[0], n.property) ? "bg-emerald-500/10 text-emerald-700 dark:text-emerald-300" : "bg-muted text-muted-foreground"])
|
|
444
|
+
}, [
|
|
445
|
+
o(c)(u.value[0], n.property) ? (d(), z(o(ee), {
|
|
446
|
+
key: 0,
|
|
447
|
+
class: "size-3"
|
|
448
|
+
})) : (d(), z(o(te), {
|
|
449
|
+
key: 1,
|
|
450
|
+
class: "size-3"
|
|
451
|
+
})),
|
|
452
|
+
B(" " + h(v(o(c)(u.value[0], n.property), n)), 1)
|
|
453
|
+
], 2)) : (d(), f("p", {
|
|
454
|
+
key: 7,
|
|
455
|
+
class: "break-words text-xs font-medium",
|
|
456
|
+
title: R(o(c)(u.value[0], n.property))
|
|
457
|
+
}, h(v(o(c)(u.value[0], n.property), n)), 9, Ue))
|
|
458
|
+
]))), 128))
|
|
459
|
+
])) : (d(), f("div", Ve, [
|
|
460
|
+
C("table", Fe, [
|
|
461
|
+
C("thead", null, [
|
|
462
|
+
C("tr", Oe, [
|
|
463
|
+
(d(!0), f(O, null, M(y.value, (n) => (d(), f("th", {
|
|
464
|
+
key: o(U)(n),
|
|
465
|
+
class: "whitespace-nowrap px-3 py-2 text-[10px] font-medium uppercase tracking-wide text-muted-foreground"
|
|
466
|
+
}, h(n.label), 1))), 128))
|
|
467
|
+
])
|
|
468
|
+
]),
|
|
469
|
+
C("tbody", null, [
|
|
470
|
+
(d(!0), f(O, null, M(u.value, (n, w) => (d(), f("tr", {
|
|
471
|
+
key: w,
|
|
472
|
+
class: "border-b last:border-b-0 hover:bg-muted/20"
|
|
473
|
+
}, [
|
|
474
|
+
(d(!0), f(O, null, M(y.value, (s) => (d(), f("td", {
|
|
475
|
+
key: o(U)(s),
|
|
476
|
+
class: "max-w-56 px-3 py-2 align-middle"
|
|
477
|
+
}, [
|
|
478
|
+
H(s) ? (d(), z(Z, {
|
|
479
|
+
key: 0,
|
|
480
|
+
row: n,
|
|
481
|
+
column: s
|
|
482
|
+
}, null, 8, ["row", "column"])) : s.type === "image" && Y(o(c)(n, s.property)) ? (d(), f("img", {
|
|
483
|
+
key: 1,
|
|
484
|
+
src: o(c)(n, s.property),
|
|
485
|
+
alt: s.label,
|
|
486
|
+
class: "size-8 rounded-md border object-cover"
|
|
487
|
+
}, null, 8, Me)) : s.type === "image" ? (d(), f("div", Ie, [
|
|
488
|
+
$(o(P), { class: "size-3.5 text-muted-foreground/50" })
|
|
489
|
+
])) : s.type === "URL" && I(o(c)(n, s.property)) ? (d(), f("a", {
|
|
490
|
+
key: 3,
|
|
491
|
+
href: o(c)(n, s.property),
|
|
492
|
+
target: "_blank",
|
|
493
|
+
rel: "noopener noreferrer",
|
|
494
|
+
class: "inline-flex max-w-48 items-center gap-1 truncate text-primary hover:underline"
|
|
495
|
+
}, [
|
|
496
|
+
C("span", We, h(v(o(c)(n, s.property), s)), 1),
|
|
497
|
+
$(o(Q), { class: "size-3 shrink-0" })
|
|
498
|
+
], 8, Be)) : s.type === "email" && !N(o(c)(n, s.property)) ? (d(), f("a", {
|
|
499
|
+
key: 4,
|
|
500
|
+
href: `mailto:${o(c)(n, s.property)}`,
|
|
501
|
+
class: "block max-w-48 truncate text-primary hover:underline"
|
|
502
|
+
}, h(v(o(c)(n, s.property), s)), 9, Je)) : s.type === "phone" && !N(o(c)(n, s.property)) ? (d(), f("a", {
|
|
503
|
+
key: 5,
|
|
504
|
+
href: `tel:${o(c)(n, s.property)}`,
|
|
505
|
+
class: "whitespace-nowrap text-primary hover:underline"
|
|
506
|
+
}, h(v(o(c)(n, s.property), s)), 9, He)) : s.type === "boolean" ? (d(), f("span", {
|
|
507
|
+
key: 6,
|
|
508
|
+
class: X(["inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium", o(c)(n, s.property) ? "bg-emerald-500/10 text-emerald-700 dark:text-emerald-300" : "bg-muted text-muted-foreground"])
|
|
509
|
+
}, [
|
|
510
|
+
o(c)(n, s.property) ? (d(), z(o(ee), {
|
|
511
|
+
key: 0,
|
|
512
|
+
class: "size-2.5"
|
|
513
|
+
})) : (d(), z(o(te), {
|
|
514
|
+
key: 1,
|
|
515
|
+
class: "size-2.5"
|
|
516
|
+
})),
|
|
517
|
+
B(" " + h(v(o(c)(n, s.property), s)), 1)
|
|
518
|
+
], 2)) : (d(), f("span", {
|
|
519
|
+
key: 7,
|
|
520
|
+
class: "block max-w-56 truncate",
|
|
521
|
+
title: R(o(c)(n, s.property))
|
|
522
|
+
}, h(v(o(c)(n, s.property), s)), 9, Ke))
|
|
523
|
+
]))), 128))
|
|
524
|
+
]))), 128))
|
|
525
|
+
])
|
|
526
|
+
])
|
|
527
|
+
])),
|
|
528
|
+
u.value.length > 0 && (r.$slots.footer || k.value > 0 || m.value > 0) ? (d(), f("div", qe, [
|
|
529
|
+
de(r.$slots, "footer"),
|
|
530
|
+
!r.$slots.footer && k.value > 0 ? (d(), f("span", Ye, "Showing " + h(u.value.length) + " of " + h(x.value) + " rows", 1)) : T("", !0),
|
|
531
|
+
m.value > 0 ? (d(), f("span", Ze, h(m.value) + " more " + h(m.value === 1 ? "column" : "columns") + " hidden", 1)) : T("", !0)
|
|
532
|
+
])) : T("", !0)
|
|
533
|
+
]));
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
export {
|
|
537
|
+
at as _,
|
|
538
|
+
Qe as a,
|
|
539
|
+
st as b,
|
|
540
|
+
nt as c,
|
|
541
|
+
tt as d,
|
|
542
|
+
rt as e,
|
|
543
|
+
ye as i,
|
|
544
|
+
et as n,
|
|
545
|
+
J as r,
|
|
546
|
+
it as s
|
|
547
|
+
};
|