@lowdefy/docs 4.0.0-alpha.7 → 4.0.0-alpha.8

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 (275) hide show
  1. package/dist/operators/client/filter_default_value.js +55 -0
  2. package/{public/modules/connectDocsearch.js → dist/operatorsClient.js} +1 -19
  3. package/{templates/blocks/schemaTransformer.js → dist/types.js} +5 -10
  4. package/package.json +19 -3
  5. package/404.yaml +0 -26
  6. package/CHANGELOG.md +0 -697
  7. package/actions/CallMethod.yaml +0 -57
  8. package/actions/JsAction.yaml +0 -281
  9. package/actions/Link.yaml +0 -120
  10. package/actions/Login.yaml +0 -123
  11. package/actions/Logout.yaml +0 -44
  12. package/actions/Message.yaml +0 -68
  13. package/actions/Notification.yaml +0 -84
  14. package/actions/Request.yaml +0 -70
  15. package/actions/Reset.yaml +0 -42
  16. package/actions/ResetValidation.yaml +0 -102
  17. package/actions/ScrollTo.yaml +0 -100
  18. package/actions/SetGlobal.yaml +0 -78
  19. package/actions/SetState.yaml +0 -85
  20. package/actions/Throw.yaml +0 -89
  21. package/actions/Validate.yaml +0 -104
  22. package/actions/Wait.yaml +0 -40
  23. package/blocks/all_icons.yaml +0 -803
  24. package/blocks/container/Affix.yaml +0 -26
  25. package/blocks/container/Alert.yaml +0 -27
  26. package/blocks/container/Badge.yaml +0 -27
  27. package/blocks/container/Box.yaml +0 -27
  28. package/blocks/container/Card.yaml +0 -29
  29. package/blocks/container/Collapse.yaml +0 -38
  30. package/blocks/container/Comment.yaml +0 -43
  31. package/blocks/container/ConfirmModal.yaml +0 -36
  32. package/blocks/container/Descriptions.yaml +0 -51
  33. package/blocks/container/Drawer.yaml +0 -46
  34. package/blocks/container/Label.yaml +0 -28
  35. package/blocks/container/Modal.yaml +0 -46
  36. package/blocks/container/PageHCF.yaml +0 -28
  37. package/blocks/container/PageHCSF.yaml +0 -29
  38. package/blocks/container/PageHSCF.yaml +0 -29
  39. package/blocks/container/PageHeaderMenu.yaml +0 -52
  40. package/blocks/container/PageSHCF.yaml +0 -29
  41. package/blocks/container/PageSiderMenu.yaml +0 -53
  42. package/blocks/container/Result.yaml +0 -34
  43. package/blocks/container/Span.yaml +0 -27
  44. package/blocks/container/Spin.yaml +0 -27
  45. package/blocks/container/Tabs.yaml +0 -41
  46. package/blocks/container/Tooltip.yaml +0 -38
  47. package/blocks/display/Anchor.yaml +0 -25
  48. package/blocks/display/Avatar.yaml +0 -23
  49. package/blocks/display/Breadcrumb.yaml +0 -28
  50. package/blocks/display/Button.yaml +0 -43
  51. package/blocks/display/DangerousHtml.yaml +0 -62
  52. package/blocks/display/DangerousMarkdown.yaml +0 -46
  53. package/blocks/display/Divider.yaml +0 -23
  54. package/blocks/display/EChart.yaml +0 -53
  55. package/blocks/display/Html.yaml +0 -50
  56. package/blocks/display/Icon.yaml +0 -23
  57. package/blocks/display/Img.yaml +0 -40
  58. package/blocks/display/Markdown.yaml +0 -31
  59. package/blocks/display/MarkdownWithCode.yaml +0 -46
  60. package/blocks/display/Menu.yaml +0 -48
  61. package/blocks/display/Message.yaml +0 -34
  62. package/blocks/display/MobileMenu.yaml +0 -47
  63. package/blocks/display/Notification.yaml +0 -34
  64. package/blocks/display/Paragraph.yaml +0 -30
  65. package/blocks/display/Progress.yaml +0 -52
  66. package/blocks/display/Skeleton.yaml +0 -27
  67. package/blocks/display/Statistic.yaml +0 -35
  68. package/blocks/display/Title.yaml +0 -32
  69. package/blocks/input/AutoComplete.yaml +0 -30
  70. package/blocks/input/ButtonSelector.yaml +0 -36
  71. package/blocks/input/CheckboxSelector.yaml +0 -36
  72. package/blocks/input/CheckboxSwitch.yaml +0 -56
  73. package/blocks/input/ChromeColorSelector.yaml +0 -24
  74. package/blocks/input/CircleColorSelector.yaml +0 -24
  75. package/blocks/input/ColorSelector.yaml +0 -24
  76. package/blocks/input/CompactColorSelector.yaml +0 -24
  77. package/blocks/input/DateRangeSelector.yaml +0 -26
  78. package/blocks/input/DateSelector.yaml +0 -26
  79. package/blocks/input/DateTimeSelector.yaml +0 -28
  80. package/blocks/input/GithubColorSelector.yaml +0 -24
  81. package/blocks/input/MonthSelector.yaml +0 -26
  82. package/blocks/input/MultipleSelector.yaml +0 -117
  83. package/blocks/input/NumberInput.yaml +0 -24
  84. package/blocks/input/Pagination.yaml +0 -33
  85. package/blocks/input/ParagraphInput.yaml +0 -32
  86. package/blocks/input/PasswordInput.yaml +0 -48
  87. package/blocks/input/RadioSelector.yaml +0 -36
  88. package/blocks/input/RatingSlider.yaml +0 -24
  89. package/blocks/input/S3UploadButton.yaml +0 -28
  90. package/blocks/input/Selector.yaml +0 -98
  91. package/blocks/input/SliderColorSelector.yaml +0 -24
  92. package/blocks/input/SwatchesColorSelector.yaml +0 -24
  93. package/blocks/input/Switch.yaml +0 -24
  94. package/blocks/input/TextArea.yaml +0 -27
  95. package/blocks/input/TextInput.yaml +0 -59
  96. package/blocks/input/TitleInput.yaml +0 -32
  97. package/blocks/input/TwitterColorSelector.yaml +0 -24
  98. package/blocks/input/WeekSelector.yaml +0 -26
  99. package/blocks/list/ControlledList.yaml +0 -191
  100. package/blocks/list/List.yaml +0 -157
  101. package/blocks/list/TimelineList.yaml +0 -136
  102. package/body.html +0 -1
  103. package/concepts/blocks.yaml +0 -249
  104. package/concepts/cli.yaml +0 -173
  105. package/concepts/connections-and-requests.yaml +0 -114
  106. package/concepts/context-and-state.yaml +0 -82
  107. package/concepts/custom-blocks.yaml +0 -190
  108. package/concepts/custom-code.yaml +0 -197
  109. package/concepts/events-and-actions.yaml +0 -224
  110. package/concepts/hosting-files.yaml +0 -50
  111. package/concepts/layout.yaml +0 -1464
  112. package/concepts/lists.yaml +0 -162
  113. package/concepts/lowdefy-schema.yaml +0 -245
  114. package/concepts/operators.yaml +0 -66
  115. package/concepts/overview.yaml +0 -48
  116. package/concepts/secrets.yaml +0 -56
  117. package/connections/AWSS3.yaml +0 -228
  118. package/connections/AmazonRedshift.yaml +0 -75
  119. package/connections/AxiosHttp.yaml +0 -194
  120. package/connections/Elasticsearch.yaml +0 -378
  121. package/connections/GoogleSheet.yaml +0 -332
  122. package/connections/Knex.yaml +0 -181
  123. package/connections/KnexRequests.md +0 -121
  124. package/connections/MSSQL.yaml +0 -90
  125. package/connections/MariaDB.yaml +0 -77
  126. package/connections/MongoDB.yaml +0 -581
  127. package/connections/MySQL.yaml +0 -92
  128. package/connections/OracleDB.yaml +0 -73
  129. package/connections/PostgreSQL.yaml +0 -99
  130. package/connections/Redis.yaml +0 -147
  131. package/connections/SQLite.yaml +0 -94
  132. package/connections/SendGridMail.yaml +0 -113
  133. package/connections/Stripe.yaml +0 -139
  134. package/deployment/aws-lambda.yaml +0 -128
  135. package/deployment/docker.yaml +0 -118
  136. package/deployment/netlify.yaml +0 -69
  137. package/deployment/node-server.yaml +0 -111
  138. package/head.html +0 -7
  139. package/howto/generate-csv.yaml.njk +0 -252
  140. package/howto/generate-pdf.yaml.njk +0 -651
  141. package/howto/generateCsv/lowdefy.yaml +0 -64
  142. package/howto/generateCsv/public/csvMake.js +0 -27
  143. package/howto/generatePdf/inv_template.yaml +0 -200
  144. package/howto/generatePdf/lowdefy.yaml +0 -117
  145. package/howto/generatePdf/my_header.html +0 -1
  146. package/howto/generatePdf/public/logo_example.png +0 -0
  147. package/howto/generatePdf/public/modules/importUmd.js +0 -7
  148. package/howto/generatePdf/public/modules/pdfMake.js +0 -7
  149. package/howto/generatePdf/public/modules/vfs_fonts.js +0 -12
  150. package/howto/use-refrences.md +0 -5
  151. package/introduction.yaml +0 -100
  152. package/lowdefy.yaml +0 -66
  153. package/menus.yaml +0 -832
  154. package/operators/_actions.yaml +0 -123
  155. package/operators/_and.yaml +0 -90
  156. package/operators/_args.yaml +0 -79
  157. package/operators/_array.yaml +0 -326
  158. package/operators/_base64.yaml +0 -56
  159. package/operators/_change_case.yaml +0 -347
  160. package/operators/_date.yaml +0 -71
  161. package/operators/_diff.yaml +0 -75
  162. package/operators/_divide.yaml +0 -46
  163. package/operators/_eq.yaml +0 -67
  164. package/operators/_event.yaml +0 -103
  165. package/operators/_format.yaml +0 -209
  166. package/operators/_function.yaml +0 -66
  167. package/operators/_get.yaml +0 -108
  168. package/operators/_global.yaml +0 -107
  169. package/operators/_gt.yaml +0 -65
  170. package/operators/_gte.yaml +0 -65
  171. package/operators/_hash.yaml +0 -109
  172. package/operators/_if.yaml +0 -44
  173. package/operators/_if_none.yaml +0 -61
  174. package/operators/_index.yaml +0 -65
  175. package/operators/_input.yaml +0 -114
  176. package/operators/_js.yaml +0 -189
  177. package/operators/_json.yaml +0 -128
  178. package/operators/_list_contexts.yaml +0 -37
  179. package/operators/_location.yaml +0 -59
  180. package/operators/_log.yaml +0 -36
  181. package/operators/_lt.yaml +0 -65
  182. package/operators/_lte.yaml +0 -65
  183. package/operators/_math.yaml +0 -374
  184. package/operators/_media.yaml +0 -86
  185. package/operators/_menu.yaml +0 -81
  186. package/operators/_mql.yaml +0 -101
  187. package/operators/_ne.yaml +0 -77
  188. package/operators/_not.yaml +0 -47
  189. package/operators/_number.yaml +0 -157
  190. package/operators/_nunjucks.yaml +0 -73
  191. package/operators/_object.yaml +0 -193
  192. package/operators/_operator.yaml +0 -47
  193. package/operators/_or.yaml +0 -81
  194. package/operators/_product.yaml +0 -59
  195. package/operators/_random.yaml +0 -104
  196. package/operators/_ref.yaml +0 -266
  197. package/operators/_regex.yaml +0 -83
  198. package/operators/_request.yaml +0 -50
  199. package/operators/_secret.yaml +0 -74
  200. package/operators/_state.yaml +0 -114
  201. package/operators/_string.yaml +0 -283
  202. package/operators/_subtract.yaml +0 -38
  203. package/operators/_sum.yaml +0 -59
  204. package/operators/_switch.yaml +0 -51
  205. package/operators/_type.yaml +0 -92
  206. package/operators/_uri.yaml +0 -56
  207. package/operators/_url_query.yaml +0 -120
  208. package/operators/_user.yaml +0 -107
  209. package/operators/_uuid.yaml +0 -114
  210. package/operators/_var.yaml +0 -105
  211. package/operators/_yaml.yaml +0 -107
  212. package/pages.yaml +0 -227
  213. package/public/images/authors/gervwyk.jpeg +0 -0
  214. package/public/images/authors/sandile.jpeg +0 -0
  215. package/public/images/howto/header_generate_csv.jpg +0 -0
  216. package/public/images/howto/header_generate_pdf.jpg +0 -0
  217. package/public/logo_example.png +0 -0
  218. package/public/lowdefy_app_schema.png +0 -0
  219. package/public/modules/csvMake.js +0 -27
  220. package/public/modules/filterDefaultValue.js +0 -48
  221. package/public/modules/importUmd.js +0 -7
  222. package/public/modules/index.js +0 -5
  223. package/public/modules/pdfMake.js +0 -7
  224. package/public/modules/test/filterDefaultValue.test.js +0 -91
  225. package/public/modules/vfs_fonts.js +0 -12
  226. package/public/sitemap.xml +0 -1024
  227. package/templates/actions.yaml.njk +0 -68
  228. package/templates/blocks/defaultValueTransformer.js +0 -53
  229. package/templates/blocks/exampleTransformer.js +0 -81
  230. package/templates/blocks/layout.yaml +0 -114
  231. package/templates/blocks/propertiesFormTransformer.js +0 -419
  232. package/templates/blocks/propertiesGetterTransformer.js +0 -132
  233. package/templates/blocks/schema.yaml.njk +0 -42
  234. package/templates/blocks/style.yaml +0 -26
  235. package/templates/blocks/template.yaml.njk +0 -495
  236. package/templates/blog.yaml.njk +0 -221
  237. package/templates/cli_command.yaml.njk +0 -37
  238. package/templates/footer.yaml.njk +0 -604
  239. package/templates/general.yaml.njk +0 -124
  240. package/templates/generateSitemap.js +0 -41
  241. package/templates/header.yaml +0 -138
  242. package/templates/navigation_buttons.yaml +0 -68
  243. package/templates/operators.yaml.njk +0 -82
  244. package/templates/operatorsMethodTransformer.js +0 -119
  245. package/templates/test/array.test.js +0 -1335
  246. package/templates/test/boolean.test.js +0 -98
  247. package/templates/test/button.test.js +0 -166
  248. package/templates/test/color.test.js +0 -126
  249. package/templates/test/enum.test.js +0 -105
  250. package/templates/test/icon.test.js +0 -109
  251. package/templates/test/integer.test.js +0 -99
  252. package/templates/test/manual.test.js +0 -238
  253. package/templates/test/number.test.js +0 -99
  254. package/templates/test/object.test.js +0 -434
  255. package/templates/test/oneOf.test.js +0 -794
  256. package/templates/test/string.test.js +0 -98
  257. package/templates/test/yaml.test.js +0 -605
  258. package/tutorial/next-steps.yaml +0 -83
  259. package/tutorial/tutorial-actions-operators-config.yaml +0 -142
  260. package/tutorial/tutorial-actions-operators.yaml +0 -436
  261. package/tutorial/tutorial-add-blocks-config.yaml +0 -109
  262. package/tutorial/tutorial-add-blocks.yaml +0 -195
  263. package/tutorial/tutorial-create-page-config.yaml +0 -77
  264. package/tutorial/tutorial-create-page.yaml +0 -196
  265. package/tutorial/tutorial-deploy.yaml +0 -146
  266. package/tutorial/tutorial-requests-config.yaml +0 -186
  267. package/tutorial/tutorial-requests.yaml +0 -338
  268. package/tutorial/tutorial-start.yaml +0 -282
  269. package/users/login-and-logout.yaml +0 -164
  270. package/users/openid-connect.yaml +0 -84
  271. package/users/protected-pages.yaml +0 -67
  272. package/users/roles.yaml +0 -70
  273. package/users/user-object.yaml +0 -73
  274. package/users/users-introduction.yaml +0 -80
  275. package/version.yaml +0 -1
