@fugood/bricks-project 2.22.0-beta.8 → 2.22.0
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/compile/action-name-map.ts +112 -1
- package/compile/index.ts +10 -1
- package/package.json +3 -3
- package/tools/postinstall.ts +16 -9
- package/types/animation.ts +2 -1
- package/types/brick-base.ts +79 -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 +240 -0
- package/types/bricks/Icon.ts +93 -0
- package/types/bricks/Image.ts +104 -0
- package/types/bricks/Items.ts +461 -0
- package/types/bricks/Lottie.ts +159 -0
- package/types/bricks/QrCode.ts +112 -0
- package/types/bricks/Rect.ts +110 -0
- package/types/bricks/RichText.ts +123 -0
- package/types/bricks/Rive.ts +209 -0
- package/types/bricks/Slideshow.ts +155 -0
- package/types/bricks/Svg.ts +94 -0
- package/types/bricks/Text.ts +143 -0
- package/types/bricks/TextInput.ts +231 -0
- package/types/bricks/Video.ts +170 -0
- package/types/bricks/VideoStreaming.ts +107 -0
- package/types/bricks/WebRtcStream.ts +60 -0
- package/types/bricks/WebView.ts +157 -0
- package/types/bricks/index.ts +20 -0
- package/types/common.ts +8 -3
- package/types/data.ts +6 -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 +164 -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 +248 -0
- package/types/generators/MediaFlow.ts +142 -0
- package/types/generators/MqttBroker.ts +121 -0
- package/types/generators/MqttClient.ts +129 -0
- package/types/generators/Question.ts +395 -0
- package/types/generators/RealtimeTranscription.ts +180 -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/TapToPayOnIPhone.ts +175 -0
- package/types/generators/Tcp.ts +120 -0
- package/types/generators/TcpServer.ts +137 -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/system.ts +64 -0
- package/utils/data.ts +45 -0
- package/utils/event-props.ts +89 -0
- package/types/bricks.ts +0 -3168
- package/types/generators.ts +0 -7580
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
/* Take picture on the Camera */
|
|
16
|
+
export type BrickCameraActionTakePicture = ActionWithParams & {
|
|
17
|
+
__actionName: 'BRICK_CAMERA_TAKE_PICTURE'
|
|
18
|
+
params?: Array<
|
|
19
|
+
| {
|
|
20
|
+
input: 'width'
|
|
21
|
+
value?: number | DataLink | EventProperty
|
|
22
|
+
mapping?: string
|
|
23
|
+
}
|
|
24
|
+
| {
|
|
25
|
+
input: 'quality'
|
|
26
|
+
value?: string | DataLink | EventProperty
|
|
27
|
+
mapping?: string
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
input: 'base64'
|
|
31
|
+
value?: boolean | DataLink | EventProperty
|
|
32
|
+
mapping?: string
|
|
33
|
+
}
|
|
34
|
+
| {
|
|
35
|
+
input: 'mirrorImage'
|
|
36
|
+
value?: boolean | DataLink | EventProperty
|
|
37
|
+
mapping?: string
|
|
38
|
+
}
|
|
39
|
+
>
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Record video on the Camera */
|
|
43
|
+
export type BrickCameraActionRecord = ActionWithParams & {
|
|
44
|
+
__actionName: 'BRICK_CAMERA_RECORD'
|
|
45
|
+
params?: Array<
|
|
46
|
+
| {
|
|
47
|
+
input: 'quality'
|
|
48
|
+
value?: '4:3' | '288p' | '480p' | '720p' | '1080p' | '2160p' | DataLink | EventProperty
|
|
49
|
+
mapping?: string
|
|
50
|
+
}
|
|
51
|
+
| {
|
|
52
|
+
input: 'mirrorVideo'
|
|
53
|
+
value?: boolean | DataLink | EventProperty
|
|
54
|
+
mapping?: string
|
|
55
|
+
}
|
|
56
|
+
| {
|
|
57
|
+
input: 'videoBitrate'
|
|
58
|
+
value?: string | DataLink | EventProperty
|
|
59
|
+
mapping?: string
|
|
60
|
+
}
|
|
61
|
+
| {
|
|
62
|
+
input: 'maxDuration'
|
|
63
|
+
value?: number | DataLink | EventProperty
|
|
64
|
+
mapping?: string
|
|
65
|
+
}
|
|
66
|
+
| {
|
|
67
|
+
input: 'maxFileSize'
|
|
68
|
+
value?: string | DataLink | EventProperty
|
|
69
|
+
mapping?: string
|
|
70
|
+
}
|
|
71
|
+
>
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Record video on the Camera */
|
|
75
|
+
export type BrickCameraActionStopRecord = Action & {
|
|
76
|
+
__actionName: 'BRICK_CAMERA_STOP_RECORD'
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface BrickCameraDef {
|
|
80
|
+
/*
|
|
81
|
+
Default property:
|
|
82
|
+
{
|
|
83
|
+
"autoFocusEnabled": false,
|
|
84
|
+
"focusDepth": 0.5,
|
|
85
|
+
"type": "back",
|
|
86
|
+
"flashMode": "off",
|
|
87
|
+
"captureAudio": false,
|
|
88
|
+
"whiteBalance": "auto",
|
|
89
|
+
"faceDetectionEnabled": false,
|
|
90
|
+
"faceDetectionEventMode": "when-detected"
|
|
91
|
+
}
|
|
92
|
+
*/
|
|
93
|
+
property?: BrickBasicProperty & {
|
|
94
|
+
/* Camera auto focus */
|
|
95
|
+
autoFocusEnabled?: boolean | DataLink
|
|
96
|
+
/* The auto focus feature of the camera to attempt to focus on the part of the image at this coordinate. */
|
|
97
|
+
focusDepth?: number | DataLink
|
|
98
|
+
/* Camera type (Ignore it if you are using external camera) */
|
|
99
|
+
type?: 'back' | 'front' | DataLink
|
|
100
|
+
/* Camera zoom */
|
|
101
|
+
zoom?: number | DataLink
|
|
102
|
+
/* Camera flash mode */
|
|
103
|
+
flashMode?: 'off' | 'on' | 'torch' | 'auto' | DataLink
|
|
104
|
+
/* Camera ratio (Unsupported ratio will be ignored) */
|
|
105
|
+
ratio?: string | DataLink
|
|
106
|
+
/* Capture audio when start recording */
|
|
107
|
+
captureAudio?: boolean | DataLink
|
|
108
|
+
/* Allows you to control the color temperature in your photos by cooling down or warming up the colors. */
|
|
109
|
+
whiteBalance?:
|
|
110
|
+
| 'auto'
|
|
111
|
+
| 'sunny'
|
|
112
|
+
| 'cloudy'
|
|
113
|
+
| 'shadow'
|
|
114
|
+
| 'incandescent'
|
|
115
|
+
| 'fluorescent'
|
|
116
|
+
| DataLink
|
|
117
|
+
/* Enable face detection */
|
|
118
|
+
faceDetectionEnabled?: boolean | DataLink
|
|
119
|
+
/* Face detection event mode */
|
|
120
|
+
faceDetectionEventMode?: 'when-detected' | 'interval' | DataLink
|
|
121
|
+
/* Quality of take picture */
|
|
122
|
+
pictureQuality?: number | DataLink
|
|
123
|
+
/* Take picture format as base64 */
|
|
124
|
+
pictureBase64?: boolean | DataLink
|
|
125
|
+
/* Mirror image of take picture */
|
|
126
|
+
pictureIsMirrorImage?: boolean | DataLink
|
|
127
|
+
/* Quality of record video */
|
|
128
|
+
recordQuality?: '4:3' | '288p' | '480p' | '720p' | '1080p' | '2160p' | DataLink
|
|
129
|
+
/* Bitrate of record video (bit/s) */
|
|
130
|
+
recordVideoBitrate?: number | DataLink
|
|
131
|
+
/* Mirror video of record video */
|
|
132
|
+
recordMirrorVideo?: boolean | DataLink
|
|
133
|
+
/* Max duration of record video (s) */
|
|
134
|
+
recordMaxDuration?: number | DataLink
|
|
135
|
+
/* Max file size of record video (bytes) */
|
|
136
|
+
recordMaxFileSize?: number | DataLink
|
|
137
|
+
}
|
|
138
|
+
events?: BrickBasicEvents & {
|
|
139
|
+
/* Event of the Camera state change */
|
|
140
|
+
stateChange?: Array<EventAction>
|
|
141
|
+
/* Event of the Camera record start */
|
|
142
|
+
recordStart?: Array<EventAction>
|
|
143
|
+
/* Event of the Camera record end */
|
|
144
|
+
recordEnd?: Array<EventAction>
|
|
145
|
+
/* Event of the Camera barcode read */
|
|
146
|
+
barcodeRead?: Array<EventAction>
|
|
147
|
+
/* Event of the Camera picture taken */
|
|
148
|
+
pictureTaken?: Array<EventAction>
|
|
149
|
+
/* Event of the Camera record finished */
|
|
150
|
+
recordFinish?: Array<EventAction>
|
|
151
|
+
/* Event of the Camera mount error */
|
|
152
|
+
mountError?: Array<EventAction>
|
|
153
|
+
}
|
|
154
|
+
outlets?: {
|
|
155
|
+
/* Picture taken result */
|
|
156
|
+
pictureTaken?: () => Data
|
|
157
|
+
/* Record video result */
|
|
158
|
+
recordVideo?: () => Data
|
|
159
|
+
/* Barcode read result */
|
|
160
|
+
barcodeRead?: () => Data
|
|
161
|
+
/* Faces detected result */
|
|
162
|
+
faceDetected?: () => Data
|
|
163
|
+
}
|
|
164
|
+
animation?: AnimationBasicEvents & {
|
|
165
|
+
stateChange?: Animation
|
|
166
|
+
recordStart?: Animation
|
|
167
|
+
recordEnd?: Animation
|
|
168
|
+
barcodeRead?: Animation
|
|
169
|
+
pictureTaken?: Animation
|
|
170
|
+
recordFinish?: Animation
|
|
171
|
+
mountError?: Animation
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Camera view brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378589-camera)) */
|
|
176
|
+
export type BrickCamera = Brick &
|
|
177
|
+
BrickCameraDef & {
|
|
178
|
+
templateKey: 'BRICK_CAMERA'
|
|
179
|
+
switches: Array<
|
|
180
|
+
SwitchDef &
|
|
181
|
+
BrickCameraDef & {
|
|
182
|
+
conds?: Array<{
|
|
183
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
184
|
+
cond:
|
|
185
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
186
|
+
| SwitchCondData
|
|
187
|
+
| {
|
|
188
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
189
|
+
outlet: 'pictureTaken' | 'recordVideo' | 'barcodeRead' | 'faceDetected'
|
|
190
|
+
value: any
|
|
191
|
+
}
|
|
192
|
+
}>
|
|
193
|
+
}
|
|
194
|
+
>
|
|
195
|
+
}
|
|
@@ -0,0 +1,362 @@
|
|
|
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
|
+
/* Data highlight */
|
|
16
|
+
export type BrickChartActionDataHighlight = ActionWithParams & {
|
|
17
|
+
__actionName: 'BRICK_CHART_DATA_HIGHLIGHT'
|
|
18
|
+
params?: Array<
|
|
19
|
+
| {
|
|
20
|
+
input: 'seriesName'
|
|
21
|
+
value?: string | DataLink | EventProperty
|
|
22
|
+
mapping?: string
|
|
23
|
+
}
|
|
24
|
+
| {
|
|
25
|
+
input: 'seriesId'
|
|
26
|
+
value?: string | DataLink | EventProperty
|
|
27
|
+
mapping?: string
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
input: 'seriesIndex'
|
|
31
|
+
value?: number | DataLink | EventProperty
|
|
32
|
+
mapping?: string
|
|
33
|
+
}
|
|
34
|
+
| {
|
|
35
|
+
input: 'dataIndex'
|
|
36
|
+
value?: number | DataLink | EventProperty
|
|
37
|
+
mapping?: string
|
|
38
|
+
}
|
|
39
|
+
| {
|
|
40
|
+
input: 'name'
|
|
41
|
+
value?: string | DataLink | EventProperty
|
|
42
|
+
mapping?: string
|
|
43
|
+
}
|
|
44
|
+
>
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Data downplay */
|
|
48
|
+
export type BrickChartActionDataDownplay = ActionWithParams & {
|
|
49
|
+
__actionName: 'BRICK_CHART_DATA_DOWNPLAY'
|
|
50
|
+
params?: Array<
|
|
51
|
+
| {
|
|
52
|
+
input: 'seriesName'
|
|
53
|
+
value?: string | DataLink | EventProperty
|
|
54
|
+
mapping?: string
|
|
55
|
+
}
|
|
56
|
+
| {
|
|
57
|
+
input: 'seriesId'
|
|
58
|
+
value?: string | DataLink | EventProperty
|
|
59
|
+
mapping?: string
|
|
60
|
+
}
|
|
61
|
+
| {
|
|
62
|
+
input: 'seriesIndex'
|
|
63
|
+
value?: number | DataLink | EventProperty
|
|
64
|
+
mapping?: string
|
|
65
|
+
}
|
|
66
|
+
| {
|
|
67
|
+
input: 'dataIndex'
|
|
68
|
+
value?: number | DataLink | EventProperty
|
|
69
|
+
mapping?: string
|
|
70
|
+
}
|
|
71
|
+
| {
|
|
72
|
+
input: 'name'
|
|
73
|
+
value?: string | DataLink | EventProperty
|
|
74
|
+
mapping?: string
|
|
75
|
+
}
|
|
76
|
+
>
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Data select */
|
|
80
|
+
export type BrickChartActionDataSelect = ActionWithParams & {
|
|
81
|
+
__actionName: 'BRICK_CHART_DATA_SELECT'
|
|
82
|
+
params?: Array<
|
|
83
|
+
| {
|
|
84
|
+
input: 'seriesName'
|
|
85
|
+
value?: string | DataLink | EventProperty
|
|
86
|
+
mapping?: string
|
|
87
|
+
}
|
|
88
|
+
| {
|
|
89
|
+
input: 'seriesId'
|
|
90
|
+
value?: string | DataLink | EventProperty
|
|
91
|
+
mapping?: string
|
|
92
|
+
}
|
|
93
|
+
| {
|
|
94
|
+
input: 'seriesIndex'
|
|
95
|
+
value?: number | DataLink | EventProperty
|
|
96
|
+
mapping?: string
|
|
97
|
+
}
|
|
98
|
+
| {
|
|
99
|
+
input: 'dataIndex'
|
|
100
|
+
value?: number | DataLink | EventProperty
|
|
101
|
+
mapping?: string
|
|
102
|
+
}
|
|
103
|
+
| {
|
|
104
|
+
input: 'name'
|
|
105
|
+
value?: string | DataLink | EventProperty
|
|
106
|
+
mapping?: string
|
|
107
|
+
}
|
|
108
|
+
>
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Data unselect */
|
|
112
|
+
export type BrickChartActionDataUnselect = ActionWithParams & {
|
|
113
|
+
__actionName: 'BRICK_CHART_DATA_UNSELECT'
|
|
114
|
+
params?: Array<
|
|
115
|
+
| {
|
|
116
|
+
input: 'seriesName'
|
|
117
|
+
value?: string | DataLink | EventProperty
|
|
118
|
+
mapping?: string
|
|
119
|
+
}
|
|
120
|
+
| {
|
|
121
|
+
input: 'seriesId'
|
|
122
|
+
value?: string | DataLink | EventProperty
|
|
123
|
+
mapping?: string
|
|
124
|
+
}
|
|
125
|
+
| {
|
|
126
|
+
input: 'seriesIndex'
|
|
127
|
+
value?: number | DataLink | EventProperty
|
|
128
|
+
mapping?: string
|
|
129
|
+
}
|
|
130
|
+
| {
|
|
131
|
+
input: 'dataIndex'
|
|
132
|
+
value?: number | DataLink | EventProperty
|
|
133
|
+
mapping?: string
|
|
134
|
+
}
|
|
135
|
+
| {
|
|
136
|
+
input: 'name'
|
|
137
|
+
value?: string | DataLink | EventProperty
|
|
138
|
+
mapping?: string
|
|
139
|
+
}
|
|
140
|
+
>
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Data toggle select */
|
|
144
|
+
export type BrickChartActionDataToggleSelect = ActionWithParams & {
|
|
145
|
+
__actionName: 'BRICK_CHART_DATA_TOGGLE_SELECT'
|
|
146
|
+
params?: Array<
|
|
147
|
+
| {
|
|
148
|
+
input: 'seriesName'
|
|
149
|
+
value?: string | DataLink | EventProperty
|
|
150
|
+
mapping?: string
|
|
151
|
+
}
|
|
152
|
+
| {
|
|
153
|
+
input: 'seriesId'
|
|
154
|
+
value?: string | DataLink | EventProperty
|
|
155
|
+
mapping?: string
|
|
156
|
+
}
|
|
157
|
+
| {
|
|
158
|
+
input: 'seriesIndex'
|
|
159
|
+
value?: number | DataLink | EventProperty
|
|
160
|
+
mapping?: string
|
|
161
|
+
}
|
|
162
|
+
| {
|
|
163
|
+
input: 'dataIndex'
|
|
164
|
+
value?: number | DataLink | EventProperty
|
|
165
|
+
mapping?: string
|
|
166
|
+
}
|
|
167
|
+
| {
|
|
168
|
+
input: 'name'
|
|
169
|
+
value?: string | DataLink | EventProperty
|
|
170
|
+
mapping?: string
|
|
171
|
+
}
|
|
172
|
+
>
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Legend select */
|
|
176
|
+
export type BrickChartActionLegendSelect = ActionWithParams & {
|
|
177
|
+
__actionName: 'BRICK_CHART_LEGEND_SELECT'
|
|
178
|
+
params?: Array<{
|
|
179
|
+
input: 'name'
|
|
180
|
+
value?: string | DataLink | EventProperty
|
|
181
|
+
mapping?: string
|
|
182
|
+
}>
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Legend unselect */
|
|
186
|
+
export type BrickChartActionLegendUnselect = ActionWithParams & {
|
|
187
|
+
__actionName: 'BRICK_CHART_LEGEND_UNSELECT'
|
|
188
|
+
params?: Array<{
|
|
189
|
+
input: 'name'
|
|
190
|
+
value?: string | DataLink | EventProperty
|
|
191
|
+
mapping?: string
|
|
192
|
+
}>
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Legend toggle select */
|
|
196
|
+
export type BrickChartActionLegendToggleSelect = Action & {
|
|
197
|
+
__actionName: 'BRICK_CHART_LEGEND_TOGGLE_SELECT'
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Legend all select */
|
|
201
|
+
export type BrickChartActionLegendAllSelect = Action & {
|
|
202
|
+
__actionName: 'BRICK_CHART_LEGEND_ALL_SELECT'
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Legend inverse select */
|
|
206
|
+
export type BrickChartActionLegendInverseSelect = Action & {
|
|
207
|
+
__actionName: 'BRICK_CHART_LEGEND_INVERSE_SELECT'
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Tooltip show */
|
|
211
|
+
export type BrickChartActionTooltipShow = ActionWithParams & {
|
|
212
|
+
__actionName: 'BRICK_CHART_TOOLTIP_SHOW'
|
|
213
|
+
params?: Array<
|
|
214
|
+
| {
|
|
215
|
+
input: 'seriesIndex'
|
|
216
|
+
value?: number | DataLink | EventProperty
|
|
217
|
+
mapping?: string
|
|
218
|
+
}
|
|
219
|
+
| {
|
|
220
|
+
input: 'dataIndex'
|
|
221
|
+
value?: number | DataLink | EventProperty
|
|
222
|
+
mapping?: string
|
|
223
|
+
}
|
|
224
|
+
| {
|
|
225
|
+
input: 'name'
|
|
226
|
+
value?: string | DataLink | EventProperty
|
|
227
|
+
mapping?: string
|
|
228
|
+
}
|
|
229
|
+
>
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* Tooltip hide */
|
|
233
|
+
export type BrickChartActionTooltipHide = ActionWithParams & {
|
|
234
|
+
__actionName: 'BRICK_CHART_TOOLTIP_HIDE'
|
|
235
|
+
params?: Array<
|
|
236
|
+
| {
|
|
237
|
+
input: 'seriesIndex'
|
|
238
|
+
value?: number | DataLink | EventProperty
|
|
239
|
+
mapping?: string
|
|
240
|
+
}
|
|
241
|
+
| {
|
|
242
|
+
input: 'dataIndex'
|
|
243
|
+
value?: number | DataLink | EventProperty
|
|
244
|
+
mapping?: string
|
|
245
|
+
}
|
|
246
|
+
| {
|
|
247
|
+
input: 'name'
|
|
248
|
+
value?: string | DataLink | EventProperty
|
|
249
|
+
mapping?: string
|
|
250
|
+
}
|
|
251
|
+
>
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
interface BrickChartDef {
|
|
255
|
+
/*
|
|
256
|
+
Default property:
|
|
257
|
+
{
|
|
258
|
+
"legendShow": true,
|
|
259
|
+
"xAxisShow": true,
|
|
260
|
+
"xAxisType": "category",
|
|
261
|
+
"yAxisShow": true,
|
|
262
|
+
"yAxisType": "value",
|
|
263
|
+
"tooltipShow": true,
|
|
264
|
+
"tooltipTrigger": "item"
|
|
265
|
+
}
|
|
266
|
+
*/
|
|
267
|
+
property?: BrickBasicProperty & {
|
|
268
|
+
/* Theme. You can use https://echarts.apache.org/en/theme-builder.html to generate theme */
|
|
269
|
+
themeEntry?: {} | DataLink
|
|
270
|
+
/* Theme of URL (.json) */
|
|
271
|
+
themeUrl?: string | DataLink
|
|
272
|
+
/* Theme of MD5 */
|
|
273
|
+
themeMd5?: string | DataLink
|
|
274
|
+
/* Title text */
|
|
275
|
+
titleText?: string | DataLink
|
|
276
|
+
/* Subtitle text */
|
|
277
|
+
titleSubtext?: string | DataLink
|
|
278
|
+
/* Full configuration of title, see https://echarts.apache.org/en/option.html#title */
|
|
279
|
+
titleOptions?: {} | DataLink
|
|
280
|
+
/* Show legend */
|
|
281
|
+
legendShow?: boolean | DataLink
|
|
282
|
+
/* Legend data */
|
|
283
|
+
legendData?: Array<string | DataLink> | DataLink
|
|
284
|
+
/* Full configuration of legend, see https://echarts.apache.org/en/option.html#legend */
|
|
285
|
+
legendOptions?: {} | DataLink
|
|
286
|
+
/* Show grid */
|
|
287
|
+
gridShow?: boolean | DataLink
|
|
288
|
+
/* Full configuration of grid, see https://echarts.apache.org/en/option.html#grid */
|
|
289
|
+
gridOptions?: {} | DataLink
|
|
290
|
+
/* Dataset (see https://echarts.apache.org/en/option.html#dataset) */
|
|
291
|
+
dataset?: Array<any> | DataLink
|
|
292
|
+
/* Show x axis */
|
|
293
|
+
xAxisShow?: boolean | DataLink
|
|
294
|
+
/* Type of x axis */
|
|
295
|
+
xAxisType?: 'category' | 'value' | 'time' | 'log' | DataLink
|
|
296
|
+
/* Name of x axis */
|
|
297
|
+
xAxisName?: string | DataLink
|
|
298
|
+
/* Data of x axis */
|
|
299
|
+
xAxisData?: Array<string | DataLink> | DataLink
|
|
300
|
+
/* Full configuration of x axis, see https://echarts.apache.org/en/option.html#xAxis */
|
|
301
|
+
xAxisOptions?: {} | DataLink
|
|
302
|
+
/* Show y axis */
|
|
303
|
+
yAxisShow?: boolean | DataLink
|
|
304
|
+
/* Type of x axis */
|
|
305
|
+
yAxisType?: 'value' | 'category' | 'time' | 'log' | DataLink
|
|
306
|
+
/* Name of x axis */
|
|
307
|
+
yAxisName?: string | DataLink
|
|
308
|
+
/* Data of y axis */
|
|
309
|
+
yAxisData?: Array<string | DataLink> | DataLink
|
|
310
|
+
/* Full configuration of y axis, see https://echarts.apache.org/en/option.html#yAxis */
|
|
311
|
+
yAxisOptions?: {} | DataLink
|
|
312
|
+
/* Show axis pointer */
|
|
313
|
+
axisPointerShow?: boolean | DataLink
|
|
314
|
+
/* Full configuration of axis pointer, see https://echarts.apache.org/en/option.html#axisPointer */
|
|
315
|
+
axisPointerOptions?: {} | DataLink
|
|
316
|
+
/* data series (see https://echarts.apache.org/en/option.html#series-line) */
|
|
317
|
+
series?: Array<any> | DataLink
|
|
318
|
+
/* Show tooltip */
|
|
319
|
+
tooltipShow?: boolean | DataLink
|
|
320
|
+
/* Trigger type of tooltip */
|
|
321
|
+
tooltipTrigger?: 'item' | 'axis' | 'none' | DataLink
|
|
322
|
+
/* data series (see https://echarts.apache.org/en/option.html#tooltip) */
|
|
323
|
+
tooltipOptions?: {} | DataLink
|
|
324
|
+
/* Full configuration of options, see https://echarts.apache.org/en/option.html */
|
|
325
|
+
options?: {} | DataLink
|
|
326
|
+
}
|
|
327
|
+
events?: BrickBasicEvents & {
|
|
328
|
+
/* Event of chart render */
|
|
329
|
+
onRender?: Array<EventAction>
|
|
330
|
+
/* Event of data point on press */
|
|
331
|
+
onPress?: Array<EventAction>
|
|
332
|
+
/* Event of legend select changed */
|
|
333
|
+
onLegendSelectChanged?: Array<EventAction>
|
|
334
|
+
}
|
|
335
|
+
animation?: AnimationBasicEvents & {
|
|
336
|
+
onRender?: Animation
|
|
337
|
+
onPress?: Animation
|
|
338
|
+
onLegendSelectChanged?: Animation
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/* Chart brick, based on [Apache ECharts](https://echarts.apache.org/en/index.html). */
|
|
343
|
+
export type BrickChart = Brick &
|
|
344
|
+
BrickChartDef & {
|
|
345
|
+
templateKey: 'BRICK_CHART'
|
|
346
|
+
switches: Array<
|
|
347
|
+
SwitchDef &
|
|
348
|
+
BrickChartDef & {
|
|
349
|
+
conds?: Array<{
|
|
350
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
351
|
+
cond:
|
|
352
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
353
|
+
| SwitchCondData
|
|
354
|
+
| {
|
|
355
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
356
|
+
outlet: ''
|
|
357
|
+
value: any
|
|
358
|
+
}
|
|
359
|
+
}>
|
|
360
|
+
}
|
|
361
|
+
>
|
|
362
|
+
}
|