doph-js 0.4.72 → 0.4.74
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/dophJs.css +1 -1
- package/dist/dophJs.js +367 -355
- package/dist/dophJs.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/dophJs.js
CHANGED
|
@@ -125,7 +125,7 @@ const _e = (r, e) => {
|
|
|
125
125
|
t("click", g);
|
|
126
126
|
}, l = (g) => {
|
|
127
127
|
t("contextmenu", g);
|
|
128
|
-
}, d = P(() => n.scale === "large" ? "button-lg" : n.scale === "small" ? "button-sm" : ""), v = P(() => n.disabled ? "disabled" : ""),
|
|
128
|
+
}, d = P(() => n.scale === "large" ? "button-lg" : n.scale === "small" ? "button-sm" : ""), v = P(() => n.disabled ? "disabled" : ""), p = (g) => !!a[g], _ = P(() => p("default") ? "" : n.scale === "large" ? "d-button-lg-icon" : n.scale === "small" ? "d-button-sm-icon" : "d-button-icon"), $ = P(() => {
|
|
129
129
|
const g = n.outline ? "-outline" : "";
|
|
130
130
|
return n.type === "primary" ? `button${g}-blue` : n.type === "success" ? `button${g}-green` : n.type === "error" ? `button${g}-red` : n.type === "warning" ? `button${g}-orange` : n.type === "wait" ? `button${g}-violet` : n.outline ? `button${g}` : "";
|
|
131
131
|
});
|
|
@@ -363,10 +363,10 @@ const _e = (r, e) => {
|
|
|
363
363
|
}), n = (l, d) => {
|
|
364
364
|
const { width: v } = getComputedStyle(l);
|
|
365
365
|
l.style.width = v, l.style.position = "absolute", l.style.visibility = "hidden", l.style.height = "";
|
|
366
|
-
let { height:
|
|
367
|
-
return l.style.width = d.width, l.style.position = d.position, l.style.visibility = d.visibility, l.style.height = lt, l.style.overflow = "hidden", d.height && d.height !== lt ? d.height :
|
|
368
|
-
}, a = (l, d, v,
|
|
369
|
-
const $ = l.animate(
|
|
366
|
+
let { height: p } = getComputedStyle(l);
|
|
367
|
+
return l.style.width = d.width, l.style.position = d.position, l.style.visibility = d.visibility, l.style.height = lt, l.style.overflow = "hidden", d.height && d.height !== lt ? d.height : p;
|
|
368
|
+
}, a = (l, d, v, p, _) => {
|
|
369
|
+
const $ = l.animate(p, _);
|
|
370
370
|
l.style.height = d.height, $.onfinish = () => {
|
|
371
371
|
l.style.overflow = d.overflow, v();
|
|
372
372
|
};
|
|
@@ -392,13 +392,13 @@ const _e = (r, e) => {
|
|
|
392
392
|
marginBottom: d.marginBottom
|
|
393
393
|
}
|
|
394
394
|
], s = (l, d) => {
|
|
395
|
-
const v = l,
|
|
396
|
-
a(v,
|
|
395
|
+
const v = l, p = t(v), _ = n(v, p), $ = o(_, p), E = { duration: e.duration, easing: e.easingEnter };
|
|
396
|
+
a(v, p, d, $, E);
|
|
397
397
|
}, i = (l, d) => {
|
|
398
|
-
const v = l,
|
|
398
|
+
const v = l, p = t(v), { height: _ } = getComputedStyle(v);
|
|
399
399
|
v.style.height = _, v.style.overflow = "hidden";
|
|
400
|
-
const $ = o(_,
|
|
401
|
-
a(v,
|
|
400
|
+
const $ = o(_, p).reverse(), E = { duration: e.duration, easing: e.easingLeave };
|
|
401
|
+
a(v, p, d, $, E);
|
|
402
402
|
};
|
|
403
403
|
return (l, d) => (c(), H(qn, {
|
|
404
404
|
css: !1,
|
|
@@ -510,7 +510,7 @@ const _e = (r, e) => {
|
|
|
510
510
|
}
|
|
511
511
|
}, v = (y) => {
|
|
512
512
|
e("nodefoldericonclick", { event: y.event, model: y.model });
|
|
513
|
-
},
|
|
513
|
+
}, p = (y) => {
|
|
514
514
|
e("nodeclick", y);
|
|
515
515
|
}, _ = (y) => {
|
|
516
516
|
e("nodedoubleclick", y);
|
|
@@ -546,7 +546,7 @@ const _e = (r, e) => {
|
|
|
546
546
|
R > K && R <= K + q ? (a.value = !1, o.value = !0, s.value = !1) : R < K + ne && R >= K + ne - q ? (a.value = !1, o.value = !1, s.value = !0) : (a.value = te.state.trees[t.treeId].dropInside, o.value = !1, s.value = !1);
|
|
547
547
|
}, f = () => {
|
|
548
548
|
a.value = !1, o.value = !1, s.value = !1;
|
|
549
|
-
}, u = P(() => t.model.title.startsWith("-")),
|
|
549
|
+
}, u = P(() => t.model.title.startsWith("-")), m = P(() => {
|
|
550
550
|
if (t.model.title.startsWith("-")) {
|
|
551
551
|
let [y, ...D] = t.model.title.split(" ");
|
|
552
552
|
return D = D.join(" "), D;
|
|
@@ -555,8 +555,8 @@ const _e = (r, e) => {
|
|
|
555
555
|
});
|
|
556
556
|
return (y, D) => {
|
|
557
557
|
const R = mt("d-tree-item", !0), K = Un("touch");
|
|
558
|
-
return Q(te).actions.beforeItem(t.treeId, r.model) ? u.value && !
|
|
559
|
-
T("div", _o, G(Q(te).actions.renderTitle(t.treeId,
|
|
558
|
+
return Q(te).actions.beforeItem(t.treeId, r.model) ? u.value && !m.value ? (c(), w("li", wo, ko)) : u.value && m.value ? (c(), w("li", So, [
|
|
559
|
+
T("div", _o, G(Q(te).actions.renderTitle(t.treeId, m.value)), 1)
|
|
560
560
|
])) : t.model.component ? (c(), H(Sr, {
|
|
561
561
|
key: 3,
|
|
562
562
|
tag: "li",
|
|
@@ -675,7 +675,7 @@ const _e = (r, e) => {
|
|
|
675
675
|
treeId: t.treeId,
|
|
676
676
|
items: t.items,
|
|
677
677
|
search: t.search,
|
|
678
|
-
onNodeclick:
|
|
678
|
+
onNodeclick: p,
|
|
679
679
|
onNodedoubleclick: _,
|
|
680
680
|
onNodedrop: $,
|
|
681
681
|
onNodecontext: E,
|
|
@@ -852,18 +852,18 @@ const Ze = Vo(), te = {
|
|
|
852
852
|
emits: Object.keys(We),
|
|
853
853
|
setup(r, { expose: e, emit: t }) {
|
|
854
854
|
let n = hn({});
|
|
855
|
-
const a = I("false"), o = I(null), s = /* @__PURE__ */ new Set(), i = P(() => a.value && n), l = (v,
|
|
856
|
-
n = ln.data, t(v,
|
|
855
|
+
const a = I("false"), o = I(null), s = /* @__PURE__ */ new Set(), i = P(() => a.value && n), l = (v, p) => {
|
|
856
|
+
n = ln.data, t(v, p, n), v === We.dragenter && (s.size || p.target === o.value) && s.add(p.target), v === We.dragleave && s.delete(p.target), v === We.drop && s.clear(), a.value = !!s.size;
|
|
857
857
|
};
|
|
858
858
|
return e({
|
|
859
859
|
elementSize: () => Kr(o)
|
|
860
|
-
}), (v,
|
|
860
|
+
}), (v, p) => (c(), H(Ae(r.tag), {
|
|
861
861
|
ref_key: "el",
|
|
862
862
|
ref: o,
|
|
863
|
-
onDragenter:
|
|
864
|
-
onDragleave:
|
|
865
|
-
onDragover:
|
|
866
|
-
onDrop:
|
|
863
|
+
onDragenter: p[0] || (p[0] = (_) => l(Q(We).dragenter, _)),
|
|
864
|
+
onDragleave: p[1] || (p[1] = (_) => l(Q(We).dragleave, _)),
|
|
865
|
+
onDragover: p[2] || (p[2] = Ce((_) => l(Q(We).dragover, _), ["prevent"])),
|
|
866
|
+
onDrop: p[3] || (p[3] = Ce((_) => l(Q(We).drop, _), ["prevent"]))
|
|
867
867
|
}, {
|
|
868
868
|
default: Y(() => [
|
|
869
869
|
se(v.$slots, "default", { transferData: i.value })
|
|
@@ -909,7 +909,7 @@ const Ze = Vo(), te = {
|
|
|
909
909
|
Ze.on("menu-show-request", (u) => {
|
|
910
910
|
a !== u && l();
|
|
911
911
|
});
|
|
912
|
-
const v = () => o.value.elementSize(),
|
|
912
|
+
const v = () => o.value.elementSize(), p = () => o.value?.itemsCount(), _ = (u) => {
|
|
913
913
|
o.value?.selectNode(u);
|
|
914
914
|
}, $ = () => {
|
|
915
915
|
o.value?.unSelect();
|
|
@@ -921,7 +921,7 @@ const Ze = Vo(), te = {
|
|
|
921
921
|
setTimeout(() => {
|
|
922
922
|
const u = o.value?.$el;
|
|
923
923
|
if (!u) return;
|
|
924
|
-
const
|
|
924
|
+
const m = u.style.transform;
|
|
925
925
|
u.style.transform = "";
|
|
926
926
|
const y = u.getBoundingClientRect(), D = window.innerHeight, R = window.innerWidth;
|
|
927
927
|
let K = "";
|
|
@@ -929,7 +929,7 @@ const Ze = Vo(), te = {
|
|
|
929
929
|
const ne = y.right - R + 10;
|
|
930
930
|
K = K ? `${K} translateX(-${ne}px)` : `translateX(-${ne}px)`;
|
|
931
931
|
}
|
|
932
|
-
u.style.transform = K ||
|
|
932
|
+
u.style.transform = K || m;
|
|
933
933
|
}, 500);
|
|
934
934
|
};
|
|
935
935
|
e({
|
|
@@ -937,7 +937,7 @@ const Ze = Vo(), te = {
|
|
|
937
937
|
hide: l,
|
|
938
938
|
elementSize: v,
|
|
939
939
|
isShowed: d,
|
|
940
|
-
itemsCount:
|
|
940
|
+
itemsCount: p,
|
|
941
941
|
selectNode: _,
|
|
942
942
|
unSelect: $,
|
|
943
943
|
expandAll: E,
|
|
@@ -954,7 +954,7 @@ const Ze = Vo(), te = {
|
|
|
954
954
|
window.addEventListener("scroll", k, !0), window.addEventListener("resize", f);
|
|
955
955
|
}), vn(() => {
|
|
956
956
|
window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", f);
|
|
957
|
-
}), (u,
|
|
957
|
+
}), (u, m) => {
|
|
958
958
|
const y = Un("click-outside");
|
|
959
959
|
return n.bodyAsParent ? (c(), H(qr, {
|
|
960
960
|
key: 0,
|
|
@@ -1032,21 +1032,21 @@ const Ze = Vo(), te = {
|
|
|
1032
1032
|
const n = r, a = I(null), o = I(0), s = I(0), i = P(() => ({
|
|
1033
1033
|
left: o.value + "px",
|
|
1034
1034
|
top: s.value + "px"
|
|
1035
|
-
})), l = async (
|
|
1036
|
-
|
|
1035
|
+
})), l = async (p) => {
|
|
1036
|
+
p.preventDefault(), o.value = -1e4, s.value = -1e4, a.value.show(), await it(), await it();
|
|
1037
1037
|
const _ = a.value.elementSize(), $ = _.width;
|
|
1038
1038
|
document.querySelector(".context-menu"), a.value.collapseAll();
|
|
1039
1039
|
const E = window.innerWidth, g = window.innerHeight;
|
|
1040
|
-
o.value =
|
|
1040
|
+
o.value = p.clientX, s.value = p.clientY, p.clientX + $ > E && (o.value = p.clientX - $), p.clientY + _.height > g && (s.value = p.clientY - _.height), o.value = Math.max(2, Math.min(o.value, E - $ - 2)), s.value = Math.max(2, Math.min(s.value, g - _.height - 2));
|
|
1041
1041
|
}, d = () => {
|
|
1042
1042
|
a.value.hide();
|
|
1043
|
-
}, v = (
|
|
1044
|
-
t("select",
|
|
1043
|
+
}, v = (p) => {
|
|
1044
|
+
t("select", p);
|
|
1045
1045
|
};
|
|
1046
1046
|
return e({
|
|
1047
1047
|
show: l,
|
|
1048
1048
|
hide: d
|
|
1049
|
-
}), (
|
|
1049
|
+
}), (p, _) => (c(), H(Gt, {
|
|
1050
1050
|
ref_key: "dMenuRef",
|
|
1051
1051
|
ref: a,
|
|
1052
1052
|
onSelect: v,
|
|
@@ -1059,10 +1059,10 @@ const Ze = Vo(), te = {
|
|
|
1059
1059
|
"body-as-parent": n.bodyAsParent,
|
|
1060
1060
|
"delay-click": n.delayClick
|
|
1061
1061
|
}, yt({ _: 2 }, [
|
|
1062
|
-
we(
|
|
1062
|
+
we(p.$slots, ($, E) => ({
|
|
1063
1063
|
name: E,
|
|
1064
1064
|
fn: Y((g) => [
|
|
1065
|
-
se(
|
|
1065
|
+
se(p.$slots, E, vt(gt(g)), void 0, !0)
|
|
1066
1066
|
])
|
|
1067
1067
|
}))
|
|
1068
1068
|
]), 1032, ["items", "style", "render-item-title", "before-item", "body-as-parent", "delay-click"]));
|
|
@@ -1133,11 +1133,11 @@ const Ze = Vo(), te = {
|
|
|
1133
1133
|
t("move", V);
|
|
1134
1134
|
});
|
|
1135
1135
|
const d = P(() => n.search ? te.actions.deepSearchByTitle(n.items, n.search) : n.items), v = (V) => {
|
|
1136
|
-
|
|
1137
|
-
},
|
|
1136
|
+
p(n.items, V);
|
|
1137
|
+
}, p = (V, Z, U = "id", he = "children", ve = {}) => Z && V && (V.find((qe) => {
|
|
1138
1138
|
if (qe[U] === Z)
|
|
1139
1139
|
return ve.found = qe, qe.expanded = !0, !0;
|
|
1140
|
-
if (
|
|
1140
|
+
if (p(qe[he], Z, U, he, ve))
|
|
1141
1141
|
return qe.expanded = !0, !0;
|
|
1142
1142
|
}), ve.found) ? ve.found : !1, _ = (V = null) => {
|
|
1143
1143
|
te.mutations.setItemSelect(i, V.model), !n.doubleClickExpand && n.clickExpand && te.actions.toggleItem(i, V.model), t("select", V);
|
|
@@ -1155,8 +1155,8 @@ const Ze = Vo(), te = {
|
|
|
1155
1155
|
}, f = () => {
|
|
1156
1156
|
for (let V = 0; V < n.items.length; V++)
|
|
1157
1157
|
n.items[V].expanded = !1;
|
|
1158
|
-
}, u = () => i,
|
|
1159
|
-
|
|
1158
|
+
}, u = () => i, m = (V) => te.actions.deepSearch(n.items, V), y = (V) => {
|
|
1159
|
+
m(V) && te.mutations.setItemSelect(i, m(V));
|
|
1160
1160
|
}, D = () => {
|
|
1161
1161
|
te.mutations.unSelect(i);
|
|
1162
1162
|
}, R = (V) => {
|
|
@@ -1172,7 +1172,7 @@ const Ze = Vo(), te = {
|
|
|
1172
1172
|
expandAll: k,
|
|
1173
1173
|
collapseAll: f,
|
|
1174
1174
|
getId: u,
|
|
1175
|
-
getNode:
|
|
1175
|
+
getNode: m,
|
|
1176
1176
|
selectNode: y,
|
|
1177
1177
|
itemsCount: fe,
|
|
1178
1178
|
expandNode: v,
|
|
@@ -1278,8 +1278,8 @@ const Ze = Vo(), te = {
|
|
|
1278
1278
|
},
|
|
1279
1279
|
setup(r) {
|
|
1280
1280
|
const e = r, t = P(() => {
|
|
1281
|
-
const { fixed: n, zIndex: a, minWidth: o, height: s, paddingLeft: i, transitionDuration: l, transitionTimingFunction: d } = e, v = n ? "fixed" : "static",
|
|
1282
|
-
return `position:${v};z-index:${a};${
|
|
1281
|
+
const { fixed: n, zIndex: a, minWidth: o, height: s, paddingLeft: i, transitionDuration: l, transitionTimingFunction: d } = e, v = n ? "fixed" : "static", p = e.useMinWidthLayout ? `min-width:${o}px;` : "";
|
|
1282
|
+
return `position:${v};z-index:${a};${p}height:${s}px;padding-left:${i}px;transition-duration:${l}ms;transition-timing-function:${d};`;
|
|
1283
1283
|
});
|
|
1284
1284
|
return (n, a) => (c(), w("header", {
|
|
1285
1285
|
class: "d-layout-header",
|
|
@@ -1327,8 +1327,8 @@ const Ze = Vo(), te = {
|
|
|
1327
1327
|
},
|
|
1328
1328
|
setup(r) {
|
|
1329
1329
|
const e = r, t = P(() => {
|
|
1330
|
-
const { fixed: n, top: a, zIndex: o, minWidth: s, height: i, paddingLeft: l, transitionDuration: d, transitionTimingFunction: v } = e,
|
|
1331
|
-
return `position:${
|
|
1330
|
+
const { fixed: n, top: a, zIndex: o, minWidth: s, height: i, paddingLeft: l, transitionDuration: d, transitionTimingFunction: v } = e, p = n ? "fixed" : "static", _ = e.useMinWidthLayout ? `min-width: ${s}px;` : "";
|
|
1331
|
+
return `position:${p};top:${a}px;z-index:${o};${_}height:${i}px;padding-left:${l}px;transition-duration:${d}ms;transition-timing-function:${v};`;
|
|
1332
1332
|
});
|
|
1333
1333
|
return (n, a) => (c(), w("div", {
|
|
1334
1334
|
class: "d-layout-tab",
|
|
@@ -1372,8 +1372,8 @@ const Ze = Vo(), te = {
|
|
|
1372
1372
|
},
|
|
1373
1373
|
setup(r) {
|
|
1374
1374
|
const e = r, t = P(() => {
|
|
1375
|
-
const { fixed: n, zIndex: a, minWidth: o, height: s, paddingLeft: i, transitionDuration: l, transitionTimingFunction: d } = e, v = n ? "fixed" : "static",
|
|
1376
|
-
return `position:${v};z-index:${a};${
|
|
1375
|
+
const { fixed: n, zIndex: a, minWidth: o, height: s, paddingLeft: i, transitionDuration: l, transitionTimingFunction: d } = e, v = n ? "fixed" : "static", p = e.useMinWidthLayout ? `min-width:${o}px;` : "";
|
|
1376
|
+
return `position:${v};z-index:${a};${p}height:${s}px;padding-left:${i}px;transition-duration:${l}ms;transition-timing-function:${d};`;
|
|
1377
1377
|
});
|
|
1378
1378
|
return (n, a) => (c(), w("footer", {
|
|
1379
1379
|
class: "d-layout-footer",
|
|
@@ -1468,8 +1468,8 @@ function Wo(r) {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
function o() {
|
|
1470
1470
|
var v;
|
|
1471
|
-
const
|
|
1472
|
-
a(
|
|
1471
|
+
const p = ((v = document.scrollingElement) === null || v === void 0 ? void 0 : v.scrollLeft) || 0;
|
|
1472
|
+
a(p);
|
|
1473
1473
|
}
|
|
1474
1474
|
function s() {
|
|
1475
1475
|
o();
|
|
@@ -1581,35 +1581,35 @@ const qo = 1001, Uo = 999, Xo = 998, jm = {
|
|
|
1581
1581
|
emits: ["update:sidebar-collapse", "sidebar-mask-click"],
|
|
1582
1582
|
setup(r, { emit: e }) {
|
|
1583
1583
|
const t = r, n = P(() => t.useMinWidthLayout ? `min-width:${t.minWidth}px;` : ""), a = P(() => t.useMinWidthLayout && (t.fixedHeaderAndTab || t.fixedFooter)), o = Wo(a), s = P(() => t.fixedHeaderAndTab ? o.value : ""), i = P(() => t.fixedFooter ? o.value : ""), l = P(() => {
|
|
1584
|
-
const { transitionDuration:
|
|
1584
|
+
const { transitionDuration: m, transitionTimingFunction: y } = t;
|
|
1585
1585
|
return {
|
|
1586
|
-
transitionDuration:
|
|
1586
|
+
transitionDuration: m,
|
|
1587
1587
|
transitionTimingFunction: y
|
|
1588
1588
|
};
|
|
1589
|
-
}), d = P(() => t.mode === "vertical"), v = P(() => t.isMobile || d.value ? 1003 : 1e3),
|
|
1589
|
+
}), d = P(() => t.mode === "vertical"), v = P(() => t.isMobile || d.value ? 1003 : 1e3), p = P({
|
|
1590
1590
|
get() {
|
|
1591
1591
|
return t.sidebarCollapse;
|
|
1592
1592
|
},
|
|
1593
|
-
set(
|
|
1594
|
-
e("update:sidebar-collapse",
|
|
1593
|
+
set(m) {
|
|
1594
|
+
e("update:sidebar-collapse", m);
|
|
1595
1595
|
}
|
|
1596
1596
|
});
|
|
1597
1597
|
function _() {
|
|
1598
1598
|
e("sidebar-mask-click");
|
|
1599
1599
|
}
|
|
1600
|
-
const $ = P(() => t.isMobile && !
|
|
1601
|
-
const { transitionDuration:
|
|
1602
|
-
return `background-color:${t.maskBg};transition-duration:${
|
|
1600
|
+
const $ = P(() => t.isMobile && !p.value), E = P(() => {
|
|
1601
|
+
const { transitionDuration: m, transitionTimingFunction: y } = t;
|
|
1602
|
+
return `background-color:${t.maskBg};transition-duration:${m}ms;transition-timing-function:${y};`;
|
|
1603
1603
|
}), g = P(() => {
|
|
1604
|
-
const { sidebarWidth:
|
|
1604
|
+
const { sidebarWidth: m, sidebarCollapsedWidth: y } = t, D = t.isMobile ? 0 : y, R = p.value ? D : m;
|
|
1605
1605
|
return t.sidebarVisible ? R : 0;
|
|
1606
1606
|
}), C = P(() => t.isMobile ? 0 : g.value), b = P(() => d.value ? C.value : 0), k = P(
|
|
1607
1607
|
() => !t.isMobile && !d.value && t.headerVisible ? t.headerHeight : 0
|
|
1608
1608
|
), f = P(() => {
|
|
1609
|
-
let
|
|
1610
|
-
return t.fixedHeaderAndTab && (t.headerVisible && (
|
|
1609
|
+
let m = 0;
|
|
1610
|
+
return t.fixedHeaderAndTab && (t.headerVisible && (m += t.headerHeight), t.tabVisible && (m += t.tabHeight)), m;
|
|
1611
1611
|
}), u = P(() => t.fixedFooter && t.footerVisible ? t.footerHeight : 0);
|
|
1612
|
-
return (
|
|
1612
|
+
return (m, y) => (c(), w("div", {
|
|
1613
1613
|
class: "d-layout",
|
|
1614
1614
|
style: ue(n.value)
|
|
1615
1615
|
}, [
|
|
@@ -1622,7 +1622,7 @@ const qo = 1001, Uo = 999, Xo = 998, jm = {
|
|
|
1622
1622
|
style: s.value
|
|
1623
1623
|
}), {
|
|
1624
1624
|
default: Y(() => [
|
|
1625
|
-
se(
|
|
1625
|
+
se(m.$slots, "header")
|
|
1626
1626
|
]),
|
|
1627
1627
|
_: 3
|
|
1628
1628
|
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : O("", !0),
|
|
@@ -1636,7 +1636,7 @@ const qo = 1001, Uo = 999, Xo = 998, jm = {
|
|
|
1636
1636
|
style: s.value
|
|
1637
1637
|
}), {
|
|
1638
1638
|
default: Y(() => [
|
|
1639
|
-
se(
|
|
1639
|
+
se(m.$slots, "tab")
|
|
1640
1640
|
]),
|
|
1641
1641
|
_: 3
|
|
1642
1642
|
}, 16, ["fixed", "min-width", "top", "height", "padding-left", "style"])) : O("", !0),
|
|
@@ -1646,7 +1646,7 @@ const qo = 1001, Uo = 999, Xo = 998, jm = {
|
|
|
1646
1646
|
"padding-top": k.value
|
|
1647
1647
|
}), {
|
|
1648
1648
|
default: Y(() => [
|
|
1649
|
-
se(
|
|
1649
|
+
se(m.$slots, "sidebar")
|
|
1650
1650
|
]),
|
|
1651
1651
|
_: 3
|
|
1652
1652
|
}, 16, ["z-index", "width", "padding-top"])) : O("", !0),
|
|
@@ -1663,7 +1663,7 @@ const qo = 1001, Uo = 999, Xo = 998, jm = {
|
|
|
1663
1663
|
"overflow-hidden": r.addMainOverflowHidden
|
|
1664
1664
|
}), {
|
|
1665
1665
|
default: Y(() => [
|
|
1666
|
-
se(
|
|
1666
|
+
se(m.$slots, "default")
|
|
1667
1667
|
]),
|
|
1668
1668
|
_: 3
|
|
1669
1669
|
}, 16, ["padding-top", "padding-bottom", "padding-left", "overflow-hidden"]),
|
|
@@ -1676,7 +1676,7 @@ const qo = 1001, Uo = 999, Xo = 998, jm = {
|
|
|
1676
1676
|
style: i.value
|
|
1677
1677
|
}), {
|
|
1678
1678
|
default: Y(() => [
|
|
1679
|
-
se(
|
|
1679
|
+
se(m.$slots, "footer")
|
|
1680
1680
|
]),
|
|
1681
1681
|
_: 3
|
|
1682
1682
|
}, 16, ["fixed", "min-width", "height", "padding-left", "style"])) : O("", !0)
|
|
@@ -1758,27 +1758,39 @@ const qo = 1001, Uo = 999, Xo = 998, jm = {
|
|
|
1758
1758
|
},
|
|
1759
1759
|
setup(r, { expose: e }) {
|
|
1760
1760
|
const t = r;
|
|
1761
|
-
Xn((
|
|
1762
|
-
|
|
1763
|
-
|
|
1761
|
+
Xn((d) => ({
|
|
1762
|
+
"186b4372": a.value,
|
|
1763
|
+
"186b4370": o.value
|
|
1764
1764
|
}));
|
|
1765
1765
|
const n = I(null), a = P(() => t.xHide ? "hidden" : "visible"), o = P(() => t.yHide ? "hidden" : "visible");
|
|
1766
1766
|
return e({
|
|
1767
|
-
scrollDown: () => {
|
|
1767
|
+
scrollDown: (d = "smooth") => {
|
|
1768
1768
|
n.value && n.value.scrollTo({
|
|
1769
1769
|
top: n.value.scrollHeight,
|
|
1770
|
-
behavior:
|
|
1770
|
+
behavior: d
|
|
1771
1771
|
});
|
|
1772
|
+
},
|
|
1773
|
+
scrollToSelector: (d, v = { behavior: "smooth", block: "start" }) => {
|
|
1774
|
+
n.value && n.value.querySelector(d)?.scrollIntoView(v);
|
|
1775
|
+
},
|
|
1776
|
+
scrollToSelectorWithOffset: (d, v = 0) => {
|
|
1777
|
+
if (n.value) {
|
|
1778
|
+
const p = n.value.querySelector(d);
|
|
1779
|
+
p && n.value.scrollTo({
|
|
1780
|
+
top: p.offsetTop + v,
|
|
1781
|
+
behavior: "smooth"
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1772
1784
|
}
|
|
1773
|
-
}), (
|
|
1785
|
+
}), (d, v) => (c(), w("div", {
|
|
1774
1786
|
ref_key: "scrollRef",
|
|
1775
1787
|
ref: n,
|
|
1776
1788
|
class: oe(t.autoHide ? "d-scroll-hide" : "d-scroll")
|
|
1777
1789
|
}, [
|
|
1778
|
-
se(
|
|
1790
|
+
se(d.$slots, "default", {}, void 0, !0)
|
|
1779
1791
|
], 2));
|
|
1780
1792
|
}
|
|
1781
|
-
}, Um = /* @__PURE__ */ _e(Go, [["__scopeId", "data-v-
|
|
1793
|
+
}, Um = /* @__PURE__ */ _e(Go, [["__scopeId", "data-v-8bcd22f6"]]), Qo = { class: "modal-content" }, Ko = { class: "modal-header" }, Zo = { class: "modal-title" }, Jo = { class: "modal-body" }, es = { class: "modal-footer" }, dt = {
|
|
1782
1794
|
__name: "DModal",
|
|
1783
1795
|
props: {
|
|
1784
1796
|
show: Boolean,
|
|
@@ -1998,11 +2010,11 @@ const os = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
1998
2010
|
return;
|
|
1999
2011
|
}
|
|
2000
2012
|
o.value.show(), t("open"), _(), it(() => {
|
|
2001
|
-
document.addEventListener("click",
|
|
2013
|
+
document.addEventListener("click", p);
|
|
2002
2014
|
});
|
|
2003
2015
|
}, v = () => {
|
|
2004
|
-
o.value?.isShowed() && (o.value.hide(), document.removeEventListener("click",
|
|
2005
|
-
},
|
|
2016
|
+
o.value?.isShowed() && (o.value.hide(), document.removeEventListener("click", p));
|
|
2017
|
+
}, p = (b) => {
|
|
2006
2018
|
const k = b.target, f = s.value?.$el?.contains(k);
|
|
2007
2019
|
o.value?.$el?.contains(k) || f || v();
|
|
2008
2020
|
}, _ = () => {
|
|
@@ -2022,7 +2034,7 @@ const os = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
2022
2034
|
return Be(() => {
|
|
2023
2035
|
window.addEventListener("resize", $);
|
|
2024
2036
|
}), vn(() => {
|
|
2025
|
-
window.removeEventListener("resize", $), document.removeEventListener("click",
|
|
2037
|
+
window.removeEventListener("resize", $), document.removeEventListener("click", p);
|
|
2026
2038
|
}), (b, k) => (c(), w("div", us, [
|
|
2027
2039
|
F(pe, {
|
|
2028
2040
|
ref_key: "buttonRef",
|
|
@@ -2053,8 +2065,8 @@ const os = { style: { display: "flex", "flex-direction": "row", "justify-content
|
|
|
2053
2065
|
}, yt({ _: 2 }, [
|
|
2054
2066
|
we(b.$slots, (f, u) => ({
|
|
2055
2067
|
name: u,
|
|
2056
|
-
fn: Y((
|
|
2057
|
-
se(b.$slots, u, vt(gt(
|
|
2068
|
+
fn: Y((m) => [
|
|
2069
|
+
se(b.$slots, u, vt(gt(m)))
|
|
2058
2070
|
])
|
|
2059
2071
|
}))
|
|
2060
2072
|
]), 1032, ["items", "style", "render-item-title", "before-item", "delay-click"])
|
|
@@ -2287,12 +2299,12 @@ const Pn = "[-+]?[0-9]*.?[0-9]+", _r = [
|
|
|
2287
2299
|
const t = r, n = {
|
|
2288
2300
|
IDLE: 0,
|
|
2289
2301
|
DESTROYED: 2
|
|
2290
|
-
}, a = I([]), o = I(null), s = I(gs.get("velocity")), i = P(() => t.animationType === "velocity"), l = P(() => i.value ? _s : Ds), d = P(() => a.value.filter((q) => q.state !== n.DESTROYED)), v = P(() => ws(t.width)),
|
|
2302
|
+
}, a = I([]), o = I(null), s = I(gs.get("velocity")), i = P(() => t.animationType === "velocity"), l = P(() => i.value ? _s : Ds), d = P(() => a.value.filter((q) => q.state !== n.DESTROYED)), v = P(() => ws(t.width)), p = P(() => {
|
|
2291
2303
|
const { x: q, y: fe } = Ss(t.position), le = v.value.value, V = v.value.type, Z = {
|
|
2292
2304
|
width: le + V
|
|
2293
2305
|
};
|
|
2294
2306
|
return fe && (Z[fe] = "0px"), q && (q === "center" ? Z.left = `calc(50% - ${+le / 2}${V})` : Z[q] = "0px"), Z;
|
|
2295
|
-
}), _ = P(() => "bottom" in
|
|
2307
|
+
}), _ = P(() => "bottom" in p.value), $ = (q) => {
|
|
2296
2308
|
e("click", q), t.closeOnClick && u(q);
|
|
2297
2309
|
}, E = () => {
|
|
2298
2310
|
t.pauseOnHover && o.value?.pause();
|
|
@@ -2321,14 +2333,14 @@ const Pn = "[-+]?[0-9]*.?[0-9]+", _r = [
|
|
|
2321
2333
|
const J = d.value.some((L) => L.title === q.title && L.text === q.text);
|
|
2322
2334
|
(!V || !J) && (De ? (a.value.push(xe), e("start", xe), d.value.length > t.max && (Ue = 0)) : (a.value.unshift(xe), e("start", xe), d.value.length > t.max && (Ue = d.value.length - 1)), Ue !== -1 && u(d.value[Ue]));
|
|
2323
2335
|
}, b = (q) => {
|
|
2324
|
-
|
|
2336
|
+
m(q);
|
|
2325
2337
|
}, k = (q) => [
|
|
2326
2338
|
"d-notification-template",
|
|
2327
2339
|
t.classes,
|
|
2328
2340
|
q.type || ""
|
|
2329
2341
|
], f = (q) => i.value ? void 0 : { transition: `all ${q.speed}ms` }, u = (q) => {
|
|
2330
2342
|
clearTimeout(q.timer), q.state = n.DESTROYED, ne(), e("destroy", q);
|
|
2331
|
-
},
|
|
2343
|
+
}, m = (q) => {
|
|
2332
2344
|
const fe = a.value.find((le) => le.id === q);
|
|
2333
2345
|
fe && u(fe);
|
|
2334
2346
|
}, y = () => {
|
|
@@ -2360,7 +2372,7 @@ const Pn = "[-+]?[0-9]*.?[0-9]+", _r = [
|
|
|
2360
2372
|
Ze.on("notification-add", C), Ze.on("notification-close", b);
|
|
2361
2373
|
}), (q, fe) => (c(), w("div", {
|
|
2362
2374
|
class: "d-notification-group",
|
|
2363
|
-
style: ue(
|
|
2375
|
+
style: ue(p.value)
|
|
2364
2376
|
}, [
|
|
2365
2377
|
(c(), H(Ae(l.value), {
|
|
2366
2378
|
name: r.animationName,
|
|
@@ -2670,10 +2682,10 @@ var Ln = function() {
|
|
|
2670
2682
|
return Zr.Date.now();
|
|
2671
2683
|
}, ki = "Expected a function", Si = Math.max, _i = Math.min;
|
|
2672
2684
|
function Di(r, e, t) {
|
|
2673
|
-
var n, a, o, s, i, l, d = 0, v = !1,
|
|
2685
|
+
var n, a, o, s, i, l, d = 0, v = !1, p = !1, _ = !0;
|
|
2674
2686
|
if (typeof r != "function")
|
|
2675
2687
|
throw new TypeError(ki);
|
|
2676
|
-
e = Mr(e) || 0, Fn(t) && (v = !!t.leading,
|
|
2688
|
+
e = Mr(e) || 0, Fn(t) && (v = !!t.leading, p = "maxWait" in t, o = p ? Si(Mr(t.maxWait) || 0, e) : o, _ = "trailing" in t ? !!t.trailing : _);
|
|
2677
2689
|
function $(y) {
|
|
2678
2690
|
var D = n, R = a;
|
|
2679
2691
|
return n = a = void 0, d = y, s = r.apply(R, D), s;
|
|
@@ -2683,11 +2695,11 @@ function Di(r, e, t) {
|
|
|
2683
2695
|
}
|
|
2684
2696
|
function g(y) {
|
|
2685
2697
|
var D = y - l, R = y - d, K = e - D;
|
|
2686
|
-
return
|
|
2698
|
+
return p ? _i(K, o - R) : K;
|
|
2687
2699
|
}
|
|
2688
2700
|
function C(y) {
|
|
2689
2701
|
var D = y - l, R = y - d;
|
|
2690
|
-
return l === void 0 || D >= e || D < 0 ||
|
|
2702
|
+
return l === void 0 || D >= e || D < 0 || p && R >= o;
|
|
2691
2703
|
}
|
|
2692
2704
|
function b() {
|
|
2693
2705
|
var y = Ln();
|
|
@@ -2704,17 +2716,17 @@ function Di(r, e, t) {
|
|
|
2704
2716
|
function u() {
|
|
2705
2717
|
return i === void 0 ? s : k(Ln());
|
|
2706
2718
|
}
|
|
2707
|
-
function
|
|
2719
|
+
function m() {
|
|
2708
2720
|
var y = Ln(), D = C(y);
|
|
2709
2721
|
if (n = arguments, a = this, l = y, D) {
|
|
2710
2722
|
if (i === void 0)
|
|
2711
2723
|
return E(l);
|
|
2712
|
-
if (
|
|
2724
|
+
if (p)
|
|
2713
2725
|
return clearTimeout(i), i = setTimeout(b, e), $(l);
|
|
2714
2726
|
}
|
|
2715
2727
|
return i === void 0 && (i = setTimeout(b, e)), s;
|
|
2716
2728
|
}
|
|
2717
|
-
return
|
|
2729
|
+
return m.cancel = f, m.flush = u, m;
|
|
2718
2730
|
}
|
|
2719
2731
|
const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
2720
2732
|
key: 0,
|
|
@@ -2775,7 +2787,7 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2775
2787
|
//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
2776
2788
|
const v = Di(() => {
|
|
2777
2789
|
C();
|
|
2778
|
-
}, 300),
|
|
2790
|
+
}, 300), p = P({
|
|
2779
2791
|
get: () => n.modelValue,
|
|
2780
2792
|
//props.form?.fields[props.name].model.value,
|
|
2781
2793
|
set: (D) => {
|
|
@@ -2787,7 +2799,7 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2787
2799
|
t("change", D), v.cancel(), C();
|
|
2788
2800
|
}, C = () => {
|
|
2789
2801
|
if (!(!n.form || !n.form.fields || !n.form.fields[n.name].rules))
|
|
2790
|
-
return o.value = yn.validate(
|
|
2802
|
+
return o.value = yn.validate(p.value, n.form.fields[n.name].rules), !!o.value;
|
|
2791
2803
|
};
|
|
2792
2804
|
Be(() => {
|
|
2793
2805
|
l.value = n.readonly, !n.autocomplete && !l.value && (l.value = !0, setTimeout(() => {
|
|
@@ -2797,12 +2809,12 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2797
2809
|
const b = () => {
|
|
2798
2810
|
d.value?.focus();
|
|
2799
2811
|
}, k = () => {
|
|
2800
|
-
|
|
2812
|
+
p.value = "", t("update:modelValue", ""), t("input", ""), t("clear");
|
|
2801
2813
|
}, f = (D) => {
|
|
2802
2814
|
i.value = D;
|
|
2803
2815
|
}, u = (D) => {
|
|
2804
2816
|
o.value = D;
|
|
2805
|
-
},
|
|
2817
|
+
}, m = (D) => {
|
|
2806
2818
|
t("blur", D), v.cancel(), C();
|
|
2807
2819
|
};
|
|
2808
2820
|
return e({
|
|
@@ -2827,7 +2839,7 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2827
2839
|
id: Q(s),
|
|
2828
2840
|
ref_key: "inputRef",
|
|
2829
2841
|
ref: d,
|
|
2830
|
-
"onUpdate:modelValue": R[0] || (R[0] = (K) =>
|
|
2842
|
+
"onUpdate:modelValue": R[0] || (R[0] = (K) => p.value = K),
|
|
2831
2843
|
style: ue([{ width: "100%" }, n.inputStyle]),
|
|
2832
2844
|
type: _.value,
|
|
2833
2845
|
inputmode: r.inputMode,
|
|
@@ -2836,7 +2848,7 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2836
2848
|
onInput: E,
|
|
2837
2849
|
onChange: g,
|
|
2838
2850
|
onFocus: R[1] || (R[1] = (K) => f(!0)),
|
|
2839
|
-
onBlur:
|
|
2851
|
+
onBlur: m,
|
|
2840
2852
|
minlength: n.minLength,
|
|
2841
2853
|
maxlength: n.maxLength,
|
|
2842
2854
|
onFocusout: R[2] || (R[2] = (K) => f(!1)),
|
|
@@ -2852,9 +2864,9 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2852
2864
|
disabled: n.disabled,
|
|
2853
2865
|
readonly: l.value
|
|
2854
2866
|
}, null, 46, Li), [
|
|
2855
|
-
[Bt,
|
|
2867
|
+
[Bt, p.value]
|
|
2856
2868
|
]),
|
|
2857
|
-
n.clear &&
|
|
2869
|
+
n.clear && p.value?.length > 0 ? (c(), w("div", {
|
|
2858
2870
|
key: 0,
|
|
2859
2871
|
class: "d-post-inside-button",
|
|
2860
2872
|
onClick: k
|
|
@@ -2911,7 +2923,7 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2911
2923
|
}
|
|
2912
2924
|
Lt(!0);
|
|
2913
2925
|
};
|
|
2914
|
-
return Be(s), e({ returnValue: i }), (v,
|
|
2926
|
+
return Be(s), e({ returnValue: i }), (v, p) => (c(), w("div", null, [
|
|
2915
2927
|
F(dt, { show: !0 }, {
|
|
2916
2928
|
"modal-title": Y(() => [
|
|
2917
2929
|
ie(G(t.title), 1)
|
|
@@ -2927,13 +2939,13 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2927
2939
|
F(et, {
|
|
2928
2940
|
style: { width: "100px" },
|
|
2929
2941
|
modelValue: a.value,
|
|
2930
|
-
"onUpdate:modelValue":
|
|
2942
|
+
"onUpdate:modelValue": p[0] || (p[0] = (_) => a.value = _),
|
|
2931
2943
|
type: "text",
|
|
2932
2944
|
placeholder: "000",
|
|
2933
2945
|
maxlength: "3",
|
|
2934
2946
|
class: "text-center font-mono",
|
|
2935
2947
|
onInput: l,
|
|
2936
|
-
onKeyup:
|
|
2948
|
+
onKeyup: p[1] || (p[1] = Gr((_) => i() && d(), ["enter"])),
|
|
2937
2949
|
focus: !0
|
|
2938
2950
|
}, null, 8, ["modelValue"])
|
|
2939
2951
|
]),
|
|
@@ -2943,7 +2955,7 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2943
2955
|
"modal-footer": Y(() => [
|
|
2944
2956
|
T("div", ji, [
|
|
2945
2957
|
F(pe, {
|
|
2946
|
-
onClick:
|
|
2958
|
+
onClick: p[2] || (p[2] = (_) => Q(Lt)()),
|
|
2947
2959
|
disabled: !i()
|
|
2948
2960
|
}, {
|
|
2949
2961
|
default: Y(() => [
|
|
@@ -2953,7 +2965,7 @@ const Ci = { style: { display: "flex", "flex-direction": "column" } }, $i = {
|
|
|
2953
2965
|
}, 8, ["disabled"]),
|
|
2954
2966
|
F(pe, {
|
|
2955
2967
|
class: "button-red",
|
|
2956
|
-
onClick:
|
|
2968
|
+
onClick: p[3] || (p[3] = (_) => Q(Lt)(!1))
|
|
2957
2969
|
}, {
|
|
2958
2970
|
default: Y(() => [
|
|
2959
2971
|
ie("Нет")
|
|
@@ -3074,21 +3086,21 @@ const Zm = {
|
|
|
3074
3086
|
tabs: Array
|
|
3075
3087
|
},
|
|
3076
3088
|
setup(r, { expose: e }) {
|
|
3077
|
-
const t = r, n = Ba(t, "tabs"), a = I([]), o = I(0), s = (
|
|
3078
|
-
o.value =
|
|
3089
|
+
const t = r, n = Ba(t, "tabs"), a = I([]), o = I(0), s = (p) => {
|
|
3090
|
+
o.value = p, Ze.emit("change_tab", {
|
|
3079
3091
|
id: t.id,
|
|
3080
3092
|
index: o.value
|
|
3081
3093
|
});
|
|
3082
|
-
}, i = (
|
|
3083
|
-
|
|
3094
|
+
}, i = (p) => {
|
|
3095
|
+
p && !a.value.includes(p) && a.value.push(p);
|
|
3084
3096
|
};
|
|
3085
3097
|
return e({
|
|
3086
3098
|
refs: () => a.value,
|
|
3087
3099
|
getSelectedIndex: () => o.value,
|
|
3088
|
-
setSelectedIndex: (
|
|
3089
|
-
s(
|
|
3100
|
+
setSelectedIndex: (p) => {
|
|
3101
|
+
s(p);
|
|
3090
3102
|
}
|
|
3091
|
-
}), (
|
|
3103
|
+
}), (p, _) => (c(), w(me, null, [
|
|
3092
3104
|
T("div", al, [
|
|
3093
3105
|
(c(!0), w(me, null, we(n.value, ($, E) => (c(), H(rl, {
|
|
3094
3106
|
index: E,
|
|
@@ -3547,51 +3559,51 @@ const Zm = {
|
|
|
3547
3559
|
N.mutations.setItems(n.id, n.items);
|
|
3548
3560
|
}
|
|
3549
3561
|
), Be(() => {
|
|
3550
|
-
const
|
|
3551
|
-
|
|
3562
|
+
const m = localStorage.getItem(`${n.id}-grid-field`), y = localStorage.getItem(`${n.id}-grid-dir`);
|
|
3563
|
+
m && (N.mutations.setSortField(n.id, m), N.mutations.setSortDirection(n.id, y || "asc"));
|
|
3552
3564
|
});
|
|
3553
3565
|
let d = [];
|
|
3554
|
-
for (let
|
|
3555
|
-
Object.hasOwn(n.columns[
|
|
3556
|
-
const v = (
|
|
3566
|
+
for (let m = 0; m < n.columns.length; m++)
|
|
3567
|
+
Object.hasOwn(n.columns[m], "search") && (n.columns[m].search === "string" || n.columns[m].search === "number" || Array.isArray(n.columns[m].search)) && (l.value[n.columns[m].key] = ""), d.push(Object.hasOwn(n.columns[m], "size") ? n.columns[m].size : "minmax(100px, 1fr)"), i.value = d.join(" ");
|
|
3568
|
+
const v = (m, y) => {
|
|
3557
3569
|
if (N.getters.getSortField(n.id) === y) {
|
|
3558
3570
|
const R = N.getters.getSortDirection(n.id);
|
|
3559
3571
|
R ? R === "asc" ? (N.mutations.setSortDirection(n.id, "desc"), localStorage.setItem(`${n.id}-grid-dir`, "desc")) : (N.mutations.setSortField(n.id, null), N.mutations.setSortDirection(n.id, null), localStorage.removeItem(`${n.id}-grid-field`), localStorage.removeItem(`${n.id}-grid-dir`)) : (N.mutations.setSortDirection(n.id, "asc"), localStorage.setItem(`${n.id}-grid-dir`, "asc"));
|
|
3560
3572
|
} else
|
|
3561
3573
|
N.mutations.setSortField(n.id, y), N.mutations.setSortDirection(n.id, "asc"), localStorage.setItem(`${n.id}-grid-field`, y), localStorage.setItem(`${n.id}-grid-dir`, "asc");
|
|
3562
|
-
},
|
|
3563
|
-
|
|
3574
|
+
}, p = (m) => {
|
|
3575
|
+
m.target.checked ? g.value.forEach((y) => {
|
|
3564
3576
|
N.getters.getSelected(n.id).includes(y.id) || N.mutations.addSelect(n.id, y.id);
|
|
3565
3577
|
}) : g.value.forEach((y) => {
|
|
3566
3578
|
N.mutations.unSelect(n.id, y.id);
|
|
3567
3579
|
});
|
|
3568
|
-
}, _ = (
|
|
3569
|
-
|
|
3580
|
+
}, _ = (m) => N.getters.getSelected(n.id).includes(m), $ = (m, y) => {
|
|
3581
|
+
m.target.checked ? (N.mutations.addSelect(n.id, y), t("check", { grid: n.id, id: y })) : (N.mutations.unSelect(n.id, y), t("uncheck", { grid: n.id, id: y }));
|
|
3570
3582
|
}, E = P(() => g.value.length === 0 ? !1 : g.value.every(
|
|
3571
|
-
(
|
|
3583
|
+
(m) => N.getters.getSelected(n.id).includes(m.id)
|
|
3572
3584
|
)), g = P(() => {
|
|
3573
|
-
const
|
|
3585
|
+
const m = a.value * o.value - o.value, y = a.value * o.value - 1;
|
|
3574
3586
|
let D = N.getters.getItems(n.id);
|
|
3575
3587
|
for (let K = 0; K < n.columns.length; K++) {
|
|
3576
3588
|
const ne = n.columns[K], q = l.value[ne.key];
|
|
3577
3589
|
q && (Array.isArray(ne.search) ? D = D.filter((fe) => String(fe[ne.key]) === String(q)) : (ne.search === "string" || ne.search === "number") && (D = D.filter((fe) => fe[ne.key] && fe[ne.key].toString().toUpperCase().includes(q.toString().toUpperCase()))));
|
|
3578
3590
|
}
|
|
3579
|
-
return D.slice(
|
|
3591
|
+
return D.slice(m, y + 1);
|
|
3580
3592
|
}), C = P(() => {
|
|
3581
|
-
let
|
|
3593
|
+
let m = [];
|
|
3582
3594
|
for (let y in n.perPageOptions)
|
|
3583
|
-
|
|
3584
|
-
return
|
|
3585
|
-
}), b = (
|
|
3586
|
-
n.selectable === "one" && (N.getters.getSelected(n.id).includes(
|
|
3587
|
-
}, k = (
|
|
3588
|
-
o.value = parseInt(
|
|
3589
|
-
}, f = (
|
|
3590
|
-
t("select", { e:
|
|
3595
|
+
m.push({ label: n.perPageOptions[y], value: n.perPageOptions[y].toString() });
|
|
3596
|
+
return m;
|
|
3597
|
+
}), b = (m) => {
|
|
3598
|
+
n.selectable === "one" && (N.getters.getSelected(n.id).includes(m.id) ? (N.actions.unselectAll(n.id), t("unselect")) : (N.mutations.select(n.id, m.id), t("select", m)));
|
|
3599
|
+
}, k = (m) => {
|
|
3600
|
+
o.value = parseInt(m.target.value), localStorage.setItem("datagrid-perpage", m.target.value), a.value = 1;
|
|
3601
|
+
}, f = (m, y) => {
|
|
3602
|
+
t("select", { e: m, row: y });
|
|
3591
3603
|
};
|
|
3592
3604
|
return e({
|
|
3593
3605
|
getSelection: () => N.getters.getSelected(n.id)
|
|
3594
|
-
}), (
|
|
3606
|
+
}), (m, y) => (c(), w("div", null, [
|
|
3595
3607
|
T("div", yl, [
|
|
3596
3608
|
T("table", bl, [
|
|
3597
3609
|
T("thead", wl, [
|
|
@@ -3599,7 +3611,7 @@ const Zm = {
|
|
|
3599
3611
|
n.selectable === "check" ? (c(), w("th", kl, [
|
|
3600
3612
|
F(un, {
|
|
3601
3613
|
checked: E.value,
|
|
3602
|
-
onChange: y[0] || (y[0] = (D) =>
|
|
3614
|
+
onChange: y[0] || (y[0] = (D) => p(D))
|
|
3603
3615
|
}, null, 8, ["checked"])
|
|
3604
3616
|
])) : O("", !0),
|
|
3605
3617
|
(c(!0), w(me, null, we(n.columns, (D) => (c(), w("th", {
|
|
@@ -3748,31 +3760,31 @@ const Zm = {
|
|
|
3748
3760
|
if (t.canvas) {
|
|
3749
3761
|
const {
|
|
3750
3762
|
offsetX: v,
|
|
3751
|
-
offsetY:
|
|
3763
|
+
offsetY: p,
|
|
3752
3764
|
width: _,
|
|
3753
3765
|
height: $
|
|
3754
3766
|
} = d(t.width, t.height, l.width, l.height);
|
|
3755
|
-
a.drawImage(l, v,
|
|
3767
|
+
a.drawImage(l, v, p, _, $), e("loaded"), i.value = !1;
|
|
3756
3768
|
} else
|
|
3757
3769
|
s.value = l.src, e("loaded"), i.value = !1;
|
|
3758
3770
|
}, l.onerror = () => {
|
|
3759
3771
|
l.src = t.srcFail, e("loaded"), i.value = !1;
|
|
3760
3772
|
};
|
|
3761
|
-
const d = (v,
|
|
3762
|
-
const b = _ / $, k = v /
|
|
3763
|
-
let f = v * E, u =
|
|
3773
|
+
const d = (v, p, _, $, E = 1, g = 0.5, C = 0.5) => {
|
|
3774
|
+
const b = _ / $, k = v / p;
|
|
3775
|
+
let f = v * E, u = p * E;
|
|
3764
3776
|
return b < k ? u = f / b : f = u * b, {
|
|
3765
3777
|
width: f,
|
|
3766
3778
|
height: u,
|
|
3767
3779
|
offsetX: (v - f) * g,
|
|
3768
|
-
offsetY: (
|
|
3780
|
+
offsetY: (p - u) * C
|
|
3769
3781
|
};
|
|
3770
3782
|
};
|
|
3771
3783
|
return Be(() => {
|
|
3772
3784
|
t.canvas && (n = o.value, a = n.getContext("2d")), e("loading"), i.value = !0, l.src = t.src;
|
|
3773
|
-
}), Re(() => t.src, (v,
|
|
3785
|
+
}), Re(() => t.src, (v, p) => {
|
|
3774
3786
|
e("loading"), i.value = !0, l.src = t.src;
|
|
3775
|
-
}), (v,
|
|
3787
|
+
}), (v, p) => (c(), w("div", {
|
|
3776
3788
|
style: ue([{ position: "relative", display: "inline-block" }, {
|
|
3777
3789
|
width: `${t.width}px`,
|
|
3778
3790
|
height: `${t.height}px`,
|
|
@@ -3873,7 +3885,7 @@ const Zm = {
|
|
|
3873
3885
|
o.value.focus();
|
|
3874
3886
|
}, v = () => {
|
|
3875
3887
|
o.value.style.height = "auto";
|
|
3876
|
-
},
|
|
3888
|
+
}, p = (k) => {
|
|
3877
3889
|
t("input", k), n.autoHeight && (o.value.style.overflow = "hidden", o.value.style.minHeight = n.minHeight, o.value.style.maxHeight = n.maxHeight, o.value.style.height = "auto", o.value.style.height = `${o.value.scrollHeight}px`), l();
|
|
3878
3890
|
}, _ = () => {
|
|
3879
3891
|
n.autoHeight && (o.value.style.height = "auto", o.value.style.height = `${o.value.scrollHeight}px`);
|
|
@@ -3904,7 +3916,7 @@ const Zm = {
|
|
|
3904
3916
|
ref: o,
|
|
3905
3917
|
"onUpdate:modelValue": f[0] || (f[0] = (u) => i.value = u),
|
|
3906
3918
|
"on:update:modelValue": _,
|
|
3907
|
-
onInput:
|
|
3919
|
+
onInput: p,
|
|
3908
3920
|
onChange: E,
|
|
3909
3921
|
rows: n.rows,
|
|
3910
3922
|
cols: n.cols,
|
|
@@ -4000,7 +4012,7 @@ const Zm = {
|
|
|
4000
4012
|
setup(r, { expose: e, emit: t }) {
|
|
4001
4013
|
const n = r, a = ct(), o = I(""), s = Ct(), i = I(!1), l = I(!1), d = I("password"), v = I(null);
|
|
4002
4014
|
//!props.form ? ref(null) : props.form.fields[props.name].ref
|
|
4003
|
-
const
|
|
4015
|
+
const p = P({
|
|
4004
4016
|
get: () => n.modelValue,
|
|
4005
4017
|
//props.form?.fields[props.name].model.value,
|
|
4006
4018
|
set: (u) => {
|
|
@@ -4010,7 +4022,7 @@ const Zm = {
|
|
|
4010
4022
|
t("input", u), E();
|
|
4011
4023
|
}, E = () => {
|
|
4012
4024
|
if (!(!n.form || !n.form.fields || !n.form.fields[n.name].rules))
|
|
4013
|
-
return o.value = yn.validate(
|
|
4025
|
+
return o.value = yn.validate(p.value, n.form.fields[n.name].rules), !!o.value;
|
|
4014
4026
|
};
|
|
4015
4027
|
Be(() => {
|
|
4016
4028
|
l.value = n.readonly, !n.autocomplete && !l.value && (l.value = !0, setTimeout(() => {
|
|
@@ -4032,7 +4044,7 @@ const Zm = {
|
|
|
4032
4044
|
focus: g,
|
|
4033
4045
|
setError: k,
|
|
4034
4046
|
validate: E
|
|
4035
|
-
}), (u,
|
|
4047
|
+
}), (u, m) => (c(), w("div", {
|
|
4036
4048
|
class: oe(["d-input-string", _.value])
|
|
4037
4049
|
}, [
|
|
4038
4050
|
T("div", ru, [
|
|
@@ -4046,14 +4058,14 @@ const Zm = {
|
|
|
4046
4058
|
id: Q(s),
|
|
4047
4059
|
ref_key: "inputRef",
|
|
4048
4060
|
ref: v,
|
|
4049
|
-
"onUpdate:modelValue":
|
|
4061
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => p.value = y),
|
|
4050
4062
|
style: { width: "100%" },
|
|
4051
4063
|
type: d.value,
|
|
4052
4064
|
placeholder: n.placeholder,
|
|
4053
4065
|
onInput: $,
|
|
4054
|
-
onFocus:
|
|
4066
|
+
onFocus: m[1] || (m[1] = (y) => b(!0)),
|
|
4055
4067
|
onBlur: f,
|
|
4056
|
-
onFocusout:
|
|
4068
|
+
onFocusout: m[2] || (m[2] = (y) => b(!1)),
|
|
4057
4069
|
class: oe([
|
|
4058
4070
|
Q(a).pre ? "has-pre" : "",
|
|
4059
4071
|
Q(a).post ? "has-post" : "",
|
|
@@ -4062,7 +4074,7 @@ const Zm = {
|
|
|
4062
4074
|
disabled: n.disabled,
|
|
4063
4075
|
readonly: l.value
|
|
4064
4076
|
}, null, 42, lu), [
|
|
4065
|
-
[Bt,
|
|
4077
|
+
[Bt, p.value]
|
|
4066
4078
|
]),
|
|
4067
4079
|
n.toggleView ? (c(), w("div", {
|
|
4068
4080
|
key: 0,
|
|
@@ -4218,8 +4230,8 @@ var Jn = Ge({
|
|
|
4218
4230
|
left: i - 5 + "px",
|
|
4219
4231
|
top: l - 5 + "px"
|
|
4220
4232
|
};
|
|
4221
|
-
const d = n.getImageData(Math.min(i, this.size - 1), Math.min(l, this.size - 1), 1, 1), [v,
|
|
4222
|
-
this.$emit("selectSaturation", { r: v, g:
|
|
4233
|
+
const d = n.getImageData(Math.min(i, this.size - 1), Math.min(l, this.size - 1), 1, 1), [v, p, _] = d.data;
|
|
4234
|
+
this.$emit("selectSaturation", { r: v, g: p, b: _ });
|
|
4223
4235
|
};
|
|
4224
4236
|
a(r);
|
|
4225
4237
|
const o = () => {
|
|
@@ -4515,7 +4527,7 @@ var rr = Ge({
|
|
|
4515
4527
|
},
|
|
4516
4528
|
mousemoveHandler(r) {
|
|
4517
4529
|
const { clientX: e, clientY: t } = r, { top: n, left: a, width: o, height: s } = this.suckerCanvas.getBoundingClientRect(), i = e - a, l = t - n, v = this.suckerCanvas.getContext("2d").getImageData(Math.min(i, o - 1), Math.min(l, s - 1), 1, 1);
|
|
4518
|
-
let [
|
|
4530
|
+
let [p, _, $, E] = v.data;
|
|
4519
4531
|
E = parseFloat((E / 255).toFixed(2));
|
|
4520
4532
|
const g = this.suckerPreview.style;
|
|
4521
4533
|
Object.assign(g, {
|
|
@@ -4527,7 +4539,7 @@ var rr = Ge({
|
|
|
4527
4539
|
borderRadius: "50%",
|
|
4528
4540
|
border: "2px solid #fff",
|
|
4529
4541
|
boxShadow: "0 0 8px 0 rgba(0, 0, 0, 0.16)",
|
|
4530
|
-
background: `rgba(${
|
|
4542
|
+
background: `rgba(${p}, ${_}, ${$}, ${E})`,
|
|
4531
4543
|
zIndex: 95
|
|
4532
4544
|
}), this.suckerArea.length && // @ts-ignore
|
|
4533
4545
|
e >= this.suckerArea[0] && // @ts-ignore
|
|
@@ -4537,8 +4549,8 @@ var rr = Ge({
|
|
|
4537
4549
|
},
|
|
4538
4550
|
suckColor(r) {
|
|
4539
4551
|
r && r.tagName !== "CANVAS" || (this.suckerPreview = document.createElement("div"), this.suckerPreview && document.body.appendChild(this.suckerPreview), document.addEventListener("mousemove", this.mousemoveHandler), document.addEventListener("mouseup", this.mousemoveHandler), r.addEventListener("click", (e) => {
|
|
4540
|
-
const { clientX: t, clientY: n } = e, { top: a, left: o, width: s, height: i } = r.getBoundingClientRect(), l = t - o, d = n - a,
|
|
4541
|
-
let [_, $, E, g] =
|
|
4552
|
+
const { clientX: t, clientY: n } = e, { top: a, left: o, width: s, height: i } = r.getBoundingClientRect(), l = t - o, d = n - a, p = r.getContext("2d").getImageData(Math.min(l, s - 1), Math.min(d, i - 1), 1, 1);
|
|
4553
|
+
let [_, $, E, g] = p.data;
|
|
4542
4554
|
g = parseFloat((g / 255).toFixed(2)), this.$emit("selectSucker", { r: _, g: $, b: E, a: g });
|
|
4543
4555
|
}));
|
|
4544
4556
|
}
|
|
@@ -4964,7 +4976,7 @@ var Et = Ge({
|
|
|
4964
4976
|
});
|
|
4965
4977
|
const Ru = { class: "color-set" };
|
|
4966
4978
|
function Bu(r, e, t, n, a, o) {
|
|
4967
|
-
const s = mt("Saturation"), i = mt("Hue"), l = mt("Alpha"), d = mt("Preview"), v = mt("Sucker"),
|
|
4979
|
+
const s = mt("Saturation"), i = mt("Hue"), l = mt("Alpha"), d = mt("Preview"), v = mt("Sucker"), p = mt("Box"), _ = mt("Colors");
|
|
4968
4980
|
return c(), H(
|
|
4969
4981
|
"div",
|
|
4970
4982
|
{
|
|
@@ -5019,14 +5031,14 @@ function Bu(r, e, t, n, a, o) {
|
|
|
5019
5031
|
4
|
|
5020
5032
|
/* STYLE */
|
|
5021
5033
|
),
|
|
5022
|
-
F(
|
|
5034
|
+
F(p, {
|
|
5023
5035
|
name: "HEX",
|
|
5024
5036
|
color: r.modelHex,
|
|
5025
5037
|
onInputColor: r.inputHex,
|
|
5026
5038
|
onInputFocus: r.handleFocus,
|
|
5027
5039
|
onInputBlur: r.handleBlur
|
|
5028
5040
|
}, null, 8, ["color", "onInputColor", "onInputFocus", "onInputBlur"]),
|
|
5029
|
-
F(
|
|
5041
|
+
F(p, {
|
|
5030
5042
|
name: "RGBA",
|
|
5031
5043
|
color: r.modelRgba,
|
|
5032
5044
|
onInputColor: r.inputRgba,
|
|
@@ -5076,16 +5088,16 @@ const Nu = /* @__PURE__ */ T("div", { class: "color-indicator" }, null, -1), Yu
|
|
|
5076
5088
|
emits: ["update:modelValue", "change"],
|
|
5077
5089
|
setup(r, { emit: e }) {
|
|
5078
5090
|
const t = r;
|
|
5079
|
-
Xn((
|
|
5091
|
+
Xn((p) => ({
|
|
5080
5092
|
"2c1f41d3": n.value
|
|
5081
5093
|
}));
|
|
5082
5094
|
const n = P({
|
|
5083
5095
|
get: () => t.modelValue,
|
|
5084
|
-
set: (
|
|
5085
|
-
e("update:modelValue",
|
|
5096
|
+
set: (p) => {
|
|
5097
|
+
e("update:modelValue", p);
|
|
5086
5098
|
}
|
|
5087
|
-
}), a = I(null), o = I(n), s = I(null), i = (
|
|
5088
|
-
s.value = t.format === "rgba" ?
|
|
5099
|
+
}), a = I(null), o = I(n), s = I(null), i = (p) => {
|
|
5100
|
+
s.value = t.format === "rgba" ? p.rgba : p.hex;
|
|
5089
5101
|
}, l = () => {
|
|
5090
5102
|
a.value.show();
|
|
5091
5103
|
}, d = {
|
|
@@ -5094,13 +5106,13 @@ const Nu = /* @__PURE__ */ T("div", { class: "color-indicator" }, null, -1), Yu
|
|
|
5094
5106
|
}
|
|
5095
5107
|
}, v = () => {
|
|
5096
5108
|
if (t.format === "rgba") {
|
|
5097
|
-
const { r:
|
|
5098
|
-
n.value = `rgba(${
|
|
5109
|
+
const { r: p, g: _, b: $, a: E } = s.value;
|
|
5110
|
+
n.value = `rgba(${p}, ${_}, ${$}, ${E})`;
|
|
5099
5111
|
} else
|
|
5100
5112
|
n.value = s.value;
|
|
5101
5113
|
a.value.hide(), e("change", n.value);
|
|
5102
5114
|
};
|
|
5103
|
-
return (
|
|
5115
|
+
return (p, _) => (c(), w("div", null, [
|
|
5104
5116
|
F(et, {
|
|
5105
5117
|
pre: d,
|
|
5106
5118
|
label: t.label,
|
|
@@ -5319,9 +5331,9 @@ var ra = (
|
|
|
5319
5331
|
a++;
|
|
5320
5332
|
else e === this.xPct[this.xPct.length - 1] && (a = this.xPct.length - 2);
|
|
5321
5333
|
!n && e === this.xPct[a + 1] && a++, t === null && (t = []);
|
|
5322
|
-
var o, s = 1, i = t[a], l = 0, d = 0, v = 0,
|
|
5334
|
+
var o, s = 1, i = t[a], l = 0, d = 0, v = 0, p = 0;
|
|
5323
5335
|
for (n ? o = (e - this.xPct[a]) / (this.xPct[a + 1] - this.xPct[a]) : o = (this.xPct[a + 1] - e) / (this.xPct[a + 1] - this.xPct[a]); i > 0; )
|
|
5324
|
-
l = this.xPct[a + 1 +
|
|
5336
|
+
l = this.xPct[a + 1 + p] - this.xPct[a + p], t[a + p] * s + 100 - o * 100 > 100 ? (d = l * o, s = (i - 100 * o) / t[a + p], o = 1) : (d = t[a + p] * l / 100 * s, s = 0), n ? (v = v - d, this.xPct.length + p >= 1 && p--) : (v = v + d, this.xPct.length - p >= 1 && p++), i = t[a + p] * s;
|
|
5325
5337
|
return e + v;
|
|
5326
5338
|
}, r.prototype.toStepping = function(e) {
|
|
5327
5339
|
return e = nc(this.xVal, this.xPct, e), e;
|
|
@@ -5671,7 +5683,7 @@ function ia(r) {
|
|
|
5671
5683
|
return e.style = i[e.dir][e.ort], e;
|
|
5672
5684
|
}
|
|
5673
5685
|
function $c(r, e, t) {
|
|
5674
|
-
var n = Ku(), a = Ju(), o = a && Zu(), s = r, i, l, d, v,
|
|
5686
|
+
var n = Ku(), a = Ju(), o = a && Zu(), s = r, i, l, d, v, p, _, $ = e.spectrum, E = [], g = [], C = [], b = 0, k = {}, f = !1, u = r.ownerDocument, m = e.documentElement || u.documentElement, y = u.body, D = u.dir === "rtl" || e.ort === 1 ? 0 : 100;
|
|
5675
5687
|
function R(h, x) {
|
|
5676
5688
|
var S = u.createElement("div");
|
|
5677
5689
|
return x && je(S, x), h.appendChild(S), S;
|
|
@@ -5795,7 +5807,7 @@ function $c(r, e, t) {
|
|
|
5795
5807
|
}), W;
|
|
5796
5808
|
}
|
|
5797
5809
|
function L() {
|
|
5798
|
-
|
|
5810
|
+
p && (Pr(p), p = null);
|
|
5799
5811
|
}
|
|
5800
5812
|
function z(h) {
|
|
5801
5813
|
L();
|
|
@@ -5804,7 +5816,7 @@ function $c(r, e, t) {
|
|
|
5804
5816
|
return String(Math.round(j));
|
|
5805
5817
|
}
|
|
5806
5818
|
};
|
|
5807
|
-
return
|
|
5819
|
+
return p = s.appendChild(M(x, S, A)), p;
|
|
5808
5820
|
}
|
|
5809
5821
|
function B() {
|
|
5810
5822
|
var h = i.getBoundingClientRect(), x = "offset" + ["Width", "Height"][e.ort];
|
|
@@ -5868,7 +5880,7 @@ function $c(r, e, t) {
|
|
|
5868
5880
|
}
|
|
5869
5881
|
function Vt(h, x) {
|
|
5870
5882
|
x.handle && (sn(x.handle, e.cssClasses.active), b -= 1), x.listeners.forEach(function(S) {
|
|
5871
|
-
|
|
5883
|
+
m.removeEventListener(S[0], S[1]);
|
|
5872
5884
|
}), b === 0 && (sn(s, e.cssClasses.drag), Dn(), h.cursor && (y.style.cursor = "", y.removeEventListener("selectstart", Or))), e.events.smoothSteps && (x.handleNumbers.forEach(function(S) {
|
|
5873
5885
|
bt(S, g[S], !0, !0, !1, !1);
|
|
5874
5886
|
}), x.handleNumbers.forEach(function(S) {
|
|
@@ -5885,7 +5897,7 @@ function $c(r, e, t) {
|
|
|
5885
5897
|
S = A.children[0], b += 1, je(S, e.cssClasses.active);
|
|
5886
5898
|
}
|
|
5887
5899
|
h.stopPropagation();
|
|
5888
|
-
var j = [], W = X(n.move,
|
|
5900
|
+
var j = [], W = X(n.move, m, en, {
|
|
5889
5901
|
// The event target has changed so we need to propagate the original one so that we keep
|
|
5890
5902
|
// relying on it to extract target touches.
|
|
5891
5903
|
target: h.target,
|
|
@@ -5898,13 +5910,13 @@ function $c(r, e, t) {
|
|
|
5898
5910
|
handleNumbers: x.handleNumbers,
|
|
5899
5911
|
buttonsProperty: h.buttons,
|
|
5900
5912
|
locations: g.slice()
|
|
5901
|
-
}), re = X(n.end,
|
|
5913
|
+
}), re = X(n.end, m, Vt, {
|
|
5902
5914
|
target: h.target,
|
|
5903
5915
|
handle: S,
|
|
5904
5916
|
listeners: j,
|
|
5905
5917
|
doNotReject: !0,
|
|
5906
5918
|
handleNumbers: x.handleNumbers
|
|
5907
|
-
}), ee = X("mouseout",
|
|
5919
|
+
}), ee = X("mouseout", m, tt, {
|
|
5908
5920
|
target: h.target,
|
|
5909
5921
|
handle: S,
|
|
5910
5922
|
listeners: j,
|
|
@@ -6382,10 +6394,10 @@ const Vr = {
|
|
|
6382
6394
|
Re(() => t.angle, (l) => {
|
|
6383
6395
|
a.value = -~l;
|
|
6384
6396
|
});
|
|
6385
|
-
const s = (l, d, v,
|
|
6397
|
+
const s = (l, d, v, p) => Math.atan2(l - v, d - p) * (180 / Math.PI) * -1 + 180, i = (l) => {
|
|
6386
6398
|
if (o.value) {
|
|
6387
|
-
let d = -~(n.value.offsetHeight || n.value.height) / 2, v = -~(n.value.offsetWidth || n.value.width) / 2,
|
|
6388
|
-
a.value = -~
|
|
6399
|
+
let d = -~(n.value.offsetHeight || n.value.height) / 2, v = -~(n.value.offsetWidth || n.value.width) / 2, p = s(l.offsetX, l.offsetY, d, v);
|
|
6400
|
+
a.value = -~p, e("angle", p);
|
|
6389
6401
|
}
|
|
6390
6402
|
};
|
|
6391
6403
|
return (l, d) => (c(), w("div", null, [
|
|
@@ -6631,7 +6643,7 @@ function Hc() {
|
|
|
6631
6643
|
return B && (De(e.comma) || n("Missing comma before color stops")), {
|
|
6632
6644
|
type: J,
|
|
6633
6645
|
orientation: B,
|
|
6634
|
-
colorStops: u(
|
|
6646
|
+
colorStops: u(m)
|
|
6635
6647
|
};
|
|
6636
6648
|
});
|
|
6637
6649
|
}
|
|
@@ -6651,12 +6663,12 @@ function Hc() {
|
|
|
6651
6663
|
return M ? {
|
|
6652
6664
|
type: "directional",
|
|
6653
6665
|
value: M.value
|
|
6654
|
-
} :
|
|
6666
|
+
} : p();
|
|
6655
6667
|
}
|
|
6656
6668
|
function v() {
|
|
6657
6669
|
return xe("directional", e.sideOrCorner, 1);
|
|
6658
6670
|
}
|
|
6659
|
-
function
|
|
6671
|
+
function p() {
|
|
6660
6672
|
return xe("angular", e.angleValue, 1) || xe("angular", e.radianValue, 1);
|
|
6661
6673
|
}
|
|
6662
6674
|
function _() {
|
|
@@ -6729,7 +6741,7 @@ function Hc() {
|
|
|
6729
6741
|
M = J(), M ? L.push(M) : n("One extra comma");
|
|
6730
6742
|
return L;
|
|
6731
6743
|
}
|
|
6732
|
-
function
|
|
6744
|
+
function m() {
|
|
6733
6745
|
var J = y();
|
|
6734
6746
|
return J || n("Expected color definition"), J.length = U(), J;
|
|
6735
6747
|
}
|
|
@@ -6900,12 +6912,12 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
6900
6912
|
e("update:modelValue", f);
|
|
6901
6913
|
}
|
|
6902
6914
|
}), a = I(null), o = I(null), s = I([{ code: "#FFFFFF" }]), i = I(""), l = I("linear"), d = I("0"), v = I("");
|
|
6903
|
-
let
|
|
6915
|
+
let p = 1;
|
|
6904
6916
|
const _ = () => {
|
|
6905
6917
|
a.value.show(), $();
|
|
6906
6918
|
}, $ = () => {
|
|
6907
|
-
const
|
|
6908
|
-
l.value = D[0], l.value === "linear" && (d.value = y[0].orientation.value), s.value = [],
|
|
6919
|
+
const m = n.value.split(";")[1].trim().split(":")[1].trim(), y = Bc.parse(m), D = y[0].type.split("-");
|
|
6920
|
+
l.value = D[0], l.value === "linear" && (d.value = y[0].orientation.value), s.value = [], p = y[0].colorStops.length;
|
|
6909
6921
|
const R = [];
|
|
6910
6922
|
for (let K = 0; K < y[0].colorStops.length; K++) {
|
|
6911
6923
|
const ne = y[0].colorStops[K].type === "hex" ? `#${y[0].colorStops[K].value}` : `rgba(${y[0].colorStops[K].value.join(",")})`;
|
|
@@ -6921,17 +6933,17 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
6921
6933
|
}, g = () => {
|
|
6922
6934
|
n.value = i.value, a.value.hide(), v.value = `${t.text}: ${s.value.length}`, e("change", n.value);
|
|
6923
6935
|
}, C = () => {
|
|
6924
|
-
if (
|
|
6925
|
-
s.value.push({ code: "#FFFFFF" }),
|
|
6926
|
-
const f = Math.round(100 /
|
|
6927
|
-
for (let
|
|
6928
|
-
u.push(
|
|
6936
|
+
if (p < t.maxColors) {
|
|
6937
|
+
s.value.push({ code: "#FFFFFF" }), p++;
|
|
6938
|
+
const f = Math.round(100 / p), u = [];
|
|
6939
|
+
for (let m = 0; m < p; m++)
|
|
6940
|
+
u.push(m * f);
|
|
6929
6941
|
o.value.updateStart(u);
|
|
6930
6942
|
}
|
|
6931
6943
|
}, b = (f) => {
|
|
6932
|
-
if (
|
|
6944
|
+
if (p > 1) {
|
|
6933
6945
|
const u = o.value.get();
|
|
6934
|
-
u.splice(f, 1), s.value.splice(f, 1), o.value.updateStart(u),
|
|
6946
|
+
u.splice(f, 1), s.value.splice(f, 1), o.value.updateStart(u), p--;
|
|
6935
6947
|
}
|
|
6936
6948
|
};
|
|
6937
6949
|
Be(() => {
|
|
@@ -6941,18 +6953,18 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
6941
6953
|
if (!o.value)
|
|
6942
6954
|
return;
|
|
6943
6955
|
const f = l.value + "-gradient", u = o.value.position();
|
|
6944
|
-
let
|
|
6945
|
-
|
|
6956
|
+
let m = [];
|
|
6957
|
+
m.push(l.value === "radial" ? "circle" : `${d.value}deg`);
|
|
6946
6958
|
for (let y = 0; y < s.value.length; y++)
|
|
6947
|
-
|
|
6948
|
-
i.value = `background: ${s.value[0].code};`, s.value.length > 1 && (i.value += `background: ${f}(${
|
|
6959
|
+
m.push(`${s.value[y].code} ${parseInt(u[y])}%`);
|
|
6960
|
+
i.value = `background: ${s.value[0].code};`, s.value.length > 1 && (i.value += `background: ${f}(${m.join(", ")})`);
|
|
6949
6961
|
};
|
|
6950
6962
|
return (f, u) => (c(), w("div", null, [
|
|
6951
6963
|
F(et, {
|
|
6952
6964
|
pre: E,
|
|
6953
6965
|
label: t.label,
|
|
6954
6966
|
modelValue: v.value,
|
|
6955
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
6967
|
+
"onUpdate:modelValue": u[0] || (u[0] = (m) => v.value = m),
|
|
6956
6968
|
onClick: _,
|
|
6957
6969
|
readonly: !0
|
|
6958
6970
|
}, {
|
|
@@ -6966,7 +6978,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
6966
6978
|
}, 8, ["label", "modelValue"]),
|
|
6967
6979
|
He(T("input", {
|
|
6968
6980
|
type: "hidden",
|
|
6969
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
6981
|
+
"onUpdate:modelValue": u[1] || (u[1] = (m) => n.value = m)
|
|
6970
6982
|
}, null, 512), [
|
|
6971
6983
|
[Gn, n.value]
|
|
6972
6984
|
]),
|
|
@@ -6990,7 +7002,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
6990
7002
|
ref_key: "sliderRef",
|
|
6991
7003
|
ref: o,
|
|
6992
7004
|
start: 50,
|
|
6993
|
-
tooltips: { to: (
|
|
7005
|
+
tooltips: { to: (m) => parseInt(m) },
|
|
6994
7006
|
"tooltip-hide": !0
|
|
6995
7007
|
}, null, 8, ["tooltips"]),
|
|
6996
7008
|
T("div", Nc, [
|
|
@@ -6998,7 +7010,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
6998
7010
|
F(An, {
|
|
6999
7011
|
onChange: k,
|
|
7000
7012
|
modelValue: l.value,
|
|
7001
|
-
"onUpdate:modelValue": u[2] || (u[2] = (
|
|
7013
|
+
"onUpdate:modelValue": u[2] || (u[2] = (m) => l.value = m),
|
|
7002
7014
|
options: [{ label: t.linear, value: "linear" }, { label: t.radial, value: "radial" }],
|
|
7003
7015
|
size: "wide"
|
|
7004
7016
|
}, null, 8, ["modelValue", "options"])
|
|
@@ -7008,28 +7020,28 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7008
7020
|
key: 0,
|
|
7009
7021
|
onChange: k,
|
|
7010
7022
|
modelValue: d.value,
|
|
7011
|
-
"onUpdate:modelValue": u[3] || (u[3] = (
|
|
7023
|
+
"onUpdate:modelValue": u[3] || (u[3] = (m) => d.value = m)
|
|
7012
7024
|
}, null, 8, ["modelValue"])) : O("", !0)
|
|
7013
7025
|
])
|
|
7014
7026
|
]),
|
|
7015
|
-
(c(!0), w(me, null, we(s.value, (
|
|
7027
|
+
(c(!0), w(me, null, we(s.value, (m, y) => (c(), w("div", {
|
|
7016
7028
|
style: { display: "flex", gap: "5px", "align-items": "center", "justify-content": "center" },
|
|
7017
7029
|
key: y
|
|
7018
7030
|
}, [
|
|
7019
7031
|
F(ju, {
|
|
7020
|
-
modelValue:
|
|
7021
|
-
"onUpdate:modelValue": (D) =>
|
|
7032
|
+
modelValue: m.code,
|
|
7033
|
+
"onUpdate:modelValue": (D) => m.code = D,
|
|
7022
7034
|
style: { flex: "1" },
|
|
7023
7035
|
format: "rgba",
|
|
7024
7036
|
onChange: k
|
|
7025
7037
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
7026
|
-
Q(
|
|
7038
|
+
Q(p) > 1 ? (c(), H(pe, {
|
|
7027
7039
|
key: 0,
|
|
7028
7040
|
icon: "MinusSharp",
|
|
7029
7041
|
onClick: (D) => b(y)
|
|
7030
7042
|
}, null, 8, ["onClick"])) : O("", !0)
|
|
7031
7043
|
]))), 128)),
|
|
7032
|
-
Q(
|
|
7044
|
+
Q(p) < t.maxColors ? (c(), w("div", Yc, [
|
|
7033
7045
|
F(pe, { onClick: C }, {
|
|
7034
7046
|
default: Y(() => [
|
|
7035
7047
|
ie(G(t.add), 1)
|
|
@@ -7041,7 +7053,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7041
7053
|
"modal-footer": Y(() => [
|
|
7042
7054
|
T("div", jc, [
|
|
7043
7055
|
F(pe, {
|
|
7044
|
-
onClick: u[4] || (u[4] = (
|
|
7056
|
+
onClick: u[4] || (u[4] = (m) => a.value.hide())
|
|
7045
7057
|
}, {
|
|
7046
7058
|
default: Y(() => [
|
|
7047
7059
|
ie(G(t.close), 1)
|
|
@@ -7086,14 +7098,14 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7086
7098
|
// Used to detect double click on touch devices.
|
|
7087
7099
|
splitter: null,
|
|
7088
7100
|
timeoutId: null
|
|
7089
|
-
}),
|
|
7101
|
+
}), p = () => {
|
|
7090
7102
|
document.addEventListener("mousemove", E, { passive: !1 }), document.addEventListener("mouseup", g), "ontouchstart" in window && (document.addEventListener("touchmove", E, { passive: !1 }), document.addEventListener("touchend", g));
|
|
7091
7103
|
}, _ = () => {
|
|
7092
7104
|
document.removeEventListener("mousemove", E, { passive: !1 }), document.removeEventListener("mouseup", g), "ontouchstart" in window && (document.removeEventListener("touchmove", E, { passive: !1 }), document.removeEventListener("touchend", g));
|
|
7093
7105
|
}, $ = (M, L) => {
|
|
7094
|
-
|
|
7106
|
+
p(), d.value.mouseDown = !0, d.value.activeSplitter = L;
|
|
7095
7107
|
}, E = (M) => {
|
|
7096
|
-
t.movable && d.value.mouseDown && (M.preventDefault(), d.value.dragging = !0,
|
|
7108
|
+
t.movable && d.value.mouseDown && (M.preventDefault(), d.value.dragging = !0, m(f(M)), e("resize", a.value.map((L) => ({ min: L.min, max: L.max, size: L.size }))));
|
|
7097
7109
|
}, g = () => {
|
|
7098
7110
|
d.value.dragging && e("resized", a.value.map((M) => ({ min: M.min, max: M.max, size: M.size }))), d.value.mouseDown = !1, setTimeout(() => {
|
|
7099
7111
|
d.value.dragging = !1, _();
|
|
@@ -7117,7 +7129,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7117
7129
|
M = M[t.horizontal ? "y" : "x"];
|
|
7118
7130
|
const L = i.value[t.horizontal ? "clientHeight" : "clientWidth"];
|
|
7119
7131
|
return t.rtl && !t.horizontal && (M = L - M), M * 100 / L;
|
|
7120
|
-
},
|
|
7132
|
+
}, m = (M) => {
|
|
7121
7133
|
const L = d.value.activeSplitter;
|
|
7122
7134
|
let z = {
|
|
7123
7135
|
prevPanesSize: D(L),
|
|
@@ -7252,7 +7264,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7252
7264
|
maxSize: { type: [Number, String], default: 100 }
|
|
7253
7265
|
},
|
|
7254
7266
|
setup(r) {
|
|
7255
|
-
const e = r, t = Tt("requestUpdate"), n = Tt("onPaneAdd"), a = Tt("horizontal"), o = Tt("onPaneRemove"), s = Tt("onPaneClick"), i = gn()?.uid, l = Tt("indexedPanes"), d = P(() => l.value[i]), v = I(null),
|
|
7267
|
+
const e = r, t = Tt("requestUpdate"), n = Tt("onPaneAdd"), a = Tt("horizontal"), o = Tt("onPaneRemove"), s = Tt("onPaneClick"), i = gn()?.uid, l = Tt("indexedPanes"), d = P(() => l.value[i]), v = I(null), p = P(() => {
|
|
7256
7268
|
const g = isNaN(e.size) || e.size === void 0 ? 0 : parseFloat(e.size);
|
|
7257
7269
|
return Math.max(Math.min(g, $.value), _.value);
|
|
7258
7270
|
}), _ = P(() => {
|
|
@@ -7269,11 +7281,11 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7269
7281
|
min: _.value,
|
|
7270
7282
|
max: $.value,
|
|
7271
7283
|
// The given size (useful to know the user intention).
|
|
7272
|
-
givenSize: e.size === void 0 ? null :
|
|
7273
|
-
size:
|
|
7284
|
+
givenSize: e.size === void 0 ? null : p.value,
|
|
7285
|
+
size: p.value
|
|
7274
7286
|
// The computed current size at any time.
|
|
7275
7287
|
});
|
|
7276
|
-
}), Re(() =>
|
|
7288
|
+
}), Re(() => p.value, (g) => t({ uid: i, size: g })), Re(() => _.value, (g) => t({ uid: i, min: g })), Re(() => $.value, (g) => t({ uid: i, max: g })), Qr(() => o(i)), (g, C) => (c(), w("div", {
|
|
7277
7289
|
ref_key: "paneEl",
|
|
7278
7290
|
ref: v,
|
|
7279
7291
|
class: "d-splitter__panel",
|
|
@@ -7366,7 +7378,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7366
7378
|
set: (b) => {
|
|
7367
7379
|
t("update:modelValue", b);
|
|
7368
7380
|
}
|
|
7369
|
-
}), o = I(null), s = I(null), i = I(0), l = I(0), d = I(0), v = I(""),
|
|
7381
|
+
}), o = I(null), s = I(null), i = I(0), l = I(0), d = I(0), v = I(""), p = I("");
|
|
7370
7382
|
Re(() => a.value, () => {
|
|
7371
7383
|
if (a.value === "")
|
|
7372
7384
|
v.value = "";
|
|
@@ -7385,7 +7397,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7385
7397
|
});
|
|
7386
7398
|
}, $ = () => {
|
|
7387
7399
|
if (!(!n.form || !n.form.fields || !n.form.fields[n.name].rules))
|
|
7388
|
-
return
|
|
7400
|
+
return p.value = yn.validate(a.value, n.form.fields[n.name].rules), !!p.value;
|
|
7389
7401
|
}, E = (b) => {
|
|
7390
7402
|
a.value = b.model.id, v.value = b.model.title, t("select", b), $();
|
|
7391
7403
|
}, g = P(() => ({ left: i.value + "px", width: l.value + "px", top: d.value + "px", position: n.bodyAsParent ? "absolute" : "fixed", ...n.menuStyle }));
|
|
@@ -7395,7 +7407,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7395
7407
|
n.items[b].id === a.value && (v.value = n.items[b].title);
|
|
7396
7408
|
}), e({
|
|
7397
7409
|
setError: (b) => {
|
|
7398
|
-
|
|
7410
|
+
p.value = b;
|
|
7399
7411
|
},
|
|
7400
7412
|
validate: $
|
|
7401
7413
|
}), (b, k) => (c(), w("div", Uc, [
|
|
@@ -7442,10 +7454,10 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7442
7454
|
class: "d-error text-red",
|
|
7443
7455
|
innerHTML: n.error
|
|
7444
7456
|
}, null, 8, ad)) : O("", !0),
|
|
7445
|
-
|
|
7457
|
+
p.value ? (c(), w("div", {
|
|
7446
7458
|
key: 3,
|
|
7447
7459
|
class: "d-error text-red",
|
|
7448
|
-
innerHTML:
|
|
7460
|
+
innerHTML: p.value
|
|
7449
7461
|
}, null, 8, od)) : O("", !0)
|
|
7450
7462
|
]));
|
|
7451
7463
|
}
|
|
@@ -7509,10 +7521,10 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7509
7521
|
return;
|
|
7510
7522
|
}
|
|
7511
7523
|
a.value.show(), e("open"), it(() => {
|
|
7512
|
-
const f = a.value.elementSize(), u = o.value.getBoundingClientRect(),
|
|
7513
|
-
s.value = u.left, i.value = u.width, l.value =
|
|
7524
|
+
const f = a.value.elementSize(), u = o.value.getBoundingClientRect(), m = window.innerHeight;
|
|
7525
|
+
s.value = u.left, i.value = u.width, l.value = m - (u.y + u.height) < f.height ? u.top - f.height - 5 : u.height + u.top + 5, _(), (a.value?.itemsCount() === 0 || a.value?.itemsCount() === void 0) && a.value.hide();
|
|
7514
7526
|
});
|
|
7515
|
-
},
|
|
7527
|
+
}, p = (b) => {
|
|
7516
7528
|
d.value = "";
|
|
7517
7529
|
let k = -1;
|
|
7518
7530
|
for (let f = 0; f < n.value.length; f++)
|
|
@@ -7526,10 +7538,10 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7526
7538
|
const k = t.items.find((f) => f.id === b);
|
|
7527
7539
|
return k ? k.title : b;
|
|
7528
7540
|
})), g = (b, k, f) => {
|
|
7529
|
-
const u = t.items.find((
|
|
7541
|
+
const u = t.items.find((m) => m.title === f)?.id || f;
|
|
7530
7542
|
if (u) {
|
|
7531
|
-
const
|
|
7532
|
-
|
|
7543
|
+
const m = n.value.indexOf(u);
|
|
7544
|
+
m > -1 && n.value.splice(m, 1);
|
|
7533
7545
|
}
|
|
7534
7546
|
}, C = () => {
|
|
7535
7547
|
if (d.value && !t.noNewTags) {
|
|
@@ -7537,8 +7549,8 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7537
7549
|
for (let k = 0; k < b.length; k++) {
|
|
7538
7550
|
const f = b[k].toLowerCase().trim();
|
|
7539
7551
|
let u = !1;
|
|
7540
|
-
for (let
|
|
7541
|
-
n.value[
|
|
7552
|
+
for (let m = 0; m < n.value.length; m++)
|
|
7553
|
+
n.value[m] === f && (u = !0);
|
|
7542
7554
|
u || n.value.push(f);
|
|
7543
7555
|
}
|
|
7544
7556
|
d.value = "";
|
|
@@ -7559,7 +7571,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7559
7571
|
T("div", dd, [
|
|
7560
7572
|
(c(!0), w(me, null, we(E.value, (f, u) => (c(), H(Q(pe), {
|
|
7561
7573
|
key: u,
|
|
7562
|
-
onClick: Ce((
|
|
7574
|
+
onClick: Ce((m) => g(m, u, f), ["stop"]),
|
|
7563
7575
|
scale: "small"
|
|
7564
7576
|
}, {
|
|
7565
7577
|
default: Y(() => [
|
|
@@ -7597,7 +7609,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7597
7609
|
class: "dropdown-menu",
|
|
7598
7610
|
style: ue($.value),
|
|
7599
7611
|
"no-select": !1,
|
|
7600
|
-
onSelect:
|
|
7612
|
+
onSelect: p,
|
|
7601
7613
|
"render-item-title": t.renderItemTitle,
|
|
7602
7614
|
"before-item": t.beforeItem,
|
|
7603
7615
|
"body-as-parent": t.bodyAsParent,
|
|
@@ -7659,7 +7671,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7659
7671
|
}
|
|
7660
7672
|
}), a = I(null), o = I(null), s = I(0), i = I(0), l = I(0), d = I("");
|
|
7661
7673
|
let v = !0;
|
|
7662
|
-
const
|
|
7674
|
+
const p = (g, C = !0) => {
|
|
7663
7675
|
if (e("click", g), a.value.isShowed() && C) {
|
|
7664
7676
|
a.value.hide();
|
|
7665
7677
|
return;
|
|
@@ -7698,7 +7710,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7698
7710
|
class: "d-input-select",
|
|
7699
7711
|
ref_key: "buttonRef",
|
|
7700
7712
|
ref: o,
|
|
7701
|
-
onClick: Ce(
|
|
7713
|
+
onClick: Ce(p, ["stop", "prevent"])
|
|
7702
7714
|
}, [
|
|
7703
7715
|
F(Q(et), {
|
|
7704
7716
|
type: "hidden",
|
|
@@ -7709,7 +7721,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7709
7721
|
modelValue: d.value,
|
|
7710
7722
|
"onUpdate:modelValue": C[1] || (C[1] = (b) => d.value = b),
|
|
7711
7723
|
style: { "margin-bottom": "3px", "margin-top": "3px" },
|
|
7712
|
-
onKeyup: C[2] || (C[2] = (b) =>
|
|
7724
|
+
onKeyup: C[2] || (C[2] = (b) => p(b, !1)),
|
|
7713
7725
|
onInput: E
|
|
7714
7726
|
}, {
|
|
7715
7727
|
post: Y(() => [
|
|
@@ -7837,7 +7849,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7837
7849
|
},
|
|
7838
7850
|
emits: ["action", "select", "unselect", "check", "uncheck", "loading-change", "error"],
|
|
7839
7851
|
setup(r, { expose: e, emit: t }) {
|
|
7840
|
-
const n = r, a = I([]), o = I(n.page), s = I(localStorage.getItem(`datagrid-perpage-${n.id}`) || n.perPage), i = I(s.value.toString()), l = I({}), d = I(!1), v = I(0),
|
|
7852
|
+
const n = r, a = I([]), o = I(n.page), s = I(localStorage.getItem(`datagrid-perpage-${n.id}`) || n.perPage), i = I(s.value.toString()), l = I({}), d = I(!1), v = I(0), p = I(null), _ = I(!1);
|
|
7841
7853
|
N.mutations.addDataGrid(n.id), Be(() => {
|
|
7842
7854
|
$(), setTimeout(() => {
|
|
7843
7855
|
_.value = !0;
|
|
@@ -7849,7 +7861,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7849
7861
|
Object.hasOwn(Z, "search") && (Z.search === "string" || Z.search === "number" || Array.isArray(Z.search)) && (l.value[Z.key] = "");
|
|
7850
7862
|
}
|
|
7851
7863
|
}, E = async (V = !1) => {
|
|
7852
|
-
V && (o.value = 1), d.value = !0, t("loading-change", !0),
|
|
7864
|
+
V && (o.value = 1), d.value = !0, t("loading-change", !0), p.value = null;
|
|
7853
7865
|
try {
|
|
7854
7866
|
const Z = {
|
|
7855
7867
|
page: o.value,
|
|
@@ -7867,7 +7879,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7867
7879
|
else
|
|
7868
7880
|
throw new Error("Некорректный формат ответа от fetchData");
|
|
7869
7881
|
} catch (Z) {
|
|
7870
|
-
console.error("Ошибка при загрузке данных:", Z),
|
|
7882
|
+
console.error("Ошибка при загрузке данных:", Z), p.value = Z.message, t("error", Z), a.value = [], v.value = 0;
|
|
7871
7883
|
} finally {
|
|
7872
7884
|
d.value = !1, t("loading-change", !1);
|
|
7873
7885
|
}
|
|
@@ -7909,7 +7921,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7909
7921
|
V.target.checked ? a.value.forEach((Z) => {
|
|
7910
7922
|
N.mutations.addSelect(n.id, Z.id);
|
|
7911
7923
|
}) : N.actions.unselectAll(n.id);
|
|
7912
|
-
},
|
|
7924
|
+
}, m = P(() => a.value.length === 0 ? !1 : a.value.every((V) => k(V.id))), y = (V) => {
|
|
7913
7925
|
n.selectable === "one" && (k(V.id) ? (N.actions.unselectAll(n.id), t("unselect", V)) : (N.mutations.select(n.id, V.id), t("select", V)));
|
|
7914
7926
|
}, D = (V) => {
|
|
7915
7927
|
s.value = parseInt(i.value), localStorage.setItem(`datagrid-perpage-${n.id}`, i.value);
|
|
@@ -7935,8 +7947,8 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7935
7947
|
loadData: E
|
|
7936
7948
|
}), (V, Z) => (c(), w("div", Sd, [
|
|
7937
7949
|
d.value ? (c(), w("div", _d, Cd)) : O("", !0),
|
|
7938
|
-
|
|
7939
|
-
ie(" Ошибка: " + G(
|
|
7950
|
+
p.value ? (c(), w("div", $d, [
|
|
7951
|
+
ie(" Ошибка: " + G(p.value) + " ", 1),
|
|
7940
7952
|
T("button", {
|
|
7941
7953
|
onClick: E,
|
|
7942
7954
|
class: "d-retry-btn"
|
|
@@ -7948,7 +7960,7 @@ const Bc = /* @__PURE__ */ Ac(Rc), Nc = {
|
|
|
7948
7960
|
T("tr", Od, [
|
|
7949
7961
|
n.selectable === "check" ? (c(), w("th", Ld, [
|
|
7950
7962
|
F(un, {
|
|
7951
|
-
checked:
|
|
7963
|
+
checked: m.value,
|
|
7952
7964
|
onChange: Z[0] || (Z[0] = (U) => u(U)),
|
|
7953
7965
|
disabled: d.value
|
|
7954
7966
|
}, null, 8, ["checked", "disabled"])
|
|
@@ -8534,9 +8546,9 @@ function Rt(r) {
|
|
|
8534
8546
|
const n = t.width, a = n && r.matchPatterns[n] || r.matchPatterns[r.defaultMatchWidth], o = e.match(a);
|
|
8535
8547
|
if (!o)
|
|
8536
8548
|
return null;
|
|
8537
|
-
const s = o[0], i = n && r.parsePatterns[n] || r.parsePatterns[r.defaultParseWidth], l = Array.isArray(i) ? Vf(i, (
|
|
8549
|
+
const s = o[0], i = n && r.parsePatterns[n] || r.parsePatterns[r.defaultParseWidth], l = Array.isArray(i) ? Vf(i, (p) => p.test(s)) : (
|
|
8538
8550
|
// [TODO] -- I challenge you to fix the type
|
|
8539
|
-
If(i, (
|
|
8551
|
+
If(i, (p) => p.test(s))
|
|
8540
8552
|
);
|
|
8541
8553
|
let d;
|
|
8542
8554
|
d = r.valueCallback ? r.valueCallback(l) : l, d = t.valueCallback ? (
|
|
@@ -9409,23 +9421,23 @@ function Je(r, e, t) {
|
|
|
9409
9421
|
if (!cf(i))
|
|
9410
9422
|
throw new RangeError("Invalid time value");
|
|
9411
9423
|
let l = e.match(ap).map((v) => {
|
|
9412
|
-
const
|
|
9413
|
-
if (
|
|
9414
|
-
const _ = Nn[
|
|
9424
|
+
const p = v[0];
|
|
9425
|
+
if (p === "p" || p === "P") {
|
|
9426
|
+
const _ = Nn[p];
|
|
9415
9427
|
return _(v, a.formatLong);
|
|
9416
9428
|
}
|
|
9417
9429
|
return v;
|
|
9418
9430
|
}).join("").match(rp).map((v) => {
|
|
9419
9431
|
if (v === "''")
|
|
9420
9432
|
return { isToken: !1, value: "'" };
|
|
9421
|
-
const
|
|
9422
|
-
if (
|
|
9433
|
+
const p = v[0];
|
|
9434
|
+
if (p === "'")
|
|
9423
9435
|
return { isToken: !1, value: lp(v) };
|
|
9424
|
-
if (Hr[
|
|
9436
|
+
if (Hr[p])
|
|
9425
9437
|
return { isToken: !0, value: v };
|
|
9426
|
-
if (
|
|
9438
|
+
if (p.match(ip))
|
|
9427
9439
|
throw new RangeError(
|
|
9428
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
9440
|
+
"Format string contains an unescaped latin alphabet character `" + p + "`"
|
|
9429
9441
|
);
|
|
9430
9442
|
return { isToken: !1, value: v };
|
|
9431
9443
|
});
|
|
@@ -9437,10 +9449,10 @@ function Je(r, e, t) {
|
|
|
9437
9449
|
};
|
|
9438
9450
|
return l.map((v) => {
|
|
9439
9451
|
if (!v.isToken) return v.value;
|
|
9440
|
-
const
|
|
9441
|
-
(!t?.useAdditionalWeekYearTokens && ba(
|
|
9442
|
-
const _ = Hr[
|
|
9443
|
-
return _(i,
|
|
9452
|
+
const p = v.value;
|
|
9453
|
+
(!t?.useAdditionalWeekYearTokens && ba(p) || !t?.useAdditionalDayOfYearTokens && ya(p)) && Yn(p, e, String(r));
|
|
9454
|
+
const _ = Hr[p[0]];
|
|
9455
|
+
return _(i, p, a.localize, d);
|
|
9444
9456
|
}).join("");
|
|
9445
9457
|
}
|
|
9446
9458
|
function lp(r) {
|
|
@@ -10888,7 +10900,7 @@ function _a(r, e, t, n) {
|
|
|
10888
10900
|
firstWeekContainsDate: i,
|
|
10889
10901
|
weekStartsOn: l,
|
|
10890
10902
|
locale: s
|
|
10891
|
-
}, v = [new hp(n?.in, t)],
|
|
10903
|
+
}, v = [new hp(n?.in, t)], p = e.match(em).map((C) => {
|
|
10892
10904
|
const b = C[0];
|
|
10893
10905
|
if (b in Nn) {
|
|
10894
10906
|
const k = Nn[b];
|
|
@@ -10896,18 +10908,18 @@ function _a(r, e, t, n) {
|
|
|
10896
10908
|
}
|
|
10897
10909
|
return C;
|
|
10898
10910
|
}).join("").match(Jp), _ = [];
|
|
10899
|
-
for (let C of
|
|
10911
|
+
for (let C of p) {
|
|
10900
10912
|
ba(C) && Yn(C, e, r), ya(C) && Yn(C, e, r);
|
|
10901
10913
|
const b = C[0], k = Zp[b];
|
|
10902
10914
|
if (k) {
|
|
10903
10915
|
const { incompatibleTokens: f } = k;
|
|
10904
10916
|
if (Array.isArray(f)) {
|
|
10905
|
-
const
|
|
10917
|
+
const m = _.find(
|
|
10906
10918
|
(y) => f.includes(y.token) || y.token === b
|
|
10907
10919
|
);
|
|
10908
|
-
if (
|
|
10920
|
+
if (m)
|
|
10909
10921
|
throw new RangeError(
|
|
10910
|
-
`The format string mustn't contain \`${
|
|
10922
|
+
`The format string mustn't contain \`${m.fullToken}\` and \`${C}\` at the same time`
|
|
10911
10923
|
);
|
|
10912
10924
|
} else if (k.incompatibleTokens === "*" && _.length > 0)
|
|
10913
10925
|
throw new RangeError(
|
|
@@ -11068,11 +11080,11 @@ const um = {
|
|
|
11068
11080
|
return `${$} - ${E}`;
|
|
11069
11081
|
}), v = ($, E) => {
|
|
11070
11082
|
e("update:pageDate", E.value), e("yearClick");
|
|
11071
|
-
},
|
|
11083
|
+
}, p = () => e("update:pageDate", Da(t.pageDate, 10)), _ = () => e("update:pageDate", lr(t.pageDate, 10));
|
|
11072
11084
|
return ($, E) => (c(), w(me, null, [
|
|
11073
11085
|
T("div", cm, [
|
|
11074
11086
|
F(Qe, {
|
|
11075
|
-
onClick:
|
|
11087
|
+
onClick: p,
|
|
11076
11088
|
component: Q(bn),
|
|
11077
11089
|
size: "20",
|
|
11078
11090
|
style: { cursor: "pointer" },
|
|
@@ -11144,14 +11156,14 @@ const um = {
|
|
|
11144
11156
|
() => (f) => Je(f, "LLLL", {
|
|
11145
11157
|
locale: t.locale
|
|
11146
11158
|
})
|
|
11147
|
-
), o = (f, u,
|
|
11159
|
+
), o = (f, u, m, y) => y?.dates?.some((D) => En(f, D)) || y?.predicate?.(f) ? !1 : !u && !m ? !0 : u && qt(f, jt(u)) ? !1 : !(m && Wt(f, df(m))), s = P(
|
|
11148
11160
|
() => t.lowerLimit && (jn(t.lowerLimit, t.pageDate) || qt(t.pageDate, t.lowerLimit))
|
|
11149
11161
|
), i = P(
|
|
11150
11162
|
() => t.upperLimit && (jn(t.upperLimit, t.pageDate) || Wt(t.pageDate, t.upperLimit))
|
|
11151
11163
|
), l = P(() => fa(t.pageDate)), d = P(() => da(t.pageDate)), v = P(() => ({
|
|
11152
11164
|
start: l.value,
|
|
11153
11165
|
end: d.value
|
|
11154
|
-
})),
|
|
11166
|
+
})), p = P(() => ({
|
|
11155
11167
|
start: ut(l.value, {
|
|
11156
11168
|
weekStartsOn: t.weekStartsOn
|
|
11157
11169
|
}),
|
|
@@ -11160,27 +11172,27 @@ const um = {
|
|
|
11160
11172
|
})
|
|
11161
11173
|
})), _ = P(() => {
|
|
11162
11174
|
const f = t.weekStartsOn, u = n.value(t.weekdayFormat);
|
|
11163
|
-
return Array.from(Array(7)).map((
|
|
11164
|
-
(
|
|
11175
|
+
return Array.from(Array(7)).map((m, y) => (f + y) % 7).map(
|
|
11176
|
+
(m) => kn(/* @__PURE__ */ new Date(), m, {
|
|
11165
11177
|
weekStartsOn: t.weekStartsOn
|
|
11166
11178
|
})
|
|
11167
11179
|
).map(u);
|
|
11168
11180
|
}), $ = P(() => {
|
|
11169
11181
|
const f = /* @__PURE__ */ new Date(), u = n.value(t.format);
|
|
11170
|
-
return ff(
|
|
11171
|
-
(
|
|
11172
|
-
value:
|
|
11173
|
-
display: u(
|
|
11182
|
+
return ff(p.value).map(
|
|
11183
|
+
(m) => ({
|
|
11184
|
+
value: m,
|
|
11185
|
+
display: u(m),
|
|
11174
11186
|
//selected: !!props.selected && isSameDay(props.selected, value),
|
|
11175
|
-
selected: !!t.pageDate && En(t.pageDate,
|
|
11176
|
-
current: En(f,
|
|
11177
|
-
disabled: !t.allowOutsideInterval && !sm(
|
|
11178
|
-
|
|
11187
|
+
selected: !!t.pageDate && En(t.pageDate, m),
|
|
11188
|
+
current: En(f, m),
|
|
11189
|
+
disabled: !t.allowOutsideInterval && !sm(m, v.value) || !o(
|
|
11190
|
+
m,
|
|
11179
11191
|
t.lowerLimit,
|
|
11180
11192
|
t.upperLimit,
|
|
11181
11193
|
t.disabledDates
|
|
11182
11194
|
),
|
|
11183
|
-
key: n.value("yyyy-MM-dd")(
|
|
11195
|
+
key: n.value("yyyy-MM-dd")(m)
|
|
11184
11196
|
})
|
|
11185
11197
|
);
|
|
11186
11198
|
}), E = () => {
|
|
@@ -11216,21 +11228,21 @@ const um = {
|
|
|
11216
11228
|
}, null, 8, ["component", "class"])
|
|
11217
11229
|
]),
|
|
11218
11230
|
T("div", mm, [
|
|
11219
|
-
(c(!0), w(me, null, we(_.value, (
|
|
11231
|
+
(c(!0), w(me, null, we(_.value, (m, y) => (c(), w("div", {
|
|
11220
11232
|
class: "weekDay",
|
|
11221
|
-
key:
|
|
11233
|
+
key: m
|
|
11222
11234
|
}, [
|
|
11223
11235
|
T("div", {
|
|
11224
11236
|
class: oe([[5, 6].includes(y) ? "weekend" : ""])
|
|
11225
|
-
}, G(
|
|
11237
|
+
}, G(m), 3)
|
|
11226
11238
|
]))), 128)),
|
|
11227
|
-
(c(!0), w(me, null, we($.value, (
|
|
11228
|
-
key:
|
|
11229
|
-
day:
|
|
11230
|
-
disabled:
|
|
11231
|
-
selected:
|
|
11239
|
+
(c(!0), w(me, null, we($.value, (m) => (c(), H(fr, {
|
|
11240
|
+
key: m.key,
|
|
11241
|
+
day: m.display,
|
|
11242
|
+
disabled: m.disabled,
|
|
11243
|
+
selected: m.selected,
|
|
11232
11244
|
wide: !0,
|
|
11233
|
-
onSelect: (y) => C(y,
|
|
11245
|
+
onSelect: (y) => C(y, m)
|
|
11234
11246
|
}, null, 8, ["day", "disabled", "selected", "onSelect"]))), 128))
|
|
11235
11247
|
])
|
|
11236
11248
|
], 64));
|
|
@@ -11281,7 +11293,7 @@ const um = {
|
|
|
11281
11293
|
disabled: !s(g, t.lowerLimit, t.upperLimit)
|
|
11282
11294
|
})
|
|
11283
11295
|
)
|
|
11284
|
-
), v = P(() => rt(t.pageDate)),
|
|
11296
|
+
), v = P(() => rt(t.pageDate)), p = () => {
|
|
11285
11297
|
e("yearClick");
|
|
11286
11298
|
}, _ = (g, C) => {
|
|
11287
11299
|
e("update:pageDate", C.value), e("dayClick");
|
|
@@ -11297,7 +11309,7 @@ const um = {
|
|
|
11297
11309
|
}, null, 8, ["component", "class"]),
|
|
11298
11310
|
T("div", {
|
|
11299
11311
|
style: { cursor: "pointer" },
|
|
11300
|
-
onClick:
|
|
11312
|
+
onClick: p
|
|
11301
11313
|
}, G(v.value), 1),
|
|
11302
11314
|
F(Qe, {
|
|
11303
11315
|
onClick: E,
|
|
@@ -11358,7 +11370,7 @@ const um = {
|
|
|
11358
11370
|
},
|
|
11359
11371
|
emits: ["select", "monthPageChanged", "yearPageChanged", "decadePageChanged"],
|
|
11360
11372
|
setup(r, { emit: e }) {
|
|
11361
|
-
const t = r, n = I(t.initDate ? t.initDate : /* @__PURE__ */ new Date()), a = I(t.mode), o = (
|
|
11373
|
+
const t = r, n = I(t.initDate ? t.initDate : /* @__PURE__ */ new Date()), a = I(t.mode), o = (p, _) => {
|
|
11362
11374
|
n.value = _, e("monthPageChanged", _);
|
|
11363
11375
|
}, s = () => {
|
|
11364
11376
|
a.value = "day";
|
|
@@ -11368,10 +11380,10 @@ const um = {
|
|
|
11368
11380
|
a.value = "year";
|
|
11369
11381
|
}, d = P(() => Je(n.value, t.inputFormat, {
|
|
11370
11382
|
locale: t.locale
|
|
11371
|
-
})), v = (
|
|
11372
|
-
e("select",
|
|
11383
|
+
})), v = (p) => {
|
|
11384
|
+
e("select", p);
|
|
11373
11385
|
};
|
|
11374
|
-
return (
|
|
11386
|
+
return (p, _) => (c(), w("div", null, [
|
|
11375
11387
|
a.value === "day" ? (c(), H(Zt, {
|
|
11376
11388
|
key: 0,
|
|
11377
11389
|
"page-date": n.value,
|
|
@@ -11469,7 +11481,7 @@ const um = {
|
|
|
11469
11481
|
s.value = b, e("monthPageChanged", b);
|
|
11470
11482
|
}, v = () => {
|
|
11471
11483
|
i.value = "day";
|
|
11472
|
-
},
|
|
11484
|
+
}, p = () => {
|
|
11473
11485
|
i.value = "month";
|
|
11474
11486
|
}, _ = () => {
|
|
11475
11487
|
i.value = "year";
|
|
@@ -11515,7 +11527,7 @@ const um = {
|
|
|
11515
11527
|
"lower-limit": t.lowerLimit,
|
|
11516
11528
|
"upper-limit": t.upperLimit,
|
|
11517
11529
|
"onUpdate:pageDate": b[1] || (b[1] = (k) => d("day", k)),
|
|
11518
|
-
onMonthClick:
|
|
11530
|
+
onMonthClick: p,
|
|
11519
11531
|
onYearClick: _,
|
|
11520
11532
|
onSelect: E
|
|
11521
11533
|
}, null, 8, ["page-date", "locale", "lower-limit", "upper-limit"])) : O("", !0),
|
|
@@ -11536,7 +11548,7 @@ const um = {
|
|
|
11536
11548
|
"lower-limit": t.lowerLimit,
|
|
11537
11549
|
"upper-limit": t.upperLimit,
|
|
11538
11550
|
"onUpdate:pageDate": b[3] || (b[3] = (k) => d("day", k)),
|
|
11539
|
-
onYearClick:
|
|
11551
|
+
onYearClick: p
|
|
11540
11552
|
}, null, 8, ["page-date", "locale", "lower-limit", "upper-limit"])) : O("", !0),
|
|
11541
11553
|
r.showCurrentDate ? (c(), w("div", xm, G($.value), 1)) : O("", !0)
|
|
11542
11554
|
]),
|
|
@@ -11625,7 +11637,7 @@ const um = {
|
|
|
11625
11637
|
s.value = "day";
|
|
11626
11638
|
}, v = () => {
|
|
11627
11639
|
s.value = "month";
|
|
11628
|
-
},
|
|
11640
|
+
}, p = () => {
|
|
11629
11641
|
s.value = "year";
|
|
11630
11642
|
}, _ = P(() => Je(o.value, n.inputFormat, {
|
|
11631
11643
|
locale: n.locale
|
|
@@ -11657,7 +11669,7 @@ const um = {
|
|
|
11657
11669
|
"upper-limit": n.upperLimit,
|
|
11658
11670
|
"onUpdate:pageDate": k[0] || (k[0] = (f) => l("day", f)),
|
|
11659
11671
|
onMonthClick: v,
|
|
11660
|
-
onYearClick:
|
|
11672
|
+
onYearClick: p,
|
|
11661
11673
|
onSelect: $
|
|
11662
11674
|
}, null, 8, ["page-date", "locale", "lower-limit", "upper-limit"])) : O("", !0),
|
|
11663
11675
|
s.value === "month" ? (c(), H(Jt, {
|
|
@@ -11668,7 +11680,7 @@ const um = {
|
|
|
11668
11680
|
"upper-limit": n.upperLimit,
|
|
11669
11681
|
"onUpdate:pageDate": k[1] || (k[1] = (f) => l("day", f)),
|
|
11670
11682
|
onDayClick: d,
|
|
11671
|
-
onYearClick:
|
|
11683
|
+
onYearClick: p
|
|
11672
11684
|
}, null, 8, ["page-date", "locale", "lower-limit", "upper-limit"])) : O("", !0),
|
|
11673
11685
|
s.value === "year" ? (c(), H(Kt, {
|
|
11674
11686
|
key: 2,
|
|
@@ -11818,15 +11830,15 @@ const um = {
|
|
|
11818
11830
|
if (a.value) {
|
|
11819
11831
|
const u = a.value.split(" ");
|
|
11820
11832
|
i.value = _a(u[0], t.inputFormat, /* @__PURE__ */ new Date());
|
|
11821
|
-
const
|
|
11822
|
-
s.value.h =
|
|
11833
|
+
const m = u[1].split(":");
|
|
11834
|
+
s.value.h = m[0], s.value.m = m[1];
|
|
11823
11835
|
}
|
|
11824
11836
|
};
|
|
11825
11837
|
d();
|
|
11826
11838
|
const v = () => {
|
|
11827
11839
|
l.value = t.mode, d(), o.value.show();
|
|
11828
|
-
},
|
|
11829
|
-
i.value =
|
|
11840
|
+
}, p = (u, m) => {
|
|
11841
|
+
i.value = m, e("monthPageChanged", m);
|
|
11830
11842
|
}, _ = () => {
|
|
11831
11843
|
l.value = "day";
|
|
11832
11844
|
}, $ = () => {
|
|
@@ -11846,11 +11858,11 @@ const um = {
|
|
|
11846
11858
|
}, f = () => {
|
|
11847
11859
|
s.value.h = parseInt(s.value.h) < 10 ? `0${parseInt(s.value.h)}` : s.value.h;
|
|
11848
11860
|
};
|
|
11849
|
-
return (u,
|
|
11861
|
+
return (u, m) => (c(), w("div", null, [
|
|
11850
11862
|
F(et, {
|
|
11851
11863
|
label: t.label,
|
|
11852
11864
|
modelValue: a.value,
|
|
11853
|
-
"onUpdate:modelValue":
|
|
11865
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => a.value = y),
|
|
11854
11866
|
onClick: v,
|
|
11855
11867
|
readonly: t.readOnly
|
|
11856
11868
|
}, yt({ _: 2 }, [
|
|
@@ -11878,7 +11890,7 @@ const um = {
|
|
|
11878
11890
|
locale: t.locale,
|
|
11879
11891
|
"lower-limit": t.lowerLimit,
|
|
11880
11892
|
"upper-limit": t.upperLimit,
|
|
11881
|
-
"onUpdate:pageDate":
|
|
11893
|
+
"onUpdate:pageDate": m[1] || (m[1] = (y) => p("day", y)),
|
|
11882
11894
|
onMonthClick: $,
|
|
11883
11895
|
onYearClick: E,
|
|
11884
11896
|
onSelect: C
|
|
@@ -11889,7 +11901,7 @@ const um = {
|
|
|
11889
11901
|
locale: t.locale,
|
|
11890
11902
|
"lower-limit": t.lowerLimit,
|
|
11891
11903
|
"upper-limit": t.upperLimit,
|
|
11892
|
-
"onUpdate:pageDate":
|
|
11904
|
+
"onUpdate:pageDate": m[2] || (m[2] = (y) => p("day", y)),
|
|
11893
11905
|
onDayClick: _,
|
|
11894
11906
|
onYearClick: E
|
|
11895
11907
|
}, null, 8, ["page-date", "locale", "lower-limit", "upper-limit"])) : O("", !0),
|
|
@@ -11899,7 +11911,7 @@ const um = {
|
|
|
11899
11911
|
locale: t.locale,
|
|
11900
11912
|
"lower-limit": t.lowerLimit,
|
|
11901
11913
|
"upper-limit": t.upperLimit,
|
|
11902
|
-
"onUpdate:pageDate":
|
|
11914
|
+
"onUpdate:pageDate": m[3] || (m[3] = (y) => p("day", y)),
|
|
11903
11915
|
onYearClick: $
|
|
11904
11916
|
}, null, 8, ["page-date", "locale", "lower-limit", "upper-limit"])) : O("", !0),
|
|
11905
11917
|
r.showCurrentDate ? (c(), w("div", Mm, G(g.value), 1)) : O("", !0),
|
|
@@ -11910,7 +11922,7 @@ const um = {
|
|
|
11910
11922
|
min: 0,
|
|
11911
11923
|
max: 23,
|
|
11912
11924
|
modelValue: s.value.h,
|
|
11913
|
-
"onUpdate:modelValue":
|
|
11925
|
+
"onUpdate:modelValue": m[4] || (m[4] = (y) => s.value.h = y),
|
|
11914
11926
|
style: { width: "50px" },
|
|
11915
11927
|
"max-length": 2,
|
|
11916
11928
|
"input-style": { fontSize: "1.2em", textAlign: "center" }
|
|
@@ -11921,7 +11933,7 @@ const um = {
|
|
|
11921
11933
|
min: 0,
|
|
11922
11934
|
max: 59,
|
|
11923
11935
|
modelValue: s.value.m,
|
|
11924
|
-
"onUpdate:modelValue":
|
|
11936
|
+
"onUpdate:modelValue": m[5] || (m[5] = (y) => s.value.m = y),
|
|
11925
11937
|
style: { width: "50px" },
|
|
11926
11938
|
"max-length": 2,
|
|
11927
11939
|
"input-style": { fontSize: "1.2em", textAlign: "center" }
|
|
@@ -11940,7 +11952,7 @@ const um = {
|
|
|
11940
11952
|
_: 1
|
|
11941
11953
|
}),
|
|
11942
11954
|
F(pe, {
|
|
11943
|
-
onClick:
|
|
11955
|
+
onClick: m[6] || (m[6] = (y) => o.value.hide())
|
|
11944
11956
|
}, {
|
|
11945
11957
|
default: Y(() => [
|
|
11946
11958
|
ie(G(t.close), 1)
|
|
@@ -12017,9 +12029,9 @@ const um = {
|
|
|
12017
12029
|
(() => {
|
|
12018
12030
|
n.initDate && (s.value = n.initDate, o.value.h = `${s.value.getHours()}`, o.value.m = `${s.value.getMinutes()}`, d(), l());
|
|
12019
12031
|
})();
|
|
12020
|
-
const
|
|
12032
|
+
const p = () => {
|
|
12021
12033
|
i.value = n.mode, a.value.show();
|
|
12022
|
-
}, _ = (
|
|
12034
|
+
}, _ = (m, y) => {
|
|
12023
12035
|
s.value = y, t("monthPageChanged", y);
|
|
12024
12036
|
}, $ = () => {
|
|
12025
12037
|
i.value = "day";
|
|
@@ -12029,16 +12041,16 @@ const um = {
|
|
|
12029
12041
|
i.value = "year";
|
|
12030
12042
|
}, C = P(() => Je(s.value, n.inputFormat, {
|
|
12031
12043
|
locale: n.locale
|
|
12032
|
-
})), b = (
|
|
12033
|
-
t("select",
|
|
12044
|
+
})), b = (m) => {
|
|
12045
|
+
t("select", m);
|
|
12034
12046
|
}, k = () => {
|
|
12035
12047
|
s.value.setHours(parseInt(o.value.h)), s.value.setMinutes(parseInt(o.value.m)), t("apply", Je(s.value, n.inputFormat, { locale: n.locale })), a.value.hide();
|
|
12036
12048
|
};
|
|
12037
12049
|
return e({ show: () => {
|
|
12038
|
-
|
|
12039
|
-
}, setDate: (
|
|
12040
|
-
s.value =
|
|
12041
|
-
} }), (
|
|
12050
|
+
p();
|
|
12051
|
+
}, setDate: (m) => {
|
|
12052
|
+
s.value = m;
|
|
12053
|
+
} }), (m, y) => (c(), w("div", null, [
|
|
12042
12054
|
F(dt, {
|
|
12043
12055
|
ref_key: "modalRef",
|
|
12044
12056
|
ref: a,
|
|
@@ -12234,8 +12246,8 @@ const Dh = {
|
|
|
12234
12246
|
// NOTE: When adding props here, update `index.d.ts` as well!!
|
|
12235
12247
|
}, e);
|
|
12236
12248
|
function n(f) {
|
|
12237
|
-
var u = this.$$touchObj,
|
|
12238
|
-
|
|
12249
|
+
var u = this.$$touchObj, m = f.type.indexOf("touch") >= 0, y = f.type.indexOf("mouse") >= 0, D = this;
|
|
12250
|
+
m && (u.lastTouchStartTime = f.timeStamp), !(y && u.lastTouchStartTime && f.timeStamp - u.lastTouchStartTime < 350) && (u.touchStarted || ($(this), u.touchStarted = !0, u.touchMoved = !1, u.swipeOutBounded = !1, u.isZooming = !1, u.startX = jr(f), u.startY = Wr(f), u.currentX = 0, u.currentY = 0, u.touchStartTime = f.timeStamp, u.hasSwipe = p(u, "swipe") || p(u, "swipe.left") || p(u, "swipe.right") || p(u, "swipe.top") || p(u, "swipe.bottom"), u.hasZoom = p(u, "zoom") || p(u, "zoom.in") || p(u, "zoom.out"), p(u, "hold") && (u.touchHoldTimer = setTimeout(function() {
|
|
12239
12251
|
u.touchHoldTimer = null, _(f, D, "hold");
|
|
12240
12252
|
}, u.options.touchHoldTolerance)), _(f, this, "press")));
|
|
12241
12253
|
}
|
|
@@ -12243,16 +12255,16 @@ const Dh = {
|
|
|
12243
12255
|
var u = this.$$touchObj;
|
|
12244
12256
|
if (u.touchStarted == !0)
|
|
12245
12257
|
o(f, u, !1);
|
|
12246
|
-
else if (
|
|
12247
|
-
var
|
|
12258
|
+
else if (p(u, "rollover") && f.clientX != null) {
|
|
12259
|
+
var m = f;
|
|
12248
12260
|
const y = u.element.getBoundingClientRect();
|
|
12249
|
-
|
|
12261
|
+
m.clientX >= y.left && m.clientX <= y.right && m.clientY >= y.top && m.clientY <= y.bottom && o(f, u, !0);
|
|
12250
12262
|
}
|
|
12251
12263
|
}
|
|
12252
|
-
function o(f, u = null,
|
|
12264
|
+
function o(f, u = null, m = !1) {
|
|
12253
12265
|
u == null && (u = this.$$touchObj);
|
|
12254
12266
|
var y = jr(f), D = Wr(f), R = u.currentX != y || u.currentY != D;
|
|
12255
|
-
if (u.currentX = y, u.currentY = D, !
|
|
12267
|
+
if (u.currentX = y, u.currentY = D, !m)
|
|
12256
12268
|
if (u.touchMoved) {
|
|
12257
12269
|
if (u.hasSwipe && !u.swipeOutBounded) {
|
|
12258
12270
|
var ne = u.options.swipeTolerance;
|
|
@@ -12262,12 +12274,12 @@ const Dh = {
|
|
|
12262
12274
|
var K = u.options.tapTolerance;
|
|
12263
12275
|
u.touchMoved = Math.abs(u.startX - u.currentX) > K || Math.abs(u.startY - u.currentY) > K, u.touchMoved && (g(u), _(f, u.element, "drag.once"));
|
|
12264
12276
|
}
|
|
12265
|
-
if (R &&
|
|
12277
|
+
if (R && p(u, "rollover")) {
|
|
12266
12278
|
var q = f.timeStamp;
|
|
12267
12279
|
(u.touchRollTime == null || q > u.touchRollTime + u.options.rollOverFrequency) && (u.touchRollTime = q, _(f, u.element, "rollover"));
|
|
12268
12280
|
}
|
|
12269
|
-
if (!
|
|
12270
|
-
if (u.touchStarted && u.touchMoved && R &&
|
|
12281
|
+
if (!m) {
|
|
12282
|
+
if (u.touchStarted && u.touchMoved && R && p(u, "drag")) {
|
|
12271
12283
|
var q = f.timeStamp;
|
|
12272
12284
|
(u.touchDragTime == null || q > u.touchDragTime + u.options.dragFrequency) && (u.touchDragTime = q, _(f, u.element, "drag"));
|
|
12273
12285
|
}
|
|
@@ -12278,14 +12290,14 @@ const Dh = {
|
|
|
12278
12290
|
}
|
|
12279
12291
|
}
|
|
12280
12292
|
function s(f, u) {
|
|
12281
|
-
const
|
|
12282
|
-
if (
|
|
12293
|
+
const m = u.changedTouches;
|
|
12294
|
+
if (m.length !== 2) {
|
|
12283
12295
|
f.isZooming = !1;
|
|
12284
12296
|
return;
|
|
12285
12297
|
}
|
|
12286
12298
|
const y = Math.sqrt(
|
|
12287
|
-
Math.pow(
|
|
12288
|
-
Math.pow(
|
|
12299
|
+
Math.pow(m[0].clientX - m[1].clientX, 2) + // horizontal distance
|
|
12300
|
+
Math.pow(m[0].clientY - m[1].clientY, 2)
|
|
12289
12301
|
// vertical distance
|
|
12290
12302
|
);
|
|
12291
12303
|
if (!f.isZooming) {
|
|
@@ -12293,7 +12305,7 @@ const Dh = {
|
|
|
12293
12305
|
return;
|
|
12294
12306
|
}
|
|
12295
12307
|
const D = y / f.initialZoomDistance;
|
|
12296
|
-
|
|
12308
|
+
p(f, "zoom") && Math.abs(D - 1) > f.options.zoomDistance / f.initialZoomDistance && _(u, f.element, "zoom", D), (p(f, "zoom.in") || p(f, "zoom.out")) && Math.abs(y - f.initialZoomDistance) > f.options.zoomInOutDistance && (y > f.initialZoomDistance ? _(u, f.element, "zoom.in") : _(u, f.element, "zoom.out")), f.isZooming = !1;
|
|
12297
12309
|
}
|
|
12298
12310
|
function i() {
|
|
12299
12311
|
var f = this.$$touchObj;
|
|
@@ -12302,19 +12314,19 @@ const Dh = {
|
|
|
12302
12314
|
function l(f) {
|
|
12303
12315
|
var u = this.$$touchObj;
|
|
12304
12316
|
if (u.touchStarted == !0) {
|
|
12305
|
-
var
|
|
12306
|
-
|
|
12307
|
-
var D =
|
|
12317
|
+
var m = f.type.indexOf("touch") >= 0, y = f.type.indexOf("mouse") >= 0;
|
|
12318
|
+
m && (u.lastTouchEndTime = f.timeStamp);
|
|
12319
|
+
var D = m && !u.touchHoldTimer;
|
|
12308
12320
|
if (g(u), u.touchStarted = !1, E(this), y && u.lastTouchEndTime && f.timeStamp - u.lastTouchEndTime < 350)
|
|
12309
12321
|
return;
|
|
12310
12322
|
if (_(f, this, "release"), u.touchMoved) {
|
|
12311
12323
|
if (u.hasSwipe && !u.swipeOutBounded) {
|
|
12312
12324
|
var R = u.options.swipeTolerance, K, ne = Math.abs(u.startY - u.currentY), q = Math.abs(u.startX - u.currentX);
|
|
12313
|
-
(ne > R || q > R) && (q > R ? K = u.startX > u.currentX ? "left" : "right" : K = u.startY > u.currentY ? "top" : "bottom",
|
|
12325
|
+
(ne > R || q > R) && (q > R ? K = u.startX > u.currentX ? "left" : "right" : K = u.startY > u.currentY ? "top" : "bottom", p(u, "swipe." + K) ? _(f, this, "swipe." + K, K) : _(f, this, "swipe", K));
|
|
12314
12326
|
}
|
|
12315
|
-
} else if (
|
|
12327
|
+
} else if (p(u, "longtap") && f.timeStamp - u.touchStartTime > u.options.longTapTimeInterval)
|
|
12316
12328
|
f.cancelable && f.preventDefault(), _(f, this, "longtap");
|
|
12317
|
-
else if (
|
|
12329
|
+
else if (p(u, "hold") && D) {
|
|
12318
12330
|
f.cancelable && f.preventDefault();
|
|
12319
12331
|
return;
|
|
12320
12332
|
} else
|
|
@@ -12327,12 +12339,12 @@ const Dh = {
|
|
|
12327
12339
|
function v() {
|
|
12328
12340
|
E(this);
|
|
12329
12341
|
}
|
|
12330
|
-
function
|
|
12331
|
-
var
|
|
12332
|
-
return
|
|
12342
|
+
function p(f, u) {
|
|
12343
|
+
var m = f.callbacks[u];
|
|
12344
|
+
return m != null && m.length > 0;
|
|
12333
12345
|
}
|
|
12334
|
-
function _(f, u,
|
|
12335
|
-
var D = u.$$touchObj, R = D.callbacks[
|
|
12346
|
+
function _(f, u, m, y) {
|
|
12347
|
+
var D = u.$$touchObj, R = D.callbacks[m];
|
|
12336
12348
|
if (R == null || R.length === 0)
|
|
12337
12349
|
return null;
|
|
12338
12350
|
for (var K = 0; K < R.length; K++) {
|
|
@@ -12352,7 +12364,7 @@ const Dh = {
|
|
|
12352
12364
|
f && f.touchHoldTimer && (clearTimeout(f.touchHoldTimer), f.touchHoldTimer = null);
|
|
12353
12365
|
}
|
|
12354
12366
|
function C(f, u) {
|
|
12355
|
-
var
|
|
12367
|
+
var m = f.$$touchObj || {
|
|
12356
12368
|
element: f,
|
|
12357
12369
|
// an object contains all callbacks registered,
|
|
12358
12370
|
// key is event name, value is an array
|
|
@@ -12363,25 +12375,25 @@ const Dh = {
|
|
|
12363
12375
|
options: t,
|
|
12364
12376
|
events: {}
|
|
12365
12377
|
};
|
|
12366
|
-
return u && (
|
|
12378
|
+
return u && (m.options = Object.assign({}, m.options, u)), f.$$touchObj = m, f.$$touchObj;
|
|
12367
12379
|
}
|
|
12368
12380
|
function b(f) {
|
|
12369
12381
|
for (const u in f)
|
|
12370
12382
|
if (f.hasOwnProperty(u)) {
|
|
12371
|
-
const [
|
|
12372
|
-
|
|
12383
|
+
const [m, y] = f[u];
|
|
12384
|
+
m.addEventListener(u, y);
|
|
12373
12385
|
}
|
|
12374
12386
|
}
|
|
12375
12387
|
function k(f) {
|
|
12376
12388
|
for (const u in f)
|
|
12377
12389
|
if (f.hasOwnProperty(u)) {
|
|
12378
|
-
const [
|
|
12379
|
-
|
|
12390
|
+
const [m, y] = f[u];
|
|
12391
|
+
m.removeEventListener(u, y);
|
|
12380
12392
|
}
|
|
12381
12393
|
}
|
|
12382
12394
|
r.directive(t.namespace, {
|
|
12383
12395
|
beforeMount: function(f, u) {
|
|
12384
|
-
var
|
|
12396
|
+
var m = C(f), y = u.arg || "tap";
|
|
12385
12397
|
switch (y) {
|
|
12386
12398
|
case "swipe":
|
|
12387
12399
|
var D = u.modifiers;
|
|
@@ -12389,18 +12401,18 @@ const Dh = {
|
|
|
12389
12401
|
for (var R in u.modifiers)
|
|
12390
12402
|
if (["left", "right", "top", "bottom"].indexOf(R) >= 0) {
|
|
12391
12403
|
var K = "swipe." + R;
|
|
12392
|
-
|
|
12404
|
+
m.callbacks[K] = m.callbacks[K] || [], m.callbacks[K].push(u);
|
|
12393
12405
|
}
|
|
12394
12406
|
} else
|
|
12395
|
-
|
|
12407
|
+
m.callbacks.swipe = m.callbacks.swipe || [], m.callbacks.swipe.push(u);
|
|
12396
12408
|
break;
|
|
12397
12409
|
case "press":
|
|
12398
12410
|
case "drag":
|
|
12399
12411
|
u.modifiers.disablePassive;
|
|
12400
12412
|
default:
|
|
12401
|
-
|
|
12413
|
+
m.callbacks[y] = m.callbacks[y] || [], m.callbacks[y].push(u);
|
|
12402
12414
|
}
|
|
12403
|
-
|
|
12415
|
+
m.hasBindTouchEvents || (m.options.dragOutside ? (m.events.touchstart = [f, n], m.events.touchmove = [window, a.bind(f)], m.events.touchcancel = [window, i.bind(f)], m.events.touchend = [window, l.bind(f)]) : (m.events.touchstart = [f, n], m.events.touchmove = [f, a], m.events.touchcancel = [f, i], m.events.touchend = [f, l]), m.options.disableClick || (m.options.dragOutside ? (m.events.mousedown = [f, n], m.events.mousemove = [window, a.bind(f)], m.events.mouseup = [window, l.bind(f)], m.events.mouseenter = [f, d], m.events.mouseleave = [f, v]) : (m.events.mousedown = [f, n], m.events.mousemove = [f, o], m.events.mouseup = [f, l], m.events.mouseenter = [f, d], m.events.mouseleave = [f, v])), b(m.events), m.hasBindTouchEvents = !0);
|
|
12404
12416
|
},
|
|
12405
12417
|
unmounted: function(f) {
|
|
12406
12418
|
var u = f.$$touchObj;
|