@kong-ui-public/forms 4.13.6-pr.2204.7b095980a.0 → 4.13.6-pr.2204.c1fab0723.0
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/forms.es.js +904 -901
- package/dist/forms.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/components/fields/FieldArray.vue.d.ts +7 -4
- package/dist/types/components/fields/FieldAutoSuggestV2.vue.d.ts +7 -4
- package/dist/types/components/fields/FieldScopedEntitySelect.vue.d.ts +5 -3
- package/dist/types/components/fields/FieldScopedEntitySelect.vue.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/forms.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { openBlock as
|
|
1
|
+
import { openBlock as u, createElementBlock as g, createElementVNode as m, toDisplayString as k, normalizeClass as W, createVNode as C, defineComponent as re, provide as it, resolveComponent as F, withCtx as M, renderSlot as fe, unref as S, createTextVNode as te, createBlock as A, resolveDynamicComponent as ne, Fragment as K, renderList as J, mergeModels as Yt, useModel as Ui, createSlots as at, ref as ie, computed as L, onMounted as Vt, toRefs as Le, inject as st, onBeforeMount as Pt, mergeProps as Ee, Transition as $i, createCommentVNode as R, resolveDirective as Vn, withDirectives as ce, vModelText as Je, vModelCheckbox as Vi, vModelSelect as Pi, vModelDynamic as Pn, isRef as xe, toRef as Ri, vModelRadio as ji, vShow as Ni, watch as Rt, normalizeProps as Li, guardReactiveProps as qi, useSlots as ft, nextTick as Ht } from "vue";
|
|
2
2
|
import { createI18n as ve } from "@kong-ui-public/i18n";
|
|
3
3
|
import { TrashIcon as rt, ProgressIcon as Ki, AddIcon as jt, RemoveIcon as Di } from "@kong/icons";
|
|
4
4
|
import { useStringHelpers as Bi, useErrors as zi, useDebouncedFilter as Yi, useAxios as Hi } from "@kong-ui-public/entities-shared";
|
|
@@ -10,8 +10,8 @@ function Rn(e, t) {
|
|
|
10
10
|
function xi(e) {
|
|
11
11
|
return function(t, n, i) {
|
|
12
12
|
for (var a = -1, r = Object(t), o = i(t), s = o.length; s--; ) {
|
|
13
|
-
var
|
|
14
|
-
if (n(r[
|
|
13
|
+
var d = o[++a];
|
|
14
|
+
if (n(r[d], d, r) === !1)
|
|
15
15
|
break;
|
|
16
16
|
}
|
|
17
17
|
return t;
|
|
@@ -85,13 +85,13 @@ var zn = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
|
85
85
|
}
|
|
86
86
|
}(), Jt = Ye && Ye.isTypedArray, Ka = Jt ? Nt(Jt) : La, Da = Object.prototype, Ba = Da.hasOwnProperty;
|
|
87
87
|
function Yn(e, t) {
|
|
88
|
-
var n = $e(e), i = !n && la(e), a = !n && !i && Kn(e), r = !n && !i && !a && Ka(e), o = n || i || a || r, s = o ? Wi(e.length, String) : [],
|
|
89
|
-
for (var
|
|
90
|
-
(t || Ba.call(e,
|
|
91
|
-
(
|
|
92
|
-
a && (
|
|
93
|
-
r && (
|
|
94
|
-
Dn(
|
|
88
|
+
var n = $e(e), i = !n && la(e), a = !n && !i && Kn(e), r = !n && !i && !a && Ka(e), o = n || i || a || r, s = o ? Wi(e.length, String) : [], d = s.length;
|
|
89
|
+
for (var c in e)
|
|
90
|
+
(t || Ba.call(e, c)) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
91
|
+
(c == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
92
|
+
a && (c == "offset" || c == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
93
|
+
r && (c == "buffer" || c == "byteLength" || c == "byteOffset") || // Skip index properties.
|
|
94
|
+
Dn(c, d))) && s.push(c);
|
|
95
95
|
return s;
|
|
96
96
|
}
|
|
97
97
|
var za = Object.prototype;
|
|
@@ -459,8 +459,8 @@ function _t(e, t, n, i) {
|
|
|
459
459
|
var a = !n;
|
|
460
460
|
n || (n = {});
|
|
461
461
|
for (var r = -1, o = t.length; ++r < o; ) {
|
|
462
|
-
var s = t[r],
|
|
463
|
-
|
|
462
|
+
var s = t[r], d = void 0;
|
|
463
|
+
d === void 0 && (d = e[s]), a ? Wn(n, s, d) : Zn(n, s, d);
|
|
464
464
|
}
|
|
465
465
|
return n;
|
|
466
466
|
}
|
|
@@ -650,7 +650,7 @@ var gn = Ye && Ye.isSet, go = gn ? Nt(gn) : po, vo = 1, yo = 2, bo = 4, ii = "[o
|
|
|
650
650
|
H[ii] = H[_o] = H[Uo] = H[$o] = H[wo] = H[Mo] = H[Vo] = H[Po] = H[Ro] = H[jo] = H[No] = H[Io] = H[Co] = H[ri] = H[Ao] = H[Oo] = H[Eo] = H[Fo] = H[Lo] = H[qo] = H[Ko] = H[Do] = !0;
|
|
651
651
|
H[So] = H[ai] = H[ko] = !1;
|
|
652
652
|
function Xe(e, t, n, i, a, r) {
|
|
653
|
-
var o, s = t & vo,
|
|
653
|
+
var o, s = t & vo, d = t & yo, c = t & bo;
|
|
654
654
|
if (o !== void 0)
|
|
655
655
|
return o;
|
|
656
656
|
if (!he(e))
|
|
@@ -664,8 +664,8 @@ function Xe(e, t, n, i, a, r) {
|
|
|
664
664
|
if (Kn(e))
|
|
665
665
|
return ys(e, s);
|
|
666
666
|
if (f == ri || f == ii || p && !a) {
|
|
667
|
-
if (o =
|
|
668
|
-
return
|
|
667
|
+
if (o = d || p ? {} : uo(e), !s)
|
|
668
|
+
return d ? Is(e, gs(o, e)) : Ss(e, cs(o, e));
|
|
669
669
|
} else {
|
|
670
670
|
if (!H[f])
|
|
671
671
|
return a ? e : {};
|
|
@@ -673,17 +673,17 @@ function Xe(e, t, n, i, a, r) {
|
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
r || (r = new We());
|
|
676
|
-
var
|
|
677
|
-
if (
|
|
678
|
-
return
|
|
679
|
-
r.set(e, o), go(e) ? e.forEach(function(
|
|
680
|
-
o.add(Xe(
|
|
681
|
-
}) : fo(e) && e.forEach(function(
|
|
682
|
-
o.set(
|
|
676
|
+
var E = r.get(e);
|
|
677
|
+
if (E)
|
|
678
|
+
return E;
|
|
679
|
+
r.set(e, o), go(e) ? e.forEach(function(v) {
|
|
680
|
+
o.add(Xe(v, t, n, v, e, r));
|
|
681
|
+
}) : fo(e) && e.forEach(function(v, w) {
|
|
682
|
+
o.set(w, Xe(v, t, n, w, e, r));
|
|
683
683
|
});
|
|
684
|
-
var
|
|
685
|
-
return Rn(
|
|
686
|
-
|
|
684
|
+
var N = c ? d ? As : Cs : d ? wt : pt, l = h ? void 0 : N(e);
|
|
685
|
+
return Rn(l || e, function(v, w) {
|
|
686
|
+
l && (w = v, v = e[w]), Zn(o, w, Xe(v, t, n, w, e, r));
|
|
687
687
|
}), o;
|
|
688
688
|
}
|
|
689
689
|
var Bo = 1, zo = 4;
|
|
@@ -760,51 +760,51 @@ function Ut(e) {
|
|
|
760
760
|
}
|
|
761
761
|
var el = "Expected a function", tl = Math.max, nl = Math.min;
|
|
762
762
|
function He(e, t, n) {
|
|
763
|
-
var i, a, r, o, s,
|
|
763
|
+
var i, a, r, o, s, d, c = 0, h = !1, f = !1, p = !0;
|
|
764
764
|
if (typeof e != "function")
|
|
765
765
|
throw new TypeError(el);
|
|
766
766
|
t = Ut(t) || 0, he(n) && (h = !!n.leading, f = "maxWait" in n, r = f ? tl(Ut(n.maxWait) || 0, t) : r, p = "trailing" in n ? !!n.trailing : p);
|
|
767
|
-
function
|
|
768
|
-
var
|
|
769
|
-
return i = a = void 0,
|
|
767
|
+
function E(T) {
|
|
768
|
+
var y = i, P = a;
|
|
769
|
+
return i = a = void 0, c = T, o = e.apply(P, y), o;
|
|
770
770
|
}
|
|
771
|
-
function T
|
|
772
|
-
return
|
|
771
|
+
function N(T) {
|
|
772
|
+
return c = T, s = setTimeout(w, t), h ? E(T) : o;
|
|
773
773
|
}
|
|
774
|
-
function
|
|
775
|
-
var
|
|
776
|
-
return f ? nl(x, r -
|
|
774
|
+
function l(T) {
|
|
775
|
+
var y = T - d, P = T - c, x = t - y;
|
|
776
|
+
return f ? nl(x, r - P) : x;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
779
|
-
var
|
|
780
|
-
return
|
|
778
|
+
function v(T) {
|
|
779
|
+
var y = T - d, P = T - c;
|
|
780
|
+
return d === void 0 || y >= t || y < 0 || f && P >= r;
|
|
781
781
|
}
|
|
782
|
-
function
|
|
783
|
-
var
|
|
784
|
-
if (
|
|
785
|
-
return
|
|
786
|
-
s = setTimeout(
|
|
782
|
+
function w() {
|
|
783
|
+
var T = It();
|
|
784
|
+
if (v(T))
|
|
785
|
+
return $(T);
|
|
786
|
+
s = setTimeout(w, l(T));
|
|
787
787
|
}
|
|
788
|
-
function
|
|
789
|
-
return s = void 0, p && i ?
|
|
788
|
+
function $(T) {
|
|
789
|
+
return s = void 0, p && i ? E(T) : (i = a = void 0, o);
|
|
790
790
|
}
|
|
791
791
|
function b() {
|
|
792
|
-
s !== void 0 && clearTimeout(s),
|
|
792
|
+
s !== void 0 && clearTimeout(s), c = 0, i = d = a = s = void 0;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
795
|
-
return s === void 0 ? o :
|
|
794
|
+
function O() {
|
|
795
|
+
return s === void 0 ? o : $(It());
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
var
|
|
799
|
-
if (i = arguments, a = this,
|
|
797
|
+
function U() {
|
|
798
|
+
var T = It(), y = v(T);
|
|
799
|
+
if (i = arguments, a = this, d = T, y) {
|
|
800
800
|
if (s === void 0)
|
|
801
|
-
return
|
|
801
|
+
return N(d);
|
|
802
802
|
if (f)
|
|
803
|
-
return clearTimeout(s), s = setTimeout(
|
|
803
|
+
return clearTimeout(s), s = setTimeout(w, t), E(d);
|
|
804
804
|
}
|
|
805
|
-
return s === void 0 && (s = setTimeout(
|
|
805
|
+
return s === void 0 && (s = setTimeout(w, t)), o;
|
|
806
806
|
}
|
|
807
|
-
return
|
|
807
|
+
return U.cancel = b, U.flush = O, U;
|
|
808
808
|
}
|
|
809
809
|
var il = "__lodash_hash_undefined__";
|
|
810
810
|
function al(e) {
|
|
@@ -857,23 +857,23 @@ var fl = 1 / 0, hl = ze && 1 / oi(new ze([, -0]))[1] == fl ? function(e) {
|
|
|
857
857
|
return new ze(e);
|
|
858
858
|
} : ml, pl = 200;
|
|
859
859
|
function gl(e, t, n) {
|
|
860
|
-
var i = -1, a = ul, r = e.length, o = !0, s = [],
|
|
860
|
+
var i = -1, a = ul, r = e.length, o = !0, s = [], d = s;
|
|
861
861
|
if (r >= pl) {
|
|
862
|
-
var
|
|
863
|
-
if (
|
|
864
|
-
return oi(
|
|
865
|
-
o = !1, a = cl,
|
|
862
|
+
var c = hl(e);
|
|
863
|
+
if (c)
|
|
864
|
+
return oi(c);
|
|
865
|
+
o = !1, a = cl, d = new lt();
|
|
866
866
|
} else
|
|
867
|
-
|
|
867
|
+
d = s;
|
|
868
868
|
e:
|
|
869
869
|
for (; ++i < r; ) {
|
|
870
870
|
var h = e[i], f = h;
|
|
871
871
|
if (h = h !== 0 ? h : 0, o && f === f) {
|
|
872
|
-
for (var p =
|
|
873
|
-
if (
|
|
872
|
+
for (var p = d.length; p--; )
|
|
873
|
+
if (d[p] === f)
|
|
874
874
|
continue e;
|
|
875
875
|
s.push(h);
|
|
876
|
-
} else a(
|
|
876
|
+
} else a(d, f, n) || (d !== s && d.push(f), s.push(h));
|
|
877
877
|
}
|
|
878
878
|
return s;
|
|
879
879
|
}
|
|
@@ -1139,17 +1139,17 @@ function Al(e, t, n) {
|
|
|
1139
1139
|
millisecond: 0,
|
|
1140
1140
|
isPm: null,
|
|
1141
1141
|
timezoneOffset: null
|
|
1142
|
-
}, r = [], o = [], s = t.replace(ci, function(
|
|
1143
|
-
return o.push(_n(
|
|
1144
|
-
}),
|
|
1145
|
-
s = _n(s).replace(ui, function(
|
|
1146
|
-
var
|
|
1147
|
-
if (
|
|
1148
|
-
throw new Error("Invalid format. " +
|
|
1149
|
-
return
|
|
1150
|
-
}), Object.keys(
|
|
1151
|
-
if (!
|
|
1152
|
-
throw new Error("Invalid format. " +
|
|
1142
|
+
}, r = [], o = [], s = t.replace(ci, function(O, U) {
|
|
1143
|
+
return o.push(_n(U)), "@@@";
|
|
1144
|
+
}), d = {}, c = {};
|
|
1145
|
+
s = _n(s).replace(ui, function(O) {
|
|
1146
|
+
var U = Tl[O], T = U[0], y = U[1], P = U[3];
|
|
1147
|
+
if (d[T])
|
|
1148
|
+
throw new Error("Invalid format. " + T + " specified twice in format");
|
|
1149
|
+
return d[T] = !0, P && (c[P] = !0), r.push(U), "(" + y + ")";
|
|
1150
|
+
}), Object.keys(c).forEach(function(O) {
|
|
1151
|
+
if (!d[O])
|
|
1152
|
+
throw new Error("Invalid format. " + O + " is required in specified format");
|
|
1153
1153
|
}), s = s.replace(/@@@/g, function() {
|
|
1154
1154
|
return o.shift();
|
|
1155
1155
|
});
|
|
@@ -1157,27 +1157,27 @@ function Al(e, t, n) {
|
|
|
1157
1157
|
if (!h)
|
|
1158
1158
|
return null;
|
|
1159
1159
|
for (var f = je(je({}, dt), n), p = 1; p < h.length; p++) {
|
|
1160
|
-
var
|
|
1161
|
-
if (
|
|
1160
|
+
var E = r[p - 1], N = E[0], l = E[2], v = l ? l(h[p], f) : +h[p];
|
|
1161
|
+
if (v == null)
|
|
1162
1162
|
return null;
|
|
1163
|
-
a[
|
|
1163
|
+
a[N] = v;
|
|
1164
1164
|
}
|
|
1165
1165
|
a.isPm === 1 && a.hour != null && +a.hour != 12 ? a.hour = +a.hour + 12 : a.isPm === 0 && +a.hour == 12 && (a.hour = 0);
|
|
1166
|
-
var
|
|
1166
|
+
var w;
|
|
1167
1167
|
if (a.timezoneOffset == null) {
|
|
1168
|
-
|
|
1169
|
-
for (var
|
|
1168
|
+
w = new Date(a.year, a.month, a.day, a.hour, a.minute, a.second, a.millisecond);
|
|
1169
|
+
for (var $ = [
|
|
1170
1170
|
["month", "getMonth"],
|
|
1171
1171
|
["day", "getDate"],
|
|
1172
1172
|
["hour", "getHours"],
|
|
1173
1173
|
["minute", "getMinutes"],
|
|
1174
1174
|
["second", "getSeconds"]
|
|
1175
|
-
], p = 0, b =
|
|
1176
|
-
if (
|
|
1175
|
+
], p = 0, b = $.length; p < b; p++)
|
|
1176
|
+
if (d[$[p][0]] && a[$[p][0]] !== w[$[p][1]]())
|
|
1177
1177
|
return null;
|
|
1178
|
-
} else if (
|
|
1178
|
+
} else if (w = new Date(Date.UTC(a.year, a.month, a.day, a.hour, a.minute - a.timezoneOffset, a.second, a.millisecond)), a.month > 11 || a.month < 0 || a.day > 31 || a.day < 1 || a.hour > 23 || a.hour < 0 || a.minute > 59 || a.minute < 0 || a.second > 59 || a.second < 0)
|
|
1179
1179
|
return null;
|
|
1180
|
-
return
|
|
1180
|
+
return w;
|
|
1181
1181
|
}
|
|
1182
1182
|
var Be = {
|
|
1183
1183
|
format: Cl,
|
|
@@ -1249,9 +1249,9 @@ var gi = Object.prototype, Ll = gi.hasOwnProperty, ql = jl(function(e, t) {
|
|
|
1249
1249
|
e = Object(e);
|
|
1250
1250
|
var n = -1, i = t.length, a = i > 2 ? t[2] : void 0;
|
|
1251
1251
|
for (a && Nl(t[0], t[1], a) && (i = 1); ++n < i; )
|
|
1252
|
-
for (var r = t[n], o = wt(r), s = -1,
|
|
1253
|
-
var
|
|
1254
|
-
(h === void 0 || vt(h, gi[
|
|
1252
|
+
for (var r = t[n], o = wt(r), s = -1, d = o.length; ++s < d; ) {
|
|
1253
|
+
var c = o[s], h = e[c];
|
|
1254
|
+
(h === void 0 || vt(h, gi[c]) && !Ll.call(e, c)) && (e[c] = r[c]);
|
|
1255
1255
|
}
|
|
1256
1256
|
return e;
|
|
1257
1257
|
}), Kl = ye.isFinite;
|
|
@@ -1560,9 +1560,9 @@ const Gl = {
|
|
|
1560
1560
|
const r = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/, o = e.replace(/[^0-9]+/g, "");
|
|
1561
1561
|
if (!r.test(o))
|
|
1562
1562
|
return [Z(i.invalidCard)];
|
|
1563
|
-
let s = 0,
|
|
1563
|
+
let s = 0, d, c, h;
|
|
1564
1564
|
for (let f = o.length - 1; f >= 0; f--)
|
|
1565
|
-
|
|
1565
|
+
d = o.substring(f, f + 1), c = parseInt(d, 10), h ? (c *= 2, c >= 10 ? s += c % 10 + 1 : s += c) : s += c, h = !h;
|
|
1566
1566
|
return s % 10 === 0 && o ? [] : [Z(i.invalidCardNumber)];
|
|
1567
1567
|
},
|
|
1568
1568
|
alpha: (e, t, n, i = oe) => {
|
|
@@ -1635,8 +1635,8 @@ const _e = {
|
|
|
1635
1635
|
const o = r(this.value, this.schema, this.model);
|
|
1636
1636
|
o && Y(o.then) ? o.then((s) => {
|
|
1637
1637
|
s && (this.errors = this.errors.concat(s));
|
|
1638
|
-
const
|
|
1639
|
-
this.$emit("validated",
|
|
1638
|
+
const d = this.errors.length === 0;
|
|
1639
|
+
this.$emit("validated", d, this.errors, this);
|
|
1640
1640
|
}) : o && (n = n.concat(o));
|
|
1641
1641
|
}
|
|
1642
1642
|
});
|
|
@@ -1741,14 +1741,14 @@ const _e = {
|
|
|
1741
1741
|
}, id = /* @__PURE__ */ Object.assign(nd, {
|
|
1742
1742
|
__name: "FieldAdvanced",
|
|
1743
1743
|
setup(e) {
|
|
1744
|
-
return (t, n) => (
|
|
1744
|
+
return (t, n) => (u(), g("div", ed, [
|
|
1745
1745
|
m("button", {
|
|
1746
1746
|
class: "advanced-field-title",
|
|
1747
1747
|
type: "button",
|
|
1748
1748
|
onClick: n[0] || (n[0] = (...i) => t.handleOpen && t.handleOpen(...i))
|
|
1749
1749
|
}, [
|
|
1750
|
-
m("i", td,
|
|
1751
|
-
m("span", null,
|
|
1750
|
+
m("i", td, k(t.isOpen ? "keyboard_arrow_up" : "keyboard_arrow_right"), 1),
|
|
1751
|
+
m("span", null, k(t.titleText), 1)
|
|
1752
1752
|
]),
|
|
1753
1753
|
m("div", {
|
|
1754
1754
|
class: W(["advanced-field-dropdown", t.openClass])
|
|
@@ -1781,10 +1781,10 @@ const _e = {
|
|
|
1781
1781
|
emits: ["remove-item"],
|
|
1782
1782
|
setup(e) {
|
|
1783
1783
|
return it("vfg-array-item-index", e.index), (n, i) => {
|
|
1784
|
-
const a =
|
|
1785
|
-
return
|
|
1784
|
+
const a = F("KCard"), r = F("KButton");
|
|
1785
|
+
return u(), g("div", rd, [
|
|
1786
1786
|
C(a, { class: "card" }, {
|
|
1787
|
-
default:
|
|
1787
|
+
default: M(() => [
|
|
1788
1788
|
fe(n.$slots, "default", {}, void 0, !0)
|
|
1789
1789
|
]),
|
|
1790
1790
|
_: 3
|
|
@@ -1794,8 +1794,8 @@ const _e = {
|
|
|
1794
1794
|
class: "array-card-remove-button",
|
|
1795
1795
|
onClick: i[0] || (i[0] = (o) => n.$emit("remove-item"))
|
|
1796
1796
|
}, {
|
|
1797
|
-
default:
|
|
1798
|
-
C(
|
|
1797
|
+
default: M(() => [
|
|
1798
|
+
C(S(rt))
|
|
1799
1799
|
]),
|
|
1800
1800
|
_: 1
|
|
1801
1801
|
})
|
|
@@ -1813,8 +1813,8 @@ const _e = {
|
|
|
1813
1813
|
emits: ["remove-item"],
|
|
1814
1814
|
setup(e) {
|
|
1815
1815
|
return (t, n) => {
|
|
1816
|
-
const i =
|
|
1817
|
-
return
|
|
1816
|
+
const i = F("KButton");
|
|
1817
|
+
return u(), g("div", od, [
|
|
1818
1818
|
m("div", ld, [
|
|
1819
1819
|
fe(t.$slots, "default", {}, void 0, !0),
|
|
1820
1820
|
C(i, {
|
|
@@ -1822,8 +1822,8 @@ const _e = {
|
|
|
1822
1822
|
class: "delete",
|
|
1823
1823
|
onClick: n[0] || (n[0] = (a) => t.$emit("remove-item"))
|
|
1824
1824
|
}, {
|
|
1825
|
-
default:
|
|
1826
|
-
C(
|
|
1825
|
+
default: M(() => [
|
|
1826
|
+
C(S(rt))
|
|
1827
1827
|
]),
|
|
1828
1828
|
_: 1
|
|
1829
1829
|
})
|
|
@@ -1839,15 +1839,15 @@ const _e = {
|
|
|
1839
1839
|
emits: ["remove-item"],
|
|
1840
1840
|
setup(e) {
|
|
1841
1841
|
return (t, n) => {
|
|
1842
|
-
const i =
|
|
1843
|
-
return
|
|
1842
|
+
const i = F("KButton");
|
|
1843
|
+
return u(), g("div", cd, [
|
|
1844
1844
|
fe(t.$slots, "default", {}, void 0, !0),
|
|
1845
1845
|
C(i, {
|
|
1846
1846
|
appearance: "danger",
|
|
1847
1847
|
class: "delete",
|
|
1848
1848
|
onClick: n[0] || (n[0] = (a) => t.$emit("remove-item"))
|
|
1849
1849
|
}, {
|
|
1850
|
-
default:
|
|
1850
|
+
default: M(() => n[1] || (n[1] = [
|
|
1851
1851
|
te(" - Remove Field ")
|
|
1852
1852
|
])),
|
|
1853
1853
|
_: 1
|
|
@@ -1991,13 +1991,13 @@ const At = 50, pd = {
|
|
|
1991
1991
|
}
|
|
1992
1992
|
}, gd = ["data-testid", "data-testlabel"], vd = ["data-testid"], yd = { class: "autosuggest__results_message" };
|
|
1993
1993
|
function bd(e, t, n, i, a, r) {
|
|
1994
|
-
const o =
|
|
1995
|
-
return
|
|
1994
|
+
const o = F("KSelect");
|
|
1995
|
+
return u(), A(ne(e.schema.disabled ? "k-tooltip" : "div"), {
|
|
1996
1996
|
class: "field-wrap autosuggest",
|
|
1997
1997
|
"max-width": "300",
|
|
1998
1998
|
text: i.t("general.disable_source_scope_change", { scope: r.scope })
|
|
1999
1999
|
}, {
|
|
2000
|
-
default:
|
|
2000
|
+
default: M(() => [
|
|
2001
2001
|
C(o, {
|
|
2002
2002
|
id: e.schema.model,
|
|
2003
2003
|
ref: "suggestion",
|
|
@@ -2014,21 +2014,21 @@ function bd(e, t, n, i, a, r) {
|
|
|
2014
2014
|
onChange: r.onSelected,
|
|
2015
2015
|
onQueryChange: r.onQueryChange
|
|
2016
2016
|
}, {
|
|
2017
|
-
"item-template":
|
|
2017
|
+
"item-template": M(({ item: s }) => [
|
|
2018
2018
|
m("span", {
|
|
2019
2019
|
class: "first-part",
|
|
2020
2020
|
"data-testid": s.id && `${s.id}-0`,
|
|
2021
2021
|
"data-testlabel": s.label
|
|
2022
|
-
},
|
|
2023
|
-
(
|
|
2024
|
-
key:
|
|
2022
|
+
}, k(r.getSuggestionLabel(s).split(" - ")[0]), 9, gd),
|
|
2023
|
+
(u(!0), g(K, null, J(r.getSuggestionLabel(s).split(" - ").slice(1), (d, c) => (u(), g("span", {
|
|
2024
|
+
key: c,
|
|
2025
2025
|
class: "field-span",
|
|
2026
|
-
"data-testid": s.id && `${s.id}-${
|
|
2027
|
-
},
|
|
2026
|
+
"data-testid": s.id && `${s.id}-${c + 1}` || c + 1
|
|
2027
|
+
}, k(d), 9, vd))), 128))
|
|
2028
2028
|
]),
|
|
2029
|
-
empty:
|
|
2029
|
+
empty: M(() => [
|
|
2030
2030
|
m("div", yd, [
|
|
2031
|
-
m("span", null,
|
|
2031
|
+
m("span", null, k(a.message), 1)
|
|
2032
2032
|
])
|
|
2033
2033
|
]),
|
|
2034
2034
|
_: 1
|
|
@@ -2059,8 +2059,8 @@ const Sd = ["data-testid", "data-testlabel"], Td = { class: "item-label" }, Id =
|
|
|
2059
2059
|
setup(e) {
|
|
2060
2060
|
const { t } = ve("en-us", be), n = Ui(e, "id");
|
|
2061
2061
|
return (i, a) => {
|
|
2062
|
-
const r =
|
|
2063
|
-
return
|
|
2062
|
+
const r = F("KSelect");
|
|
2063
|
+
return u(), A(r, {
|
|
2064
2064
|
id: i.domId,
|
|
2065
2065
|
ref: "suggestion",
|
|
2066
2066
|
modelValue: n.value,
|
|
@@ -2076,33 +2076,33 @@ const Sd = ["data-testid", "data-testlabel"], Td = { class: "item-label" }, Id =
|
|
|
2076
2076
|
onChange: a[1] || (a[1] = (o) => i.$emit("change", o)),
|
|
2077
2077
|
onQueryChange: a[2] || (a[2] = (o) => i.$emit("query-change", o))
|
|
2078
2078
|
}, at({
|
|
2079
|
-
"dropdown-footer-text":
|
|
2080
|
-
m("span", null,
|
|
2079
|
+
"dropdown-footer-text": M(() => [
|
|
2080
|
+
m("span", null, k(S(t)("fields.auto_suggest.items_count", { count: i.suggestions.length })), 1)
|
|
2081
2081
|
]),
|
|
2082
|
-
"item-template":
|
|
2082
|
+
"item-template": M(({ item: o }) => [
|
|
2083
2083
|
fe(i.$slots, "item", { item: o }, () => [
|
|
2084
2084
|
m("span", {
|
|
2085
2085
|
class: "item-label",
|
|
2086
2086
|
"data-testid": o.id && `${o.id}-0`,
|
|
2087
2087
|
"data-testlabel": o.label
|
|
2088
|
-
},
|
|
2088
|
+
}, k(o.label), 9, Sd)
|
|
2089
2089
|
], !0)
|
|
2090
2090
|
]),
|
|
2091
|
-
"selected-item-template":
|
|
2091
|
+
"selected-item-template": M(({ item: o }) => [
|
|
2092
2092
|
fe(i.$slots, "selected-item", { item: o }, () => [
|
|
2093
|
-
m("span", Td,
|
|
2093
|
+
m("span", Td, k(o.label), 1)
|
|
2094
2094
|
], !0)
|
|
2095
2095
|
]),
|
|
2096
|
-
empty:
|
|
2096
|
+
empty: M(() => [
|
|
2097
2097
|
m("div", Id, [
|
|
2098
|
-
m("span", null,
|
|
2098
|
+
m("span", null, k(i.emptyMessage || S(t)("fields.auto_suggest.no_results")), 1)
|
|
2099
2099
|
])
|
|
2100
2100
|
]),
|
|
2101
2101
|
_: 2
|
|
2102
2102
|
}, [
|
|
2103
2103
|
i.$slots.before ? {
|
|
2104
2104
|
name: "before",
|
|
2105
|
-
fn:
|
|
2105
|
+
fn: M(() => [
|
|
2106
2106
|
fe(i.$slots, "before", {}, void 0, !0)
|
|
2107
2107
|
]),
|
|
2108
2108
|
key: "0"
|
|
@@ -2121,72 +2121,74 @@ const Sd = ["data-testid", "data-testlabel"], Td = { class: "item-label" }, Id =
|
|
|
2121
2121
|
domId: {},
|
|
2122
2122
|
id: {},
|
|
2123
2123
|
disabled: { type: Boolean },
|
|
2124
|
+
fieldDisabled: { type: Boolean },
|
|
2124
2125
|
getAll: { type: Function },
|
|
2125
2126
|
getPartial: { type: Function },
|
|
2126
2127
|
getOne: { type: Function }
|
|
2127
2128
|
},
|
|
2128
2129
|
emits: ["change"],
|
|
2129
2130
|
setup(e) {
|
|
2130
|
-
const t = ie(""), n = ie(!1), i = ie(!1), a = ie([]), r = ie([]), o = ie([]), s = async (
|
|
2131
|
+
const t = ie(""), n = ie(!1), i = ie(!1), a = ie([]), r = ie([]), o = ie([]), s = async (l) => {
|
|
2131
2132
|
try {
|
|
2132
2133
|
n.value = !0;
|
|
2133
|
-
const
|
|
2134
|
-
|
|
2135
|
-
} catch (
|
|
2136
|
-
a.value = [], t.value =
|
|
2134
|
+
const v = await l();
|
|
2135
|
+
v.length && (o.value = v), r.value = v, a.value = r.value.map(e.transformItem);
|
|
2136
|
+
} catch (v) {
|
|
2137
|
+
a.value = [], t.value = v.message;
|
|
2137
2138
|
} finally {
|
|
2138
2139
|
n.value = !1;
|
|
2139
2140
|
}
|
|
2140
|
-
},
|
|
2141
|
+
}, d = He((l = "") => {
|
|
2141
2142
|
if (i.value) {
|
|
2142
|
-
$t(
|
|
2143
|
+
$t(l) && e.allowUuidSearch ? E(l) : p(l);
|
|
2143
2144
|
return;
|
|
2144
2145
|
}
|
|
2145
|
-
if (!
|
|
2146
|
+
if (!l.trim()) {
|
|
2146
2147
|
o.value.length && !r.value.length && (a.value = o.value.map(e.transformItem));
|
|
2147
2148
|
return;
|
|
2148
2149
|
}
|
|
2149
|
-
$t(
|
|
2150
|
-
}, Od),
|
|
2151
|
-
const { data: { data:
|
|
2152
|
-
return (!
|
|
2153
|
-
}, f = async (
|
|
2154
|
-
const { data:
|
|
2155
|
-
return [
|
|
2156
|
-
}, p = (
|
|
2157
|
-
|
|
2158
|
-
},
|
|
2159
|
-
a.value = r.value.filter((
|
|
2160
|
-
};
|
|
2150
|
+
$t(l) && e.allowUuidSearch ? s(async () => await f(l)) : s(async () => await c(l));
|
|
2151
|
+
}, Od), c = async (l) => await e.getAll(l), h = async () => {
|
|
2152
|
+
const { data: { data: l, next: v, offset: w } } = await e.getPartial(Ed);
|
|
2153
|
+
return (!v || !w) && (i.value = !0), r.value = l, l;
|
|
2154
|
+
}, f = async (l) => {
|
|
2155
|
+
const { data: v } = await e.getOne(l);
|
|
2156
|
+
return [v];
|
|
2157
|
+
}, p = (l) => {
|
|
2158
|
+
l.trim() || (a.value = r.value.map(e.transformItem)), a.value = r.value.filter((v) => e.fields.some((w) => (v[w] || "").contains(l))).map(e.transformItem);
|
|
2159
|
+
}, E = (l) => {
|
|
2160
|
+
a.value = r.value.filter((v) => v.id === l).map(e.transformItem);
|
|
2161
|
+
}, N = L(() => !e.initialItem || a.value.some((l) => l.id === e.initialItem.id) ? a.value : [e.initialItem, ...a.value]);
|
|
2161
2162
|
return Vt(async () => {
|
|
2162
2163
|
await s(h);
|
|
2163
|
-
}), (
|
|
2164
|
-
id:
|
|
2165
|
-
|
|
2164
|
+
}), (l, v) => (u(), A(Ad, {
|
|
2165
|
+
id: l.id,
|
|
2166
|
+
disabled: l.fieldDisabled,
|
|
2167
|
+
"dom-id": l.domId,
|
|
2166
2168
|
"empty-message": t.value,
|
|
2167
2169
|
loading: n.value,
|
|
2168
|
-
placeholder:
|
|
2169
|
-
readonly:
|
|
2170
|
-
suggestions:
|
|
2171
|
-
onChange:
|
|
2172
|
-
onQueryChange:
|
|
2170
|
+
placeholder: l.placeholder,
|
|
2171
|
+
readonly: l.disabled,
|
|
2172
|
+
suggestions: N.value,
|
|
2173
|
+
onChange: v[0] || (v[0] = (w) => l.$emit("change", w)),
|
|
2174
|
+
onQueryChange: S(d)
|
|
2173
2175
|
}, at({
|
|
2174
|
-
"selected-item":
|
|
2175
|
-
fe(
|
|
2176
|
+
"selected-item": M(({ item: w }) => [
|
|
2177
|
+
fe(l.$slots, "selected-item", { item: w })
|
|
2176
2178
|
]),
|
|
2177
|
-
item:
|
|
2178
|
-
fe(
|
|
2179
|
+
item: M(({ item: w }) => [
|
|
2180
|
+
fe(l.$slots, "item", { item: w })
|
|
2179
2181
|
]),
|
|
2180
2182
|
_: 2
|
|
2181
2183
|
}, [
|
|
2182
|
-
|
|
2184
|
+
l.$slots.before ? {
|
|
2183
2185
|
name: "before",
|
|
2184
|
-
fn:
|
|
2185
|
-
fe(
|
|
2186
|
+
fn: M(() => [
|
|
2187
|
+
fe(l.$slots, "before")
|
|
2186
2188
|
]),
|
|
2187
2189
|
key: "0"
|
|
2188
2190
|
} : void 0
|
|
2189
|
-
]), 1032, ["id", "dom-id", "empty-message", "loading", "placeholder", "readonly", "suggestions", "onQueryChange"]));
|
|
2191
|
+
]), 1032, ["id", "disabled", "dom-id", "empty-message", "loading", "placeholder", "readonly", "suggestions", "onQueryChange"]));
|
|
2190
2192
|
}
|
|
2191
2193
|
}), Ot = 50, kd = {
|
|
2192
2194
|
components: {
|
|
@@ -2209,14 +2211,14 @@ const Sd = ["data-testid", "data-testlabel"], Td = { class: "item-label" }, Id =
|
|
|
2209
2211
|
idValue: "",
|
|
2210
2212
|
message: "Type something to search",
|
|
2211
2213
|
items: [],
|
|
2212
|
-
|
|
2214
|
+
initialItem: null,
|
|
2213
2215
|
loading: !1,
|
|
2214
2216
|
dataDrained: !1
|
|
2215
2217
|
};
|
|
2216
2218
|
},
|
|
2217
2219
|
computed: {
|
|
2218
2220
|
fieldState() {
|
|
2219
|
-
return
|
|
2221
|
+
return _i(this.model[this.schema.model], this.associatedEntity || this.entityId, this.bypassSearch);
|
|
2220
2222
|
},
|
|
2221
2223
|
associatedEntity() {
|
|
2222
2224
|
return this.$route && this.$route.params[this.entity];
|
|
@@ -2259,7 +2261,7 @@ const Sd = ["data-testid", "data-testlabel"], Td = { class: "item-label" }, Id =
|
|
|
2259
2261
|
case we.SET_REFERRAL_VALUE:
|
|
2260
2262
|
this.idValue = this.value;
|
|
2261
2263
|
}
|
|
2262
|
-
e && (this.
|
|
2264
|
+
e && (this.initialItem = this.transformItem(e)), this.loading = !1;
|
|
2263
2265
|
} catch (n) {
|
|
2264
2266
|
this.message = this.t("fields.auto_suggest.error.load_entity", { entity: this.schema.entity }), console.error("err!", n);
|
|
2265
2267
|
}
|
|
@@ -2335,120 +2337,121 @@ const Sd = ["data-testid", "data-testlabel"], Td = { class: "item-label" }, Id =
|
|
|
2335
2337
|
}
|
|
2336
2338
|
};
|
|
2337
2339
|
function Ud(e, t, n, i, a, r) {
|
|
2338
|
-
const o =
|
|
2339
|
-
return
|
|
2340
|
+
const o = F("ProgressIcon"), s = F("FieldScopedEntitySelect");
|
|
2341
|
+
return u(), A(ne(e.schema.disabled ? "k-tooltip" : "div"), {
|
|
2340
2342
|
class: "field-wrap autosuggest",
|
|
2341
2343
|
"max-width": "300",
|
|
2342
2344
|
text: i.t("general.disable_source_scope_change", { scope: r.scope })
|
|
2343
2345
|
}, {
|
|
2344
|
-
default:
|
|
2346
|
+
default: M(() => [
|
|
2345
2347
|
C(s, {
|
|
2346
2348
|
id: a.idValue,
|
|
2347
2349
|
"allow-uuid-search": r.allowUuidSearch,
|
|
2348
2350
|
disabled: a.loading,
|
|
2349
2351
|
"dom-id": e.schema.model,
|
|
2352
|
+
"field-disabled": e.schema.disabled,
|
|
2350
2353
|
fields: r.inputFieldsWithoutId,
|
|
2351
2354
|
"get-all": r.getAll,
|
|
2352
2355
|
"get-one": r.getOne,
|
|
2353
2356
|
"get-partial": r.getPartial,
|
|
2354
|
-
"initial-item": a.
|
|
2357
|
+
"initial-item": a.initialItem,
|
|
2355
2358
|
placeholder: a.loading ? i.t("fields.auto_suggest.loading") : e.schema.placeholder,
|
|
2356
2359
|
"transform-item": r.transformItem,
|
|
2357
2360
|
onChange: r.onSelected
|
|
2358
2361
|
}, at({ _: 2 }, [
|
|
2359
2362
|
a.loading ? {
|
|
2360
2363
|
name: "before",
|
|
2361
|
-
fn:
|
|
2364
|
+
fn: M(() => [
|
|
2362
2365
|
C(o, { size: i.KUI_ICON_SIZE_30 }, null, 8, ["size"])
|
|
2363
2366
|
]),
|
|
2364
2367
|
key: "0"
|
|
2365
2368
|
} : void 0
|
|
2366
|
-
]), 1032, ["id", "allow-uuid-search", "disabled", "dom-id", "fields", "get-all", "get-one", "get-partial", "initial-item", "placeholder", "transform-item", "onChange"])
|
|
2369
|
+
]), 1032, ["id", "allow-uuid-search", "disabled", "dom-id", "field-disabled", "fields", "get-all", "get-one", "get-partial", "initial-item", "placeholder", "transform-item", "onChange"])
|
|
2367
2370
|
]),
|
|
2368
2371
|
_: 1
|
|
2369
2372
|
}, 8, ["text"]);
|
|
2370
2373
|
}
|
|
2371
|
-
const Mi = /* @__PURE__ */ z(kd, [["render", Ud], ["__scopeId", "data-v-
|
|
2374
|
+
const Mi = /* @__PURE__ */ z(kd, [["render", Ud], ["__scopeId", "data-v-a5eec3ec"]]);
|
|
2372
2375
|
function $d(e) {
|
|
2373
|
-
const t = ie([]), n = ie(null), i = (
|
|
2376
|
+
const t = ie([]), n = ie(null), i = (l) => Re(l) ? Ne[l] != null ? Ne[l] : (console.warn(`'${l}' is not a validator function!`), null) : l, a = L({
|
|
2374
2377
|
get() {
|
|
2375
|
-
var
|
|
2376
|
-
let
|
|
2377
|
-
return Y(B(e.schema, "get")) ?
|
|
2378
|
+
var v, w;
|
|
2379
|
+
let l;
|
|
2380
|
+
return Y(B(e.schema, "get")) ? l = e.schema.get((v = e.model) == null ? void 0 : v.value) : l = B((w = e.model) == null ? void 0 : w.value, e.schema.model), E(l);
|
|
2378
2381
|
},
|
|
2379
|
-
set(
|
|
2380
|
-
const
|
|
2381
|
-
|
|
2382
|
+
set(l) {
|
|
2383
|
+
const v = a;
|
|
2384
|
+
l = N(l), Y(l) ? l(l, v) : s(l, v);
|
|
2382
2385
|
}
|
|
2383
|
-
}), r = (
|
|
2386
|
+
}), r = (l) => {
|
|
2384
2387
|
var b;
|
|
2385
|
-
|
|
2386
|
-
const
|
|
2387
|
-
let
|
|
2388
|
+
d();
|
|
2389
|
+
const v = B(e.formOptions, "validateAsync", !1);
|
|
2390
|
+
let w = [];
|
|
2388
2391
|
if (e.schema.readonly !== !0 && e.disabled !== !0) {
|
|
2389
|
-
const
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
}) :
|
|
2393
|
-
var
|
|
2394
|
-
if (
|
|
2395
|
-
|
|
2392
|
+
const O = [], U = (b = e.schema) == null ? void 0 : b.validator;
|
|
2393
|
+
U && (Array.isArray(U) ? ue(U, (T) => {
|
|
2394
|
+
O.push(i(T));
|
|
2395
|
+
}) : O.push(i(U))), Y(e.externalValidator) && O.push(e.externalValidator), ue(O, (T) => {
|
|
2396
|
+
var y, P;
|
|
2397
|
+
if (v)
|
|
2398
|
+
w.push(T(a.value, e.schema, (y = e.model) == null ? void 0 : y.value));
|
|
2396
2399
|
else {
|
|
2397
|
-
const x =
|
|
2400
|
+
const x = T(a.value, e.schema, (P = e.model) == null ? void 0 : P.value);
|
|
2398
2401
|
x && Y(x.then) ? x.then((_) => {
|
|
2399
2402
|
_ && (t.value = t.value.concat(_));
|
|
2400
2403
|
const I = t.value.length === 0;
|
|
2401
2404
|
e.emitValidated && e.emitValidated({ isValid: I, errors: t.value, field: e.schema });
|
|
2402
|
-
}) : x && (
|
|
2405
|
+
}) : x && (w = w.concat(x));
|
|
2403
2406
|
}
|
|
2404
2407
|
});
|
|
2405
2408
|
}
|
|
2406
|
-
const
|
|
2407
|
-
var
|
|
2408
|
-
let
|
|
2409
|
-
if (ue(li(
|
|
2410
|
-
Array.isArray(
|
|
2411
|
-
}), Y((
|
|
2412
|
-
const
|
|
2413
|
-
e.emitValidated && e.emitValidated({ isValid:
|
|
2409
|
+
const $ = (O) => {
|
|
2410
|
+
var T, y;
|
|
2411
|
+
let U = [];
|
|
2412
|
+
if (ue(li(O), (P) => {
|
|
2413
|
+
Array.isArray(P) && P.length > 0 ? U = U.concat(P) : Re(P) && U.push(P);
|
|
2414
|
+
}), Y((T = e.schema) == null ? void 0 : T.onValidated) && e.schema.onValidated((y = e.model) == null ? void 0 : y.value, U, e.schema), !l) {
|
|
2415
|
+
const P = U.length === 0;
|
|
2416
|
+
e.emitValidated && e.emitValidated({ isValid: P, errors: U, field: e.schema });
|
|
2414
2417
|
}
|
|
2415
|
-
return
|
|
2418
|
+
return O = U, U;
|
|
2416
2419
|
};
|
|
2417
|
-
return
|
|
2420
|
+
return v ? Promise.all(w).then($) : $(w);
|
|
2418
2421
|
}, o = () => {
|
|
2419
2422
|
Y(n.value) ? n.value() : n.value = He(
|
|
2420
2423
|
r,
|
|
2421
2424
|
B(e.schema, "validateDebounceTime", B(e.formOptions, "validateDebounceTime", 500))
|
|
2422
2425
|
);
|
|
2423
|
-
}, s = (
|
|
2424
|
-
var
|
|
2425
|
-
let
|
|
2426
|
-
Y(e.schema.set) ? (e.schema.set((
|
|
2427
|
-
},
|
|
2426
|
+
}, s = (l, v) => {
|
|
2427
|
+
var $, b, O;
|
|
2428
|
+
let w = !1;
|
|
2429
|
+
Y(e.schema.set) ? (e.schema.set(($ = e.model) == null ? void 0 : $.value, l), w = !0) : e.schema.model && (c(e.schema.model, l), w = !0), w && (e.emitModelUpdated && ((b = e.model) != null && b.value) && e.emitModelUpdated({ value: l, model: e.schema.model }), Y(e.schema.onChanged) && e.schema.onChanged((O = e.model) == null ? void 0 : O.value, l, v, e.schema), B(e.formOptions, "validateAfterChanged", !1) === !0 && (B(e.schema, "validateDebounceTime", B(e.formOptions, "validateDebounceTime", 0)) > 0 ? o() : r()));
|
|
2430
|
+
}, d = () => {
|
|
2428
2431
|
t.value.splice(0);
|
|
2429
|
-
},
|
|
2430
|
-
var
|
|
2431
|
-
let
|
|
2432
|
-
|
|
2433
|
-
let
|
|
2434
|
-
const
|
|
2435
|
-
for (; b <
|
|
2436
|
-
const
|
|
2437
|
-
if (b <
|
|
2438
|
-
|
|
2432
|
+
}, c = (l, v) => {
|
|
2433
|
+
var T;
|
|
2434
|
+
let w = l.replace(/\[(\w+)\]/g, ".$1");
|
|
2435
|
+
w = w.replace(/^\./, "");
|
|
2436
|
+
let $ = ((T = e.model) == null ? void 0 : T.value) || {}, b = 0;
|
|
2437
|
+
const O = w.split("."), U = O.length;
|
|
2438
|
+
for (; b < U; ) {
|
|
2439
|
+
const y = O[b];
|
|
2440
|
+
if (b < U - 1)
|
|
2441
|
+
$[y] !== void 0 || ($[y] = {}), $ = $[y];
|
|
2439
2442
|
else {
|
|
2440
|
-
|
|
2443
|
+
$[y] = v;
|
|
2441
2444
|
return;
|
|
2442
2445
|
}
|
|
2443
2446
|
++b;
|
|
2444
2447
|
}
|
|
2445
|
-
}, h = (
|
|
2446
|
-
const
|
|
2447
|
-
return zt(
|
|
2448
|
-
}, f = (
|
|
2448
|
+
}, h = (l, v = !1) => {
|
|
2449
|
+
const w = B(e.formOptions, "fieldIdPrefix", "");
|
|
2450
|
+
return zt(l, w) + (v ? "-" + di() : "");
|
|
2451
|
+
}, f = (l) => `${h(l)}-label`, p = () => B(e.schema, "fieldClasses", []), E = (l) => e.formatValueToField && typeof e.formatValueToField == "function" ? e.formatValueToField(l) : l, N = (l) => e.formatValueToModel && typeof e.formatValueToModel == "function" ? e.formatValueToModel(l) : l;
|
|
2449
2452
|
return {
|
|
2450
2453
|
value: a,
|
|
2451
|
-
clearValidationErrors:
|
|
2454
|
+
clearValidationErrors: d,
|
|
2452
2455
|
getFieldID: h,
|
|
2453
2456
|
getLabelId: f,
|
|
2454
2457
|
getFieldClasses: p,
|
|
@@ -2535,7 +2538,7 @@ const Me = {
|
|
|
2535
2538
|
},
|
|
2536
2539
|
emits: ["modelUpdated"],
|
|
2537
2540
|
setup(e, { expose: t, emit: n }) {
|
|
2538
|
-
const i = e, a = n, r = Le(i), o = st(ge, void 0), { updateModelValue: s, getFieldID:
|
|
2541
|
+
const i = e, a = n, r = Le(i), o = st(ge, void 0), { updateModelValue: s, getFieldID: d, clearValidationErrors: c, value: h } = Me.useAbstractFields({
|
|
2539
2542
|
model: r.model,
|
|
2540
2543
|
schema: i.schema,
|
|
2541
2544
|
formOptions: i.formOptions,
|
|
@@ -2544,11 +2547,11 @@ const Me = {
|
|
|
2544
2547
|
}
|
|
2545
2548
|
});
|
|
2546
2549
|
t({
|
|
2547
|
-
clearValidationErrors:
|
|
2550
|
+
clearValidationErrors: c
|
|
2548
2551
|
});
|
|
2549
2552
|
const f = L(() => {
|
|
2550
|
-
var
|
|
2551
|
-
const b = (
|
|
2553
|
+
var O;
|
|
2554
|
+
const b = (O = i.schema) == null ? void 0 : O.inputType.toLowerCase();
|
|
2552
2555
|
switch (b) {
|
|
2553
2556
|
case "string":
|
|
2554
2557
|
return "text";
|
|
@@ -2561,35 +2564,35 @@ const Me = {
|
|
|
2561
2564
|
date: "YYYY-MM-DD",
|
|
2562
2565
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
2563
2566
|
"datetime-local": "YYYY-MM-DDTHH:mm:ss"
|
|
2564
|
-
},
|
|
2565
|
-
var
|
|
2566
|
-
let
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2569
|
-
},
|
|
2570
|
-
ct(b) || (b = NaN), s(b,
|
|
2571
|
-
},
|
|
2572
|
-
let
|
|
2567
|
+
}, E = (b, O) => {
|
|
2568
|
+
var P, x;
|
|
2569
|
+
let U = b;
|
|
2570
|
+
const T = p[f.value] || "", y = Be.parse(b, T);
|
|
2571
|
+
y && ((P = i.schema) != null && P.format ? U = Be.format(y, (x = i.schema) == null ? void 0 : x.format) : U = y.valueOf()), s(U, O);
|
|
2572
|
+
}, N = (b, O) => {
|
|
2573
|
+
ct(b) || (b = NaN), s(b, O);
|
|
2574
|
+
}, l = (b) => {
|
|
2575
|
+
let O = b;
|
|
2573
2576
|
switch (f.value) {
|
|
2574
2577
|
case "number":
|
|
2575
2578
|
case "range":
|
|
2576
|
-
ct(parseFloat(b)) && (
|
|
2579
|
+
ct(parseFloat(b)) && (O = parseFloat(b));
|
|
2577
2580
|
break;
|
|
2578
2581
|
}
|
|
2579
|
-
h.value =
|
|
2580
|
-
},
|
|
2582
|
+
h.value = O, s(O, b);
|
|
2583
|
+
}, v = (b) => {
|
|
2581
2584
|
h.value = b, s(b, b);
|
|
2582
|
-
},
|
|
2585
|
+
}, w = ie(null), $ = () => {
|
|
2583
2586
|
var b;
|
|
2584
|
-
Y(
|
|
2587
|
+
Y(w.value) && ((b = w.value) == null || b.flush());
|
|
2585
2588
|
};
|
|
2586
2589
|
return Vt(() => {
|
|
2587
2590
|
switch (f.value) {
|
|
2588
2591
|
case "number":
|
|
2589
2592
|
case "range":
|
|
2590
|
-
|
|
2591
|
-
(b,
|
|
2592
|
-
|
|
2593
|
+
w.value = He(
|
|
2594
|
+
(b, O) => {
|
|
2595
|
+
N(b, O);
|
|
2593
2596
|
},
|
|
2594
2597
|
parseInt(B(i.schema, "debounceFormatTimeout", 1e3)),
|
|
2595
2598
|
{
|
|
@@ -2601,9 +2604,9 @@ const Me = {
|
|
|
2601
2604
|
case "date":
|
|
2602
2605
|
case "datetime":
|
|
2603
2606
|
case "datetime-local":
|
|
2604
|
-
|
|
2605
|
-
(b,
|
|
2606
|
-
|
|
2607
|
+
w.value = He(
|
|
2608
|
+
(b, O) => {
|
|
2609
|
+
E(b, O);
|
|
2607
2610
|
},
|
|
2608
2611
|
parseInt(B(i.schema, "debounceFormatTimeout", 1e3)),
|
|
2609
2612
|
{
|
|
@@ -2615,20 +2618,20 @@ const Me = {
|
|
|
2615
2618
|
}
|
|
2616
2619
|
}), Pt(() => {
|
|
2617
2620
|
f.value === "checkbox" ? console.warn("The use of 'checkbox' inputType with 'input' type fields is deprecated. Use 'checkbox' type instead.") : f.value === "radio" ? console.warn("The use of 'radio' inputType with 'input' type fields is deprecated. Use 'radio' type instead.") : f.value === "file" && console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.");
|
|
2618
|
-
}), (b,
|
|
2619
|
-
const
|
|
2620
|
-
return
|
|
2621
|
-
C(
|
|
2622
|
-
id:
|
|
2621
|
+
}), (b, O) => {
|
|
2622
|
+
const U = F("KInput");
|
|
2623
|
+
return u(), g("div", Rd, [
|
|
2624
|
+
C(U, Ee(b.$attrs, {
|
|
2625
|
+
id: S(d)(e.schema),
|
|
2623
2626
|
autocomplete: e.schema.autocomplete,
|
|
2624
2627
|
class: e.schema.fieldClasses,
|
|
2625
2628
|
disabled: e.disabled || void 0,
|
|
2626
|
-
help: e.hint ? e.hint : f.value === "color" || f.value === "range" ?
|
|
2629
|
+
help: e.hint ? e.hint : f.value === "color" || f.value === "range" ? S(h) : void 0,
|
|
2627
2630
|
max: e.schema.max,
|
|
2628
2631
|
maxlength: e.schema.maxlength,
|
|
2629
2632
|
min: e.schema.min,
|
|
2630
2633
|
minlength: e.schema.minlength,
|
|
2631
|
-
"model-value":
|
|
2634
|
+
"model-value": S(h),
|
|
2632
2635
|
name: e.schema.inputName,
|
|
2633
2636
|
pattern: e.schema.pattern,
|
|
2634
2637
|
placeholder: e.schema.placeholder,
|
|
@@ -2637,13 +2640,13 @@ const Me = {
|
|
|
2637
2640
|
"show-password-mask-toggle": f.value === "password",
|
|
2638
2641
|
type: f.value,
|
|
2639
2642
|
width: e.schema.width,
|
|
2640
|
-
onBlur:
|
|
2641
|
-
"onUpdate:modelValue":
|
|
2643
|
+
onBlur: $,
|
|
2644
|
+
"onUpdate:modelValue": l
|
|
2642
2645
|
}), null, 16, ["id", "autocomplete", "class", "disabled", "help", "max", "maxlength", "min", "minlength", "model-value", "name", "pattern", "placeholder", "readonly", "required", "show-password-mask-toggle", "type", "width"]),
|
|
2643
|
-
(
|
|
2646
|
+
(u(), A(ne(S(o)), {
|
|
2644
2647
|
schema: e.schema,
|
|
2645
|
-
update:
|
|
2646
|
-
value:
|
|
2648
|
+
update: v,
|
|
2649
|
+
value: S(h)
|
|
2647
2650
|
}, null, 8, ["schema", "value"]))
|
|
2648
2651
|
]);
|
|
2649
2652
|
};
|
|
@@ -2663,32 +2666,32 @@ const Me = {
|
|
|
2663
2666
|
class: "content"
|
|
2664
2667
|
};
|
|
2665
2668
|
function qd(e, t, n, i, a, r) {
|
|
2666
|
-
const o =
|
|
2667
|
-
return
|
|
2669
|
+
const o = F("AddIcon"), s = F("TrashIcon"), d = F("KButton");
|
|
2670
|
+
return u(), g("div", {
|
|
2668
2671
|
class: W(["field-dropdown", { active: a.contentVisible }])
|
|
2669
2672
|
}, [
|
|
2670
2673
|
m("div", {
|
|
2671
2674
|
class: "title",
|
|
2672
|
-
onClick: t[0] || (t[0] = (
|
|
2675
|
+
onClick: t[0] || (t[0] = (c) => a.contentVisible = !a.contentVisible)
|
|
2673
2676
|
}, [
|
|
2674
|
-
te(
|
|
2677
|
+
te(k(e.model.name ? e.model.name : "New Item") + " ", 1),
|
|
2675
2678
|
C(o, { class: "metric-add-icon" })
|
|
2676
2679
|
]),
|
|
2677
2680
|
C($i, { name: "slide-fade" }, {
|
|
2678
|
-
default:
|
|
2679
|
-
a.contentVisible ? (
|
|
2681
|
+
default: M(() => [
|
|
2682
|
+
a.contentVisible ? (u(), g("div", Ld, [
|
|
2680
2683
|
fe(e.$slots, "default"),
|
|
2681
|
-
C(
|
|
2684
|
+
C(d, {
|
|
2682
2685
|
appearance: "tertiary",
|
|
2683
2686
|
class: "metric-remove-button",
|
|
2684
|
-
onClick: t[1] || (t[1] = (
|
|
2687
|
+
onClick: t[1] || (t[1] = (c) => e.$emit("remove-item"))
|
|
2685
2688
|
}, {
|
|
2686
|
-
default:
|
|
2689
|
+
default: M(() => [
|
|
2687
2690
|
C(s)
|
|
2688
2691
|
]),
|
|
2689
2692
|
_: 1
|
|
2690
2693
|
})
|
|
2691
|
-
])) :
|
|
2694
|
+
])) : R("", !0)
|
|
2692
2695
|
]),
|
|
2693
2696
|
_: 3
|
|
2694
2697
|
})
|
|
@@ -2737,44 +2740,44 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
2737
2740
|
setup(e) {
|
|
2738
2741
|
return (t, n) => {
|
|
2739
2742
|
const i = Vn("attributes");
|
|
2740
|
-
return ce((
|
|
2741
|
-
t.schema.schema ? (
|
|
2743
|
+
return ce((u(), g("div", Kd, [
|
|
2744
|
+
t.schema.schema ? (u(), A(ee, {
|
|
2742
2745
|
key: 0,
|
|
2743
2746
|
model: t.value,
|
|
2744
2747
|
options: t.formOptions,
|
|
2745
2748
|
schema: t.schema.schema,
|
|
2746
2749
|
onModelUpdated: t.updateModel
|
|
2747
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : (
|
|
2750
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : (u(), g("div", Dd, [
|
|
2748
2751
|
m("table", {
|
|
2749
2752
|
id: t.getFieldID(t.schema),
|
|
2750
2753
|
class: W(t.schema.fieldClasses)
|
|
2751
2754
|
}, [
|
|
2752
|
-
(
|
|
2753
|
-
m("td", null,
|
|
2754
|
-
t.keyTypes[r] === "string" ? (
|
|
2755
|
+
(u(!0), g(K, null, J(t.value, (a, r) => (u(), g("tr", { key: r }, [
|
|
2756
|
+
m("td", null, k(r), 1),
|
|
2757
|
+
t.keyTypes[r] === "string" ? (u(), g("td", zd, [
|
|
2755
2758
|
ce(m("input", {
|
|
2756
2759
|
"onUpdate:modelValue": (o) => t.value[r] = o,
|
|
2757
2760
|
type: "text"
|
|
2758
2761
|
}, null, 8, Yd), [
|
|
2759
2762
|
[Je, t.value[r]]
|
|
2760
2763
|
])
|
|
2761
|
-
])) :
|
|
2762
|
-
t.keyTypes[r] === "boolean" ? (
|
|
2764
|
+
])) : R("", !0),
|
|
2765
|
+
t.keyTypes[r] === "boolean" ? (u(), g("td", Hd, [
|
|
2763
2766
|
ce(m("input", {
|
|
2764
2767
|
"onUpdate:modelValue": (o) => t.value[r] = o,
|
|
2765
2768
|
type: "checkbox"
|
|
2766
2769
|
}, null, 8, xd), [
|
|
2767
2770
|
[Vi, t.value[r]]
|
|
2768
2771
|
])
|
|
2769
|
-
])) :
|
|
2770
|
-
t.keyTypes[r] === "number" ? (
|
|
2772
|
+
])) : R("", !0),
|
|
2773
|
+
t.keyTypes[r] === "number" ? (u(), g("td", Gd, [
|
|
2771
2774
|
ce(m("input", {
|
|
2772
2775
|
"onUpdate:modelValue": (o) => t.value[r] = o,
|
|
2773
2776
|
type: "number"
|
|
2774
2777
|
}, null, 8, Wd), [
|
|
2775
2778
|
[Je, t.value[r]]
|
|
2776
2779
|
])
|
|
2777
|
-
])) :
|
|
2780
|
+
])) : R("", !0),
|
|
2778
2781
|
m("td", null, [
|
|
2779
2782
|
m("input", {
|
|
2780
2783
|
type: "button",
|
|
@@ -2892,16 +2895,16 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
2892
2895
|
const r = a.indexOf(n + "-");
|
|
2893
2896
|
if (r > -1 && Array.isArray(t))
|
|
2894
2897
|
if (t.length > 0) {
|
|
2895
|
-
const s = a.split("-").filter((
|
|
2896
|
-
s.length ? i[
|
|
2897
|
-
...i[
|
|
2898
|
+
const s = a.split("-").filter((c) => t.find((h) => h.model === c)), d = a.split(`-${s}`)[0].split(`${n}-`)[1];
|
|
2899
|
+
s.length ? i[d] = {
|
|
2900
|
+
...i[d],
|
|
2898
2901
|
[s]: e[a]
|
|
2899
2902
|
} : i[a.substring(r + `${n}-`.length)] = e[a];
|
|
2900
2903
|
} else
|
|
2901
2904
|
i[a.substring(`${n}-`.length)] = e[a];
|
|
2902
2905
|
else {
|
|
2903
|
-
const s = a.split("-").filter((
|
|
2904
|
-
|
|
2906
|
+
const s = a.split("-").filter((c) => c === this.schema.model), d = a.split(`-${s}`)[0].split(`${n}-`)[1];
|
|
2907
|
+
d && (i[d] = e[a]);
|
|
2905
2908
|
}
|
|
2906
2909
|
return a;
|
|
2907
2910
|
}), i;
|
|
@@ -2919,19 +2922,19 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
2919
2922
|
__name: "FieldObjectAdvanced",
|
|
2920
2923
|
setup(e) {
|
|
2921
2924
|
return (t, n) => {
|
|
2922
|
-
const i =
|
|
2923
|
-
return
|
|
2925
|
+
const i = F("KButton");
|
|
2926
|
+
return u(), g("div", {
|
|
2924
2927
|
id: t.getFieldID(t.schema),
|
|
2925
2928
|
class: W(["object-advanced-wrapper", t.schema.fieldClasses])
|
|
2926
2929
|
}, [
|
|
2927
|
-
(
|
|
2930
|
+
(u(!0), g(K, null, J(t.value, (a, r) => (u(), g("div", {
|
|
2928
2931
|
key: r,
|
|
2929
2932
|
"data-testid": `field-object-key-${r}`
|
|
2930
2933
|
}, [
|
|
2931
2934
|
m("div", null, [
|
|
2932
2935
|
m("div", tu, [
|
|
2933
2936
|
m("div", nu, [
|
|
2934
|
-
m("strong", null,
|
|
2937
|
+
m("strong", null, k(r), 1),
|
|
2935
2938
|
m("div", null, [
|
|
2936
2939
|
C(i, {
|
|
2937
2940
|
appearance: "tertiary",
|
|
@@ -2940,22 +2943,22 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
2940
2943
|
type: "button",
|
|
2941
2944
|
onClick: (o) => t.removeElement(r)
|
|
2942
2945
|
}, {
|
|
2943
|
-
default:
|
|
2944
|
-
C(
|
|
2946
|
+
default: M(() => [
|
|
2947
|
+
C(S(rt))
|
|
2945
2948
|
]),
|
|
2946
2949
|
_: 2
|
|
2947
2950
|
}, 1032, ["onClick"])
|
|
2948
2951
|
])
|
|
2949
2952
|
]),
|
|
2950
2953
|
n[1] || (n[1] = m("hr", { class: "divider" }, null, -1)),
|
|
2951
|
-
t.subSchema ? (
|
|
2954
|
+
t.subSchema ? (u(), g("div", iu, [
|
|
2952
2955
|
C(ee, {
|
|
2953
2956
|
model: t.transformedModel[r],
|
|
2954
2957
|
options: { helpAsHtml: !0 },
|
|
2955
2958
|
schema: t.subSchema,
|
|
2956
2959
|
onModelUpdated: t.updateModel
|
|
2957
2960
|
}, null, 8, ["model", "schema", "onModelUpdated"])
|
|
2958
|
-
])) : (
|
|
2961
|
+
])) : (u(), g("div", au, [
|
|
2959
2962
|
ce(m("input", {
|
|
2960
2963
|
"onUpdate:modelValue": (o) => t.value[r] = o,
|
|
2961
2964
|
class: "form-control",
|
|
@@ -2965,8 +2968,8 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
2965
2968
|
}, null, 40, ru), [
|
|
2966
2969
|
[Pn, t.value[r]]
|
|
2967
2970
|
]),
|
|
2968
|
-
t.schema.fields && t.schema.fields[0].schema.hint ? (
|
|
2969
|
-
(
|
|
2971
|
+
t.schema.fields && t.schema.fields[0].schema.hint ? (u(), g("p", su, k(t.schema.fields[0].schema.hint), 1)) : R("", !0),
|
|
2972
|
+
(u(), A(ne(t.autofillSlot), {
|
|
2970
2973
|
schema: t.schema.fields && t.schema.fields[0].schema || t.schema.values,
|
|
2971
2974
|
update: (o) => t.value[r] = o,
|
|
2972
2975
|
value: t.value[r]
|
|
@@ -2995,13 +2998,13 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
2995
2998
|
disabled: !t.newKeyName,
|
|
2996
2999
|
onClick: t.addKey
|
|
2997
3000
|
}, {
|
|
2998
|
-
default:
|
|
2999
|
-
te(" + Add " +
|
|
3001
|
+
default: M(() => [
|
|
3002
|
+
te(" + Add " + k(t.schema.buttonLabel || t.schema.label), 1)
|
|
3000
3003
|
]),
|
|
3001
3004
|
_: 1
|
|
3002
3005
|
}, 8, ["disabled", "onClick"])
|
|
3003
3006
|
]),
|
|
3004
|
-
t.schema.hintText ? (
|
|
3007
|
+
t.schema.hintText ? (u(), g("p", du, k(t.schema.hintText), 1)) : R("", !0)
|
|
3005
3008
|
], 2)
|
|
3006
3009
|
], 10, Xd);
|
|
3007
3010
|
};
|
|
@@ -3046,7 +3049,7 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
3046
3049
|
},
|
|
3047
3050
|
emits: ["modelUpdated"],
|
|
3048
3051
|
setup(e, { expose: t, emit: n }) {
|
|
3049
|
-
const i = e, a = n, r = Le(i), { updateModelValue: o, value: s, clearValidationErrors:
|
|
3052
|
+
const i = e, a = n, r = Le(i), { updateModelValue: o, value: s, clearValidationErrors: d } = Me.useAbstractFields({
|
|
3050
3053
|
model: r.model,
|
|
3051
3054
|
schema: i.schema,
|
|
3052
3055
|
formOptions: i.formOptions,
|
|
@@ -3055,26 +3058,26 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
3055
3058
|
}
|
|
3056
3059
|
});
|
|
3057
3060
|
t({
|
|
3058
|
-
clearValidationErrors:
|
|
3061
|
+
clearValidationErrors: d
|
|
3059
3062
|
});
|
|
3060
|
-
const
|
|
3063
|
+
const c = (h) => {
|
|
3061
3064
|
let f = h;
|
|
3062
3065
|
typeof h == "string" && (f = h.split(","), i.schema.array || (f = f.toString())), o(f, h);
|
|
3063
3066
|
};
|
|
3064
3067
|
return (h, f) => {
|
|
3065
|
-
const p =
|
|
3066
|
-
return
|
|
3067
|
-
(
|
|
3068
|
-
id: e.schema.name + "-" +
|
|
3069
|
-
key:
|
|
3070
|
-
modelValue:
|
|
3071
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
3072
|
-
label:
|
|
3068
|
+
const p = F("KRadio");
|
|
3069
|
+
return u(), g("div", mu, [
|
|
3070
|
+
(u(!0), g(K, null, J(e.schema.values, (E, N) => (u(), A(p, {
|
|
3071
|
+
id: e.schema.name + "-" + N,
|
|
3072
|
+
key: E.value,
|
|
3073
|
+
modelValue: S(s),
|
|
3074
|
+
"onUpdate:modelValue": f[0] || (f[0] = (l) => xe(s) ? s.value = l : null),
|
|
3075
|
+
label: E.name,
|
|
3073
3076
|
"label-attributes": { info: e.schema.help },
|
|
3074
3077
|
name: e.schema.name,
|
|
3075
3078
|
required: e.schema.required || void 0,
|
|
3076
|
-
"selected-value":
|
|
3077
|
-
onChange:
|
|
3079
|
+
"selected-value": E.value,
|
|
3080
|
+
onChange: c
|
|
3078
3081
|
}, null, 8, ["id", "modelValue", "label", "label-attributes", "name", "required", "selected-value"]))), 128))
|
|
3079
3082
|
]);
|
|
3080
3083
|
};
|
|
@@ -3119,61 +3122,61 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
3119
3122
|
},
|
|
3120
3123
|
emits: ["modelUpdated"],
|
|
3121
3124
|
setup(e, { expose: t, emit: n }) {
|
|
3122
|
-
const i = e, a = n, r = L(() => i.schema.selectOptions || {}), o = (
|
|
3125
|
+
const i = e, a = n, r = L(() => i.schema.selectOptions || {}), o = (l) => X(l) ? null : l, s = Le(i), { getFieldID: d, clearValidationErrors: c, value: h } = Me.useAbstractFields({
|
|
3123
3126
|
model: s.model,
|
|
3124
3127
|
schema: i.schema,
|
|
3125
3128
|
formOptions: i.formOptions,
|
|
3126
3129
|
formatValueToField: o,
|
|
3127
|
-
emitModelUpdated: (
|
|
3128
|
-
a("modelUpdated",
|
|
3130
|
+
emitModelUpdated: (l) => {
|
|
3131
|
+
a("modelUpdated", l.value, l.model);
|
|
3129
3132
|
}
|
|
3130
3133
|
});
|
|
3131
3134
|
t({
|
|
3132
|
-
clearValidationErrors:
|
|
3135
|
+
clearValidationErrors: c
|
|
3133
3136
|
});
|
|
3134
3137
|
const f = L(() => {
|
|
3135
|
-
const
|
|
3136
|
-
return p(typeof
|
|
3137
|
-
}), p = (
|
|
3138
|
-
const
|
|
3139
|
-
return
|
|
3140
|
-
|
|
3141
|
-
label:
|
|
3142
|
-
value:
|
|
3143
|
-
disabled: typeof
|
|
3144
|
-
group: typeof
|
|
3138
|
+
const l = i.schema.values;
|
|
3139
|
+
return p(typeof l == "function" ? l.apply(this, [i.model, i.schema]) : l);
|
|
3140
|
+
}), p = (l) => {
|
|
3141
|
+
const v = [];
|
|
3142
|
+
return l.forEach((w) => {
|
|
3143
|
+
v.push({
|
|
3144
|
+
label: N(w),
|
|
3145
|
+
value: E(w),
|
|
3146
|
+
disabled: typeof w == "object" && w.disabled || void 0,
|
|
3147
|
+
group: typeof w == "object" && String(w.group || "").toUpperCase() || void 0
|
|
3145
3148
|
});
|
|
3146
|
-
}),
|
|
3147
|
-
},
|
|
3148
|
-
if (he(
|
|
3149
|
+
}), v;
|
|
3150
|
+
}, E = (l) => {
|
|
3151
|
+
if (he(l)) {
|
|
3149
3152
|
if (r.value && typeof r.value.value < "u")
|
|
3150
|
-
return
|
|
3151
|
-
if (typeof
|
|
3152
|
-
return String(
|
|
3153
|
+
return l[r.value.value];
|
|
3154
|
+
if (typeof l.id < "u")
|
|
3155
|
+
return String(l.id);
|
|
3153
3156
|
throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items");
|
|
3154
3157
|
} else
|
|
3155
|
-
return
|
|
3156
|
-
},
|
|
3157
|
-
if (he(
|
|
3158
|
+
return l;
|
|
3159
|
+
}, N = (l) => {
|
|
3160
|
+
if (he(l)) {
|
|
3158
3161
|
if (r.value && typeof r.value.name < "u")
|
|
3159
|
-
return
|
|
3160
|
-
if (typeof
|
|
3161
|
-
return String(
|
|
3162
|
+
return l[r.value.name];
|
|
3163
|
+
if (typeof l.name < "u")
|
|
3164
|
+
return String(l.name);
|
|
3162
3165
|
throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items");
|
|
3163
3166
|
} else
|
|
3164
|
-
return String(
|
|
3167
|
+
return String(l);
|
|
3165
3168
|
};
|
|
3166
|
-
return (
|
|
3167
|
-
const
|
|
3168
|
-
return
|
|
3169
|
-
id:
|
|
3170
|
-
modelValue:
|
|
3171
|
-
"onUpdate:modelValue":
|
|
3169
|
+
return (l, v) => {
|
|
3170
|
+
const w = F("KSelect");
|
|
3171
|
+
return u(), A(w, {
|
|
3172
|
+
id: S(d)(e.schema),
|
|
3173
|
+
modelValue: S(h),
|
|
3174
|
+
"onUpdate:modelValue": v[0] || (v[0] = ($) => xe(h) ? h.value = $ : null),
|
|
3172
3175
|
class: W(e.schema.fieldClasses),
|
|
3173
3176
|
clearable: !e.schema.required,
|
|
3174
3177
|
disabled: e.disabled || void 0,
|
|
3175
3178
|
items: f.value,
|
|
3176
|
-
"kpop-attributes": { "data-testid": `${
|
|
3179
|
+
"kpop-attributes": { "data-testid": `${S(d)(e.schema)}-items` },
|
|
3177
3180
|
"label-attributes": { info: e.schema.help },
|
|
3178
3181
|
name: e.schema.inputName,
|
|
3179
3182
|
placeholder: r.value.hideNoneSelectedText ? void 0 : r.value.noneSelectedText || "Nothing Selected",
|
|
@@ -3221,8 +3224,8 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
3221
3224
|
let i;
|
|
3222
3225
|
return t && (i = JSON.parse(JSON.stringify(t)), (o = (r = (a = i.schema) == null ? void 0 : a.fields) == null ? void 0 : r.map) == null || o.call(r, (s) => (s.id = `${s.id || s.model}-${n}`, s))), {
|
|
3223
3226
|
...i,
|
|
3224
|
-
set(s,
|
|
3225
|
-
e[n] =
|
|
3227
|
+
set(s, d) {
|
|
3228
|
+
e[n] = d;
|
|
3226
3229
|
},
|
|
3227
3230
|
get() {
|
|
3228
3231
|
return e[n];
|
|
@@ -3250,57 +3253,57 @@ const Ti = /* @__PURE__ */ z(Nd, [["render", qd]]), Kd = { class: "field-object-
|
|
|
3250
3253
|
}
|
|
3251
3254
|
}, pu = ["id"], gu = { key: 1 }, vu = ["onUpdate:modelValue", "aria-labelledby", "type"], yu = ["onUpdate:modelValue", "aria-labelledby"];
|
|
3252
3255
|
function bu(e, t, n, i, a, r) {
|
|
3253
|
-
const o =
|
|
3254
|
-
return e.schema ? (
|
|
3256
|
+
const o = F("KTextArea"), s = F("KInput"), d = F("KButton");
|
|
3257
|
+
return e.schema ? (u(), g("div", {
|
|
3255
3258
|
key: 0,
|
|
3256
3259
|
id: e.getFieldID(e.schema),
|
|
3257
3260
|
class: W(e.schema.fieldClasses)
|
|
3258
3261
|
}, [
|
|
3259
|
-
(
|
|
3262
|
+
(u(!0), g(K, null, J(e.value, (c, h) => (u(), g("div", {
|
|
3260
3263
|
key: h,
|
|
3261
3264
|
class: W(e.schema.fieldItemsClasses)
|
|
3262
3265
|
}, [
|
|
3263
|
-
e.schema.items && e.schema.itemContainerComponent ? (
|
|
3266
|
+
e.schema.items && e.schema.itemContainerComponent ? (u(), A(ne(e.schema.itemContainerComponent), {
|
|
3264
3267
|
key: 0,
|
|
3265
3268
|
index: h,
|
|
3266
|
-
model:
|
|
3269
|
+
model: c,
|
|
3267
3270
|
schema: r.generateSchema(e.value, e.schema.items, h),
|
|
3268
3271
|
onRemoveItem: (f) => r.removeElement(h)
|
|
3269
3272
|
}, {
|
|
3270
|
-
default:
|
|
3271
|
-
(
|
|
3273
|
+
default: M(() => [
|
|
3274
|
+
(u(), A(ne(r.getFieldComponent(e.schema.items)), {
|
|
3272
3275
|
"form-options": e.formOptions,
|
|
3273
|
-
model:
|
|
3276
|
+
model: c,
|
|
3274
3277
|
schema: r.generateSchema(e.value, e.schema.items, h),
|
|
3275
3278
|
onModelUpdated: r.modelUpdated
|
|
3276
3279
|
}, null, 40, ["form-options", "model", "schema", "onModelUpdated"]))
|
|
3277
3280
|
]),
|
|
3278
3281
|
_: 2
|
|
3279
|
-
}, 1064, ["index", "model", "schema", "onRemoveItem"])) : e.schema.items ? (
|
|
3280
|
-
(
|
|
3282
|
+
}, 1064, ["index", "model", "schema", "onRemoveItem"])) : e.schema.items ? (u(), g("span", gu, [
|
|
3283
|
+
(u(), A(ne(r.getFieldComponent(e.schema.items)), {
|
|
3281
3284
|
"form-options": e.formOptions,
|
|
3282
|
-
model:
|
|
3285
|
+
model: c,
|
|
3283
3286
|
schema: r.generateSchema(e.value, e.schema.items, h),
|
|
3284
3287
|
onModelUpdated: r.modelUpdated
|
|
3285
3288
|
}, null, 40, ["form-options", "model", "schema", "onModelUpdated"]))
|
|
3286
|
-
])) : e.schema.itemContainerComponent ? (
|
|
3289
|
+
])) : e.schema.itemContainerComponent ? (u(), A(ne(e.schema.itemContainerComponent), {
|
|
3287
3290
|
key: 2,
|
|
3288
3291
|
"data-testid": `${e.getFieldID(e.schema)}-item-${h}`,
|
|
3289
|
-
model:
|
|
3292
|
+
model: c,
|
|
3290
3293
|
schema: r.generateSchema(e.value, e.schema.items, h),
|
|
3291
3294
|
onRemoveItem: (f) => r.removeElement(h)
|
|
3292
3295
|
}, {
|
|
3293
|
-
after:
|
|
3294
|
-
(
|
|
3296
|
+
after: M(() => [
|
|
3297
|
+
(u(), A(ne(r.autofillSlot), {
|
|
3295
3298
|
schema: e.schema,
|
|
3296
3299
|
update: (f) => e.value[h] = f,
|
|
3297
3300
|
value: e.value[h]
|
|
3298
3301
|
}, null, 8, ["schema", "update", "value"]))
|
|
3299
3302
|
]),
|
|
3300
|
-
default:
|
|
3303
|
+
default: M(() => {
|
|
3301
3304
|
var f;
|
|
3302
3305
|
return [
|
|
3303
|
-
e.schema.inputAttributes && e.schema.inputAttributes.type === "textarea" ? (
|
|
3306
|
+
e.schema.inputAttributes && e.schema.inputAttributes.type === "textarea" ? (u(), A(o, Ee({
|
|
3304
3307
|
key: 0,
|
|
3305
3308
|
ref_for: !0
|
|
3306
3309
|
}, e.schema.inputAttributes, {
|
|
@@ -3319,7 +3322,7 @@ function bu(e, t, n, i, a, r) {
|
|
|
3319
3322
|
required: e.schema.required,
|
|
3320
3323
|
resizable: "",
|
|
3321
3324
|
rows: e.schema.rows || 3
|
|
3322
|
-
}), null, 16, ["id", "modelValue", "onUpdate:modelValue", "aria-labelledby", "character-limit", "class", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows"])) : !e.schema.inputAttributes || !e.schema.inputAttributes.type || e.schema.inputAttributes.type === "text" || e.schema.inputAttributes.type === "number" ? (
|
|
3325
|
+
}), null, 16, ["id", "modelValue", "onUpdate:modelValue", "aria-labelledby", "character-limit", "class", "maxlength", "minlength", "name", "placeholder", "readonly", "required", "rows"])) : !e.schema.inputAttributes || !e.schema.inputAttributes.type || e.schema.inputAttributes.type === "text" || e.schema.inputAttributes.type === "number" ? (u(), A(s, Ee({
|
|
3323
3326
|
key: 1,
|
|
3324
3327
|
"aria-labelledby": e.getLabelId(e.schema),
|
|
3325
3328
|
ref_for: !0
|
|
@@ -3329,7 +3332,7 @@ function bu(e, t, n, i, a, r) {
|
|
|
3329
3332
|
onInput: (p) => {
|
|
3330
3333
|
r.handleInput(p, h);
|
|
3331
3334
|
}
|
|
3332
|
-
}), null, 16, ["aria-labelledby", "model-value", "type", "onInput"])) : ce((
|
|
3335
|
+
}), null, 16, ["aria-labelledby", "model-value", "type", "onInput"])) : ce((u(), g("input", Ee({
|
|
3333
3336
|
key: 2,
|
|
3334
3337
|
"onUpdate:modelValue": (p) => e.value[h] = p,
|
|
3335
3338
|
"aria-labelledby": e.getLabelId(e.schema),
|
|
@@ -3342,7 +3345,7 @@ function bu(e, t, n, i, a, r) {
|
|
|
3342
3345
|
];
|
|
3343
3346
|
}),
|
|
3344
3347
|
_: 2
|
|
3345
|
-
}, 1064, ["data-testid", "model", "schema", "onRemoveItem"])) : (
|
|
3348
|
+
}, 1064, ["data-testid", "model", "schema", "onRemoveItem"])) : (u(), g(K, { key: 3 }, [
|
|
3346
3349
|
ce(m("input", Ee({ ref_for: !0 }, e.schema.inputAttributes, {
|
|
3347
3350
|
"onUpdate:modelValue": (f) => e.value[h] = f,
|
|
3348
3351
|
"aria-labelledby": e.getLabelId(e.schema),
|
|
@@ -3350,26 +3353,26 @@ function bu(e, t, n, i, a, r) {
|
|
|
3350
3353
|
}), null, 16, yu), [
|
|
3351
3354
|
[Je, e.value[h]]
|
|
3352
3355
|
]),
|
|
3353
|
-
(
|
|
3356
|
+
(u(), A(ne(r.autofillSlot), {
|
|
3354
3357
|
schema: e.schema,
|
|
3355
3358
|
update: (f) => e.value[h] = f,
|
|
3356
3359
|
value: e.value[h]
|
|
3357
3360
|
}, null, 8, ["schema", "update", "value"]))
|
|
3358
3361
|
], 64))
|
|
3359
3362
|
], 2))), 128)),
|
|
3360
|
-
C(
|
|
3363
|
+
C(d, {
|
|
3361
3364
|
appearance: "tertiary",
|
|
3362
3365
|
class: W(e.schema.newElementButtonLabelClasses),
|
|
3363
3366
|
"data-testid": `add-${e.getFieldID(e.schema)}`,
|
|
3364
3367
|
type: "button",
|
|
3365
3368
|
onClick: r.newElement
|
|
3366
3369
|
}, {
|
|
3367
|
-
default:
|
|
3368
|
-
te(
|
|
3370
|
+
default: M(() => [
|
|
3371
|
+
te(k(e.schema.newElementButtonLabel || n.newElementButtonLabel), 1)
|
|
3369
3372
|
]),
|
|
3370
3373
|
_: 1
|
|
3371
3374
|
}, 8, ["class", "data-testid", "onClick"])
|
|
3372
|
-
], 10, pu)) :
|
|
3375
|
+
], 10, pu)) : R("", !0);
|
|
3373
3376
|
}
|
|
3374
3377
|
const _u = /* @__PURE__ */ z(hu, [["render", bu], ["__scopeId", "data-v-ae802bb2"]]), wu = { class: "form-field-wrapper field-checkbox" }, Mu = /* @__PURE__ */ re({
|
|
3375
3378
|
__name: "FieldCheckbox",
|
|
@@ -3411,22 +3414,22 @@ const _u = /* @__PURE__ */ z(hu, [["render", bu], ["__scopeId", "data-v-ae802bb2
|
|
|
3411
3414
|
},
|
|
3412
3415
|
emits: ["modelUpdated"],
|
|
3413
3416
|
setup(e, { expose: t, emit: n }) {
|
|
3414
|
-
const i = e, a = n, r = Le(i), { getFieldID: o, value: s, clearValidationErrors:
|
|
3417
|
+
const i = e, a = n, r = Le(i), { getFieldID: o, value: s, clearValidationErrors: d } = Me.useAbstractFields({
|
|
3415
3418
|
model: r.model,
|
|
3416
3419
|
schema: i.schema,
|
|
3417
3420
|
formOptions: i.formOptions,
|
|
3418
|
-
emitModelUpdated: (
|
|
3419
|
-
a("modelUpdated",
|
|
3421
|
+
emitModelUpdated: (c) => {
|
|
3422
|
+
a("modelUpdated", c.value, c.model);
|
|
3420
3423
|
}
|
|
3421
3424
|
});
|
|
3422
3425
|
return t({
|
|
3423
|
-
clearValidationErrors:
|
|
3424
|
-
}), (
|
|
3425
|
-
const f =
|
|
3426
|
-
return
|
|
3427
|
-
C(f, Ee(
|
|
3428
|
-
id:
|
|
3429
|
-
modelValue:
|
|
3426
|
+
clearValidationErrors: d
|
|
3427
|
+
}), (c, h) => {
|
|
3428
|
+
const f = F("KCheckbox");
|
|
3429
|
+
return u(), g("div", wu, [
|
|
3430
|
+
C(f, Ee(c.$attrs, {
|
|
3431
|
+
id: S(o)(e.schema),
|
|
3432
|
+
modelValue: S(s),
|
|
3430
3433
|
"onUpdate:modelValue": h[0] || (h[0] = (p) => xe(s) ? s.value = p : null),
|
|
3431
3434
|
autocomplete: e.schema.autocomplete,
|
|
3432
3435
|
class: e.schema.fieldClasses,
|
|
@@ -3443,13 +3446,13 @@ const _u = /* @__PURE__ */ z(hu, [["render", bu], ["__scopeId", "data-v-ae802bb2
|
|
|
3443
3446
|
}), Su = /* @__PURE__ */ z(Mu, [["__scopeId", "data-v-6b4ee1cd"]]), Tu = { class: "wrapper" }, Iu = ["disabled"], Cu = ["id", "checked", "disabled", "onChange", "name"], Au = ["disabled"], Ou = { class: "info" }, Eu = { class: "dropList" }, Fu = ["id", "checked", "disabled", "onChange", "name"];
|
|
3444
3447
|
function ku(e, t, n, i, a, r) {
|
|
3445
3448
|
const o = Vn("attributes");
|
|
3446
|
-
return ce((
|
|
3447
|
-
e.schema.listBox ? (
|
|
3449
|
+
return ce((u(), g("div", Tu, [
|
|
3450
|
+
e.schema.listBox ? (u(), g("div", {
|
|
3448
3451
|
key: 0,
|
|
3449
3452
|
class: "listbox form-control",
|
|
3450
3453
|
disabled: e.disabled || null
|
|
3451
3454
|
}, [
|
|
3452
|
-
(
|
|
3455
|
+
(u(!0), g(K, null, J(r.items, (s) => (u(), g("div", {
|
|
3453
3456
|
class: W(["list-row", { "is-checked": r.isItemChecked(s) }])
|
|
3454
3457
|
}, [
|
|
3455
3458
|
m("label", null, [
|
|
@@ -3458,16 +3461,16 @@ function ku(e, t, n, i, a, r) {
|
|
|
3458
3461
|
type: "checkbox",
|
|
3459
3462
|
checked: r.isItemChecked(s) || null,
|
|
3460
3463
|
disabled: e.disabled || null,
|
|
3461
|
-
onChange: (
|
|
3464
|
+
onChange: (d) => r.onChanged(d, s),
|
|
3462
3465
|
name: r.getInputName(s)
|
|
3463
3466
|
}, null, 40, Cu), [
|
|
3464
3467
|
[o, "input"]
|
|
3465
3468
|
]),
|
|
3466
|
-
te(
|
|
3469
|
+
te(k(r.getItemName(s)), 1)
|
|
3467
3470
|
])
|
|
3468
3471
|
], 2))), 256))
|
|
3469
|
-
], 8, Iu)) :
|
|
3470
|
-
e.schema.listBox ?
|
|
3472
|
+
], 8, Iu)) : R("", !0),
|
|
3473
|
+
e.schema.listBox ? R("", !0) : (u(), g("div", {
|
|
3471
3474
|
key: 1,
|
|
3472
3475
|
class: "combobox form-control",
|
|
3473
3476
|
disabled: e.disabled || null
|
|
@@ -3476,11 +3479,11 @@ function ku(e, t, n, i, a, r) {
|
|
|
3476
3479
|
class: W(["mainRow", { expanded: a.comboExpanded }]),
|
|
3477
3480
|
onClick: t[0] || (t[0] = (...s) => r.onExpandCombo && r.onExpandCombo(...s))
|
|
3478
3481
|
}, [
|
|
3479
|
-
m("div", Ou,
|
|
3482
|
+
m("div", Ou, k(r.selectedCount) + " selected", 1),
|
|
3480
3483
|
t[1] || (t[1] = m("div", { class: "arrow" }, null, -1))
|
|
3481
3484
|
], 2),
|
|
3482
3485
|
m("div", Eu, [
|
|
3483
|
-
a.comboExpanded ? (
|
|
3486
|
+
a.comboExpanded ? (u(!0), g(K, { key: 0 }, J(r.items, (s) => (u(), g("div", {
|
|
3484
3487
|
class: W(["list-row", { "is-checked": r.isItemChecked(s) }])
|
|
3485
3488
|
}, [
|
|
3486
3489
|
m("label", null, [
|
|
@@ -3489,14 +3492,14 @@ function ku(e, t, n, i, a, r) {
|
|
|
3489
3492
|
type: "checkbox",
|
|
3490
3493
|
checked: r.isItemChecked(s) || null,
|
|
3491
3494
|
disabled: e.disabled || null,
|
|
3492
|
-
onChange: (
|
|
3495
|
+
onChange: (d) => r.onChanged(d, s),
|
|
3493
3496
|
name: r.getInputName(s)
|
|
3494
3497
|
}, null, 40, Fu), [
|
|
3495
3498
|
[o, "input"]
|
|
3496
3499
|
]),
|
|
3497
|
-
te(
|
|
3500
|
+
te(k(r.getItemName(s)), 1)
|
|
3498
3501
|
])
|
|
3499
|
-
], 2))), 256)) :
|
|
3502
|
+
], 2))), 256)) : R("", !0)
|
|
3500
3503
|
])
|
|
3501
3504
|
], 8, Au))
|
|
3502
3505
|
])), [
|
|
@@ -3615,54 +3618,54 @@ const Uu = {
|
|
|
3615
3618
|
}
|
|
3616
3619
|
}, Pu = { class: "key-value-pairs-editor" }, Ru = { class: "pair-item-cell" }, ju = ["data-testid", "placeholder", "value", "onInput"], Nu = { class: "pair-item-cell" }, Lu = ["data-testid", "placeholder", "value", "onInput"];
|
|
3617
3620
|
function qu(e, t, n, i, a, r) {
|
|
3618
|
-
const o =
|
|
3619
|
-
return
|
|
3620
|
-
(
|
|
3621
|
-
key:
|
|
3621
|
+
const o = F("TrashIcon"), s = F("KButton");
|
|
3622
|
+
return u(), g("div", Pu, [
|
|
3623
|
+
(u(!0), g(K, null, J(a.pairs, (d, c) => (u(), g("div", {
|
|
3624
|
+
key: c,
|
|
3622
3625
|
class: "pair-item"
|
|
3623
3626
|
}, [
|
|
3624
3627
|
m("div", Ru, [
|
|
3625
3628
|
m("input", {
|
|
3626
3629
|
class: "form-control",
|
|
3627
|
-
"data-testid": `${e.getFieldID(e.schema)}-pair-key-${
|
|
3630
|
+
"data-testid": `${e.getFieldID(e.schema)}-pair-key-${c}`,
|
|
3628
3631
|
placeholder: e.schema.keyInputPlaceholder ?? "Key",
|
|
3629
3632
|
type: "text",
|
|
3630
|
-
value:
|
|
3633
|
+
value: d.key,
|
|
3631
3634
|
onInput: (h) => {
|
|
3632
|
-
r.onInput(h,
|
|
3635
|
+
r.onInput(h, c, "key");
|
|
3633
3636
|
}
|
|
3634
3637
|
}, null, 40, ju),
|
|
3635
|
-
(
|
|
3638
|
+
(u(), A(ne(r.autofillSlot), {
|
|
3636
3639
|
schema: e.schema,
|
|
3637
|
-
update: (h) => r.onInput({ target: { value: h } },
|
|
3638
|
-
value:
|
|
3640
|
+
update: (h) => r.onInput({ target: { value: h } }, c, "key"),
|
|
3641
|
+
value: d.key
|
|
3639
3642
|
}, null, 8, ["schema", "update", "value"]))
|
|
3640
3643
|
]),
|
|
3641
3644
|
m("div", Nu, [
|
|
3642
3645
|
m("input", {
|
|
3643
3646
|
class: "form-control",
|
|
3644
|
-
"data-testid": `${e.getFieldID(e.schema)}-pair-value-${
|
|
3647
|
+
"data-testid": `${e.getFieldID(e.schema)}-pair-value-${c}`,
|
|
3645
3648
|
placeholder: e.schema.valueInputPlaceholder ?? "Value",
|
|
3646
3649
|
type: "text",
|
|
3647
|
-
value:
|
|
3650
|
+
value: d.value,
|
|
3648
3651
|
onInput: (h) => {
|
|
3649
|
-
r.onInput(h,
|
|
3652
|
+
r.onInput(h, c, "value");
|
|
3650
3653
|
}
|
|
3651
3654
|
}, null, 40, Lu),
|
|
3652
|
-
(
|
|
3655
|
+
(u(), A(ne(r.autofillSlot), {
|
|
3653
3656
|
schema: e.schema,
|
|
3654
|
-
update: (h) => r.onInput({ target: { value: h } },
|
|
3655
|
-
value:
|
|
3657
|
+
update: (h) => r.onInput({ target: { value: h } }, c, "value"),
|
|
3658
|
+
value: d.value
|
|
3656
3659
|
}, null, 8, ["schema", "update", "value"]))
|
|
3657
3660
|
]),
|
|
3658
3661
|
C(s, {
|
|
3659
3662
|
appearance: "tertiary",
|
|
3660
|
-
"data-testid": `${e.getFieldID(e.schema)}-remove-pair-${
|
|
3663
|
+
"data-testid": `${e.getFieldID(e.schema)}-remove-pair-${c}`,
|
|
3661
3664
|
onClick: () => {
|
|
3662
|
-
r.removePair(
|
|
3665
|
+
r.removePair(c);
|
|
3663
3666
|
}
|
|
3664
3667
|
}, {
|
|
3665
|
-
default:
|
|
3668
|
+
default: M(() => [
|
|
3666
3669
|
C(o)
|
|
3667
3670
|
]),
|
|
3668
3671
|
_: 2
|
|
@@ -3675,8 +3678,8 @@ function qu(e, t, n, i, a, r) {
|
|
|
3675
3678
|
type: "button",
|
|
3676
3679
|
onClick: r.addPair
|
|
3677
3680
|
}, {
|
|
3678
|
-
default:
|
|
3679
|
-
te(
|
|
3681
|
+
default: M(() => [
|
|
3682
|
+
te(k(e.schema.newElementButtonLabel ?? "+ Add Pair"), 1)
|
|
3680
3683
|
]),
|
|
3681
3684
|
_: 1
|
|
3682
3685
|
}, 8, ["class", "data-testid", "onClick"])
|
|
@@ -3715,15 +3718,15 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
3715
3718
|
formOptions: t.formOptions
|
|
3716
3719
|
});
|
|
3717
3720
|
return (r, o) => {
|
|
3718
|
-
const s =
|
|
3719
|
-
return
|
|
3721
|
+
const s = F("KLabel");
|
|
3722
|
+
return u(), g("span", {
|
|
3720
3723
|
class: W(["field-label", e.schema.fieldClasses])
|
|
3721
3724
|
}, [
|
|
3722
3725
|
C(s, {
|
|
3723
|
-
id:
|
|
3726
|
+
id: S(i)(e.schema)
|
|
3724
3727
|
}, {
|
|
3725
|
-
default:
|
|
3726
|
-
te(
|
|
3728
|
+
default: M(() => [
|
|
3729
|
+
te(k(S(a)), 1)
|
|
3727
3730
|
]),
|
|
3728
3731
|
_: 1
|
|
3729
3732
|
}, 8, ["id"])
|
|
@@ -3770,7 +3773,7 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
3770
3773
|
},
|
|
3771
3774
|
emits: ["modelUpdated"],
|
|
3772
3775
|
setup(e, { expose: t, emit: n }) {
|
|
3773
|
-
const i = e, a = n, r = Ri(i, "model"), { getLabelId: o, getFieldID: s, clearValidationErrors:
|
|
3776
|
+
const i = e, a = n, r = Ri(i, "model"), { getLabelId: o, getFieldID: s, clearValidationErrors: d, value: c } = Me.useAbstractFields({
|
|
3774
3777
|
model: r,
|
|
3775
3778
|
schema: i.schema,
|
|
3776
3779
|
formOptions: i.formOptions,
|
|
@@ -3779,24 +3782,24 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
3779
3782
|
}
|
|
3780
3783
|
});
|
|
3781
3784
|
t({
|
|
3782
|
-
clearValidationErrors:
|
|
3785
|
+
clearValidationErrors: d
|
|
3783
3786
|
});
|
|
3784
3787
|
const h = L(() => {
|
|
3785
3788
|
var f, p;
|
|
3786
|
-
return i.schema.values ? i.schema.values : (p = (f = i.schema.elements) == null ? void 0 : f.one_of) != null && p.length ? i.schema.elements.one_of.map((
|
|
3789
|
+
return i.schema.values ? i.schema.values : (p = (f = i.schema.elements) == null ? void 0 : f.one_of) != null && p.length ? i.schema.elements.one_of.map((E) => ({ label: String(E), value: String(E) })) : [];
|
|
3787
3790
|
});
|
|
3788
3791
|
return (f, p) => {
|
|
3789
|
-
const
|
|
3790
|
-
return
|
|
3791
|
-
id:
|
|
3792
|
-
modelValue:
|
|
3793
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
3794
|
-
"aria-labelledby":
|
|
3792
|
+
const E = F("KMultiselect");
|
|
3793
|
+
return u(), A(E, {
|
|
3794
|
+
id: S(s)(e.schema),
|
|
3795
|
+
modelValue: S(c),
|
|
3796
|
+
"onUpdate:modelValue": p[0] || (p[0] = (N) => xe(c) ? c.value = N : null),
|
|
3797
|
+
"aria-labelledby": S(o)(e.schema),
|
|
3795
3798
|
class: W(e.schema.fieldClasses),
|
|
3796
3799
|
"data-testid": "field-multiselect",
|
|
3797
3800
|
disabled: e.disabled || void 0,
|
|
3798
3801
|
items: h.value,
|
|
3799
|
-
"kpop-attributes": { "data-testid": `${
|
|
3802
|
+
"kpop-attributes": { "data-testid": `${S(s)(e.schema)}-items` },
|
|
3800
3803
|
"label-attributes": { info: e.schema.help },
|
|
3801
3804
|
name: e.schema.inputName,
|
|
3802
3805
|
placeholder: e.schema.placeholder,
|
|
@@ -3847,15 +3850,15 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
3847
3850
|
__name: "FieldSelectionGroup",
|
|
3848
3851
|
setup(e) {
|
|
3849
3852
|
const { t } = ve("en-us", be);
|
|
3850
|
-
return (n, i) => (
|
|
3851
|
-
(
|
|
3853
|
+
return (n, i) => (u(), g("div", Yu, [
|
|
3854
|
+
(u(), A(ne(n.$props.disabled ? "k-tooltip" : "div"), {
|
|
3852
3855
|
"max-width": "300",
|
|
3853
|
-
text:
|
|
3856
|
+
text: S(t)("general.disable_global_radio", { scope: n.scope })
|
|
3854
3857
|
}, {
|
|
3855
|
-
default:
|
|
3858
|
+
default: M(() => [
|
|
3856
3859
|
m("div", Hu, [
|
|
3857
3860
|
m("div", xu, [
|
|
3858
|
-
(
|
|
3861
|
+
(u(!0), g(K, null, J(n.schema.fields, (a, r) => (u(), g("div", {
|
|
3859
3862
|
key: r,
|
|
3860
3863
|
class: W(["option-group", { "radio-disabled": n.$props.disabled }])
|
|
3861
3864
|
}, [
|
|
@@ -3871,8 +3874,8 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
3871
3874
|
}, null, 8, Gu), [
|
|
3872
3875
|
[ji, n.checkedGroup]
|
|
3873
3876
|
]),
|
|
3874
|
-
te(" " +
|
|
3875
|
-
m("div", Wu,
|
|
3877
|
+
te(" " + k(a.label) + " ", 1),
|
|
3878
|
+
m("div", Wu, k(a.description), 1)
|
|
3876
3879
|
], 2)
|
|
3877
3880
|
], 2))), 128))
|
|
3878
3881
|
])
|
|
@@ -3880,7 +3883,7 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
3880
3883
|
]),
|
|
3881
3884
|
_: 1
|
|
3882
3885
|
}, 8, ["text"])),
|
|
3883
|
-
(
|
|
3886
|
+
(u(!0), g(K, null, J(n.schema.fields, (a, r) => (u(), g("div", {
|
|
3884
3887
|
key: r,
|
|
3885
3888
|
class: "option-group"
|
|
3886
3889
|
}, [
|
|
@@ -3939,8 +3942,8 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
3939
3942
|
},
|
|
3940
3943
|
emits: ["modelUpdated"],
|
|
3941
3944
|
setup(e, { expose: t, emit: n }) {
|
|
3942
|
-
const i = e, a = n, { t: r } = ve("en-us", be), o = (p) => p != null && i.schema.valueOn ? p === i.schema.valueOn : p, s = (p) => p != null && i.schema.valueOn ? p ? i.schema.valueOn : i.schema.valueOff : p,
|
|
3943
|
-
model:
|
|
3945
|
+
const i = e, a = n, { t: r } = ve("en-us", be), o = (p) => p != null && i.schema.valueOn ? p === i.schema.valueOn : p, s = (p) => p != null && i.schema.valueOn ? p ? i.schema.valueOn : i.schema.valueOff : p, d = Le(i), { getFieldID: c, value: h, clearValidationErrors: f } = Me.useAbstractFields({
|
|
3946
|
+
model: d.model,
|
|
3944
3947
|
schema: i.schema,
|
|
3945
3948
|
formOptions: i.formOptions,
|
|
3946
3949
|
formatValueToField: o,
|
|
@@ -3951,17 +3954,17 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
3951
3954
|
});
|
|
3952
3955
|
return t({
|
|
3953
3956
|
clearValidationErrors: f
|
|
3954
|
-
}), (p,
|
|
3955
|
-
const
|
|
3956
|
-
return
|
|
3957
|
-
C(
|
|
3958
|
-
id:
|
|
3959
|
-
modelValue:
|
|
3960
|
-
"onUpdate:modelValue":
|
|
3957
|
+
}), (p, E) => {
|
|
3958
|
+
const N = F("KInputSwitch");
|
|
3959
|
+
return u(), g("div", tc, [
|
|
3960
|
+
C(N, {
|
|
3961
|
+
id: S(c)(e.schema),
|
|
3962
|
+
modelValue: S(h),
|
|
3963
|
+
"onUpdate:modelValue": E[0] || (E[0] = (l) => xe(h) ? h.value = l : null),
|
|
3961
3964
|
autocomplete: e.schema.autocomplete,
|
|
3962
3965
|
class: W(e.schema.fieldClasses),
|
|
3963
3966
|
disabled: e.disabled || void 0,
|
|
3964
|
-
label:
|
|
3967
|
+
label: S(h) ? e.schema.textOn || S(r)("vfg.labels.on") : e.schema.textOff || S(r)("vfg.labels.off"),
|
|
3965
3968
|
"label-attributes": { info: e.schema.help },
|
|
3966
3969
|
name: e.schema.inputName,
|
|
3967
3970
|
required: e.schema.required || void 0
|
|
@@ -4009,7 +4012,7 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
4009
4012
|
},
|
|
4010
4013
|
emits: ["modelUpdated"],
|
|
4011
4014
|
setup(e, { expose: t, emit: n }) {
|
|
4012
|
-
const i = e, a = n, r = Le(i), o = st(ge, void 0), { updateModelValue: s, getFieldID:
|
|
4015
|
+
const i = e, a = n, r = Le(i), o = st(ge, void 0), { updateModelValue: s, getFieldID: d, clearValidationErrors: c, value: h } = Me.useAbstractFields({
|
|
4013
4016
|
model: r.model,
|
|
4014
4017
|
schema: i.schema,
|
|
4015
4018
|
formOptions: i.formOptions,
|
|
@@ -4018,18 +4021,18 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
4018
4021
|
}
|
|
4019
4022
|
});
|
|
4020
4023
|
t({
|
|
4021
|
-
clearValidationErrors:
|
|
4024
|
+
clearValidationErrors: c
|
|
4022
4025
|
});
|
|
4023
4026
|
const f = (p) => {
|
|
4024
4027
|
h.value = p, s(p, p);
|
|
4025
4028
|
};
|
|
4026
|
-
return (p,
|
|
4027
|
-
const
|
|
4028
|
-
return
|
|
4029
|
-
C(
|
|
4030
|
-
id:
|
|
4031
|
-
modelValue:
|
|
4032
|
-
"onUpdate:modelValue":
|
|
4029
|
+
return (p, E) => {
|
|
4030
|
+
const N = F("KTextArea");
|
|
4031
|
+
return u(), g("div", ic, [
|
|
4032
|
+
C(N, Ee(p.$attrs, {
|
|
4033
|
+
id: S(d)(e.schema),
|
|
4034
|
+
modelValue: S(h),
|
|
4035
|
+
"onUpdate:modelValue": E[0] || (E[0] = (l) => xe(h) ? h.value = l : null),
|
|
4033
4036
|
autosize: "",
|
|
4034
4037
|
"character-limit": e.schema.max,
|
|
4035
4038
|
class: e.schema.fieldClasses,
|
|
@@ -4043,10 +4046,10 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
4043
4046
|
resizable: "",
|
|
4044
4047
|
rows: e.schema.rows || 3
|
|
4045
4048
|
}), null, 16, ["id", "modelValue", "character-limit", "class", "disabled", "help", "minlength", "name", "placeholder", "readonly", "required", "rows"]),
|
|
4046
|
-
(
|
|
4049
|
+
(u(), A(ne(S(o)), {
|
|
4047
4050
|
schema: e.schema,
|
|
4048
4051
|
update: f,
|
|
4049
|
-
value:
|
|
4052
|
+
value: S(h)
|
|
4050
4053
|
}, null, 8, ["schema", "value"]))
|
|
4051
4054
|
]);
|
|
4052
4055
|
};
|
|
@@ -4209,11 +4212,11 @@ const Ku = /* @__PURE__ */ z(Vu, [["render", qu], ["__scopeId", "data-v-70998d5b
|
|
|
4209
4212
|
class: "errors help-block"
|
|
4210
4213
|
}, vc = ["innerHTML"];
|
|
4211
4214
|
function yc(e, t, n, i, a, r) {
|
|
4212
|
-
const o =
|
|
4213
|
-
return
|
|
4215
|
+
const o = F("KExternalLink"), s = F("KLabel");
|
|
4216
|
+
return u(), g("div", {
|
|
4214
4217
|
class: W(["form-group", e.getFieldRowClasses(n.field)])
|
|
4215
4218
|
}, [
|
|
4216
|
-
r.fieldTypeHasLabel(n.field) ? (
|
|
4219
|
+
r.fieldTypeHasLabel(n.field) ? (u(), A(s, {
|
|
4217
4220
|
key: 0,
|
|
4218
4221
|
"aria-describedby": n.field.help ? r.getTooltipId(n.field) : void 0,
|
|
4219
4222
|
class: W([n.field.labelClasses, "form-group-label"]),
|
|
@@ -4225,37 +4228,37 @@ function yc(e, t, n, i, a, r) {
|
|
|
4225
4228
|
tooltipId: r.getTooltipId(n.field)
|
|
4226
4229
|
} : void 0
|
|
4227
4230
|
}, at({
|
|
4228
|
-
default:
|
|
4231
|
+
default: M(() => [
|
|
4229
4232
|
m("div", dc, [
|
|
4230
4233
|
m("span", {
|
|
4231
4234
|
innerHTML: r.formattedLabel(n.field.label)
|
|
4232
4235
|
}, null, 8, uc)
|
|
4233
4236
|
]),
|
|
4234
|
-
n.field.link ? (
|
|
4237
|
+
n.field.link ? (u(), g("div", cc, [
|
|
4235
4238
|
C(o, {
|
|
4236
4239
|
href: n.field.link
|
|
4237
4240
|
}, {
|
|
4238
|
-
default:
|
|
4241
|
+
default: M(() => t[0] || (t[0] = [
|
|
4239
4242
|
m("span", { class: "section-header" }, "More info", -1)
|
|
4240
4243
|
])),
|
|
4241
4244
|
_: 1
|
|
4242
4245
|
}, 8, ["href"])
|
|
4243
|
-
])) :
|
|
4246
|
+
])) : R("", !0)
|
|
4244
4247
|
]),
|
|
4245
4248
|
_: 2
|
|
4246
4249
|
}, [
|
|
4247
4250
|
n.options.helpAsHtml && n.field.help ? {
|
|
4248
4251
|
name: "tooltip",
|
|
4249
|
-
fn:
|
|
4252
|
+
fn: M(() => [
|
|
4250
4253
|
m("div", {
|
|
4251
4254
|
innerHTML: n.field.help
|
|
4252
4255
|
}, null, 8, lc)
|
|
4253
4256
|
]),
|
|
4254
4257
|
key: "0"
|
|
4255
4258
|
} : void 0
|
|
4256
|
-
]), 1032, ["aria-describedby", "class", "for", "info", "tooltip-attributes"])) :
|
|
4259
|
+
]), 1032, ["aria-describedby", "class", "for", "info", "tooltip-attributes"])) : R("", !0),
|
|
4257
4260
|
m("div", mc, [
|
|
4258
|
-
(
|
|
4261
|
+
(u(), A(ne(r.getFieldComponent(n.field)), Ee(e.$attrs, {
|
|
4259
4262
|
ref: "child",
|
|
4260
4263
|
disabled: e.fieldDisabled(n.field) || null,
|
|
4261
4264
|
"form-options": n.options,
|
|
@@ -4267,27 +4270,27 @@ function yc(e, t, n, i, a, r) {
|
|
|
4267
4270
|
onRefreshModel: r.onRefreshModel,
|
|
4268
4271
|
onValidated: r.onFieldValidated
|
|
4269
4272
|
}), null, 16, ["disabled", "form-options", "hint", "model", "schema", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])),
|
|
4270
|
-
r.buttonVisibility(n.field) ? (
|
|
4271
|
-
(
|
|
4272
|
-
key:
|
|
4273
|
-
class: W(
|
|
4274
|
-
type: r.getButtonType(
|
|
4275
|
-
onClick: (h) => r.buttonClickHandler(
|
|
4276
|
-
textContent:
|
|
4273
|
+
r.buttonVisibility(n.field) ? (u(), g("div", fc, [
|
|
4274
|
+
(u(!0), g(K, null, J(n.field.buttons, (d, c) => (u(), g("button", {
|
|
4275
|
+
key: c,
|
|
4276
|
+
class: W(d.classes),
|
|
4277
|
+
type: r.getButtonType(d),
|
|
4278
|
+
onClick: (h) => r.buttonClickHandler(d, n.field, h),
|
|
4279
|
+
textContent: k(d.label)
|
|
4277
4280
|
}, null, 10, hc))), 128))
|
|
4278
|
-
])) :
|
|
4281
|
+
])) : R("", !0)
|
|
4279
4282
|
]),
|
|
4280
|
-
n.field.hint && n.field.type !== "input" ? (
|
|
4283
|
+
n.field.hint && n.field.type !== "input" ? (u(), g("div", {
|
|
4281
4284
|
key: 1,
|
|
4282
4285
|
class: "hint",
|
|
4283
4286
|
innerHTML: r.fieldHint(n.field)
|
|
4284
|
-
}, null, 8, pc)) :
|
|
4285
|
-
r.fieldErrors(n.field).length > 0 ? (
|
|
4286
|
-
(
|
|
4287
|
-
key:
|
|
4288
|
-
innerHTML:
|
|
4287
|
+
}, null, 8, pc)) : R("", !0),
|
|
4288
|
+
r.fieldErrors(n.field).length > 0 ? (u(), g("div", gc, [
|
|
4289
|
+
(u(!0), g(K, null, J(r.fieldErrors(n.field), (d, c) => (u(), g("span", {
|
|
4290
|
+
key: c,
|
|
4291
|
+
innerHTML: d
|
|
4289
4292
|
}, null, 8, vc))), 128))
|
|
4290
|
-
])) :
|
|
4293
|
+
])) : R("", !0)
|
|
4291
4294
|
], 2);
|
|
4292
4295
|
}
|
|
4293
4296
|
const Ei = /* @__PURE__ */ z(oc, [["render", yc], ["__scopeId", "data-v-172f268b"]]);
|
|
@@ -4333,47 +4336,47 @@ const bc = (e) => {
|
|
|
4333
4336
|
formatter: n,
|
|
4334
4337
|
order: 3
|
|
4335
4338
|
}
|
|
4336
|
-
}, a = e, r = (f) => f != null, o = (f, p) => r(p) && ["password", "sentinel_password"].includes(f) ? "password" : "text", { convertKeyToTitle: s } = Bi(),
|
|
4337
|
-
var
|
|
4339
|
+
}, a = e, r = (f) => f != null, o = (f, p) => r(p) && ["password", "sentinel_password"].includes(f) ? "password" : "text", { convertKeyToTitle: s } = Bi(), d = L(() => Object.entries(a.configFields).map(([f, p]) => {
|
|
4340
|
+
var E, N, l, v;
|
|
4338
4341
|
return {
|
|
4339
4342
|
key: f,
|
|
4340
|
-
label: ((
|
|
4341
|
-
value: (
|
|
4342
|
-
type: ((
|
|
4343
|
-
order: ((
|
|
4343
|
+
label: ((E = i[f]) == null ? void 0 : E.label) ?? s(f),
|
|
4344
|
+
value: (N = i[f]) != null && N.formatter ? i[f].formatter(p) : p,
|
|
4345
|
+
type: ((l = i[f]) == null ? void 0 : l.type) ?? o(f, p),
|
|
4346
|
+
order: ((v = i[f]) == null ? void 0 : v.order) ?? 100
|
|
4344
4347
|
// attrs: value.attrs,
|
|
4345
4348
|
};
|
|
4346
|
-
}).sort((f, p) => f.order - p.order).filter((f) => f.type !== "hidden")),
|
|
4349
|
+
}).sort((f, p) => f.order - p.order).filter((f) => f.type !== "hidden")), c = Me.useRedisNonStandardFields(a.configFields, a.pluginRedisFields), h = L(() => d.value.concat(c));
|
|
4347
4350
|
return (f, p) => {
|
|
4348
|
-
const
|
|
4349
|
-
return
|
|
4350
|
-
(
|
|
4351
|
-
key:
|
|
4351
|
+
const E = F("KCopy");
|
|
4352
|
+
return u(), g("div", wc, [
|
|
4353
|
+
(u(!0), g(K, null, J(h.value, ({ key: N, label: l, value: v, type: w }) => (u(), g("div", {
|
|
4354
|
+
key: N,
|
|
4352
4355
|
class: "partial-config-card-row"
|
|
4353
4356
|
}, [
|
|
4354
4357
|
m("div", Mc, [
|
|
4355
|
-
m("div", Sc,
|
|
4358
|
+
m("div", Sc, k(l), 1)
|
|
4356
4359
|
]),
|
|
4357
4360
|
m("div", {
|
|
4358
4361
|
class: "config-card-row-value",
|
|
4359
|
-
"data-testid": `${
|
|
4362
|
+
"data-testid": `${N}-property-value`
|
|
4360
4363
|
}, [
|
|
4361
|
-
r(
|
|
4362
|
-
|
|
4364
|
+
r(v) ? (u(), g("div", Cc, [
|
|
4365
|
+
w === "password" ? (u(), g("div", {
|
|
4363
4366
|
key: 0,
|
|
4364
|
-
"data-testid": `${
|
|
4367
|
+
"data-testid": `${N}-copy-password`
|
|
4365
4368
|
}, [
|
|
4366
|
-
C(
|
|
4369
|
+
C(E, {
|
|
4367
4370
|
format: "redacted",
|
|
4368
|
-
text: String(
|
|
4371
|
+
text: String(v)
|
|
4369
4372
|
}, null, 8, ["text"])
|
|
4370
|
-
], 8, Ac)) : (
|
|
4373
|
+
], 8, Ac)) : (u(), g("div", {
|
|
4371
4374
|
key: 1,
|
|
4372
|
-
"data-testid": `${
|
|
4373
|
-
},
|
|
4374
|
-
])) : (
|
|
4375
|
+
"data-testid": `${N}-plain-text`
|
|
4376
|
+
}, k(v), 9, Oc))
|
|
4377
|
+
])) : (u(), g("div", {
|
|
4375
4378
|
key: 0,
|
|
4376
|
-
"data-testid": `${
|
|
4379
|
+
"data-testid": `${N}-no-value`
|
|
4377
4380
|
}, " – ", 8, Ic))
|
|
4378
4381
|
], 8, Tc)
|
|
4379
4382
|
]))), 128))
|
|
@@ -4430,110 +4433,110 @@ const bc = (e) => {
|
|
|
4430
4433
|
getAll: "/{workspace}/partials"
|
|
4431
4434
|
}
|
|
4432
4435
|
}, a = e, r = ie(null), { getMessageFromError: o } = zi(), s = st(ts), {
|
|
4433
|
-
debouncedQueryChange:
|
|
4434
|
-
loading:
|
|
4436
|
+
debouncedQueryChange: d,
|
|
4437
|
+
loading: c,
|
|
4435
4438
|
error: h,
|
|
4436
4439
|
loadItems: f,
|
|
4437
4440
|
results: p
|
|
4438
4441
|
} = Yi(s, i[s.app].getAll, void 0, {
|
|
4439
4442
|
fetchedItemsKey: "data",
|
|
4440
4443
|
searchKeys: ["id", "name"]
|
|
4441
|
-
}),
|
|
4444
|
+
}), E = L(() => h.value ? o(h.value) : ""), N = ($) => {
|
|
4442
4445
|
let b = `${s.apiBaseUrl}${i[s.app].getOne}`;
|
|
4443
|
-
return s.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (s == null ? void 0 : s.controlPlaneId) || "") : s.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, s != null && s.workspace ? `/${s.workspace}` : "")), b = b.replace(/{id}/gi, String(
|
|
4444
|
-
},
|
|
4446
|
+
return s.app === "konnect" ? b = b.replace(/{controlPlaneId}/gi, (s == null ? void 0 : s.controlPlaneId) || "") : s.app === "kongManager" && (b = b.replace(/\/{workspace}/gi, s != null && s.workspace ? `/${s.workspace}` : "")), b = b.replace(/{id}/gi, String($)), b;
|
|
4447
|
+
}, l = L(() => {
|
|
4445
4448
|
var b;
|
|
4446
|
-
const
|
|
4447
|
-
return a.redisType !== "all" ?
|
|
4448
|
-
}), { axiosInstance:
|
|
4449
|
-
if (
|
|
4450
|
-
a.updateRedisModel(
|
|
4449
|
+
const $ = ((b = p.value) == null ? void 0 : b.map((O) => ({ label: O.id, name: O.name, value: O.id, type: O.type, tag: bc(O) }))) || [];
|
|
4450
|
+
return a.redisType !== "all" ? $.filter((O) => O.type === a.redisType) : $;
|
|
4451
|
+
}), { axiosInstance: v } = Hi(s == null ? void 0 : s.axiosRequestConfig), w = async ($) => {
|
|
4452
|
+
if ($) {
|
|
4453
|
+
a.updateRedisModel($);
|
|
4451
4454
|
try {
|
|
4452
|
-
const b = await
|
|
4455
|
+
const b = await v.get(N($));
|
|
4453
4456
|
if (b.data.config) {
|
|
4454
|
-
const
|
|
4455
|
-
delete
|
|
4457
|
+
const O = Object.assign(b.data, b.data.config);
|
|
4458
|
+
delete O.config, r.value = O;
|
|
4456
4459
|
}
|
|
4457
4460
|
} catch (b) {
|
|
4458
4461
|
console.error(b);
|
|
4459
4462
|
}
|
|
4460
4463
|
}
|
|
4461
4464
|
};
|
|
4462
|
-
return Rt(() => n == null ? void 0 : n.value, async (
|
|
4463
|
-
|
|
4465
|
+
return Rt(() => n == null ? void 0 : n.value, async ($) => {
|
|
4466
|
+
$ && await f();
|
|
4464
4467
|
}), Pt(() => {
|
|
4465
|
-
f(), a.defaultRedisConfigItem &&
|
|
4466
|
-
}), (
|
|
4467
|
-
const
|
|
4468
|
-
return
|
|
4468
|
+
f(), a.defaultRedisConfigItem && w(a.defaultRedisConfigItem);
|
|
4469
|
+
}), ($, b) => {
|
|
4470
|
+
const O = F("KLabel"), U = F("KBadge"), T = F("KSelect");
|
|
4471
|
+
return u(), g(K, null, [
|
|
4469
4472
|
m("div", kc, [
|
|
4470
|
-
C(
|
|
4471
|
-
info: e.isCustomPlugin ?
|
|
4473
|
+
C(O, {
|
|
4474
|
+
info: e.isCustomPlugin ? S(t)("redis.custom_plugin.tooltip") : S(t)("redis.shared_configuration.tooltip", { type: S(Fn)(e.redisType) }),
|
|
4472
4475
|
"tooltip-attributes": {
|
|
4473
4476
|
maxWidth: "300",
|
|
4474
4477
|
placement: "top"
|
|
4475
4478
|
}
|
|
4476
4479
|
}, {
|
|
4477
|
-
default:
|
|
4478
|
-
te(
|
|
4480
|
+
default: M(() => [
|
|
4481
|
+
te(k(S(t)("redis.shared_configuration.title")), 1)
|
|
4479
4482
|
]),
|
|
4480
4483
|
_: 1
|
|
4481
4484
|
}, 8, ["info"]),
|
|
4482
4485
|
b[2] || (b[2] = m("div", { class: "shared-redis-config-title" }, null, -1)),
|
|
4483
|
-
C(
|
|
4486
|
+
C(T, {
|
|
4484
4487
|
class: "redis-config-select-trigger",
|
|
4485
4488
|
"data-testid": "redis-config-select-trigger",
|
|
4486
4489
|
"enable-filtering": "",
|
|
4487
4490
|
"filter-function": () => !0,
|
|
4488
|
-
items:
|
|
4489
|
-
loading:
|
|
4491
|
+
items: l.value,
|
|
4492
|
+
loading: S(c),
|
|
4490
4493
|
"model-value": e.defaultRedisConfigItem,
|
|
4491
|
-
placeholder:
|
|
4492
|
-
onChange: b[1] || (b[1] = (
|
|
4493
|
-
onQueryChange:
|
|
4494
|
+
placeholder: S(t)("redis.shared_configuration.selector.placeholder"),
|
|
4495
|
+
onChange: b[1] || (b[1] = (y) => w(y == null ? void 0 : y.value)),
|
|
4496
|
+
onQueryChange: S(d)
|
|
4494
4497
|
}, {
|
|
4495
|
-
"selected-item-template":
|
|
4496
|
-
m("div", Uc,
|
|
4498
|
+
"selected-item-template": M(({ item: y }) => [
|
|
4499
|
+
m("div", Uc, k(y.name), 1)
|
|
4497
4500
|
]),
|
|
4498
|
-
"item-template":
|
|
4501
|
+
"item-template": M(({ item: y }) => [
|
|
4499
4502
|
m("div", {
|
|
4500
4503
|
class: "plugin-form-redis-configuration-dropdown-item",
|
|
4501
|
-
"data-testid": `redis-configuration-dropdown-item-${
|
|
4504
|
+
"data-testid": `redis-configuration-dropdown-item-${y.name}`
|
|
4502
4505
|
}, [
|
|
4503
|
-
m("span", Vc,
|
|
4504
|
-
C(
|
|
4506
|
+
m("span", Vc, k(y.name), 1),
|
|
4507
|
+
C(U, {
|
|
4505
4508
|
appearance: "info",
|
|
4506
4509
|
class: "select-item-label"
|
|
4507
4510
|
}, {
|
|
4508
|
-
default:
|
|
4509
|
-
te(
|
|
4511
|
+
default: M(() => [
|
|
4512
|
+
te(k(y.tag), 1)
|
|
4510
4513
|
]),
|
|
4511
4514
|
_: 2
|
|
4512
4515
|
}, 1024)
|
|
4513
4516
|
], 8, $c)
|
|
4514
4517
|
]),
|
|
4515
|
-
empty:
|
|
4516
|
-
m("div", Pc,
|
|
4518
|
+
empty: M(() => [
|
|
4519
|
+
m("div", Pc, k(S(t)("redis.shared_configuration.empty_state")), 1)
|
|
4517
4520
|
]),
|
|
4518
|
-
"dropdown-footer-text":
|
|
4521
|
+
"dropdown-footer-text": M(() => [
|
|
4519
4522
|
m("div", {
|
|
4520
4523
|
class: "new-redis-config-area",
|
|
4521
4524
|
"data-testid": "new-redis-config-area",
|
|
4522
|
-
onClick: b[0] || (b[0] = (
|
|
4525
|
+
onClick: b[0] || (b[0] = (y) => $.$emit("showNewPartialModal"))
|
|
4523
4526
|
}, [
|
|
4524
|
-
C(
|
|
4525
|
-
m("span", null,
|
|
4527
|
+
C(S(jt), { size: S(_d) }, null, 8, ["size"]),
|
|
4528
|
+
m("span", null, k(S(t)("redis.shared_configuration.create_new_configuration", { type: S(Fn)(e.redisType) })), 1)
|
|
4526
4529
|
])
|
|
4527
4530
|
]),
|
|
4528
4531
|
_: 1
|
|
4529
4532
|
}, 8, ["items", "loading", "model-value", "placeholder", "onQueryChange"])
|
|
4530
4533
|
]),
|
|
4531
|
-
r.value ? (
|
|
4534
|
+
r.value ? (u(), A(Fc, {
|
|
4532
4535
|
key: 0,
|
|
4533
4536
|
"config-fields": r.value,
|
|
4534
4537
|
"plugin-redis-fields": e.pluginRedisFields
|
|
4535
|
-
}, null, 8, ["config-fields", "plugin-redis-fields"])) :
|
|
4536
|
-
|
|
4538
|
+
}, null, 8, ["config-fields", "plugin-redis-fields"])) : R("", !0),
|
|
4539
|
+
E.value ? (u(), g("p", Rc, k(E.value || S(t)("redis.shared_configuration.error")), 1)) : R("", !0)
|
|
4537
4540
|
], 64);
|
|
4538
4541
|
};
|
|
4539
4542
|
}
|
|
@@ -4594,60 +4597,60 @@ const bc = (e) => {
|
|
|
4594
4597
|
},
|
|
4595
4598
|
emits: ["modelUpdated", "partialToggled", "showNewPartialModal", "refreshModel", "validated"],
|
|
4596
4599
|
setup(e, { emit: t }) {
|
|
4597
|
-
const n = e, i = t, { t: a } = ve("en-us", be), r = L(() => n.field.pluginType === "custom"), o = ie(!n.isEditing), s = ie(),
|
|
4598
|
-
i("modelUpdated", [{ id:
|
|
4599
|
-
}, p = (
|
|
4600
|
-
|
|
4601
|
-
},
|
|
4600
|
+
const n = e, i = t, { t: a } = ve("en-us", be), r = L(() => n.field.pluginType === "custom"), o = ie(!n.isEditing), s = ie(), d = ie({}), c = ie(), h = (l) => Y(l.visible) ? l.visible.call(this, n.model, l, this) : X(l.visible) ? !0 : l.visible, f = async (l) => {
|
|
4601
|
+
i("modelUpdated", [{ id: l, path: n.redisPath }], "partials"), c.value = [{ id: l, path: n.redisPath }], s.value = l;
|
|
4602
|
+
}, p = (l, v) => {
|
|
4603
|
+
d.value = { ...d.value, [v]: l }, i("modelUpdated", l, v);
|
|
4604
|
+
}, E = () => {
|
|
4602
4605
|
i("refreshModel");
|
|
4603
|
-
},
|
|
4604
|
-
i("validated",
|
|
4606
|
+
}, N = (l, v, w) => {
|
|
4607
|
+
i("validated", l, v, w);
|
|
4605
4608
|
};
|
|
4606
|
-
return Rt(() => o.value, (
|
|
4607
|
-
|
|
4609
|
+
return Rt(() => o.value, (l) => {
|
|
4610
|
+
l ? c.value && i("partialToggled", "redis", { partials: c.value }) : i("partialToggled", "partials", d.value);
|
|
4608
4611
|
}), Pt(() => {
|
|
4609
|
-
var
|
|
4610
|
-
if (n.model && (
|
|
4611
|
-
const
|
|
4612
|
-
o.value = !0, s.value =
|
|
4612
|
+
var l, v, w;
|
|
4613
|
+
if (n.model && (d.value = n.field.fields.reduce(($, b) => (Object.keys(n.model).includes(b.model) && ($[b.model] = n.model[b.model]), $), {})), (w = (v = (l = n == null ? void 0 : n.model) == null ? void 0 : l.partials) == null ? void 0 : v[0]) != null && w.id) {
|
|
4614
|
+
const $ = n.model.partials[0].id;
|
|
4615
|
+
o.value = !0, s.value = $;
|
|
4613
4616
|
}
|
|
4614
|
-
}), (
|
|
4615
|
-
const
|
|
4616
|
-
return
|
|
4617
|
-
r.value ? (
|
|
4618
|
-
C(
|
|
4617
|
+
}), (l, v) => {
|
|
4618
|
+
const w = F("KAlert"), $ = F("KBadge"), b = F("KRadio"), O = F("KCard");
|
|
4619
|
+
return u(), g("div", null, [
|
|
4620
|
+
r.value ? (u(), g("div", Nc, [
|
|
4621
|
+
C(w, {
|
|
4619
4622
|
"data-testid": "custom-plugin-redis-config-note",
|
|
4620
|
-
message:
|
|
4623
|
+
message: S(a)("redis.custom_plugin.alert")
|
|
4621
4624
|
}, null, 8, ["message"]),
|
|
4622
4625
|
C(kn, {
|
|
4623
4626
|
"default-redis-config-item": s.value,
|
|
4624
4627
|
"is-custom-plugin": "",
|
|
4625
4628
|
"plugin-redis-fields": e.field.fields,
|
|
4626
4629
|
"update-redis-model": f,
|
|
4627
|
-
onShowNewPartialModal:
|
|
4630
|
+
onShowNewPartialModal: v[0] || (v[0] = (U) => l.$emit("showNewPartialModal"))
|
|
4628
4631
|
}, null, 8, ["default-redis-config-item", "plugin-redis-fields"])
|
|
4629
|
-
])) : (
|
|
4632
|
+
])) : (u(), A(O, {
|
|
4630
4633
|
key: 1,
|
|
4631
4634
|
class: "redis-config-card",
|
|
4632
4635
|
"data-testid": "redis-config-card",
|
|
4633
|
-
title:
|
|
4636
|
+
title: S(a)("redis.title")
|
|
4634
4637
|
}, {
|
|
4635
|
-
default:
|
|
4638
|
+
default: M(() => [
|
|
4636
4639
|
m("div", Lc, [
|
|
4637
4640
|
C(b, {
|
|
4638
4641
|
modelValue: o.value,
|
|
4639
|
-
"onUpdate:modelValue":
|
|
4642
|
+
"onUpdate:modelValue": v[1] || (v[1] = (U) => o.value = U),
|
|
4640
4643
|
card: "",
|
|
4641
4644
|
"card-orientation": "horizontal",
|
|
4642
4645
|
"data-testid": "shared-redis-config-radio",
|
|
4643
|
-
description:
|
|
4644
|
-
label:
|
|
4646
|
+
description: S(a)("redis.shared_configuration.description"),
|
|
4647
|
+
label: S(a)("redis.shared_configuration.label"),
|
|
4645
4648
|
"selected-value": !0
|
|
4646
4649
|
}, {
|
|
4647
|
-
default:
|
|
4648
|
-
C(
|
|
4649
|
-
default:
|
|
4650
|
-
te(
|
|
4650
|
+
default: M(() => [
|
|
4651
|
+
C($, { appearance: "success" }, {
|
|
4652
|
+
default: M(() => [
|
|
4653
|
+
te(k(S(a)("redis.shared_configuration.badge")), 1)
|
|
4651
4654
|
]),
|
|
4652
4655
|
_: 1
|
|
4653
4656
|
})
|
|
@@ -4656,43 +4659,43 @@ const bc = (e) => {
|
|
|
4656
4659
|
}, 8, ["modelValue", "description", "label"]),
|
|
4657
4660
|
C(b, {
|
|
4658
4661
|
modelValue: o.value,
|
|
4659
|
-
"onUpdate:modelValue":
|
|
4662
|
+
"onUpdate:modelValue": v[2] || (v[2] = (U) => o.value = U),
|
|
4660
4663
|
card: "",
|
|
4661
4664
|
"card-orientation": "horizontal",
|
|
4662
4665
|
"data-testid": "dedicated-redis-config-radio",
|
|
4663
|
-
description:
|
|
4664
|
-
label:
|
|
4666
|
+
description: S(a)("redis.dedicated_configuration.description"),
|
|
4667
|
+
label: S(a)("redis.dedicated_configuration.label"),
|
|
4665
4668
|
"selected-value": !1
|
|
4666
4669
|
}, null, 8, ["modelValue", "description", "label"])
|
|
4667
4670
|
]),
|
|
4668
|
-
o.value ? (
|
|
4671
|
+
o.value ? (u(), g("div", qc, [
|
|
4669
4672
|
C(kn, {
|
|
4670
4673
|
"default-redis-config-item": s.value,
|
|
4671
4674
|
"plugin-redis-fields": e.field.fields,
|
|
4672
4675
|
"redis-type": e.field.redisType,
|
|
4673
4676
|
"update-redis-model": f,
|
|
4674
|
-
onShowNewPartialModal:
|
|
4677
|
+
onShowNewPartialModal: v[3] || (v[3] = (U) => l.$emit("showNewPartialModal"))
|
|
4675
4678
|
}, null, 8, ["default-redis-config-item", "plugin-redis-fields", "redis-type"])
|
|
4676
|
-
])) : (
|
|
4677
|
-
m("div", Dc,
|
|
4678
|
-
(
|
|
4679
|
-
default:
|
|
4680
|
-
(
|
|
4681
|
-
key:
|
|
4679
|
+
])) : (u(), g("div", Kc, [
|
|
4680
|
+
m("div", Dc, k(S(a)("redis.dedicated_configuration.title")), 1),
|
|
4681
|
+
(u(), A(ne(e.tag), null, {
|
|
4682
|
+
default: M(() => [
|
|
4683
|
+
(u(!0), g(K, null, J(e.field.fields, (U) => (u(), g(K, {
|
|
4684
|
+
key: U.model
|
|
4682
4685
|
}, [
|
|
4683
|
-
h(
|
|
4686
|
+
h(U) ? (u(), A(Ei, {
|
|
4684
4687
|
key: 0,
|
|
4685
4688
|
ref_for: !0,
|
|
4686
4689
|
ref: "children",
|
|
4687
4690
|
errors: e.errors,
|
|
4688
|
-
field:
|
|
4691
|
+
field: U,
|
|
4689
4692
|
model: e.model,
|
|
4690
4693
|
options: e.options,
|
|
4691
4694
|
vfg: e.vfg,
|
|
4692
4695
|
onModelUpdated: p,
|
|
4693
|
-
onRefreshModel:
|
|
4694
|
-
onValidated:
|
|
4695
|
-
}, null, 8, ["errors", "field", "model", "options", "vfg"])) :
|
|
4696
|
+
onRefreshModel: E,
|
|
4697
|
+
onValidated: N
|
|
4698
|
+
}, null, 8, ["errors", "field", "model", "options", "vfg"])) : R("", !0)
|
|
4696
4699
|
], 64))), 128))
|
|
4697
4700
|
]),
|
|
4698
4701
|
_: 1
|
|
@@ -4848,11 +4851,11 @@ const bc = (e) => {
|
|
|
4848
4851
|
});
|
|
4849
4852
|
const i = (a) => {
|
|
4850
4853
|
const r = [];
|
|
4851
|
-
ue(a, (s,
|
|
4852
|
-
Array.isArray(s) && s.length > 0 && ue(s, (
|
|
4854
|
+
ue(a, (s, d) => {
|
|
4855
|
+
Array.isArray(s) && s.length > 0 && ue(s, (c) => {
|
|
4853
4856
|
r.push({
|
|
4854
|
-
field: t[
|
|
4855
|
-
error:
|
|
4857
|
+
field: t[d].schema,
|
|
4858
|
+
error: c
|
|
4856
4859
|
});
|
|
4857
4860
|
});
|
|
4858
4861
|
}), this.errors = r;
|
|
@@ -4873,17 +4876,17 @@ const bc = (e) => {
|
|
|
4873
4876
|
class: "vue-form-generator"
|
|
4874
4877
|
}, xc = { key: 0 };
|
|
4875
4878
|
function Gc(e, t, n, i, a, r) {
|
|
4876
|
-
const o =
|
|
4877
|
-
return n.schema != null ? (
|
|
4878
|
-
n.schema.fields ? (
|
|
4879
|
-
default:
|
|
4880
|
-
(
|
|
4881
|
-
key:
|
|
4879
|
+
const o = F("form-redis"), s = F("form-group"), d = F("KCollapse");
|
|
4880
|
+
return n.schema != null ? (u(), g("div", Hc, [
|
|
4881
|
+
n.schema.fields ? (u(), A(ne(n.tag), { key: 0 }, {
|
|
4882
|
+
default: M(() => [
|
|
4883
|
+
(u(!0), g(K, null, J(r.fields, (c) => (u(), g(K, {
|
|
4884
|
+
key: c.model
|
|
4882
4885
|
}, [
|
|
4883
|
-
|
|
4886
|
+
c.model === "__redis_partial" && n.enableRedisPartial ? (u(), A(o, {
|
|
4884
4887
|
key: 0,
|
|
4885
4888
|
errors: a.errors,
|
|
4886
|
-
field:
|
|
4889
|
+
field: c,
|
|
4887
4890
|
"is-editing": n.isEditing,
|
|
4888
4891
|
model: n.model,
|
|
4889
4892
|
options: n.options,
|
|
@@ -4891,83 +4894,83 @@ function Gc(e, t, n, i, a, r) {
|
|
|
4891
4894
|
vfg: a.vfg,
|
|
4892
4895
|
onModelUpdated: r.onModelUpdated,
|
|
4893
4896
|
onPartialToggled: r.onPartialToggled,
|
|
4894
|
-
onShowNewPartialModal: (h) => e.$emit("showNewPartialModal",
|
|
4897
|
+
onShowNewPartialModal: (h) => e.$emit("showNewPartialModal", c.redisType),
|
|
4895
4898
|
onValidated: r.onFieldValidated
|
|
4896
|
-
}, null, 8, ["errors", "field", "is-editing", "model", "options", "tag", "vfg", "onModelUpdated", "onPartialToggled", "onShowNewPartialModal", "onValidated"])) : r.fieldVisible(
|
|
4899
|
+
}, null, 8, ["errors", "field", "is-editing", "model", "options", "tag", "vfg", "onModelUpdated", "onPartialToggled", "onShowNewPartialModal", "onValidated"])) : r.fieldVisible(c) ? (u(), A(s, {
|
|
4897
4900
|
key: 1,
|
|
4898
4901
|
ref_for: !0,
|
|
4899
4902
|
ref: "children",
|
|
4900
4903
|
errors: a.errors,
|
|
4901
|
-
field:
|
|
4904
|
+
field: c,
|
|
4902
4905
|
model: n.model,
|
|
4903
4906
|
options: n.options,
|
|
4904
4907
|
vfg: a.vfg,
|
|
4905
4908
|
onModelUpdated: r.onModelUpdated,
|
|
4906
4909
|
onRefreshModel: r.onRefreshModel,
|
|
4907
4910
|
onValidated: r.onFieldValidated
|
|
4908
|
-
}, null, 8, ["errors", "field", "model", "options", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])) :
|
|
4911
|
+
}, null, 8, ["errors", "field", "model", "options", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])) : R("", !0)
|
|
4909
4912
|
], 64))), 128))
|
|
4910
4913
|
]),
|
|
4911
4914
|
_: 1
|
|
4912
|
-
})) :
|
|
4913
|
-
(
|
|
4915
|
+
})) : R("", !0),
|
|
4916
|
+
(u(!0), g(K, null, J(r.groups, (c, h) => (u(), g(K, {
|
|
4914
4917
|
key: `group-${h}`
|
|
4915
4918
|
}, [
|
|
4916
|
-
|
|
4919
|
+
c.collapsible !== void 0 && c.collapsible !== !1 ? (u(), A(d, {
|
|
4917
4920
|
key: 0,
|
|
4918
4921
|
class: "root-level-collapse",
|
|
4919
4922
|
"model-value": !1,
|
|
4920
|
-
title:
|
|
4923
|
+
title: c.collapsible.title
|
|
4921
4924
|
}, at({
|
|
4922
|
-
default:
|
|
4923
|
-
var f, p,
|
|
4925
|
+
default: M(() => {
|
|
4926
|
+
var f, p, E, N;
|
|
4924
4927
|
return [
|
|
4925
|
-
(f =
|
|
4926
|
-
|
|
4928
|
+
(f = c.slots) != null && f.beforeContent ? fe(e.$slots, (p = c.slots) == null ? void 0 : p.beforeContent, { key: 0 }) : R("", !0),
|
|
4929
|
+
c.fields.length === 0 && ((E = c.slots) != null && E.emptyState) ? fe(e.$slots, (N = c.slots) == null ? void 0 : N.emptyState, { key: 1 }) : (u(), A(ne(n.tag), {
|
|
4927
4930
|
key: 2,
|
|
4928
|
-
class: W(e.getFieldRowClasses(
|
|
4931
|
+
class: W(e.getFieldRowClasses(c))
|
|
4929
4932
|
}, {
|
|
4930
|
-
default:
|
|
4931
|
-
(
|
|
4932
|
-
key:
|
|
4933
|
+
default: M(() => [
|
|
4934
|
+
(u(!0), g(K, null, J(c.fields, (l) => (u(), g(K, {
|
|
4935
|
+
key: l.model
|
|
4933
4936
|
}, [
|
|
4934
|
-
r.fieldVisible(
|
|
4937
|
+
r.fieldVisible(l) ? (u(), A(s, {
|
|
4935
4938
|
key: 0,
|
|
4936
4939
|
ref_for: !0,
|
|
4937
4940
|
ref: "children",
|
|
4938
4941
|
errors: a.errors,
|
|
4939
|
-
field:
|
|
4942
|
+
field: l,
|
|
4940
4943
|
model: n.model,
|
|
4941
4944
|
options: n.options,
|
|
4942
4945
|
vfg: a.vfg,
|
|
4943
4946
|
onModelUpdated: r.onModelUpdated,
|
|
4944
4947
|
onRefreshModel: r.onRefreshModel,
|
|
4945
4948
|
onValidated: r.onFieldValidated
|
|
4946
|
-
}, null, 8, ["errors", "field", "model", "options", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])) :
|
|
4949
|
+
}, null, 8, ["errors", "field", "model", "options", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])) : R("", !0)
|
|
4947
4950
|
], 64))), 128))
|
|
4948
4951
|
]),
|
|
4949
4952
|
_: 2
|
|
4950
4953
|
}, 1032, ["class"])),
|
|
4951
|
-
|
|
4954
|
+
c.collapsible !== !0 && c.collapsible.nestedCollapsible && c.collapsible.nestedCollapsible.fields.length > 0 ? (u(), A(d, {
|
|
4952
4955
|
key: 3,
|
|
4953
4956
|
class: "nested-collapse",
|
|
4954
4957
|
"model-value": a.collapseStates[`group-${h}-nested`] ?? !0,
|
|
4955
4958
|
"trigger-alignment": "leading",
|
|
4956
|
-
"trigger-label": a.collapseStates[`group-${h}-nested`] ?? !0 ?
|
|
4957
|
-
"onUpdate:modelValue": (
|
|
4959
|
+
"trigger-label": a.collapseStates[`group-${h}-nested`] ?? !0 ? c.collapsible.nestedCollapsible.triggerLabel.expand : c.collapsible.nestedCollapsible.triggerLabel.collapse,
|
|
4960
|
+
"onUpdate:modelValue": (l) => a.collapseStates[`group-${h}-nested`] = l
|
|
4958
4961
|
}, {
|
|
4959
|
-
default:
|
|
4960
|
-
(
|
|
4961
|
-
class: W(e.getFieldRowClasses(
|
|
4962
|
+
default: M(() => [
|
|
4963
|
+
(u(), A(ne(n.tag), {
|
|
4964
|
+
class: W(e.getFieldRowClasses(c))
|
|
4962
4965
|
}, {
|
|
4963
|
-
default:
|
|
4964
|
-
(
|
|
4965
|
-
key:
|
|
4966
|
+
default: M(() => [
|
|
4967
|
+
(u(!0), g(K, null, J(c.collapsible.nestedCollapsible.fields, (l) => (u(), g(K, {
|
|
4968
|
+
key: l.model
|
|
4966
4969
|
}, [
|
|
4967
|
-
|
|
4970
|
+
l.model === "__redis_partial" && n.enableRedisPartial ? (u(), A(o, {
|
|
4968
4971
|
key: 0,
|
|
4969
4972
|
errors: a.errors,
|
|
4970
|
-
field:
|
|
4973
|
+
field: l,
|
|
4971
4974
|
"is-editing": n.isEditing,
|
|
4972
4975
|
model: n.model,
|
|
4973
4976
|
options: n.options,
|
|
@@ -4975,49 +4978,49 @@ function Gc(e, t, n, i, a, r) {
|
|
|
4975
4978
|
vfg: a.vfg,
|
|
4976
4979
|
onModelUpdated: r.onModelUpdated,
|
|
4977
4980
|
onPartialToggled: r.onPartialToggled,
|
|
4978
|
-
onShowNewPartialModal: (
|
|
4981
|
+
onShowNewPartialModal: (v) => e.$emit("showNewPartialModal", l.redisType),
|
|
4979
4982
|
onValidated: r.onFieldValidated
|
|
4980
|
-
}, null, 8, ["errors", "field", "is-editing", "model", "options", "tag", "vfg", "onModelUpdated", "onPartialToggled", "onShowNewPartialModal", "onValidated"])) : r.fieldVisible(
|
|
4983
|
+
}, null, 8, ["errors", "field", "is-editing", "model", "options", "tag", "vfg", "onModelUpdated", "onPartialToggled", "onShowNewPartialModal", "onValidated"])) : r.fieldVisible(l) ? (u(), A(s, {
|
|
4981
4984
|
key: 1,
|
|
4982
4985
|
ref_for: !0,
|
|
4983
4986
|
ref: "children",
|
|
4984
4987
|
errors: a.errors,
|
|
4985
|
-
field:
|
|
4988
|
+
field: l,
|
|
4986
4989
|
model: n.model,
|
|
4987
4990
|
options: n.options,
|
|
4988
4991
|
vfg: a.vfg,
|
|
4989
4992
|
onModelUpdated: r.onModelUpdated,
|
|
4990
4993
|
onRefreshModel: r.onRefreshModel,
|
|
4991
4994
|
onValidated: r.onFieldValidated
|
|
4992
|
-
}, null, 8, ["errors", "field", "model", "options", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])) :
|
|
4995
|
+
}, null, 8, ["errors", "field", "model", "options", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])) : R("", !0)
|
|
4993
4996
|
], 64))), 128))
|
|
4994
4997
|
]),
|
|
4995
4998
|
_: 2
|
|
4996
4999
|
}, 1032, ["class"]))
|
|
4997
5000
|
]),
|
|
4998
5001
|
_: 2
|
|
4999
|
-
}, 1032, ["model-value", "trigger-label", "onUpdate:modelValue"])) :
|
|
5002
|
+
}, 1032, ["model-value", "trigger-label", "onUpdate:modelValue"])) : R("", !0)
|
|
5000
5003
|
];
|
|
5001
5004
|
}),
|
|
5002
5005
|
_: 2
|
|
5003
5006
|
}, [
|
|
5004
|
-
|
|
5007
|
+
c.collapsible.description ? {
|
|
5005
5008
|
name: "visible-content",
|
|
5006
|
-
fn:
|
|
5007
|
-
te(
|
|
5009
|
+
fn: M(() => [
|
|
5010
|
+
te(k(c.collapsible.description), 1)
|
|
5008
5011
|
]),
|
|
5009
5012
|
key: "0"
|
|
5010
5013
|
} : void 0
|
|
5011
|
-
]), 1032, ["title"])) : (
|
|
5014
|
+
]), 1032, ["title"])) : (u(), A(ne(n.tag), {
|
|
5012
5015
|
key: 1,
|
|
5013
|
-
class: W(e.getFieldRowClasses(
|
|
5016
|
+
class: W(e.getFieldRowClasses(c))
|
|
5014
5017
|
}, {
|
|
5015
|
-
default:
|
|
5016
|
-
|
|
5017
|
-
(
|
|
5018
|
+
default: M(() => [
|
|
5019
|
+
c.legend ? (u(), g("legend", xc, k(c.legend), 1)) : R("", !0),
|
|
5020
|
+
(u(!0), g(K, null, J(c.fields, (f) => (u(), g(K, {
|
|
5018
5021
|
key: f.model
|
|
5019
5022
|
}, [
|
|
5020
|
-
r.fieldVisible(f) ? (
|
|
5023
|
+
r.fieldVisible(f) ? (u(), A(s, {
|
|
5021
5024
|
key: 0,
|
|
5022
5025
|
ref_for: !0,
|
|
5023
5026
|
ref: "children",
|
|
@@ -5029,13 +5032,13 @@ function Gc(e, t, n, i, a, r) {
|
|
|
5029
5032
|
onModelUpdated: r.onModelUpdated,
|
|
5030
5033
|
onRefreshModel: r.onRefreshModel,
|
|
5031
5034
|
onValidated: r.onFieldValidated
|
|
5032
|
-
}, null, 8, ["errors", "field", "model", "options", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])) :
|
|
5035
|
+
}, null, 8, ["errors", "field", "model", "options", "vfg", "onModelUpdated", "onRefreshModel", "onValidated"])) : R("", !0)
|
|
5033
5036
|
], 64))), 128))
|
|
5034
5037
|
]),
|
|
5035
5038
|
_: 2
|
|
5036
5039
|
}, 1032, ["class"]))
|
|
5037
5040
|
], 64))), 128))
|
|
5038
|
-
])) :
|
|
5041
|
+
])) : R("", !0);
|
|
5039
5042
|
}
|
|
5040
5043
|
const ee = /* @__PURE__ */ z(Yc, [["render", Gc]]), Un = /* @__PURE__ */ new Set([
|
|
5041
5044
|
"config-client_id",
|
|
@@ -5157,7 +5160,7 @@ const ee = /* @__PURE__ */ z(Yc, [["render", Gc]]), Un = /* @__PURE__ */ new Set
|
|
|
5157
5160
|
fields: this.formSchema.fields.filter(
|
|
5158
5161
|
(a) => a.model.startsWith("config") && a.model !== "config-auth_methods" && !Un.has(a.model) && !$n.has(a.model) && (!this.enableRedisPartial || !i.includes(a.model)) || a.model === "tags"
|
|
5159
5162
|
).reduce((a, r) => {
|
|
5160
|
-
var o, s,
|
|
5163
|
+
var o, s, d, c;
|
|
5161
5164
|
switch (r.model) {
|
|
5162
5165
|
case "config-client_jwk": {
|
|
5163
5166
|
if (Array.isArray((s = (o = r.items) == null ? void 0 : o.schema) == null ? void 0 : s.fields))
|
|
@@ -5167,7 +5170,7 @@ const ee = /* @__PURE__ */ z(Yc, [["render", Gc]]), Un = /* @__PURE__ */ new Set
|
|
|
5167
5170
|
...r,
|
|
5168
5171
|
link: "https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record",
|
|
5169
5172
|
newElementButtonLabel: "+ Add Client JWK",
|
|
5170
|
-
...Array.isArray((
|
|
5173
|
+
...Array.isArray((c = (d = r.items) == null ? void 0 : d.schema) == null ? void 0 : c.fields) && r.items.schema.fields.map((h) => ({ ...h, label: h.model }))
|
|
5171
5174
|
});
|
|
5172
5175
|
break;
|
|
5173
5176
|
}
|
|
@@ -5253,53 +5256,53 @@ const ee = /* @__PURE__ */ z(Yc, [["render", Gc]]), Un = /* @__PURE__ */ new Set
|
|
|
5253
5256
|
}
|
|
5254
5257
|
}, Zc = { class: "general-settings" }, Jc = { class: "link-wrapper" }, Qc = { class: "auth-method-container" }, Xc = { class: "general-settings" }, em = { class: "link-wrapper" }, tm = { class: "general-settings" }, nm = { class: "link-wrapper" };
|
|
5255
5258
|
function im(e, t, n, i, a, r) {
|
|
5256
|
-
const o =
|
|
5257
|
-
return
|
|
5258
|
-
n.formModel.id && n.isEditing || !n.isEditing ? (
|
|
5259
|
+
const o = F("VueFormGenerator"), s = F("KExternalLink"), d = F("KLabel"), c = F("KCheckbox"), h = F("KInputSwitch"), f = F("KTabs");
|
|
5260
|
+
return u(), g("div", null, [
|
|
5261
|
+
n.formModel.id && n.isEditing || !n.isEditing ? (u(), A(o, {
|
|
5259
5262
|
key: 0,
|
|
5260
5263
|
class: "global-fields",
|
|
5261
5264
|
model: n.formModel,
|
|
5262
5265
|
options: n.formOptions,
|
|
5263
5266
|
schema: a.globalFields,
|
|
5264
5267
|
onModelUpdated: n.onModelUpdated
|
|
5265
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5268
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0),
|
|
5266
5269
|
C(f, { tabs: a.tabs }, {
|
|
5267
|
-
common:
|
|
5270
|
+
common: M(() => [
|
|
5268
5271
|
m("div", Zc, [
|
|
5269
5272
|
m("div", Jc, [
|
|
5270
5273
|
C(s, { href: "https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters" }, {
|
|
5271
|
-
default:
|
|
5274
|
+
default: M(() => t[2] || (t[2] = [
|
|
5272
5275
|
m("span", { class: "section-header" }, "Common Configuration Settings", -1)
|
|
5273
5276
|
])),
|
|
5274
5277
|
_: 1
|
|
5275
5278
|
})
|
|
5276
5279
|
]),
|
|
5277
5280
|
t[4] || (t[4] = m("div", { class: "description" }, " Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ", -1)),
|
|
5278
|
-
r.displayForm ? (
|
|
5281
|
+
r.displayForm ? (u(), A(o, {
|
|
5279
5282
|
key: 0,
|
|
5280
5283
|
model: n.formModel,
|
|
5281
5284
|
options: n.formOptions,
|
|
5282
5285
|
schema: a.commonFieldsSchema,
|
|
5283
5286
|
onModelUpdated: n.onModelUpdated
|
|
5284
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5285
|
-
C(
|
|
5286
|
-
default:
|
|
5287
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0),
|
|
5288
|
+
C(d, null, {
|
|
5289
|
+
default: M(() => t[3] || (t[3] = [
|
|
5287
5290
|
te("Auth Methods")
|
|
5288
5291
|
])),
|
|
5289
5292
|
_: 1
|
|
5290
5293
|
}),
|
|
5291
5294
|
m("div", Qc, [
|
|
5292
|
-
(
|
|
5295
|
+
(u(!0), g(K, null, J(a.authMethods, (p) => (u(), g("div", {
|
|
5293
5296
|
key: p.value,
|
|
5294
5297
|
class: "auth-method"
|
|
5295
5298
|
}, [
|
|
5296
|
-
C(
|
|
5299
|
+
C(c, {
|
|
5297
5300
|
modelValue: p.prop,
|
|
5298
|
-
"onUpdate:modelValue": (
|
|
5299
|
-
onChange: (
|
|
5301
|
+
"onUpdate:modelValue": (E) => p.prop = E,
|
|
5302
|
+
onChange: (E) => r.handleUpdate(E, p.value)
|
|
5300
5303
|
}, {
|
|
5301
|
-
default:
|
|
5302
|
-
te(
|
|
5304
|
+
default: M(() => [
|
|
5305
|
+
te(k(p.label), 1)
|
|
5303
5306
|
]),
|
|
5304
5307
|
_: 2
|
|
5305
5308
|
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])
|
|
@@ -5313,43 +5316,43 @@ function im(e, t, n, i, a, r) {
|
|
|
5313
5316
|
}, null, 8, ["modelValue", "onChange"])
|
|
5314
5317
|
])
|
|
5315
5318
|
]),
|
|
5316
|
-
authorization:
|
|
5319
|
+
authorization: M(() => [
|
|
5317
5320
|
m("div", Xc, [
|
|
5318
5321
|
m("div", em, [
|
|
5319
5322
|
C(s, { href: "https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization" }, {
|
|
5320
|
-
default:
|
|
5323
|
+
default: M(() => t[5] || (t[5] = [
|
|
5321
5324
|
m("span", { class: "section-header" }, "Authorization Configuration Settings", -1)
|
|
5322
5325
|
])),
|
|
5323
5326
|
_: 1
|
|
5324
5327
|
})
|
|
5325
5328
|
]),
|
|
5326
5329
|
t[6] || (t[6] = m("div", { class: "description" }, " Parameters for setting up claims-based authorization. ", -1)),
|
|
5327
|
-
r.displayForm ? (
|
|
5330
|
+
r.displayForm ? (u(), A(o, {
|
|
5328
5331
|
key: 0,
|
|
5329
5332
|
model: n.formModel,
|
|
5330
5333
|
options: n.formOptions,
|
|
5331
5334
|
schema: a.authFieldsSchema,
|
|
5332
5335
|
onModelUpdated: n.onModelUpdated
|
|
5333
5336
|
}, {
|
|
5334
|
-
"autofill-provider":
|
|
5337
|
+
"autofill-provider": M((p) => [
|
|
5335
5338
|
fe(e.$slots, "autofill-provider", Li(qi(p)), void 0, !0)
|
|
5336
5339
|
]),
|
|
5337
5340
|
_: 3
|
|
5338
|
-
}, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5341
|
+
}, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0)
|
|
5339
5342
|
])
|
|
5340
5343
|
]),
|
|
5341
|
-
advanced:
|
|
5344
|
+
advanced: M(() => [
|
|
5342
5345
|
m("div", tm, [
|
|
5343
5346
|
m("div", nm, [
|
|
5344
5347
|
C(s, { href: "https://docs.konghq.com/hub/kong-inc/openid-connect/" }, {
|
|
5345
|
-
default:
|
|
5348
|
+
default: M(() => t[7] || (t[7] = [
|
|
5346
5349
|
m("span", { class: "section-header" }, "Advanced Configuration Settings", -1)
|
|
5347
5350
|
])),
|
|
5348
5351
|
_: 1
|
|
5349
5352
|
})
|
|
5350
5353
|
]),
|
|
5351
5354
|
t[8] || (t[8] = m("div", { class: "description" }, " Advanced parameters for manually configuring the OpenID Connect plugin. ", -1)),
|
|
5352
|
-
r.displayForm ? (
|
|
5355
|
+
r.displayForm ? (u(), A(o, {
|
|
5353
5356
|
key: 0,
|
|
5354
5357
|
"enable-redis-partial": n.enableRedisPartial,
|
|
5355
5358
|
"is-editing": n.isEditing,
|
|
@@ -5359,7 +5362,7 @@ function im(e, t, n, i, a, r) {
|
|
|
5359
5362
|
onModelUpdated: n.onModelUpdated,
|
|
5360
5363
|
onPartialToggled: n.onPartialToggled,
|
|
5361
5364
|
onShowNewPartialModal: t[1] || (t[1] = () => n.showNewPartialModal(n.formSchema._supported_redis_partial_type))
|
|
5362
|
-
}, null, 8, ["enable-redis-partial", "is-editing", "model", "options", "schema", "onModelUpdated", "onPartialToggled"])) :
|
|
5365
|
+
}, null, 8, ["enable-redis-partial", "is-editing", "model", "options", "schema", "onModelUpdated", "onPartialToggled"])) : R("", !0)
|
|
5363
5366
|
])
|
|
5364
5367
|
]),
|
|
5365
5368
|
_: 3
|
|
@@ -5396,18 +5399,18 @@ const am = /* @__PURE__ */ z(Wc, [["render", im], ["__scopeId", "data-v-44df963d
|
|
|
5396
5399
|
it(ge, (o = ft()) == null ? void 0 : o[Ge]);
|
|
5397
5400
|
const { t, te: n } = ve("en-us", be), i = e, a = L(() => i.formModel.id && i.isEditing || !i.isEditing), r = L(() => {
|
|
5398
5401
|
const s = i.formSchema;
|
|
5399
|
-
return s.fields.map((
|
|
5400
|
-
const
|
|
5401
|
-
return
|
|
5402
|
+
return s.fields.map((d) => {
|
|
5403
|
+
const c = `post-function.${d.model}`;
|
|
5404
|
+
return d.hint = n(`${c}.hint`) && t(`${c}.hint`) || d.hint, d.help = n(`${c}.help`) && t(`${c}.help`) || d.help, d.newElementButtonLabel = n(`${c}.newElementButtonLabel`) && t(`${c}.newElementButtonLabel`) || d.newElementButtonLabel, d.model !== "tags" && (d.valueType === "array" || d.type === "array") && (d.type = "array", d.valueArrayType = "array", d.itemContainerComponent = "FieldArrayItem", d.fieldClasses = "post-function-array-item-container", d.fieldItemsClasses = "post-function-array-item", d.inputAttributes = { ...d.inputAttributes, type: "textarea" }), d;
|
|
5402
5405
|
}), s;
|
|
5403
5406
|
});
|
|
5404
|
-
return (s,
|
|
5407
|
+
return (s, d) => a.value ? (u(), A(ee, {
|
|
5405
5408
|
key: 0,
|
|
5406
5409
|
model: e.formModel,
|
|
5407
5410
|
options: e.formOptions,
|
|
5408
5411
|
schema: r.value,
|
|
5409
5412
|
onModelUpdated: e.onModelUpdated
|
|
5410
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5413
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0);
|
|
5411
5414
|
}
|
|
5412
5415
|
}), sm = /* @__PURE__ */ z(rm, [["__scopeId", "data-v-f54f37ae"]]), om = /* @__PURE__ */ re({
|
|
5413
5416
|
__name: "ExitTransformer",
|
|
@@ -5439,18 +5442,18 @@ const am = /* @__PURE__ */ z(Wc, [["render", im], ["__scopeId", "data-v-44df963d
|
|
|
5439
5442
|
it(ge, (o = ft()) == null ? void 0 : o[Ge]);
|
|
5440
5443
|
const { t, te: n } = ve("en-us", be), i = e, a = L(() => i.formModel.id && i.isEditing || !i.isEditing), r = L(() => {
|
|
5441
5444
|
const s = i.formSchema;
|
|
5442
|
-
return s.fields.map((
|
|
5443
|
-
const
|
|
5444
|
-
return
|
|
5445
|
+
return s.fields.map((d) => {
|
|
5446
|
+
const c = `exit-transformer.${d.model}`;
|
|
5447
|
+
return d.hint = n(`${c}.hint`) && t(`${c}.hint`) || d.hint, d.help = n(`${c}.help`) && t(`${c}.help`) || d.help, d.newElementButtonLabel = n(`${c}.newElementButtonLabel`) && t(`${c}.newElementButtonLabel`) || d.newElementButtonLabel, d.model !== "tags" && (d.valueType === "array" || d.type === "array") && (d.type = "array", d.valueArrayType = "array", d.itemContainerComponent = "FieldArrayItem", d.fieldClasses = "exit-transformer-array-item-container", d.fieldItemsClasses = "exit-transformer-array-item", d.inputAttributes = { ...d.inputAttributes, type: "textarea" }), d;
|
|
5445
5448
|
}), s;
|
|
5446
5449
|
});
|
|
5447
|
-
return (s,
|
|
5450
|
+
return (s, d) => a.value ? (u(), A(ee, {
|
|
5448
5451
|
key: 0,
|
|
5449
5452
|
model: e.formModel,
|
|
5450
5453
|
options: e.formOptions,
|
|
5451
5454
|
schema: r.value,
|
|
5452
5455
|
onModelUpdated: e.onModelUpdated
|
|
5453
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5456
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0);
|
|
5454
5457
|
}
|
|
5455
5458
|
}), lm = /* @__PURE__ */ z(om, [["__scopeId", "data-v-0d5c541f"]]), dm = {
|
|
5456
5459
|
fields: [
|
|
@@ -5566,58 +5569,58 @@ const am = /* @__PURE__ */ z(Wc, [["render", im], ["__scopeId", "data-v-44df963d
|
|
|
5566
5569
|
}
|
|
5567
5570
|
},
|
|
5568
5571
|
setup(e) {
|
|
5569
|
-
var
|
|
5570
|
-
it(ge, (
|
|
5572
|
+
var U;
|
|
5573
|
+
it(ge, (U = ft()) == null ? void 0 : U[Ge]);
|
|
5571
5574
|
const t = e, n = ie("zeroSsl"), i = ie("shm"), a = L(() => {
|
|
5572
|
-
var
|
|
5573
|
-
const
|
|
5574
|
-
if ((
|
|
5575
|
-
for (const
|
|
5576
|
-
|
|
5577
|
-
return
|
|
5575
|
+
var y;
|
|
5576
|
+
const T = {};
|
|
5577
|
+
if ((y = t.formSchema) != null && y.fields)
|
|
5578
|
+
for (const P of t.formSchema.fields)
|
|
5579
|
+
T[P.model] = P;
|
|
5580
|
+
return T;
|
|
5578
5581
|
}), r = L(() => {
|
|
5579
|
-
var
|
|
5580
|
-
const
|
|
5581
|
-
for (const
|
|
5582
|
-
const x = (
|
|
5583
|
-
|
|
5582
|
+
var y;
|
|
5583
|
+
const T = Te(dm);
|
|
5584
|
+
for (const P of T.fields) {
|
|
5585
|
+
const x = (y = a.value[P.model]) == null ? void 0 : y.help;
|
|
5586
|
+
P.help === void 0 && typeof x == "string" && (P.help = x);
|
|
5584
5587
|
}
|
|
5585
|
-
return
|
|
5588
|
+
return T;
|
|
5586
5589
|
}), o = L(() => {
|
|
5587
|
-
var
|
|
5588
|
-
const
|
|
5589
|
-
for (const
|
|
5590
|
-
const x = (
|
|
5591
|
-
|
|
5590
|
+
var y;
|
|
5591
|
+
const T = Te(um);
|
|
5592
|
+
for (const P of T.fields) {
|
|
5593
|
+
const x = (y = a.value[P.model]) == null ? void 0 : y.help;
|
|
5594
|
+
P.help === void 0 && typeof x == "string" && (P.help = x);
|
|
5592
5595
|
}
|
|
5593
|
-
return
|
|
5596
|
+
return T;
|
|
5594
5597
|
}), s = L(() => {
|
|
5595
|
-
var
|
|
5596
|
-
const
|
|
5597
|
-
for (const
|
|
5598
|
-
const x = (
|
|
5599
|
-
|
|
5598
|
+
var y;
|
|
5599
|
+
const T = Te(cm);
|
|
5600
|
+
for (const P of T.fields) {
|
|
5601
|
+
const x = (y = a.value[P.model]) == null ? void 0 : y.help;
|
|
5602
|
+
P.help === void 0 && typeof x == "string" && (P.help = x);
|
|
5600
5603
|
}
|
|
5601
|
-
return
|
|
5602
|
-
}),
|
|
5603
|
-
fields: t.formSchema.fields.filter((
|
|
5604
|
-
})),
|
|
5604
|
+
return T;
|
|
5605
|
+
}), d = L(() => ({
|
|
5606
|
+
fields: t.formSchema.fields.filter((T) => !T.model.startsWith("config") && T.model !== "tags")
|
|
5607
|
+
})), c = L(() => ({
|
|
5605
5608
|
fields: r.value.fields.filter(
|
|
5606
|
-
(
|
|
5609
|
+
(y) => !o.value.fields.some((P) => P.model === y.model) && !s.value.fields.some((P) => P.model === y.model)
|
|
5607
5610
|
)
|
|
5608
5611
|
})), h = L(() => ({
|
|
5609
|
-
fields: t.formSchema.fields.filter((
|
|
5612
|
+
fields: t.formSchema.fields.filter((y) => y.model.startsWith("config-storage") && !y.model.startsWith("config-storage_config-consul") && !y.model.startsWith("config-storage_config-redis") && !y.model.startsWith("config-storage_config-shm") && !y.model.startsWith("config-storage_config-vault"))
|
|
5610
5613
|
})), f = L(() => ({
|
|
5611
|
-
fields: t.formSchema.fields.filter((
|
|
5614
|
+
fields: t.formSchema.fields.filter((y) => y.model.startsWith("config-storage_config-consul"))
|
|
5612
5615
|
})), p = L(() => ({
|
|
5613
|
-
fields: t.formSchema.fields.filter((
|
|
5614
|
-
})),
|
|
5615
|
-
fields: t.formSchema.fields.filter((
|
|
5616
|
-
})),
|
|
5617
|
-
fields: t.formSchema.fields.filter((
|
|
5618
|
-
})),
|
|
5619
|
-
fields: t.formSchema.fields.filter((
|
|
5620
|
-
})),
|
|
5616
|
+
fields: t.formSchema.fields.filter((y) => y.model.startsWith("config-storage_config-redis"))
|
|
5617
|
+
})), E = L(() => ({
|
|
5618
|
+
fields: t.formSchema.fields.filter((y) => y.model.startsWith("config-storage_config-shm"))
|
|
5619
|
+
})), N = L(() => ({
|
|
5620
|
+
fields: t.formSchema.fields.filter((y) => y.model.startsWith("config-storage_config-vault"))
|
|
5621
|
+
})), l = L(() => ({
|
|
5622
|
+
fields: t.formSchema.fields.filter((T) => T.model.startsWith("config") && !c.value.fields.filter((y) => y.model === T.model).length && !h.value.fields.filter((y) => y.model === T.model).length || T.model === "tags")
|
|
5623
|
+
})), v = L(() => t.formModel.id && t.isEditing || !t.isEditing), w = [
|
|
5621
5624
|
{
|
|
5622
5625
|
hash: "#general",
|
|
5623
5626
|
title: "General"
|
|
@@ -5630,7 +5633,7 @@ const am = /* @__PURE__ */ z(Wc, [["render", im], ["__scopeId", "data-v-44df963d
|
|
|
5630
5633
|
hash: "#advanced",
|
|
5631
5634
|
title: "Advanced"
|
|
5632
5635
|
}
|
|
5633
|
-
],
|
|
5636
|
+
], $ = [
|
|
5634
5637
|
{
|
|
5635
5638
|
label: "Lets Encrypt",
|
|
5636
5639
|
value: "letsEncrypt"
|
|
@@ -5648,119 +5651,119 @@ const am = /* @__PURE__ */ z(Wc, [["render", im], ["__scopeId", "data-v-44df963d
|
|
|
5648
5651
|
Vt(() => {
|
|
5649
5652
|
n.value === "zeroSsl" && (t.formModel["config-api_uri"] = "https://acme.zerossl.com/v2/DV90");
|
|
5650
5653
|
});
|
|
5651
|
-
const b = (
|
|
5652
|
-
n.value =
|
|
5653
|
-
},
|
|
5654
|
-
|
|
5654
|
+
const b = (T) => {
|
|
5655
|
+
n.value = T.value, (T.value === "zeroSsl" || T.value === "other") && (T.value === "zeroSsl" ? t.formModel["config-api_uri"] = "https://acme.zerossl.com/v2/DV90" : t.formModel["config-api_uri"] = "https://acme.example.com/", t.formModel["config-tos_accepted"] = !1), T.value === "letsEncrypt" && (t.formModel["config-api_uri"] = "https://acme-v02.api.letsencrypt.org/directory", t.formModel["config-eab_hmac_key"] = "", t.formModel["config-eab_kid"] = ""), t.onModelUpdated();
|
|
5656
|
+
}, O = (T, y) => {
|
|
5657
|
+
y === "config-storage" && (i.value = T), t.onModelUpdated();
|
|
5655
5658
|
};
|
|
5656
|
-
return (
|
|
5657
|
-
const
|
|
5658
|
-
return
|
|
5659
|
-
e.formModel.id && e.isEditing || !e.isEditing ? (
|
|
5659
|
+
return (T, y) => {
|
|
5660
|
+
const P = F("KSelect"), x = F("KTabs");
|
|
5661
|
+
return u(), g("div", null, [
|
|
5662
|
+
e.formModel.id && e.isEditing || !e.isEditing ? (u(), A(ee, {
|
|
5660
5663
|
key: 0,
|
|
5661
5664
|
class: "global-fields",
|
|
5662
5665
|
model: e.formModel,
|
|
5663
5666
|
options: e.formOptions,
|
|
5664
|
-
schema:
|
|
5667
|
+
schema: d.value,
|
|
5665
5668
|
onModelUpdated: e.onModelUpdated
|
|
5666
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5667
|
-
C(x, { tabs:
|
|
5668
|
-
general:
|
|
5669
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0),
|
|
5670
|
+
C(x, { tabs: w }, {
|
|
5671
|
+
general: M(() => [
|
|
5669
5672
|
m("div", mm, [
|
|
5670
|
-
|
|
5673
|
+
y[0] || (y[0] = m("div", { class: "header-wrapper" }, [
|
|
5671
5674
|
m("span", { class: "section-header" }, "General Configuration Settings")
|
|
5672
5675
|
], -1)),
|
|
5673
|
-
|
|
5674
|
-
|
|
5676
|
+
y[1] || (y[1] = m("div", { class: "description" }, " Parameters for enabling the ACME plugin. ", -1)),
|
|
5677
|
+
v.value ? (u(), A(ee, {
|
|
5675
5678
|
key: 0,
|
|
5676
5679
|
model: e.formModel,
|
|
5677
5680
|
options: e.formOptions,
|
|
5678
|
-
schema:
|
|
5681
|
+
schema: c.value,
|
|
5679
5682
|
onModelUpdated: e.onModelUpdated
|
|
5680
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5681
|
-
|
|
5682
|
-
C(
|
|
5683
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0),
|
|
5684
|
+
y[2] || (y[2] = m("hr", null, null, -1)),
|
|
5685
|
+
C(P, {
|
|
5683
5686
|
class: "issuer-select",
|
|
5684
|
-
items:
|
|
5687
|
+
items: $,
|
|
5685
5688
|
label: "Issuer",
|
|
5686
5689
|
onChange: b
|
|
5687
5690
|
}),
|
|
5688
5691
|
m("div", fm, [
|
|
5689
|
-
n.value === "letsEncrypt" ? (
|
|
5692
|
+
n.value === "letsEncrypt" ? (u(), A(ee, {
|
|
5690
5693
|
key: 0,
|
|
5691
5694
|
model: e.formModel,
|
|
5692
5695
|
options: e.formOptions,
|
|
5693
5696
|
schema: o.value,
|
|
5694
5697
|
onModelUpdated: e.onModelUpdated
|
|
5695
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5696
|
-
n.value === "zeroSsl" || n.value === "other" ? (
|
|
5698
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0),
|
|
5699
|
+
n.value === "zeroSsl" || n.value === "other" ? (u(), A(ee, {
|
|
5697
5700
|
key: 1,
|
|
5698
5701
|
model: e.formModel,
|
|
5699
5702
|
options: e.formOptions,
|
|
5700
5703
|
schema: s.value,
|
|
5701
5704
|
onModelUpdated: e.onModelUpdated
|
|
5702
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5705
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0)
|
|
5703
5706
|
])
|
|
5704
5707
|
])
|
|
5705
5708
|
]),
|
|
5706
|
-
storage:
|
|
5709
|
+
storage: M(() => [
|
|
5707
5710
|
m("div", hm, [
|
|
5708
|
-
|
|
5711
|
+
y[3] || (y[3] = m("div", { class: "header-wrapper" }, [
|
|
5709
5712
|
m("span", { class: "section-header" }, "Storage Configuration Settings")
|
|
5710
5713
|
], -1)),
|
|
5711
|
-
|
|
5712
|
-
|
|
5714
|
+
y[4] || (y[4] = m("div", { class: "description" }, " Parameters for setting up storage. ", -1)),
|
|
5715
|
+
v.value ? (u(), A(ee, {
|
|
5713
5716
|
key: 0,
|
|
5714
5717
|
model: e.formModel,
|
|
5715
5718
|
options: e.formOptions,
|
|
5716
5719
|
schema: h.value,
|
|
5717
|
-
onModelUpdated:
|
|
5718
|
-
}, null, 8, ["model", "options", "schema"])) :
|
|
5720
|
+
onModelUpdated: O
|
|
5721
|
+
}, null, 8, ["model", "options", "schema"])) : R("", !0),
|
|
5719
5722
|
m("div", pm, [
|
|
5720
|
-
i.value === "consul" ? (
|
|
5723
|
+
i.value === "consul" ? (u(), A(ee, {
|
|
5721
5724
|
key: 0,
|
|
5722
5725
|
model: e.formModel,
|
|
5723
5726
|
options: e.formOptions,
|
|
5724
5727
|
schema: f.value,
|
|
5725
5728
|
onModelUpdated: e.onModelUpdated
|
|
5726
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5727
|
-
i.value === "redis" ? (
|
|
5729
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0),
|
|
5730
|
+
i.value === "redis" ? (u(), A(ee, {
|
|
5728
5731
|
key: 1,
|
|
5729
5732
|
model: e.formModel,
|
|
5730
5733
|
options: e.formOptions,
|
|
5731
5734
|
schema: p.value,
|
|
5732
5735
|
onModelUpdated: e.onModelUpdated
|
|
5733
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5734
|
-
i.value === "shm" ? (
|
|
5736
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0),
|
|
5737
|
+
i.value === "shm" ? (u(), A(ee, {
|
|
5735
5738
|
key: 2,
|
|
5736
5739
|
model: e.formModel,
|
|
5737
5740
|
options: e.formOptions,
|
|
5738
|
-
schema:
|
|
5741
|
+
schema: E.value,
|
|
5739
5742
|
onModelUpdated: e.onModelUpdated
|
|
5740
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5741
|
-
i.value === "vault" ? (
|
|
5743
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0),
|
|
5744
|
+
i.value === "vault" ? (u(), A(ee, {
|
|
5742
5745
|
key: 3,
|
|
5743
5746
|
model: e.formModel,
|
|
5744
5747
|
options: e.formOptions,
|
|
5745
|
-
schema:
|
|
5748
|
+
schema: N.value,
|
|
5746
5749
|
onModelUpdated: e.onModelUpdated
|
|
5747
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5750
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0)
|
|
5748
5751
|
])
|
|
5749
5752
|
])
|
|
5750
5753
|
]),
|
|
5751
|
-
advanced:
|
|
5754
|
+
advanced: M(() => [
|
|
5752
5755
|
m("div", gm, [
|
|
5753
|
-
|
|
5756
|
+
y[5] || (y[5] = m("div", { class: "header-wrapper" }, [
|
|
5754
5757
|
m("span", { class: "section-header" }, "Advanced Configuration Settings")
|
|
5755
5758
|
], -1)),
|
|
5756
|
-
|
|
5757
|
-
|
|
5759
|
+
y[6] || (y[6] = m("div", { class: "description" }, " Advanced parameters for manually configuring the ACME plugin. ", -1)),
|
|
5760
|
+
v.value ? (u(), A(ee, {
|
|
5758
5761
|
key: 0,
|
|
5759
5762
|
model: e.formModel,
|
|
5760
5763
|
options: e.formOptions,
|
|
5761
|
-
schema:
|
|
5764
|
+
schema: l.value,
|
|
5762
5765
|
onModelUpdated: e.onModelUpdated
|
|
5763
|
-
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) :
|
|
5766
|
+
}, null, 8, ["model", "options", "schema", "onModelUpdated"])) : R("", !0)
|
|
5764
5767
|
])
|
|
5765
5768
|
]),
|
|
5766
5769
|
_: 1
|
|
@@ -5850,75 +5853,75 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
5850
5853
|
"enabled",
|
|
5851
5854
|
...["identifier", "limit", "window_size", "error_code", "error_message"].map((_) => `config-${_}`)
|
|
5852
5855
|
]), i = (_) => _ === void 0 ? !1 : n.has(_), { t: a } = ve("en-us", be), r = e, o = L(() => {
|
|
5853
|
-
var
|
|
5854
|
-
const _ = (
|
|
5856
|
+
var V, j, D;
|
|
5857
|
+
const _ = (j = (V = r.formSchema) == null ? void 0 : V.fields) == null ? void 0 : j.find((le) => le.type === "selectionGroup" && le.model === "selectionGroup");
|
|
5855
5858
|
return { fields: [(D = r.formSchema) == null ? void 0 : D.fields.find((le) => le.model === "enabled"), _].filter(Boolean) };
|
|
5856
5859
|
}), s = L(() => {
|
|
5857
5860
|
var le, Ve;
|
|
5858
|
-
const _ = ((Ve = (le = r.formSchema) == null ? void 0 : le.fields) == null ? void 0 : Ve.filter((se) => !i(se.model))) ?? [], I = [],
|
|
5861
|
+
const _ = ((Ve = (le = r.formSchema) == null ? void 0 : le.fields) == null ? void 0 : Ve.filter((se) => !i(se.model))) ?? [], I = [], V = [], j = [];
|
|
5859
5862
|
let D = !1;
|
|
5860
5863
|
for (const se of _) {
|
|
5861
5864
|
const De = se.model;
|
|
5862
5865
|
if (De !== void 0) {
|
|
5863
5866
|
if (De.startsWith("config-redis-")) {
|
|
5864
|
-
(se.model === "config-redis-cluster_addresses" || se.model === "config-redis-sentinel_addresses") && (se.inputAttributes.help = a("rla.redis.address_example")),
|
|
5867
|
+
(se.model === "config-redis-cluster_addresses" || se.model === "config-redis-sentinel_addresses") && (se.inputAttributes.help = a("rla.redis.address_example")), V.push(se);
|
|
5865
5868
|
continue;
|
|
5866
5869
|
}
|
|
5867
|
-
D ?
|
|
5870
|
+
D ? j.push(se) : I.push(se), se.model === "config-strategy" && (D = !0);
|
|
5868
5871
|
}
|
|
5869
5872
|
}
|
|
5870
5873
|
return {
|
|
5871
5874
|
endsWithStrategy: { fields: I },
|
|
5872
|
-
redis: r.enableRedisPartial ? { fields: [{ fields:
|
|
5873
|
-
afterStrategy: { fields:
|
|
5875
|
+
redis: r.enableRedisPartial ? { fields: [{ fields: V, id: "_redis", model: "__redis_partial", redisType: r.formSchema._supported_redis_partial_type }] } : { fields: V },
|
|
5876
|
+
afterStrategy: { fields: j }
|
|
5874
5877
|
};
|
|
5875
|
-
}),
|
|
5878
|
+
}), d = L(() => {
|
|
5876
5879
|
const _ = r.formModel["config-window_type"];
|
|
5877
5880
|
return Object.prototype.hasOwnProperty.call(t, _) ? t[_] : [];
|
|
5878
|
-
}),
|
|
5881
|
+
}), c = L(() => {
|
|
5879
5882
|
var _, I;
|
|
5880
|
-
return (I = (_ = r.formSchema) == null ? void 0 : _.fields) == null ? void 0 : I.find((
|
|
5883
|
+
return (I = (_ = r.formSchema) == null ? void 0 : _.fields) == null ? void 0 : I.find((V) => V.model === "config-identifier");
|
|
5881
5884
|
}), h = L(
|
|
5882
5885
|
() => {
|
|
5883
|
-
var _, I,
|
|
5884
|
-
return (((
|
|
5885
|
-
label: a(`rla.identifiers.options.${
|
|
5886
|
-
value:
|
|
5886
|
+
var _, I, V;
|
|
5887
|
+
return (((V = (I = (_ = r.formSchema) == null ? void 0 : _.fields) == null ? void 0 : I.find((j) => j.model === "config-identifier")) == null ? void 0 : V.values) ?? []).map((j) => ({
|
|
5888
|
+
label: a(`rla.identifiers.options.${j}`),
|
|
5889
|
+
value: j
|
|
5887
5890
|
}));
|
|
5888
5891
|
}
|
|
5889
|
-
), f = ie(), p = ie(!0),
|
|
5892
|
+
), f = ie(), p = ie(!0), E = L(
|
|
5890
5893
|
() => {
|
|
5891
|
-
var _, I,
|
|
5892
|
-
return r.formModel["config-window_type"] ?? ((
|
|
5894
|
+
var _, I, V;
|
|
5895
|
+
return r.formModel["config-window_type"] ?? ((V = (I = (_ = r.formSchema) == null ? void 0 : _.fields) == null ? void 0 : I.find((j) => j.model === "config-window_type")) == null ? void 0 : V.default);
|
|
5893
5896
|
}
|
|
5894
|
-
),
|
|
5895
|
-
var I,
|
|
5896
|
-
const _ = (
|
|
5897
|
+
), N = L(() => {
|
|
5898
|
+
var I, V, j, D, le, Ve;
|
|
5899
|
+
const _ = (j = (V = (I = r.formSchema) == null ? void 0 : I.fields) == null ? void 0 : V.find((se) => se.model === "config-window_type")) == null ? void 0 : j.default;
|
|
5897
5900
|
return (((Ve = (le = (D = r.formSchema) == null ? void 0 : D.fields) == null ? void 0 : le.find((se) => se.model === "config-window_type")) == null ? void 0 : Ve.values) ?? []).sort((se, De) => se === _ ? -1 : De === _ ? 1 : 0);
|
|
5898
|
-
}),
|
|
5901
|
+
}), l = L(() => {
|
|
5899
5902
|
var I;
|
|
5900
|
-
const _ = (I = r.formModel["config-limit"]) == null ? void 0 : I.map((
|
|
5903
|
+
const _ = (I = r.formModel["config-limit"]) == null ? void 0 : I.map((V, j) => {
|
|
5901
5904
|
var D, le;
|
|
5902
5905
|
return {
|
|
5903
|
-
limit:
|
|
5904
|
-
windowSize: (le = (D = r.formModel) == null ? void 0 : D["config-window_size"]) == null ? void 0 : le[
|
|
5906
|
+
limit: V,
|
|
5907
|
+
windowSize: (le = (D = r.formModel) == null ? void 0 : D["config-window_size"]) == null ? void 0 : le[j]
|
|
5905
5908
|
};
|
|
5906
5909
|
});
|
|
5907
5910
|
return !Array.isArray(_) || _.length === 0 ? [{ limit: void 0, windowSize: void 0 }] : _;
|
|
5908
|
-
}),
|
|
5911
|
+
}), v = L(
|
|
5909
5912
|
() => {
|
|
5910
|
-
var _, I,
|
|
5911
|
-
return ((_ = r.formModel) == null ? void 0 : _["config-identifier"]) ?? ((
|
|
5913
|
+
var _, I, V, j;
|
|
5914
|
+
return ((_ = r.formModel) == null ? void 0 : _["config-identifier"]) ?? ((j = (V = (I = r.formSchema) == null ? void 0 : I.fields) == null ? void 0 : V.find((D) => D.model === "config-identifier")) == null ? void 0 : j.default);
|
|
5912
5915
|
}
|
|
5913
|
-
),
|
|
5916
|
+
), w = L(
|
|
5914
5917
|
() => {
|
|
5915
|
-
var _, I,
|
|
5916
|
-
return ((_ = r.formModel) == null ? void 0 : _["config-error_code"]) ?? ((
|
|
5918
|
+
var _, I, V, j;
|
|
5919
|
+
return ((_ = r.formModel) == null ? void 0 : _["config-error_code"]) ?? ((j = (V = (I = r.formSchema) == null ? void 0 : I.fields) == null ? void 0 : V.find((D) => D.model === "config-error_code")) == null ? void 0 : j.default);
|
|
5917
5920
|
}
|
|
5918
|
-
),
|
|
5921
|
+
), $ = L(
|
|
5919
5922
|
() => {
|
|
5920
|
-
var _, I,
|
|
5921
|
-
return ((_ = r.formModel) == null ? void 0 : _["config-error_message"]) ?? ((
|
|
5923
|
+
var _, I, V, j;
|
|
5924
|
+
return ((_ = r.formModel) == null ? void 0 : _["config-error_message"]) ?? ((j = (V = (I = r.formSchema) == null ? void 0 : I.fields) == null ? void 0 : V.find((D) => D.model === "config-error_message")) == null ? void 0 : j.default);
|
|
5922
5925
|
}
|
|
5923
5926
|
), b = (_, I) => {
|
|
5924
5927
|
if (I === f.value) {
|
|
@@ -5930,36 +5933,36 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
5930
5933
|
r.onModelUpdated([_.config.limit], "config-limit"), r.onModelUpdated([_.config.window_size], "config-window_size"), Ht(() => {
|
|
5931
5934
|
f.value = I;
|
|
5932
5935
|
});
|
|
5933
|
-
},
|
|
5936
|
+
}, O = (_) => {
|
|
5934
5937
|
f.value !== void 0 && (f.value = void 0), _ !== null && r.onModelUpdated(_.toString(), "config-window_type");
|
|
5935
|
-
},
|
|
5936
|
-
var
|
|
5938
|
+
}, U = (_, I) => {
|
|
5939
|
+
var j;
|
|
5937
5940
|
f.value !== void 0 && (f.value = void 0);
|
|
5938
|
-
const
|
|
5939
|
-
|
|
5940
|
-
},
|
|
5941
|
-
var
|
|
5941
|
+
const V = Te(((j = r.formModel) == null ? void 0 : j["config-limit"]) ?? []);
|
|
5942
|
+
V[_] = I, r.onModelUpdated(V, "config-limit");
|
|
5943
|
+
}, T = (_, I) => {
|
|
5944
|
+
var j;
|
|
5942
5945
|
f.value !== void 0 && (f.value = void 0);
|
|
5943
|
-
const
|
|
5944
|
-
|
|
5945
|
-
},
|
|
5946
|
-
var
|
|
5946
|
+
const V = Te(((j = r.formModel) == null ? void 0 : j["config-window_size"]) ?? []);
|
|
5947
|
+
V[_] = I, r.onModelUpdated(V, "config-window_size");
|
|
5948
|
+
}, y = (_) => {
|
|
5949
|
+
var j, D;
|
|
5947
5950
|
f.value !== void 0 && (f.value = void 0);
|
|
5948
|
-
const I = Te(((
|
|
5949
|
-
I.length === 0 && I.push(void 0),
|
|
5950
|
-
},
|
|
5951
|
-
var I,
|
|
5952
|
-
if (
|
|
5951
|
+
const I = Te(((j = r.formModel) == null ? void 0 : j["config-limit"]) ?? []), V = Te(((D = r.formModel) == null ? void 0 : D["config-window_size"]) ?? []);
|
|
5952
|
+
I.length === 0 && I.push(void 0), V.length === 0 && V.push(void 0), I.splice(_ + 1, 0, void 0), V.splice(_ + 1, 0, void 0), r.onModelUpdated(I, "config-limit"), r.onModelUpdated(V, "config-window_size");
|
|
5953
|
+
}, P = (_) => {
|
|
5954
|
+
var I, V;
|
|
5955
|
+
if (l.value.length > 1) {
|
|
5953
5956
|
f.value !== void 0 && (f.value = void 0);
|
|
5954
|
-
const
|
|
5955
|
-
|
|
5957
|
+
const j = Te(((I = r.formModel) == null ? void 0 : I["config-limit"]) ?? []), D = Te(((V = r.formModel) == null ? void 0 : V["config-window_size"]) ?? []);
|
|
5958
|
+
j.length === 0 && j.push(void 0), D.length === 0 && D.push(void 0), j.splice(_, 1), D.splice(_, 1), r.onModelUpdated(j, "config-limit"), r.onModelUpdated(D, "config-window_size");
|
|
5956
5959
|
}
|
|
5957
5960
|
};
|
|
5958
5961
|
return Rt(() => r.formModel["config-strategy"], (_) => {
|
|
5959
5962
|
_ !== "redis" && r.formModel.partials && r.onModelUpdated(void 0, "partials");
|
|
5960
5963
|
}), (_, I) => {
|
|
5961
|
-
const
|
|
5962
|
-
return
|
|
5964
|
+
const V = F("KLabel"), j = F("KRadio"), D = F("KInput"), le = F("KButton"), Ve = F("KBadge"), se = F("KTooltip"), De = F("KCard"), Fi = F("KSelect"), ki = F("KCollapse");
|
|
5965
|
+
return u(), g(K, null, [
|
|
5963
5966
|
m("div", bm, [
|
|
5964
5967
|
C(ee, {
|
|
5965
5968
|
model: _.formModel,
|
|
@@ -5968,63 +5971,63 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
5968
5971
|
onModelUpdated: I[0] || (I[0] = (q, ae) => _.onModelUpdated(q, ae))
|
|
5969
5972
|
}, null, 8, ["model", "options", "schema"]),
|
|
5970
5973
|
C(De, { class: "rla-form-request-limits" }, {
|
|
5971
|
-
title:
|
|
5972
|
-
C(
|
|
5974
|
+
title: M(() => [
|
|
5975
|
+
C(V, {
|
|
5973
5976
|
class: "rla-form-request-limits-title",
|
|
5974
5977
|
for: "rla-form-request-limits-legend",
|
|
5975
5978
|
required: ""
|
|
5976
5979
|
}, {
|
|
5977
|
-
default:
|
|
5978
|
-
te(
|
|
5980
|
+
default: M(() => [
|
|
5981
|
+
te(k(S(a)("rla.request_limits.title")), 1)
|
|
5979
5982
|
]),
|
|
5980
5983
|
_: 1
|
|
5981
5984
|
}),
|
|
5982
|
-
m("div", _m,
|
|
5985
|
+
m("div", _m, k(S(a)("rla.request_limits.subtitle")), 1)
|
|
5983
5986
|
]),
|
|
5984
|
-
default:
|
|
5987
|
+
default: M(() => [
|
|
5985
5988
|
m("div", wm, [
|
|
5986
5989
|
m("div", Mm, [
|
|
5987
|
-
C(
|
|
5990
|
+
C(V, {
|
|
5988
5991
|
class: "rla-form-window-type-label",
|
|
5989
5992
|
"tooltip-attributes": {
|
|
5990
5993
|
maxWidth: "300",
|
|
5991
5994
|
placement: "top"
|
|
5992
5995
|
}
|
|
5993
5996
|
}, {
|
|
5994
|
-
tooltip:
|
|
5997
|
+
tooltip: M(() => [
|
|
5995
5998
|
m("div", {
|
|
5996
|
-
innerHTML:
|
|
5999
|
+
innerHTML: S(a)("rla.window_type.help")
|
|
5997
6000
|
}, null, 8, Sm)
|
|
5998
6001
|
]),
|
|
5999
|
-
default:
|
|
6000
|
-
te(
|
|
6002
|
+
default: M(() => [
|
|
6003
|
+
te(k(S(a)("rla.window_type.label")) + " ", 1)
|
|
6001
6004
|
]),
|
|
6002
6005
|
_: 1
|
|
6003
6006
|
}),
|
|
6004
6007
|
m("div", Tm, [
|
|
6005
|
-
(
|
|
6008
|
+
(u(!0), g(K, null, J(N.value, (q) => (u(), A(j, {
|
|
6006
6009
|
key: `window-type-${q}`,
|
|
6007
|
-
"model-value":
|
|
6010
|
+
"model-value": E.value,
|
|
6008
6011
|
name: q,
|
|
6009
6012
|
"selected-value": q,
|
|
6010
|
-
"onUpdate:modelValue":
|
|
6013
|
+
"onUpdate:modelValue": O
|
|
6011
6014
|
}, {
|
|
6012
|
-
default:
|
|
6013
|
-
te(
|
|
6015
|
+
default: M(() => [
|
|
6016
|
+
te(k(S(a)(`rla.window_type.options.${q}`)), 1)
|
|
6014
6017
|
]),
|
|
6015
6018
|
_: 2
|
|
6016
6019
|
}, 1032, ["model-value", "name", "selected-value"]))), 128))
|
|
6017
6020
|
])
|
|
6018
6021
|
]),
|
|
6019
6022
|
m("div", Im, [
|
|
6020
|
-
(
|
|
6023
|
+
(u(!0), g(K, null, J(l.value, (q, ae) => (u(), g("div", {
|
|
6021
6024
|
key: ae.toString()
|
|
6022
6025
|
}, [
|
|
6023
|
-
C(
|
|
6026
|
+
C(V, {
|
|
6024
6027
|
for: `rla-form-request-limits-item-${ae}-legend`
|
|
6025
6028
|
}, {
|
|
6026
|
-
default:
|
|
6027
|
-
te(
|
|
6029
|
+
default: M(() => [
|
|
6030
|
+
te(k(S(a)("rla.request_limits.label_index", { index: ae + 1 })), 1)
|
|
6028
6031
|
]),
|
|
6029
6032
|
_: 2
|
|
6030
6033
|
}, 1032, ["for"]),
|
|
@@ -6035,36 +6038,36 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
6035
6038
|
}, [
|
|
6036
6039
|
C(D, {
|
|
6037
6040
|
"model-value": q.limit && q.limit.toString(),
|
|
6038
|
-
placeholder:
|
|
6041
|
+
placeholder: S(a)("rla.request_limits.request_number"),
|
|
6039
6042
|
type: "number",
|
|
6040
|
-
"onUpdate:modelValue": (Mt) =>
|
|
6043
|
+
"onUpdate:modelValue": (Mt) => U(ae, Number.parseInt(Mt))
|
|
6041
6044
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
|
|
6042
|
-
m("div", null,
|
|
6045
|
+
m("div", null, k(S(a)("rla.request_limits.interval_determiner")), 1),
|
|
6043
6046
|
C(D, {
|
|
6044
6047
|
"model-value": q.windowSize && q.windowSize.toString(),
|
|
6045
|
-
placeholder:
|
|
6048
|
+
placeholder: S(a)("rla.request_limits.time_interval"),
|
|
6046
6049
|
type: "number",
|
|
6047
|
-
"onUpdate:modelValue": (Mt) =>
|
|
6050
|
+
"onUpdate:modelValue": (Mt) => T(ae, Number.parseInt(Mt))
|
|
6048
6051
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
|
|
6049
|
-
m("div", null,
|
|
6052
|
+
m("div", null, k(S(a)("rla.request_limits.seconds")), 1)
|
|
6050
6053
|
], 8, Am),
|
|
6051
6054
|
m("div", Om, [
|
|
6052
6055
|
C(le, {
|
|
6053
6056
|
appearance: "tertiary",
|
|
6054
|
-
disabled:
|
|
6055
|
-
onClick: () =>
|
|
6057
|
+
disabled: l.value.length <= 1,
|
|
6058
|
+
onClick: () => P(ae)
|
|
6056
6059
|
}, {
|
|
6057
|
-
default:
|
|
6058
|
-
C(
|
|
6060
|
+
default: M(() => [
|
|
6061
|
+
C(S(Di))
|
|
6059
6062
|
]),
|
|
6060
6063
|
_: 2
|
|
6061
6064
|
}, 1032, ["disabled", "onClick"]),
|
|
6062
6065
|
C(le, {
|
|
6063
6066
|
appearance: "tertiary",
|
|
6064
|
-
onClick: () =>
|
|
6067
|
+
onClick: () => y(ae)
|
|
6065
6068
|
}, {
|
|
6066
|
-
default:
|
|
6067
|
-
C(
|
|
6069
|
+
default: M(() => [
|
|
6070
|
+
C(S(jt))
|
|
6068
6071
|
]),
|
|
6069
6072
|
_: 2
|
|
6070
6073
|
}, 1032, ["onClick"])
|
|
@@ -6072,27 +6075,27 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
6072
6075
|
])
|
|
6073
6076
|
]))), 128))
|
|
6074
6077
|
]),
|
|
6075
|
-
|
|
6076
|
-
m("div", null,
|
|
6078
|
+
d.value.length > 0 ? (u(), g("div", Em, [
|
|
6079
|
+
m("div", null, k(S(a)("rla.start_with_a_use_case")), 1),
|
|
6077
6080
|
m("div", Fm, [
|
|
6078
|
-
(
|
|
6081
|
+
(u(!0), g(K, null, J(d.value, (q, ae) => (u(), A(se, {
|
|
6079
6082
|
key: `use-case-${ae}`,
|
|
6080
6083
|
"max-width": "300"
|
|
6081
6084
|
}, {
|
|
6082
|
-
content:
|
|
6083
|
-
m("div", null,
|
|
6085
|
+
content: M(() => [
|
|
6086
|
+
m("div", null, k(q.description), 1),
|
|
6084
6087
|
I[10] || (I[10] = m("br", null, null, -1)),
|
|
6085
|
-
m("div", null,
|
|
6086
|
-
m("div", null,
|
|
6088
|
+
m("div", null, k(S(a)("rla.request_limits.label")) + ": " + k(q.config.limit), 1),
|
|
6089
|
+
m("div", null, k(S(a)("rla.request_limits.time_interval")) + ": " + k(q.config.window_size), 1)
|
|
6087
6090
|
]),
|
|
6088
|
-
default:
|
|
6091
|
+
default: M(() => [
|
|
6089
6092
|
C(Ve, {
|
|
6090
|
-
appearance: f.value === `${
|
|
6093
|
+
appearance: f.value === `${E.value}-${ae}` ? "info" : "decorative",
|
|
6091
6094
|
class: "rla-form-request-limits-examples-badge",
|
|
6092
|
-
onClick: () => b(q, `${
|
|
6095
|
+
onClick: () => b(q, `${E.value}-${ae}`)
|
|
6093
6096
|
}, {
|
|
6094
|
-
default:
|
|
6095
|
-
te(
|
|
6097
|
+
default: M(() => [
|
|
6098
|
+
te(k(q.label), 1)
|
|
6096
6099
|
]),
|
|
6097
6100
|
_: 2
|
|
6098
6101
|
}, 1032, ["appearance", "onClick"])
|
|
@@ -6100,17 +6103,17 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
6100
6103
|
_: 2
|
|
6101
6104
|
}, 1024))), 128))
|
|
6102
6105
|
])
|
|
6103
|
-
])) :
|
|
6106
|
+
])) : R("", !0)
|
|
6104
6107
|
])
|
|
6105
6108
|
]),
|
|
6106
6109
|
_: 1
|
|
6107
6110
|
}),
|
|
6108
6111
|
C(Fi, {
|
|
6109
|
-
modelValue:
|
|
6110
|
-
"onUpdate:modelValue": I[1] || (I[1] = (q) =>
|
|
6112
|
+
modelValue: v.value,
|
|
6113
|
+
"onUpdate:modelValue": I[1] || (I[1] = (q) => v.value = q),
|
|
6111
6114
|
class: "rla-form-identifiers",
|
|
6112
6115
|
items: h.value,
|
|
6113
|
-
label:
|
|
6116
|
+
label: S(a)("rla.identifiers.label"),
|
|
6114
6117
|
"label-attributes": {
|
|
6115
6118
|
tooltipAttributes: {
|
|
6116
6119
|
maxWidth: "300",
|
|
@@ -6120,40 +6123,40 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
6120
6123
|
required: "",
|
|
6121
6124
|
onSelected: I[2] || (I[2] = (q) => r.onModelUpdated(q.value, "config-identifier"))
|
|
6122
6125
|
}, {
|
|
6123
|
-
"label-tooltip":
|
|
6126
|
+
"label-tooltip": M(() => [
|
|
6124
6127
|
m("div", {
|
|
6125
|
-
innerHTML:
|
|
6128
|
+
innerHTML: c.value && c.value.help
|
|
6126
6129
|
}, null, 8, km)
|
|
6127
6130
|
]),
|
|
6128
6131
|
_: 1
|
|
6129
6132
|
}, 8, ["modelValue", "items", "label"]),
|
|
6130
6133
|
m("div", null, [
|
|
6131
|
-
C(
|
|
6134
|
+
C(V, {
|
|
6132
6135
|
for: "rla-form-error-legend",
|
|
6133
|
-
info:
|
|
6136
|
+
info: S(a)("rla.error_message.help"),
|
|
6134
6137
|
required: "",
|
|
6135
6138
|
"tooltip-attributes": {
|
|
6136
6139
|
maxWidth: "300",
|
|
6137
6140
|
placement: "top"
|
|
6138
6141
|
}
|
|
6139
6142
|
}, {
|
|
6140
|
-
default:
|
|
6141
|
-
te(
|
|
6143
|
+
default: M(() => [
|
|
6144
|
+
te(k(S(a)("rla.error_message.label")), 1)
|
|
6142
6145
|
]),
|
|
6143
6146
|
_: 1
|
|
6144
6147
|
}, 8, ["info"]),
|
|
6145
6148
|
m("legend", Um, [
|
|
6146
6149
|
C(D, {
|
|
6147
6150
|
class: "input-error-code",
|
|
6148
|
-
"model-value":
|
|
6149
|
-
placeholder:
|
|
6151
|
+
"model-value": w.value && w.value.toString(),
|
|
6152
|
+
placeholder: S(a)("rla.error_message.code_placeholder"),
|
|
6150
6153
|
type: "number",
|
|
6151
6154
|
"onUpdate:modelValue": I[3] || (I[3] = (q) => _.onModelUpdated(Number.parseInt(q), "config-error_code"))
|
|
6152
6155
|
}, null, 8, ["model-value", "placeholder"]),
|
|
6153
6156
|
I[11] || (I[11] = m("div", null, ":", -1)),
|
|
6154
6157
|
C(D, {
|
|
6155
|
-
"model-value":
|
|
6156
|
-
placeholder:
|
|
6158
|
+
"model-value": $.value,
|
|
6159
|
+
placeholder: S(a)("rla.error_message.message_placeholder"),
|
|
6157
6160
|
"onUpdate:modelValue": I[4] || (I[4] = (q) => _.onModelUpdated(q, "config-error_message"))
|
|
6158
6161
|
}, null, 8, ["model-value", "placeholder"])
|
|
6159
6162
|
])
|
|
@@ -6162,21 +6165,21 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
6162
6165
|
C(ki, {
|
|
6163
6166
|
modelValue: p.value,
|
|
6164
6167
|
"onUpdate:modelValue": I[9] || (I[9] = (q) => p.value = q),
|
|
6165
|
-
"trigger-label":
|
|
6168
|
+
"trigger-label": S(a)("rla.view_advanced_fields")
|
|
6166
6169
|
}, {
|
|
6167
|
-
default:
|
|
6170
|
+
default: M(() => [
|
|
6168
6171
|
C(ee, {
|
|
6169
6172
|
model: _.formModel,
|
|
6170
6173
|
options: _.formOptions,
|
|
6171
6174
|
schema: s.value.endsWithStrategy,
|
|
6172
6175
|
onModelUpdated: I[5] || (I[5] = (q, ae) => _.onModelUpdated(q, ae))
|
|
6173
6176
|
}, null, 8, ["model", "options", "schema"]),
|
|
6174
|
-
_.formModel["config-strategy"] === "redis" ? (
|
|
6177
|
+
_.formModel["config-strategy"] === "redis" ? (u(), A(ne(_.enableRedisPartial ? "div" : "KCard"), {
|
|
6175
6178
|
key: 0,
|
|
6176
6179
|
class: "rla-form-redis-card",
|
|
6177
|
-
title:
|
|
6180
|
+
title: S(a)("rla.redis.title")
|
|
6178
6181
|
}, {
|
|
6179
|
-
default:
|
|
6182
|
+
default: M(() => [
|
|
6180
6183
|
C(ee, {
|
|
6181
6184
|
"enable-redis-partial": _.enableRedisPartial,
|
|
6182
6185
|
"is-editing": _.isEditing,
|
|
@@ -6189,7 +6192,7 @@ will extend the wait time by about 12 minutes, continuously adjusting as new req
|
|
|
6189
6192
|
}, null, 8, ["enable-redis-partial", "is-editing", "model", "options", "schema", "onPartialToggled"])
|
|
6190
6193
|
]),
|
|
6191
6194
|
_: 1
|
|
6192
|
-
}, 8, ["title"])) :
|
|
6195
|
+
}, 8, ["title"])) : R("", !0),
|
|
6193
6196
|
C(ee, {
|
|
6194
6197
|
class: W({ "rla-last-vfg": _.formModel["config-strategy"] !== "redis" }),
|
|
6195
6198
|
model: _.formModel,
|