@gisce/react-ooui 1.4.9-rc.1 → 1.4.10-rc.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.
@@ -2387,7 +2387,7 @@ const Mt = ({
2387
2387
  setLimit: V,
2388
2388
  searchParams: _ = [],
2389
2389
  setSearchValues: E
2390
- } = e, [x, C] = O(!1), [w, S] = O(!1), [$, R] = O(), [F, k] = O(1), [M, I] = O(0), [N, A] = O(), [j, q] = O([]), [W, J] = O(void 0), [U, L] = O(void 0), B = fe(b || Bt), te = fe([]), Z = Le((ie) => {
2390
+ } = e, [x, C] = O(!1), [w, S] = O(!1), [$, R] = O(), [F, k] = O(1), [M, I] = O(0), [N, A] = O(), [j, q] = O([]), [U, J] = O(void 0), [W, L] = O(void 0), B = fe(b || Bt), te = fe([]), Z = Le((ie) => {
2391
2391
  g == null || g([...ie]), q([...ie]);
2392
2392
  }, []), ae = Le(() => v || j, [v, j]), X = Le(async () => {
2393
2393
  const ie = await H.getHandler().nameSearch({
@@ -2483,7 +2483,7 @@ const Mt = ({
2483
2483
  } catch (de) {
2484
2484
  R(de.message);
2485
2485
  } finally {
2486
- S(!1), a == null || a(!1);
2486
+ i == null || i([]), S(!1), a == null || a(!1);
2487
2487
  }
2488
2488
  },
2489
2489
  [
@@ -2583,8 +2583,8 @@ const Mt = ({
2583
2583
  requestPageChange: Ve,
2584
2584
  changeSort: be,
2585
2585
  fetchChildrenForRecord: We,
2586
- colorsForResults: W,
2587
- statusForResults: U,
2586
+ colorsForResults: U,
2587
+ statusForResults: W,
2588
2588
  totalItems: N
2589
2589
  };
2590
2590
  }, et = Xe.createContext(null), ml = (e) => {
@@ -2614,7 +2614,7 @@ const Mt = ({
2614
2614
  setSearchTreeNameSearch: E,
2615
2615
  goToResourceId: x,
2616
2616
  limit: C
2617
- } = e, [w, S] = O(!1), [$, R] = O(!1), [F, k] = O(!1), [M, I] = O(!0), [N, A] = O(!0), [j, q] = O([]), [W, J] = O(!1), [U, L] = O([]), [B, te] = O(!1), [Z, ae] = O(!0), [X, z] = O(), [he, be] = O({}), [Ee, Ve] = O(C !== void 0 ? C : Bt), [Pe, We] = O(i);
2617
+ } = e, [w, S] = O(!1), [$, R] = O(!1), [F, k] = O(!1), [M, I] = O(!0), [N, A] = O(!0), [j, q] = O([]), [U, J] = O(!1), [W, L] = O([]), [B, te] = O(!1), [Z, ae] = O(!0), [X, z] = O(), [he, be] = O({}), [Ee, Ve] = O(C !== void 0 ? C : Bt), [Pe, We] = O(i);
2618
2618
  pe(() => {
2619
2619
  m && m.length > 0 && !y && (p == null || p(0), f == null || f(m[0].id));
2620
2620
  }, [m]), pe(() => {
@@ -2659,10 +2659,10 @@ const Mt = ({
2659
2659
  setAttachments: q,
2660
2660
  selectedRowItems: V,
2661
2661
  setSelectedRowItems: b,
2662
- duplicatingItem: W,
2662
+ duplicatingItem: U,
2663
2663
  setDuplicatingItem: J,
2664
2664
  setSearchParams: L,
2665
- searchParams: U,
2665
+ searchParams: W,
2666
2666
  searchVisible: B,
2667
2667
  setSearchVisible: te,
2668
2668
  sorter: g,
@@ -3092,7 +3092,7 @@ function bl(e, t) {
3092
3092
  } = e, {
3093
3093
  t: x,
3094
3094
  lang: C
3095
- } = Y(ve), [w, S] = O(!1), [$, R] = O(), [F, k] = O(), [M] = it.useForm(), [I, N] = O(), [A, j] = O(), q = Y(go), [W, J] = O(), [U, L] = O(!1), B = fe(), te = fe({}), Z = fe({}), ae = fe(!1), X = fe(!1), z = fe(!1), be = (E !== void 0 ? E : W) < wl, Ee = Y(Ne), {
3095
+ } = Y(ve), [w, S] = O(!1), [$, R] = O(), [F, k] = O(), [M] = it.useForm(), [I, N] = O(), [A, j] = O(), q = Y(go), [U, J] = O(), [W, L] = O(!1), B = fe(), te = fe({}), Z = fe({}), ae = fe(!1), X = fe(!1), z = fe(!1), be = (E !== void 0 ? E : U) < wl, Ee = Y(Ne), {
3096
3096
  activeId: Ve,
3097
3097
  getPlainValues: Pe
3098
3098
  } = Ee || {}, We = Y(et), {
@@ -3127,10 +3127,10 @@ function bl(e, t) {
3127
3127
  (i === void 0 && A || i !== void 0 && A && i < 0) && (B.current = void 0, k(void 0)), er();
3128
3128
  }
3129
3129
  }, [i, r, y, p, D]), pe(() => {
3130
- U && (vn({
3130
+ W && (vn({
3131
3131
  elementHasLostFocus: !0
3132
3132
  }), L(!1));
3133
- }, [U]);
3133
+ }, [W]);
3134
3134
  const le = (K, G, oe, ne) => {
3135
3135
  de == null || de(!1), ie == null || ie(!1), s == null || s(K, G, oe, ne), je == null || je(K);
3136
3136
  }, me = () => {
@@ -4705,15 +4705,15 @@ var Co = { exports: {} };
4705
4705
  return N ? X : X.endOf(d);
4706
4706
  }, q = function(Z, ae) {
4707
4707
  return w.w(I.toDate()[Z].apply(I.toDate("s"), (N ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), I);
4708
- }, W = this.$W, J = this.$M, U = this.$D, L = "set" + (this.$u ? "UTC" : "");
4708
+ }, U = this.$W, J = this.$M, W = this.$D, L = "set" + (this.$u ? "UTC" : "");
4709
4709
  switch (A) {
4710
4710
  case y:
4711
4711
  return N ? j(1, 0) : j(31, 11);
4712
4712
  case c:
4713
4713
  return N ? j(1, J) : j(0, J + 1);
4714
4714
  case f:
4715
- var B = this.$locale().weekStart || 0, te = (W < B ? W + 7 : W) - B;
4716
- return j(N ? U - te : U + (6 - te), J);
4715
+ var B = this.$locale().weekStart || 0, te = (U < B ? U + 7 : U) - B;
4716
+ return j(N ? W - te : W + (6 - te), J);
4717
4717
  case d:
4718
4718
  case p:
4719
4719
  return q(L + "Hours", 0);
@@ -4731,8 +4731,8 @@ var Co = { exports: {} };
4731
4731
  }, F.$set = function(k, M) {
4732
4732
  var I, N = w.p(k), A = "set" + (this.$u ? "UTC" : ""), j = (I = {}, I[d] = A + "Date", I[p] = A + "Date", I[c] = A + "Month", I[y] = A + "FullYear", I[u] = A + "Hours", I[l] = A + "Minutes", I[a] = A + "Seconds", I[s] = A + "Milliseconds", I)[N], q = N === d ? this.$D + (M - this.$W) : M;
4733
4733
  if (N === c || N === y) {
4734
- var W = this.clone().set(p, 1);
4735
- W.$d[j](q), W.init(), this.$d = W.set(p, Math.min(this.$D, W.daysInMonth())).$d;
4734
+ var U = this.clone().set(p, 1);
4735
+ U.$d[j](q), U.init(), this.$d = U.set(p, Math.min(this.$D, U.daysInMonth())).$d;
4736
4736
  } else
4737
4737
  j && this.$d[j](q);
4738
4738
  return this.init(), this;
@@ -4744,8 +4744,8 @@ var Co = { exports: {} };
4744
4744
  var I, N = this;
4745
4745
  k = Number(k);
4746
4746
  var A = w.p(M), j = function(J) {
4747
- var U = C(N);
4748
- return w.w(U.date(U.date() + Math.round(J * k)), N);
4747
+ var W = C(N);
4748
+ return w.w(W.date(W.date() + Math.round(J * k)), N);
4749
4749
  };
4750
4750
  if (A === c)
4751
4751
  return this.set(c, this.$M + k);
@@ -4755,30 +4755,30 @@ var Co = { exports: {} };
4755
4755
  return j(1);
4756
4756
  if (A === f)
4757
4757
  return j(7);
4758
- var q = (I = {}, I[l] = i, I[u] = o, I[a] = r, I)[A] || 1, W = this.$d.getTime() + k * q;
4759
- return w.w(W, this);
4758
+ var q = (I = {}, I[l] = i, I[u] = o, I[a] = r, I)[A] || 1, U = this.$d.getTime() + k * q;
4759
+ return w.w(U, this);
4760
4760
  }, F.subtract = function(k, M) {
4761
4761
  return this.add(-1 * k, M);
4762
4762
  }, F.format = function(k) {
4763
4763
  var M = this, I = this.$locale();
4764
4764
  if (!this.isValid())
4765
4765
  return I.invalidDate || h;
4766
- var N = k || "YYYY-MM-DDTHH:mm:ssZ", A = w.z(this), j = this.$H, q = this.$m, W = this.$M, J = I.weekdays, U = I.months, L = function(ae, X, z, he) {
4766
+ var N = k || "YYYY-MM-DDTHH:mm:ssZ", A = w.z(this), j = this.$H, q = this.$m, U = this.$M, J = I.weekdays, W = I.months, L = function(ae, X, z, he) {
4767
4767
  return ae && (ae[X] || ae(M, N)) || z[X].slice(0, he);
4768
4768
  }, B = function(ae) {
4769
4769
  return w.s(j % 12 || 12, ae, "0");
4770
4770
  }, te = I.meridiem || function(ae, X, z) {
4771
4771
  var he = ae < 12 ? "AM" : "PM";
4772
4772
  return z ? he.toLowerCase() : he;
4773
- }, Z = { YY: String(this.$y).slice(-2), YYYY: w.s(this.$y, 4, "0"), M: W + 1, MM: w.s(W + 1, 2, "0"), MMM: L(I.monthsShort, W, U, 3), MMMM: L(U, W), D: this.$D, DD: w.s(this.$D, 2, "0"), d: String(this.$W), dd: L(I.weekdaysMin, this.$W, J, 2), ddd: L(I.weekdaysShort, this.$W, J, 3), dddd: J[this.$W], H: String(j), HH: w.s(j, 2, "0"), h: B(1), hh: B(2), a: te(j, q, !0), A: te(j, q, !1), m: String(q), mm: w.s(q, 2, "0"), s: String(this.$s), ss: w.s(this.$s, 2, "0"), SSS: w.s(this.$ms, 3, "0"), Z: A };
4773
+ }, Z = { YY: String(this.$y).slice(-2), YYYY: w.s(this.$y, 4, "0"), M: U + 1, MM: w.s(U + 1, 2, "0"), MMM: L(I.monthsShort, U, W, 3), MMMM: L(W, U), D: this.$D, DD: w.s(this.$D, 2, "0"), d: String(this.$W), dd: L(I.weekdaysMin, this.$W, J, 2), ddd: L(I.weekdaysShort, this.$W, J, 3), dddd: J[this.$W], H: String(j), HH: w.s(j, 2, "0"), h: B(1), hh: B(2), a: te(j, q, !0), A: te(j, q, !1), m: String(q), mm: w.s(q, 2, "0"), s: String(this.$s), ss: w.s(this.$s, 2, "0"), SSS: w.s(this.$ms, 3, "0"), Z: A };
4774
4774
  return N.replace(v, function(ae, X) {
4775
4775
  return X || Z[ae] || A.replace(":", "");
4776
4776
  });
4777
4777
  }, F.utcOffset = function() {
4778
4778
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
4779
4779
  }, F.diff = function(k, M, I) {
4780
- var N, A = w.p(M), j = C(k), q = (j.utcOffset() - this.utcOffset()) * i, W = this - j, J = w.m(this, j);
4781
- return J = (N = {}, N[y] = J / 12, N[c] = J, N[m] = J / 3, N[f] = (W - q) / 6048e5, N[d] = (W - q) / 864e5, N[u] = W / o, N[l] = W / i, N[a] = W / r, N)[A] || W, I ? J : w.a(J);
4780
+ var N, A = w.p(M), j = C(k), q = (j.utcOffset() - this.utcOffset()) * i, U = this - j, J = w.m(this, j);
4781
+ return J = (N = {}, N[y] = J / 12, N[c] = J, N[m] = J / 3, N[f] = (U - q) / 6048e5, N[d] = (U - q) / 864e5, N[u] = U / o, N[l] = U / i, N[a] = U / r, N)[A] || U, I ? J : w.a(J);
4782
4782
  }, F.daysInMonth = function() {
4783
4783
  return this.endOf(c).$D;
4784
4784
  }, F.$locale = function() {
@@ -5131,14 +5131,14 @@ function pn(e) {
5131
5131
  });
5132
5132
  function j() {
5133
5133
  var te;
5134
- const U = w.current.columns.filter((Z) => Z.sum !== void 0).map((Z) => ({
5134
+ const W = w.current.columns.filter((Z) => Z.sum !== void 0).map((Z) => ({
5135
5135
  label: Z.sum,
5136
5136
  field: Z.id
5137
5137
  }));
5138
- if (!U || U.length === 0)
5138
+ if (!W || W.length === 0)
5139
5139
  return null;
5140
5140
  let L = [], B = ((te = f == null ? void 0 : f.selectedRowKeys) == null ? void 0 : te.length) > 0 ? V.filter((Z) => f == null ? void 0 : f.selectedRowKeys.includes(Z.id)) : V;
5141
- return U.forEach((Z) => {
5141
+ return W.forEach((Z) => {
5142
5142
  const ae = B.reduce((X, z) => z[Z.field] && !isNaN(z[Z.field]) ? X + z[Z.field] : X, 0);
5143
5143
  L.push(`${Z.label}: ${Math.round(ae * 100) / 100}`);
5144
5144
  }), /* @__PURE__ */ n("div", {
@@ -5146,11 +5146,11 @@ function pn(e) {
5146
5146
  children: L.join(", ")
5147
5147
  });
5148
5148
  }
5149
- let q, W = c;
5149
+ let q, U = c;
5150
5150
  if (w.current !== null) {
5151
5151
  q = Ll(E, V, 600);
5152
- const U = w.current;
5153
- c && U.columns.some((L) => L.sum !== void 0) && (W = c - 30);
5152
+ const W = w.current;
5153
+ c && W.columns.some((L) => L.sum !== void 0) && (U = c - 30);
5154
5154
  }
5155
5155
  return w.current === null ? /* @__PURE__ */ n(Me, {
5156
5156
  style: {
@@ -5160,7 +5160,7 @@ function pn(e) {
5160
5160
  children: [A(), l && /* @__PURE__ */ n(Me, {
5161
5161
  className: "pb-4"
5162
5162
  }), /* @__PURE__ */ n(Mi, {
5163
- height: W,
5163
+ height: U,
5164
5164
  columns: q.columns,
5165
5165
  dataSource: V,
5166
5166
  loading: !1,
@@ -5178,6 +5178,7 @@ function pn(e) {
5178
5178
  });
5179
5179
  } : void 0,
5180
5180
  onRowDoubleClick: u,
5181
+ selectionRowKeys: f == null ? void 0 : f.selectedRowKeys,
5181
5182
  onRowSelectionChange: f == null ? void 0 : f.onChange,
5182
5183
  onChangeSort: p,
5183
5184
  sorter: h,
@@ -5215,9 +5216,9 @@ function sc(e, t) {
5215
5216
  currentId: A = void 0,
5216
5217
  results: j = void 0,
5217
5218
  selectedRowItems: q = void 0,
5218
- setSelectedRowItems: W = void 0,
5219
+ setSelectedRowItems: U = void 0,
5219
5220
  searchParams: J = [],
5220
- setSearchParams: U = void 0,
5221
+ setSearchParams: W = void 0,
5221
5222
  searchVisible: L = !0,
5222
5223
  setSearchVisible: B = void 0,
5223
5224
  sorter: te = void 0,
@@ -5248,8 +5249,8 @@ function sc(e, t) {
5248
5249
  } = yo({
5249
5250
  model: T,
5250
5251
  setSearchTreeNameSearch: X,
5251
- setSelectedRowItems: W,
5252
- setSearchParams: U,
5252
+ setSelectedRowItems: Ce,
5253
+ setSearchParams: W,
5253
5254
  setSearchValues: be,
5254
5255
  searchParams: J,
5255
5256
  setSearchVisible: B,
@@ -5348,7 +5349,7 @@ function sc(e, t) {
5348
5349
  };
5349
5350
  function Ce(Fe) {
5350
5351
  const $e = ee().filter((ot) => Fe.includes(ot.id));
5351
- W == null || W($e), m == null || m(Fe);
5352
+ U == null || U($e), m == null || m(Fe);
5352
5353
  }
5353
5354
  function ge() {
5354
5355
  return b != null && b.isExpandable ? R - 160 : R - (w + 210);
@@ -5550,9 +5551,9 @@ const Oo = bt(sc), _o = (e) => {
5550
5551
  elementHasLostFocus: $
5551
5552
  } = E || {}, R = fe([]), [F, k] = O([]), M = t && t[0] || void 0, I = t && t[1] || "";
5552
5553
  pe(() => {
5553
- !Array.isArray(t) && t && W(t);
5554
+ !Array.isArray(t) && t && U(t);
5554
5555
  }, [t]), pe(() => {
5555
- M && I.length === 0 ? W(M) : M && I.length > 0 ? V(I) : !M && !I && V(_.current || "");
5556
+ M && I.length === 0 ? U(M) : M && I.length > 0 ? V(I) : !M && !I && V(_.current || "");
5556
5557
  }, [t]);
5557
5558
  const N = (B) => {
5558
5559
  r == null || r(B), $ == null || $();
@@ -5596,11 +5597,11 @@ const Oo = bt(sc), _o = (e) => {
5596
5597
  },
5597
5598
  totalItems: 2
5598
5599
  });
5599
- te.length === 1 ? W(te[0]) : (T(B), m(!0));
5600
+ te.length === 1 ? U(te[0]) : (T(B), m(!0));
5600
5601
  return;
5601
5602
  }
5602
5603
  T(B), m(!0);
5603
- }, W = async (B) => {
5604
+ }, U = async (B) => {
5604
5605
  g(!0);
5605
5606
  try {
5606
5607
  const te = await H.getHandler().execute({
@@ -5633,7 +5634,7 @@ const Oo = bt(sc), _o = (e) => {
5633
5634
  widgetFieldName: u
5634
5635
  }))), k(R.current);
5635
5636
  }
5636
- async function U(B) {
5637
+ async function W(B) {
5637
5638
  B.keyCode === 13 ? (B.preventDefault(), B.stopPropagation(), await j()) : B.code === "Backspace" && M !== void 0 && (B.preventDefault(), B.stopPropagation(), N([void 0, ""]));
5638
5639
  }
5639
5640
  return /* @__PURE__ */ P(xe, {
@@ -5648,7 +5649,7 @@ const Oo = bt(sc), _o = (e) => {
5648
5649
  onChange: A,
5649
5650
  style: f,
5650
5651
  onBlur: j,
5651
- onKeyDown: U,
5652
+ onKeyDown: W,
5652
5653
  suffix: /* @__PURE__ */ n(Jn, {
5653
5654
  id: M,
5654
5655
  model: s,
@@ -5702,7 +5703,7 @@ const Oo = bt(sc), _o = (e) => {
5702
5703
  visible: c,
5703
5704
  nameSearch: M ? void 0 : v,
5704
5705
  onSelectValues: (B) => {
5705
- m(!1), W(B[0]), D.current = !1, _.current = void 0;
5706
+ m(!1), U(B[0]), D.current = !1, _.current = void 0;
5706
5707
  },
5707
5708
  onCloseModal: () => {
5708
5709
  m(!1), D.current = !1;
@@ -5716,7 +5717,7 @@ const Oo = bt(sc), _o = (e) => {
5716
5717
  id: t && t[0],
5717
5718
  visible: y,
5718
5719
  onSubmitSucceed: (B) => {
5719
- p(!1), W(B);
5720
+ p(!1), U(B);
5720
5721
  },
5721
5722
  onCancel: () => {
5722
5723
  p(!1);
@@ -6607,8 +6608,8 @@ const Lc = (e) => {
6607
6608
  } = f || {}, {
6608
6609
  lang: g,
6609
6610
  t: v
6610
- } = Y(ve), [T, D] = O(!1), [b, V] = O(!1), [_, E] = O(), [x, C] = O(!1), [w, S] = O(!1), [$, R] = O(), [F, k] = O([]), [M, I] = O(!1), N = fe([]), [A, j] = O(), q = fe(), [W, J] = O(void 0), {
6611
- readOnly: U,
6611
+ } = Y(ve), [T, D] = O(!1), [b, V] = O(!1), [_, E] = O(), [x, C] = O(!1), [w, S] = O(!1), [$, R] = O(), [F, k] = O([]), [M, I] = O(!1), N = fe([]), [A, j] = O(), q = fe(), [U, J] = O(void 0), {
6612
+ readOnly: W,
6612
6613
  relation: L,
6613
6614
  context: B,
6614
6615
  domain: te
@@ -6910,7 +6911,7 @@ const Lc = (e) => {
6910
6911
  } : pt);
6911
6912
  be($e), D(!0);
6912
6913
  },
6913
- readOnly: U
6914
+ readOnly: W
6914
6915
  });
6915
6916
  let Q = [];
6916
6917
  if (X.some((Te) => Te.treeValues) && (Q = A ? It({
@@ -6939,8 +6940,8 @@ const Lc = (e) => {
6939
6940
  ...p == null ? void 0 : p(),
6940
6941
  ...B
6941
6942
  },
6942
- colorsForResults: W,
6943
- readonly: U
6943
+ colorsForResults: U,
6944
+ readonly: W
6944
6945
  });
6945
6946
  if (a === "graph") {
6946
6947
  const Te = [[`${i.inv_field}`, "=", c]];
@@ -6968,7 +6969,7 @@ const Lc = (e) => {
6968
6969
  children: [/* @__PURE__ */ n(Mc, {
6969
6970
  mode: a,
6970
6971
  title: Ue(),
6971
- readOnly: U,
6972
+ readOnly: W,
6972
6973
  isMany2Many: Z,
6973
6974
  formHasChanges: T,
6974
6975
  totalItems: X.length,
@@ -6998,7 +6999,7 @@ const Lc = (e) => {
6998
6999
  onCancel: () => {
6999
7000
  I(!1), C(!1);
7000
7001
  },
7001
- readOnly: U,
7002
+ readOnly: W,
7002
7003
  mustClearAfterSave: rt
7003
7004
  }), /* @__PURE__ */ n(_o, {
7004
7005
  domain: N.current,
@@ -7723,9 +7724,9 @@ var Mo = { exports: {} };
7723
7724
  try {
7724
7725
  if (["x", "X"].indexOf(I) > -1)
7725
7726
  return new Date((I === "X" ? 1e3 : 1) * M);
7726
- var A = p(I)(M), j = A.year, q = A.month, W = A.day, J = A.hours, U = A.minutes, L = A.seconds, B = A.milliseconds, te = A.zone, Z = new Date(), ae = W || (j || q ? 1 : Z.getDate()), X = j || Z.getFullYear(), z = 0;
7727
+ var A = p(I)(M), j = A.year, q = A.month, U = A.day, J = A.hours, W = A.minutes, L = A.seconds, B = A.milliseconds, te = A.zone, Z = new Date(), ae = U || (j || q ? 1 : Z.getDate()), X = j || Z.getFullYear(), z = 0;
7727
7728
  j && !q || (z = q > 0 ? q - 1 : Z.getMonth());
7728
- var he = J || 0, be = U || 0, Ee = L || 0, Ve = B || 0;
7729
+ var he = J || 0, be = W || 0, Ee = L || 0, Ve = B || 0;
7729
7730
  return te ? new Date(Date.UTC(X, z, ae, he, be, Ee, Ve + 60 * te.offset * 1e3)) : N ? new Date(Date.UTC(X, z, ae, he, be, Ee, Ve)) : new Date(X, z, ae, he, be, Ee, Ve);
7730
7731
  } catch {
7731
7732
  return new Date("");
@@ -8435,7 +8436,7 @@ function vd({
8435
8436
  y == null || y(!1);
8436
8437
  }
8437
8438
  }
8438
- async function W() {
8439
+ async function U() {
8439
8440
  try {
8440
8441
  g == null || g(!0);
8441
8442
  const L = await H.getHandler().duplicate({
@@ -8451,7 +8452,7 @@ function vd({
8451
8452
  }
8452
8453
  }
8453
8454
  const J = a || p || T || h;
8454
- function U(L) {
8455
+ function W(L) {
8455
8456
  $ == null || $({
8456
8457
  actionData: L,
8457
8458
  values: b.current.getValues(),
@@ -8479,7 +8480,7 @@ function vd({
8479
8480
  tooltip: C("duplicate"),
8480
8481
  disabled: s || a || l === void 0 || h || T,
8481
8482
  loading: h,
8482
- onClick: W
8483
+ onClick: U
8483
8484
  }), /* @__PURE__ */ n(ze, {
8484
8485
  icon: /* @__PURE__ */ n(Yn, {}),
8485
8486
  tooltip: C("delete"),
@@ -8539,7 +8540,7 @@ function vd({
8539
8540
  onItemClick: async (L) => {
8540
8541
  !L || !(await Ft({
8541
8542
  onFormSave: o
8542
- })).succeed || U(L);
8543
+ })).succeed || W(L);
8543
8544
  }
8544
8545
  }), /* @__PURE__ */ n(Dt, {
8545
8546
  icon: /* @__PURE__ */ n(Kn, {}),
@@ -8552,7 +8553,7 @@ function vd({
8552
8553
  const B = await Ft({
8553
8554
  onFormSave: o
8554
8555
  });
8555
- !B.succeed || U({
8556
+ !B.succeed || W({
8556
8557
  ...L,
8557
8558
  datas: {
8558
8559
  ...L.datas || {},
@@ -9259,12 +9260,12 @@ function Ad(e) {
9259
9260
  });
9260
9261
  }
9261
9262
  async function j() {
9262
- var U;
9263
+ var W;
9263
9264
  try {
9264
9265
  s == null || s(!0), await H.getHandler().delete({
9265
9266
  model: d,
9266
9267
  ids: o.map((L) => L.id)
9267
- }), c == null || c(void 0), m == null || m(void 0), (U = f == null ? void 0 : f.current) == null || U.refreshResults();
9268
+ }), c == null || c(void 0), m == null || m(void 0), (W = f == null ? void 0 : f.current) == null || W.refreshResults();
9268
9269
  } catch (L) {
9269
9270
  Ge(L);
9270
9271
  } finally {
@@ -9272,7 +9273,7 @@ function Ad(e) {
9272
9273
  }
9273
9274
  }
9274
9275
  async function q() {
9275
- var U;
9276
+ var W;
9276
9277
  try {
9277
9278
  u == null || u(!0);
9278
9279
  const L = o[0].id;
@@ -9282,16 +9283,16 @@ function Ad(e) {
9282
9283
  context: {
9283
9284
  ...x
9284
9285
  }
9285
- }) && ((U = f == null ? void 0 : f.current) == null || U.refreshResults());
9286
+ }) && ((W = f == null ? void 0 : f.current) == null || W.refreshResults());
9286
9287
  } catch (L) {
9287
9288
  Ge(L);
9288
9289
  } finally {
9289
9290
  u == null || u(!1);
9290
9291
  }
9291
9292
  }
9292
- function W(U) {
9293
+ function U(W) {
9293
9294
  k == null || k({
9294
- actionData: U,
9295
+ actionData: W,
9295
9296
  values: {
9296
9297
  active_id: o == null ? void 0 : o.map((L) => L.id)[0],
9297
9298
  active_ids: o == null ? void 0 : o.map((L) => L.id)
@@ -9316,8 +9317,8 @@ function Ad(e) {
9316
9317
  children: [/* @__PURE__ */ n(Dd, {
9317
9318
  disabled: l || a || T,
9318
9319
  searchText: v,
9319
- onSearch: (U) => {
9320
- U && U.trim().length > 0 ? g == null || g(U) : g == null || g(void 0);
9320
+ onSearch: (W) => {
9321
+ W && W.trim().length > 0 ? g == null || g(W) : g == null || g(void 0);
9321
9322
  }
9322
9323
  }), !C && /* @__PURE__ */ n(No, {
9323
9324
  icon: /* @__PURE__ */ n(Zr, {
@@ -9361,15 +9362,15 @@ function Ad(e) {
9361
9362
  disabled: l || a || T,
9362
9363
  loading: !1,
9363
9364
  onClick: () => {
9364
- var U;
9365
- (U = f == null ? void 0 : f.current) == null || U.refreshResults();
9365
+ var W;
9366
+ (W = f == null ? void 0 : f.current) == null || W.refreshResults();
9366
9367
  }
9367
9368
  }), !C && /* @__PURE__ */ P(re, {
9368
9369
  children: [vt(), /* @__PURE__ */ n(Zn, {
9369
9370
  currentView: r,
9370
9371
  availableViews: t,
9371
- onChangeView: (U) => {
9372
- D == null || D(r), i == null || i(U);
9372
+ onChangeView: (W) => {
9373
+ D == null || D(r), i == null || i(W);
9373
9374
  },
9374
9375
  previousView: b,
9375
9376
  disabled: T
@@ -9379,19 +9380,19 @@ function Ad(e) {
9379
9380
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
9380
9381
  tooltip: $("actions"),
9381
9382
  items: w == null ? void 0 : w.action,
9382
- onItemClick: (U) => {
9383
- !U || W(U);
9383
+ onItemClick: (W) => {
9384
+ !W || U(W);
9384
9385
  }
9385
9386
  }), /* @__PURE__ */ n(Dt, {
9386
9387
  icon: /* @__PURE__ */ n(Kn, {}),
9387
9388
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
9388
9389
  tooltip: $("reports"),
9389
9390
  items: w == null ? void 0 : w.print,
9390
- onItemClick: (U) => {
9391
- !U || W({
9392
- ...U,
9391
+ onItemClick: (W) => {
9392
+ !W || U({
9393
+ ...W,
9393
9394
  datas: {
9394
- ...U.datas || {},
9395
+ ...W.datas || {},
9395
9396
  ids: o.map((L) => L.id)
9396
9397
  }
9397
9398
  });
@@ -9434,10 +9435,10 @@ function Ad(e) {
9434
9435
  id: "export",
9435
9436
  name: $("advancedExport")
9436
9437
  }],
9437
- onItemClick: (U) => {
9438
- if (U.id === "print_screen") {
9438
+ onItemClick: (W) => {
9439
+ if (W.id === "print_screen") {
9439
9440
  let L = (o == null ? void 0 : o.map((B) => B.id)) || [];
9440
- L.length === 0 && (L = (V == null ? void 0 : V.map((B) => B.id)) || []), W({
9441
+ L.length === 0 && (L = (V == null ? void 0 : V.map((B) => B.id)) || []), U({
9441
9442
  id: -1,
9442
9443
  model: d,
9443
9444
  report_name: "printscreen.list",
@@ -9639,7 +9640,7 @@ function Nd(e, t) {
9639
9640
  action_type: p,
9640
9641
  treeExpandable: h = !1,
9641
9642
  limit: g
9642
- } = e, [v, T] = O(), [D, b] = O([]), [V, _] = O(!0), E = m || void 0, [x, C] = O(E), [w, S] = O([]), [$, R] = O(), [F, k] = O([]), [M, I] = O(), [N, A] = O(0), [j, q] = O(!1), [W, J] = O(!1), [U, L] = O(), {
9643
+ } = e, [v, T] = O(), [D, b] = O([]), [V, _] = O(!0), E = m || void 0, [x, C] = O(E), [w, S] = O([]), [$, R] = O(), [F, k] = O([]), [M, I] = O(), [N, A] = O(0), [j, q] = O(!1), [U, J] = O(!1), [W, L] = O(), {
9643
9644
  t: B
9644
9645
  } = Y(ve), te = fe(), Z = fe(), ae = Y(at), {
9645
9646
  setCurrentView: X,
@@ -9817,7 +9818,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9817
9818
  formView: D.find((Ie) => Ie.type === "form"),
9818
9819
  treeView: ee,
9819
9820
  searchTreeRef: Z,
9820
- searchTreeNameSearch: U,
9821
+ searchTreeNameSearch: W,
9821
9822
  availableViews: D,
9822
9823
  results: F,
9823
9824
  setCurrentItemIndex: R,
@@ -9872,13 +9873,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9872
9873
  selectedRowItems: w,
9873
9874
  setSelectedRowItems: S,
9874
9875
  setSearchTreeNameSearch: L,
9875
- searchTreeNameSearch: U,
9876
+ searchTreeNameSearch: W,
9876
9877
  goToResourceId: we,
9877
9878
  limit: g,
9878
9879
  children: [Re(), /* @__PURE__ */ n(Cd, {
9879
9880
  visible: j,
9880
9881
  onIdSubmitted: we,
9881
- isSearching: W,
9882
+ isSearching: U,
9882
9883
  onCancel: () => {
9883
9884
  q(!1);
9884
9885
  }
@@ -10048,10 +10049,10 @@ function Ud(e) {
10048
10049
  domain: s = [],
10049
10050
  visible: a = !0,
10050
10051
  parentContext: l = {}
10051
- } = e, [u, d] = O(!1), [f, c] = O(!1), [m, y] = O(), [p, h] = O(), [g, v] = O(), [T, D] = O(1), [b, V] = O(0), _ = fe(Wd), E = fe([]), [x, C] = O(0), [w, S] = O([]), [$, R] = O(void 0), [F, k] = O(), [M, I] = O(), [N, A] = O(), [j, q] = O(!1), W = fe([]), J = (z) => {
10052
+ } = e, [u, d] = O(!1), [f, c] = O(!1), [m, y] = O(), [p, h] = O(), [g, v] = O(), [T, D] = O(1), [b, V] = O(0), _ = fe(Wd), E = fe([]), [x, C] = O(0), [w, S] = O([]), [$, R] = O(void 0), [F, k] = O(), [M, I] = O(), [N, A] = O(), [j, q] = O(!1), U = fe([]), J = (z) => {
10052
10053
  q(!0), D(z), V((z - 1) * _.current);
10053
- }, U = async () => {
10054
- const z = W.current.length > 0 ? W.current : s, he = hn(E.current, z), {
10054
+ }, W = async () => {
10055
+ const z = U.current.length > 0 ? U.current : s, he = hn(E.current, z), {
10055
10056
  colors: be
10056
10057
  } = _t(p), {
10057
10058
  totalItems: Ee,
@@ -10082,7 +10083,7 @@ function Ud(e) {
10082
10083
  C(ie);
10083
10084
  }, L = async () => {
10084
10085
  try {
10085
- q(!0), await U();
10086
+ q(!0), await W();
10086
10087
  } catch (z) {
10087
10088
  I(JSON.stringify(z));
10088
10089
  }
@@ -10104,7 +10105,7 @@ function Ud(e) {
10104
10105
  action: t,
10105
10106
  context: l
10106
10107
  });
10107
- W.current = z.domain, v(z.views.get("form")), h(z.views.get("tree")), y(z.model), _.current = z.limit;
10108
+ U.current = z.domain, v(z.views.get("form")), h(z.views.get("tree")), y(z.model), _.current = z.limit;
10108
10109
  }, Z = async () => {
10109
10110
  y(r);
10110
10111
  const z = await H.getHandler().getView({
@@ -10371,14 +10372,14 @@ function qd(e, t) {
10371
10372
  model: A,
10372
10373
  context: j,
10373
10374
  domain: q,
10374
- initialView: W,
10375
+ initialView: U,
10375
10376
  limit: J
10376
10377
  } = w;
10377
- let U = {};
10378
+ let W = {};
10378
10379
  try {
10379
- U = JSON.parse($.replace(/'/g, '"'));
10380
+ W = JSON.parse($.replace(/'/g, '"'));
10380
10381
  } catch {
10381
- U = {
10382
+ W = {
10382
10383
  x: C * 2,
10383
10384
  y: 0,
10384
10385
  w: 2,
@@ -10386,7 +10387,7 @@ function qd(e, t) {
10386
10387
  };
10387
10388
  }
10388
10389
  let L = null;
10389
- if ((W == null ? void 0 : W.type) === "graph")
10390
+ if ((U == null ? void 0 : U.type) === "graph")
10390
10391
  L = /* @__PURE__ */ n(gn, {
10391
10392
  view_id: N.filter((Z) => Z[1] === "graph")[0][0],
10392
10393
  model: A,
@@ -10394,12 +10395,12 @@ function qd(e, t) {
10394
10395
  domain: q,
10395
10396
  limit: J
10396
10397
  });
10397
- else if ((W == null ? void 0 : W.type) === "form")
10398
+ else if ((U == null ? void 0 : U.type) === "form")
10398
10399
  L = /* @__PURE__ */ n(Gd, {
10399
10400
  model: A,
10400
10401
  actionDomain: q
10401
10402
  });
10402
- else if ((W == null ? void 0 : W.type) === "tree")
10403
+ else if ((U == null ? void 0 : U.type) === "tree")
10403
10404
  L = /* @__PURE__ */ n(Ud, {
10404
10405
  model: A,
10405
10406
  domain: q,
@@ -10428,11 +10429,11 @@ function qd(e, t) {
10428
10429
  }
10429
10430
  }
10430
10431
  });
10431
- else if (W !== void 0) {
10432
- const Z = W && Array.isArray(W.id) ? {
10433
- ...W,
10434
- id: W.id[0]
10435
- } : W;
10432
+ else if (U !== void 0) {
10433
+ const Z = U && Array.isArray(U.id) ? {
10434
+ ...U,
10435
+ id: U.id[0]
10436
+ } : U;
10436
10437
  L = /* @__PURE__ */ n(Po, {
10437
10438
  action_id: F,
10438
10439
  action_type: k,
@@ -10473,7 +10474,7 @@ function qd(e, t) {
10473
10474
  return /* @__PURE__ */ n(Yd, {
10474
10475
  id: R,
10475
10476
  title: I,
10476
- parms: U,
10477
+ parms: W,
10477
10478
  action: B,
10478
10479
  openAction: y,
10479
10480
  children: L
@@ -10832,7 +10833,7 @@ function du(e, t) {
10832
10833
  target: A,
10833
10834
  view_type: j,
10834
10835
  limit: q
10835
- } = w, W = j === "tree", J = [];
10836
+ } = w, U = j === "tree", J = [];
10836
10837
  for (const L of I) {
10837
10838
  const [B, te] = L;
10838
10839
  if (B)
@@ -10854,16 +10855,16 @@ function du(e, t) {
10854
10855
  J.push([Z, te]);
10855
10856
  }
10856
10857
  }
10857
- let U;
10858
+ let W;
10858
10859
  if (E) {
10859
10860
  const [L, B] = J.find(([te, Z]) => Z === E);
10860
- U = {
10861
+ W = {
10861
10862
  id: L,
10862
10863
  type: B
10863
10864
  };
10864
10865
  } else {
10865
10866
  const [L, B] = J[0];
10866
- U = {
10867
+ W = {
10867
10868
  id: L,
10868
10869
  type: B
10869
10870
  };
@@ -10878,13 +10879,13 @@ function du(e, t) {
10878
10879
  views: J,
10879
10880
  title: N,
10880
10881
  target: A,
10881
- initialView: U,
10882
+ initialView: W,
10882
10883
  action_type: S,
10883
10884
  action_id: R,
10884
10885
  values: V,
10885
10886
  forced_values: _,
10886
10887
  res_id: x,
10887
- treeExpandable: W,
10888
+ treeExpandable: U,
10888
10889
  limit: q
10889
10890
  });
10890
10891
  }
@@ -10987,10 +10988,10 @@ function du(e, t) {
10987
10988
  view_type: I,
10988
10989
  limit: N
10989
10990
  } = w, A = I === "tree", j = [];
10990
- for (const U of F) {
10991
- const [L, B] = U;
10991
+ for (const W of F) {
10992
+ const [L, B] = W;
10992
10993
  if (L)
10993
- j.push(U);
10994
+ j.push(W);
10994
10995
  else if (B === "dashboard")
10995
10996
  j.push([void 0, "dashboard"]);
10996
10997
  else {
@@ -11008,15 +11009,15 @@ function du(e, t) {
11008
11009
  j.push([te, B]);
11009
11010
  }
11010
11011
  }
11011
- let q, W;
11012
+ let q, U;
11012
11013
  if (x == null) {
11013
- const U = j.find((L) => L[0] === void 0);
11014
- q = void 0, W = U[1];
11014
+ const W = j.find((L) => L[0] === void 0);
11015
+ q = void 0, U = W[1];
11015
11016
  } else
11016
- [q, W] = j.find((U) => U[0] === void 0 ? !1 : U[0] === x);
11017
+ [q, U] = j.find((W) => W[0] === void 0 ? !1 : W[0] === x);
11017
11018
  const J = {
11018
11019
  id: q,
11019
- type: W
11020
+ type: U
11020
11021
  };
11021
11022
  D({
11022
11023
  domain: $,
@@ -11311,7 +11312,7 @@ const {
11311
11312
  async function S() {
11312
11313
  if (!V)
11313
11314
  return;
11314
- const M = D.find((W) => W.key === b), {
11315
+ const M = D.find((U) => U.key === b), {
11315
11316
  id: I,
11316
11317
  type: N
11317
11318
  } = (M == null ? void 0 : M.action) || {};