@etsoo/shared 1.2.52 → 1.2.54
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/.github/workflows/main.yml +6 -5
- package/lib/cjs/ActionResult.d.ts +1 -1
- package/lib/cjs/ActionResult.js +3 -3
- package/lib/cjs/ArrayUtils.d.ts +1 -1
- package/lib/cjs/ArrayUtils.js +4 -4
- package/lib/cjs/ColorUtils.d.ts +1 -1
- package/lib/cjs/ColorUtils.js +2 -2
- package/lib/cjs/DataTypes.d.ts +6 -6
- package/lib/cjs/DataTypes.js +50 -51
- package/lib/cjs/DateUtils.d.ts +1 -1
- package/lib/cjs/DateUtils.js +27 -28
- package/lib/cjs/DomUtils.d.ts +3 -3
- package/lib/cjs/DomUtils.js +64 -73
- package/lib/cjs/ExtendUtils.d.ts +1 -1
- package/lib/cjs/ExtendUtils.js +6 -6
- package/lib/cjs/IActionResult.d.ts +1 -1
- package/lib/cjs/NumberUtils.d.ts +1 -1
- package/lib/cjs/NumberUtils.js +9 -9
- package/lib/cjs/StorageUtils.js +2 -2
- package/lib/cjs/Utils.d.ts +4 -4
- package/lib/cjs/Utils.js +58 -62
- package/lib/cjs/index.d.ts +22 -22
- package/lib/cjs/storage/WindowStorage.d.ts +1 -1
- package/lib/cjs/types/ContentDisposition.d.ts +2 -2
- package/lib/cjs/types/ContentDisposition.js +11 -13
- package/lib/cjs/types/EColor.js +5 -7
- package/lib/cjs/types/EHistory.d.ts +3 -3
- package/lib/cjs/types/EHistory.js +4 -4
- package/lib/cjs/types/ErrorData.d.ts +1 -1
- package/lib/cjs/types/EventClass.js +1 -1
- package/lib/mjs/ActionResult.d.ts +1 -1
- package/lib/mjs/ActionResult.js +3 -3
- package/lib/mjs/ArrayUtils.d.ts +1 -1
- package/lib/mjs/ArrayUtils.js +5 -5
- package/lib/mjs/ColorUtils.d.ts +1 -1
- package/lib/mjs/ColorUtils.js +3 -3
- package/lib/mjs/DataTypes.d.ts +6 -6
- package/lib/mjs/DataTypes.js +50 -51
- package/lib/mjs/DateUtils.d.ts +1 -1
- package/lib/mjs/DateUtils.js +27 -28
- package/lib/mjs/DomUtils.d.ts +3 -3
- package/lib/mjs/DomUtils.js +67 -76
- package/lib/mjs/ExtendUtils.d.ts +1 -1
- package/lib/mjs/ExtendUtils.js +6 -6
- package/lib/mjs/IActionResult.d.ts +1 -1
- package/lib/mjs/NumberUtils.d.ts +1 -1
- package/lib/mjs/NumberUtils.js +9 -9
- package/lib/mjs/StorageUtils.js +4 -4
- package/lib/mjs/Utils.d.ts +4 -4
- package/lib/mjs/Utils.js +61 -65
- package/lib/mjs/index.d.ts +22 -22
- package/lib/mjs/index.js +22 -22
- package/lib/mjs/storage/WindowStorage.d.ts +1 -1
- package/lib/mjs/storage/WindowStorage.js +2 -2
- package/lib/mjs/types/ContentDisposition.d.ts +2 -2
- package/lib/mjs/types/ContentDisposition.js +12 -14
- package/lib/mjs/types/EColor.js +5 -7
- package/lib/mjs/types/EHistory.d.ts +3 -3
- package/lib/mjs/types/EHistory.js +5 -5
- package/lib/mjs/types/ErrorData.d.ts +1 -1
- package/lib/mjs/types/EventClass.js +1 -1
- package/package.json +61 -63
- package/src/ActionResult.ts +23 -23
- package/src/ArrayUtils.ts +164 -172
- package/src/ColorUtils.ts +80 -82
- package/src/DataTypes.ts +745 -754
- package/src/DateUtils.ts +266 -268
- package/src/DomUtils.ts +806 -831
- package/src/ExtendUtils.ts +191 -191
- package/src/IActionResult.ts +42 -42
- package/src/Keyboard.ts +258 -258
- package/src/NumberUtils.ts +135 -135
- package/src/StorageUtils.ts +117 -117
- package/src/Utils.ts +908 -930
- package/src/index.ts +22 -22
- package/src/node/Storage.ts +53 -53
- package/src/storage/IStorage.ts +62 -62
- package/src/storage/WindowStorage.ts +140 -140
- package/src/types/ContentDisposition.ts +59 -63
- package/src/types/DataError.ts +15 -15
- package/src/types/DelayedExecutorType.ts +15 -15
- package/src/types/EColor.ts +241 -248
- package/src/types/EHistory.ts +151 -151
- package/src/types/ErrorData.ts +11 -11
- package/src/types/EventClass.ts +220 -220
- package/src/types/FormData.ts +25 -25
- package/src/types/ParsedPath.ts +5 -5
- package/tsconfig.cjs.json +16 -16
- package/tsconfig.json +16 -16
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -29
- package/.prettierignore +0 -5
- package/.prettierrc +0 -6
package/src/Keyboard.ts
CHANGED
|
@@ -2,264 +2,264 @@
|
|
|
2
2
|
* Keyboard functions
|
|
3
3
|
*/
|
|
4
4
|
export namespace Keyboard {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Keys for KeyboardEvent.key
|
|
7
|
+
*/
|
|
8
|
+
export enum Keys {
|
|
9
|
+
Backspace = "Backspace",
|
|
10
|
+
Tab = "Tab",
|
|
11
|
+
Enter = "Enter",
|
|
12
|
+
Shift = "Shift",
|
|
13
|
+
Control = "Control",
|
|
14
|
+
Alt = "Alt",
|
|
15
|
+
Pause = "Pause",
|
|
16
|
+
CapsLock = "CapsLock",
|
|
17
|
+
Escape = "Escape",
|
|
18
|
+
Space = " ",
|
|
19
|
+
PageUp = "PageUp",
|
|
20
|
+
PageDown = "PageDown",
|
|
21
|
+
End = "End",
|
|
22
|
+
Home = "Home",
|
|
23
|
+
ArrowLeft = "ArrowLeft",
|
|
24
|
+
ArrowUp = "ArrowUp",
|
|
25
|
+
ArrowRight = "ArrowRight",
|
|
26
|
+
ArrowDown = "ArrowDown",
|
|
27
|
+
PrintScreen = "PrintScreen",
|
|
28
|
+
Insert = "Insert",
|
|
29
|
+
Delete = "Delete",
|
|
30
|
+
Digit0 = "0",
|
|
31
|
+
Digit1 = "1",
|
|
32
|
+
Digit2 = "2",
|
|
33
|
+
Digit3 = "3",
|
|
34
|
+
Digit4 = "4",
|
|
35
|
+
Digit5 = "5",
|
|
36
|
+
Digit6 = "6",
|
|
37
|
+
Digit7 = "7",
|
|
38
|
+
Digit8 = "8",
|
|
39
|
+
Digit9 = "9",
|
|
40
|
+
A = "A",
|
|
41
|
+
B = "B",
|
|
42
|
+
C = "C",
|
|
43
|
+
D = "D",
|
|
44
|
+
E = "E",
|
|
45
|
+
F = "F",
|
|
46
|
+
G = "G",
|
|
47
|
+
H = "H",
|
|
48
|
+
I = "I",
|
|
49
|
+
J = "J",
|
|
50
|
+
K = "K",
|
|
51
|
+
L = "L",
|
|
52
|
+
M = "M",
|
|
53
|
+
N = "N",
|
|
54
|
+
O = "O",
|
|
55
|
+
P = "P",
|
|
56
|
+
Q = "Q",
|
|
57
|
+
R = "R",
|
|
58
|
+
S = "S",
|
|
59
|
+
T = "T",
|
|
60
|
+
U = "U",
|
|
61
|
+
V = "V",
|
|
62
|
+
W = "W",
|
|
63
|
+
X = "X",
|
|
64
|
+
Y = "Y",
|
|
65
|
+
Z = "Z",
|
|
66
|
+
a = "a",
|
|
67
|
+
b = "b",
|
|
68
|
+
c = "c",
|
|
69
|
+
d = "d",
|
|
70
|
+
e = "e",
|
|
71
|
+
f = "f",
|
|
72
|
+
g = "g",
|
|
73
|
+
h = "h",
|
|
74
|
+
i = "i",
|
|
75
|
+
j = "j",
|
|
76
|
+
k = "k",
|
|
77
|
+
l = "l",
|
|
78
|
+
m = "m",
|
|
79
|
+
n = "n",
|
|
80
|
+
o = "o",
|
|
81
|
+
p = "p",
|
|
82
|
+
q = "q",
|
|
83
|
+
r = "r",
|
|
84
|
+
s = "s",
|
|
85
|
+
t = "t",
|
|
86
|
+
u = "u",
|
|
87
|
+
v = "v",
|
|
88
|
+
w = "w",
|
|
89
|
+
x = "x",
|
|
90
|
+
y = "y",
|
|
91
|
+
z = "z",
|
|
92
|
+
Meta = "Meta",
|
|
93
|
+
ContextMenu = "ContextMenu",
|
|
94
|
+
AudioVolumeMute = "AudioVolumeMute",
|
|
95
|
+
AudioVolumeDown = "AudioVolumeDown",
|
|
96
|
+
AudioVolumeUp = "AudioVolumeUp",
|
|
97
|
+
F1 = "F1",
|
|
98
|
+
F2 = "F2",
|
|
99
|
+
F3 = "F3",
|
|
100
|
+
F4 = "F4",
|
|
101
|
+
F5 = "F5",
|
|
102
|
+
F6 = "F6",
|
|
103
|
+
F7 = "F7",
|
|
104
|
+
F8 = "F8",
|
|
105
|
+
F9 = "F9",
|
|
106
|
+
F10 = "F10",
|
|
107
|
+
F11 = "F11",
|
|
108
|
+
F12 = "F12",
|
|
109
|
+
NumLock = "NumLock",
|
|
110
|
+
ScrollLock = "ScrollLock",
|
|
111
|
+
Semicolon = ";",
|
|
112
|
+
Equal = "=",
|
|
113
|
+
Comma = ",",
|
|
114
|
+
Minus = "-",
|
|
115
|
+
Period = ".",
|
|
116
|
+
Slash = "/",
|
|
117
|
+
Backquote = "`",
|
|
118
|
+
BracketLeft = "[",
|
|
119
|
+
Backslash = "\\",
|
|
120
|
+
BracketRight = "]",
|
|
121
|
+
Quote = "'",
|
|
122
|
+
Tilde = "~",
|
|
123
|
+
Exclamation = "!",
|
|
124
|
+
At = "@",
|
|
125
|
+
Sharp = "#",
|
|
126
|
+
Dollar = "$",
|
|
127
|
+
Percent = "%",
|
|
128
|
+
Caret = "^",
|
|
129
|
+
Ampersand = "&",
|
|
130
|
+
Asterisk = "*",
|
|
131
|
+
ParenthesisLeft = "(",
|
|
132
|
+
ParenthesisRight = ")",
|
|
133
|
+
Underscore = "_",
|
|
134
|
+
Plus = "+",
|
|
135
|
+
OpenBrace = "{",
|
|
136
|
+
CloseBrace = "}",
|
|
137
|
+
Pipe = "|",
|
|
138
|
+
Colon = ":",
|
|
139
|
+
Quote2 = '"',
|
|
140
|
+
AngleBracketLeft = "<",
|
|
141
|
+
AngleBracketRight = ">",
|
|
142
|
+
QuestionMark = "?"
|
|
143
|
+
}
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
145
|
+
/**
|
|
146
|
+
* Codes for KeyboardEvent.code
|
|
147
|
+
*/
|
|
148
|
+
export enum Codes {
|
|
149
|
+
Backspace = "Backspace",
|
|
150
|
+
Tab = "Tab",
|
|
151
|
+
Enter = "Enter",
|
|
152
|
+
ShiftLeft = "ShiftLeft",
|
|
153
|
+
ShiftRight = "ShiftRight",
|
|
154
|
+
ControlLeft = "ControlLeft",
|
|
155
|
+
ControlRight = "ControlRight",
|
|
156
|
+
AltLeft = "AltLeft",
|
|
157
|
+
AltRight = "AltRight",
|
|
158
|
+
Pause = "Pause",
|
|
159
|
+
CapsLock = "CapsLock",
|
|
160
|
+
Escape = "Escape",
|
|
161
|
+
Space = "Space",
|
|
162
|
+
PageUp = "PageUp",
|
|
163
|
+
PageDown = "PageDown",
|
|
164
|
+
End = "End",
|
|
165
|
+
Home = "Home",
|
|
166
|
+
ArrowLeft = "ArrowLeft",
|
|
167
|
+
ArrowUp = "ArrowUp",
|
|
168
|
+
ArrowRight = "ArrowRight",
|
|
169
|
+
ArrowDown = "ArrowDown",
|
|
170
|
+
PrintScreen = "PrintScreen",
|
|
171
|
+
Insert = "Insert",
|
|
172
|
+
Delete = "Delete",
|
|
173
|
+
Digit0 = "Digit0",
|
|
174
|
+
Digit1 = "Digit1",
|
|
175
|
+
Digit2 = "Digit2",
|
|
176
|
+
Digit3 = "Digit3",
|
|
177
|
+
Digit4 = "Digit4",
|
|
178
|
+
Digit5 = "Digit5",
|
|
179
|
+
Digit6 = "Digit6",
|
|
180
|
+
Digit7 = "Digit7",
|
|
181
|
+
Digit8 = "Digit8",
|
|
182
|
+
Digit9 = "Digit9",
|
|
183
|
+
AudioVolumeMute = "AudioVolumeMute",
|
|
184
|
+
AudioVolumeDown = "AudioVolumeDown",
|
|
185
|
+
AudioVolumeUp = "AudioVolumeUp",
|
|
186
|
+
KeyA = "KeyA",
|
|
187
|
+
KeyB = "KeyB",
|
|
188
|
+
KeyC = "KeyC",
|
|
189
|
+
KeyD = "KeyD",
|
|
190
|
+
KeyE = "KeyE",
|
|
191
|
+
KeyF = "KeyF",
|
|
192
|
+
KeyG = "KeyG",
|
|
193
|
+
KeyH = "KeyH",
|
|
194
|
+
KeyI = "KeyI",
|
|
195
|
+
KeyJ = "KeyJ",
|
|
196
|
+
KeyK = "KeyK",
|
|
197
|
+
KeyL = "KeyL",
|
|
198
|
+
KeyM = "KeyM",
|
|
199
|
+
KeyN = "KeyN",
|
|
200
|
+
KeyO = "KeyO",
|
|
201
|
+
KeyP = "KeyP",
|
|
202
|
+
KeyQ = "KeyQ",
|
|
203
|
+
KeyR = "KeyR",
|
|
204
|
+
KeyS = "KeyS",
|
|
205
|
+
KeyT = "KeyT",
|
|
206
|
+
KeyU = "KeyU",
|
|
207
|
+
KeyV = "KeyV",
|
|
208
|
+
KeyW = "KeyW",
|
|
209
|
+
KeyX = "KeyX",
|
|
210
|
+
KeyY = "KeyY",
|
|
211
|
+
KeyZ = "KeyZ",
|
|
212
|
+
MetaLeft = "MetaLeft",
|
|
213
|
+
MetaRight = "MetaRight",
|
|
214
|
+
ContextMenu = "ContextMenu",
|
|
215
|
+
Numpad0 = "Numpad0",
|
|
216
|
+
Numpad1 = "Numpad1",
|
|
217
|
+
Numpad2 = "Numpad2",
|
|
218
|
+
Numpad3 = "Numpad3",
|
|
219
|
+
Numpad4 = "Numpad4",
|
|
220
|
+
Numpad5 = "Numpad5",
|
|
221
|
+
Numpad6 = "Numpad6",
|
|
222
|
+
Numpad7 = "Numpad7",
|
|
223
|
+
Numpad8 = "Numpad8",
|
|
224
|
+
Numpad9 = "Numpad9",
|
|
225
|
+
NumpadMultiply = "NumpadMultiply",
|
|
226
|
+
NumpadAdd = "NumpadAdd",
|
|
227
|
+
NumpadSubtract = "NumpadSubtract",
|
|
228
|
+
NumpadDecimal = "NumpadDecimal",
|
|
229
|
+
NumpadDivide = "NumpadDivide",
|
|
230
|
+
F1 = "F1",
|
|
231
|
+
F2 = "F2",
|
|
232
|
+
F3 = "F3",
|
|
233
|
+
F4 = "F4",
|
|
234
|
+
F5 = "F5",
|
|
235
|
+
F6 = "F6",
|
|
236
|
+
F7 = "F7",
|
|
237
|
+
F8 = "F8",
|
|
238
|
+
F9 = "F9",
|
|
239
|
+
F10 = "F10",
|
|
240
|
+
F11 = "F11",
|
|
241
|
+
F12 = "F12",
|
|
242
|
+
NumLock = "NumLock",
|
|
243
|
+
ScrollLock = "ScrollLock",
|
|
244
|
+
Semicolon = "Semicolon",
|
|
245
|
+
Equal = "Equal",
|
|
246
|
+
Comma = "Comma",
|
|
247
|
+
Minus = "Minus",
|
|
248
|
+
Period = "Period",
|
|
249
|
+
Slash = "Slash",
|
|
250
|
+
Backquote = "Backquote",
|
|
251
|
+
BracketLeft = "BracketLeft",
|
|
252
|
+
Backslash = "Backslash",
|
|
253
|
+
BracketRight = "BracketRight",
|
|
254
|
+
Quote = "Quote"
|
|
255
|
+
}
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
257
|
+
/**
|
|
258
|
+
* Is typing content or press command key
|
|
259
|
+
* @param input Input key
|
|
260
|
+
* @returns Result
|
|
261
|
+
*/
|
|
262
|
+
export function isTypingContent(input: Keys | string) {
|
|
263
|
+
return input.length === 1;
|
|
264
|
+
}
|
|
265
265
|
}
|