@etsoo/appscript 1.4.91 → 1.4.93
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.
|
@@ -3,30 +3,30 @@ import { CustomFieldData } from './CustomFieldData';
|
|
|
3
3
|
* Custom field reference
|
|
4
4
|
* 自定义字段引用
|
|
5
5
|
*/
|
|
6
|
-
export type CustomFieldRef = {
|
|
6
|
+
export type CustomFieldRef<V> = {
|
|
7
7
|
/**
|
|
8
8
|
* Get value
|
|
9
9
|
*/
|
|
10
|
-
getValue():
|
|
10
|
+
getValue(): V | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Set value
|
|
13
13
|
* @param value Value
|
|
14
14
|
*/
|
|
15
|
-
setValue(value:
|
|
15
|
+
setValue(value: V | undefined): void;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* Custom field props
|
|
19
19
|
* 自定义字段属性
|
|
20
20
|
*/
|
|
21
|
-
export type CustomFieldProps<D extends CustomFieldData> = {
|
|
21
|
+
export type CustomFieldProps<D extends CustomFieldData, V> = {
|
|
22
22
|
field: D;
|
|
23
|
-
onChange: (name: string, value:
|
|
24
|
-
defaultValue?:
|
|
23
|
+
onChange: (name: string, value: V | undefined) => void;
|
|
24
|
+
defaultValue?: V;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* Custom field interface
|
|
28
28
|
* 自定义字段接口
|
|
29
29
|
*/
|
|
30
|
-
export interface ICustomField<D extends CustomFieldData, R> {
|
|
31
|
-
(props:
|
|
30
|
+
export interface ICustomField<V, D extends CustomFieldData, P extends CustomFieldProps<D, V>, R> {
|
|
31
|
+
(props: P): R;
|
|
32
32
|
}
|
|
@@ -3,30 +3,30 @@ import { CustomFieldData } from './CustomFieldData';
|
|
|
3
3
|
* Custom field reference
|
|
4
4
|
* 自定义字段引用
|
|
5
5
|
*/
|
|
6
|
-
export type CustomFieldRef = {
|
|
6
|
+
export type CustomFieldRef<V> = {
|
|
7
7
|
/**
|
|
8
8
|
* Get value
|
|
9
9
|
*/
|
|
10
|
-
getValue():
|
|
10
|
+
getValue(): V | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Set value
|
|
13
13
|
* @param value Value
|
|
14
14
|
*/
|
|
15
|
-
setValue(value:
|
|
15
|
+
setValue(value: V | undefined): void;
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
18
|
* Custom field props
|
|
19
19
|
* 自定义字段属性
|
|
20
20
|
*/
|
|
21
|
-
export type CustomFieldProps<D extends CustomFieldData> = {
|
|
21
|
+
export type CustomFieldProps<D extends CustomFieldData, V> = {
|
|
22
22
|
field: D;
|
|
23
|
-
onChange: (name: string, value:
|
|
24
|
-
defaultValue?:
|
|
23
|
+
onChange: (name: string, value: V | undefined) => void;
|
|
24
|
+
defaultValue?: V;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* Custom field interface
|
|
28
28
|
* 自定义字段接口
|
|
29
29
|
*/
|
|
30
|
-
export interface ICustomField<D extends CustomFieldData, R> {
|
|
31
|
-
(props:
|
|
30
|
+
export interface ICustomField<V, D extends CustomFieldData, P extends CustomFieldProps<D, V>, R> {
|
|
31
|
+
(props: P): R;
|
|
32
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.93",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"crypto-js": "^4.2.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@babel/cli": "^7.24.
|
|
62
|
-
"@babel/core": "^7.24.
|
|
63
|
-
"@babel/plugin-transform-runtime": "^7.24.
|
|
64
|
-
"@babel/preset-env": "^7.24.
|
|
65
|
-
"@babel/runtime-corejs3": "^7.24.
|
|
61
|
+
"@babel/cli": "^7.24.6",
|
|
62
|
+
"@babel/core": "^7.24.6",
|
|
63
|
+
"@babel/plugin-transform-runtime": "^7.24.6",
|
|
64
|
+
"@babel/preset-env": "^7.24.6",
|
|
65
|
+
"@babel/runtime-corejs3": "^7.24.6",
|
|
66
66
|
"@types/crypto-js": "^4.2.2",
|
|
67
67
|
"@types/jest": "^29.5.12",
|
|
68
68
|
"jest": "^29.7.0",
|
|
@@ -4,33 +4,38 @@ import { CustomFieldData } from './CustomFieldData';
|
|
|
4
4
|
* Custom field reference
|
|
5
5
|
* 自定义字段引用
|
|
6
6
|
*/
|
|
7
|
-
export type CustomFieldRef = {
|
|
7
|
+
export type CustomFieldRef<V> = {
|
|
8
8
|
/**
|
|
9
9
|
* Get value
|
|
10
10
|
*/
|
|
11
|
-
getValue():
|
|
11
|
+
getValue(): V | undefined;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Set value
|
|
15
15
|
* @param value Value
|
|
16
16
|
*/
|
|
17
|
-
setValue(value:
|
|
17
|
+
setValue(value: V | undefined): void;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Custom field props
|
|
22
22
|
* 自定义字段属性
|
|
23
23
|
*/
|
|
24
|
-
export type CustomFieldProps<D extends CustomFieldData> = {
|
|
24
|
+
export type CustomFieldProps<D extends CustomFieldData, V> = {
|
|
25
25
|
field: D;
|
|
26
|
-
onChange: (name: string, value:
|
|
27
|
-
defaultValue?:
|
|
26
|
+
onChange: (name: string, value: V | undefined) => void;
|
|
27
|
+
defaultValue?: V;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Custom field interface
|
|
32
32
|
* 自定义字段接口
|
|
33
33
|
*/
|
|
34
|
-
export interface ICustomField<
|
|
35
|
-
|
|
34
|
+
export interface ICustomField<
|
|
35
|
+
V,
|
|
36
|
+
D extends CustomFieldData,
|
|
37
|
+
P extends CustomFieldProps<D, V>,
|
|
38
|
+
R
|
|
39
|
+
> {
|
|
40
|
+
(props: P): R;
|
|
36
41
|
}
|