@testing-library/user-event 14.0.0-beta.9 → 14.0.0
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/README.md +2 -2
- package/dist/index.cjs +632 -739
- package/dist/index.mjs +624 -726
- package/dist/types/event/behavior/cut.d.ts +1 -0
- package/dist/types/event/behavior/index.d.ts +5 -0
- package/dist/types/event/behavior/keydown.d.ts +1 -0
- package/dist/types/event/behavior/keypress.d.ts +1 -0
- package/dist/types/event/behavior/keyup.d.ts +1 -0
- package/dist/types/event/behavior/paste.d.ts +1 -0
- package/dist/types/event/dispatchEvent.d.ts +1 -1
- package/dist/types/event/eventMap.d.ts +361 -0
- package/dist/types/event/index.d.ts +2 -2
- package/dist/types/keyboard/modifiers.d.ts +9 -0
- package/dist/types/keyboard/types.d.ts +0 -5
- package/dist/types/utils/edit/input.d.ts +2 -0
- package/dist/types/utils/edit/isValidDateOrTimeValue.d.ts +3 -0
- package/dist/types/utils/focus/selection.d.ts +4 -0
- package/dist/types/utils/index.d.ts +1 -8
- package/dist/types/utils/keyDef/readNextDescriptor.d.ts +3 -1
- package/package.json +10 -13
- package/dist/types/keyboard/plugins/arrow.d.ts +0 -6
- package/dist/types/keyboard/plugins/character.d.ts +0 -5
- package/dist/types/keyboard/plugins/combination.d.ts +0 -5
- package/dist/types/keyboard/plugins/control.d.ts +0 -6
- package/dist/types/keyboard/plugins/functional.d.ts +0 -8
- package/dist/types/keyboard/plugins/index.d.ts +0 -7
- package/dist/types/keyboard/plugins/modifiers.d.ts +0 -8
- package/dist/types/keyboard/shared/fireChangeForInputTimeIfValid.d.ts +0 -4
- package/dist/types/keyboard/shared/index.d.ts +0 -1
- package/dist/types/utils/edit/calculateNewValue.d.ts +0 -14
- package/dist/types/utils/edit/editInputElement.d.ts +0 -14
- package/dist/types/utils/edit/isValidDateValue.d.ts +0 -3
- package/dist/types/utils/edit/isValidInputTimeValue.d.ts +0 -3
- package/dist/types/utils/edit/prepareInput.d.ts +0 -8
- package/dist/types/utils/misc/hasFormSubmit.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Config } from '../setup';
|
|
2
|
-
export declare function dispatchEvent(config: Config, target: Element, event: Event): boolean;
|
|
2
|
+
export declare function dispatchEvent(config: Config, target: Element, event: Event, preventDefault?: boolean): boolean;
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
export declare const eventMap: {
|
|
2
|
+
beforeInput: {
|
|
3
|
+
EventType: string;
|
|
4
|
+
defaultInit: {
|
|
5
|
+
bubbles: boolean;
|
|
6
|
+
cancelable: boolean;
|
|
7
|
+
composed: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
input: {
|
|
11
|
+
EventType: string;
|
|
12
|
+
defaultInit: EventInit;
|
|
13
|
+
};
|
|
14
|
+
progress: {
|
|
15
|
+
EventType: string;
|
|
16
|
+
defaultInit: EventInit;
|
|
17
|
+
};
|
|
18
|
+
select: {
|
|
19
|
+
EventType: string;
|
|
20
|
+
defaultInit: EventInit;
|
|
21
|
+
};
|
|
22
|
+
scroll: {
|
|
23
|
+
EventType: string;
|
|
24
|
+
defaultInit: EventInit;
|
|
25
|
+
};
|
|
26
|
+
reset: {
|
|
27
|
+
EventType: string;
|
|
28
|
+
defaultInit: EventInit;
|
|
29
|
+
};
|
|
30
|
+
submit: {
|
|
31
|
+
EventType: string;
|
|
32
|
+
defaultInit: EventInit;
|
|
33
|
+
};
|
|
34
|
+
copy: {
|
|
35
|
+
EventType: string;
|
|
36
|
+
defaultInit: EventInit;
|
|
37
|
+
};
|
|
38
|
+
click: {
|
|
39
|
+
EventType: string;
|
|
40
|
+
defaultInit: EventInit;
|
|
41
|
+
};
|
|
42
|
+
blur: {
|
|
43
|
+
EventType: string;
|
|
44
|
+
defaultInit: EventInit;
|
|
45
|
+
};
|
|
46
|
+
focus: {
|
|
47
|
+
EventType: string;
|
|
48
|
+
defaultInit: EventInit;
|
|
49
|
+
};
|
|
50
|
+
cut: {
|
|
51
|
+
EventType: string;
|
|
52
|
+
defaultInit: EventInit;
|
|
53
|
+
};
|
|
54
|
+
paste: {
|
|
55
|
+
EventType: string;
|
|
56
|
+
defaultInit: EventInit;
|
|
57
|
+
};
|
|
58
|
+
abort: {
|
|
59
|
+
EventType: string;
|
|
60
|
+
defaultInit: EventInit;
|
|
61
|
+
};
|
|
62
|
+
change: {
|
|
63
|
+
EventType: string;
|
|
64
|
+
defaultInit: EventInit;
|
|
65
|
+
};
|
|
66
|
+
drag: {
|
|
67
|
+
EventType: string;
|
|
68
|
+
defaultInit: EventInit;
|
|
69
|
+
};
|
|
70
|
+
drop: {
|
|
71
|
+
EventType: string;
|
|
72
|
+
defaultInit: EventInit;
|
|
73
|
+
};
|
|
74
|
+
emptied: {
|
|
75
|
+
EventType: string;
|
|
76
|
+
defaultInit: EventInit;
|
|
77
|
+
};
|
|
78
|
+
ended: {
|
|
79
|
+
EventType: string;
|
|
80
|
+
defaultInit: EventInit;
|
|
81
|
+
};
|
|
82
|
+
error: {
|
|
83
|
+
EventType: string;
|
|
84
|
+
defaultInit: EventInit;
|
|
85
|
+
};
|
|
86
|
+
invalid: {
|
|
87
|
+
EventType: string;
|
|
88
|
+
defaultInit: EventInit;
|
|
89
|
+
};
|
|
90
|
+
load: {
|
|
91
|
+
EventType: string;
|
|
92
|
+
defaultInit: EventInit;
|
|
93
|
+
};
|
|
94
|
+
pause: {
|
|
95
|
+
EventType: string;
|
|
96
|
+
defaultInit: EventInit;
|
|
97
|
+
};
|
|
98
|
+
play: {
|
|
99
|
+
EventType: string;
|
|
100
|
+
defaultInit: EventInit;
|
|
101
|
+
};
|
|
102
|
+
playing: {
|
|
103
|
+
EventType: string;
|
|
104
|
+
defaultInit: EventInit;
|
|
105
|
+
};
|
|
106
|
+
resize: {
|
|
107
|
+
EventType: string;
|
|
108
|
+
defaultInit: EventInit;
|
|
109
|
+
};
|
|
110
|
+
seeked: {
|
|
111
|
+
EventType: string;
|
|
112
|
+
defaultInit: EventInit;
|
|
113
|
+
};
|
|
114
|
+
seeking: {
|
|
115
|
+
EventType: string;
|
|
116
|
+
defaultInit: EventInit;
|
|
117
|
+
};
|
|
118
|
+
stalled: {
|
|
119
|
+
EventType: string;
|
|
120
|
+
defaultInit: EventInit;
|
|
121
|
+
};
|
|
122
|
+
suspend: {
|
|
123
|
+
EventType: string;
|
|
124
|
+
defaultInit: EventInit;
|
|
125
|
+
};
|
|
126
|
+
waiting: {
|
|
127
|
+
EventType: string;
|
|
128
|
+
defaultInit: EventInit;
|
|
129
|
+
};
|
|
130
|
+
wheel: {
|
|
131
|
+
EventType: string;
|
|
132
|
+
defaultInit: EventInit;
|
|
133
|
+
};
|
|
134
|
+
compositionEnd: {
|
|
135
|
+
EventType: string;
|
|
136
|
+
defaultInit: EventInit;
|
|
137
|
+
};
|
|
138
|
+
compositionStart: {
|
|
139
|
+
EventType: string;
|
|
140
|
+
defaultInit: EventInit;
|
|
141
|
+
};
|
|
142
|
+
compositionUpdate: {
|
|
143
|
+
EventType: string;
|
|
144
|
+
defaultInit: EventInit;
|
|
145
|
+
};
|
|
146
|
+
keyDown: {
|
|
147
|
+
EventType: string;
|
|
148
|
+
defaultInit: EventInit;
|
|
149
|
+
};
|
|
150
|
+
keyPress: {
|
|
151
|
+
EventType: string;
|
|
152
|
+
defaultInit: EventInit;
|
|
153
|
+
};
|
|
154
|
+
keyUp: {
|
|
155
|
+
EventType: string;
|
|
156
|
+
defaultInit: EventInit;
|
|
157
|
+
};
|
|
158
|
+
focusIn: {
|
|
159
|
+
EventType: string;
|
|
160
|
+
defaultInit: EventInit;
|
|
161
|
+
};
|
|
162
|
+
focusOut: {
|
|
163
|
+
EventType: string;
|
|
164
|
+
defaultInit: EventInit;
|
|
165
|
+
};
|
|
166
|
+
contextMenu: {
|
|
167
|
+
EventType: string;
|
|
168
|
+
defaultInit: EventInit;
|
|
169
|
+
};
|
|
170
|
+
dblClick: {
|
|
171
|
+
EventType: string;
|
|
172
|
+
defaultInit: EventInit;
|
|
173
|
+
};
|
|
174
|
+
dragEnd: {
|
|
175
|
+
EventType: string;
|
|
176
|
+
defaultInit: EventInit;
|
|
177
|
+
};
|
|
178
|
+
dragEnter: {
|
|
179
|
+
EventType: string;
|
|
180
|
+
defaultInit: EventInit;
|
|
181
|
+
};
|
|
182
|
+
dragExit: {
|
|
183
|
+
EventType: string;
|
|
184
|
+
defaultInit: EventInit;
|
|
185
|
+
};
|
|
186
|
+
dragLeave: {
|
|
187
|
+
EventType: string;
|
|
188
|
+
defaultInit: EventInit;
|
|
189
|
+
};
|
|
190
|
+
dragOver: {
|
|
191
|
+
EventType: string;
|
|
192
|
+
defaultInit: EventInit;
|
|
193
|
+
};
|
|
194
|
+
dragStart: {
|
|
195
|
+
EventType: string;
|
|
196
|
+
defaultInit: EventInit;
|
|
197
|
+
};
|
|
198
|
+
mouseDown: {
|
|
199
|
+
EventType: string;
|
|
200
|
+
defaultInit: EventInit;
|
|
201
|
+
};
|
|
202
|
+
mouseEnter: {
|
|
203
|
+
EventType: string;
|
|
204
|
+
defaultInit: EventInit;
|
|
205
|
+
};
|
|
206
|
+
mouseLeave: {
|
|
207
|
+
EventType: string;
|
|
208
|
+
defaultInit: EventInit;
|
|
209
|
+
};
|
|
210
|
+
mouseMove: {
|
|
211
|
+
EventType: string;
|
|
212
|
+
defaultInit: EventInit;
|
|
213
|
+
};
|
|
214
|
+
mouseOut: {
|
|
215
|
+
EventType: string;
|
|
216
|
+
defaultInit: EventInit;
|
|
217
|
+
};
|
|
218
|
+
mouseOver: {
|
|
219
|
+
EventType: string;
|
|
220
|
+
defaultInit: EventInit;
|
|
221
|
+
};
|
|
222
|
+
mouseUp: {
|
|
223
|
+
EventType: string;
|
|
224
|
+
defaultInit: EventInit;
|
|
225
|
+
};
|
|
226
|
+
popState: {
|
|
227
|
+
EventType: string;
|
|
228
|
+
defaultInit: EventInit;
|
|
229
|
+
};
|
|
230
|
+
touchCancel: {
|
|
231
|
+
EventType: string;
|
|
232
|
+
defaultInit: EventInit;
|
|
233
|
+
};
|
|
234
|
+
touchEnd: {
|
|
235
|
+
EventType: string;
|
|
236
|
+
defaultInit: EventInit;
|
|
237
|
+
};
|
|
238
|
+
touchMove: {
|
|
239
|
+
EventType: string;
|
|
240
|
+
defaultInit: EventInit;
|
|
241
|
+
};
|
|
242
|
+
touchStart: {
|
|
243
|
+
EventType: string;
|
|
244
|
+
defaultInit: EventInit;
|
|
245
|
+
};
|
|
246
|
+
canPlay: {
|
|
247
|
+
EventType: string;
|
|
248
|
+
defaultInit: EventInit;
|
|
249
|
+
};
|
|
250
|
+
canPlayThrough: {
|
|
251
|
+
EventType: string;
|
|
252
|
+
defaultInit: EventInit;
|
|
253
|
+
};
|
|
254
|
+
durationChange: {
|
|
255
|
+
EventType: string;
|
|
256
|
+
defaultInit: EventInit;
|
|
257
|
+
};
|
|
258
|
+
encrypted: {
|
|
259
|
+
EventType: string;
|
|
260
|
+
defaultInit: EventInit;
|
|
261
|
+
};
|
|
262
|
+
loadedData: {
|
|
263
|
+
EventType: string;
|
|
264
|
+
defaultInit: EventInit;
|
|
265
|
+
};
|
|
266
|
+
loadedMetadata: {
|
|
267
|
+
EventType: string;
|
|
268
|
+
defaultInit: EventInit;
|
|
269
|
+
};
|
|
270
|
+
loadStart: {
|
|
271
|
+
EventType: string;
|
|
272
|
+
defaultInit: EventInit;
|
|
273
|
+
};
|
|
274
|
+
rateChange: {
|
|
275
|
+
EventType: string;
|
|
276
|
+
defaultInit: EventInit;
|
|
277
|
+
};
|
|
278
|
+
timeUpdate: {
|
|
279
|
+
EventType: string;
|
|
280
|
+
defaultInit: EventInit;
|
|
281
|
+
};
|
|
282
|
+
volumeChange: {
|
|
283
|
+
EventType: string;
|
|
284
|
+
defaultInit: EventInit;
|
|
285
|
+
};
|
|
286
|
+
animationStart: {
|
|
287
|
+
EventType: string;
|
|
288
|
+
defaultInit: EventInit;
|
|
289
|
+
};
|
|
290
|
+
animationEnd: {
|
|
291
|
+
EventType: string;
|
|
292
|
+
defaultInit: EventInit;
|
|
293
|
+
};
|
|
294
|
+
animationIteration: {
|
|
295
|
+
EventType: string;
|
|
296
|
+
defaultInit: EventInit;
|
|
297
|
+
};
|
|
298
|
+
transitionCancel: {
|
|
299
|
+
EventType: string;
|
|
300
|
+
defaultInit: EventInit;
|
|
301
|
+
};
|
|
302
|
+
transitionEnd: {
|
|
303
|
+
EventType: string;
|
|
304
|
+
defaultInit: EventInit;
|
|
305
|
+
};
|
|
306
|
+
transitionRun: {
|
|
307
|
+
EventType: string;
|
|
308
|
+
defaultInit: EventInit;
|
|
309
|
+
};
|
|
310
|
+
transitionStart: {
|
|
311
|
+
EventType: string;
|
|
312
|
+
defaultInit: EventInit;
|
|
313
|
+
};
|
|
314
|
+
doubleClick: {
|
|
315
|
+
EventType: string;
|
|
316
|
+
defaultInit: EventInit;
|
|
317
|
+
};
|
|
318
|
+
pointerOver: {
|
|
319
|
+
EventType: string;
|
|
320
|
+
defaultInit: EventInit;
|
|
321
|
+
};
|
|
322
|
+
pointerEnter: {
|
|
323
|
+
EventType: string;
|
|
324
|
+
defaultInit: EventInit;
|
|
325
|
+
};
|
|
326
|
+
pointerDown: {
|
|
327
|
+
EventType: string;
|
|
328
|
+
defaultInit: EventInit;
|
|
329
|
+
};
|
|
330
|
+
pointerMove: {
|
|
331
|
+
EventType: string;
|
|
332
|
+
defaultInit: EventInit;
|
|
333
|
+
};
|
|
334
|
+
pointerUp: {
|
|
335
|
+
EventType: string;
|
|
336
|
+
defaultInit: EventInit;
|
|
337
|
+
};
|
|
338
|
+
pointerCancel: {
|
|
339
|
+
EventType: string;
|
|
340
|
+
defaultInit: EventInit;
|
|
341
|
+
};
|
|
342
|
+
pointerOut: {
|
|
343
|
+
EventType: string;
|
|
344
|
+
defaultInit: EventInit;
|
|
345
|
+
};
|
|
346
|
+
pointerLeave: {
|
|
347
|
+
EventType: string;
|
|
348
|
+
defaultInit: EventInit;
|
|
349
|
+
};
|
|
350
|
+
gotPointerCapture: {
|
|
351
|
+
EventType: string;
|
|
352
|
+
defaultInit: EventInit;
|
|
353
|
+
};
|
|
354
|
+
lostPointerCapture: {
|
|
355
|
+
EventType: string;
|
|
356
|
+
defaultInit: EventInit;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
export declare const eventMapKeys: {
|
|
360
|
+
[k in keyof DocumentEventMap]?: keyof typeof eventMap;
|
|
361
|
+
};
|
|
@@ -2,5 +2,5 @@ import { Config } from '../setup';
|
|
|
2
2
|
import { EventTypeInit } from './createEvent';
|
|
3
3
|
import { EventType, PointerCoords } from './types';
|
|
4
4
|
export type { EventType, PointerCoords };
|
|
5
|
-
export declare function dispatchUIEvent<K extends EventType>(config: Config, target: Element, type: K, init?: EventTypeInit<K
|
|
6
|
-
export declare function bindDispatchUIEvent(config: Config): (target: Element, type: keyof DocumentEventMap, init?: InputEventInit | UIEventInit | EventInit | ClipboardEventInit | MouseEventInit | PointerEventInit | KeyboardEventInit | undefined) => boolean;
|
|
5
|
+
export declare function dispatchUIEvent<K extends EventType>(config: Config, target: Element, type: K, init?: EventTypeInit<K>, preventDefault?: boolean): boolean;
|
|
6
|
+
export declare function bindDispatchUIEvent(config: Config): (target: Element, type: keyof DocumentEventMap, init?: InputEventInit | UIEventInit | EventInit | ClipboardEventInit | MouseEventInit | PointerEventInit | KeyboardEventInit | undefined, preventDefault?: boolean | undefined) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file should contain behavior for modifier keys:
|
|
3
|
+
* https://www.w3.org/TR/uievents-key/#keys-modifier
|
|
4
|
+
*/
|
|
5
|
+
import { Config } from '../setup';
|
|
6
|
+
import { keyboardKey } from '.';
|
|
7
|
+
export declare function preKeydownBehavior(config: Config, { key }: keyboardKey, element: Element): void;
|
|
8
|
+
export declare function preKeyupBehavior(config: Config, { key }: keyboardKey): void;
|
|
9
|
+
export declare function postKeyupBehavior(config: Config, { key }: keyboardKey, element: Element): void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Config } from '../setup';
|
|
2
1
|
/**
|
|
3
2
|
* @internal Do not create/alter this by yourself as this type might be subject to changes.
|
|
4
3
|
*/
|
|
@@ -72,7 +71,3 @@ export interface keyboardKey {
|
|
|
72
71
|
/** Does the character in `key` require/imply a shiftKey to be pressed? */
|
|
73
72
|
shift?: boolean;
|
|
74
73
|
}
|
|
75
|
-
export interface behaviorPlugin {
|
|
76
|
-
matches: (keyDef: keyboardKey, element: Element, config: Config) => boolean;
|
|
77
|
-
handle: (keyDef: keyboardKey, element: Element, config: Config) => void;
|
|
78
|
-
}
|
|
@@ -3,16 +3,10 @@ export * from './dataTransfer/Blob';
|
|
|
3
3
|
export * from './dataTransfer/DataTransfer';
|
|
4
4
|
export * from './dataTransfer/FileList';
|
|
5
5
|
export * from './dataTransfer/Clipboard';
|
|
6
|
-
export * from './edit/buildTimeValue';
|
|
7
|
-
export * from './edit/calculateNewValue';
|
|
8
|
-
export * from './edit/editInputElement';
|
|
9
6
|
export * from './edit/getValue';
|
|
7
|
+
export * from './edit/input';
|
|
10
8
|
export * from './edit/isContentEditable';
|
|
11
9
|
export * from './edit/isEditable';
|
|
12
|
-
export * from './edit/isValidDateValue';
|
|
13
|
-
export * from './edit/isValidInputTimeValue';
|
|
14
|
-
export * from './edit/maxLength';
|
|
15
|
-
export * from './edit/prepareInput';
|
|
16
10
|
export * from './edit/setFiles';
|
|
17
11
|
export * from './focus/blur';
|
|
18
12
|
export * from './focus/copySelection';
|
|
@@ -37,6 +31,5 @@ export * from './misc/isVisible';
|
|
|
37
31
|
export * from './misc/isDisabled';
|
|
38
32
|
export * from './misc/level';
|
|
39
33
|
export * from './misc/wait';
|
|
40
|
-
export * from './misc/hasFormSubmit';
|
|
41
34
|
export * from './pointer/cssPointerEvents';
|
|
42
35
|
export * from './pointer/mouseButtons';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
declare type Context = 'pointer' | 'keyboard';
|
|
1
2
|
/**
|
|
2
3
|
* Read the next key definition from user input
|
|
3
4
|
*
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
* When keeping the key pressed you can choose how long the key is pressed `{descriptor>3}`.
|
|
10
11
|
* You can then release the key per `{descriptor>3/}` or keep it pressed and continue with the next key.
|
|
11
12
|
*/
|
|
12
|
-
export declare function readNextDescriptor(text: string): {
|
|
13
|
+
export declare function readNextDescriptor(text: string, context: Context): {
|
|
13
14
|
consumedLength: number;
|
|
14
15
|
descriptor: string;
|
|
15
16
|
releasePrevious: boolean;
|
|
@@ -17,3 +18,4 @@ export declare function readNextDescriptor(text: string): {
|
|
|
17
18
|
releaseSelf: boolean | undefined;
|
|
18
19
|
type: string;
|
|
19
20
|
};
|
|
21
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testing-library/user-event",
|
|
3
|
-
"version": "14.0.0
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "Fire events the same way the user does",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-testing-library",
|
|
@@ -44,22 +44,19 @@
|
|
|
44
44
|
"validate": "kcd-scripts validate",
|
|
45
45
|
"typecheck": "kcd-scripts typecheck"
|
|
46
46
|
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"@babel/runtime": "^7.12.5"
|
|
49
|
-
},
|
|
47
|
+
"dependencies": {},
|
|
50
48
|
"devDependencies": {
|
|
51
|
-
"@testing-library/dom": "^
|
|
52
|
-
"@testing-library/jest-dom": "^5.
|
|
53
|
-
"@testing-library/react": "^
|
|
54
|
-
"@types/estree": "0.0.45",
|
|
49
|
+
"@testing-library/dom": "^8.11.4",
|
|
50
|
+
"@testing-library/jest-dom": "^5.16.3",
|
|
51
|
+
"@testing-library/react": "^12.1.4",
|
|
55
52
|
"@types/jest-in-case": "^1.0.3",
|
|
56
|
-
"@types/react": "^17.0.
|
|
57
|
-
"esbuild": "^0.14.
|
|
58
|
-
"eslint-import-resolver-typescript": "^2.
|
|
59
|
-
"is-ci": "^
|
|
53
|
+
"@types/react": "^17.0.42",
|
|
54
|
+
"esbuild": "^0.14.27",
|
|
55
|
+
"eslint-import-resolver-typescript": "^2.7.0",
|
|
56
|
+
"is-ci": "^3.0.1",
|
|
60
57
|
"jest-in-case": "^1.0.2",
|
|
61
58
|
"jest-serializer-ansi": "^1.0.3",
|
|
62
|
-
"kcd-scripts": "^
|
|
59
|
+
"kcd-scripts": "^12.1.0",
|
|
63
60
|
"react": "^17.0.2",
|
|
64
61
|
"react-dom": "^17.0.2",
|
|
65
62
|
"typescript": "^4.1.2"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file should contain behavior for functional keys as described here:
|
|
3
|
-
* https://w3c.github.io/uievents-code/#key-alphanumeric-functional
|
|
4
|
-
*/
|
|
5
|
-
import { behaviorPlugin } from '../types';
|
|
6
|
-
export declare const keydownBehavior: behaviorPlugin[];
|
|
7
|
-
export declare const keypressBehavior: behaviorPlugin[];
|
|
8
|
-
export declare const keyupBehavior: behaviorPlugin[];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { behaviorPlugin } from '../types';
|
|
2
|
-
export declare const preKeydownBehavior: behaviorPlugin[];
|
|
3
|
-
export declare const keydownBehavior: behaviorPlugin[];
|
|
4
|
-
export declare const keypressBehavior: behaviorPlugin[];
|
|
5
|
-
export declare const preKeyupBehavior: behaviorPlugin[];
|
|
6
|
-
export declare const keyupBehavior: behaviorPlugin[];
|
|
7
|
-
export declare const postKeyupBehavior: behaviorPlugin[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file should contain behavior for modifier keys:
|
|
3
|
-
* https://www.w3.org/TR/uievents-key/#keys-modifier
|
|
4
|
-
*/
|
|
5
|
-
import { behaviorPlugin } from '../types';
|
|
6
|
-
export declare const preKeydownBehavior: behaviorPlugin[];
|
|
7
|
-
export declare const preKeyupBehavior: behaviorPlugin[];
|
|
8
|
-
export declare const postKeyupBehavior: behaviorPlugin[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './fireChangeForInputTimeIfValid';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { EditableInputType } from './isEditable';
|
|
2
|
-
/**
|
|
3
|
-
* Calculate a new text value.
|
|
4
|
-
*/
|
|
5
|
-
export declare function calculateNewValue(inputData: string, node: (HTMLInputElement & {
|
|
6
|
-
type: EditableInputType;
|
|
7
|
-
}) | HTMLTextAreaElement, { startOffset, endOffset, }: {
|
|
8
|
-
startOffset: number;
|
|
9
|
-
endOffset: number;
|
|
10
|
-
}, inputType?: string): {
|
|
11
|
-
oldValue: string;
|
|
12
|
-
newValue: string;
|
|
13
|
-
newOffset: number;
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Config } from '../../setup';
|
|
2
|
-
/**
|
|
3
|
-
* Change the value of an element as if it was changed as a result of a user input.
|
|
4
|
-
*
|
|
5
|
-
* Fires the input event.
|
|
6
|
-
*/
|
|
7
|
-
export declare function editInputElement(config: Config, element: HTMLInputElement | HTMLTextAreaElement, { newValue, newSelection, eventOverrides, }: {
|
|
8
|
-
newValue: string;
|
|
9
|
-
newSelection: {
|
|
10
|
-
node: Node;
|
|
11
|
-
offset: number;
|
|
12
|
-
};
|
|
13
|
-
eventOverrides: InputEventInit;
|
|
14
|
-
}): void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Config } from '../../setup';
|
|
2
|
-
export declare function prepareInput(config: Config, data: string, element: Element, inputType?: string): {
|
|
3
|
-
commit: () => void;
|
|
4
|
-
getNewValue?: undefined;
|
|
5
|
-
} | {
|
|
6
|
-
getNewValue: () => string;
|
|
7
|
-
commit: () => void;
|
|
8
|
-
} | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const hasFormSubmit: (form: HTMLFormElement | null) => form is HTMLFormElement;
|