@dolthub/web-utils 0.1.3 → 0.1.4
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/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +103 -1
- package/package.json +10 -9
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,108 @@ declare function fakeEscapePress(): void;
|
|
|
50
50
|
|
|
51
51
|
declare function initialUppercase(s: string): string;
|
|
52
52
|
|
|
53
|
+
declare enum KeyCodes {
|
|
54
|
+
BACKSPACE = 8,
|
|
55
|
+
TAB = 9,
|
|
56
|
+
ENTER = 13,
|
|
57
|
+
SHIFT = 16,
|
|
58
|
+
CTRL = 17,
|
|
59
|
+
ALT = 18,
|
|
60
|
+
PAUSE = 19,
|
|
61
|
+
CAPS_LOCK = 20,
|
|
62
|
+
ESCAPE = 27,
|
|
63
|
+
SPACE = 32,
|
|
64
|
+
PAGE_UP = 33,
|
|
65
|
+
PAGE_DOWN = 34,
|
|
66
|
+
END = 35,
|
|
67
|
+
HOME = 36,
|
|
68
|
+
LEFT_ARROW = 37,
|
|
69
|
+
UP_ARROW = 38,
|
|
70
|
+
RIGHT_ARROW = 39,
|
|
71
|
+
DOWN_ARROW = 40,
|
|
72
|
+
INSERT = 45,
|
|
73
|
+
DELETE = 46,
|
|
74
|
+
KEY_0 = 48,
|
|
75
|
+
KEY_1 = 49,
|
|
76
|
+
KEY_2 = 50,
|
|
77
|
+
KEY_3 = 51,
|
|
78
|
+
KEY_4 = 52,
|
|
79
|
+
KEY_5 = 53,
|
|
80
|
+
KEY_6 = 54,
|
|
81
|
+
KEY_7 = 55,
|
|
82
|
+
KEY_8 = 56,
|
|
83
|
+
KEY_9 = 57,
|
|
84
|
+
KEY_A = 65,
|
|
85
|
+
KEY_B = 66,
|
|
86
|
+
KEY_C = 67,
|
|
87
|
+
KEY_D = 68,
|
|
88
|
+
KEY_E = 69,
|
|
89
|
+
KEY_F = 70,
|
|
90
|
+
KEY_G = 71,
|
|
91
|
+
KEY_H = 72,
|
|
92
|
+
KEY_I = 73,
|
|
93
|
+
KEY_J = 74,
|
|
94
|
+
KEY_K = 75,
|
|
95
|
+
KEY_L = 76,
|
|
96
|
+
KEY_M = 77,
|
|
97
|
+
KEY_N = 78,
|
|
98
|
+
KEY_O = 79,
|
|
99
|
+
KEY_P = 80,
|
|
100
|
+
KEY_Q = 81,
|
|
101
|
+
KEY_R = 82,
|
|
102
|
+
KEY_S = 83,
|
|
103
|
+
KEY_T = 84,
|
|
104
|
+
KEY_U = 85,
|
|
105
|
+
KEY_V = 86,
|
|
106
|
+
KEY_W = 87,
|
|
107
|
+
KEY_X = 88,
|
|
108
|
+
KEY_Y = 89,
|
|
109
|
+
KEY_Z = 90,
|
|
110
|
+
LEFT_META = 91,
|
|
111
|
+
RIGHT_META = 92,
|
|
112
|
+
SELECT = 93,
|
|
113
|
+
NUMPAD_0 = 96,
|
|
114
|
+
NUMPAD_1 = 97,
|
|
115
|
+
NUMPAD_2 = 98,
|
|
116
|
+
NUMPAD_3 = 99,
|
|
117
|
+
NUMPAD_4 = 100,
|
|
118
|
+
NUMPAD_5 = 101,
|
|
119
|
+
NUMPAD_6 = 102,
|
|
120
|
+
NUMPAD_7 = 103,
|
|
121
|
+
NUMPAD_8 = 104,
|
|
122
|
+
NUMPAD_9 = 105,
|
|
123
|
+
MULTIPLY = 106,
|
|
124
|
+
ADD = 107,
|
|
125
|
+
SUBTRACT = 109,
|
|
126
|
+
DECIMAL = 110,
|
|
127
|
+
DIVIDE = 111,
|
|
128
|
+
F1 = 112,
|
|
129
|
+
F2 = 113,
|
|
130
|
+
F3 = 114,
|
|
131
|
+
F4 = 115,
|
|
132
|
+
F5 = 116,
|
|
133
|
+
F6 = 117,
|
|
134
|
+
F7 = 118,
|
|
135
|
+
F8 = 119,
|
|
136
|
+
F9 = 120,
|
|
137
|
+
F10 = 121,
|
|
138
|
+
F11 = 122,
|
|
139
|
+
F12 = 123,
|
|
140
|
+
NUM_LOCK = 144,
|
|
141
|
+
SCROLL_LOCK = 145,
|
|
142
|
+
SEMICOLON = 186,
|
|
143
|
+
EQUALS = 187,
|
|
144
|
+
COMMA = 188,
|
|
145
|
+
DASH = 189,
|
|
146
|
+
PERIOD = 190,
|
|
147
|
+
FORWARD_SLASH = 191,
|
|
148
|
+
GRAVE_ACCENT = 192,
|
|
149
|
+
OPEN_BRACKET = 219,
|
|
150
|
+
BACK_SLASH = 220,
|
|
151
|
+
CLOSE_BRACKET = 221,
|
|
152
|
+
SINGLE_QUOTE = 222
|
|
153
|
+
}
|
|
154
|
+
|
|
53
155
|
declare const loremer: {
|
|
54
156
|
word: ({ trueSingleWord, minLength, maxLength, matchRegex, }?: {
|
|
55
157
|
trueSingleWord?: boolean | undefined;
|
|
@@ -321,4 +423,4 @@ declare function usernameValidator(s: string): {
|
|
|
321
423
|
detailedErrorMsg: string;
|
|
322
424
|
};
|
|
323
425
|
|
|
324
|
-
export { type Maybe, NULL_VALUE, Route, areTimeAgosEqual, compareArray, convertToSqlWithNewColNames, convertToSqlWithNewCols, convertToSqlWithNewCondition, convertToSqlWithOrderBy, convertToUTCDate, dedupe, emailValidator, enumKeys, excerpt, fakeEscapePress, formatNumber, formatToRoundedUsd, formatToUsd, getColumns, getDateMinusHours, getDateString, getDisplayValue, getDisplayValueForApi, getLongDateTimeString, getNow, getTableName, getTimeAgoString, getTimeWithSeconds, getUTCDateAndTimeString, getUTCDateString, getUTCNowDateString, getUTCTimeString, initialUppercase, isMultipleQueries, isMutation, isNullValue, loremer, makeQueryExecutable, nTimes, nTimesWithIndex, oneHour, parseSelectQuery, pluralize, prettyJSON, prettyJSONText, queryHasOrderBy, randomArrayItem, randomNum, removeColumnFromQuery, requireTableNameForSelect, safeJSONParse, tuplify, usernameValidator };
|
|
426
|
+
export { KeyCodes, type Maybe, NULL_VALUE, Route, areTimeAgosEqual, compareArray, convertToSqlWithNewColNames, convertToSqlWithNewCols, convertToSqlWithNewCondition, convertToSqlWithOrderBy, convertToUTCDate, dedupe, emailValidator, enumKeys, excerpt, fakeEscapePress, formatNumber, formatToRoundedUsd, formatToUsd, getColumns, getDateMinusHours, getDateString, getDisplayValue, getDisplayValueForApi, getLongDateTimeString, getNow, getTableName, getTimeAgoString, getTimeWithSeconds, getUTCDateAndTimeString, getUTCDateString, getUTCNowDateString, getUTCTimeString, initialUppercase, isMultipleQueries, isMutation, isNullValue, loremer, makeQueryExecutable, nTimes, nTimesWithIndex, oneHour, parseSelectQuery, pluralize, prettyJSON, prettyJSONText, queryHasOrderBy, randomArrayItem, randomNum, removeColumnFromQuery, requireTableNameForSelect, safeJSONParse, tuplify, usernameValidator };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@dolthub/web-utils",
|
|
3
3
|
"author": "DoltHub",
|
|
4
4
|
"description": "A collection of utilities for building web applications",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.4",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"packageManager": "yarn@4.0.2",
|
|
18
18
|
"scripts": {
|
|
19
|
+
"clean": "rm -rf dist && rm -rf .rollup.cache && rm -rf types && rm -rf tsconfig.tsbuildinfo && rm -rf .eslintcache",
|
|
19
20
|
"compile": "tsc -b",
|
|
20
21
|
"build": "rollup -c --bundleConfigAsCjs",
|
|
21
22
|
"dbuild": "yarn compile && yarn build",
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
"yalc:push": "yarn dbuild && yalc push"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
|
-
"@babel/core": "^7.
|
|
32
|
-
"@babel/preset-env": "^7.
|
|
32
|
+
"@babel/core": "^7.24.0",
|
|
33
|
+
"@babel/preset-env": "^7.24.0",
|
|
33
34
|
"@babel/preset-typescript": "^7.23.3",
|
|
34
35
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
35
36
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
@@ -37,13 +38,13 @@
|
|
|
37
38
|
"@types/eslint": "^8",
|
|
38
39
|
"@types/jest": "^29.5.11",
|
|
39
40
|
"@types/rollup-plugin-peer-deps-external": "^2",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
41
|
-
"@typescript-eslint/parser": "^6.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
42
|
+
"@typescript-eslint/parser": "^6.20.0",
|
|
42
43
|
"babel-jest": "^29.7.0",
|
|
43
|
-
"eslint": "^8.
|
|
44
|
+
"eslint": "^8.57.0",
|
|
44
45
|
"jest": "^29.7.0",
|
|
45
|
-
"prettier": "^3.
|
|
46
|
-
"rollup": "^4.
|
|
46
|
+
"prettier": "^3.2.4",
|
|
47
|
+
"rollup": "^4.12.0",
|
|
47
48
|
"rollup-plugin-dts": "^6.1.0",
|
|
48
49
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
49
50
|
"rollup-plugin-terser": "^7.0.2",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"url": "https://github.com/dolthub/react-library/issues"
|
|
59
60
|
},
|
|
60
61
|
"dependencies": {
|
|
61
|
-
"node-sql-parser": "^4.
|
|
62
|
+
"node-sql-parser": "^4.18.0",
|
|
62
63
|
"timeago.js": "^4.0.2"
|
|
63
64
|
}
|
|
64
65
|
}
|