@syntify/office 0.1.22-beta.5 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/syntify-office.es.js +153 -153
- package/dist/syntify-office.umd.js +8 -8
- package/package.json +1 -1
|
@@ -18,8 +18,8 @@ const _g = /* @__PURE__ */ bn({
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["close"],
|
|
20
20
|
setup(p, { emit: A }) {
|
|
21
|
-
const o = A, q = vg(),
|
|
22
|
-
|
|
21
|
+
const o = A, q = vg(), I = Gt(p.to), W = (L) => {
|
|
22
|
+
I.value = L, o("close");
|
|
23
23
|
}, v = Hn(() => q.path.split("/")[1]);
|
|
24
24
|
return (L, P) => {
|
|
25
25
|
const H = Pv("RouterLink");
|
|
@@ -32,11 +32,11 @@ const _g = /* @__PURE__ */ bn({
|
|
|
32
32
|
O("i", {
|
|
33
33
|
class: qn([[
|
|
34
34
|
p.icon,
|
|
35
|
-
|
|
35
|
+
I.value === `/${v.value}` ? "synt-office-link-color-primary" : ""
|
|
36
36
|
], "synt-office-link-icon"])
|
|
37
37
|
}, null, 2),
|
|
38
38
|
O("span", {
|
|
39
|
-
class: qn([[
|
|
39
|
+
class: qn([[I.value === `/${v.value}` ? "synt-office-link-font-bold" : ""], "synt-office-link-label"])
|
|
40
40
|
}, Pt(p.label), 3)
|
|
41
41
|
]),
|
|
42
42
|
_: 1
|
|
@@ -45,8 +45,8 @@ const _g = /* @__PURE__ */ bn({
|
|
|
45
45
|
}
|
|
46
46
|
}), Fr = (p, A) => {
|
|
47
47
|
const o = p.__vccOpts || p;
|
|
48
|
-
for (const [q,
|
|
49
|
-
o[q] =
|
|
48
|
+
for (const [q, I] of A)
|
|
49
|
+
o[q] = I;
|
|
50
50
|
return o;
|
|
51
51
|
}, r1 = /* @__PURE__ */ Fr(_g, [["__scopeId", "data-v-1d74c6dc"]]), yg = {}, mg = { class: "synt-office-layout-wrapper" };
|
|
52
52
|
function wg(p, A) {
|
|
@@ -126,7 +126,7 @@ const bg = /* @__PURE__ */ Fr(yg, [["render", wg], ["__scopeId", "data-v-5c72098
|
|
|
126
126
|
emits: ["refresh"],
|
|
127
127
|
setup(p, { emit: A }) {
|
|
128
128
|
return (o, q) => {
|
|
129
|
-
const
|
|
129
|
+
const I = Pv("RouterLink");
|
|
130
130
|
return ot(), Nr(nn(sg), {
|
|
131
131
|
icon: o.model.info.icon,
|
|
132
132
|
label: o.model.label
|
|
@@ -134,7 +134,7 @@ const bg = /* @__PURE__ */ Fr(yg, [["render", wg], ["__scopeId", "data-v-5c72098
|
|
|
134
134
|
end: he(() => {
|
|
135
135
|
var W, v, L;
|
|
136
136
|
return [
|
|
137
|
-
(W = o.model.excludes) != null && W.includes("create") ? be("", !0) : (ot(), Nr(
|
|
137
|
+
(W = o.model.excludes) != null && W.includes("create") ? be("", !0) : (ot(), Nr(I, {
|
|
138
138
|
key: 0,
|
|
139
139
|
to: {
|
|
140
140
|
path: `${o.model.collection.path}/new`,
|
|
@@ -284,7 +284,7 @@ function Mg() {
|
|
|
284
284
|
K.stopPropagation(), this.options.onClick();
|
|
285
285
|
}).bind(this)
|
|
286
286
|
), typeof this.options.offset == "object") {
|
|
287
|
-
var It =
|
|
287
|
+
var It = I("x", this.options), ft = I("y", this.options), U = this.options.position == "left" ? It : "-" + It, X = this.options.gravity == "toastify-top" ? ft : "-" + ft;
|
|
288
288
|
v.style.transform = "translate(" + U + "," + X + ")";
|
|
289
289
|
}
|
|
290
290
|
return v;
|
|
@@ -334,7 +334,7 @@ function Mg() {
|
|
|
334
334
|
}
|
|
335
335
|
return this;
|
|
336
336
|
};
|
|
337
|
-
function
|
|
337
|
+
function I(v, L) {
|
|
338
338
|
return L.offset[v] ? isNaN(L.offset[v]) ? L.offset[v] : L.offset[v] + "px" : "0px";
|
|
339
339
|
}
|
|
340
340
|
function W(v, L) {
|
|
@@ -355,7 +355,7 @@ function Bg() {
|
|
|
355
355
|
(function(o, q) {
|
|
356
356
|
p.exports = q();
|
|
357
357
|
})(kg, function() {
|
|
358
|
-
var o = 1e3, q = 6e4,
|
|
358
|
+
var o = 1e3, q = 6e4, I = 36e5, W = "millisecond", v = "second", L = "minute", P = "hour", H = "day", tt = "week", J = "month", It = "quarter", ft = "year", U = "date", X = "Invalid Date", K = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, nt = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, ne = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(T) {
|
|
359
359
|
var b = ["th", "st", "nd", "rd"], w = T % 100;
|
|
360
360
|
return "[" + T + (b[(w - 20) % 10] || b[w] || b[0]) + "]";
|
|
361
361
|
} }, At = function(T, b, w) {
|
|
@@ -391,13 +391,13 @@ function Bg() {
|
|
|
391
391
|
$t[Z] = b, m = Z;
|
|
392
392
|
}
|
|
393
393
|
return !S && m && (rt = m), m || !S && rt;
|
|
394
|
-
},
|
|
394
|
+
}, D = function(T, b) {
|
|
395
395
|
if (Yt(T)) return T.clone();
|
|
396
396
|
var w = typeof b == "object" ? b : {};
|
|
397
397
|
return w.date = T, w.args = arguments, new Dt(w);
|
|
398
398
|
}, E = Bt;
|
|
399
399
|
E.l = at, E.i = Yt, E.w = function(T, b) {
|
|
400
|
-
return
|
|
400
|
+
return D(T, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset });
|
|
401
401
|
};
|
|
402
402
|
var Dt = function() {
|
|
403
403
|
function T(w) {
|
|
@@ -427,12 +427,12 @@ function Bg() {
|
|
|
427
427
|
}, b.isValid = function() {
|
|
428
428
|
return this.$d.toString() !== X;
|
|
429
429
|
}, b.isSame = function(w, S) {
|
|
430
|
-
var m =
|
|
430
|
+
var m = D(w);
|
|
431
431
|
return this.startOf(S) <= m && m <= this.endOf(S);
|
|
432
432
|
}, b.isAfter = function(w, S) {
|
|
433
|
-
return
|
|
433
|
+
return D(w) < this.startOf(S);
|
|
434
434
|
}, b.isBefore = function(w, S) {
|
|
435
|
-
return this.endOf(S) <
|
|
435
|
+
return this.endOf(S) < D(w);
|
|
436
436
|
}, b.$g = function(w, S, m) {
|
|
437
437
|
return E.u(w) ? this[S] : this.set(m, w);
|
|
438
438
|
}, b.unix = function() {
|
|
@@ -483,14 +483,14 @@ function Bg() {
|
|
|
483
483
|
var m, R = this;
|
|
484
484
|
w = Number(w);
|
|
485
485
|
var N = E.p(S), Z = function(St) {
|
|
486
|
-
var bt =
|
|
486
|
+
var bt = D(R);
|
|
487
487
|
return E.w(bt.date(bt.date() + Math.round(St * w)), R);
|
|
488
488
|
};
|
|
489
489
|
if (N === J) return this.set(J, this.$M + w);
|
|
490
490
|
if (N === ft) return this.set(ft, this.$y + w);
|
|
491
491
|
if (N === H) return Z(1);
|
|
492
492
|
if (N === tt) return Z(7);
|
|
493
|
-
var vt = (m = {}, m[L] = q, m[P] =
|
|
493
|
+
var vt = (m = {}, m[L] = q, m[P] = I, m[v] = o, m)[N] || 1, wt = this.$d.getTime() + w * vt;
|
|
494
494
|
return E.w(wt, this);
|
|
495
495
|
}, b.subtract = function(w, S) {
|
|
496
496
|
return this.add(-1 * w, S);
|
|
@@ -563,7 +563,7 @@ function Bg() {
|
|
|
563
563
|
}, b.utcOffset = function() {
|
|
564
564
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
565
565
|
}, b.diff = function(w, S, m) {
|
|
566
|
-
var R, N = this, Z = E.p(S), vt =
|
|
566
|
+
var R, N = this, Z = E.p(S), vt = D(w), wt = (vt.utcOffset() - this.utcOffset()) * q, St = this - vt, bt = function() {
|
|
567
567
|
return E.m(N, vt);
|
|
568
568
|
};
|
|
569
569
|
switch (Z) {
|
|
@@ -583,7 +583,7 @@ function Bg() {
|
|
|
583
583
|
R = (St - wt) / 864e5;
|
|
584
584
|
break;
|
|
585
585
|
case P:
|
|
586
|
-
R = St /
|
|
586
|
+
R = St / I;
|
|
587
587
|
break;
|
|
588
588
|
case L:
|
|
589
589
|
R = St / q;
|
|
@@ -615,15 +615,15 @@ function Bg() {
|
|
|
615
615
|
return this.$d.toUTCString();
|
|
616
616
|
}, T;
|
|
617
617
|
}(), ce = Dt.prototype;
|
|
618
|
-
return
|
|
618
|
+
return D.prototype = ce, [["$ms", W], ["$s", v], ["$m", L], ["$H", P], ["$W", H], ["$M", J], ["$y", ft], ["$D", U]].forEach(function(T) {
|
|
619
619
|
ce[T[1]] = function(b) {
|
|
620
620
|
return this.$g(b, T[0], T[1]);
|
|
621
621
|
};
|
|
622
|
-
}),
|
|
623
|
-
return T.$i || (T(b, Dt,
|
|
624
|
-
},
|
|
625
|
-
return
|
|
626
|
-
},
|
|
622
|
+
}), D.extend = function(T, b) {
|
|
623
|
+
return T.$i || (T(b, Dt, D), T.$i = !0), D;
|
|
624
|
+
}, D.locale = at, D.isDayjs = Yt, D.unix = function(T) {
|
|
625
|
+
return D(1e3 * T);
|
|
626
|
+
}, D.en = $t[rt], D.Ls = $t, D.p = {}, D;
|
|
627
627
|
});
|
|
628
628
|
}(Wv)), Wv.exports;
|
|
629
629
|
}
|
|
@@ -647,17 +647,17 @@ const Pg = ["disabled"], Ug = /* @__PURE__ */ bn({
|
|
|
647
647
|
emits: ["click"],
|
|
648
648
|
setup(p, { emit: A }) {
|
|
649
649
|
const o = p, q = Hn(() => o.color == "success" ? "text-green-100 bg-green-600 border-green-700 hover:text-white hover:bg-green-700" : o.color == "danger" ? "text-red-100 bg-red-600 border-red-700 hover:text-white hover:bg-red-700" : o.color == "warning" ? "text-yellow-900 bg-yellow-500 border-yellow-600 hover:text-white hover:bg-yellow-600" : "text-gray-200 bg-gray-900 border-black hover:text-white hover:bg-black");
|
|
650
|
-
return (
|
|
650
|
+
return (I, W) => (ot(), ht("button", {
|
|
651
651
|
type: "button",
|
|
652
652
|
class: qn([
|
|
653
653
|
"min-w-20 gap-1.5 duration-300 border-2 px-2.5 py-1 rounded-full flex justify-center items-center disabled:text-gray-400 disabled:bg-border disabled:border-2 disabled:border-gray-300",
|
|
654
654
|
q.value
|
|
655
655
|
]),
|
|
656
|
-
onClick: W[0] || (W[0] = rn((v) =>
|
|
657
|
-
disabled:
|
|
656
|
+
onClick: W[0] || (W[0] = rn((v) => I.$emit("click"), ["stop", "prevent"])),
|
|
657
|
+
disabled: I.isDisabled
|
|
658
658
|
}, [
|
|
659
|
-
qt(
|
|
660
|
-
O("span", null, Pt(
|
|
659
|
+
qt(I.$slots, "default"),
|
|
660
|
+
O("span", null, Pt(I.label), 1)
|
|
661
661
|
], 10, Pg));
|
|
662
662
|
}
|
|
663
663
|
}), zg = {
|
|
@@ -671,7 +671,7 @@ const Pg = ["disabled"], Ug = /* @__PURE__ */ bn({
|
|
|
671
671
|
},
|
|
672
672
|
emits: ["on:delete"],
|
|
673
673
|
setup(p, { emit: A }) {
|
|
674
|
-
const o = A, q = Gt(!1),
|
|
674
|
+
const o = A, q = Gt(!1), I = async () => {
|
|
675
675
|
q.value = !0;
|
|
676
676
|
}, W = async () => {
|
|
677
677
|
q.value = !1;
|
|
@@ -683,7 +683,7 @@ const Pg = ["disabled"], Ug = /* @__PURE__ */ bn({
|
|
|
683
683
|
label: "Hapus",
|
|
684
684
|
color: "danger",
|
|
685
685
|
"is-disabled": L.isDisabled,
|
|
686
|
-
onClick:
|
|
686
|
+
onClick: I
|
|
687
687
|
}, {
|
|
688
688
|
default: he(() => P[0] || (P[0] = [
|
|
689
689
|
O("i", { class: "fa-solid fa-trash" }, null, -1)
|
|
@@ -755,7 +755,7 @@ const Pg = ["disabled"], Ug = /* @__PURE__ */ bn({
|
|
|
755
755
|
},
|
|
756
756
|
emits: ["on:delete"],
|
|
757
757
|
setup(p, { emit: A }) {
|
|
758
|
-
const o = p, q = gg(),
|
|
758
|
+
const o = p, q = gg(), I = Hn(() => o.model.definition.replace(":", "_").replace("/", "")), W = Gt({
|
|
759
759
|
visible: !1,
|
|
760
760
|
x: 0,
|
|
761
761
|
y: 0,
|
|
@@ -808,7 +808,7 @@ const Pg = ["disabled"], Ug = /* @__PURE__ */ bn({
|
|
|
808
808
|
var K;
|
|
809
809
|
return ot(), ht(Kn, null, [
|
|
810
810
|
O("div", {
|
|
811
|
-
id:
|
|
811
|
+
id: I.value,
|
|
812
812
|
class: "synt-office-collection-table-wrapper"
|
|
813
813
|
}, [
|
|
814
814
|
qt(U.$slots, "default", {}, void 0, !0),
|
|
@@ -834,7 +834,7 @@ const Pg = ["disabled"], Ug = /* @__PURE__ */ bn({
|
|
|
834
834
|
}, [
|
|
835
835
|
O("td", null, Pt(ne + 1), 1),
|
|
836
836
|
(ot(!0), ht(Kn, null, ao(U.model.collection.columns, (rt, $t) => {
|
|
837
|
-
var Lt, Yt, at,
|
|
837
|
+
var Lt, Yt, at, D, E;
|
|
838
838
|
return ot(), ht("td", { key: $t }, [
|
|
839
839
|
rt.type == "currency" ? (ot(), ht("div", Qg, Pt(nn(Rg)(nt[rt.handle])), 1)) : rt.type == "date" ? (ot(), ht("div", t0, Pt(nn(Ng)(nt[rt.handle])), 1)) : rt.type == "datetime" ? (ot(), ht("div", e0, Pt(nn(Fg)(nt[rt.handle])), 1)) : rt.type == "choice" ? (ot(), ht("div", {
|
|
840
840
|
key: 3,
|
|
@@ -847,7 +847,7 @@ const Pg = ["disabled"], Ug = /* @__PURE__ */ bn({
|
|
|
847
847
|
(Yt = rt.choices[nt[rt.handle]]) == null ? void 0 : Yt.color
|
|
848
848
|
) ? void 0 : {
|
|
849
849
|
backgroundColor: (at = rt.choices[nt[rt.handle]]) == null ? void 0 : at.color,
|
|
850
|
-
color: ((
|
|
850
|
+
color: ((D = rt.choices[nt[rt.handle]]) == null ? void 0 : D.textColor) ?? "black"
|
|
851
851
|
}
|
|
852
852
|
)
|
|
853
853
|
}, Pt(((E = rt.choices[nt[rt.handle]]) == null ? void 0 : E.name) ?? nt[rt.handle]), 7)) : (ot(), ht("div", n0, Pt(nt[rt.handle]), 1))
|
|
@@ -974,7 +974,7 @@ var y0 = Hs.exports, Zv;
|
|
|
974
974
|
function m0() {
|
|
975
975
|
return Zv || (Zv = 1, function(p, A) {
|
|
976
976
|
(function() {
|
|
977
|
-
var o, q = "4.17.21",
|
|
977
|
+
var o, q = "4.17.21", I = 200, W = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", v = "Expected a function", L = "Invalid `variable` option passed into `_.template`", P = "__lodash_hash_undefined__", H = 500, tt = "__lodash_placeholder__", J = 1, It = 2, ft = 4, U = 1, X = 2, K = 1, nt = 2, ne = 4, At = 8, Bt = 16, rt = 32, $t = 64, Lt = 128, Yt = 256, at = 512, D = 30, E = "...", Dt = 800, ce = 16, T = 1, b = 2, w = 3, S = 1 / 0, m = 9007199254740991, R = 17976931348623157e292, N = NaN, Z = 4294967295, vt = Z - 1, wt = Z >>> 1, St = [
|
|
978
978
|
["ary", Lt],
|
|
979
979
|
["bind", K],
|
|
980
980
|
["bindKey", nt],
|
|
@@ -1762,7 +1762,7 @@ function m0() {
|
|
|
1762
1762
|
var n = this.__data__;
|
|
1763
1763
|
if (n instanceof Le) {
|
|
1764
1764
|
var r = n.__data__;
|
|
1765
|
-
if (!En || r.length <
|
|
1765
|
+
if (!En || r.length < I - 1)
|
|
1766
1766
|
return r.push([t, e]), this.size = ++n.size, this;
|
|
1767
1767
|
n = this.__data__ = new Ee(r);
|
|
1768
1768
|
}
|
|
@@ -1894,7 +1894,7 @@ function m0() {
|
|
|
1894
1894
|
var i = -1, s = Qn, a = !0, l = t.length, c = [], g = e.length;
|
|
1895
1895
|
if (!l)
|
|
1896
1896
|
return c;
|
|
1897
|
-
n && (e = dt(e, Xt(n))), r ? (s = ii, a = !1) : e.length >=
|
|
1897
|
+
n && (e = dt(e, Xt(n))), r ? (s = ii, a = !1) : e.length >= I && (s = Cn, a = !1, e = new Je(e));
|
|
1898
1898
|
t:
|
|
1899
1899
|
for (; ++i < l; ) {
|
|
1900
1900
|
var _ = t[i], y = n == null ? _ : n(_);
|
|
@@ -2326,7 +2326,7 @@ function m0() {
|
|
|
2326
2326
|
var r = -1, i = Qn, s = t.length, a = !0, l = [], c = l;
|
|
2327
2327
|
if (n)
|
|
2328
2328
|
a = !1, i = ii;
|
|
2329
|
-
else if (s >=
|
|
2329
|
+
else if (s >= I) {
|
|
2330
2330
|
var g = e ? null : nc(t);
|
|
2331
2331
|
if (g)
|
|
2332
2332
|
return er(g);
|
|
@@ -4334,7 +4334,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
4334
4334
|
return Ve(r, i).join("");
|
|
4335
4335
|
}
|
|
4336
4336
|
function Gd(t, e) {
|
|
4337
|
-
var n =
|
|
4337
|
+
var n = D, r = E;
|
|
4338
4338
|
if (gt(e)) {
|
|
4339
4339
|
var i = "separator" in e ? e.separator : i;
|
|
4340
4340
|
n = "length" in e ? V(e.length) : n, r = "omission" in e ? jt(e.omission) : r;
|
|
@@ -4640,13 +4640,13 @@ const lg = /* @__PURE__ */ _0(w0), b0 = { class: "synt-office-tabs synt-no-scrol
|
|
|
4640
4640
|
setup(p) {
|
|
4641
4641
|
const A = Gt(null), o = Gt([]), q = (v, L) => {
|
|
4642
4642
|
o.value.push({ title: v, setActive: L }), A.value === null && (A.value = v, L(!0));
|
|
4643
|
-
},
|
|
4643
|
+
}, I = (v) => {
|
|
4644
4644
|
var L;
|
|
4645
4645
|
o.value = o.value.filter((P) => P.title !== v), A.value === v && (A.value = ((L = o.value[0]) == null ? void 0 : L.title) || null, o.value.length > 0 ? (A.value = o.value[0].title, o.value.forEach((P) => P.setActive(P.title === A.value))) : A.value = null);
|
|
4646
4646
|
}, W = (v) => {
|
|
4647
4647
|
A.value = v, o.value.forEach((L) => L.setActive(L.title === v));
|
|
4648
4648
|
};
|
|
4649
|
-
return Hv("registerTab", q), Hv("unregisterTab",
|
|
4649
|
+
return Hv("registerTab", q), Hv("unregisterTab", I), (v, L) => (ot(), ht(Kn, null, [
|
|
4650
4650
|
O("div", b0, [
|
|
4651
4651
|
(ot(!0), ht(Kn, null, ao(o.value, (P) => (ot(), ht("button", {
|
|
4652
4652
|
key: P.title,
|
|
@@ -4671,8 +4671,8 @@ const lg = /* @__PURE__ */ _0(w0), b0 = { class: "synt-office-tabs synt-no-scrol
|
|
|
4671
4671
|
const A = Gt(!1), o = Vv(
|
|
4672
4672
|
"registerTab"
|
|
4673
4673
|
), q = Vv("unregisterTab");
|
|
4674
|
-
return Vs(() => o == null ? void 0 : o(p.title, (
|
|
4675
|
-
qt(
|
|
4674
|
+
return Vs(() => o == null ? void 0 : o(p.title, (I) => A.value = I)), hg(() => q == null ? void 0 : q(p.title)), (I, W) => Vn((ot(), ht("div", A0, [
|
|
4675
|
+
qt(I.$slots, "default", {}, void 0, !0)
|
|
4676
4676
|
], 512)), [
|
|
4677
4677
|
[lo, A.value]
|
|
4678
4678
|
]);
|
|
@@ -4692,9 +4692,9 @@ const lg = /* @__PURE__ */ _0(w0), b0 = { class: "synt-office-tabs synt-no-scrol
|
|
|
4692
4692
|
},
|
|
4693
4693
|
emits: ["delete", "duplicate"],
|
|
4694
4694
|
setup(p, { emit: A }) {
|
|
4695
|
-
const o = p, q = A,
|
|
4695
|
+
const o = p, q = A, I = Gt(!1), W = Gt({}), v = Gt(null), L = Gt(null), P = Gt(null), H = Gt(!1), tt = async () => {
|
|
4696
4696
|
var K, nt;
|
|
4697
|
-
if (!((K = o.model.excludes) != null && K.includes("delete") && ((nt = o.model.excludes) != null && nt.includes("duplicate"))) && (
|
|
4697
|
+
if (!((K = o.model.excludes) != null && K.includes("delete") && ((nt = o.model.excludes) != null && nt.includes("duplicate"))) && (I.value = !I.value, await Ks(), I.value && P.value && L.value)) {
|
|
4698
4698
|
const ne = P.value.getBoundingClientRect();
|
|
4699
4699
|
W.value = {
|
|
4700
4700
|
top: `${ne.height}px`,
|
|
@@ -4703,13 +4703,13 @@ const lg = /* @__PURE__ */ _0(w0), b0 = { class: "synt-office-tabs synt-no-scrol
|
|
|
4703
4703
|
};
|
|
4704
4704
|
}
|
|
4705
4705
|
}, J = (K) => {
|
|
4706
|
-
|
|
4706
|
+
I.value && v.value && !v.value.contains(K.target) && (I.value = !1);
|
|
4707
4707
|
}, It = async () => {
|
|
4708
|
-
await q("duplicate"),
|
|
4708
|
+
await q("duplicate"), I.value = !1;
|
|
4709
4709
|
}, ft = async () => {
|
|
4710
4710
|
H.value = !1;
|
|
4711
4711
|
}, U = async () => {
|
|
4712
|
-
|
|
4712
|
+
I.value = !1, H.value = !0;
|
|
4713
4713
|
}, X = async () => {
|
|
4714
4714
|
await q("delete"), H.value = !1;
|
|
4715
4715
|
};
|
|
@@ -4760,7 +4760,7 @@ const lg = /* @__PURE__ */ _0(w0), b0 = { class: "synt-office-tabs synt-no-scrol
|
|
|
4760
4760
|
default: he(() => {
|
|
4761
4761
|
var Bt, rt, $t, Lt;
|
|
4762
4762
|
return [
|
|
4763
|
-
|
|
4763
|
+
I.value ? (ot(), ht("div", {
|
|
4764
4764
|
key: 0,
|
|
4765
4765
|
ref_key: "dropdownRef",
|
|
4766
4766
|
ref: L,
|
|
@@ -4866,10 +4866,10 @@ const U0 = {
|
|
|
4866
4866
|
var p;
|
|
4867
4867
|
const A = ((p = this.$refs.dropdownMenu) == null ? void 0 : p.children[this.typeAheadPointer]) || !1;
|
|
4868
4868
|
if (A) {
|
|
4869
|
-
const o = this.getDropdownViewport(), { top: q, bottom:
|
|
4869
|
+
const o = this.getDropdownViewport(), { top: q, bottom: I, height: W } = A.getBoundingClientRect();
|
|
4870
4870
|
if (q < o.top)
|
|
4871
4871
|
return this.$refs.dropdownMenu.scrollTop = A.offsetTop;
|
|
4872
|
-
if (
|
|
4872
|
+
if (I > o.bottom)
|
|
4873
4873
|
return this.$refs.dropdownMenu.scrollTop = A.offsetTop - (o.height - W);
|
|
4874
4874
|
}
|
|
4875
4875
|
},
|
|
@@ -4952,8 +4952,8 @@ const U0 = {
|
|
|
4952
4952
|
}
|
|
4953
4953
|
}, zv = (p, A) => {
|
|
4954
4954
|
const o = p.__vccOpts || p;
|
|
4955
|
-
for (const [q,
|
|
4956
|
-
o[q] =
|
|
4955
|
+
for (const [q, I] of A)
|
|
4956
|
+
o[q] = I;
|
|
4957
4957
|
return o;
|
|
4958
4958
|
}, V0 = {}, q0 = {
|
|
4959
4959
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4984,13 +4984,13 @@ const e_ = /* @__PURE__ */ zv(J0, [["render", t_]]), Qv = {
|
|
|
4984
4984
|
const {
|
|
4985
4985
|
height: o,
|
|
4986
4986
|
top: q,
|
|
4987
|
-
left:
|
|
4987
|
+
left: I,
|
|
4988
4988
|
width: W
|
|
4989
4989
|
} = A.$refs.toggle.getBoundingClientRect();
|
|
4990
4990
|
let v = window.scrollX || window.pageXOffset, L = window.scrollY || window.pageYOffset;
|
|
4991
4991
|
p.unbindPosition = A.calculatePosition(p, A, {
|
|
4992
4992
|
width: W + "px",
|
|
4993
|
-
left: v +
|
|
4993
|
+
left: v + I + "px",
|
|
4994
4994
|
top: L + q + o + "px"
|
|
4995
4995
|
}), document.body.appendChild(p);
|
|
4996
4996
|
}
|
|
@@ -5203,8 +5203,8 @@ https://vue-select.org/api/props.html#getoptionkey`, p, A);
|
|
|
5203
5203
|
},
|
|
5204
5204
|
calculatePosition: {
|
|
5205
5205
|
type: Function,
|
|
5206
|
-
default(p, A, { width: o, top: q, left:
|
|
5207
|
-
p.style.top = q, p.style.left =
|
|
5206
|
+
default(p, A, { width: o, top: q, left: I }) {
|
|
5207
|
+
p.style.top = q, p.style.left = I, p.style.width = o;
|
|
5208
5208
|
}
|
|
5209
5209
|
},
|
|
5210
5210
|
dropdownShouldOpen: {
|
|
@@ -5454,14 +5454,14 @@ https://vue-select.org/api/props.html#getoptionkey`, p, A);
|
|
|
5454
5454
|
this.mousedown = !1;
|
|
5455
5455
|
},
|
|
5456
5456
|
onSearchKeyDown(p) {
|
|
5457
|
-
const A = (
|
|
5458
|
-
8: (
|
|
5459
|
-
9: (
|
|
5460
|
-
27: (
|
|
5461
|
-
38: (
|
|
5462
|
-
40: (
|
|
5457
|
+
const A = (I) => (I.preventDefault(), !this.isComposing && this.typeAheadSelect()), o = {
|
|
5458
|
+
8: (I) => this.maybeDeleteValue(),
|
|
5459
|
+
9: (I) => this.onTab(),
|
|
5460
|
+
27: (I) => this.onEscape(),
|
|
5461
|
+
38: (I) => (I.preventDefault(), this.typeAheadUp()),
|
|
5462
|
+
40: (I) => (I.preventDefault(), this.typeAheadDown())
|
|
5463
5463
|
};
|
|
5464
|
-
this.selectOnKeyCodes.forEach((
|
|
5464
|
+
this.selectOnKeyCodes.forEach((I) => o[I] = A);
|
|
5465
5465
|
const q = this.mapKeydown(o, this);
|
|
5466
5466
|
if (typeof q[p.keyCode] == "function")
|
|
5467
5467
|
return q[p.keyCode](p);
|
|
@@ -5477,7 +5477,7 @@ https://vue-select.org/api/props.html#getoptionkey`, p, A);
|
|
|
5477
5477
|
key: 0,
|
|
5478
5478
|
class: "vs__no-options"
|
|
5479
5479
|
}, __ = /* @__PURE__ */ Gn(" Sorry, no matching options. "), y_ = ["id"];
|
|
5480
|
-
function m_(p, A, o, q,
|
|
5480
|
+
function m_(p, A, o, q, I, W) {
|
|
5481
5481
|
const v = pg("append-to-body");
|
|
5482
5482
|
return ot(), ht("div", {
|
|
5483
5483
|
dir: o.dir,
|
|
@@ -5511,7 +5511,7 @@ function m_(p, A, o, q, D, W) {
|
|
|
5511
5511
|
o.multiple ? (ot(), ht("button", {
|
|
5512
5512
|
key: 0,
|
|
5513
5513
|
ref_for: !0,
|
|
5514
|
-
ref: (H) =>
|
|
5514
|
+
ref: (H) => I.deselectButtons[P] = H,
|
|
5515
5515
|
disabled: o.disabled,
|
|
5516
5516
|
type: "button",
|
|
5517
5517
|
class: "vs__deselect",
|
|
@@ -5616,7 +5616,7 @@ var w_ = Ys.exports, tg;
|
|
|
5616
5616
|
function b_() {
|
|
5617
5617
|
return tg || (tg = 1, function(p, A) {
|
|
5618
5618
|
(function() {
|
|
5619
|
-
var o, q = "4.17.21",
|
|
5619
|
+
var o, q = "4.17.21", I = 200, W = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", v = "Expected a function", L = "Invalid `variable` option passed into `_.template`", P = "__lodash_hash_undefined__", H = 500, tt = "__lodash_placeholder__", J = 1, It = 2, ft = 4, U = 1, X = 2, K = 1, nt = 2, ne = 4, At = 8, Bt = 16, rt = 32, $t = 64, Lt = 128, Yt = 256, at = 512, D = 30, E = "...", Dt = 800, ce = 16, T = 1, b = 2, w = 3, S = 1 / 0, m = 9007199254740991, R = 17976931348623157e292, N = NaN, Z = 4294967295, vt = Z - 1, wt = Z >>> 1, St = [
|
|
5620
5620
|
["ary", Lt],
|
|
5621
5621
|
["bind", K],
|
|
5622
5622
|
["bindKey", nt],
|
|
@@ -6404,7 +6404,7 @@ function b_() {
|
|
|
6404
6404
|
var n = this.__data__;
|
|
6405
6405
|
if (n instanceof Le) {
|
|
6406
6406
|
var r = n.__data__;
|
|
6407
|
-
if (!En || r.length <
|
|
6407
|
+
if (!En || r.length < I - 1)
|
|
6408
6408
|
return r.push([t, e]), this.size = ++n.size, this;
|
|
6409
6409
|
n = this.__data__ = new Ee(r);
|
|
6410
6410
|
}
|
|
@@ -6536,7 +6536,7 @@ function b_() {
|
|
|
6536
6536
|
var i = -1, s = Qn, a = !0, l = t.length, c = [], g = e.length;
|
|
6537
6537
|
if (!l)
|
|
6538
6538
|
return c;
|
|
6539
|
-
n && (e = dt(e, Xt(n))), r ? (s = ii, a = !1) : e.length >=
|
|
6539
|
+
n && (e = dt(e, Xt(n))), r ? (s = ii, a = !1) : e.length >= I && (s = Cn, a = !1, e = new Je(e));
|
|
6540
6540
|
t:
|
|
6541
6541
|
for (; ++i < l; ) {
|
|
6542
6542
|
var _ = t[i], y = n == null ? _ : n(_);
|
|
@@ -6968,7 +6968,7 @@ function b_() {
|
|
|
6968
6968
|
var r = -1, i = Qn, s = t.length, a = !0, l = [], c = l;
|
|
6969
6969
|
if (n)
|
|
6970
6970
|
a = !1, i = ii;
|
|
6971
|
-
else if (s >=
|
|
6971
|
+
else if (s >= I) {
|
|
6972
6972
|
var g = e ? null : nc(t);
|
|
6973
6973
|
if (g)
|
|
6974
6974
|
return er(g);
|
|
@@ -8976,7 +8976,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
8976
8976
|
return Ve(r, i).join("");
|
|
8977
8977
|
}
|
|
8978
8978
|
function Gd(t, e) {
|
|
8979
|
-
var n =
|
|
8979
|
+
var n = D, r = E;
|
|
8980
8980
|
if (gt(e)) {
|
|
8981
8981
|
var i = "separator" in e ? e.separator : i;
|
|
8982
8982
|
n = "length" in e ? V(e.length) : n, r = "omission" in e ? jt(e.omission) : r;
|
|
@@ -9380,7 +9380,7 @@ function O_() {
|
|
|
9380
9380
|
K.stopPropagation(), this.options.onClick();
|
|
9381
9381
|
}).bind(this)
|
|
9382
9382
|
), typeof this.options.offset == "object") {
|
|
9383
|
-
var It =
|
|
9383
|
+
var It = I("x", this.options), ft = I("y", this.options), U = this.options.position == "left" ? It : "-" + It, X = this.options.gravity == "toastify-top" ? ft : "-" + ft;
|
|
9384
9384
|
v.style.transform = "translate(" + U + "," + X + ")";
|
|
9385
9385
|
}
|
|
9386
9386
|
return v;
|
|
@@ -9430,7 +9430,7 @@ function O_() {
|
|
|
9430
9430
|
}
|
|
9431
9431
|
return this;
|
|
9432
9432
|
};
|
|
9433
|
-
function
|
|
9433
|
+
function I(v, L) {
|
|
9434
9434
|
return L.offset[v] ? isNaN(L.offset[v]) ? L.offset[v] : L.offset[v] + "px" : "0px";
|
|
9435
9435
|
}
|
|
9436
9436
|
function W(v, L) {
|
|
@@ -9447,7 +9447,7 @@ function A_() {
|
|
|
9447
9447
|
(function(o, q) {
|
|
9448
9448
|
p.exports = q();
|
|
9449
9449
|
})($_, function() {
|
|
9450
|
-
var o = 1e3, q = 6e4,
|
|
9450
|
+
var o = 1e3, q = 6e4, I = 36e5, W = "millisecond", v = "second", L = "minute", P = "hour", H = "day", tt = "week", J = "month", It = "quarter", ft = "year", U = "date", X = "Invalid Date", K = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, nt = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, ne = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(T) {
|
|
9451
9451
|
var b = ["th", "st", "nd", "rd"], w = T % 100;
|
|
9452
9452
|
return "[" + T + (b[(w - 20) % 10] || b[w] || b[0]) + "]";
|
|
9453
9453
|
} }, At = function(T, b, w) {
|
|
@@ -9483,13 +9483,13 @@ function A_() {
|
|
|
9483
9483
|
$t[Z] = b, m = Z;
|
|
9484
9484
|
}
|
|
9485
9485
|
return !S && m && (rt = m), m || !S && rt;
|
|
9486
|
-
},
|
|
9486
|
+
}, D = function(T, b) {
|
|
9487
9487
|
if (Yt(T)) return T.clone();
|
|
9488
9488
|
var w = typeof b == "object" ? b : {};
|
|
9489
9489
|
return w.date = T, w.args = arguments, new Dt(w);
|
|
9490
9490
|
}, E = Bt;
|
|
9491
9491
|
E.l = at, E.i = Yt, E.w = function(T, b) {
|
|
9492
|
-
return
|
|
9492
|
+
return D(T, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset });
|
|
9493
9493
|
};
|
|
9494
9494
|
var Dt = function() {
|
|
9495
9495
|
function T(w) {
|
|
@@ -9519,12 +9519,12 @@ function A_() {
|
|
|
9519
9519
|
}, b.isValid = function() {
|
|
9520
9520
|
return this.$d.toString() !== X;
|
|
9521
9521
|
}, b.isSame = function(w, S) {
|
|
9522
|
-
var m =
|
|
9522
|
+
var m = D(w);
|
|
9523
9523
|
return this.startOf(S) <= m && m <= this.endOf(S);
|
|
9524
9524
|
}, b.isAfter = function(w, S) {
|
|
9525
|
-
return
|
|
9525
|
+
return D(w) < this.startOf(S);
|
|
9526
9526
|
}, b.isBefore = function(w, S) {
|
|
9527
|
-
return this.endOf(S) <
|
|
9527
|
+
return this.endOf(S) < D(w);
|
|
9528
9528
|
}, b.$g = function(w, S, m) {
|
|
9529
9529
|
return E.u(w) ? this[S] : this.set(m, w);
|
|
9530
9530
|
}, b.unix = function() {
|
|
@@ -9575,14 +9575,14 @@ function A_() {
|
|
|
9575
9575
|
var m, R = this;
|
|
9576
9576
|
w = Number(w);
|
|
9577
9577
|
var N = E.p(S), Z = function(St) {
|
|
9578
|
-
var bt =
|
|
9578
|
+
var bt = D(R);
|
|
9579
9579
|
return E.w(bt.date(bt.date() + Math.round(St * w)), R);
|
|
9580
9580
|
};
|
|
9581
9581
|
if (N === J) return this.set(J, this.$M + w);
|
|
9582
9582
|
if (N === ft) return this.set(ft, this.$y + w);
|
|
9583
9583
|
if (N === H) return Z(1);
|
|
9584
9584
|
if (N === tt) return Z(7);
|
|
9585
|
-
var vt = (m = {}, m[L] = q, m[P] =
|
|
9585
|
+
var vt = (m = {}, m[L] = q, m[P] = I, m[v] = o, m)[N] || 1, wt = this.$d.getTime() + w * vt;
|
|
9586
9586
|
return E.w(wt, this);
|
|
9587
9587
|
}, b.subtract = function(w, S) {
|
|
9588
9588
|
return this.add(-1 * w, S);
|
|
@@ -9655,7 +9655,7 @@ function A_() {
|
|
|
9655
9655
|
}, b.utcOffset = function() {
|
|
9656
9656
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
9657
9657
|
}, b.diff = function(w, S, m) {
|
|
9658
|
-
var R, N = this, Z = E.p(S), vt =
|
|
9658
|
+
var R, N = this, Z = E.p(S), vt = D(w), wt = (vt.utcOffset() - this.utcOffset()) * q, St = this - vt, bt = function() {
|
|
9659
9659
|
return E.m(N, vt);
|
|
9660
9660
|
};
|
|
9661
9661
|
switch (Z) {
|
|
@@ -9675,7 +9675,7 @@ function A_() {
|
|
|
9675
9675
|
R = (St - wt) / 864e5;
|
|
9676
9676
|
break;
|
|
9677
9677
|
case P:
|
|
9678
|
-
R = St /
|
|
9678
|
+
R = St / I;
|
|
9679
9679
|
break;
|
|
9680
9680
|
case L:
|
|
9681
9681
|
R = St / q;
|
|
@@ -9707,21 +9707,21 @@ function A_() {
|
|
|
9707
9707
|
return this.$d.toUTCString();
|
|
9708
9708
|
}, T;
|
|
9709
9709
|
}(), ce = Dt.prototype;
|
|
9710
|
-
return
|
|
9710
|
+
return D.prototype = ce, [["$ms", W], ["$s", v], ["$m", L], ["$H", P], ["$W", H], ["$M", J], ["$y", ft], ["$D", U]].forEach(function(T) {
|
|
9711
9711
|
ce[T[1]] = function(b) {
|
|
9712
9712
|
return this.$g(b, T[0], T[1]);
|
|
9713
9713
|
};
|
|
9714
|
-
}),
|
|
9715
|
-
return T.$i || (T(b, Dt,
|
|
9716
|
-
},
|
|
9717
|
-
return
|
|
9718
|
-
},
|
|
9714
|
+
}), D.extend = function(T, b) {
|
|
9715
|
+
return T.$i || (T(b, Dt, D), T.$i = !0), D;
|
|
9716
|
+
}, D.locale = at, D.isDayjs = Yt, D.unix = function(T) {
|
|
9717
|
+
return D(1e3 * T);
|
|
9718
|
+
}, D.en = $t[rt], D.Ls = $t, D.p = {}, D;
|
|
9719
9719
|
});
|
|
9720
9720
|
}(Fv)), Fv.exports;
|
|
9721
9721
|
}
|
|
9722
9722
|
A_();
|
|
9723
9723
|
function S_(p) {
|
|
9724
|
-
const [A, o, q] = p.relation.definition.split(":"),
|
|
9724
|
+
const [A, o, q] = p.relation.definition.split(":"), I = p.relation.api[o], W = Gt(!1), v = Gt([]), L = Gt({
|
|
9725
9725
|
limit: 99999,
|
|
9726
9726
|
page: 1
|
|
9727
9727
|
});
|
|
@@ -9737,7 +9737,7 @@ function S_(p) {
|
|
|
9737
9737
|
page: L.value.page,
|
|
9738
9738
|
filter: JSON.stringify(P.query)
|
|
9739
9739
|
}));
|
|
9740
|
-
await
|
|
9740
|
+
await I.get(`/api/${q}`, {
|
|
9741
9741
|
params: H.value
|
|
9742
9742
|
}).then((tt) => tt.data).then((tt) => {
|
|
9743
9743
|
tt.code == 200 && (v.value = tt == null ? void 0 : tt.data);
|
|
@@ -9770,14 +9770,14 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
9770
9770
|
}),
|
|
9771
9771
|
emits: /* @__PURE__ */ Zs(["update:selected", "fetch:filtered"], ["update:modelValue"]),
|
|
9772
9772
|
setup(p, { emit: A }) {
|
|
9773
|
-
const o = p, q = A,
|
|
9773
|
+
const o = p, q = A, I = og(p, "modelValue"), { options: W, isLoading: v, fetchData: L } = S_({
|
|
9774
9774
|
relation: o.fields.relation
|
|
9775
9775
|
}), P = Gt(""), H = Gt(99999), tt = Gt(null), J = Gt(null), It = Gt(!1), ft = Hn(() => {
|
|
9776
|
-
var
|
|
9777
|
-
return (E = (
|
|
9776
|
+
var D, E;
|
|
9777
|
+
return (E = (D = o.fields) == null ? void 0 : D.options) == null ? void 0 : E.isMultiple;
|
|
9778
9778
|
}), U = Hn(() => {
|
|
9779
|
-
var
|
|
9780
|
-
return (
|
|
9779
|
+
var D;
|
|
9780
|
+
return (D = W.value) == null ? void 0 : D.filter(
|
|
9781
9781
|
(E) => {
|
|
9782
9782
|
var Dt, ce, T, b;
|
|
9783
9783
|
return (b = (T = E == null ? void 0 : E[(ce = (Dt = o.fields) == null ? void 0 : Dt.relation) == null ? void 0 : ce.display]) == null ? void 0 : T.toLowerCase()) == null ? void 0 : b.includes(P.value);
|
|
@@ -9785,76 +9785,76 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
9785
9785
|
);
|
|
9786
9786
|
}), X = Hn(() => U.value.slice(0, H.value)), K = Hn(() => X.value.length < U.value.length), nt = Hn(() => {
|
|
9787
9787
|
var ce, T;
|
|
9788
|
-
const
|
|
9788
|
+
const D = (T = (ce = o.fields) == null ? void 0 : ce.relation) == null ? void 0 : T.id, E = I.value, Dt = W.value || [];
|
|
9789
9789
|
if (E == null) return null;
|
|
9790
9790
|
if (Array.isArray(E)) {
|
|
9791
9791
|
const b = new Set(E);
|
|
9792
|
-
return Dt.filter((w) => b.has(w == null ? void 0 : w[
|
|
9792
|
+
return Dt.filter((w) => b.has(w == null ? void 0 : w[D]));
|
|
9793
9793
|
}
|
|
9794
|
-
return Dt.find((b) => (b == null ? void 0 : b[
|
|
9794
|
+
return Dt.find((b) => (b == null ? void 0 : b[D]) === E) || null;
|
|
9795
9795
|
}), ne = Gt([]);
|
|
9796
9796
|
so(
|
|
9797
9797
|
() => o.query,
|
|
9798
|
-
async (
|
|
9799
|
-
ne.value =
|
|
9798
|
+
async (D) => {
|
|
9799
|
+
ne.value = D;
|
|
9800
9800
|
},
|
|
9801
9801
|
{ immediate: !0 }
|
|
9802
9802
|
), so(
|
|
9803
9803
|
() => ne.value,
|
|
9804
|
-
async (
|
|
9805
|
-
|
|
9804
|
+
async (D) => {
|
|
9805
|
+
D && await L({ query: D });
|
|
9806
9806
|
}
|
|
9807
9807
|
), so(
|
|
9808
9808
|
nt,
|
|
9809
|
-
(
|
|
9810
|
-
|
|
9809
|
+
(D) => {
|
|
9810
|
+
q("update:selected", D);
|
|
9811
9811
|
},
|
|
9812
9812
|
{ deep: !0 }
|
|
9813
9813
|
);
|
|
9814
|
-
const At = async ([{ isIntersecting:
|
|
9815
|
-
if (
|
|
9814
|
+
const At = async ([{ isIntersecting: D, target: E }]) => {
|
|
9815
|
+
if (D) {
|
|
9816
9816
|
const Dt = E.offsetParent, ce = Dt.scrollTop;
|
|
9817
9817
|
H.value += 10, await Ks(), Dt.scrollTop = ce;
|
|
9818
9818
|
}
|
|
9819
9819
|
}, Bt = async () => {
|
|
9820
|
-
W.value.length && !Array.isArray(
|
|
9821
|
-
}, rt = async (
|
|
9822
|
-
Array.isArray(
|
|
9820
|
+
W.value.length && !Array.isArray(I.value) || await L({ query: ne.value });
|
|
9821
|
+
}, rt = async (D) => {
|
|
9822
|
+
Array.isArray(I.value) && (I.value.includes(D) ? I.value = I.value.filter((Dt) => Dt !== D) : I.value.push(D)), await Bt();
|
|
9823
9823
|
}, $t = Hn(() => {
|
|
9824
|
-
if (Array.isArray(
|
|
9824
|
+
if (Array.isArray(I.value))
|
|
9825
9825
|
return U.value.length > 0 && U.value.every(
|
|
9826
|
-
(
|
|
9826
|
+
(D) => Array.isArray(I.value) && I.value.includes(D.id)
|
|
9827
9827
|
);
|
|
9828
9828
|
});
|
|
9829
9829
|
function Lt() {
|
|
9830
|
-
if (Array.isArray(
|
|
9830
|
+
if (Array.isArray(I.value))
|
|
9831
9831
|
if ($t.value)
|
|
9832
|
-
|
|
9833
|
-
(
|
|
9832
|
+
I.value = I.value.filter(
|
|
9833
|
+
(D) => !U.value.map((E) => E.id).includes(D)
|
|
9834
9834
|
);
|
|
9835
9835
|
else {
|
|
9836
|
-
const
|
|
9837
|
-
|
|
9836
|
+
const D = U.value.map((E) => E.id);
|
|
9837
|
+
I.value = Array.from(/* @__PURE__ */ new Set([...I.value, ...D]));
|
|
9838
9838
|
}
|
|
9839
9839
|
}
|
|
9840
9840
|
const Yt = async () => {
|
|
9841
|
-
Array.isArray(
|
|
9841
|
+
Array.isArray(I.value) || (I.value = []), await q("fetch:filtered"), await Bt(), It.value = !0;
|
|
9842
9842
|
}, at = async () => {
|
|
9843
9843
|
ne.value = [], P.value = "", It.value = !1;
|
|
9844
9844
|
};
|
|
9845
9845
|
return so(
|
|
9846
|
-
() =>
|
|
9846
|
+
() => I.value,
|
|
9847
9847
|
async () => {
|
|
9848
|
-
W.value.length && !Array.isArray(
|
|
9848
|
+
W.value.length && !Array.isArray(I.value) || (v.value = !0, I.value && await Bt(), v.value = !1);
|
|
9849
9849
|
}
|
|
9850
9850
|
), Vs(async () => {
|
|
9851
9851
|
tt.value = new IntersectionObserver(At);
|
|
9852
|
-
}), (
|
|
9852
|
+
}), (D, E) => {
|
|
9853
9853
|
var Dt, ce, T, b, w, S;
|
|
9854
9854
|
return ot(), ht("div", null, [
|
|
9855
9855
|
O("div", C_, [
|
|
9856
|
-
O("label", L_, Pt((Dt =
|
|
9857
|
-
O("span", E_, Pt((T = (ce =
|
|
9856
|
+
O("label", L_, Pt((Dt = D.fields) == null ? void 0 : Dt.name), 1),
|
|
9857
|
+
O("span", E_, Pt((T = (ce = D.fields) == null ? void 0 : ce.options) == null ? void 0 : T.note), 1),
|
|
9858
9858
|
O("div", T_, [
|
|
9859
9859
|
O("div", I_, [
|
|
9860
9860
|
Vn(O("div", D_, E[3] || (E[3] = [
|
|
@@ -9865,25 +9865,25 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
9865
9865
|
[lo, nn(v)]
|
|
9866
9866
|
]),
|
|
9867
9867
|
wn(nn(fg), {
|
|
9868
|
-
modelValue:
|
|
9869
|
-
"onUpdate:modelValue": E[0] || (E[0] = (m) =>
|
|
9868
|
+
modelValue: I.value,
|
|
9869
|
+
"onUpdate:modelValue": E[0] || (E[0] = (m) => I.value = m),
|
|
9870
9870
|
class: qn(["synt-relation-control", {
|
|
9871
|
-
"synt-office-relation-error":
|
|
9872
|
-
"synt-office-relation-disabled":
|
|
9873
|
-
"synt-office-relation-normal": !
|
|
9871
|
+
"synt-office-relation-error": D.isError,
|
|
9872
|
+
"synt-office-relation-disabled": D.isDisabled,
|
|
9873
|
+
"synt-office-relation-normal": !D.isError && !D.isDisabled
|
|
9874
9874
|
}]),
|
|
9875
9875
|
options: X.value,
|
|
9876
9876
|
reduce: (m) => m.id,
|
|
9877
|
-
label: (w = (b =
|
|
9877
|
+
label: (w = (b = D.fields) == null ? void 0 : b.relation) == null ? void 0 : w.display,
|
|
9878
9878
|
placeholder: "Please enter at least 3 letters...",
|
|
9879
|
-
disabled:
|
|
9879
|
+
disabled: D.isDisabled,
|
|
9880
9880
|
multiple: ft.value,
|
|
9881
9881
|
onOpen: Bt
|
|
9882
9882
|
}, {
|
|
9883
9883
|
option: he((m) => {
|
|
9884
9884
|
var R, N;
|
|
9885
9885
|
return [
|
|
9886
|
-
O("span", null, Pt(m[(N = (R =
|
|
9886
|
+
O("span", null, Pt(m[(N = (R = D.fields) == null ? void 0 : R.relation) == null ? void 0 : N.display]), 1)
|
|
9887
9887
|
];
|
|
9888
9888
|
}),
|
|
9889
9889
|
"list-footer": he(() => [
|
|
@@ -9909,7 +9909,7 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
9909
9909
|
O("i", { class: "synt-office-relation-btn-expands-icon fa-solid fa-up-right-and-down-left-from-center" }, null, -1)
|
|
9910
9910
|
]))) : be("", !0)
|
|
9911
9911
|
]),
|
|
9912
|
-
|
|
9912
|
+
D.error && ((S = D.error) == null ? void 0 : S.length) > 0 ? (ot(), ht("p", M_, "*" + Pt(D.error), 1)) : be("", !0)
|
|
9913
9913
|
]),
|
|
9914
9914
|
wn(co, { name: "fade" }, {
|
|
9915
9915
|
default: he(() => {
|
|
@@ -9918,7 +9918,7 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
9918
9918
|
It.value ? (ot(), ht("div", R_, [
|
|
9919
9919
|
O("div", k_, [
|
|
9920
9920
|
wn(nn(ug), {
|
|
9921
|
-
label:
|
|
9921
|
+
label: D.fields.name,
|
|
9922
9922
|
icon: "fa-solid fa-table"
|
|
9923
9923
|
}, {
|
|
9924
9924
|
end: he(() => [
|
|
@@ -9951,7 +9951,7 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
9951
9951
|
O("i", { class: "synt-office-relation-modal-btn-icon fa-solid fa-sync" }, null, -1)
|
|
9952
9952
|
]))
|
|
9953
9953
|
]),
|
|
9954
|
-
qt(
|
|
9954
|
+
qt(D.$slots, "default"),
|
|
9955
9955
|
O("div", N_, [
|
|
9956
9956
|
O("table", F_, [
|
|
9957
9957
|
O("thead", null, [
|
|
@@ -9964,7 +9964,7 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
9964
9964
|
onChange: Lt
|
|
9965
9965
|
}, null, 40, P_)
|
|
9966
9966
|
]),
|
|
9967
|
-
O("th", U_, Pt((m =
|
|
9967
|
+
O("th", U_, Pt((m = D.fields) == null ? void 0 : m.name), 1)
|
|
9968
9968
|
])
|
|
9969
9969
|
]),
|
|
9970
9970
|
O("tbody", null, [
|
|
@@ -9977,12 +9977,12 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
9977
9977
|
O("input", {
|
|
9978
9978
|
type: "checkbox",
|
|
9979
9979
|
class: "synt-office-relation-modal-table-checkbox",
|
|
9980
|
-
checked: Array.isArray(
|
|
9980
|
+
checked: Array.isArray(I.value) && I.value.includes(R.id),
|
|
9981
9981
|
onChange: (vt) => rt(R.id)
|
|
9982
9982
|
}, null, 40, z_)
|
|
9983
9983
|
]),
|
|
9984
9984
|
O("td", null, [
|
|
9985
|
-
O("div", H_, Pt(R[(Z = (N =
|
|
9985
|
+
O("div", H_, Pt(R[(Z = (N = D.fields) == null ? void 0 : N.relation) == null ? void 0 : Z.display]), 1)
|
|
9986
9986
|
])
|
|
9987
9987
|
]);
|
|
9988
9988
|
}), 128))
|
|
@@ -10025,14 +10025,14 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
10025
10025
|
emits: /* @__PURE__ */ Zs(["update:selected"], ["update:modelValue"]),
|
|
10026
10026
|
setup(p, { emit: A }) {
|
|
10027
10027
|
var rt, $t, Lt, Yt;
|
|
10028
|
-
const o = p, q = A,
|
|
10028
|
+
const o = p, q = A, I = og(p, "modelValue"), W = Gt([]), v = Gt(1), L = Gt(!0), P = Gt(!1), H = Gt(""), tt = Gt(null), J = Gt(null), [It, ft, U] = ($t = (rt = o.fields) == null ? void 0 : rt.relation.definition) == null ? void 0 : $t.split(":"), X = (Yt = (Lt = o.fields) == null ? void 0 : Lt.relation) == null ? void 0 : Yt.api[ft], K = Hn(() => {
|
|
10029
10029
|
var at;
|
|
10030
|
-
return ((at = W.value) == null ? void 0 : at.find((
|
|
10030
|
+
return ((at = W.value) == null ? void 0 : at.find((D) => D.id === I.value)) || null;
|
|
10031
10031
|
});
|
|
10032
10032
|
async function nt(at = !1) {
|
|
10033
10033
|
if (P.value || !L.value) return;
|
|
10034
10034
|
P.value = !0;
|
|
10035
|
-
const
|
|
10035
|
+
const D = document.querySelector(".vs__dropdown-menu"), E = (D == null ? void 0 : D.scrollTop) || 0;
|
|
10036
10036
|
try {
|
|
10037
10037
|
const Dt = {
|
|
10038
10038
|
search: H.value,
|
|
@@ -10047,13 +10047,13 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
10047
10047
|
} catch (Dt) {
|
|
10048
10048
|
console.error("fetchAll error", Dt);
|
|
10049
10049
|
} finally {
|
|
10050
|
-
await Ks(), !at &&
|
|
10050
|
+
await Ks(), !at && D && (D.scrollTop = E), P.value = !1;
|
|
10051
10051
|
}
|
|
10052
10052
|
}
|
|
10053
10053
|
async function ne() {
|
|
10054
|
-
if (
|
|
10054
|
+
if (I.value)
|
|
10055
10055
|
try {
|
|
10056
|
-
const at = await X.get(`/api/${U}/${
|
|
10056
|
+
const at = await X.get(`/api/${U}/${I.value}`);
|
|
10057
10057
|
at.data.code == 200 && (W.value = [at.data.data]);
|
|
10058
10058
|
} catch (at) {
|
|
10059
10059
|
console.error("fetchOne error", at);
|
|
@@ -10068,7 +10068,7 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
10068
10068
|
var at;
|
|
10069
10069
|
(at = tt.value) == null || at.disconnect(), await ne();
|
|
10070
10070
|
}
|
|
10071
|
-
return so(() =>
|
|
10071
|
+
return so(() => I.value, ne), so(
|
|
10072
10072
|
() => H.value,
|
|
10073
10073
|
lg.debounce(async () => {
|
|
10074
10074
|
H.value.length < 3 || (v.value = 1, L.value = !0, await nt(!0));
|
|
@@ -10082,14 +10082,14 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
10082
10082
|
}), Uv(() => {
|
|
10083
10083
|
var at;
|
|
10084
10084
|
(at = tt.value) == null || at.disconnect();
|
|
10085
|
-
}), (at,
|
|
10085
|
+
}), (at, D) => {
|
|
10086
10086
|
var E, Dt, ce, T, b, w;
|
|
10087
10087
|
return ot(), ht("div", K_, [
|
|
10088
10088
|
O("label", Z_, Pt((E = at.fields) == null ? void 0 : E.name), 1),
|
|
10089
10089
|
O("span", J_, Pt((ce = (Dt = at.fields) == null ? void 0 : Dt.options) == null ? void 0 : ce.note), 1),
|
|
10090
10090
|
O("div", X_, [
|
|
10091
10091
|
O("div", j_, [
|
|
10092
|
-
Vn(O("div", Q_,
|
|
10092
|
+
Vn(O("div", Q_, D[2] || (D[2] = [
|
|
10093
10093
|
O("div", { class: "lux-office-relation-skeleton" }, [
|
|
10094
10094
|
O("div", { class: "lux-office-relation-content" })
|
|
10095
10095
|
], -1)
|
|
@@ -10097,8 +10097,8 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
10097
10097
|
[lo, P.value]
|
|
10098
10098
|
]),
|
|
10099
10099
|
wn(nn(fg), {
|
|
10100
|
-
modelValue:
|
|
10101
|
-
"onUpdate:modelValue":
|
|
10100
|
+
modelValue: I.value,
|
|
10101
|
+
"onUpdate:modelValue": D[0] || (D[0] = (S) => I.value = S),
|
|
10102
10102
|
class: qn(["lux-relation-control", {
|
|
10103
10103
|
"lux-office-relation-error": at.isError,
|
|
10104
10104
|
"lux-office-relation-disabled": at.isDisabled,
|
|
@@ -10112,7 +10112,7 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
10112
10112
|
filterable: !1,
|
|
10113
10113
|
onOpen: At,
|
|
10114
10114
|
onClose: Bt,
|
|
10115
|
-
onSearch:
|
|
10115
|
+
onSearch: D[1] || (D[1] = (S) => H.value = S == null ? void 0 : S.toLowerCase())
|
|
10116
10116
|
}, {
|
|
10117
10117
|
option: he((S) => {
|
|
10118
10118
|
var m, R;
|
|
@@ -10125,7 +10125,7 @@ const C_ = { class: "synt-office-relation-wrapper" }, L_ = { class: "synt-office
|
|
|
10125
10125
|
ref_key: "loadMoreTrigger",
|
|
10126
10126
|
ref: J,
|
|
10127
10127
|
class: "flex items-center justify-center"
|
|
10128
|
-
},
|
|
10128
|
+
}, D[3] || (D[3] = [
|
|
10129
10129
|
O("i", { class: "fa-solid fa-spinner animate-spin" }, null, -1)
|
|
10130
10130
|
]), 512), [
|
|
10131
10131
|
[lo, L.value]
|