@instructure/ui-position 8.10.1-snapshot.9 → 8.10.3-snapshot.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 +8 -0
- package/es/Position/index.js +19 -8
- package/es/Position/props.js +3 -2
- package/lib/Position/index.js +19 -8
- package/lib/Position/props.js +3 -2
- package/package.json +17 -17
- package/src/Position/index.tsx +8 -1
- package/src/Position/props.ts +11 -3
- package/types/Position/PositionContentLocator.d.ts +64 -64
- package/types/Position/PositionLocator.d.ts +256 -256
- package/types/Position/PositionTargetLocator.d.ts +64 -64
- package/types/Position/index.d.ts +4 -0
- package/types/Position/index.d.ts.map +1 -1
- package/types/Position/props.d.ts +4 -0
- package/types/Position/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-position
|
|
9
|
+
|
|
10
|
+
## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @instructure/ui-position
|
|
13
|
+
|
|
6
14
|
# [8.10.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @instructure/ui-position
|
package/es/Position/index.js
CHANGED
|
@@ -48,12 +48,20 @@ category: components/utilities
|
|
|
48
48
|
let Position = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class Position extends Component {
|
|
49
49
|
constructor(props) {
|
|
50
50
|
super(props);
|
|
51
|
+
this.ref = null;
|
|
51
52
|
this._id = void 0;
|
|
52
53
|
this._timeouts = [];
|
|
53
54
|
this._listener = null;
|
|
54
55
|
this._content = void 0;
|
|
55
56
|
this._target = void 0;
|
|
56
57
|
|
|
58
|
+
this.handleRef = el => {
|
|
59
|
+
var _this$props$elementRe, _this$props;
|
|
60
|
+
|
|
61
|
+
this.ref = el;
|
|
62
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
63
|
+
};
|
|
64
|
+
|
|
57
65
|
this.handlePortalOpen = () => {
|
|
58
66
|
this.position();
|
|
59
67
|
|
|
@@ -95,14 +103,14 @@ let Position = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
95
103
|
}
|
|
96
104
|
|
|
97
105
|
componentDidMount() {
|
|
98
|
-
var _this$props$makeStyle, _this$
|
|
106
|
+
var _this$props$makeStyle, _this$props2;
|
|
99
107
|
|
|
100
108
|
this.toggleLocatorAttributes(true);
|
|
101
|
-
(_this$props$makeStyle = (_this$
|
|
109
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
102
110
|
}
|
|
103
111
|
|
|
104
112
|
componentDidUpdate(prevProps, prevState) {
|
|
105
|
-
var _this$props$makeStyle2, _this$
|
|
113
|
+
var _this$props$makeStyle2, _this$props4;
|
|
106
114
|
|
|
107
115
|
this.position();
|
|
108
116
|
this.toggleLocatorAttributes(true);
|
|
@@ -116,16 +124,16 @@ let Position = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
116
124
|
placement = _this$state.placement;
|
|
117
125
|
|
|
118
126
|
if (style && prevState.style && (placement !== prevState.placement || style.top !== prevState.style.top || style.left !== prevState.style.left)) {
|
|
119
|
-
var _this$props$onPositio, _this$
|
|
127
|
+
var _this$props$onPositio, _this$props3;
|
|
120
128
|
|
|
121
|
-
(_this$props$onPositio = (_this$
|
|
129
|
+
(_this$props$onPositio = (_this$props3 = this.props).onPositionChanged) === null || _this$props$onPositio === void 0 ? void 0 : _this$props$onPositio.call(_this$props3, {
|
|
122
130
|
top: style.top,
|
|
123
131
|
left: style.left,
|
|
124
132
|
placement
|
|
125
133
|
});
|
|
126
134
|
}
|
|
127
135
|
|
|
128
|
-
(_this$props$makeStyle2 = (_this$
|
|
136
|
+
(_this$props$makeStyle2 = (_this$props4 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props4);
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
componentWillUnmount() {
|
|
@@ -181,7 +189,8 @@ let Position = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
181
189
|
|
|
182
190
|
this._listener = null;
|
|
183
191
|
}
|
|
184
|
-
}
|
|
192
|
+
} // content that needs to be positioned relative to the target
|
|
193
|
+
|
|
185
194
|
|
|
186
195
|
renderContent() {
|
|
187
196
|
let content = ensureSingleChild(this.props.children);
|
|
@@ -236,7 +245,9 @@ let Position = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
236
245
|
const props = {
|
|
237
246
|
[Position.locatorAttribute]: this._id
|
|
238
247
|
};
|
|
239
|
-
return jsx("span",
|
|
248
|
+
return jsx("span", Object.assign({}, props, {
|
|
249
|
+
ref: this.handleRef
|
|
250
|
+
}), this.renderTarget(), this.renderContent());
|
|
240
251
|
}
|
|
241
252
|
|
|
242
253
|
}, _class2.displayName = "Position", _class2.componentId = 'Position', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
package/es/Position/props.js
CHANGED
|
@@ -38,7 +38,8 @@ const propTypes = {
|
|
|
38
38
|
shouldPositionOverTarget: PropTypes.bool,
|
|
39
39
|
onPositionChanged: PropTypes.func,
|
|
40
40
|
onPositioned: PropTypes.func,
|
|
41
|
-
children: PropTypes.node
|
|
41
|
+
children: PropTypes.node,
|
|
42
|
+
elementRef: PropTypes.func
|
|
42
43
|
};
|
|
43
|
-
const allowedProps = ['renderTarget', 'target', 'placement', 'mountNode', 'insertAt', 'constrain', 'offsetX', 'offsetY', 'id', 'shouldTrackPosition', 'shouldPositionOverTarget', 'onPositionChanged', 'onPositioned', 'children'];
|
|
44
|
+
const allowedProps = ['renderTarget', 'target', 'placement', 'mountNode', 'insertAt', 'constrain', 'offsetX', 'offsetY', 'id', 'shouldTrackPosition', 'shouldPositionOverTarget', 'onPositionChanged', 'onPositioned', 'children', 'elementRef'];
|
|
44
45
|
export { propTypes, allowedProps };
|
package/lib/Position/index.js
CHANGED
|
@@ -52,12 +52,20 @@ category: components/utilities
|
|
|
52
52
|
let Position = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class Position extends _react.Component {
|
|
53
53
|
constructor(props) {
|
|
54
54
|
super(props);
|
|
55
|
+
this.ref = null;
|
|
55
56
|
this._id = void 0;
|
|
56
57
|
this._timeouts = [];
|
|
57
58
|
this._listener = null;
|
|
58
59
|
this._content = void 0;
|
|
59
60
|
this._target = void 0;
|
|
60
61
|
|
|
62
|
+
this.handleRef = el => {
|
|
63
|
+
var _this$props$elementRe, _this$props;
|
|
64
|
+
|
|
65
|
+
this.ref = el;
|
|
66
|
+
(_this$props$elementRe = (_this$props = this.props).elementRef) === null || _this$props$elementRe === void 0 ? void 0 : _this$props$elementRe.call(_this$props, el);
|
|
67
|
+
};
|
|
68
|
+
|
|
61
69
|
this.handlePortalOpen = () => {
|
|
62
70
|
this.position();
|
|
63
71
|
|
|
@@ -99,14 +107,14 @@ let Position = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
99
107
|
}
|
|
100
108
|
|
|
101
109
|
componentDidMount() {
|
|
102
|
-
var _this$props$makeStyle, _this$
|
|
110
|
+
var _this$props$makeStyle, _this$props2;
|
|
103
111
|
|
|
104
112
|
this.toggleLocatorAttributes(true);
|
|
105
|
-
(_this$props$makeStyle = (_this$
|
|
113
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
componentDidUpdate(prevProps, prevState) {
|
|
109
|
-
var _this$props$makeStyle2, _this$
|
|
117
|
+
var _this$props$makeStyle2, _this$props4;
|
|
110
118
|
|
|
111
119
|
this.position();
|
|
112
120
|
this.toggleLocatorAttributes(true);
|
|
@@ -120,16 +128,16 @@ let Position = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
120
128
|
placement = _this$state.placement;
|
|
121
129
|
|
|
122
130
|
if (style && prevState.style && (placement !== prevState.placement || style.top !== prevState.style.top || style.left !== prevState.style.left)) {
|
|
123
|
-
var _this$props$onPositio, _this$
|
|
131
|
+
var _this$props$onPositio, _this$props3;
|
|
124
132
|
|
|
125
|
-
(_this$props$onPositio = (_this$
|
|
133
|
+
(_this$props$onPositio = (_this$props3 = this.props).onPositionChanged) === null || _this$props$onPositio === void 0 ? void 0 : _this$props$onPositio.call(_this$props3, {
|
|
126
134
|
top: style.top,
|
|
127
135
|
left: style.left,
|
|
128
136
|
placement
|
|
129
137
|
});
|
|
130
138
|
}
|
|
131
139
|
|
|
132
|
-
(_this$props$makeStyle2 = (_this$
|
|
140
|
+
(_this$props$makeStyle2 = (_this$props4 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props4);
|
|
133
141
|
}
|
|
134
142
|
|
|
135
143
|
componentWillUnmount() {
|
|
@@ -185,7 +193,8 @@ let Position = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
185
193
|
|
|
186
194
|
this._listener = null;
|
|
187
195
|
}
|
|
188
|
-
}
|
|
196
|
+
} // content that needs to be positioned relative to the target
|
|
197
|
+
|
|
189
198
|
|
|
190
199
|
renderContent() {
|
|
191
200
|
let content = (0, _ensureSingleChild.ensureSingleChild)(this.props.children);
|
|
@@ -240,7 +249,9 @@ let Position = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
240
249
|
const props = {
|
|
241
250
|
[Position.locatorAttribute]: this._id
|
|
242
251
|
};
|
|
243
|
-
return (0, _emotion.jsx)("span",
|
|
252
|
+
return (0, _emotion.jsx)("span", Object.assign({}, props, {
|
|
253
|
+
ref: this.handleRef
|
|
254
|
+
}), this.renderTarget(), this.renderContent());
|
|
244
255
|
}
|
|
245
256
|
|
|
246
257
|
}, _class2.displayName = "Position", _class2.componentId = 'Position', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
package/lib/Position/props.js
CHANGED
|
@@ -50,8 +50,9 @@ const propTypes = {
|
|
|
50
50
|
shouldPositionOverTarget: _propTypes.default.bool,
|
|
51
51
|
onPositionChanged: _propTypes.default.func,
|
|
52
52
|
onPositioned: _propTypes.default.func,
|
|
53
|
-
children: _propTypes.default.node
|
|
53
|
+
children: _propTypes.default.node,
|
|
54
|
+
elementRef: _propTypes.default.func
|
|
54
55
|
};
|
|
55
56
|
exports.propTypes = propTypes;
|
|
56
|
-
const allowedProps = ['renderTarget', 'target', 'placement', 'mountNode', 'insertAt', 'constrain', 'offsetX', 'offsetY', 'id', 'shouldTrackPosition', 'shouldPositionOverTarget', 'onPositionChanged', 'onPositioned', 'children'];
|
|
57
|
+
const allowedProps = ['renderTarget', 'target', 'placement', 'mountNode', 'insertAt', 'constrain', 'offsetX', 'offsetY', 'id', 'shouldTrackPosition', 'shouldPositionOverTarget', 'onPositionChanged', 'onPositioned', 'children', 'elementRef'];
|
|
57
58
|
exports.allowedProps = allowedProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-position",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.3-snapshot.2+ccdf8f43b",
|
|
4
4
|
"description": "A component for positioning content with respect to a designated target.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,24 +25,24 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/debounce": "8.10.
|
|
29
|
-
"@instructure/emotion": "8.10.
|
|
30
|
-
"@instructure/shared-types": "8.10.
|
|
31
|
-
"@instructure/ui-dom-utils": "8.10.
|
|
32
|
-
"@instructure/ui-portal": "8.10.
|
|
33
|
-
"@instructure/ui-prop-types": "8.10.
|
|
34
|
-
"@instructure/ui-react-utils": "8.10.
|
|
35
|
-
"@instructure/ui-testable": "8.10.
|
|
36
|
-
"@instructure/ui-utils": "8.10.
|
|
37
|
-
"@instructure/uid": "8.10.
|
|
28
|
+
"@instructure/debounce": "8.10.3-snapshot.2+ccdf8f43b",
|
|
29
|
+
"@instructure/emotion": "8.10.3-snapshot.2+ccdf8f43b",
|
|
30
|
+
"@instructure/shared-types": "8.10.3-snapshot.2+ccdf8f43b",
|
|
31
|
+
"@instructure/ui-dom-utils": "8.10.3-snapshot.2+ccdf8f43b",
|
|
32
|
+
"@instructure/ui-portal": "8.10.3-snapshot.2+ccdf8f43b",
|
|
33
|
+
"@instructure/ui-prop-types": "8.10.3-snapshot.2+ccdf8f43b",
|
|
34
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.2+ccdf8f43b",
|
|
35
|
+
"@instructure/ui-testable": "8.10.3-snapshot.2+ccdf8f43b",
|
|
36
|
+
"@instructure/ui-utils": "8.10.3-snapshot.2+ccdf8f43b",
|
|
37
|
+
"@instructure/uid": "8.10.3-snapshot.2+ccdf8f43b",
|
|
38
38
|
"prop-types": "^15"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@instructure/ui-babel-preset": "8.10.
|
|
42
|
-
"@instructure/ui-color-utils": "8.10.
|
|
43
|
-
"@instructure/ui-test-locator": "8.10.
|
|
44
|
-
"@instructure/ui-test-utils": "8.10.
|
|
45
|
-
"@instructure/ui-themes": "8.10.
|
|
41
|
+
"@instructure/ui-babel-preset": "8.10.3-snapshot.2+ccdf8f43b",
|
|
42
|
+
"@instructure/ui-color-utils": "8.10.3-snapshot.2+ccdf8f43b",
|
|
43
|
+
"@instructure/ui-test-locator": "8.10.3-snapshot.2+ccdf8f43b",
|
|
44
|
+
"@instructure/ui-test-utils": "8.10.3-snapshot.2+ccdf8f43b",
|
|
45
|
+
"@instructure/ui-themes": "8.10.3-snapshot.2+ccdf8f43b"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": ">=16.8 <=17"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": false,
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "ccdf8f43b56a8edef32600281692dfeb436d5a01"
|
|
55
55
|
}
|
package/src/Position/index.tsx
CHANGED
|
@@ -100,12 +100,18 @@ class Position extends Component<PositionProps, PositionState> {
|
|
|
100
100
|
this._id = this.props.id || uid('Position')
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
ref: Element | null = null
|
|
103
104
|
_id: string
|
|
104
105
|
_timeouts: NodeJS.Timeout[] = []
|
|
105
106
|
_listener: PositionChangeListenerType | null = null
|
|
106
107
|
_content?: PositionElement
|
|
107
108
|
_target?: PositionElement
|
|
108
109
|
|
|
110
|
+
handleRef = (el: Element | null) => {
|
|
111
|
+
this.ref = el
|
|
112
|
+
this.props.elementRef?.(el)
|
|
113
|
+
}
|
|
114
|
+
|
|
109
115
|
shouldComponentUpdate(
|
|
110
116
|
nextProps: PositionProps,
|
|
111
117
|
nextState: PositionState,
|
|
@@ -246,6 +252,7 @@ class Position extends Component<PositionProps, PositionState> {
|
|
|
246
252
|
}
|
|
247
253
|
}
|
|
248
254
|
|
|
255
|
+
// content that needs to be positioned relative to the target
|
|
249
256
|
renderContent() {
|
|
250
257
|
let content = ensureSingleChild(this.props.children)
|
|
251
258
|
|
|
@@ -298,7 +305,7 @@ class Position extends Component<PositionProps, PositionState> {
|
|
|
298
305
|
render() {
|
|
299
306
|
const props = { [Position.locatorAttribute]: this._id }
|
|
300
307
|
return (
|
|
301
|
-
<span {...props}>
|
|
308
|
+
<span {...props} ref={this.handleRef}>
|
|
302
309
|
{this.renderTarget()}
|
|
303
310
|
{this.renderContent()}
|
|
304
311
|
</span>
|
package/src/Position/props.ts
CHANGED
|
@@ -111,6 +111,11 @@ type PositionOwnProps = {
|
|
|
111
111
|
* The content to be positioned
|
|
112
112
|
*/
|
|
113
113
|
children?: React.ReactNode
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Provides a reference to the underlying HTML root element (the target)
|
|
117
|
+
*/
|
|
118
|
+
elementRef?: (element: Element | null) => void
|
|
114
119
|
}
|
|
115
120
|
|
|
116
121
|
type PositionState = {
|
|
@@ -127,7 +132,8 @@ type PropKeys = keyof PositionOwnProps
|
|
|
127
132
|
|
|
128
133
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
129
134
|
|
|
130
|
-
type PositionProps = PositionOwnProps &
|
|
135
|
+
type PositionProps = PositionOwnProps &
|
|
136
|
+
WithStyleProps<PositionTheme, PositionStyle>
|
|
131
137
|
|
|
132
138
|
const propTypes: PropValidators<PropKeys> = {
|
|
133
139
|
renderTarget: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
@@ -143,7 +149,8 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
143
149
|
shouldPositionOverTarget: PropTypes.bool,
|
|
144
150
|
onPositionChanged: PropTypes.func,
|
|
145
151
|
onPositioned: PropTypes.func,
|
|
146
|
-
children: PropTypes.node
|
|
152
|
+
children: PropTypes.node,
|
|
153
|
+
elementRef: PropTypes.func
|
|
147
154
|
}
|
|
148
155
|
|
|
149
156
|
const allowedProps: AllowedPropKeys = [
|
|
@@ -160,7 +167,8 @@ const allowedProps: AllowedPropKeys = [
|
|
|
160
167
|
'shouldPositionOverTarget',
|
|
161
168
|
'onPositionChanged',
|
|
162
169
|
'onPositioned',
|
|
163
|
-
'children'
|
|
170
|
+
'children',
|
|
171
|
+
'elementRef'
|
|
164
172
|
]
|
|
165
173
|
|
|
166
174
|
export type { PositionProps, PositionState, PositionStyle }
|
|
@@ -19,24 +19,28 @@ export declare const PositionContentLocator: {
|
|
|
19
19
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
20
20
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
21
21
|
} & {
|
|
22
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
23
|
+
highlight: boolean;
|
|
24
|
+
} | undefined) => string;
|
|
25
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
26
|
+
children: (selector: string) => Element[];
|
|
27
|
+
title: () => string | null | undefined;
|
|
28
|
+
id: () => string;
|
|
29
|
+
tagName: () => string;
|
|
30
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
31
|
+
getBoundingClientRect: () => DOMRect;
|
|
32
|
+
matches: (selector: string | undefined) => boolean;
|
|
22
33
|
visible: () => boolean;
|
|
23
34
|
value: () => string | null;
|
|
24
35
|
disabled: () => string | null;
|
|
25
36
|
role: () => string | null;
|
|
26
|
-
id: () => string;
|
|
27
37
|
label: () => string | null | undefined;
|
|
28
|
-
title: () => string | null | undefined;
|
|
29
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
30
|
-
highlight: boolean;
|
|
31
|
-
} | undefined) => string;
|
|
32
38
|
getId: () => string;
|
|
33
39
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
34
40
|
getOwnerDocument: () => Document;
|
|
35
41
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
36
42
|
getTagName: () => string;
|
|
37
|
-
tagName: () => string;
|
|
38
43
|
typeIn: (text: string) => Promise<void>;
|
|
39
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
40
44
|
getDOMNode: () => Element;
|
|
41
45
|
node: () => Element;
|
|
42
46
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -44,9 +48,8 @@ export declare const PositionContentLocator: {
|
|
|
44
48
|
} | undefined) => void;
|
|
45
49
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
46
50
|
getTextContent: () => string | null;
|
|
47
|
-
getParentNode: () =>
|
|
48
|
-
parent: () =>
|
|
49
|
-
getBoundingClientRect: () => DOMRect;
|
|
51
|
+
getParentNode: () => ParentNode | null;
|
|
52
|
+
parent: () => ParentNode | null;
|
|
50
53
|
rect: () => DOMRect;
|
|
51
54
|
hasClass: (classname: string) => boolean;
|
|
52
55
|
containsFocus: () => boolean;
|
|
@@ -58,19 +61,17 @@ export declare const PositionContentLocator: {
|
|
|
58
61
|
exists: () => boolean;
|
|
59
62
|
text: () => string | null;
|
|
60
63
|
empty: () => boolean;
|
|
61
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
62
64
|
descendants: (selector: string) => Element[];
|
|
63
|
-
ancestors: (selector: string) =>
|
|
65
|
+
ancestors: (selector: string) => ParentNode[];
|
|
64
66
|
attribute: (qualifiedName: string) => string | null;
|
|
65
67
|
style: (property: string) => string;
|
|
66
68
|
classNames: () => string[];
|
|
67
|
-
matches: (selector: string | undefined) => boolean;
|
|
68
69
|
checked: () => any;
|
|
69
70
|
selected: () => any;
|
|
70
71
|
readonly: () => any;
|
|
71
|
-
|
|
72
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
72
|
+
parents: (selector: string) => ParentNode[];
|
|
73
73
|
} & {
|
|
74
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
74
75
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
75
76
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
76
77
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -108,7 +109,6 @@ export declare const PositionContentLocator: {
|
|
|
108
109
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
109
110
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
110
111
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
111
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
112
112
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
113
113
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
114
114
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -158,24 +158,28 @@ export declare const PositionContentLocator: {
|
|
|
158
158
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
159
159
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
160
160
|
} & {
|
|
161
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
162
|
+
highlight: boolean;
|
|
163
|
+
} | undefined) => string;
|
|
164
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
165
|
+
children: (selector: string) => Element[];
|
|
166
|
+
title: () => string | null | undefined;
|
|
167
|
+
id: () => string;
|
|
168
|
+
tagName: () => string;
|
|
169
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
170
|
+
getBoundingClientRect: () => DOMRect;
|
|
171
|
+
matches: (selector: string | undefined) => boolean;
|
|
161
172
|
visible: () => boolean;
|
|
162
173
|
value: () => string | null;
|
|
163
174
|
disabled: () => string | null;
|
|
164
175
|
role: () => string | null;
|
|
165
|
-
id: () => string;
|
|
166
176
|
label: () => string | null | undefined;
|
|
167
|
-
title: () => string | null | undefined;
|
|
168
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
169
|
-
highlight: boolean;
|
|
170
|
-
} | undefined) => string;
|
|
171
177
|
getId: () => string;
|
|
172
178
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
173
179
|
getOwnerDocument: () => Document;
|
|
174
180
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
175
181
|
getTagName: () => string;
|
|
176
|
-
tagName: () => string;
|
|
177
182
|
typeIn: (text: string) => Promise<void>;
|
|
178
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
179
183
|
getDOMNode: () => Element;
|
|
180
184
|
node: () => Element;
|
|
181
185
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -183,9 +187,8 @@ export declare const PositionContentLocator: {
|
|
|
183
187
|
} | undefined) => void;
|
|
184
188
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
185
189
|
getTextContent: () => string | null;
|
|
186
|
-
getParentNode: () =>
|
|
187
|
-
parent: () =>
|
|
188
|
-
getBoundingClientRect: () => DOMRect;
|
|
190
|
+
getParentNode: () => ParentNode | null;
|
|
191
|
+
parent: () => ParentNode | null;
|
|
189
192
|
rect: () => DOMRect;
|
|
190
193
|
hasClass: (classname: string) => boolean;
|
|
191
194
|
containsFocus: () => boolean;
|
|
@@ -197,19 +200,17 @@ export declare const PositionContentLocator: {
|
|
|
197
200
|
exists: () => boolean;
|
|
198
201
|
text: () => string | null;
|
|
199
202
|
empty: () => boolean;
|
|
200
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
201
203
|
descendants: (selector: string) => Element[];
|
|
202
|
-
ancestors: (selector: string) =>
|
|
204
|
+
ancestors: (selector: string) => ParentNode[];
|
|
203
205
|
attribute: (qualifiedName: string) => string | null;
|
|
204
206
|
style: (property: string) => string;
|
|
205
207
|
classNames: () => string[];
|
|
206
|
-
matches: (selector: string | undefined) => boolean;
|
|
207
208
|
checked: () => any;
|
|
208
209
|
selected: () => any;
|
|
209
210
|
readonly: () => any;
|
|
210
|
-
|
|
211
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
211
|
+
parents: (selector: string) => ParentNode[];
|
|
212
212
|
} & {
|
|
213
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
213
214
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
214
215
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
215
216
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -247,7 +248,6 @@ export declare const PositionContentLocator: {
|
|
|
247
248
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
248
249
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
249
250
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
250
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
251
251
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
252
252
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
253
253
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -297,24 +297,28 @@ export declare const PositionContentLocator: {
|
|
|
297
297
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
298
298
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
299
299
|
} & {
|
|
300
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
301
|
+
highlight: boolean;
|
|
302
|
+
} | undefined) => string;
|
|
303
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
304
|
+
children: (selector: string) => Element[];
|
|
305
|
+
title: () => string | null | undefined;
|
|
306
|
+
id: () => string;
|
|
307
|
+
tagName: () => string;
|
|
308
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
309
|
+
getBoundingClientRect: () => DOMRect;
|
|
310
|
+
matches: (selector: string | undefined) => boolean;
|
|
300
311
|
visible: () => boolean;
|
|
301
312
|
value: () => string | null;
|
|
302
313
|
disabled: () => string | null;
|
|
303
314
|
role: () => string | null;
|
|
304
|
-
id: () => string;
|
|
305
315
|
label: () => string | null | undefined;
|
|
306
|
-
title: () => string | null | undefined;
|
|
307
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
308
|
-
highlight: boolean;
|
|
309
|
-
} | undefined) => string;
|
|
310
316
|
getId: () => string;
|
|
311
317
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
312
318
|
getOwnerDocument: () => Document;
|
|
313
319
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
314
320
|
getTagName: () => string;
|
|
315
|
-
tagName: () => string;
|
|
316
321
|
typeIn: (text: string) => Promise<void>;
|
|
317
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
318
322
|
getDOMNode: () => Element;
|
|
319
323
|
node: () => Element;
|
|
320
324
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -322,9 +326,8 @@ export declare const PositionContentLocator: {
|
|
|
322
326
|
} | undefined) => void;
|
|
323
327
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
324
328
|
getTextContent: () => string | null;
|
|
325
|
-
getParentNode: () =>
|
|
326
|
-
parent: () =>
|
|
327
|
-
getBoundingClientRect: () => DOMRect;
|
|
329
|
+
getParentNode: () => ParentNode | null;
|
|
330
|
+
parent: () => ParentNode | null;
|
|
328
331
|
rect: () => DOMRect;
|
|
329
332
|
hasClass: (classname: string) => boolean;
|
|
330
333
|
containsFocus: () => boolean;
|
|
@@ -336,19 +339,17 @@ export declare const PositionContentLocator: {
|
|
|
336
339
|
exists: () => boolean;
|
|
337
340
|
text: () => string | null;
|
|
338
341
|
empty: () => boolean;
|
|
339
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
340
342
|
descendants: (selector: string) => Element[];
|
|
341
|
-
ancestors: (selector: string) =>
|
|
343
|
+
ancestors: (selector: string) => ParentNode[];
|
|
342
344
|
attribute: (qualifiedName: string) => string | null;
|
|
343
345
|
style: (property: string) => string;
|
|
344
346
|
classNames: () => string[];
|
|
345
|
-
matches: (selector: string | undefined) => boolean;
|
|
346
347
|
checked: () => any;
|
|
347
348
|
selected: () => any;
|
|
348
349
|
readonly: () => any;
|
|
349
|
-
|
|
350
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
350
|
+
parents: (selector: string) => ParentNode[];
|
|
351
351
|
} & {
|
|
352
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
352
353
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
353
354
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
354
355
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -386,7 +387,6 @@ export declare const PositionContentLocator: {
|
|
|
386
387
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
387
388
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
388
389
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
389
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
390
390
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
391
391
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
392
392
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -436,24 +436,28 @@ export declare const PositionContentLocator: {
|
|
|
436
436
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
437
437
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
438
438
|
} & {
|
|
439
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
440
|
+
highlight: boolean;
|
|
441
|
+
} | undefined) => string;
|
|
442
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
443
|
+
children: (selector: string) => Element[];
|
|
444
|
+
title: () => string | null | undefined;
|
|
445
|
+
id: () => string;
|
|
446
|
+
tagName: () => string;
|
|
447
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
448
|
+
getBoundingClientRect: () => DOMRect;
|
|
449
|
+
matches: (selector: string | undefined) => boolean;
|
|
439
450
|
visible: () => boolean;
|
|
440
451
|
value: () => string | null;
|
|
441
452
|
disabled: () => string | null;
|
|
442
453
|
role: () => string | null;
|
|
443
|
-
id: () => string;
|
|
444
454
|
label: () => string | null | undefined;
|
|
445
|
-
title: () => string | null | undefined;
|
|
446
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
447
|
-
highlight: boolean;
|
|
448
|
-
} | undefined) => string;
|
|
449
455
|
getId: () => string;
|
|
450
456
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
451
457
|
getOwnerDocument: () => Document;
|
|
452
458
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
453
459
|
getTagName: () => string;
|
|
454
|
-
tagName: () => string;
|
|
455
460
|
typeIn: (text: string) => Promise<void>;
|
|
456
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
457
461
|
getDOMNode: () => Element;
|
|
458
462
|
node: () => Element;
|
|
459
463
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -461,9 +465,8 @@ export declare const PositionContentLocator: {
|
|
|
461
465
|
} | undefined) => void;
|
|
462
466
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
463
467
|
getTextContent: () => string | null;
|
|
464
|
-
getParentNode: () =>
|
|
465
|
-
parent: () =>
|
|
466
|
-
getBoundingClientRect: () => DOMRect;
|
|
468
|
+
getParentNode: () => ParentNode | null;
|
|
469
|
+
parent: () => ParentNode | null;
|
|
467
470
|
rect: () => DOMRect;
|
|
468
471
|
hasClass: (classname: string) => boolean;
|
|
469
472
|
containsFocus: () => boolean;
|
|
@@ -475,19 +478,17 @@ export declare const PositionContentLocator: {
|
|
|
475
478
|
exists: () => boolean;
|
|
476
479
|
text: () => string | null;
|
|
477
480
|
empty: () => boolean;
|
|
478
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
479
481
|
descendants: (selector: string) => Element[];
|
|
480
|
-
ancestors: (selector: string) =>
|
|
482
|
+
ancestors: (selector: string) => ParentNode[];
|
|
481
483
|
attribute: (qualifiedName: string) => string | null;
|
|
482
484
|
style: (property: string) => string;
|
|
483
485
|
classNames: () => string[];
|
|
484
|
-
matches: (selector: string | undefined) => boolean;
|
|
485
486
|
checked: () => any;
|
|
486
487
|
selected: () => any;
|
|
487
488
|
readonly: () => any;
|
|
488
|
-
|
|
489
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
489
|
+
parents: (selector: string) => ParentNode[];
|
|
490
490
|
} & {
|
|
491
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
491
492
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
492
493
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
493
494
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -525,7 +526,6 @@ export declare const PositionContentLocator: {
|
|
|
525
526
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
526
527
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
527
528
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
528
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
529
529
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
530
530
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
531
531
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|