@testing-library/user-event 14.0.0-beta.9 → 14.0.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.
Files changed (41) hide show
  1. package/README.md +2 -2
  2. package/dist/index.cjs +762 -832
  3. package/dist/index.mjs +756 -821
  4. package/dist/types/document/selection.d.ts +0 -1
  5. package/dist/types/document/value.d.ts +9 -2
  6. package/dist/types/event/behavior/cut.d.ts +1 -0
  7. package/dist/types/event/behavior/index.d.ts +5 -0
  8. package/dist/types/event/behavior/keydown.d.ts +1 -0
  9. package/dist/types/event/behavior/keypress.d.ts +1 -0
  10. package/dist/types/event/behavior/keyup.d.ts +1 -0
  11. package/dist/types/event/behavior/paste.d.ts +1 -0
  12. package/dist/types/event/dispatchEvent.d.ts +1 -1
  13. package/dist/types/event/eventMap.d.ts +361 -0
  14. package/dist/types/event/index.d.ts +2 -2
  15. package/dist/types/keyboard/modifiers.d.ts +9 -0
  16. package/dist/types/keyboard/types.d.ts +0 -5
  17. package/dist/types/utils/dataTransfer/Blob.d.ts +3 -1
  18. package/dist/types/utils/dataTransfer/Clipboard.d.ts +1 -1
  19. package/dist/types/utils/dataTransfer/DataTransfer.d.ts +2 -2
  20. package/dist/types/utils/edit/input.d.ts +2 -0
  21. package/dist/types/utils/edit/isValidDateOrTimeValue.d.ts +3 -0
  22. package/dist/types/utils/focus/selection.d.ts +4 -0
  23. package/dist/types/utils/index.d.ts +2 -8
  24. package/dist/types/utils/keyDef/readNextDescriptor.d.ts +3 -1
  25. package/dist/types/utils/misc/getWindow.d.ts +1 -0
  26. package/package.json +15 -15
  27. package/dist/types/keyboard/plugins/arrow.d.ts +0 -6
  28. package/dist/types/keyboard/plugins/character.d.ts +0 -5
  29. package/dist/types/keyboard/plugins/combination.d.ts +0 -5
  30. package/dist/types/keyboard/plugins/control.d.ts +0 -6
  31. package/dist/types/keyboard/plugins/functional.d.ts +0 -8
  32. package/dist/types/keyboard/plugins/index.d.ts +0 -7
  33. package/dist/types/keyboard/plugins/modifiers.d.ts +0 -8
  34. package/dist/types/keyboard/shared/fireChangeForInputTimeIfValid.d.ts +0 -4
  35. package/dist/types/keyboard/shared/index.d.ts +0 -1
  36. package/dist/types/utils/edit/calculateNewValue.d.ts +0 -14
  37. package/dist/types/utils/edit/editInputElement.d.ts +0 -14
  38. package/dist/types/utils/edit/isValidDateValue.d.ts +0 -3
  39. package/dist/types/utils/edit/isValidInputTimeValue.d.ts +0 -3
  40. package/dist/types/utils/edit/prepareInput.d.ts +0 -8
  41. package/dist/types/utils/misc/hasFormSubmit.d.ts +0 -1
@@ -23,5 +23,4 @@ export declare function getUISelection(element: HTMLInputElement | HTMLTextAreaE
23
23
  anchorOffset: number;
24
24
  focusOffset: number;
25
25
  };
26
- export declare function clearUISelection(element: HTMLInputElement | HTMLTextAreaElement): void;
27
26
  export {};
@@ -5,7 +5,11 @@ declare global {
5
5
  interface Element {
6
6
  [UIValue]?: string;
7
7
  [InitialValue]?: string;
8
- [TrackChanges]?: string[];
8
+ [TrackChanges]?: {
9
+ previousValue?: string;
10
+ tracked?: string[];
11
+ nextValue?: string;
12
+ };
9
13
  }
10
14
  }
11
15
  export declare function prepareValueInterceptor(element: HTMLInputElement): void;
