@lowdefy/docs 3.23.2 → 4.0.0-alpha.10

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 (274) hide show
  1. package/dist/operators/client/filter_default_value.js +55 -0
  2. package/{public/modules/connectDocsearch.js → dist/operatorsClient.js} +2 -20
  3. package/{templates/blocks/schemaTransformer.js → dist/types.js} +6 -11
  4. package/package.json +23 -8
  5. package/404.yaml +0 -26
  6. package/CHANGELOG.md +0 -659
  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 -802
  24. package/blocks/container/Affix.yaml +0 -26
  25. package/blocks/container/Badge.yaml +0 -27
  26. package/blocks/container/Box.yaml +0 -27
  27. package/blocks/container/Card.yaml +0 -29
  28. package/blocks/container/Collapse.yaml +0 -38
  29. package/blocks/container/Comment.yaml +0 -43
  30. package/blocks/container/ConfirmModal.yaml +0 -36
  31. package/blocks/container/Drawer.yaml +0 -45
  32. package/blocks/container/Label.yaml +0 -29
  33. package/blocks/container/Modal.yaml +0 -46
  34. package/blocks/container/Result.yaml +0 -34
  35. package/blocks/container/Span.yaml +0 -27
  36. package/blocks/container/Spin.yaml +0 -27
  37. package/blocks/container/Tabs.yaml +0 -41
  38. package/blocks/container/Tooltip.yaml +0 -38
  39. package/blocks/context/Context.yaml +0 -27
  40. package/blocks/context/PageHCF.yaml +0 -28
  41. package/blocks/context/PageHCSF.yaml +0 -29
  42. package/blocks/context/PageHSCF.yaml +0 -29
  43. package/blocks/context/PageHeaderMenu.yaml +0 -52
  44. package/blocks/context/PageSHCF.yaml +0 -29
  45. package/blocks/context/PageSiderMenu.yaml +0 -53
  46. package/blocks/display/Alert.yaml +0 -26
  47. package/blocks/display/Anchor.yaml +0 -26
  48. package/blocks/display/Avatar.yaml +0 -24
  49. package/blocks/display/Breadcrumb.yaml +0 -29
  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/Descriptions.yaml +0 -49
  54. package/blocks/display/Divider.yaml +0 -25
  55. package/blocks/display/EChart.yaml +0 -53
  56. package/blocks/display/Html.yaml +0 -50
  57. package/blocks/display/Icon.yaml +0 -25
  58. package/blocks/display/Img.yaml +0 -40
  59. package/blocks/display/Markdown.yaml +0 -32
  60. package/blocks/display/MarkdownWithCode.yaml +0 -48
  61. package/blocks/display/Menu.yaml +0 -48
  62. package/blocks/display/Message.yaml +0 -34
  63. package/blocks/display/MobileMenu.yaml +0 -48
  64. package/blocks/display/Notification.yaml +0 -34
  65. package/blocks/display/Paragraph.yaml +0 -32
  66. package/blocks/display/Progress.yaml +0 -53
  67. package/blocks/display/Skeleton.yaml +0 -28
  68. package/blocks/display/Statistic.yaml +0 -37
  69. package/blocks/display/Title.yaml +0 -32
  70. package/blocks/input/AutoComplete.yaml +0 -31
  71. package/blocks/input/ButtonSelector.yaml +0 -37
  72. package/blocks/input/CheckboxSelector.yaml +0 -37
  73. package/blocks/input/CheckboxSwitch.yaml +0 -56
  74. package/blocks/input/ChromeColorSelector.yaml +0 -25
  75. package/blocks/input/CircleColorSelector.yaml +0 -25
  76. package/blocks/input/ColorSelector.yaml +0 -25
  77. package/blocks/input/CompactColorSelector.yaml +0 -25
  78. package/blocks/input/DateRangeSelector.yaml +0 -27
  79. package/blocks/input/DateSelector.yaml +0 -27
  80. package/blocks/input/DateTimeSelector.yaml +0 -29
  81. package/blocks/input/GithubColorSelector.yaml +0 -25
  82. package/blocks/input/MonthSelector.yaml +0 -27
  83. package/blocks/input/MultipleSelector.yaml +0 -117
  84. package/blocks/input/NumberInput.yaml +0 -24
  85. package/blocks/input/Pagination.yaml +0 -33
  86. package/blocks/input/ParagraphInput.yaml +0 -32
  87. package/blocks/input/PasswordInput.yaml +0 -48
  88. package/blocks/input/RadioSelector.yaml +0 -36
  89. package/blocks/input/RatingSlider.yaml +0 -24
  90. package/blocks/input/S3UploadButton.yaml +0 -28
  91. package/blocks/input/Selector.yaml +0 -98
  92. package/blocks/input/SliderColorSelector.yaml +0 -24
  93. package/blocks/input/SwatchesColorSelector.yaml +0 -24
  94. package/blocks/input/Switch.yaml +0 -24
  95. package/blocks/input/TextArea.yaml +0 -28
  96. package/blocks/input/TextInput.yaml +0 -59
  97. package/blocks/input/TitleInput.yaml +0 -32
  98. package/blocks/input/TwitterColorSelector.yaml +0 -24
  99. package/blocks/input/WeekSelector.yaml +0 -26
  100. package/blocks/list/ControlledList.yaml +0 -191
  101. package/blocks/list/List.yaml +0 -158
  102. package/blocks/list/TimelineList.yaml +0 -135
  103. package/body.html +0 -1
  104. package/concepts/blocks.yaml +0 -249
  105. package/concepts/cli.yaml +0 -173
  106. package/concepts/connections-and-requests.yaml +0 -114
  107. package/concepts/context-and-state.yaml +0 -82
  108. package/concepts/custom-blocks.yaml +0 -176
  109. package/concepts/custom-code.yaml +0 -196
  110. package/concepts/events-and-actions.yaml +0 -224
  111. package/concepts/hosting-files.yaml +0 -50
  112. package/concepts/layout.yaml +0 -1464
  113. package/concepts/lists.yaml +0 -162
  114. package/concepts/lowdefy-schema.yaml +0 -244
  115. package/concepts/operators.yaml +0 -66
  116. package/concepts/overview.yaml +0 -48
  117. package/concepts/secrets.yaml +0 -56
  118. package/connections/AWSS3.yaml +0 -228
  119. package/connections/AmazonRedshift.yaml +0 -75
  120. package/connections/AxiosHttp.yaml +0 -194
  121. package/connections/Elasticsearch.yaml +0 -378
  122. package/connections/GoogleSheet.yaml +0 -332
  123. package/connections/Knex.yaml +0 -181
  124. package/connections/KnexRequests.md +0 -121
  125. package/connections/MSSQL.yaml +0 -90
  126. package/connections/MariaDB.yaml +0 -77
  127. package/connections/MongoDB.yaml +0 -452
  128. package/connections/MySQL.yaml +0 -92
  129. package/connections/OracleDB.yaml +0 -73
  130. package/connections/PostgreSQL.yaml +0 -99
  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 -251
  140. package/howto/generate-pdf.yaml.njk +0 -651
  141. package/howto/generateCsv/lowdefy.yaml +0 -63
  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 -116
  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/introduction.yaml +0 -100
  151. package/lowdefy.yaml +0 -66
  152. package/menus.yaml +0 -841
  153. package/operators/_actions.yaml +0 -123
  154. package/operators/_and.yaml +0 -90
  155. package/operators/_args.yaml +0 -79
  156. package/operators/_array.yaml +0 -326
  157. package/operators/_base64.yaml +0 -56
  158. package/operators/_change_case.yaml +0 -347
  159. package/operators/_date.yaml +0 -71
  160. package/operators/_diff.yaml +0 -76
  161. package/operators/_divide.yaml +0 -46
  162. package/operators/_eq.yaml +0 -67
  163. package/operators/_event.yaml +0 -102
  164. package/operators/_format.yaml +0 -209
  165. package/operators/_function.yaml +0 -66
  166. package/operators/_get.yaml +0 -108
  167. package/operators/_global.yaml +0 -106
  168. package/operators/_gt.yaml +0 -65
  169. package/operators/_gte.yaml +0 -65
  170. package/operators/_hash.yaml +0 -109
  171. package/operators/_if.yaml +0 -44
  172. package/operators/_if_none.yaml +0 -61
  173. package/operators/_index.yaml +0 -64
  174. package/operators/_input.yaml +0 -113
  175. package/operators/_js.yaml +0 -189
  176. package/operators/_json.yaml +0 -128
  177. package/operators/_list_contexts.yaml +0 -37
  178. package/operators/_location.yaml +0 -59
  179. package/operators/_log.yaml +0 -36
  180. package/operators/_lt.yaml +0 -65
  181. package/operators/_lte.yaml +0 -65
  182. package/operators/_math.yaml +0 -374
  183. package/operators/_media.yaml +0 -86
  184. package/operators/_menu.yaml +0 -81
  185. package/operators/_mql.yaml +0 -101
  186. package/operators/_ne.yaml +0 -77
  187. package/operators/_not.yaml +0 -47
  188. package/operators/_number.yaml +0 -157
  189. package/operators/_nunjucks.yaml +0 -73
  190. package/operators/_object.yaml +0 -193
  191. package/operators/_operator.yaml +0 -47
  192. package/operators/_or.yaml +0 -81
  193. package/operators/_product.yaml +0 -59
  194. package/operators/_random.yaml +0 -104
  195. package/operators/_ref.yaml +0 -232
  196. package/operators/_regex.yaml +0 -83
  197. package/operators/_request.yaml +0 -50
  198. package/operators/_secret.yaml +0 -74
  199. package/operators/_state.yaml +0 -113
  200. package/operators/_string.yaml +0 -283
  201. package/operators/_subtract.yaml +0 -38
  202. package/operators/_sum.yaml +0 -59
  203. package/operators/_switch.yaml +0 -51
  204. package/operators/_type.yaml +0 -92
  205. package/operators/_uri.yaml +0 -56
  206. package/operators/_url_query.yaml +0 -119
  207. package/operators/_user.yaml +0 -107
  208. package/operators/_uuid.yaml +0 -114
  209. package/operators/_var.yaml +0 -105
  210. package/operators/_yaml.yaml +0 -83
  211. package/pages.yaml +0 -228
  212. package/public/images/authors/gervwyk.jpeg +0 -0
  213. package/public/images/authors/sandile.jpeg +0 -0
  214. package/public/images/howto/header_generate_csv.jpg +0 -0
  215. package/public/images/howto/header_generate_pdf.jpg +0 -0
  216. package/public/logo_example.png +0 -0
  217. package/public/lowdefy_app_schema.png +0 -0
  218. package/public/modules/csvMake.js +0 -27
  219. package/public/modules/filterDefaultValue.js +0 -48
  220. package/public/modules/importUmd.js +0 -7
  221. package/public/modules/index.js +0 -5
  222. package/public/modules/pdfMake.js +0 -7
  223. package/public/modules/test/filterDefaultValue.test.js +0 -91
  224. package/public/modules/vfs_fonts.js +0 -12
  225. package/public/sitemap.xml +0 -1024
  226. package/templates/actions.yaml.njk +0 -68
  227. package/templates/blocks/defaultValueTransformer.js +0 -51
  228. package/templates/blocks/exampleTransformer.js +0 -81
  229. package/templates/blocks/layout.yaml +0 -114
  230. package/templates/blocks/propertiesFormTransformer.js +0 -419
  231. package/templates/blocks/propertiesGetterTransformer.js +0 -132
  232. package/templates/blocks/schema.yaml.njk +0 -42
  233. package/templates/blocks/style.yaml +0 -26
  234. package/templates/blocks/template.yaml.njk +0 -496
  235. package/templates/blog.yaml.njk +0 -221
  236. package/templates/cli_command.yaml.njk +0 -37
  237. package/templates/footer.yaml.njk +0 -604
  238. package/templates/general.yaml.njk +0 -124
  239. package/templates/generateSitemap.js +0 -42
  240. package/templates/header.yaml +0 -138
  241. package/templates/navigation_buttons.yaml +0 -68
  242. package/templates/operators.yaml.njk +0 -82
  243. package/templates/operatorsMethodTransformer.js +0 -119
  244. package/templates/test/array.test.js +0 -1355
  245. package/templates/test/boolean.test.js +0 -102
  246. package/templates/test/button.test.js +0 -170
  247. package/templates/test/color.test.js +0 -128
  248. package/templates/test/enum.test.js +0 -109
  249. package/templates/test/icon.test.js +0 -113
  250. package/templates/test/integer.test.js +0 -103
  251. package/templates/test/manual.test.js +0 -246
  252. package/templates/test/number.test.js +0 -103
  253. package/templates/test/object.test.js +0 -442
  254. package/templates/test/oneOf.test.js +0 -806
  255. package/templates/test/string.test.js +0 -102
  256. package/templates/test/yaml.test.js +0 -621
  257. package/tutorial/next-steps.yaml +0 -83
  258. package/tutorial/tutorial-actions-operators-config.yaml +0 -142
  259. package/tutorial/tutorial-actions-operators.yaml +0 -436
  260. package/tutorial/tutorial-add-blocks-config.yaml +0 -109
  261. package/tutorial/tutorial-add-blocks.yaml +0 -195
  262. package/tutorial/tutorial-create-page-config.yaml +0 -77
  263. package/tutorial/tutorial-create-page.yaml +0 -196
  264. package/tutorial/tutorial-deploy.yaml +0 -146
  265. package/tutorial/tutorial-requests-config.yaml +0 -186
  266. package/tutorial/tutorial-requests.yaml +0 -338
  267. package/tutorial/tutorial-start.yaml +0 -282
  268. package/users/login-and-logout.yaml +0 -164
  269. package/users/openid-connect.yaml +0 -84
  270. package/users/protected-pages.yaml +0 -67
  271. package/users/roles.yaml +0 -70
  272. package/users/user-object.yaml +0 -73
  273. package/users/users-introduction.yaml +0 -80
  274. package/version.yaml +0 -1