@@ -1,252 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- # TODO: Rewrite using pdf-make plugin.
16
- _ref:
17
- path: templates/blog.yaml.njk
18
- vars:
19
- pageId: generate-csv-files-from-data
20
- pageTitle: How to generate CSVs using Lowdefy
21
- section: How To
22
- filePath: howto/generate-csv.yaml
23
- pageImage: /public/images/howto/header_generate_csv.jpg
24
- discussionsLink: https://github.com/lowdefy/lowdefy/discussions/891
25
- authorProfile: /public/images/authors/sandile.jpeg
26
- authorName: |
27
- <div>Sandile Memela</div>
28
- <a href="https://github.com/sah-memela">Follow @sah-memela on Github</a>
29
- articleLinks:
30
- - title: Generate PDFs from data in Lowdefy
31
- pageId: generate-pdf-document-from-data
32
- content:
33
- - id: md1
34
- type: MarkdownWithCode
35
- properties:
36
- style:
37
- text-align: left
38
- content: |
39
- Adding the functionality to generate a CSV file in Lowdefy can be accomplished by using a [JsAction](/JsAction). This action can be triggered by any in app event, such as clicking a button. This action evokes a JavaScript function that generates and downloads a CSV file.
40
-
41
- Click the button below to see this in action:
42
-
43
- - id: generate_csv
44
- type: Button
45
- properties:
46
- size: large
47
- title: Generate a CSV
48
- color: '#1890ff'
49
- events:
50
- onClick: []
51
- {# - id: generate_csv
52
- type: JsAction # TODO:
53
- params:
54
- name: csvMake
55
- args:
56
- - profiles.csv # csv filename
57
- - - Username: booker12 # an array of data, usually a reference
58
- Identifier: 9012
59
- FirstName: Rachel
60
- LastName: Booker
61
- - Username: grey07
62
- Identifier: 2070
63
- FirstName: Laura
64
- LastName: Grey
65
- - Username: johnson81
66
- Identifier: 4081
67
- FirstName: Craig
68
- LastName: Johnson
69
- - Username: jenkins46
70
- Identifier: 9346
71
- FirstName: Mary
72
- LastName: Jenkins
73
- - Username: smith79
74
- Identifier: 5079
75
- FirstName: Jamie
76
- LastName: Smith
77
- - - Username # an array of field definitions
78
- - Identifier
79
- - FirstName
80
- - LastName #}
81
-
82
- - id: md2
83
- type: MarkdownWithCode
84
- properties:
85
- content: |
86
- The full project folder for this how-to is available at:
87
- https://github.com/lowdefy/lowdefy/tree/main/packages/docs/howto/generateCsv
88
-
89
- > This how-to assumes that you are already running a Lowdefy app locally in dev mode. If not:
90
- > 1) Create a empty folder.
91
- > 2) Open your terminal or cmd and `cd` to your empty folder.
92
- > 3) Run `npx lowdefy@latest init && npx lowdefy@latest dev` to initialize and start your Lowdefy app development server.
93
-
94
- ## Generate CSV files TLDR;
95
-
96
- 1. Add the CSV JavaScript function to the app and register the [JsAction](/JsAction) method.
97
- 2. Load the custom JavaScript using a script tag.
98
- 3. Add a JsAction to a button's onClick event with parameters populated.
99
- - id: md_vid
100
- type: DangerousMarkdown
101
- properties:
102
- DOMPurifyOptions:
103
- ADD_TAGS:
104
- - iframe
105
- content: |
106
- <div style="position: relative; padding-bottom: 62.5%; height: 0;"><iframe src="https://www.loom.com/embed/b12dad89d2b54c5aad84bd92593bb7cd" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>
107
- - id: md2_1
108
- type: MarkdownWithCode
109
- properties:
110
- content: |
111
- ## 1. Add the CSV JavaScript function to the app and register the JsAction method
112
-
113
- Custom JavaScript code can be added to a Lowdefy app to allow it to accomplish things that extend the functionality of Lowdefy. Let's create a custom action which will generate a CSV based on a JavaScript function called `csvMakeFn`.
114
-
115
- 1) Create a `public` folder inside your Lowdefy working directory.
116
- 2) Since all content in the `public` folder is served by the Lowdefy server, simply create a `csvMake.js` file inside the `public` folder.
117
- 3) Add this script to the file and save.
118
-
119
- ###### /public/csvMake.js
120
- ```js
121
- const csvMakeFn = async (
122
- context,
123
- filename,
124
- data,
125
- fields,
126
- ) => {
127
- if (!Array.isArray(data) || typeof data[0] !== 'object') {
128
- throw new Error('csvMake data takes an array of objects');
129
- }
130
- if (!fields) {
131
- fields = Object.keys(data[0]);
132
- }
133
- const arrays = [fields];
134
- data.forEach(obj => arrays.push(fields.map(field => obj[field])));
135
- const csv = arrays.map(row =>
136
- row
137
- .map(cell => typeof cell === 'undefined' || cell === null ? '' : cell)
138
- .map(String)
139
- .map(v => v.replaceAll('"', '""'))
140
- .map(v => `"${v}"`)
141
- .join(',')
142
- ).join('\r\n');
143
- const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' });
144
- const url = URL.createObjectURL(blob);
145
- const el = document.createElement('a');
146
- el.href = url;
147
- el.setAttribute('download', filename);
148
- el.click();
149
- };
150
- window.lowdefy.registerJsAction('csvMake', csvMakeFn);
151
- ```
152
- This script gets a few things done, firstly a csvMake function is defined and it checks if an array of data has been provided and whether the CSV fields have been populated. It then creates an array with fields and adds the provided data to the array according to the field definition. Finally, a file is downloaded using this data string.
153
-
154
- It is important to note that to call this function from within your Lowdefy app, it needs to be registered as a [JsAction](/JsAction). This is done by calling the `window.registerAction` function, which takes two arguments - the action name and the action function. Once this is done, the action can be triggered by any event that calls this function along with parameters.
155
-
156
- ## 2. Load the custom JavaScript using a script tag
157
-
158
- To load the external JavaScript file we use the `app.html.appendHead` property in the `lowdefy.yaml` file to add a script tag that loads the module:
159
-
160
- ###### /lowdefy.yaml
161
- ```yaml
162
- name: Generate a CSV
163
- lowdefy: {{ version }}
164
- app:
165
- html:
166
- appendHead: |
167
- <script type="module" src="/public/csvMake.js"></script>
168
- pages:
169
- # ...
170
- ```
171
-
172
- This instructs the browser to fetch and execute our JavaScript file, which registers the action function so it can be used in the app.
173
-
174
- ## 3. Add a JsAction to a button's onClick event with parameters populated
175
-
176
- Lowdefy actions are triggered by events, like `onClick` when a user clicks a button, or `onEnter` when the page loads. Lowdefy comes with a list of predefined actions, however, sometimes custom code is just what you need.
177
-
178
- By default Lowdefy builds apps with a set of pre-configured, default block types to make it easier to build apps, for example using [`Button`](/Button), [`TextInput`](/TextInput), [`Box`](/Box), etc. All the blocks documented in the Lowdefy docs are default types.
179
-
180
- We will be using a [`Button`](/Button) with an `onClick` event to trigger the JsAction that will generate and download the CSV from the provided data.
181
-
182
- We will need to pass an array with the arguments for the csvMake function (csv filename, data, field definitions) to the custom JsAction.
183
-
184
- Edit the `docs_button` in the Welcome page to include the JsAction as shown below:
185
-
186
- ###### /lowdefy.yaml
187
- ```yaml
188
- lowdefy: 3.23.2
189
- name: Generate PDF from data with Lowdefy
190
-
191
- app:
192
- html:
193
- appendHead: |
194
- <script type="module" src="/public/csvMake.js"></script>
195
-
196
- pages:
197
- - id: example
198
- type: PageHeaderMenu
199
- properties:
200
- title: Example
201
- areas:
202
- content:
203
- justify: center
204
- blocks:
205
- - id: generate_csv
206
- type: Button
207
- properties:
208
- size: large
209
- title: Generate a CSV
210
- color: '#1890ff'
211
- events:
212
- onClick:
213
- - id: generate_csv
214
- type: JsAction # TODO:
215
- params:
216
- name: csvMake
217
- args:
218
- - profiles.csv # csv filename
219
- - - Username: booker12 # an array of data, usually a reference
220
- Identifier: 9012
221
- FirstName: Rachel
222
- LastName: Booker
223
- - Username: grey07
224
- Identifier: 2070
225
- FirstName: Laura
226
- LastName: Grey
227
- - Username: johnson81
228
- Identifier: 4081
229
- FirstName: Craig
230
- LastName: Johnson
231
- - Username: jenkins46
232
- Identifier: 9346
233
- FirstName: Mary
234
- LastName: Jenkins
235
- - Username: smith79
236
- Identifier: 5079
237
- FirstName: Jamie
238
- LastName: Smith
239
- - - Username # an array of field definitions
240
- - Identifier
241
- - FirstName
242
- - LastName
243
- ```
244
-
245
- ## Conclusion
246
-
247
- Congratulations 🏆 your custom JsAction is now available in your Lowdefy app and ready to use to generate a CSV with the click of a button.
248
-
249
- Check out the project folder for this how-to and why not give it a try:
250
- https://github.com/lowdefy/lowdefy/tree/main/packages/docs/howto/generateCsv
251
-
252
- Next, try fetching data from a data source and generate a CSV from the returned data.