@instructure/ui-drilldown 8.33.2-snapshot-0 → 8.33.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/CHANGELOG.md +1 -5
- package/es/Drilldown/DrilldownGroup/index.js +0 -3
- package/es/Drilldown/DrilldownGroup/props.js +1 -0
- package/es/Drilldown/DrilldownLocator.js +13 -22
- package/es/Drilldown/DrilldownOption/index.js +0 -3
- package/es/Drilldown/DrilldownOption/props.js +1 -0
- package/es/Drilldown/DrilldownPage/index.js +0 -3
- package/es/Drilldown/DrilldownPage/props.js +1 -0
- package/es/Drilldown/DrilldownSeparator/index.js +0 -3
- package/es/Drilldown/DrilldownSeparator/props.js +1 -0
- package/es/Drilldown/__examples__/Drilldown.examples.js +9 -9
- package/es/Drilldown/index.js +199 -304
- package/es/Drilldown/locator.js +1 -0
- package/es/Drilldown/props.js +3 -1
- package/es/Drilldown/styles.js +1 -1
- package/es/Drilldown/theme.js +4 -4
- package/es/index.js +1 -0
- package/lib/Drilldown/DrilldownGroup/index.js +0 -7
- package/lib/Drilldown/DrilldownGroup/props.js +1 -6
- package/lib/Drilldown/DrilldownLocator.js +11 -25
- package/lib/Drilldown/DrilldownOption/index.js +0 -7
- package/lib/Drilldown/DrilldownOption/props.js +1 -3
- package/lib/Drilldown/DrilldownPage/index.js +0 -5
- package/lib/Drilldown/DrilldownPage/props.js +1 -7
- package/lib/Drilldown/DrilldownSeparator/index.js +0 -7
- package/lib/Drilldown/DrilldownSeparator/props.js +1 -3
- package/lib/Drilldown/__examples__/Drilldown.examples.js +8 -14
- package/lib/Drilldown/index.js +199 -326
- package/lib/Drilldown/locator.js +0 -2
- package/lib/Drilldown/props.js +3 -8
- package/lib/Drilldown/styles.js +1 -2
- package/lib/Drilldown/theme.js +4 -5
- package/lib/index.js +0 -1
- package/package.json +20 -20
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Drilldown/DrilldownOption/index.d.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,14 +3,10 @@
|
|
|
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.33.2
|
|
6
|
+
## [8.33.2](https://github.com/instructure/instructure-ui/compare/v8.33.1...v8.33.2) (2023-01-25)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-drilldown
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
10
|
## [8.33.1](https://github.com/instructure/instructure-ui/compare/v8.33.0...v8.33.1) (2023-01-06)
|
|
15
11
|
|
|
16
12
|
**Note:** Version bump only for package @instructure/ui-drilldown
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _dec, _class, _class2;
|
|
2
|
-
|
|
3
2
|
/*
|
|
4
3
|
* The MIT License (MIT)
|
|
5
4
|
*
|
|
@@ -29,7 +28,6 @@ import { Component } from 'react';
|
|
|
29
28
|
import { withStyle } from '@instructure/emotion';
|
|
30
29
|
import { optionsThemeGenerator } from '@instructure/ui-options';
|
|
31
30
|
import { propTypes, allowedProps } from './props';
|
|
32
|
-
|
|
33
31
|
/**
|
|
34
32
|
---
|
|
35
33
|
parent: Drilldown
|
|
@@ -46,7 +44,6 @@ let DrilldownGroup = (_dec = withStyle(null, optionsThemeGenerator), _dec(_class
|
|
|
46
44
|
// Drilldown.Group is parsed in Drilldown as an Options component.
|
|
47
45
|
return null;
|
|
48
46
|
}
|
|
49
|
-
|
|
50
47
|
}, _class2.displayName = "DrilldownGroup", _class2.componentId = 'Drilldown.Group', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
|
|
51
48
|
disabled: false,
|
|
52
49
|
withoutSeparators: false,
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
+
|
|
24
25
|
import { locator } from '@instructure/ui-test-locator';
|
|
25
26
|
import { find, findAll, parseQueryArguments } from '@instructure/ui-test-utils';
|
|
27
|
+
|
|
26
28
|
/* eslint-disable no-restricted-imports */
|
|
27
29
|
// @ts-expect-error bypass no type definition found error
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
import { OptionsItemLocator } from '@instructure/ui-options/es/Options/Item/OptionsItemLocator';
|
|
31
|
+
// @ts-expect-error bypass no type definition found error
|
|
31
32
|
import { PopoverLocator } from '@instructure/ui-popover/es/Popover/PopoverLocator';
|
|
32
33
|
/* eslint-enable no-restricted-imports */
|
|
33
34
|
|
|
@@ -38,7 +39,6 @@ const customMethods = {
|
|
|
38
39
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
40
|
args[_key] = arguments[_key];
|
|
40
41
|
}
|
|
41
|
-
|
|
42
42
|
return await findAll('[class$=-optionItem__container]:not([role="presentation"])', ...args);
|
|
43
43
|
},
|
|
44
44
|
findAllOptionWrappers: async function () {
|
|
@@ -48,77 +48,66 @@ const customMethods = {
|
|
|
48
48
|
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
49
49
|
args[_key2 - 2] = arguments[_key2];
|
|
50
50
|
}
|
|
51
|
-
|
|
52
51
|
return OptionsItemLocator.find(`:has(#${optionId})`, ...args);
|
|
53
52
|
},
|
|
54
53
|
findSizableContainer: async function () {
|
|
55
54
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
56
55
|
args[_key3] = arguments[_key3];
|
|
57
56
|
}
|
|
58
|
-
|
|
59
57
|
return await find('[class$=-drilldown__container]', ...args);
|
|
60
58
|
},
|
|
61
59
|
findSelectableContainer: async function () {
|
|
62
60
|
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
63
61
|
args[_key4] = arguments[_key4];
|
|
64
62
|
}
|
|
65
|
-
|
|
66
63
|
return await find('[id^=Selectable_][id$=-list]', ...args);
|
|
67
64
|
},
|
|
68
65
|
findHeaderTitle: async function () {
|
|
69
66
|
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
70
67
|
args[_key5] = arguments[_key5];
|
|
71
68
|
}
|
|
72
|
-
|
|
73
69
|
return await find('[id^=DrilldownHeader-Title]', ...args);
|
|
74
70
|
},
|
|
75
71
|
findHeaderActionOption: async function () {
|
|
76
72
|
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
77
73
|
args[_key6] = arguments[_key6];
|
|
78
74
|
}
|
|
79
|
-
|
|
80
75
|
return await find('[id^=DrilldownHeader-Action]', ...args);
|
|
81
76
|
},
|
|
82
77
|
findHeaderBackOption: async function () {
|
|
83
78
|
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
84
79
|
args[_key7] = arguments[_key7];
|
|
85
80
|
}
|
|
86
|
-
|
|
87
81
|
return await find('[id^=DrilldownHeader-Back]', ...args);
|
|
88
82
|
},
|
|
89
83
|
findHeaderSeparator: async function () {
|
|
90
84
|
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
91
85
|
args[_key8] = arguments[_key8];
|
|
92
86
|
}
|
|
93
|
-
|
|
94
87
|
return await find('[id^=DrilldownHeader-Separator]', ...args);
|
|
95
88
|
},
|
|
96
89
|
findAllSeparators: async function () {
|
|
97
90
|
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
98
91
|
args[_key9] = arguments[_key9];
|
|
99
92
|
}
|
|
100
|
-
|
|
101
93
|
return await findAll('[class$=-separator]', ...args);
|
|
102
94
|
},
|
|
103
95
|
findAllGroupLabels: async function () {
|
|
104
96
|
for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
|
105
97
|
args[_key10] = arguments[_key10];
|
|
106
98
|
}
|
|
107
|
-
|
|
108
99
|
return await findAll('[class$=-options__label]', ...args);
|
|
109
100
|
},
|
|
110
101
|
findLabelInfo: async function () {
|
|
111
102
|
for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
|
|
112
103
|
args[_key11] = arguments[_key11];
|
|
113
104
|
}
|
|
114
|
-
|
|
115
105
|
return await find('[class$=-drilldown__optionLabelInfo]', ...args);
|
|
116
106
|
},
|
|
117
107
|
findDescription: async function () {
|
|
118
108
|
for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
|
|
119
109
|
args[_key12] = arguments[_key12];
|
|
120
110
|
}
|
|
121
|
-
|
|
122
111
|
return await find('[class$=__description]', ...args);
|
|
123
112
|
},
|
|
124
113
|
findPopoverRoot: function () {
|
|
@@ -129,16 +118,18 @@ const customMethods = {
|
|
|
129
118
|
},
|
|
130
119
|
findPopoverContent: function () {
|
|
131
120
|
const _parseQueryArguments = parseQueryArguments(...arguments),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
customMethods: {
|
|
121
|
+
element = _parseQueryArguments.element,
|
|
122
|
+
selector = _parseQueryArguments.selector,
|
|
123
|
+
options = _parseQueryArguments.options;
|
|
124
|
+
return PopoverLocator.findContent(element, selector, {
|
|
125
|
+
...options,
|
|
126
|
+
customMethods: {
|
|
127
|
+
...options.customMethods,
|
|
138
128
|
...customMethods
|
|
139
129
|
}
|
|
140
130
|
});
|
|
141
131
|
}
|
|
142
|
-
};
|
|
132
|
+
};
|
|
143
133
|
|
|
134
|
+
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
144
135
|
export const DrilldownLocator = locator(Drilldown.selector, customMethods);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _dec, _class, _class2;
|
|
2
|
-
|
|
3
2
|
/*
|
|
4
3
|
* The MIT License (MIT)
|
|
5
4
|
*
|
|
@@ -29,7 +28,6 @@ import { Component } from 'react';
|
|
|
29
28
|
import { withStyle } from '@instructure/emotion';
|
|
30
29
|
import { optionsItemThemeGenerator } from '@instructure/ui-options';
|
|
31
30
|
import { propTypes, allowedProps } from './props';
|
|
32
|
-
|
|
33
31
|
/**
|
|
34
32
|
---
|
|
35
33
|
parent: Drilldown
|
|
@@ -46,7 +44,6 @@ let DrilldownOption = (_dec = withStyle(null, optionsItemThemeGenerator), _dec(_
|
|
|
46
44
|
// are parsed in Drilldown and rendered as Options.Item components
|
|
47
45
|
return null;
|
|
48
46
|
}
|
|
49
|
-
|
|
50
47
|
}, _class2.displayName = "DrilldownOption", _class2.componentId = 'Drilldown.Option', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
|
|
51
48
|
disabled: false,
|
|
52
49
|
beforeLabelContentVAlign: 'start',
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
/** @jsx jsx */
|
|
26
26
|
import { Component } from 'react';
|
|
27
27
|
import { propTypes, allowedProps } from './props';
|
|
28
|
-
|
|
29
28
|
/**
|
|
30
29
|
---
|
|
31
30
|
parent: Drilldown
|
|
@@ -40,9 +39,7 @@ class DrilldownPage extends Component {
|
|
|
40
39
|
// Drilldown.Page children are parsed in Drilldown.
|
|
41
40
|
return null;
|
|
42
41
|
}
|
|
43
|
-
|
|
44
42
|
}
|
|
45
|
-
|
|
46
43
|
DrilldownPage.displayName = "DrilldownPage";
|
|
47
44
|
DrilldownPage.componentId = 'Drilldown.Page';
|
|
48
45
|
DrilldownPage.propTypes = propTypes;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _dec, _class, _class2;
|
|
2
|
-
|
|
3
2
|
/*
|
|
4
3
|
* The MIT License (MIT)
|
|
5
4
|
*
|
|
@@ -29,7 +28,6 @@ import { Component } from 'react';
|
|
|
29
28
|
import { withStyle } from '@instructure/emotion';
|
|
30
29
|
import { optionsSeparatorThemeGenerator } from '@instructure/ui-options';
|
|
31
30
|
import { propTypes, allowedProps } from './props';
|
|
32
|
-
|
|
33
31
|
/**
|
|
34
32
|
---
|
|
35
33
|
parent: Drilldown
|
|
@@ -46,7 +44,6 @@ let DrilldownSeparator = (_dec = withStyle(null, optionsSeparatorThemeGenerator)
|
|
|
46
44
|
// are parsed in Drilldown and rendered as Options.Separator components
|
|
47
45
|
return null;
|
|
48
46
|
}
|
|
49
|
-
|
|
50
47
|
}, _class2.displayName = "DrilldownSeparator", _class2.componentId = 'Drilldown.Separator', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {}, _class2)) || _class);
|
|
51
48
|
export default DrilldownSeparator;
|
|
52
49
|
export { DrilldownSeparator };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _Drilldown$Page, _Drilldown$Page2, _Drilldown$Page3, _Drilldown$Page4, _Drilldown$Option, _Drilldown$Option2, _Drilldown$Option3, _Drilldown$Option4, _br, _br2, _br3, _Drilldown$Option5;
|
|
2
|
-
|
|
3
2
|
/*
|
|
4
3
|
* The MIT License (MIT)
|
|
5
4
|
*
|
|
@@ -23,6 +22,7 @@ var _Drilldown$Page, _Drilldown$Page2, _Drilldown$Page3, _Drilldown$Page4, _Dril
|
|
|
23
22
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
23
|
* SOFTWARE.
|
|
25
24
|
*/
|
|
25
|
+
|
|
26
26
|
import React from 'react';
|
|
27
27
|
import { Drilldown } from '../index';
|
|
28
28
|
const triggerButton = /*#__PURE__*/React.createElement("button", {
|
|
@@ -51,7 +51,8 @@ export default {
|
|
|
51
51
|
groupDisabled: true,
|
|
52
52
|
renderGroupTitle: 'groupTitle',
|
|
53
53
|
contentVAlign: 'start'
|
|
54
|
-
},
|
|
54
|
+
},
|
|
55
|
+
// overflowX tests
|
|
55
56
|
{
|
|
56
57
|
text: 'overflowX auto',
|
|
57
58
|
defaultShow: true,
|
|
@@ -82,7 +83,8 @@ export default {
|
|
|
82
83
|
groupDisabled: false,
|
|
83
84
|
renderGroupTitle: void 0,
|
|
84
85
|
contentVAlign: 'end'
|
|
85
|
-
},
|
|
86
|
+
},
|
|
87
|
+
// overflowY tests
|
|
86
88
|
{
|
|
87
89
|
text: 'overflowY auto',
|
|
88
90
|
defaultShow: true,
|
|
@@ -113,12 +115,14 @@ export default {
|
|
|
113
115
|
groupDisabled: false,
|
|
114
116
|
renderGroupTitle: void 0,
|
|
115
117
|
contentVAlign: 'end'
|
|
116
|
-
},
|
|
118
|
+
},
|
|
119
|
+
// tests for Drilldown.Page
|
|
117
120
|
{
|
|
118
121
|
page: 'pageWithSubpages'
|
|
119
122
|
}, {
|
|
120
123
|
page: 'pageWithSubpages2'
|
|
121
|
-
},
|
|
124
|
+
},
|
|
125
|
+
// Popover version
|
|
122
126
|
{
|
|
123
127
|
text: 'with trigger',
|
|
124
128
|
trigger: triggerButton,
|
|
@@ -178,7 +182,6 @@ export default {
|
|
|
178
182
|
positionContainerDisplay: 'block'
|
|
179
183
|
}]
|
|
180
184
|
},
|
|
181
|
-
|
|
182
185
|
getExampleProps(props) {
|
|
183
186
|
return {
|
|
184
187
|
height: props.customProps.defaultShow || !props.customProps.trigger ? '57rem' : '5rem',
|
|
@@ -188,7 +191,6 @@ export default {
|
|
|
188
191
|
position: 'relative'
|
|
189
192
|
};
|
|
190
193
|
},
|
|
191
|
-
|
|
192
194
|
getComponentProps: props => {
|
|
193
195
|
return {
|
|
194
196
|
rootPageId: 'page0',
|
|
@@ -221,7 +223,6 @@ export default {
|
|
|
221
223
|
};
|
|
222
224
|
}
|
|
223
225
|
};
|
|
224
|
-
|
|
225
226
|
function generateDrilldownChildren(props, variant) {
|
|
226
227
|
if (variant == 'pageWithSubpages') {
|
|
227
228
|
return [_Drilldown$Page || (_Drilldown$Page = /*#__PURE__*/React.createElement(Drilldown.Page, {
|
|
@@ -268,7 +269,6 @@ function generateDrilldownChildren(props, variant) {
|
|
|
268
269
|
id: "tmp"
|
|
269
270
|
}, "subpage option")))];
|
|
270
271
|
}
|
|
271
|
-
|
|
272
272
|
return [/*#__PURE__*/React.createElement(Drilldown.Page, {
|
|
273
273
|
id: "page0",
|
|
274
274
|
key: "page0"
|