@instructure/ui-tree-browser 8.38.2-snapshot-5 → 8.38.2-snapshot-7
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/CHANGELOG.md +1 -1
- package/es/TreeBrowser/TreeBrowserLocator.js +4 -4
- package/es/TreeBrowser/TreeButton/index.js +2 -2
- package/es/TreeBrowser/TreeNode/index.js +2 -2
- package/es/TreeBrowser/index.js +4 -7
- package/lib/TreeBrowser/TreeBrowserLocator.js +4 -4
- package/lib/TreeBrowser/TreeButton/index.js +2 -2
- package/lib/TreeBrowser/TreeNode/index.js +2 -2
- package/lib/TreeBrowser/index.js +4 -7
- package/package.json +15 -15
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [8.38.2-snapshot-
|
|
6
|
+
## [8.38.2-snapshot-7](https://github.com/instructure/instructure-ui/compare/v8.38.1...v8.38.2-snapshot-7) (2023-07-21)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-tree-browser
|
|
9
9
|
|
|
@@ -29,10 +29,10 @@ const TreeBrowserItemLocator = locator('[role="treeitem"]');
|
|
|
29
29
|
|
|
30
30
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
31
31
|
export const TreeBrowserLocator = locator(TreeBrowser.selector, {
|
|
32
|
-
findAllItems:
|
|
33
|
-
return TreeBrowserItemLocator.findAll(...
|
|
32
|
+
findAllItems: (...args) => {
|
|
33
|
+
return TreeBrowserItemLocator.findAll(...args);
|
|
34
34
|
},
|
|
35
|
-
findItem:
|
|
36
|
-
return TreeBrowserItemLocator.find(...
|
|
35
|
+
findItem: (...args) => {
|
|
36
|
+
return TreeBrowserItemLocator.find(...args);
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -43,8 +43,8 @@ id: TreeBrowser.Button
|
|
|
43
43
|
@tsProps
|
|
44
44
|
**/
|
|
45
45
|
let TreeButton = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class TreeButton extends Component {
|
|
46
|
-
constructor() {
|
|
47
|
-
super(...
|
|
46
|
+
constructor(...args) {
|
|
47
|
+
super(...args);
|
|
48
48
|
this.ref = null;
|
|
49
49
|
this.handleRef = el => {
|
|
50
50
|
if (el && typeof this.props.containerRef === 'function') {
|
|
@@ -46,8 +46,8 @@ A helper class used to render the :renderBeforeItems and :renderAfterItems
|
|
|
46
46
|
in the TreeBrowser.
|
|
47
47
|
**/
|
|
48
48
|
let TreeNode = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class TreeNode extends Component {
|
|
49
|
-
constructor() {
|
|
50
|
-
super(...
|
|
49
|
+
constructor(...args) {
|
|
50
|
+
super(...args);
|
|
51
51
|
this.ref = null;
|
|
52
52
|
this.handleRef = el => {
|
|
53
53
|
if (el && typeof this.props.containerRef === 'function') {
|
package/es/TreeBrowser/index.js
CHANGED
|
@@ -46,17 +46,14 @@ category: components
|
|
|
46
46
|
**/
|
|
47
47
|
let TreeBrowser = (_dec = withStyle(generateStyles, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_class2 = class TreeBrowser extends Component {
|
|
48
48
|
constructor(props) {
|
|
49
|
-
var _this;
|
|
50
49
|
super(props);
|
|
51
|
-
_this = this;
|
|
52
50
|
this.ref = null;
|
|
53
|
-
this.handleCollectionClick =
|
|
54
|
-
let expand = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
|
|
51
|
+
this.handleCollectionClick = (e, collection, expand = true) => {
|
|
55
52
|
e.stopPropagation();
|
|
56
|
-
const onCollectionClick =
|
|
57
|
-
if (expand)
|
|
53
|
+
const onCollectionClick = this.props.onCollectionClick;
|
|
54
|
+
if (expand) this.expandOrCollapseNode(collection);
|
|
58
55
|
onCollectionClick === null || onCollectionClick === void 0 ? void 0 : onCollectionClick(collection.id, collection); // TODO: this should pass the event as the first arg
|
|
59
|
-
|
|
56
|
+
this.handleSelection(collection.id, 'collection');
|
|
60
57
|
};
|
|
61
58
|
this.handleItemClick = (e, item) => {
|
|
62
59
|
var _this$props$onItemCli, _this$props;
|
|
@@ -35,11 +35,11 @@ const TreeBrowserItemLocator = (0, _locator.locator)('[role="treeitem"]');
|
|
|
35
35
|
|
|
36
36
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
37
37
|
const TreeBrowserLocator = (0, _locator.locator)(_index.TreeBrowser.selector, {
|
|
38
|
-
findAllItems:
|
|
39
|
-
return TreeBrowserItemLocator.findAll(...
|
|
38
|
+
findAllItems: (...args) => {
|
|
39
|
+
return TreeBrowserItemLocator.findAll(...args);
|
|
40
40
|
},
|
|
41
|
-
findItem:
|
|
42
|
-
return TreeBrowserItemLocator.find(...
|
|
41
|
+
findItem: (...args) => {
|
|
42
|
+
return TreeBrowserItemLocator.find(...args);
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
exports.TreeBrowserLocator = TreeBrowserLocator;
|
|
@@ -47,8 +47,8 @@ id: TreeBrowser.Button
|
|
|
47
47
|
@tsProps
|
|
48
48
|
**/
|
|
49
49
|
let TreeButton = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class TreeButton extends _react.Component {
|
|
50
|
-
constructor() {
|
|
51
|
-
super(...
|
|
50
|
+
constructor(...args) {
|
|
51
|
+
super(...args);
|
|
52
52
|
this.ref = null;
|
|
53
53
|
this.handleRef = el => {
|
|
54
54
|
if (el && typeof this.props.containerRef === 'function') {
|
|
@@ -50,8 +50,8 @@ A helper class used to render the :renderBeforeItems and :renderAfterItems
|
|
|
50
50
|
in the TreeBrowser.
|
|
51
51
|
**/
|
|
52
52
|
let TreeNode = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class TreeNode extends _react.Component {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...
|
|
53
|
+
constructor(...args) {
|
|
54
|
+
super(...args);
|
|
55
55
|
this.ref = null;
|
|
56
56
|
this.handleRef = el => {
|
|
57
57
|
if (el && typeof this.props.containerRef === 'function') {
|
package/lib/TreeBrowser/index.js
CHANGED
|
@@ -52,17 +52,14 @@ category: components
|
|
|
52
52
|
**/
|
|
53
53
|
let TreeBrowser = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_class2 = class TreeBrowser extends _react.Component {
|
|
54
54
|
constructor(props) {
|
|
55
|
-
var _this;
|
|
56
55
|
super(props);
|
|
57
|
-
_this = this;
|
|
58
56
|
this.ref = null;
|
|
59
|
-
this.handleCollectionClick =
|
|
60
|
-
let expand = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
|
|
57
|
+
this.handleCollectionClick = (e, collection, expand = true) => {
|
|
61
58
|
e.stopPropagation();
|
|
62
|
-
const onCollectionClick =
|
|
63
|
-
if (expand)
|
|
59
|
+
const onCollectionClick = this.props.onCollectionClick;
|
|
60
|
+
if (expand) this.expandOrCollapseNode(collection);
|
|
64
61
|
onCollectionClick === null || onCollectionClick === void 0 ? void 0 : onCollectionClick(collection.id, collection); // TODO: this should pass the event as the first arg
|
|
65
|
-
|
|
62
|
+
this.handleSelection(collection.id, 'collection');
|
|
66
63
|
};
|
|
67
64
|
this.handleItemClick = (e, item) => {
|
|
68
65
|
var _this$props$onItemCli, _this$props;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-tree-browser",
|
|
3
|
-
"version": "8.38.2-snapshot-
|
|
3
|
+
"version": "8.38.2-snapshot-7",
|
|
4
4
|
"description": "A component for displaying a hierarchical view of information",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,22 +23,22 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.38.2-snapshot-
|
|
27
|
-
"@instructure/ui-color-utils": "8.38.2-snapshot-
|
|
28
|
-
"@instructure/ui-test-locator": "8.38.2-snapshot-
|
|
29
|
-
"@instructure/ui-test-utils": "8.38.2-snapshot-
|
|
30
|
-
"@instructure/ui-themes": "8.38.2-snapshot-
|
|
26
|
+
"@instructure/ui-babel-preset": "8.38.2-snapshot-7",
|
|
27
|
+
"@instructure/ui-color-utils": "8.38.2-snapshot-7",
|
|
28
|
+
"@instructure/ui-test-locator": "8.38.2-snapshot-7",
|
|
29
|
+
"@instructure/ui-test-utils": "8.38.2-snapshot-7",
|
|
30
|
+
"@instructure/ui-themes": "8.38.2-snapshot-7"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@babel/runtime": "^7.22.
|
|
34
|
-
"@instructure/emotion": "8.38.2-snapshot-
|
|
35
|
-
"@instructure/shared-types": "8.38.2-snapshot-
|
|
36
|
-
"@instructure/ui-icons": "8.38.2-snapshot-
|
|
37
|
-
"@instructure/ui-img": "8.38.2-snapshot-
|
|
38
|
-
"@instructure/ui-prop-types": "8.38.2-snapshot-
|
|
39
|
-
"@instructure/ui-react-utils": "8.38.2-snapshot-
|
|
40
|
-
"@instructure/ui-testable": "8.38.2-snapshot-
|
|
41
|
-
"@instructure/ui-utils": "8.38.2-snapshot-
|
|
33
|
+
"@babel/runtime": "^7.22.6",
|
|
34
|
+
"@instructure/emotion": "8.38.2-snapshot-7",
|
|
35
|
+
"@instructure/shared-types": "8.38.2-snapshot-7",
|
|
36
|
+
"@instructure/ui-icons": "8.38.2-snapshot-7",
|
|
37
|
+
"@instructure/ui-img": "8.38.2-snapshot-7",
|
|
38
|
+
"@instructure/ui-prop-types": "8.38.2-snapshot-7",
|
|
39
|
+
"@instructure/ui-react-utils": "8.38.2-snapshot-7",
|
|
40
|
+
"@instructure/ui-testable": "8.38.2-snapshot-7",
|
|
41
|
+
"@instructure/ui-utils": "8.38.2-snapshot-7",
|
|
42
42
|
"keycode": "^2.2.1",
|
|
43
43
|
"prop-types": "^15.8.1"
|
|
44
44
|
},
|