@gisce/react-ooui 2.74.0 → 2.74.1

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.
@@ -3822,7 +3822,7 @@ function Zu({
3822
3822
  }), X = Q(
3823
3823
  () => C !== void 0 && C.trim().length > 0,
3824
3824
  [C]
3825
- ), we = Q(() => en(r || [], g || []), [r, g]), B = O(async () => {
3825
+ ), Se = Q(() => en(r || [], g || []), [r, g]), B = O(async () => {
3826
3826
  var Y;
3827
3827
  try {
3828
3828
  u == null || u(!0);
@@ -4067,7 +4067,7 @@ function Zu({
4067
4067
  visible: $,
4068
4068
  onClose: () => L(!1),
4069
4069
  model: p,
4070
- domain: we,
4070
+ domain: Se,
4071
4071
  limit: A,
4072
4072
  totalRegisters: k || 0,
4073
4073
  selectedRegistersToExport: l,
@@ -7074,10 +7074,10 @@ const Gr = ({
7074
7074
  return;
7075
7075
  const D = v.current.filter((j) => {
7076
7076
  const ne = L.find(
7077
- (we) => (we == null ? void 0 : we.id) === (j == null ? void 0 : j.id)
7077
+ (Se) => (Se == null ? void 0 : Se.id) === (j == null ? void 0 : j.id)
7078
7078
  );
7079
7079
  return ne ? u.current.some(
7080
- (we) => j[we] !== ne[we]
7080
+ (Se) => j[Se] !== ne[Se]
7081
7081
  ) : !1;
7082
7082
  }).filter(Boolean);
7083
7083
  D.length > 0 && (D.forEach((j) => g.current.delete(j.id)), P(D), (G = n == null ? void 0 : n.current) == null || G.updateRows(D));
@@ -7227,7 +7227,7 @@ function xh(e, t) {
7227
7227
  searchValues: j,
7228
7228
  searchParams: ne,
7229
7229
  setSearchValues: X,
7230
- searchTreeNameSearch: we,
7230
+ searchTreeNameSearch: Se,
7231
7231
  setSearchTreeNameSearch: B,
7232
7232
  setResults: U,
7233
7233
  results: me,
@@ -7236,7 +7236,7 @@ function xh(e, t) {
7236
7236
  isActive: Z,
7237
7237
  order: re,
7238
7238
  setOrder: Y
7239
- } = el({ useLocalState: !c }), K = u || we, be = z(K), ke = z(!1), Ye = Jt(
7239
+ } = el({ useLocalState: !c }), K = u || Se, be = z(K), ke = z(!1), Ye = Jt(
7240
7240
  $t.FEATURE_MANY2ONE_SORT
7241
7241
  );
7242
7242
  le(() => {
@@ -7245,11 +7245,11 @@ function xh(e, t) {
7245
7245
  var ue;
7246
7246
  (K !== void 0 && be.current === void 0 || typeof K == "string" && typeof be.current == "string" && K !== be.current || K === void 0 && be.current !== void 0) && (ke.current = !!K, G == null || G([]), X == null || X({}), (ue = m.current) == null || ue.unselectAll()), be.current = K;
7247
7247
  }, [K]);
7248
- const Ce = Q(() => {
7248
+ const xe = Q(() => {
7249
7249
  if (S)
7250
7250
  return Kt(S);
7251
7251
  }, [S]), {
7252
- colorsForResults: xe,
7252
+ colorsForResults: Te,
7253
7253
  statusForResults: fe,
7254
7254
  updateAttributes: De,
7255
7255
  clearAttributes: Ie
@@ -7258,16 +7258,16 @@ function xh(e, t) {
7258
7258
  }), { clear: He } = nl({
7259
7259
  model: n,
7260
7260
  tableRef: m,
7261
- autorefreshableFields: Ce == null ? void 0 : Ce.autorefreshableFields,
7261
+ autorefreshableFields: xe == null ? void 0 : xe.autorefreshableFields,
7262
7262
  treeView: S,
7263
7263
  context: d,
7264
7264
  isActive: Z,
7265
- treeOoui: Ce,
7265
+ treeOoui: xe,
7266
7266
  updateAttributes: De,
7267
7267
  results: me
7268
7268
  }), {
7269
7269
  isFieldLoading: Be,
7270
- refresh: Te,
7270
+ refresh: we,
7271
7271
  addRecordsToCheckFunctionFields: ce,
7272
7272
  onHasFunctionFieldsToParseConditions: je
7273
7273
  } = rl({
@@ -7276,20 +7276,20 @@ function xh(e, t) {
7276
7276
  tableRef: m,
7277
7277
  context: d,
7278
7278
  isActive: Z,
7279
- treeOoui: Ce,
7279
+ treeOoui: xe,
7280
7280
  updateAttributes: De,
7281
7281
  results: me
7282
7282
  }), Oe = Fn(() => {
7283
- if (Ce)
7283
+ if (xe)
7284
7284
  return Lr(
7285
- Ce,
7285
+ xe,
7286
7286
  {
7287
7287
  ...Ur
7288
7288
  },
7289
7289
  d,
7290
7290
  Ye
7291
7291
  );
7292
- }, [Ce, d, Ye]), Ne = Q(() => {
7292
+ }, [xe, d, Ye]), Ne = Q(() => {
7293
7293
  if (Oe)
7294
7294
  return Oe.map((ue) => ({
7295
7295
  ...ue,
@@ -7352,7 +7352,7 @@ function xh(e, t) {
7352
7352
  endRow: _e,
7353
7353
  state: rt
7354
7354
  }) => {
7355
- if (!Ce)
7355
+ if (!xe)
7356
7356
  return [];
7357
7357
  let lt;
7358
7358
  if (!g.current && re) {
@@ -7372,7 +7372,7 @@ function xh(e, t) {
7372
7372
  }
7373
7373
  g.current = !0;
7374
7374
  const Nt = K ? i : Ge, cr = (S == null ? void 0 : S.fields_in_conditions) !== void 0, Kr = Gr({
7375
- treeOoui: Ce,
7375
+ treeOoui: xe,
7376
7376
  hasFunctionFieldsToParseConditions: cr && je()
7377
7377
  }), { results: q, attrsEvaluated: J } = await M.getHandler().searchForTree({
7378
7378
  params: Nt,
@@ -7403,8 +7403,8 @@ function xh(e, t) {
7403
7403
  }
7404
7404
  if (Ut.current = lt, K ? (x(q.length), oe(q.length), T(!0), _(!1)) : T(!1), q.length === 0)
7405
7405
  return y.current = [], x(0), oe(0), [];
7406
- const pe = mn(Ce, q);
7407
- return De(J, Ce), y.current = [...pe], pe;
7406
+ const pe = mn(xe, q);
7407
+ return De(J, xe), y.current = [...pe], pe;
7408
7408
  },
7409
7409
  [
7410
7410
  me,
@@ -7419,7 +7419,7 @@ function xh(e, t) {
7419
7419
  Y,
7420
7420
  ee,
7421
7421
  oe,
7422
- Ce,
7422
+ xe,
7423
7423
  S,
7424
7424
  ce,
7425
7425
  je,
@@ -7458,10 +7458,10 @@ function xh(e, t) {
7458
7458
  [te, oe, E, v]
7459
7459
  ), Ve = O((ue) => {
7460
7460
  var _e, rt, lt, Nt;
7461
- if (xe.current[(rt = (_e = ue.node) == null ? void 0 : _e.data) == null ? void 0 : rt.id])
7462
- return { color: xe.current[(Nt = (lt = ue.node) == null ? void 0 : lt.data) == null ? void 0 : Nt.id] };
7461
+ if (Te.current[(rt = (_e = ue.node) == null ? void 0 : _e.data) == null ? void 0 : rt.id])
7462
+ return { color: Te.current[(Nt = (lt = ue.node) == null ? void 0 : lt.data) == null ? void 0 : Nt.id] };
7463
7463
  }, []), ye = Q(() => (W == null ? void 0 : W.map((ue) => ue.id)) || [], [W]), [Ke, ot, Tt] = Ko({
7464
- ooui: Ce,
7464
+ ooui: xe,
7465
7465
  model: n,
7466
7466
  showEmptyValues: !0,
7467
7467
  domain: (ye == null ? void 0 : ye.length) > 0 ? (
@@ -7520,7 +7520,7 @@ function xh(e, t) {
7520
7520
  }),
7521
7521
  [b]
7522
7522
  ), kt = Q(() => {
7523
- if (!Oe || !Ce)
7523
+ if (!Oe || !xe)
7524
7524
  return null;
7525
7525
  const ue = ke.current ? gt : void 0;
7526
7526
  return /* @__PURE__ */ s(
@@ -7542,7 +7542,7 @@ function xh(e, t) {
7542
7542
  onSelectionCheckboxClicked: Ue,
7543
7543
  totalRows: C || 99999,
7544
7544
  footer: Pt,
7545
- hasStatusColumn: Ce.status !== null,
7545
+ hasStatusColumn: xe.status !== null,
7546
7546
  statusComponent: Ot,
7547
7547
  onRowStatus: sn,
7548
7548
  strings: hn,
@@ -7570,7 +7570,7 @@ function xh(e, t) {
7570
7570
  Ot,
7571
7571
  hn,
7572
7572
  C,
7573
- Ce,
7573
+ xe,
7574
7574
  Ze,
7575
7575
  h
7576
7576
  ]), gn = z(ne), jt = z(H), Qt = z(), Ut = z();
@@ -7583,13 +7583,13 @@ function xh(e, t) {
7583
7583
  }, [ne, H]);
7584
7584
  const Wt = O(async () => {
7585
7585
  var ue;
7586
- he([]), Ie(), He(), Qt.current = void 0, T(!1), await at(), (ue = m == null ? void 0 : m.current) == null || ue.refresh(), Te();
7586
+ he([]), Ie(), He(), Qt.current = void 0, T(!1), await at(), (ue = m == null ? void 0 : m.current) == null || ue.refresh(), we();
7587
7587
  }, [
7588
7588
  he,
7589
7589
  Ie,
7590
7590
  He,
7591
7591
  at,
7592
- Te
7592
+ we
7593
7593
  ]);
7594
7594
  Dt(t, () => ({
7595
7595
  refreshResults: Wt,
@@ -7660,7 +7660,7 @@ function xh(e, t) {
7660
7660
  S == null ? void 0 : S.search_fields,
7661
7661
  j
7662
7662
  ]
7663
- ), Se = O(
7663
+ ), Ce = O(
7664
7664
  () => V == null ? void 0 : V(!1),
7665
7665
  [V]
7666
7666
  ), Me = O(
@@ -7689,7 +7689,7 @@ function xh(e, t) {
7689
7689
  Za,
7690
7690
  {
7691
7691
  ...Un,
7692
- onClose: Se,
7692
+ onClose: Ce,
7693
7693
  onSubmit: Me
7694
7694
  }
7695
7695
  ),
@@ -7867,7 +7867,7 @@ const sl = _t(xh), si = (e, t = "14px -apple-system") => {
7867
7867
  ne,
7868
7868
  o,
7869
7869
  a.isExpandable
7870
- ]), we = Q(() => {
7870
+ ]), Se = Q(() => {
7871
7871
  if (!F)
7872
7872
  return null;
7873
7873
  const ee = F.columns.filter((re) => re.sum !== void 0).map((re) => ({ label: re.sum, field: re.id }));
@@ -7915,7 +7915,7 @@ const sl = _t(xh), si = (e, t = "14px -apple-system") => {
7915
7915
  } : void 0
7916
7916
  }
7917
7917
  ),
7918
- we
7918
+ Se
7919
7919
  ] });
7920
7920
  }
7921
7921
  ), lr = nt(il);
@@ -7947,7 +7947,7 @@ const al = (e) => {
7947
7947
  searchParams: R = [],
7948
7948
  setSearchValues: T,
7949
7949
  clearSelection: b
7950
- } = e, [A, k] = I(!1), [S, F] = I(!1), [P, E] = I(), [H, V] = I(1), [$, L] = I(0), [D, W] = I(), [G, j] = I([]), [ne, X] = I(void 0), [we, B] = I(void 0), U = z(C || gt), me = z([]), ee = O(
7950
+ } = e, [A, k] = I(!1), [S, F] = I(!1), [P, E] = I(), [H, V] = I(1), [$, L] = I(0), [D, W] = I(), [G, j] = I([]), [ne, X] = I(void 0), [Se, B] = I(void 0), U = z(C || gt), me = z([]), ee = O(
7951
7951
  (fe) => {
7952
7952
  g == null || g([...fe]), j([...fe]);
7953
7953
  },
@@ -7963,15 +7963,15 @@ const al = (e) => {
7963
7963
  if (W(fe.length), f == null || f(fe.length), fe.length > 0) {
7964
7964
  const De = fe.map((Ne) => Ne == null ? void 0 : Ne[0]), { colors: Ie, status: He } = Kt(u), Be = {};
7965
7965
  Ie && (Be.colors = Ie), He && (Be.status = He);
7966
- const Te = await M.getHandler().readEvalUiObjects({
7966
+ const we = await M.getHandler().readEvalUiObjects({
7967
7967
  model: t,
7968
7968
  ids: De,
7969
7969
  arch: u == null ? void 0 : u.arch,
7970
7970
  fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
7971
7971
  context: d,
7972
7972
  attrs: Be
7973
- }), ce = Te[0];
7974
- me.current = [...ce], X(_n(Te[1])), B(hr(Te[1]));
7973
+ }), ce = we[0];
7974
+ me.current = [...ce], X(_n(we[1])), B(hr(we[1]));
7975
7975
  const je = ce.map((Ne) => Ne.id), Oe = h !== void 0 ? xn({
7976
7976
  resultsToSort: ce,
7977
7977
  sorter: h,
@@ -7995,8 +7995,8 @@ const al = (e) => {
7995
7995
  f
7996
7996
  ]), re = O(
7997
7997
  async (fe) => {
7998
- const { params: De, newOffset: Ie } = fe || {}, He = en(De || R, w), { colors: Be, status: Te } = Kt(u), ce = {};
7999
- Be && (ce.colors = Be), Te && (ce.status = Te);
7998
+ const { params: De, newOffset: Ie } = fe || {}, He = en(De || R, w), { colors: Be, status: we } = Kt(u), ce = {};
7999
+ Be && (ce.colors = Be), we && (ce.status = we);
8000
8000
  const { totalItems: je, results: Oe, attrsEvaluated: Ne } = await M.getHandler().searchForTree({
8001
8001
  params: He,
8002
8002
  limit: U.current,
@@ -8109,7 +8109,7 @@ const al = (e) => {
8109
8109
  T,
8110
8110
  x,
8111
8111
  C
8112
- ]), Ce = O(
8112
+ ]), xe = O(
8113
8113
  async (fe) => {
8114
8114
  const De = fe[(u == null ? void 0 : u.field_parent) || "child_id"], Ie = await M.getHandler().readObjects({
8115
8115
  model: t,
@@ -8120,7 +8120,7 @@ const al = (e) => {
8120
8120
  return ee([...oe(), ...Ie]), mn(Kt(u), Ie);
8121
8121
  },
8122
8122
  [u, t, d, oe, ee]
8123
- ), xe = O(async () => await M.getHandler().searchAllIds({
8123
+ ), Te = O(async () => await M.getHandler().searchAllIds({
8124
8124
  params: en(R, w),
8125
8125
  model: t,
8126
8126
  context: d,
@@ -8139,11 +8139,11 @@ const al = (e) => {
8139
8139
  getResults: oe,
8140
8140
  requestPageChange: ke,
8141
8141
  changeSort: K,
8142
- fetchChildrenForRecord: Ce,
8142
+ fetchChildrenForRecord: xe,
8143
8143
  colorsForResults: ne,
8144
- statusForResults: we,
8144
+ statusForResults: Se,
8145
8145
  totalItems: D,
8146
- getAllIds: xe
8146
+ getAllIds: Te
8147
8147
  };
8148
8148
  };
8149
8149
  function Ah(e, t) {
@@ -8172,7 +8172,7 @@ function Ah(e, t) {
8172
8172
  selectedRowItems: j = void 0,
8173
8173
  setSelectedRowItems: ne = void 0,
8174
8174
  searchParams: X = [],
8175
- setSearchParams: we = void 0,
8175
+ setSearchParams: Se = void 0,
8176
8176
  searchVisible: B = !0,
8177
8177
  setSearchVisible: U = void 0,
8178
8178
  sorter: me = void 0,
@@ -8190,14 +8190,14 @@ function Ah(e, t) {
8190
8190
  },
8191
8191
  [p, ne]
8192
8192
  ), {
8193
- submit: Ce,
8194
- clear: xe,
8193
+ submit: xe,
8194
+ clear: Te,
8195
8195
  fetchResults: fe,
8196
8196
  tableRefreshing: De,
8197
8197
  searchFilterLoading: Ie,
8198
8198
  searchError: He,
8199
8199
  page: Be,
8200
- limit: Te,
8200
+ limit: we,
8201
8201
  offset: ce,
8202
8202
  getResults: je,
8203
8203
  requestPageChange: Oe,
@@ -8211,7 +8211,7 @@ function Ah(e, t) {
8211
8211
  model: _,
8212
8212
  setSearchTreeNameSearch: Z,
8213
8213
  setSelectedRowItems: Ye,
8214
- setSearchParams: we,
8214
+ setSearchParams: Se,
8215
8215
  setSearchValues: K,
8216
8216
  searchParams: X,
8217
8217
  setSearchVisible: U,
@@ -8327,11 +8327,11 @@ function Ah(e, t) {
8327
8327
  T.search_fields,
8328
8328
  x.search_fields
8329
8329
  ]),
8330
- onClear: xe,
8330
+ onClear: Te,
8331
8331
  limit: be,
8332
8332
  offset: ce,
8333
8333
  isSearching: Ie,
8334
- onSubmit: Ce,
8334
+ onSubmit: xe,
8335
8335
  onLimitChange: te,
8336
8336
  setSearchFilterHeight: F,
8337
8337
  searchError: He,
@@ -8345,7 +8345,7 @@ function Ah(e, t) {
8345
8345
  ref: w,
8346
8346
  context: u,
8347
8347
  total: Ze,
8348
- limit: Te,
8348
+ limit: we,
8349
8349
  page: Be,
8350
8350
  treeView: x,
8351
8351
  results: je(),
@@ -8369,13 +8369,13 @@ function Ah(e, t) {
8369
8369
  Ve,
8370
8370
  Ye,
8371
8371
  Ne,
8372
- xe,
8372
+ Te,
8373
8373
  Ae,
8374
8374
  ve,
8375
8375
  T,
8376
8376
  je,
8377
8377
  be,
8378
- Te,
8378
+ we,
8379
8379
  ce,
8380
8380
  Re,
8381
8381
  te,
@@ -8391,7 +8391,7 @@ function Ah(e, t) {
8391
8391
  ye,
8392
8392
  me,
8393
8393
  de,
8394
- Ce,
8394
+ xe,
8395
8395
  De,
8396
8396
  Ze,
8397
8397
  l,
@@ -8440,7 +8440,7 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8440
8440
  setOrder: W,
8441
8441
  limit: G,
8442
8442
  setLimit: j
8443
- } = el({ useLocalState: !a }), { treeMaxLimit: ne } = on(), X = Math.min(G, ne), [we, B] = I(!0), [U, me] = I(), [ee, oe] = I([]), [Z, re] = I(!1), Y = i || k, K = z(Y), be = z(b), ke = z(m), Ye = z(), Ce = z([]), xe = z(!1), fe = Q(() => Ta({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), {
8443
+ } = el({ useLocalState: !a }), { treeMaxLimit: ne } = on(), X = Math.min(G, ne), [Se, B] = I(!0), [U, me] = I(), [ee, oe] = I([]), [Z, re] = I(!1), Y = i || k, K = z(Y), be = z(b), ke = z(m), Ye = z(), xe = z([]), Te = z(!1), fe = Q(() => Ta({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), {
8444
8444
  fetchColumnState: De,
8445
8445
  loading: Ie,
8446
8446
  getColumnState: He,
@@ -8448,12 +8448,12 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8448
8448
  } = Go({
8449
8449
  key: fe,
8450
8450
  treeViewFetching: t
8451
- }), Te = O((Se) => {
8452
- Ce.current = Ce.current.map((Me) => {
8453
- const et = Se.find((ue) => ue.id === Me.id);
8451
+ }), we = O((Ce) => {
8452
+ xe.current = xe.current.map((Me) => {
8453
+ const et = Ce.find((ue) => ue.id === Me.id);
8454
8454
  return { ...Me, ...et };
8455
8455
  }), oe((Me) => Me.map((et) => {
8456
- const ue = Se.find((_e) => _e.id === et.id);
8456
+ const ue = Ce.find((_e) => _e.id === et.id);
8457
8457
  return { ...et, ...ue };
8458
8458
  }));
8459
8459
  }, []), {
@@ -8474,7 +8474,7 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8474
8474
  tableRef: l,
8475
8475
  context: d,
8476
8476
  isActive: V,
8477
- onResultsUpdated: Te,
8477
+ onResultsUpdated: we,
8478
8478
  treeOoui: n,
8479
8479
  updateAttributes: Oe,
8480
8480
  results: P
@@ -8497,21 +8497,21 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8497
8497
  ), ye = Q(
8498
8498
  () => en(b || [], c),
8499
8499
  [c, b]
8500
- ), Ke = Q(() => (x == null ? void 0 : x.map((Se) => Se.id)) || [], [x]), ot = O(() => {
8500
+ ), Ke = Q(() => (x == null ? void 0 : x.map((Ce) => Ce.id)) || [], [x]), ot = O(() => {
8501
8501
  const Me = `${JSON.stringify(Y ? c : ye)}-${Y}`;
8502
8502
  return Me !== Ye.current ? (Ye.current = Me, !0) : !1;
8503
8503
  }, [c, ye, Y]), Tt = O(async () => {
8504
8504
  me(void 0), H(0), B(!0);
8505
8505
  try {
8506
- const Se = await at({
8506
+ const Ce = await at({
8507
8507
  params: Y ? c : ye,
8508
8508
  model: o,
8509
8509
  context: d,
8510
8510
  name_search: Y
8511
8511
  });
8512
- me(Se), H(Se);
8513
- } catch (Se) {
8514
- st(Se);
8512
+ me(Ce), H(Ce);
8513
+ } catch (Ce) {
8514
+ st(Ce);
8515
8515
  } finally {
8516
8516
  B(!1);
8517
8517
  }
@@ -8524,19 +8524,19 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8524
8524
  o,
8525
8525
  d,
8526
8526
  st
8527
- ]), Ue = O(() => w, [w]), ft = O(() => _, [_]), Pt = O((Se) => {
8527
+ ]), Ue = O(() => w, [w]), ft = O(() => _, [_]), Pt = O((Ce) => {
8528
8528
  var Me, et, ue, _e;
8529
- return ce.current[(et = (Me = Se.node) == null ? void 0 : Me.data) == null ? void 0 : et.id] ? { color: ce.current[(_e = (ue = Se.node) == null ? void 0 : ue.data) == null ? void 0 : _e.id] } : {};
8529
+ return ce.current[(et = (Me = Ce.node) == null ? void 0 : Me.data) == null ? void 0 : et.id] ? { color: ce.current[(_e = (ue = Ce.node) == null ? void 0 : ue.data) == null ? void 0 : _e.id] } : {};
8530
8530
  }, []), Ot = O(
8531
- (Se) => {
8531
+ (Ce) => {
8532
8532
  var Me;
8533
- return (Me = je.current) == null ? void 0 : Me[Se.id];
8533
+ return (Me = je.current) == null ? void 0 : Me[Ce.id];
8534
8534
  },
8535
8535
  // eslint-disable-next-line react-hooks/exhaustive-deps
8536
8536
  []
8537
8537
  ), sn = O(() => {
8538
- var Se;
8539
- g([]), (Se = l.current) == null || Se.unselectAll(), S == null || S(void 0), R == null || R([]), A == null || A(void 0);
8538
+ var Ce;
8539
+ g([]), (Ce = l.current) == null || Ce.unselectAll(), S == null || S(void 0), R == null || R([]), A == null || A(void 0);
8540
8540
  }, [
8541
8541
  g,
8542
8542
  l,
@@ -8544,9 +8544,9 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8544
8544
  R,
8545
8545
  A
8546
8546
  ]), hn = O(
8547
- ({ params: Se, searchValues: Me }) => {
8547
+ ({ params: Ce, searchValues: Me }) => {
8548
8548
  var et;
8549
- g([]), (et = l.current) == null || et.unselectAll(), S == null || S(void 0), R == null || R(Se), A == null || A(Me);
8549
+ g([]), (et = l.current) == null || et.unselectAll(), S == null || S(void 0), R == null || R(Ce), A == null || A(Me);
8550
8550
  },
8551
8551
  [
8552
8552
  g,
@@ -8559,9 +8559,9 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8559
8559
  () => y == null ? void 0 : y(!1),
8560
8560
  [y]
8561
8561
  ), gn = O(
8562
- ({ params: Se, values: Me }) => {
8562
+ ({ params: Ce, values: Me }) => {
8563
8563
  var et;
8564
- g([]), (et = l.current) == null || et.unselectAll(), S == null || S(void 0), R == null || R(Se), A == null || A(Me), y == null || y(!1);
8564
+ g([]), (et = l.current) == null || et.unselectAll(), S == null || S(void 0), R == null || R(Ce), A == null || A(Me), y == null || y(!1);
8565
8565
  },
8566
8566
  [
8567
8567
  g,
@@ -8588,35 +8588,35 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8588
8588
  c,
8589
8589
  D
8590
8590
  ]), le(() => {
8591
- var Se;
8591
+ var Ce;
8592
8592
  if (Y !== K.current) {
8593
8593
  if (Y !== void 0 && K.current === void 0 || typeof Y == "string" && typeof K.current == "string" && Y !== K.current) {
8594
- R == null || R([]), A == null || A({}), (Se = l.current) == null || Se.unselectAll(), K.current = Y;
8594
+ R == null || R([]), A == null || A({}), (Ce = l.current) == null || Ce.unselectAll(), K.current = Y;
8595
8595
  return;
8596
8596
  }
8597
8597
  Y === void 0 && K.current !== void 0 && B(!0), K.current = Y;
8598
8598
  }
8599
8599
  }, [Y]), Ft(() => {
8600
- const Se = !es(
8600
+ const Ce = !es(
8601
8601
  b,
8602
8602
  be.current
8603
8603
  ), Me = ke.current && !m;
8604
- Se && (Me || f === "top") && Qt(), be.current = b, ke.current = m;
8604
+ Ce && (Me || f === "top") && Qt(), be.current = b, ke.current = m;
8605
8605
  }, [b, m]);
8606
8606
  const jt = O(async () => {
8607
8607
  if (!n || t)
8608
8608
  return [];
8609
- if (xe.current)
8609
+ if (Te.current)
8610
8610
  return [];
8611
- xe.current = !0;
8611
+ Te.current = !0;
8612
8612
  try {
8613
8613
  h(!0);
8614
- let Se;
8614
+ let Ce;
8615
8615
  if (D != null && D.length) {
8616
8616
  const Nt = gr({
8617
8617
  state: D
8618
8618
  });
8619
- Se = yr(Nt);
8619
+ Ce = yr(Nt);
8620
8620
  }
8621
8621
  const Me = Y ? c : ye, et = (r == null ? void 0 : r.fields_in_conditions) !== void 0, ue = Gr({
8622
8622
  treeOoui: n,
@@ -8629,7 +8629,7 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8629
8629
  fields: r.field_parent ? { ...r.fields, [r.field_parent]: {} } : r.fields,
8630
8630
  context: d,
8631
8631
  attrs: ue,
8632
- order: Se,
8632
+ order: Ce,
8633
8633
  name_search: Y,
8634
8634
  skipFunctionFields: et,
8635
8635
  onIdsRetrieved: (Nt) => {
@@ -8642,15 +8642,15 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8642
8642
  name_search: Y,
8643
8643
  context: d
8644
8644
  }), F == null || F(_e), Y ? (me(_e.length), H(_e.length), re(!0), B(!1)) : re(!1), !Y && ot() && Tt(), _e.length === 0) {
8645
- Ce.current = [], me(0), H(0), oe([]), h(!1);
8645
+ xe.current = [], me(0), H(0), oe([]), h(!1);
8646
8646
  return;
8647
8647
  }
8648
8648
  const lt = mn(n, _e);
8649
- Oe(rt, n), h(!1), Ce.current = [...lt], oe([...lt]);
8650
- } catch (Se) {
8651
- throw console.error(Se), Se;
8649
+ Oe(rt, n), h(!1), xe.current = [...lt], oe([...lt]);
8650
+ } catch (Ce) {
8651
+ throw console.error(Ce), Ce;
8652
8652
  } finally {
8653
- xe.current = !1;
8653
+ Te.current = !1;
8654
8654
  }
8655
8655
  }, [
8656
8656
  n,
@@ -8686,12 +8686,12 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8686
8686
  jt,
8687
8687
  Ae
8688
8688
  ]), Ut = O(
8689
- (Se, Me) => {
8689
+ (Ce, Me) => {
8690
8690
  if (Me === -1) {
8691
8691
  u == null || u("infinite");
8692
8692
  return;
8693
8693
  }
8694
- v(0), C(void 0), g([]), L(Se), Me && j(Me);
8694
+ v(0), C(void 0), g([]), L(Ce), Me && j(Me);
8695
8695
  },
8696
8696
  [
8697
8697
  u,
@@ -8707,14 +8707,14 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8707
8707
  context: d,
8708
8708
  totalItems: U
8709
8709
  }), [Pe, b, c, o, d, U]), Vt = O(async () => {
8710
- const Se = await Wt();
8711
- g == null || g(Se.map((Me) => ({ id: Me })));
8710
+ const Ce = await Wt();
8711
+ g == null || g(Ce.map((Me) => ({ id: Me })));
8712
8712
  }, [Wt, g]), Yt = Q(() => Ke.length === 0 ? "unchecked" : Ke.length === X && X > 0 || Ke.length === U ? "checked" : "indeterminate", [Ke, X, U]), Bn = O(() => {
8713
- var Se, Me;
8714
- Yt === "unchecked" ? ((Se = l.current) == null || Se.selectAll(), g(ee.map((et) => ({ id: et.id })))) : (g([]), (Me = l.current) == null || Me.unselectAll());
8713
+ var Ce, Me;
8714
+ Yt === "unchecked" ? ((Ce = l.current) == null || Ce.selectAll(), g(ee.map((et) => ({ id: et.id })))) : (g([]), (Me = l.current) == null || Me.unselectAll());
8715
8715
  }, [l, g, ee, Yt]), jn = O(
8716
- (Se) => {
8717
- W(Se), v(0), C(void 0), L(1);
8716
+ (Ce) => {
8717
+ W(Ce), v(0), C(void 0), L(1);
8718
8718
  },
8719
8719
  [
8720
8720
  W,
@@ -8723,13 +8723,13 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8723
8723
  v
8724
8724
  ]
8725
8725
  ), Un = O(
8726
- ({ id: Se, selected: Me }) => {
8726
+ ({ id: Ce, selected: Me }) => {
8727
8727
  g((et) => {
8728
8728
  if (Me) {
8729
- const ue = ee.find((_e) => _e.id === Se);
8730
- return ue && !et.some((_e) => _e.id === Se) ? [...et, ue] : et;
8729
+ const ue = ee.find((_e) => _e.id === Ce);
8730
+ return ue && !et.some((_e) => _e.id === Ce) ? [...et, ue] : et;
8731
8731
  }
8732
- return et.filter((ue) => ue.id !== Se);
8732
+ return et.filter((ue) => ue.id !== Ce);
8733
8733
  });
8734
8734
  },
8735
8735
  [ee, g]
@@ -8748,7 +8748,7 @@ const ll = _t(Ah), _h = gt, Rh = (e) => {
8748
8748
  onSearchFilterSubmit: hn,
8749
8749
  onSideSearchFilterClose: kt,
8750
8750
  onSideSearchFilterSubmit: gn,
8751
- totalRowsLoading: we,
8751
+ totalRowsLoading: Se,
8752
8752
  totalRows: U,
8753
8753
  onRowStyle: Pt,
8754
8754
  results: ee,
@@ -8983,7 +8983,7 @@ function Ph(e, t) {
8983
8983
  totalRows: j,
8984
8984
  onRowStyle: ne,
8985
8985
  results: X,
8986
- onRequestPageChange: we,
8986
+ onRequestPageChange: Se,
8987
8987
  treeIsLoading: B,
8988
8988
  selectAllRecords: U,
8989
8989
  onHeaderCheckboxClick: me,
@@ -8996,8 +8996,8 @@ function Ph(e, t) {
8996
8996
  order: be,
8997
8997
  setTreeFirstVisibleColumn: ke,
8998
8998
  onGetFirstVisibleColumn: Ye,
8999
- onSortChange: Ce,
9000
- isFieldLoading: xe,
8999
+ onSortChange: xe,
9000
+ isFieldLoading: Te,
9001
9001
  setSearchVisible: fe,
9002
9002
  nameSearchFetchCompleted: De,
9003
9003
  nameSearch: Ie
@@ -9013,7 +9013,7 @@ function Ph(e, t) {
9013
9013
  filterType: u,
9014
9014
  context: d,
9015
9015
  onChangeTreeType: p
9016
- }), He = ii(F), [Be, Te, ce] = Ko({
9016
+ }), He = ii(F), [Be, we, ce] = Ko({
9017
9017
  ooui: x,
9018
9018
  model: n,
9019
9019
  showEmptyValues: !0,
@@ -9026,7 +9026,7 @@ function Ph(e, t) {
9026
9026
  refreshResults: F,
9027
9027
  getFields: () => w == null ? void 0 : w.fields
9028
9028
  }));
9029
- const je = Q(() => ce ? /* @__PURE__ */ s(qo, { aggregates: Te, isLoading: Be }) : null, [Te, Be, ce]), Oe = O(
9029
+ const je = Q(() => ce ? /* @__PURE__ */ s(qo, { aggregates: we, isLoading: Be }) : null, [we, Be, ce]), Oe = O(
9030
9030
  (Ge) => /* @__PURE__ */ s(er, { color: Ge, style: { marginLeft: 7 } }),
9031
9031
  []
9032
9032
  ), Ne = Q(
@@ -9061,7 +9061,7 @@ function Ph(e, t) {
9061
9061
  pageSize: Ze,
9062
9062
  maxPageSize: g,
9063
9063
  currentPageSelectedCount: S.length,
9064
- onRequestPageChange: we,
9064
+ onRequestPageChange: Se,
9065
9065
  totalSelectedCount: S.length,
9066
9066
  onSelectAllGlobalRecords: U,
9067
9067
  simpleSummary: ve,
@@ -9099,9 +9099,9 @@ function Ph(e, t) {
9099
9099
  onHeaderCheckboxClick: me,
9100
9100
  refresh: He,
9101
9101
  actionViewSortState: be,
9102
- onSortChange: Ce,
9102
+ onSortChange: xe,
9103
9103
  tableRef: h,
9104
- isFieldLoading: xe,
9104
+ isFieldLoading: Te,
9105
9105
  onChangeTreeType: p
9106
9106
  }
9107
9107
  ) })
@@ -9279,14 +9279,14 @@ const kh = _t(Ph), Zn = "legacy", Vh = (e) => {
9279
9279
  initialSearchParams: S,
9280
9280
  initialCurrentPage: F,
9281
9281
  initialOrder: P
9282
- } = e, [E, H] = I(!1), [V, $] = I(!1), [L, D] = I(!1), [W, G] = I(!0), [j, ne] = I(!0), [X, we] = I([]), [B, U] = I(!1), [me, ee] = I(
9282
+ } = e, [E, H] = I(!1), [V, $] = I(!1), [L, D] = I(!1), [W, G] = I(!0), [j, ne] = I(!0), [X, Se] = I([]), [B, U] = I(!1), [me, ee] = I(
9283
9283
  S || []
9284
9284
  ), [oe, Z] = I(!1), [re, Y] = I(!0), [K, be] = I(), [ke, Ye] = I(
9285
9285
  Hu(
9286
9286
  S || [],
9287
9287
  n.fields
9288
9288
  )
9289
- ), [Ce, xe] = I(0), [fe, De] = I(void 0), [Ie, He] = I(), [Be, Te] = I(Zn), [ce, je] = I(
9289
+ ), [xe, Te] = I(0), [fe, De] = I(void 0), [Ie, He] = I(), [Be, we] = I(Zn), [ce, je] = I(
9290
9290
  P
9291
9291
  ), [Oe, Ne] = I(
9292
9292
  A !== void 0 ? A : gt
@@ -9344,7 +9344,7 @@ const kh = _t(Ph), Zn = "legacy", Vh = (e) => {
9344
9344
  treeIsLoading: j,
9345
9345
  setTreeIsLoading: ne,
9346
9346
  attachments: X,
9347
- setAttachments: we,
9347
+ setAttachments: Se,
9348
9348
  selectedRowItems: x,
9349
9349
  setSelectedRowItems: C,
9350
9350
  duplicatingItem: B,
@@ -9370,14 +9370,14 @@ const kh = _t(Ph), Zn = "legacy", Vh = (e) => {
9370
9370
  setLimit: Ne,
9371
9371
  setTitle: Ae,
9372
9372
  isActive: k,
9373
- setTreeFirstVisibleRow: xe,
9374
- treeFirstVisibleRow: Ce,
9373
+ setTreeFirstVisibleRow: Te,
9374
+ treeFirstVisibleRow: xe,
9375
9375
  treeFirstVisibleColumn: fe,
9376
9376
  setTreeFirstVisibleColumn: De,
9377
9377
  searchQuery: Ie,
9378
9378
  setSearchQuery: He,
9379
9379
  treeType: Be,
9380
- setTreeType: Te,
9380
+ setTreeType: we,
9381
9381
  order: ce,
9382
9382
  setOrder: je,
9383
9383
  currentPage: de,
@@ -10223,18 +10223,18 @@ function ug(e, t) {
10223
10223
  forcedValues: R = {},
10224
10224
  parentWidth: T,
10225
10225
  onMustRefreshParent: b
10226
- } = e, { t: A } = ge(), [k, S] = I(!1), [F, P] = I(), [E, H] = I(), [V] = Et.useForm(), [$, L] = I(), [D, W] = I(), G = ae(fl), [j, ne] = I(), [X, we] = I(!1), B = z(), U = z({}), me = z({}), ee = z(!1), oe = z(!1), Z = z(!1), Y = (T !== void 0 ? T : j) < dg, K = ae(Je), { activeId: be, getPlainValues: ke } = K || {}, Ye = z(!1), Ce = ae(
10226
+ } = e, { t: A } = ge(), [k, S] = I(!1), [F, P] = I(), [E, H] = I(), [V] = Et.useForm(), [$, L] = I(), [D, W] = I(), G = ae(fl), [j, ne] = I(), [X, Se] = I(!1), B = z(), U = z({}), me = z({}), ee = z(!1), oe = z(!1), Z = z(!1), Y = (T !== void 0 ? T : j) < dg, K = ae(Je), { activeId: be, getPlainValues: ke } = K || {}, Ye = z(!1), xe = ae(
10227
10227
  Ct
10228
10228
  ), {
10229
- setFormIsSaving: xe = void 0,
10229
+ setFormIsSaving: Te = void 0,
10230
10230
  setFormHasChanges: fe = void 0,
10231
10231
  setCurrentId: De = void 0,
10232
10232
  setFormIsLoading: Ie = void 0,
10233
10233
  setAttachments: He = void 0,
10234
10234
  title: Be = void 0,
10235
- setTitle: Te = void 0,
10235
+ setTitle: we = void 0,
10236
10236
  isActive: ce = void 0
10237
- } = (C ? Ce : {}) || {}, je = ae(
10237
+ } = (C ? xe : {}) || {}, je = ae(
10238
10238
  Vn
10239
10239
  ), { processAction: Oe, globalValues: Ne } = je || {};
10240
10240
  Dt(t, () => ({
@@ -10259,12 +10259,12 @@ function ug(e, t) {
10259
10259
  }, [r, n, h, m, _]), le(() => {
10260
10260
  X && (Yt({
10261
10261
  elementHasLostFocus: !0
10262
- }), we(!1));
10262
+ }), Se(!1));
10263
10263
  }, [X]);
10264
10264
  const ve = (q, J, pe, se) => {
10265
- fe == null || fe(!1), xe == null || xe(!1), a == null || a(q, J, pe, se), De == null || De(q), Ye.current && (b == null || b());
10265
+ fe == null || fe(!1), Te == null || Te(!1), a == null || a(q, J, pe, se), De == null || De(q), Ye.current && (b == null || b());
10266
10266
  }, Ae = (q) => {
10267
- xe == null || xe(!1), d == null || d(q);
10267
+ Te == null || Te(!1), d == null || d(q);
10268
10268
  }, de = O(() => r || B.current, [r]), Ze = r || B.current;
10269
10269
  function Ge() {
10270
10270
  return D;
@@ -10325,13 +10325,13 @@ function ug(e, t) {
10325
10325
  q[J] === void 0 && delete q[J];
10326
10326
  return q;
10327
10327
  }, [ye, Re, D]), ot = O(() => {
10328
- Ye.current && (b == null || b()), xe == null || xe(!1), o == null || o({ id: de(), values: Ke() });
10328
+ Ye.current && (b == null || b()), Te == null || Te(!1), o == null || o({ id: de(), values: Ke() });
10329
10329
  }, [
10330
10330
  de,
10331
10331
  Ke,
10332
10332
  b,
10333
10333
  o,
10334
- xe
10334
+ Te
10335
10335
  ]), Tt = (q, J) => {
10336
10336
  kt({
10337
10337
  values: {
@@ -10372,7 +10372,7 @@ function ug(e, t) {
10372
10372
  fields: pe,
10373
10373
  reset: !0,
10374
10374
  isDefaultGet: Ee
10375
- }), Vt({ fields: pe, arch: se, values: J }), Ie == null || Ie(!1), fe == null || fe(!1), Ee && we(!0);
10375
+ }), Vt({ fields: pe, arch: se, values: J }), Ie == null || Ie(!1), fe == null || fe(!1), Ee && Se(!0);
10376
10376
  }, sn = async () => new Promise(async (q) => {
10377
10377
  Ve() ? kn({
10378
10378
  t: A,
@@ -10493,13 +10493,13 @@ function ug(e, t) {
10493
10493
  return oe.current = !1, fe == null || fe(!1), ot == null || ot(), { succeed: !0, id: de() };
10494
10494
  if (await ft())
10495
10495
  return oe.current = !1, li(A), { succeed: !1, id: de() };
10496
- S(!0), xe == null || xe(!0);
10496
+ S(!0), Te == null || Te(!0);
10497
10497
  try {
10498
10498
  p === "api" ? await jt(q) : await Qt(q), u && (B.current = void 0, kt({ values: {}, fields: D, reset: !0 })), await Ot({ forceRefresh: !0 }), J = !0, Wn.success(A("savedRegisters"));
10499
10499
  } catch (se) {
10500
- oe.current = !1, S(!1), xe == null || xe(!1), Ae == null || Ae(se), Wn.error(A("errorWhileSavingForm")), P(se != null && se.message ? se.message : se);
10500
+ oe.current = !1, S(!1), Te == null || Te(!1), Ae == null || Ae(se), Wn.error(A("errorWhileSavingForm")), P(se != null && se.message ? se.message : se);
10501
10501
  } finally {
10502
- oe.current = !1, xe == null || xe(!1), S(!1);
10502
+ oe.current = !1, Te == null || Te(!1), S(!1);
10503
10503
  }
10504
10504
  return { succeed: J, id: de() };
10505
10505
  }, Wt = O(
@@ -10536,9 +10536,9 @@ function ug(e, t) {
10536
10536
  values: pe,
10537
10537
  operationInProgress: se
10538
10538
  });
10539
- H(Ee), Ee.string && Ee.string !== Be && (Te == null || Te(Ee.string)), G && Ee.string && ((ct = G.setTitle) == null || ct.call(G, Ee.string));
10539
+ H(Ee), Ee.string && Ee.string !== Be && (we == null || we(Ee.string)), G && Ee.string && ((ct = G.setTitle) == null || ct.call(G, Ee.string));
10540
10540
  },
10541
- [G, Wt, Te, Be]
10541
+ [G, Wt, we, Be]
10542
10542
  ), Yt = async ({
10543
10543
  elementHasLostFocus: q = !1
10544
10544
  }) => {
@@ -10639,7 +10639,7 @@ function ug(e, t) {
10639
10639
  }), W(Ee);
10640
10640
  }
10641
10641
  };
10642
- async function Se({
10642
+ async function Ce({
10643
10643
  action: q,
10644
10644
  context: J
10645
10645
  }) {
@@ -10761,7 +10761,7 @@ function ug(e, t) {
10761
10761
  try {
10762
10762
  !f && (Ve() || de() === void 0) && (se = !0, rt(!0), p === "2many" ? (await jt({ callOnSubmitSucceed: !1 }), Z.current = !0) : await Ut({ callOnSubmitSucceed: !1 }));
10763
10763
  const Ee = Z.current ? he() : {}, ct = { ...pe, ...Ee };
10764
- q === "object" ? await Se({ action: J, context: ct }) : q === "workflow" ? await Me({ action: J }) : q === "action" && await et({ action: J, context: ct }), se && rt(!1);
10764
+ q === "object" ? await Ce({ action: J, context: ct }) : q === "workflow" ? await Me({ action: J }) : q === "action" && await et({ action: J, context: ct }), se && rt(!1);
10765
10765
  } catch (Ee) {
10766
10766
  se && rt(!1), wt(Ee);
10767
10767
  }
@@ -11738,7 +11738,7 @@ const xg = (e) => {
11738
11738
  domain: y,
11739
11739
  fetchValues: g
11740
11740
  } = f || {}, { t: v } = ge(), [w, _] = I(!1), [C, x] = I(!1), [R, T] = I(), [b, A] = I(!1), [k, S] = I(!1), [F, P] = I(), [E, H] = I([]), [V, $] = I(!1), L = z([]), [D, W] = I(), G = z(), [j, ne] = I(void 0), X = z(), {
11741
- readOnly: we,
11741
+ readOnly: Se,
11742
11742
  relation: B,
11743
11743
  context: U,
11744
11744
  domain: me
@@ -11806,12 +11806,12 @@ const xg = (e) => {
11806
11806
  })
11807
11807
  ));
11808
11808
  }
11809
- const Ce = () => {
11809
+ const xe = () => {
11810
11810
  const te = Array.from(o.keys()), he = te[(te.indexOf(i) + 1) % te.length];
11811
11811
  i === "form" ? Ie(() => {
11812
11812
  l(he);
11813
11813
  }) : l(he);
11814
- }, xe = () => {
11814
+ }, Te = () => {
11815
11815
  c > 0 && (i === "form" ? Ie(() => {
11816
11816
  d(c - 1);
11817
11817
  }) : d(c - 1));
@@ -11867,7 +11867,7 @@ const xg = (e) => {
11867
11867
  te && u && (he = { [te]: u }), i === "form" ? Ie(() => {
11868
11868
  $(!0), P({ defaultValues: he }), A(!0);
11869
11869
  }) : ($(!0), P({ defaultValues: he }), A(!0));
11870
- }, Te = async () => {
11870
+ }, we = async () => {
11871
11871
  i === "form" ? Ie(() => {
11872
11872
  S(!0);
11873
11873
  }) : S(!0);
@@ -11994,7 +11994,7 @@ const xg = (e) => {
11994
11994
  } : Ue);
11995
11995
  K(ot), _(!0);
11996
11996
  },
11997
- readOnly: we
11997
+ readOnly: Se
11998
11998
  }
11999
11999
  );
12000
12000
  let te = [];
@@ -12022,7 +12022,7 @@ const xg = (e) => {
12022
12022
  onChangeSort: W,
12023
12023
  context: { ...m == null ? void 0 : m(), ...U },
12024
12024
  colorsForResults: j,
12025
- readonly: we,
12025
+ readonly: Se,
12026
12026
  scrollY: r == null ? void 0 : r.height
12027
12027
  }
12028
12028
  );
@@ -12052,17 +12052,17 @@ const xg = (e) => {
12052
12052
  model: B,
12053
12053
  currentId: (Ge = Z[c]) == null ? void 0 : Ge.id,
12054
12054
  title: Ae(),
12055
- readOnly: we || !1,
12055
+ readOnly: Se || !1,
12056
12056
  isMany2Many: ee,
12057
12057
  formHasChanges: w,
12058
12058
  totalItems: Z.length,
12059
12059
  currentItemIndex: c,
12060
12060
  onDelete: He,
12061
12061
  onCreateItem: Be,
12062
- onToggleViewMode: Ce,
12063
- onPreviousItem: xe,
12062
+ onToggleViewMode: xe,
12063
+ onPreviousItem: Te,
12064
12064
  onNextItem: fe,
12065
- onSearchItem: Te,
12065
+ onSearchItem: we,
12066
12066
  selectedRowKeys: E,
12067
12067
  showCreateButton: ((st = o.get("form")) == null ? void 0 : st.fields) !== void 0,
12068
12068
  showToggleButton: o.size > 1,
@@ -12100,7 +12100,7 @@ const xg = (e) => {
12100
12100
  }
12101
12101
  A(!1);
12102
12102
  },
12103
- readOnly: we,
12103
+ readOnly: Se,
12104
12104
  mustClearAfterSave: Ze,
12105
12105
  onMustRefreshParent: () => {
12106
12106
  g == null || g({ forceRefresh: !0 });
@@ -12675,7 +12675,7 @@ const Og = ({
12675
12675
  treeView: a.get("tree"),
12676
12676
  relation: h,
12677
12677
  context: b,
12678
- allRowsIds: l.filter((Te) => Te.id !== void 0).map((Te) => Te.id),
12678
+ allRowsIds: l.filter((we) => we.id !== void 0).map((we) => we.id),
12679
12679
  gridRef: t
12680
12680
  }), [, $] = Vg({
12681
12681
  ooui: k,
@@ -12683,14 +12683,14 @@ const Og = ({
12683
12683
  items: l,
12684
12684
  selectedRowKeys: F
12685
12685
  }), L = Q(() => {
12686
- const { title: Te } = a.get(c) || {};
12687
- return Te || o.label;
12686
+ const { title: we } = a.get(c) || {};
12687
+ return we || o.label;
12688
12688
  }, [c, o.label, a]), D = o.type === "many2many", W = O(
12689
- (Te) => {
12689
+ (we) => {
12690
12690
  var ce, je;
12691
12691
  r == null || r({
12692
12692
  fields: ((ce = a.get("form")) == null ? void 0 : ce.fields) || ((je = a.get("tree")) == null ? void 0 : je.fields),
12693
- items: Te
12693
+ items: we
12694
12694
  });
12695
12695
  },
12696
12696
  [r, a]
@@ -12707,7 +12707,7 @@ const Og = ({
12707
12707
  context: b,
12708
12708
  triggerChange: W
12709
12709
  }), {
12710
- showFormModal: we,
12710
+ showFormModal: Se,
12711
12711
  modalItem: B,
12712
12712
  continuousEntryMode: U,
12713
12713
  onCancelFormModal: me,
@@ -12747,24 +12747,24 @@ const Og = ({
12747
12747
  selectedRowKeys: F,
12748
12748
  setSelectedRowKeys: P
12749
12749
  }), Ye = () => {
12750
- const Te = Array.from(a.keys()), ce = Te[(Te.indexOf(c) + 1) % Te.length];
12750
+ const we = Array.from(a.keys()), ce = we[(we.indexOf(c) + 1) % we.length];
12751
12751
  c === "form" ? ne(() => {
12752
12752
  d(ce);
12753
12753
  }) : d(ce);
12754
- }, Ce = At(
12755
- (Te) => {
12754
+ }, xe = At(
12755
+ (we) => {
12756
12756
  var ce;
12757
- (ce = a.get("form")) != null && ce.fields && Z(Te);
12757
+ (ce = a.get("form")) != null && ce.fields && Z(we);
12758
12758
  },
12759
12759
  // eslint-disable-next-line react-hooks/exhaustive-deps
12760
12760
  [l]
12761
- ), xe = O(() => {
12761
+ ), Te = O(() => {
12762
12762
  f > 0 && (c === "form" ? ne(() => {
12763
12763
  u(f - 1);
12764
12764
  }) : u(f - 1));
12765
12765
  }, [c, f, u, ne]), fe = O(() => {
12766
- const Te = l.length;
12767
- f < Te - 1 && (c === "form" ? ne(() => {
12766
+ const we = l.length;
12767
+ f < we - 1 && (c === "form" ? ne(() => {
12768
12768
  u(f + 1);
12769
12769
  }) : u(f + 1));
12770
12770
  }, [
@@ -12774,8 +12774,8 @@ const Og = ({
12774
12774
  u,
12775
12775
  ne
12776
12776
  ]), De = Q(() => {
12777
- var Te;
12778
- return ((Te = a.get("form")) == null ? void 0 : Te.fields) !== void 0;
12777
+ var we;
12778
+ return ((we = a.get("form")) == null ? void 0 : we.fields) !== void 0;
12779
12779
  }, [a]);
12780
12780
  return /* @__PURE__ */ N(ie, { children: [
12781
12781
  /* @__PURE__ */ s(
@@ -12793,7 +12793,7 @@ const Og = ({
12793
12793
  onDelete: ke,
12794
12794
  onCreateItem: oe,
12795
12795
  onToggleViewMode: Ye,
12796
- onPreviousItem: xe,
12796
+ onPreviousItem: Te,
12797
12797
  onNextItem: fe,
12798
12798
  onSearchItem: be,
12799
12799
  selectedRowKeys: F,
@@ -12803,7 +12803,8 @@ const Og = ({
12803
12803
  context: { ..._ == null ? void 0 : _(), ...b },
12804
12804
  formRef: x,
12805
12805
  onRefreshParentValues: () => {
12806
- C == null || C({ forceRefresh: !0 });
12806
+ var we;
12807
+ C == null || C({ forceRefresh: !0 }), (we = t.current) == null || we.refresh();
12807
12808
  }
12808
12809
  }
12809
12810
  ),
@@ -12817,7 +12818,7 @@ const Og = ({
12817
12818
  onFetchRecords: S,
12818
12819
  ooui: k,
12819
12820
  context: b,
12820
- onRowDoubleClick: Ce,
12821
+ onRowDoubleClick: xe,
12821
12822
  showPointerCursorInRows: De,
12822
12823
  onRowSelectionChange: P,
12823
12824
  relation: h,
@@ -12854,14 +12855,15 @@ const Og = ({
12854
12855
  submitMode: "2many",
12855
12856
  values: B == null ? void 0 : B.values,
12856
12857
  defaultValues: B == null ? void 0 : B.defaultValues,
12857
- visible: we,
12858
+ visible: Se,
12858
12859
  onSubmitSucceed: ee,
12859
12860
  parentContext: b,
12860
12861
  onCancel: me,
12861
12862
  readOnly: p,
12862
12863
  mustClearAfterSave: U,
12863
12864
  onMustRefreshParent: () => {
12864
- C == null || C({ forceRefresh: !0 });
12865
+ var we;
12866
+ C == null || C({ forceRefresh: !0 }), (we = t.current) == null || we.refresh();
12865
12867
  }
12866
12868
  }
12867
12869
  ),
@@ -14126,7 +14128,7 @@ function Cy({ toolbar: e }) {
14126
14128
  ),
14127
14129
  initialViewType: "form"
14128
14130
  }));
14129
- }, [g, c, E]), we = O(async () => {
14131
+ }, [g, c, E]), Se = O(async () => {
14130
14132
  const U = await In({ onFormSave: c });
14131
14133
  U.succeed && (E == null || E({
14132
14134
  ...di(
@@ -14274,7 +14276,7 @@ function Cy({ toolbar: e }) {
14274
14276
  disabled: H,
14275
14277
  attachments: T,
14276
14278
  onAddNewAttachment: X,
14277
- onListAllAttachments: we,
14279
+ onListAllAttachments: Se,
14278
14280
  onViewAttachmentDetails: B
14279
14281
  }
14280
14282
  ),
@@ -14854,7 +14856,7 @@ function My(e, t) {
14854
14856
  order: _
14855
14857
  } = e, [C, x] = I(), [R, T] = I([]), [b, A] = I(!0), k = p || void 0, [S, F] = I(
14856
14858
  k
14857
- ), [P, E] = I([]), [H, V] = I(), [$, L] = I([]), [D, W] = I(), [G, j] = I(0), [ne, X] = I(!1), [we, B] = I(!1), [U, me] = I(), { t: ee } = ge(), oe = z(), Z = z(), re = ae(
14859
+ ), [P, E] = I([]), [H, V] = I(), [$, L] = I([]), [D, W] = I(), [G, j] = I(0), [ne, X] = I(!1), [Se, B] = I(!1), [U, me] = I(), { t: ee } = ge(), oe = z(), Z = z(), re = ae(
14858
14860
  Rt
14859
14861
  ), {
14860
14862
  setCurrentView: Y,
@@ -14862,7 +14864,7 @@ function My(e, t) {
14862
14864
  tabs: be,
14863
14865
  activeKey: ke,
14864
14866
  openAction: Ye,
14865
- onRemoveTab: Ce
14867
+ onRemoveTab: xe
14866
14868
  } = re || {};
14867
14869
  an(
14868
14870
  "ctrl+g,command+g",
@@ -14872,7 +14874,7 @@ function My(e, t) {
14872
14874
  { enableOnFormTags: !0, preventDefault: !0 },
14873
14875
  [ke, be, C, H, $]
14874
14876
  );
14875
- function xe(ce) {
14877
+ function Te(ce) {
14876
14878
  F(ce), K == null || K(ce);
14877
14879
  }
14878
14880
  const fe = O(
@@ -14977,7 +14979,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
14977
14979
  action_id: h,
14978
14980
  action_type: m
14979
14981
  })
14980
- ), Ce == null || Ce(c)), fe(Ne), T(ce), A(!1);
14982
+ ), xe == null || xe(c)), fe(Ne), T(ce), A(!1);
14981
14983
  }, [
14982
14984
  d,
14983
14985
  fe,
@@ -14988,12 +14990,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
14988
14990
  m,
14989
14991
  i,
14990
14992
  y,
14991
- Ce,
14993
+ xe,
14992
14994
  c
14993
14995
  ]);
14994
14996
  l({ tabKey: c, canWeClose: Ie }), Ft(() => {
14995
14997
  const ce = R.find((Oe) => Oe.type === "tree"), je = R.find((Oe) => d.id ? Oe.type === d.type && Oe.view_id === d.id : Oe.type === d.type);
14996
- fe(je || ce), p ? K == null || K(k) : (xe(void 0), V(void 0)), De();
14998
+ fe(je || ce), p ? K == null || K(k) : (Te(void 0), V(void 0)), De();
14997
14999
  }, [r, a, p]), Ft(() => {
14998
15000
  if (ke === c) {
14999
15001
  K == null || K(S);
@@ -15033,7 +15035,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15033
15035
  } else
15034
15036
  Oe = "tree", Ne = [["id", "in", ce]];
15035
15037
  if (B(!1), X(!1), je && Oe === "form") {
15036
- xe(ce[0]);
15038
+ Te(ce[0]);
15037
15039
  const Ae = R.find(
15038
15040
  (de) => de.type === "form"
15039
15041
  );
@@ -15054,11 +15056,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15054
15056
  });
15055
15057
  }
15056
15058
  }
15057
- function Te() {
15059
+ function we() {
15058
15060
  if (S === void 0 && C.type === "form")
15059
15061
  oe.current.clearAndReload();
15060
15062
  else {
15061
- xe(void 0);
15063
+ Te(void 0);
15062
15064
  const ce = R.find(
15063
15065
  (je) => je.type === "form"
15064
15066
  );
@@ -15074,9 +15076,9 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15074
15076
  availableViews: R,
15075
15077
  formRef: oe,
15076
15078
  searchTreeRef: Z,
15077
- onNewClicked: Te,
15079
+ onNewClicked: we,
15078
15080
  currentId: S,
15079
- setCurrentId: xe,
15081
+ setCurrentId: Te,
15080
15082
  setCurrentItemIndex: V,
15081
15083
  currentItemIndex: H,
15082
15084
  results: $,
@@ -15116,7 +15118,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15116
15118
  searchTreeRef: Z,
15117
15119
  searchTreeNameSearch: U,
15118
15120
  setCurrentView: fe,
15119
- setCurrentId: xe
15121
+ setCurrentId: Te
15120
15122
  }
15121
15123
  ),
15122
15124
  /* @__PURE__ */ s(
@@ -15124,7 +15126,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
15124
15126
  {
15125
15127
  visible: ne,
15126
15128
  onIdSubmitted: Be,
15127
- isSearching: we,
15129
+ isSearching: Se,
15128
15130
  onCancel: () => {
15129
15131
  X(!1);
15130
15132
  }
@@ -15280,9 +15282,9 @@ function By(e) {
15280
15282
  fields: { ...m.fields, ...g.fields }
15281
15283
  });
15282
15284
  G(!1), S(Ye);
15283
- const Ce = await K();
15284
- A(Ce);
15285
- }, we = async () => {
15285
+ const xe = await K();
15286
+ A(xe);
15287
+ }, Se = async () => {
15286
15288
  try {
15287
15289
  G(!0), await X();
15288
15290
  } catch (Z) {
@@ -15290,7 +15292,7 @@ function By(e) {
15290
15292
  }
15291
15293
  };
15292
15294
  le(() => {
15293
- f && i && we();
15295
+ f && i && Se();
15294
15296
  }, [w, C, f, i]);
15295
15297
  const B = async (Z) => {
15296
15298
  u(!1), d(!0), D(void 0);
@@ -15520,7 +15522,7 @@ function Wy(e, t) {
15520
15522
  description: j,
15521
15523
  views: ne,
15522
15524
  model: X,
15523
- context: we,
15525
+ context: Se,
15524
15526
  domain: B,
15525
15527
  initialView: U,
15526
15528
  limit: me
@@ -15541,7 +15543,7 @@ function Wy(e, t) {
15541
15543
  (be) => be[1] === "graph"
15542
15544
  )[0][0],
15543
15545
  model: X,
15544
- context: we,
15546
+ context: Se,
15545
15547
  domain: B,
15546
15548
  limit: me
15547
15549
  },
@@ -15566,13 +15568,13 @@ function Wy(e, t) {
15566
15568
  if (K) {
15567
15569
  const [be, ke] = K, {
15568
15570
  actionId: Ye,
15569
- actionType: Ce,
15570
- title: xe,
15571
+ actionType: xe,
15572
+ title: Te,
15571
15573
  model: fe
15572
15574
  } = E, De = {
15573
15575
  action_id: Ye,
15574
- action_type: Ce,
15575
- name: xe,
15576
+ action_type: xe,
15577
+ name: Te,
15576
15578
  res_id: Y.id,
15577
15579
  res_model: fe,
15578
15580
  view_id: be,
@@ -15595,7 +15597,7 @@ function Wy(e, t) {
15595
15597
  title: G,
15596
15598
  views: ne,
15597
15599
  model: X,
15598
- context: we,
15600
+ context: Se,
15599
15601
  domain: B,
15600
15602
  setCanWeClose: () => {
15601
15603
  },
@@ -15615,14 +15617,14 @@ function Wy(e, t) {
15615
15617
  actionId: be,
15616
15618
  actionType: ke,
15617
15619
  title: Ye,
15618
- model: Ce
15620
+ model: xe
15619
15621
  } = E;
15620
15622
  Z = {
15621
15623
  action_id: be,
15622
15624
  action_type: ke,
15623
15625
  name: Ye,
15624
15626
  res_id: !1,
15625
- res_model: Ce,
15627
+ res_model: xe,
15626
15628
  view_id: Y,
15627
15629
  view_type: K,
15628
15630
  overrideUnsettedLimit: !0
@@ -16138,9 +16140,9 @@ function Tv(e, t) {
16138
16140
  views: j,
16139
16141
  name: ne,
16140
16142
  target: X,
16141
- view_type: we,
16143
+ view_type: Se,
16142
16144
  limit: B
16143
- } = P, U = we === "tree", me = [];
16145
+ } = P, U = Se === "tree", me = [];
16144
16146
  for (const oe of j) {
16145
16147
  const [Z, re] = oe;
16146
16148
  if (Z)
@@ -16224,7 +16226,7 @@ function Tv(e, t) {
16224
16226
  } = T, [D, W] = H[0], G = { id: D, type: W }, j = P, ne = Zt({
16225
16227
  context: j,
16226
16228
  values: { ...A, ...i }
16227
- }), X = E, we = E ? await M.getHandler().evalDomain({
16229
+ }), X = E, Se = E ? await M.getHandler().evalDomain({
16228
16230
  domain: E,
16229
16231
  values: pn({
16230
16232
  fields: b,
@@ -16238,7 +16240,7 @@ function Tv(e, t) {
16238
16240
  target: V,
16239
16241
  views: H,
16240
16242
  context: { ...l, ...ne },
16241
- domain: we,
16243
+ domain: Se,
16242
16244
  title: $,
16243
16245
  initialView: G,
16244
16246
  action_id: k,
@@ -16281,9 +16283,9 @@ function Tv(e, t) {
16281
16283
  views: j,
16282
16284
  name: ne,
16283
16285
  target: X,
16284
- view_type: we,
16286
+ view_type: Se,
16285
16287
  limit: B
16286
- } = V, U = we === "tree", me = [];
16288
+ } = V, U = Se === "tree", me = [];
16287
16289
  for (const re of j) {
16288
16290
  const [Y, K] = re;
16289
16291
  if (Y)
@@ -16364,7 +16366,7 @@ function Tv(e, t) {
16364
16366
  searchParams: j,
16365
16367
  currentPage: ne,
16366
16368
  order: X
16367
- } = T, we = Vo();
16369
+ } = T, Se = Vo();
16368
16370
  if (P !== "current" && P !== void 0) {
16369
16371
  const B = await M.getHandler().getView({
16370
16372
  model: k,
@@ -16393,7 +16395,7 @@ function Tv(e, t) {
16393
16395
  {
16394
16396
  action_id: H,
16395
16397
  action_type: V,
16396
- tabKey: we,
16398
+ tabKey: Se,
16397
16399
  title: F,
16398
16400
  views: S,
16399
16401
  model: k,
@@ -16411,7 +16413,7 @@ function Tv(e, t) {
16411
16413
  order: X
16412
16414
  }
16413
16415
  ),
16414
- key: we,
16416
+ key: Se,
16415
16417
  action: T
16416
16418
  });
16417
16419
  }