@gisce/react-ooui 1.4.9 → 1.4.10

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), [$, A] = O(), [F, k] = O(1), [M, I] = O(0), [N, R] = O(), [j, q] = O([]), [W, z] = O(void 0), [U, L] = O(void 0), B = de(b || Ht), ee = de([]), Z = Le((se) => {
2390
+ } = e, [x, C] = O(!1), [w, S] = O(!1), [$, A] = O(), [F, k] = O(1), [M, I] = O(0), [N, R] = O(), [j, q] = O([]), [U, z] = O(void 0), [W, L] = O(void 0), B = de(b || Ht), ee = de([]), Z = Le((se) => {
2391
2391
  g == null || g([...se]), q([...se]);
2392
2392
  }, []), ie = Le(() => v || j, [v, j]), Q = Le(async () => {
2393
2393
  const se = await H.getHandler().nameSearch({
@@ -2398,8 +2398,8 @@ const Mt = ({
2398
2398
  context: c
2399
2399
  });
2400
2400
  if (R(se.length), f == null || f(se.length), se.length > 0) {
2401
- const Se = se.map((ce) => ce == null ? void 0 : ce[0]), { colors: De, status: Ve } = _t(d), je = {};
2402
- De && (je.colors = De), Ve && (je.status = Ve);
2401
+ const Se = se.map((ce) => ce == null ? void 0 : ce[0]), { colors: De, status: Ae } = _t(d), je = {};
2402
+ De && (je.colors = De), Ae && (je.status = Ae);
2403
2403
  const We = await H.getHandler().readEvalUiObjects({
2404
2404
  model: t,
2405
2405
  ids: Se,
@@ -2432,10 +2432,10 @@ const Mt = ({
2432
2432
  f
2433
2433
  ]), J = Le(
2434
2434
  async (se) => {
2435
- const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || _, T), { colors: je, status: We } = _t(d), te = {};
2435
+ const { params: Se, newOffset: De } = se || {}, Ae = hn(Se || _, T), { colors: je, status: We } = _t(d), te = {};
2436
2436
  je && (te.colors = je), We && (te.status = We);
2437
2437
  const { totalItems: Fe, results: Ee, attrsEvaluated: ce } = await H.getHandler().searchForTree({
2438
- params: Ve,
2438
+ params: Ae,
2439
2439
  limit: B.current,
2440
2440
  offset: De || M,
2441
2441
  model: t,
@@ -2483,7 +2483,7 @@ const Mt = ({
2483
2483
  } catch (Se) {
2484
2484
  A(Se.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
  [
@@ -2522,8 +2522,8 @@ const Mt = ({
2522
2522
  [p, ie, d, m, Z]
2523
2523
  ), $e = Le(
2524
2524
  (se) => {
2525
- const { params: Se, searchValues: De, limit: Ve, offset: je } = se;
2526
- x || (r == null || r(void 0), i == null || i([]), E == null || E(De), o == null || o(Se), s == null || s(!1), S(!0), A(void 0), k(1), Ve && (B.current = Ve, V == null || V(Ve)), je && I(je), fe({
2525
+ const { params: Se, searchValues: De, limit: Ae, offset: je } = se;
2526
+ x || (r == null || r(void 0), i == null || i([]), E == null || E(De), o == null || o(Se), s == null || s(!1), S(!0), A(void 0), k(1), Ae && (B.current = Ae, V == null || V(Ae)), je && I(je), fe({
2527
2527
  params: Se,
2528
2528
  newOffset: je
2529
2529
  }));
@@ -2583,8 +2583,8 @@ const Mt = ({
2583
2583
  requestPageChange: Ie,
2584
2584
  changeSort: be,
2585
2585
  fetchChildrenForRecord: ge,
2586
- colorsForResults: W,
2587
- statusForResults: U,
2586
+ colorsForResults: U,
2587
+ statusForResults: W,
2588
2588
  totalItems: N
2589
2589
  };
2590
2590
  }, Qe = Je.createContext(null), ul = (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), [$, A] = O(!1), [F, k] = O(!1), [M, I] = O(!0), [N, R] = O(!0), [j, q] = O([]), [W, z] = O(!1), [U, L] = O([]), [B, ee] = O(!1), [Z, ie] = O(!0), [Q, J] = O(), [fe, be] = O({}), [$e, Ie] = O(C !== void 0 ? C : Ht), [Be, ge] = O(i);
2617
+ } = e, [w, S] = O(!1), [$, A] = O(!1), [F, k] = O(!1), [M, I] = O(!0), [N, R] = O(!0), [j, q] = O([]), [U, z] = O(!1), [W, L] = O([]), [B, ee] = O(!1), [Z, ie] = O(!0), [Q, J] = O(), [fe, be] = O({}), [$e, Ie] = O(C !== void 0 ? C : Ht), [Be, ge] = 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: z,
2664
2664
  setSearchParams: L,
2665
- searchParams: U,
2665
+ searchParams: W,
2666
2666
  searchVisible: B,
2667
2667
  setSearchVisible: ee,
2668
2668
  sorter: g,
@@ -3092,7 +3092,7 @@ function vl(e, t) {
3092
3092
  } = e, {
3093
3093
  t: x,
3094
3094
  lang: C
3095
- } = Y(we), [w, S] = O(!1), [$, A] = O(), [F, k] = O(), [M] = ot.useForm(), [I, N] = O(), [R, j] = O(), q = Y(mo), [W, z] = O(), [U, L] = O(!1), B = de(), ee = de({}), Z = de({}), ie = de(!1), Q = de(!1), fe = (E !== void 0 ? E : W) < yl, be = Y(Ne), {
3095
+ } = Y(we), [w, S] = O(!1), [$, A] = O(), [F, k] = O(), [M] = ot.useForm(), [I, N] = O(), [R, j] = O(), q = Y(mo), [U, z] = O(), [W, L] = O(!1), B = de(), ee = de({}), Z = de({}), ie = de(!1), Q = de(!1), fe = (E !== void 0 ? E : U) < yl, be = Y(Ne), {
3096
3096
  activeId: $e,
3097
3097
  getPlainValues: Ie
3098
3098
  } = be || {}, Be = Y(Qe), {
@@ -3100,7 +3100,7 @@ function vl(e, t) {
3100
3100
  setFormHasChanges: se = void 0,
3101
3101
  setCurrentId: Se = void 0,
3102
3102
  setFormIsLoading: De = void 0,
3103
- setAttachments: Ve = void 0,
3103
+ setAttachments: Ae = void 0,
3104
3104
  title: je = void 0,
3105
3105
  setTitle: We = void 0
3106
3106
  } = (b ? Be : {}) || {}, te = Y(Et), {
@@ -3127,10 +3127,10 @@ function vl(e, t) {
3127
3127
  (i === void 0 && R || i !== void 0 && R && i < 0) && (B.current = void 0, k(void 0)), ut();
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 ce = (K, G, re) => {
3135
3135
  se == null || se(!1), ge == null || ge(!1), s == null || s(K, G, re), Se == null || Se(K);
3136
3136
  }, me = () => {
@@ -3147,7 +3147,7 @@ function vl(e, t) {
3147
3147
  function Ke() {
3148
3148
  const K = {
3149
3149
  ...xe(R),
3150
- ...Ae()
3150
+ ...Ve()
3151
3151
  };
3152
3152
  for (const G in K)
3153
3153
  K[G] === void 0 && delete K[G];
@@ -3175,7 +3175,7 @@ function vl(e, t) {
3175
3175
  ...F == null ? void 0 : F.context
3176
3176
  };
3177
3177
  }
3178
- function Ae() {
3178
+ function Ve() {
3179
3179
  return {
3180
3180
  id: ue(),
3181
3181
  active_id: ue(),
@@ -3318,9 +3318,9 @@ function vl(e, t) {
3318
3318
  context: ae(),
3319
3319
  model: "ir.attachment"
3320
3320
  });
3321
- Ve == null || Ve(Re);
3321
+ Ae == null || Ae(Re);
3322
3322
  } else
3323
- Ve == null || Ve([]), re = await he(K), oe = !0;
3323
+ Ae == null || Ae([]), re = await he(K), oe = !0;
3324
3324
  return {
3325
3325
  values: re,
3326
3326
  defaultGetCalled: oe
@@ -3413,7 +3413,7 @@ function vl(e, t) {
3413
3413
  readOnly: f,
3414
3414
  values: Da({
3415
3415
  ...re,
3416
- ...Ae()
3416
+ ...Ve()
3417
3417
  }, K)
3418
3418
  }), k(oe), oe.string && oe.string !== je && (We == null || We(oe.string)), q && oe.string && ((Re = q.setTitle) == null || Re.call(q, oe.string));
3419
3419
  }, vn = async ({
@@ -4680,15 +4680,15 @@ var wo = { exports: {} };
4680
4680
  return N ? Q : Q.endOf(c);
4681
4681
  }, q = function(Z, ie) {
4682
4682
  return w.w(I.toDate()[Z].apply(I.toDate("s"), (N ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ie)), I);
4683
- }, W = this.$W, z = this.$M, U = this.$D, L = "set" + (this.$u ? "UTC" : "");
4683
+ }, U = this.$W, z = this.$M, W = this.$D, L = "set" + (this.$u ? "UTC" : "");
4684
4684
  switch (R) {
4685
4685
  case y:
4686
4686
  return N ? j(1, 0) : j(31, 11);
4687
4687
  case d:
4688
4688
  return N ? j(1, z) : j(0, z + 1);
4689
4689
  case f:
4690
- var B = this.$locale().weekStart || 0, ee = (W < B ? W + 7 : W) - B;
4691
- return j(N ? U - ee : U + (6 - ee), z);
4690
+ var B = this.$locale().weekStart || 0, ee = (U < B ? U + 7 : U) - B;
4691
+ return j(N ? W - ee : W + (6 - ee), z);
4692
4692
  case c:
4693
4693
  case p:
4694
4694
  return q(L + "Hours", 0);
@@ -4706,8 +4706,8 @@ var wo = { exports: {} };
4706
4706
  }, F.$set = function(k, M) {
4707
4707
  var I, N = w.p(k), R = "set" + (this.$u ? "UTC" : ""), j = (I = {}, I[c] = R + "Date", I[p] = R + "Date", I[d] = R + "Month", I[y] = R + "FullYear", I[u] = R + "Hours", I[l] = R + "Minutes", I[a] = R + "Seconds", I[s] = R + "Milliseconds", I)[N], q = N === c ? this.$D + (M - this.$W) : M;
4708
4708
  if (N === d || N === y) {
4709
- var W = this.clone().set(p, 1);
4710
- W.$d[j](q), W.init(), this.$d = W.set(p, Math.min(this.$D, W.daysInMonth())).$d;
4709
+ var U = this.clone().set(p, 1);
4710
+ U.$d[j](q), U.init(), this.$d = U.set(p, Math.min(this.$D, U.daysInMonth())).$d;
4711
4711
  } else
4712
4712
  j && this.$d[j](q);
4713
4713
  return this.init(), this;
@@ -4719,8 +4719,8 @@ var wo = { exports: {} };
4719
4719
  var I, N = this;
4720
4720
  k = Number(k);
4721
4721
  var R = w.p(M), j = function(z) {
4722
- var U = C(N);
4723
- return w.w(U.date(U.date() + Math.round(z * k)), N);
4722
+ var W = C(N);
4723
+ return w.w(W.date(W.date() + Math.round(z * k)), N);
4724
4724
  };
4725
4725
  if (R === d)
4726
4726
  return this.set(d, this.$M + k);
@@ -4730,30 +4730,30 @@ var wo = { exports: {} };
4730
4730
  return j(1);
4731
4731
  if (R === f)
4732
4732
  return j(7);
4733
- var q = (I = {}, I[l] = i, I[u] = o, I[a] = r, I)[R] || 1, W = this.$d.getTime() + k * q;
4734
- return w.w(W, this);
4733
+ var q = (I = {}, I[l] = i, I[u] = o, I[a] = r, I)[R] || 1, U = this.$d.getTime() + k * q;
4734
+ return w.w(U, this);
4735
4735
  }, F.subtract = function(k, M) {
4736
4736
  return this.add(-1 * k, M);
4737
4737
  }, F.format = function(k) {
4738
4738
  var M = this, I = this.$locale();
4739
4739
  if (!this.isValid())
4740
4740
  return I.invalidDate || h;
4741
- var N = k || "YYYY-MM-DDTHH:mm:ssZ", R = w.z(this), j = this.$H, q = this.$m, W = this.$M, z = I.weekdays, U = I.months, L = function(ie, Q, J, fe) {
4741
+ var N = k || "YYYY-MM-DDTHH:mm:ssZ", R = w.z(this), j = this.$H, q = this.$m, U = this.$M, z = I.weekdays, W = I.months, L = function(ie, Q, J, fe) {
4742
4742
  return ie && (ie[Q] || ie(M, N)) || J[Q].slice(0, fe);
4743
4743
  }, B = function(ie) {
4744
4744
  return w.s(j % 12 || 12, ie, "0");
4745
4745
  }, ee = I.meridiem || function(ie, Q, J) {
4746
4746
  var fe = ie < 12 ? "AM" : "PM";
4747
4747
  return J ? fe.toLowerCase() : fe;
4748
- }, 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, z, 2), ddd: L(I.weekdaysShort, this.$W, z, 3), dddd: z[this.$W], H: String(j), HH: w.s(j, 2, "0"), h: B(1), hh: B(2), a: ee(j, q, !0), A: ee(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: R };
4748
+ }, 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, z, 2), ddd: L(I.weekdaysShort, this.$W, z, 3), dddd: z[this.$W], H: String(j), HH: w.s(j, 2, "0"), h: B(1), hh: B(2), a: ee(j, q, !0), A: ee(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: R };
4749
4749
  return N.replace(v, function(ie, Q) {
4750
4750
  return Q || Z[ie] || R.replace(":", "");
4751
4751
  });
4752
4752
  }, F.utcOffset = function() {
4753
4753
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
4754
4754
  }, F.diff = function(k, M, I) {
4755
- var N, R = w.p(M), j = C(k), q = (j.utcOffset() - this.utcOffset()) * i, W = this - j, z = w.m(this, j);
4756
- return z = (N = {}, N[y] = z / 12, N[d] = z, N[m] = z / 3, N[f] = (W - q) / 6048e5, N[c] = (W - q) / 864e5, N[u] = W / o, N[l] = W / i, N[a] = W / r, N)[R] || W, I ? z : w.a(z);
4755
+ var N, R = w.p(M), j = C(k), q = (j.utcOffset() - this.utcOffset()) * i, U = this - j, z = w.m(this, j);
4756
+ return z = (N = {}, N[y] = z / 12, N[d] = z, N[m] = z / 3, N[f] = (U - q) / 6048e5, N[c] = (U - q) / 864e5, N[u] = U / o, N[l] = U / i, N[a] = U / r, N)[R] || U, I ? z : w.a(z);
4757
4757
  }, F.daysInMonth = function() {
4758
4758
  return this.endOf(d).$D;
4759
4759
  }, F.$locale = function() {
@@ -5106,14 +5106,14 @@ function pn(e) {
5106
5106
  });
5107
5107
  function j() {
5108
5108
  var ee;
5109
- const U = w.current.columns.filter((Z) => Z.sum !== void 0).map((Z) => ({
5109
+ const W = w.current.columns.filter((Z) => Z.sum !== void 0).map((Z) => ({
5110
5110
  label: Z.sum,
5111
5111
  field: Z.id
5112
5112
  }));
5113
- if (!U || U.length === 0)
5113
+ if (!W || W.length === 0)
5114
5114
  return null;
5115
5115
  let L = [], B = ((ee = f == null ? void 0 : f.selectedRowKeys) == null ? void 0 : ee.length) > 0 ? V.filter((Z) => f == null ? void 0 : f.selectedRowKeys.includes(Z.id)) : V;
5116
- return U.forEach((Z) => {
5116
+ return W.forEach((Z) => {
5117
5117
  const ie = B.reduce((Q, J) => J[Z.field] && !isNaN(J[Z.field]) ? Q + J[Z.field] : Q, 0);
5118
5118
  L.push(`${Z.label}: ${Math.round(ie * 100) / 100}`);
5119
5119
  }), /* @__PURE__ */ n("div", {
@@ -5121,11 +5121,11 @@ function pn(e) {
5121
5121
  children: L.join(", ")
5122
5122
  });
5123
5123
  }
5124
- let q, W = d;
5124
+ let q, U = d;
5125
5125
  if (w.current !== null) {
5126
5126
  q = El(E, V, 600);
5127
- const U = w.current;
5128
- d && U.columns.some((L) => L.sum !== void 0) && (W = d - 30);
5127
+ const W = w.current;
5128
+ d && W.columns.some((L) => L.sum !== void 0) && (U = d - 30);
5129
5129
  }
5130
5130
  return w.current === null ? /* @__PURE__ */ n(Me, {
5131
5131
  style: {
@@ -5135,7 +5135,7 @@ function pn(e) {
5135
5135
  children: [R(), l && /* @__PURE__ */ n(Me, {
5136
5136
  className: "pb-4"
5137
5137
  }), /* @__PURE__ */ n(Ri, {
5138
- height: W,
5138
+ height: U,
5139
5139
  columns: q.columns,
5140
5140
  dataSource: V,
5141
5141
  loading: !1,
@@ -5153,6 +5153,7 @@ function pn(e) {
5153
5153
  });
5154
5154
  } : void 0,
5155
5155
  onRowDoubleClick: u,
5156
+ selectionRowKeys: f == null ? void 0 : f.selectedRowKeys,
5156
5157
  onRowSelectionChange: f == null ? void 0 : f.onChange,
5157
5158
  onChangeSort: p,
5158
5159
  sorter: h,
@@ -5190,9 +5191,9 @@ function oc(e, t) {
5190
5191
  currentId: R = void 0,
5191
5192
  results: j = void 0,
5192
5193
  selectedRowItems: q = void 0,
5193
- setSelectedRowItems: W = void 0,
5194
+ setSelectedRowItems: U = void 0,
5194
5195
  searchParams: z = [],
5195
- setSearchParams: U = void 0,
5196
+ setSearchParams: W = void 0,
5196
5197
  searchVisible: L = !0,
5197
5198
  setSearchVisible: B = void 0,
5198
5199
  sorter: ee = void 0,
@@ -5210,7 +5211,7 @@ function oc(e, t) {
5210
5211
  fetchResults: se,
5211
5212
  tableRefreshing: Se,
5212
5213
  searchFilterLoading: De,
5213
- searchError: Ve,
5214
+ searchError: Ae,
5214
5215
  page: je,
5215
5216
  offset: We,
5216
5217
  getResults: te,
@@ -5223,8 +5224,8 @@ function oc(e, t) {
5223
5224
  } = ho({
5224
5225
  model: T,
5225
5226
  setSearchTreeNameSearch: Q,
5226
- setSelectedRowItems: W,
5227
- setSearchParams: U,
5227
+ setSelectedRowItems: Ve,
5228
+ setSearchParams: W,
5228
5229
  setSearchValues: be,
5229
5230
  searchParams: z,
5230
5231
  setSearchVisible: B,
@@ -5321,9 +5322,9 @@ function oc(e, t) {
5321
5322
  treeView: b
5322
5323
  });
5323
5324
  };
5324
- function Ae(ke) {
5325
+ function Ve(ke) {
5325
5326
  const et = te().filter((tt) => ke.includes(tt.id));
5326
- W == null || W(et), m == null || m(ke);
5327
+ U == null || U(et), m == null || m(ke);
5327
5328
  }
5328
5329
  function he() {
5329
5330
  return b != null && b.isExpandable ? A - 160 : A - (w + 210);
@@ -5342,7 +5343,7 @@ function oc(e, t) {
5342
5343
  onSubmit: Be,
5343
5344
  onLimitChange: at,
5344
5345
  setSearchFilterHeight: S,
5345
- searchError: Ve,
5346
+ searchError: Ae,
5346
5347
  searchVisible: L,
5347
5348
  searchValues: fe
5348
5349
  }), /* @__PURE__ */ n(pn, {
@@ -5360,7 +5361,7 @@ function oc(e, t) {
5360
5361
  statusForResults: Te,
5361
5362
  rowSelection: {
5362
5363
  selectedRowKeys: q == null ? void 0 : q.map((ke) => ke.id),
5363
- onChange: Ae
5364
+ onChange: Ve
5364
5365
  },
5365
5366
  sorter: ee,
5366
5367
  onChangeSort: Ee,
@@ -5368,7 +5369,7 @@ function oc(e, t) {
5368
5369
  childField: b.field_parent,
5369
5370
  rootTree: f
5370
5371
  })]
5371
- }), xe = x || Ve;
5372
+ }), xe = x || Ae;
5372
5373
  return xe ? /* @__PURE__ */ n(Ze, {
5373
5374
  className: "mt-10",
5374
5375
  message: xe,
@@ -5525,9 +5526,9 @@ const So = bt(oc), To = (e) => {
5525
5526
  elementHasLostFocus: $
5526
5527
  } = E || {}, A = de([]), [F, k] = O([]), M = t && t[0] || void 0, I = t && t[1] || "";
5527
5528
  pe(() => {
5528
- !Array.isArray(t) && t && W(t);
5529
+ !Array.isArray(t) && t && U(t);
5529
5530
  }, [t]), pe(() => {
5530
- M && I.length === 0 ? W(M) : M && I.length > 0 ? V(I) : !M && !I && V(_.current || "");
5531
+ M && I.length === 0 ? U(M) : M && I.length > 0 ? V(I) : !M && !I && V(_.current || "");
5531
5532
  }, [t]);
5532
5533
  const N = (B) => {
5533
5534
  r == null || r(B), $ == null || $();
@@ -5571,11 +5572,11 @@ const So = bt(oc), To = (e) => {
5571
5572
  },
5572
5573
  totalItems: 2
5573
5574
  });
5574
- ee.length === 1 ? W(ee[0]) : (T(B), m(!0));
5575
+ ee.length === 1 ? U(ee[0]) : (T(B), m(!0));
5575
5576
  return;
5576
5577
  }
5577
5578
  T(B), m(!0);
5578
- }, W = async (B) => {
5579
+ }, U = async (B) => {
5579
5580
  g(!0);
5580
5581
  try {
5581
5582
  const ee = await H.getHandler().execute({
@@ -5608,7 +5609,7 @@ const So = bt(oc), To = (e) => {
5608
5609
  widgetFieldName: u
5609
5610
  }))), k(A.current);
5610
5611
  }
5611
- async function U(B) {
5612
+ async function W(B) {
5612
5613
  B.keyCode === 13 ? (B.preventDefault(), B.stopPropagation(), await j()) : B.code === "Backspace" && M !== void 0 && (B.preventDefault(), B.stopPropagation(), N([void 0, ""]));
5613
5614
  }
5614
5615
  return /* @__PURE__ */ P(Ce, {
@@ -5623,7 +5624,7 @@ const So = bt(oc), To = (e) => {
5623
5624
  onChange: R,
5624
5625
  style: f,
5625
5626
  onBlur: j,
5626
- onKeyDown: U,
5627
+ onKeyDown: W,
5627
5628
  suffix: /* @__PURE__ */ n(Jn, {
5628
5629
  id: M,
5629
5630
  model: s,
@@ -5677,7 +5678,7 @@ const So = bt(oc), To = (e) => {
5677
5678
  visible: d,
5678
5679
  nameSearch: M ? void 0 : v,
5679
5680
  onSelectValues: (B) => {
5680
- m(!1), W(B[0]), D.current = !1, _.current = void 0;
5681
+ m(!1), U(B[0]), D.current = !1, _.current = void 0;
5681
5682
  },
5682
5683
  onCloseModal: () => {
5683
5684
  m(!1), D.current = !1;
@@ -5691,7 +5692,7 @@ const So = bt(oc), To = (e) => {
5691
5692
  id: t && t[0],
5692
5693
  visible: y,
5693
5694
  onSubmitSucceed: (B) => {
5694
- p(!1), W(B);
5695
+ p(!1), U(B);
5695
5696
  },
5696
5697
  onCancel: () => {
5697
5698
  p(!1);
@@ -6582,8 +6583,8 @@ const Ec = (e) => {
6582
6583
  } = f || {}, {
6583
6584
  lang: g,
6584
6585
  t: v
6585
- } = Y(we), [T, D] = O(!1), [b, V] = O(!1), [_, E] = O(), [x, C] = O(!1), [w, S] = O(!1), [$, A] = O(), [F, k] = O([]), [M, I] = O(!1), N = de([]), [R, j] = O(), q = de(), [W, z] = O(void 0), {
6586
- readOnly: U,
6586
+ } = Y(we), [T, D] = O(!1), [b, V] = O(!1), [_, E] = O(), [x, C] = O(!1), [w, S] = O(!1), [$, A] = O(), [F, k] = O([]), [M, I] = O(!1), N = de([]), [R, j] = O(), q = de(), [U, z] = O(void 0), {
6587
+ readOnly: W,
6587
6588
  relation: L,
6588
6589
  context: B,
6589
6590
  domain: ee
@@ -6604,21 +6605,21 @@ const Ec = (e) => {
6604
6605
  Be();
6605
6606
  }, [h]);
6606
6607
  const be = (X) => {
6607
- var ae, Ae;
6608
+ var ae, Ve;
6608
6609
  r == null || r({
6609
- fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((Ae = o.get("tree")) == null ? void 0 : Ae.fields),
6610
+ fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((Ve = o.get("tree")) == null ? void 0 : Ve.fields),
6610
6611
  items: Mc(X)
6611
6612
  });
6612
6613
  }, $e = async () => {
6613
6614
  await Ie(), u > Q.length - 1 && u !== 0 && c(0);
6614
6615
  }, Ie = async (X) => {
6615
- var ae, Ae, he;
6616
+ var ae, Ve, he;
6616
6617
  V(!0), D(!1), E(void 0);
6617
6618
  try {
6618
6619
  const [ye, xe] = await zn({
6619
6620
  treeView: {
6620
6621
  arch: (ae = o.get("tree")) == null ? void 0 : ae.arch,
6621
- fields: (Ae = o.get("tree")) == null ? void 0 : Ae.fields
6622
+ fields: (Ve = o.get("tree")) == null ? void 0 : Ve.fields
6622
6623
  },
6623
6624
  formView: {
6624
6625
  fields: ((he = o.get("form")) == null ? void 0 : he.fields) || {}
@@ -6654,16 +6655,16 @@ const Ec = (e) => {
6654
6655
  }
6655
6656
  const ge = () => {
6656
6657
  const X = Array.from(o.keys()), ae = X[(X.indexOf(a) + 1) % X.length];
6657
- a === "form" ? Ve(() => {
6658
+ a === "form" ? Ae(() => {
6658
6659
  l(ae);
6659
6660
  }) : l(ae);
6660
6661
  }, se = () => {
6661
- u > 0 && (a === "form" ? Ve(() => {
6662
+ u > 0 && (a === "form" ? Ae(() => {
6662
6663
  c(u - 1);
6663
6664
  }) : c(u - 1));
6664
6665
  }, Se = () => {
6665
6666
  const X = Q.length;
6666
- u < X - 1 && (a === "form" ? Ve(() => {
6667
+ u < X - 1 && (a === "form" ? Ae(() => {
6667
6668
  c(u + 1);
6668
6669
  }) : c(u + 1));
6669
6670
  }, De = async () => {
@@ -6675,7 +6676,7 @@ const Ec = (e) => {
6675
6676
  ...p == null ? void 0 : p(),
6676
6677
  ...B
6677
6678
  }
6678
- }))[0], Ae = (await H.getHandler().readObjects({
6679
+ }))[0], Ve = (await H.getHandler().readObjects({
6679
6680
  model: L,
6680
6681
  ids: [X],
6681
6682
  fields: o.get("tree").fields,
@@ -6687,10 +6688,10 @@ const Ec = (e) => {
6687
6688
  ...ye,
6688
6689
  operation: "original",
6689
6690
  values: ae,
6690
- treeValues: Ae
6691
+ treeValues: Ve
6691
6692
  } : ye);
6692
6693
  be(he);
6693
- }, Ve = (X) => {
6694
+ }, Ae = (X) => {
6694
6695
  T ? Wt({
6695
6696
  lang: g,
6696
6697
  onOk: () => {
@@ -6720,7 +6721,7 @@ const Ec = (e) => {
6720
6721
  let ae;
6721
6722
  X && d && (ae = {
6722
6723
  [X]: d
6723
- }), a === "form" ? Ve(() => {
6724
+ }), a === "form" ? Ae(() => {
6724
6725
  I(!0), A({
6725
6726
  defaultValues: ae
6726
6727
  }), C(!0);
@@ -6728,7 +6729,7 @@ const Ec = (e) => {
6728
6729
  defaultValues: ae
6729
6730
  }), C(!0));
6730
6731
  }, te = async () => {
6731
- a === "form" ? Ve(() => {
6732
+ a === "form" ? Ae(() => {
6732
6733
  S(!0);
6733
6734
  }) : S(!0);
6734
6735
  }, Fe = async () => {
@@ -6750,27 +6751,27 @@ const Ec = (e) => {
6750
6751
  const X = Q.filter((ae) => F.includes(ae.id));
6751
6752
  V(!0), D(!1), E(void 0);
6752
6753
  try {
6753
- const ae = X.map((he) => he.id), Ae = s.filter((he) => !(ae.includes(he.id) && he.id < 0)).map((he) => ae.includes(he.id) ? {
6754
+ const ae = X.map((he) => he.id), Ve = s.filter((he) => !(ae.includes(he.id) && he.id < 0)).map((he) => ae.includes(he.id) ? {
6754
6755
  ...he,
6755
6756
  operation: "pendingRemove"
6756
6757
  } : he);
6757
- be(Ae);
6758
+ be(Ve);
6758
6759
  } catch (ae) {
6759
6760
  E(ae);
6760
6761
  }
6761
6762
  c(0), V(!1);
6762
- }, ce = (X, ae, Ae) => {
6763
+ }, ce = (X, ae, Ve) => {
6763
6764
  let he;
6764
6765
  if (X)
6765
6766
  he = s.map((ye) => ye.id === X ? {
6766
6767
  id: X,
6767
6768
  operation: X > 0 ? "pendingUpdate" : "pendingCreate",
6768
6769
  values: {
6769
- ...Ae,
6770
+ ...Ve,
6770
6771
  id: X
6771
6772
  },
6772
6773
  treeValues: {
6773
- ...Ae,
6774
+ ...Ve,
6774
6775
  id: X
6775
6776
  }
6776
6777
  } : ye);
@@ -6780,11 +6781,11 @@ const Ec = (e) => {
6780
6781
  id: ye,
6781
6782
  operation: "pendingCreate",
6782
6783
  values: {
6783
- ...Ae,
6784
+ ...Ve,
6784
6785
  id: ye
6785
6786
  },
6786
6787
  treeValues: {
6787
- ...Ae,
6788
+ ...Ve,
6788
6789
  id: ye
6789
6790
  }
6790
6791
  });
@@ -6794,15 +6795,15 @@ const Ec = (e) => {
6794
6795
  const {
6795
6796
  id: ae
6796
6797
  } = X;
6797
- let Ae = s;
6798
+ let Ve = s;
6798
6799
  const he = s.find((ye) => ye.id === ae);
6799
- (he == null ? void 0 : he.values) === void 0 && (Ae = await Ie("form")), A(Ae.find((ye) => ye.id === ae)), I(!1), C(!0);
6800
+ (he == null ? void 0 : he.values) === void 0 && (Ve = await Ie("form")), A(Ve.find((ye) => ye.id === ae)), I(!1), C(!0);
6800
6801
  }, Te = async (X) => {
6801
6802
  V(!0);
6802
6803
  let ae = s;
6803
- const Ae = X.filter((he) => !s.find((ye) => ye.id === he));
6804
+ const Ve = X.filter((he) => !s.find((ye) => ye.id === he));
6804
6805
  try {
6805
- for (const he of Ae) {
6806
+ for (const he of Ve) {
6806
6807
  const ye = (await H.getHandler().readObjects({
6807
6808
  model: L,
6808
6809
  ids: [he],
@@ -6844,7 +6845,7 @@ const Ec = (e) => {
6844
6845
  }
6845
6846
  }
6846
6847
  const Xe = () => {
6847
- var ae, Ae, he, ye;
6848
+ var ae, Ve, he, ye;
6848
6849
  if (a === "form")
6849
6850
  return Q.length === 0 ? v("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(Ut, {
6850
6851
  formView: o.get("form"),
@@ -6854,7 +6855,7 @@ const Ec = (e) => {
6854
6855
  ...B
6855
6856
  },
6856
6857
  model: L,
6857
- id: (Ae = Q[u]) == null ? void 0 : Ae.id,
6858
+ id: (Ve = Q[u]) == null ? void 0 : Ve.id,
6858
6859
  submitMode: "values",
6859
6860
  onFieldsChange: (xe) => {
6860
6861
  var tt;
@@ -6872,7 +6873,7 @@ const Ec = (e) => {
6872
6873
  } : ut);
6873
6874
  be(et), D(!0);
6874
6875
  },
6875
- readOnly: U
6876
+ readOnly: W
6876
6877
  });
6877
6878
  let X = [];
6878
6879
  if (Q.some((xe) => xe.treeValues) && (X = R ? It({
@@ -6901,8 +6902,8 @@ const Ec = (e) => {
6901
6902
  ...p == null ? void 0 : p(),
6902
6903
  ...B
6903
6904
  },
6904
- colorsForResults: W,
6905
- readonly: U
6905
+ colorsForResults: U,
6906
+ readonly: W
6906
6907
  });
6907
6908
  if (a === "graph") {
6908
6909
  const xe = [[`${i.inv_field}`, "=", d]];
@@ -6930,7 +6931,7 @@ const Ec = (e) => {
6930
6931
  children: [/* @__PURE__ */ n(Rc, {
6931
6932
  mode: a,
6932
6933
  title: ue(),
6933
- readOnly: U,
6934
+ readOnly: W,
6934
6935
  isMany2Many: Z,
6935
6936
  formHasChanges: T,
6936
6937
  totalItems: Q.length,
@@ -6960,7 +6961,7 @@ const Ec = (e) => {
6960
6961
  onCancel: () => {
6961
6962
  I(!1), C(!1);
6962
6963
  },
6963
- readOnly: U,
6964
+ readOnly: W,
6964
6965
  mustClearAfterSave: Ke
6965
6966
  }), /* @__PURE__ */ n(To, {
6966
6967
  domain: N.current,
@@ -7685,9 +7686,9 @@ var Ao = { exports: {} };
7685
7686
  try {
7686
7687
  if (["x", "X"].indexOf(I) > -1)
7687
7688
  return new Date((I === "X" ? 1e3 : 1) * M);
7688
- var R = p(I)(M), j = R.year, q = R.month, W = R.day, z = R.hours, U = R.minutes, L = R.seconds, B = R.milliseconds, ee = R.zone, Z = new Date(), ie = W || (j || q ? 1 : Z.getDate()), Q = j || Z.getFullYear(), J = 0;
7689
+ var R = p(I)(M), j = R.year, q = R.month, U = R.day, z = R.hours, W = R.minutes, L = R.seconds, B = R.milliseconds, ee = R.zone, Z = new Date(), ie = U || (j || q ? 1 : Z.getDate()), Q = j || Z.getFullYear(), J = 0;
7689
7690
  j && !q || (J = q > 0 ? q - 1 : Z.getMonth());
7690
- var fe = z || 0, be = U || 0, $e = L || 0, Ie = B || 0;
7691
+ var fe = z || 0, be = W || 0, $e = L || 0, Ie = B || 0;
7691
7692
  return ee ? new Date(Date.UTC(Q, J, ie, fe, be, $e, Ie + 60 * ee.offset * 1e3)) : N ? new Date(Date.UTC(Q, J, ie, fe, be, $e, Ie)) : new Date(Q, J, ie, fe, be, $e, Ie);
7692
7693
  } catch {
7693
7694
  return new Date("");
@@ -8397,7 +8398,7 @@ function gd({
8397
8398
  y == null || y(!1);
8398
8399
  }
8399
8400
  }
8400
- async function W() {
8401
+ async function U() {
8401
8402
  try {
8402
8403
  g == null || g(!0);
8403
8404
  const L = await H.getHandler().duplicate({
@@ -8413,7 +8414,7 @@ function gd({
8413
8414
  }
8414
8415
  }
8415
8416
  const z = a || p || T || h;
8416
- function U(L) {
8417
+ function W(L) {
8417
8418
  $ == null || $({
8418
8419
  actionData: L,
8419
8420
  values: b.current.getValues(),
@@ -8441,7 +8442,7 @@ function gd({
8441
8442
  tooltip: C("duplicate"),
8442
8443
  disabled: s || a || l === void 0 || h || T,
8443
8444
  loading: h,
8444
- onClick: W
8445
+ onClick: U
8445
8446
  }), /* @__PURE__ */ n(qe, {
8446
8447
  icon: /* @__PURE__ */ n(Yn, {}),
8447
8448
  tooltip: C("delete"),
@@ -8501,7 +8502,7 @@ function gd({
8501
8502
  onItemClick: async (L) => {
8502
8503
  !L || !(await Ft({
8503
8504
  onFormSave: o
8504
- })).succeed || U(L);
8505
+ })).succeed || W(L);
8505
8506
  }
8506
8507
  }), /* @__PURE__ */ n(Dt, {
8507
8508
  icon: /* @__PURE__ */ n(Kn, {}),
@@ -8514,7 +8515,7 @@ function gd({
8514
8515
  const B = await Ft({
8515
8516
  onFormSave: o
8516
8517
  });
8517
- !B.succeed || U({
8518
+ !B.succeed || W({
8518
8519
  ...L,
8519
8520
  datas: {
8520
8521
  ...L.datas || {},
@@ -9221,12 +9222,12 @@ function Dd(e) {
9221
9222
  });
9222
9223
  }
9223
9224
  async function j() {
9224
- var U;
9225
+ var W;
9225
9226
  try {
9226
9227
  s == null || s(!0), await H.getHandler().delete({
9227
9228
  model: c,
9228
9229
  ids: o.map((L) => L.id)
9229
- }), d == null || d(void 0), m == null || m(void 0), (U = f == null ? void 0 : f.current) == null || U.refreshResults();
9230
+ }), d == null || d(void 0), m == null || m(void 0), (W = f == null ? void 0 : f.current) == null || W.refreshResults();
9230
9231
  } catch (L) {
9231
9232
  Ue(L);
9232
9233
  } finally {
@@ -9234,7 +9235,7 @@ function Dd(e) {
9234
9235
  }
9235
9236
  }
9236
9237
  async function q() {
9237
- var U;
9238
+ var W;
9238
9239
  try {
9239
9240
  u == null || u(!0);
9240
9241
  const L = o[0].id;
@@ -9244,16 +9245,16 @@ function Dd(e) {
9244
9245
  context: {
9245
9246
  ...x
9246
9247
  }
9247
- }) && ((U = f == null ? void 0 : f.current) == null || U.refreshResults());
9248
+ }) && ((W = f == null ? void 0 : f.current) == null || W.refreshResults());
9248
9249
  } catch (L) {
9249
9250
  Ue(L);
9250
9251
  } finally {
9251
9252
  u == null || u(!1);
9252
9253
  }
9253
9254
  }
9254
- function W(U) {
9255
+ function U(W) {
9255
9256
  k == null || k({
9256
- actionData: U,
9257
+ actionData: W,
9257
9258
  values: {
9258
9259
  active_id: o == null ? void 0 : o.map((L) => L.id)[0],
9259
9260
  active_ids: o == null ? void 0 : o.map((L) => L.id)
@@ -9278,8 +9279,8 @@ function Dd(e) {
9278
9279
  children: [/* @__PURE__ */ n(_d, {
9279
9280
  disabled: l || a || T,
9280
9281
  searchText: v,
9281
- onSearch: (U) => {
9282
- U && U.trim().length > 0 ? g == null || g(U) : g == null || g(void 0);
9282
+ onSearch: (W) => {
9283
+ W && W.trim().length > 0 ? g == null || g(W) : g == null || g(void 0);
9283
9284
  }
9284
9285
  }), !C && /* @__PURE__ */ n(Eo, {
9285
9286
  icon: /* @__PURE__ */ n(qr, {
@@ -9323,15 +9324,15 @@ function Dd(e) {
9323
9324
  disabled: l || a || T,
9324
9325
  loading: !1,
9325
9326
  onClick: () => {
9326
- var U;
9327
- (U = f == null ? void 0 : f.current) == null || U.refreshResults();
9327
+ var W;
9328
+ (W = f == null ? void 0 : f.current) == null || W.refreshResults();
9328
9329
  }
9329
9330
  }), !C && /* @__PURE__ */ P(ne, {
9330
9331
  children: [vt(), /* @__PURE__ */ n(Zn, {
9331
9332
  currentView: r,
9332
9333
  availableViews: t,
9333
- onChangeView: (U) => {
9334
- D == null || D(r), i == null || i(U);
9334
+ onChangeView: (W) => {
9335
+ D == null || D(r), i == null || i(W);
9335
9336
  },
9336
9337
  previousView: b,
9337
9338
  disabled: T
@@ -9341,19 +9342,19 @@ function Dd(e) {
9341
9342
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
9342
9343
  tooltip: $("actions"),
9343
9344
  items: w == null ? void 0 : w.action,
9344
- onItemClick: (U) => {
9345
- !U || W(U);
9345
+ onItemClick: (W) => {
9346
+ !W || U(W);
9346
9347
  }
9347
9348
  }), /* @__PURE__ */ n(Dt, {
9348
9349
  icon: /* @__PURE__ */ n(Kn, {}),
9349
9350
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || T,
9350
9351
  tooltip: $("reports"),
9351
9352
  items: w == null ? void 0 : w.print,
9352
- onItemClick: (U) => {
9353
- !U || W({
9354
- ...U,
9353
+ onItemClick: (W) => {
9354
+ !W || U({
9355
+ ...W,
9355
9356
  datas: {
9356
- ...U.datas || {},
9357
+ ...W.datas || {},
9357
9358
  ids: o.map((L) => L.id)
9358
9359
  }
9359
9360
  });
@@ -9396,10 +9397,10 @@ function Dd(e) {
9396
9397
  id: "export",
9397
9398
  name: $("advancedExport")
9398
9399
  }],
9399
- onItemClick: (U) => {
9400
- if (U.id === "print_screen") {
9400
+ onItemClick: (W) => {
9401
+ if (W.id === "print_screen") {
9401
9402
  let L = (o == null ? void 0 : o.map((B) => B.id)) || [];
9402
- L.length === 0 && (L = (V == null ? void 0 : V.map((B) => B.id)) || []), W({
9403
+ L.length === 0 && (L = (V == null ? void 0 : V.map((B) => B.id)) || []), U({
9403
9404
  id: -1,
9404
9405
  model: c,
9405
9406
  report_name: "printscreen.list",
@@ -9601,7 +9602,7 @@ function $d(e, t) {
9601
9602
  action_type: p,
9602
9603
  treeExpandable: h = !1,
9603
9604
  limit: g
9604
- } = e, [v, T] = O(), [D, b] = O([]), [V, _] = O(!0), E = m || void 0, [x, C] = O(E), [w, S] = O([]), [$, A] = O(), [F, k] = O([]), [M, I] = O(), [N, R] = O(0), [j, q] = O(!1), [W, z] = O(!1), [U, L] = O(), {
9605
+ } = e, [v, T] = O(), [D, b] = O([]), [V, _] = O(!0), E = m || void 0, [x, C] = O(E), [w, S] = O([]), [$, A] = O(), [F, k] = O([]), [M, I] = O(), [N, R] = O(0), [j, q] = O(!1), [U, z] = O(!1), [W, L] = O(), {
9605
9606
  t: B
9606
9607
  } = Y(we), ee = de(), Z = de(), ie = Y(st), {
9607
9608
  setCurrentView: Q,
@@ -9713,7 +9714,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9713
9714
  async function De() {
9714
9715
  be === u && (v.type === "form" && !await ee.current.cancelUnsavedChanges() || q(!0));
9715
9716
  }
9716
- async function Ve(te) {
9717
+ async function Ae(te) {
9717
9718
  var me;
9718
9719
  z(!0);
9719
9720
  const Fe = F.findIndex((Te) => Te.id === te);
@@ -9779,7 +9780,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9779
9780
  formView: D.find((Fe) => Fe.type === "form"),
9780
9781
  treeView: te,
9781
9782
  searchTreeRef: Z,
9782
- searchTreeNameSearch: U,
9783
+ searchTreeNameSearch: W,
9783
9784
  availableViews: D,
9784
9785
  results: F,
9785
9786
  setCurrentItemIndex: A,
@@ -9834,13 +9835,13 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9834
9835
  selectedRowItems: w,
9835
9836
  setSelectedRowItems: S,
9836
9837
  setSearchTreeNameSearch: L,
9837
- searchTreeNameSearch: U,
9838
- goToResourceId: Ve,
9838
+ searchTreeNameSearch: W,
9839
+ goToResourceId: Ae,
9839
9840
  limit: g,
9840
9841
  children: [je(), /* @__PURE__ */ n(bd, {
9841
9842
  visible: j,
9842
- onIdSubmitted: Ve,
9843
- isSearching: W,
9843
+ onIdSubmitted: Ae,
9844
+ isSearching: U,
9844
9845
  onCancel: () => {
9845
9846
  q(!1);
9846
9847
  }
@@ -10010,10 +10011,10 @@ function Yd(e) {
10010
10011
  domain: s = [],
10011
10012
  visible: a = !0,
10012
10013
  parentContext: l = {}
10013
- } = e, [u, c] = O(!1), [f, d] = O(!1), [m, y] = O(), [p, h] = O(), [g, v] = O(), [T, D] = O(1), [b, V] = O(0), _ = de(Kd), E = de([]), [x, C] = O(0), [w, S] = O([]), [$, A] = O(void 0), [F, k] = O(), [M, I] = O(), [N, R] = O(), [j, q] = O(!1), W = de([]), z = (J) => {
10014
+ } = e, [u, c] = O(!1), [f, d] = O(!1), [m, y] = O(), [p, h] = O(), [g, v] = O(), [T, D] = O(1), [b, V] = O(0), _ = de(Kd), E = de([]), [x, C] = O(0), [w, S] = O([]), [$, A] = O(void 0), [F, k] = O(), [M, I] = O(), [N, R] = O(), [j, q] = O(!1), U = de([]), z = (J) => {
10014
10015
  q(!0), D(J), V((J - 1) * _.current);
10015
- }, U = async () => {
10016
- const J = W.current.length > 0 ? W.current : s, fe = hn(E.current, J), {
10016
+ }, W = async () => {
10017
+ const J = U.current.length > 0 ? U.current : s, fe = hn(E.current, J), {
10017
10018
  colors: be
10018
10019
  } = _t(p), {
10019
10020
  totalItems: $e,
@@ -10044,7 +10045,7 @@ function Yd(e) {
10044
10045
  C(se);
10045
10046
  }, L = async () => {
10046
10047
  try {
10047
- q(!0), await U();
10048
+ q(!0), await W();
10048
10049
  } catch (J) {
10049
10050
  I(JSON.stringify(J));
10050
10051
  }
@@ -10066,7 +10067,7 @@ function Yd(e) {
10066
10067
  action: t,
10067
10068
  context: l
10068
10069
  });
10069
- W.current = J.domain, v(J.views.get("form")), h(J.views.get("tree")), y(J.model), _.current = J.limit;
10070
+ U.current = J.domain, v(J.views.get("form")), h(J.views.get("tree")), y(J.model), _.current = J.limit;
10070
10071
  }, Z = async () => {
10071
10072
  y(r);
10072
10073
  const J = await H.getHandler().getView({
@@ -10333,14 +10334,14 @@ function Ud(e, t) {
10333
10334
  model: R,
10334
10335
  context: j,
10335
10336
  domain: q,
10336
- initialView: W,
10337
+ initialView: U,
10337
10338
  limit: z
10338
10339
  } = w;
10339
- let U = {};
10340
+ let W = {};
10340
10341
  try {
10341
- U = JSON.parse($.replace(/'/g, '"'));
10342
+ W = JSON.parse($.replace(/'/g, '"'));
10342
10343
  } catch {
10343
- U = {
10344
+ W = {
10344
10345
  x: C * 2,
10345
10346
  y: 0,
10346
10347
  w: 2,
@@ -10348,7 +10349,7 @@ function Ud(e, t) {
10348
10349
  };
10349
10350
  }
10350
10351
  let L = null;
10351
- if ((W == null ? void 0 : W.type) === "graph")
10352
+ if ((U == null ? void 0 : U.type) === "graph")
10352
10353
  L = /* @__PURE__ */ n(gn, {
10353
10354
  view_id: N.filter((Z) => Z[1] === "graph")[0][0],
10354
10355
  model: R,
@@ -10356,12 +10357,12 @@ function Ud(e, t) {
10356
10357
  domain: q,
10357
10358
  limit: z
10358
10359
  });
10359
- else if ((W == null ? void 0 : W.type) === "form")
10360
+ else if ((U == null ? void 0 : U.type) === "form")
10360
10361
  L = /* @__PURE__ */ n(Wd, {
10361
10362
  model: R,
10362
10363
  actionDomain: q
10363
10364
  });
10364
- else if ((W == null ? void 0 : W.type) === "tree")
10365
+ else if ((U == null ? void 0 : U.type) === "tree")
10365
10366
  L = /* @__PURE__ */ n(Yd, {
10366
10367
  model: R,
10367
10368
  domain: q,
@@ -10390,11 +10391,11 @@ function Ud(e, t) {
10390
10391
  }
10391
10392
  }
10392
10393
  });
10393
- else if (W !== void 0) {
10394
- const Z = W && Array.isArray(W.id) ? {
10395
- ...W,
10396
- id: W.id[0]
10397
- } : W;
10394
+ else if (U !== void 0) {
10395
+ const Z = U && Array.isArray(U.id) ? {
10396
+ ...U,
10397
+ id: U.id[0]
10398
+ } : U;
10398
10399
  L = /* @__PURE__ */ n($o, {
10399
10400
  action_id: F,
10400
10401
  action_type: k,
@@ -10435,7 +10436,7 @@ function Ud(e, t) {
10435
10436
  return /* @__PURE__ */ n(jd, {
10436
10437
  id: A,
10437
10438
  title: I,
10438
- parms: U,
10439
+ parms: W,
10439
10440
  action: B,
10440
10441
  openAction: y,
10441
10442
  children: L
@@ -10794,7 +10795,7 @@ function lu(e, t) {
10794
10795
  target: R,
10795
10796
  view_type: j,
10796
10797
  limit: q
10797
- } = w, W = j === "tree", z = [];
10798
+ } = w, U = j === "tree", z = [];
10798
10799
  for (const L of I) {
10799
10800
  const [B, ee] = L;
10800
10801
  if (B)
@@ -10816,16 +10817,16 @@ function lu(e, t) {
10816
10817
  z.push([Z, ee]);
10817
10818
  }
10818
10819
  }
10819
- let U;
10820
+ let W;
10820
10821
  if (E) {
10821
10822
  const [L, B] = z.find(([ee, Z]) => Z === E);
10822
- U = {
10823
+ W = {
10823
10824
  id: L,
10824
10825
  type: B
10825
10826
  };
10826
10827
  } else {
10827
10828
  const [L, B] = z[0];
10828
- U = {
10829
+ W = {
10829
10830
  id: L,
10830
10831
  type: B
10831
10832
  };
@@ -10840,13 +10841,13 @@ function lu(e, t) {
10840
10841
  views: z,
10841
10842
  title: N,
10842
10843
  target: R,
10843
- initialView: U,
10844
+ initialView: W,
10844
10845
  action_type: S,
10845
10846
  action_id: A,
10846
10847
  values: V,
10847
10848
  forced_values: _,
10848
10849
  res_id: x,
10849
- treeExpandable: W,
10850
+ treeExpandable: U,
10850
10851
  limit: q
10851
10852
  });
10852
10853
  }
@@ -10949,10 +10950,10 @@ function lu(e, t) {
10949
10950
  view_type: I,
10950
10951
  limit: N
10951
10952
  } = w, R = I === "tree", j = [];
10952
- for (const U of F) {
10953
- const [L, B] = U;
10953
+ for (const W of F) {
10954
+ const [L, B] = W;
10954
10955
  if (L)
10955
- j.push(U);
10956
+ j.push(W);
10956
10957
  else if (B === "dashboard")
10957
10958
  j.push([void 0, "dashboard"]);
10958
10959
  else {
@@ -10970,15 +10971,15 @@ function lu(e, t) {
10970
10971
  j.push([ee, B]);
10971
10972
  }
10972
10973
  }
10973
- let q, W;
10974
+ let q, U;
10974
10975
  if (x == null) {
10975
- const U = j.find((L) => L[0] === void 0);
10976
- q = void 0, W = U[1];
10976
+ const W = j.find((L) => L[0] === void 0);
10977
+ q = void 0, U = W[1];
10977
10978
  } else
10978
- [q, W] = j.find((U) => U[0] === void 0 ? !1 : U[0] === x);
10979
+ [q, U] = j.find((W) => W[0] === void 0 ? !1 : W[0] === x);
10979
10980
  const z = {
10980
10981
  id: q,
10981
- type: W
10982
+ type: U
10982
10983
  };
10983
10984
  D({
10984
10985
  domain: $,
@@ -11273,7 +11274,7 @@ const {
11273
11274
  async function S() {
11274
11275
  if (!V)
11275
11276
  return;
11276
- const M = D.find((W) => W.key === b), {
11277
+ const M = D.find((U) => U.key === b), {
11277
11278
  id: I,
11278
11279
  type: N
11279
11280
  } = (M == null ? void 0 : M.action) || {};