@testing-library/user-event 14.0.0-beta.1 → 14.0.0-beta.10
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 +5 -192
- package/dist/index.cjs +3003 -0
- package/dist/index.mjs +3074 -0
- package/dist/types/clipboard/copy.d.ts +2 -0
- package/dist/types/clipboard/cut.d.ts +2 -0
- package/dist/{clipboard → types/clipboard}/index.d.ts +0 -0
- package/dist/types/clipboard/paste.d.ts +2 -0
- package/dist/types/convenience/click.d.ts +4 -0
- package/dist/types/convenience/hover.d.ts +3 -0
- package/dist/{convenience → types/convenience}/index.d.ts +0 -0
- package/dist/types/convenience/tab.d.ts +4 -0
- package/dist/{document → types/document}/index.d.ts +0 -0
- package/dist/{document → types/document}/interceptor.d.ts +0 -0
- package/dist/{document → types/document}/selection.d.ts +0 -0
- package/dist/{document → types/document}/value.d.ts +0 -0
- package/dist/types/event/behavior/click.d.ts +1 -0
- package/dist/types/event/behavior/index.d.ts +3 -0
- package/dist/types/event/behavior/registry.d.ts +9 -0
- package/dist/types/event/createEvent.d.ts +8 -0
- package/dist/types/event/dispatchEvent.d.ts +2 -0
- package/dist/types/event/eventTypes.d.ts +2 -0
- package/dist/types/event/index.d.ts +6 -0
- package/dist/types/event/types.d.ts +13 -0
- package/dist/types/event/wrapEvent.d.ts +1 -0
- package/dist/{index.d.ts → types/index.d.ts} +1 -0
- package/dist/{keyboard → types/keyboard}/index.d.ts +2 -2
- package/dist/{keyboard → types/keyboard}/keyMap.d.ts +0 -0
- package/dist/{keyboard → types/keyboard}/keyboardAction.d.ts +0 -0
- package/dist/{keyboard → types/keyboard}/parseKeyDef.d.ts +0 -0
- package/dist/{keyboard → types/keyboard}/plugins/arrow.d.ts +0 -0
- package/dist/{keyboard → types/keyboard}/plugins/character.d.ts +0 -0
- package/dist/{keyboard → types/keyboard}/plugins/combination.d.ts +0 -0
- package/dist/{keyboard → types/keyboard}/plugins/control.d.ts +0 -0
- package/dist/{keyboard → types/keyboard}/plugins/functional.d.ts +0 -3
- package/dist/{keyboard → types/keyboard}/plugins/index.d.ts +0 -0
- package/dist/types/keyboard/plugins/modifiers.d.ts +8 -0
- package/dist/types/keyboard/shared/fireChangeForInputTimeIfValid.d.ts +4 -0
- package/dist/{keyboard → types/keyboard}/shared/index.d.ts +0 -0
- package/dist/{keyboard → types/keyboard}/types.d.ts +19 -5
- package/dist/{options.d.ts → types/options.d.ts} +23 -8
- package/dist/types/pointer/firePointerEvents.d.ts +11 -0
- package/dist/{pointer → types/pointer}/index.d.ts +2 -2
- package/dist/{pointer → types/pointer}/keyMap.d.ts +0 -0
- package/dist/{pointer → types/pointer}/parseKeyDef.d.ts +0 -0
- package/dist/{pointer → types/pointer}/pointerAction.d.ts +0 -0
- package/dist/types/pointer/pointerMove.d.ts +6 -0
- package/dist/{pointer → types/pointer}/pointerPress.d.ts +2 -2
- package/dist/{pointer → types/pointer}/resolveSelectionTarget.d.ts +0 -0
- package/dist/{pointer → types/pointer}/types.d.ts +2 -1
- package/dist/{setup → types/setup}/api.d.ts +0 -0
- package/dist/{setup → types/setup}/config.d.ts +0 -0
- package/dist/{setup → types/setup}/directApi.d.ts +1 -2
- package/dist/{setup → types/setup}/index.d.ts +8 -2
- package/dist/types/setup/setup.d.ts +20 -0
- package/dist/{setup → types/setup}/wrapAsync.d.ts +0 -0
- package/dist/types/utility/clear.d.ts +2 -0
- package/dist/{utility → types/utility}/index.d.ts +0 -0
- package/dist/types/utility/selectOptions.d.ts +3 -0
- package/dist/types/utility/type.d.ts +9 -0
- package/dist/types/utility/upload.d.ts +5 -0
- package/dist/{utils → types/utils}/click/isClickableInput.d.ts +0 -0
- package/dist/{utils → types/utils}/dataTransfer/Blob.d.ts +0 -0
- package/dist/{utils → types/utils}/dataTransfer/Clipboard.d.ts +0 -0
- package/dist/{utils → types/utils}/dataTransfer/DataTransfer.d.ts +0 -0
- package/dist/{utils → types/utils}/dataTransfer/FileList.d.ts +0 -0
- package/dist/{utils → types/utils}/edit/buildTimeValue.d.ts +0 -0
- package/dist/{utils → types/utils}/edit/calculateNewValue.d.ts +0 -0
- package/dist/types/utils/edit/editInputElement.d.ts +14 -0
- package/dist/{utils → types/utils}/edit/getValue.d.ts +0 -0
- package/dist/{utils → types/utils}/edit/isContentEditable.d.ts +0 -0
- package/dist/{utils → types/utils}/edit/isEditable.d.ts +0 -0
- package/dist/{utils → types/utils}/edit/isValidDateValue.d.ts +0 -0
- package/dist/{utils → types/utils}/edit/isValidInputTimeValue.d.ts +0 -0
- package/dist/{utils → types/utils}/edit/maxLength.d.ts +0 -0
- package/dist/types/utils/edit/prepareInput.d.ts +8 -0
- package/dist/{utils → types/utils}/edit/setFiles.d.ts +0 -0
- package/dist/{utils → types/utils}/focus/blur.d.ts +0 -0
- package/dist/{utils → types/utils}/focus/copySelection.d.ts +0 -0
- package/dist/types/utils/focus/cursor.d.ts +9 -0
- package/dist/{utils → types/utils}/focus/focus.d.ts +3 -0
- package/dist/{utils → types/utils}/focus/getActiveElement.d.ts +0 -0
- package/dist/{utils → types/utils}/focus/getTabDestination.d.ts +0 -0
- package/dist/{utils → types/utils}/focus/isFocusable.d.ts +0 -0
- package/dist/{utils → types/utils}/focus/selectAll.d.ts +0 -0
- package/dist/{utils → types/utils}/focus/selection.d.ts +0 -0
- package/dist/{utils → types/utils}/focus/selector.d.ts +0 -0
- package/dist/{utils → types/utils}/index.d.ts +6 -2
- package/dist/{utils → types/utils}/keyDef/readNextDescriptor.d.ts +0 -0
- package/dist/types/utils/keyboard/getKeyEventProps.d.ts +5 -0
- package/dist/types/utils/keyboard/getUIEventModifiers.d.ts +15 -0
- package/dist/types/utils/misc/cloneEvent.d.ts +1 -0
- package/dist/{utils → types/utils}/misc/eventWrapper.d.ts +0 -0
- package/dist/types/utils/misc/findClosest.d.ts +1 -0
- package/dist/{utils → types/utils}/misc/getDocumentFromNode.d.ts +0 -0
- package/dist/{utils → types/utils}/misc/hasFormSubmit.d.ts +0 -0
- package/dist/{utils → types/utils}/misc/isDescendantOrSelf.d.ts +0 -0
- package/dist/{utils → types/utils}/misc/isDisabled.d.ts +0 -0
- package/dist/{utils → types/utils}/misc/isElementType.d.ts +0 -0
- package/dist/{utils → types/utils}/misc/isVisible.d.ts +0 -0
- package/dist/types/utils/misc/level.d.ts +17 -0
- package/dist/{utils → types/utils}/misc/wait.d.ts +0 -0
- package/dist/types/utils/pointer/cssPointerEvents.d.ts +15 -0
- package/dist/{utils → types/utils}/pointer/mouseButtons.d.ts +0 -0
- package/package.json +13 -30
- package/CHANGELOG.md +0 -5
- package/dist/clipboard/copy.d.ts +0 -2
- package/dist/clipboard/copy.js +0 -36
- package/dist/clipboard/cut.d.ts +0 -2
- package/dist/clipboard/cut.js +0 -42
- package/dist/clipboard/index.js +0 -44
- package/dist/clipboard/paste.d.ts +0 -2
- package/dist/clipboard/paste.js +0 -47
- package/dist/convenience/click.d.ts +0 -4
- package/dist/convenience/click.js +0 -52
- package/dist/convenience/hover.d.ts +0 -3
- package/dist/convenience/hover.js +0 -31
- package/dist/convenience/index.js +0 -44
- package/dist/convenience/tab.d.ts +0 -4
- package/dist/convenience/tab.js +0 -12
- package/dist/document/index.js +0 -100
- package/dist/document/interceptor.js +0 -37
- package/dist/document/selection.js +0 -90
- package/dist/document/value.js +0 -77
- package/dist/index.js +0 -13
- package/dist/keyboard/getEventProps.d.ts +0 -15
- package/dist/keyboard/getEventProps.js +0 -27
- package/dist/keyboard/index.js +0 -42
- package/dist/keyboard/keyMap.js +0 -119
- package/dist/keyboard/keyboardAction.js +0 -156
- package/dist/keyboard/parseKeyDef.js +0 -61
- package/dist/keyboard/plugins/arrow.js +0 -28
- package/dist/keyboard/plugins/character.js +0 -173
- package/dist/keyboard/plugins/combination.js +0 -19
- package/dist/keyboard/plugins/control.js +0 -52
- package/dist/keyboard/plugins/functional.js +0 -158
- package/dist/keyboard/plugins/index.js +0 -33
- package/dist/keyboard/shared/fireChangeForInputTimeIfValid.d.ts +0 -3
- package/dist/keyboard/shared/fireChangeForInputTimeIfValid.js +0 -20
- package/dist/keyboard/shared/index.js +0 -18
- package/dist/keyboard/types.js +0 -19
- package/dist/options.js +0 -36
- package/dist/pointer/index.js +0 -56
- package/dist/pointer/keyMap.js +0 -29
- package/dist/pointer/parseKeyDef.js +0 -34
- package/dist/pointer/pointerAction.js +0 -46
- package/dist/pointer/pointerMove.d.ts +0 -6
- package/dist/pointer/pointerMove.js +0 -136
- package/dist/pointer/pointerPress.js +0 -330
- package/dist/pointer/resolveSelectionTarget.js +0 -75
- package/dist/pointer/types.js +0 -1
- package/dist/setup/api.js +0 -111
- package/dist/setup/config.js +0 -8
- package/dist/setup/directApi.js +0 -95
- package/dist/setup/index.js +0 -27
- package/dist/setup/setup.d.ts +0 -74
- package/dist/setup/setup.js +0 -98
- package/dist/setup/wrapAsync.js +0 -15
- package/dist/utility/clear.d.ts +0 -2
- package/dist/utility/clear.js +0 -30
- package/dist/utility/index.js +0 -57
- package/dist/utility/selectOptions.d.ts +0 -3
- package/dist/utility/selectOptions.js +0 -132
- package/dist/utility/type.d.ts +0 -9
- package/dist/utility/type.js +0 -37
- package/dist/utility/upload.d.ts +0 -5
- package/dist/utility/upload.js +0 -64
- package/dist/utils/click/isClickableInput.js +0 -14
- package/dist/utils/dataTransfer/Blob.js +0 -21
- package/dist/utils/dataTransfer/Clipboard.js +0 -188
- package/dist/utils/dataTransfer/DataTransfer.js +0 -158
- package/dist/utils/dataTransfer/FileList.js +0 -23
- package/dist/utils/edit/buildTimeValue.js +0 -44
- package/dist/utils/edit/calculateNewValue.js +0 -46
- package/dist/utils/edit/editInputElement.d.ts +0 -16
- package/dist/utils/edit/editInputElement.js +0 -53
- package/dist/utils/edit/getValue.js +0 -23
- package/dist/utils/edit/isContentEditable.js +0 -25
- package/dist/utils/edit/isEditable.js +0 -42
- package/dist/utils/edit/isValidDateValue.js +0 -12
- package/dist/utils/edit/isValidInputTimeValue.js +0 -12
- package/dist/utils/edit/maxLength.js +0 -50
- package/dist/utils/edit/prepareInput.d.ts +0 -7
- package/dist/utils/edit/prepareInput.js +0 -77
- package/dist/utils/edit/setFiles.js +0 -72
- package/dist/utils/focus/blur.js +0 -19
- package/dist/utils/focus/copySelection.js +0 -36
- package/dist/utils/focus/focus.js +0 -22
- package/dist/utils/focus/getActiveElement.js +0 -26
- package/dist/utils/focus/getTabDestination.js +0 -71
- package/dist/utils/focus/isFocusable.js +0 -12
- package/dist/utils/focus/selectAll.js +0 -51
- package/dist/utils/focus/selection.js +0 -190
- package/dist/utils/focus/selector.js +0 -8
- package/dist/utils/index.js +0 -499
- package/dist/utils/keyDef/readNextDescriptor.js +0 -102
- package/dist/utils/misc/eventWrapper.js +0 -16
- package/dist/utils/misc/findClosest.d.ts +0 -1
- package/dist/utils/misc/findClosest.js +0 -20
- package/dist/utils/misc/getDocumentFromNode.js +0 -14
- package/dist/utils/misc/hasFormSubmit.js +0 -10
- package/dist/utils/misc/hasPointerEvents.d.ts +0 -15
- package/dist/utils/misc/hasPointerEvents.js +0 -24
- package/dist/utils/misc/isDescendantOrSelf.js +0 -20
- package/dist/utils/misc/isDisabled.js +0 -12
- package/dist/utils/misc/isElementType.js +0 -24
- package/dist/utils/misc/isVisible.js +0 -24
- package/dist/utils/misc/wait.js +0 -10
- package/dist/utils/pointer/firePointerEvents.d.ts +0 -25
- package/dist/utils/pointer/firePointerEvents.js +0 -112
- package/dist/utils/pointer/mouseButtons.js +0 -45
package/dist/utils/index.js
DELETED
|
@@ -1,499 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _isClickableInput = require("./click/isClickableInput");
|
|
8
|
-
|
|
9
|
-
Object.keys(_isClickableInput).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _isClickableInput[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _isClickableInput[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var _Blob = require("./dataTransfer/Blob");
|
|
21
|
-
|
|
22
|
-
Object.keys(_Blob).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _Blob[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function () {
|
|
28
|
-
return _Blob[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
var _DataTransfer = require("./dataTransfer/DataTransfer");
|
|
34
|
-
|
|
35
|
-
Object.keys(_DataTransfer).forEach(function (key) {
|
|
36
|
-
if (key === "default" || key === "__esModule") return;
|
|
37
|
-
if (key in exports && exports[key] === _DataTransfer[key]) return;
|
|
38
|
-
Object.defineProperty(exports, key, {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _DataTransfer[key];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
var _FileList = require("./dataTransfer/FileList");
|
|
47
|
-
|
|
48
|
-
Object.keys(_FileList).forEach(function (key) {
|
|
49
|
-
if (key === "default" || key === "__esModule") return;
|
|
50
|
-
if (key in exports && exports[key] === _FileList[key]) return;
|
|
51
|
-
Object.defineProperty(exports, key, {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function () {
|
|
54
|
-
return _FileList[key];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
var _Clipboard = require("./dataTransfer/Clipboard");
|
|
60
|
-
|
|
61
|
-
Object.keys(_Clipboard).forEach(function (key) {
|
|
62
|
-
if (key === "default" || key === "__esModule") return;
|
|
63
|
-
if (key in exports && exports[key] === _Clipboard[key]) return;
|
|
64
|
-
Object.defineProperty(exports, key, {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
get: function () {
|
|
67
|
-
return _Clipboard[key];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
var _buildTimeValue = require("./edit/buildTimeValue");
|
|
73
|
-
|
|
74
|
-
Object.keys(_buildTimeValue).forEach(function (key) {
|
|
75
|
-
if (key === "default" || key === "__esModule") return;
|
|
76
|
-
if (key in exports && exports[key] === _buildTimeValue[key]) return;
|
|
77
|
-
Object.defineProperty(exports, key, {
|
|
78
|
-
enumerable: true,
|
|
79
|
-
get: function () {
|
|
80
|
-
return _buildTimeValue[key];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
var _calculateNewValue = require("./edit/calculateNewValue");
|
|
86
|
-
|
|
87
|
-
Object.keys(_calculateNewValue).forEach(function (key) {
|
|
88
|
-
if (key === "default" || key === "__esModule") return;
|
|
89
|
-
if (key in exports && exports[key] === _calculateNewValue[key]) return;
|
|
90
|
-
Object.defineProperty(exports, key, {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return _calculateNewValue[key];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
var _editInputElement = require("./edit/editInputElement");
|
|
99
|
-
|
|
100
|
-
Object.keys(_editInputElement).forEach(function (key) {
|
|
101
|
-
if (key === "default" || key === "__esModule") return;
|
|
102
|
-
if (key in exports && exports[key] === _editInputElement[key]) return;
|
|
103
|
-
Object.defineProperty(exports, key, {
|
|
104
|
-
enumerable: true,
|
|
105
|
-
get: function () {
|
|
106
|
-
return _editInputElement[key];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
var _getValue = require("./edit/getValue");
|
|
112
|
-
|
|
113
|
-
Object.keys(_getValue).forEach(function (key) {
|
|
114
|
-
if (key === "default" || key === "__esModule") return;
|
|
115
|
-
if (key in exports && exports[key] === _getValue[key]) return;
|
|
116
|
-
Object.defineProperty(exports, key, {
|
|
117
|
-
enumerable: true,
|
|
118
|
-
get: function () {
|
|
119
|
-
return _getValue[key];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
var _isContentEditable = require("./edit/isContentEditable");
|
|
125
|
-
|
|
126
|
-
Object.keys(_isContentEditable).forEach(function (key) {
|
|
127
|
-
if (key === "default" || key === "__esModule") return;
|
|
128
|
-
if (key in exports && exports[key] === _isContentEditable[key]) return;
|
|
129
|
-
Object.defineProperty(exports, key, {
|
|
130
|
-
enumerable: true,
|
|
131
|
-
get: function () {
|
|
132
|
-
return _isContentEditable[key];
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
var _isEditable = require("./edit/isEditable");
|
|
138
|
-
|
|
139
|
-
Object.keys(_isEditable).forEach(function (key) {
|
|
140
|
-
if (key === "default" || key === "__esModule") return;
|
|
141
|
-
if (key in exports && exports[key] === _isEditable[key]) return;
|
|
142
|
-
Object.defineProperty(exports, key, {
|
|
143
|
-
enumerable: true,
|
|
144
|
-
get: function () {
|
|
145
|
-
return _isEditable[key];
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
var _isValidDateValue = require("./edit/isValidDateValue");
|
|
151
|
-
|
|
152
|
-
Object.keys(_isValidDateValue).forEach(function (key) {
|
|
153
|
-
if (key === "default" || key === "__esModule") return;
|
|
154
|
-
if (key in exports && exports[key] === _isValidDateValue[key]) return;
|
|
155
|
-
Object.defineProperty(exports, key, {
|
|
156
|
-
enumerable: true,
|
|
157
|
-
get: function () {
|
|
158
|
-
return _isValidDateValue[key];
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
var _isValidInputTimeValue = require("./edit/isValidInputTimeValue");
|
|
164
|
-
|
|
165
|
-
Object.keys(_isValidInputTimeValue).forEach(function (key) {
|
|
166
|
-
if (key === "default" || key === "__esModule") return;
|
|
167
|
-
if (key in exports && exports[key] === _isValidInputTimeValue[key]) return;
|
|
168
|
-
Object.defineProperty(exports, key, {
|
|
169
|
-
enumerable: true,
|
|
170
|
-
get: function () {
|
|
171
|
-
return _isValidInputTimeValue[key];
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
var _maxLength = require("./edit/maxLength");
|
|
177
|
-
|
|
178
|
-
Object.keys(_maxLength).forEach(function (key) {
|
|
179
|
-
if (key === "default" || key === "__esModule") return;
|
|
180
|
-
if (key in exports && exports[key] === _maxLength[key]) return;
|
|
181
|
-
Object.defineProperty(exports, key, {
|
|
182
|
-
enumerable: true,
|
|
183
|
-
get: function () {
|
|
184
|
-
return _maxLength[key];
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
var _prepareInput = require("./edit/prepareInput");
|
|
190
|
-
|
|
191
|
-
Object.keys(_prepareInput).forEach(function (key) {
|
|
192
|
-
if (key === "default" || key === "__esModule") return;
|
|
193
|
-
if (key in exports && exports[key] === _prepareInput[key]) return;
|
|
194
|
-
Object.defineProperty(exports, key, {
|
|
195
|
-
enumerable: true,
|
|
196
|
-
get: function () {
|
|
197
|
-
return _prepareInput[key];
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
var _setFiles = require("./edit/setFiles");
|
|
203
|
-
|
|
204
|
-
Object.keys(_setFiles).forEach(function (key) {
|
|
205
|
-
if (key === "default" || key === "__esModule") return;
|
|
206
|
-
if (key in exports && exports[key] === _setFiles[key]) return;
|
|
207
|
-
Object.defineProperty(exports, key, {
|
|
208
|
-
enumerable: true,
|
|
209
|
-
get: function () {
|
|
210
|
-
return _setFiles[key];
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
var _blur = require("./focus/blur");
|
|
216
|
-
|
|
217
|
-
Object.keys(_blur).forEach(function (key) {
|
|
218
|
-
if (key === "default" || key === "__esModule") return;
|
|
219
|
-
if (key in exports && exports[key] === _blur[key]) return;
|
|
220
|
-
Object.defineProperty(exports, key, {
|
|
221
|
-
enumerable: true,
|
|
222
|
-
get: function () {
|
|
223
|
-
return _blur[key];
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
var _copySelection = require("./focus/copySelection");
|
|
229
|
-
|
|
230
|
-
Object.keys(_copySelection).forEach(function (key) {
|
|
231
|
-
if (key === "default" || key === "__esModule") return;
|
|
232
|
-
if (key in exports && exports[key] === _copySelection[key]) return;
|
|
233
|
-
Object.defineProperty(exports, key, {
|
|
234
|
-
enumerable: true,
|
|
235
|
-
get: function () {
|
|
236
|
-
return _copySelection[key];
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
var _focus = require("./focus/focus");
|
|
242
|
-
|
|
243
|
-
Object.keys(_focus).forEach(function (key) {
|
|
244
|
-
if (key === "default" || key === "__esModule") return;
|
|
245
|
-
if (key in exports && exports[key] === _focus[key]) return;
|
|
246
|
-
Object.defineProperty(exports, key, {
|
|
247
|
-
enumerable: true,
|
|
248
|
-
get: function () {
|
|
249
|
-
return _focus[key];
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
var _getActiveElement = require("./focus/getActiveElement");
|
|
255
|
-
|
|
256
|
-
Object.keys(_getActiveElement).forEach(function (key) {
|
|
257
|
-
if (key === "default" || key === "__esModule") return;
|
|
258
|
-
if (key in exports && exports[key] === _getActiveElement[key]) return;
|
|
259
|
-
Object.defineProperty(exports, key, {
|
|
260
|
-
enumerable: true,
|
|
261
|
-
get: function () {
|
|
262
|
-
return _getActiveElement[key];
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
var _getTabDestination = require("./focus/getTabDestination");
|
|
268
|
-
|
|
269
|
-
Object.keys(_getTabDestination).forEach(function (key) {
|
|
270
|
-
if (key === "default" || key === "__esModule") return;
|
|
271
|
-
if (key in exports && exports[key] === _getTabDestination[key]) return;
|
|
272
|
-
Object.defineProperty(exports, key, {
|
|
273
|
-
enumerable: true,
|
|
274
|
-
get: function () {
|
|
275
|
-
return _getTabDestination[key];
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
var _isFocusable = require("./focus/isFocusable");
|
|
281
|
-
|
|
282
|
-
Object.keys(_isFocusable).forEach(function (key) {
|
|
283
|
-
if (key === "default" || key === "__esModule") return;
|
|
284
|
-
if (key in exports && exports[key] === _isFocusable[key]) return;
|
|
285
|
-
Object.defineProperty(exports, key, {
|
|
286
|
-
enumerable: true,
|
|
287
|
-
get: function () {
|
|
288
|
-
return _isFocusable[key];
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
var _selectAll = require("./focus/selectAll");
|
|
294
|
-
|
|
295
|
-
Object.keys(_selectAll).forEach(function (key) {
|
|
296
|
-
if (key === "default" || key === "__esModule") return;
|
|
297
|
-
if (key in exports && exports[key] === _selectAll[key]) return;
|
|
298
|
-
Object.defineProperty(exports, key, {
|
|
299
|
-
enumerable: true,
|
|
300
|
-
get: function () {
|
|
301
|
-
return _selectAll[key];
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
var _selection = require("./focus/selection");
|
|
307
|
-
|
|
308
|
-
Object.keys(_selection).forEach(function (key) {
|
|
309
|
-
if (key === "default" || key === "__esModule") return;
|
|
310
|
-
if (key in exports && exports[key] === _selection[key]) return;
|
|
311
|
-
Object.defineProperty(exports, key, {
|
|
312
|
-
enumerable: true,
|
|
313
|
-
get: function () {
|
|
314
|
-
return _selection[key];
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
|
|
319
|
-
var _selector = require("./focus/selector");
|
|
320
|
-
|
|
321
|
-
Object.keys(_selector).forEach(function (key) {
|
|
322
|
-
if (key === "default" || key === "__esModule") return;
|
|
323
|
-
if (key in exports && exports[key] === _selector[key]) return;
|
|
324
|
-
Object.defineProperty(exports, key, {
|
|
325
|
-
enumerable: true,
|
|
326
|
-
get: function () {
|
|
327
|
-
return _selector[key];
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
|
|
332
|
-
var _readNextDescriptor = require("./keyDef/readNextDescriptor");
|
|
333
|
-
|
|
334
|
-
Object.keys(_readNextDescriptor).forEach(function (key) {
|
|
335
|
-
if (key === "default" || key === "__esModule") return;
|
|
336
|
-
if (key in exports && exports[key] === _readNextDescriptor[key]) return;
|
|
337
|
-
Object.defineProperty(exports, key, {
|
|
338
|
-
enumerable: true,
|
|
339
|
-
get: function () {
|
|
340
|
-
return _readNextDescriptor[key];
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
var _eventWrapper = require("./misc/eventWrapper");
|
|
346
|
-
|
|
347
|
-
Object.keys(_eventWrapper).forEach(function (key) {
|
|
348
|
-
if (key === "default" || key === "__esModule") return;
|
|
349
|
-
if (key in exports && exports[key] === _eventWrapper[key]) return;
|
|
350
|
-
Object.defineProperty(exports, key, {
|
|
351
|
-
enumerable: true,
|
|
352
|
-
get: function () {
|
|
353
|
-
return _eventWrapper[key];
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
var _findClosest = require("./misc/findClosest");
|
|
359
|
-
|
|
360
|
-
Object.keys(_findClosest).forEach(function (key) {
|
|
361
|
-
if (key === "default" || key === "__esModule") return;
|
|
362
|
-
if (key in exports && exports[key] === _findClosest[key]) return;
|
|
363
|
-
Object.defineProperty(exports, key, {
|
|
364
|
-
enumerable: true,
|
|
365
|
-
get: function () {
|
|
366
|
-
return _findClosest[key];
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
var _getDocumentFromNode = require("./misc/getDocumentFromNode");
|
|
372
|
-
|
|
373
|
-
Object.keys(_getDocumentFromNode).forEach(function (key) {
|
|
374
|
-
if (key === "default" || key === "__esModule") return;
|
|
375
|
-
if (key in exports && exports[key] === _getDocumentFromNode[key]) return;
|
|
376
|
-
Object.defineProperty(exports, key, {
|
|
377
|
-
enumerable: true,
|
|
378
|
-
get: function () {
|
|
379
|
-
return _getDocumentFromNode[key];
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
});
|
|
383
|
-
|
|
384
|
-
var _isDescendantOrSelf = require("./misc/isDescendantOrSelf");
|
|
385
|
-
|
|
386
|
-
Object.keys(_isDescendantOrSelf).forEach(function (key) {
|
|
387
|
-
if (key === "default" || key === "__esModule") return;
|
|
388
|
-
if (key in exports && exports[key] === _isDescendantOrSelf[key]) return;
|
|
389
|
-
Object.defineProperty(exports, key, {
|
|
390
|
-
enumerable: true,
|
|
391
|
-
get: function () {
|
|
392
|
-
return _isDescendantOrSelf[key];
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
});
|
|
396
|
-
|
|
397
|
-
var _isElementType = require("./misc/isElementType");
|
|
398
|
-
|
|
399
|
-
Object.keys(_isElementType).forEach(function (key) {
|
|
400
|
-
if (key === "default" || key === "__esModule") return;
|
|
401
|
-
if (key in exports && exports[key] === _isElementType[key]) return;
|
|
402
|
-
Object.defineProperty(exports, key, {
|
|
403
|
-
enumerable: true,
|
|
404
|
-
get: function () {
|
|
405
|
-
return _isElementType[key];
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
});
|
|
409
|
-
|
|
410
|
-
var _isVisible = require("./misc/isVisible");
|
|
411
|
-
|
|
412
|
-
Object.keys(_isVisible).forEach(function (key) {
|
|
413
|
-
if (key === "default" || key === "__esModule") return;
|
|
414
|
-
if (key in exports && exports[key] === _isVisible[key]) return;
|
|
415
|
-
Object.defineProperty(exports, key, {
|
|
416
|
-
enumerable: true,
|
|
417
|
-
get: function () {
|
|
418
|
-
return _isVisible[key];
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
var _isDisabled = require("./misc/isDisabled");
|
|
424
|
-
|
|
425
|
-
Object.keys(_isDisabled).forEach(function (key) {
|
|
426
|
-
if (key === "default" || key === "__esModule") return;
|
|
427
|
-
if (key in exports && exports[key] === _isDisabled[key]) return;
|
|
428
|
-
Object.defineProperty(exports, key, {
|
|
429
|
-
enumerable: true,
|
|
430
|
-
get: function () {
|
|
431
|
-
return _isDisabled[key];
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
var _wait = require("./misc/wait");
|
|
437
|
-
|
|
438
|
-
Object.keys(_wait).forEach(function (key) {
|
|
439
|
-
if (key === "default" || key === "__esModule") return;
|
|
440
|
-
if (key in exports && exports[key] === _wait[key]) return;
|
|
441
|
-
Object.defineProperty(exports, key, {
|
|
442
|
-
enumerable: true,
|
|
443
|
-
get: function () {
|
|
444
|
-
return _wait[key];
|
|
445
|
-
}
|
|
446
|
-
});
|
|
447
|
-
});
|
|
448
|
-
|
|
449
|
-
var _hasPointerEvents = require("./misc/hasPointerEvents");
|
|
450
|
-
|
|
451
|
-
Object.keys(_hasPointerEvents).forEach(function (key) {
|
|
452
|
-
if (key === "default" || key === "__esModule") return;
|
|
453
|
-
if (key in exports && exports[key] === _hasPointerEvents[key]) return;
|
|
454
|
-
Object.defineProperty(exports, key, {
|
|
455
|
-
enumerable: true,
|
|
456
|
-
get: function () {
|
|
457
|
-
return _hasPointerEvents[key];
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
});
|
|
461
|
-
|
|
462
|
-
var _hasFormSubmit = require("./misc/hasFormSubmit");
|
|
463
|
-
|
|
464
|
-
Object.keys(_hasFormSubmit).forEach(function (key) {
|
|
465
|
-
if (key === "default" || key === "__esModule") return;
|
|
466
|
-
if (key in exports && exports[key] === _hasFormSubmit[key]) return;
|
|
467
|
-
Object.defineProperty(exports, key, {
|
|
468
|
-
enumerable: true,
|
|
469
|
-
get: function () {
|
|
470
|
-
return _hasFormSubmit[key];
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
});
|
|
474
|
-
|
|
475
|
-
var _firePointerEvents = require("./pointer/firePointerEvents");
|
|
476
|
-
|
|
477
|
-
Object.keys(_firePointerEvents).forEach(function (key) {
|
|
478
|
-
if (key === "default" || key === "__esModule") return;
|
|
479
|
-
if (key in exports && exports[key] === _firePointerEvents[key]) return;
|
|
480
|
-
Object.defineProperty(exports, key, {
|
|
481
|
-
enumerable: true,
|
|
482
|
-
get: function () {
|
|
483
|
-
return _firePointerEvents[key];
|
|
484
|
-
}
|
|
485
|
-
});
|
|
486
|
-
});
|
|
487
|
-
|
|
488
|
-
var _mouseButtons = require("./pointer/mouseButtons");
|
|
489
|
-
|
|
490
|
-
Object.keys(_mouseButtons).forEach(function (key) {
|
|
491
|
-
if (key === "default" || key === "__esModule") return;
|
|
492
|
-
if (key in exports && exports[key] === _mouseButtons[key]) return;
|
|
493
|
-
Object.defineProperty(exports, key, {
|
|
494
|
-
enumerable: true,
|
|
495
|
-
get: function () {
|
|
496
|
-
return _mouseButtons[key];
|
|
497
|
-
}
|
|
498
|
-
});
|
|
499
|
-
});
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.readNextDescriptor = readNextDescriptor;
|
|
7
|
-
var bracketDict;
|
|
8
|
-
/**
|
|
9
|
-
* Read the next key definition from user input
|
|
10
|
-
*
|
|
11
|
-
* Describe key per `{descriptor}` or `[descriptor]`.
|
|
12
|
-
* Everything else will be interpreted as a single character as descriptor - e.g. `a`.
|
|
13
|
-
* Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.
|
|
14
|
-
* A previously pressed key can be released per `{/descriptor}`.
|
|
15
|
-
* Keeping the key pressed can be written as `{descriptor>}`.
|
|
16
|
-
* When keeping the key pressed you can choose how long the key is pressed `{descriptor>3}`.
|
|
17
|
-
* You can then release the key per `{descriptor>3/}` or keep it pressed and continue with the next key.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
(function (bracketDict) {
|
|
21
|
-
bracketDict["{"] = "}";
|
|
22
|
-
bracketDict["["] = "]";
|
|
23
|
-
})(bracketDict || (bracketDict = {}));
|
|
24
|
-
|
|
25
|
-
function readNextDescriptor(text) {
|
|
26
|
-
let pos = 0;
|
|
27
|
-
const startBracket = text[pos] in bracketDict ? text[pos] : '';
|
|
28
|
-
pos += startBracket.length; // `foo{{bar` is an escaped char at position 3,
|
|
29
|
-
// but `foo{{{>5}bar` should be treated as `{` pressed down for 5 keydowns.
|
|
30
|
-
|
|
31
|
-
const startBracketRepeated = startBracket ? text.match(new RegExp(`^\\${startBracket}+`))[0].length : 0;
|
|
32
|
-
const isEscapedChar = startBracketRepeated === 2 || startBracket === '{' && startBracketRepeated > 3;
|
|
33
|
-
const type = isEscapedChar ? '' : startBracket;
|
|
34
|
-
return {
|
|
35
|
-
type,
|
|
36
|
-
...(type === '' ? readPrintableChar(text, pos) : readTag(text, pos, type))
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function readPrintableChar(text, pos) {
|
|
41
|
-
const descriptor = text[pos];
|
|
42
|
-
assertDescriptor(descriptor, text, pos);
|
|
43
|
-
pos += descriptor.length;
|
|
44
|
-
return {
|
|
45
|
-
consumedLength: pos,
|
|
46
|
-
descriptor,
|
|
47
|
-
releasePrevious: false,
|
|
48
|
-
releaseSelf: true,
|
|
49
|
-
repeat: 1
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function readTag(text, pos, startBracket) {
|
|
54
|
-
var _text$slice$match, _text$slice$match$, _text$slice$match2;
|
|
55
|
-
|
|
56
|
-
const releasePreviousModifier = text[pos] === '/' ? '/' : '';
|
|
57
|
-
pos += releasePreviousModifier.length;
|
|
58
|
-
const descriptor = (_text$slice$match = text.slice(pos).match(/^\w+/)) == null ? void 0 : _text$slice$match[0];
|
|
59
|
-
assertDescriptor(descriptor, text, pos);
|
|
60
|
-
pos += descriptor.length;
|
|
61
|
-
const repeatModifier = (_text$slice$match$ = (_text$slice$match2 = text.slice(pos).match(/^>\d+/)) == null ? void 0 : _text$slice$match2[0]) != null ? _text$slice$match$ : '';
|
|
62
|
-
pos += repeatModifier.length;
|
|
63
|
-
const releaseSelfModifier = text[pos] === '/' || !repeatModifier && text[pos] === '>' ? text[pos] : '';
|
|
64
|
-
pos += releaseSelfModifier.length;
|
|
65
|
-
const expectedEndBracket = bracketDict[startBracket];
|
|
66
|
-
const endBracket = text[pos] === expectedEndBracket ? expectedEndBracket : '';
|
|
67
|
-
|
|
68
|
-
if (!endBracket) {
|
|
69
|
-
throw new Error(getErrorMessage([!repeatModifier && 'repeat modifier', !releaseSelfModifier && 'release modifier', `"${expectedEndBracket}"`].filter(Boolean).join(' or '), text[pos], text));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
pos += endBracket.length;
|
|
73
|
-
return {
|
|
74
|
-
consumedLength: pos,
|
|
75
|
-
descriptor,
|
|
76
|
-
releasePrevious: !!releasePreviousModifier,
|
|
77
|
-
repeat: repeatModifier ? Math.max(Number(repeatModifier.substr(1)), 1) : 1,
|
|
78
|
-
releaseSelf: hasReleaseSelf(releaseSelfModifier, repeatModifier)
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function assertDescriptor(descriptor, text, pos) {
|
|
83
|
-
if (!descriptor) {
|
|
84
|
-
throw new Error(getErrorMessage('key descriptor', text[pos], text));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function hasReleaseSelf(releaseSelfModifier, repeatModifier) {
|
|
89
|
-
if (releaseSelfModifier) {
|
|
90
|
-
return releaseSelfModifier === '/';
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (repeatModifier) {
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function getErrorMessage(expected, found, text) {
|
|
99
|
-
return `Expected ${expected} but found "${found != null ? found : ''}" in "${text}"
|
|
100
|
-
See https://github.com/testing-library/user-event/blob/main/README.md#keyboardtext-options
|
|
101
|
-
for more information about how userEvent parses your input.`;
|
|
102
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.eventWrapper = eventWrapper;
|
|
7
|
-
|
|
8
|
-
var _dom = require("@testing-library/dom");
|
|
9
|
-
|
|
10
|
-
function eventWrapper(cb) {
|
|
11
|
-
let result;
|
|
12
|
-
(0, _dom.getConfig)().eventWrapper(() => {
|
|
13
|
-
result = cb();
|
|
14
|
-
});
|
|
15
|
-
return result;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function findClosest(element: Element, callback: (e: Element) => boolean): Element | undefined;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.findClosest = findClosest;
|
|
7
|
-
|
|
8
|
-
function findClosest(element, callback) {
|
|
9
|
-
let el = element;
|
|
10
|
-
|
|
11
|
-
do {
|
|
12
|
-
if (callback(el)) {
|
|
13
|
-
return el;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
el = el.parentElement;
|
|
17
|
-
} while (el && el !== element.ownerDocument.body);
|
|
18
|
-
|
|
19
|
-
return undefined;
|
|
20
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getDocumentFromNode = getDocumentFromNode;
|
|
7
|
-
|
|
8
|
-
function getDocumentFromNode(el) {
|
|
9
|
-
return isDocument(el) ? el : el.ownerDocument;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function isDocument(node) {
|
|
13
|
-
return node.nodeType === 9;
|
|
14
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.hasFormSubmit = void 0;
|
|
7
|
-
|
|
8
|
-
const hasFormSubmit = form => !!(form && (form.querySelector('input[type="submit"]') || form.querySelector('button[type="submit"]')));
|
|
9
|
-
|
|
10
|
-
exports.hasFormSubmit = hasFormSubmit;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options that can be passed to any event that relies
|
|
3
|
-
* on pointer-events property
|
|
4
|
-
*/
|
|
5
|
-
export declare interface PointerOptions {
|
|
6
|
-
/**
|
|
7
|
-
* When set to `true` the event skips checking if any element
|
|
8
|
-
* in the DOM-tree has `'pointer-events: none'` set. This check is
|
|
9
|
-
* costly in general and very costly when rendering large DOM-trees.
|
|
10
|
-
* Can be used to speed up tests.
|
|
11
|
-
* Default: `false`
|
|
12
|
-
* */
|
|
13
|
-
skipPointerEventsCheck?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare function hasPointerEvents(element: Element): boolean;
|