@etsoo/shared 1.2.51 → 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.
Files changed (94) hide show
  1. package/.github/workflows/main.yml +6 -5
  2. package/README.md +1 -1
  3. package/lib/cjs/ActionResult.d.ts +1 -1
  4. package/lib/cjs/ActionResult.js +3 -3
  5. package/lib/cjs/ArrayUtils.d.ts +1 -1
  6. package/lib/cjs/ArrayUtils.js +4 -4
  7. package/lib/cjs/ColorUtils.d.ts +1 -1
  8. package/lib/cjs/ColorUtils.js +2 -2
  9. package/lib/cjs/DataTypes.d.ts +6 -6
  10. package/lib/cjs/DataTypes.js +50 -51
  11. package/lib/cjs/DateUtils.d.ts +1 -1
  12. package/lib/cjs/DateUtils.js +27 -28
  13. package/lib/cjs/DomUtils.d.ts +3 -3
  14. package/lib/cjs/DomUtils.js +64 -73
  15. package/lib/cjs/ExtendUtils.d.ts +1 -1
  16. package/lib/cjs/ExtendUtils.js +6 -6
  17. package/lib/cjs/IActionResult.d.ts +15 -2
  18. package/lib/cjs/NumberUtils.d.ts +1 -1
  19. package/lib/cjs/NumberUtils.js +9 -9
  20. package/lib/cjs/StorageUtils.js +2 -2
  21. package/lib/cjs/Utils.d.ts +4 -4
  22. package/lib/cjs/Utils.js +58 -62
  23. package/lib/cjs/index.d.ts +22 -22
  24. package/lib/cjs/storage/WindowStorage.d.ts +1 -1
  25. package/lib/cjs/types/ContentDisposition.d.ts +2 -2
  26. package/lib/cjs/types/ContentDisposition.js +11 -13
  27. package/lib/cjs/types/EColor.js +5 -7
  28. package/lib/cjs/types/EHistory.d.ts +3 -3
  29. package/lib/cjs/types/EHistory.js +4 -4
  30. package/lib/cjs/types/ErrorData.d.ts +1 -1
  31. package/lib/cjs/types/EventClass.js +1 -1
  32. package/lib/mjs/ActionResult.d.ts +1 -1
  33. package/lib/mjs/ActionResult.js +3 -3
  34. package/lib/mjs/ArrayUtils.d.ts +1 -1
  35. package/lib/mjs/ArrayUtils.js +5 -5
  36. package/lib/mjs/ColorUtils.d.ts +1 -1
  37. package/lib/mjs/ColorUtils.js +3 -3
  38. package/lib/mjs/DataTypes.d.ts +6 -6
  39. package/lib/mjs/DataTypes.js +50 -51
  40. package/lib/mjs/DateUtils.d.ts +1 -1
  41. package/lib/mjs/DateUtils.js +27 -28
  42. package/lib/mjs/DomUtils.d.ts +3 -3
  43. package/lib/mjs/DomUtils.js +67 -76
  44. package/lib/mjs/ExtendUtils.d.ts +1 -1
  45. package/lib/mjs/ExtendUtils.js +6 -6
  46. package/lib/mjs/IActionResult.d.ts +15 -2
  47. package/lib/mjs/NumberUtils.d.ts +1 -1
  48. package/lib/mjs/NumberUtils.js +9 -9
  49. package/lib/mjs/StorageUtils.js +4 -4
  50. package/lib/mjs/Utils.d.ts +4 -4
  51. package/lib/mjs/Utils.js +61 -65
  52. package/lib/mjs/index.d.ts +22 -22
  53. package/lib/mjs/index.js +22 -22
  54. package/lib/mjs/storage/WindowStorage.d.ts +1 -1
  55. package/lib/mjs/storage/WindowStorage.js +2 -2
  56. package/lib/mjs/types/ContentDisposition.d.ts +2 -2
  57. package/lib/mjs/types/ContentDisposition.js +12 -14
  58. package/lib/mjs/types/EColor.js +5 -7
  59. package/lib/mjs/types/EHistory.d.ts +3 -3
  60. package/lib/mjs/types/EHistory.js +5 -5
  61. package/lib/mjs/types/ErrorData.d.ts +1 -1
  62. package/lib/mjs/types/EventClass.js +1 -1
  63. package/package.json +61 -63
  64. package/src/ActionResult.ts +23 -23
  65. package/src/ArrayUtils.ts +164 -172
  66. package/src/ColorUtils.ts +80 -82
  67. package/src/DataTypes.ts +745 -754
  68. package/src/DateUtils.ts +266 -268
  69. package/src/DomUtils.ts +806 -831
  70. package/src/ExtendUtils.ts +191 -191
  71. package/src/IActionResult.ts +55 -40
  72. package/src/Keyboard.ts +258 -258
  73. package/src/NumberUtils.ts +135 -135
  74. package/src/StorageUtils.ts +117 -117
  75. package/src/Utils.ts +908 -930
  76. package/src/index.ts +22 -22
  77. package/src/node/Storage.ts +53 -53
  78. package/src/storage/IStorage.ts +62 -62
  79. package/src/storage/WindowStorage.ts +140 -140
  80. package/src/types/ContentDisposition.ts +59 -63
  81. package/src/types/DataError.ts +15 -15
  82. package/src/types/DelayedExecutorType.ts +15 -15
  83. package/src/types/EColor.ts +241 -248
  84. package/src/types/EHistory.ts +151 -151
  85. package/src/types/ErrorData.ts +11 -11
  86. package/src/types/EventClass.ts +220 -220
  87. package/src/types/FormData.ts +25 -25
  88. package/src/types/ParsedPath.ts +5 -5
  89. package/tsconfig.cjs.json +16 -16
  90. package/tsconfig.json +16 -16
  91. package/.eslintignore +0 -3
  92. package/.eslintrc.json +0 -29
  93. package/.prettierignore +0 -5
  94. 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
- * 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
- }
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
- * 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
- }
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
- * 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
- }
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
  }