@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.
- package/dist/operators/client/filter_default_value.js +55 -0
- package/{public/modules/connectDocsearch.js → dist/operatorsClient.js} +1 -19
- package/{templates/blocks/schemaTransformer.js → dist/types.js} +5 -10
- package/package.json +19 -3
- package/404.yaml +0 -26
- package/CHANGELOG.md +0 -697
- package/actions/CallMethod.yaml +0 -57
- package/actions/JsAction.yaml +0 -281
- package/actions/Link.yaml +0 -120
- package/actions/Login.yaml +0 -123
- package/actions/Logout.yaml +0 -44
- package/actions/Message.yaml +0 -68
- package/actions/Notification.yaml +0 -84
- package/actions/Request.yaml +0 -70
- package/actions/Reset.yaml +0 -42
- package/actions/ResetValidation.yaml +0 -102
- package/actions/ScrollTo.yaml +0 -100
- package/actions/SetGlobal.yaml +0 -78
- package/actions/SetState.yaml +0 -85
- package/actions/Throw.yaml +0 -89
- package/actions/Validate.yaml +0 -104
- package/actions/Wait.yaml +0 -40
- package/blocks/all_icons.yaml +0 -803
- package/blocks/container/Affix.yaml +0 -26
- package/blocks/container/Alert.yaml +0 -27
- package/blocks/container/Badge.yaml +0 -27
- package/blocks/container/Box.yaml +0 -27
- package/blocks/container/Card.yaml +0 -29
- package/blocks/container/Collapse.yaml +0 -38
- package/blocks/container/Comment.yaml +0 -43
- package/blocks/container/ConfirmModal.yaml +0 -36
- package/blocks/container/Descriptions.yaml +0 -51
- package/blocks/container/Drawer.yaml +0 -46
- package/blocks/container/Label.yaml +0 -28
- package/blocks/container/Modal.yaml +0 -46
- package/blocks/container/PageHCF.yaml +0 -28
- package/blocks/container/PageHCSF.yaml +0 -29
- package/blocks/container/PageHSCF.yaml +0 -29
- package/blocks/container/PageHeaderMenu.yaml +0 -52
- package/blocks/container/PageSHCF.yaml +0 -29
- package/blocks/container/PageSiderMenu.yaml +0 -53
- package/blocks/container/Result.yaml +0 -34
- package/blocks/container/Span.yaml +0 -27
- package/blocks/container/Spin.yaml +0 -27
- package/blocks/container/Tabs.yaml +0 -41
- package/blocks/container/Tooltip.yaml +0 -38
- package/blocks/display/Anchor.yaml +0 -25
- package/blocks/display/Avatar.yaml +0 -23
- package/blocks/display/Breadcrumb.yaml +0 -28
- package/blocks/display/Button.yaml +0 -43
- package/blocks/display/DangerousHtml.yaml +0 -62
- package/blocks/display/DangerousMarkdown.yaml +0 -46
- package/blocks/display/Divider.yaml +0 -23
- package/blocks/display/EChart.yaml +0 -53
- package/blocks/display/Html.yaml +0 -50
- package/blocks/display/Icon.yaml +0 -23
- package/blocks/display/Img.yaml +0 -40
- package/blocks/display/Markdown.yaml +0 -31
- package/blocks/display/MarkdownWithCode.yaml +0 -46
- package/blocks/display/Menu.yaml +0 -48
- package/blocks/display/Message.yaml +0 -34
- package/blocks/display/MobileMenu.yaml +0 -47
- package/blocks/display/Notification.yaml +0 -34
- package/blocks/display/Paragraph.yaml +0 -30
- package/blocks/display/Progress.yaml +0 -52
- package/blocks/display/Skeleton.yaml +0 -27
- package/blocks/display/Statistic.yaml +0 -35
- package/blocks/display/Title.yaml +0 -32
- package/blocks/input/AutoComplete.yaml +0 -30
- package/blocks/input/ButtonSelector.yaml +0 -36
- package/blocks/input/CheckboxSelector.yaml +0 -36
- package/blocks/input/CheckboxSwitch.yaml +0 -56
- package/blocks/input/ChromeColorSelector.yaml +0 -24
- package/blocks/input/CircleColorSelector.yaml +0 -24
- package/blocks/input/ColorSelector.yaml +0 -24
- package/blocks/input/CompactColorSelector.yaml +0 -24
- package/blocks/input/DateRangeSelector.yaml +0 -26
- package/blocks/input/DateSelector.yaml +0 -26
- package/blocks/input/DateTimeSelector.yaml +0 -28
- package/blocks/input/GithubColorSelector.yaml +0 -24
- package/blocks/input/MonthSelector.yaml +0 -26
- package/blocks/input/MultipleSelector.yaml +0 -117
- package/blocks/input/NumberInput.yaml +0 -24
- package/blocks/input/Pagination.yaml +0 -33
- package/blocks/input/ParagraphInput.yaml +0 -32
- package/blocks/input/PasswordInput.yaml +0 -48
- package/blocks/input/RadioSelector.yaml +0 -36
- package/blocks/input/RatingSlider.yaml +0 -24
- package/blocks/input/S3UploadButton.yaml +0 -28
- package/blocks/input/Selector.yaml +0 -98
- package/blocks/input/SliderColorSelector.yaml +0 -24
- package/blocks/input/SwatchesColorSelector.yaml +0 -24
- package/blocks/input/Switch.yaml +0 -24
- package/blocks/input/TextArea.yaml +0 -27
- package/blocks/input/TextInput.yaml +0 -59
- package/blocks/input/TitleInput.yaml +0 -32
- package/blocks/input/TwitterColorSelector.yaml +0 -24
- package/blocks/input/WeekSelector.yaml +0 -26
- package/blocks/list/ControlledList.yaml +0 -191
- package/blocks/list/List.yaml +0 -157
- package/blocks/list/TimelineList.yaml +0 -136
- package/body.html +0 -1
- package/concepts/blocks.yaml +0 -249
- package/concepts/cli.yaml +0 -173
- package/concepts/connections-and-requests.yaml +0 -114
- package/concepts/context-and-state.yaml +0 -82
- package/concepts/custom-blocks.yaml +0 -190
- package/concepts/custom-code.yaml +0 -197
- package/concepts/events-and-actions.yaml +0 -224
- package/concepts/hosting-files.yaml +0 -50
- package/concepts/layout.yaml +0 -1464
- package/concepts/lists.yaml +0 -162
- package/concepts/lowdefy-schema.yaml +0 -245
- package/concepts/operators.yaml +0 -66
- package/concepts/overview.yaml +0 -48
- package/concepts/secrets.yaml +0 -56
- package/connections/AWSS3.yaml +0 -228
- package/connections/AmazonRedshift.yaml +0 -75
- package/connections/AxiosHttp.yaml +0 -194
- package/connections/Elasticsearch.yaml +0 -378
- package/connections/GoogleSheet.yaml +0 -332
- package/connections/Knex.yaml +0 -181
- package/connections/KnexRequests.md +0 -121
- package/connections/MSSQL.yaml +0 -90
- package/connections/MariaDB.yaml +0 -77
- package/connections/MongoDB.yaml +0 -581
- package/connections/MySQL.yaml +0 -92
- package/connections/OracleDB.yaml +0 -73
- package/connections/PostgreSQL.yaml +0 -99
- package/connections/Redis.yaml +0 -147
- package/connections/SQLite.yaml +0 -94
- package/connections/SendGridMail.yaml +0 -113
- package/connections/Stripe.yaml +0 -139
- package/deployment/aws-lambda.yaml +0 -128
- package/deployment/docker.yaml +0 -118
- package/deployment/netlify.yaml +0 -69
- package/deployment/node-server.yaml +0 -111
- package/head.html +0 -7
- package/howto/generate-csv.yaml.njk +0 -252
- package/howto/generate-pdf.yaml.njk +0 -651
- package/howto/generateCsv/lowdefy.yaml +0 -64
- package/howto/generateCsv/public/csvMake.js +0 -27
- package/howto/generatePdf/inv_template.yaml +0 -200
- package/howto/generatePdf/lowdefy.yaml +0 -117
- package/howto/generatePdf/my_header.html +0 -1
- package/howto/generatePdf/public/logo_example.png +0 -0
- package/howto/generatePdf/public/modules/importUmd.js +0 -7
- package/howto/generatePdf/public/modules/pdfMake.js +0 -7
- package/howto/generatePdf/public/modules/vfs_fonts.js +0 -12
- package/howto/use-refrences.md +0 -5
- package/introduction.yaml +0 -100
- package/lowdefy.yaml +0 -66
- package/menus.yaml +0 -832
- package/operators/_actions.yaml +0 -123
- package/operators/_and.yaml +0 -90
- package/operators/_args.yaml +0 -79
- package/operators/_array.yaml +0 -326
- package/operators/_base64.yaml +0 -56
- package/operators/_change_case.yaml +0 -347
- package/operators/_date.yaml +0 -71
- package/operators/_diff.yaml +0 -75
- package/operators/_divide.yaml +0 -46
- package/operators/_eq.yaml +0 -67
- package/operators/_event.yaml +0 -103
- package/operators/_format.yaml +0 -209
- package/operators/_function.yaml +0 -66
- package/operators/_get.yaml +0 -108
- package/operators/_global.yaml +0 -107
- package/operators/_gt.yaml +0 -65
- package/operators/_gte.yaml +0 -65
- package/operators/_hash.yaml +0 -109
- package/operators/_if.yaml +0 -44
- package/operators/_if_none.yaml +0 -61
- package/operators/_index.yaml +0 -65
- package/operators/_input.yaml +0 -114
- package/operators/_js.yaml +0 -189
- package/operators/_json.yaml +0 -128
- package/operators/_list_contexts.yaml +0 -37
- package/operators/_location.yaml +0 -59
- package/operators/_log.yaml +0 -36
- package/operators/_lt.yaml +0 -65
- package/operators/_lte.yaml +0 -65
- package/operators/_math.yaml +0 -374
- package/operators/_media.yaml +0 -86
- package/operators/_menu.yaml +0 -81
- package/operators/_mql.yaml +0 -101
- package/operators/_ne.yaml +0 -77
- package/operators/_not.yaml +0 -47
- package/operators/_number.yaml +0 -157
- package/operators/_nunjucks.yaml +0 -73
- package/operators/_object.yaml +0 -193
- package/operators/_operator.yaml +0 -47
- package/operators/_or.yaml +0 -81
- package/operators/_product.yaml +0 -59
- package/operators/_random.yaml +0 -104
- package/operators/_ref.yaml +0 -266
- package/operators/_regex.yaml +0 -83
- package/operators/_request.yaml +0 -50
- package/operators/_secret.yaml +0 -74
- package/operators/_state.yaml +0 -114
- package/operators/_string.yaml +0 -283
- package/operators/_subtract.yaml +0 -38
- package/operators/_sum.yaml +0 -59
- package/operators/_switch.yaml +0 -51
- package/operators/_type.yaml +0 -92
- package/operators/_uri.yaml +0 -56
- package/operators/_url_query.yaml +0 -120
- package/operators/_user.yaml +0 -107
- package/operators/_uuid.yaml +0 -114
- package/operators/_var.yaml +0 -105
- package/operators/_yaml.yaml +0 -107
- package/pages.yaml +0 -227
- package/public/images/authors/gervwyk.jpeg +0 -0
- package/public/images/authors/sandile.jpeg +0 -0
- package/public/images/howto/header_generate_csv.jpg +0 -0
- package/public/images/howto/header_generate_pdf.jpg +0 -0
- package/public/logo_example.png +0 -0
- package/public/lowdefy_app_schema.png +0 -0
- package/public/modules/csvMake.js +0 -27
- package/public/modules/filterDefaultValue.js +0 -48
- package/public/modules/importUmd.js +0 -7
- package/public/modules/index.js +0 -5
- package/public/modules/pdfMake.js +0 -7
- package/public/modules/test/filterDefaultValue.test.js +0 -91
- package/public/modules/vfs_fonts.js +0 -12
- package/public/sitemap.xml +0 -1024
- package/templates/actions.yaml.njk +0 -68
- package/templates/blocks/defaultValueTransformer.js +0 -53
- package/templates/blocks/exampleTransformer.js +0 -81
- package/templates/blocks/layout.yaml +0 -114
- package/templates/blocks/propertiesFormTransformer.js +0 -419
- package/templates/blocks/propertiesGetterTransformer.js +0 -132
- package/templates/blocks/schema.yaml.njk +0 -42
- package/templates/blocks/style.yaml +0 -26
- package/templates/blocks/template.yaml.njk +0 -495
- package/templates/blog.yaml.njk +0 -221
- package/templates/cli_command.yaml.njk +0 -37
- package/templates/footer.yaml.njk +0 -604
- package/templates/general.yaml.njk +0 -124
- package/templates/generateSitemap.js +0 -41
- package/templates/header.yaml +0 -138
- package/templates/navigation_buttons.yaml +0 -68
- package/templates/operators.yaml.njk +0 -82
- package/templates/operatorsMethodTransformer.js +0 -119
- package/templates/test/array.test.js +0 -1335
- package/templates/test/boolean.test.js +0 -98
- package/templates/test/button.test.js +0 -166
- package/templates/test/color.test.js +0 -126
- package/templates/test/enum.test.js +0 -105
- package/templates/test/icon.test.js +0 -109
- package/templates/test/integer.test.js +0 -99
- package/templates/test/manual.test.js +0 -238
- package/templates/test/number.test.js +0 -99
- package/templates/test/object.test.js +0 -434
- package/templates/test/oneOf.test.js +0 -794
- package/templates/test/string.test.js +0 -98
- package/templates/test/yaml.test.js +0 -605
- package/tutorial/next-steps.yaml +0 -83
- package/tutorial/tutorial-actions-operators-config.yaml +0 -142
- package/tutorial/tutorial-actions-operators.yaml +0 -436
- package/tutorial/tutorial-add-blocks-config.yaml +0 -109
- package/tutorial/tutorial-add-blocks.yaml +0 -195
- package/tutorial/tutorial-create-page-config.yaml +0 -77
- package/tutorial/tutorial-create-page.yaml +0 -196
- package/tutorial/tutorial-deploy.yaml +0 -146
- package/tutorial/tutorial-requests-config.yaml +0 -186
- package/tutorial/tutorial-requests.yaml +0 -338
- package/tutorial/tutorial-start.yaml +0 -282
- package/users/login-and-logout.yaml +0 -164
- package/users/openid-connect.yaml +0 -84
- package/users/protected-pages.yaml +0 -67
- package/users/roles.yaml +0 -70
- package/users/user-object.yaml +0 -73
- package/users/users-introduction.yaml +0 -80
- package/version.yaml +0 -1
|
@@ -1,84 +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/actions.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: NotificationAction
|
|
19
|
-
pageTitle: Notification
|
|
20
|
-
filePath: actions/Notification.yaml
|
|
21
|
-
types: |
|
|
22
|
-
```
|
|
23
|
-
(params: {
|
|
24
|
-
status?: enum,
|
|
25
|
-
duration?: number,
|
|
26
|
-
message?: string,
|
|
27
|
-
description?: string,
|
|
28
|
-
placement?: enum,
|
|
29
|
-
bottom?: number,
|
|
30
|
-
top?: number
|
|
31
|
-
}): void
|
|
32
|
-
```
|
|
33
|
-
description: |
|
|
34
|
-
The `Notification` action is used to display a notification message to a user.
|
|
35
|
-
params: |
|
|
36
|
-
###### object
|
|
37
|
-
- `status: enum`: Message status type. Defaults to `success`. One of:
|
|
38
|
-
- `success`
|
|
39
|
-
- `error`
|
|
40
|
-
- `info`
|
|
41
|
-
- `warning`
|
|
42
|
-
- `loading`.
|
|
43
|
-
- `duration: number`: Time in seconds before the notification disappears. When set to 0 or null, it will never be closed automatically. The default is 5.
|
|
44
|
-
- `message: string`: The title of notification. Default is "Success".
|
|
45
|
-
- `description: sttring`: The content of the notification.
|
|
46
|
-
- `placement: enum`: Position of the notification. Default is `bottomRight`. Can be one of:
|
|
47
|
-
- `topLeft`
|
|
48
|
-
- `topRight`
|
|
49
|
-
- `bottomLeft`
|
|
50
|
-
- `bottomRight`
|
|
51
|
-
- `bottom: number`: Distance from the bottom of the viewport, when placement is `bottomRight`or `bottomLeft` in pixels. The default is 24.
|
|
52
|
-
- `top: number`: Distance from the bottom of the viewport, when placement is `topRight`or `topLeft` in pixels. The default is 24.
|
|
53
|
-
examples: |
|
|
54
|
-
###### Display a success notification:
|
|
55
|
-
```yaml
|
|
56
|
-
- id: success
|
|
57
|
-
type: Notification
|
|
58
|
-
params:
|
|
59
|
-
message: Hello
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
###### Display an info notification with a description:
|
|
63
|
-
```yaml
|
|
64
|
-
- id: info
|
|
65
|
-
type: Notification
|
|
66
|
-
params:
|
|
67
|
-
message: Something happened
|
|
68
|
-
status: info
|
|
69
|
-
description: This is a longer description of the thing that happened, so that you know why it happened.
|
|
70
|
-
duration: 10
|
|
71
|
-
placement: topRight
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
###### Display an warning notification that does not disappear until closed:
|
|
75
|
-
```yaml
|
|
76
|
-
- id: warning
|
|
77
|
-
type: Notification
|
|
78
|
-
params:
|
|
79
|
-
message: Something bad might happen.
|
|
80
|
-
status: warning
|
|
81
|
-
description: This is a longer description of the thing that happened, so that you know why it happened.
|
|
82
|
-
duration: 0
|
|
83
|
-
placement: topRight
|
|
84
|
-
```
|
package/actions/Request.yaml
DELETED
|
@@ -1,70 +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/actions.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: Request
|
|
19
|
-
pageTitle: Request
|
|
20
|
-
filePath: actions/Request.yaml
|
|
21
|
-
types: |
|
|
22
|
-
```
|
|
23
|
-
(options: {all: boolean}): void
|
|
24
|
-
(requestId: string): void
|
|
25
|
-
(requestIds: string[]): void
|
|
26
|
-
```
|
|
27
|
-
description: |
|
|
28
|
-
The `Request` action calls a request, or if used during an `onInit` or `onEnter` events, calls those requests while a page loads.
|
|
29
|
-
`Request` can be used to call all requests on a `context`, a list of requests, or a single request. The `Request` action is synchronous, actions defined after
|
|
30
|
-
it will only run once all the called requests have returned.
|
|
31
|
-
|
|
32
|
-
To call requests that load data, the `onInitAsync` and `onEnterAsync` events can be used. These will execute the actions while the page begins to render. If the `onInit` or `onEnter` events are used, the page will only start rendering after the actions have completed.
|
|
33
|
-
|
|
34
|
-
`Request` can be called without any parameters to call all requests in the `context`. It can also be called with a list of requestIds or a single requestId to call.
|
|
35
|
-
|
|
36
|
-
params: |
|
|
37
|
-
###### object
|
|
38
|
-
- `all: boolean`: All requests in the context are called if `all` is set to true.
|
|
39
|
-
|
|
40
|
-
###### string
|
|
41
|
-
A requestId of the request to call.
|
|
42
|
-
|
|
43
|
-
###### string[]
|
|
44
|
-
An array of requestIds of the requests to call.
|
|
45
|
-
|
|
46
|
-
examples: |
|
|
47
|
-
###### Call a single request:
|
|
48
|
-
```yaml
|
|
49
|
-
- id: call_one_request
|
|
50
|
-
type: Request
|
|
51
|
-
params: my_request_id
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
###### Call a list of requests:
|
|
55
|
-
```yaml
|
|
56
|
-
- id: call_many_requests
|
|
57
|
-
type: Request
|
|
58
|
-
params:
|
|
59
|
-
- my_request_id_1
|
|
60
|
-
- my_request_id_2
|
|
61
|
-
- my_request_id_3
|
|
62
|
-
```
|
|
63
|
-
###### Call all requests:
|
|
64
|
-
|
|
65
|
-
```yaml
|
|
66
|
-
- id: call_all
|
|
67
|
-
type: Request
|
|
68
|
-
params:
|
|
69
|
-
all: true
|
|
70
|
-
```
|
package/actions/Reset.yaml
DELETED
|
@@ -1,42 +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/actions.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: Reset
|
|
19
|
-
pageTitle: Reset
|
|
20
|
-
filePath: actions/Reset.yaml
|
|
21
|
-
types: |
|
|
22
|
-
```
|
|
23
|
-
(void): void
|
|
24
|
-
```
|
|
25
|
-
description: |
|
|
26
|
-
The `Reset` actions resets a context to the state it was in just after the `onInit` event was executed. This clears the user's inputs.
|
|
27
|
-
|
|
28
|
-
> The `Reset` action resets the state to the state before the `onEnter` event is executed, and the `onEnter` event is not executed after the reset happens. This might cause unexpected behavior if you used an `onEnter` event to initialize the state.
|
|
29
|
-
params: |
|
|
30
|
-
The `Reset` action does not take any parameters.
|
|
31
|
-
examples: |
|
|
32
|
-
###### A reset button:
|
|
33
|
-
```yaml
|
|
34
|
-
- id: reset_button
|
|
35
|
-
type: Button
|
|
36
|
-
properties:
|
|
37
|
-
title: Reset
|
|
38
|
-
events:
|
|
39
|
-
onClick:
|
|
40
|
-
- id: reset
|
|
41
|
-
type: Reset
|
|
42
|
-
```
|
|
@@ -1,102 +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/actions.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: ResetValidation
|
|
19
|
-
pageTitle: ResetValidation
|
|
20
|
-
filePath: actions/ResetValidation.yaml
|
|
21
|
-
types: |
|
|
22
|
-
```
|
|
23
|
-
(void): void
|
|
24
|
-
(blockId: string): void
|
|
25
|
-
(blockIds: string[]): void
|
|
26
|
-
(params: {
|
|
27
|
-
blockId?: string|string[],
|
|
28
|
-
regex?: string|string[],
|
|
29
|
-
}): void
|
|
30
|
-
```
|
|
31
|
-
description: |
|
|
32
|
-
The `ResetValidation` action is used to reset validation flags on input fields.
|
|
33
|
-
|
|
34
|
-
By default when a page is opened, no validation flags are set on any input fields. When the `Validate` is called, a validation flag is set on input fields matching the validation params. To reset the validation flags, use the `ResetValidation` action.
|
|
35
|
-
|
|
36
|
-
The `ResetValidation` action `blockIds` or `regex` params are used to limit which blocks validation errors and warnings should be reset.
|
|
37
|
-
|
|
38
|
-
params: |
|
|
39
|
-
###### void
|
|
40
|
-
The `ResetValidation` action lowers validation flags on all blocks on the page if called without params.
|
|
41
|
-
|
|
42
|
-
###### string
|
|
43
|
-
A blockId of the block for which to lower validation flags.
|
|
44
|
-
|
|
45
|
-
###### string[]
|
|
46
|
-
An array of blockIds of the blocks for which to lower validation flags.
|
|
47
|
-
|
|
48
|
-
###### object
|
|
49
|
-
- `blockId?: string|string[]`: A blockId or an array of the blockIds of the blocks for which to lower validation flags
|
|
50
|
-
- `regex?: string|string[]`: A regex string pattern or an array of regex string patterns to match the blockIds for which to lower validation flags.
|
|
51
|
-
|
|
52
|
-
examples: |
|
|
53
|
-
###### Lower validation flags for all inputs on the page:
|
|
54
|
-
```yaml
|
|
55
|
-
- id: reset_all
|
|
56
|
-
type: ResetValidation
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
###### Lower validation flags for a single input:
|
|
60
|
-
```yaml
|
|
61
|
-
- id: reset_my_input
|
|
62
|
-
type: ResetValidation
|
|
63
|
-
params: my_input
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
###### Lower validation flags for a list of inputs:
|
|
67
|
-
```yaml
|
|
68
|
-
- id: reset_input_a_and_b
|
|
69
|
-
type: ResetValidation
|
|
70
|
-
params:
|
|
71
|
-
- my_input_a
|
|
72
|
-
- my_input_b
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
###### Lower validation flags for all inputs matching a regex pattern:
|
|
76
|
-
```yaml
|
|
77
|
-
- id: reset_foo
|
|
78
|
-
type: ResetValidation
|
|
79
|
-
params:
|
|
80
|
-
regex: ^foo\.
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
###### Lower validation flags for all inputs matching a list of regex patterns:
|
|
84
|
-
```yaml
|
|
85
|
-
- id: reset_foo_and_price
|
|
86
|
-
type: ResetValidation
|
|
87
|
-
params:
|
|
88
|
-
regex:
|
|
89
|
-
- ^foo\.
|
|
90
|
-
- ^.*price.*$
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
###### Lower validation flags for all inputs matching a list of regex patterns and a blockId:
|
|
94
|
-
```yaml
|
|
95
|
-
- id: reset_foo_price_and_my_input
|
|
96
|
-
type: ResetValidation
|
|
97
|
-
params:
|
|
98
|
-
blockId: my_input
|
|
99
|
-
regex:
|
|
100
|
-
- ^foo\.
|
|
101
|
-
- ^.*price.*$
|
|
102
|
-
```
|
package/actions/ScrollTo.yaml
DELETED
|
@@ -1,100 +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/actions.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: ScrollTo
|
|
19
|
-
pageTitle: ScrollTo
|
|
20
|
-
filePath: actions/ScrollTo.yaml
|
|
21
|
-
types: |
|
|
22
|
-
```
|
|
23
|
-
(params: {
|
|
24
|
-
top?: number,
|
|
25
|
-
left?: number,
|
|
26
|
-
behavior?: enum
|
|
27
|
-
}): void
|
|
28
|
-
|
|
29
|
-
(params: {
|
|
30
|
-
blockId: string,
|
|
31
|
-
options: {
|
|
32
|
-
behavior?: enum,
|
|
33
|
-
block? enum,
|
|
34
|
-
inline?: enum
|
|
35
|
-
}
|
|
36
|
-
}): void
|
|
37
|
-
```
|
|
38
|
-
description: |
|
|
39
|
-
The `ScrollTo` action is used to scroll the users browser. It is often used to scroll back to the top
|
|
40
|
-
of a long form after resetting the form, or to scroll the user to the top of a page after linking to a new page.
|
|
41
|
-
|
|
42
|
-
The `ScrollTo` action has two modes - scrolling to a block and scrolling to x and y coordinates on a page.
|
|
43
|
-
|
|
44
|
-
> When scrolling to a block, `ScrollTo` implements [`Element.scrollIntoView()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView), while
|
|
45
|
-
when scrolling to coordinates, it implements [`Window.scrollTo()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo).
|
|
46
|
-
params: |
|
|
47
|
-
###### Scroll to coordinates
|
|
48
|
-
- `top: number`: Specifies the number of pixels along the Y axis to scroll the window.
|
|
49
|
-
- `left: number`: Specifies the number of pixels along the X axis to scroll the window.
|
|
50
|
-
- `behavior: enum`: Defines the transition animation. One of `auto` or `smooth`.
|
|
51
|
-
|
|
52
|
-
###### Scroll to a block
|
|
53
|
-
- `blockId: string`: __Required__ - The blockId of a block to scroll to.
|
|
54
|
-
- `options: object`: _Object_
|
|
55
|
-
- `behavior: enum`: Defines the transition animation. One of `auto` or `smooth`. Defaults to `auto`.
|
|
56
|
-
- `block: enum`: Defines vertical alignment. One of `start`, `center`, `end`, or `nearest`. Defaults to `start`.
|
|
57
|
-
- `inline: enum`: Defines horizontal alignment. One of `start`, `center`, `end`, or `nearest`. Defaults to `nearest`.
|
|
58
|
-
examples: |
|
|
59
|
-
###### Scroll to a block:
|
|
60
|
-
```yaml
|
|
61
|
-
- id: scroll_to_block
|
|
62
|
-
type: ScrollTo
|
|
63
|
-
params:
|
|
64
|
-
blockId: my_block
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
###### Scroll to the top of the page:
|
|
68
|
-
```yaml
|
|
69
|
-
- id: scroll_to_top
|
|
70
|
-
type: ScrollTo
|
|
71
|
-
params:
|
|
72
|
-
top: 0
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
###### Scroll to the top of the page after linking from a previous page:
|
|
76
|
-
```yaml
|
|
77
|
-
- id: link_button
|
|
78
|
-
type: Button
|
|
79
|
-
events:
|
|
80
|
-
onClick:
|
|
81
|
-
- id: link_
|
|
82
|
-
type: Link
|
|
83
|
-
params:
|
|
84
|
-
pageId: next_page
|
|
85
|
-
- id: scroll_to_top
|
|
86
|
-
type: ScrollTo
|
|
87
|
-
params:
|
|
88
|
-
top: 0
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
###### Scroll to the centre of a block:
|
|
92
|
-
```yaml
|
|
93
|
-
- id: scroll_to_block
|
|
94
|
-
type: ScrollTo
|
|
95
|
-
params:
|
|
96
|
-
blockId: my_block
|
|
97
|
-
options:
|
|
98
|
-
block: center
|
|
99
|
-
inline: center
|
|
100
|
-
```
|
package/actions/SetGlobal.yaml
DELETED
|
@@ -1,78 +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/actions.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: SetGlobal
|
|
19
|
-
pageTitle: SetGlobal
|
|
20
|
-
filePath: actions/SetGlobal.yaml
|
|
21
|
-
types: |
|
|
22
|
-
```
|
|
23
|
-
(toSet: object): void
|
|
24
|
-
```
|
|
25
|
-
description: |
|
|
26
|
-
The `SetGlobal` action sets values to the `global` object. It takes an object as parameters, and sets each of those values to the `global` object.
|
|
27
|
-
This is useful if you need to set a value that needs to be available across multiple pages in the app, like the id of a currently selected
|
|
28
|
-
object. `SetGlobal` works just like `SetState`, except it sets to the `global` object and not `state`.
|
|
29
|
-
params: |
|
|
30
|
-
###### object
|
|
31
|
-
Object with key value pairs to set in `global`.
|
|
32
|
-
examples: |
|
|
33
|
-
###### Set a single value to global:
|
|
34
|
-
```yaml
|
|
35
|
-
- id: set_selected_company
|
|
36
|
-
type: SetGlobal
|
|
37
|
-
params:
|
|
38
|
-
selected_selected_company:
|
|
39
|
-
_state: company.id
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
###### Set multiple values to state:
|
|
43
|
-
```yaml
|
|
44
|
-
- id: multiple_values
|
|
45
|
-
type: SetGlobal
|
|
46
|
-
params:
|
|
47
|
-
firstName: Monica
|
|
48
|
-
lastName: Geller
|
|
49
|
-
address:
|
|
50
|
-
street: 90 Bedford St
|
|
51
|
-
city: New York
|
|
52
|
-
zipCode: '10014'
|
|
53
|
-
country: US
|
|
54
|
-
friends:
|
|
55
|
-
- Ross Geller
|
|
56
|
-
- Rachel Green
|
|
57
|
-
- Chandler Bing
|
|
58
|
-
- Phoebe Buffay
|
|
59
|
-
- Joey Tribbiani
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
###### Using dot notation:
|
|
63
|
-
```yaml
|
|
64
|
-
- id: dot_notation
|
|
65
|
-
type: SetGlobal
|
|
66
|
-
params:
|
|
67
|
-
firstName: Monica
|
|
68
|
-
lastName: Geller
|
|
69
|
-
address.street: 90 Bedford St
|
|
70
|
-
address.city: New York
|
|
71
|
-
address.zipCode: '10014'
|
|
72
|
-
address.country: US
|
|
73
|
-
friends.0: Ross Geller
|
|
74
|
-
friends.1: Rachel Green
|
|
75
|
-
friends.2: Chandler Bing
|
|
76
|
-
friends.3: Phoebe Buffay
|
|
77
|
-
friends.5: Joey Tribbiani
|
|
78
|
-
```
|
package/actions/SetState.yaml
DELETED
|
@@ -1,85 +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/actions.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: SetState
|
|
19
|
-
pageTitle: SetState
|
|
20
|
-
filePath: actions/SetState.yaml
|
|
21
|
-
types: |
|
|
22
|
-
```
|
|
23
|
-
(toSet: object): void
|
|
24
|
-
```
|
|
25
|
-
description: |
|
|
26
|
-
The `SetState` action sets values in `state`. It takes an object as parameters, and sets each of those values to the `state` object.
|
|
27
|
-
This is useful if you want to initialize `state`, set a flag after an action has executed (eg. to disable a button), or to set the result
|
|
28
|
-
of a request to state.
|
|
29
|
-
params: |
|
|
30
|
-
###### object
|
|
31
|
-
Object with key value pairs to set in `state`.
|
|
32
|
-
examples: |
|
|
33
|
-
###### Set a single value to state:
|
|
34
|
-
```yaml
|
|
35
|
-
- id: single_value
|
|
36
|
-
type: SetState
|
|
37
|
-
params:
|
|
38
|
-
message: Hello
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
###### Set multiple values to state:
|
|
42
|
-
```yaml
|
|
43
|
-
- id: multiple_values
|
|
44
|
-
type: SetState
|
|
45
|
-
params:
|
|
46
|
-
firstName: Monica
|
|
47
|
-
lastName: Geller
|
|
48
|
-
address:
|
|
49
|
-
street: 90 Bedford St
|
|
50
|
-
city: New York
|
|
51
|
-
zipCode: '10014'
|
|
52
|
-
country: US
|
|
53
|
-
friends:
|
|
54
|
-
- Ross Geller
|
|
55
|
-
- Rachel Green
|
|
56
|
-
- Chandler Bing
|
|
57
|
-
- Phoebe Buffay
|
|
58
|
-
- Joey Tribbiani
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
###### Using dot notation:
|
|
62
|
-
```yaml
|
|
63
|
-
- id: dot_notation
|
|
64
|
-
type: SetState
|
|
65
|
-
params:
|
|
66
|
-
firstName: Monica
|
|
67
|
-
lastName: Geller
|
|
68
|
-
address.street: 90 Bedford St
|
|
69
|
-
address.city: New York
|
|
70
|
-
address.zipCode: '10014'
|
|
71
|
-
address.country: US
|
|
72
|
-
friends.0: Ross Geller
|
|
73
|
-
friends.1: Rachel Green
|
|
74
|
-
friends.2: Chandler Bing
|
|
75
|
-
friends.3: Phoebe Buffay
|
|
76
|
-
friends.5: Joey Tribbiani
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
###### Initialize state with the value of a request:
|
|
80
|
-
```yaml
|
|
81
|
-
- id: initialize
|
|
82
|
-
type: SetState
|
|
83
|
-
params:
|
|
84
|
-
_request: getUser
|
|
85
|
-
```
|
package/actions/Throw.yaml
DELETED
|
@@ -1,89 +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/actions.yaml.njk
|
|
17
|
-
vars:
|
|
18
|
-
pageId: Throw
|
|
19
|
-
pageTitle: Throw
|
|
20
|
-
filePath: actions/Throw.yaml
|
|
21
|
-
types: |
|
|
22
|
-
```
|
|
23
|
-
(params: {
|
|
24
|
-
throw?: boolean,
|
|
25
|
-
message?: string,
|
|
26
|
-
metaData?: any
|
|
27
|
-
}): void
|
|
28
|
-
```
|
|
29
|
-
description: |
|
|
30
|
-
The `Throw` action is used throw an error to the user and log to the console. If `throw: true`, the `Throw`
|
|
31
|
-
action will throw an error, and this will stop the execution of actions that are defined after it. If the action does not thrown, the `Throw` action will do nothing and the actions defined after it will be executed.
|
|
32
|
-
|
|
33
|
-
params: |
|
|
34
|
-
- `throw: boolean`: Throws an error and stops the action chain when `true` or continues the action chain when `false` or undefined.
|
|
35
|
-
- `message: string`: The error message to show to the user and log to the console if `throw: true`. This message can be overridden by setting the action's `messages.error`.
|
|
36
|
-
- `metaData: any`: Data to log to the console if `throw: true`.
|
|
37
|
-
|
|
38
|
-
examples: |
|
|
39
|
-
###### Throw with custom message:
|
|
40
|
-
```yaml
|
|
41
|
-
- id: throw
|
|
42
|
-
type: Throw
|
|
43
|
-
params:
|
|
44
|
-
throw:
|
|
45
|
-
_eq:
|
|
46
|
-
- _state: lukes_father
|
|
47
|
-
- Darth Vader
|
|
48
|
-
message: Nooooooooooooooooo
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
###### Throw with metaData:
|
|
52
|
-
```yaml
|
|
53
|
-
- id: throw
|
|
54
|
-
type: Throw
|
|
55
|
-
params:
|
|
56
|
-
throw:
|
|
57
|
-
_eq:
|
|
58
|
-
- _state: lukes_father
|
|
59
|
-
- Darth Vader
|
|
60
|
-
message: Nooooooooooooooooo
|
|
61
|
-
metaData:
|
|
62
|
-
realisation: Luke kissed his sister
|
|
63
|
-
```
|
|
64
|
-
###### Override custom message:
|
|
65
|
-
```yaml
|
|
66
|
-
- id: throw
|
|
67
|
-
type: Throw
|
|
68
|
-
messages:
|
|
69
|
-
error: Meh.
|
|
70
|
-
params:
|
|
71
|
-
throw:
|
|
72
|
-
_eq:
|
|
73
|
-
- _state: lukes_father
|
|
74
|
-
- Darth Vader
|
|
75
|
-
message: Nooooooooooooooooo
|
|
76
|
-
```
|
|
77
|
-
###### Fail silently:
|
|
78
|
-
```yaml
|
|
79
|
-
- id: throw
|
|
80
|
-
type: Throw
|
|
81
|
-
messages:
|
|
82
|
-
error: false
|
|
83
|
-
params:
|
|
84
|
-
throw:
|
|
85
|
-
_eq:
|
|
86
|
-
- _state: lukes_father
|
|
87
|
-
- Darth Vader
|
|
88
|
-
message: Nooooooooooooooooo
|
|
89
|
-
```
|