@lowdefy/docs-content 0.0.0-experimental-20260710073520

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.
Files changed (304) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +20 -0
  3. package/content/actions/callapi.md +66 -0
  4. package/content/actions/callmethod.md +41 -0
  5. package/content/actions/copytoclipboard.md +32 -0
  6. package/content/actions/displaymessage.md +53 -0
  7. package/content/actions/downloadcsv.md +89 -0
  8. package/content/actions/fetch.md +50 -0
  9. package/content/actions/geolocationcurrentposition.md +56 -0
  10. package/content/actions/link.md +104 -0
  11. package/content/actions/login.md +85 -0
  12. package/content/actions/logout.md +56 -0
  13. package/content/actions/pdfmake.md +304 -0
  14. package/content/actions/request.md +67 -0
  15. package/content/actions/reset.md +27 -0
  16. package/content/actions/resetvalidation.md +85 -0
  17. package/content/actions/scrollto.md +85 -0
  18. package/content/actions/setdarkmode.md +62 -0
  19. package/content/actions/setfocus.md +33 -0
  20. package/content/actions/setglobal.md +63 -0
  21. package/content/actions/setlocale.md +69 -0
  22. package/content/actions/setstate.md +70 -0
  23. package/content/actions/throw.md +72 -0
  24. package/content/actions/validate.md +87 -0
  25. package/content/actions/wait.md +24 -0
  26. package/content/agents/agent-endpoint-tools.md +190 -0
  27. package/content/agents/agent-mcp-tools.md +124 -0
  28. package/content/agents/agent-multi-agent.md +136 -0
  29. package/content/agents/agent-properties.md +174 -0
  30. package/content/agents/agent-server-hooks.md +336 -0
  31. package/content/agents/agentchat.md +515 -0
  32. package/content/agents/agentconversations.md +148 -0
  33. package/content/concepts/ai-agent-docs.md +190 -0
  34. package/content/concepts/cli.md +213 -0
  35. package/content/concepts/connections-and-requests.md +7 -0
  36. package/content/concepts/custom-html.md +3 -0
  37. package/content/concepts/custom-styling.md +161 -0
  38. package/content/concepts/events-and-actions.md +271 -0
  39. package/content/concepts/hosting-files.md +18 -0
  40. package/content/concepts/i18n.md +320 -0
  41. package/content/concepts/keyboard-shortcuts.md +218 -0
  42. package/content/concepts/layout-overview.md +478 -0
  43. package/content/concepts/lists.md +144 -0
  44. package/content/concepts/logger.md +43 -0
  45. package/content/concepts/lowdefy-schema.md +365 -0
  46. package/content/concepts/menus.md +144 -0
  47. package/content/concepts/module-authoring.md +564 -0
  48. package/content/concepts/modules.md +338 -0
  49. package/content/concepts/operators.md +45 -0
  50. package/content/concepts/overview.md +19 -0
  51. package/content/concepts/references-and-templates.md +207 -0
  52. package/content/concepts/secrets.md +24 -0
  53. package/content/concepts/selectors.md +143 -0
  54. package/content/connections/amazonredshift.md +176 -0
  55. package/content/connections/anthropic.md +232 -0
  56. package/content/connections/awss3.md +313 -0
  57. package/content/connections/azureblobstorage.md +133 -0
  58. package/content/connections/elasticsearch.md +371 -0
  59. package/content/connections/google.md +228 -0
  60. package/content/connections/googlecloudstorage.md +139 -0
  61. package/content/connections/googlesheet.md +313 -0
  62. package/content/connections/knex.md +206 -0
  63. package/content/connections/mariadb.md +177 -0
  64. package/content/connections/mcp.md +134 -0
  65. package/content/connections/mongodb.md +739 -0
  66. package/content/connections/mssql.md +191 -0
  67. package/content/connections/mysql.md +192 -0
  68. package/content/connections/openai-connection.md +228 -0
  69. package/content/connections/postgresql.md +200 -0
  70. package/content/connections/redis.md +116 -0
  71. package/content/connections/sendgridmail.md +94 -0
  72. package/content/connections/smtp.md +149 -0
  73. package/content/connections/sqlite.md +187 -0
  74. package/content/connections/stripe.md +115 -0
  75. package/content/container-blocks/affix.md +413 -0
  76. package/content/container-blocks/alert.md +937 -0
  77. package/content/container-blocks/badge.md +1222 -0
  78. package/content/container-blocks/box.md +1453 -0
  79. package/content/container-blocks/card.md +1200 -0
  80. package/content/container-blocks/carousel.md +2247 -0
  81. package/content/container-blocks/collapse.md +1335 -0
  82. package/content/container-blocks/configprovider.md +1070 -0
  83. package/content/container-blocks/confirmmodal.md +1159 -0
  84. package/content/container-blocks/content.md +597 -0
  85. package/content/container-blocks/descriptions.md +870 -0
  86. package/content/container-blocks/drawer.md +1379 -0
  87. package/content/container-blocks/dropdownmenu.md +643 -0
  88. package/content/container-blocks/flex.md +1510 -0
  89. package/content/container-blocks/footer.md +380 -0
  90. package/content/container-blocks/googlemaps.md +546 -0
  91. package/content/container-blocks/googlemapsheatmap.md +607 -0
  92. package/content/container-blocks/googlemapsscript.md +61 -0
  93. package/content/container-blocks/header.md +302 -0
  94. package/content/container-blocks/label.md +739 -0
  95. package/content/container-blocks/layout.md +604 -0
  96. package/content/container-blocks/masonry.md +1090 -0
  97. package/content/container-blocks/mobilemenu.md +1244 -0
  98. package/content/container-blocks/modal.md +1180 -0
  99. package/content/container-blocks/pageheadermenu.md +614 -0
  100. package/content/container-blocks/pagesidebarlayout.md +438 -0
  101. package/content/container-blocks/pagesidermenu.md +651 -0
  102. package/content/container-blocks/popover.md +1421 -0
  103. package/content/container-blocks/result.md +972 -0
  104. package/content/container-blocks/sider.md +1064 -0
  105. package/content/container-blocks/span.md +747 -0
  106. package/content/container-blocks/spinner.md +267 -0
  107. package/content/container-blocks/splitter.md +1735 -0
  108. package/content/container-blocks/tabs.md +1718 -0
  109. package/content/container-blocks/tooltip.md +1274 -0
  110. package/content/container-blocks/watermark.md +515 -0
  111. package/content/controls/for.md +103 -0
  112. package/content/controls/if.md +107 -0
  113. package/content/controls/log.md +50 -0
  114. package/content/controls/parallel.md +71 -0
  115. package/content/controls/parallel_for.md +36 -0
  116. package/content/controls/reject.md +56 -0
  117. package/content/controls/return.md +66 -0
  118. package/content/controls/set_state.md +98 -0
  119. package/content/controls/switch.md +90 -0
  120. package/content/controls/throw.md +79 -0
  121. package/content/controls/try.md +88 -0
  122. package/content/deployment/docker.md +149 -0
  123. package/content/deployment/node-server.md +27 -0
  124. package/content/deployment/vercel.md +101 -0
  125. package/content/display-blocks/aggrid.md +1459 -0
  126. package/content/display-blocks/anchor.md +336 -0
  127. package/content/display-blocks/avatar.md +1154 -0
  128. package/content/display-blocks/breadcrumb.md +517 -0
  129. package/content/display-blocks/button.md +758 -0
  130. package/content/display-blocks/calendar.md +156 -0
  131. package/content/display-blocks/dangeroushtml.md +314 -0
  132. package/content/display-blocks/dangerousmarkdown.md +423 -0
  133. package/content/display-blocks/diffgit.md +44 -0
  134. package/content/display-blocks/difflist.md +225 -0
  135. package/content/display-blocks/diffsidebyside.md +56 -0
  136. package/content/display-blocks/difftimeline.md +94 -0
  137. package/content/display-blocks/divider.md +406 -0
  138. package/content/display-blocks/download.md +60 -0
  139. package/content/display-blocks/dropdownbutton.md +661 -0
  140. package/content/display-blocks/echart.md +418 -0
  141. package/content/display-blocks/floatbutton.md +545 -0
  142. package/content/display-blocks/html.md +311 -0
  143. package/content/display-blocks/icon.md +717 -0
  144. package/content/display-blocks/img.md +479 -0
  145. package/content/display-blocks/markdown.md +520 -0
  146. package/content/display-blocks/markdownwithcode.md +730 -0
  147. package/content/display-blocks/menu.md +1123 -0
  148. package/content/display-blocks/message.md +941 -0
  149. package/content/display-blocks/notification.md +1410 -0
  150. package/content/display-blocks/paragraph.md +643 -0
  151. package/content/display-blocks/progress.md +818 -0
  152. package/content/display-blocks/qrcode.md +519 -0
  153. package/content/display-blocks/s3download.md +240 -0
  154. package/content/display-blocks/search.md +360 -0
  155. package/content/display-blocks/skeleton.md +272 -0
  156. package/content/display-blocks/skeletonavatar.md +222 -0
  157. package/content/display-blocks/skeletonbutton.md +245 -0
  158. package/content/display-blocks/skeletoninput.md +223 -0
  159. package/content/display-blocks/skeletonparagraph.md +201 -0
  160. package/content/display-blocks/statistic.md +485 -0
  161. package/content/display-blocks/steps.md +585 -0
  162. package/content/display-blocks/tag.md +620 -0
  163. package/content/display-blocks/title.md +654 -0
  164. package/content/display-blocks/tour.md +2359 -0
  165. package/content/input-blocks/autocomplete.md +786 -0
  166. package/content/input-blocks/buttonselector.md +964 -0
  167. package/content/input-blocks/checkboxselector.md +765 -0
  168. package/content/input-blocks/checkboxswitch.md +497 -0
  169. package/content/input-blocks/colorselector.md +884 -0
  170. package/content/input-blocks/daterangeselector.md +777 -0
  171. package/content/input-blocks/dateselector.md +693 -0
  172. package/content/input-blocks/datetimeselector.md +791 -0
  173. package/content/input-blocks/inputgallery.md +528 -0
  174. package/content/input-blocks/monthselector.md +717 -0
  175. package/content/input-blocks/multipleselector.md +1337 -0
  176. package/content/input-blocks/numberinput.md +855 -0
  177. package/content/input-blocks/pagination.md +679 -0
  178. package/content/input-blocks/paragraphinput.md +1664 -0
  179. package/content/input-blocks/passwordinput.md +480 -0
  180. package/content/input-blocks/phonenumberinput.md +688 -0
  181. package/content/input-blocks/radioselector.md +820 -0
  182. package/content/input-blocks/ratingslider.md +684 -0
  183. package/content/input-blocks/s3uploadbutton.md +384 -0
  184. package/content/input-blocks/s3uploaddragger.md +305 -0
  185. package/content/input-blocks/s3uploadphoto.md +288 -0
  186. package/content/input-blocks/segmentedselector.md +782 -0
  187. package/content/input-blocks/selector.md +1162 -0
  188. package/content/input-blocks/switch.md +552 -0
  189. package/content/input-blocks/textarea.md +714 -0
  190. package/content/input-blocks/textinput.md +639 -0
  191. package/content/input-blocks/tiptapinput.md +226 -0
  192. package/content/input-blocks/tiptapmentioninput.md +471 -0
  193. package/content/input-blocks/titleinput.md +1094 -0
  194. package/content/input-blocks/treeinput.md +144 -0
  195. package/content/input-blocks/treemultipleselector.md +162 -0
  196. package/content/input-blocks/treeselector.md +185 -0
  197. package/content/input-blocks/upload.md +149 -0
  198. package/content/input-blocks/uploaddragger.md +85 -0
  199. package/content/input-blocks/uploadphoto.md +84 -0
  200. package/content/input-blocks/weekselector.md +630 -0
  201. package/content/list-blocks/controlledlist.md +498 -0
  202. package/content/list-blocks/list.md +529 -0
  203. package/content/list-blocks/listselector.md +301 -0
  204. package/content/list-blocks/masonrylist.md +230 -0
  205. package/content/migration/upgrade-guide.md +106 -0
  206. package/content/migration/v4-to-v5.md +589 -0
  207. package/content/migration/v5-to-v6.md +36 -0
  208. package/content/operators/_actions.md +58 -0
  209. package/content/operators/_and.md +76 -0
  210. package/content/operators/_api.md +254 -0
  211. package/content/operators/_app.md +114 -0
  212. package/content/operators/_args.md +65 -0
  213. package/content/operators/_array.md +331 -0
  214. package/content/operators/_base64.md +49 -0
  215. package/content/operators/_boolean.md +33 -0
  216. package/content/operators/_build.md +166 -0
  217. package/content/operators/_change_case.md +357 -0
  218. package/content/operators/_date.md +415 -0
  219. package/content/operators/_dayjs.md +128 -0
  220. package/content/operators/_diff.md +61 -0
  221. package/content/operators/_divide.md +32 -0
  222. package/content/operators/_eq.md +52 -0
  223. package/content/operators/_event.md +86 -0
  224. package/content/operators/_function.md +52 -0
  225. package/content/operators/_get.md +92 -0
  226. package/content/operators/_global.md +86 -0
  227. package/content/operators/_gt.md +50 -0
  228. package/content/operators/_gte.md +50 -0
  229. package/content/operators/_hash.md +112 -0
  230. package/content/operators/_if.md +30 -0
  231. package/content/operators/_if_none.md +47 -0
  232. package/content/operators/_index.md +48 -0
  233. package/content/operators/_input.md +86 -0
  234. package/content/operators/_intl.md +135 -0
  235. package/content/operators/_item.md +166 -0
  236. package/content/operators/_js.md +113 -0
  237. package/content/operators/_json.md +120 -0
  238. package/content/operators/_jsonata.md +152 -0
  239. package/content/operators/_locale.md +65 -0
  240. package/content/operators/_location.md +40 -0
  241. package/content/operators/_log.md +22 -0
  242. package/content/operators/_lt.md +50 -0
  243. package/content/operators/_lte.md +50 -0
  244. package/content/operators/_math.md +407 -0
  245. package/content/operators/_media.md +83 -0
  246. package/content/operators/_menu.md +62 -0
  247. package/content/operators/_module.md +340 -0
  248. package/content/operators/_mql.md +95 -0
  249. package/content/operators/_ne.md +62 -0
  250. package/content/operators/_not.md +33 -0
  251. package/content/operators/_number.md +159 -0
  252. package/content/operators/_nunjucks.md +117 -0
  253. package/content/operators/_object.md +253 -0
  254. package/content/operators/_operator.md +33 -0
  255. package/content/operators/_or.md +67 -0
  256. package/content/operators/_product.md +45 -0
  257. package/content/operators/_random.md +90 -0
  258. package/content/operators/_ref.md +80 -0
  259. package/content/operators/_regex.md +69 -0
  260. package/content/operators/_request.md +35 -0
  261. package/content/operators/_request_details.md +29 -0
  262. package/content/operators/_secret.md +56 -0
  263. package/content/operators/_state.md +134 -0
  264. package/content/operators/_step.md +98 -0
  265. package/content/operators/_string.md +327 -0
  266. package/content/operators/_subtract.md +24 -0
  267. package/content/operators/_sum.md +45 -0
  268. package/content/operators/_switch.md +37 -0
  269. package/content/operators/_t.md +96 -0
  270. package/content/operators/_theme.md +65 -0
  271. package/content/operators/_type.md +78 -0
  272. package/content/operators/_uri.md +49 -0
  273. package/content/operators/_url_query.md +92 -0
  274. package/content/operators/_user.md +154 -0
  275. package/content/operators/_uuid.md +118 -0
  276. package/content/operators/_var.md +88 -0
  277. package/content/operators/_yaml.md +96 -0
  278. package/content/other/introduction.md +39 -0
  279. package/content/other/next-auth-providers.md +3 -0
  280. package/content/other/updatesession.md +26 -0
  281. package/content/plugins/plugins-actions.md +80 -0
  282. package/content/plugins/plugins-connections.md +98 -0
  283. package/content/plugins/plugins-dev.md +138 -0
  284. package/content/plugins/plugins-introduction.md +29 -0
  285. package/content/plugins/plugins-operators.md +71 -0
  286. package/content/testing/e2e-auth.md +108 -0
  287. package/content/testing/e2e-configuration.md +107 -0
  288. package/content/testing/e2e-getting-started.md +96 -0
  289. package/content/testing/e2e-introduction.md +53 -0
  290. package/content/testing/e2e-mocking.md +155 -0
  291. package/content/testing/e2e-writing-tests.md +214 -0
  292. package/content/tutorial/tutorial-actions-operators.md +222 -0
  293. package/content/tutorial/tutorial-add-blocks.md +86 -0
  294. package/content/tutorial/tutorial-create-page.md +57 -0
  295. package/content/tutorial/tutorial-display-data-page.md +181 -0
  296. package/content/tutorial/tutorial-next-steps.md +53 -0
  297. package/content/tutorial/tutorial-requests-sql.md +22 -0
  298. package/content/tutorial/tutorial-start.md +71 -0
  299. package/content/user-authentication/auth-providers.md +15 -0
  300. package/content/user-authentication/login-and-logout.md +122 -0
  301. package/content/user-authentication/users-introduction.md +31 -0
  302. package/index.json +2281 -0
  303. package/package.json +34 -0
  304. package/scripts/extractAgentDocs.js +130 -0
