@etsoo/materialui 1.1.29 → 1.1.30
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/lib/CountdownButton.d.ts +1 -1
- package/lib/InputField.d.ts +4 -4
- package/lib/TextFieldEx.d.ts +4 -4
- package/lib/Tiplist.js +13 -7
- package/package.json +7 -7
- package/src/Tiplist.tsx +12 -7
package/lib/CountdownButton.d.ts
CHANGED
|
@@ -20,4 +20,4 @@ export type CountdownButtonProps = Omit<ButtonProps, 'endIcon' | 'disabled'> & {
|
|
|
20
20
|
* @param props Props
|
|
21
21
|
* @returns Button
|
|
22
22
|
*/
|
|
23
|
-
export declare const CountdownButton: React.ForwardRefExoticComponent<
|
|
23
|
+
export declare const CountdownButton: React.ForwardRefExoticComponent<Omit<CountdownButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
package/lib/InputField.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type InputFieldProps = TextFieldProps & {
|
|
|
18
18
|
* @param props Props
|
|
19
19
|
* @returns Component
|
|
20
20
|
*/
|
|
21
|
-
export declare const InputField: React.ForwardRefExoticComponent<(
|
|
21
|
+
export declare const InputField: React.ForwardRefExoticComponent<(Omit<import("@mui/material").StandardTextFieldProps & {
|
|
22
22
|
/**
|
|
23
23
|
* Change delay (ms) to avoid repeatly dispatch onChange
|
|
24
24
|
*/
|
|
@@ -27,7 +27,7 @@ export declare const InputField: React.ForwardRefExoticComponent<(Pick<import("@
|
|
|
27
27
|
* Is the field read only?
|
|
28
28
|
*/
|
|
29
29
|
readOnly?: boolean | undefined;
|
|
30
|
-
}, "
|
|
30
|
+
}, "ref"> | Omit<import("@mui/material").FilledTextFieldProps & {
|
|
31
31
|
/**
|
|
32
32
|
* Change delay (ms) to avoid repeatly dispatch onChange
|
|
33
33
|
*/
|
|
@@ -36,7 +36,7 @@ export declare const InputField: React.ForwardRefExoticComponent<(Pick<import("@
|
|
|
36
36
|
* Is the field read only?
|
|
37
37
|
*/
|
|
38
38
|
readOnly?: boolean | undefined;
|
|
39
|
-
}, "
|
|
39
|
+
}, "ref"> | Omit<import("@mui/material").OutlinedTextFieldProps & {
|
|
40
40
|
/**
|
|
41
41
|
* Change delay (ms) to avoid repeatly dispatch onChange
|
|
42
42
|
*/
|
|
@@ -45,4 +45,4 @@ export declare const InputField: React.ForwardRefExoticComponent<(Pick<import("@
|
|
|
45
45
|
* Is the field read only?
|
|
46
46
|
*/
|
|
47
47
|
readOnly?: boolean | undefined;
|
|
48
|
-
}, "
|
|
48
|
+
}, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
package/lib/TextFieldEx.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface TextFieldExMethods {
|
|
|
41
41
|
*/
|
|
42
42
|
setError(error: React.ReactNode): void;
|
|
43
43
|
}
|
|
44
|
-
export declare const TextFieldEx: React.ForwardRefExoticComponent<(
|
|
44
|
+
export declare const TextFieldEx: React.ForwardRefExoticComponent<(Omit<import("@mui/material").StandardTextFieldProps & {
|
|
45
45
|
/**
|
|
46
46
|
* Change delay (ms) to avoid repeatly dispatch onChange
|
|
47
47
|
*/
|
|
@@ -68,7 +68,7 @@ export declare const TextFieldEx: React.ForwardRefExoticComponent<(Pick<import("
|
|
|
68
68
|
* Show password button
|
|
69
69
|
*/
|
|
70
70
|
showPassword?: boolean | undefined;
|
|
71
|
-
}, "
|
|
71
|
+
}, "ref"> | Omit<import("@mui/material").FilledTextFieldProps & {
|
|
72
72
|
/**
|
|
73
73
|
* Change delay (ms) to avoid repeatly dispatch onChange
|
|
74
74
|
*/
|
|
@@ -95,7 +95,7 @@ export declare const TextFieldEx: React.ForwardRefExoticComponent<(Pick<import("
|
|
|
95
95
|
* Show password button
|
|
96
96
|
*/
|
|
97
97
|
showPassword?: boolean | undefined;
|
|
98
|
-
}, "
|
|
98
|
+
}, "ref"> | Omit<import("@mui/material").OutlinedTextFieldProps & {
|
|
99
99
|
/**
|
|
100
100
|
* Change delay (ms) to avoid repeatly dispatch onChange
|
|
101
101
|
*/
|
|
@@ -122,4 +122,4 @@ export declare const TextFieldEx: React.ForwardRefExoticComponent<(Pick<import("
|
|
|
122
122
|
* Show password button
|
|
123
123
|
*/
|
|
124
124
|
showPassword?: boolean | undefined;
|
|
125
|
-
}, "
|
|
125
|
+
}, "ref">) & React.RefAttributes<TextFieldExMethods>>;
|
package/lib/Tiplist.js
CHANGED
|
@@ -163,12 +163,18 @@ export function Tiplist(props) {
|
|
|
163
163
|
var _a;
|
|
164
164
|
if (item[idField] === "n/a")
|
|
165
165
|
return ((_a = labels.more) !== null && _a !== void 0 ? _a : "More") + "...";
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
try {
|
|
167
|
+
return getOptionLabel
|
|
168
|
+
? getOptionLabel(item)
|
|
169
|
+
: "label" in item
|
|
170
|
+
? `${item.label}`
|
|
171
|
+
: "name" in item
|
|
172
|
+
? `${item.name}`
|
|
173
|
+
: `${item}`;
|
|
174
|
+
}
|
|
175
|
+
catch (e) {
|
|
176
|
+
console.log(typeof item, item, e);
|
|
177
|
+
return "";
|
|
178
|
+
}
|
|
173
179
|
}, ...rest })));
|
|
174
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.30",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"@emotion/css": "^11.10.5",
|
|
51
51
|
"@emotion/react": "^11.10.5",
|
|
52
52
|
"@emotion/styled": "^11.10.5",
|
|
53
|
-
"@etsoo/appscript": "^1.3.
|
|
53
|
+
"@etsoo/appscript": "^1.3.63",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.23",
|
|
55
|
-
"@etsoo/react": "^1.6.
|
|
55
|
+
"@etsoo/react": "^1.6.47",
|
|
56
56
|
"@etsoo/shared": "^1.1.88",
|
|
57
57
|
"@mui/icons-material": "^5.11.0",
|
|
58
|
-
"@mui/material": "^5.11.
|
|
58
|
+
"@mui/material": "^5.11.8",
|
|
59
59
|
"@types/pica": "^9.0.1",
|
|
60
60
|
"@types/pulltorefreshjs": "^0.1.5",
|
|
61
|
-
"@types/react": "^18.0.
|
|
61
|
+
"@types/react": "^18.0.28",
|
|
62
62
|
"@types/react-avatar-editor": "^13.0.0",
|
|
63
63
|
"@types/react-dom": "^18.0.10",
|
|
64
64
|
"@types/react-input-mask": "^3.0.2",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"@types/jest": "^29.4.0",
|
|
87
87
|
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
|
88
88
|
"@typescript-eslint/parser": "^5.51.0",
|
|
89
|
-
"jest": "^29.4.
|
|
90
|
-
"jest-environment-jsdom": "^29.4.
|
|
89
|
+
"jest": "^29.4.2",
|
|
90
|
+
"jest-environment-jsdom": "^29.4.2",
|
|
91
91
|
"typescript": "^4.9.5"
|
|
92
92
|
}
|
|
93
93
|
}
|
package/src/Tiplist.tsx
CHANGED
|
@@ -318,13 +318,18 @@ export function Tiplist<
|
|
|
318
318
|
}}
|
|
319
319
|
getOptionLabel={(item) => {
|
|
320
320
|
if (item[idField] === "n/a") return (labels.more ?? "More") + "...";
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
321
|
+
try {
|
|
322
|
+
return getOptionLabel
|
|
323
|
+
? getOptionLabel(item)
|
|
324
|
+
: "label" in item
|
|
325
|
+
? `${item.label}`
|
|
326
|
+
: "name" in item
|
|
327
|
+
? `${item.name}`
|
|
328
|
+
: `${item}`;
|
|
329
|
+
} catch (e) {
|
|
330
|
+
console.log(typeof item, item, e);
|
|
331
|
+
return "";
|
|
332
|
+
}
|
|
328
333
|
}}
|
|
329
334
|
{...rest}
|
|
330
335
|
/>
|