@gisce/react-ooui 1.2.0-rc.11 → 1.2.0-rc.13
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 +3279 -3294
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +33 -33
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/views/actionViews/TreeActionView.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/views/actionViews/TreeActionView.tsx +10 -1
- package/src/widgets/containers/Group.tsx +3 -3
- package/dist/ui/Fieldset.d.ts +0 -8
- package/dist/ui/Fieldset.d.ts.map +0 -1
- package/src/ui/Fieldset.tsx +0 -31
|
@@ -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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gisce/react-ooui",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.13",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@ant-design/plots": "^1.0.9",
|
|
39
39
|
"@gisce/ooui": "^0.17.9-rc.0",
|
|
40
|
-
"@gisce/react-formiga-components": "^1.0.9-rc.
|
|
40
|
+
"@gisce/react-formiga-components": "^1.0.9-rc.10",
|
|
41
41
|
"@gisce/react-formiga-table": "^0.5.0",
|
|
42
42
|
"@monaco-editor/react": "^4.4.5",
|
|
43
43
|
"@tabler/icons": "^1.96.0",
|
|
@@ -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"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Group as GroupOoui } from "@gisce/ooui";
|
|
3
3
|
import Container from "./Container";
|
|
4
|
-
import
|
|
4
|
+
import { FieldSet } from "@gisce/react-formiga-components";
|
|
5
5
|
|
|
6
6
|
type Props = {
|
|
7
7
|
ooui: GroupOoui;
|
|
@@ -15,12 +15,12 @@ function Group(props: Props): React.ReactElement {
|
|
|
15
15
|
return (
|
|
16
16
|
<>
|
|
17
17
|
{ooui.label && showLabel ? (
|
|
18
|
-
<
|
|
18
|
+
<FieldSet label={ooui.label}>
|
|
19
19
|
<Container
|
|
20
20
|
container={ooui!.container}
|
|
21
21
|
responsiveBehaviour={responsiveBehaviour}
|
|
22
22
|
/>
|
|
23
|
-
</
|
|
23
|
+
</FieldSet>
|
|
24
24
|
) : (
|
|
25
25
|
<Container
|
|
26
26
|
container={ooui!.container}
|
package/dist/ui/Fieldset.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["Fieldset.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,QAAA,MAAM,QAAQ,UAAW,KAAK,KAAG,MAAM,YAqBtC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/src/ui/Fieldset.tsx
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type Props = {
|
|
4
|
-
label: string;
|
|
5
|
-
children: any;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const Fieldset = (props: Props): React.ReactElement => {
|
|
9
|
-
const { label, children } = props;
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
// TODO: change in-line styles to TailWind classes
|
|
13
|
-
<fieldset className="p-2 border-gray-400 border border-solid font-sans">
|
|
14
|
-
<legend
|
|
15
|
-
style={{
|
|
16
|
-
all: "initial",
|
|
17
|
-
marginLeft: "1em",
|
|
18
|
-
paddingLeft: "0.5em",
|
|
19
|
-
paddingRight: "0.5em",
|
|
20
|
-
fontFamily:
|
|
21
|
-
"system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
|
|
22
|
-
}}
|
|
23
|
-
>
|
|
24
|
-
{label}
|
|
25
|
-
</legend>
|
|
26
|
-
{children}
|
|
27
|
-
</fieldset>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default Fieldset;
|