@kong-ui-public/entities-plugins 9.202.4 → 9.203.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.
@@ -6948,7 +6948,7 @@ const ma = /* @__PURE__ */ _e({
6948
6948
  setup(e, { emit: t }) {
6949
6949
  var I;
6950
6950
  fr((E) => ({
6951
- v35a89c75: U.value
6951
+ d9f161f4: U.value
6952
6952
  }));
6953
6953
  const n = e, i = t, { i18n: { t: o } } = Ze(), { getDefault: a, getSchema: r } = At(), { value: s, hide: l, ...c } = on(xt(n, "name")), m = Rn(c.path, xt({ ...n, ...ca() })), d = j(() => {
6954
6954
  if (!c.path) throw new Error("Field path is required for sub-schema retrieval");
@@ -6972,7 +6972,7 @@ const ma = /* @__PURE__ */ _e({
6972
6972
  Array.isArray(s.value) || (s.value = []), s.value.push(E), i("add"), n.appearance === "tabs" && (await wn(), C.value = ($ = v.value[v.value.length - 1]) == null ? void 0 : $.hash), await wn(), T(f.value.length + 1);
6973
6973
  }, k = async (E) => {
6974
6974
  var $;
6975
- Array.isArray(s.value) && s.value.splice(E, 1), i("remove", E), n.appearance === "tabs" && (C.value = ($ = v.value[Math.max(0, E - 1)]) == null ? void 0 : $.hash);
6975
+ Array.isArray(s.value) && (s.value.splice(E, 1), s.value.length === 0 && !m.value.required && (s.value = null)), i("remove", E), n.appearance === "tabs" && (C.value = ($ = v.value[Math.max(0, E - 1)]) == null ? void 0 : $.hash);
6976
6976
  }, w = It("root");
6977
6977
  function T(E) {
6978
6978
  if (!w.value)
@@ -7176,7 +7176,7 @@ const ma = /* @__PURE__ */ _e({
7176
7176
  ]);
7177
7177
  };
7178
7178
  }
7179
- }), $i = /* @__PURE__ */ Pe(Kx, [["__scopeId", "data-v-423bff1e"]]), jx = /* @__PURE__ */ _e({
7179
+ }), $i = /* @__PURE__ */ Pe(Kx, [["__scopeId", "data-v-107647e4"]]), jx = /* @__PURE__ */ _e({
7180
7180
  __name: "SlideTransition",
7181
7181
  setup(e) {
7182
7182
  const t = [
@@ -7643,51 +7643,55 @@ const ma = /* @__PURE__ */ _e({
7643
7643
  setup(e, { emit: t }) {
7644
7644
  const n = t, i = Zn(e, ["name", "items", "multiple", "autofocus"]), { getSelectItems: o } = At(), { value: a, hide: r, ...s } = on(
7645
7645
  xt(() => e.name)
7646
- ), l = co(e, "modelValue", {
7646
+ ), l = Rn(s.path, i);
7647
+ function c(g) {
7648
+ return p.value && Array.isArray(g) && g.length === 0 && !l.value.required ? null : g;
7649
+ }
7650
+ const m = co(e, "modelValue", {
7647
7651
  // If multiple and value is null/undefined, return empty array for v-model
7648
- get: () => d.value && (a == null ? void 0 : a.value) == null ? [] : a.value,
7649
- set: (f) => {
7650
- a.value = f;
7652
+ get: () => p.value && (a == null ? void 0 : a.value) == null ? [] : a.value,
7653
+ set: (g) => {
7654
+ a.value = c(g);
7651
7655
  }
7652
- }), c = Rn(s.path, i), m = j(() => e.items ? e.items : s.path ? o(s.path.value) : []), d = j(() => {
7653
- var f;
7654
- return e.multiple !== void 0 ? e.multiple : ((f = s.schema.value) == null ? void 0 : f.type) === "set";
7655
- }), p = j(() => d.value ? tv : nv);
7656
- return (f, g) => {
7657
- var y;
7658
- const h = ce("KAlert");
7659
- return s.error ? (A(), J(h, {
7656
+ }), d = j(() => e.items ? e.items : s.path ? o(s.path.value) : []), p = j(() => {
7657
+ var g;
7658
+ return e.multiple !== void 0 ? e.multiple : ((g = s.schema.value) == null ? void 0 : g.type) === "set";
7659
+ }), f = j(() => p.value ? tv : nv);
7660
+ return (g, h) => {
7661
+ var _;
7662
+ const y = ce("KAlert");
7663
+ return s.error ? (A(), J(y, {
7660
7664
  key: 0,
7661
7665
  appearance: "danger",
7662
7666
  message: s.error.message
7663
- }, null, 8, ["message"])) : cn((A(), J(u(p), Ve({ key: 1 }, { ...i, ...u(c) }, {
7664
- modelValue: l.value,
7667
+ }, null, 8, ["message"])) : cn((A(), J(u(f), Ve({ key: 1 }, { ...i, ...u(l) }, {
7668
+ modelValue: m.value,
7665
7669
  "onUpdate:modelValue": [
7666
- g[0] || (g[0] = (_) => l.value = _),
7667
- g[1] || (g[1] = (_) => n("update", _))
7670
+ h[0] || (h[0] = (v) => m.value = v),
7671
+ h[1] || (h[1] = (v) => n("update", c(v)))
7668
7672
  ],
7669
7673
  class: "ff-enum-field",
7670
- clearable: !u(c).required,
7674
+ clearable: !u(l).required,
7671
7675
  "data-autofocus": e.autofocus ? "true" : void 0,
7672
7676
  "data-testid": `ff-${s.path.value}`,
7673
- items: m.value,
7677
+ items: d.value,
7674
7678
  "kpop-attributes": { "data-testid": `ff-enum-${s.path.value}-items` }
7675
7679
  }), St({ _: 2 }, [
7676
- "tooltip" in f.$slots || (y = u(c).labelAttributes) != null && y.info ? {
7680
+ "tooltip" in g.$slots || (_ = u(l).labelAttributes) != null && _.info ? {
7677
7681
  name: "label-tooltip",
7678
7682
  fn: P(() => [
7679
- lt(f.$slots, "tooltip", {}, () => [
7683
+ lt(g.$slots, "tooltip", {}, () => [
7680
7684
  W("div", {
7681
- innerHTML: u(c).labelAttributes.info
7685
+ innerHTML: u(l).labelAttributes.info
7682
7686
  }, null, 8, tA)
7683
7687
  ], !0)
7684
7688
  ]),
7685
7689
  key: "0"
7686
7690
  } : void 0,
7687
- f.$slots["item-label"] ? {
7691
+ g.$slots["item-label"] ? {
7688
7692
  name: "item-template",
7689
- fn: P(({ item: _ }) => [
7690
- lt(f.$slots, "item-label", ri(Zi(_)), void 0, !0)
7693
+ fn: P(({ item: v }) => [
7694
+ lt(g.$slots, "item-label", ri(Zi(v)), void 0, !0)
7691
7695
  ]),
7692
7696
  key: "1"
7693
7697
  } : void 0
@@ -7696,7 +7700,7 @@ const ma = /* @__PURE__ */ _e({
7696
7700
  ]);
7697
7701
  };
7698
7702
  }
7699
- }), Xt = /* @__PURE__ */ Pe(nA, [["__scopeId", "data-v-6fce68d1"]]), iA = ["data-testid"], oA = ["innerHTML"], aA = /* @__PURE__ */ _e({
7703
+ }), Xt = /* @__PURE__ */ Pe(nA, [["__scopeId", "data-v-b283cc11"]]), iA = ["data-testid"], oA = ["innerHTML"], aA = /* @__PURE__ */ _e({
7700
7704
  inheritAttrs: !1,
7701
7705
  __name: "JsonField",
7702
7706
  props: {
@@ -27037,8 +27041,8 @@ const $L = /* @__PURE__ */ _e({
27037
27041
  const t = e, n = Pn();
27038
27042
  sn(wi, n == null ? void 0 : n[ai]);
27039
27043
  function i(o, a) {
27040
- var r, s;
27041
- ((r = o.config) == null ? void 0 : r.namespace) === null && delete o.config.namespace, Array.isArray((s = o.config) == null ? void 0 : s.compound_identifier) && o.config.compound_identifier.length === 0 && (o.config.compound_identifier = null), t.onFormChange(o, a);
27044
+ var r;
27045
+ ((r = o.config) == null ? void 0 : r.namespace) === null && delete o.config.namespace, t.onFormChange(o, a);
27042
27046
  }
27043
27047
  return (o, a) => (A(), J(Fi, Ve(t, { "on-form-change": i }), {
27044
27048
  default: P(() => [