@gisce/react-ooui 1.1.6 → 1.1.8

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.
@@ -13224,8 +13224,8 @@ function require_stream_readable() {
13224
13224
  Q.pipesCount += 1, l("pipe count=%d opts=%j", Q.pipesCount, T);
13225
13225
  var ne = (!T || T.end !== !1) && F !== process.stdout && F !== process.stderr, J = ne ? oe : he;
13226
13226
  Q.endEmitted ? process.nextTick(J) : Y.once("end", J), F.on("unpipe", ee);
13227
- function ee(xe, ve) {
13228
- l("onunpipe"), xe === Y && ve && ve.hasUnpiped === !1 && (ve.hasUnpiped = !0, pe());
13227
+ function ee(Ce, ve) {
13228
+ l("onunpipe"), Ce === Y && ve && ve.hasUnpiped === !1 && (ve.hasUnpiped = !0, pe());
13229
13229
  }
13230
13230
  function oe() {
13231
13231
  l("onend"), F.end();
@@ -13237,13 +13237,13 @@ function require_stream_readable() {
13237
13237
  l("cleanup"), F.removeListener("close", de), F.removeListener("finish", Ie), F.removeListener("drain", le), F.removeListener("error", ie), F.removeListener("unpipe", ee), Y.removeListener("end", oe), Y.removeListener("end", he), Y.removeListener("data", me), ae = !0, Q.awaitDrain && (!F._writableState || F._writableState.needDrain) && le();
13238
13238
  }
13239
13239
  Y.on("data", me);
13240
- function me(xe) {
13240
+ function me(Ce) {
13241
13241
  l("ondata");
13242
- var ve = F.write(xe);
13242
+ var ve = F.write(Ce);
13243
13243
  l("dest.write", ve), ve === !1 && ((Q.pipesCount === 1 && Q.pipes === F || Q.pipesCount > 1 && X(Q.pipes, F) !== -1) && !ae && (l("false write response, pause", Q.awaitDrain), Q.awaitDrain++), Y.pause());
13244
13244
  }
13245
- function ie(xe) {
13246
- l("onerror", xe), he(), F.removeListener("error", ie), t(F, "error") === 0 && O(F, xe);
13245
+ function ie(Ce) {
13246
+ l("onerror", Ce), he(), F.removeListener("error", ie), t(F, "error") === 0 && O(F, Ce);
13247
13247
  }
13248
13248
  E(F, "error", ie);
13249
13249
  function de() {
@@ -16505,7 +16505,7 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
16505
16505
  }) : [...H.current];
16506
16506
  if (P(de), I && de.length > 0) {
16507
16507
  const he = de.findIndex(
16508
- (xe) => C === xe.id
16508
+ (Ce) => C === Ce.id
16509
16509
  );
16510
16510
  he === -1 ? v == null || v(0) : v == null || v(he);
16511
16511
  } else
@@ -17077,7 +17077,7 @@ function Form(e, t) {
17077
17077
  submitForm: ke,
17078
17078
  getFields: Ie,
17079
17079
  getValues: he,
17080
- getPlainValues: xe,
17080
+ getPlainValues: Ce,
17081
17081
  getContext: Te,
17082
17082
  fetchValues: Re,
17083
17083
  cancelUnsavedChanges: _e,
@@ -17119,12 +17119,12 @@ function Form(e, t) {
17119
17119
  re[te] === void 0 && delete re[te];
17120
17120
  return re;
17121
17121
  }
17122
- function xe() {
17122
+ function Ce() {
17123
17123
  const re = he(), te = Ie();
17124
17124
  let ue = {};
17125
17125
  return Object.keys(re).forEach((fe) => {
17126
- const Ce = re[fe];
17127
- te[fe] && te[fe].type === "many2one" && Ce && Array.isArray(Ce) && Ce.length === 2 ? ue[fe] = Ce[0] : te[fe] && (te[fe].type === "one2many" || te[fe].type === "many2many") && Ce && Ce.items ? ue[fe] = Ce.items.filter((Pe) => Pe.operation !== "pendingRemove").map((Pe) => Pe.id) : ue[fe] = Ce;
17126
+ const xe = re[fe];
17127
+ te[fe] && te[fe].type === "many2one" && xe && Array.isArray(xe) && xe.length === 2 ? ue[fe] = xe[0] : te[fe] && (te[fe].type === "one2many" || te[fe].type === "many2many") && xe && xe.items ? ue[fe] = xe.items.filter((Pe) => Pe.operation !== "pendingRemove").map((Pe) => Pe.id) : ue[fe] = xe;
17128
17128
  }), ue;
17129
17129
  }
17130
17130
  function ve() {
@@ -17205,10 +17205,10 @@ function Form(e, t) {
17205
17205
  k(te != null && te.message ? te.message + te.stack : te), J == null || J(!1);
17206
17206
  }
17207
17207
  }, Re = async (re) => {
17208
- let te, ue, fe, Ce;
17208
+ let te, ue, fe, xe;
17209
17209
  J == null || J(!0), k(void 0), re ? (ue = re.fields, fe = re.arch) : (ue = $, fe = L), h ? te = h : {
17210
17210
  values: te,
17211
- defaultGetCalled: Ce
17211
+ defaultGetCalled: xe
17212
17212
  } = await Ne({
17213
17213
  fields: ue,
17214
17214
  arch: fe
@@ -17219,12 +17219,12 @@ function Form(e, t) {
17219
17219
  values: te,
17220
17220
  fields: ue,
17221
17221
  reset: !0,
17222
- isDefaultGet: Ce
17222
+ isDefaultGet: xe
17223
17223
  }), Me({
17224
17224
  fields: ue,
17225
17225
  arch: fe,
17226
17226
  values: te
17227
- }), J == null || J(!1), Q == null || Q(!1), Ce && Z(!0);
17227
+ }), J == null || J(!1), Q == null || Q(!1), xe && Z(!0);
17228
17228
  };
17229
17229
  function we(re, te) {
17230
17230
  H.current[re] = te, Q == null || Q(ce());
@@ -17282,13 +17282,13 @@ function Form(e, t) {
17282
17282
  fields: re,
17283
17283
  context: I
17284
17284
  }))[0];
17285
- const Ce = await ConnectionProvider.getHandler().search({
17285
+ const xe = await ConnectionProvider.getHandler().search({
17286
17286
  params: [["res_model", "=", n], ["res_id", "=", de()]],
17287
17287
  fields: ["id", "name"],
17288
17288
  context: Te(),
17289
17289
  model: "ir.attachment"
17290
17290
  });
17291
- ee == null || ee(Ce);
17291
+ ee == null || ee(xe);
17292
17292
  } else
17293
17293
  ee == null || ee([]), ue = await se(re), fe = !0;
17294
17294
  return {
@@ -17366,7 +17366,7 @@ function Form(e, t) {
17366
17366
  arch: te,
17367
17367
  values: ue
17368
17368
  }) => {
17369
- var Ce;
17369
+ var xe;
17370
17370
  const fe = new Form$4(re);
17371
17371
  fe.parse(te, {
17372
17372
  readOnly: d,
@@ -17374,7 +17374,7 @@ function Form(e, t) {
17374
17374
  ...ue,
17375
17375
  ...be()
17376
17376
  }
17377
- }), D(fe), U && fe.string && ((Ce = U.setTitle) == null || Ce.call(U, fe.string));
17377
+ }), D(fe), U && fe.string && ((xe = U.setTitle) == null || xe.call(U, fe.string));
17378
17378
  }, De = async ({
17379
17379
  elementHasLostFocus: re = !1
17380
17380
  }) => {
@@ -17433,39 +17433,39 @@ function Form(e, t) {
17433
17433
  fields: $
17434
17434
  });
17435
17435
  if (fe.value) {
17436
- const Ce = {
17436
+ const xe = {
17437
17437
  ...ge($),
17438
17438
  ...fe.value
17439
17439
  };
17440
17440
  Me({
17441
17441
  fields: $,
17442
17442
  arch: L,
17443
- values: Ce
17443
+ values: xe
17444
17444
  }), Ae({
17445
- values: Ce,
17445
+ values: xe,
17446
17446
  fields: $,
17447
17447
  reset: !1
17448
17448
  });
17449
17449
  }
17450
17450
  if (fe.warning && fe.warning.title && fe.warning.message && !A.current) {
17451
17451
  const {
17452
- title: Ce,
17452
+ title: xe,
17453
17453
  message: Pe
17454
17454
  } = fe.warning;
17455
- A.current = !0, showDialog$4(Ce, Pe, () => {
17455
+ A.current = !0, showDialog$4(xe, Pe, () => {
17456
17456
  A.current = !1;
17457
17457
  });
17458
17458
  }
17459
17459
  if (fe.domain && Object.keys(fe.domain).length > 0) {
17460
- const Ce = mergeFieldsDomain({
17460
+ const xe = mergeFieldsDomain({
17461
17461
  fieldsDomain: fe.domain,
17462
17462
  fields: $
17463
17463
  });
17464
17464
  Me({
17465
- fields: Ce,
17465
+ fields: xe,
17466
17466
  arch: L,
17467
- values: ge(Ce)
17468
- }), B(Ce);
17467
+ values: ge(xe)
17468
+ }), B(xe);
17469
17469
  }
17470
17470
  };
17471
17471
  async function We({
@@ -17584,7 +17584,7 @@ function Form(e, t) {
17584
17584
  const Ze = () => !N && !S ? /* @__PURE__ */ jsx(Spin, {}) : !n && !m || !C ? null : /* @__PURE__ */ jsx(Fragment, {
17585
17585
  children: /* @__PURE__ */ jsx(FormProvider$1, {
17586
17586
  getValues: he,
17587
- getPlainValues: xe,
17587
+ getPlainValues: Ce,
17588
17588
  getFields: Ie,
17589
17589
  domain: g,
17590
17590
  activeId: r,
@@ -18676,7 +18676,7 @@ function SearchTree(e, t) {
18676
18676
  getResults: de,
18677
18677
  requestPageChange: Ie,
18678
18678
  changeSort: he,
18679
- fetchChildrenForRecord: xe,
18679
+ fetchChildrenForRecord: Ce,
18680
18680
  colorsForResults: ve,
18681
18681
  totalItems: Te
18682
18682
  } = useSearch({
@@ -18819,7 +18819,7 @@ function SearchTree(e, t) {
18819
18819
  },
18820
18820
  sorter: A,
18821
18821
  onChangeSort: he,
18822
- onFetchChildrenForRecord: y.isExpandable ? xe : void 0,
18822
+ onFetchChildrenForRecord: y.isExpandable ? Ce : void 0,
18823
18823
  childField: y.field_parent
18824
18824
  })]
18825
18825
  }), Re = w || pe;
@@ -21877,7 +21877,7 @@ function requireBase() {
21877
21877
  }, {
21878
21878
  key: "renderContent",
21879
21879
  value: function() {
21880
- var H = this, P = this.state, A = P.ellipsisContent, j = P.isEllipsis, K = P.expanded, X = this.props, F = X.component, T = X.children, Y = X.className, Q = X.type, ne = X.disabled, J = X.style, ee = M(X, ["component", "children", "className", "type", "disabled", "style"]), oe = this.context.direction, le = this.getEllipsis(), ae = le.rows, pe = le.suffix, me = le.tooltip, ie = this.getPrefixCls(), de = (0, v.default)(ee, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, o.default)(y.configConsumerProps))), Ie = this.canUseCSSEllipsis(), he = ae === 1 && Ie, xe = ae && ae > 1 && Ie, ve = T;
21880
+ var H = this, P = this.state, A = P.ellipsisContent, j = P.isEllipsis, K = P.expanded, X = this.props, F = X.component, T = X.children, Y = X.className, Q = X.type, ne = X.disabled, J = X.style, ee = M(X, ["component", "children", "className", "type", "disabled", "style"]), oe = this.context.direction, le = this.getEllipsis(), ae = le.rows, pe = le.suffix, me = le.tooltip, ie = this.getPrefixCls(), de = (0, v.default)(ee, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, o.default)(y.configConsumerProps))), Ie = this.canUseCSSEllipsis(), he = ae === 1 && Ie, Ce = ae && ae > 1 && Ie, ve = T;
21881
21881
  if (ae && j && !K && !Ie) {
21882
21882
  var Te = ee.title, be = Te || "";
21883
21883
  !Te && (typeof T == "string" || typeof T == "number") && (be = String(T)), be = be == null ? void 0 : be.slice(String(A || "").length), ve = /* @__PURE__ */ f.createElement(f.Fragment, null, A, /* @__PURE__ */ f.createElement("span", {
@@ -21896,9 +21896,9 @@ function requireBase() {
21896
21896
  onResize: H.resizeOnNextFrame,
21897
21897
  disabled: !ae
21898
21898
  }, /* @__PURE__ */ f.createElement(k.default, (0, s.default)({
21899
- className: (0, p.default)((ce = {}, (0, r.default)(ce, "".concat(ie, "-").concat(Q), Q), (0, r.default)(ce, "".concat(ie, "-disabled"), ne), (0, r.default)(ce, "".concat(ie, "-ellipsis"), ae), (0, r.default)(ce, "".concat(ie, "-ellipsis-single-line"), he), (0, r.default)(ce, "".concat(ie, "-ellipsis-multiple-line"), xe), ce), Y),
21899
+ className: (0, p.default)((ce = {}, (0, r.default)(ce, "".concat(ie, "-").concat(Q), Q), (0, r.default)(ce, "".concat(ie, "-disabled"), ne), (0, r.default)(ce, "".concat(ie, "-ellipsis"), ae), (0, r.default)(ce, "".concat(ie, "-ellipsis-single-line"), he), (0, r.default)(ce, "".concat(ie, "-ellipsis-multiple-line"), Ce), ce), Y),
21900
21900
  style: (0, s.default)((0, s.default)({}, J), {
21901
- WebkitLineClamp: xe ? ae : void 0
21901
+ WebkitLineClamp: Ce ? ae : void 0
21902
21902
  }),
21903
21903
  component: F,
21904
21904
  ref: H.contentRef,
@@ -22948,7 +22948,7 @@ const One2manyInput = (e) => {
22948
22948
  b(!1);
22949
22949
  }
22950
22950
  };
22951
- function xe() {
22951
+ function Ce() {
22952
22952
  const se = ViewObjects[s];
22953
22953
  if (s === "graph")
22954
22954
  return parseGraph(o.get("graph").arch).string;
@@ -23038,7 +23038,7 @@ const One2manyInput = (e) => {
23038
23038
  return O ? /* @__PURE__ */ jsx(Spin, {}) : /* @__PURE__ */ jsxs(Fragment, {
23039
23039
  children: [/* @__PURE__ */ jsx(One2manyTopBar, {
23040
23040
  mode: s,
23041
- title: xe(),
23041
+ title: Ce(),
23042
23042
  readOnly: Z,
23043
23043
  isMany2Many: A,
23044
23044
  formHasChanges: C,
@@ -27992,20 +27992,20 @@ function ActionView(e, t) {
27992
27992
  b(!0);
27993
27993
  const ie = [];
27994
27994
  for (const Ie of a) {
27995
- const [he, xe] = Ie;
27995
+ const [he, Ce] = Ie;
27996
27996
  let ve;
27997
27997
  try {
27998
- xe !== "dashboard" && (ve = await ConnectionProvider.getHandler().getView({
27998
+ Ce !== "dashboard" && (ve = await ConnectionProvider.getHandler().getView({
27999
27999
  model: r,
28000
- type: xe,
28000
+ type: Ce,
28001
28001
  id: he,
28002
28002
  context: o
28003
28003
  }));
28004
28004
  } catch (Te) {
28005
- console.error(`${r} - ${xe}\xA0- ${JSON.stringify(Te, null, 2)}`);
28005
+ console.error(`${r} - ${Ce}\xA0- ${JSON.stringify(Te, null, 2)}`);
28006
28006
  continue;
28007
28007
  }
28008
- switch (xe) {
28008
+ switch (Ce) {
28009
28009
  case "dashboard": {
28010
28010
  const Te = a.find((se) => {
28011
28011
  const [, ce] = se;
@@ -28031,20 +28031,23 @@ function ActionView(e, t) {
28031
28031
  }
28032
28032
  case "form": {
28033
28033
  ie.push({
28034
- ...ve
28034
+ ...ve,
28035
+ type: Ce
28035
28036
  });
28036
28037
  break;
28037
28038
  }
28038
28039
  case "tree": {
28039
28040
  ie.push({
28040
28041
  ...ve,
28041
- isExpandable: v
28042
+ isExpandable: v,
28043
+ type: Ce
28042
28044
  });
28043
28045
  break;
28044
28046
  }
28045
28047
  case "graph": {
28046
28048
  ie.push({
28047
- ...ve
28049
+ ...ve,
28050
+ type: Ce
28048
28051
  });
28049
28052
  break;
28050
28053
  }
@@ -28070,17 +28073,17 @@ Please, make sure the view ids on the fields_view_get responses are the same as
28070
28073
  Y === l && (I.type === "form" && !await A.current.cancelUnsavedChanges() || z(!0));
28071
28074
  }
28072
28075
  async function ae(ie) {
28073
- var xe;
28076
+ var Ce;
28074
28077
  Z(!0);
28075
28078
  const de = M.findIndex((ve) => ve.id === ie);
28076
28079
  let Ie;
28077
28080
  if (de === -1) {
28078
28081
  try {
28079
- Ie = (xe = await ConnectionProvider.getHandler().readObjects({
28082
+ Ie = (Ce = await ConnectionProvider.getHandler().readObjects({
28080
28083
  model: r,
28081
28084
  ids: [ie],
28082
28085
  context: o
28083
- })) == null ? void 0 : xe[0];
28086
+ })) == null ? void 0 : Ce[0];
28084
28087
  } catch {
28085
28088
  }
28086
28089
  if (!Ie) {