@gisce/react-ooui 1.1.34-rc.0 → 1.1.34

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.
@@ -1 +1 @@
1
- {"version":3,"file":"FormActionBar.d.ts","sourceRoot":"","sources":["FormActionBar.tsx"],"names":[],"mappings":";AA0CA,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,sBAganD;AAMD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"FormActionBar.d.ts","sourceRoot":"","sources":["FormActionBar.tsx"],"names":[],"mappings":";AA0CA,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,sBAsbnD;AAyBD,eAAe,aAAa,CAAC"}
@@ -9,7 +9,10 @@ export declare type ActionViewContextType = {
9
9
  setFormIsSaving?: (value: boolean) => void;
10
10
  formHasChanges?: boolean;
11
11
  setFormHasChanges?: (value: boolean) => void;
12
- onFormSave?: () => Promise<void>;
12
+ onFormSave?: () => Promise<{
13
+ succeed: boolean;
14
+ id: number;
15
+ }>;
13
16
  formRef?: any;
14
17
  searchTreeRef?: any;
15
18
  onNewClicked: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ActionViewContext.d.ts","sourceRoot":"","sources":["ActionViewContext.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,oBAAY,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,IAAI,EAAE,CAAC;IACvB,WAAW,EAAE,IAAI,CAAC;IAClB,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,K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AAK,IAAI,CAAC;IAC5C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,6CAC2B,CAAC;AAE1D,aAAK,uBAAuB,GAAG,qBAAqB,GAAG;IACrD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,kBAAkB,UAAW,uBAAuB,KAAG,GA6I5D,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -19,7 +19,10 @@ export declare type FormContextType = {
19
19
  domain: any[];
20
20
  submitForm?: (options?: {
21
21
  callOnSubmitSucceed?: boolean;
22
- }) => Promise<boolean>;
22
+ }) => Promise<{
23
+ succeed: boolean;
24
+ id: number;
25
+ }>;
23
26
  fetchValues?: () => void;
24
27
  formHasChanges?: () => boolean;
25
28
  elementHasLostFocus?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"FormContext.d.ts","sourceRoot":"","sources":["FormContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,oBAAY,eAAe,GAAG;IAC5B,QAAQ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MAAM,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,WAAW,uCAAoD,CAAC;AAE7E,aAAK,iBAAiB,GAAG,eAAe,GAAG;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,YAAY,UAAW,iBAAiB,KAAG,GA2ChD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -9774,8 +9774,8 @@ function require_stream_readable() {
9774
9774
  J.pipesCount += 1, l("pipe count=%d opts=%j", J.pipesCount, O);
9775
9775
  var ee = (!O || O.end !== !1) && P !== process.stdout && P !== process.stderr, Q = ee ? te : he;
9776
9776
  J.endEmitted ? process.nextTick(Q) : X.once("end", Q), P.on("unpipe", ie);
9777
- function ie(ge, pe) {
9778
- l("onunpipe"), ge === X && pe && pe.hasUnpiped === !1 && (pe.hasUnpiped = !0, _e());
9777
+ function ie(ge, fe) {
9778
+ l("onunpipe"), ge === X && fe && fe.hasUnpiped === !1 && (fe.hasUnpiped = !0, _e());
9779
9779
  }
9780
9780
  function te() {
9781
9781
  l("onend"), P.end();
@@ -9784,26 +9784,26 @@ function require_stream_readable() {
9784
9784
  P.on("drain", oe);
9785
9785
  var se = !1;
9786
9786
  function _e() {
9787
- l("cleanup"), P.removeListener("close", me), P.removeListener("finish", fe), P.removeListener("drain", oe), P.removeListener("error", ae), P.removeListener("unpipe", ie), X.removeListener("end", te), X.removeListener("end", he), X.removeListener("data", Ce), se = !0, J.awaitDrain && (!P._writableState || P._writableState.needDrain) && oe();
9787
+ l("cleanup"), P.removeListener("close", me), P.removeListener("finish", pe), P.removeListener("drain", oe), P.removeListener("error", ae), P.removeListener("unpipe", ie), X.removeListener("end", te), X.removeListener("end", he), X.removeListener("data", Ce), se = !0, J.awaitDrain && (!P._writableState || P._writableState.needDrain) && oe();
9788
9788
  }
9789
9789
  X.on("data", Ce);
9790
9790
  function Ce(ge) {
9791
9791
  l("ondata");
9792
- var pe = P.write(ge);
9793
- l("dest.write", pe), pe === !1 && ((J.pipesCount === 1 && J.pipes === P || J.pipesCount > 1 && Z(J.pipes, P) !== -1) && !se && (l("false write response, pause", J.awaitDrain), J.awaitDrain++), X.pause());
9792
+ var fe = P.write(ge);
9793
+ l("dest.write", fe), fe === !1 && ((J.pipesCount === 1 && J.pipes === P || J.pipesCount > 1 && Z(J.pipes, P) !== -1) && !se && (l("false write response, pause", J.awaitDrain), J.awaitDrain++), X.pause());
9794
9794
  }
9795
9795
  function ae(ge) {
9796
9796
  l("onerror", ge), he(), P.removeListener("error", ae), t(P, "error") === 0 && C(P, ge);
9797
9797
  }
9798
9798
  F(P, "error", ae);
9799
9799
  function me() {
9800
- P.removeListener("finish", fe), he();
9800
+ P.removeListener("finish", pe), he();
9801
9801
  }
9802
9802
  P.once("close", me);
9803
- function fe() {
9803
+ function pe() {
9804
9804
  l("onfinish"), P.removeListener("close", me), he();
9805
9805
  }
9806
- P.once("finish", fe);
9806
+ P.once("finish", pe);
9807
9807
  function he() {
9808
9808
  l("unpipe"), X.unpipe(P);
9809
9809
  }
@@ -13076,8 +13076,8 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
13076
13076
  he === -1 ? y == null || y(0) : y == null || y(he);
13077
13077
  } else
13078
13078
  y == null || y(void 0);
13079
- const fe = await _e;
13080
- W(fe), d == null || d(fe);
13079
+ const pe = await _e;
13080
+ W(pe), d == null || d(pe);
13081
13081
  },
13082
13082
  [
13083
13083
  y,
@@ -13242,7 +13242,7 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
13242
13242
  }, [r]);
13243
13243
  const te = async () => {
13244
13244
  var oe;
13245
- await ((oe = s.current) == null ? void 0 : oe.submitForm());
13245
+ return await ((oe = s.current) == null ? void 0 : oe.submitForm());
13246
13246
  };
13247
13247
  return /* @__PURE__ */ jsx(ActionViewContext.Provider, {
13248
13248
  value: {
@@ -13671,14 +13671,14 @@ function Form(e, t) {
13671
13671
  elementHasLostFocus: !0
13672
13672
  }), U(!1));
13673
13673
  }, [K]);
13674
- const fe = (ne, re, ce) => {
13674
+ const pe = (ne, re, ce) => {
13675
13675
  Q == null || Q(!1), ee == null || ee(!1), o == null || o(ne, re, ce), ie == null || ie(ne);
13676
13676
  }, he = () => {
13677
13677
  ee == null || ee(!1), a == null || a();
13678
13678
  }, ge = (ne) => {
13679
13679
  ee == null || ee(!1), c == null || c(ne);
13680
13680
  };
13681
- function pe() {
13681
+ function fe() {
13682
13682
  return n || B.current;
13683
13683
  }
13684
13684
  function Te() {
@@ -13717,15 +13717,15 @@ function Form(e, t) {
13717
13717
  }
13718
13718
  function ve() {
13719
13719
  return {
13720
- id: pe(),
13721
- active_id: pe(),
13722
- active_ids: [pe()],
13720
+ id: fe(),
13721
+ active_id: fe(),
13722
+ active_ids: [fe()],
13723
13723
  parent_id: O,
13724
13724
  ...me
13725
13725
  };
13726
13726
  }
13727
13727
  const we = async (ne) => {
13728
- const re = pe() ? M == null ? void 0 : M.context : {};
13728
+ const re = fe() ? M == null ? void 0 : M.context : {};
13729
13729
  return await ConnectionProvider.getHandler().defaultGet({
13730
13730
  model: r,
13731
13731
  fields: ne,
@@ -13849,15 +13849,15 @@ function Form(e, t) {
13849
13849
  arch: re
13850
13850
  }) => {
13851
13851
  let ce = {}, de = !1;
13852
- if (pe()) {
13852
+ if (fe()) {
13853
13853
  ce = (await ConnectionProvider.getHandler().readObjects({
13854
13854
  model: r,
13855
- ids: [pe()],
13855
+ ids: [fe()],
13856
13856
  fields: ne,
13857
13857
  context: g
13858
13858
  }))[0];
13859
13859
  const xe = await ConnectionProvider.getHandler().search({
13860
- params: [["res_model", "=", r], ["res_id", "=", pe()]],
13860
+ params: [["res_model", "=", r], ["res_id", "=", fe()]],
13861
13861
  fields: ["id", "name"],
13862
13862
  context: ye(),
13863
13863
  model: "ir.attachment"
@@ -13873,7 +13873,7 @@ function Form(e, t) {
13873
13873
  const {
13874
13874
  callOnSubmitSucceed: re = !0
13875
13875
  } = ne || {};
13876
- if (pe()) {
13876
+ if (fe()) {
13877
13877
  const ce = getTouchedValues({
13878
13878
  source: k.current,
13879
13879
  target: Ee(A),
@@ -13881,7 +13881,7 @@ function Form(e, t) {
13881
13881
  });
13882
13882
  await ConnectionProvider.getHandler().update({
13883
13883
  model: r,
13884
- id: pe(),
13884
+ id: fe(),
13885
13885
  values: {
13886
13886
  ...ce,
13887
13887
  ...E
@@ -13907,21 +13907,27 @@ function Form(e, t) {
13907
13907
  });
13908
13908
  B.current = de, k.current = ce;
13909
13909
  }
13910
- y && await y([pe()]), !b && re && (fe == null || fe(pe(), be(), ue()));
13910
+ y && await y([fe()]), !b && re && (pe == null || pe(fe(), be(), ue()));
13911
13911
  }, He = async (ne) => {
13912
13912
  const {
13913
13913
  callOnSubmitSucceed: re = !0
13914
13914
  } = ne || {};
13915
- !b && re && (fe == null || fe(pe(), be(), ue()));
13915
+ !b && re && (pe == null || pe(fe(), be(), ue()));
13916
13916
  }, Ae = async (ne) => {
13917
13917
  let re = !1;
13918
13918
  const {
13919
13919
  callOnSubmitSucceed: ce = !0
13920
13920
  } = ne || {};
13921
- if (G.current = !0, q(void 0), !Re() && pe() && ce)
13922
- return G.current = !1, Q == null || Q(!1), he == null || he(), !0;
13921
+ if (G.current = !0, q(void 0), !Re() && fe() && ce)
13922
+ return G.current = !1, Q == null || Q(!1), he == null || he(), {
13923
+ succeed: !0,
13924
+ id: fe()
13925
+ };
13923
13926
  if (await Oe())
13924
- return G.current = !1, showDialog$5(w), !1;
13927
+ return G.current = !1, showDialog$5(w), {
13928
+ succeed: !1,
13929
+ id: fe()
13930
+ };
13925
13931
  T(!0), ee == null || ee(!0);
13926
13932
  try {
13927
13933
  p === "api" ? await Be(ne) : await He(ne), f && (B.current = void 0, Me({
@@ -13934,7 +13940,10 @@ function Form(e, t) {
13934
13940
  } finally {
13935
13941
  G.current = !1, ee == null || ee(!1), T(!1);
13936
13942
  }
13937
- return re;
13943
+ return {
13944
+ succeed: re,
13945
+ id: fe()
13946
+ };
13938
13947
  }, Ie = ({
13939
13948
  fields: ne,
13940
13949
  arch: re,
@@ -14003,7 +14012,7 @@ function Form(e, t) {
14003
14012
  }), de = await ConnectionProvider.getHandler().executeOnChange({
14004
14013
  model: r,
14005
14014
  action: re.method,
14006
- ids: pe() ? [pe()] : [],
14015
+ ids: fe() ? [fe()] : [],
14007
14016
  payload: ce,
14008
14017
  fields: A
14009
14018
  });
@@ -14050,7 +14059,7 @@ function Form(e, t) {
14050
14059
  const ce = await ConnectionProvider.getHandler().execute({
14051
14060
  model: r,
14052
14061
  action: ne,
14053
- payload: [pe()],
14062
+ payload: [fe()],
14054
14063
  context: {
14055
14064
  ...re,
14056
14065
  ...M == null ? void 0 : M.context,
@@ -14058,9 +14067,9 @@ function Form(e, t) {
14058
14067
  }
14059
14068
  });
14060
14069
  if (typeof ce == "object" && ce !== null && Object.keys(ce).length === 0 && b)
14061
- fe == null || fe(pe(), be(), ue());
14070
+ pe == null || pe(fe(), be(), ue());
14062
14071
  else if (ce.type && ce.type === "ir.actions.act_window_close")
14063
- fe == null || fe(pe(), be(), ue());
14072
+ pe == null || pe(fe(), be(), ue());
14064
14073
  else if (ce.type) {
14065
14074
  let de = {};
14066
14075
  ce.context && (de = parseContext({
@@ -14083,9 +14092,9 @@ function Form(e, t) {
14083
14092
  const re = await ConnectionProvider.getHandler().executeWorkflow({
14084
14093
  model: r,
14085
14094
  action: ne,
14086
- payload: pe()
14095
+ payload: fe()
14087
14096
  });
14088
- re.type && re.type === "ir.actions.act_window_close" ? fe == null || fe(pe(), be(), ue()) : await Fe();
14097
+ re.type && re.type === "ir.actions.act_window_close" ? pe == null || pe(fe(), be(), ue()) : await Fe();
14089
14098
  }
14090
14099
  async function Ze({
14091
14100
  action: ne,
@@ -14120,7 +14129,7 @@ function Form(e, t) {
14120
14129
  Fe();
14121
14130
  }
14122
14131
  })) || {};
14123
- !_ && ce && (fe == null || fe(pe(), be(), ue()));
14132
+ !_ && ce && (pe == null || pe(fe(), be(), ue()));
14124
14133
  }
14125
14134
  function Qe() {
14126
14135
  De({
@@ -15309,10 +15318,10 @@ function SearchTree(e, t) {
15309
15318
  page: Ce,
15310
15319
  offset: ae,
15311
15320
  getResults: me,
15312
- requestPageChange: fe,
15321
+ requestPageChange: pe,
15313
15322
  changeSort: he,
15314
15323
  fetchChildrenForRecord: ge,
15315
- colorsForResults: pe,
15324
+ colorsForResults: fe,
15316
15325
  totalItems: Te
15317
15326
  } = useSearch({
15318
15327
  model: v,
@@ -15444,11 +15453,11 @@ function SearchTree(e, t) {
15444
15453
  page: Ce,
15445
15454
  treeView: _,
15446
15455
  results: me(),
15447
- onRequestPageChange: fe,
15456
+ onRequestPageChange: pe,
15448
15457
  loading: oe,
15449
15458
  onRowClicked: ve,
15450
15459
  scrollY: u || Re(),
15451
- colorsForResults: pe,
15460
+ colorsForResults: fe,
15452
15461
  rowSelection: {
15453
15462
  selectedRowKeys: z == null ? void 0 : z.map((Se) => Se.id),
15454
15463
  onChange: we
@@ -18515,18 +18524,18 @@ function requireBase() {
18515
18524
  }, {
18516
18525
  key: "renderContent",
18517
18526
  value: function() {
18518
- var B = this, k = this.state, $ = k.ellipsisContent, L = k.isEllipsis, G = k.expanded, Z = this.props, P = Z.component, O = Z.children, X = Z.className, J = Z.type, ee = Z.disabled, Q = Z.style, ie = D(Z, ["component", "children", "className", "type", "disabled", "style"]), te = this.context.direction, oe = this.getEllipsis(), se = oe.rows, _e = oe.suffix, Ce = oe.tooltip, ae = this.getPrefixCls(), me = (0, y.default)(ie, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, a.default)(_.configConsumerProps))), fe = this.canUseCSSEllipsis(), he = se === 1 && fe, ge = se && se > 1 && fe, pe = O;
18519
- if (se && L && !G && !fe) {
18527
+ var B = this, k = this.state, $ = k.ellipsisContent, L = k.isEllipsis, G = k.expanded, Z = this.props, P = Z.component, O = Z.children, X = Z.className, J = Z.type, ee = Z.disabled, Q = Z.style, ie = D(Z, ["component", "children", "className", "type", "disabled", "style"]), te = this.context.direction, oe = this.getEllipsis(), se = oe.rows, _e = oe.suffix, Ce = oe.tooltip, ae = this.getPrefixCls(), me = (0, y.default)(ie, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, a.default)(_.configConsumerProps))), pe = this.canUseCSSEllipsis(), he = se === 1 && pe, ge = se && se > 1 && pe, fe = O;
18528
+ if (se && L && !G && !pe) {
18520
18529
  var Te = ie.title, be = Te || "";
18521
- !Te && (typeof O == "string" || typeof O == "number") && (be = String(O)), be = be == null ? void 0 : be.slice(String($ || "").length), pe = /* @__PURE__ */ f.createElement(f.Fragment, null, $, /* @__PURE__ */ f.createElement("span", {
18530
+ !Te && (typeof O == "string" || typeof O == "number") && (be = String(O)), be = be == null ? void 0 : be.slice(String($ || "").length), fe = /* @__PURE__ */ f.createElement(f.Fragment, null, $, /* @__PURE__ */ f.createElement("span", {
18522
18531
  title: be,
18523
18532
  "aria-hidden": "true"
18524
- }, A), _e), Ce && (pe = /* @__PURE__ */ f.createElement(T.default, {
18533
+ }, A), _e), Ce && (fe = /* @__PURE__ */ f.createElement(T.default, {
18525
18534
  title: Ce === !0 ? O : Ce
18526
- }, /* @__PURE__ */ f.createElement("span", null, pe)));
18535
+ }, /* @__PURE__ */ f.createElement("span", null, fe)));
18527
18536
  } else
18528
- pe = /* @__PURE__ */ f.createElement(f.Fragment, null, O, _e);
18529
- return pe = V(this.props, pe), /* @__PURE__ */ f.createElement(C.default, {
18537
+ fe = /* @__PURE__ */ f.createElement(f.Fragment, null, O, _e);
18538
+ return fe = V(this.props, fe), /* @__PURE__ */ f.createElement(C.default, {
18530
18539
  componentName: "Text"
18531
18540
  }, function(le) {
18532
18541
  var ue, ye = le.edit, ve = le.copy, we = le.copied, Re = le.expand;
@@ -18541,7 +18550,7 @@ function requireBase() {
18541
18550
  component: P,
18542
18551
  ref: B.contentRef,
18543
18552
  direction: te
18544
- }, me), pe, B.renderOperations()));
18553
+ }, me), fe, B.renderOperations()));
18545
18554
  });
18546
18555
  }
18547
18556
  }, {
@@ -19545,7 +19554,7 @@ const One2manyInput = (e) => {
19545
19554
  });
19546
19555
  }
19547
19556
  Z(ve), V || T(!1);
19548
- }, fe = (le) => {
19557
+ }, pe = (le) => {
19549
19558
  const {
19550
19559
  id: ue
19551
19560
  } = le;
@@ -19596,7 +19605,7 @@ const One2manyInput = (e) => {
19596
19605
  return ue.parse(a.get(s).arch), ue.string;
19597
19606
  }
19598
19607
  }
19599
- const pe = () => {
19608
+ const fe = () => {
19600
19609
  var ue, ye, ve, we;
19601
19610
  if (s === "form")
19602
19611
  return G.length === 0 ? g("noCurrentEntries") : /* @__PURE__ */ jsx(Form$1, {
@@ -19643,7 +19652,7 @@ const One2manyInput = (e) => {
19643
19652
  treeView: a.get("tree"),
19644
19653
  results: le,
19645
19654
  loading: C,
19646
- onRowClicked: ((we = a.get("form")) == null ? void 0 : we.fields) !== void 0 ? fe : void 0,
19655
+ onRowClicked: ((we = a.get("form")) == null ? void 0 : we.fields) !== void 0 ? pe : void 0,
19647
19656
  showPagination: !1,
19648
19657
  rowSelection: {
19649
19658
  selectedRowKeys: j,
@@ -19696,7 +19705,7 @@ const One2manyInput = (e) => {
19696
19705
  selectedRowKeys: j,
19697
19706
  showCreateButton: ((be = a.get("form")) == null ? void 0 : be.fields) !== void 0,
19698
19707
  showToggleButton: a.size > 1
19699
- }), pe(), /* @__PURE__ */ jsx(FormModal, {
19708
+ }), fe(), /* @__PURE__ */ jsx(FormModal, {
19700
19709
  formView: a.get("form"),
19701
19710
  model: U,
19702
19711
  id: M == null ? void 0 : M.id,
@@ -23374,7 +23383,10 @@ function FormActionBar({
23374
23383
  tooltip: S("actions"),
23375
23384
  items: e == null ? void 0 : e.action,
23376
23385
  onItemClick: async (k) => {
23377
- !k || !await (a == null ? void 0 : a()) || B(k);
23386
+ !k || !(await saveNewDocumentIfNeeded({
23387
+ onFormSave: a,
23388
+ currentId: u
23389
+ })).succeed || B(k);
23378
23390
  }
23379
23391
  }), /* @__PURE__ */ jsx(DropdownButton, {
23380
23392
  icon: /* @__PURE__ */ jsx(PrinterOutlined, {}),
@@ -23382,11 +23394,17 @@ function FormActionBar({
23382
23394
  tooltip: S("reports"),
23383
23395
  items: e == null ? void 0 : e.print,
23384
23396
  onItemClick: async (k) => {
23385
- !k || !await (a == null ? void 0 : a()) || B({
23397
+ if (!k)
23398
+ return;
23399
+ const $ = await saveNewDocumentIfNeeded({
23400
+ onFormSave: a,
23401
+ currentId: u
23402
+ });
23403
+ !$.succeed || B({
23386
23404
  ...k,
23387
23405
  datas: {
23388
23406
  ...k.datas || {},
23389
- ids: [u]
23407
+ ids: [$.currentId]
23390
23408
  }
23391
23409
  });
23392
23410
  }
@@ -23396,7 +23414,10 @@ function FormActionBar({
23396
23414
  tooltip: S("related"),
23397
23415
  items: e == null ? void 0 : e.relate,
23398
23416
  onItemClick: async (k) => {
23399
- !k || !await (a == null ? void 0 : a()) || D({
23417
+ !k || !(await saveNewDocumentIfNeeded({
23418
+ onFormSave: a,
23419
+ currentId: u
23420
+ })).succeed || D({
23400
23421
  relateData: k,
23401
23422
  values: _.current.getValues(),
23402
23423
  fields: _.current.getFields(),
@@ -23408,9 +23429,13 @@ function FormActionBar({
23408
23429
  disabled: U,
23409
23430
  attachments: x,
23410
23431
  onAddNewAttachment: async () => {
23411
- if (!await (a == null ? void 0 : a()))
23432
+ const k = await saveNewDocumentIfNeeded({
23433
+ onFormSave: a,
23434
+ currentId: u
23435
+ });
23436
+ if (!k.succeed)
23412
23437
  return;
23413
- const $ = u, L = p;
23438
+ const $ = k.currentId, L = p;
23414
23439
  j({
23415
23440
  model: "ir.attachment",
23416
23441
  values: {
@@ -23424,9 +23449,13 @@ function FormActionBar({
23424
23449
  });
23425
23450
  },
23426
23451
  onListAllAttachments: async () => {
23427
- if (!await (a == null ? void 0 : a()))
23452
+ const k = await saveNewDocumentIfNeeded({
23453
+ onFormSave: a,
23454
+ currentId: u
23455
+ });
23456
+ if (!k.succeed)
23428
23457
  return;
23429
- const $ = u;
23458
+ const $ = k.currentId;
23430
23459
  j({
23431
23460
  model: "ir.attachment",
23432
23461
  domain: [["res_model", "=", `${p}`], ["res_id", "=", `${$}`]],
@@ -23434,7 +23463,10 @@ function FormActionBar({
23434
23463
  });
23435
23464
  },
23436
23465
  onViewAttachmentDetails: async (k) => {
23437
- !await (a == null ? void 0 : a()) || j({
23466
+ !(await saveNewDocumentIfNeeded({
23467
+ onFormSave: a,
23468
+ currentId: u
23469
+ })).succeed || j({
23438
23470
  model: "ir.attachment",
23439
23471
  res_id: k.id,
23440
23472
  initialViewType: "form"
@@ -23448,6 +23480,24 @@ function separator$2() {
23448
23480
  className: "inline-block w-2"
23449
23481
  });
23450
23482
  }
23483
+ async function saveNewDocumentIfNeeded({
23484
+ onFormSave: e,
23485
+ currentId: t
23486
+ }) {
23487
+ if (t !== void 0)
23488
+ return {
23489
+ succeed: !0,
23490
+ currentId: t
23491
+ };
23492
+ const r = await (e == null ? void 0 : e());
23493
+ return r != null && r.succeed ? {
23494
+ succeed: !0,
23495
+ currentId: r.id
23496
+ } : {
23497
+ succeed: !1,
23498
+ currentId: void 0
23499
+ };
23500
+ }
23451
23501
  var isURL$1 = { exports: {} }, assertString = { exports: {} };
23452
23502
  (function(e, t) {
23453
23503
  Object.defineProperty(t, "__esModule", {
@@ -24643,11 +24693,11 @@ function ActionView(e, t) {
24643
24693
  const ie = async () => {
24644
24694
  E(!0);
24645
24695
  const ae = [];
24646
- for (const fe of o) {
24647
- const [he, ge] = fe;
24648
- let pe;
24696
+ for (const pe of o) {
24697
+ const [he, ge] = pe;
24698
+ let fe;
24649
24699
  try {
24650
- ge !== "dashboard" && (pe = await ConnectionProvider.getHandler().getView({
24700
+ ge !== "dashboard" && (fe = await ConnectionProvider.getHandler().getView({
24651
24701
  model: n,
24652
24702
  type: ge,
24653
24703
  id: he,
@@ -24683,14 +24733,14 @@ function ActionView(e, t) {
24683
24733
  }
24684
24734
  case "form": {
24685
24735
  ae.push({
24686
- ...pe,
24736
+ ...fe,
24687
24737
  type: ge
24688
24738
  });
24689
24739
  break;
24690
24740
  }
24691
24741
  case "tree": {
24692
24742
  ae.push({
24693
- ...pe,
24743
+ ...fe,
24694
24744
  isExpandable: y,
24695
24745
  type: ge
24696
24746
  });
@@ -24698,7 +24748,7 @@ function ActionView(e, t) {
24698
24748
  }
24699
24749
  case "graph": {
24700
24750
  ae.push({
24701
- ...pe,
24751
+ ...fe,
24702
24752
  type: ge
24703
24753
  });
24704
24754
  break;
@@ -24706,14 +24756,14 @@ function ActionView(e, t) {
24706
24756
  }
24707
24757
  }
24708
24758
  let me;
24709
- !c && ae.find((fe) => fe.type === "tree") ? me = ae.find((he) => he.type === "tree") : c ? me = ae.find((he) => c.id ? he.type === c.type && he.view_id === c.id : he.type === c.type) : me = ae.find((he) => he.type === "form"), me || showDialog$8(`Error determining the first view to show.
24759
+ !c && ae.find((pe) => pe.type === "tree") ? me = ae.find((he) => he.type === "tree") : c ? me = ae.find((he) => c.id ? he.type === c.type && he.view_id === c.id : he.type === c.type) : me = ae.find((he) => he.type === "form"), me || showDialog$8(`Error determining the first view to show.
24710
24760
  Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), Q(me), _(ae), E(!1);
24711
24761
  };
24712
24762
  u({
24713
24763
  tabKey: l,
24714
24764
  canWeClose: te
24715
24765
  }), useEffect(() => {
24716
- const ae = x.find((fe) => fe.type === "tree"), me = x.find((fe) => c.id ? fe.type === c.type && fe.view_id === c.id : fe.type === c.type);
24766
+ const ae = x.find((pe) => pe.type === "tree"), me = x.find((pe) => c.id ? pe.type === c.type && pe.view_id === c.id : pe.type === c.type);
24717
24767
  Q(me || ae), p ? P == null || P(F) : (ee(void 0), M(void 0)), ie();
24718
24768
  }, [n, o, p]), useEffect(() => {
24719
24769
  X === l && (P == null || P(w), Z == null || Z(g));
@@ -24727,25 +24777,25 @@ Please, make sure the view ids on the fields_view_get responses are the same as
24727
24777
  async function se(ae) {
24728
24778
  var ge;
24729
24779
  K(!0);
24730
- const me = D.findIndex((pe) => pe.id === ae);
24731
- let fe;
24780
+ const me = D.findIndex((fe) => fe.id === ae);
24781
+ let pe;
24732
24782
  if (me === -1) {
24733
24783
  try {
24734
- fe = (ge = await ConnectionProvider.getHandler().readObjects({
24784
+ pe = (ge = await ConnectionProvider.getHandler().readObjects({
24735
24785
  model: n,
24736
24786
  ids: [ae],
24737
24787
  context: a
24738
24788
  })) == null ? void 0 : ge[0];
24739
24789
  } catch {
24740
24790
  }
24741
- if (!fe) {
24791
+ if (!pe) {
24742
24792
  K(!1), z(!1), showDialog$7(k("idNotFound"));
24743
24793
  return;
24744
24794
  }
24745
24795
  } else
24746
- fe = D[me];
24796
+ pe = D[me];
24747
24797
  K(!1), z(!1);
24748
- const he = o.find((pe) => pe[1] === "form");
24798
+ const he = o.find((fe) => fe[1] === "form");
24749
24799
  J({
24750
24800
  domain: [],
24751
24801
  context: a,