@gisce/react-ooui 2.2.0-rc.3 → 2.2.0-rc.5

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":"useExport.d.ts","sourceRoot":"","sources":["../../src/hooks/useExport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EAEtB,MAAM,iCAAiC,CAAC;AAMzC,eAAO,MAAM,SAAS;WAQb,MAAM;aACJ,GAAG;;YAEJ,GAAG,EAAE;;aAEJ,MAAM,IAAI;;;;;;;;;4BA4DL,MAAM;;;;;;;wBArDF,aAAa;;;;;;;;;;;;sCAiHb,gBAAgB;;;;;wCAoChB,gBAAgB;CAmCnC,CAAC"}
1
+ {"version":3,"file":"useExport.d.ts","sourceRoot":"","sources":["../../src/hooks/useExport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EAEtB,MAAM,iCAAiC,CAAC;AAMzC,eAAO,MAAM,SAAS;WAQb,MAAM;aACJ,GAAG;;YAEJ,GAAG,EAAE;;aAEJ,MAAM,IAAI;;;;;;;;;4BA4DL,MAAM;;;;;;;wBArDF,aAAa;;;;;;;;;;;;sCA6Ib,gBAAgB;;;;;wCA5BhB,gBAAgB;CAuEnC,CAAC"}
@@ -6104,7 +6104,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
6104
6104
  const b = await Vt(T);
6105
6105
  gn(T, b.mime);
6106
6106
  },
6107
- [e, i, o, t, s]
6107
+ [i, n, e, o, t, s, d]
6108
6108
  ), f = be(async () => {
6109
6109
  const y = await N.getHandler().getFields({
6110
6110
  model: e,
@@ -6129,7 +6129,7 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
6129
6129
  parentKey: y
6130
6130
  });
6131
6131
  },
6132
- [a.current, e, t]
6132
+ [t]
6133
6133
  ), m = be(async () => {
6134
6134
  const y = await mc({ model: e, context: t }), v = await pc({
6135
6135
  predefinedExports: y,
@@ -6149,9 +6149,30 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
6149
6149
  })),
6150
6150
  keysWithChilds: v
6151
6151
  };
6152
- }, [a.current]), p = be(
6152
+ }, [t, e, c]), p = be(
6153
6153
  async (y) => {
6154
- const v = await g("ir.exports"), T = await g("ir.exports.line"), b = await N.getHandler().create({
6154
+ await N.getHandler().deleteObjects({
6155
+ model: "ir.exports",
6156
+ ids: [y.id],
6157
+ context: t
6158
+ });
6159
+ },
6160
+ [t]
6161
+ ), h = be(
6162
+ async (y) => {
6163
+ if (l.current.has(y))
6164
+ return l.current.get(y);
6165
+ const v = N.getHandler().getFields({
6166
+ model: y,
6167
+ context: t,
6168
+ fields: []
6169
+ });
6170
+ l.current.set(y, v);
6171
+ },
6172
+ [l, t]
6173
+ ), g = be(
6174
+ async (y) => {
6175
+ const v = await h("ir.exports"), T = await h("ir.exports.line"), b = await N.getHandler().create({
6155
6176
  model: "ir.exports",
6156
6177
  values: {
6157
6178
  name: y.name,
@@ -6172,36 +6193,15 @@ const { useToken: sc } = He, { TextArea: En } = it, ac = (e) => {
6172
6193
  }))
6173
6194
  ), { ...y, id: b };
6174
6195
  },
6175
- []
6176
- ), h = be(
6177
- async (y) => {
6178
- await N.getHandler().deleteObjects({
6179
- model: "ir.exports",
6180
- ids: [y.id],
6181
- context: t
6182
- });
6183
- },
6184
- []
6185
- ), g = be(
6186
- async (y) => {
6187
- if (l.current.has(y))
6188
- return l.current.get(y);
6189
- const v = N.getHandler().getFields({
6190
- model: y,
6191
- context: t,
6192
- fields: []
6193
- });
6194
- l.current.set(y, v);
6195
- },
6196
- [l, t]
6196
+ [t, h, e]
6197
6197
  );
6198
6198
  return {
6199
6199
  onGetFields: f,
6200
6200
  onGetFieldChilds: c,
6201
6201
  onExport: u,
6202
6202
  onGetPredefinedExports: m,
6203
- onSavePredefinedExport: p,
6204
- onRemovePredefinedExport: h
6203
+ onSavePredefinedExport: g,
6204
+ onRemovePredefinedExport: p
6205
6205
  };
6206
6206
  }, Ir = ({
6207
6207
  fields: e,