@anzusystems/common-admin 1.40.0-alpha4 → 1.40.0-alpha5
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/common-admin.es.js +1 -1
- package/dist/{lib-5b0b2b07.js → lib-6cd8af44.js} +708 -708
- package/dist/{lib-5b0b2b07.js.map → lib-6cd8af44.js.map} +1 -1
- package/dist/{shortcut-buttons-flatpickr-8beb2e3b.js → shortcut-buttons-flatpickr-638a91ce.js} +2 -2
- package/dist/{shortcut-buttons-flatpickr-8beb2e3b.js.map → shortcut-buttons-flatpickr-638a91ce.js.map} +1 -1
- package/dist/{webfontloader-b306a0e9.js → webfontloader-cbd6b66b.js} +2 -2
- package/dist/{webfontloader-b306a0e9.js.map → webfontloader-cbd6b66b.js.map} +1 -1
- package/package.json +1 -1
|
@@ -387,11 +387,11 @@ const _hoisted_1$1f = { key: 1 }, _sfc_main$25 = /* @__PURE__ */ defineComponent
|
|
|
387
387
|
});
|
|
388
388
|
const g = () => {
|
|
389
389
|
o.value.page = 1;
|
|
390
|
-
},
|
|
390
|
+
}, q = () => {
|
|
391
391
|
o.value.page = n.value;
|
|
392
392
|
}, $ = () => {
|
|
393
393
|
o.value.page = o.value.page - 1;
|
|
394
|
-
},
|
|
394
|
+
}, Y = () => {
|
|
395
395
|
o.value.page = o.value.page + 1;
|
|
396
396
|
};
|
|
397
397
|
return (N, b) => (openBlock(), createElementBlock("div", _hoisted_1$19, [
|
|
@@ -449,14 +449,14 @@ const _hoisted_1$1f = { key: 1 }, _sfc_main$25 = /* @__PURE__ */ defineComponent
|
|
|
449
449
|
icon: "mdi-chevron-right",
|
|
450
450
|
size: "small",
|
|
451
451
|
variant: "text",
|
|
452
|
-
onClick: withModifiers(
|
|
452
|
+
onClick: withModifiers(Y, ["stop"])
|
|
453
453
|
}, null, 8, ["disabled"]),
|
|
454
454
|
createVNode(VBtn, {
|
|
455
455
|
disabled: m.value,
|
|
456
456
|
icon: "mdi-page-last",
|
|
457
457
|
size: "small",
|
|
458
458
|
variant: "text",
|
|
459
|
-
onClick: withModifiers(
|
|
459
|
+
onClick: withModifiers(q, ["stop"])
|
|
460
460
|
}, null, 8, ["disabled"])
|
|
461
461
|
])
|
|
462
462
|
]));
|
|
@@ -878,7 +878,7 @@ const x = dt(), w = "[-+]?[0-9]*.?[0-9]+", G = [
|
|
|
878
878
|
}, g = () => {
|
|
879
879
|
var M;
|
|
880
880
|
e.pauseOnHover && ((M = s.value) == null || M.resume());
|
|
881
|
-
},
|
|
881
|
+
}, q = (M = {}) => {
|
|
882
882
|
if (M.group || (M.group = ""), M.data || (M.data = {}), e.group !== M.group)
|
|
883
883
|
return;
|
|
884
884
|
if (M.clean || M.clear) {
|
|
@@ -902,7 +902,7 @@ const x = dt(), w = "[-+]?[0-9]*.?[0-9]+", G = [
|
|
|
902
902
|
(!C || !se) && (R ? (o.value.push(K), a("start", K), u.value.length > e.max && (Q = 0)) : (o.value.unshift(K), a("start", K), u.value.length > e.max && (Q = u.value.length - 1)), Q !== -1 && b(u.value[Q]));
|
|
903
903
|
}, $ = (M) => {
|
|
904
904
|
T(M);
|
|
905
|
-
},
|
|
905
|
+
}, Y = (M) => [
|
|
906
906
|
"vue-notification-template",
|
|
907
907
|
e.classes,
|
|
908
908
|
M.type || ""
|
|
@@ -938,7 +938,7 @@ const x = dt(), w = "[-+]?[0-9]*.?[0-9]+", G = [
|
|
|
938
938
|
o.value = o.value.filter((M) => M.state !== r.DESTROYED);
|
|
939
939
|
}
|
|
940
940
|
return onMounted(() => {
|
|
941
|
-
x.on("add",
|
|
941
|
+
x.on("add", q), x.on("close", $);
|
|
942
942
|
}), (M, z) => (openBlock(), createElementBlock("div", {
|
|
943
943
|
class: "vue-notification-group",
|
|
944
944
|
style: normalizeStyle(c.value)
|
|
@@ -964,7 +964,7 @@ const x = dt(), w = "[-+]?[0-9]*.?[0-9]+", G = [
|
|
|
964
964
|
close: () => b(I)
|
|
965
965
|
}, () => [
|
|
966
966
|
createElementVNode("div", {
|
|
967
|
-
class: normalizeClass(
|
|
967
|
+
class: normalizeClass(Y(I)),
|
|
968
968
|
onClick: (C) => V(I)
|
|
969
969
|
}, [
|
|
970
970
|
M.dangerouslySetInnerHtml ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -1072,105 +1072,105 @@ class AnzuApiForbiddenOperationError extends Error {
|
|
|
1072
1072
|
const DEFAULT_DURATION_SECONDS = 3, NEW_LINE_MARK = `
|
|
1073
1073
|
`;
|
|
1074
1074
|
function useAlerts() {
|
|
1075
|
-
const i = (g,
|
|
1075
|
+
const i = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1076
1076
|
L({
|
|
1077
1077
|
group: "alerts",
|
|
1078
1078
|
text: g,
|
|
1079
|
-
duration:
|
|
1079
|
+
duration: q * 1e3,
|
|
1080
1080
|
type: "success"
|
|
1081
1081
|
});
|
|
1082
|
-
}, a = (g,
|
|
1082
|
+
}, a = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1083
1083
|
const { t: $ } = i18n.global;
|
|
1084
|
-
i($(g),
|
|
1085
|
-
}, e = (g,
|
|
1084
|
+
i($(g), q);
|
|
1085
|
+
}, e = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1086
1086
|
L({
|
|
1087
1087
|
group: "alerts",
|
|
1088
1088
|
text: g,
|
|
1089
|
-
duration:
|
|
1089
|
+
duration: q * 1e3,
|
|
1090
1090
|
type: "error"
|
|
1091
1091
|
});
|
|
1092
|
-
}, r = (g,
|
|
1092
|
+
}, r = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1093
1093
|
const { t: $ } = i18n.global;
|
|
1094
|
-
e($(g),
|
|
1095
|
-
}, o = (g,
|
|
1094
|
+
e($(g), q);
|
|
1095
|
+
}, o = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1096
1096
|
L({
|
|
1097
1097
|
group: "alerts",
|
|
1098
1098
|
text: g,
|
|
1099
|
-
duration:
|
|
1099
|
+
duration: q * 1e3,
|
|
1100
1100
|
type: "info"
|
|
1101
1101
|
});
|
|
1102
|
-
}, s = (g,
|
|
1102
|
+
}, s = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1103
1103
|
const { t: $ } = i18n.global;
|
|
1104
|
-
o($(g),
|
|
1105
|
-
}, n = (g,
|
|
1104
|
+
o($(g), q);
|
|
1105
|
+
}, n = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1106
1106
|
L({
|
|
1107
1107
|
group: "alerts",
|
|
1108
1108
|
text: g,
|
|
1109
|
-
duration:
|
|
1109
|
+
duration: q * 1e3,
|
|
1110
1110
|
type: "warning"
|
|
1111
1111
|
});
|
|
1112
|
-
}, l = (g,
|
|
1112
|
+
}, l = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1113
1113
|
const { t: $ } = i18n.global;
|
|
1114
|
-
n($(g),
|
|
1114
|
+
n($(g), q);
|
|
1115
1115
|
}, d = (g = DEFAULT_DURATION_SECONDS) => {
|
|
1116
|
-
const { t:
|
|
1116
|
+
const { t: q } = i18n.global;
|
|
1117
1117
|
L({
|
|
1118
1118
|
group: "alerts",
|
|
1119
|
-
text:
|
|
1119
|
+
text: q("common.alert.fixValidationErrors"),
|
|
1120
1120
|
duration: g * 1e3,
|
|
1121
1121
|
type: "error"
|
|
1122
1122
|
});
|
|
1123
|
-
}, u = (g,
|
|
1123
|
+
}, u = (g, q = DEFAULT_DURATION_SECONDS) => {
|
|
1124
1124
|
const { t: $ } = i18n.global;
|
|
1125
1125
|
L({
|
|
1126
1126
|
group: "alerts",
|
|
1127
1127
|
text: $("common.alert.recordWas." + g),
|
|
1128
|
-
duration:
|
|
1128
|
+
duration: q * 1e3,
|
|
1129
1129
|
type: "success"
|
|
1130
1130
|
});
|
|
1131
|
-
}, m = (g,
|
|
1132
|
-
const { t:
|
|
1131
|
+
}, m = (g, q = -1, $ = !1) => {
|
|
1132
|
+
const { t: Y, te: N } = i18n.global, b = [Y("common.alert.fixApiValidationErrors")];
|
|
1133
1133
|
for (let T = 0; T < g.length; T++) {
|
|
1134
1134
|
let D = "";
|
|
1135
|
-
$ ? D += g[T].field : N(g[T].field) && (D +=
|
|
1135
|
+
$ ? D += g[T].field : N(g[T].field) && (D += Y(g[T].field));
|
|
1136
1136
|
const O = /* @__PURE__ */ new Set();
|
|
1137
1137
|
for (let H = 0; H < g[T].errors.length; H++) {
|
|
1138
1138
|
if (N("error.apiValidation." + g[T].errors[H])) {
|
|
1139
|
-
O.add(
|
|
1139
|
+
O.add(Y("error.apiValidation." + g[T].errors[H]));
|
|
1140
1140
|
continue;
|
|
1141
1141
|
}
|
|
1142
|
-
O.add(
|
|
1142
|
+
O.add(Y("error.apiValidation.noTranslation"));
|
|
1143
1143
|
}
|
|
1144
1144
|
D.length > 0 && b.push(D + ": " + Array.from(O).join(", "));
|
|
1145
1145
|
}
|
|
1146
1146
|
L({
|
|
1147
1147
|
group: "alerts",
|
|
1148
1148
|
text: b.join(NEW_LINE_MARK),
|
|
1149
|
-
duration:
|
|
1149
|
+
duration: q * 1e3,
|
|
1150
1150
|
type: "error"
|
|
1151
1151
|
});
|
|
1152
|
-
}, c = (g,
|
|
1153
|
-
const { t: $, te:
|
|
1152
|
+
}, c = (g, q = -1) => {
|
|
1153
|
+
const { t: $, te: Y } = i18n.global;
|
|
1154
1154
|
let N = $("error.apiForbiddenOperation.noTranslation");
|
|
1155
|
-
|
|
1155
|
+
Y("error.apiForbiddenOperation." + g) && (N = $("error.apiForbiddenOperation." + g)), L({
|
|
1156
1156
|
group: "alerts",
|
|
1157
1157
|
text: N,
|
|
1158
|
-
duration:
|
|
1158
|
+
duration: q * 1e3,
|
|
1159
1159
|
type: "error"
|
|
1160
1160
|
});
|
|
1161
1161
|
}, f = (g = -1) => {
|
|
1162
|
-
const { t:
|
|
1162
|
+
const { t: q } = i18n.global;
|
|
1163
1163
|
L({
|
|
1164
1164
|
group: "alerts",
|
|
1165
|
-
text:
|
|
1165
|
+
text: q("common.alert.unknownError"),
|
|
1166
1166
|
duration: g * 1e3,
|
|
1167
1167
|
type: "error"
|
|
1168
1168
|
});
|
|
1169
1169
|
}, V = (g = DEFAULT_DURATION_SECONDS) => {
|
|
1170
|
-
const { t:
|
|
1170
|
+
const { t: q } = i18n.global;
|
|
1171
1171
|
L({
|
|
1172
1172
|
group: "alerts",
|
|
1173
|
-
text:
|
|
1173
|
+
text: q("common.alert.forbiddenError"),
|
|
1174
1174
|
duration: g * 1e3,
|
|
1175
1175
|
type: "error"
|
|
1176
1176
|
});
|
|
@@ -1232,8 +1232,8 @@ const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
|
1232
1232
|
}
|
|
1233
1233
|
};
|
|
1234
1234
|
return (V, p) => {
|
|
1235
|
-
const g = resolveComponent("ABtnTertiary"),
|
|
1236
|
-
return openBlock(), createBlock(
|
|
1235
|
+
const g = resolveComponent("ABtnTertiary"), q = resolveComponent("ABtnPrimary");
|
|
1236
|
+
return openBlock(), createBlock(q, {
|
|
1237
1237
|
class: normalizeClass(V.buttonClass),
|
|
1238
1238
|
rounded: "pill",
|
|
1239
1239
|
"data-cy": V.dataCy,
|
|
@@ -1281,7 +1281,7 @@ const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
|
1281
1281
|
]),
|
|
1282
1282
|
_: 1
|
|
1283
1283
|
}),
|
|
1284
|
-
createVNode(
|
|
1284
|
+
createVNode(q, {
|
|
1285
1285
|
loading: s.value,
|
|
1286
1286
|
"data-cy": "button-confirm",
|
|
1287
1287
|
onClick: withModifiers(f, ["stop"])
|
|
@@ -1387,7 +1387,7 @@ var dayjs_min = { exports: {} };
|
|
|
1387
1387
|
(function(e, r) {
|
|
1388
1388
|
i.exports = r();
|
|
1389
1389
|
})(commonjsGlobal, function() {
|
|
1390
|
-
var e = 1e3, r = 6e4, o = 36e5, s = "millisecond", n = "second", l = "minute", d = "hour", u = "day", m = "week", c = "month", f = "quarter", V = "year", p = "date", g = "Invalid Date",
|
|
1390
|
+
var e = 1e3, r = 6e4, o = 36e5, s = "millisecond", n = "second", l = "minute", d = "hour", u = "day", m = "week", c = "month", f = "quarter", V = "year", p = "date", g = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, $ = /\[([^\]]+)]|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, Y = { 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(C) {
|
|
1391
1391
|
var y = ["th", "st", "nd", "rd"], v = C % 100;
|
|
1392
1392
|
return "[" + C + (y[(v - 20) % 10] || y[v] || y[0]) + "]";
|
|
1393
1393
|
} }, N = function(C, y, v) {
|
|
@@ -1408,7 +1408,7 @@ var dayjs_min = { exports: {} };
|
|
|
1408
1408
|
}, u: function(C) {
|
|
1409
1409
|
return C === void 0;
|
|
1410
1410
|
} }, T = "en", D = {};
|
|
1411
|
-
D[T] =
|
|
1411
|
+
D[T] = Y;
|
|
1412
1412
|
var O = "$isDayjsObject", H = function(C) {
|
|
1413
1413
|
return C instanceof z || !(!C || !C[O]);
|
|
1414
1414
|
}, U = function C(y, v, X) {
|
|
@@ -1450,7 +1450,7 @@ var dayjs_min = { exports: {} };
|
|
|
1450
1450
|
if (S instanceof Date)
|
|
1451
1451
|
return new Date(S);
|
|
1452
1452
|
if (typeof S == "string" && !/Z$/i.test(S)) {
|
|
1453
|
-
var K = S.match(
|
|
1453
|
+
var K = S.match(q);
|
|
1454
1454
|
if (K) {
|
|
1455
1455
|
var R = K[2] - 1 || 0, Q = (K[7] || "0").substring(0, 3);
|
|
1456
1456
|
return E ? new Date(Date.UTC(K[1], R, K[3] || 1, K[4] || 0, K[5] || 0, K[6] || 0, Q)) : new Date(K[1], R, K[3] || 1, K[4] || 0, K[5] || 0, K[6] || 0, Q);
|
|
@@ -1683,11 +1683,11 @@ var utc$1 = { exports: {} };
|
|
|
1683
1683
|
return function(s, n, l) {
|
|
1684
1684
|
var d = n.prototype;
|
|
1685
1685
|
l.utc = function(g) {
|
|
1686
|
-
var
|
|
1687
|
-
return new n(
|
|
1686
|
+
var q = { date: g, utc: !0, args: arguments };
|
|
1687
|
+
return new n(q);
|
|
1688
1688
|
}, d.utc = function(g) {
|
|
1689
|
-
var
|
|
1690
|
-
return g ?
|
|
1689
|
+
var q = l(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1690
|
+
return g ? q.add(this.utcOffset(), e) : q;
|
|
1691
1691
|
}, d.local = function() {
|
|
1692
1692
|
return l(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1693
1693
|
};
|
|
@@ -1704,7 +1704,7 @@ var utc$1 = { exports: {} };
|
|
|
1704
1704
|
m.call(this);
|
|
1705
1705
|
};
|
|
1706
1706
|
var c = d.utcOffset;
|
|
1707
|
-
d.utcOffset = function(g,
|
|
1707
|
+
d.utcOffset = function(g, q) {
|
|
1708
1708
|
var $ = this.$utils().u;
|
|
1709
1709
|
if ($(g))
|
|
1710
1710
|
return this.$u ? 0 : $(this.$offset) ? c.call(this) : this.$offset;
|
|
@@ -1717,20 +1717,20 @@ var utc$1 = { exports: {} };
|
|
|
1717
1717
|
return U === 0 ? 0 : H === "+" ? U : -U;
|
|
1718
1718
|
}(g), g === null))
|
|
1719
1719
|
return this;
|
|
1720
|
-
var
|
|
1721
|
-
if (
|
|
1722
|
-
return N.$offset =
|
|
1720
|
+
var Y = Math.abs(g) <= 16 ? 60 * g : g, N = this;
|
|
1721
|
+
if (q)
|
|
1722
|
+
return N.$offset = Y, N.$u = g === 0, N;
|
|
1723
1723
|
if (g !== 0) {
|
|
1724
1724
|
var b = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1725
|
-
(N = this.local().add(
|
|
1725
|
+
(N = this.local().add(Y + b, e)).$offset = Y, N.$x.$localOffset = b;
|
|
1726
1726
|
} else
|
|
1727
1727
|
N = this.utc();
|
|
1728
1728
|
return N;
|
|
1729
1729
|
};
|
|
1730
1730
|
var f = d.format;
|
|
1731
1731
|
d.format = function(g) {
|
|
1732
|
-
var
|
|
1733
|
-
return f.call(this,
|
|
1732
|
+
var q = g || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1733
|
+
return f.call(this, q);
|
|
1734
1734
|
}, d.valueOf = function() {
|
|
1735
1735
|
var g = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1736
1736
|
return this.$d.valueOf() - 6e4 * g;
|
|
@@ -1746,11 +1746,11 @@ var utc$1 = { exports: {} };
|
|
|
1746
1746
|
return g === "s" && this.$offset ? l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : V.call(this);
|
|
1747
1747
|
};
|
|
1748
1748
|
var p = d.diff;
|
|
1749
|
-
d.diff = function(g,
|
|
1749
|
+
d.diff = function(g, q, $) {
|
|
1750
1750
|
if (g && this.$u === g.$u)
|
|
1751
|
-
return p.call(this, g,
|
|
1752
|
-
var
|
|
1753
|
-
return p.call(
|
|
1751
|
+
return p.call(this, g, q, $);
|
|
1752
|
+
var Y = this.local(), N = l(g).local();
|
|
1753
|
+
return p.call(Y, N, q, $);
|
|
1754
1754
|
};
|
|
1755
1755
|
};
|
|
1756
1756
|
});
|
|
@@ -1911,9 +1911,9 @@ const _sfc_main$1Q = /* @__PURE__ */ defineComponent({
|
|
|
1911
1911
|
V.value.model = b;
|
|
1912
1912
|
return;
|
|
1913
1913
|
}
|
|
1914
|
-
const T =
|
|
1914
|
+
const T = q(b);
|
|
1915
1915
|
isUndefined$1(T) || (T.model = b), p.value = T, f(p);
|
|
1916
|
-
},
|
|
1916
|
+
}, q = (b) => {
|
|
1917
1917
|
if (isInt(b) && u(r))
|
|
1918
1918
|
return r.value;
|
|
1919
1919
|
if (isDocId(b) && u(s))
|
|
@@ -1931,11 +1931,11 @@ const _sfc_main$1Q = /* @__PURE__ */ defineComponent({
|
|
|
1931
1931
|
return d(p.value.titleT ?? "");
|
|
1932
1932
|
const b = [];
|
|
1933
1933
|
return u(r) && b.push(d(r.value.titleT ?? "")), u(s) && b.push(d(s.value.titleT ?? "")), u(n) && b.push(d(n.value.titleT ?? "")), u(o) && b.push(d(o.value.titleT ?? "")), b.join("/");
|
|
1934
|
-
}),
|
|
1934
|
+
}), Y = computed(() => {
|
|
1935
1935
|
var b;
|
|
1936
1936
|
return (b = p.value) == null ? void 0 : b.model;
|
|
1937
1937
|
});
|
|
1938
|
-
watch(
|
|
1938
|
+
watch(Y, (b) => {
|
|
1939
1939
|
!isEmpty(e.value) && isEmpty(b) && (e.value = "");
|
|
1940
1940
|
});
|
|
1941
1941
|
const N = computed(() => {
|
|
@@ -2805,17 +2805,17 @@ var doNothing = function() {
|
|
|
2805
2805
|
else if (/Z$/.test(V) || /GMT$/.test(V))
|
|
2806
2806
|
m = new Date(s);
|
|
2807
2807
|
else {
|
|
2808
|
-
for (var p = void 0, g = [],
|
|
2809
|
-
var N = f[
|
|
2808
|
+
for (var p = void 0, g = [], q = 0, $ = 0, Y = ""; q < f.length; q++) {
|
|
2809
|
+
var N = f[q], b = N === "\\", T = f[q - 1] === "\\" || b;
|
|
2810
2810
|
if (tokenRegex[N] && !T) {
|
|
2811
|
-
|
|
2812
|
-
var D = new RegExp(
|
|
2811
|
+
Y += tokenRegex[N];
|
|
2812
|
+
var D = new RegExp(Y).exec(s);
|
|
2813
2813
|
D && (p = !0) && g[N !== "Y" ? "push" : "unshift"]({
|
|
2814
2814
|
fn: revFormat[N],
|
|
2815
2815
|
val: D[++$]
|
|
2816
2816
|
});
|
|
2817
2817
|
} else
|
|
2818
|
-
b || (
|
|
2818
|
+
b || (Y += ".");
|
|
2819
2819
|
}
|
|
2820
2820
|
m = !e || !e.noCalendar ? new Date((/* @__PURE__ */ new Date()).getFullYear(), 0, 1, 0, 0, 0, 0) : new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)), g.forEach(function(O) {
|
|
2821
2821
|
var H = O.fn, U = O.val;
|
|
@@ -2893,107 +2893,107 @@ function FlatpickrInstance(i, a) {
|
|
|
2893
2893
|
config: __assign(__assign({}, defaults$1), flatpickr$1.defaultConfig),
|
|
2894
2894
|
l10n: english
|
|
2895
2895
|
};
|
|
2896
|
-
e.parseDate = createDateParser({ config: e.config, l10n: e.l10n }), e._handlers = [], e.pluginElements = [], e.loadedPlugins = [], e._bind = g, e._setHoursFromDate = f, e._positionCalendar = ye, e.changeMonth = R, e.changeYear = ne, e.clear = Q, e.close = se, e.onMouseOver = Ve, e._createElement = createElement, e.createDay = D, e.destroy = oe, e.isEnabled = me, e.jumpToDate =
|
|
2896
|
+
e.parseDate = createDateParser({ config: e.config, l10n: e.l10n }), e._handlers = [], e.pluginElements = [], e.loadedPlugins = [], e._bind = g, e._setHoursFromDate = f, e._positionCalendar = ye, e.changeMonth = R, e.changeYear = ne, e.clear = Q, e.close = se, e.onMouseOver = Ve, e._createElement = createElement, e.createDay = D, e.destroy = oe, e.isEnabled = me, e.jumpToDate = Y, e.updateValue = Ce, e.open = Ye, e.redraw = Be, e.set = ze, e.setDate = Re, e.toggle = We;
|
|
2897
2897
|
function r() {
|
|
2898
2898
|
e.utils = {
|
|
2899
|
-
getDaysInMonth: function(
|
|
2900
|
-
return
|
|
2899
|
+
getDaysInMonth: function(A, _) {
|
|
2900
|
+
return A === void 0 && (A = e.currentMonth), _ === void 0 && (_ = e.currentYear), A === 1 && (_ % 4 === 0 && _ % 100 !== 0 || _ % 400 === 0) ? 29 : e.l10n.daysInMonth[A];
|
|
2901
2901
|
}
|
|
2902
2902
|
};
|
|
2903
2903
|
}
|
|
2904
2904
|
function o() {
|
|
2905
2905
|
e.element = e.input = i, e.isOpen = !1, qe(), xe(), je(), Ue(), r(), e.isMobile || T(), $(), (e.selectedDates.length || e.config.noCalendar) && (e.config.enableTime && f(e.config.noCalendar ? e.latestSelectedDateObj : void 0), Ce(!1)), l();
|
|
2906
|
-
var
|
|
2907
|
-
!e.isMobile &&
|
|
2906
|
+
var A = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
2907
|
+
!e.isMobile && A && ye(), ge("onReady");
|
|
2908
2908
|
}
|
|
2909
2909
|
function s() {
|
|
2910
|
-
var
|
|
2911
|
-
return ((
|
|
2910
|
+
var A;
|
|
2911
|
+
return ((A = e.calendarContainer) === null || A === void 0 ? void 0 : A.getRootNode()).activeElement || document.activeElement;
|
|
2912
2912
|
}
|
|
2913
|
-
function n(
|
|
2914
|
-
return
|
|
2913
|
+
function n(A) {
|
|
2914
|
+
return A.bind(e);
|
|
2915
2915
|
}
|
|
2916
2916
|
function l() {
|
|
2917
|
-
var
|
|
2918
|
-
|
|
2917
|
+
var A = e.config;
|
|
2918
|
+
A.weekNumbers === !1 && A.showMonths === 1 || A.noCalendar !== !0 && window.requestAnimationFrame(function() {
|
|
2919
2919
|
if (e.calendarContainer !== void 0 && (e.calendarContainer.style.visibility = "hidden", e.calendarContainer.style.display = "block"), e.daysContainer !== void 0) {
|
|
2920
|
-
var _ = (e.days.offsetWidth + 1) *
|
|
2920
|
+
var _ = (e.days.offsetWidth + 1) * A.showMonths;
|
|
2921
2921
|
e.daysContainer.style.width = _ + "px", e.calendarContainer.style.width = _ + (e.weekWrapper !== void 0 ? e.weekWrapper.offsetWidth : 0) + "px", e.calendarContainer.style.removeProperty("visibility"), e.calendarContainer.style.removeProperty("display");
|
|
2922
2922
|
}
|
|
2923
2923
|
});
|
|
2924
2924
|
}
|
|
2925
|
-
function d(
|
|
2925
|
+
function d(A) {
|
|
2926
2926
|
if (e.selectedDates.length === 0) {
|
|
2927
2927
|
var _ = e.config.minDate === void 0 || compareDates(/* @__PURE__ */ new Date(), e.config.minDate) >= 0 ? /* @__PURE__ */ new Date() : new Date(e.config.minDate.getTime()), B = getDefaultHours(e.config);
|
|
2928
2928
|
_.setHours(B.hours, B.minutes, B.seconds, _.getMilliseconds()), e.selectedDates = [_], e.latestSelectedDateObj = _;
|
|
2929
2929
|
}
|
|
2930
|
-
|
|
2930
|
+
A !== void 0 && A.type !== "blur" && Ze(A);
|
|
2931
2931
|
var P = e._input.value;
|
|
2932
2932
|
c(), Ce(), e._input.value !== P && e._debouncedChange();
|
|
2933
2933
|
}
|
|
2934
|
-
function u(
|
|
2935
|
-
return
|
|
2934
|
+
function u(A, _) {
|
|
2935
|
+
return A % 12 + 12 * int(_ === e.l10n.amPM[1]);
|
|
2936
2936
|
}
|
|
2937
|
-
function m(
|
|
2938
|
-
switch (
|
|
2937
|
+
function m(A) {
|
|
2938
|
+
switch (A % 24) {
|
|
2939
2939
|
case 0:
|
|
2940
2940
|
case 12:
|
|
2941
2941
|
return 12;
|
|
2942
2942
|
default:
|
|
2943
|
-
return
|
|
2943
|
+
return A % 12;
|
|
2944
2944
|
}
|
|
2945
2945
|
}
|
|
2946
2946
|
function c() {
|
|
2947
2947
|
if (!(e.hourElement === void 0 || e.minuteElement === void 0)) {
|
|
2948
|
-
var
|
|
2949
|
-
e.amPM !== void 0 && (
|
|
2948
|
+
var A = (parseInt(e.hourElement.value.slice(-2), 10) || 0) % 24, _ = (parseInt(e.minuteElement.value, 10) || 0) % 60, B = e.secondElement !== void 0 ? (parseInt(e.secondElement.value, 10) || 0) % 60 : 0;
|
|
2949
|
+
e.amPM !== void 0 && (A = u(A, e.amPM.textContent));
|
|
2950
2950
|
var P = e.config.minTime !== void 0 || e.config.minDate && e.minDateHasTime && e.latestSelectedDateObj && compareDates(e.latestSelectedDateObj, e.config.minDate, !0) === 0, Z = e.config.maxTime !== void 0 || e.config.maxDate && e.maxDateHasTime && e.latestSelectedDateObj && compareDates(e.latestSelectedDateObj, e.config.maxDate, !0) === 0;
|
|
2951
2951
|
if (e.config.maxTime !== void 0 && e.config.minTime !== void 0 && e.config.minTime > e.config.maxTime) {
|
|
2952
|
-
var te = calculateSecondsSinceMidnight(e.config.minTime.getHours(), e.config.minTime.getMinutes(), e.config.minTime.getSeconds()), de = calculateSecondsSinceMidnight(e.config.maxTime.getHours(), e.config.maxTime.getMinutes(), e.config.maxTime.getSeconds()), re = calculateSecondsSinceMidnight(
|
|
2952
|
+
var te = calculateSecondsSinceMidnight(e.config.minTime.getHours(), e.config.minTime.getMinutes(), e.config.minTime.getSeconds()), de = calculateSecondsSinceMidnight(e.config.maxTime.getHours(), e.config.maxTime.getMinutes(), e.config.maxTime.getSeconds()), re = calculateSecondsSinceMidnight(A, _, B);
|
|
2953
2953
|
if (re > de && re < te) {
|
|
2954
2954
|
var ce = parseSeconds(te);
|
|
2955
|
-
|
|
2955
|
+
A = ce[0], _ = ce[1], B = ce[2];
|
|
2956
2956
|
}
|
|
2957
2957
|
} else {
|
|
2958
2958
|
if (Z) {
|
|
2959
2959
|
var ae = e.config.maxTime !== void 0 ? e.config.maxTime : e.config.maxDate;
|
|
2960
|
-
|
|
2960
|
+
A = Math.min(A, ae.getHours()), A === ae.getHours() && (_ = Math.min(_, ae.getMinutes())), _ === ae.getMinutes() && (B = Math.min(B, ae.getSeconds()));
|
|
2961
2961
|
}
|
|
2962
2962
|
if (P) {
|
|
2963
2963
|
var le = e.config.minTime !== void 0 ? e.config.minTime : e.config.minDate;
|
|
2964
|
-
|
|
2964
|
+
A = Math.max(A, le.getHours()), A === le.getHours() && _ < le.getMinutes() && (_ = le.getMinutes()), _ === le.getMinutes() && (B = Math.max(B, le.getSeconds()));
|
|
2965
2965
|
}
|
|
2966
2966
|
}
|
|
2967
|
-
V(
|
|
2967
|
+
V(A, _, B);
|
|
2968
2968
|
}
|
|
2969
2969
|
}
|
|
2970
|
-
function f(
|
|
2971
|
-
var _ =
|
|
2970
|
+
function f(A) {
|
|
2971
|
+
var _ = A || e.latestSelectedDateObj;
|
|
2972
2972
|
_ && _ instanceof Date && V(_.getHours(), _.getMinutes(), _.getSeconds());
|
|
2973
2973
|
}
|
|
2974
|
-
function V(
|
|
2975
|
-
e.latestSelectedDateObj !== void 0 && e.latestSelectedDateObj.setHours(
|
|
2974
|
+
function V(A, _, B) {
|
|
2975
|
+
e.latestSelectedDateObj !== void 0 && e.latestSelectedDateObj.setHours(A % 24, _, B || 0, 0), !(!e.hourElement || !e.minuteElement || e.isMobile) && (e.hourElement.value = pad(e.config.time_24hr ? A : (12 + A) % 12 + 12 * int(A % 12 === 0)), e.minuteElement.value = pad(_), e.amPM !== void 0 && (e.amPM.textContent = e.l10n.amPM[int(A >= 12)]), e.secondElement !== void 0 && (e.secondElement.value = pad(B)));
|
|
2976
2976
|
}
|
|
2977
|
-
function p(
|
|
2978
|
-
var _ = getEventTarget(
|
|
2979
|
-
(B / 1e3 > 1 ||
|
|
2977
|
+
function p(A) {
|
|
2978
|
+
var _ = getEventTarget(A), B = parseInt(_.value) + (A.delta || 0);
|
|
2979
|
+
(B / 1e3 > 1 || A.key === "Enter" && !/[^\d]/.test(B.toString())) && ne(B);
|
|
2980
2980
|
}
|
|
2981
|
-
function g(
|
|
2981
|
+
function g(A, _, B, P) {
|
|
2982
2982
|
if (_ instanceof Array)
|
|
2983
2983
|
return _.forEach(function(Z) {
|
|
2984
|
-
return g(
|
|
2984
|
+
return g(A, Z, B, P);
|
|
2985
2985
|
});
|
|
2986
|
-
if (
|
|
2987
|
-
return
|
|
2986
|
+
if (A instanceof Array)
|
|
2987
|
+
return A.forEach(function(Z) {
|
|
2988
2988
|
return g(Z, _, B, P);
|
|
2989
2989
|
});
|
|
2990
|
-
|
|
2990
|
+
A.addEventListener(_, B, P), e._handlers.push({
|
|
2991
2991
|
remove: function() {
|
|
2992
|
-
return
|
|
2992
|
+
return A.removeEventListener(_, B, P);
|
|
2993
2993
|
}
|
|
2994
2994
|
});
|
|
2995
2995
|
}
|
|
2996
|
-
function
|
|
2996
|
+
function q() {
|
|
2997
2997
|
ge("onChange");
|
|
2998
2998
|
}
|
|
2999
2999
|
function $() {
|
|
@@ -3005,10 +3005,10 @@ function FlatpickrInstance(i, a) {
|
|
|
3005
3005
|
He();
|
|
3006
3006
|
return;
|
|
3007
3007
|
}
|
|
3008
|
-
var
|
|
3009
|
-
if (e._debouncedChange = debounce(
|
|
3008
|
+
var A = debounce(he, 50);
|
|
3009
|
+
if (e._debouncedChange = debounce(q, DEBOUNCED_CHANGE_MS), e.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent) && g(e.daysContainer, "mouseover", function(B) {
|
|
3010
3010
|
e.config.mode === "range" && Ve(getEventTarget(B));
|
|
3011
|
-
}), g(e._input, "keydown", ie), e.calendarContainer !== void 0 && g(e.calendarContainer, "keydown", ie), !e.config.inline && !e.config.static && g(window, "resize",
|
|
3011
|
+
}), g(e._input, "keydown", ie), e.calendarContainer !== void 0 && g(e.calendarContainer, "keydown", ie), !e.config.inline && !e.config.static && g(window, "resize", A), window.ontouchstart !== void 0 ? g(window.document, "touchstart", J) : g(window.document, "mousedown", J), g(window.document, "focus", J, { capture: !0 }), e.config.clickOpens === !0 && (g(e._input, "focus", e.open), g(e._input, "click", e.open)), e.daysContainer !== void 0 && (g(e.monthNav, "click", Qe), g(e.monthNav, ["keyup", "increment"], p), g(e.daysContainer, "click", Ke)), e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0) {
|
|
3012
3012
|
var _ = function(B) {
|
|
3013
3013
|
return getEventTarget(B).select();
|
|
3014
3014
|
};
|
|
@@ -3020,8 +3020,8 @@ function FlatpickrInstance(i, a) {
|
|
|
3020
3020
|
}
|
|
3021
3021
|
e.config.allowInput && g(e._input, "blur", ee);
|
|
3022
3022
|
}
|
|
3023
|
-
function
|
|
3024
|
-
var B =
|
|
3023
|
+
function Y(A, _) {
|
|
3024
|
+
var B = A !== void 0 ? e.parseDate(A) : e.latestSelectedDateObj || (e.config.minDate && e.config.minDate > e.now ? e.config.minDate : e.config.maxDate && e.config.maxDate < e.now ? e.config.maxDate : e.now), P = e.currentYear, Z = e.currentMonth;
|
|
3025
3025
|
try {
|
|
3026
3026
|
B !== void 0 && (e.currentYear = B.getFullYear(), e.currentMonth = B.getMonth());
|
|
3027
3027
|
} catch (te) {
|
|
@@ -3029,24 +3029,24 @@ function FlatpickrInstance(i, a) {
|
|
|
3029
3029
|
}
|
|
3030
3030
|
_ && e.currentYear !== P && (ge("onYearChange"), I()), _ && (e.currentYear !== P || e.currentMonth !== Z) && ge("onMonthChange"), e.redraw();
|
|
3031
3031
|
}
|
|
3032
|
-
function N(
|
|
3033
|
-
var _ = getEventTarget(
|
|
3034
|
-
~_.className.indexOf("arrow") && b(
|
|
3032
|
+
function N(A) {
|
|
3033
|
+
var _ = getEventTarget(A);
|
|
3034
|
+
~_.className.indexOf("arrow") && b(A, _.classList.contains("arrowUp") ? 1 : -1);
|
|
3035
3035
|
}
|
|
3036
|
-
function b(
|
|
3037
|
-
var P =
|
|
3036
|
+
function b(A, _, B) {
|
|
3037
|
+
var P = A && getEventTarget(A), Z = B || P && P.parentNode && P.parentNode.firstChild, te = ke("increment");
|
|
3038
3038
|
te.delta = _, Z && Z.dispatchEvent(te);
|
|
3039
3039
|
}
|
|
3040
3040
|
function T() {
|
|
3041
|
-
var
|
|
3041
|
+
var A = window.document.createDocumentFragment();
|
|
3042
3042
|
if (e.calendarContainer = createElement("div", "flatpickr-calendar"), e.calendarContainer.tabIndex = -1, !e.config.noCalendar) {
|
|
3043
|
-
if (
|
|
3043
|
+
if (A.appendChild(v()), e.innerContainer = createElement("div", "flatpickr-innerContainer"), e.config.weekNumbers) {
|
|
3044
3044
|
var _ = K(), B = _.weekWrapper, P = _.weekNumbers;
|
|
3045
3045
|
e.innerContainer.appendChild(B), e.weekNumbers = P, e.weekWrapper = B;
|
|
3046
3046
|
}
|
|
3047
|
-
e.rContainer = createElement("div", "flatpickr-rContainer"), e.rContainer.appendChild(S()), e.daysContainer || (e.daysContainer = createElement("div", "flatpickr-days"), e.daysContainer.tabIndex = -1), z(), e.rContainer.appendChild(e.daysContainer), e.innerContainer.appendChild(e.rContainer),
|
|
3047
|
+
e.rContainer = createElement("div", "flatpickr-rContainer"), e.rContainer.appendChild(S()), e.daysContainer || (e.daysContainer = createElement("div", "flatpickr-days"), e.daysContainer.tabIndex = -1), z(), e.rContainer.appendChild(e.daysContainer), e.innerContainer.appendChild(e.rContainer), A.appendChild(e.innerContainer);
|
|
3048
3048
|
}
|
|
3049
|
-
e.config.enableTime &&
|
|
3049
|
+
e.config.enableTime && A.appendChild(X()), toggleClass$2(e.calendarContainer, "rangeMode", e.config.mode === "range"), toggleClass$2(e.calendarContainer, "animate", e.config.animate === !0), toggleClass$2(e.calendarContainer, "multiMonth", e.config.showMonths > 1), e.calendarContainer.appendChild(A);
|
|
3050
3050
|
var Z = e.config.appendTo !== void 0 && e.config.appendTo.nodeType !== void 0;
|
|
3051
3051
|
if ((e.config.inline || e.config.static) && (e.calendarContainer.classList.add(e.config.inline ? "inline" : "static"), e.config.inline && (!Z && e.element.parentNode ? e.element.parentNode.insertBefore(e.calendarContainer, e._input.nextSibling) : e.config.appendTo !== void 0 && e.config.appendTo.appendChild(e.calendarContainer)), e.config.static)) {
|
|
3052
3052
|
var te = createElement("div", "flatpickr-wrapper");
|
|
@@ -3054,69 +3054,69 @@ function FlatpickrInstance(i, a) {
|
|
|
3054
3054
|
}
|
|
3055
3055
|
!e.config.static && !e.config.inline && (e.config.appendTo !== void 0 ? e.config.appendTo : window.document.body).appendChild(e.calendarContainer);
|
|
3056
3056
|
}
|
|
3057
|
-
function D(
|
|
3058
|
-
var Z = me(_, !0), te = createElement("span",
|
|
3059
|
-
return te.dateObj = _, te.$i = P, te.setAttribute("aria-label", e.formatDate(_, e.config.ariaDateFormat)),
|
|
3057
|
+
function D(A, _, B, P) {
|
|
3058
|
+
var Z = me(_, !0), te = createElement("span", A, _.getDate().toString());
|
|
3059
|
+
return te.dateObj = _, te.$i = P, te.setAttribute("aria-label", e.formatDate(_, e.config.ariaDateFormat)), A.indexOf("hidden") === -1 && compareDates(_, e.now) === 0 && (e.todayDateElem = te, te.classList.add("today"), te.setAttribute("aria-current", "date")), Z ? (te.tabIndex = -1, Te(_) && (te.classList.add("selected"), e.selectedDateElem = te, e.config.mode === "range" && (toggleClass$2(te, "startRange", e.selectedDates[0] && compareDates(_, e.selectedDates[0], !0) === 0), toggleClass$2(te, "endRange", e.selectedDates[1] && compareDates(_, e.selectedDates[1], !0) === 0), A === "nextMonthDay" && te.classList.add("inRange")))) : te.classList.add("flatpickr-disabled"), e.config.mode === "range" && Ge(_) && !Te(_) && te.classList.add("inRange"), e.weekNumbers && e.config.showMonths === 1 && A !== "prevMonthDay" && P % 7 === 6 && e.weekNumbers.insertAdjacentHTML("beforeend", "<span class='flatpickr-day'>" + e.config.getWeek(_) + "</span>"), ge("onDayCreate", te), te;
|
|
3060
3060
|
}
|
|
3061
|
-
function O(
|
|
3062
|
-
|
|
3061
|
+
function O(A) {
|
|
3062
|
+
A.focus(), e.config.mode === "range" && Ve(A);
|
|
3063
3063
|
}
|
|
3064
|
-
function H(
|
|
3065
|
-
for (var _ =
|
|
3066
|
-
for (var Z = e.daysContainer.children[P], te =
|
|
3064
|
+
function H(A) {
|
|
3065
|
+
for (var _ = A > 0 ? 0 : e.config.showMonths - 1, B = A > 0 ? e.config.showMonths : -1, P = _; P != B; P += A)
|
|
3066
|
+
for (var Z = e.daysContainer.children[P], te = A > 0 ? 0 : Z.children.length - 1, de = A > 0 ? Z.children.length : -1, re = te; re != de; re += A) {
|
|
3067
3067
|
var ce = Z.children[re];
|
|
3068
3068
|
if (ce.className.indexOf("hidden") === -1 && me(ce.dateObj))
|
|
3069
3069
|
return ce;
|
|
3070
3070
|
}
|
|
3071
3071
|
}
|
|
3072
|
-
function U(
|
|
3073
|
-
for (var B =
|
|
3074
|
-
for (var de = e.daysContainer.children[te], re = B - e.currentMonth === te ?
|
|
3072
|
+
function U(A, _) {
|
|
3073
|
+
for (var B = A.className.indexOf("Month") === -1 ? A.dateObj.getMonth() : e.currentMonth, P = _ > 0 ? e.config.showMonths : -1, Z = _ > 0 ? 1 : -1, te = B - e.currentMonth; te != P; te += Z)
|
|
3074
|
+
for (var de = e.daysContainer.children[te], re = B - e.currentMonth === te ? A.$i + _ : _ < 0 ? de.children.length - 1 : 0, ce = de.children.length, ae = re; ae >= 0 && ae < ce && ae != (_ > 0 ? ce : -1); ae += Z) {
|
|
3075
3075
|
var le = de.children[ae];
|
|
3076
|
-
if (le.className.indexOf("hidden") === -1 && me(le.dateObj) && Math.abs(
|
|
3076
|
+
if (le.className.indexOf("hidden") === -1 && me(le.dateObj) && Math.abs(A.$i - ae) >= Math.abs(_))
|
|
3077
3077
|
return O(le);
|
|
3078
3078
|
}
|
|
3079
3079
|
e.changeMonth(Z), W(H(Z), 0);
|
|
3080
3080
|
}
|
|
3081
|
-
function W(
|
|
3082
|
-
var B = s(), P = ue(B || document.body), Z =
|
|
3081
|
+
function W(A, _) {
|
|
3082
|
+
var B = s(), P = ue(B || document.body), Z = A !== void 0 ? A : P ? B : e.selectedDateElem !== void 0 && ue(e.selectedDateElem) ? e.selectedDateElem : e.todayDateElem !== void 0 && ue(e.todayDateElem) ? e.todayDateElem : H(_ > 0 ? 1 : -1);
|
|
3083
3083
|
Z === void 0 ? e._input.focus() : P ? U(Z, _) : O(Z);
|
|
3084
3084
|
}
|
|
3085
|
-
function M(
|
|
3086
|
-
for (var B = (new Date(
|
|
3087
|
-
te.appendChild(D("flatpickr-day " + re, new Date(
|
|
3085
|
+
function M(A, _) {
|
|
3086
|
+
for (var B = (new Date(A, _, 1).getDay() - e.l10n.firstDayOfWeek + 7) % 7, P = e.utils.getDaysInMonth((_ - 1 + 12) % 12, A), Z = e.utils.getDaysInMonth(_, A), te = window.document.createDocumentFragment(), de = e.config.showMonths > 1, re = de ? "prevMonthDay hidden" : "prevMonthDay", ce = de ? "nextMonthDay hidden" : "nextMonthDay", ae = P + 1 - B, le = 0; ae <= P; ae++, le++)
|
|
3087
|
+
te.appendChild(D("flatpickr-day " + re, new Date(A, _ - 1, ae), ae, le));
|
|
3088
3088
|
for (ae = 1; ae <= Z; ae++, le++)
|
|
3089
|
-
te.appendChild(D("flatpickr-day", new Date(
|
|
3089
|
+
te.appendChild(D("flatpickr-day", new Date(A, _, ae), ae, le));
|
|
3090
3090
|
for (var pe = Z + 1; pe <= 42 - B && (e.config.showMonths === 1 || le % 7 !== 0); pe++, le++)
|
|
3091
|
-
te.appendChild(D("flatpickr-day " + ce, new Date(
|
|
3091
|
+
te.appendChild(D("flatpickr-day " + ce, new Date(A, _ + 1, pe % Z), pe, le));
|
|
3092
3092
|
var Xe = createElement("div", "dayContainer");
|
|
3093
3093
|
return Xe.appendChild(te), Xe;
|
|
3094
3094
|
}
|
|
3095
3095
|
function z() {
|
|
3096
3096
|
if (e.daysContainer !== void 0) {
|
|
3097
3097
|
clearNode(e.daysContainer), e.weekNumbers && clearNode(e.weekNumbers);
|
|
3098
|
-
for (var
|
|
3098
|
+
for (var A = document.createDocumentFragment(), _ = 0; _ < e.config.showMonths; _++) {
|
|
3099
3099
|
var B = new Date(e.currentYear, e.currentMonth, 1);
|
|
3100
|
-
B.setMonth(e.currentMonth + _),
|
|
3100
|
+
B.setMonth(e.currentMonth + _), A.appendChild(M(B.getFullYear(), B.getMonth()));
|
|
3101
3101
|
}
|
|
3102
|
-
e.daysContainer.appendChild(
|
|
3102
|
+
e.daysContainer.appendChild(A), e.days = e.daysContainer.firstChild, e.config.mode === "range" && e.selectedDates.length === 1 && Ve();
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
3105
3105
|
function I() {
|
|
3106
3106
|
if (!(e.config.showMonths > 1 || e.config.monthSelectorType !== "dropdown")) {
|
|
3107
|
-
var
|
|
3107
|
+
var A = function(P) {
|
|
3108
3108
|
return e.config.minDate !== void 0 && e.currentYear === e.config.minDate.getFullYear() && P < e.config.minDate.getMonth() ? !1 : !(e.config.maxDate !== void 0 && e.currentYear === e.config.maxDate.getFullYear() && P > e.config.maxDate.getMonth());
|
|
3109
3109
|
};
|
|
3110
3110
|
e.monthsDropdownContainer.tabIndex = -1, e.monthsDropdownContainer.innerHTML = "";
|
|
3111
3111
|
for (var _ = 0; _ < 12; _++)
|
|
3112
|
-
if (
|
|
3112
|
+
if (A(_)) {
|
|
3113
3113
|
var B = createElement("option", "flatpickr-monthDropdown-month");
|
|
3114
3114
|
B.value = new Date(e.currentYear, _).getMonth().toString(), B.textContent = monthToStr(_, e.config.shorthandCurrentMonth, e.l10n), B.tabIndex = -1, e.currentMonth === _ && (B.selected = !0), e.monthsDropdownContainer.appendChild(B);
|
|
3115
3115
|
}
|
|
3116
3116
|
}
|
|
3117
3117
|
}
|
|
3118
3118
|
function C() {
|
|
3119
|
-
var
|
|
3119
|
+
var A = createElement("div", "flatpickr-month"), _ = window.document.createDocumentFragment(), B;
|
|
3120
3120
|
e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? B = createElement("span", "cur-month") : (e.monthsDropdownContainer = createElement("select", "flatpickr-monthDropdown-months"), e.monthsDropdownContainer.setAttribute("aria-label", e.l10n.monthAriaLabel), g(e.monthsDropdownContainer, "change", function(de) {
|
|
3121
3121
|
var re = getEventTarget(de), ce = parseInt(re.value, 10);
|
|
3122
3122
|
e.changeMonth(ce - e.currentMonth), ge("onMonthChange");
|
|
@@ -3124,15 +3124,15 @@ function FlatpickrInstance(i, a) {
|
|
|
3124
3124
|
var P = createNumberInput("cur-year", { tabindex: "-1" }), Z = P.getElementsByTagName("input")[0];
|
|
3125
3125
|
Z.setAttribute("aria-label", e.l10n.yearAriaLabel), e.config.minDate && Z.setAttribute("min", e.config.minDate.getFullYear().toString()), e.config.maxDate && (Z.setAttribute("max", e.config.maxDate.getFullYear().toString()), Z.disabled = !!e.config.minDate && e.config.minDate.getFullYear() === e.config.maxDate.getFullYear());
|
|
3126
3126
|
var te = createElement("div", "flatpickr-current-month");
|
|
3127
|
-
return te.appendChild(B), te.appendChild(P), _.appendChild(te),
|
|
3128
|
-
container:
|
|
3127
|
+
return te.appendChild(B), te.appendChild(P), _.appendChild(te), A.appendChild(_), {
|
|
3128
|
+
container: A,
|
|
3129
3129
|
yearElement: Z,
|
|
3130
3130
|
monthElement: B
|
|
3131
3131
|
};
|
|
3132
3132
|
}
|
|
3133
3133
|
function y() {
|
|
3134
3134
|
clearNode(e.monthNav), e.monthNav.appendChild(e.prevMonthNav), e.config.showMonths && (e.yearElements = [], e.monthElements = []);
|
|
3135
|
-
for (var
|
|
3135
|
+
for (var A = e.config.showMonths; A--; ) {
|
|
3136
3136
|
var _ = C();
|
|
3137
3137
|
e.yearElements.push(_.yearElement), e.monthElements.push(_.monthElement), e.monthNav.appendChild(_.container);
|
|
3138
3138
|
}
|
|
@@ -3143,21 +3143,21 @@ function FlatpickrInstance(i, a) {
|
|
|
3143
3143
|
get: function() {
|
|
3144
3144
|
return e.__hidePrevMonthArrow;
|
|
3145
3145
|
},
|
|
3146
|
-
set: function(
|
|
3147
|
-
e.__hidePrevMonthArrow !==
|
|
3146
|
+
set: function(A) {
|
|
3147
|
+
e.__hidePrevMonthArrow !== A && (toggleClass$2(e.prevMonthNav, "flatpickr-disabled", A), e.__hidePrevMonthArrow = A);
|
|
3148
3148
|
}
|
|
3149
3149
|
}), Object.defineProperty(e, "_hideNextMonthArrow", {
|
|
3150
3150
|
get: function() {
|
|
3151
3151
|
return e.__hideNextMonthArrow;
|
|
3152
3152
|
},
|
|
3153
|
-
set: function(
|
|
3154
|
-
e.__hideNextMonthArrow !==
|
|
3153
|
+
set: function(A) {
|
|
3154
|
+
e.__hideNextMonthArrow !== A && (toggleClass$2(e.nextMonthNav, "flatpickr-disabled", A), e.__hideNextMonthArrow = A);
|
|
3155
3155
|
}
|
|
3156
3156
|
}), e.currentYearElement = e.yearElements[0], Se(), e.monthNav;
|
|
3157
3157
|
}
|
|
3158
3158
|
function X() {
|
|
3159
3159
|
e.calendarContainer.classList.add("hasTime"), e.config.noCalendar && e.calendarContainer.classList.add("noCalendar");
|
|
3160
|
-
var
|
|
3160
|
+
var A = getDefaultHours(e.config);
|
|
3161
3161
|
e.timeContainer = createElement("div", "flatpickr-time"), e.timeContainer.tabIndex = -1;
|
|
3162
3162
|
var _ = createElement("span", "flatpickr-time-separator", ":"), B = createNumberInput("flatpickr-hour", {
|
|
3163
3163
|
"aria-label": e.l10n.hourAriaLabel
|
|
@@ -3166,16 +3166,16 @@ function FlatpickrInstance(i, a) {
|
|
|
3166
3166
|
var P = createNumberInput("flatpickr-minute", {
|
|
3167
3167
|
"aria-label": e.l10n.minuteAriaLabel
|
|
3168
3168
|
});
|
|
3169
|
-
if (e.minuteElement = P.getElementsByTagName("input")[0], e.hourElement.tabIndex = e.minuteElement.tabIndex = -1, e.hourElement.value = pad(e.latestSelectedDateObj ? e.latestSelectedDateObj.getHours() : e.config.time_24hr ?
|
|
3169
|
+
if (e.minuteElement = P.getElementsByTagName("input")[0], e.hourElement.tabIndex = e.minuteElement.tabIndex = -1, e.hourElement.value = pad(e.latestSelectedDateObj ? e.latestSelectedDateObj.getHours() : e.config.time_24hr ? A.hours : m(A.hours)), e.minuteElement.value = pad(e.latestSelectedDateObj ? e.latestSelectedDateObj.getMinutes() : A.minutes), e.hourElement.setAttribute("step", e.config.hourIncrement.toString()), e.minuteElement.setAttribute("step", e.config.minuteIncrement.toString()), e.hourElement.setAttribute("min", e.config.time_24hr ? "0" : "1"), e.hourElement.setAttribute("max", e.config.time_24hr ? "23" : "12"), e.hourElement.setAttribute("maxlength", "2"), e.minuteElement.setAttribute("min", "0"), e.minuteElement.setAttribute("max", "59"), e.minuteElement.setAttribute("maxlength", "2"), e.timeContainer.appendChild(B), e.timeContainer.appendChild(_), e.timeContainer.appendChild(P), e.config.time_24hr && e.timeContainer.classList.add("time24hr"), e.config.enableSeconds) {
|
|
3170
3170
|
e.timeContainer.classList.add("hasSeconds");
|
|
3171
3171
|
var Z = createNumberInput("flatpickr-second");
|
|
3172
|
-
e.secondElement = Z.getElementsByTagName("input")[0], e.secondElement.value = pad(e.latestSelectedDateObj ? e.latestSelectedDateObj.getSeconds() :
|
|
3172
|
+
e.secondElement = Z.getElementsByTagName("input")[0], e.secondElement.value = pad(e.latestSelectedDateObj ? e.latestSelectedDateObj.getSeconds() : A.seconds), e.secondElement.setAttribute("step", e.minuteElement.getAttribute("step")), e.secondElement.setAttribute("min", "0"), e.secondElement.setAttribute("max", "59"), e.secondElement.setAttribute("maxlength", "2"), e.timeContainer.appendChild(createElement("span", "flatpickr-time-separator", ":")), e.timeContainer.appendChild(Z);
|
|
3173
3173
|
}
|
|
3174
3174
|
return e.config.time_24hr || (e.amPM = createElement("span", "flatpickr-am-pm", e.l10n.amPM[int((e.latestSelectedDateObj ? e.hourElement.value : e.config.defaultHour) > 11)]), e.amPM.title = e.l10n.toggleTitle, e.amPM.tabIndex = -1, e.timeContainer.appendChild(e.amPM)), e.timeContainer;
|
|
3175
3175
|
}
|
|
3176
3176
|
function S() {
|
|
3177
3177
|
e.weekdayContainer ? clearNode(e.weekdayContainer) : e.weekdayContainer = createElement("div", "flatpickr-weekdays");
|
|
3178
|
-
for (var
|
|
3178
|
+
for (var A = e.config.showMonths; A--; ) {
|
|
3179
3179
|
var _ = createElement("div", "flatpickr-weekdaycontainer");
|
|
3180
3180
|
e.weekdayContainer.appendChild(_);
|
|
3181
3181
|
}
|
|
@@ -3183,8 +3183,8 @@ function FlatpickrInstance(i, a) {
|
|
|
3183
3183
|
}
|
|
3184
3184
|
function E() {
|
|
3185
3185
|
if (e.weekdayContainer) {
|
|
3186
|
-
var
|
|
3187
|
-
|
|
3186
|
+
var A = e.l10n.firstDayOfWeek, _ = __spreadArrays(e.l10n.weekdays.shorthand);
|
|
3187
|
+
A > 0 && A < _.length && (_ = __spreadArrays(_.splice(A, _.length), _.splice(0, A)));
|
|
3188
3188
|
for (var B = e.config.showMonths; B--; )
|
|
3189
3189
|
e.weekdayContainer.children[B].innerHTML = `
|
|
3190
3190
|
<span class='flatpickr-weekday'>
|
|
@@ -3195,33 +3195,33 @@ function FlatpickrInstance(i, a) {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
function K() {
|
|
3197
3197
|
e.calendarContainer.classList.add("hasWeeks");
|
|
3198
|
-
var
|
|
3199
|
-
|
|
3198
|
+
var A = createElement("div", "flatpickr-weekwrapper");
|
|
3199
|
+
A.appendChild(createElement("span", "flatpickr-weekday", e.l10n.weekAbbreviation));
|
|
3200
3200
|
var _ = createElement("div", "flatpickr-weeks");
|
|
3201
|
-
return
|
|
3202
|
-
weekWrapper:
|
|
3201
|
+
return A.appendChild(_), {
|
|
3202
|
+
weekWrapper: A,
|
|
3203
3203
|
weekNumbers: _
|
|
3204
3204
|
};
|
|
3205
3205
|
}
|
|
3206
|
-
function R(
|
|
3206
|
+
function R(A, _) {
|
|
3207
3207
|
_ === void 0 && (_ = !0);
|
|
3208
|
-
var B = _ ?
|
|
3208
|
+
var B = _ ? A : A - e.currentMonth;
|
|
3209
3209
|
B < 0 && e._hidePrevMonthArrow === !0 || B > 0 && e._hideNextMonthArrow === !0 || (e.currentMonth += B, (e.currentMonth < 0 || e.currentMonth > 11) && (e.currentYear += e.currentMonth > 11 ? 1 : -1, e.currentMonth = (e.currentMonth + 12) % 12, ge("onYearChange"), I()), z(), ge("onMonthChange"), Se());
|
|
3210
3210
|
}
|
|
3211
|
-
function Q(
|
|
3212
|
-
if (
|
|
3211
|
+
function Q(A, _) {
|
|
3212
|
+
if (A === void 0 && (A = !0), _ === void 0 && (_ = !0), e.input.value = "", e.altInput !== void 0 && (e.altInput.value = ""), e.mobileInput !== void 0 && (e.mobileInput.value = ""), e.selectedDates = [], e.latestSelectedDateObj = void 0, _ === !0 && (e.currentYear = e._initialDate.getFullYear(), e.currentMonth = e._initialDate.getMonth()), e.config.enableTime === !0) {
|
|
3213
3213
|
var B = getDefaultHours(e.config), P = B.hours, Z = B.minutes, te = B.seconds;
|
|
3214
3214
|
V(P, Z, te);
|
|
3215
3215
|
}
|
|
3216
|
-
e.redraw(),
|
|
3216
|
+
e.redraw(), A && ge("onChange");
|
|
3217
3217
|
}
|
|
3218
3218
|
function se() {
|
|
3219
3219
|
e.isOpen = !1, e.isMobile || (e.calendarContainer !== void 0 && e.calendarContainer.classList.remove("open"), e._input !== void 0 && e._input.classList.remove("active")), ge("onClose");
|
|
3220
3220
|
}
|
|
3221
3221
|
function oe() {
|
|
3222
3222
|
e.config !== void 0 && ge("onDestroy");
|
|
3223
|
-
for (var
|
|
3224
|
-
e._handlers[
|
|
3223
|
+
for (var A = e._handlers.length; A--; )
|
|
3224
|
+
e._handlers[A].remove();
|
|
3225
3225
|
if (e._handlers = [], e.mobileInput)
|
|
3226
3226
|
e.mobileInput.parentNode && e.mobileInput.parentNode.removeChild(e.mobileInput), e.mobileInput = void 0;
|
|
3227
3227
|
else if (e.calendarContainer && e.calendarContainer.parentNode)
|
|
@@ -3271,27 +3271,27 @@ function FlatpickrInstance(i, a) {
|
|
|
3271
3271
|
}
|
|
3272
3272
|
});
|
|
3273
3273
|
}
|
|
3274
|
-
function fe(
|
|
3275
|
-
return e.calendarContainer.contains(
|
|
3274
|
+
function fe(A) {
|
|
3275
|
+
return e.calendarContainer.contains(A);
|
|
3276
3276
|
}
|
|
3277
|
-
function J(
|
|
3277
|
+
function J(A) {
|
|
3278
3278
|
if (e.isOpen && !e.config.inline) {
|
|
3279
|
-
var _ = getEventTarget(
|
|
3279
|
+
var _ = getEventTarget(A), B = fe(_), P = _ === e.input || _ === e.altInput || e.element.contains(_) || A.path && A.path.indexOf && (~A.path.indexOf(e.input) || ~A.path.indexOf(e.altInput)), Z = !P && !B && !fe(A.relatedTarget), te = !e.config.ignoredFocusElements.some(function(de) {
|
|
3280
3280
|
return de.contains(_);
|
|
3281
3281
|
});
|
|
3282
3282
|
Z && te && (e.config.allowInput && e.setDate(e._input.value, !1, e.config.altInput ? e.config.altFormat : e.config.dateFormat), e.timeContainer !== void 0 && e.minuteElement !== void 0 && e.hourElement !== void 0 && e.input.value !== "" && e.input.value !== void 0 && d(), e.close(), e.config && e.config.mode === "range" && e.selectedDates.length === 1 && e.clear(!1));
|
|
3283
3283
|
}
|
|
3284
3284
|
}
|
|
3285
|
-
function ne(
|
|
3286
|
-
if (!(!
|
|
3287
|
-
var _ =
|
|
3285
|
+
function ne(A) {
|
|
3286
|
+
if (!(!A || e.config.minDate && A < e.config.minDate.getFullYear() || e.config.maxDate && A > e.config.maxDate.getFullYear())) {
|
|
3287
|
+
var _ = A, B = e.currentYear !== _;
|
|
3288
3288
|
e.currentYear = _ || e.currentYear, e.config.maxDate && e.currentYear === e.config.maxDate.getFullYear() ? e.currentMonth = Math.min(e.config.maxDate.getMonth(), e.currentMonth) : e.config.minDate && e.currentYear === e.config.minDate.getFullYear() && (e.currentMonth = Math.max(e.config.minDate.getMonth(), e.currentMonth)), B && (e.redraw(), ge("onYearChange"), I());
|
|
3289
3289
|
}
|
|
3290
3290
|
}
|
|
3291
|
-
function me(
|
|
3291
|
+
function me(A, _) {
|
|
3292
3292
|
var B;
|
|
3293
3293
|
_ === void 0 && (_ = !0);
|
|
3294
|
-
var P = e.parseDate(
|
|
3294
|
+
var P = e.parseDate(A, void 0, _);
|
|
3295
3295
|
if (e.config.minDate && P && compareDates(P, e.config.minDate, _ !== void 0 ? _ : !e.minDateHasTime) < 0 || e.config.maxDate && P && compareDates(P, e.config.maxDate, _ !== void 0 ? _ : !e.maxDateHasTime) > 0)
|
|
3296
3296
|
return !1;
|
|
3297
3297
|
if (!e.config.enable && e.config.disable.length === 0)
|
|
@@ -3311,49 +3311,49 @@ function FlatpickrInstance(i, a) {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
return !Z;
|
|
3313
3313
|
}
|
|
3314
|
-
function ue(
|
|
3315
|
-
return e.daysContainer !== void 0 ?
|
|
3314
|
+
function ue(A) {
|
|
3315
|
+
return e.daysContainer !== void 0 ? A.className.indexOf("hidden") === -1 && A.className.indexOf("flatpickr-disabled") === -1 && e.daysContainer.contains(A) : !1;
|
|
3316
3316
|
}
|
|
3317
|
-
function ee(
|
|
3318
|
-
var _ =
|
|
3319
|
-
_ && B && !(
|
|
3317
|
+
function ee(A) {
|
|
3318
|
+
var _ = A.target === e._input, B = e._input.value.trimEnd() !== Me();
|
|
3319
|
+
_ && B && !(A.relatedTarget && fe(A.relatedTarget)) && e.setDate(e._input.value, !0, A.target === e.altInput ? e.config.altFormat : e.config.dateFormat);
|
|
3320
3320
|
}
|
|
3321
|
-
function ie(
|
|
3322
|
-
var _ = getEventTarget(
|
|
3323
|
-
if (
|
|
3321
|
+
function ie(A) {
|
|
3322
|
+
var _ = getEventTarget(A), B = e.config.wrap ? i.contains(_) : _ === e._input, P = e.config.allowInput, Z = e.isOpen && (!P || !B), te = e.config.inline && B && !P;
|
|
3323
|
+
if (A.keyCode === 13 && B) {
|
|
3324
3324
|
if (P)
|
|
3325
3325
|
return e.setDate(e._input.value, !0, _ === e.altInput ? e.config.altFormat : e.config.dateFormat), e.close(), _.blur();
|
|
3326
3326
|
e.open();
|
|
3327
3327
|
} else if (fe(_) || Z || te) {
|
|
3328
3328
|
var de = !!e.timeContainer && e.timeContainer.contains(_);
|
|
3329
|
-
switch (
|
|
3329
|
+
switch (A.keyCode) {
|
|
3330
3330
|
case 13:
|
|
3331
|
-
de ? (
|
|
3331
|
+
de ? (A.preventDefault(), d(), Ne()) : Ke(A);
|
|
3332
3332
|
break;
|
|
3333
3333
|
case 27:
|
|
3334
|
-
|
|
3334
|
+
A.preventDefault(), Ne();
|
|
3335
3335
|
break;
|
|
3336
3336
|
case 8:
|
|
3337
3337
|
case 46:
|
|
3338
|
-
B && !e.config.allowInput && (
|
|
3338
|
+
B && !e.config.allowInput && (A.preventDefault(), e.clear());
|
|
3339
3339
|
break;
|
|
3340
3340
|
case 37:
|
|
3341
3341
|
case 39:
|
|
3342
3342
|
if (!de && !B) {
|
|
3343
|
-
|
|
3343
|
+
A.preventDefault();
|
|
3344
3344
|
var re = s();
|
|
3345
3345
|
if (e.daysContainer !== void 0 && (P === !1 || re && ue(re))) {
|
|
3346
|
-
var ce =
|
|
3347
|
-
|
|
3346
|
+
var ce = A.keyCode === 39 ? 1 : -1;
|
|
3347
|
+
A.ctrlKey ? (A.stopPropagation(), R(ce), W(H(1), 0)) : W(void 0, ce);
|
|
3348
3348
|
}
|
|
3349
3349
|
} else
|
|
3350
3350
|
e.hourElement && e.hourElement.focus();
|
|
3351
3351
|
break;
|
|
3352
3352
|
case 38:
|
|
3353
3353
|
case 40:
|
|
3354
|
-
|
|
3355
|
-
var ae =
|
|
3356
|
-
e.daysContainer && _.$i !== void 0 || _ === e.input || _ === e.altInput ?
|
|
3354
|
+
A.preventDefault();
|
|
3355
|
+
var ae = A.keyCode === 40 ? 1 : -1;
|
|
3356
|
+
e.daysContainer && _.$i !== void 0 || _ === e.input || _ === e.altInput ? A.ctrlKey ? (A.stopPropagation(), ne(e.currentYear - ae), W(H(1), 0)) : de || W(void 0, ae * 7) : _ === e.currentYearElement ? ne(e.currentYear - ae) : e.config.enableTime && (!de && e.hourElement && e.hourElement.focus(), d(A), e._debouncedChange());
|
|
3357
3357
|
break;
|
|
3358
3358
|
case 9:
|
|
3359
3359
|
if (de) {
|
|
@@ -3366,16 +3366,16 @@ function FlatpickrInstance(i, a) {
|
|
|
3366
3366
|
return Ae;
|
|
3367
3367
|
}), pe = le.indexOf(_);
|
|
3368
3368
|
if (pe !== -1) {
|
|
3369
|
-
var Xe = le[pe + (
|
|
3370
|
-
|
|
3369
|
+
var Xe = le[pe + (A.shiftKey ? -1 : 1)];
|
|
3370
|
+
A.preventDefault(), (Xe || e._input).focus();
|
|
3371
3371
|
}
|
|
3372
3372
|
} else
|
|
3373
|
-
!e.config.noCalendar && e.daysContainer && e.daysContainer.contains(_) &&
|
|
3373
|
+
!e.config.noCalendar && e.daysContainer && e.daysContainer.contains(_) && A.shiftKey && (A.preventDefault(), e._input.focus());
|
|
3374
3374
|
break;
|
|
3375
3375
|
}
|
|
3376
3376
|
}
|
|
3377
3377
|
if (e.amPM !== void 0 && _ === e.amPM)
|
|
3378
|
-
switch (
|
|
3378
|
+
switch (A.key) {
|
|
3379
3379
|
case e.l10n.amPM[0].charAt(0):
|
|
3380
3380
|
case e.l10n.amPM[0].charAt(0).toLowerCase():
|
|
3381
3381
|
e.amPM.textContent = e.l10n.amPM[0], c(), Ce();
|
|
@@ -3385,11 +3385,11 @@ function FlatpickrInstance(i, a) {
|
|
|
3385
3385
|
e.amPM.textContent = e.l10n.amPM[1], c(), Ce();
|
|
3386
3386
|
break;
|
|
3387
3387
|
}
|
|
3388
|
-
(B || fe(_)) && ge("onKeyDown",
|
|
3388
|
+
(B || fe(_)) && ge("onKeyDown", A);
|
|
3389
3389
|
}
|
|
3390
|
-
function Ve(
|
|
3391
|
-
if (_ === void 0 && (_ = "flatpickr-day"), !(e.selectedDates.length !== 1 ||
|
|
3392
|
-
for (var B =
|
|
3390
|
+
function Ve(A, _) {
|
|
3391
|
+
if (_ === void 0 && (_ = "flatpickr-day"), !(e.selectedDates.length !== 1 || A && (!A.classList.contains(_) || A.classList.contains("flatpickr-disabled")))) {
|
|
3392
|
+
for (var B = A ? A.dateObj.getTime() : e.days.firstElementChild.dateObj.getTime(), P = e.parseDate(e.selectedDates[0], void 0, !0).getTime(), Z = Math.min(B, e.selectedDates[0].getTime()), te = Math.max(B, e.selectedDates[0].getTime()), de = !1, re = 0, ce = 0, ae = Z; ae < te; ae += duration.DAY)
|
|
3393
3393
|
me(new Date(ae), !0) || (de = de || ae > Z && ae < te, ae < P && (!re || ae > re) ? re = ae : ae > P && (!ce || ae < ce) && (ce = ae));
|
|
3394
3394
|
var le = Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+" + e.config.showMonths + ") > ." + _));
|
|
3395
3395
|
le.forEach(function(pe) {
|
|
@@ -3403,18 +3403,18 @@ function FlatpickrInstance(i, a) {
|
|
|
3403
3403
|
return;
|
|
3404
3404
|
["startRange", "inRange", "endRange", "notAllowed"].forEach(function(_e) {
|
|
3405
3405
|
pe.classList.remove(_e);
|
|
3406
|
-
}),
|
|
3406
|
+
}), A !== void 0 && (A.classList.add(B <= e.selectedDates[0].getTime() ? "startRange" : "endRange"), P < B && Ae === P ? pe.classList.add("startRange") : P > B && Ae === P && pe.classList.add("endRange"), Ae >= re && (ce === 0 || Ae <= ce) && isBetween(Ae, P, B) && pe.classList.add("inRange"));
|
|
3407
3407
|
});
|
|
3408
3408
|
}
|
|
3409
3409
|
}
|
|
3410
3410
|
function he() {
|
|
3411
3411
|
e.isOpen && !e.config.static && !e.config.inline && ye();
|
|
3412
3412
|
}
|
|
3413
|
-
function Ye(
|
|
3413
|
+
function Ye(A, _) {
|
|
3414
3414
|
if (_ === void 0 && (_ = e._positionElement), e.isMobile === !0) {
|
|
3415
|
-
if (
|
|
3416
|
-
|
|
3417
|
-
var B = getEventTarget(
|
|
3415
|
+
if (A) {
|
|
3416
|
+
A.preventDefault();
|
|
3417
|
+
var B = getEventTarget(A);
|
|
3418
3418
|
B && B.blur();
|
|
3419
3419
|
}
|
|
3420
3420
|
e.mobileInput !== void 0 && (e.mobileInput.focus(), e.mobileInput.click()), ge("onOpen");
|
|
@@ -3422,20 +3422,20 @@ function FlatpickrInstance(i, a) {
|
|
|
3422
3422
|
} else if (e._input.disabled || e.config.inline)
|
|
3423
3423
|
return;
|
|
3424
3424
|
var P = e.isOpen;
|
|
3425
|
-
e.isOpen = !0, P || (e.calendarContainer.classList.add("open"), e._input.classList.add("active"), ge("onOpen"), ye(_)), e.config.enableTime === !0 && e.config.noCalendar === !0 && e.config.allowInput === !1 && (
|
|
3425
|
+
e.isOpen = !0, P || (e.calendarContainer.classList.add("open"), e._input.classList.add("active"), ge("onOpen"), ye(_)), e.config.enableTime === !0 && e.config.noCalendar === !0 && e.config.allowInput === !1 && (A === void 0 || !e.timeContainer.contains(A.relatedTarget)) && setTimeout(function() {
|
|
3426
3426
|
return e.hourElement.select();
|
|
3427
3427
|
}, 50);
|
|
3428
3428
|
}
|
|
3429
|
-
function Fe(
|
|
3429
|
+
function Fe(A) {
|
|
3430
3430
|
return function(_) {
|
|
3431
|
-
var B = e.config["_" +
|
|
3432
|
-
B !== void 0 && (e[
|
|
3431
|
+
var B = e.config["_" + A + "Date"] = e.parseDate(_, e.config.dateFormat), P = e.config["_" + (A === "min" ? "max" : "min") + "Date"];
|
|
3432
|
+
B !== void 0 && (e[A === "min" ? "minDateHasTime" : "maxDateHasTime"] = B.getHours() > 0 || B.getMinutes() > 0 || B.getSeconds() > 0), e.selectedDates && (e.selectedDates = e.selectedDates.filter(function(Z) {
|
|
3433
3433
|
return me(Z);
|
|
3434
|
-
}), !e.selectedDates.length &&
|
|
3434
|
+
}), !e.selectedDates.length && A === "min" && f(B), Ce()), e.daysContainer && (Be(), B !== void 0 ? e.currentYearElement[A] = B.getFullYear().toString() : e.currentYearElement.removeAttribute(A), e.currentYearElement.disabled = !!P && B !== void 0 && P.getFullYear() === B.getFullYear());
|
|
3435
3435
|
};
|
|
3436
3436
|
}
|
|
3437
3437
|
function qe() {
|
|
3438
|
-
var
|
|
3438
|
+
var A = [
|
|
3439
3439
|
"wrap",
|
|
3440
3440
|
"weekNumbers",
|
|
3441
3441
|
"allowInput",
|
|
@@ -3502,8 +3502,8 @@ function FlatpickrInstance(i, a) {
|
|
|
3502
3502
|
},
|
|
3503
3503
|
set: de("max")
|
|
3504
3504
|
}), _.mode === "time" && (e.config.noCalendar = !0, e.config.enableTime = !0), Object.assign(e.config, B, _);
|
|
3505
|
-
for (var re = 0; re <
|
|
3506
|
-
e.config[
|
|
3505
|
+
for (var re = 0; re < A.length; re++)
|
|
3506
|
+
e.config[A[re]] = e.config[A[re]] === !0 || e.config[A[re]] === "true";
|
|
3507
3507
|
HOOKS.filter(function(le) {
|
|
3508
3508
|
return e.config[le] !== void 0;
|
|
3509
3509
|
}).forEach(function(le) {
|
|
@@ -3521,15 +3521,15 @@ function FlatpickrInstance(i, a) {
|
|
|
3521
3521
|
}
|
|
3522
3522
|
function xe() {
|
|
3523
3523
|
typeof e.config.locale != "object" && typeof flatpickr$1.l10ns[e.config.locale] > "u" && e.config.errorHandler(new Error("flatpickr: invalid locale " + e.config.locale)), e.l10n = __assign(__assign({}, flatpickr$1.l10ns.default), typeof e.config.locale == "object" ? e.config.locale : e.config.locale !== "default" ? flatpickr$1.l10ns[e.config.locale] : void 0), tokenRegex.D = "(" + e.l10n.weekdays.shorthand.join("|") + ")", tokenRegex.l = "(" + e.l10n.weekdays.longhand.join("|") + ")", tokenRegex.M = "(" + e.l10n.months.shorthand.join("|") + ")", tokenRegex.F = "(" + e.l10n.months.longhand.join("|") + ")", tokenRegex.K = "(" + e.l10n.amPM[0] + "|" + e.l10n.amPM[1] + "|" + e.l10n.amPM[0].toLowerCase() + "|" + e.l10n.amPM[1].toLowerCase() + ")";
|
|
3524
|
-
var
|
|
3525
|
-
|
|
3524
|
+
var A = __assign(__assign({}, a), JSON.parse(JSON.stringify(i.dataset || {})));
|
|
3525
|
+
A.time_24hr === void 0 && flatpickr$1.defaultConfig.time_24hr === void 0 && (e.config.time_24hr = e.l10n.time_24hr), e.formatDate = createDateFormatter(e), e.parseDate = createDateParser({ config: e.config, l10n: e.l10n });
|
|
3526
3526
|
}
|
|
3527
|
-
function ye(
|
|
3527
|
+
function ye(A) {
|
|
3528
3528
|
if (typeof e.config.position == "function")
|
|
3529
|
-
return void e.config.position(e,
|
|
3529
|
+
return void e.config.position(e, A);
|
|
3530
3530
|
if (e.calendarContainer !== void 0) {
|
|
3531
3531
|
ge("onPreCalendarPosition");
|
|
3532
|
-
var _ =
|
|
3532
|
+
var _ = A || e._positionElement, B = Array.prototype.reduce.call(e.calendarContainer.children, function(st, nt) {
|
|
3533
3533
|
return st + nt.offsetHeight;
|
|
3534
3534
|
}, 0), P = e.calendarContainer.offsetWidth, Z = e.config.position.split(" "), te = Z[0], de = Z.length > 1 ? Z[1] : null, re = _.getBoundingClientRect(), ce = window.innerHeight - re.bottom, ae = te === "above" || te !== "below" && ce < B && re.top > B, le = window.pageYOffset + re.top + (ae ? -B - 2 : _.offsetHeight + 2);
|
|
3535
3535
|
if (toggleClass$2(e.calendarContainer, "arrowTop", !ae), toggleClass$2(e.calendarContainer, "arrowBottom", ae), !e.config.inline) {
|
|
@@ -3552,7 +3552,7 @@ function FlatpickrInstance(i, a) {
|
|
|
3552
3552
|
}
|
|
3553
3553
|
}
|
|
3554
3554
|
function Ee() {
|
|
3555
|
-
for (var
|
|
3555
|
+
for (var A = null, _ = 0; _ < document.styleSheets.length; _++) {
|
|
3556
3556
|
var B = document.styleSheets[_];
|
|
3557
3557
|
if (B.cssRules) {
|
|
3558
3558
|
try {
|
|
@@ -3560,15 +3560,15 @@ function FlatpickrInstance(i, a) {
|
|
|
3560
3560
|
} catch {
|
|
3561
3561
|
continue;
|
|
3562
3562
|
}
|
|
3563
|
-
|
|
3563
|
+
A = B;
|
|
3564
3564
|
break;
|
|
3565
3565
|
}
|
|
3566
3566
|
}
|
|
3567
|
-
return
|
|
3567
|
+
return A ?? be();
|
|
3568
3568
|
}
|
|
3569
3569
|
function be() {
|
|
3570
|
-
var
|
|
3571
|
-
return document.head.appendChild(
|
|
3570
|
+
var A = document.createElement("style");
|
|
3571
|
+
return document.head.appendChild(A), A.sheet;
|
|
3572
3572
|
}
|
|
3573
3573
|
function Be() {
|
|
3574
3574
|
e.config.noCalendar || e.isMobile || (I(), Se(), z());
|
|
@@ -3576,11 +3576,11 @@ function FlatpickrInstance(i, a) {
|
|
|
3576
3576
|
function Ne() {
|
|
3577
3577
|
e._input.focus(), window.navigator.userAgent.indexOf("MSIE") !== -1 || navigator.msMaxTouchPoints !== void 0 ? setTimeout(e.close, 0) : e.close();
|
|
3578
3578
|
}
|
|
3579
|
-
function Ke(
|
|
3580
|
-
|
|
3579
|
+
function Ke(A) {
|
|
3580
|
+
A.preventDefault(), A.stopPropagation();
|
|
3581
3581
|
var _ = function(le) {
|
|
3582
3582
|
return le.classList && le.classList.contains("flatpickr-day") && !le.classList.contains("flatpickr-disabled") && !le.classList.contains("notAllowed");
|
|
3583
|
-
}, B = findParent(getEventTarget(
|
|
3583
|
+
}, B = findParent(getEventTarget(A), _);
|
|
3584
3584
|
if (B !== void 0) {
|
|
3585
3585
|
var P = B, Z = e.latestSelectedDateObj = new Date(P.dateObj.getTime()), te = (Z.getMonth() < e.currentMonth || Z.getMonth() > e.currentMonth + e.config.showMonths - 1) && e.config.mode !== "range";
|
|
3586
3586
|
if (e.selectedDateElem = P, e.config.mode === "single")
|
|
@@ -3600,14 +3600,14 @@ function FlatpickrInstance(i, a) {
|
|
|
3600
3600
|
var ce = e.config.mode === "single" && !e.config.enableTime, ae = e.config.mode === "range" && e.selectedDates.length === 2 && !e.config.enableTime;
|
|
3601
3601
|
(ce || ae) && Ne();
|
|
3602
3602
|
}
|
|
3603
|
-
|
|
3603
|
+
q();
|
|
3604
3604
|
}
|
|
3605
3605
|
}
|
|
3606
3606
|
var Ie = {
|
|
3607
3607
|
locale: [xe, E],
|
|
3608
3608
|
showMonths: [y, l, S],
|
|
3609
|
-
minDate: [
|
|
3610
|
-
maxDate: [
|
|
3609
|
+
minDate: [Y],
|
|
3610
|
+
maxDate: [Y],
|
|
3611
3611
|
positionElement: [Pe],
|
|
3612
3612
|
clickOpens: [
|
|
3613
3613
|
function() {
|
|
@@ -3615,59 +3615,59 @@ function FlatpickrInstance(i, a) {
|
|
|
3615
3615
|
}
|
|
3616
3616
|
]
|
|
3617
3617
|
};
|
|
3618
|
-
function ze(
|
|
3619
|
-
if (
|
|
3620
|
-
Object.assign(e.config,
|
|
3621
|
-
for (var B in
|
|
3618
|
+
function ze(A, _) {
|
|
3619
|
+
if (A !== null && typeof A == "object") {
|
|
3620
|
+
Object.assign(e.config, A);
|
|
3621
|
+
for (var B in A)
|
|
3622
3622
|
Ie[B] !== void 0 && Ie[B].forEach(function(P) {
|
|
3623
3623
|
return P();
|
|
3624
3624
|
});
|
|
3625
3625
|
} else
|
|
3626
|
-
e.config[
|
|
3626
|
+
e.config[A] = _, Ie[A] !== void 0 ? Ie[A].forEach(function(P) {
|
|
3627
3627
|
return P();
|
|
3628
|
-
}) : HOOKS.indexOf(
|
|
3628
|
+
}) : HOOKS.indexOf(A) > -1 && (e.config[A] = arrayify$1(_));
|
|
3629
3629
|
e.redraw(), Ce(!0);
|
|
3630
3630
|
}
|
|
3631
|
-
function Oe(
|
|
3631
|
+
function Oe(A, _) {
|
|
3632
3632
|
var B = [];
|
|
3633
|
-
if (
|
|
3634
|
-
B =
|
|
3633
|
+
if (A instanceof Array)
|
|
3634
|
+
B = A.map(function(P) {
|
|
3635
3635
|
return e.parseDate(P, _);
|
|
3636
3636
|
});
|
|
3637
|
-
else if (
|
|
3638
|
-
B = [e.parseDate(
|
|
3639
|
-
else if (typeof
|
|
3637
|
+
else if (A instanceof Date || typeof A == "number")
|
|
3638
|
+
B = [e.parseDate(A, _)];
|
|
3639
|
+
else if (typeof A == "string")
|
|
3640
3640
|
switch (e.config.mode) {
|
|
3641
3641
|
case "single":
|
|
3642
3642
|
case "time":
|
|
3643
|
-
B = [e.parseDate(
|
|
3643
|
+
B = [e.parseDate(A, _)];
|
|
3644
3644
|
break;
|
|
3645
3645
|
case "multiple":
|
|
3646
|
-
B =
|
|
3646
|
+
B = A.split(e.config.conjunction).map(function(P) {
|
|
3647
3647
|
return e.parseDate(P, _);
|
|
3648
3648
|
});
|
|
3649
3649
|
break;
|
|
3650
3650
|
case "range":
|
|
3651
|
-
B =
|
|
3651
|
+
B = A.split(e.l10n.rangeSeparator).map(function(P) {
|
|
3652
3652
|
return e.parseDate(P, _);
|
|
3653
3653
|
});
|
|
3654
3654
|
break;
|
|
3655
3655
|
}
|
|
3656
3656
|
else
|
|
3657
|
-
e.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(
|
|
3657
|
+
e.config.errorHandler(new Error("Invalid date supplied: " + JSON.stringify(A)));
|
|
3658
3658
|
e.selectedDates = e.config.allowInvalidPreload ? B : B.filter(function(P) {
|
|
3659
3659
|
return P instanceof Date && me(P, !1);
|
|
3660
3660
|
}), e.config.mode === "range" && e.selectedDates.sort(function(P, Z) {
|
|
3661
3661
|
return P.getTime() - Z.getTime();
|
|
3662
3662
|
});
|
|
3663
3663
|
}
|
|
3664
|
-
function Re(
|
|
3665
|
-
if (_ === void 0 && (_ = !1), B === void 0 && (B = e.config.dateFormat),
|
|
3664
|
+
function Re(A, _, B) {
|
|
3665
|
+
if (_ === void 0 && (_ = !1), B === void 0 && (B = e.config.dateFormat), A !== 0 && !A || A instanceof Array && A.length === 0)
|
|
3666
3666
|
return e.clear(_);
|
|
3667
|
-
Oe(
|
|
3667
|
+
Oe(A, B), e.latestSelectedDateObj = e.selectedDates[e.selectedDates.length - 1], e.redraw(), Y(void 0, _), f(), e.selectedDates.length === 0 && e.clear(!1), Ce(_), _ && ge("onChange");
|
|
3668
3668
|
}
|
|
3669
|
-
function Le(
|
|
3670
|
-
return
|
|
3669
|
+
function Le(A) {
|
|
3670
|
+
return A.slice().map(function(_) {
|
|
3671
3671
|
return typeof _ == "string" || typeof _ == "number" || _ instanceof Date ? e.parseDate(_, void 0, !0) : _ && typeof _ == "object" && _.from && _.to ? {
|
|
3672
3672
|
from: e.parseDate(_.from, void 0),
|
|
3673
3673
|
to: e.parseDate(_.to, void 0)
|
|
@@ -3678,8 +3678,8 @@ function FlatpickrInstance(i, a) {
|
|
|
3678
3678
|
}
|
|
3679
3679
|
function Ue() {
|
|
3680
3680
|
e.selectedDates = [], e.now = e.parseDate(e.config.now) || /* @__PURE__ */ new Date();
|
|
3681
|
-
var
|
|
3682
|
-
|
|
3681
|
+
var A = e.config.defaultDate || ((e.input.nodeName === "INPUT" || e.input.nodeName === "TEXTAREA") && e.input.placeholder && e.input.value === e.input.placeholder ? null : e.input.value);
|
|
3682
|
+
A && Oe(A, e.config.dateFormat), e._initialDate = e.selectedDates.length > 0 ? e.selectedDates[0] : e.config.minDate && e.config.minDate.getTime() > e.now.getTime() ? e.config.minDate : e.config.maxDate && e.config.maxDate.getTime() < e.now.getTime() ? e.config.maxDate : e.now, e.currentYear = e._initialDate.getFullYear(), e.currentMonth = e._initialDate.getMonth(), e.selectedDates.length > 0 && (e.latestSelectedDateObj = e.selectedDates[0]), e.config.minTime !== void 0 && (e.config.minTime = e.parseDate(e.config.minTime, "H:i")), e.config.maxTime !== void 0 && (e.config.maxTime = e.parseDate(e.config.maxTime, "H:i")), e.minDateHasTime = !!e.config.minDate && (e.config.minDate.getHours() > 0 || e.config.minDate.getMinutes() > 0 || e.config.minDate.getSeconds() > 0), e.maxDateHasTime = !!e.config.maxDate && (e.config.maxDate.getHours() > 0 || e.config.maxDate.getMinutes() > 0 || e.config.maxDate.getSeconds() > 0);
|
|
3683
3683
|
}
|
|
3684
3684
|
function je() {
|
|
3685
3685
|
if (e.input = ve(), !e.input) {
|
|
@@ -3692,8 +3692,8 @@ function FlatpickrInstance(i, a) {
|
|
|
3692
3692
|
e._positionElement = e.config.positionElement || e._input;
|
|
3693
3693
|
}
|
|
3694
3694
|
function He() {
|
|
3695
|
-
var
|
|
3696
|
-
e.mobileInput = createElement("input", e.input.className + " flatpickr-mobile"), e.mobileInput.tabIndex = 1, e.mobileInput.type =
|
|
3695
|
+
var A = e.config.enableTime ? e.config.noCalendar ? "time" : "datetime-local" : "date";
|
|
3696
|
+
e.mobileInput = createElement("input", e.input.className + " flatpickr-mobile"), e.mobileInput.tabIndex = 1, e.mobileInput.type = A, e.mobileInput.disabled = e.input.disabled, e.mobileInput.required = e.input.required, e.mobileInput.placeholder = e.input.placeholder, e.mobileFormatStr = A === "datetime-local" ? "Y-m-d\\TH:i:S" : A === "date" ? "Y-m-d" : "H:i:S", e.selectedDates.length > 0 && (e.mobileInput.defaultValue = e.mobileInput.value = e.formatDate(e.selectedDates[0], e.mobileFormatStr)), e.config.minDate && (e.mobileInput.min = e.formatDate(e.config.minDate, "Y-m-d")), e.config.maxDate && (e.mobileInput.max = e.formatDate(e.config.maxDate, "Y-m-d")), e.input.getAttribute("step") && (e.mobileInput.step = String(e.input.getAttribute("step"))), e.input.type = "hidden", e.altInput !== void 0 && (e.altInput.type = "hidden");
|
|
3697
3697
|
try {
|
|
3698
3698
|
e.input.parentNode && e.input.parentNode.insertBefore(e.mobileInput, e.input.nextSibling);
|
|
3699
3699
|
} catch {
|
|
@@ -3702,61 +3702,61 @@ function FlatpickrInstance(i, a) {
|
|
|
3702
3702
|
e.setDate(getEventTarget(_).value, !1, e.mobileFormatStr), ge("onChange"), ge("onClose");
|
|
3703
3703
|
});
|
|
3704
3704
|
}
|
|
3705
|
-
function We(
|
|
3705
|
+
function We(A) {
|
|
3706
3706
|
if (e.isOpen === !0)
|
|
3707
3707
|
return e.close();
|
|
3708
|
-
e.open(
|
|
3708
|
+
e.open(A);
|
|
3709
3709
|
}
|
|
3710
|
-
function ge(
|
|
3710
|
+
function ge(A, _) {
|
|
3711
3711
|
if (e.config !== void 0) {
|
|
3712
|
-
var B = e.config[
|
|
3712
|
+
var B = e.config[A];
|
|
3713
3713
|
if (B !== void 0 && B.length > 0)
|
|
3714
3714
|
for (var P = 0; B[P] && P < B.length; P++)
|
|
3715
3715
|
B[P](e.selectedDates, e.input.value, e, _);
|
|
3716
|
-
|
|
3716
|
+
A === "onChange" && (e.input.dispatchEvent(ke("change")), e.input.dispatchEvent(ke("input")));
|
|
3717
3717
|
}
|
|
3718
3718
|
}
|
|
3719
|
-
function ke(
|
|
3719
|
+
function ke(A) {
|
|
3720
3720
|
var _ = document.createEvent("Event");
|
|
3721
|
-
return _.initEvent(
|
|
3721
|
+
return _.initEvent(A, !0, !0), _;
|
|
3722
3722
|
}
|
|
3723
|
-
function Te(
|
|
3723
|
+
function Te(A) {
|
|
3724
3724
|
for (var _ = 0; _ < e.selectedDates.length; _++) {
|
|
3725
3725
|
var B = e.selectedDates[_];
|
|
3726
|
-
if (B instanceof Date && compareDates(B,
|
|
3726
|
+
if (B instanceof Date && compareDates(B, A) === 0)
|
|
3727
3727
|
return "" + _;
|
|
3728
3728
|
}
|
|
3729
3729
|
return !1;
|
|
3730
3730
|
}
|
|
3731
|
-
function Ge(
|
|
3732
|
-
return e.config.mode !== "range" || e.selectedDates.length < 2 ? !1 : compareDates(
|
|
3731
|
+
function Ge(A) {
|
|
3732
|
+
return e.config.mode !== "range" || e.selectedDates.length < 2 ? !1 : compareDates(A, e.selectedDates[0]) >= 0 && compareDates(A, e.selectedDates[1]) <= 0;
|
|
3733
3733
|
}
|
|
3734
3734
|
function Se() {
|
|
3735
|
-
e.config.noCalendar || e.isMobile || !e.monthNav || (e.yearElements.forEach(function(
|
|
3735
|
+
e.config.noCalendar || e.isMobile || !e.monthNav || (e.yearElements.forEach(function(A, _) {
|
|
3736
3736
|
var B = new Date(e.currentYear, e.currentMonth, 1);
|
|
3737
|
-
B.setMonth(e.currentMonth + _), e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? e.monthElements[_].textContent = monthToStr(B.getMonth(), e.config.shorthandCurrentMonth, e.l10n) + " " : e.monthsDropdownContainer.value = B.getMonth().toString(),
|
|
3737
|
+
B.setMonth(e.currentMonth + _), e.config.showMonths > 1 || e.config.monthSelectorType === "static" ? e.monthElements[_].textContent = monthToStr(B.getMonth(), e.config.shorthandCurrentMonth, e.l10n) + " " : e.monthsDropdownContainer.value = B.getMonth().toString(), A.value = B.getFullYear().toString();
|
|
3738
3738
|
}), e._hidePrevMonthArrow = e.config.minDate !== void 0 && (e.currentYear === e.config.minDate.getFullYear() ? e.currentMonth <= e.config.minDate.getMonth() : e.currentYear < e.config.minDate.getFullYear()), e._hideNextMonthArrow = e.config.maxDate !== void 0 && (e.currentYear === e.config.maxDate.getFullYear() ? e.currentMonth + 1 > e.config.maxDate.getMonth() : e.currentYear > e.config.maxDate.getFullYear()));
|
|
3739
3739
|
}
|
|
3740
|
-
function Me(
|
|
3741
|
-
var _ =
|
|
3740
|
+
function Me(A) {
|
|
3741
|
+
var _ = A || (e.config.altInput ? e.config.altFormat : e.config.dateFormat);
|
|
3742
3742
|
return e.selectedDates.map(function(B) {
|
|
3743
3743
|
return e.formatDate(B, _);
|
|
3744
3744
|
}).filter(function(B, P, Z) {
|
|
3745
3745
|
return e.config.mode !== "range" || e.config.enableTime || Z.indexOf(B) === P;
|
|
3746
3746
|
}).join(e.config.mode !== "range" ? e.config.conjunction : e.l10n.rangeSeparator);
|
|
3747
3747
|
}
|
|
3748
|
-
function Ce(
|
|
3749
|
-
|
|
3748
|
+
function Ce(A) {
|
|
3749
|
+
A === void 0 && (A = !0), e.mobileInput !== void 0 && e.mobileFormatStr && (e.mobileInput.value = e.latestSelectedDateObj !== void 0 ? e.formatDate(e.latestSelectedDateObj, e.mobileFormatStr) : ""), e.input.value = Me(e.config.dateFormat), e.altInput !== void 0 && (e.altInput.value = Me(e.config.altFormat)), A !== !1 && ge("onValueUpdate");
|
|
3750
3750
|
}
|
|
3751
|
-
function Qe(
|
|
3752
|
-
var _ = getEventTarget(
|
|
3751
|
+
function Qe(A) {
|
|
3752
|
+
var _ = getEventTarget(A), B = e.prevMonthNav.contains(_), P = e.nextMonthNav.contains(_);
|
|
3753
3753
|
B || P ? R(B ? -1 : 1) : e.yearElements.indexOf(_) >= 0 ? _.select() : _.classList.contains("arrowUp") ? e.changeYear(e.currentYear + 1) : _.classList.contains("arrowDown") && e.changeYear(e.currentYear - 1);
|
|
3754
3754
|
}
|
|
3755
|
-
function Ze(
|
|
3756
|
-
|
|
3757
|
-
var _ =
|
|
3755
|
+
function Ze(A) {
|
|
3756
|
+
A.preventDefault();
|
|
3757
|
+
var _ = A.type === "keydown", B = getEventTarget(A), P = B;
|
|
3758
3758
|
e.amPM !== void 0 && B === e.amPM && (e.amPM.textContent = e.l10n.amPM[int(e.amPM.textContent === e.l10n.amPM[0])]);
|
|
3759
|
-
var Z = parseFloat(P.getAttribute("min")), te = parseFloat(P.getAttribute("max")), de = parseFloat(P.getAttribute("step")), re = parseInt(P.value, 10), ce =
|
|
3759
|
+
var Z = parseFloat(P.getAttribute("min")), te = parseFloat(P.getAttribute("max")), de = parseFloat(P.getAttribute("step")), re = parseInt(P.value, 10), ce = A.delta || (_ ? A.which === 38 ? 1 : -1 : 0), ae = re + de * ce;
|
|
3760
3760
|
if (typeof P.value < "u" && P.value.length === 2) {
|
|
3761
3761
|
var le = P === e.hourElement, pe = P === e.minuteElement;
|
|
3762
3762
|
ae < Z ? (ae = te + ae + int(!le) + (int(le) && int(!e.amPM)), pe && b(void 0, -1, e.hourElement)) : ae > te && (ae = P === e.hourElement ? ae - te - int(!e.amPM) : Z, pe && b(void 0, 1, e.hourElement)), e.amPM && le && (de === 1 ? ae + re === 23 : Math.abs(ae - re) > de) && (e.amPM.textContent = e.l10n.amPM[int(e.amPM.textContent === e.l10n.amPM[0])]), P.value = pad(ae);
|
|
@@ -4251,7 +4251,7 @@ const _hoisted_1$14 = {
|
|
|
4251
4251
|
setup(i, { emit: a }) {
|
|
4252
4252
|
const e = i, r = a, o = ref(void 0), s = ref(!1), n = (E) => E !== null && typeof E.fp < "u", l = ref(null), d = ref(null), u = ref(!1), m = ref(""), c = ref(null), f = ref(!1), { t: V } = useI18n(), p = (E) => E.replace("Z", "000Z"), g = (E) => {
|
|
4253
4253
|
E !== e.modelValue && (r("update:modelValue", E), r("change"));
|
|
4254
|
-
},
|
|
4254
|
+
}, q = (E) => {
|
|
4255
4255
|
if (E === null || isUndefined$1(E)) {
|
|
4256
4256
|
g(null);
|
|
4257
4257
|
return;
|
|
@@ -4263,7 +4263,7 @@ const _hoisted_1$14 = {
|
|
|
4263
4263
|
g(p(E + ""));
|
|
4264
4264
|
}, $ = () => {
|
|
4265
4265
|
b(), u.value = !0, r("onOpen");
|
|
4266
|
-
},
|
|
4266
|
+
}, Y = () => {
|
|
4267
4267
|
u.value = !1, r("onClose");
|
|
4268
4268
|
}, N = () => {
|
|
4269
4269
|
n(l.value) && (m.value = l.value.fpInput().value);
|
|
@@ -4293,7 +4293,7 @@ const _hoisted_1$14 = {
|
|
|
4293
4293
|
],
|
|
4294
4294
|
onClick: (E, K) => {
|
|
4295
4295
|
const R = dateNow();
|
|
4296
|
-
K.setDate(R, !0),
|
|
4296
|
+
K.setDate(R, !0), q(dateToUtc(R));
|
|
4297
4297
|
}
|
|
4298
4298
|
})
|
|
4299
4299
|
]), M = {
|
|
@@ -4360,7 +4360,7 @@ const _hoisted_1$14 = {
|
|
|
4360
4360
|
},
|
|
4361
4361
|
{ immediate: !0 }
|
|
4362
4362
|
), onMounted(() => {
|
|
4363
|
-
import("./shortcut-buttons-flatpickr-
|
|
4363
|
+
import("./shortcut-buttons-flatpickr-638a91ce.js").then((E) => E.s).then((E) => {
|
|
4364
4364
|
o.value = E.default, s.value = !0;
|
|
4365
4365
|
});
|
|
4366
4366
|
}), (E, K) => (openBlock(), createBlock(VTextField, {
|
|
@@ -4390,8 +4390,8 @@ const _hoisted_1$14 = {
|
|
|
4390
4390
|
config: I.value,
|
|
4391
4391
|
disabled: E.disabled,
|
|
4392
4392
|
"model-value": c.value,
|
|
4393
|
-
"onUpdate:modelValue":
|
|
4394
|
-
onOnClose:
|
|
4393
|
+
"onUpdate:modelValue": q,
|
|
4394
|
+
onOnClose: Y,
|
|
4395
4395
|
onOnOpen: $,
|
|
4396
4396
|
onOnChange: N
|
|
4397
4397
|
}, null, 8, ["config", "disabled", "model-value"])) : createCommentVNode("", !0),
|
|
@@ -4644,17 +4644,17 @@ const _hoisted_1$13 = {
|
|
|
4644
4644
|
}), g = computed(() => {
|
|
4645
4645
|
var X, S;
|
|
4646
4646
|
return isUndefined$1(e.required) ? ((X = e.v) == null ? void 0 : X.required) && ((S = e.v) == null ? void 0 : S.required.$params.type) === "required" : e.required;
|
|
4647
|
-
}),
|
|
4647
|
+
}), q = computed(() => e.multiple !== !1), $ = usePagination(e.filterSortBy), Y = ref([]), N = ref([]), b = computed(() => {
|
|
4648
4648
|
const X = /* @__PURE__ */ new Map();
|
|
4649
4649
|
return N.value.forEach((S) => {
|
|
4650
4650
|
X.set(S.value, { value: S.value, title: S.title });
|
|
4651
|
-
}),
|
|
4651
|
+
}), Y.value.forEach((S) => {
|
|
4652
4652
|
X.set(S.value, { value: S.value, title: S.title });
|
|
4653
4653
|
}), Array.from(X, ([S, E]) => ({ value: S, title: E.title }));
|
|
4654
4654
|
}), T = ref(!1), D = computed(() => T.value ? !0 : e.loading), O = async (X) => {
|
|
4655
4655
|
T.value = !0;
|
|
4656
4656
|
const S = u.value[e.filterByField];
|
|
4657
|
-
S.model = X,
|
|
4657
|
+
S.model = X, Y.value = await e.fetchItems($, u.value), T.value = !1;
|
|
4658
4658
|
}, H = (X) => {
|
|
4659
4659
|
const S = b.value.filter((E) => X.includes(E.value));
|
|
4660
4660
|
return [].concat(S);
|
|
@@ -4664,7 +4664,7 @@ const _hoisted_1$13 = {
|
|
|
4664
4664
|
}, W = ref(!1), M = () => {
|
|
4665
4665
|
clearTimeout(l.value), l.value = void 0;
|
|
4666
4666
|
}, z = async () => {
|
|
4667
|
-
M(), W.value !== !0 && (W.value = !0, T.value = !0,
|
|
4667
|
+
M(), W.value !== !0 && (W.value = !0, T.value = !0, Y.value = await e.fetchItems($, u.value), T.value = !1);
|
|
4668
4668
|
}, I = () => {
|
|
4669
4669
|
n.value = !0, M(), z();
|
|
4670
4670
|
}, C = computed(() => {
|
|
@@ -4673,7 +4673,7 @@ const _hoisted_1$13 = {
|
|
|
4673
4673
|
}), y = (X) => {
|
|
4674
4674
|
!e.multiple && !n.value && X.length === 0 || C.value !== X && (s.value = X);
|
|
4675
4675
|
}, v = async () => {
|
|
4676
|
-
if (
|
|
4676
|
+
if (Y.value = await e.fetchItems($, u.value), e.multiple) {
|
|
4677
4677
|
o.value = [];
|
|
4678
4678
|
return;
|
|
4679
4679
|
}
|
|
@@ -4714,7 +4714,7 @@ const _hoisted_1$13 = {
|
|
|
4714
4714
|
"onUpdate:modelValue": S[0] || (S[0] = (E) => o.value = E),
|
|
4715
4715
|
items: b.value,
|
|
4716
4716
|
"no-filter": "",
|
|
4717
|
-
multiple:
|
|
4717
|
+
multiple: q.value,
|
|
4718
4718
|
clearable: X.clearable,
|
|
4719
4719
|
"error-messages": V.value,
|
|
4720
4720
|
chips: X.multiple,
|
|
@@ -4750,12 +4750,12 @@ const _hoisted_1$13 = {
|
|
|
4750
4750
|
emits: ["update:modelValue"],
|
|
4751
4751
|
setup(i, { emit: a }) {
|
|
4752
4752
|
const e = i, r = a, { t: o } = useI18n(), s = inject(SystemScopeSymbol, void 0), n = inject(SubjectScopeSymbol, void 0), l = computed(() => {
|
|
4753
|
-
var g,
|
|
4753
|
+
var g, q;
|
|
4754
4754
|
if (!isUndefined$1(e.label))
|
|
4755
4755
|
return e.label;
|
|
4756
4756
|
if (isUndefined$1(s) || isUndefined$1(n) || isUndefined$1((g = e.v) == null ? void 0 : g.$path))
|
|
4757
4757
|
return "";
|
|
4758
|
-
const { end: p } = stringSplitOnFirstOccurrence((
|
|
4758
|
+
const { end: p } = stringSplitOnFirstOccurrence((q = e.v) == null ? void 0 : q.$path, ".");
|
|
4759
4759
|
return o(s + "." + n + ".model." + p);
|
|
4760
4760
|
}), d = ref(!1), u = ref(!1), m = ref(""), c = computed(() => e.modelValue), f = ref(e.modelValue), V = async () => {
|
|
4761
4761
|
if (d.value)
|
|
@@ -4776,7 +4776,7 @@ const _hoisted_1$13 = {
|
|
|
4776
4776
|
createVNode(VCheckboxBtn, {
|
|
4777
4777
|
id: m.value,
|
|
4778
4778
|
modelValue: f.value,
|
|
4779
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
4779
|
+
"onUpdate:modelValue": g[0] || (g[0] = (q) => f.value = q),
|
|
4780
4780
|
disabled: d.value,
|
|
4781
4781
|
onClick: withModifiers(V, ["stop"])
|
|
4782
4782
|
}, null, 8, ["id", "modelValue", "disabled"]),
|
|
@@ -4801,12 +4801,12 @@ const _hoisted_1$13 = {
|
|
|
4801
4801
|
emits: ["update:modelValue"],
|
|
4802
4802
|
setup(i, { emit: a }) {
|
|
4803
4803
|
const e = i, r = a, { t: o } = useI18n(), s = inject(SystemScopeSymbol, void 0), n = inject(SubjectScopeSymbol, void 0), l = computed(() => {
|
|
4804
|
-
var g,
|
|
4804
|
+
var g, q;
|
|
4805
4805
|
if (!isUndefined$1(e.label))
|
|
4806
4806
|
return e.label;
|
|
4807
4807
|
if (isUndefined$1(s) || isUndefined$1(n) || isUndefined$1((g = e.v) == null ? void 0 : g.$path))
|
|
4808
4808
|
return "";
|
|
4809
|
-
const { end: p } = stringSplitOnFirstOccurrence((
|
|
4809
|
+
const { end: p } = stringSplitOnFirstOccurrence((q = e.v) == null ? void 0 : q.$path, ".");
|
|
4810
4810
|
return o(s + "." + n + ".model." + p);
|
|
4811
4811
|
}), d = ref(!1), u = ref(!1), m = ref(""), c = computed(() => e.modelValue), f = ref(e.modelValue), V = async () => {
|
|
4812
4812
|
if (d.value)
|
|
@@ -4837,7 +4837,7 @@ const _hoisted_1$13 = {
|
|
|
4837
4837
|
default: withCtx(() => [
|
|
4838
4838
|
createVNode(VSwitch, {
|
|
4839
4839
|
modelValue: f.value,
|
|
4840
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
4840
|
+
"onUpdate:modelValue": g[0] || (g[0] = (q) => f.value = q),
|
|
4841
4841
|
loading: d.value,
|
|
4842
4842
|
disabled: d.value,
|
|
4843
4843
|
"hide-details": p.hideDetails,
|
|
@@ -4985,19 +4985,19 @@ const _hoisted_1$13 = {
|
|
|
4985
4985
|
}
|
|
4986
4986
|
}), s = ref(""), n = ref(!1), l = ref(void 0), { t: d } = useI18n(), { innerFilter: u } = toRefs(e), m = () => {
|
|
4987
4987
|
n.value = !0;
|
|
4988
|
-
}, c = computed(() => e.modelValue.titleT ? d(e.modelValue.titleT) : void 0), f = computed(() => e.modelValue.multiple !== !1), V = usePagination(e.filterSortBy), p = ref([]), g = ref([]),
|
|
4988
|
+
}, c = computed(() => e.modelValue.titleT ? d(e.modelValue.titleT) : void 0), f = computed(() => e.modelValue.multiple !== !1), V = usePagination(e.filterSortBy), p = ref([]), g = ref([]), q = computed(() => {
|
|
4989
4989
|
const I = /* @__PURE__ */ new Map();
|
|
4990
4990
|
return g.value.forEach((C) => {
|
|
4991
4991
|
I.set(C.value, { value: C.value, title: C.title });
|
|
4992
4992
|
}), p.value.forEach((C) => {
|
|
4993
4993
|
I.set(C.value, { value: C.value, title: C.title });
|
|
4994
4994
|
}), Array.from(I, ([C, y]) => ({ value: C, title: y.title }));
|
|
4995
|
-
}), $ = ref(!1),
|
|
4995
|
+
}), $ = ref(!1), Y = async (I) => {
|
|
4996
4996
|
$.value = !0;
|
|
4997
4997
|
const C = u.value[e.filterByField];
|
|
4998
4998
|
C.model = I, p.value = await e.fetchItems(V, u.value), $.value = !1;
|
|
4999
4999
|
}, N = (I) => {
|
|
5000
|
-
const C =
|
|
5000
|
+
const C = q.value.filter((y) => I.includes(y.value));
|
|
5001
5001
|
return [].concat(C);
|
|
5002
5002
|
}, b = async (I) => {
|
|
5003
5003
|
let C = 1, y = [];
|
|
@@ -5045,13 +5045,13 @@ const _hoisted_1$13 = {
|
|
|
5045
5045
|
), watchDebounced(
|
|
5046
5046
|
s,
|
|
5047
5047
|
(I, C) => {
|
|
5048
|
-
I !== C &&
|
|
5048
|
+
I !== C && Y(I);
|
|
5049
5049
|
},
|
|
5050
5050
|
{ debounce: 300, maxWait: 1e3 }
|
|
5051
5051
|
), (I, C) => (openBlock(), createBlock(VAutocomplete, {
|
|
5052
5052
|
modelValue: o.value,
|
|
5053
5053
|
"onUpdate:modelValue": C[0] || (C[0] = (y) => o.value = y),
|
|
5054
|
-
items:
|
|
5054
|
+
items: q.value,
|
|
5055
5055
|
"no-filter": "",
|
|
5056
5056
|
placeholder: z.value,
|
|
5057
5057
|
multiple: f.value,
|
|
@@ -5694,7 +5694,7 @@ const _sfc_main$1r = /* @__PURE__ */ defineComponent({
|
|
|
5694
5694
|
}, 8, ["class", "data-cy", "variant", "color", "height"])),
|
|
5695
5695
|
createVNode(VDialog, {
|
|
5696
5696
|
modelValue: s.value,
|
|
5697
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
5697
|
+
"onUpdate:modelValue": V[0] || (V[0] = (q) => s.value = q),
|
|
5698
5698
|
persistent: "",
|
|
5699
5699
|
width: 500,
|
|
5700
5700
|
"no-click-animation": ""
|
|
@@ -6869,9 +6869,9 @@ const _hoisted_1$R = { class: "text-center w-100 text-caption pb-1" }, _sfc_main
|
|
|
6869
6869
|
set(C) {
|
|
6870
6870
|
r("update:modelValue", cloneDeep(C));
|
|
6871
6871
|
}
|
|
6872
|
-
}), { t: d } = useI18n(), u = inject(SystemScopeSymbol, void 0), m = inject(SubjectScopeSymbol, void 0), c = ref(!1), f = ref(""), V = ref(!1), { innerFilter: p } = toRefs(e), g = usePagination(e.filterSortBy),
|
|
6872
|
+
}), { t: d } = useI18n(), u = inject(SystemScopeSymbol, void 0), m = inject(SubjectScopeSymbol, void 0), c = ref(!1), f = ref(""), V = ref(!1), { innerFilter: p } = toRefs(e), g = usePagination(e.filterSortBy), q = ref(/* @__PURE__ */ new Map()), $ = () => {
|
|
6873
6873
|
c.value = !0, r("focus", l.value);
|
|
6874
|
-
},
|
|
6874
|
+
}, Y = () => {
|
|
6875
6875
|
var C;
|
|
6876
6876
|
c.value = !1, (C = e.v) == null || C.$touch(), r("blur", l.value);
|
|
6877
6877
|
}, N = computed(() => {
|
|
@@ -6893,17 +6893,17 @@ const _hoisted_1$R = { class: "text-center w-100 text-caption pb-1" }, _sfc_main
|
|
|
6893
6893
|
}, H = async (C) => {
|
|
6894
6894
|
V.value = !0;
|
|
6895
6895
|
const y = p.value[e.filterByField];
|
|
6896
|
-
y.model = C,
|
|
6897
|
-
|
|
6896
|
+
y.model = C, q.value.clear(), (await e.fetchItemsMinimal(g, p.value)).forEach((X) => {
|
|
6897
|
+
q.value.set(X[e.itemValue], X);
|
|
6898
6898
|
}), V.value = !1;
|
|
6899
6899
|
}, U = computed(() => {
|
|
6900
6900
|
const C = /* @__PURE__ */ new Map();
|
|
6901
6901
|
return isArray(l.value) ? l.value.forEach((y) => {
|
|
6902
6902
|
C.set(y, "");
|
|
6903
|
-
}) : l.value && C.set(l.value, ""),
|
|
6903
|
+
}) : l.value && C.set(l.value, ""), q.value.forEach((y) => {
|
|
6904
6904
|
C.set(y[e.itemValue], y[e.itemTitle]);
|
|
6905
6905
|
}), Array.from(C, ([y, v]) => ({ value: y, title: v }));
|
|
6906
|
-
}), W = (C) => new Promise((y) => (
|
|
6906
|
+
}), W = (C) => new Promise((y) => (q.value.forEach((v, X) => {
|
|
6907
6907
|
C.has(X) && n(cloneDeep(v));
|
|
6908
6908
|
}), y(!0))), M = () => {
|
|
6909
6909
|
if (H(""), e.multiple) {
|
|
@@ -6946,7 +6946,7 @@ const _hoisted_1$R = { class: "text-center w-100 text-caption pb-1" }, _sfc_main
|
|
|
6946
6946
|
clearable: C.clearable,
|
|
6947
6947
|
"error-messages": N.value,
|
|
6948
6948
|
loading: V.value,
|
|
6949
|
-
onBlur:
|
|
6949
|
+
onBlur: Y,
|
|
6950
6950
|
onFocus: $,
|
|
6951
6951
|
"onUpdate:search": O,
|
|
6952
6952
|
"onClick:clear": M,
|
|
@@ -7332,7 +7332,7 @@ const assetSelectReturnTypeValuesToEnum = (i) => {
|
|
|
7332
7332
|
selected: !1
|
|
7333
7333
|
}));
|
|
7334
7334
|
}
|
|
7335
|
-
function
|
|
7335
|
+
function q(I) {
|
|
7336
7336
|
const C = I.map((y) => ({
|
|
7337
7337
|
asset: y,
|
|
7338
7338
|
selected: !1
|
|
@@ -7342,7 +7342,7 @@ const assetSelectReturnTypeValuesToEnum = (i) => {
|
|
|
7342
7342
|
function $(I) {
|
|
7343
7343
|
if (i.value[I] && !(!s.value && W.value && !i.value[I].selected)) {
|
|
7344
7344
|
if (i.value[I].selected = !i.value[I].selected, s.value && i.value[I].selected) {
|
|
7345
|
-
|
|
7345
|
+
Y(I), N(), b(i.value[I]);
|
|
7346
7346
|
return;
|
|
7347
7347
|
}
|
|
7348
7348
|
if (!s.value && i.value[I].selected) {
|
|
@@ -7352,7 +7352,7 @@ const assetSelectReturnTypeValuesToEnum = (i) => {
|
|
|
7352
7352
|
T(i.value[I].asset.id);
|
|
7353
7353
|
}
|
|
7354
7354
|
}
|
|
7355
|
-
function
|
|
7355
|
+
function Y(I) {
|
|
7356
7356
|
const C = i.value;
|
|
7357
7357
|
for (let y = 0; y < C.length; y++)
|
|
7358
7358
|
C[y].selected && y !== I && (C[y].selected = !1);
|
|
@@ -7425,7 +7425,7 @@ const assetSelectReturnTypeValuesToEnum = (i) => {
|
|
|
7425
7425
|
showLoader: d,
|
|
7426
7426
|
hideLoader: u,
|
|
7427
7427
|
setList: g,
|
|
7428
|
-
appendList:
|
|
7428
|
+
appendList: q,
|
|
7429
7429
|
toggleSelectedByIndex: $,
|
|
7430
7430
|
clearSelected: N,
|
|
7431
7431
|
reset: z
|
|
@@ -7817,8 +7817,8 @@ function useAssetListActions(i = "default") {
|
|
|
7817
7817
|
pagination$3.page = 1;
|
|
7818
7818
|
try {
|
|
7819
7819
|
e.showLoader(), e.setList(await fetchAssetList(a, e.licenceId, pagination$3, filter$i));
|
|
7820
|
-
} catch (
|
|
7821
|
-
d(
|
|
7820
|
+
} catch (q) {
|
|
7821
|
+
d(q);
|
|
7822
7822
|
} finally {
|
|
7823
7823
|
e.hideLoader();
|
|
7824
7824
|
}
|
|
@@ -7826,21 +7826,21 @@ function useAssetListActions(i = "default") {
|
|
|
7826
7826
|
pagination$3.page = pagination$3.page + 1;
|
|
7827
7827
|
try {
|
|
7828
7828
|
e.showLoader(), e.appendList(await fetchAssetList(a, e.licenceId, pagination$3, filter$i));
|
|
7829
|
-
} catch (
|
|
7830
|
-
d(
|
|
7829
|
+
} catch (q) {
|
|
7830
|
+
d(q);
|
|
7831
7831
|
} finally {
|
|
7832
7832
|
e.hideLoader();
|
|
7833
7833
|
}
|
|
7834
|
-
}, c = (
|
|
7835
|
-
e.toggleSelectedByIndex(
|
|
7834
|
+
}, c = (q) => {
|
|
7835
|
+
e.toggleSelectedByIndex(q.index);
|
|
7836
7836
|
}, f = async () => {
|
|
7837
7837
|
e.reset(), filter$i.type.default = [e.assetType], l(filter$i, pagination$3, u);
|
|
7838
7838
|
}, V = () => {
|
|
7839
7839
|
filterIsTouched.value = !0;
|
|
7840
7840
|
}, p = () => {
|
|
7841
7841
|
filterIsTouched.value = !1;
|
|
7842
|
-
}, g = (
|
|
7843
|
-
e.clearSelected(), e.setAssetType($), e.setLicenceId(
|
|
7842
|
+
}, g = (q, $, Y, N, b) => {
|
|
7843
|
+
e.clearSelected(), e.setAssetType($), e.setLicenceId(q), e.setSingleMode(Y), e.setMinCount(N), e.setMaxCount(b);
|
|
7844
7844
|
};
|
|
7845
7845
|
return {
|
|
7846
7846
|
filterIsTouched,
|
|
@@ -8476,7 +8476,7 @@ const _hoisted_1$H = { class: "d-flex flex-column w-100 px-1 align-center" }, _h
|
|
|
8476
8476
|
set(U) {
|
|
8477
8477
|
n.value = U, o("update:modelValue", U);
|
|
8478
8478
|
}
|
|
8479
|
-
}), { selectedCount: d, loader: u, pagination: m, fetchNextPage: c, resetAssetList: f, getSelectedData: V, initStoreContext: p } = useAssetListActions(), { openSidebar: g, sidebarLeft:
|
|
8479
|
+
}), { selectedCount: d, loader: u, pagination: m, fetchNextPage: c, resetAssetList: f, getSelectedData: V, initStoreContext: p } = useAssetListActions(), { openSidebar: g, sidebarLeft: q } = useSidebar(), { defaultLicenceId: $ } = useCommonAdminCoreDamOptions(r.configName), Y = () => {
|
|
8480
8480
|
const U = r.assetLicenceId || $;
|
|
8481
8481
|
if (isUndefined$1(U))
|
|
8482
8482
|
throw new Error("LicenceId must be provided. Provide using props or common-admin configuration.");
|
|
@@ -8491,7 +8491,7 @@ const _hoisted_1$H = { class: "d-flex flex-column w-100 px-1 align-center" }, _h
|
|
|
8491
8491
|
watch(
|
|
8492
8492
|
l,
|
|
8493
8493
|
async (U, W) => {
|
|
8494
|
-
U === W || !U ||
|
|
8494
|
+
U === W || !U || Y();
|
|
8495
8495
|
},
|
|
8496
8496
|
{ immediate: !0 }
|
|
8497
8497
|
);
|
|
@@ -8512,12 +8512,12 @@ const _hoisted_1$H = { class: "d-flex flex-column w-100 px-1 align-center" }, _h
|
|
|
8512
8512
|
}
|
|
8513
8513
|
}), H = computed(() => d.value < r.minCount || d.value > r.maxCount);
|
|
8514
8514
|
return a({
|
|
8515
|
-
open:
|
|
8515
|
+
open: Y
|
|
8516
8516
|
}), (U, W) => {
|
|
8517
8517
|
const M = resolveComponent("ABtnSecondary"), z = resolveComponent("ABtnPrimary");
|
|
8518
8518
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
8519
8519
|
renderSlot(U.$slots, "activator", {
|
|
8520
|
-
props: { onClick: withModifiers(() =>
|
|
8520
|
+
props: { onClick: withModifiers(() => Y(), ["stop"]) }
|
|
8521
8521
|
}),
|
|
8522
8522
|
createVNode(VDialog, {
|
|
8523
8523
|
"model-value": l.value,
|
|
@@ -8544,7 +8544,7 @@ const _hoisted_1$H = { class: "d-flex flex-column w-100 px-1 align-center" }, _h
|
|
|
8544
8544
|
}),
|
|
8545
8545
|
createVNode(_sfc_main$U),
|
|
8546
8546
|
createElementVNode("div", {
|
|
8547
|
-
class: normalizeClass(["subject-select__main", { "subject-select__main--sidebar-active": unref(
|
|
8547
|
+
class: normalizeClass(["subject-select__main", { "subject-select__main--sidebar-active": unref(q) }])
|
|
8548
8548
|
}, [
|
|
8549
8549
|
createElementVNode("div", _hoisted_1$D, [
|
|
8550
8550
|
createVNode(_sfc_main$P)
|
|
@@ -9011,15 +9011,15 @@ var plugins = [], defaults = {
|
|
|
9011
9011
|
function dispatchEvent$1(i) {
|
|
9012
9012
|
var a = i.sortable, e = i.rootEl, r = i.name, o = i.targetEl, s = i.cloneEl, n = i.toEl, l = i.fromEl, d = i.oldIndex, u = i.newIndex, m = i.oldDraggableIndex, c = i.newDraggableIndex, f = i.originalEvent, V = i.putSortable, p = i.extraEventProperties;
|
|
9013
9013
|
if (a = a || e && e[expando], !!a) {
|
|
9014
|
-
var g,
|
|
9014
|
+
var g, q = a.options, $ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
9015
9015
|
window.CustomEvent && !IE11OrLess && !Edge ? g = new CustomEvent(r, {
|
|
9016
9016
|
bubbles: !0,
|
|
9017
9017
|
cancelable: !0
|
|
9018
9018
|
}) : (g = document.createEvent("Event"), g.initEvent(r, !0, !0)), g.to = n || e, g.from = l || e, g.item = o || e, g.clone = s, g.oldIndex = d, g.newIndex = u, g.oldDraggableIndex = m, g.newDraggableIndex = c, g.originalEvent = f, g.pullMode = V ? V.lastPutMode : void 0;
|
|
9019
|
-
var
|
|
9020
|
-
for (var N in
|
|
9021
|
-
g[N] =
|
|
9022
|
-
e && e.dispatchEvent(g),
|
|
9019
|
+
var Y = _objectSpread2$1(_objectSpread2$1({}, p), PluginManager.getEventProperties(r, a));
|
|
9020
|
+
for (var N in Y)
|
|
9021
|
+
g[N] = Y[N];
|
|
9022
|
+
e && e.dispatchEvent(g), q[$] && q[$].call(a, g);
|
|
9023
9023
|
}
|
|
9024
9024
|
}
|
|
9025
9025
|
var _excluded = ["evt"], pluginEvent = function(a, e) {
|
|
@@ -9392,7 +9392,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
9392
9392
|
var e = this.el, r = a.target, o, s, n, l = this.options, d = l.group, u = Sortable.active, m = activeGroup === d, c = l.sort, f = putSortable || u, V, p = this, g = !1;
|
|
9393
9393
|
if (_silent)
|
|
9394
9394
|
return;
|
|
9395
|
-
function
|
|
9395
|
+
function q(S, E) {
|
|
9396
9396
|
pluginEvent(S, p, _objectSpread2$1({
|
|
9397
9397
|
evt: a,
|
|
9398
9398
|
isOwner: m,
|
|
@@ -9403,7 +9403,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
9403
9403
|
canSort: c,
|
|
9404
9404
|
fromSortable: f,
|
|
9405
9405
|
target: r,
|
|
9406
|
-
completed:
|
|
9406
|
+
completed: Y,
|
|
9407
9407
|
onMove: function(R, Q) {
|
|
9408
9408
|
return _onMove(rootEl, e, dragEl, o, R, getRect(R), a, Q);
|
|
9409
9409
|
},
|
|
@@ -9411,13 +9411,13 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
9411
9411
|
}, E));
|
|
9412
9412
|
}
|
|
9413
9413
|
function $() {
|
|
9414
|
-
|
|
9414
|
+
q("dragOverAnimationCapture"), p.captureAnimationState(), p !== f && f.captureAnimationState();
|
|
9415
9415
|
}
|
|
9416
|
-
function
|
|
9417
|
-
return
|
|
9416
|
+
function Y(S) {
|
|
9417
|
+
return q("dragOverCompleted", {
|
|
9418
9418
|
insertion: S
|
|
9419
9419
|
}), S && (m ? u._hideClone() : u._showClone(p), p !== f && (toggleClass$1(dragEl, putSortable ? putSortable.options.ghostClass : u.options.ghostClass, !1), toggleClass$1(dragEl, l.ghostClass, !0)), putSortable !== p && p !== Sortable.active ? putSortable = p : p === Sortable.active && putSortable && (putSortable = null), f === p && (p._ignoreWhileAnimating = r), p.animateAll(function() {
|
|
9420
|
-
|
|
9420
|
+
q("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
9421
9421
|
}), p !== f && (f.animateAll(), f._ignoreWhileAnimating = null)), (r === dragEl && !dragEl.animated || r === e && !r.animated) && (lastTarget = null), !l.dragoverBubble && !a.rootEl && r !== document && (dragEl.parentNode[expando]._isOutsideThisEl(a.target), !S && nearestEmptyInsertDetectEvent(a)), !l.dragoverBubble && a.stopPropagation && a.stopPropagation(), g = !0;
|
|
9422
9422
|
}
|
|
9423
9423
|
function N() {
|
|
@@ -9430,27 +9430,27 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
9430
9430
|
originalEvent: a
|
|
9431
9431
|
});
|
|
9432
9432
|
}
|
|
9433
|
-
if (a.preventDefault !== void 0 && a.cancelable && a.preventDefault(), r = closest(r, l.draggable, e, !0),
|
|
9433
|
+
if (a.preventDefault !== void 0 && a.cancelable && a.preventDefault(), r = closest(r, l.draggable, e, !0), q("dragOver"), Sortable.eventCanceled)
|
|
9434
9434
|
return g;
|
|
9435
9435
|
if (dragEl.contains(a.target) || r.animated && r.animatingX && r.animatingY || p._ignoreWhileAnimating === r)
|
|
9436
|
-
return
|
|
9436
|
+
return Y(!1);
|
|
9437
9437
|
if (ignoreNextClick = !1, u && !l.disabled && (m ? c || (n = parentEl !== rootEl) : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, u, dragEl, a)) && d.checkPut(this, u, dragEl, a))) {
|
|
9438
|
-
if (V = this._getDirection(a, r) === "vertical", o = getRect(dragEl),
|
|
9438
|
+
if (V = this._getDirection(a, r) === "vertical", o = getRect(dragEl), q("dragOverValid"), Sortable.eventCanceled)
|
|
9439
9439
|
return g;
|
|
9440
9440
|
if (n)
|
|
9441
|
-
return parentEl = rootEl, $(), this._hideClone(),
|
|
9441
|
+
return parentEl = rootEl, $(), this._hideClone(), q("revert"), Sortable.eventCanceled || (nextEl ? rootEl.insertBefore(dragEl, nextEl) : rootEl.appendChild(dragEl)), Y(!0);
|
|
9442
9442
|
var b = lastChild(e, l.draggable);
|
|
9443
9443
|
if (!b || _ghostIsLast(a, V, this) && !b.animated) {
|
|
9444
9444
|
if (b === dragEl)
|
|
9445
|
-
return
|
|
9445
|
+
return Y(!1);
|
|
9446
9446
|
if (b && e === a.target && (r = b), r && (s = getRect(r)), _onMove(rootEl, e, dragEl, o, r, s, a, !!r) !== !1)
|
|
9447
|
-
return $(), b && b.nextSibling ? e.insertBefore(dragEl, b.nextSibling) : e.appendChild(dragEl), parentEl = e, N(),
|
|
9447
|
+
return $(), b && b.nextSibling ? e.insertBefore(dragEl, b.nextSibling) : e.appendChild(dragEl), parentEl = e, N(), Y(!0);
|
|
9448
9448
|
} else if (b && _ghostIsFirst(a, V, this)) {
|
|
9449
9449
|
var T = getChild(e, 0, l, !0);
|
|
9450
9450
|
if (T === dragEl)
|
|
9451
|
-
return
|
|
9451
|
+
return Y(!1);
|
|
9452
9452
|
if (r = T, s = getRect(r), _onMove(rootEl, e, dragEl, o, r, s, a, !1) !== !1)
|
|
9453
|
-
return $(), e.insertBefore(dragEl, T), parentEl = e, N(),
|
|
9453
|
+
return $(), e.insertBefore(dragEl, T), parentEl = e, N(), Y(!0);
|
|
9454
9454
|
} else if (r.parentNode === e) {
|
|
9455
9455
|
s = getRect(r);
|
|
9456
9456
|
var D = 0, O, H = dragEl.parentNode !== e, U = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || o, r.animated && r.toRect || s, V), W = V ? "top" : "left", M = isScrolledPast(r, "top", "top") || isScrolledPast(dragEl, "top", "top"), z = M ? M.scrollTop : void 0;
|
|
@@ -9463,16 +9463,16 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
9463
9463
|
while (I && (css(I, "display") === "none" || I === ghostEl));
|
|
9464
9464
|
}
|
|
9465
9465
|
if (D === 0 || I === r)
|
|
9466
|
-
return
|
|
9466
|
+
return Y(!1);
|
|
9467
9467
|
lastTarget = r, lastDirection = D;
|
|
9468
9468
|
var y = r.nextElementSibling, v = !1;
|
|
9469
9469
|
v = D === 1;
|
|
9470
9470
|
var X = _onMove(rootEl, e, dragEl, o, r, s, a, v);
|
|
9471
9471
|
if (X !== !1)
|
|
9472
|
-
return (X === 1 || X === -1) && (v = X === 1), _silent = !0, setTimeout(_unsilent, 30), $(), v && !y ? e.appendChild(dragEl) : r.parentNode.insertBefore(dragEl, v ? y : r), M && scrollBy(M, 0, z - M.scrollTop), parentEl = dragEl.parentNode, O !== void 0 && !isCircumstantialInvert && (targetMoveDistance = Math.abs(O - getRect(r)[W])), N(),
|
|
9472
|
+
return (X === 1 || X === -1) && (v = X === 1), _silent = !0, setTimeout(_unsilent, 30), $(), v && !y ? e.appendChild(dragEl) : r.parentNode.insertBefore(dragEl, v ? y : r), M && scrollBy(M, 0, z - M.scrollTop), parentEl = dragEl.parentNode, O !== void 0 && !isCircumstantialInvert && (targetMoveDistance = Math.abs(O - getRect(r)[W])), N(), Y(!0);
|
|
9473
9473
|
}
|
|
9474
9474
|
if (e.contains(dragEl))
|
|
9475
|
-
return
|
|
9475
|
+
return Y(!1);
|
|
9476
9476
|
}
|
|
9477
9477
|
return !1;
|
|
9478
9478
|
},
|
|
@@ -9801,9 +9801,9 @@ var autoScroll = throttle(function(i, a, e, r) {
|
|
|
9801
9801
|
scrollRootEl !== e && (scrollRootEl = e, clearAutoScrolls(), scrollEl = a.scroll, m = a.scrollFn, scrollEl === !0 && (scrollEl = getParentAutoScrollElement(e, !0)));
|
|
9802
9802
|
var c = 0, f = scrollEl;
|
|
9803
9803
|
do {
|
|
9804
|
-
var V = f, p = getRect(V), g = p.top,
|
|
9804
|
+
var V = f, p = getRect(V), g = p.top, q = p.bottom, $ = p.left, Y = p.right, N = p.width, b = p.height, T = void 0, D = void 0, O = V.scrollWidth, H = V.scrollHeight, U = css(V), W = V.scrollLeft, M = V.scrollTop;
|
|
9805
9805
|
V === d ? (T = N < O && (U.overflowX === "auto" || U.overflowX === "scroll" || U.overflowX === "visible"), D = b < H && (U.overflowY === "auto" || U.overflowY === "scroll" || U.overflowY === "visible")) : (T = N < O && (U.overflowX === "auto" || U.overflowX === "scroll"), D = b < H && (U.overflowY === "auto" || U.overflowY === "scroll"));
|
|
9806
|
-
var z = T && (Math.abs(
|
|
9806
|
+
var z = T && (Math.abs(Y - o) <= n && W + N < O) - (Math.abs($ - o) <= n && !!W), I = D && (Math.abs(q - s) <= n && M + b < H) - (Math.abs(g - s) <= n && !!M);
|
|
9807
9807
|
if (!autoScrolls[c])
|
|
9808
9808
|
for (var C = 0; C <= c; C++)
|
|
9809
9809
|
autoScrolls[C] || (autoScrolls[C] = {});
|
|
@@ -9960,7 +9960,7 @@ function useSortableActions(i, a, e, r) {
|
|
|
9960
9960
|
m.value.add(I);
|
|
9961
9961
|
}, g = (I) => {
|
|
9962
9962
|
m.value.delete(I);
|
|
9963
|
-
},
|
|
9963
|
+
}, q = (I, C, y, v = []) => {
|
|
9964
9964
|
const X = C > y ? y : C;
|
|
9965
9965
|
let S = X + 1;
|
|
9966
9966
|
for (let E = X; E < I.length; E++)
|
|
@@ -9974,16 +9974,16 @@ function useSortableActions(i, a, e, r) {
|
|
|
9974
9974
|
if (C >= 0 && C < y.length) {
|
|
9975
9975
|
let v = [];
|
|
9976
9976
|
const X = y.splice(I, 1)[0];
|
|
9977
|
-
return y.splice(C, 0, X), isUndefined$1(e.updatePosition) || (v =
|
|
9977
|
+
return y.splice(C, 0, X), isUndefined$1(e.updatePosition) || (v = q(y, I, C)), V(), r("update:modelValue", y), v;
|
|
9978
9978
|
}
|
|
9979
9979
|
return [];
|
|
9980
|
-
},
|
|
9980
|
+
}, Y = (I, C) => {
|
|
9981
9981
|
const y = C.findIndex((v) => v[e.keyField] === I);
|
|
9982
9982
|
return y === -1 ? null : y;
|
|
9983
9983
|
}, N = (I, C, y, v = null) => {
|
|
9984
9984
|
I.data = cloneDeep(C), isNull(y) || (I.data.position = y), isNull(v) || p(C.id);
|
|
9985
9985
|
}, b = (I, C, y = null, v = null) => {
|
|
9986
|
-
const X = cloneDeep(i.value), S =
|
|
9986
|
+
const X = cloneDeep(i.value), S = Y(I, X);
|
|
9987
9987
|
!isNull(S) && X[S] && (N(X[S], C, y, v), V(X));
|
|
9988
9988
|
}, T = (I, C, y, v = null) => {
|
|
9989
9989
|
const X = cloneDeep(i.value);
|
|
@@ -9993,21 +9993,21 @@ function useSortableActions(i, a, e, r) {
|
|
|
9993
9993
|
if (isNull(I))
|
|
9994
9994
|
return y.push(cloneDeep(C)), V(y), [];
|
|
9995
9995
|
const v = [];
|
|
9996
|
-
return y[I] ? (y.splice(I + 1, 0, C),
|
|
9996
|
+
return y[I] ? (y.splice(I + 1, 0, C), q(y, I + 1, I + 1, v), V(y), v) : [];
|
|
9997
9997
|
}, O = (I, C) => {
|
|
9998
9998
|
const y = cloneDeep(i.value);
|
|
9999
9999
|
if (isNull(I))
|
|
10000
10000
|
return y.push(cloneDeep(C)), V(y), [];
|
|
10001
|
-
const v =
|
|
10002
|
-
return !isNull(v) && y[v] ? (y.splice(v + 1, 0, C),
|
|
10001
|
+
const v = Y(I, y), X = [];
|
|
10002
|
+
return !isNull(v) && y[v] ? (y.splice(v + 1, 0, C), q(y, v + 1, v + 1, X), V(y), X) : [];
|
|
10003
10003
|
}, H = (I) => {
|
|
10004
|
-
const C = cloneDeep(i.value), y =
|
|
10005
|
-
return !isNull(y) && C[y] ? (C.splice(y, 1),
|
|
10004
|
+
const C = cloneDeep(i.value), y = Y(I, C), v = [];
|
|
10005
|
+
return !isNull(y) && C[y] ? (C.splice(y, 1), q(C, y, y, v), g(I), V(C), v) : [];
|
|
10006
10006
|
}, U = (I) => {
|
|
10007
10007
|
const C = cloneDeep(i.value), y = [];
|
|
10008
10008
|
if (C[I]) {
|
|
10009
10009
|
const v = C[I][e.keyField];
|
|
10010
|
-
return C.splice(I, 1),
|
|
10010
|
+
return C.splice(I, 1), q(C, I, I, y), g(v), V(C), y;
|
|
10011
10011
|
}
|
|
10012
10012
|
return [];
|
|
10013
10013
|
}, W = () => {
|
|
@@ -10061,7 +10061,7 @@ const WIDGET_HTML_ID_PREFIX = "a-sortable-", _hoisted_1$C = ["id"], _hoisted_2$p
|
|
|
10061
10061
|
const r = i, o = e, s = toRef(() => r.modelValue), { t: n } = useI18n(), l = (y) => {
|
|
10062
10062
|
o("onAddAfter", y);
|
|
10063
10063
|
}, d = (y) => {
|
|
10064
|
-
$.value = y,
|
|
10064
|
+
$.value = y, Y.value = !0;
|
|
10065
10065
|
}, u = (y) => {
|
|
10066
10066
|
o("onEdit", y);
|
|
10067
10067
|
}, m = () => {
|
|
@@ -10082,7 +10082,7 @@ const WIDGET_HTML_ID_PREFIX = "a-sortable-", _hoisted_1$C = ["id"], _hoisted_2$p
|
|
|
10082
10082
|
onEnd: async (v) => {
|
|
10083
10083
|
if (r.disableDefaultSort || isUndefined$1(v.oldIndex) || isUndefined$1(v.newIndex))
|
|
10084
10084
|
return;
|
|
10085
|
-
const X =
|
|
10085
|
+
const X = q(v.oldIndex, v.newIndex);
|
|
10086
10086
|
o("onEnd", X);
|
|
10087
10087
|
}
|
|
10088
10088
|
}));
|
|
@@ -10090,9 +10090,9 @@ const WIDGET_HTML_ID_PREFIX = "a-sortable-", _hoisted_1$C = ["id"], _hoisted_2$p
|
|
|
10090
10090
|
items: V,
|
|
10091
10091
|
forceRerender: p,
|
|
10092
10092
|
dirtyLocal: g,
|
|
10093
|
-
moveArrayElement:
|
|
10093
|
+
moveArrayElement: q,
|
|
10094
10094
|
itemToRemove: $,
|
|
10095
|
-
removeDialog:
|
|
10095
|
+
removeDialog: Y,
|
|
10096
10096
|
destroy: N,
|
|
10097
10097
|
refresh: b,
|
|
10098
10098
|
onRemoveDialogConfirm: T,
|
|
@@ -10248,15 +10248,15 @@ const WIDGET_HTML_ID_PREFIX = "a-sortable-", _hoisted_1$C = ["id"], _hoisted_2$p
|
|
|
10248
10248
|
})) : createCommentVNode("", !0)
|
|
10249
10249
|
]),
|
|
10250
10250
|
createVNode(VDialog, {
|
|
10251
|
-
modelValue: unref(
|
|
10252
|
-
"onUpdate:modelValue": v[2] || (v[2] = (E) => isRef(
|
|
10251
|
+
modelValue: unref(Y),
|
|
10252
|
+
"onUpdate:modelValue": v[2] || (v[2] = (E) => isRef(Y) ? Y.value = E : null),
|
|
10253
10253
|
width: 500
|
|
10254
10254
|
}, {
|
|
10255
10255
|
default: withCtx(() => [
|
|
10256
|
-
unref(
|
|
10256
|
+
unref(Y) ? (openBlock(), createBlock(VCard, { key: 0 }, {
|
|
10257
10257
|
default: withCtx(() => [
|
|
10258
10258
|
createVNode(_sfc_main$1W, {
|
|
10259
|
-
onOnCancel: v[0] || (v[0] = (E) =>
|
|
10259
|
+
onOnCancel: v[0] || (v[0] = (E) => Y.value = !1)
|
|
10260
10260
|
}, {
|
|
10261
10261
|
default: withCtx(() => [
|
|
10262
10262
|
createTextVNode(toDisplayString(unref(n)("common.system.modal.confirmDelete")), 1)
|
|
@@ -10267,7 +10267,7 @@ const WIDGET_HTML_ID_PREFIX = "a-sortable-", _hoisted_1$C = ["id"], _hoisted_2$p
|
|
|
10267
10267
|
default: withCtx(() => [
|
|
10268
10268
|
createVNode(VSpacer),
|
|
10269
10269
|
createVNode(X, {
|
|
10270
|
-
onClick: v[1] || (v[1] = withModifiers((E) =>
|
|
10270
|
+
onClick: v[1] || (v[1] = withModifiers((E) => Y.value = !1, ["stop"]))
|
|
10271
10271
|
}, {
|
|
10272
10272
|
default: withCtx(() => [
|
|
10273
10273
|
createTextVNode(toDisplayString(unref(n)("common.button.cancel")), 1)
|
|
@@ -10310,7 +10310,7 @@ function useSortableNestedActions(i, a, e) {
|
|
|
10310
10310
|
}), o.value = []);
|
|
10311
10311
|
}, g = (M, z) => {
|
|
10312
10312
|
M.meta.dirty = !0, z.meta.dirty = !0;
|
|
10313
|
-
},
|
|
10313
|
+
}, q = (M, z, I, C, y = []) => {
|
|
10314
10314
|
const v = z > I ? I : z;
|
|
10315
10315
|
let X = v + 1;
|
|
10316
10316
|
for (let S = v; S < M.length; S++)
|
|
@@ -10335,11 +10335,11 @@ function useSortableNestedActions(i, a, e) {
|
|
|
10335
10335
|
position: z[S].data.position
|
|
10336
10336
|
})), X++;
|
|
10337
10337
|
}
|
|
10338
|
-
},
|
|
10338
|
+
}, Y = (M, z, I = 0) => {
|
|
10339
10339
|
if (M === null)
|
|
10340
10340
|
return I;
|
|
10341
10341
|
const C = z.find((y) => y.data.id === M);
|
|
10342
|
-
return C ? (I++,
|
|
10342
|
+
return C ? (I++, Y(C.data.parent, z, I)) : I;
|
|
10343
10343
|
}, N = (M, z = 0) => {
|
|
10344
10344
|
let I = z;
|
|
10345
10345
|
if (M && M.length) {
|
|
@@ -10351,7 +10351,7 @@ function useSortableNestedActions(i, a, e) {
|
|
|
10351
10351
|
}
|
|
10352
10352
|
return I;
|
|
10353
10353
|
}, b = (M, z, I = 1) => {
|
|
10354
|
-
const C =
|
|
10354
|
+
const C = Y(M.data.parent, z), y = N(M.children, I);
|
|
10355
10355
|
return C + y;
|
|
10356
10356
|
}, T = (M, z, I = null) => {
|
|
10357
10357
|
for (const C of z) {
|
|
@@ -10394,7 +10394,7 @@ function useSortableNestedActions(i, a, e) {
|
|
|
10394
10394
|
const R = v.children.indexOf(X);
|
|
10395
10395
|
if (R !== -1) {
|
|
10396
10396
|
const Q = v.children.splice(R, 1)[0];
|
|
10397
|
-
return v.children.splice(I, 0, Q),
|
|
10397
|
+
return v.children.splice(I, 0, Q), q(v.children, R, I, v, E), c(v), [];
|
|
10398
10398
|
}
|
|
10399
10399
|
return console.error("ASortableNested error."), [];
|
|
10400
10400
|
}
|
|
@@ -10425,7 +10425,7 @@ function useSortableNestedActions(i, a, e) {
|
|
|
10425
10425
|
const R = S.children.indexOf(X);
|
|
10426
10426
|
if (R !== -1) {
|
|
10427
10427
|
const Q = S.children.splice(R, 1)[0];
|
|
10428
|
-
K.children.splice(I, 0, Q),
|
|
10428
|
+
K.children.splice(I, 0, Q), q(K.children, R, I, v, E);
|
|
10429
10429
|
}
|
|
10430
10430
|
} else if (S && S.children && K.data.id !== S.data.id) {
|
|
10431
10431
|
const R = S.children.indexOf(X);
|
|
@@ -10468,10 +10468,10 @@ function useSortableNestedActions(i, a, e) {
|
|
|
10468
10468
|
const S = [];
|
|
10469
10469
|
if (!isNull(X) && X.children) {
|
|
10470
10470
|
const E = X.children.indexOf(v) + 1;
|
|
10471
|
-
E !== -1 && (X.children.splice(E, 0, y),
|
|
10471
|
+
E !== -1 && (X.children.splice(E, 0, y), q(X.children, E, E, C, S));
|
|
10472
10472
|
} else {
|
|
10473
10473
|
const E = C.children.indexOf(v) + 1;
|
|
10474
|
-
E !== -1 && (C.children.splice(E, 0, y),
|
|
10474
|
+
E !== -1 && (C.children.splice(E, 0, y), q(C.children, E, E, C, S));
|
|
10475
10475
|
}
|
|
10476
10476
|
return c(C), S;
|
|
10477
10477
|
},
|
|
@@ -10497,10 +10497,10 @@ function useSortableNestedActions(i, a, e) {
|
|
|
10497
10497
|
const y = [];
|
|
10498
10498
|
if (C && C.children) {
|
|
10499
10499
|
const v = C.children.indexOf(I);
|
|
10500
|
-
v !== -1 && (C.children.splice(v, 1),
|
|
10500
|
+
v !== -1 && (C.children.splice(v, 1), q(C.children, v, v, z, y));
|
|
10501
10501
|
} else {
|
|
10502
10502
|
const v = z.children.indexOf(I);
|
|
10503
|
-
v !== -1 && (z.children.splice(v, 1),
|
|
10503
|
+
v !== -1 && (z.children.splice(v, 1), q(z.children, v, v, z, y));
|
|
10504
10504
|
}
|
|
10505
10505
|
return c(z), y;
|
|
10506
10506
|
},
|
|
@@ -10711,7 +10711,7 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
10711
10711
|
}, l = (C) => {
|
|
10712
10712
|
o("onAddChild", C);
|
|
10713
10713
|
}, d = (C) => {
|
|
10714
|
-
N.value = C,
|
|
10714
|
+
N.value = C, Y.value = !0;
|
|
10715
10715
|
}, u = (C) => {
|
|
10716
10716
|
o("onEdit", C);
|
|
10717
10717
|
}, m = () => {
|
|
@@ -10721,9 +10721,9 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
10721
10721
|
}
|
|
10722
10722
|
o("onAddLast", null);
|
|
10723
10723
|
}, { t: c } = useI18n(), f = computed(() => isUndefined$1(r.widgetIdentifierId) ? WIDGET_HTML_ID_PREFIX + $.value : r.widgetIdentifierId), V = computed(() => r.rootClassName + " " + (g.value ? r.rootClassName + "--dragging" : "")), p = () => {
|
|
10724
|
-
if (r.disableDraggable || !
|
|
10724
|
+
if (r.disableDraggable || !q.value)
|
|
10725
10725
|
return;
|
|
10726
|
-
const C = Array.from(
|
|
10726
|
+
const C = Array.from(q.value.querySelectorAll("." + NESTED_GROUP_CLASS));
|
|
10727
10727
|
I.value = [];
|
|
10728
10728
|
for (let y = 0; y < C.length; y++)
|
|
10729
10729
|
I.value[y] = useSortable(C[y], [], {
|
|
@@ -10766,9 +10766,9 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
10766
10766
|
});
|
|
10767
10767
|
}, {
|
|
10768
10768
|
dragging: g,
|
|
10769
|
-
widgetEl:
|
|
10769
|
+
widgetEl: q,
|
|
10770
10770
|
randomUuid: $,
|
|
10771
|
-
removeDialog:
|
|
10771
|
+
removeDialog: Y,
|
|
10772
10772
|
itemToRemove: N,
|
|
10773
10773
|
forceRerender: b,
|
|
10774
10774
|
moveArrayElement: T,
|
|
@@ -10784,7 +10784,7 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
10784
10784
|
return onBeforeUnmount(() => {
|
|
10785
10785
|
W();
|
|
10786
10786
|
}), nextTick(() => {
|
|
10787
|
-
|
|
10787
|
+
q.value = document.querySelector("#" + f.value), p();
|
|
10788
10788
|
}), watch(
|
|
10789
10789
|
() => r.disableDraggable,
|
|
10790
10790
|
async (C) => {
|
|
@@ -10843,15 +10843,15 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
10843
10843
|
_: 1
|
|
10844
10844
|
})) : createCommentVNode("", !0),
|
|
10845
10845
|
createVNode(VDialog, {
|
|
10846
|
-
modelValue: unref(
|
|
10847
|
-
"onUpdate:modelValue": y[2] || (y[2] = (S) => isRef(
|
|
10846
|
+
modelValue: unref(Y),
|
|
10847
|
+
"onUpdate:modelValue": y[2] || (y[2] = (S) => isRef(Y) ? Y.value = S : null),
|
|
10848
10848
|
width: 500
|
|
10849
10849
|
}, {
|
|
10850
10850
|
default: withCtx(() => [
|
|
10851
|
-
unref(
|
|
10851
|
+
unref(Y) ? (openBlock(), createBlock(VCard, { key: 0 }, {
|
|
10852
10852
|
default: withCtx(() => [
|
|
10853
10853
|
createVNode(_sfc_main$1W, {
|
|
10854
|
-
onOnCancel: y[0] || (y[0] = (S) =>
|
|
10854
|
+
onOnCancel: y[0] || (y[0] = (S) => Y.value = !1)
|
|
10855
10855
|
}, {
|
|
10856
10856
|
default: withCtx(() => [
|
|
10857
10857
|
createTextVNode(toDisplayString(unref(c)("common.system.modal.confirmDelete")), 1)
|
|
@@ -10862,7 +10862,7 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
10862
10862
|
default: withCtx(() => [
|
|
10863
10863
|
createVNode(VSpacer),
|
|
10864
10864
|
createVNode(v, {
|
|
10865
|
-
onClick: y[1] || (y[1] = withModifiers((S) =>
|
|
10865
|
+
onClick: y[1] || (y[1] = withModifiers((S) => Y.value = !1, ["stop"]))
|
|
10866
10866
|
}, {
|
|
10867
10867
|
default: withCtx(() => [
|
|
10868
10868
|
createTextVNode(toDisplayString(unref(c)("common.button.cancel")), 1)
|
|
@@ -10926,14 +10926,14 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
10926
10926
|
d.value = !d.value;
|
|
10927
10927
|
}, g = () => {
|
|
10928
10928
|
n.value = !1;
|
|
10929
|
-
},
|
|
10929
|
+
}, q = () => {
|
|
10930
10930
|
o(
|
|
10931
10931
|
"onConfirm",
|
|
10932
10932
|
r.selectedItems.map((D) => toRaw(D))
|
|
10933
10933
|
), g();
|
|
10934
10934
|
}, $ = () => {
|
|
10935
10935
|
o("onFetchNextPage");
|
|
10936
|
-
},
|
|
10936
|
+
}, Y = () => {
|
|
10937
10937
|
o("onPageChange");
|
|
10938
10938
|
}, N = computed(() => Math.ceil(l.value.totalCount / l.value.rowsPerPage)), b = computed(() => !(isNull(l.value.hasNextPage) && l.value.page === N.value || l.value.hasNextPage === !1)), T = (D) => {
|
|
10939
10939
|
D && b.value && !r.loading && $();
|
|
@@ -11097,7 +11097,7 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
11097
11097
|
key: 1,
|
|
11098
11098
|
modelValue: l.value,
|
|
11099
11099
|
"onUpdate:modelValue": O[0] || (O[0] = (W) => l.value = W),
|
|
11100
|
-
onChange:
|
|
11100
|
+
onChange: Y
|
|
11101
11101
|
}, null, 8, ["modelValue"]))
|
|
11102
11102
|
])
|
|
11103
11103
|
], 2),
|
|
@@ -11110,7 +11110,7 @@ const _hoisted_1$B = ["data-id"], _hoisted_2$o = { class: "a-sortable-nested-wid
|
|
|
11110
11110
|
createVNode(VSpacer),
|
|
11111
11111
|
createVNode(U, {
|
|
11112
11112
|
disabled: f.value,
|
|
11113
|
-
onClick: withModifiers(
|
|
11113
|
+
onClick: withModifiers(q, ["stop"])
|
|
11114
11114
|
}, {
|
|
11115
11115
|
default: withCtx(() => [
|
|
11116
11116
|
renderSlot(D.$slots, "button-confirm-title", {}, () => [
|
|
@@ -11287,107 +11287,107 @@ const _hoisted_1$y = {
|
|
|
11287
11287
|
},
|
|
11288
11288
|
emits: ["update:modelValue", "blur"],
|
|
11289
11289
|
setup(i, { emit: a }) {
|
|
11290
|
-
const e = i, r = a, o = (
|
|
11291
|
-
r("update:modelValue", { property: e.config.property, value: o(
|
|
11290
|
+
const e = i, r = a, o = (Y) => e.config.attributes.type === CustomDataFormElementType.Integer ? parseInt(Y) : Y, s = (Y) => {
|
|
11291
|
+
r("update:modelValue", { property: e.config.property, value: o(Y) });
|
|
11292
11292
|
}, n = computed(() => {
|
|
11293
|
-
const
|
|
11294
|
-
return e.config.attributes.type === CustomDataFormElementType.StringArray && isEmptyObject(
|
|
11293
|
+
const Y = isProxy(e.modelValue) ? toRaw(e.modelValue) : e.modelValue;
|
|
11294
|
+
return e.config.attributes.type === CustomDataFormElementType.StringArray && isEmptyObject(Y) ? [] : Y;
|
|
11295
11295
|
}), { maxLength: l, minLength: d, requiredIf: u, minValue: m, maxValue: c, stringArrayItemLength: f } = useValidate(), V = computed(() => {
|
|
11296
|
-
const
|
|
11296
|
+
const Y = {
|
|
11297
11297
|
modelValueComputed: {
|
|
11298
11298
|
required: u(e.config.attributes.required)
|
|
11299
11299
|
}
|
|
11300
11300
|
};
|
|
11301
11301
|
switch (e.config.attributes.type) {
|
|
11302
11302
|
case CustomDataFormElementType.String:
|
|
11303
|
-
|
|
11303
|
+
Y.modelValueComputed.minLength = d(
|
|
11304
11304
|
e.config.attributes.minValue ? e.config.attributes.minValue : 0
|
|
11305
|
-
),
|
|
11305
|
+
), Y.modelValueComputed.maxLength = l(
|
|
11306
11306
|
e.config.attributes.maxValue ? e.config.attributes.maxValue : 256
|
|
11307
11307
|
);
|
|
11308
11308
|
break;
|
|
11309
11309
|
case CustomDataFormElementType.Integer:
|
|
11310
|
-
|
|
11310
|
+
Y.modelValueComputed.minValue = m(
|
|
11311
11311
|
e.config.attributes.minValue ? e.config.attributes.minValue : 0
|
|
11312
|
-
),
|
|
11312
|
+
), Y.modelValueComputed.maxValue = c(
|
|
11313
11313
|
e.config.attributes.maxValue ? e.config.attributes.maxValue : 9999
|
|
11314
11314
|
);
|
|
11315
11315
|
break;
|
|
11316
11316
|
case CustomDataFormElementType.StringArray:
|
|
11317
|
-
|
|
11317
|
+
Y.modelValueComputed.minLength = d(
|
|
11318
11318
|
e.config.attributes.minCount ? e.config.attributes.minCount : 0
|
|
11319
|
-
),
|
|
11319
|
+
), Y.modelValueComputed.maxLength = l(
|
|
11320
11320
|
e.config.attributes.maxCount ? e.config.attributes.maxCount : 32
|
|
11321
|
-
),
|
|
11321
|
+
), Y.modelValueComputed.stringArrayItemLength = f(
|
|
11322
11322
|
e.config.attributes.minValue ? e.config.attributes.minValue : 0,
|
|
11323
11323
|
e.config.attributes.maxValue ? e.config.attributes.maxValue : 256
|
|
11324
11324
|
);
|
|
11325
11325
|
break;
|
|
11326
11326
|
}
|
|
11327
|
-
return
|
|
11328
|
-
}), p = useVuelidate$1(V, { modelValueComputed: n }, { $scope: e.validationScope }), g = computed(() => p.value.$errors.length ? [p.value.$errors.map((
|
|
11329
|
-
|
|
11327
|
+
return Y;
|
|
11328
|
+
}), p = useVuelidate$1(V, { modelValueComputed: n }, { $scope: e.validationScope }), g = computed(() => p.value.$errors.length ? [p.value.$errors.map((Y) => Y.$message).join(" ")] : []), q = ref(void 0);
|
|
11329
|
+
q.value = e.config.attributes.maxValue ?? void 0;
|
|
11330
11330
|
const $ = () => {
|
|
11331
11331
|
r("blur", e.modelValue), p.value.$touch();
|
|
11332
11332
|
};
|
|
11333
|
-
return (
|
|
11334
|
-
|
|
11333
|
+
return (Y, N) => (openBlock(), createElementBlock(Fragment, null, [
|
|
11334
|
+
Y.config.attributes.type === unref(CustomDataFormElementType).String ? (openBlock(), createBlock(VTextarea, {
|
|
11335
11335
|
key: 0,
|
|
11336
|
-
"model-value":
|
|
11336
|
+
"model-value": Y.modelValue,
|
|
11337
11337
|
"auto-grow": "",
|
|
11338
11338
|
rows: 1,
|
|
11339
|
-
label:
|
|
11339
|
+
label: Y.config.name,
|
|
11340
11340
|
"error-messages": g.value,
|
|
11341
|
-
counter:
|
|
11342
|
-
"data-cy": "custom-field-" +
|
|
11341
|
+
counter: q.value,
|
|
11342
|
+
"data-cy": "custom-field-" + Y.config.property,
|
|
11343
11343
|
"onUpdate:modelValue": s,
|
|
11344
11344
|
onBlur: $
|
|
11345
11345
|
}, {
|
|
11346
11346
|
label: withCtx(() => [
|
|
11347
|
-
createTextVNode(toDisplayString(
|
|
11348
|
-
|
|
11347
|
+
createTextVNode(toDisplayString(Y.config.name), 1),
|
|
11348
|
+
Y.config.attributes.required ? (openBlock(), createElementBlock("span", _hoisted_1$y)) : createCommentVNode("", !0)
|
|
11349
11349
|
]),
|
|
11350
11350
|
_: 1
|
|
11351
|
-
}, 8, ["model-value", "label", "error-messages", "counter", "data-cy"])) :
|
|
11351
|
+
}, 8, ["model-value", "label", "error-messages", "counter", "data-cy"])) : Y.config.attributes.type === unref(CustomDataFormElementType).Integer ? (openBlock(), createBlock(VTextField, {
|
|
11352
11352
|
key: 1,
|
|
11353
11353
|
"model-value": n.value,
|
|
11354
11354
|
type: "number",
|
|
11355
|
-
label:
|
|
11355
|
+
label: Y.config.name,
|
|
11356
11356
|
"error-messages": g.value,
|
|
11357
|
-
"data-cy": "custom-field-" +
|
|
11357
|
+
"data-cy": "custom-field-" + Y.config.property,
|
|
11358
11358
|
"onUpdate:modelValue": s,
|
|
11359
11359
|
onBlur: $
|
|
11360
11360
|
}, {
|
|
11361
11361
|
label: withCtx(() => [
|
|
11362
|
-
createTextVNode(toDisplayString(
|
|
11363
|
-
|
|
11362
|
+
createTextVNode(toDisplayString(Y.config.name), 1),
|
|
11363
|
+
Y.config.attributes.required ? (openBlock(), createElementBlock("span", _hoisted_2$m)) : createCommentVNode("", !0)
|
|
11364
11364
|
]),
|
|
11365
11365
|
_: 1
|
|
11366
|
-
}, 8, ["model-value", "label", "error-messages", "data-cy"])) :
|
|
11366
|
+
}, 8, ["model-value", "label", "error-messages", "data-cy"])) : Y.config.attributes.type === unref(CustomDataFormElementType).StringArray ? (openBlock(), createBlock(VCombobox, {
|
|
11367
11367
|
key: 2,
|
|
11368
11368
|
"model-value": n.value,
|
|
11369
|
-
label:
|
|
11369
|
+
label: Y.config.name,
|
|
11370
11370
|
multiple: "",
|
|
11371
11371
|
chips: "",
|
|
11372
11372
|
"error-messages": g.value,
|
|
11373
|
-
"data-cy": "custom-field-" +
|
|
11373
|
+
"data-cy": "custom-field-" + Y.config.property,
|
|
11374
11374
|
"onUpdate:modelValue": s,
|
|
11375
11375
|
onBlur: $
|
|
11376
11376
|
}, {
|
|
11377
11377
|
label: withCtx(() => [
|
|
11378
|
-
createTextVNode(toDisplayString(
|
|
11379
|
-
|
|
11378
|
+
createTextVNode(toDisplayString(Y.config.name), 1),
|
|
11379
|
+
Y.config.attributes.required ? (openBlock(), createElementBlock("span", _hoisted_3$k)) : createCommentVNode("", !0)
|
|
11380
11380
|
]),
|
|
11381
11381
|
_: 1
|
|
11382
11382
|
}, 8, ["model-value", "label", "error-messages", "data-cy"])) : createCommentVNode("", !0),
|
|
11383
|
-
|
|
11383
|
+
Y.config.attributes.type === unref(CustomDataFormElementType).Boolean && Y.config.attributes.required === !0 ? (openBlock(), createBlock(VSwitch, {
|
|
11384
11384
|
key: 3,
|
|
11385
|
-
label:
|
|
11385
|
+
label: Y.config.name,
|
|
11386
11386
|
"model-value": n.value,
|
|
11387
|
-
"data-cy": "custom-field-" +
|
|
11387
|
+
"data-cy": "custom-field-" + Y.config.property,
|
|
11388
11388
|
"onUpdate:modelValue": s
|
|
11389
11389
|
}, null, 8, ["label", "model-value", "data-cy"])) : createCommentVNode("", !0),
|
|
11390
|
-
|
|
11390
|
+
Y.config.attributes.type === unref(CustomDataFormElementType).Boolean && Y.config.attributes.required === !1 ? (openBlock(), createElementBlock("div", _hoisted_4$c, " optional boolean todo ")) : createCommentVNode("", !0)
|
|
11391
11391
|
], 64));
|
|
11392
11392
|
}
|
|
11393
11393
|
}), _hoisted_1$x = { class: "w-100" }, _hoisted_2$l = { class: "w-100" }, _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
@@ -11401,36 +11401,36 @@ const _hoisted_1$y = {
|
|
|
11401
11401
|
},
|
|
11402
11402
|
emits: ["update:modelValue", "anyChange"],
|
|
11403
11403
|
setup(i, { expose: a, emit: e }) {
|
|
11404
|
-
const r = i, o = e, { t: s } = useI18n(), { showAll: n, toggleForm: l } = useCustomDataForm(), d = (
|
|
11404
|
+
const r = i, o = e, { t: s } = useI18n(), { showAll: n, toggleForm: l } = useCustomDataForm(), d = (q) => {
|
|
11405
11405
|
const $ = {};
|
|
11406
|
-
$[
|
|
11406
|
+
$[q.property] = q.value, o("update:modelValue", { ...r.modelValue, ...$ }), o("anyChange");
|
|
11407
11407
|
}, u = computed(() => r.elements.slice(0, r.pinnedCount)), m = computed(() => r.elements.slice(r.pinnedCount)), c = computed(() => n.value ? s("common.damImage.asset.detail.metadataToggle.show") : s("common.damImage.asset.detail.metadataToggle.hide")), f = computed(() => n.value ? "mdi-minus" : "mdi-plus"), V = computed(() => r.elements.length > r.pinnedCount), p = useVuelidate({ $scope: r.validationScope });
|
|
11408
11408
|
return a({
|
|
11409
11409
|
validate: () => p.value.$validate()
|
|
11410
|
-
}), (
|
|
11410
|
+
}), (q, $) => (openBlock(), createElementBlock(Fragment, null, [
|
|
11411
11411
|
createElementVNode("div", _hoisted_1$x, [
|
|
11412
|
-
renderSlot(
|
|
11413
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(u.value, (
|
|
11414
|
-
key:
|
|
11412
|
+
renderSlot(q.$slots, "before-pinned"),
|
|
11413
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(u.value, (Y) => (openBlock(), createBlock(VRow, {
|
|
11414
|
+
key: Y.id,
|
|
11415
11415
|
dense: "",
|
|
11416
11416
|
class: "mt-1"
|
|
11417
11417
|
}, {
|
|
11418
11418
|
default: withCtx(() => [
|
|
11419
11419
|
createVNode(VCol, null, {
|
|
11420
11420
|
default: withCtx(() => [
|
|
11421
|
-
|
|
11421
|
+
q.readonly ? (openBlock(), createBlock(_sfc_main$24, {
|
|
11422
11422
|
key: 0,
|
|
11423
|
-
title:
|
|
11423
|
+
title: Y.name
|
|
11424
11424
|
}, {
|
|
11425
11425
|
default: withCtx(() => [
|
|
11426
|
-
createTextVNode(toDisplayString(
|
|
11426
|
+
createTextVNode(toDisplayString(q.modelValue[Y.property]), 1)
|
|
11427
11427
|
]),
|
|
11428
11428
|
_: 2
|
|
11429
11429
|
}, 1032, ["title"])) : (openBlock(), createBlock(_sfc_main$J, {
|
|
11430
11430
|
key: 1,
|
|
11431
|
-
config:
|
|
11432
|
-
"model-value":
|
|
11433
|
-
"validation-scope":
|
|
11431
|
+
config: Y,
|
|
11432
|
+
"model-value": q.modelValue[Y.property],
|
|
11433
|
+
"validation-scope": q.validationScope,
|
|
11434
11434
|
"onUpdate:modelValue": d
|
|
11435
11435
|
}, null, 8, ["config", "model-value", "validation-scope"]))
|
|
11436
11436
|
]),
|
|
@@ -11439,29 +11439,29 @@ const _hoisted_1$y = {
|
|
|
11439
11439
|
]),
|
|
11440
11440
|
_: 2
|
|
11441
11441
|
}, 1024))), 128)),
|
|
11442
|
-
renderSlot(
|
|
11442
|
+
renderSlot(q.$slots, "after-pinned")
|
|
11443
11443
|
]),
|
|
11444
11444
|
withDirectives(createElementVNode("div", _hoisted_2$l, [
|
|
11445
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(m.value, (
|
|
11446
|
-
key:
|
|
11445
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(m.value, (Y) => (openBlock(), createBlock(VRow, {
|
|
11446
|
+
key: Y.id,
|
|
11447
11447
|
dense: "",
|
|
11448
11448
|
class: "mt-1"
|
|
11449
11449
|
}, {
|
|
11450
11450
|
default: withCtx(() => [
|
|
11451
11451
|
createVNode(VCol, null, {
|
|
11452
11452
|
default: withCtx(() => [
|
|
11453
|
-
|
|
11453
|
+
q.readonly ? (openBlock(), createBlock(_sfc_main$24, {
|
|
11454
11454
|
key: 0,
|
|
11455
|
-
title:
|
|
11455
|
+
title: Y.name
|
|
11456
11456
|
}, {
|
|
11457
11457
|
default: withCtx(() => [
|
|
11458
|
-
createTextVNode(toDisplayString(
|
|
11458
|
+
createTextVNode(toDisplayString(q.modelValue[Y.property]), 1)
|
|
11459
11459
|
]),
|
|
11460
11460
|
_: 2
|
|
11461
11461
|
}, 1032, ["title"])) : (openBlock(), createBlock(_sfc_main$J, {
|
|
11462
11462
|
key: 1,
|
|
11463
|
-
config:
|
|
11464
|
-
"model-value":
|
|
11463
|
+
config: Y,
|
|
11464
|
+
"model-value": q.modelValue[Y.property],
|
|
11465
11465
|
"onUpdate:modelValue": d
|
|
11466
11466
|
}, null, 8, ["config", "model-value"]))
|
|
11467
11467
|
]),
|
|
@@ -12039,7 +12039,7 @@ function useUpload(i, a = void 0) {
|
|
|
12039
12039
|
} while (H < CHUNK_MAX_RETRY);
|
|
12040
12040
|
return Promise.reject("Unable to upload chunk, max tries exceeded");
|
|
12041
12041
|
};
|
|
12042
|
-
function
|
|
12042
|
+
function q() {
|
|
12043
12043
|
function N() {
|
|
12044
12044
|
if (s = s.slice(-15), s.length > 0) {
|
|
12045
12045
|
const b = Math.ceil(s.reduce((D, O) => D + O) / s.length), T = Math.ceil(r.value * ((100 - o.value) / 100));
|
|
@@ -12065,7 +12065,7 @@ function useUpload(i, a = void 0) {
|
|
|
12065
12065
|
}),
|
|
12066
12066
|
upload: async () => {
|
|
12067
12067
|
var T;
|
|
12068
|
-
a &&
|
|
12068
|
+
a && q();
|
|
12069
12069
|
const N = (T = i.file) == null ? void 0 : T.size;
|
|
12070
12070
|
if (isUndefined$1(N))
|
|
12071
12071
|
return Promise.reject();
|
|
@@ -12153,10 +12153,10 @@ function useAssetSuggestions() {
|
|
|
12153
12153
|
};
|
|
12154
12154
|
}
|
|
12155
12155
|
function defineCached(i, a, e, r = "id") {
|
|
12156
|
-
const o = ref(/* @__PURE__ */ new Map()), s = ref(/* @__PURE__ */ new Set()), n = (...
|
|
12156
|
+
const o = ref(/* @__PURE__ */ new Map()), s = ref(/* @__PURE__ */ new Set()), n = (...Y) => {
|
|
12157
12157
|
const N = /* @__PURE__ */ new Set();
|
|
12158
|
-
for (let b = 0; b <
|
|
12159
|
-
const T =
|
|
12158
|
+
for (let b = 0; b < Y.length; b++) {
|
|
12159
|
+
const T = Y[b];
|
|
12160
12160
|
if (!(isNull(T) || isUndefined$1(T))) {
|
|
12161
12161
|
if (isArray(T)) {
|
|
12162
12162
|
for (let D = 0; D < T.length; D++) {
|
|
@@ -12171,21 +12171,21 @@ function defineCached(i, a, e, r = "id") {
|
|
|
12171
12171
|
N.forEach((b) => {
|
|
12172
12172
|
o.value.set(b, { ...a(b), _loaded: !1 }), s.value.add(b);
|
|
12173
12173
|
});
|
|
12174
|
-
}, l = (
|
|
12175
|
-
|
|
12176
|
-
}, d = (
|
|
12177
|
-
|
|
12178
|
-
}, u = (
|
|
12179
|
-
for (let N = 0; N <
|
|
12180
|
-
o.value.set(
|
|
12181
|
-
}, m = (
|
|
12182
|
-
for (let N = 0; N <
|
|
12183
|
-
s.value.delete(
|
|
12174
|
+
}, l = (Y) => {
|
|
12175
|
+
Y[r] && o.value.set(Y[r], { ...i(Y), _loaded: !0 });
|
|
12176
|
+
}, d = (Y) => {
|
|
12177
|
+
Y[r] && o.value.set(Y[r], { ...Y, _loaded: !0 });
|
|
12178
|
+
}, u = (Y) => {
|
|
12179
|
+
for (let N = 0; N < Y.length; N += 1)
|
|
12180
|
+
o.value.set(Y[N][r], { ...i(Y[N]), _loaded: !0 });
|
|
12181
|
+
}, m = (Y) => {
|
|
12182
|
+
for (let N = 0; N < Y.length; N += 1)
|
|
12183
|
+
s.value.delete(Y[N]);
|
|
12184
12184
|
};
|
|
12185
12185
|
async function c() {
|
|
12186
12186
|
if (s.value.size > 0) {
|
|
12187
|
-
const
|
|
12188
|
-
return m(
|
|
12187
|
+
const Y = Array.from(s.value), N = await e(Y);
|
|
12188
|
+
return m(Y), u(N), N;
|
|
12189
12189
|
}
|
|
12190
12190
|
return [];
|
|
12191
12191
|
}
|
|
@@ -12202,15 +12202,15 @@ function defineCached(i, a, e, r = "id") {
|
|
|
12202
12202
|
add: n,
|
|
12203
12203
|
addManual: l,
|
|
12204
12204
|
addManualMinimal: d,
|
|
12205
|
-
has: (
|
|
12206
|
-
get: (
|
|
12207
|
-
if (
|
|
12208
|
-
return o.value.get(
|
|
12205
|
+
has: (Y) => Y ? o.value.has(Y) : !1,
|
|
12206
|
+
get: (Y) => {
|
|
12207
|
+
if (Y)
|
|
12208
|
+
return o.value.get(Y);
|
|
12209
12209
|
},
|
|
12210
|
-
isLoaded: (
|
|
12211
|
-
if (!
|
|
12210
|
+
isLoaded: (Y) => {
|
|
12211
|
+
if (!Y)
|
|
12212
12212
|
return !1;
|
|
12213
|
-
const N = o.value.get(
|
|
12213
|
+
const N = o.value.get(Y);
|
|
12214
12214
|
return N ? N._loaded : !1;
|
|
12215
12215
|
}
|
|
12216
12216
|
};
|
|
@@ -12303,7 +12303,7 @@ const generateByIdsApiQuery = (i, a) => {
|
|
|
12303
12303
|
l((v) => {
|
|
12304
12304
|
switch (v.name) {
|
|
12305
12305
|
case DamNotificationName.AssetFileProcessed:
|
|
12306
|
-
|
|
12306
|
+
Y(v.data.asset);
|
|
12307
12307
|
break;
|
|
12308
12308
|
case DamNotificationName.AssetFileFailed:
|
|
12309
12309
|
b(v.data.asset, v.data.failReason);
|
|
@@ -12365,9 +12365,9 @@ const generateByIdsApiQuery = (i, a) => {
|
|
|
12365
12365
|
const X = p(v, UploadQueueItemStatus.Waiting);
|
|
12366
12366
|
if (!(X.length === 0 || p(v, UploadQueueItemStatus.Uploading).length === QUEUE_MAX_PARALLEL_UPLOADS))
|
|
12367
12367
|
for (let E = 0; E < QUEUE_MAX_PARALLEL_UPLOADS; E++)
|
|
12368
|
-
X[E] &&
|
|
12368
|
+
X[E] && q(X[E], v);
|
|
12369
12369
|
}
|
|
12370
|
-
async function
|
|
12370
|
+
async function q(v, X) {
|
|
12371
12371
|
const { upload: S, uploadInit: E } = useUpload(v, (K, R, Q) => {
|
|
12372
12372
|
$(v, K, R, Q);
|
|
12373
12373
|
});
|
|
@@ -12380,7 +12380,7 @@ const generateByIdsApiQuery = (i, a) => {
|
|
|
12380
12380
|
function $(v, X, S, E) {
|
|
12381
12381
|
v.progress.progressPercent = X, v.progress.remainingTime = E, v.progress.speed = S;
|
|
12382
12382
|
}
|
|
12383
|
-
async function
|
|
12383
|
+
async function Y(v) {
|
|
12384
12384
|
try {
|
|
12385
12385
|
const X = await fetchAsset(n, v);
|
|
12386
12386
|
if (!X)
|
|
@@ -12504,7 +12504,7 @@ const generateByIdsApiQuery = (i, a) => {
|
|
|
12504
12504
|
getQueue: d,
|
|
12505
12505
|
getQueueItems: u,
|
|
12506
12506
|
addByFiles: m,
|
|
12507
|
-
queueItemProcessed:
|
|
12507
|
+
queueItemProcessed: Y,
|
|
12508
12508
|
queueItemDuplicate: N,
|
|
12509
12509
|
queueItemFailed: b,
|
|
12510
12510
|
removeByIndex: D,
|
|
@@ -13767,7 +13767,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
13767
13767
|
l.value = n(s.damConfigExtSystem, !0), l.value.name = e.initialValue, d.value = !0;
|
|
13768
13768
|
}, c = () => {
|
|
13769
13769
|
d.value = !1;
|
|
13770
|
-
}, { v$: f } = useAuthorValidation(l, e.validationScope), { t: V } = useI18n(), { showValidationError: p, showRecordWas: g, showErrorsDefault:
|
|
13770
|
+
}, { v$: f } = useAuthorValidation(l, e.validationScope), { t: V } = useI18n(), { showValidationError: p, showRecordWas: g, showErrorsDefault: q } = useAlerts(), $ = async () => {
|
|
13771
13771
|
if (!u.value)
|
|
13772
13772
|
try {
|
|
13773
13773
|
if (u.value = !0, f.value.$touch(), f.value.$invalid) {
|
|
@@ -13777,11 +13777,11 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
13777
13777
|
const N = await createAuthor(o, l.value);
|
|
13778
13778
|
r("onSuccess", N), g("created"), d.value = !1, !isUndefined$1(N.id) && e.disableRedirect;
|
|
13779
13779
|
} catch (N) {
|
|
13780
|
-
|
|
13780
|
+
q(N);
|
|
13781
13781
|
} finally {
|
|
13782
13782
|
u.value = !1;
|
|
13783
13783
|
}
|
|
13784
|
-
}, { authorTypeOptions:
|
|
13784
|
+
}, { authorTypeOptions: Y } = useAuthorType();
|
|
13785
13785
|
return (N, b) => {
|
|
13786
13786
|
const T = resolveComponent("ABtnPrimary"), D = resolveComponent("ABtnTertiary");
|
|
13787
13787
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -13879,7 +13879,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
13879
13879
|
modelValue: l.value.type,
|
|
13880
13880
|
"onUpdate:modelValue": b[2] || (b[2] = (O) => l.value.type = O),
|
|
13881
13881
|
label: unref(V)("common.damImage.author.model.type"),
|
|
13882
|
-
items: unref(
|
|
13882
|
+
items: unref(Y),
|
|
13883
13883
|
"data-cy": "author-type",
|
|
13884
13884
|
onKeyup: withKeys($, ["enter"])
|
|
13885
13885
|
}, null, 8, ["modelValue", "label", "items"])
|
|
@@ -13949,27 +13949,27 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
13949
13949
|
get() {
|
|
13950
13950
|
return e.modelValue;
|
|
13951
13951
|
},
|
|
13952
|
-
set(
|
|
13953
|
-
r("update:modelValue", [...
|
|
13952
|
+
set(Y) {
|
|
13953
|
+
r("update:modelValue", [...Y]);
|
|
13954
13954
|
}
|
|
13955
13955
|
}), { t: s } = useI18n(), n = computed(() => !!e.required), { requiredIf: l } = useValidate(), d = {
|
|
13956
13956
|
modelValueComputed: {
|
|
13957
13957
|
// eslint-disable-next-line vue/no-ref-object-reactivity-loss
|
|
13958
13958
|
required: l(n.value)
|
|
13959
13959
|
}
|
|
13960
|
-
}, u = useVuelidate(d, { modelValueComputed: o }, { $scope: e.validationScope }), { fetchItemsMinimal: m } = useAuthorSelectActions(), c = useAuthorFilter(), f = async (
|
|
13961
|
-
|
|
13962
|
-
}, V = ref(""), p = (
|
|
13963
|
-
|
|
13964
|
-
}, { addManualToCachedAuthors: g } = useDamCachedAuthors(),
|
|
13965
|
-
if (g(
|
|
13966
|
-
o.value = [...o.value,
|
|
13960
|
+
}, u = useVuelidate(d, { modelValueComputed: o }, { $scope: e.validationScope }), { fetchItemsMinimal: m } = useAuthorSelectActions(), c = useAuthorFilter(), f = async (Y) => {
|
|
13961
|
+
Y && (o.value.includes(Y) || (o.value = [...o.value, Y]));
|
|
13962
|
+
}, V = ref(""), p = (Y) => {
|
|
13963
|
+
Y.length > 0 && (V.value = Y);
|
|
13964
|
+
}, { addManualToCachedAuthors: g } = useDamCachedAuthors(), q = (Y) => {
|
|
13965
|
+
if (g(Y), isArray(o.value)) {
|
|
13966
|
+
o.value = [...o.value, Y.id];
|
|
13967
13967
|
return;
|
|
13968
13968
|
}
|
|
13969
|
-
o.value =
|
|
13970
|
-
}, $ = (
|
|
13969
|
+
o.value = Y.id;
|
|
13970
|
+
}, $ = (Y) => isArray(o.value) ? o.value.includes(Y) : o.value ? o.value === Y : !1;
|
|
13971
13971
|
return onMounted(() => {
|
|
13972
|
-
}), (
|
|
13972
|
+
}), (Y, N) => (openBlock(), createElementBlock(Fragment, null, [
|
|
13973
13973
|
createElementVNode("div", _hoisted_1$m, [
|
|
13974
13974
|
createVNode(_sfc_main$11, {
|
|
13975
13975
|
modelValue: o.value,
|
|
@@ -13977,14 +13977,14 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
13977
13977
|
"use-cached": unref(useDamCachedAuthorsForRemoteAutocomplete),
|
|
13978
13978
|
v: unref(u),
|
|
13979
13979
|
required: n.value,
|
|
13980
|
-
label:
|
|
13980
|
+
label: Y.label,
|
|
13981
13981
|
"fetch-items-minimal": unref(m),
|
|
13982
13982
|
"inner-filter": unref(c),
|
|
13983
|
-
multiple:
|
|
13984
|
-
clearable:
|
|
13983
|
+
multiple: Y.multiple,
|
|
13984
|
+
clearable: Y.clearable,
|
|
13985
13985
|
"filter-by-field": "text",
|
|
13986
13986
|
"filter-sort-by": null,
|
|
13987
|
-
"data-cy":
|
|
13987
|
+
"data-cy": Y.dataCy,
|
|
13988
13988
|
"item-title": "name",
|
|
13989
13989
|
"item-value": "id",
|
|
13990
13990
|
onSearchChange: p
|
|
@@ -13998,14 +13998,14 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
13998
13998
|
(openBlock(), createBlock(_sfc_main$u, {
|
|
13999
13999
|
id: T.value,
|
|
14000
14000
|
key: T.value,
|
|
14001
|
-
"queue-id":
|
|
14001
|
+
"queue-id": Y.queueId,
|
|
14002
14002
|
title: T.title,
|
|
14003
14003
|
"text-only": ""
|
|
14004
14004
|
}, null, 8, ["id", "queue-id", "title"]))
|
|
14005
14005
|
]),
|
|
14006
14006
|
_: 2
|
|
14007
14007
|
}, [
|
|
14008
|
-
|
|
14008
|
+
Y.multiple ? {
|
|
14009
14009
|
name: "prepend",
|
|
14010
14010
|
fn: withCtx(() => [
|
|
14011
14011
|
createVNode(VCheckboxBtn, {
|
|
@@ -14021,7 +14021,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
14021
14021
|
(openBlock(), createBlock(_sfc_main$u, {
|
|
14022
14022
|
id: b.value,
|
|
14023
14023
|
key: b.value,
|
|
14024
|
-
"queue-id":
|
|
14024
|
+
"queue-id": Y.queueId,
|
|
14025
14025
|
title: b.title,
|
|
14026
14026
|
"force-rounded": ""
|
|
14027
14027
|
}, null, 8, ["id", "queue-id", "title"]))
|
|
@@ -14034,17 +14034,17 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
14034
14034
|
"data-cy": "add-author",
|
|
14035
14035
|
"initial-value": V.value,
|
|
14036
14036
|
"disable-redirect": "",
|
|
14037
|
-
disabled:
|
|
14038
|
-
onOnSuccess:
|
|
14037
|
+
disabled: Y.disabled,
|
|
14038
|
+
onOnSuccess: q
|
|
14039
14039
|
}, null, 8, ["initial-value", "disabled"])
|
|
14040
14040
|
])
|
|
14041
14041
|
]),
|
|
14042
|
-
!
|
|
14042
|
+
!Y.disabled && Y.authorConflicts && Y.authorConflicts.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
|
|
14043
14043
|
createElementVNode("div", null, [
|
|
14044
14044
|
createElementVNode("span", _hoisted_3$e, toDisplayString(unref(s)("common.damImage.author.conflicts")), 1)
|
|
14045
14045
|
]),
|
|
14046
14046
|
createElementVNode("div", null, [
|
|
14047
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
14047
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(Y.authorConflicts, (b) => (openBlock(), createBlock(_sfc_main$t, {
|
|
14048
14048
|
id: b,
|
|
14049
14049
|
key: b,
|
|
14050
14050
|
class: "mr-1 mt-1",
|
|
@@ -14220,42 +14220,42 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14220
14220
|
l.value = n(s.damConfigExtSystem, !0), l.value.name = e.initialValue, d.value = !0;
|
|
14221
14221
|
}, c = () => {
|
|
14222
14222
|
d.value = !1;
|
|
14223
|
-
}, { v$: f } = useKeywordValidation(l, e.validationScope), { t: V } = useI18n(), { showValidationError: p, showRecordWas: g, showErrorsDefault:
|
|
14223
|
+
}, { v$: f } = useKeywordValidation(l, e.validationScope), { t: V } = useI18n(), { showValidationError: p, showRecordWas: g, showErrorsDefault: q } = useAlerts(), $ = async () => {
|
|
14224
14224
|
if (!u.value)
|
|
14225
14225
|
try {
|
|
14226
14226
|
if (u.value = !0, f.value.$touch(), f.value.$invalid) {
|
|
14227
14227
|
p(), u.value = !1;
|
|
14228
14228
|
return;
|
|
14229
14229
|
}
|
|
14230
|
-
const
|
|
14231
|
-
r("onSuccess",
|
|
14232
|
-
} catch (
|
|
14233
|
-
|
|
14230
|
+
const Y = await createKeyword(o, l.value);
|
|
14231
|
+
r("onSuccess", Y), g("created"), d.value = !1, !isUndefined$1(Y.id) && e.disableRedirect;
|
|
14232
|
+
} catch (Y) {
|
|
14233
|
+
q(Y);
|
|
14234
14234
|
} finally {
|
|
14235
14235
|
u.value = !1;
|
|
14236
14236
|
}
|
|
14237
14237
|
};
|
|
14238
|
-
return (
|
|
14238
|
+
return (Y, N) => {
|
|
14239
14239
|
const b = resolveComponent("ABtnPrimary"), T = resolveComponent("ABtnTertiary");
|
|
14240
14240
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
14241
|
-
|
|
14241
|
+
Y.variant === "button" ? (openBlock(), createBlock(b, {
|
|
14242
14242
|
key: 0,
|
|
14243
|
-
class: normalizeClass(
|
|
14244
|
-
"data-cy":
|
|
14245
|
-
disabled:
|
|
14243
|
+
class: normalizeClass(Y.buttonClass),
|
|
14244
|
+
"data-cy": Y.dataCy,
|
|
14245
|
+
disabled: Y.disabled,
|
|
14246
14246
|
rounded: "pill",
|
|
14247
14247
|
onClick: withModifiers(m, ["stop"])
|
|
14248
14248
|
}, {
|
|
14249
14249
|
default: withCtx(() => [
|
|
14250
|
-
createTextVNode(toDisplayString(unref(V)(
|
|
14250
|
+
createTextVNode(toDisplayString(unref(V)(Y.buttonT)), 1)
|
|
14251
14251
|
]),
|
|
14252
14252
|
_: 1
|
|
14253
14253
|
}, 8, ["class", "data-cy", "disabled"])) : (openBlock(), createBlock(VBtn, {
|
|
14254
14254
|
key: 1,
|
|
14255
|
-
class: normalizeClass(
|
|
14256
|
-
"data-cy":
|
|
14255
|
+
class: normalizeClass(Y.buttonClass),
|
|
14256
|
+
"data-cy": Y.dataCy,
|
|
14257
14257
|
icon: "",
|
|
14258
|
-
disabled:
|
|
14258
|
+
disabled: Y.disabled,
|
|
14259
14259
|
variant: "text",
|
|
14260
14260
|
size: "small",
|
|
14261
14261
|
onClick: withModifiers(m, ["stop"])
|
|
@@ -14337,7 +14337,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14337
14337
|
onClick: withModifiers($, ["stop"])
|
|
14338
14338
|
}, {
|
|
14339
14339
|
default: withCtx(() => [
|
|
14340
|
-
createTextVNode(toDisplayString(unref(V)(
|
|
14340
|
+
createTextVNode(toDisplayString(unref(V)(Y.buttonT)), 1)
|
|
14341
14341
|
]),
|
|
14342
14342
|
_: 1
|
|
14343
14343
|
}, 8, ["loading"])
|
|
@@ -14372,43 +14372,43 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14372
14372
|
get() {
|
|
14373
14373
|
return e.modelValue;
|
|
14374
14374
|
},
|
|
14375
|
-
set(
|
|
14376
|
-
r("update:modelValue", [...
|
|
14375
|
+
set(q) {
|
|
14376
|
+
r("update:modelValue", [...q]);
|
|
14377
14377
|
}
|
|
14378
14378
|
}), s = computed(() => !!e.required), { requiredIf: n } = useValidate(), l = {
|
|
14379
14379
|
modelValueComputed: {
|
|
14380
14380
|
required: n(s)
|
|
14381
14381
|
}
|
|
14382
|
-
}, d = useVuelidate(l, { modelValueComputed: o }, { $scope: e.validationScope }), { fetchItemsMinimal: u } = useKeywordSelectActions(), m = useKeywordFilter(), c = ref(""), f = (
|
|
14383
|
-
|
|
14384
|
-
}, { addManualToCachedKeywords: V } = useDamCachedKeywords(), p = (
|
|
14385
|
-
if (V(
|
|
14386
|
-
o.value = [...o.value,
|
|
14382
|
+
}, d = useVuelidate(l, { modelValueComputed: o }, { $scope: e.validationScope }), { fetchItemsMinimal: u } = useKeywordSelectActions(), m = useKeywordFilter(), c = ref(""), f = (q) => {
|
|
14383
|
+
q.length > 0 && (c.value = q);
|
|
14384
|
+
}, { addManualToCachedKeywords: V } = useDamCachedKeywords(), p = (q) => {
|
|
14385
|
+
if (V(q), isArray(o.value)) {
|
|
14386
|
+
o.value = [...o.value, q.id];
|
|
14387
14387
|
return;
|
|
14388
14388
|
}
|
|
14389
|
-
o.value =
|
|
14390
|
-
}, g = (
|
|
14391
|
-
return (
|
|
14389
|
+
o.value = q.id;
|
|
14390
|
+
}, g = (q) => isArray(o.value) ? o.value.includes(q) : o.value ? o.value === q : !1;
|
|
14391
|
+
return (q, $) => (openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
14392
14392
|
createVNode(_sfc_main$11, {
|
|
14393
14393
|
modelValue: o.value,
|
|
14394
|
-
"onUpdate:modelValue": $[1] || ($[1] = (
|
|
14394
|
+
"onUpdate:modelValue": $[1] || ($[1] = (Y) => o.value = Y),
|
|
14395
14395
|
"use-cached": unref(useDamCachedAuthorsForRemoteAutocomplete),
|
|
14396
14396
|
v: unref(d),
|
|
14397
14397
|
required: s.value,
|
|
14398
|
-
label:
|
|
14398
|
+
label: q.label,
|
|
14399
14399
|
"fetch-items-minimal": unref(u),
|
|
14400
14400
|
"inner-filter": unref(m),
|
|
14401
|
-
multiple:
|
|
14402
|
-
clearable:
|
|
14401
|
+
multiple: q.multiple,
|
|
14402
|
+
clearable: q.clearable,
|
|
14403
14403
|
"filter-by-field": "text",
|
|
14404
14404
|
"filter-sort-by": null,
|
|
14405
14405
|
"item-title": "name",
|
|
14406
14406
|
"item-value": "id",
|
|
14407
|
-
"data-cy":
|
|
14407
|
+
"data-cy": q.dataCy,
|
|
14408
14408
|
onSearchChange: f
|
|
14409
14409
|
}, {
|
|
14410
|
-
item: withCtx(({ props:
|
|
14411
|
-
createVNode(VListItem, mergeProps(
|
|
14410
|
+
item: withCtx(({ props: Y, item: N }) => [
|
|
14411
|
+
createVNode(VListItem, mergeProps(Y, {
|
|
14412
14412
|
onClick: $[0] || ($[0] = withModifiers(() => {
|
|
14413
14413
|
}, ["prevent"]))
|
|
14414
14414
|
}), createSlots({
|
|
@@ -14416,14 +14416,14 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14416
14416
|
(openBlock(), createBlock(_sfc_main$q, {
|
|
14417
14417
|
id: N.value,
|
|
14418
14418
|
key: N.value,
|
|
14419
|
-
"queue-id":
|
|
14419
|
+
"queue-id": q.queueId,
|
|
14420
14420
|
title: N.title,
|
|
14421
14421
|
"text-only": ""
|
|
14422
14422
|
}, null, 8, ["id", "queue-id", "title"]))
|
|
14423
14423
|
]),
|
|
14424
14424
|
_: 2
|
|
14425
14425
|
}, [
|
|
14426
|
-
|
|
14426
|
+
q.multiple ? {
|
|
14427
14427
|
name: "prepend",
|
|
14428
14428
|
fn: withCtx(() => [
|
|
14429
14429
|
createVNode(VCheckboxBtn, {
|
|
@@ -14435,12 +14435,12 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14435
14435
|
} : void 0
|
|
14436
14436
|
]), 1040)
|
|
14437
14437
|
]),
|
|
14438
|
-
chip: withCtx(({ item:
|
|
14438
|
+
chip: withCtx(({ item: Y }) => [
|
|
14439
14439
|
(openBlock(), createBlock(_sfc_main$q, {
|
|
14440
|
-
id:
|
|
14441
|
-
key:
|
|
14442
|
-
"queue-id":
|
|
14443
|
-
title:
|
|
14440
|
+
id: Y.value,
|
|
14441
|
+
key: Y.value,
|
|
14442
|
+
"queue-id": q.queueId,
|
|
14443
|
+
title: Y.title,
|
|
14444
14444
|
"force-rounded": ""
|
|
14445
14445
|
}, null, 8, ["id", "queue-id", "title"]))
|
|
14446
14446
|
]),
|
|
@@ -14452,7 +14452,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14452
14452
|
"data-cy": "add-keyword",
|
|
14453
14453
|
"initial-value": c.value,
|
|
14454
14454
|
"disable-redirect": "",
|
|
14455
|
-
disabled:
|
|
14455
|
+
disabled: q.disabled,
|
|
14456
14456
|
onOnSuccess: p
|
|
14457
14457
|
}, null, 8, ["initial-value", "disabled"])
|
|
14458
14458
|
])
|
|
@@ -15489,7 +15489,7 @@ function getRotatedSizes(i) {
|
|
|
15489
15489
|
};
|
|
15490
15490
|
}
|
|
15491
15491
|
function getSourceCanvas(i, a, e, r) {
|
|
15492
|
-
var o = a.aspectRatio, s = a.naturalWidth, n = a.naturalHeight, l = a.rotate, d = l === void 0 ? 0 : l, u = a.scaleX, m = u === void 0 ? 1 : u, c = a.scaleY, f = c === void 0 ? 1 : c, V = e.aspectRatio, p = e.naturalWidth, g = e.naturalHeight,
|
|
15492
|
+
var o = a.aspectRatio, s = a.naturalWidth, n = a.naturalHeight, l = a.rotate, d = l === void 0 ? 0 : l, u = a.scaleX, m = u === void 0 ? 1 : u, c = a.scaleY, f = c === void 0 ? 1 : c, V = e.aspectRatio, p = e.naturalWidth, g = e.naturalHeight, q = r.fillColor, $ = q === void 0 ? "transparent" : q, Y = r.imageSmoothingEnabled, N = Y === void 0 ? !0 : Y, b = r.imageSmoothingQuality, T = b === void 0 ? "low" : b, D = r.maxWidth, O = D === void 0 ? 1 / 0 : D, H = r.maxHeight, U = H === void 0 ? 1 / 0 : H, W = r.minWidth, M = W === void 0 ? 0 : W, z = r.minHeight, I = z === void 0 ? 0 : z, C = document.createElement("canvas"), y = C.getContext("2d"), v = getAdjustedSizes({
|
|
15493
15493
|
aspectRatio: V,
|
|
15494
15494
|
width: O,
|
|
15495
15495
|
height: U
|
|
@@ -15738,16 +15738,16 @@ var render = {
|
|
|
15738
15738
|
translateX: -d,
|
|
15739
15739
|
translateY: -u
|
|
15740
15740
|
}, a)))), forEach(this.previews, function(m) {
|
|
15741
|
-
var c = getData(m, DATA_PREVIEW), f = c.width, V = c.height, p = f, g = V,
|
|
15742
|
-
o && (
|
|
15741
|
+
var c = getData(m, DATA_PREVIEW), f = c.width, V = c.height, p = f, g = V, q = 1;
|
|
15742
|
+
o && (q = f / o, g = s * q), s && g > V && (q = V / s, p = o * q, g = V), setStyle(m, {
|
|
15743
15743
|
width: p,
|
|
15744
15744
|
height: g
|
|
15745
15745
|
}), setStyle(m.getElementsByTagName("img")[0], assign({
|
|
15746
|
-
width: n *
|
|
15747
|
-
height: l *
|
|
15746
|
+
width: n * q,
|
|
15747
|
+
height: l * q
|
|
15748
15748
|
}, getTransforms(assign({
|
|
15749
|
-
translateX: -d *
|
|
15750
|
-
translateY: -u *
|
|
15749
|
+
translateX: -d * q,
|
|
15750
|
+
translateY: -u * q
|
|
15751
15751
|
}, a))));
|
|
15752
15752
|
}));
|
|
15753
15753
|
}
|
|
@@ -15827,8 +15827,8 @@ var render = {
|
|
|
15827
15827
|
}
|
|
15828
15828
|
}, change = {
|
|
15829
15829
|
change: function i(a) {
|
|
15830
|
-
var e = this.options, r = this.canvasData, o = this.containerData, s = this.cropBoxData, n = this.pointers, l = this.action, d = e.aspectRatio, u = s.left, m = s.top, c = s.width, f = s.height, V = u + c, p = m + f, g = 0,
|
|
15831
|
-
!d && a.shiftKey && (d = c && f ? c / f : 1), this.limited && (g = s.minLeft,
|
|
15830
|
+
var e = this.options, r = this.canvasData, o = this.containerData, s = this.cropBoxData, n = this.pointers, l = this.action, d = e.aspectRatio, u = s.left, m = s.top, c = s.width, f = s.height, V = u + c, p = m + f, g = 0, q = 0, $ = o.width, Y = o.height, N = !0, b;
|
|
15831
|
+
!d && a.shiftKey && (d = c && f ? c / f : 1), this.limited && (g = s.minLeft, q = s.minTop, $ = g + Math.min(o.width, r.width, r.left + r.width), Y = q + Math.min(o.height, r.height, r.top + r.height));
|
|
15832
15832
|
var T = n[Object.keys(n)[0]], D = {
|
|
15833
15833
|
x: T.endX - T.startX,
|
|
15834
15834
|
y: T.endY - T.startY
|
|
@@ -15841,10 +15841,10 @@ var render = {
|
|
|
15841
15841
|
u + D.x < g && (D.x = g - u);
|
|
15842
15842
|
break;
|
|
15843
15843
|
case ACTION_NORTH:
|
|
15844
|
-
m + D.y <
|
|
15844
|
+
m + D.y < q && (D.y = q - m);
|
|
15845
15845
|
break;
|
|
15846
15846
|
case ACTION_SOUTH:
|
|
15847
|
-
p + D.y >
|
|
15847
|
+
p + D.y > Y && (D.y = Y - p);
|
|
15848
15848
|
break;
|
|
15849
15849
|
}
|
|
15850
15850
|
};
|
|
@@ -15853,28 +15853,28 @@ var render = {
|
|
|
15853
15853
|
u += D.x, m += D.y;
|
|
15854
15854
|
break;
|
|
15855
15855
|
case ACTION_EAST:
|
|
15856
|
-
if (D.x >= 0 && (V >= $ || d && (m <=
|
|
15856
|
+
if (D.x >= 0 && (V >= $ || d && (m <= q || p >= Y))) {
|
|
15857
15857
|
N = !1;
|
|
15858
15858
|
break;
|
|
15859
15859
|
}
|
|
15860
15860
|
O(ACTION_EAST), c += D.x, c < 0 && (l = ACTION_WEST, c = -c, u -= c), d && (f = c / d, m += (s.height - f) / 2);
|
|
15861
15861
|
break;
|
|
15862
15862
|
case ACTION_NORTH:
|
|
15863
|
-
if (D.y <= 0 && (m <=
|
|
15863
|
+
if (D.y <= 0 && (m <= q || d && (u <= g || V >= $))) {
|
|
15864
15864
|
N = !1;
|
|
15865
15865
|
break;
|
|
15866
15866
|
}
|
|
15867
15867
|
O(ACTION_NORTH), f -= D.y, m += D.y, f < 0 && (l = ACTION_SOUTH, f = -f, m -= f), d && (c = f * d, u += (s.width - c) / 2);
|
|
15868
15868
|
break;
|
|
15869
15869
|
case ACTION_WEST:
|
|
15870
|
-
if (D.x <= 0 && (u <= g || d && (m <=
|
|
15870
|
+
if (D.x <= 0 && (u <= g || d && (m <= q || p >= Y))) {
|
|
15871
15871
|
N = !1;
|
|
15872
15872
|
break;
|
|
15873
15873
|
}
|
|
15874
15874
|
O(ACTION_WEST), c -= D.x, u += D.x, c < 0 && (l = ACTION_EAST, c = -c, u -= c), d && (f = c / d, m += (s.height - f) / 2);
|
|
15875
15875
|
break;
|
|
15876
15876
|
case ACTION_SOUTH:
|
|
15877
|
-
if (D.y >= 0 && (p >=
|
|
15877
|
+
if (D.y >= 0 && (p >= Y || d && (u <= g || V >= $))) {
|
|
15878
15878
|
N = !1;
|
|
15879
15879
|
break;
|
|
15880
15880
|
}
|
|
@@ -15882,46 +15882,46 @@ var render = {
|
|
|
15882
15882
|
break;
|
|
15883
15883
|
case ACTION_NORTH_EAST:
|
|
15884
15884
|
if (d) {
|
|
15885
|
-
if (D.y <= 0 && (m <=
|
|
15885
|
+
if (D.y <= 0 && (m <= q || V >= $)) {
|
|
15886
15886
|
N = !1;
|
|
15887
15887
|
break;
|
|
15888
15888
|
}
|
|
15889
15889
|
O(ACTION_NORTH), f -= D.y, m += D.y, c = f * d;
|
|
15890
15890
|
} else
|
|
15891
|
-
O(ACTION_NORTH), O(ACTION_EAST), D.x >= 0 ? V < $ ? c += D.x : D.y <= 0 && m <=
|
|
15891
|
+
O(ACTION_NORTH), O(ACTION_EAST), D.x >= 0 ? V < $ ? c += D.x : D.y <= 0 && m <= q && (N = !1) : c += D.x, D.y <= 0 ? m > q && (f -= D.y, m += D.y) : (f -= D.y, m += D.y);
|
|
15892
15892
|
c < 0 && f < 0 ? (l = ACTION_SOUTH_WEST, f = -f, c = -c, m -= f, u -= c) : c < 0 ? (l = ACTION_NORTH_WEST, c = -c, u -= c) : f < 0 && (l = ACTION_SOUTH_EAST, f = -f, m -= f);
|
|
15893
15893
|
break;
|
|
15894
15894
|
case ACTION_NORTH_WEST:
|
|
15895
15895
|
if (d) {
|
|
15896
|
-
if (D.y <= 0 && (m <=
|
|
15896
|
+
if (D.y <= 0 && (m <= q || u <= g)) {
|
|
15897
15897
|
N = !1;
|
|
15898
15898
|
break;
|
|
15899
15899
|
}
|
|
15900
15900
|
O(ACTION_NORTH), f -= D.y, m += D.y, c = f * d, u += s.width - c;
|
|
15901
15901
|
} else
|
|
15902
|
-
O(ACTION_NORTH), O(ACTION_WEST), D.x <= 0 ? u > g ? (c -= D.x, u += D.x) : D.y <= 0 && m <=
|
|
15902
|
+
O(ACTION_NORTH), O(ACTION_WEST), D.x <= 0 ? u > g ? (c -= D.x, u += D.x) : D.y <= 0 && m <= q && (N = !1) : (c -= D.x, u += D.x), D.y <= 0 ? m > q && (f -= D.y, m += D.y) : (f -= D.y, m += D.y);
|
|
15903
15903
|
c < 0 && f < 0 ? (l = ACTION_SOUTH_EAST, f = -f, c = -c, m -= f, u -= c) : c < 0 ? (l = ACTION_NORTH_EAST, c = -c, u -= c) : f < 0 && (l = ACTION_SOUTH_WEST, f = -f, m -= f);
|
|
15904
15904
|
break;
|
|
15905
15905
|
case ACTION_SOUTH_WEST:
|
|
15906
15906
|
if (d) {
|
|
15907
|
-
if (D.x <= 0 && (u <= g || p >=
|
|
15907
|
+
if (D.x <= 0 && (u <= g || p >= Y)) {
|
|
15908
15908
|
N = !1;
|
|
15909
15909
|
break;
|
|
15910
15910
|
}
|
|
15911
15911
|
O(ACTION_WEST), c -= D.x, u += D.x, f = c / d;
|
|
15912
15912
|
} else
|
|
15913
|
-
O(ACTION_SOUTH), O(ACTION_WEST), D.x <= 0 ? u > g ? (c -= D.x, u += D.x) : D.y >= 0 && p >=
|
|
15913
|
+
O(ACTION_SOUTH), O(ACTION_WEST), D.x <= 0 ? u > g ? (c -= D.x, u += D.x) : D.y >= 0 && p >= Y && (N = !1) : (c -= D.x, u += D.x), D.y >= 0 ? p < Y && (f += D.y) : f += D.y;
|
|
15914
15914
|
c < 0 && f < 0 ? (l = ACTION_NORTH_EAST, f = -f, c = -c, m -= f, u -= c) : c < 0 ? (l = ACTION_SOUTH_EAST, c = -c, u -= c) : f < 0 && (l = ACTION_NORTH_WEST, f = -f, m -= f);
|
|
15915
15915
|
break;
|
|
15916
15916
|
case ACTION_SOUTH_EAST:
|
|
15917
15917
|
if (d) {
|
|
15918
|
-
if (D.x >= 0 && (V >= $ || p >=
|
|
15918
|
+
if (D.x >= 0 && (V >= $ || p >= Y)) {
|
|
15919
15919
|
N = !1;
|
|
15920
15920
|
break;
|
|
15921
15921
|
}
|
|
15922
15922
|
O(ACTION_EAST), c += D.x, f = c / d;
|
|
15923
15923
|
} else
|
|
15924
|
-
O(ACTION_SOUTH), O(ACTION_EAST), D.x >= 0 ? V < $ ? c += D.x : D.y >= 0 && p >=
|
|
15924
|
+
O(ACTION_SOUTH), O(ACTION_EAST), D.x >= 0 ? V < $ ? c += D.x : D.y >= 0 && p >= Y && (N = !1) : c += D.x, D.y >= 0 ? p < Y && (f += D.y) : f += D.y;
|
|
15925
15925
|
c < 0 && f < 0 ? (l = ACTION_NORTH_WEST, f = -f, c = -c, m -= f, u -= c) : c < 0 ? (l = ACTION_SOUTH_WEST, c = -c, u -= c) : f < 0 && (l = ACTION_NORTH_EAST, f = -f, m -= f);
|
|
15926
15926
|
break;
|
|
15927
15927
|
case ACTION_MOVE:
|
|
@@ -16219,9 +16219,9 @@ var render = {
|
|
|
16219
16219
|
height: a.height || (u !== 1 ? r.height : d)
|
|
16220
16220
|
}), p = V.width, g = V.height;
|
|
16221
16221
|
p = Math.min(c.width, Math.max(f.width, p)), g = Math.min(c.height, Math.max(f.height, g));
|
|
16222
|
-
var
|
|
16223
|
-
|
|
16224
|
-
var
|
|
16222
|
+
var q = document.createElement("canvas"), $ = q.getContext("2d");
|
|
16223
|
+
q.width = normalizeDecimalNumber(p), q.height = normalizeDecimalNumber(g), $.fillStyle = a.fillColor || "transparent", $.fillRect(0, 0, p, g);
|
|
16224
|
+
var Y = a.imageSmoothingEnabled, N = Y === void 0 ? !0 : Y, b = a.imageSmoothingQuality;
|
|
16225
16225
|
$.imageSmoothingEnabled = N, b && ($.imageSmoothingQuality = b);
|
|
16226
16226
|
var T = r.width, D = r.height, O = s, H = n, U, W, M, z, I, C;
|
|
16227
16227
|
O <= -l || O > T ? (O = 0, U = 0, M = 0, I = 0) : O <= 0 ? (M = -O, O = 0, U = Math.min(T, l + O), I = U) : O <= T && (M = 0, U = Math.min(l, T - O), I = U), U <= 0 || H <= -d || H > D ? (H = 0, W = 0, z = 0, C = 0) : H <= 0 ? (z = -H, H = 0, W = Math.min(D, d + H), C = W) : H <= D && (z = 0, W = Math.min(d, D - H), C = W);
|
|
@@ -16232,7 +16232,7 @@ var render = {
|
|
|
16232
16232
|
}
|
|
16233
16233
|
return $.drawImage.apply($, [r].concat(_toConsumableArray(y.map(function(X) {
|
|
16234
16234
|
return Math.floor(normalizeDecimalNumber(X));
|
|
16235
|
-
})))),
|
|
16235
|
+
})))), q;
|
|
16236
16236
|
},
|
|
16237
16237
|
/**
|
|
16238
16238
|
* Change the aspect ratio of the crop box.
|
|
@@ -16439,7 +16439,7 @@ const cropper = "", _hoisted_1$e = ["alt", "src"], _sfc_main$h = /* @__PURE__ */
|
|
|
16439
16439
|
crop: { type: [null, Function], default: null },
|
|
16440
16440
|
cropend: { type: [null, Function], default: null },
|
|
16441
16441
|
cropmove: { type: [null, Function], default: null },
|
|
16442
|
-
cropstart: {},
|
|
16442
|
+
cropstart: { type: [null, Function], default: null },
|
|
16443
16443
|
zoom: { type: [null, Function], default: null }
|
|
16444
16444
|
},
|
|
16445
16445
|
setup(i, { expose: a }) {
|
|
@@ -16470,11 +16470,11 @@ const cropper = "", _hoisted_1$e = ["alt", "src"], _sfc_main$h = /* @__PURE__ */
|
|
|
16470
16470
|
return (V = r.value) == null ? void 0 : V.setData(f);
|
|
16471
16471
|
}
|
|
16472
16472
|
}), onMounted(() => {
|
|
16473
|
-
const { containerStyle: f, src: V, alt: p, imgStyle: g, ...
|
|
16474
|
-
for (const N in
|
|
16475
|
-
Object.prototype.hasOwnProperty.call($, N) && $[N] !== void 0 && (
|
|
16473
|
+
const { containerStyle: f, src: V, alt: p, imgStyle: g, ...q } = e, $ = q, Y = {};
|
|
16474
|
+
for (const N in q)
|
|
16475
|
+
Object.prototype.hasOwnProperty.call($, N) && $[N] !== void 0 && (Y[N] = $[N]);
|
|
16476
16476
|
nextTick(() => {
|
|
16477
|
-
isNull(o.value) || (r.value = new Cropper(o.value,
|
|
16477
|
+
isNull(o.value) || (r.value = new Cropper(o.value, Y), s.value = !1);
|
|
16478
16478
|
});
|
|
16479
16479
|
}), onUnmounted(() => {
|
|
16480
16480
|
d();
|
|
@@ -16501,59 +16501,59 @@ const cropper = "", _hoisted_1$e = ["alt", "src"], _sfc_main$h = /* @__PURE__ */
|
|
|
16501
16501
|
}), DAM_IMAGE_ASPECT_RATIO = 16 / 9, _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
16502
16502
|
__name: "AssetImageRoiSelect",
|
|
16503
16503
|
setup(i) {
|
|
16504
|
-
const { showRecordWas: a, showErrorsDefault: e } = useAlerts(), r = { overflow: "hidden", maxHeight: "calc(100vh - 160px)" }, o = useImageRoiStore(), { damClient: s } = useCommonAdminCoreDamOptions(), n = ref(null), l =
|
|
16505
|
-
var
|
|
16506
|
-
return o.imageFile && ((
|
|
16507
|
-
}),
|
|
16504
|
+
const { showRecordWas: a, showErrorsDefault: e } = useAlerts(), r = { overflow: "hidden", maxHeight: "calc(100vh - 160px)" }, o = useImageRoiStore(), { damClient: s } = useCommonAdminCoreDamOptions(), n = ref(null), l = computed(() => {
|
|
16505
|
+
var g;
|
|
16506
|
+
return o.imageFile && ((g = o.imageFile.links) != null && g.image_detail) ? o.imageFile.links.image_detail.url : "";
|
|
16507
|
+
}), d = () => {
|
|
16508
16508
|
n.value && n.value.enable();
|
|
16509
|
-
},
|
|
16509
|
+
}, u = () => {
|
|
16510
16510
|
n.value && n.value.disable();
|
|
16511
|
-
},
|
|
16511
|
+
}, m = () => {
|
|
16512
16512
|
if (n.value && o.roi && o.imageFile) {
|
|
16513
|
-
|
|
16514
|
-
const
|
|
16513
|
+
d();
|
|
16514
|
+
const g = regionToCrop(
|
|
16515
16515
|
n.value,
|
|
16516
16516
|
o.roi,
|
|
16517
16517
|
o.imageFile.imageAttributes.width,
|
|
16518
16518
|
o.imageFile.imageAttributes.height
|
|
16519
16519
|
);
|
|
16520
|
-
n.value.setData(
|
|
16520
|
+
n.value.setData(g), u();
|
|
16521
16521
|
}
|
|
16522
|
-
},
|
|
16522
|
+
}, c = async () => {
|
|
16523
16523
|
if (n.value && o.roi && o.imageFile) {
|
|
16524
|
-
const
|
|
16524
|
+
const g = cropToRegion(
|
|
16525
16525
|
n.value,
|
|
16526
16526
|
o.roi,
|
|
16527
16527
|
o.imageFile.imageAttributes.width,
|
|
16528
16528
|
o.imageFile.imageAttributes.height
|
|
16529
16529
|
);
|
|
16530
16530
|
try {
|
|
16531
|
-
o.showLoader(), await updateRoi(s,
|
|
16531
|
+
o.showLoader(), await updateRoi(s, g.id, g), a("updated"), setTimeout(() => {
|
|
16532
16532
|
o.forceReloadRoiPreviews();
|
|
16533
16533
|
}, 2e3);
|
|
16534
|
-
} catch (
|
|
16535
|
-
e(
|
|
16534
|
+
} catch (q) {
|
|
16535
|
+
e(q);
|
|
16536
16536
|
} finally {
|
|
16537
16537
|
o.hideLoader();
|
|
16538
16538
|
}
|
|
16539
16539
|
}
|
|
16540
|
+
}, f = () => {
|
|
16541
|
+
m(), d();
|
|
16540
16542
|
}, V = () => {
|
|
16541
|
-
|
|
16542
|
-
}, p = () => {
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
var A;
|
|
16546
|
-
return !!(o.imageFile && ((A = o.imageFile.links) != null && A.image_detail) && !o.loader);
|
|
16543
|
+
c();
|
|
16544
|
+
}, p = computed(() => {
|
|
16545
|
+
var g;
|
|
16546
|
+
return !!(o.imageFile && ((g = o.imageFile.links) != null && g.image_detail) && !o.loader);
|
|
16547
16547
|
});
|
|
16548
16548
|
return onUnmounted(() => {
|
|
16549
16549
|
n.value && (n.value.destroy(), n.value = null);
|
|
16550
|
-
}), (
|
|
16550
|
+
}), (g, q) => (openBlock(), createElementBlock(Fragment, null, [
|
|
16551
16551
|
unref(o).loader ? (openBlock(), createBlock(VProgressCircular, {
|
|
16552
16552
|
key: 0,
|
|
16553
16553
|
indeterminate: "",
|
|
16554
16554
|
color: "primary"
|
|
16555
16555
|
})) : createCommentVNode("", !0),
|
|
16556
|
-
|
|
16556
|
+
p.value ? (openBlock(), createBlock(_sfc_main$h, {
|
|
16557
16557
|
key: unref(o).timestampCropper,
|
|
16558
16558
|
ref_key: "cropper",
|
|
16559
16559
|
ref: n,
|
|
@@ -16561,9 +16561,9 @@ const cropper = "", _hoisted_1$e = ["alt", "src"], _sfc_main$h = /* @__PURE__ */
|
|
|
16561
16561
|
background: !1,
|
|
16562
16562
|
"check-cross-origin": !1,
|
|
16563
16563
|
"container-style": r,
|
|
16564
|
-
ready:
|
|
16565
|
-
cropend:
|
|
16566
|
-
src:
|
|
16564
|
+
ready: f,
|
|
16565
|
+
cropend: V,
|
|
16566
|
+
src: l.value,
|
|
16567
16567
|
"view-mode": 1,
|
|
16568
16568
|
"zoom-on-wheel": !1,
|
|
16569
16569
|
canvas: "",
|
|
@@ -16588,7 +16588,7 @@ const cropper = "", _hoisted_1$e = ["alt", "src"], _sfc_main$h = /* @__PURE__ */
|
|
|
16588
16588
|
}, f = computed(() => {
|
|
16589
16589
|
var T;
|
|
16590
16590
|
return ((T = o.value) == null ? void 0 : T.attributes.assetType) || DamAssetType.Default;
|
|
16591
|
-
}), V = computed(() => o.value ? o.value.attributes.assetStatus : DamAssetStatus.Default), p = computed(() => f.value === DamAssetType.Image), g = computed(() => f.value === DamAssetType.Video),
|
|
16591
|
+
}), V = computed(() => o.value ? o.value.attributes.assetStatus : DamAssetStatus.Default), p = computed(() => f.value === DamAssetType.Image), g = computed(() => f.value === DamAssetType.Video), q = computed(() => f.value === DamAssetType.Audio), $ = computed(() => f.value === DamAssetType.Document), Y = computed(() => {
|
|
16592
16592
|
var T;
|
|
16593
16593
|
return (T = o.value) != null && T.mainFile && o.value.mainFile.links && o.value.mainFile.links.image_detail ? {
|
|
16594
16594
|
url: o.value.mainFile.links.image_detail.url,
|
|
@@ -16690,10 +16690,10 @@ const cropper = "", _hoisted_1$e = ["alt", "src"], _sfc_main$h = /* @__PURE__ */
|
|
|
16690
16690
|
createVNode(_sfc_main$B, {
|
|
16691
16691
|
"asset-type": f.value,
|
|
16692
16692
|
"asset-status": V.value,
|
|
16693
|
-
src:
|
|
16694
|
-
"background-color":
|
|
16695
|
-
width:
|
|
16696
|
-
height:
|
|
16693
|
+
src: Y.value.url,
|
|
16694
|
+
"background-color": Y.value.bgColor,
|
|
16695
|
+
width: Y.value.width,
|
|
16696
|
+
height: Y.value.height,
|
|
16697
16697
|
"use-component": "",
|
|
16698
16698
|
onLoad: c,
|
|
16699
16699
|
onError: c
|
|
@@ -16705,7 +16705,7 @@ const cropper = "", _hoisted_1$e = ["alt", "src"], _sfc_main$h = /* @__PURE__ */
|
|
|
16705
16705
|
key: unref(o).id,
|
|
16706
16706
|
"asset-id": unref(o).id,
|
|
16707
16707
|
"is-video": g.value,
|
|
16708
|
-
"is-audio":
|
|
16708
|
+
"is-audio": q.value,
|
|
16709
16709
|
"is-image": p.value,
|
|
16710
16710
|
"is-document": $.value,
|
|
16711
16711
|
"asset-status": V.value,
|
|
@@ -16742,10 +16742,10 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
16742
16742
|
const a = i, { t: e } = useI18n(), r = ref(["metadata", "file"]), o = useAssetDetailStore(), { asset: s, authorConflicts: n, metadataAreTouched: l } = storeToRefs(o), d = useUploadQueuesStore(), u = computed(() => d.getQueueItems(a.queueKey)), m = computed(() => u.value[0] ?? null), c = computed(() => DamAssetType.Image), f = computed(() => c.value === DamAssetType.Image), V = computed(() => s.value && s.value.mainFile ? s.value.mainFile : null), { damConfigExtSystem: p } = useDamConfigState(), g = () => {
|
|
16743
16743
|
l.value = !0;
|
|
16744
16744
|
};
|
|
16745
|
-
return (
|
|
16745
|
+
return (q, $) => m.value ? (openBlock(), createBlock(VExpansionPanels, {
|
|
16746
16746
|
key: 0,
|
|
16747
16747
|
modelValue: r.value,
|
|
16748
|
-
"onUpdate:modelValue": $[3] || ($[3] = (
|
|
16748
|
+
"onUpdate:modelValue": $[3] || ($[3] = (Y) => r.value = Y),
|
|
16749
16749
|
multiple: "",
|
|
16750
16750
|
class: "v-expansion-panels--compact"
|
|
16751
16751
|
}, {
|
|
@@ -16765,7 +16765,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
16765
16765
|
m.value ? (openBlock(), createBlock(_sfc_main$x, {
|
|
16766
16766
|
key: 0,
|
|
16767
16767
|
modelValue: m.value.customData,
|
|
16768
|
-
"onUpdate:modelValue": $[2] || ($[2] = (
|
|
16768
|
+
"onUpdate:modelValue": $[2] || ($[2] = (Y) => m.value.customData = Y),
|
|
16769
16769
|
"asset-type": c.value,
|
|
16770
16770
|
onAnyChange: g
|
|
16771
16771
|
}, {
|
|
@@ -16786,7 +16786,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
16786
16786
|
createVNode(_sfc_main$o, {
|
|
16787
16787
|
modelValue: m.value.keywords,
|
|
16788
16788
|
"onUpdate:modelValue": [
|
|
16789
|
-
$[0] || ($[0] = (
|
|
16789
|
+
$[0] || ($[0] = (Y) => m.value.keywords = Y),
|
|
16790
16790
|
g
|
|
16791
16791
|
],
|
|
16792
16792
|
label: unref(e)("common.damImage.asset.model.keywords"),
|
|
@@ -16822,7 +16822,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
16822
16822
|
createVNode(_sfc_main$r, {
|
|
16823
16823
|
modelValue: m.value.authors,
|
|
16824
16824
|
"onUpdate:modelValue": [
|
|
16825
|
-
$[1] || ($[1] = (
|
|
16825
|
+
$[1] || ($[1] = (Y) => m.value.authors = Y),
|
|
16826
16826
|
g
|
|
16827
16827
|
],
|
|
16828
16828
|
label: unref(e)("common.damImage.asset.model.authors"),
|
|
@@ -17267,20 +17267,20 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17267
17267
|
},
|
|
17268
17268
|
emits: ["onApply"],
|
|
17269
17269
|
setup(i, { emit: a }) {
|
|
17270
|
-
const e = i, r = a, { showErrorsDefault: o, showRecordWas: s } = useAlerts(), { t: n } = useI18n(), { toolbarColor: l } = useTheme(), d = useAssetDetailStore(), { activeTab: u, loading: m, asset: c } = storeToRefs(d), f = ref(!1), V = useUploadQueuesStore(), { uploadQueueDialog: p } = useUploadQueueDialog(), g = computed(() => V.getQueueItems(e.queueKey)),
|
|
17271
|
-
id:
|
|
17270
|
+
const e = i, r = a, { showErrorsDefault: o, showRecordWas: s } = useAlerts(), { t: n } = useI18n(), { toolbarColor: l } = useTheme(), d = useAssetDetailStore(), { activeTab: u, loading: m, asset: c } = storeToRefs(d), f = ref(!1), V = useUploadQueuesStore(), { uploadQueueDialog: p } = useUploadQueueDialog(), g = computed(() => V.getQueueItems(e.queueKey)), q = computed(() => g.value[0] ?? null), $ = computed(() => !q.value || !q.value.assetId ? null : y.value && c.value ? c.value : {
|
|
17271
|
+
id: q.value.assetId,
|
|
17272
17272
|
texts: {
|
|
17273
17273
|
displayTitle: ""
|
|
17274
17274
|
},
|
|
17275
17275
|
attributes: {
|
|
17276
|
-
assetType:
|
|
17277
|
-
assetStatus:
|
|
17276
|
+
assetType: q.value.assetType,
|
|
17277
|
+
assetStatus: q.value.assetStatus
|
|
17278
17278
|
},
|
|
17279
17279
|
flags: {
|
|
17280
17280
|
described: !1,
|
|
17281
17281
|
visible: !1
|
|
17282
17282
|
},
|
|
17283
|
-
licence:
|
|
17283
|
+
licence: q.value.licenceId,
|
|
17284
17284
|
mainFile: null,
|
|
17285
17285
|
keywords: [],
|
|
17286
17286
|
authors: [],
|
|
@@ -17304,18 +17304,18 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17304
17304
|
modifiedAt: dateTimeNow(),
|
|
17305
17305
|
createdBy: null,
|
|
17306
17306
|
modifiedBy: null
|
|
17307
|
-
}),
|
|
17308
|
-
|
|
17307
|
+
}), Y = ref(!0), N = () => {
|
|
17308
|
+
Y.value = !Y.value;
|
|
17309
17309
|
}, b = () => {
|
|
17310
17310
|
}, T = computed(() => {
|
|
17311
17311
|
var J;
|
|
17312
17312
|
return ((J = $.value) == null ? void 0 : J.attributes.assetType) || DamAssetType.Default;
|
|
17313
17313
|
}), D = computed(() => $.value ? $.value.attributes.assetStatus : DamAssetStatus.Default), O = computed(() => T.value === DamAssetType.Image), H = computed(() => T.value === DamAssetType.Video), U = computed(() => T.value === DamAssetType.Audio), W = computed(() => T.value === DamAssetType.Document), M = computed(() => {
|
|
17314
17314
|
var J, ne, me, ue;
|
|
17315
|
-
return (J =
|
|
17316
|
-
url:
|
|
17317
|
-
width:
|
|
17318
|
-
height:
|
|
17315
|
+
return (J = q.value) != null && J.imagePreview ? {
|
|
17316
|
+
url: q.value.imagePreview.url,
|
|
17317
|
+
width: q.value.imagePreview.requestedWidth || void 0,
|
|
17318
|
+
height: q.value.imagePreview.requestedHeight || void 0,
|
|
17319
17319
|
bgColor: assetFileIsImageFile((ne = $.value) == null ? void 0 : ne.mainFile) && ((me = $.value) != null && me.mainFile.imageAttributes) && ((ue = $.value) != null && ue.mainFile.imageAttributes.mostDominantColor) ? $.value.mainFile.imageAttributes.mostDominantColor : "#ccc"
|
|
17320
17320
|
} : {
|
|
17321
17321
|
url: "",
|
|
@@ -17326,9 +17326,9 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17326
17326
|
}), z = computed(() => {
|
|
17327
17327
|
var J;
|
|
17328
17328
|
return ((J = $.value) == null ? void 0 : J.mainFile) || void 0;
|
|
17329
|
-
}), I = computed(() => !isNull(
|
|
17329
|
+
}), I = computed(() => !isNull(q.value) && [UploadQueueItemStatus.Processing, UploadQueueItemStatus.Loading].includes(q.value.status)), C = computed(() => !isNull(q.value) && q.value.status === UploadQueueItemStatus.Waiting), y = computed(() => !isNull(q.value) && q.value.status === UploadQueueItemStatus.Uploaded), v = computed(() => !e.disableDoneAnimation && y.value), X = computed(() => !isNull(q.value) && q.value.status === UploadQueueItemStatus.Uploading), S = computed(() => {
|
|
17330
17330
|
var J;
|
|
17331
|
-
return (J =
|
|
17331
|
+
return (J = q.value) == null ? void 0 : J.progress.progressPercent;
|
|
17332
17332
|
}), { damClient: E } = useCommonAdminCoreDamOptions(), K = async () => {
|
|
17333
17333
|
V.stopUpload(e.queueKey), d.setAsset(null), p.value = !1;
|
|
17334
17334
|
}, R = computed(() => V.getQueueTotalCount(e.queueKey)), Q = computed(() => V.getQueueProcessedCount(e.queueKey)), se = computed(() => R.value > Q.value), oe = async () => {
|
|
@@ -17371,9 +17371,9 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17371
17371
|
y,
|
|
17372
17372
|
async (J) => {
|
|
17373
17373
|
var ne;
|
|
17374
|
-
if (!(!J || !((ne =
|
|
17374
|
+
if (!(!J || !((ne = q.value) != null && ne.assetId)))
|
|
17375
17375
|
try {
|
|
17376
|
-
const me = await fetchAsset(E,
|
|
17376
|
+
const me = await fetchAsset(E, q.value.assetId);
|
|
17377
17377
|
d.setAsset(me), f.value = !0;
|
|
17378
17378
|
} catch (me) {
|
|
17379
17379
|
o(me);
|
|
@@ -17390,9 +17390,9 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17390
17390
|
unref(m) ? (openBlock(), createBlock(_sfc_main$D, {
|
|
17391
17391
|
key: 0,
|
|
17392
17392
|
onCloseDialog: K
|
|
17393
|
-
})) :
|
|
17393
|
+
})) : q.value ? (openBlock(), createBlock(VCard, {
|
|
17394
17394
|
key: 1,
|
|
17395
|
-
class: normalizeClass(["dam-image-detail", { "dam-image-detail--sidebar-active":
|
|
17395
|
+
class: normalizeClass(["dam-image-detail", { "dam-image-detail--sidebar-active": Y.value }])
|
|
17396
17396
|
}, {
|
|
17397
17397
|
default: withCtx(() => [
|
|
17398
17398
|
createElementVNode("div", _hoisted_1$a, [
|
|
@@ -17409,9 +17409,9 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17409
17409
|
createVNode(VSpacer),
|
|
17410
17410
|
createElementVNode("div", null, [
|
|
17411
17411
|
createVNode(VBtn, {
|
|
17412
|
-
active:
|
|
17413
|
-
variant:
|
|
17414
|
-
color:
|
|
17412
|
+
active: Y.value,
|
|
17413
|
+
variant: Y.value ? "flat" : "text",
|
|
17414
|
+
color: Y.value ? "secondary" : "",
|
|
17415
17415
|
icon: "",
|
|
17416
17416
|
class: "mr-1",
|
|
17417
17417
|
width: 36,
|
|
@@ -17448,7 +17448,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17448
17448
|
createVNode(_sfc_main$g)
|
|
17449
17449
|
])) : (openBlock(), createElementBlock("div", _hoisted_8$3, [
|
|
17450
17450
|
createElementVNode("div", _hoisted_9$3, [
|
|
17451
|
-
|
|
17451
|
+
q.value ? (openBlock(), createBlock(_sfc_main$B, {
|
|
17452
17452
|
key: 0,
|
|
17453
17453
|
"asset-type": T.value,
|
|
17454
17454
|
"asset-status": D.value,
|
|
@@ -17461,14 +17461,14 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17461
17461
|
"show-waiting": C.value,
|
|
17462
17462
|
"show-done": v.value,
|
|
17463
17463
|
"uploading-progress": S.value,
|
|
17464
|
-
"remaining-time":
|
|
17464
|
+
"remaining-time": q.value.progress.remainingTime,
|
|
17465
17465
|
"use-component": "",
|
|
17466
17466
|
cover: "",
|
|
17467
17467
|
"aspect-ratio": IMAGE_ASPECT_RATIO$1,
|
|
17468
17468
|
onLoad: b,
|
|
17469
17469
|
onError: b
|
|
17470
17470
|
}, null, 8, ["asset-type", "asset-status", "src", "background-color", "width", "height", "show-uploading", "show-processing", "show-waiting", "show-done", "uploading-progress", "remaining-time"])) : createCommentVNode("", !0),
|
|
17471
|
-
|
|
17471
|
+
q.value && q.value.error.hasError ? (openBlock(), createElementBlock("div", _hoisted_10$2, [
|
|
17472
17472
|
createVNode(VIcon, {
|
|
17473
17473
|
icon: "mdi-alert",
|
|
17474
17474
|
class: "ma-1",
|
|
@@ -17476,13 +17476,13 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17476
17476
|
color: "error"
|
|
17477
17477
|
}),
|
|
17478
17478
|
createElementVNode("div", _hoisted_11$1, toDisplayString(unref(n)("common.damImage.queueItem.error")), 1),
|
|
17479
|
-
|
|
17479
|
+
q.value && q.value.error.message.length ? (openBlock(), createElementBlock("div", {
|
|
17480
17480
|
key: 0,
|
|
17481
17481
|
class: "text-caption",
|
|
17482
|
-
textContent: toDisplayString(
|
|
17483
|
-
}, null, 8, _hoisted_12)) :
|
|
17482
|
+
textContent: toDisplayString(q.value.error.message)
|
|
17483
|
+
}, null, 8, _hoisted_12)) : q.value.error.assetFileFailReason !== unref(AssetFileFailReason).None ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
17484
17484
|
createVNode(_sfc_main$A, {
|
|
17485
|
-
reason:
|
|
17485
|
+
reason: q.value.error.assetFileFailReason
|
|
17486
17486
|
}, null, 8, ["reason"])
|
|
17487
17487
|
])) : (openBlock(), createElementBlock("div", _hoisted_14, toDisplayString(unref(n)("common.damImage.uploadErrors.unknownError")), 1))
|
|
17488
17488
|
])) : createCommentVNode("", !0)
|
|
@@ -17547,8 +17547,8 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17547
17547
|
);
|
|
17548
17548
|
if (isUndefined$1(o))
|
|
17549
17549
|
throw new Error("Fatal error, parent component doesn't provide necessary config ext system config.");
|
|
17550
|
-
const { t: s } = useI18n(), { showErrorsDefault: n } = useAlerts(), l = useCommonAdminImageOptions(e.configName), { imageClient: d } = l, { widgetImageToDamImageUrl: u } = useImageActions(l), m = useUploadQueuesStore(), c = useImageStore(), { uploadQueueDialog: f } = useUploadQueueDialog(), V = ref(null), p = ref(!1), g = ref(!1),
|
|
17551
|
-
c.setImageDetail(toRaw(V.value)),
|
|
17550
|
+
const { t: s } = useI18n(), { showErrorsDefault: n } = useAlerts(), l = useCommonAdminImageOptions(e.configName), { imageClient: d } = l, { widgetImageToDamImageUrl: u } = useImageActions(l), m = useUploadQueuesStore(), c = useImageStore(), { uploadQueueDialog: f } = useUploadQueueDialog(), V = ref(null), p = ref(!1), g = ref(!1), q = ref(!1), $ = ref(!1), Y = ref(!1), N = computed(() => isNull(e.modelValue)), b = ref(""), T = computed(() => m.getQueue(e.queueKey)), D = computed(() => !0), O = computed(() => !isNull(V.value)), H = () => {
|
|
17551
|
+
c.setImageDetail(toRaw(V.value)), q.value = !0;
|
|
17552
17552
|
}, U = () => {
|
|
17553
17553
|
g.value = !0;
|
|
17554
17554
|
}, W = (J) => {
|
|
@@ -17584,7 +17584,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17584
17584
|
);
|
|
17585
17585
|
const v = async (J) => {
|
|
17586
17586
|
var ue;
|
|
17587
|
-
|
|
17587
|
+
Y.value = !0, c.setImageDetail(null), q.value = !0;
|
|
17588
17588
|
let ne = "", me = "";
|
|
17589
17589
|
if (J.type === "asset") {
|
|
17590
17590
|
if (!J.value[0] || !J.value[0].mainFile)
|
|
@@ -17606,7 +17606,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17606
17606
|
},
|
|
17607
17607
|
position: 1
|
|
17608
17608
|
};
|
|
17609
|
-
isNull(e.modelValue) || (ee.id = e.modelValue), c.setImageDetail(ee),
|
|
17609
|
+
isNull(e.modelValue) || (ee.id = e.modelValue), c.setImageDetail(ee), Y.value = !1;
|
|
17610
17610
|
}
|
|
17611
17611
|
}, X = useAssetDetailStore(), { loading: S, dialog: E } = storeToRefs(X), { damClient: K } = useCommonAdminCoreDamOptions(), R = async (J) => {
|
|
17612
17612
|
S.value = !0, E.value = !0;
|
|
@@ -17619,13 +17619,13 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17619
17619
|
S.value = !1;
|
|
17620
17620
|
}
|
|
17621
17621
|
}, Q = () => {
|
|
17622
|
-
c.setImageDetail(null),
|
|
17622
|
+
c.setImageDetail(null), q.value = !1;
|
|
17623
17623
|
}, se = async () => {
|
|
17624
17624
|
if (!isNull(c.imageDetail)) {
|
|
17625
17625
|
$.value = !0;
|
|
17626
17626
|
try {
|
|
17627
17627
|
const J = c.imageDetail.id ? await updateImage(d, c.imageDetail.id, c.imageDetail) : await createImage(d, c.imageDetail);
|
|
17628
|
-
|
|
17628
|
+
q.value = !1, r("update:modelValue", J.id), c.setImageDetail(null), C(J, J.id, !0);
|
|
17629
17629
|
} catch (J) {
|
|
17630
17630
|
n(J);
|
|
17631
17631
|
} finally {
|
|
@@ -17640,7 +17640,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17640
17640
|
n(J);
|
|
17641
17641
|
}
|
|
17642
17642
|
}, fe = (J) => {
|
|
17643
|
-
J[0] && (isNull(e.modelValue) || (J[0].id = e.modelValue), c.setImageDetail(J[0]),
|
|
17643
|
+
J[0] && (isNull(e.modelValue) || (J[0].id = e.modelValue), c.setImageDetail(J[0]), q.value = !0);
|
|
17644
17644
|
};
|
|
17645
17645
|
return (J, ne) => {
|
|
17646
17646
|
var me, ue;
|
|
@@ -17831,10 +17831,10 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
17831
17831
|
onOnConfirm: v
|
|
17832
17832
|
}, null, 8, ["modelValue", "asset-licence-id", "asset-type"]),
|
|
17833
17833
|
createVNode(_sfc_main$E, {
|
|
17834
|
-
modelValue:
|
|
17835
|
-
"onUpdate:modelValue": ne[3] || (ne[3] = (ee) =>
|
|
17834
|
+
modelValue: q.value,
|
|
17835
|
+
"onUpdate:modelValue": ne[3] || (ne[3] = (ee) => q.value = ee),
|
|
17836
17836
|
saving: $.value,
|
|
17837
|
-
loading:
|
|
17837
|
+
loading: Y.value,
|
|
17838
17838
|
onEditAsset: R,
|
|
17839
17839
|
onOnConfirm: se,
|
|
17840
17840
|
onOnClose: Q
|
|
@@ -18031,9 +18031,9 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
18031
18031
|
set(b) {
|
|
18032
18032
|
r("update:authors", [...b]);
|
|
18033
18033
|
}
|
|
18034
|
-
}), { t: l } = useI18n(), d = computed(() => [UploadQueueItemStatus.Processing, UploadQueueItemStatus.Loading].includes(e.item.status)), u = computed(() => e.item.status === UploadQueueItemStatus.Waiting), m = computed(() => !e.disableDoneAnimation && e.item.status === UploadQueueItemStatus.Uploaded), c = computed(() => e.item.status === UploadQueueItemStatus.Uploading), f = computed(() => e.item.progress.progressPercent), V = computed(() => e.item.imagePreview ? e.item.imagePreview.url : void 0), p = computed(() => e.item.assetType), g = computed(() => e.item ? e.item.assetStatus : DamAssetStatus.Default), { damConfigExtSystem:
|
|
18034
|
+
}), { t: l } = useI18n(), d = computed(() => [UploadQueueItemStatus.Processing, UploadQueueItemStatus.Loading].includes(e.item.status)), u = computed(() => e.item.status === UploadQueueItemStatus.Waiting), m = computed(() => !e.disableDoneAnimation && e.item.status === UploadQueueItemStatus.Uploaded), c = computed(() => e.item.status === UploadQueueItemStatus.Uploading), f = computed(() => e.item.progress.progressPercent), V = computed(() => e.item.imagePreview ? e.item.imagePreview.url : void 0), p = computed(() => e.item.assetType), g = computed(() => e.item ? e.item.assetStatus : DamAssetStatus.Default), { damConfigExtSystem: q } = useDamConfigState(), $ = () => {
|
|
18035
18035
|
r("cancelItem", { index: e.index, item: e.item, queueKey: e.queueKey });
|
|
18036
|
-
},
|
|
18036
|
+
}, Y = computed(() => [UploadQueueItemStatus.Loading, UploadQueueItemStatus.Waiting, UploadQueueItemStatus.Uploading].includes(
|
|
18037
18037
|
e.item.status
|
|
18038
18038
|
)), N = async () => {
|
|
18039
18039
|
isNull(e.item.assetId) || r("showDetail", e.item.assetId);
|
|
@@ -18112,7 +18112,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
18112
18112
|
"button-t": "common.damImage.queueItem.copyAssetId",
|
|
18113
18113
|
size: "small"
|
|
18114
18114
|
}, null, 8, ["id"])) : createCommentVNode("", !0),
|
|
18115
|
-
|
|
18115
|
+
Y.value ? (openBlock(), createBlock(VBtn, {
|
|
18116
18116
|
key: 2,
|
|
18117
18117
|
icon: "",
|
|
18118
18118
|
size: "small",
|
|
@@ -18185,7 +18185,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
18185
18185
|
"asset-type": p.value
|
|
18186
18186
|
}, {
|
|
18187
18187
|
"after-pinned": withCtx(() => [
|
|
18188
|
-
unref(
|
|
18188
|
+
unref(q)[p.value].keywords.enabled ? (openBlock(), createBlock(VRow, {
|
|
18189
18189
|
key: 0,
|
|
18190
18190
|
dense: "",
|
|
18191
18191
|
class: "my-2"
|
|
@@ -18205,7 +18205,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
18205
18205
|
label: unref(l)("common.damImage.asset.model.keywords"),
|
|
18206
18206
|
clearable: "",
|
|
18207
18207
|
multiple: "",
|
|
18208
|
-
required: unref(
|
|
18208
|
+
required: unref(q)[p.value].keywords.required,
|
|
18209
18209
|
"validation-scope": unref(ADamAssetMetadataValidationScopeSymbol),
|
|
18210
18210
|
disabled: !b.item.canEditMetadata
|
|
18211
18211
|
}, null, 8, ["modelValue", "queue-id", "label", "required", "validation-scope", "disabled"])
|
|
@@ -18218,7 +18218,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
18218
18218
|
]),
|
|
18219
18219
|
_: 1
|
|
18220
18220
|
})) : createCommentVNode("", !0),
|
|
18221
|
-
unref(
|
|
18221
|
+
unref(q)[p.value].authors.enabled ? (openBlock(), createBlock(VRow, {
|
|
18222
18222
|
key: 1,
|
|
18223
18223
|
dense: "",
|
|
18224
18224
|
class: "my-2"
|
|
@@ -18239,7 +18239,7 @@ const _hoisted_1$c = { key: 0 }, _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
18239
18239
|
"author-conflicts": b.item.authorConflicts,
|
|
18240
18240
|
clearable: "",
|
|
18241
18241
|
multiple: "",
|
|
18242
|
-
required: unref(
|
|
18242
|
+
required: unref(q)[p.value].authors.required,
|
|
18243
18243
|
"validation-scope": unref(ADamAssetMetadataValidationScopeSymbol),
|
|
18244
18244
|
disabled: !b.item.canEditMetadata
|
|
18245
18245
|
}, null, 8, ["modelValue", "queue-id", "label", "author-conflicts", "required", "validation-scope", "disabled"])
|
|
@@ -18393,7 +18393,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
18393
18393
|
m(r.value, !0);
|
|
18394
18394
|
}, g = () => {
|
|
18395
18395
|
u(o.value);
|
|
18396
|
-
},
|
|
18396
|
+
}, q = () => {
|
|
18397
18397
|
u(o.value, !0);
|
|
18398
18398
|
}, $ = (b = !1) => {
|
|
18399
18399
|
for (const [T, D] of Object.entries(e.value.image))
|
|
@@ -18433,11 +18433,11 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
18433
18433
|
b
|
|
18434
18434
|
);
|
|
18435
18435
|
if (b) {
|
|
18436
|
-
|
|
18436
|
+
q(), p();
|
|
18437
18437
|
return;
|
|
18438
18438
|
}
|
|
18439
18439
|
g(), V();
|
|
18440
|
-
},
|
|
18440
|
+
}, Y = () => {
|
|
18441
18441
|
e.value = { image: {}, video: {}, audio: {}, document: {} }, o.value = [], r.value = [];
|
|
18442
18442
|
}, N = computed(() => l.getQueueItemsTypes(a.queueKey));
|
|
18443
18443
|
return onMounted(() => {
|
|
@@ -18594,7 +18594,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
18594
18594
|
icon: "",
|
|
18595
18595
|
size: "small",
|
|
18596
18596
|
variant: "text",
|
|
18597
|
-
onClick: withModifiers(
|
|
18597
|
+
onClick: withModifiers(q, ["stop"])
|
|
18598
18598
|
}, {
|
|
18599
18599
|
default: withCtx(() => [
|
|
18600
18600
|
createVNode(VIcon, { icon: "mdi-file-replace-outline" }),
|
|
@@ -18678,7 +18678,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
18678
18678
|
createVNode(VBtn, {
|
|
18679
18679
|
variant: "text",
|
|
18680
18680
|
size: "small",
|
|
18681
|
-
onClick: withModifiers(
|
|
18681
|
+
onClick: withModifiers(Y, ["stop"])
|
|
18682
18682
|
}, {
|
|
18683
18683
|
default: withCtx(() => [
|
|
18684
18684
|
createTextVNode(toDisplayString(unref(s)("common.damImage.asset.massOperations.clearForm")), 1)
|
|
@@ -18720,18 +18720,18 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
18720
18720
|
(openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (p, g) => (openBlock(), createBlock(_sfc_main$6, {
|
|
18721
18721
|
key: p.key,
|
|
18722
18722
|
customData: p.customData,
|
|
18723
|
-
"onUpdate:customData": (
|
|
18723
|
+
"onUpdate:customData": (q) => p.customData = q,
|
|
18724
18724
|
keywords: p.keywords,
|
|
18725
|
-
"onUpdate:keywords": (
|
|
18725
|
+
"onUpdate:keywords": (q) => p.keywords = q,
|
|
18726
18726
|
authors: p.authors,
|
|
18727
|
-
"onUpdate:authors": (
|
|
18727
|
+
"onUpdate:authors": (q) => p.authors = q,
|
|
18728
18728
|
item: p,
|
|
18729
18729
|
index: g,
|
|
18730
18730
|
"queue-key": f.queueKey,
|
|
18731
18731
|
"disable-done-animation": f.disableDoneAnimation,
|
|
18732
18732
|
onCancelItem: n,
|
|
18733
18733
|
onRemoveItem: l,
|
|
18734
|
-
onShowDetail: V[0] || (V[0] = (
|
|
18734
|
+
onShowDetail: V[0] || (V[0] = (q) => r("showDetail", q))
|
|
18735
18735
|
}, null, 8, ["customData", "onUpdate:customData", "keywords", "onUpdate:keywords", "authors", "onUpdate:authors", "item", "index", "queue-key", "disable-done-animation"]))), 128))
|
|
18736
18736
|
]),
|
|
18737
18737
|
_: 1
|
|
@@ -18763,7 +18763,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
18763
18763
|
},
|
|
18764
18764
|
emits: ["onDrop", "onFilesInput", "onApply"],
|
|
18765
18765
|
setup(i, { emit: a }) {
|
|
18766
|
-
const e = i, r = a, { uploadQueueDialog: o, uploadQueueSidebar: s, toggleUploadQueueSidebar: n } = useUploadQueueDialog(), l = useImageStore(), { maxPosition: d } = storeToRefs(l), u = useUploadQueuesStore(), m = computed(() => u.getQueueTotalCount(e.queueKey)), c = computed(() => u.getQueueItems(e.queueKey)), f = computed(() => u.getQueueProcessedCount(e.queueKey)), V = computed(() => m.value > f.value), p = computed(() => m.value === f.value), { t: g } = useI18n(), { toolbarColor:
|
|
18766
|
+
const e = i, r = a, { uploadQueueDialog: o, uploadQueueSidebar: s, toggleUploadQueueSidebar: n } = useUploadQueueDialog(), l = useImageStore(), { maxPosition: d } = storeToRefs(l), u = useUploadQueuesStore(), m = computed(() => u.getQueueTotalCount(e.queueKey)), c = computed(() => u.getQueueItems(e.queueKey)), f = computed(() => u.getQueueProcessedCount(e.queueKey)), V = computed(() => m.value > f.value), p = computed(() => m.value === f.value), { t: g } = useI18n(), { toolbarColor: q } = useTheme(), $ = useVuelidate(), { showRecordWas: Y, showValidationError: N, showErrorsDefault: b } = useAlerts(), { damClient: T } = useCommonAdminCoreDamOptions(), D = ref(!1), O = ref(!1), H = async () => {
|
|
18767
18767
|
u.stopUpload(e.queueKey), o.value = !1;
|
|
18768
18768
|
}, U = async () => {
|
|
18769
18769
|
const X = toRaw(c.value);
|
|
@@ -18773,7 +18773,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
18773
18773
|
return;
|
|
18774
18774
|
}
|
|
18775
18775
|
try {
|
|
18776
|
-
await bulkUpdateAssetsMetadata(T, X),
|
|
18776
|
+
await bulkUpdateAssetsMetadata(T, X), Y("updated");
|
|
18777
18777
|
} catch (S) {
|
|
18778
18778
|
console.error(S), b(S);
|
|
18779
18779
|
} finally {
|
|
@@ -18860,7 +18860,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
18860
18860
|
createElementVNode("div", _hoisted_2$1, [
|
|
18861
18861
|
createVNode(VToolbar, {
|
|
18862
18862
|
class: "w-100 system-border-b pr-1",
|
|
18863
|
-
color: unref(
|
|
18863
|
+
color: unref(q),
|
|
18864
18864
|
density: "compact",
|
|
18865
18865
|
height: 64
|
|
18866
18866
|
}, {
|
|
@@ -19047,12 +19047,12 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
19047
19047
|
const l = useCommonAdminImageOptions(r.configName), { imageClient: d } = l, { showErrorsDefault: u, showValidationError: m } = useAlerts(), c = ref(null), { uploadSizes: f, uploadAccept: V } = useDamAcceptTypeAndSizeHelper(
|
|
19048
19048
|
DamAssetType.Image,
|
|
19049
19049
|
n.value
|
|
19050
|
-
), { t: p } = useI18n(), g = ref(!1),
|
|
19050
|
+
), { t: p } = useI18n(), g = ref(!1), q = useImageStore(), { images: $, maxPosition: Y } = storeToRefs(q), N = async () => {
|
|
19051
19051
|
try {
|
|
19052
19052
|
g.value = !0;
|
|
19053
19053
|
const ee = await fetchImageListByIds(d, r.modelValue);
|
|
19054
|
-
|
|
19055
|
-
ee.map((ie) => (
|
|
19054
|
+
q.setImages(
|
|
19055
|
+
ee.map((ie) => (q.updateMaxPositionIfGreater(ie.position), {
|
|
19056
19056
|
key: generateUUIDv1(),
|
|
19057
19057
|
...ie
|
|
19058
19058
|
}))
|
|
@@ -19087,7 +19087,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
19087
19087
|
}
|
|
19088
19088
|
return ee.map((Fe) => {
|
|
19089
19089
|
var xe, ye;
|
|
19090
|
-
|
|
19090
|
+
Y.value++;
|
|
19091
19091
|
const qe = (xe = Ve.get(Fe.id)) == null ? void 0 : xe.description, ve = [];
|
|
19092
19092
|
return (ye = Ve.get(Fe.id)) == null || ye.authorIds.forEach((Ee) => {
|
|
19093
19093
|
const be = Ye.get(Ee);
|
|
@@ -19102,7 +19102,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
19102
19102
|
damId: Fe.mainFile.id,
|
|
19103
19103
|
regionPosition: 0
|
|
19104
19104
|
},
|
|
19105
|
-
position:
|
|
19105
|
+
position: Y.value
|
|
19106
19106
|
};
|
|
19107
19107
|
});
|
|
19108
19108
|
}, W = async (ee) => {
|
|
@@ -19110,7 +19110,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
19110
19110
|
if (ee.value.length === 0)
|
|
19111
19111
|
return;
|
|
19112
19112
|
const ie = await U(ee.value.filter((Ve) => !isNull(Ve.mainFile)));
|
|
19113
|
-
|
|
19113
|
+
q.addImages(ie);
|
|
19114
19114
|
}
|
|
19115
19115
|
}, M = useAssetDetailStore(), { loading: z, dialog: I } = storeToRefs(M), { damClient: C } = useCommonAdminCoreDamOptions(), y = async (ee) => {
|
|
19116
19116
|
z.value = !0, I.value = !0;
|
|
@@ -19123,11 +19123,11 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
19123
19123
|
z.value = !1;
|
|
19124
19124
|
}
|
|
19125
19125
|
}, v = (ee) => {
|
|
19126
|
-
ee.length !== 0 && (
|
|
19127
|
-
ee.map((ie) => (
|
|
19126
|
+
ee.length !== 0 && (q.addImages(
|
|
19127
|
+
ee.map((ie) => (Y.value++, {
|
|
19128
19128
|
key: generateUUIDv1(),
|
|
19129
19129
|
...ie,
|
|
19130
|
-
position:
|
|
19130
|
+
position: Y.value
|
|
19131
19131
|
}))
|
|
19132
19132
|
), D.value = !1, b.stopUpload(r.queueKey));
|
|
19133
19133
|
}, X = () => {
|
|
@@ -19142,18 +19142,18 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
19142
19142
|
key: generateUUIDv1(),
|
|
19143
19143
|
...he
|
|
19144
19144
|
}));
|
|
19145
|
-
|
|
19145
|
+
q.setImages(Ve), o("update:modelValue", ie);
|
|
19146
19146
|
} catch {
|
|
19147
19147
|
}
|
|
19148
19148
|
}, K = async (ee) => {
|
|
19149
19149
|
const ie = $.value[ee];
|
|
19150
19150
|
if (ie) {
|
|
19151
19151
|
if (isUndefined$1(ie.id)) {
|
|
19152
|
-
|
|
19152
|
+
q.removeImageByIndex(ee);
|
|
19153
19153
|
return;
|
|
19154
19154
|
}
|
|
19155
19155
|
try {
|
|
19156
|
-
await deleteImage(d, ie.id),
|
|
19156
|
+
await deleteImage(d, ie.id), q.removeImageByIndex(ee);
|
|
19157
19157
|
} catch (Ve) {
|
|
19158
19158
|
u(Ve);
|
|
19159
19159
|
}
|
|
@@ -19166,7 +19166,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
19166
19166
|
let ee = 0;
|
|
19167
19167
|
$.value.forEach((ie) => {
|
|
19168
19168
|
ee++, ie.position = ee;
|
|
19169
|
-
}),
|
|
19169
|
+
}), q.maxPosition = ee;
|
|
19170
19170
|
}, me = (ee, ie) => {
|
|
19171
19171
|
if (ie >= 0 && ie < $.value.length) {
|
|
19172
19172
|
const Ve = $.value.splice(ee, 1)[0];
|
|
@@ -19317,7 +19317,7 @@ const _hoisted_1$4 = { class: "sidebar-info d-flex w-100 h-100 flex-column" }, _
|
|
|
19317
19317
|
ref_key: "innerComponent",
|
|
19318
19318
|
ref: f
|
|
19319
19319
|
}, r, {
|
|
19320
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
19320
|
+
"onUpdate:modelValue": g[0] || (g[0] = (q) => o("update:modelValue", q))
|
|
19321
19321
|
}), null, 16)) : s.value === "error" ? (openBlock(), createElementBlock("div", _hoisted_1, " Loading DAM config error ")) : (openBlock(), createBlock(VProgressCircular, {
|
|
19322
19322
|
key: 2,
|
|
19323
19323
|
size: 12,
|
|
@@ -19360,12 +19360,12 @@ function createDatatableColumnsConfig(i, a, e = void 0, r = void 0, o = !1, s =
|
|
|
19360
19360
|
};
|
|
19361
19361
|
}
|
|
19362
19362
|
function useSubjectSelect(i, a, e, r, o, s) {
|
|
19363
|
-
const n = ref(!1), l = ref([]), d = ref([]), u = ref(!1), { resetFilter: m, submitFilter: c } = useFilterHelpers(), { showErrorsDefault: f } = useAlerts(), { columnsVisible: V, pagination: p, updateSortBy: g, columnsAll:
|
|
19363
|
+
const n = ref(!1), l = ref([]), d = ref([]), u = ref(!1), { resetFilter: m, submitFilter: c } = useFilterHelpers(), { showErrorsDefault: f } = useAlerts(), { columnsVisible: V, pagination: p, updateSortBy: g, columnsAll: q, columnsHidden: $ } = createDatatableColumnsConfig(
|
|
19364
19364
|
i,
|
|
19365
19365
|
a,
|
|
19366
19366
|
e,
|
|
19367
19367
|
r
|
|
19368
|
-
),
|
|
19368
|
+
), Y = () => {
|
|
19369
19369
|
T(), D();
|
|
19370
19370
|
}, N = (H) => {
|
|
19371
19371
|
g(H.sortBy), D();
|
|
@@ -19396,7 +19396,7 @@ function useSubjectSelect(i, a, e, r, o, s) {
|
|
|
19396
19396
|
pagination: p,
|
|
19397
19397
|
columnsVisible: V,
|
|
19398
19398
|
columnsHidden: $,
|
|
19399
|
-
columnsAll:
|
|
19399
|
+
columnsAll: q,
|
|
19400
19400
|
filterTouched: n,
|
|
19401
19401
|
loading: u,
|
|
19402
19402
|
onRowClick: (H) => {
|
|
@@ -19413,7 +19413,7 @@ function useSubjectSelect(i, a, e, r, o, s) {
|
|
|
19413
19413
|
z && z.click();
|
|
19414
19414
|
},
|
|
19415
19415
|
onFetchNextPage: b,
|
|
19416
|
-
onOpen:
|
|
19416
|
+
onOpen: Y,
|
|
19417
19417
|
sortByChange: N,
|
|
19418
19418
|
getList: D,
|
|
19419
19419
|
resetFilter: () => m(s, p, D),
|
|
@@ -19513,19 +19513,19 @@ const apiAnyRequest = (i, a, e = "", r = {}, o = null, s, n, l = {}) => new Prom
|
|
|
19513
19513
|
if (!isValidHTTPStatus(g.status))
|
|
19514
19514
|
return Promise.reject(new AnzuApiResponseCodeError(g.status));
|
|
19515
19515
|
if (g.data) {
|
|
19516
|
-
const
|
|
19517
|
-
if (p.push(...
|
|
19516
|
+
const q = g.data;
|
|
19517
|
+
if (p.push(...q.data), isApiInfiniteResponseList(q)) {
|
|
19518
19518
|
if (f.hasNextPage = g.data.hasNextPage, f.hasNextPage)
|
|
19519
19519
|
for (; f.hasNextPage; ) {
|
|
19520
19520
|
f.page++;
|
|
19521
|
-
const
|
|
19522
|
-
p.push(...
|
|
19521
|
+
const Y = (await i().get(V + generateListApiQuery(f, s), m)).data;
|
|
19522
|
+
p.push(...Y.data), f.hasNextPage = Y.hasNextPage;
|
|
19523
19523
|
}
|
|
19524
|
-
} else if (isApiResponseList(
|
|
19525
|
-
if (f.totalCount =
|
|
19524
|
+
} else if (isApiResponseList(q)) {
|
|
19525
|
+
if (f.totalCount = q.totalCount, f.totalCount <= f.rowsPerPage)
|
|
19526
19526
|
return Promise.resolve(p);
|
|
19527
|
-
const $ = [],
|
|
19528
|
-
for (let b = 0; b <
|
|
19527
|
+
const $ = [], Y = Math.ceil(f.totalCount / f.rowsPerPage);
|
|
19528
|
+
for (let b = 0; b < Y; b++)
|
|
19529
19529
|
$.push(
|
|
19530
19530
|
i().get(
|
|
19531
19531
|
V + generateListApiQueryWithoutPagination(
|
|
@@ -21248,7 +21248,7 @@ const AnzuSystemsCommonAdmin = {
|
|
|
21248
21248
|
})
|
|
21249
21249
|
});
|
|
21250
21250
|
async function loadCommonFonts() {
|
|
21251
|
-
(await import("./webfontloader-
|
|
21251
|
+
(await import("./webfontloader-cbd6b66b.js").then((a) => a.w)).load({
|
|
21252
21252
|
google: {
|
|
21253
21253
|
families: ["Roboto:100,300,400,500,700,900&display=swap"]
|
|
21254
21254
|
}
|
|
@@ -21541,4 +21541,4 @@ export {
|
|
|
21541
21541
|
_sfc_main$1G as y,
|
|
21542
21542
|
_sfc_main$1Z as z
|
|
21543
21543
|
};
|
|
21544
|
-
//# sourceMappingURL=lib-
|
|
21544
|
+
//# sourceMappingURL=lib-6cd8af44.js.map
|