@etsoo/appscript 1.4.92 → 1.4.94

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.
@@ -7,12 +7,14 @@ export type CustomFieldRef<V> = {
7
7
  /**
8
8
  * Get value
9
9
  */
10
- getValue(): V;
10
+ getValue(): V | undefined;
11
11
  /**
12
12
  * Set value
13
+ * Its type is 'unknown' because the 'type' configuration of the CustomField may be changed
14
+ * First time editing with the new 'type' may break the component
13
15
  * @param value Value
14
16
  */
15
- setValue(value: V): void;
17
+ setValue(value: unknown): void;
16
18
  };
17
19
  /**
18
20
  * Custom field props
@@ -20,7 +22,7 @@ export type CustomFieldRef<V> = {
20
22
  */
21
23
  export type CustomFieldProps<D extends CustomFieldData, V> = {
22
24
  field: D;
23
- onChange: (name: string, value: V) => void;
25
+ onChange: (name: string, value: V | undefined) => void;
24
26
  defaultValue?: V;
25
27
  };
26
28
  /**
@@ -7,12 +7,14 @@ export type CustomFieldRef<V> = {
7
7
  /**
8
8
  * Get value
9
9
  */
10
- getValue(): V;
10
+ getValue(): V | undefined;
11
11
  /**
12
12
  * Set value
13
+ * Its type is 'unknown' because the 'type' configuration of the CustomField may be changed
14
+ * First time editing with the new 'type' may break the component
13
15
  * @param value Value
14
16
  */
15
- setValue(value: V): void;
17
+ setValue(value: unknown): void;
16
18
  };
17
19
  /**
18
20
  * Custom field props
@@ -20,7 +22,7 @@ export type CustomFieldRef<V> = {
20
22
  */
21
23
  export type CustomFieldProps<D extends CustomFieldData, V> = {
22
24
  field: D;
23
- onChange: (name: string, value: V) => void;
25
+ onChange: (name: string, value: V | undefined) => void;
24
26
  defaultValue?: V;
25
27
  };
26
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.92",
3
+ "version": "1.4.94",
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.5",
62
- "@babel/core": "^7.24.5",
63
- "@babel/plugin-transform-runtime": "^7.24.3",
64
- "@babel/preset-env": "^7.24.5",
65
- "@babel/runtime-corejs3": "^7.24.5",
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",
@@ -8,13 +8,15 @@ export type CustomFieldRef<V> = {
8
8
  /**
9
9
  * Get value
10
10
  */
11
- getValue(): V;
11
+ getValue(): V | undefined;
12
12
 
13
13
  /**
14
14
  * Set value
15
+ * Its type is 'unknown' because the 'type' configuration of the CustomField may be changed
16
+ * First time editing with the new 'type' may break the component
15
17
  * @param value Value
16
18
  */
17
- setValue(value: V): void;
19
+ setValue(value: unknown): void;
18
20
  };
19
21
 
20
22
  /**
@@ -23,7 +25,7 @@ export type CustomFieldRef<V> = {
23
25
  */
24
26
  export type CustomFieldProps<D extends CustomFieldData, V> = {
25
27
  field: D;
26
- onChange: (name: string, value: V) => void;
28
+ onChange: (name: string, value: V | undefined) => void;
27
29
  defaultValue?: V;
28
30
  };
29
31