@@ -1,224 +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
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: events-and-actions
19
- pageTitle: Events and Actions
20
- section: Concepts
21
- filePath: concepts/events-and-actions.yaml
22
- content:
23
- - id: md1
24
- type: MarkdownWithCode
25
- properties:
26
- content: |
27
- ### TLDR
28
- - Events are triggered when something happens on a page, like clicking a button or loading a page.
29
- - A list of actions are executed sequentially by a triggered event.
30
- - If an action errors, the actions that follow are skipped.
31
- - Actions that are `async: true` will not executed sequentially nor stop the event if they error.
32
- - Action errors can be handled by providing a list of `try` and `catch` actions to the event.
33
- - Operators used in action `params` are evaluated right before the action is executed.
34
- - The [`_actions`](/_actions)) operator is available for sequential actions to use the values returned from preceding actions in the chain.
35
- - Actions have a `skip` field that can be used to skip action execution.
36
- - The `onInit` event is triggered the first time a context is mounted and keeps the page in loading until all actions have finished.
37
- - The `onEnter` event is triggered the every time a context is mounted and keeps the page in loading until all actions have finished.
38
- - The `onInitAsync` event is triggered the first time a context is mounted and does not keep the page in loading.
39
- - The `onEnterAsync` event is triggered the every time a context is mounted and does not keep the page in loading.
40
-
41
- -----------
42
-
43
- Blocks can define _events_ which the block can trigger when something happens on the page, like a button being clicked, an input's value being modified or a page being loaded. Some examples are `onClick` on a [`Button`](/Button) or `onEnter` on a [`PageHeaderMenu`](/PageHeaderMenu) block.
44
-
45
- All blocks implements `onMount` and `onMountAsync` events. These are useful for triggering actions when a block is mounted. For the `onMount` event, the block only mounts when the event action chain is completed, however, for the `onMountAsync` event, the block will mount as soon as possible while the event actions completes execution.
46
-
47
- _Actions_ are tasks that can be executed, like calling a request, linking to a new page or changing a value in state. An array of actions can be defined for a event on a block. If that event gets triggered, those actions will execute sequentially. If any actions error while executing, the actions that follow it won't be executed, however, `catch` actions chain can be defined on a event to trigger when an error in a chain of actions occurs.
48
-
49
- Actions which are `async: true` are an exception to the sequential rule of the actions chain. These actions will be executed asynchronously and the next actions in the chain will not wait for them to finish. If any `async: true` action throws an error, the chain will not be stopped and the event will still be completed successfully.
50
-
51
- Each action has an `id`, unique to that action chain, and a `type` field which are required.
52
-
53
- Actions can have a `params` field for specifying input parameters when executing the action. Operators used in action `params` will be evaluated right before the action is executed. Some events might have data relating to that event, like what the new value of an input is, or the row that was clicked in a table. The `event` object can be used in the action using the [`_event`](/_event) operator. Some actions also return values which can be passed to preceding actions in the same action chain using the [`_actions`](/_actions) operator.
54
-
55
- Actions can also have a `skip` field. Operators in the `skip` field will be evaluated before an action is executed, and if the evaluated result is `true`, that action is skipped and the next action is executed.
56
-
57
- # Action Schema
58
-
59
- The schema for a Lowdefy action is:
60
-
61
- - `id: string`: __Required__ - A identifier for the action. It must be unique within the action chain it is defined in.
62
- - `type: string`: __Required__ - The action type to be used. It must be a valid action type.
63
- - `skip: boolean`: The test that determines whether the action will be skipped or not. This is usually written as operators which evaluates to a `true` or `false`. __Operators are evaluated__.
64
- - `async: boolean`: This determines whether the action will be evaluated asynchronously. Operators are __not__ evaluated on `async`.
65
- - `messages: object`: __Operators are evaluated__.
66
- - `error: boolean | string`: If `boolean`, whether an error message should be displayed if the action throws an error. Error messages are shown by default. If a `string`, the error message to show to the user.
67
- - `loading: boolean | string`: If `boolean`, whether a loading message should be displayed while the action is executing. Loading messages are not shown by default. If a `string`, the loading message to show to the user.
68
- - `success: boolean | string`: If `boolean`, whether a success message should be displayed if the action completes successfully. Success messages are not shown by default. If a `string`, the success message to show to the user.
69
- - `params: object`: The input passed to the action. __Operators are evaluated__.
70
-
71
- ###### Events and actions definition example:
72
- ```yaml
73
- - id: block_with_actions
74
- type: Block
75
- properties:
76
- # ...
77
- events:
78
- onEvent1:
79
- - id: action1
80
- type: ActionType1
81
- skip:
82
- # Operator expression that returns true if action should be skipped.
83
- params:
84
- # ...
85
- - id: action2
86
- type: ActionType2
87
- onEvent2:
88
- - id: action3
89
- type: ActionType3
90
- params:
91
- # ...
92
- ```
93
- # The actions object
94
-
95
- When events are triggered, each completed action writes its response to the actions object under the action id object key. Thus all following actions in a event action list have access to the responses of all preceding actions in the same event list through the [`_actions`](/_actions) operator.
96
-
97
- # The event object
98
-
99
- When events are triggered, the can provide a data object describing the event (e.g. a description of the clicked item or uploaded file). This data object can be accessed using the [`_event`](/_event) operator in an action definition.
100
-
101
- The schema for passing actions to Lowdefy events is:
102
- ```
103
- (eventName: action[])
104
- (eventName: {
105
- debounce?: {
106
- ms?: number,
107
- immediate?: boolean,
108
- },
109
- try: action[],
110
- catch?: action[],
111
- })
112
- ```
113
-
114
- # Catching action errors
115
-
116
- If one action in the chain of event actions fails by throwing an error, the actions in the list following the failed action will not be executed. To handle any errors thrown by an action, Lowdefy event actions can be provided as lists of `try` and `catch` actions.
117
-
118
- ###### Event try catch actions example for dealing with action errors:
119
- ```yaml
120
- - id: block_with_actions
121
- type: Block
122
- properties:
123
- # ...
124
- events:
125
- onEvent1:
126
- try:
127
- - id: action1
128
- type: ActionType1
129
- params:
130
- # ...
131
- - id: action2
132
- type: ActionType2
133
- catch:
134
- - id: unsuccessful
135
- type: ActionType1
136
- params:
137
- # ...
138
- ```
139
-
140
- # Debouncing events
141
-
142
- Event debouncing can be turned on by setting the `debounce` field on event objects. If `debounce.immediate` is `true`, leading edge debouncing or throttling will apply, else it will be debounced as trailing edge.
143
-
144
- To control the debounce delay, set `debounce.ms` to the number of milliseconds to delay. The default delay is 300 milliseconds. If an event is triggered within that time, the event will not be triggered again. See [debounce vs throttling](https://redd.one/blog/debounce-vs-throttle) for a more detailed explanation.
145
-
146
- ###### Event trailing edge debouncing example:
147
- ```yaml
148
- - id: block_with_actions
149
- type: Block
150
- properties:
151
- # ...
152
- events:
153
- onEvent1:
154
- debounce:
155
- ms: 1000
156
- try:
157
- - id: action1
158
- type: ActionType1
159
- params:
160
- # ...
161
- - id: action2
162
- type: ActionType2
163
- ```
164
-
165
- ###### Event throttling or leading edge debouncing example:
166
- ```yaml
167
- - id: block_with_actions
168
- type: Block
169
- properties:
170
- # ...
171
- events:
172
- onEvent1:
173
- debounce:
174
- ms: 1000
175
- immediate: true
176
- try:
177
- - id: action1
178
- type: ActionType1
179
- params:
180
- # ...
181
- - id: action2
182
- type: ActionType2
183
- ```
184
-
185
- # Context initialisation events
186
-
187
- Four events are always defined for [`context`](/context) type blocks, called in the following order:
188
- - `onInit`
189
- - `onEnter`
190
- - `onInitAsync`
191
- - `onEnterAsync`
192
-
193
- These events can be used to initialize the context or page.
194
-
195
- The `onInit` event is triggered the first time a context is mounted, for example if a page is loaded for the first time. This event blocks page render, in other words, the page __will__ remain in a loading state until all the actions have completed execution. It can be used to set up a context. Actions that take a long time to execute, like `Request`, should be used sparingly here.
196
-
197
- The `onEnter` event is triggered every time a context is mounted to a page, for example if a user left a page, and returns to it. This event also blocks page render. It can be used to execute actions that should be run each time a page is loaded, like checking if an id is present in the [url query parameters](/_url_query), and initializing the [`state`](/context-and-state).
198
-
199
- The `onInitAsync` event is triggered the first time a context is mounted, but does not block page render. In other words, the page __will not__ remain in a loading state until all the actions have completed execution. This is a good place to execute non-blocking tasks or requests that might take longer to execute.
200
-
201
- The `onEnterAsync` event is triggered every time a context is mounted, but does not block page render.
202
-
203
- # Action types
204
-
205
- The following actions can be used:
206
-
207
- - [`CallMethod`](/CallMethod) - Call a method defined by another block.
208
- - [`JsAction`](/JsAction) - Call a custom JavaScript function as an action.
209
- - [`Link`](/Link) - Link to another page.
210
- - [`Message`](/Message) - Show a message to the user.
211
- - [`Notification`](/Notification) - Show a notification to the user.
212
- - [`Request`](/Request) - Call a request.
213
- - [`Reset`](/Reset) - Reset the page validation and `state`.
214
- - [`ScrollTo`](/ScrollTo) - Scroll to a point on the page.
215
- - [`SetGlobal`](/SetGlobal) - Set a value to the `global` variable object.
216
- - [`SetState`](/SetState) - Set a value to the page `state`.
217
- - [`Validate`](/Validate) - Validate the inputs on the page.
218
- - _ref:
219
- path: templates/navigation_buttons.yaml
220
- vars:
221
- previous_page_title: Connections and Requests
222
- previous_page_id: connections-and-requests
223
- next_page_title: Operators
224
- next_page_id: operators
@@ -1,50 +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
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: hosting-files
19
- pageTitle: Hosting Files
20
- section: Concepts
21
- filePath: concepts/hosting-files.yaml
22
- content:
23
- - id: md1
24
- type: Markdown
25
- properties:
26
- content: |
27
- A Lowdefy app provides a convenient method to host __public__ files under the `/public/*` app route. Add content to be hosted publicly by creating a folder named `public` in the root of a Lowdefy project folder, next to the `lowdefy.yaml` file. Place the public content in this folder to host this content with your app.
28
-
29
- All content in this folder will be publicly accessible at `{{ APP_URL }}/public/{{ FILE_PATH_NAME }}`. For example, the logo at the top of this page is hosted at [`https://docs.lowdefy.com/public/logo-light-theme.png`](http://localhost:3000/public/logo-light-theme.png). Sub-folders inside the public folder are supported.
30
-
31
- By default, the `public` folder of a Lowdefy app will serve some files which most apps need:
32
- - `apple-touch-icon.png`: A 180x180px png image file to be used as the apple PWA icon.
33
- - `icon-32.png`: A 32x32px png image file to be used as fallback favicon for some browsers.
34
- - `icon-512.png`: A 512x512px png image icon.
35
- - `icon.svg`: A svg image file which will be used as favicon if supported by browser.
36
- - `logo-dark-theme.png`: A ~250x72px png image used as the header image for [`PageHeaderMenu`](/PageHeaderMenu) and [`PageSiderMenu`](/PageSiderMenu) blocks on desktop when the block theme is set to `dark`.
37
- - `logo-light-theme.png`: A ~250x72px png image used as the header image for `PageHeaderMenu` and `PageSiderMenu` blocks on desktop when the block theme is set to `light`.
38
- - `logo-square-dark-theme.png`: A ~125x125px png image used as the header image for `PageHeaderMenu` and `PageSiderMenu` blocks on mobile when the block theme is set to `dark`.
39
- - `logo-square-light-theme.png`: A ~125x125px png image used as the header image for `PageHeaderMenu` and `PageSiderMenu` blocks on mobile when the block theme is set to `light`.
40
- - `manifest.webmanifest`: The app [web manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest).
41
-
42
- Any of these files can be overwritten by replacing the file with a modified version. For example, to replace the logo inside the header of `PageSiderMenu` on all pages, add a ~250x72px logo inside the project folder at `/public/logo-light-theme.png`.
43
-
44
- - _ref:
45
- path: templates/navigation_buttons.yaml
46
- vars:
47
- previous_page_title: Lists
48
- previous_page_id: lists
49
- next_page_title: Custom Code
50
- next_page_id: custom-code