@fugood/bricks-project 2.21.0-beta.18-1 → 2.21.0-beta.19

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.0-beta.18-1",
3
+ "version": "2.21.0-beta.19",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
@@ -12,5 +12,6 @@
12
12
  "escodegen": "^2.1.0",
13
13
  "lodash": "^4.17.4",
14
14
  "uuid": "^8.3.1"
15
- }
15
+ },
16
+ "gitHead": "0d8535614551b74553cb3d09801dbfe1c14a78fc"
16
17
  }
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
- override?: {
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 => {