@kong-ui-public/forms 4.18.4 → 4.19.1-pr.2621.3e43f8a74.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 +106 -88
- package/dist/forms.umd.js +3 -3
- package/dist/style.css +1 -1
- package/dist/types/components/fields/AutoSuggest.vue.d.ts +1 -0
- package/dist/types/components/fields/AutoSuggest.vue.d.ts.map +1 -1
- package/dist/types/components/fields/FieldArray.vue.d.ts +4 -0
- package/dist/types/components/fields/FieldAutoSuggest.vue.d.ts +4 -0
- package/dist/types/components/fields/FieldScopedEntitySelect.vue.d.ts +1 -0
- package/dist/types/components/fields/FieldScopedEntitySelect.vue.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/forms.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as _, openBlock as c, createElementVNode as m, toDisplayString as L, normalizeClass as ee, createVNode as C, defineComponent as he, provide as Bt, resolveComponent as D, withCtx as E, renderSlot as Oe, unref as A, createTextVNode as ce, mergeModels as Oi, useModel as Po, createBlock as U, createSlots as cn, ref as ae, onMounted as Xn, watch as mn, resolveDynamicComponent as me, Fragment as Y, renderList as oe, computed as B, toRefs as ut, inject as an, onBeforeMount as Jn, mergeProps as et, Transition as Do, createCommentVNode as K, resolveDirective as Aa, withDirectives as
|
|
1
|
+
import { createElementBlock as _, openBlock as c, createElementVNode as m, toDisplayString as L, normalizeClass as ee, createVNode as C, defineComponent as he, provide as Bt, resolveComponent as D, withCtx as E, renderSlot as Oe, unref as A, createTextVNode as ce, mergeModels as Oi, useModel as Po, createBlock as U, createSlots as cn, ref as ae, onMounted as Xn, watch as mn, resolveDynamicComponent as me, Fragment as Y, renderList as oe, computed as B, toRefs as ut, inject as an, onBeforeMount as Jn, mergeProps as et, Transition as Do, createCommentVNode as K, resolveDirective as Aa, withDirectives as we, vModelText as $t, vModelCheckbox as $o, vModelSelect as Vo, vModelDynamic as Ia, isRef as Et, toRef as jo, vModelRadio as xo, vShow as qo, normalizeProps as Ko, guardReactiveProps as Bo, useSlots as fn, nextTick as Fi } from "vue";
|
|
2
2
|
import { createI18n as ke } from "@kong-ui-public/i18n";
|
|
3
3
|
import { TrashIcon as zt, SearchIcon as zo, AddIcon as Qn, RemoveIcon as Ho } from "@kong/icons";
|
|
4
4
|
import { isAxiosError as Yo } from "axios";
|
|
@@ -152,7 +152,7 @@ function ni(e) {
|
|
|
152
152
|
function ss(e) {
|
|
153
153
|
return typeof e == "function" ? e : ni;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Se(e, t) {
|
|
156
156
|
var n = at(e) ? Ca : rs;
|
|
157
157
|
return n(e, ss(t));
|
|
158
158
|
}
|
|
@@ -396,7 +396,7 @@ function G(e, t, n) {
|
|
|
396
396
|
function de(e) {
|
|
397
397
|
return e == null;
|
|
398
398
|
}
|
|
399
|
-
const
|
|
399
|
+
const Ce = "kong-ui-forms-api", al = "kong-ui-forms-config", ol = "redis-partial-list-fetcher-key", vp = "redis-partial-info", Mt = "autofill", Le = "autofillSlot", je = {
|
|
400
400
|
CREATE_NOT_FROM_ENTITY: "CREATE_NOT_FROM_ENTITY",
|
|
401
401
|
CREATE_FROM_ENTITY: "CREATE_FROM_ENTITY",
|
|
402
402
|
UPDATE_ENTITY: "UPDATE_ENTITY",
|
|
@@ -411,14 +411,14 @@ const {
|
|
|
411
411
|
getOwnPropertyDescriptor: dl
|
|
412
412
|
} = Object;
|
|
413
413
|
let {
|
|
414
|
-
freeze:
|
|
414
|
+
freeze: Ee,
|
|
415
415
|
seal: Ne,
|
|
416
416
|
create: qa
|
|
417
417
|
} = Object, {
|
|
418
418
|
apply: Bn,
|
|
419
419
|
construct: zn
|
|
420
420
|
} = typeof Reflect < "u" && Reflect;
|
|
421
|
-
|
|
421
|
+
Ee || (Ee = function(t) {
|
|
422
422
|
return t;
|
|
423
423
|
});
|
|
424
424
|
Ne || (Ne = function(t) {
|
|
@@ -430,8 +430,8 @@ Bn || (Bn = function(t, n, i) {
|
|
|
430
430
|
zn || (zn = function(t, n) {
|
|
431
431
|
return new t(...n);
|
|
432
432
|
});
|
|
433
|
-
const en =
|
|
434
|
-
function
|
|
433
|
+
const en = Me(Array.prototype.forEach), ul = Me(Array.prototype.lastIndexOf), ji = Me(Array.prototype.pop), Rt = Me(Array.prototype.push), cl = Me(Array.prototype.splice), nn = Me(String.prototype.toLowerCase), Pn = Me(String.prototype.toString), xi = Me(String.prototype.match), Ut = Me(String.prototype.replace), ml = Me(String.prototype.indexOf), fl = Me(String.prototype.trim), De = Me(Object.prototype.hasOwnProperty), Te = Me(RegExp.prototype.test), Lt = hl(TypeError);
|
|
434
|
+
function Me(e) {
|
|
435
435
|
return function(t) {
|
|
436
436
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
437
437
|
for (var n = arguments.length, i = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++)
|
|
@@ -476,9 +476,9 @@ function Nt(e, t) {
|
|
|
476
476
|
const i = dl(e, t);
|
|
477
477
|
if (i) {
|
|
478
478
|
if (i.get)
|
|
479
|
-
return
|
|
479
|
+
return Me(i.get);
|
|
480
480
|
if (typeof i.value == "function")
|
|
481
|
-
return
|
|
481
|
+
return Me(i.value);
|
|
482
482
|
}
|
|
483
483
|
e = ll(e);
|
|
484
484
|
}
|
|
@@ -487,7 +487,7 @@ function Nt(e, t) {
|
|
|
487
487
|
}
|
|
488
488
|
return n;
|
|
489
489
|
}
|
|
490
|
-
const qi =
|
|
490
|
+
const qi = Ee(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Dn = Ee(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), $n = Ee(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), gl = Ee(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Vn = Ee(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), yl = Ee(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ki = Ee(["#text"]), Bi = Ee(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), jn = Ee(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), zi = Ee(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), tn = Ee(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), vl = Ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm), bl = Ne(/<%[\w\W]*|[\w\W]*%>/gm), _l = Ne(/\$\{[\w\W]*/gm), Tl = Ne(/^data-[\-\w.\u00B7-\uFFFF]+$/), Sl = Ne(/^aria-[\-\w]+$/), Ka = Ne(
|
|
491
491
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
492
492
|
// eslint-disable-line no-useless-escape
|
|
493
493
|
), wl = Ne(/^(?:\w+script|data):/i), El = Ne(
|
|
@@ -646,7 +646,7 @@ function za() {
|
|
|
646
646
|
O = l.TRUSTED_TYPES_POLICY, v = O.createHTML("");
|
|
647
647
|
} else
|
|
648
648
|
O === void 0 && (O = Il(F, a)), O !== null && typeof v == "string" && (v = O.createHTML(""));
|
|
649
|
-
|
|
649
|
+
Ee && Ee(l), vt = l;
|
|
650
650
|
}
|
|
651
651
|
}, vi = z({}, [...Dn, ...$n, ...gl]), bi = z({}, [...Vn, ...yl]), Lo = function(l) {
|
|
652
652
|
let S = T(l);
|
|
@@ -747,8 +747,8 @@ function za() {
|
|
|
747
747
|
const te = T(l) || l.parentNode, be = N(l) || l.childNodes;
|
|
748
748
|
if (be && te) {
|
|
749
749
|
const pe = be.length;
|
|
750
|
-
for (let
|
|
751
|
-
const He = h(be[
|
|
750
|
+
for (let Ae = pe - 1; Ae >= 0; --Ae) {
|
|
751
|
+
const He = h(be[Ae], !0);
|
|
752
752
|
He.__removalCount = (l.__removalCount || 0) + 1, te.insertBefore(He, I(l));
|
|
753
753
|
}
|
|
754
754
|
}
|
|
@@ -807,7 +807,7 @@ function za() {
|
|
|
807
807
|
for (; te--; ) {
|
|
808
808
|
const be = S[te], {
|
|
809
809
|
name: pe,
|
|
810
|
-
namespaceURI:
|
|
810
|
+
namespaceURI: Ae,
|
|
811
811
|
value: He
|
|
812
812
|
} = be, Ft = ye(pe), Un = He;
|
|
813
813
|
let _e = pe === "value" ? Un : fl(Un);
|
|
@@ -833,7 +833,7 @@ function za() {
|
|
|
833
833
|
bt(pe, l);
|
|
834
834
|
continue;
|
|
835
835
|
}
|
|
836
|
-
if (O && typeof F == "object" && typeof F.getAttributeType == "function" && !
|
|
836
|
+
if (O && typeof F == "object" && typeof F.getAttributeType == "function" && !Ae)
|
|
837
837
|
switch (F.getAttributeType(Ii, Ft)) {
|
|
838
838
|
case "TrustedHTML": {
|
|
839
839
|
_e = O.createHTML(_e);
|
|
@@ -846,7 +846,7 @@ function za() {
|
|
|
846
846
|
}
|
|
847
847
|
if (_e !== Un)
|
|
848
848
|
try {
|
|
849
|
-
|
|
849
|
+
Ae ? l.setAttributeNS(Ae, pe, _e) : l.setAttribute(pe, _e), Rn(l) ? Ve(l) : ji(t.removed);
|
|
850
850
|
} catch {
|
|
851
851
|
bt(pe, l);
|
|
852
852
|
}
|
|
@@ -898,11 +898,11 @@ function za() {
|
|
|
898
898
|
be = S;
|
|
899
899
|
return (re.shadowroot || re.shadowrootmode) && (be = k.call(i, be, !0)), be;
|
|
900
900
|
}
|
|
901
|
-
let
|
|
902
|
-
return ot && $["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && Te(Ba, S.ownerDocument.doctype.name) && (
|
|
903
|
-
` +
|
|
904
|
-
|
|
905
|
-
}), O && Wt ? O.createHTML(
|
|
901
|
+
let Ae = ot ? S.outerHTML : S.innerHTML;
|
|
902
|
+
return ot && $["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && Te(Ba, S.ownerDocument.doctype.name) && (Ae = "<!DOCTYPE " + S.ownerDocument.doctype.name + `>
|
|
903
|
+
` + Ae), ft && en([j, q, H], (He) => {
|
|
904
|
+
Ae = Ut(Ae, He, " ");
|
|
905
|
+
}), O && Wt ? O.createHTML(Ae) : Ae;
|
|
906
906
|
}, t.setConfig = function() {
|
|
907
907
|
let P = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
908
908
|
kn(P), Mn = !0;
|
|
@@ -1232,7 +1232,7 @@ const io = {
|
|
|
1232
1232
|
featured: this.fieldFeatured(e),
|
|
1233
1233
|
required: this.fieldRequired(e)
|
|
1234
1234
|
};
|
|
1235
|
-
return Array.isArray(e.styleClasses) ?
|
|
1235
|
+
return Array.isArray(e.styleClasses) ? Se(e.styleClasses, (i) => n[i] = !0) : st(e.styleClasses) && (n[e.styleClasses] = !0), de(e.type) || (n["field-" + e.type] = !0), n;
|
|
1236
1236
|
},
|
|
1237
1237
|
fieldErrors(e) {
|
|
1238
1238
|
return this.errors.filter((n) => n.field.fieldName === e.fieldName).map((n) => n.error);
|
|
@@ -1468,7 +1468,7 @@ var co = [
|
|
|
1468
1468
|
return sn = lt(sn, e);
|
|
1469
1469
|
}, ma = function(e) {
|
|
1470
1470
|
return e.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
|
|
1471
|
-
},
|
|
1471
|
+
}, Ie = function(e, t) {
|
|
1472
1472
|
for (t === void 0 && (t = 2), e = String(e); e.length < t; )
|
|
1473
1473
|
e = "0" + e;
|
|
1474
1474
|
return e;
|
|
@@ -1477,7 +1477,7 @@ var co = [
|
|
|
1477
1477
|
return String(e.getDate());
|
|
1478
1478
|
},
|
|
1479
1479
|
DD: function(e) {
|
|
1480
|
-
return
|
|
1480
|
+
return Ie(e.getDate());
|
|
1481
1481
|
},
|
|
1482
1482
|
Do: function(e, t) {
|
|
1483
1483
|
return t.DoFn(e.getDate());
|
|
@@ -1486,7 +1486,7 @@ var co = [
|
|
|
1486
1486
|
return String(e.getDay());
|
|
1487
1487
|
},
|
|
1488
1488
|
dd: function(e) {
|
|
1489
|
-
return
|
|
1489
|
+
return Ie(e.getDay());
|
|
1490
1490
|
},
|
|
1491
1491
|
ddd: function(e, t) {
|
|
1492
1492
|
return t.dayNamesShort[e.getDay()];
|
|
@@ -1498,7 +1498,7 @@ var co = [
|
|
|
1498
1498
|
return String(e.getMonth() + 1);
|
|
1499
1499
|
},
|
|
1500
1500
|
MM: function(e) {
|
|
1501
|
-
return
|
|
1501
|
+
return Ie(e.getMonth() + 1);
|
|
1502
1502
|
},
|
|
1503
1503
|
MMM: function(e, t) {
|
|
1504
1504
|
return t.monthNamesShort[e.getMonth()];
|
|
@@ -1507,43 +1507,43 @@ var co = [
|
|
|
1507
1507
|
return t.monthNames[e.getMonth()];
|
|
1508
1508
|
},
|
|
1509
1509
|
YY: function(e) {
|
|
1510
|
-
return
|
|
1510
|
+
return Ie(String(e.getFullYear()), 4).substr(2);
|
|
1511
1511
|
},
|
|
1512
1512
|
YYYY: function(e) {
|
|
1513
|
-
return
|
|
1513
|
+
return Ie(e.getFullYear(), 4);
|
|
1514
1514
|
},
|
|
1515
1515
|
h: function(e) {
|
|
1516
1516
|
return String(e.getHours() % 12 || 12);
|
|
1517
1517
|
},
|
|
1518
1518
|
hh: function(e) {
|
|
1519
|
-
return
|
|
1519
|
+
return Ie(e.getHours() % 12 || 12);
|
|
1520
1520
|
},
|
|
1521
1521
|
H: function(e) {
|
|
1522
1522
|
return String(e.getHours());
|
|
1523
1523
|
},
|
|
1524
1524
|
HH: function(e) {
|
|
1525
|
-
return
|
|
1525
|
+
return Ie(e.getHours());
|
|
1526
1526
|
},
|
|
1527
1527
|
m: function(e) {
|
|
1528
1528
|
return String(e.getMinutes());
|
|
1529
1529
|
},
|
|
1530
1530
|
mm: function(e) {
|
|
1531
|
-
return
|
|
1531
|
+
return Ie(e.getMinutes());
|
|
1532
1532
|
},
|
|
1533
1533
|
s: function(e) {
|
|
1534
1534
|
return String(e.getSeconds());
|
|
1535
1535
|
},
|
|
1536
1536
|
ss: function(e) {
|
|
1537
|
-
return
|
|
1537
|
+
return Ie(e.getSeconds());
|
|
1538
1538
|
},
|
|
1539
1539
|
S: function(e) {
|
|
1540
1540
|
return String(Math.round(e.getMilliseconds() / 100));
|
|
1541
1541
|
},
|
|
1542
1542
|
SS: function(e) {
|
|
1543
|
-
return
|
|
1543
|
+
return Ie(Math.round(e.getMilliseconds() / 10), 2);
|
|
1544
1544
|
},
|
|
1545
1545
|
SSS: function(e) {
|
|
1546
|
-
return
|
|
1546
|
+
return Ie(e.getMilliseconds(), 3);
|
|
1547
1547
|
},
|
|
1548
1548
|
a: function(e, t) {
|
|
1549
1549
|
return e.getHours() < 12 ? t.amPm[0] : t.amPm[1];
|
|
@@ -1553,11 +1553,11 @@ var co = [
|
|
|
1553
1553
|
},
|
|
1554
1554
|
ZZ: function(e) {
|
|
1555
1555
|
var t = e.getTimezoneOffset();
|
|
1556
|
-
return (t > 0 ? "-" : "+") +
|
|
1556
|
+
return (t > 0 ? "-" : "+") + Ie(Math.floor(Math.abs(t) / 60) * 100 + Math.abs(t) % 60, 4);
|
|
1557
1557
|
},
|
|
1558
1558
|
Z: function(e) {
|
|
1559
1559
|
var t = e.getTimezoneOffset();
|
|
1560
|
-
return (t > 0 ? "-" : "+") +
|
|
1560
|
+
return (t > 0 ? "-" : "+") + Ie(Math.floor(Math.abs(t) / 60), 2) + ":" + Ie(Math.abs(t) % 60, 2);
|
|
1561
1561
|
}
|
|
1562
1562
|
}, fa = function(e) {
|
|
1563
1563
|
return +e - 1;
|
|
@@ -2110,7 +2110,7 @@ function _a(e) {
|
|
|
2110
2110
|
function qn(e, t, n) {
|
|
2111
2111
|
let i = G(n.context, "schema.attributes", {});
|
|
2112
2112
|
const a = t.value || "input";
|
|
2113
|
-
st(a) && (i = G(i, a) || i),
|
|
2113
|
+
st(a) && (i = G(i, a) || i), Se(i, (o, s) => {
|
|
2114
2114
|
e.setAttribute(s, o);
|
|
2115
2115
|
});
|
|
2116
2116
|
}
|
|
@@ -2152,9 +2152,9 @@ const $e = {
|
|
|
2152
2152
|
let n = [];
|
|
2153
2153
|
if (this.schema.validator && this.schema.readonly !== !0 && this.disabled !== !0) {
|
|
2154
2154
|
const a = [];
|
|
2155
|
-
Array.isArray(this.schema.validator) ?
|
|
2155
|
+
Array.isArray(this.schema.validator) ? Se(this.schema.validator, (o) => {
|
|
2156
2156
|
a.push(_a(o).bind(this));
|
|
2157
|
-
}) : a.push(_a(this.schema.validator).bind(this)),
|
|
2157
|
+
}) : a.push(_a(this.schema.validator).bind(this)), Se(a, (o) => {
|
|
2158
2158
|
if (t)
|
|
2159
2159
|
n.push(o(this.value, this.schema, this.model));
|
|
2160
2160
|
else {
|
|
@@ -2169,7 +2169,7 @@ const $e = {
|
|
|
2169
2169
|
}
|
|
2170
2170
|
const i = (a) => {
|
|
2171
2171
|
let o = [];
|
|
2172
|
-
|
|
2172
|
+
Se(oo(a), (r) => {
|
|
2173
2173
|
Array.isArray(r) && r.length > 0 ? o = o.concat(r) : st(r) && o.push(r);
|
|
2174
2174
|
}), X(this.schema.onValidated) && this.schema.onValidated.call(this, this.model, o, this.schema);
|
|
2175
2175
|
const s = o.length === 0;
|
|
@@ -2395,7 +2395,8 @@ const qc = ["data-testid", "data-testlabel"], Kc = { class: "item-label" }, Bc =
|
|
|
2395
2395
|
disabled: { type: Boolean, default: !1 },
|
|
2396
2396
|
loading: { type: Boolean, default: !1 },
|
|
2397
2397
|
emptyMessage: { default: "" },
|
|
2398
|
-
domId: {}
|
|
2398
|
+
domId: {},
|
|
2399
|
+
error: {}
|
|
2399
2400
|
}, {
|
|
2400
2401
|
id: { required: !0 },
|
|
2401
2402
|
idModifiers: {}
|
|
@@ -2413,7 +2414,9 @@ const qc = ["data-testid", "data-testlabel"], Kc = { class: "item-label" }, Bc =
|
|
|
2413
2414
|
clearable: "",
|
|
2414
2415
|
disabled: e.disabled,
|
|
2415
2416
|
"enable-filtering": "",
|
|
2417
|
+
error: e.error !== null,
|
|
2416
2418
|
"filter-function": () => !0,
|
|
2419
|
+
help: e.error !== null ? e.error : void 0,
|
|
2417
2420
|
items: e.suggestions,
|
|
2418
2421
|
loading: e.loading,
|
|
2419
2422
|
placeholder: e.placeholder,
|
|
@@ -2449,10 +2452,10 @@ const qc = ["data-testid", "data-testlabel"], Kc = { class: "item-label" }, Bc =
|
|
|
2449
2452
|
]),
|
|
2450
2453
|
key: "0"
|
|
2451
2454
|
} : void 0
|
|
2452
|
-
]), 1032, ["id", "modelValue", "disabled", "items", "loading", "placeholder"]);
|
|
2455
|
+
]), 1032, ["id", "modelValue", "disabled", "error", "help", "items", "loading", "placeholder"]);
|
|
2453
2456
|
};
|
|
2454
2457
|
}
|
|
2455
|
-
}), Hc = /* @__PURE__ */ W(zc, [["__scopeId", "data-v-
|
|
2458
|
+
}), Hc = /* @__PURE__ */ W(zc, [["__scopeId", "data-v-9f6760b4"]]), Yc = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", Zn = (e) => e ? e.length === 36 && new RegExp(`^${Yc}$`).test(e) : !1, Gc = (e) => ({
|
|
2456
2459
|
...e,
|
|
2457
2460
|
label: e.name,
|
|
2458
2461
|
value: e.id
|
|
@@ -2475,6 +2478,7 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2475
2478
|
entity: {},
|
|
2476
2479
|
disabled: { type: Boolean },
|
|
2477
2480
|
fieldDisabled: { type: Boolean },
|
|
2481
|
+
error: {},
|
|
2478
2482
|
getAll: { type: Function },
|
|
2479
2483
|
getPartial: { type: Function },
|
|
2480
2484
|
getOne: { type: Function }
|
|
@@ -2542,6 +2546,7 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2542
2546
|
disabled: e.fieldDisabled,
|
|
2543
2547
|
"dom-id": e.domId,
|
|
2544
2548
|
"empty-message": t.value,
|
|
2549
|
+
error: e.error,
|
|
2545
2550
|
loading: e.selectedItemLoading || n.value,
|
|
2546
2551
|
placeholder: e.placeholder,
|
|
2547
2552
|
readonly: e.disabled,
|
|
@@ -2564,7 +2569,7 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2564
2569
|
]),
|
|
2565
2570
|
key: "0"
|
|
2566
2571
|
} : void 0
|
|
2567
|
-
]), 1032, ["id", "disabled", "dom-id", "empty-message", "loading", "placeholder", "readonly", "suggestions", "onQueryChange"]));
|
|
2572
|
+
]), 1032, ["id", "disabled", "dom-id", "empty-message", "error", "loading", "placeholder", "readonly", "suggestions", "onQueryChange"]));
|
|
2568
2573
|
}
|
|
2569
2574
|
}), Jc = 1e3, Qc = {
|
|
2570
2575
|
components: {
|
|
@@ -2572,7 +2577,7 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2572
2577
|
SearchIcon: zo
|
|
2573
2578
|
},
|
|
2574
2579
|
mixins: [$e],
|
|
2575
|
-
inject: [
|
|
2580
|
+
inject: [Ce],
|
|
2576
2581
|
emits: ["model-updated"],
|
|
2577
2582
|
setup() {
|
|
2578
2583
|
const { t: e } = ke("en-us", Re);
|
|
@@ -2588,6 +2593,7 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2588
2593
|
suggestions: [],
|
|
2589
2594
|
idValue: "",
|
|
2590
2595
|
message: "Type something to search",
|
|
2596
|
+
error: null,
|
|
2591
2597
|
items: [],
|
|
2592
2598
|
initialItem: null,
|
|
2593
2599
|
selectedItem: null,
|
|
@@ -2629,14 +2635,15 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2629
2635
|
async created() {
|
|
2630
2636
|
await this.$nextTick();
|
|
2631
2637
|
let e, t;
|
|
2638
|
+
this.error = null;
|
|
2632
2639
|
try {
|
|
2633
2640
|
switch (this.fieldState) {
|
|
2634
2641
|
case je.UPDATE_ENTITY:
|
|
2635
|
-
if (!this[
|
|
2642
|
+
if (!this[Ce]) {
|
|
2636
2643
|
console.warn("[@kong-ui-public/forms] No API service provided");
|
|
2637
2644
|
break;
|
|
2638
2645
|
}
|
|
2639
|
-
this.loading = !0, t =
|
|
2646
|
+
this.loading = !0, t = await this.getOne(this.model[this.schema.model]), e = this.getItem(this.schema.entityDataKey ? t[this.schema.entityDataKey] : t), this.idValue = e.id;
|
|
2640
2647
|
break;
|
|
2641
2648
|
case je.CREATE_FROM_ENTITY:
|
|
2642
2649
|
this.idValue = this.associatedEntity.id;
|
|
@@ -2644,20 +2651,30 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2644
2651
|
case je.SET_REFERRAL_VALUE:
|
|
2645
2652
|
this.idValue = this.value;
|
|
2646
2653
|
}
|
|
2647
|
-
e && (this.initialItem = this.transformItem(e), this.selectedItem = this.initialItem)
|
|
2654
|
+
e && (this.initialItem = this.transformItem(e), this.selectedItem = this.initialItem);
|
|
2648
2655
|
} catch (n) {
|
|
2649
|
-
this.message = this.t("fields.auto_suggest.error.load_entity", { entity: this.schema.entity }), console.error("err!", n);
|
|
2656
|
+
this.message = this.t("fields.auto_suggest.error.load_entity", { entity: this.schema.entity }), this.error = n.message || this.message, console.error("err!", n);
|
|
2657
|
+
} finally {
|
|
2658
|
+
this.loading = !1;
|
|
2650
2659
|
}
|
|
2651
2660
|
},
|
|
2652
2661
|
methods: {
|
|
2653
2662
|
getPartial(e) {
|
|
2654
|
-
return this[
|
|
2663
|
+
return this[Ce].peek(this.entity, e);
|
|
2655
2664
|
},
|
|
2656
2665
|
async getAll(e, t) {
|
|
2657
2666
|
return await this.fetchSuggestions(e, "name", t);
|
|
2658
2667
|
},
|
|
2659
2668
|
async getOne(e) {
|
|
2660
|
-
|
|
2669
|
+
if (!this[Ce])
|
|
2670
|
+
return console.warn("[@kong-ui-public/forms] No API service provided"), {};
|
|
2671
|
+
const t = await this[Ce].getOne(this.entity, e, {
|
|
2672
|
+
// Avoid full screen 404 error
|
|
2673
|
+
validateStatus: (n) => n >= 200 && n < 300 || n === 404
|
|
2674
|
+
});
|
|
2675
|
+
if (t.status === 404)
|
|
2676
|
+
throw new Error(`Entity of type ${this.entity} with id ${e} not found`);
|
|
2677
|
+
return t.data;
|
|
2661
2678
|
},
|
|
2662
2679
|
transformItem(e) {
|
|
2663
2680
|
return {
|
|
@@ -2671,9 +2688,9 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2671
2688
|
return e.data ? e.data.length > 0 ? e.data[0] : [] : e;
|
|
2672
2689
|
},
|
|
2673
2690
|
async fetchUntilLimit(e, t) {
|
|
2674
|
-
if (!this[
|
|
2691
|
+
if (!this[Ce])
|
|
2675
2692
|
return console.warn("[@kong-ui-public/forms] No API service provided"), [];
|
|
2676
|
-
const n = this[
|
|
2693
|
+
const n = this[Ce].getAllV2, { data: i } = await n(this.entity, {
|
|
2677
2694
|
size: Jc,
|
|
2678
2695
|
...e
|
|
2679
2696
|
}, t);
|
|
@@ -2691,7 +2708,7 @@ const Wc = 500, Zc = 50, Xc = /* @__PURE__ */ he({
|
|
|
2691
2708
|
this.$emit("model-updated", e != null && e.length ? e : null, this.schema.model);
|
|
2692
2709
|
},
|
|
2693
2710
|
onSelected(e) {
|
|
2694
|
-
this.idValue = e && e.id, this.selectedItem = e, this.updateModel(this.getReturnValue(e || {}));
|
|
2711
|
+
this.error = null, this.idValue = e && e.id, this.selectedItem = e, this.updateModel(this.getReturnValue(e || {}));
|
|
2695
2712
|
},
|
|
2696
2713
|
getReturnValue(e) {
|
|
2697
2714
|
var n;
|
|
@@ -2714,6 +2731,7 @@ function om(e, t, n, i, a, o) {
|
|
|
2714
2731
|
disabled: a.loading,
|
|
2715
2732
|
"dom-id": e.schema.model,
|
|
2716
2733
|
entity: o.entity,
|
|
2734
|
+
error: a.error,
|
|
2717
2735
|
"field-disabled": e.schema.disabled,
|
|
2718
2736
|
fields: o.inputFieldsWithoutId,
|
|
2719
2737
|
"get-all": o.getAll,
|
|
@@ -2744,14 +2762,14 @@ function om(e, t, n, i, a, o) {
|
|
|
2744
2762
|
])
|
|
2745
2763
|
]),
|
|
2746
2764
|
_: 1
|
|
2747
|
-
}, 8, ["id", "allow-uuid-search", "disabled", "dom-id", "entity", "field-disabled", "fields", "get-all", "get-one", "get-partial", "initial-item-selected", "placeholder", "selected-item", "selected-item-loading", "transform-item", "onChange"])
|
|
2765
|
+
}, 8, ["id", "allow-uuid-search", "disabled", "dom-id", "entity", "error", "field-disabled", "fields", "get-all", "get-one", "get-partial", "initial-item-selected", "placeholder", "selected-item", "selected-item-loading", "transform-item", "onChange"])
|
|
2748
2766
|
]),
|
|
2749
2767
|
_: 1
|
|
2750
2768
|
}, 8, ["text"]);
|
|
2751
2769
|
}
|
|
2752
|
-
const bo = /* @__PURE__ */ W(Qc, [["render", om], ["__scopeId", "data-v-
|
|
2770
|
+
const bo = /* @__PURE__ */ W(Qc, [["render", om], ["__scopeId", "data-v-6fe8b574"]]), Kn = 50, rm = {
|
|
2753
2771
|
mixins: [$e],
|
|
2754
|
-
inject: [
|
|
2772
|
+
inject: [Ce],
|
|
2755
2773
|
emits: ["model-updated"],
|
|
2756
2774
|
setup() {
|
|
2757
2775
|
const { t: e } = ke("en-us", Re);
|
|
@@ -2791,11 +2809,11 @@ const bo = /* @__PURE__ */ W(Qc, [["render", om], ["__scopeId", "data-v-94561d0b
|
|
|
2791
2809
|
let e, t;
|
|
2792
2810
|
switch (this.fieldState) {
|
|
2793
2811
|
case je.UPDATE_ENTITY:
|
|
2794
|
-
if (!this[
|
|
2812
|
+
if (!this[Ce]) {
|
|
2795
2813
|
console.warn("[@kong-ui-public/forms] No API service provided");
|
|
2796
2814
|
break;
|
|
2797
2815
|
}
|
|
2798
|
-
t = (await this[
|
|
2816
|
+
t = (await this[Ce].getOne(this.entity, this.model[this.schema.model])).data, e = this.getItem(this.schema.entityDataKey ? t[this.schema.entityDataKey] : t), this.idValue = e.id;
|
|
2799
2817
|
break;
|
|
2800
2818
|
case je.CREATE_FROM_ENTITY:
|
|
2801
2819
|
this.idValue = this.associatedEntity.id;
|
|
@@ -2836,10 +2854,10 @@ const bo = /* @__PURE__ */ W(Qc, [["render", om], ["__scopeId", "data-v-94561d0b
|
|
|
2836
2854
|
async fetchUntilLimit(e) {
|
|
2837
2855
|
const t = [];
|
|
2838
2856
|
let n = null;
|
|
2839
|
-
if (!this[
|
|
2857
|
+
if (!this[Ce])
|
|
2840
2858
|
return console.warn("[@kong-ui-public/forms] No API service provided"), [];
|
|
2841
2859
|
for (; t.length < Kn; ) {
|
|
2842
|
-
const i = await this[
|
|
2860
|
+
const i = await this[Ce].getAll(this.entity, {
|
|
2843
2861
|
size: Kn,
|
|
2844
2862
|
offset: n,
|
|
2845
2863
|
...e
|
|
@@ -2852,7 +2870,7 @@ const bo = /* @__PURE__ */ W(Qc, [["render", om], ["__scopeId", "data-v-94561d0b
|
|
|
2852
2870
|
return this.fetchUntilLimit({ [t]: e });
|
|
2853
2871
|
},
|
|
2854
2872
|
async fetchExact(e) {
|
|
2855
|
-
return this[
|
|
2873
|
+
return this[Ce] ? (await this[Ce].getOne(this.entity, e)).data : (console.warn("[@kong-ui-public/forms] No API service provided"), {});
|
|
2856
2874
|
},
|
|
2857
2875
|
getInputFields() {
|
|
2858
2876
|
var e, t;
|
|
@@ -2941,9 +2959,9 @@ function cm(e) {
|
|
|
2941
2959
|
let I = [];
|
|
2942
2960
|
if (e.schema.readonly !== !0 && e.disabled !== !0) {
|
|
2943
2961
|
const O = [], v = (T = e.schema) == null ? void 0 : T.validator;
|
|
2944
|
-
v && (Array.isArray(v) ?
|
|
2962
|
+
v && (Array.isArray(v) ? Se(v, (y) => {
|
|
2945
2963
|
O.push(i(y));
|
|
2946
|
-
}) : O.push(i(v))), X(e.externalValidator) && O.push(e.externalValidator),
|
|
2964
|
+
}) : O.push(i(v))), X(e.externalValidator) && O.push(e.externalValidator), Se(O, (y) => {
|
|
2947
2965
|
var g, V;
|
|
2948
2966
|
if (M)
|
|
2949
2967
|
I.push(y(a.value, e.schema, (g = e.model) == null ? void 0 : g.value));
|
|
@@ -2960,7 +2978,7 @@ function cm(e) {
|
|
|
2960
2978
|
const N = (O) => {
|
|
2961
2979
|
var y, g;
|
|
2962
2980
|
let v = [];
|
|
2963
|
-
if (
|
|
2981
|
+
if (Se(oo(O), (V) => {
|
|
2964
2982
|
Array.isArray(V) && V.length > 0 ? v = v.concat(V) : st(V) && v.push(V);
|
|
2965
2983
|
}), X((y = e.schema) == null ? void 0 : y.onValidated) && e.schema.onValidated((g = e.model) == null ? void 0 : g.value, v, e.schema), !h) {
|
|
2966
2984
|
const V = v.length === 0;
|
|
@@ -3291,7 +3309,7 @@ const So = /* @__PURE__ */ W(gm, [["render", vm]]), bm = { class: "field-object-
|
|
|
3291
3309
|
setup(e) {
|
|
3292
3310
|
return (t, n) => {
|
|
3293
3311
|
const i = Aa("attributes");
|
|
3294
|
-
return
|
|
3312
|
+
return we((c(), _("div", bm, [
|
|
3295
3313
|
t.schema.schema ? (c(), U(ue, {
|
|
3296
3314
|
key: 0,
|
|
3297
3315
|
model: t.value,
|
|
@@ -3306,7 +3324,7 @@ const So = /* @__PURE__ */ W(gm, [["render", vm]]), bm = { class: "field-object-
|
|
|
3306
3324
|
(c(!0), _(Y, null, oe(t.value, (a, o) => (c(), _("tr", { key: o }, [
|
|
3307
3325
|
m("td", null, L(o), 1),
|
|
3308
3326
|
t.keyTypes[o] === "string" ? (c(), _("td", Sm, [
|
|
3309
|
-
|
|
3327
|
+
we(m("input", {
|
|
3310
3328
|
"onUpdate:modelValue": (s) => t.value[o] = s,
|
|
3311
3329
|
type: "text"
|
|
3312
3330
|
}, null, 8, wm), [
|
|
@@ -3314,7 +3332,7 @@ const So = /* @__PURE__ */ W(gm, [["render", vm]]), bm = { class: "field-object-
|
|
|
3314
3332
|
])
|
|
3315
3333
|
])) : K("", !0),
|
|
3316
3334
|
t.keyTypes[o] === "boolean" ? (c(), _("td", Em, [
|
|
3317
|
-
|
|
3335
|
+
we(m("input", {
|
|
3318
3336
|
"onUpdate:modelValue": (s) => t.value[o] = s,
|
|
3319
3337
|
type: "checkbox"
|
|
3320
3338
|
}, null, 8, Mm), [
|
|
@@ -3322,7 +3340,7 @@ const So = /* @__PURE__ */ W(gm, [["render", vm]]), bm = { class: "field-object-
|
|
|
3322
3340
|
])
|
|
3323
3341
|
])) : K("", !0),
|
|
3324
3342
|
t.keyTypes[o] === "number" ? (c(), _("td", Am, [
|
|
3325
|
-
|
|
3343
|
+
we(m("input", {
|
|
3326
3344
|
"onUpdate:modelValue": (s) => t.value[o] = s,
|
|
3327
3345
|
type: "number"
|
|
3328
3346
|
}, null, 8, Im), [
|
|
@@ -3338,7 +3356,7 @@ const So = /* @__PURE__ */ W(gm, [["render", vm]]), bm = { class: "field-object-
|
|
|
3338
3356
|
])
|
|
3339
3357
|
]))), 128))
|
|
3340
3358
|
], 10, Tm),
|
|
3341
|
-
|
|
3359
|
+
we(m("select", {
|
|
3342
3360
|
"onUpdate:modelValue": n[0] || (n[0] = (a) => t.newKeyType = a)
|
|
3343
3361
|
}, [...n[3] || (n[3] = [
|
|
3344
3362
|
m("option", { value: "string" }, " String ", -1),
|
|
@@ -3347,7 +3365,7 @@ const So = /* @__PURE__ */ W(gm, [["render", vm]]), bm = { class: "field-object-
|
|
|
3347
3365
|
])], 512), [
|
|
3348
3366
|
[Vo, t.newKeyType]
|
|
3349
3367
|
]),
|
|
3350
|
-
|
|
3368
|
+
we(m("input", {
|
|
3351
3369
|
"onUpdate:modelValue": n[1] || (n[1] = (a) => t.newKeyName = a),
|
|
3352
3370
|
type: "text"
|
|
3353
3371
|
}, null, 512), [
|
|
@@ -3510,7 +3528,7 @@ const So = /* @__PURE__ */ W(gm, [["render", vm]]), bm = { class: "field-object-
|
|
|
3510
3528
|
onModelUpdated: t.updateModel
|
|
3511
3529
|
}, null, 8, ["model", "schema", "onModelUpdated"])
|
|
3512
3530
|
])) : (c(), _("div", Pm, [
|
|
3513
|
-
|
|
3531
|
+
we(m("input", {
|
|
3514
3532
|
"onUpdate:modelValue": (s) => t.value[o] = s,
|
|
3515
3533
|
class: "form-control",
|
|
3516
3534
|
placeholder: t.schema.fields && t.schema.fields[0].schema.placeholder,
|
|
@@ -3534,7 +3552,7 @@ const So = /* @__PURE__ */ W(gm, [["render", vm]]), bm = { class: "field-object-
|
|
|
3534
3552
|
class: ee(["input-wrapper", { indent: t.hasObjectKeys }])
|
|
3535
3553
|
}, [
|
|
3536
3554
|
m("div", Vm, [
|
|
3537
|
-
|
|
3555
|
+
we(m("input", {
|
|
3538
3556
|
"onUpdate:modelValue": n[0] || (n[0] = (a) => t.newKeyName = a),
|
|
3539
3557
|
class: "form-control",
|
|
3540
3558
|
"data-testid": "keyname-input",
|
|
@@ -3882,7 +3900,7 @@ function Xm(e, t, n, i, a, o) {
|
|
|
3882
3900
|
onInput: (b) => {
|
|
3883
3901
|
o.handleInput(b, p);
|
|
3884
3902
|
}
|
|
3885
|
-
}), null, 16, ["aria-labelledby", "model-value", "type", "onInput"])) :
|
|
3903
|
+
}), null, 16, ["aria-labelledby", "model-value", "type", "onInput"])) : we((c(), _("input", et({
|
|
3886
3904
|
key: 2,
|
|
3887
3905
|
"onUpdate:modelValue": (b) => e.value[p] = b,
|
|
3888
3906
|
"aria-labelledby": e.getLabelId(e.schema)
|
|
@@ -3895,7 +3913,7 @@ function Xm(e, t, n, i, a, o) {
|
|
|
3895
3913
|
}),
|
|
3896
3914
|
_: 2
|
|
3897
3915
|
}, 1064, ["data-testid", "model", "schema", "onRemoveItem"])) : (c(), _(Y, { key: 3 }, [
|
|
3898
|
-
|
|
3916
|
+
we(m("input", et({ ref_for: !0 }, e.schema.inputAttributes, {
|
|
3899
3917
|
"onUpdate:modelValue": (f) => e.value[p] = f,
|
|
3900
3918
|
"aria-labelledby": e.getLabelId(e.schema),
|
|
3901
3919
|
type: "text"
|
|
@@ -3995,7 +4013,7 @@ const Jm = /* @__PURE__ */ W(Hm, [["render", Xm], ["__scopeId", "data-v-d6740b2b
|
|
|
3995
4013
|
}), tf = /* @__PURE__ */ W(ef, [["__scopeId", "data-v-6b4ee1cd"]]), nf = { class: "wrapper" }, af = ["disabled"], of = ["id", "checked", "disabled", "onChange", "name"], rf = ["disabled"], sf = { class: "info" }, lf = { class: "dropList" }, df = ["id", "checked", "disabled", "onChange", "name"];
|
|
3996
4014
|
function uf(e, t, n, i, a, o) {
|
|
3997
4015
|
const s = Aa("attributes");
|
|
3998
|
-
return
|
|
4016
|
+
return we((c(), _("div", nf, [
|
|
3999
4017
|
e.schema.listBox ? (c(), _("div", {
|
|
4000
4018
|
key: 0,
|
|
4001
4019
|
class: "listbox form-control",
|
|
@@ -4005,7 +4023,7 @@ function uf(e, t, n, i, a, o) {
|
|
|
4005
4023
|
class: ee(["list-row", { "is-checked": o.isItemChecked(r) }])
|
|
4006
4024
|
}, [
|
|
4007
4025
|
m("label", null, [
|
|
4008
|
-
|
|
4026
|
+
we(m("input", {
|
|
4009
4027
|
id: e.getFieldID(e.schema, !0),
|
|
4010
4028
|
type: "checkbox",
|
|
4011
4029
|
checked: o.isItemChecked(r) || null,
|
|
@@ -4036,7 +4054,7 @@ function uf(e, t, n, i, a, o) {
|
|
|
4036
4054
|
class: ee(["list-row", { "is-checked": o.isItemChecked(r) }])
|
|
4037
4055
|
}, [
|
|
4038
4056
|
m("label", null, [
|
|
4039
|
-
|
|
4057
|
+
we(m("input", {
|
|
4040
4058
|
id: e.getFieldID(e.schema, !0),
|
|
4041
4059
|
type: "checkbox",
|
|
4042
4060
|
checked: o.isItemChecked(r) || null,
|
|
@@ -4424,7 +4442,7 @@ const _f = /* @__PURE__ */ W(ff, [["render", bf], ["__scopeId", "data-v-9a9650ac
|
|
|
4424
4442
|
m("label", {
|
|
4425
4443
|
class: ee(["k-label", `${a.label}-check`])
|
|
4426
4444
|
}, [
|
|
4427
|
-
|
|
4445
|
+
we(m("input", {
|
|
4428
4446
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => n.checkedGroup = s),
|
|
4429
4447
|
class: "k-input",
|
|
4430
4448
|
disabled: n.$props.disabled,
|
|
@@ -4446,7 +4464,7 @@ const _f = /* @__PURE__ */ W(ff, [["render", bf], ["__scopeId", "data-v-9a9650ac
|
|
|
4446
4464
|
key: o,
|
|
4447
4465
|
class: "option-group"
|
|
4448
4466
|
}, [
|
|
4449
|
-
n.renderedTrack[o] ?
|
|
4467
|
+
n.renderedTrack[o] ? we((c(), _("div", Of, [
|
|
4450
4468
|
m("div", Ff, [
|
|
4451
4469
|
C(ue, {
|
|
4452
4470
|
model: n.model,
|
|
@@ -5345,13 +5363,13 @@ const Zf = (e) => {
|
|
|
5345
5363
|
computed: {
|
|
5346
5364
|
fields() {
|
|
5347
5365
|
const e = [];
|
|
5348
|
-
return this.schema && this.schema.fields &&
|
|
5366
|
+
return this.schema && this.schema.fields && Se(this.schema.fields, (t) => {
|
|
5349
5367
|
(!this.multiple || t.multi === !0) && e.push(t);
|
|
5350
5368
|
}), e;
|
|
5351
5369
|
},
|
|
5352
5370
|
groups() {
|
|
5353
5371
|
const e = [];
|
|
5354
|
-
return this.schema && this.schema.groups &&
|
|
5372
|
+
return this.schema && this.schema.groups && Se(this.schema.groups.slice(0), (t) => {
|
|
5355
5373
|
e.push(t);
|
|
5356
5374
|
}), e;
|
|
5357
5375
|
}
|
|
@@ -5379,7 +5397,7 @@ const Zf = (e) => {
|
|
|
5379
5397
|
},
|
|
5380
5398
|
// Child field executed validation
|
|
5381
5399
|
onFieldValidated(e, t, n) {
|
|
5382
|
-
this.errors = this.errors.filter((a) => a.field.fieldName !== n.schema.fieldName), !e && t && t.length > 0 &&
|
|
5400
|
+
this.errors = this.errors.filter((a) => a.field.fieldName !== n.schema.fieldName), !e && t && t.length > 0 && Se(t, (a) => {
|
|
5383
5401
|
this.errors.push({
|
|
5384
5402
|
field: n.schema,
|
|
5385
5403
|
error: a
|
|
@@ -5401,13 +5419,13 @@ const Zf = (e) => {
|
|
|
5401
5419
|
validate(e = null) {
|
|
5402
5420
|
e === null && (e = G(this.options, "validateAsync", !1)), this.clearValidationErrors();
|
|
5403
5421
|
const t = [], n = [];
|
|
5404
|
-
|
|
5422
|
+
Se(this.$refs.children, (a) => {
|
|
5405
5423
|
X(a.validate) && (t.push(a.$refs.child), n.push(a.$refs.child.validate(!0)));
|
|
5406
5424
|
});
|
|
5407
5425
|
const i = (a) => {
|
|
5408
5426
|
const o = [];
|
|
5409
|
-
|
|
5410
|
-
Array.isArray(r) && r.length > 0 &&
|
|
5427
|
+
Se(a, (r, d) => {
|
|
5428
|
+
Array.isArray(r) && r.length > 0 && Se(r, (u) => {
|
|
5411
5429
|
o.push({
|
|
5412
5430
|
field: t[d].schema,
|
|
5413
5431
|
error: u
|
|
@@ -5421,7 +5439,7 @@ const Zf = (e) => {
|
|
|
5421
5439
|
},
|
|
5422
5440
|
// Clear validation errors
|
|
5423
5441
|
clearValidationErrors() {
|
|
5424
|
-
this.errors.splice(0),
|
|
5442
|
+
this.errors.splice(0), Se(this.$refs.children, (e) => {
|
|
5425
5443
|
e.clearValidationErrors();
|
|
5426
5444
|
});
|
|
5427
5445
|
}
|
|
@@ -6799,7 +6817,7 @@ export {
|
|
|
6799
6817
|
Mt as AUTOFILL_SLOT_NAME,
|
|
6800
6818
|
rl as EMPTY_VALUE_PLACEHOLDER,
|
|
6801
6819
|
je as FIELD_STATES,
|
|
6802
|
-
|
|
6820
|
+
Ce as FORMS_API_KEY,
|
|
6803
6821
|
al as FORMS_CONFIG,
|
|
6804
6822
|
un as PartialType,
|
|
6805
6823
|
ol as REDIS_PARTIAL_FETCHER_KEY,
|