@fugood/bricks-project 2.22.0-beta.27 → 2.22.0-beta.28
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 +2 -2
- package/types/animation.ts +1 -0
- package/types/brick-base.ts +77 -0
- package/types/bricks/3DViewer.ts +200 -0
- package/types/bricks/Camera.ts +195 -0
- package/types/bricks/Chart.ts +362 -0
- package/types/bricks/GenerativeMedia.ts +237 -0
- package/types/bricks/Icon.ts +90 -0
- package/types/bricks/Image.ts +101 -0
- package/types/bricks/Items.ts +461 -0
- package/types/bricks/Lottie.ts +156 -0
- package/types/bricks/Qrcode.ts +109 -0
- package/types/bricks/Rect.ts +107 -0
- package/types/bricks/RichText.ts +120 -0
- package/types/bricks/Rive.ts +209 -0
- package/types/bricks/Slideshow.ts +155 -0
- package/types/bricks/Svg.ts +91 -0
- package/types/bricks/Text.ts +140 -0
- package/types/bricks/TextInput.ts +231 -0
- package/types/bricks/Video.ts +167 -0
- package/types/bricks/VideoStreaming.ts +104 -0
- package/types/bricks/WebRTCStream.ts +60 -0
- package/types/bricks/WebView.ts +157 -0
- package/types/bricks/index.ts +20 -0
- package/types/generators/AlarmClock.ts +102 -0
- package/types/generators/Assistant.ts +546 -0
- package/types/generators/BleCentral.ts +225 -0
- package/types/generators/BlePeripheral.ts +202 -0
- package/types/generators/CanvasMap.ts +57 -0
- package/types/generators/CastlesPay.ts +77 -0
- package/types/generators/DataBank.ts +123 -0
- package/types/generators/File.ts +351 -0
- package/types/generators/GraphQL.ts +124 -0
- package/types/generators/HTTP.ts +117 -0
- package/types/generators/HTTPServer.ts +156 -0
- package/types/generators/Information.ts +97 -0
- package/types/generators/Intent.ts +107 -0
- package/types/generators/Iterator.ts +95 -0
- package/types/generators/Keyboard.ts +85 -0
- package/types/generators/LlmAnthropicCompat.ts +188 -0
- package/types/generators/LlmGgml.ts +719 -0
- package/types/generators/LlmOnnx.ts +184 -0
- package/types/generators/LlmOpenAiCompat.ts +206 -0
- package/types/generators/LlmQualcommAiEngine.ts +213 -0
- package/types/generators/MCP.ts +294 -0
- package/types/generators/MCPServer.ts +245 -0
- package/types/generators/MQTTBroker.ts +121 -0
- package/types/generators/MediaFlow.ts +142 -0
- package/types/generators/MqttClient.ts +129 -0
- package/types/generators/Question.ts +395 -0
- package/types/generators/RealtimeTranscription.ts +172 -0
- package/types/generators/RerankerGgml.ts +153 -0
- package/types/generators/SerialPort.ts +141 -0
- package/types/generators/SoundPlayer.ts +86 -0
- package/types/generators/SoundRecorder.ts +113 -0
- package/types/generators/SpeechToTextGgml.ts +462 -0
- package/types/generators/SpeechToTextOnnx.ts +227 -0
- package/types/generators/SpeechToTextPlatform.ts +75 -0
- package/types/generators/Sqlite.ts +118 -0
- package/types/generators/Step.ts +101 -0
- package/types/generators/TCP.ts +120 -0
- package/types/generators/TCPServer.ts +137 -0
- package/types/generators/TapToPayOnIPhone.ts +175 -0
- package/types/generators/TextToSpeechGgml.ts +182 -0
- package/types/generators/TextToSpeechOnnx.ts +169 -0
- package/types/generators/TextToSpeechOpenAiLike.ts +113 -0
- package/types/generators/ThermalPrinter.ts +185 -0
- package/types/generators/Tick.ts +75 -0
- package/types/generators/UDP.ts +109 -0
- package/types/generators/VadGgml.ts +211 -0
- package/types/generators/VectorStore.ts +223 -0
- package/types/generators/Watchdog.ts +96 -0
- package/types/generators/WebCrawler.ts +97 -0
- package/types/generators/WebRTC.ts +165 -0
- package/types/generators/WebSocket.ts +142 -0
- package/types/generators/index.ts +51 -0
- package/types/bricks.ts +0 -3269
- package/types/generators.ts +0 -8632
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
2
|
+
import type { Data, DataLink } from '../data'
|
|
3
|
+
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
4
|
+
import type {
|
|
5
|
+
Brick,
|
|
6
|
+
EventAction,
|
|
7
|
+
EventActionForItem,
|
|
8
|
+
ActionWithDataParams,
|
|
9
|
+
ActionWithParams,
|
|
10
|
+
Action,
|
|
11
|
+
EventProperty,
|
|
12
|
+
} from '../common'
|
|
13
|
+
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
14
|
+
|
|
15
|
+
interface BrickImageDef {
|
|
16
|
+
/*
|
|
17
|
+
Default property:
|
|
18
|
+
{
|
|
19
|
+
"path": "",
|
|
20
|
+
"fadeDuration": 0,
|
|
21
|
+
"blurBackgroundRadius": 8,
|
|
22
|
+
"loadSystemIos": "auto",
|
|
23
|
+
"loadSystemAndroid": "auto"
|
|
24
|
+
}
|
|
25
|
+
*/
|
|
26
|
+
property?: BrickBasicProperty & {
|
|
27
|
+
/* The image resize mode */
|
|
28
|
+
resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat' | DataLink
|
|
29
|
+
/* The image file path (File, URL) */
|
|
30
|
+
path?: string | DataLink
|
|
31
|
+
/* The checksum of file */
|
|
32
|
+
md5?: string | DataLink
|
|
33
|
+
/* The image fade duration */
|
|
34
|
+
fadeDuration?: number | DataLink
|
|
35
|
+
/* The image avatar mode */
|
|
36
|
+
avatar?: boolean | DataLink
|
|
37
|
+
/* The image fixed width with `avatar` */
|
|
38
|
+
width?: number | DataLink
|
|
39
|
+
/* Add blurred image at background if photo is not full */
|
|
40
|
+
enableBlurBackground?: boolean | DataLink
|
|
41
|
+
/* The blur radius of the blur filter added to the image background */
|
|
42
|
+
blurBackgroundRadius?: number | DataLink
|
|
43
|
+
/* [iOS] The use priority of image loading system (Auto: sdwebimage, fallback to default if failed) */
|
|
44
|
+
loadSystemIos?: 'auto' | 'sdwebimage' | 'default' | DataLink
|
|
45
|
+
/* [Android] The use priority of image loading system (Auto: glide, fallback to fresco if failed) */
|
|
46
|
+
loadSystemAndroid?: 'auto' | 'glide' | 'fresco' | DataLink
|
|
47
|
+
}
|
|
48
|
+
events?: BrickBasicEvents & {
|
|
49
|
+
/* Event of the brick press */
|
|
50
|
+
onPress?: Array<EventAction>
|
|
51
|
+
/* Event of the brick press in */
|
|
52
|
+
onPressIn?: Array<EventAction>
|
|
53
|
+
/* Event of the brick press out */
|
|
54
|
+
onPressOut?: Array<EventAction>
|
|
55
|
+
/* Event of the brick focus (Use TV Device with controller) */
|
|
56
|
+
onFocus?: Array<EventAction>
|
|
57
|
+
/* Event of the brick blur (Use TV Device with controller) */
|
|
58
|
+
onBlur?: Array<EventAction>
|
|
59
|
+
/* Event of the image on load */
|
|
60
|
+
onLoad?: Array<EventAction>
|
|
61
|
+
/* Event of the image on error */
|
|
62
|
+
onError?: Array<EventAction>
|
|
63
|
+
}
|
|
64
|
+
outlets?: {
|
|
65
|
+
/* Brick is pressing */
|
|
66
|
+
brickPressing?: () => Data
|
|
67
|
+
/* Brick is focusing (Use TV Device with controller) */
|
|
68
|
+
brickFocusing?: () => Data
|
|
69
|
+
}
|
|
70
|
+
animation?: AnimationBasicEvents & {
|
|
71
|
+
onPress?: Animation
|
|
72
|
+
onPressIn?: Animation
|
|
73
|
+
onPressOut?: Animation
|
|
74
|
+
onFocus?: Animation
|
|
75
|
+
onBlur?: Animation
|
|
76
|
+
onLoad?: Animation
|
|
77
|
+
onError?: Animation
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Image brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378576-image)) */
|
|
82
|
+
export type BrickImage = Brick &
|
|
83
|
+
BrickImageDef & {
|
|
84
|
+
templateKey: 'BRICK_IMAGE'
|
|
85
|
+
switches: Array<
|
|
86
|
+
SwitchDef &
|
|
87
|
+
BrickImageDef & {
|
|
88
|
+
conds?: Array<{
|
|
89
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
90
|
+
cond:
|
|
91
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
92
|
+
| SwitchCondData
|
|
93
|
+
| {
|
|
94
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
95
|
+
outlet: 'brickPressing' | 'brickFocusing'
|
|
96
|
+
value: any
|
|
97
|
+
}
|
|
98
|
+
}>
|
|
99
|
+
}
|
|
100
|
+
>
|
|
101
|
+
}
|
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
2
|
+
import type { Data, DataLink } from '../data'
|
|
3
|
+
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
4
|
+
import type {
|
|
5
|
+
Brick,
|
|
6
|
+
EventAction,
|
|
7
|
+
EventActionForItem,
|
|
8
|
+
ActionWithDataParams,
|
|
9
|
+
ActionWithParams,
|
|
10
|
+
Action,
|
|
11
|
+
EventProperty,
|
|
12
|
+
} from '../common'
|
|
13
|
+
import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
|
|
14
|
+
|
|
15
|
+
/* prev page */
|
|
16
|
+
export type BrickItemsActionPrevPage = Action & {
|
|
17
|
+
__actionName: 'BRICK_ITEMS_PREV_PAGE'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* next page */
|
|
21
|
+
export type BrickItemsActionNextPage = Action & {
|
|
22
|
+
__actionName: 'BRICK_ITEMS_NEXT_PAGE'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* jump page */
|
|
26
|
+
export type BrickItemsActionJumpPage = ActionWithParams & {
|
|
27
|
+
__actionName: 'BRICK_ITEMS_JUMP_PAGE'
|
|
28
|
+
params?: Array<{
|
|
29
|
+
input: 'pageIndex'
|
|
30
|
+
value?: number | DataLink | EventProperty
|
|
31
|
+
mapping?: string
|
|
32
|
+
}>
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* open detail */
|
|
36
|
+
export type BrickItemsActionOpenDetail = ActionWithParams & {
|
|
37
|
+
__actionName: 'BRICK_ITEMS_OPEN_DETAIL'
|
|
38
|
+
params?: Array<{
|
|
39
|
+
input: 'detailIndex'
|
|
40
|
+
value?: number | DataLink | EventProperty
|
|
41
|
+
mapping?: string
|
|
42
|
+
}>
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* back list */
|
|
46
|
+
export type BrickItemsActionBackList = Action & {
|
|
47
|
+
__actionName: 'BRICK_ITEMS_BACK_LIST'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Trigger dynamic animation of item by data id or index */
|
|
51
|
+
export type BrickItemsActionDynamicAnimation = ActionWithParams & {
|
|
52
|
+
__actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION'
|
|
53
|
+
params?: Array<
|
|
54
|
+
| {
|
|
55
|
+
input: 'mode'
|
|
56
|
+
value?: 'list' | 'detail' | DataLink | EventProperty
|
|
57
|
+
mapping?: string
|
|
58
|
+
}
|
|
59
|
+
| {
|
|
60
|
+
input: 'brickId'
|
|
61
|
+
value?: string | DataLink | EventProperty
|
|
62
|
+
mapping?: string
|
|
63
|
+
}
|
|
64
|
+
| {
|
|
65
|
+
input: 'dataId'
|
|
66
|
+
value?: string | DataLink | EventProperty
|
|
67
|
+
mapping?: string
|
|
68
|
+
}
|
|
69
|
+
| {
|
|
70
|
+
input: 'index'
|
|
71
|
+
value?: number | DataLink | EventProperty
|
|
72
|
+
mapping?: string
|
|
73
|
+
}
|
|
74
|
+
| {
|
|
75
|
+
input: 'animationId'
|
|
76
|
+
value?: string | DataLink | (() => Animation) | EventProperty
|
|
77
|
+
mapping?: string
|
|
78
|
+
}
|
|
79
|
+
| {
|
|
80
|
+
input: 'animationType'
|
|
81
|
+
value?: 'once' | 'loop' | DataLink | EventProperty
|
|
82
|
+
mapping?: string
|
|
83
|
+
}
|
|
84
|
+
| {
|
|
85
|
+
input: 'animationResetInitialValue'
|
|
86
|
+
value?: boolean | DataLink | EventProperty
|
|
87
|
+
mapping?: string
|
|
88
|
+
}
|
|
89
|
+
>
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Reset dynamic action of item by data id or index */
|
|
93
|
+
export type BrickItemsActionDynamicAnimationReset = ActionWithParams & {
|
|
94
|
+
__actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION_RESET'
|
|
95
|
+
params?: Array<
|
|
96
|
+
| {
|
|
97
|
+
input: 'mode'
|
|
98
|
+
value?: 'list' | 'detail' | DataLink | EventProperty
|
|
99
|
+
mapping?: string
|
|
100
|
+
}
|
|
101
|
+
| {
|
|
102
|
+
input: 'brickId'
|
|
103
|
+
value?: string | DataLink | EventProperty
|
|
104
|
+
mapping?: string
|
|
105
|
+
}
|
|
106
|
+
| {
|
|
107
|
+
input: 'dataId'
|
|
108
|
+
value?: string | DataLink | EventProperty
|
|
109
|
+
mapping?: string
|
|
110
|
+
}
|
|
111
|
+
| {
|
|
112
|
+
input: 'index'
|
|
113
|
+
value?: number | DataLink | EventProperty
|
|
114
|
+
mapping?: string
|
|
115
|
+
}
|
|
116
|
+
>
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Stop dynamic action of item by data id or index */
|
|
120
|
+
export type BrickItemsActionDynamicAnimationStop = ActionWithParams & {
|
|
121
|
+
__actionName: 'BRICK_ITEMS_DYNAMIC_ANIMATION_STOP'
|
|
122
|
+
params?: Array<
|
|
123
|
+
| {
|
|
124
|
+
input: 'mode'
|
|
125
|
+
value?: 'list' | 'detail' | DataLink | EventProperty
|
|
126
|
+
mapping?: string
|
|
127
|
+
}
|
|
128
|
+
| {
|
|
129
|
+
input: 'brickId'
|
|
130
|
+
value?: string | DataLink | EventProperty
|
|
131
|
+
mapping?: string
|
|
132
|
+
}
|
|
133
|
+
| {
|
|
134
|
+
input: 'dataId'
|
|
135
|
+
value?: string | DataLink | EventProperty
|
|
136
|
+
mapping?: string
|
|
137
|
+
}
|
|
138
|
+
| {
|
|
139
|
+
input: 'index'
|
|
140
|
+
value?: number | DataLink | EventProperty
|
|
141
|
+
mapping?: string
|
|
142
|
+
}
|
|
143
|
+
>
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
interface BrickItemsDef {
|
|
147
|
+
/*
|
|
148
|
+
Default property:
|
|
149
|
+
{
|
|
150
|
+
"mode": "list",
|
|
151
|
+
"items": [],
|
|
152
|
+
"transformScriptEnabled": false,
|
|
153
|
+
"transformScriptCode": "\/\* Global variable: inputs = { items, variables } \*\/\nreturn inputs.items",
|
|
154
|
+
"transformScriptVariables": {},
|
|
155
|
+
"postTransformScriptEnabled": false,
|
|
156
|
+
"postTransformScriptCode": "\/\*\n * Global variable: inputs = {\n * itemsLength, // items data length\n * collections, // [{ index, item, renderList }] (all items data)\n * collectionsCurrentPage, // [{ index, item, renderList }] (current page items data)\n * renderList, // Flattened bricks of current page { frame: { x, y, width, height ... }, ... }\n * variables\n * }\n \*\/\nreturn inputs.renderList",
|
|
157
|
+
"postTransformScriptVariables": {},
|
|
158
|
+
"pageIndex": 0,
|
|
159
|
+
"selectedItemIndex": 0,
|
|
160
|
+
"allowPageOutOfBound": true,
|
|
161
|
+
"standbySequenceInterval": 500,
|
|
162
|
+
"standbySequenceRandom": 0,
|
|
163
|
+
"brickEditWidth": 10,
|
|
164
|
+
"brickEditHeight": 10,
|
|
165
|
+
"detailBrickEditWidth": 50,
|
|
166
|
+
"detailBrickEditHeight": 50,
|
|
167
|
+
"orderMode": "horizontal",
|
|
168
|
+
"resizeMode": "auto",
|
|
169
|
+
"justifyContent": "start",
|
|
170
|
+
"alignContent": "stretch",
|
|
171
|
+
"detailResizeMode": "auto",
|
|
172
|
+
"detailJustifyContent": "start",
|
|
173
|
+
"detailAlignContent": "stretch"
|
|
174
|
+
}
|
|
175
|
+
*/
|
|
176
|
+
property?: BrickBasicProperty & {
|
|
177
|
+
/* Set current display to `list` or `detail` mode */
|
|
178
|
+
mode?: 'list' | 'detail' | DataLink
|
|
179
|
+
/* Items to generate bricks for rendering */
|
|
180
|
+
items?: Array<any> | DataLink
|
|
181
|
+
/* Enable Transform Script */
|
|
182
|
+
transformScriptEnabled?: boolean | DataLink
|
|
183
|
+
/* Code of Transform Script */
|
|
184
|
+
transformScriptCode?: string | DataLink
|
|
185
|
+
/* Variables used in Transform Script (object) */
|
|
186
|
+
transformScriptVariables?: {} | DataLink
|
|
187
|
+
/* Enable Post Transform Script */
|
|
188
|
+
postTransformScriptEnabled?: boolean | DataLink
|
|
189
|
+
/* Code of Post Transform Script */
|
|
190
|
+
postTransformScriptCode?: string | DataLink
|
|
191
|
+
/* Variables used in Post Transform Script (object) */
|
|
192
|
+
postTransformScriptVariables?: {} | DataLink
|
|
193
|
+
/* Path to get item property for generate brick id instead of use index */
|
|
194
|
+
dataKeyPath?: string | DataLink
|
|
195
|
+
/* Items per page (Default: Items size) */
|
|
196
|
+
itemsPerPage?: number | DataLink
|
|
197
|
+
/* Current page index for `list` mode */
|
|
198
|
+
pageIndex?: number | DataLink
|
|
199
|
+
/* Current selected item index for `detail` mode */
|
|
200
|
+
selectedItemIndex?: number | DataLink
|
|
201
|
+
/* Allow page out of bound */
|
|
202
|
+
allowPageOutOfBound?: boolean | DataLink
|
|
203
|
+
/* Sequentially run Standby Transition for each item */
|
|
204
|
+
standbySequenceEnabled?: boolean | DataLink
|
|
205
|
+
/* Delay time (ms) between each item */
|
|
206
|
+
standbySequenceInterval?: number | DataLink
|
|
207
|
+
/* Random delay time (ms) increase or decrease between each item (e.g. if 100ms then delay time will be -100ms ~ 100ms) */
|
|
208
|
+
standbySequenceRandom?: number | DataLink
|
|
209
|
+
/* Define frame width of Brick List editor */
|
|
210
|
+
brickEditWidth?: number | DataLink
|
|
211
|
+
/* Define frame height of Brick List editor */
|
|
212
|
+
brickEditHeight?: number | DataLink
|
|
213
|
+
/* Define frame width of Brick List editor for detail mode */
|
|
214
|
+
detailBrickEditWidth?: number | DataLink
|
|
215
|
+
/* Define frame height of Brick List editor */
|
|
216
|
+
detailBrickEditHeight?: number | DataLink
|
|
217
|
+
/* order of horizontal first or vertical first */
|
|
218
|
+
orderMode?: 'horizontal' | 'vertical' | DataLink
|
|
219
|
+
/* Max horizontal item quantity */
|
|
220
|
+
horizontalMaxQuantity?: number | DataLink
|
|
221
|
+
/* Max vertical item quantity */
|
|
222
|
+
verticalMaxQuantity?: number | DataLink
|
|
223
|
+
/* Resize mode */
|
|
224
|
+
resizeMode?: 'auto' | 'fix' | DataLink
|
|
225
|
+
/* Justify Content */
|
|
226
|
+
justifyContent?: 'start' | 'end' | 'center' | 'space-between' | 'space-around' | DataLink
|
|
227
|
+
/* Align Content */
|
|
228
|
+
alignContent?:
|
|
229
|
+
| 'stretch'
|
|
230
|
+
| 'start'
|
|
231
|
+
| 'end'
|
|
232
|
+
| 'center'
|
|
233
|
+
| 'space-between'
|
|
234
|
+
| 'space-around'
|
|
235
|
+
| DataLink
|
|
236
|
+
/* Resize mode for detail mode */
|
|
237
|
+
detailResizeMode?: 'auto' | 'fix' | DataLink
|
|
238
|
+
/* Align Content for detail mode */
|
|
239
|
+
detailJustifyContent?: 'start' | 'end' | 'center' | DataLink
|
|
240
|
+
/* Align Content for detail mode */
|
|
241
|
+
detailAlignContent?: 'stretch' | 'start' | 'end' | 'center' | DataLink
|
|
242
|
+
}
|
|
243
|
+
/* Brick Definitions for render bricks for each item of `items` on `list` mode */
|
|
244
|
+
brickList?:
|
|
245
|
+
| Array<
|
|
246
|
+
| DataLink
|
|
247
|
+
| {
|
|
248
|
+
title?: string | DataLink
|
|
249
|
+
description?: string | DataLink
|
|
250
|
+
hidden?: boolean | DataLink
|
|
251
|
+
brickId?: string | DataLink
|
|
252
|
+
brickIdPrefix?: string | DataLink
|
|
253
|
+
templateKey?: string | DataLink
|
|
254
|
+
property?: {} | DataLink
|
|
255
|
+
animation?: {} | DataLink
|
|
256
|
+
eventMap?: {} | DataLink
|
|
257
|
+
outlet?: {} | DataLink
|
|
258
|
+
stateGroup?: any
|
|
259
|
+
propertyMapping?: {} | DataLink
|
|
260
|
+
frame?:
|
|
261
|
+
| DataLink
|
|
262
|
+
| {
|
|
263
|
+
x?: number | DataLink
|
|
264
|
+
y?: number | DataLink
|
|
265
|
+
width?: number | DataLink
|
|
266
|
+
height?: number | DataLink
|
|
267
|
+
standbyMode?: 'custom' | 'top' | 'bottom' | 'left' | 'right' | DataLink
|
|
268
|
+
standbyFrame?: DataLink | {}
|
|
269
|
+
standbyOpacity?: number | DataLink
|
|
270
|
+
standbyDelay?: number | DataLink
|
|
271
|
+
standbyDelayRandom?: number | DataLink
|
|
272
|
+
standbyEasing?:
|
|
273
|
+
| DataLink
|
|
274
|
+
| {
|
|
275
|
+
default?:
|
|
276
|
+
| DataLink
|
|
277
|
+
| {
|
|
278
|
+
method?: string | DataLink
|
|
279
|
+
duration?: number | DataLink
|
|
280
|
+
}
|
|
281
|
+
x?:
|
|
282
|
+
| DataLink
|
|
283
|
+
| {
|
|
284
|
+
method?: string | DataLink
|
|
285
|
+
duration?: number | DataLink
|
|
286
|
+
}
|
|
287
|
+
y?:
|
|
288
|
+
| DataLink
|
|
289
|
+
| {
|
|
290
|
+
method?: string | DataLink
|
|
291
|
+
duration?: number | DataLink
|
|
292
|
+
}
|
|
293
|
+
width?:
|
|
294
|
+
| DataLink
|
|
295
|
+
| {
|
|
296
|
+
method?: string | DataLink
|
|
297
|
+
duration?: number | DataLink
|
|
298
|
+
}
|
|
299
|
+
height?:
|
|
300
|
+
| DataLink
|
|
301
|
+
| {
|
|
302
|
+
method?: string | DataLink
|
|
303
|
+
duration?: number | DataLink
|
|
304
|
+
}
|
|
305
|
+
opacity?:
|
|
306
|
+
| DataLink
|
|
307
|
+
| {
|
|
308
|
+
method?: string | DataLink
|
|
309
|
+
duration?: number | DataLink
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
showingDelay?: number | DataLink
|
|
313
|
+
renderOutOfViewport?: boolean | DataLink
|
|
314
|
+
}
|
|
315
|
+
show?: string | DataLink
|
|
316
|
+
pressToOpenDetail?: boolean | DataLink
|
|
317
|
+
}
|
|
318
|
+
>
|
|
319
|
+
| DataLink
|
|
320
|
+
/* Brick Definitions for render bricks for each item of `items` on `detail` mode */
|
|
321
|
+
brickDetails?:
|
|
322
|
+
| Array<
|
|
323
|
+
| DataLink
|
|
324
|
+
| {
|
|
325
|
+
title?: string | DataLink
|
|
326
|
+
description?: string | DataLink
|
|
327
|
+
hidden?: boolean | DataLink
|
|
328
|
+
brickId?: string | DataLink
|
|
329
|
+
brickIdPrefix?: string | DataLink
|
|
330
|
+
templateKey?: string | DataLink
|
|
331
|
+
property?: {} | DataLink
|
|
332
|
+
animation?: {} | DataLink
|
|
333
|
+
eventMap?: {} | DataLink
|
|
334
|
+
outlet?: {} | DataLink
|
|
335
|
+
stateGroup?: any
|
|
336
|
+
propertyMapping?: {} | DataLink
|
|
337
|
+
frame?:
|
|
338
|
+
| DataLink
|
|
339
|
+
| {
|
|
340
|
+
x?: number | DataLink
|
|
341
|
+
y?: number | DataLink
|
|
342
|
+
width?: number | DataLink
|
|
343
|
+
height?: number | DataLink
|
|
344
|
+
standbyMode?: 'custom' | 'top' | 'bottom' | 'left' | 'right' | DataLink
|
|
345
|
+
standbyFrame?: DataLink | {}
|
|
346
|
+
standbyOpacity?: number | DataLink
|
|
347
|
+
standbyDelay?: number | DataLink
|
|
348
|
+
standbyDelayRandom?: number | DataLink
|
|
349
|
+
standbyEasing?:
|
|
350
|
+
| DataLink
|
|
351
|
+
| {
|
|
352
|
+
default?:
|
|
353
|
+
| DataLink
|
|
354
|
+
| {
|
|
355
|
+
method?: string | DataLink
|
|
356
|
+
duration?: number | DataLink
|
|
357
|
+
}
|
|
358
|
+
x?:
|
|
359
|
+
| DataLink
|
|
360
|
+
| {
|
|
361
|
+
method?: string | DataLink
|
|
362
|
+
duration?: number | DataLink
|
|
363
|
+
}
|
|
364
|
+
y?:
|
|
365
|
+
| DataLink
|
|
366
|
+
| {
|
|
367
|
+
method?: string | DataLink
|
|
368
|
+
duration?: number | DataLink
|
|
369
|
+
}
|
|
370
|
+
width?:
|
|
371
|
+
| DataLink
|
|
372
|
+
| {
|
|
373
|
+
method?: string | DataLink
|
|
374
|
+
duration?: number | DataLink
|
|
375
|
+
}
|
|
376
|
+
height?:
|
|
377
|
+
| DataLink
|
|
378
|
+
| {
|
|
379
|
+
method?: string | DataLink
|
|
380
|
+
duration?: number | DataLink
|
|
381
|
+
}
|
|
382
|
+
opacity?:
|
|
383
|
+
| DataLink
|
|
384
|
+
| {
|
|
385
|
+
method?: string | DataLink
|
|
386
|
+
duration?: number | DataLink
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
showingDelay?: number | DataLink
|
|
390
|
+
renderOutOfViewport?: boolean | DataLink
|
|
391
|
+
}
|
|
392
|
+
show?: string | DataLink
|
|
393
|
+
pressToBackList?: boolean | DataLink
|
|
394
|
+
}
|
|
395
|
+
>
|
|
396
|
+
| DataLink
|
|
397
|
+
events?: BrickBasicEventsForItem & {
|
|
398
|
+
/* Event on page render finished */
|
|
399
|
+
onPageRender?: Array<EventActionForItem>
|
|
400
|
+
/* Event on page change. */
|
|
401
|
+
onPageChange?: Array<EventActionForItem>
|
|
402
|
+
/* Event on page index out of bound. */
|
|
403
|
+
onPageOutOfBound?: Array<EventActionForItem>
|
|
404
|
+
/* Event on into `detail` mode */
|
|
405
|
+
onIntoDetailMode?: Array<EventActionForItem>
|
|
406
|
+
/* Event on into `list` mode. */
|
|
407
|
+
onIntoListMode?: Array<EventActionForItem>
|
|
408
|
+
/* Event on render error */
|
|
409
|
+
onError?: Array<EventActionForItem>
|
|
410
|
+
}
|
|
411
|
+
outlets?: {
|
|
412
|
+
/* Catched error message */
|
|
413
|
+
error?: () => Data
|
|
414
|
+
/* Current render mode */
|
|
415
|
+
mode?: () => Data
|
|
416
|
+
/* Current page index */
|
|
417
|
+
pageIndex?: () => Data
|
|
418
|
+
/* Current page size */
|
|
419
|
+
pageSize?: () => Data
|
|
420
|
+
/* Selected item index of detail mode */
|
|
421
|
+
selectedItemIndex?: () => Data
|
|
422
|
+
/* Page is out of bound */
|
|
423
|
+
pageIsOutOfBound?: () => Data
|
|
424
|
+
}
|
|
425
|
+
animation?: AnimationBasicEvents & {
|
|
426
|
+
onPageRender?: Animation
|
|
427
|
+
onPageChange?: Animation
|
|
428
|
+
onPageOutOfBound?: Animation
|
|
429
|
+
onIntoDetailMode?: Animation
|
|
430
|
+
onIntoListMode?: Animation
|
|
431
|
+
onError?: Animation
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* Brick items component */
|
|
436
|
+
export type BrickItems = Brick &
|
|
437
|
+
BrickItemsDef & {
|
|
438
|
+
templateKey: 'BRICK_ITEMS'
|
|
439
|
+
switches: Array<
|
|
440
|
+
SwitchDef &
|
|
441
|
+
BrickItemsDef & {
|
|
442
|
+
conds?: Array<{
|
|
443
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
444
|
+
cond:
|
|
445
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
446
|
+
| SwitchCondData
|
|
447
|
+
| {
|
|
448
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
449
|
+
outlet:
|
|
450
|
+
| 'error'
|
|
451
|
+
| 'mode'
|
|
452
|
+
| 'pageIndex'
|
|
453
|
+
| 'pageSize'
|
|
454
|
+
| 'selectedItemIndex'
|
|
455
|
+
| 'pageIsOutOfBound'
|
|
456
|
+
value: any
|
|
457
|
+
}
|
|
458
|
+
}>
|
|
459
|
+
}
|
|
460
|
+
>
|
|
461
|
+
}
|