@gisce/react-ooui 1.1.11 → 1.1.12

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.
@@ -28728,56 +28728,68 @@ function Dashboard(e, t) {
28728
28728
  };
28729
28729
  }
28730
28730
  let H = null;
28731
- (W == null ? void 0 : W.type) === "graph" ? H = /* @__PURE__ */ jsx(Graph, {
28732
- view_id: B.filter((j) => j[1] === "graph")[0][0],
28733
- model: U,
28734
- context: G,
28735
- domain: z,
28736
- limit: Z
28737
- }) : (W == null ? void 0 : W.type) === "form" ? H = /* @__PURE__ */ jsx(DashboardForm, {
28738
- model: U,
28739
- actionDomain: z
28740
- }) : (W == null ? void 0 : W.type) === "tree" ? H = /* @__PURE__ */ jsx(DashboardTree, {
28741
- model: U,
28742
- domain: z,
28743
- view_id: B.filter((j) => j[1] === "tree")[0][0],
28744
- onRowClicked: (j) => {
28745
- const K = B.find((X) => {
28746
- const [, F] = X;
28747
- return F === "form";
28748
- });
28749
- if (K) {
28750
- const [X, F] = K, {
28751
- actionId: T,
28752
- actionType: Y,
28753
- title: Q,
28754
- model: ne
28755
- } = S, J = {
28756
- action_id: T,
28757
- action_type: Y,
28758
- name: Q,
28759
- res_id: j.id,
28760
- res_model: ne,
28761
- view_id: X,
28762
- view_type: F
28763
- };
28764
- h(J);
28731
+ if ((W == null ? void 0 : W.type) === "graph")
28732
+ H = /* @__PURE__ */ jsx(Graph, {
28733
+ view_id: B.filter((j) => j[1] === "graph")[0][0],
28734
+ model: U,
28735
+ context: G,
28736
+ domain: z,
28737
+ limit: Z
28738
+ });
28739
+ else if ((W == null ? void 0 : W.type) === "form")
28740
+ H = /* @__PURE__ */ jsx(DashboardForm, {
28741
+ model: U,
28742
+ actionDomain: z
28743
+ });
28744
+ else if ((W == null ? void 0 : W.type) === "tree")
28745
+ H = /* @__PURE__ */ jsx(DashboardTree, {
28746
+ model: U,
28747
+ domain: z,
28748
+ view_id: B.filter((j) => j[1] === "tree")[0][0],
28749
+ onRowClicked: (j) => {
28750
+ const K = B.find((X) => {
28751
+ const [, F] = X;
28752
+ return F === "form";
28753
+ });
28754
+ if (K) {
28755
+ const [X, F] = K, {
28756
+ actionId: T,
28757
+ actionType: Y,
28758
+ title: Q,
28759
+ model: ne
28760
+ } = S, J = {
28761
+ action_id: T,
28762
+ action_type: Y,
28763
+ name: Q,
28764
+ res_id: j.id,
28765
+ res_model: ne,
28766
+ view_id: X,
28767
+ view_type: F
28768
+ };
28769
+ h(J);
28770
+ }
28765
28771
  }
28766
- }
28767
- }) : W !== void 0 && (H = /* @__PURE__ */ jsx(ActionView$1, {
28768
- action_id: M,
28769
- action_type: L,
28770
- tabKey: q,
28771
- title: $,
28772
- views: B,
28773
- model: U,
28774
- context: G,
28775
- domain: z,
28776
- setCanWeClose: () => {
28777
- },
28778
- initialView: W,
28779
- limit: Z
28780
- }));
28772
+ });
28773
+ else if (W !== void 0) {
28774
+ const j = W && Array.isArray(W.id) ? {
28775
+ ...W,
28776
+ id: W.id[0]
28777
+ } : W;
28778
+ H = /* @__PURE__ */ jsx(ActionView$1, {
28779
+ action_id: M,
28780
+ action_type: L,
28781
+ tabKey: q,
28782
+ title: $,
28783
+ views: B,
28784
+ model: U,
28785
+ context: G,
28786
+ domain: z,
28787
+ setCanWeClose: () => {
28788
+ },
28789
+ initialView: j,
28790
+ limit: Z
28791
+ });
28792
+ }
28781
28793
  let P;
28782
28794
  const A = B.find((j) => {
28783
28795
  const [, K] = j;
@@ -29404,7 +29416,11 @@ function RootView(e, t) {
29404
29416
  view_id: U.view_id
29405
29417
  }
29406
29418
  });
29407
- } else
29419
+ } else {
29420
+ const U = S && Array.isArray(S.id) ? {
29421
+ ...S,
29422
+ id: S.id[0]
29423
+ } : S;
29408
29424
  v({
29409
29425
  title: w,
29410
29426
  action: {
@@ -29424,7 +29440,7 @@ function RootView(e, t) {
29424
29440
  },
29425
29441
  domain: y,
29426
29442
  setCanWeClose: h,
29427
- initialView: S,
29443
+ initialView: U,
29428
29444
  res_id: D,
29429
29445
  formDefaultValues: M,
29430
29446
  formForcedValues: L,
@@ -29433,6 +29449,7 @@ function RootView(e, t) {
29433
29449
  }),
29434
29450
  key: B
29435
29451
  });
29452
+ }
29436
29453
  }
29437
29454
  return /* @__PURE__ */ jsx(LocaleContextProvider, {
29438
29455
  lang: a,