@itwin/tree-widget-react 0.1.1 → 0.1.2
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/lib/cjs/TreeWidget.d.ts +2 -2
- package/lib/cjs/TreeWidget.js.map +1 -1
- package/lib/cjs/components/IconButton.d.ts +2 -1
- package/lib/cjs/components/IconButton.js.map +1 -1
- package/lib/cjs/components/TreeFilteringState.d.ts +1 -1
- package/lib/cjs/components/TreeFilteringState.js.map +1 -1
- package/lib/cjs/components/TreeWidgetComponent.d.ts +1 -1
- package/lib/cjs/components/TreeWidgetComponent.js.map +1 -1
- package/lib/cjs/components/TreeWidgetControl.d.ts +4 -3
- package/lib/cjs/components/TreeWidgetControl.js +6 -4
- package/lib/cjs/components/TreeWidgetControl.js.map +1 -1
- package/lib/cjs/components/TreeWidgetUiItemsProvider.d.ts +3 -2
- package/lib/cjs/components/TreeWidgetUiItemsProvider.js +7 -8
- package/lib/cjs/components/TreeWidgetUiItemsProvider.js.map +1 -1
- package/lib/cjs/components/header/TreeHeader.d.ts +1 -1
- package/lib/cjs/components/header/TreeHeader.js.map +1 -1
- package/lib/cjs/components/search-bar/Popup.d.ts +1 -1
- package/lib/cjs/components/search-bar/Popup.js +1 -1
- package/lib/cjs/components/search-bar/Popup.js.map +1 -1
- package/lib/cjs/components/search-bar/SearchBar.d.ts +1 -1
- package/lib/cjs/components/search-bar/SearchBar.js.map +1 -1
- package/lib/cjs/components/search-bar/SearchBox.d.ts +1 -3
- package/lib/cjs/components/search-bar/SearchBox.js +4 -4
- package/lib/cjs/components/search-bar/SearchBox.js.map +1 -1
- package/lib/cjs/components/trees/CategoriesTree.d.ts +1 -1
- package/lib/cjs/components/trees/CategoriesTree.js +2 -2
- package/lib/cjs/components/trees/CategoriesTree.js.map +1 -1
- package/lib/cjs/components/trees/ClassificationsTree.d.ts +1 -1
- package/lib/cjs/components/trees/ClassificationsTree.js.map +1 -1
- package/lib/cjs/components/trees/ModelsTree.d.ts +1 -1
- package/lib/cjs/components/trees/ModelsTree.js.map +1 -1
- package/lib/cjs/components/trees/SpatialTree.d.ts +1 -1
- package/lib/cjs/components/trees/SpatialTree.js +0 -4
- package/lib/cjs/components/trees/SpatialTree.js.map +1 -1
- package/lib/cjs/components/trees/TreeWithRuleset.d.ts +3 -3
- package/lib/cjs/components/trees/TreeWithRuleset.js +6 -4
- package/lib/cjs/components/trees/TreeWithRuleset.js.map +1 -1
- package/lib/cjs/components/trees/index.js.map +1 -1
- package/lib/esm/TreeWidget.d.ts +2 -2
- package/lib/esm/TreeWidget.js +1 -1
- package/lib/esm/TreeWidget.js.map +1 -1
- package/lib/esm/components/IconButton.d.ts +2 -1
- package/lib/esm/components/IconButton.js.map +1 -1
- package/lib/esm/components/TreeFilteringState.d.ts +1 -1
- package/lib/esm/components/TreeFilteringState.js.map +1 -1
- package/lib/esm/components/TreeWidgetComponent.d.ts +1 -1
- package/lib/esm/components/TreeWidgetComponent.js +1 -1
- package/lib/esm/components/TreeWidgetComponent.js.map +1 -1
- package/lib/esm/components/TreeWidgetControl.d.ts +4 -3
- package/lib/esm/components/TreeWidgetControl.js +4 -2
- package/lib/esm/components/TreeWidgetControl.js.map +1 -1
- package/lib/esm/components/TreeWidgetUiItemsProvider.d.ts +3 -2
- package/lib/esm/components/TreeWidgetUiItemsProvider.js +4 -5
- package/lib/esm/components/TreeWidgetUiItemsProvider.js.map +1 -1
- package/lib/esm/components/header/TreeHeader.d.ts +1 -1
- package/lib/esm/components/header/TreeHeader.js.map +1 -1
- package/lib/esm/components/search-bar/Popup.d.ts +1 -1
- package/lib/esm/components/search-bar/Popup.js +1 -1
- package/lib/esm/components/search-bar/Popup.js.map +1 -1
- package/lib/esm/components/search-bar/SearchBar.d.ts +1 -1
- package/lib/esm/components/search-bar/SearchBar.js.map +1 -1
- package/lib/esm/components/search-bar/SearchBox.d.ts +1 -3
- package/lib/esm/components/search-bar/SearchBox.js +4 -4
- package/lib/esm/components/search-bar/SearchBox.js.map +1 -1
- package/lib/esm/components/trees/CategoriesTree.d.ts +1 -1
- package/lib/esm/components/trees/CategoriesTree.js +4 -4
- package/lib/esm/components/trees/CategoriesTree.js.map +1 -1
- package/lib/esm/components/trees/ClassificationsTree.d.ts +1 -1
- package/lib/esm/components/trees/ClassificationsTree.js.map +1 -1
- package/lib/esm/components/trees/ModelsTree.d.ts +1 -1
- package/lib/esm/components/trees/ModelsTree.js +1 -1
- package/lib/esm/components/trees/ModelsTree.js.map +1 -1
- package/lib/esm/components/trees/SpatialTree.d.ts +1 -1
- package/lib/esm/components/trees/SpatialTree.js +1 -5
- package/lib/esm/components/trees/SpatialTree.js.map +1 -1
- package/lib/esm/components/trees/TreeWithRuleset.d.ts +3 -3
- package/lib/esm/components/trees/TreeWithRuleset.js +7 -5
- package/lib/esm/components/trees/TreeWithRuleset.js.map +1 -1
- package/lib/esm/components/trees/index.js.map +1 -1
- package/package.json +17 -18
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React, { useCallback, useState } from "react";
|
|
6
6
|
import { usePresentationTreeNodeLoader, useUnifiedSelectionTreeEventHandler, } from "@itwin/presentation-components";
|
|
7
|
-
import {
|
|
7
|
+
import { ControlledTree, SelectionMode, useTreeModel, } from "@itwin/components-react";
|
|
8
8
|
import { Presentation } from "@itwin/presentation-frontend";
|
|
9
9
|
import "./TreeWithRulesetTree.scss";
|
|
10
10
|
import { useResizeObserver } from "@itwin/core-react";
|
|
@@ -14,7 +14,8 @@ export class TreeWithRuleset extends React.Component {
|
|
|
14
14
|
this._setRuleSet = async () => {
|
|
15
15
|
return Presentation.presentation
|
|
16
16
|
.rulesets()
|
|
17
|
-
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
18
|
+
.add(this.props.ruleSet)
|
|
18
19
|
.then((ruleset) => {
|
|
19
20
|
this._ruleset = ruleset;
|
|
20
21
|
const dataProvider = this.props.dataProvider;
|
|
@@ -36,8 +37,10 @@ export class TreeWithRuleset extends React.Component {
|
|
|
36
37
|
this.removeRuleset();
|
|
37
38
|
}
|
|
38
39
|
removeRuleset() {
|
|
39
|
-
if (this._ruleset)
|
|
40
|
-
|
|
40
|
+
if (this._ruleset) {
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
42
|
+
Presentation.presentation.rulesets().remove(this._ruleset);
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
export class SimpleTreeWithRuleset extends TreeWithRuleset {
|
|
@@ -58,7 +61,6 @@ export class SimpleTreeWithRuleset extends TreeWithRuleset {
|
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
|
-
// tslint:disable-next-line:variable-name naming-convention
|
|
62
64
|
export const ControlledTreeWrapper = (props) => {
|
|
63
65
|
const { nodeLoader } = usePresentationTreeNodeLoader({
|
|
64
66
|
imodel: props.iModel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeWithRuleset.js","sourceRoot":"","sources":["../../../../src/components/trees/TreeWithRuleset.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TreeWithRuleset.js","sourceRoot":"","sources":["../../../../src/components/trees/TreeWithRuleset.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMrD,OAAO,EACL,6BAA6B,EAC7B,mCAAmC,GACpC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,4BAA4B,CAAC;AAEpC,OAAO,EAAE,iBAAiB,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G,YAAY,CAAC,WAAW,CAAC,CAAC;IAE5C,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IACpD,KAAK,IAAI,MAAM,IAAI,CAClB,oBAAC,cAAc,IACb,KAAK,EAAE,SAAS,EAChB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,4BAA4B,EAC3C,aAAa,EAAE,aAAa,CAAC,QAAQ,EACrC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,GACd,CACH,CACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport React, { useCallback, useState } from \"react\";\nimport type { RegisteredRuleset, Ruleset } from \"@itwin/presentation-common\";\nimport type {\n IPresentationTreeDataProvider,\n PresentationTreeDataProvider,\n} from \"@itwin/presentation-components\";\nimport {\n usePresentationTreeNodeLoader,\n useUnifiedSelectionTreeEventHandler,\n} from \"@itwin/presentation-components\";\nimport {\n ControlledTree,\n SelectionMode,\n useTreeModel,\n} from \"@itwin/components-react\";\nimport { Presentation } from \"@itwin/presentation-frontend\";\nimport \"./TreeWithRulesetTree.scss\";\nimport type { IModelConnection } from \"@itwin/core-frontend\";\nimport { useResizeObserver } from \"@itwin/core-react\";\n\nexport interface ControlledTreeProps {\n iModel: IModelConnection;\n dataProvider: IPresentationTreeDataProvider;\n rulesetId: string;\n pageSize?: number;\n}\n\nexport interface TreeProps {\n imodel: IModelConnection;\n ruleSet: Ruleset;\n dataProvider: IPresentationTreeDataProvider;\n}\n\nexport interface TreeState {\n initialized: false;\n dataProvider?: IPresentationTreeDataProvider;\n}\n\nexport abstract class TreeWithRuleset<\n T extends TreeProps,\n S extends TreeState\n> extends React.Component<T, S> {\n private _ruleset?: RegisteredRuleset;\n /** @internal */\n public async componentDidMount() {\n await this._setRuleSet();\n }\n\n public async componentDidUpdate(prevProps: any) {\n if (this.props.ruleSet !== prevProps.ruleSet) {\n this.removeRuleset();\n await this._setRuleSet();\n }\n }\n\n public componentWillUnmount() {\n this.removeRuleset();\n }\n\n private removeRuleset() {\n if (this._ruleset) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Presentation.presentation.rulesets().remove(this._ruleset);\n }\n }\n\n private _setRuleSet = async () => {\n return Presentation.presentation\n .rulesets()\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n .add(this.props.ruleSet)\n .then((ruleset: RegisteredRuleset) => {\n this._ruleset = ruleset;\n const dataProvider = this.props.dataProvider;\n this.setState({ dataProvider });\n });\n };\n}\n\nexport class SimpleTreeWithRuleset extends TreeWithRuleset<\nTreeProps,\nTreeState\n> {\n constructor(props: TreeProps) {\n super(props);\n this.state = {\n initialized: false,\n };\n }\n\n public render() {\n const dataProvider = this.state\n .dataProvider as PresentationTreeDataProvider;\n if (!dataProvider) return <div />;\n else {\n return (\n <div className=\"spatial-tree\">\n <ControlledTreeWrapper\n rulesetId={this.props.ruleSet.id}\n iModel={this.props.imodel}\n dataProvider={dataProvider}\n pageSize={dataProvider.pagingSize}\n />\n </div>\n );\n }\n }\n}\n\nexport const ControlledTreeWrapper: React.FC<ControlledTreeProps> = (\n props: ControlledTreeProps\n) => {\n const { nodeLoader } = usePresentationTreeNodeLoader({\n imodel: props.iModel,\n ruleset: props.rulesetId,\n pagingSize: props.pageSize || 20,\n });\n\n const modelSource = nodeLoader.modelSource;\n const unifiedSelectionEventHandler = useUnifiedSelectionTreeEventHandler({\n nodeLoader,\n collapsedChildrenDisposalEnabled: true,\n });\n\n const [height, setHeight] = useState(0);\n const [width, setWidth] = useState(0);\n const handleResize = useCallback((w: number, h: number) => {\n setHeight(h);\n setWidth(w);\n }, []);\n const ref = useResizeObserver<HTMLDivElement>(handleResize);\n\n const treeModel = useTreeModel(modelSource);\n\n return (\n <div ref={ref} style={{ width: \"100%\", height: \"100%\" }}>\n {width && height && (\n <ControlledTree\n model={treeModel}\n nodeLoader={nodeLoader}\n eventsHandler={unifiedSelectionEventHandler}\n selectionMode={SelectionMode.Extended}\n width={width}\n height={height}\n />\n )}\n </div>\n );\n};\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/trees/index.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./ModelsTree\";\nexport * from \"./CategoriesTree\";\nexport * from \"./SpatialTree\";\nexport * from \"./ClassificationsTree\";\nexport * from \"./TreeWithRuleset\"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/trees/index.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./ModelsTree\";\nexport * from \"./CategoriesTree\";\nexport * from \"./SpatialTree\";\nexport * from \"./ClassificationsTree\";\nexport * from \"./TreeWithRuleset\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/tree-widget-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Tree Widget React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Bentley",
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"redux": "^4.0.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@bentley/itwin-client": "rc",
|
|
30
29
|
"@itwin/appui-abstract": "rc",
|
|
31
30
|
"@itwin/appui-layout-react": "rc",
|
|
32
31
|
"@itwin/appui-react": "rc",
|
|
@@ -37,10 +36,9 @@
|
|
|
37
36
|
"@itwin/core-frontend": "rc",
|
|
38
37
|
"@itwin/core-geometry": "rc",
|
|
39
38
|
"@itwin/core-i18n": "rc",
|
|
40
|
-
"@itwin/core-markup": "rc",
|
|
41
|
-
"@itwin/core-orbitgt": "rc",
|
|
42
39
|
"@itwin/core-quantity": "rc",
|
|
43
40
|
"@itwin/core-react": "rc",
|
|
41
|
+
"@itwin/eslint-plugin": "rc",
|
|
44
42
|
"@itwin/presentation-common": "rc",
|
|
45
43
|
"@itwin/presentation-components": "rc",
|
|
46
44
|
"@itwin/presentation-frontend": "rc",
|
|
@@ -49,35 +47,35 @@
|
|
|
49
47
|
"@types/react": "^17.0.19",
|
|
50
48
|
"@types/react-dom": "^17.0.9",
|
|
51
49
|
"@types/react-redux": "^7.0.1",
|
|
52
|
-
"
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
|
51
|
+
"cpx2": "^3.0.0",
|
|
52
|
+
"eslint": "^7.11.0",
|
|
53
53
|
"react": "^17.0.2",
|
|
54
54
|
"react-dom": "^17.0.2",
|
|
55
55
|
"rimraf": "^3.0.2",
|
|
56
|
-
"tslint": "^5.11.0",
|
|
57
56
|
"typescript": "~4.3.0"
|
|
58
57
|
},
|
|
59
58
|
"peerDependencies": {
|
|
60
|
-
"@bentley/itwin-client": "rc",
|
|
61
59
|
"@itwin/appui-abstract": "rc",
|
|
62
|
-
"@itwin/appui-layout-react": "rc",
|
|
63
60
|
"@itwin/appui-react": "rc",
|
|
64
61
|
"@itwin/components-react": "rc",
|
|
65
|
-
"@itwin/core-bentley": "rc",
|
|
66
|
-
"@itwin/core-common": "rc",
|
|
67
62
|
"@itwin/core-frontend": "rc",
|
|
68
|
-
"@itwin/core-geometry": "rc",
|
|
69
|
-
"@itwin/core-i18n": "rc",
|
|
70
|
-
"@itwin/core-markup": "rc",
|
|
71
|
-
"@itwin/core-orbitgt": "rc",
|
|
72
|
-
"@itwin/core-quantity": "rc",
|
|
73
63
|
"@itwin/core-react": "rc",
|
|
74
|
-
"@itwin/presentation-common": "rc",
|
|
75
64
|
"@itwin/presentation-components": "rc",
|
|
76
65
|
"@itwin/presentation-frontend": "rc",
|
|
77
|
-
"@itwin/webgl-compatibility": "rc",
|
|
78
66
|
"react": "^17.0.2",
|
|
79
67
|
"react-dom": "^17.0.2"
|
|
80
68
|
},
|
|
69
|
+
"eslintConfig": {
|
|
70
|
+
"plugins": [
|
|
71
|
+
"@itwin"
|
|
72
|
+
],
|
|
73
|
+
"extends": "plugin:@itwin/ui",
|
|
74
|
+
"rules": {
|
|
75
|
+
"no-duplicate-imports": "off",
|
|
76
|
+
"@typescript-eslint/consistent-type-imports": "error"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
81
79
|
"scripts": {
|
|
82
80
|
"build": "npm run -s dual-build && npm run -s copy:assets",
|
|
83
81
|
"dual-build": "npm run -s build:cjs && npm run -s build:esm",
|
|
@@ -88,7 +86,8 @@
|
|
|
88
86
|
"copy:cjs": "cpx \"./src/**/*.scss\" ./lib/cjs",
|
|
89
87
|
"copy:esm": "cpx \"./src/**/*.scss\" ./lib/esm",
|
|
90
88
|
"cover": "",
|
|
91
|
-
"lint": "",
|
|
89
|
+
"lint": "eslint -f visualstudio \"./src/**/*.{ts,tsx}\" 1>&2",
|
|
90
|
+
"lint:fix": "npm run lint -- --fix",
|
|
92
91
|
"pseudolocalize": "betools pseudolocalize --englishDir ./public/locales/en --out ./lib/public/locales/en-PSEUDO",
|
|
93
92
|
"test": "",
|
|
94
93
|
"clean": "rimraf lib .rush/temp/package-deps*.json",
|