@@ -14,5 +18,8 @@ export declare function getUIValue(element: HTMLInputElement | HTMLTextAreaEleme
14
18
  export declare function setInitialValue(element: HTMLInputElement | HTMLTextAreaElement): void;
15
19
  export declare function getInitialValue(element: HTMLInputElement | HTMLTextAreaElement): string | undefined;
16
20
  export declare function startTrackValue(element: HTMLInputElement | HTMLTextAreaElement): void;
17
- export declare function endTrackValue(element: HTMLInputElement | HTMLTextAreaElement): string[] | undefined;
21
+ /**
22
+ * @returns `true` if we recognize a React state reset and update
23
+ */
24
+ export declare function endTrackValue(element: HTMLInputElement | HTMLTextAreaElement): boolean;
18
25
  export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,8 @@
1
1
  import './click';
2
+ import './cut';
3
+ import './keydown';
4
+ import './keypress';
5
+ import './keyup';
6
+ import './paste';
2
7
  export { behavior } from './registry';
3
8
  export type { BehaviorPlugin } from './registry';
@@ -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>): boolean;
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
- }
@@ -1 +1,3 @@
1
- export declare function readBlobText(blob: Blob): Promise<string>;
1
+ export declare function readBlobText(blob: Blob, FileReader: {
2
+ new (): FileReader;
3
+ }): Promise<string>;
@@ -1,4 +1,4 @@
1
- export declare function createClipboardItem(...blobs: Array<Blob | string>): ClipboardItem;
1
+ export declare function createClipboardItem(window: Window & typeof globalThis, ...blobs: Array<Blob | string>): ClipboardItem;
2
2
  export declare function attachClipboardStubToView(window: Window & typeof globalThis): {
3
3
  resetClipboardStub: () => void;
4
4
  detachClipboardStub: () => void;
@@ -1,2 +1,2 @@
1
- export declare function createDataTransfer(files?: File[]): DataTransfer;
2
- export declare function getBlobFromDataTransferItem(item: DataTransferItem): Blob;
1
+ export declare function createDataTransfer(window: Window & typeof globalThis, files?: File[]): DataTransfer;
2
+ export declare function getBlobFromDataTransferItem(window: Window & typeof globalThis, item: DataTransferItem): Blob;
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../setup';
2
+ export declare function input(config: Config, element: Element, data: string, inputType?: string): void;
@@ -0,0 +1,3 @@
1
+ export declare function isValidDateOrTimeValue(element: HTMLInputElement & {
2
+ type: 'date' | 'time';
3
+ }, value: string): boolean;
@@ -40,3 +40,7 @@ export declare function setSelection({ focusNode, focusOffset, anchorNode, ancho
40
40
  focusNode: Node;
41
41
  focusOffset: number;
42
42
  }): void;
43
+ /**
44
+ * Move the selection
45
+ */
46
+ export declare function moveSelection(node: Element, direction: -1 | 1): void;
@@ -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';
@@ -31,12 +25,12 @@ export * from './misc/cloneEvent';
31
25
  export * from './misc/eventWrapper';
32
26
  export * from './misc/findClosest';
33
27
  export * from './misc/getDocumentFromNode';
28
+ export * from './misc/getWindow';
34
29
  export * from './misc/isDescendantOrSelf';
35
30
  export * from './misc/isElementType';
36
31
  export * from './misc/isVisible';
37
32
  export * from './misc/isDisabled';
38
33
  export * from './misc/level';
39
34
  export * from './misc/wait';
40
- export * from './misc/hasFormSubmit';
41
35
  export * from './pointer/cssPointerEvents';
42
36
  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 {};
@@ -0,0 +1 @@
1
+ export declare function getWindow(node: Node): Window & typeof globalThis;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testing-library/user-event",
3
- "version": "14.0.0-beta.9",
3
+ "version": "14.0.2",
4
4
  "description": "Fire events the same way the user does",
5
5
  "keywords": [
6
6
  "react-testing-library",
@@ -44,24 +44,24 @@
44
44
  "validate": "kcd-scripts validate",
45
45
  "typecheck": "kcd-scripts typecheck"
46
46
  },
47
- "dependencies": {
48
- "@babel/runtime": "^7.12.5"
49
- },
50
47
  "devDependencies": {
51
- "@testing-library/dom": "^7.28.1",
52
- "@testing-library/jest-dom": "^5.11.6",
53
- "@testing-library/react": "^11.2.5",
54
- "@types/estree": "0.0.45",
48
+ "@testing-library/dom": "^8.11.4",
49
+ "@testing-library/jest-dom": "^5.16.3",
50
+ "@testing-library/react": "^13.0.0",
55
51
  "@types/jest-in-case": "^1.0.3",
56
- "@types/react": "^17.0.3",
57
- "esbuild": "^0.14.9",
58
- "eslint-import-resolver-typescript": "^2.5.0",
59
- "is-ci": "^2.0.0",
52
+ "@types/react": "^17.0.42",
53
+ "esbuild": "^0.14.27",
54
+ "eslint-import-resolver-typescript": "^2.7.0",
55
+ "is-ci": "^3.0.1",
60
56
  "jest-in-case": "^1.0.2",
61
57
  "jest-serializer-ansi": "^1.0.3",
62
- "kcd-scripts": "^11.1.0",
63
- "react": "^17.0.2",
64
- "react-dom": "^17.0.2",
58
+ "kcd-scripts": "^12.1.0",
59
+ "react": "^18.0.0",
60
+ "react-dom": "^18.0.0",
61
+ "react17": "npm:react@^17.0.2",
62
+ "reactDom17": "npm:react-dom@^17.0.2",
63
+ "reactIs17": "npm:react-is@^17.0.2",
64
+ "reactTesting17": "npm:@testing-library/react@^12.1.3",
65
65
  "typescript": "^4.1.2"
66
66
  },
67
67
  "peerDependencies": {
@@ -1,6 +0,0 @@
1
- /**
2
- * This file should contain behavior for arrow keys as described here:
3
- * https://w3c.github.io/uievents-code/#key-arrowpad-section
4
- */
5
- import { behaviorPlugin } from '../types';
6
- export declare const keydownBehavior: behaviorPlugin[];
@@ -1,5 +0,0 @@
1
- /**
2
- * This file should cover the behavior for keys that produce character input
3
- */
4
- import { behaviorPlugin } from '../types';
5
- export declare const keypressBehavior: behaviorPlugin[];
@@ -1,5 +0,0 @@
1
- /**
2
- * Default behavior for key combinations
3
- */
4
- import { behaviorPlugin } from '../types';
5
- export declare const keydownBehavior: behaviorPlugin[];
@@ -1,6 +0,0 @@
1
- /**
2
- * This file should contain behavior for arrow keys as described here:
3
- * https://w3c.github.io/uievents-code/#key-controlpad-section
4
- */
5
- import { behaviorPlugin } from '../types';
6
- export declare const keydownBehavior: behaviorPlugin[];
@@ -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,4 +0,0 @@
1
- import { Config } from '../../setup';
2
- export declare function fireChangeForInputTimeIfValid(config: Config, el: HTMLInputElement & {
3
- type: 'time';
4
- }, prevValue: unknown, timeNewEntry: string): void;
@@ -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
- };