@gisce/react-ooui 1.1.11 → 1.1.13-rc.0
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.
- package/dist/react-ooui.es.js +80 -60
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +15 -15
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/views/RootView.d.ts.map +1 -1
- package/dist/views/actionViews/TreeActionView.d.ts.map +1 -1
- package/dist/widgets/views/Dashboard/Dashboard.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/views/RootView.tsx +5 -1
- package/src/views/actionViews/TreeActionView.tsx +10 -1
- package/src/widgets/views/Dashboard/Dashboard.tsx +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootView.d.ts","sourceRoot":"","sources":["RootView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAcf,aAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;;
|
|
1
|
+
{"version":3,"file":"RootView.d.ts","sourceRoot":"","sources":["RootView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAcf,aAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;;AA8dF,wBAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeActionView.d.ts","sourceRoot":"","sources":["TreeActionView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"TreeActionView.d.ts","sourceRoot":"","sources":["TreeActionView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AASnD,oBAAY,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,GAAG,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,mBAAmB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,YAAY,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACrC,cAAc,EAAE,IAAI,EAAE,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,mBAAmB,uBA2DxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAY,MAAM,SAAS,CAAC;;
|
|
1
|
+
{"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["Dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAY,MAAM,SAAS,CAAC;;AAsWnD,wBAAqC"}
|
package/package.json
CHANGED
package/src/views/RootView.tsx
CHANGED
|
@@ -437,6 +437,10 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
437
437
|
},
|
|
438
438
|
});
|
|
439
439
|
} else {
|
|
440
|
+
const formattedInitialView = initialView && Array.isArray(initialView.id)
|
|
441
|
+
? { ...initialView, id: initialView.id[0] }
|
|
442
|
+
: initialView;
|
|
443
|
+
|
|
440
444
|
addNewTab({
|
|
441
445
|
title,
|
|
442
446
|
action: {
|
|
@@ -454,7 +458,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
454
458
|
context={{ ...rootContext, ...context }}
|
|
455
459
|
domain={domain}
|
|
456
460
|
setCanWeClose={registerViewCloseFn}
|
|
457
|
-
initialView={
|
|
461
|
+
initialView={formattedInitialView}
|
|
458
462
|
res_id={res_id}
|
|
459
463
|
formDefaultValues={values}
|
|
460
464
|
formForcedValues={forced_values}
|
|
@@ -2,7 +2,11 @@ import TreeActionBar from "@/actionbar/TreeActionBar";
|
|
|
2
2
|
import { FormView, TreeView, View } from "@/types";
|
|
3
3
|
import TitleHeader from "@/ui/TitleHeader";
|
|
4
4
|
import SearchTree from "@/widgets/views/SearchTree";
|
|
5
|
-
import React from "react";
|
|
5
|
+
import React, { useContext } from "react";
|
|
6
|
+
import {
|
|
7
|
+
ActionViewContext,
|
|
8
|
+
ActionViewContextType,
|
|
9
|
+
} from "@/context/ActionViewContext";
|
|
6
10
|
|
|
7
11
|
export type TreeActionViewProps = {
|
|
8
12
|
formView?: FormView;
|
|
@@ -38,6 +42,10 @@ export const TreeActionView = (props: TreeActionViewProps) => {
|
|
|
38
42
|
searchTreeNameSearch,
|
|
39
43
|
} = props;
|
|
40
44
|
|
|
45
|
+
const { currentView, setPreviousView } = useContext(
|
|
46
|
+
ActionViewContext
|
|
47
|
+
) as ActionViewContextType;
|
|
48
|
+
|
|
41
49
|
if (!visible) {
|
|
42
50
|
return null;
|
|
43
51
|
}
|
|
@@ -66,6 +74,7 @@ export const TreeActionView = (props: TreeActionViewProps) => {
|
|
|
66
74
|
const itemIndex = results.findIndex((item: any) => {
|
|
67
75
|
return item.id === id;
|
|
68
76
|
});
|
|
77
|
+
setPreviousView?.(currentView);
|
|
69
78
|
setCurrentItemIndex(itemIndex);
|
|
70
79
|
const formView = availableViews.find(
|
|
71
80
|
(v) => v.type === "form"
|
|
@@ -308,6 +308,10 @@ function Dashboard(props: DashboardProps, ref: any) {
|
|
|
308
308
|
/>
|
|
309
309
|
);
|
|
310
310
|
} else if (initialView !== undefined) {
|
|
311
|
+
const formattedInitialView =
|
|
312
|
+
initialView && Array.isArray(initialView.id)
|
|
313
|
+
? { ...initialView, id: initialView.id[0] }
|
|
314
|
+
: initialView;
|
|
311
315
|
childContent = (
|
|
312
316
|
<ActionView
|
|
313
317
|
action_id={actionId}
|
|
@@ -319,7 +323,7 @@ function Dashboard(props: DashboardProps, ref: any) {
|
|
|
319
323
|
context={context}
|
|
320
324
|
domain={domain}
|
|
321
325
|
setCanWeClose={() => {}}
|
|
322
|
-
initialView={
|
|
326
|
+
initialView={formattedInitialView}
|
|
323
327
|
limit={limit}
|
|
324
328
|
/>
|
|
325
329
|
);
|