formue-crud 0.2.15 → 0.2.16
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/formue-crud.js +140 -139
- package/dist/formue-crud.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/formue-crud.js
CHANGED
|
@@ -3,7 +3,7 @@ var Ry = (l, e, t) => e in l ? xy(l, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var P = (l, e, t) => (Ry(l, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import Dt from "axios";
|
|
5
5
|
import { defineStore as Td } from "pinia";
|
|
6
|
-
import { reactive as _y, ref as ye, markRaw as Ty, openBlock as B, createElementBlock as G, Fragment as ot, unref as K, createStaticVNode as My, createCommentVNode as Le, createElementVNode as T, withDirectives as Gn, vModelCheckbox as Sy, createApp as el, watch as dn, inject as qe,
|
|
6
|
+
import { reactive as _y, ref as ye, markRaw as Ty, openBlock as B, createElementBlock as G, Fragment as ot, unref as K, createStaticVNode as My, createCommentVNode as Le, createElementVNode as T, withDirectives as Gn, vModelCheckbox as Sy, createApp as el, watch as dn, inject as qe, computed as Fi, onMounted as mn, renderList as zi, normalizeClass as Ie, toDisplayString as pe, createBlock as Zt, Transition as fn, withCtx as Ke, renderSlot as Qt, resolveComponent as Md, createVNode as Ue, mergeProps as is, nextTick as ns, onUnmounted as Sd, withKeys as kd, normalizeStyle as Yo, createTextVNode as ur, resolveDynamicComponent as Wu, normalizeProps as Ld, guardReactiveProps as Dd, readonly as ky, getCurrentInstance as Ly, getCurrentScope as Dy, onScopeDispose as Ay, shallowRef as Fy, toHandlers as dr, withModifiers as er, vShow as Vu, vModelText as Ad, provide as Jo } from "vue";
|
|
7
7
|
var Si = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8
8
|
function Oy(l) {
|
|
9
9
|
return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
|
|
@@ -16965,91 +16965,13 @@ function BR(l, e) {
|
|
|
16965
16965
|
}
|
|
16966
16966
|
});
|
|
16967
16967
|
}
|
|
16968
|
-
const
|
|
16969
|
-
const t = l.__vccOpts || l;
|
|
16970
|
-
for (const [i, n] of e)
|
|
16971
|
-
t[i] = n;
|
|
16972
|
-
return t;
|
|
16973
|
-
}, NR = {
|
|
16974
|
-
key: 0,
|
|
16975
|
-
id: "paginate"
|
|
16976
|
-
}, WR = { class: "flex items-center justify-center py-2 lg:px-0 sm:px-6 px-4" }, VR = { class: "lg:w-5/5 bg-white w-full flex items-center justify-between rounded-lg border pb-3" }, $R = { class: "sm:flex hidden mx-auto" }, GR = ["onClick"], UR = {
|
|
16977
|
-
__name: "MTablePagination",
|
|
16978
|
-
setup(l) {
|
|
16979
|
-
const e = qe("store");
|
|
16980
|
-
function t(u) {
|
|
16981
|
-
e.paginate(u);
|
|
16982
|
-
}
|
|
16983
|
-
function i() {
|
|
16984
|
-
e.mainPagination.currentPage > 1 && t(e.mainPagination.currentPage - 1);
|
|
16985
|
-
}
|
|
16986
|
-
function n(u) {
|
|
16987
|
-
t(u);
|
|
16988
|
-
}
|
|
16989
|
-
function r() {
|
|
16990
|
-
e.mainPagination.currentPage < e.mainPagination.lastPage && t(e.mainPagination.currentPage + 1);
|
|
16991
|
-
}
|
|
16992
|
-
function a() {
|
|
16993
|
-
let u = [];
|
|
16994
|
-
if (e.mainPagination.lastPage > 10) {
|
|
16995
|
-
let d = e.mainPagination.currentPage, f = d - 1, p = d + 1;
|
|
16996
|
-
d != 1 && u.push(1), d != 1 && d != 2 && f != 2 && u.push("..."), f > 1 && u.push(f), u.push(d), p < e.mainPagination.lastPage && u.push(p), d != e.mainPagination.lastPage && d != e.mainPagination.lastPage - 1 && p != e.mainPagination.lastPage - 1 && u.push("..."), e.mainPagination.lastPage != d && u.push(e.mainPagination.lastPage);
|
|
16997
|
-
} else
|
|
16998
|
-
u = e.mainPagination.lastPage;
|
|
16999
|
-
return u;
|
|
17000
|
-
}
|
|
17001
|
-
return (u, d) => K(e).mainPagination.lastPage ? (B(), G("div", NR, [
|
|
17002
|
-
T("div", WR, [
|
|
17003
|
-
T("div", VR, [
|
|
17004
|
-
T("div", $R, [
|
|
17005
|
-
T("div", {
|
|
17006
|
-
onClick: i,
|
|
17007
|
-
class: "flex items-center px-2 pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"
|
|
17008
|
-
}, d[0] || (d[0] = [
|
|
17009
|
-
T("svg", {
|
|
17010
|
-
class: "rtl:rotate-180 w-[10px] fill-muted-600",
|
|
17011
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17012
|
-
viewBox: "0 0 320 512"
|
|
17013
|
-
}, [
|
|
17014
|
-
T("path", { d: "M15 239c-9.4 9.4-9.4 24.6 0 33.9L207 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L65.9 256 241 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L15 239z" })
|
|
17015
|
-
], -1)
|
|
17016
|
-
])),
|
|
17017
|
-
(B(!0), G(ot, null, zi(a(), (f) => (B(), G(ot, { key: f }, [
|
|
17018
|
-
typeof f == "number" ? (B(), G("p", {
|
|
17019
|
-
key: 0,
|
|
17020
|
-
class: Ie(
|
|
17021
|
-
K(e).mainPagination.currentPage === f ? "text-sm font-medium leading-none cursor-pointer text-indigo-700 !border-indigo-400 border-t-[1px] pt-3 mr-4 px-2" : "text-sm font-medium leading-none cursor-pointer text-gray-600 hover:text-indigo-700 border-t-[1px] border-transparent hover:border-indigo-400 pt-3 mr-4 px-2"
|
|
17022
|
-
),
|
|
17023
|
-
onClick: (p) => n(f)
|
|
17024
|
-
}, pe(f), 11, GR)) : (B(), G("p", {
|
|
17025
|
-
key: 1,
|
|
17026
|
-
class: Ie(["text-sm font-medium leading-none text-gray-600 pt-3 px-2", { "mr-4": a() > 1 }])
|
|
17027
|
-
}, pe(f), 3))
|
|
17028
|
-
], 64))), 128)),
|
|
17029
|
-
T("div", {
|
|
17030
|
-
onClick: r,
|
|
17031
|
-
class: "flex items-center px-2 pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"
|
|
17032
|
-
}, d[1] || (d[1] = [
|
|
17033
|
-
T("svg", {
|
|
17034
|
-
class: "ltr:rotate-180 w-[10px] fill-muted-600",
|
|
17035
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17036
|
-
viewBox: "0 0 320 512"
|
|
17037
|
-
}, [
|
|
17038
|
-
T("path", { d: "M15 239c-9.4 9.4-9.4 24.6 0 33.9L207 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L65.9 256 241 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L15 239z" })
|
|
17039
|
-
], -1)
|
|
17040
|
-
]))
|
|
17041
|
-
])
|
|
17042
|
-
])
|
|
17043
|
-
])
|
|
17044
|
-
])) : Le("", !0);
|
|
17045
|
-
}
|
|
17046
|
-
}, jR = /* @__PURE__ */ ei(UR, [["__scopeId", "data-v-7f626758"]]), KR = {
|
|
16968
|
+
const NR = {
|
|
17047
16969
|
key: 0,
|
|
17048
16970
|
class: "mt-[-20px]"
|
|
17049
|
-
},
|
|
16971
|
+
}, WR = { class: "flex animate-pulse flex-row items-center h-full justify-center" }, VR = { class: "w-full flex flex-row items-start rtl:mr-8 ltr:ml-8" }, $R = {
|
|
17050
16972
|
key: 1,
|
|
17051
16973
|
class: "padding: 100px; mt-[-20px] rounded-b-xl bg-white text-center p-[100px] dark:bg-muted-800"
|
|
17052
|
-
},
|
|
16974
|
+
}, GR = { class: "dark:text-muted-200 text-muted-600" }, UR = {
|
|
17053
16975
|
__name: "MTable",
|
|
17054
16976
|
setup(l) {
|
|
17055
16977
|
const e = ye(null), t = qe("store"), i = qe("tableOptions"), n = Fi(() => t.mainItems.length === 0 && !t.loadings.mainLoading);
|
|
@@ -17066,7 +16988,7 @@ const ei = (l, e) => {
|
|
|
17066
16988
|
ref: e,
|
|
17067
16989
|
class: "mt-2 w-full overflow-x-auto"
|
|
17068
16990
|
}, null, 512),
|
|
17069
|
-
K(t).loadings.mainLoading ? (B(), G("div",
|
|
16991
|
+
K(t).loadings.mainLoading ? (B(), G("div", NR, [
|
|
17070
16992
|
(B(), G(ot, null, zi(10, (u) => T("div", {
|
|
17071
16993
|
key: u,
|
|
17072
16994
|
class: Ie([{
|
|
@@ -17076,8 +16998,8 @@ const ei = (l, e) => {
|
|
|
17076
16998
|
"bg-white dark:bg-muted-800": u % 2 === 0
|
|
17077
16999
|
}, "w-full py-4 mx-auto border-b-1"])
|
|
17078
17000
|
}, [
|
|
17079
|
-
T("div",
|
|
17080
|
-
T("div",
|
|
17001
|
+
T("div", WR, [
|
|
17002
|
+
T("div", VR, [
|
|
17081
17003
|
(B(), G(ot, null, zi(9, (d) => T("div", {
|
|
17082
17004
|
key: d,
|
|
17083
17005
|
class: "mx-1 w-[10%] bg-muted-300 dark:bg-muted-900 h-2.5 rounded-md"
|
|
@@ -17086,23 +17008,27 @@ const ei = (l, e) => {
|
|
|
17086
17008
|
])
|
|
17087
17009
|
], 2)), 64))
|
|
17088
17010
|
])) : Le("", !0),
|
|
17089
|
-
n.value ? (B(), G("div",
|
|
17090
|
-
T("h2",
|
|
17091
|
-
])) : Le("", !0)
|
|
17092
|
-
Ue(jR)
|
|
17011
|
+
n.value ? (B(), G("div", $R, [
|
|
17012
|
+
T("h2", GR, pe(r.$fcTr("not_load_or_existing_data")), 1)
|
|
17013
|
+
])) : Le("", !0)
|
|
17093
17014
|
], 64));
|
|
17094
17015
|
}
|
|
17095
|
-
},
|
|
17096
|
-
const
|
|
17016
|
+
}, jR = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLXgiPjxwYXRoIGQ9Ik0xOCA2IDYgMTgiLz48cGF0aCBkPSJtNiA2IDEyIDEyIi8+PC9zdmc+";
|
|
17017
|
+
const ei = (l, e) => {
|
|
17018
|
+
const t = l.__vccOpts || l;
|
|
17019
|
+
for (const [i, n] of e)
|
|
17020
|
+
t[i] = n;
|
|
17021
|
+
return t;
|
|
17022
|
+
}, KR = {
|
|
17097
17023
|
key: 0,
|
|
17098
17024
|
class: "w-full rounded-lg bg-white shadow-secondary-1 shadow-lg border border-muted-300 dark:bg-surface-dark"
|
|
17099
|
-
},
|
|
17025
|
+
}, qR = { class: "border-b-2 flex justify-between border--100 px-6 py-3 text-surface dark:border-white/10 dark:text-white" }, XR = {
|
|
17100
17026
|
key: 0,
|
|
17101
17027
|
class: "text-primerr-700"
|
|
17102
|
-
},
|
|
17028
|
+
}, YR = {
|
|
17103
17029
|
key: 1,
|
|
17104
17030
|
class: "text-primerr-700"
|
|
17105
|
-
},
|
|
17031
|
+
}, JR = ["src"], ZR = { class: "p-6" }, QR = { class: "flex justify-end p-3 bg-gray-100 rounded-lg" }, e_ = {
|
|
17106
17032
|
__name: "MTabForm",
|
|
17107
17033
|
setup(l) {
|
|
17108
17034
|
const e = qe("store");
|
|
@@ -17111,18 +17037,18 @@ const e_ = {
|
|
|
17111
17037
|
appear: ""
|
|
17112
17038
|
}, {
|
|
17113
17039
|
default: Ke(() => [
|
|
17114
|
-
K(e).dialog ? (B(), G("div",
|
|
17115
|
-
T("div",
|
|
17116
|
-
K(e).isEditing ? (B(), G("b",
|
|
17040
|
+
K(e).dialog ? (B(), G("div", KR, [
|
|
17041
|
+
T("div", qR, [
|
|
17042
|
+
K(e).isEditing ? (B(), G("b", XR, pe(t.$fcTr("edit")), 1)) : (B(), G("b", YR, pe(t.$fcTr("add")), 1)),
|
|
17117
17043
|
T("img", {
|
|
17118
17044
|
style: { "max-width": "18px", cursor: "pointer" },
|
|
17119
|
-
src: K(
|
|
17045
|
+
src: K(jR),
|
|
17120
17046
|
onClick: i[0] || (i[0] = (n) => K(e).dialog = !1)
|
|
17121
|
-
}, null, 8,
|
|
17047
|
+
}, null, 8, JR)
|
|
17122
17048
|
]),
|
|
17123
|
-
T("div",
|
|
17049
|
+
T("div", ZR, [
|
|
17124
17050
|
Qt(t.$slots, "default", {}, void 0, !0),
|
|
17125
|
-
T("div",
|
|
17051
|
+
T("div", QR, [
|
|
17126
17052
|
Qt(t.$slots, "actions", {}, void 0, !0)
|
|
17127
17053
|
])
|
|
17128
17054
|
])
|
|
@@ -17131,7 +17057,7 @@ const e_ = {
|
|
|
17131
17057
|
_: 3
|
|
17132
17058
|
}));
|
|
17133
17059
|
}
|
|
17134
|
-
},
|
|
17060
|
+
}, t_ = /* @__PURE__ */ ei(e_, [["__scopeId", "data-v-305ba86b"]]), i_ = { class: "flex flex-col text-right mt-4" }, n_ = { class: "mb-5" }, s_ = {
|
|
17135
17061
|
__name: "FormCore",
|
|
17136
17062
|
setup(l) {
|
|
17137
17063
|
const e = qe("store"), t = ye(null), i = () => {
|
|
@@ -17150,8 +17076,8 @@ const e_ = {
|
|
|
17150
17076
|
n();
|
|
17151
17077
|
}), (r, a) => {
|
|
17152
17078
|
const u = Md("Vueform");
|
|
17153
|
-
return B(), G("div",
|
|
17154
|
-
T("div",
|
|
17079
|
+
return B(), G("div", i_, [
|
|
17080
|
+
T("div", n_, [
|
|
17155
17081
|
Ue(u, is({
|
|
17156
17082
|
modelValue: K(e).form,
|
|
17157
17083
|
"onUpdate:modelValue": a[0] || (a[0] = (d) => K(e).form = d)
|
|
@@ -17167,44 +17093,44 @@ const e_ = {
|
|
|
17167
17093
|
};
|
|
17168
17094
|
}
|
|
17169
17095
|
};
|
|
17170
|
-
const
|
|
17096
|
+
const r_ = { class: "fixed z-50 inset-0 overflow-hidden pointer-events-none" }, o_ = { class: "text-lg font-semibold text-gray-900 flex items-center gap-2 pointer-events-none" }, a_ = {
|
|
17171
17097
|
key: 0,
|
|
17172
17098
|
class: "text-sm text-gray-500 font-normal"
|
|
17173
|
-
},
|
|
17099
|
+
}, l_ = { class: "flex items-center gap-1 pointer-events-auto" }, h_ = ["title"], u_ = {
|
|
17174
17100
|
class: "w-4 h-4 text-gray-600 group-hover:text-blue-600",
|
|
17175
17101
|
fill: "none",
|
|
17176
17102
|
stroke: "currentColor",
|
|
17177
17103
|
viewBox: "0 0 24 24"
|
|
17178
|
-
},
|
|
17104
|
+
}, d_ = {
|
|
17179
17105
|
key: 0,
|
|
17180
17106
|
"stroke-linecap": "round",
|
|
17181
17107
|
"stroke-linejoin": "round",
|
|
17182
17108
|
"stroke-width": "2",
|
|
17183
17109
|
d: "M20 12H4"
|
|
17184
|
-
},
|
|
17110
|
+
}, c_ = {
|
|
17185
17111
|
key: 1,
|
|
17186
17112
|
"stroke-linecap": "round",
|
|
17187
17113
|
"stroke-linejoin": "round",
|
|
17188
17114
|
"stroke-width": "2",
|
|
17189
17115
|
d: "M5 15l7-7 7 7"
|
|
17190
|
-
},
|
|
17116
|
+
}, f_ = ["title"], p_ = {
|
|
17191
17117
|
class: "w-4 h-4 text-gray-600 group-hover:text-green-600",
|
|
17192
17118
|
fill: "none",
|
|
17193
17119
|
stroke: "currentColor",
|
|
17194
17120
|
viewBox: "0 0 24 24"
|
|
17195
|
-
},
|
|
17121
|
+
}, g_ = {
|
|
17196
17122
|
key: 0,
|
|
17197
17123
|
"stroke-linecap": "round",
|
|
17198
17124
|
"stroke-linejoin": "round",
|
|
17199
17125
|
"stroke-width": "2",
|
|
17200
17126
|
d: "M4 8V6a2 2 0 012-2h2M4 16v2a2 2 0 002 2h2m8-16h2a2 2 0 012 2v2m-4 12h2a2 2 0 002-2v-2"
|
|
17201
|
-
},
|
|
17127
|
+
}, m_ = {
|
|
17202
17128
|
key: 1,
|
|
17203
17129
|
"stroke-linecap": "round",
|
|
17204
17130
|
"stroke-linejoin": "round",
|
|
17205
17131
|
"stroke-width": "2",
|
|
17206
17132
|
d: "M9 9h6v6H9V9zm0 0V7a2 2 0 012-2h2a2 2 0 012 2v2M9 15v2a2 2 0 002 2h2a2 2 0 002-2v-2"
|
|
17207
|
-
},
|
|
17133
|
+
}, b_ = { class: "flex-shrink-0 bg-gray-50 px-4 py-3 border-t border-gray-200 rounded-b-xl" }, v_ = { class: "flex justify-end gap-2" }, w_ = {
|
|
17208
17134
|
__name: "TailwindDialog",
|
|
17209
17135
|
props: {
|
|
17210
17136
|
title: { default: "" },
|
|
@@ -17340,7 +17266,7 @@ const c_ = { class: "fixed z-50 inset-0 overflow-hidden pointer-events-none" },
|
|
|
17340
17266
|
class: "fixed inset-0 bg-black bg-opacity-30 transition-opacity backdrop-blur-sm",
|
|
17341
17267
|
onClick: L
|
|
17342
17268
|
})),
|
|
17343
|
-
T("div",
|
|
17269
|
+
T("div", r_, [
|
|
17344
17270
|
T("div", {
|
|
17345
17271
|
ref_key: "dialogRef",
|
|
17346
17272
|
ref: n,
|
|
@@ -17363,7 +17289,7 @@ const c_ = { class: "fixed z-50 inset-0 overflow-hidden pointer-events-none" },
|
|
|
17363
17289
|
onMousedown: z,
|
|
17364
17290
|
onDblclick: $[0] || ($[0] = (be) => p.value ? H() : N())
|
|
17365
17291
|
}, [
|
|
17366
|
-
T("h3",
|
|
17292
|
+
T("h3", o_, [
|
|
17367
17293
|
T("div", {
|
|
17368
17294
|
class: Ie([
|
|
17369
17295
|
"w-2 h-2 rounded-full",
|
|
@@ -17371,28 +17297,28 @@ const c_ = { class: "fixed z-50 inset-0 overflow-hidden pointer-events-none" },
|
|
|
17371
17297
|
])
|
|
17372
17298
|
}, null, 2),
|
|
17373
17299
|
ur(" " + pe(i.title) + " ", 1),
|
|
17374
|
-
p.value ? (B(), G("span",
|
|
17300
|
+
p.value ? (B(), G("span", a_, "(minimized)")) : Le("", !0)
|
|
17375
17301
|
]),
|
|
17376
|
-
T("div",
|
|
17302
|
+
T("div", l_, [
|
|
17377
17303
|
T("button", {
|
|
17378
17304
|
onClick: H,
|
|
17379
17305
|
class: "p-1.5 rounded-full hover:bg-white/70 transition-colors group",
|
|
17380
17306
|
title: p.value ? "Restore" : "Minimize"
|
|
17381
17307
|
}, [
|
|
17382
|
-
(B(), G("svg",
|
|
17383
|
-
p.value ? (B(), G("path",
|
|
17308
|
+
(B(), G("svg", u_, [
|
|
17309
|
+
p.value ? (B(), G("path", c_)) : (B(), G("path", d_))
|
|
17384
17310
|
]))
|
|
17385
|
-
], 8,
|
|
17311
|
+
], 8, h_),
|
|
17386
17312
|
p.value ? Le("", !0) : (B(), G("button", {
|
|
17387
17313
|
key: 0,
|
|
17388
17314
|
onClick: N,
|
|
17389
17315
|
class: "p-1.5 rounded-full hover:bg-white/70 transition-colors group",
|
|
17390
17316
|
title: v.value ? "Restore" : "Maximize"
|
|
17391
17317
|
}, [
|
|
17392
|
-
(B(), G("svg",
|
|
17393
|
-
v.value ? (B(), G("path",
|
|
17318
|
+
(B(), G("svg", p_, [
|
|
17319
|
+
v.value ? (B(), G("path", m_)) : (B(), G("path", g_))
|
|
17394
17320
|
]))
|
|
17395
|
-
], 8,
|
|
17321
|
+
], 8, f_)),
|
|
17396
17322
|
T("button", {
|
|
17397
17323
|
onClick: L,
|
|
17398
17324
|
class: "p-1.5 rounded-full hover:bg-red-100 transition-colors group",
|
|
@@ -17427,8 +17353,8 @@ const c_ = { class: "fixed z-50 inset-0 overflow-hidden pointer-events-none" },
|
|
|
17427
17353
|
}, [
|
|
17428
17354
|
Qt(V.$slots, "default", {}, void 0, !0)
|
|
17429
17355
|
], 4),
|
|
17430
|
-
T("div",
|
|
17431
|
-
T("div",
|
|
17356
|
+
T("div", b_, [
|
|
17357
|
+
T("div", v_, [
|
|
17432
17358
|
Qt(V.$slots, "actions", {}, () => [
|
|
17433
17359
|
T("button", {
|
|
17434
17360
|
type: "button",
|
|
@@ -17468,12 +17394,12 @@ const c_ = { class: "fixed z-50 inset-0 overflow-hidden pointer-events-none" },
|
|
|
17468
17394
|
_: 3
|
|
17469
17395
|
}));
|
|
17470
17396
|
}
|
|
17471
|
-
},
|
|
17472
|
-
const
|
|
17397
|
+
}, y_ = /* @__PURE__ */ ei(w_, [["__scopeId", "data-v-cc2284ca"]]);
|
|
17398
|
+
const C_ = {
|
|
17473
17399
|
__name: "MDialogForm",
|
|
17474
17400
|
setup(l) {
|
|
17475
17401
|
const e = qe("store");
|
|
17476
|
-
return (t, i) => (B(), Zt(
|
|
17402
|
+
return (t, i) => (B(), Zt(y_, {
|
|
17477
17403
|
modelValue: K(e).dialog,
|
|
17478
17404
|
"onUpdate:modelValue": i[0] || (i[0] = (n) => K(e).dialog = n),
|
|
17479
17405
|
title: K(e).isEditing ? t.$fcTr("edit") : t.$fcTr("add")
|
|
@@ -17487,15 +17413,15 @@ const S_ = {
|
|
|
17487
17413
|
_: 3
|
|
17488
17414
|
}, 8, ["modelValue", "title"]));
|
|
17489
17415
|
}
|
|
17490
|
-
}, xd = /* @__PURE__ */ ei(
|
|
17491
|
-
function
|
|
17416
|
+
}, xd = /* @__PURE__ */ ei(C_, [["__scopeId", "data-v-3c50400f"]]);
|
|
17417
|
+
function E_(l, e) {
|
|
17492
17418
|
return Array.isArray(l) ? U.every(l, (t) => U.isType(t, e)) : !1;
|
|
17493
17419
|
}
|
|
17494
|
-
const
|
|
17420
|
+
const x_ = (l, e) => {
|
|
17495
17421
|
const t = U.get(l, "field"), i = U.get(l, "valueProp");
|
|
17496
|
-
return
|
|
17497
|
-
}, Fc = (l, e) => U.get(e, l.field),
|
|
17498
|
-
select:
|
|
17422
|
+
return E_(e, "object") ? e.map((n) => U.get(n, i)) : U.get(e, t);
|
|
17423
|
+
}, Fc = (l, e) => U.get(e, l.field), R_ = {
|
|
17424
|
+
select: x_,
|
|
17499
17425
|
text: Fc
|
|
17500
17426
|
};
|
|
17501
17427
|
function Oc(l, e = "", t = {}) {
|
|
@@ -17505,21 +17431,95 @@ function Oc(l, e = "", t = {}) {
|
|
|
17505
17431
|
}
|
|
17506
17432
|
return t;
|
|
17507
17433
|
}
|
|
17508
|
-
const
|
|
17434
|
+
const __ = (l, e) => {
|
|
17509
17435
|
if (typeof l.normalizer == "function")
|
|
17510
17436
|
return l.normalizer(e);
|
|
17511
17437
|
const t = Oc(l);
|
|
17512
17438
|
if (typeof t.value == "function")
|
|
17513
17439
|
return t.value(e);
|
|
17514
|
-
const i =
|
|
17440
|
+
const i = R_[l.type];
|
|
17515
17441
|
return i ? i(l, e) : Fc(l, e);
|
|
17516
17442
|
};
|
|
17443
|
+
const T_ = {
|
|
17444
|
+
key: 0,
|
|
17445
|
+
id: "paginate"
|
|
17446
|
+
}, M_ = { class: "flex items-center justify-center py-2 lg:px-0 sm:px-6 px-4" }, S_ = { class: "lg:w-5/5 bg-white w-full flex items-center justify-between rounded-lg border pb-3" }, k_ = { class: "sm:flex hidden mx-auto" }, L_ = ["onClick"], D_ = {
|
|
17447
|
+
__name: "MTablePagination",
|
|
17448
|
+
setup(l) {
|
|
17449
|
+
const e = qe("store");
|
|
17450
|
+
function t(u) {
|
|
17451
|
+
e.paginate(u);
|
|
17452
|
+
}
|
|
17453
|
+
function i() {
|
|
17454
|
+
e.mainPagination.currentPage > 1 && t(e.mainPagination.currentPage - 1);
|
|
17455
|
+
}
|
|
17456
|
+
function n(u) {
|
|
17457
|
+
t(u);
|
|
17458
|
+
}
|
|
17459
|
+
function r() {
|
|
17460
|
+
e.mainPagination.currentPage < e.mainPagination.lastPage && t(e.mainPagination.currentPage + 1);
|
|
17461
|
+
}
|
|
17462
|
+
function a() {
|
|
17463
|
+
let u = [];
|
|
17464
|
+
if (e.mainPagination.lastPage > 10) {
|
|
17465
|
+
let d = e.mainPagination.currentPage, f = d - 1, p = d + 1;
|
|
17466
|
+
d != 1 && u.push(1), d != 1 && d != 2 && f != 2 && u.push("..."), f > 1 && u.push(f), u.push(d), p < e.mainPagination.lastPage && u.push(p), d != e.mainPagination.lastPage && d != e.mainPagination.lastPage - 1 && p != e.mainPagination.lastPage - 1 && u.push("..."), e.mainPagination.lastPage != d && u.push(e.mainPagination.lastPage);
|
|
17467
|
+
} else
|
|
17468
|
+
u = e.mainPagination.lastPage;
|
|
17469
|
+
return u;
|
|
17470
|
+
}
|
|
17471
|
+
return (u, d) => K(e).mainPagination.lastPage ? (B(), G("div", T_, [
|
|
17472
|
+
T("div", M_, [
|
|
17473
|
+
T("div", S_, [
|
|
17474
|
+
T("div", k_, [
|
|
17475
|
+
T("div", {
|
|
17476
|
+
onClick: i,
|
|
17477
|
+
class: "flex items-center px-2 pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"
|
|
17478
|
+
}, d[0] || (d[0] = [
|
|
17479
|
+
T("svg", {
|
|
17480
|
+
class: "rtl:rotate-180 w-[10px] fill-muted-600",
|
|
17481
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17482
|
+
viewBox: "0 0 320 512"
|
|
17483
|
+
}, [
|
|
17484
|
+
T("path", { d: "M15 239c-9.4 9.4-9.4 24.6 0 33.9L207 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L65.9 256 241 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L15 239z" })
|
|
17485
|
+
], -1)
|
|
17486
|
+
])),
|
|
17487
|
+
(B(!0), G(ot, null, zi(a(), (f) => (B(), G(ot, { key: f }, [
|
|
17488
|
+
typeof f == "number" ? (B(), G("p", {
|
|
17489
|
+
key: 0,
|
|
17490
|
+
class: Ie(
|
|
17491
|
+
K(e).mainPagination.currentPage === f ? "text-sm font-medium leading-none cursor-pointer text-indigo-700 !border-indigo-400 border-t-[1px] pt-3 mr-4 px-2" : "text-sm font-medium leading-none cursor-pointer text-gray-600 hover:text-indigo-700 border-t-[1px] border-transparent hover:border-indigo-400 pt-3 mr-4 px-2"
|
|
17492
|
+
),
|
|
17493
|
+
onClick: (p) => n(f)
|
|
17494
|
+
}, pe(f), 11, L_)) : (B(), G("p", {
|
|
17495
|
+
key: 1,
|
|
17496
|
+
class: Ie(["text-sm font-medium leading-none text-gray-600 pt-3 px-2", { "mr-4": a() > 1 }])
|
|
17497
|
+
}, pe(f), 3))
|
|
17498
|
+
], 64))), 128)),
|
|
17499
|
+
T("div", {
|
|
17500
|
+
onClick: r,
|
|
17501
|
+
class: "flex items-center px-2 pt-3 text-gray-600 hover:text-indigo-700 cursor-pointer"
|
|
17502
|
+
}, d[1] || (d[1] = [
|
|
17503
|
+
T("svg", {
|
|
17504
|
+
class: "ltr:rotate-180 w-[10px] fill-muted-600",
|
|
17505
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17506
|
+
viewBox: "0 0 320 512"
|
|
17507
|
+
}, [
|
|
17508
|
+
T("path", { d: "M15 239c-9.4 9.4-9.4 24.6 0 33.9L207 465c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L65.9 256 241 81c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L15 239z" })
|
|
17509
|
+
], -1)
|
|
17510
|
+
]))
|
|
17511
|
+
])
|
|
17512
|
+
])
|
|
17513
|
+
])
|
|
17514
|
+
])) : Le("", !0);
|
|
17515
|
+
}
|
|
17516
|
+
}, A_ = /* @__PURE__ */ ei(D_, [["__scopeId", "data-v-7f626758"]]);
|
|
17517
17517
|
const F_ = ["disabled"], O_ = { key: 0 }, P_ = { key: 1 }, z_ = { key: 2 }, H_ = { class: "w-full" }, I_ = {
|
|
17518
17518
|
__name: "MList",
|
|
17519
17519
|
setup(l) {
|
|
17520
17520
|
const e = qe("store"), t = qe("tableComponent"), i = qe("form.save.key"), n = Fi(() => {
|
|
17521
17521
|
const d = {
|
|
17522
|
-
tab:
|
|
17522
|
+
tab: t_,
|
|
17523
17523
|
dialog: xd
|
|
17524
17524
|
};
|
|
17525
17525
|
return U.get(d, e.options.formMode) || xd;
|
|
@@ -17530,7 +17530,7 @@ const F_ = ["disabled"], O_ = { key: 0 }, P_ = { key: 1 }, z_ = { key: 2 }, H_ =
|
|
|
17530
17530
|
const a = (d) => {
|
|
17531
17531
|
let f = { ...d };
|
|
17532
17532
|
for (const p of e.flatFieldsWithoutActions)
|
|
17533
|
-
f[p.field] =
|
|
17533
|
+
f[p.field] = __(p, d);
|
|
17534
17534
|
return f;
|
|
17535
17535
|
};
|
|
17536
17536
|
return (() => {
|
|
@@ -17573,12 +17573,13 @@ const F_ = ["disabled"], O_ = { key: 0 }, P_ = { key: 1 }, z_ = { key: 2 }, H_ =
|
|
|
17573
17573
|
}, pe(d.$fcTr("cancel")), 1)
|
|
17574
17574
|
]),
|
|
17575
17575
|
default: Ke(() => [
|
|
17576
|
-
Ue(
|
|
17576
|
+
Ue(s_)
|
|
17577
17577
|
]),
|
|
17578
17578
|
_: 1
|
|
17579
17579
|
})),
|
|
17580
17580
|
T("div", H_, [
|
|
17581
|
-
(B(), Zt(Wu(K(t) ||
|
|
17581
|
+
(B(), Zt(Wu(K(t) || UR), Ld(Dd(r())), null, 16)),
|
|
17582
|
+
Ue(A_)
|
|
17582
17583
|
])
|
|
17583
17584
|
], 64));
|
|
17584
17585
|
}
|