@fugood/bricks-project 2.21.0-beta.18-1 → 2.21.0-beta.18-2
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/package.json +1 -1
- package/types/canvas.ts +1 -1
- package/types/switch.ts +16 -13
- package/utils/data.ts +9 -0
package/package.json
CHANGED
package/types/canvas.ts
CHANGED
|
@@ -13,7 +13,7 @@ interface CanvasDef {
|
|
|
13
13
|
/* The showing timeout of Canvas, need to set `Next Canvas ID` as well */
|
|
14
14
|
showingTimeout?: number | DataLink
|
|
15
15
|
/* Canvas ID for change next canvas on showing timeout */
|
|
16
|
-
nextCanvasId?: string | DataLink
|
|
16
|
+
nextCanvasId?: string | DataLink | (() => Canvas)
|
|
17
17
|
/* Canvas's background color */
|
|
18
18
|
backgroundColor?: string | DataLink
|
|
19
19
|
/* Dismiss keyboard on press */
|
package/types/switch.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Canvas } from './canvas'
|
|
2
2
|
import type { Data } from './data'
|
|
3
|
+
|
|
3
4
|
export type SwitchCondInnerStateCurrentCanvas = {
|
|
4
5
|
__typename: 'SwitchCondInnerStateCurrentCanvas'
|
|
5
6
|
value: () => Canvas
|
|
@@ -21,19 +22,7 @@ export interface SwitchDef {
|
|
|
21
22
|
id: string
|
|
22
23
|
title?: string
|
|
23
24
|
description?: string
|
|
24
|
-
|
|
25
|
-
animation?: boolean
|
|
26
|
-
event?: boolean
|
|
27
|
-
property?: boolean
|
|
28
|
-
outlet?: boolean
|
|
29
|
-
}
|
|
30
|
-
disabled?: boolean
|
|
31
|
-
break?: boolean
|
|
32
|
-
// Default property, events, outlets, animation, conds
|
|
33
|
-
property?: {}
|
|
34
|
-
events?: {}
|
|
35
|
-
outlets?: {}
|
|
36
|
-
animation?: {}
|
|
25
|
+
// Default conditions
|
|
37
26
|
conds?: Array<{
|
|
38
27
|
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
39
28
|
cond:
|
|
@@ -45,4 +34,18 @@ export interface SwitchDef {
|
|
|
45
34
|
value: any
|
|
46
35
|
}
|
|
47
36
|
}>
|
|
37
|
+
// Default property, events, outlets, animation
|
|
38
|
+
property?: {}
|
|
39
|
+
events?: {}
|
|
40
|
+
outlets?: {}
|
|
41
|
+
animation?: {}
|
|
42
|
+
// Override the default items and hitted switch items before the switch
|
|
43
|
+
override?: {
|
|
44
|
+
animation?: boolean
|
|
45
|
+
event?: boolean
|
|
46
|
+
property?: boolean
|
|
47
|
+
outlet?: boolean
|
|
48
|
+
}
|
|
49
|
+
disabled?: boolean
|
|
50
|
+
break?: boolean
|
|
48
51
|
}
|
package/utils/data.ts
CHANGED
|
@@ -72,6 +72,7 @@ type SystemDataName =
|
|
|
72
72
|
| 'isSupportAuthInDevice'
|
|
73
73
|
| 'env'
|
|
74
74
|
| 'isViewDebugModeEnabled'
|
|
75
|
+
| 'language'
|
|
75
76
|
|
|
76
77
|
type SystemDataInfo = {
|
|
77
78
|
name: SystemDataName
|
|
@@ -405,6 +406,14 @@ export const systemDataList: Array<SystemDataInfo> = [
|
|
|
405
406
|
type: 'bool',
|
|
406
407
|
value: false,
|
|
407
408
|
},
|
|
409
|
+
{
|
|
410
|
+
name: 'language',
|
|
411
|
+
id: 'PROPERTY_BANK_DATA_NODE_f0ed0a03-6195-459f-9ffe-bca61923f94e',
|
|
412
|
+
title: 'SYSTEM: Language',
|
|
413
|
+
description: 'Language of the device',
|
|
414
|
+
type: 'string',
|
|
415
|
+
value: '',
|
|
416
|
+
},
|
|
408
417
|
]
|
|
409
418
|
|
|
410
419
|
export const useSystemData = (name: SystemDataName): Data => {
|