@@ -0,0 +1,529 @@
1
+ # List
2
+
3
+ Flex-based list container that renders a template block for each item in an array. Supports column/row direction, wrapping, and scrolling. Use `CallMethod` with `pushItem`, `removeItem`, `moveItemUp`, and `moveItemDown` to manage items. Pair with `Validate` to validate inputs across all list rows.
4
+
5
+ Notes
6
+
7
+ ```yaml
8
+ - id: notes_header
9
+ type: Box
10
+ layout:
11
+ justify: space-between
12
+ align: center
13
+ blocks:
14
+ - id: notes_title
15
+ type: Title
16
+ layout:
17
+ flex: 0 0 auto
18
+ properties:
19
+ content: Notes
20
+ level: 4
21
+ - id: notes_add
22
+ type: Button
23
+ layout:
24
+ flex: 0 0 auto
25
+ properties:
26
+ title: Add Note
27
+ icon: AiOutlinePlus
28
+ color: primary
29
+ variant: solid
30
+ size: small
31
+ events:
32
+ onClick:
33
+ - id: notes_push
34
+ type: CallMethod
35
+ params:
36
+ blockId: notes
37
+ method: pushItem
38
+ - id: notes
39
+ type: List
40
+ properties:
41
+ direction: row
42
+ blocks:
43
+ - id: notes.$.text
44
+ type: TextInput
45
+ layout:
46
+ flex: 1 1 0
47
+ properties:
48
+ label:
49
+ disabled: true
50
+ placeholder: Type a note...
51
+ - id: notes.$.rm
52
+ type: Button
53
+ layout:
54
+ flex: 0 0 auto
55
+ properties:
56
+ icon: AiOutlineClose
57
+ color: default
58
+ variant: text
59
+ shape: circle
60
+ size: small
61
+ events:
62
+ onClick:
63
+ - id: rm_note
64
+ type: CallMethod
65
+ params:
66
+ blockId: notes
67
+ method: removeItem
68
+ args:
69
+ - _index: 0
70
+ ```
71
+
72
+ ```yaml
73
+ - id: skills
74
+ type: List
75
+ properties:
76
+ direction: row
77
+ wrap: wrap
78
+ blocks:
79
+ - id: skills.$.label
80
+ type: Tag
81
+ layout:
82
+ flex: 0 0 auto
83
+ properties:
84
+ title:
85
+ _state: skills.$.label
86
+ color:
87
+ _state: skills.$.color
88
+ closable: true
89
+ events:
90
+ onClose:
91
+ - id: rm_skill
92
+ type: CallMethod
93
+ params:
94
+ blockId: skills
95
+ method: removeItem
96
+ args:
97
+ - _index: 0
98
+ ```
99
+
100
+ Tasks
101
+
102
+ ```yaml
103
+ - id: tasks_header
104
+ type: Box
105
+ layout:
106
+ justify: space-between
107
+ align: center
108
+ blocks:
109
+ - id: tasks_title
110
+ type: Title
111
+ layout:
112
+ flex: 0 0 auto
113
+ properties:
114
+ content: Tasks
115
+ level: 4
116
+ - id: tasks_add
117
+ type: Button
118
+ layout:
119
+ flex: 0 0 auto
120
+ properties:
121
+ title: Add Task
122
+ icon: AiOutlinePlus
123
+ color: primary
124
+ variant: solid
125
+ size: small
126
+ events:
127
+ onClick:
128
+ - id: tasks_push
129
+ type: CallMethod
130
+ params:
131
+ blockId: tasks
132
+ method: pushItem
133
+ - id: tasks
134
+ type: List
135
+ blocks:
136
+ - id: tasks.$.done
137
+ type: Switch
138
+ layout:
139
+ flex: 0 0 auto
140
+ properties:
141
+ label:
142
+ disabled: true
143
+ size: small
144
+ - id: tasks.$.name
145
+ type: TextInput
146
+ required: true
147
+ layout:
148
+ flex: 1 1 0
149
+ properties:
150
+ label:
151
+ disabled: true
152
+ placeholder: Task name
153
+ size: small
154
+ - id: tasks.$.priority
155
+ type: Selector
156
+ layout:
157
+ flex: 0 0 140px
158
+ properties:
159
+ label:
160
+ disabled: true
161
+ placeholder: Priority
162
+ size: small
163
+ options:
164
+ - High
165
+ - Medium
166
+ - Low
167
+ - id: tasks.$.pri_tag
168
+ type: Tag
169
+ layout:
170
+ flex: 0 0 auto
171
+ properties:
172
+ title:
173
+ _if_none:
174
+ - _state: tasks.$.priority
175
+ - ""
176
+ color:
177
+ _if:
178
+ test:
179
+ _eq:
180
+ - _state: tasks.$.priority
181
+ - High
182
+ then: red
183
+ else:
184
+ _if:
185
+ test:
186
+ _eq:
187
+ - _state: tasks.$.priority
188
+ - Medium
189
+ then: orange
190
+ else: green
191
+ - id: tasks.$.up
192
+ type: Button
193
+ layout:
194
+ flex: 0 0 auto
195
+ properties:
196
+ icon: AiOutlineArrowUp
197
+ color: default
198
+ variant: text
199
+ size: small
200
+ shape: circle
201
+ events:
202
+ onClick:
203
+ - id: tasks_up
204
+ type: CallMethod
205
+ params:
206
+ blockId: tasks
207
+ method: moveItemUp
208
+ args:
209
+ - _index: 0
210
+ - id: tasks.$.down
211
+ type: Button
212
+ layout:
213
+ flex: 0 0 auto
214
+ properties:
215
+ icon: AiOutlineArrowDown
216
+ color: default
217
+ variant: text
218
+ size: small
219
+ shape: circle
220
+ events:
221
+ onClick:
222
+ - id: tasks_down
223
+ type: CallMethod
224
+ params:
225
+ blockId: tasks
226
+ method: moveItemDown
227
+ args:
228
+ - _index: 0
229
+ - id: tasks.$.rm
230
+ type: Button
231
+ layout:
232
+ flex: 0 0 auto
233
+ properties:
234
+ icon: AiOutlineDelete
235
+ color: danger
236
+ variant: text
237
+ size: small
238
+ shape: circle
239
+ events:
240
+ onClick:
241
+ - id: tasks_rm
242
+ type: CallMethod
243
+ params:
244
+ blockId: tasks
245
+ method: removeItem
246
+ args:
247
+ - _index: 0
248
+ - id: tasks_footer
249
+ type: Box
250
+ layout:
251
+ justify: flex-end
252
+ blocks:
253
+ - id: tasks_save
254
+ type: Button
255
+ layout:
256
+ flex: 0 0 auto
257
+ properties:
258
+ title: Save Tasks
259
+ icon: AiOutlineSave
260
+ color: primary
261
+ variant: solid
262
+ events:
263
+ onClick:
264
+ - id: tasks_validate
265
+ type: Validate
266
+ params:
267
+ regex: ^tasks
268
+ - id: tasks_msg
269
+ type: DisplayMessage
270
+ params:
271
+ content: Tasks saved!
272
+ status: success
273
+ ```
274
+
275
+ User Directory
276
+
277
+ ```yaml
278
+ - id: users_header
279
+ type: Box
280
+ layout:
281
+ justify: space-between
282
+ align: center
283
+ blocks:
284
+ - id: users_title
285
+ type: Title
286
+ layout:
287
+ flex: 0 0 auto
288
+ properties:
289
+ content: User Directory
290
+ level: 4
291
+ - id: users_btns
292
+ type: Box
293
+ layout:
294
+ flex: 0 0 auto
295
+ gap: 8
296
+ blocks:
297
+ - id: users_load
298
+ type: Button
299
+ layout:
300
+ flex: 0 0 auto
301
+ properties:
302
+ title: Load Users
303
+ icon: AiOutlineCloudDownload
304
+ color: primary
305
+ variant: solid
306
+ size: small
307
+ events:
308
+ onClick:
309
+ - id: fetch_users
310
+ type: Fetch
311
+ params:
312
+ url: https://jsonplaceholder.typicode.com/users
313
+ responseFunction: json
314
+ - id: set_users
315
+ type: SetState
316
+ params:
317
+ users:
318
+ _actions: fetch_users.response
319
+ - id: users_clear
320
+ type: Button
321
+ layout:
322
+ flex: 0 0 auto
323
+ properties:
324
+ title: Clear
325
+ color: default
326
+ variant: outlined
327
+ size: small
328
+ events:
329
+ onClick:
330
+ - id: clear_users
331
+ type: SetState
332
+ params:
333
+ users: []
334
+ - id: users
335
+ type: List
336
+ blocks:
337
+ - id: users.$.avatar
338
+ type: Avatar
339
+ layout:
340
+ flex: 0 0 auto
341
+ properties:
342
+ content:
343
+ _string.charAt:
344
+ on:
345
+ _if_none:
346
+ - _state: users.$.name
347
+ - "?"
348
+ index: 0
349
+ color: "#1677ff"
350
+ - id: users.$.disp_name
351
+ type: Paragraph
352
+ layout:
353
+ flex: 1 1 0
354
+ properties:
355
+ content:
356
+ _state: users.$.name
357
+ - id: users.$.disp_email
358
+ type: Paragraph
359
+ layout:
360
+ flex: 1 1 0
361
+ properties:
362
+ content:
363
+ _state: users.$.email
364
+ type: secondary
365
+ - id: users.$.disp_company
366
+ type: Tag
367
+ layout:
368
+ flex: 0 0 auto
369
+ properties:
370
+ title:
371
+ _state: users.$.company.name
372
+ color: blue
373
+ ```
374
+
375
+ Invoice #1042
376
+
377
+ ```yaml
378
+ - id: inv_header
379
+ type: Box
380
+ layout:
381
+ justify: space-between
382
+ align: center
383
+ blocks:
384
+ - id: inv_title
385
+ type: Title
386
+ layout:
387
+ flex: 0 0 auto
388
+ properties:
389
+ content: "Invoice #1042"
390
+ level: 4
391
+ - id: inv_add
392
+ type: Button
393
+ layout:
394
+ flex: 0 0 auto
395
+ properties:
396
+ title: Add Line
397
+ icon: AiOutlinePlus
398
+ color: primary
399
+ variant: dashed
400
+ size: small
401
+ events:
402
+ onClick:
403
+ - id: inv_push
404
+ type: CallMethod
405
+ params:
406
+ blockId: inv
407
+ method: pushItem
408
+ - id: inv
409
+ type: List
410
+ blocks:
411
+ - id: inv.$.desc
412
+ type: TextInput
413
+ required: true
414
+ layout:
415
+ flex: 3 1 0
416
+ properties:
417
+ label:
418
+ disabled: true
419
+ placeholder: Description
420
+ - id: inv.$.qty
421
+ type: NumberInput
422
+ required: true
423
+ layout:
424
+ flex: 1 1 0
425
+ properties:
426
+ label:
427
+ disabled: true
428
+ placeholder: Qty
429
+ min: 1
430
+ - id: inv.$.price
431
+ type: NumberInput
432
+ required: true
433
+ layout:
434
+ flex: 1 1 0
435
+ properties:
436
+ label:
437
+ disabled: true
438
+ placeholder: Unit price
439
+ min: 0
440
+ step: 0.01
441
+ - id: inv.$.total
442
+ type: Paragraph
443
+ layout:
444
+ flex: 0 0 100px
445
+ properties:
446
+ content:
447
+ _js: |
448
+ const qty = state('inv.$.qty') || 0;
449
+ const price = state('inv.$.price') || 0;
450
+ return '$' + (qty * price).toFixed(2);
451
+ - id: inv.$.rm
452
+ type: Button
453
+ layout:
454
+ flex: 0 0 auto
455
+ properties:
456
+ icon: AiOutlineMinusCircle
457
+ color: danger
458
+ variant: text
459
+ size: small
460
+ shape: circle
461
+ events:
462
+ onClick:
463
+ - id: inv_rm
464
+ type: CallMethod
465
+ params:
466
+ blockId: inv
467
+ method: removeItem
468
+ args:
469
+ - _index: 0
470
+ - id: inv_footer
471
+ type: Box
472
+ layout:
473
+ gap: 16
474
+ justify: flex-end
475
+ align: center
476
+ blocks:
477
+ - id: inv_total
478
+ type: Statistic
479
+ layout:
480
+ flex: 0 0 auto
481
+ properties:
482
+ title: Total
483
+ prefix: $
484
+ precision: 2
485
+ value:
486
+ _js: |
487
+ const items = state('inv') || [];
488
+ return items.reduce((sum, item) =>
489
+ sum + ((item.qty || 0) * (item.price || 0)), 0);
490
+ - id: inv_submit
491
+ type: Button
492
+ layout:
493
+ flex: 0 0 auto
494
+ properties:
495
+ title: Submit Invoice
496
+ icon: AiOutlineSend
497
+ color: primary
498
+ variant: solid
499
+ events:
500
+ onClick:
501
+ - id: inv_validate
502
+ type: Validate
503
+ params:
504
+ regex: ^inv
505
+ - id: inv_msg
506
+ type: DisplayMessage
507
+ params:
508
+ content: Invoice submitted!
509
+ status: success
510
+ ```
511
+
512
+ | Property | Type | Default | Description |
513
+ | --- | --- | --- | --- |
514
+ | `direction` | string | - | List content along a 'row' or down a 'column'. Applies the 'flex-direction' css property to the List block. Enum: `row`, `column`, `row-reverse`, `column-reverse`. |
515
+ | `wrap` | string | - | Specifies wrapping style to be applied to List block as 'wrap', 'nowrap' or 'wrap-reverse'. Applies the 'flex-wrap' css property to the List block - defaults to 'wrap', requires List direction to be set. Enum: `wrap`, `nowrap`, `wrap-reverse`. |
516
+ | `scroll` | boolean | - | Specifies whether scrolling should be applied to the List, can be true or false. Applies the 'overflow' css property to the List block - defaults to 'visible', requires List direction to be set. |
517
+
518
+ | Event | Event Data | Description |
519
+ | --- | --- | --- |
520
+ | `onClick` | \- | Trigger actions when the List is clicked. |
521
+
522
+ | Key | Target |
523
+ | --- | --- |
524
+ | `/block` | Outer block wrapper (always available). |
525
+ | `/element` | The List element. |
526
+
527
+ | Slot | Description |
528
+ | --- | --- |
529
+ | `content` | Blocks rendered for each list item. |