@instructure/ui-file-drop 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
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-file-drop
|
|
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-file-drop
|
|
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-file-drop
|
package/es/FileDrop/index.js
CHANGED
|
@@ -89,6 +89,11 @@ let FileDrop = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
89
89
|
this.enterCounter = 0;
|
|
90
90
|
this.fileInputEl = null;
|
|
91
91
|
this.defaultId = null;
|
|
92
|
+
this.ref = null;
|
|
93
|
+
|
|
94
|
+
this.handleElementRef = el => {
|
|
95
|
+
this.ref = el;
|
|
96
|
+
};
|
|
92
97
|
|
|
93
98
|
this.handleDragEnter = e => {
|
|
94
99
|
e.preventDefault(); // Count the dropzone and any children that are entered.
|
|
@@ -341,7 +346,8 @@ let FileDrop = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 =
|
|
|
341
346
|
minWidth: minWidth,
|
|
342
347
|
maxWidth: maxWidth,
|
|
343
348
|
margin: margin,
|
|
344
|
-
height: height
|
|
349
|
+
height: height,
|
|
350
|
+
elementRef: this.handleElementRef
|
|
345
351
|
}, jsx("label", {
|
|
346
352
|
css: this.props.styles.fileDropLabel,
|
|
347
353
|
htmlFor: id,
|
package/lib/FileDrop/index.js
CHANGED
|
@@ -92,6 +92,11 @@ let FileDrop = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
92
92
|
this.enterCounter = 0;
|
|
93
93
|
this.fileInputEl = null;
|
|
94
94
|
this.defaultId = null;
|
|
95
|
+
this.ref = null;
|
|
96
|
+
|
|
97
|
+
this.handleElementRef = el => {
|
|
98
|
+
this.ref = el;
|
|
99
|
+
};
|
|
95
100
|
|
|
96
101
|
this.handleDragEnter = e => {
|
|
97
102
|
e.preventDefault(); // Count the dropzone and any children that are entered.
|
|
@@ -343,7 +348,8 @@ let FileDrop = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
|
343
348
|
minWidth: minWidth,
|
|
344
349
|
maxWidth: maxWidth,
|
|
345
350
|
margin: margin,
|
|
346
|
-
height: height
|
|
351
|
+
height: height,
|
|
352
|
+
elementRef: this.handleElementRef
|
|
347
353
|
}, (0, _emotion.jsx)("label", {
|
|
348
354
|
css: this.props.styles.fileDropLabel,
|
|
349
355
|
htmlFor: id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-file-drop",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.3-snapshot.2+ccdf8f43b",
|
|
4
4
|
"description": "A flexible facade for an HTML file input",
|
|
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/console": "8.10.
|
|
29
|
-
"@instructure/emotion": "8.10.
|
|
30
|
-
"@instructure/shared-types": "8.10.
|
|
31
|
-
"@instructure/ui-color-utils": "8.10.
|
|
32
|
-
"@instructure/ui-form-field": "8.10.
|
|
33
|
-
"@instructure/ui-react-utils": "8.10.
|
|
34
|
-
"@instructure/ui-testable": "8.10.
|
|
35
|
-
"@instructure/ui-utils": "8.10.
|
|
36
|
-
"@instructure/ui-view": "8.10.
|
|
37
|
-
"@instructure/uid": "8.10.
|
|
28
|
+
"@instructure/console": "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-color-utils": "8.10.3-snapshot.2+ccdf8f43b",
|
|
32
|
+
"@instructure/ui-form-field": "8.10.3-snapshot.2+ccdf8f43b",
|
|
33
|
+
"@instructure/ui-react-utils": "8.10.3-snapshot.2+ccdf8f43b",
|
|
34
|
+
"@instructure/ui-testable": "8.10.3-snapshot.2+ccdf8f43b",
|
|
35
|
+
"@instructure/ui-utils": "8.10.3-snapshot.2+ccdf8f43b",
|
|
36
|
+
"@instructure/ui-view": "8.10.3-snapshot.2+ccdf8f43b",
|
|
37
|
+
"@instructure/uid": "8.10.3-snapshot.2+ccdf8f43b",
|
|
38
38
|
"keycode": "^2",
|
|
39
39
|
"prop-types": "^15"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@instructure/ui-babel-preset": "8.10.
|
|
43
|
-
"@instructure/ui-test-locator": "8.10.
|
|
44
|
-
"@instructure/ui-test-utils": "8.10.
|
|
45
|
-
"@instructure/ui-themes": "8.10.
|
|
42
|
+
"@instructure/ui-babel-preset": "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/FileDrop/index.tsx
CHANGED
|
@@ -134,6 +134,12 @@ class FileDrop extends Component<FileDropProps, FileDropState> {
|
|
|
134
134
|
fileInputEl = null
|
|
135
135
|
defaultId = null
|
|
136
136
|
|
|
137
|
+
ref: Element | null = null
|
|
138
|
+
|
|
139
|
+
handleElementRef = (el: Element | null) => {
|
|
140
|
+
this.ref = el
|
|
141
|
+
}
|
|
142
|
+
|
|
137
143
|
get functionallyDisabled() {
|
|
138
144
|
return this.interaction === 'disabled' || this.interaction === 'readonly'
|
|
139
145
|
}
|
|
@@ -372,6 +378,7 @@ class FileDrop extends Component<FileDropProps, FileDropState> {
|
|
|
372
378
|
maxWidth={maxWidth}
|
|
373
379
|
margin={margin}
|
|
374
380
|
height={height}
|
|
381
|
+
elementRef={this.handleElementRef}
|
|
375
382
|
>
|
|
376
383
|
<label
|
|
377
384
|
css={(this.props as any).styles.fileDropLabel}
|
|
@@ -23,24 +23,28 @@ export declare const FileDropLocator: {
|
|
|
23
23
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
24
24
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
25
25
|
} & {
|
|
26
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
27
|
+
highlight: boolean;
|
|
28
|
+
} | undefined) => string;
|
|
29
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
30
|
+
children: (selector: string) => Element[];
|
|
31
|
+
title: () => string | null | undefined;
|
|
32
|
+
id: () => string;
|
|
33
|
+
tagName: () => string;
|
|
34
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
35
|
+
getBoundingClientRect: () => DOMRect;
|
|
36
|
+
matches: (selector: string | undefined) => boolean;
|
|
26
37
|
visible: () => boolean;
|
|
27
38
|
value: () => string | null;
|
|
28
39
|
disabled: () => string | null;
|
|
29
40
|
role: () => string | null;
|
|
30
|
-
id: () => string;
|
|
31
41
|
label: () => string | null | undefined;
|
|
32
|
-
title: () => string | null | undefined;
|
|
33
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
34
|
-
highlight: boolean;
|
|
35
|
-
} | undefined) => string;
|
|
36
42
|
getId: () => string;
|
|
37
43
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
38
44
|
getOwnerDocument: () => Document;
|
|
39
45
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
40
46
|
getTagName: () => string;
|
|
41
|
-
tagName: () => string;
|
|
42
47
|
typeIn: (text: string) => Promise<void>;
|
|
43
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
44
48
|
getDOMNode: () => Element;
|
|
45
49
|
node: () => Element;
|
|
46
50
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -48,9 +52,8 @@ export declare const FileDropLocator: {
|
|
|
48
52
|
} | undefined) => void;
|
|
49
53
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
50
54
|
getTextContent: () => string | null;
|
|
51
|
-
getParentNode: () =>
|
|
52
|
-
parent: () =>
|
|
53
|
-
getBoundingClientRect: () => DOMRect;
|
|
55
|
+
getParentNode: () => ParentNode | null;
|
|
56
|
+
parent: () => ParentNode | null;
|
|
54
57
|
rect: () => DOMRect;
|
|
55
58
|
hasClass: (classname: string) => boolean;
|
|
56
59
|
containsFocus: () => boolean;
|
|
@@ -62,19 +65,17 @@ export declare const FileDropLocator: {
|
|
|
62
65
|
exists: () => boolean;
|
|
63
66
|
text: () => string | null;
|
|
64
67
|
empty: () => boolean;
|
|
65
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
66
68
|
descendants: (selector: string) => Element[];
|
|
67
|
-
ancestors: (selector: string) =>
|
|
69
|
+
ancestors: (selector: string) => ParentNode[];
|
|
68
70
|
attribute: (qualifiedName: string) => string | null;
|
|
69
71
|
style: (property: string) => string;
|
|
70
72
|
classNames: () => string[];
|
|
71
|
-
matches: (selector: string | undefined) => boolean;
|
|
72
73
|
checked: () => any;
|
|
73
74
|
selected: () => any;
|
|
74
75
|
readonly: () => any;
|
|
75
|
-
|
|
76
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
76
|
+
parents: (selector: string) => ParentNode[];
|
|
77
77
|
} & {
|
|
78
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
78
79
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
79
80
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
80
81
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -112,7 +113,6 @@ export declare const FileDropLocator: {
|
|
|
112
113
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
113
114
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
114
115
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
115
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
116
116
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
117
117
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
118
118
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -166,24 +166,28 @@ export declare const FileDropLocator: {
|
|
|
166
166
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
167
167
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
168
168
|
} & {
|
|
169
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
170
|
+
highlight: boolean;
|
|
171
|
+
} | undefined) => string;
|
|
172
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
173
|
+
children: (selector: string) => Element[];
|
|
174
|
+
title: () => string | null | undefined;
|
|
175
|
+
id: () => string;
|
|
176
|
+
tagName: () => string;
|
|
177
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
178
|
+
getBoundingClientRect: () => DOMRect;
|
|
179
|
+
matches: (selector: string | undefined) => boolean;
|
|
169
180
|
visible: () => boolean;
|
|
170
181
|
value: () => string | null;
|
|
171
182
|
disabled: () => string | null;
|
|
172
183
|
role: () => string | null;
|
|
173
|
-
id: () => string;
|
|
174
184
|
label: () => string | null | undefined;
|
|
175
|
-
title: () => string | null | undefined;
|
|
176
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
177
|
-
highlight: boolean;
|
|
178
|
-
} | undefined) => string;
|
|
179
185
|
getId: () => string;
|
|
180
186
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
181
187
|
getOwnerDocument: () => Document;
|
|
182
188
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
183
189
|
getTagName: () => string;
|
|
184
|
-
tagName: () => string;
|
|
185
190
|
typeIn: (text: string) => Promise<void>;
|
|
186
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
187
191
|
getDOMNode: () => Element;
|
|
188
192
|
node: () => Element;
|
|
189
193
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -191,9 +195,8 @@ export declare const FileDropLocator: {
|
|
|
191
195
|
} | undefined) => void;
|
|
192
196
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
193
197
|
getTextContent: () => string | null;
|
|
194
|
-
getParentNode: () =>
|
|
195
|
-
parent: () =>
|
|
196
|
-
getBoundingClientRect: () => DOMRect;
|
|
198
|
+
getParentNode: () => ParentNode | null;
|
|
199
|
+
parent: () => ParentNode | null;
|
|
197
200
|
rect: () => DOMRect;
|
|
198
201
|
hasClass: (classname: string) => boolean;
|
|
199
202
|
containsFocus: () => boolean;
|
|
@@ -205,19 +208,17 @@ export declare const FileDropLocator: {
|
|
|
205
208
|
exists: () => boolean;
|
|
206
209
|
text: () => string | null;
|
|
207
210
|
empty: () => boolean;
|
|
208
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
209
211
|
descendants: (selector: string) => Element[];
|
|
210
|
-
ancestors: (selector: string) =>
|
|
212
|
+
ancestors: (selector: string) => ParentNode[];
|
|
211
213
|
attribute: (qualifiedName: string) => string | null;
|
|
212
214
|
style: (property: string) => string;
|
|
213
215
|
classNames: () => string[];
|
|
214
|
-
matches: (selector: string | undefined) => boolean;
|
|
215
216
|
checked: () => any;
|
|
216
217
|
selected: () => any;
|
|
217
218
|
readonly: () => any;
|
|
218
|
-
|
|
219
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
219
|
+
parents: (selector: string) => ParentNode[];
|
|
220
220
|
} & {
|
|
221
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
221
222
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
222
223
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
223
224
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -255,7 +256,6 @@ export declare const FileDropLocator: {
|
|
|
255
256
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
256
257
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
257
258
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
258
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
259
259
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
260
260
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
261
261
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -309,24 +309,28 @@ export declare const FileDropLocator: {
|
|
|
309
309
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
310
310
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
311
311
|
} & {
|
|
312
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
313
|
+
highlight: boolean;
|
|
314
|
+
} | undefined) => string;
|
|
315
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
316
|
+
children: (selector: string) => Element[];
|
|
317
|
+
title: () => string | null | undefined;
|
|
318
|
+
id: () => string;
|
|
319
|
+
tagName: () => string;
|
|
320
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
321
|
+
getBoundingClientRect: () => DOMRect;
|
|
322
|
+
matches: (selector: string | undefined) => boolean;
|
|
312
323
|
visible: () => boolean;
|
|
313
324
|
value: () => string | null;
|
|
314
325
|
disabled: () => string | null;
|
|
315
326
|
role: () => string | null;
|
|
316
|
-
id: () => string;
|
|
317
327
|
label: () => string | null | undefined;
|
|
318
|
-
title: () => string | null | undefined;
|
|
319
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
320
|
-
highlight: boolean;
|
|
321
|
-
} | undefined) => string;
|
|
322
328
|
getId: () => string;
|
|
323
329
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
324
330
|
getOwnerDocument: () => Document;
|
|
325
331
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
326
332
|
getTagName: () => string;
|
|
327
|
-
tagName: () => string;
|
|
328
333
|
typeIn: (text: string) => Promise<void>;
|
|
329
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
330
334
|
getDOMNode: () => Element;
|
|
331
335
|
node: () => Element;
|
|
332
336
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -334,9 +338,8 @@ export declare const FileDropLocator: {
|
|
|
334
338
|
} | undefined) => void;
|
|
335
339
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
336
340
|
getTextContent: () => string | null;
|
|
337
|
-
getParentNode: () =>
|
|
338
|
-
parent: () =>
|
|
339
|
-
getBoundingClientRect: () => DOMRect;
|
|
341
|
+
getParentNode: () => ParentNode | null;
|
|
342
|
+
parent: () => ParentNode | null;
|
|
340
343
|
rect: () => DOMRect;
|
|
341
344
|
hasClass: (classname: string) => boolean;
|
|
342
345
|
containsFocus: () => boolean;
|
|
@@ -348,19 +351,17 @@ export declare const FileDropLocator: {
|
|
|
348
351
|
exists: () => boolean;
|
|
349
352
|
text: () => string | null;
|
|
350
353
|
empty: () => boolean;
|
|
351
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
352
354
|
descendants: (selector: string) => Element[];
|
|
353
|
-
ancestors: (selector: string) =>
|
|
355
|
+
ancestors: (selector: string) => ParentNode[];
|
|
354
356
|
attribute: (qualifiedName: string) => string | null;
|
|
355
357
|
style: (property: string) => string;
|
|
356
358
|
classNames: () => string[];
|
|
357
|
-
matches: (selector: string | undefined) => boolean;
|
|
358
359
|
checked: () => any;
|
|
359
360
|
selected: () => any;
|
|
360
361
|
readonly: () => any;
|
|
361
|
-
|
|
362
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
362
|
+
parents: (selector: string) => ParentNode[];
|
|
363
363
|
} & {
|
|
364
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
364
365
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
365
366
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
366
367
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -398,7 +399,6 @@ export declare const FileDropLocator: {
|
|
|
398
399
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
399
400
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
400
401
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
401
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
402
402
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
403
403
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
404
404
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -452,24 +452,28 @@ export declare const FileDropLocator: {
|
|
|
452
452
|
findParent: typeof import("@instructure/ui-test-queries/src/utils/queries").findParent;
|
|
453
453
|
findParents: typeof import("@instructure/ui-test-queries/src/utils/queries").findParents;
|
|
454
454
|
} & {
|
|
455
|
+
toString: (maxLength?: number | undefined, options?: {
|
|
456
|
+
highlight: boolean;
|
|
457
|
+
} | undefined) => string;
|
|
458
|
+
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
459
|
+
children: (selector: string) => Element[];
|
|
460
|
+
title: () => string | null | undefined;
|
|
461
|
+
id: () => string;
|
|
462
|
+
tagName: () => string;
|
|
463
|
+
getAttribute: (qualifiedName: string) => string | null;
|
|
464
|
+
getBoundingClientRect: () => DOMRect;
|
|
465
|
+
matches: (selector: string | undefined) => boolean;
|
|
455
466
|
visible: () => boolean;
|
|
456
467
|
value: () => string | null;
|
|
457
468
|
disabled: () => string | null;
|
|
458
469
|
role: () => string | null;
|
|
459
|
-
id: () => string;
|
|
460
470
|
label: () => string | null | undefined;
|
|
461
|
-
title: () => string | null | undefined;
|
|
462
|
-
toString: (maxLength?: number | undefined, options?: {
|
|
463
|
-
highlight: boolean;
|
|
464
|
-
} | undefined) => string;
|
|
465
471
|
getId: () => string;
|
|
466
472
|
getOwnerWindow: () => (Window & typeof globalThis) | null;
|
|
467
473
|
getOwnerDocument: () => Document;
|
|
468
474
|
getComputedStyle: () => CSSStyleDeclaration;
|
|
469
475
|
getTagName: () => string;
|
|
470
|
-
tagName: () => string;
|
|
471
476
|
typeIn: (text: string) => Promise<void>;
|
|
472
|
-
getAttribute: (qualifiedName: string) => string | null;
|
|
473
477
|
getDOMNode: () => Element;
|
|
474
478
|
node: () => Element;
|
|
475
479
|
debug: (maxLength?: number | undefined, options?: {
|
|
@@ -477,9 +481,8 @@ export declare const FileDropLocator: {
|
|
|
477
481
|
} | undefined) => void;
|
|
478
482
|
accessible: (options?: Record<string, unknown> | undefined) => Promise<boolean>;
|
|
479
483
|
getTextContent: () => string | null;
|
|
480
|
-
getParentNode: () =>
|
|
481
|
-
parent: () =>
|
|
482
|
-
getBoundingClientRect: () => DOMRect;
|
|
484
|
+
getParentNode: () => ParentNode | null;
|
|
485
|
+
parent: () => ParentNode | null;
|
|
483
486
|
rect: () => DOMRect;
|
|
484
487
|
hasClass: (classname: string) => boolean;
|
|
485
488
|
containsFocus: () => boolean;
|
|
@@ -491,19 +494,17 @@ export declare const FileDropLocator: {
|
|
|
491
494
|
exists: () => boolean;
|
|
492
495
|
text: () => string | null;
|
|
493
496
|
empty: () => boolean;
|
|
494
|
-
contains: (elementOrSelector?: string | Element | undefined) => boolean | Element;
|
|
495
497
|
descendants: (selector: string) => Element[];
|
|
496
|
-
ancestors: (selector: string) =>
|
|
498
|
+
ancestors: (selector: string) => ParentNode[];
|
|
497
499
|
attribute: (qualifiedName: string) => string | null;
|
|
498
500
|
style: (property: string) => string;
|
|
499
501
|
classNames: () => string[];
|
|
500
|
-
matches: (selector: string | undefined) => boolean;
|
|
501
502
|
checked: () => any;
|
|
502
503
|
selected: () => any;
|
|
503
504
|
readonly: () => any;
|
|
504
|
-
|
|
505
|
-
parents: (selector: string) => (Node & ParentNode)[];
|
|
505
|
+
parents: (selector: string) => ParentNode[];
|
|
506
506
|
} & {
|
|
507
|
+
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
507
508
|
copy: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
508
509
|
cut: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
509
510
|
paste: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -541,7 +542,6 @@ export declare const FileDropLocator: {
|
|
|
541
542
|
touchEnd: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
542
543
|
touchMove: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
543
544
|
touchStart: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
544
|
-
scroll: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
545
545
|
wheel: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
546
546
|
abort: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
547
547
|
canPlay: (init?: import("@instructure/ui-test-queries/src/utils/events").FireEventInit | undefined, options?: Record<string, unknown> | undefined) => Promise<Event>;
|
|
@@ -83,6 +83,8 @@ declare class FileDrop extends Component<FileDropProps, FileDropState> {
|
|
|
83
83
|
enterCounter: number;
|
|
84
84
|
fileInputEl: null;
|
|
85
85
|
defaultId: null;
|
|
86
|
+
ref: Element | null;
|
|
87
|
+
handleElementRef: (el: Element | null) => void;
|
|
86
88
|
get functionallyDisabled(): boolean;
|
|
87
89
|
get hasMessages(): any;
|
|
88
90
|
get interaction(): import("@instructure/ui-react-utils").InteractionType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3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