@gisce/react-ooui 2.0.0-rc.3 → 2.0.0-rc.4
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/helpers/treeHelper.d.ts +2 -1
- package/dist/helpers/treeHelper.d.ts.map +1 -1
- package/dist/hooks/useSearch.d.ts.map +1 -1
- package/dist/react-ooui.es.js +4083 -4038
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +11 -11
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/views/actionViews/GraphActionView.d.ts.map +1 -1
- package/dist/widgets/base/Integer.d.ts.map +1 -1
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +1 -1
- package/dist/widgets/base/one2many/One2manyInput.d.ts.map +1 -1
- package/dist/widgets/views/Form.d.ts +2 -2
- package/dist/widgets/views/Form.d.ts.map +1 -1
- package/dist/widgets/views/SearchTree.d.ts.map +1 -1
- package/dist/widgets/views/Tree.d.ts.map +1 -1
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts +0 -1
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/actionbar/FormActionBar.tsx +1 -1
- package/src/actionbar/TreeActionBar.tsx +1 -1
- package/src/context/ContentRootContext.tsx +1 -1
- package/src/helpers/treeHelper.ts +14 -3
- package/src/hooks/useExport.ts +2 -3
- package/src/hooks/useSearch.ts +1 -0
- package/src/stories/mocks/models/cups.ts +16 -3
- package/src/types/index.ts +1 -1
- package/src/views/actionViews/GraphActionView.tsx +0 -1
- package/src/widgets/base/Integer.tsx +14 -1
- package/src/widgets/base/many2one/Many2oneSuffix.tsx +24 -12
- package/src/widgets/base/one2many/One2manyInput.tsx +11 -3
- package/src/widgets/views/Form.tsx +65 -8
- package/src/widgets/views/SearchTree.tsx +2 -3
- package/src/widgets/views/Tree.tsx +17 -7
- package/src/widgets/views/searchFilter/SearchFilter.tsx +1 -3
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
2
2
|
import { Pagination, Checkbox, Space, Row, Col, Spin, Tag, Badge } from "antd";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
getTree,
|
|
5
|
+
getTableColumns,
|
|
6
|
+
getTableItems,
|
|
7
|
+
hasActualValues,
|
|
8
|
+
} from "@/helpers/treeHelper";
|
|
4
9
|
import { Tree as TreeOoui } from "@gisce/ooui";
|
|
5
10
|
|
|
6
11
|
import { TreeView, Column } from "@/types";
|
|
@@ -348,13 +353,18 @@ function Tree(props: Props): React.ReactElement {
|
|
|
348
353
|
}
|
|
349
354
|
return undefined;
|
|
350
355
|
}}
|
|
351
|
-
onRowStatus={
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
356
|
+
onRowStatus={
|
|
357
|
+
hasActualValues(statusForResults)
|
|
358
|
+
? (record: any) => {
|
|
359
|
+
if (statusForResults![record.id]) {
|
|
360
|
+
return <Badge color={statusForResults[record.id]} />;
|
|
361
|
+
}
|
|
362
|
+
return undefined;
|
|
363
|
+
}
|
|
364
|
+
: undefined
|
|
365
|
+
}
|
|
357
366
|
onRowDoubleClick={onRowClicked}
|
|
367
|
+
selectionRowKeys={rowSelection?.selectedRowKeys}
|
|
358
368
|
onRowSelectionChange={rowSelection?.onChange}
|
|
359
369
|
onChangeSort={onChangeSort}
|
|
360
370
|
sorter={sorter}
|
|
@@ -31,7 +31,6 @@ type Props = {
|
|
|
31
31
|
searchError?: string;
|
|
32
32
|
searchValues?: any;
|
|
33
33
|
showLimitOptions?: boolean;
|
|
34
|
-
formXml: string;
|
|
35
34
|
};
|
|
36
35
|
|
|
37
36
|
function SearchFilter(props: Props) {
|
|
@@ -49,7 +48,6 @@ function SearchFilter(props: Props) {
|
|
|
49
48
|
searchError,
|
|
50
49
|
searchValues,
|
|
51
50
|
showLimitOptions = true,
|
|
52
|
-
formXml,
|
|
53
51
|
} = props;
|
|
54
52
|
|
|
55
53
|
const [simpleSearchFields, setSimpleSearchFields] = useState<Container>();
|
|
@@ -89,7 +87,7 @@ function SearchFilter(props: Props) {
|
|
|
89
87
|
|
|
90
88
|
useDeepCompareEffect(() => {
|
|
91
89
|
setAdvancedFilter(false);
|
|
92
|
-
sfo.current = new SearchFilterOoui(searchFields, fields
|
|
90
|
+
sfo.current = new SearchFilterOoui(searchFields, fields);
|
|
93
91
|
sfo.current.parse();
|
|
94
92
|
setSimpleSearchFields(sfo.current._simpleSearchContainer);
|
|
95
93
|
setAdvancedSearchFields(sfo.current._advancedSearchContainer);
|