@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,120 +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/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _url_query
|
|
20
|
-
pageTitle: _url_query
|
|
21
|
-
filePath: operators/_url_query.yaml
|
|
22
|
-
env: Client Only
|
|
23
|
-
types: |
|
|
24
|
-
```
|
|
25
|
-
(key: string): any
|
|
26
|
-
(all: boolean): any
|
|
27
|
-
(arguments: {
|
|
28
|
-
all?: boolean,
|
|
29
|
-
key?: string,
|
|
30
|
-
default?: any,
|
|
31
|
-
contextId?: string
|
|
32
|
-
}): any
|
|
33
|
-
```
|
|
34
|
-
description: |
|
|
35
|
-
The `_url_query` operator gets a value from the [`urlQuery`](/context-and-state) object. The `urlQuery` is a data object that is set as the [`https://en.wikipedia.org/wiki/Query_string`] of the app URL. It can be set when linking to a new page using the [`Link`](/link) action, and can be used to set data like a `id` when switching to a new page. Unlike `input`, the `urlQuery` is visible to the user, and can be modified by the user.
|
|
36
|
-
|
|
37
|
-
> __DO NOT__ set any private or personal information to `urlQuery`; all data set to `urlQuery` are accessible publicly. Setting a `id` that can be guessed, like an incremental `id`, can lead to security issues, since users can easily guess and access data for other `ids`.
|
|
38
|
-
|
|
39
|
-
If the page is reloaded, the `urlQuery` is not lost. By using `urlQuery`, you can make links containing data that can be shared by users. By default, `_url_query` accesses the `url_query` object from the [`context`](/context-and-state) the operator is used in, but a different context can be specified.
|
|
40
|
-
|
|
41
|
-
`urlQuery` objects are serialized to JSON, allowing nested objects or arrays to be specified.
|
|
42
|
-
|
|
43
|
-
arguments: |
|
|
44
|
-
###### string
|
|
45
|
-
If the `_url_query` operator is called with a string argument, the value of the key in the `urlQuery` object is returned. If the value is not found, `null` is returned. Dot notation and [block list indexes](/lists) are supported.
|
|
46
|
-
|
|
47
|
-
###### boolean
|
|
48
|
-
If the `_url_query` operator is called with boolean argument `true`, the entire `urlQuery` object is returned.
|
|
49
|
-
|
|
50
|
-
###### object
|
|
51
|
-
- `all: boolean`: If `all` is set to `true`, the entire `urlQuery` object is returned. One of `all` or `key` are required.
|
|
52
|
-
- `key: string`: The value of the key in the `urlQuery` object is returned. If the value is not found, `null`, or the specified default value is returned. Dot notation and [block list indexes](/lists) are supported. One of `all` or `key` are required.
|
|
53
|
-
- `default: any`: A value to return if the `key` is not found in `urlQuery`. By default, `null` is returned if a value is not found.
|
|
54
|
-
- `contextId: string`: The id of a `context`. Setting this will get the value from the `urlQuery` of the specified context. A list of `contexts` that exist are returned by the [`_list_contexts`](/_list_contexts) operator. Cannot be used in `connections` or `requests`.
|
|
55
|
-
examples: |
|
|
56
|
-
###### Get the value of `my_key` from `urlQuery`:
|
|
57
|
-
```yaml
|
|
58
|
-
_url_query: my_key
|
|
59
|
-
```
|
|
60
|
-
```yaml
|
|
61
|
-
_url_query:
|
|
62
|
-
key: my_key
|
|
63
|
-
```
|
|
64
|
-
Returns: The value of `my_key` in `urlQuery`.
|
|
65
|
-
|
|
66
|
-
###### Get the entire `urlQuery` object:
|
|
67
|
-
```yaml
|
|
68
|
-
_url_query: true
|
|
69
|
-
```
|
|
70
|
-
```yaml
|
|
71
|
-
_url_query:
|
|
72
|
-
all: true
|
|
73
|
-
```
|
|
74
|
-
Returns: The entire `urlQuery` object.
|
|
75
|
-
|
|
76
|
-
###### Dot notation:
|
|
77
|
-
Assuming urlQuery:
|
|
78
|
-
```yaml
|
|
79
|
-
my_object:
|
|
80
|
-
subfield: 'Value'
|
|
81
|
-
```
|
|
82
|
-
then:
|
|
83
|
-
```yaml
|
|
84
|
-
_url_query: my_object.subfield
|
|
85
|
-
```
|
|
86
|
-
```yaml
|
|
87
|
-
_url_query:
|
|
88
|
-
key: my_object.subfield
|
|
89
|
-
```
|
|
90
|
-
Returns: `"Value"`.
|
|
91
|
-
|
|
92
|
-
###### Return a default value if the value is not found:
|
|
93
|
-
```yaml
|
|
94
|
-
_url_query:
|
|
95
|
-
key: might_not_exist
|
|
96
|
-
default: Default value
|
|
97
|
-
```
|
|
98
|
-
Returns: The value of `might_not_exist`, or `"Default value"`.
|
|
99
|
-
|
|
100
|
-
###### Block list indices:
|
|
101
|
-
Assuming `urlQuery`:
|
|
102
|
-
```yaml
|
|
103
|
-
my_array:
|
|
104
|
-
- value: 0
|
|
105
|
-
- value: 1
|
|
106
|
-
- value: 2
|
|
107
|
-
```
|
|
108
|
-
then:
|
|
109
|
-
```yaml
|
|
110
|
-
_url_query: my_array.$.value
|
|
111
|
-
```
|
|
112
|
-
Returns: `0` when used from the first block (0th index) in a list.
|
|
113
|
-
|
|
114
|
-
###### Get a value from another `context`:
|
|
115
|
-
```yaml
|
|
116
|
-
_url_query:
|
|
117
|
-
key: my_key
|
|
118
|
-
contextId: 'pageId:contextId:{}'
|
|
119
|
-
```
|
|
120
|
-
Returns: The value of `my_key` in `urlQuery` in context `contextId` on page `pageId`.
|
package/operators/_user.yaml
DELETED
|
@@ -1,107 +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/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _user
|
|
20
|
-
pageTitle: _user
|
|
21
|
-
filePath: operators/_user.yaml
|
|
22
|
-
types: |
|
|
23
|
-
```
|
|
24
|
-
(key: string): any
|
|
25
|
-
(all: boolean): any
|
|
26
|
-
(arguments: {
|
|
27
|
-
all?: boolean,
|
|
28
|
-
key?: string,
|
|
29
|
-
default?: any,
|
|
30
|
-
}): any
|
|
31
|
-
```
|
|
32
|
-
description: |
|
|
33
|
-
The `_user` operator gets a value from the [`user`](/user-object) object. The `user` object contains the data in the user idToken if OpenID Connect authentication is configured and a user is logged in.
|
|
34
|
-
|
|
35
|
-
arguments: |
|
|
36
|
-
###### string
|
|
37
|
-
If the `_user` operator is called with a string argument, the value of the key in the `user` object is returned. If the value is not found, `null` is returned. Dot notation and [block list indexes](/lists) are supported.
|
|
38
|
-
|
|
39
|
-
###### boolean
|
|
40
|
-
If the `_user` operator is called with boolean argument `true`, the entire `user` object is returned.
|
|
41
|
-
|
|
42
|
-
###### object
|
|
43
|
-
- `all: boolean`: If `all` is set to `true`, the entire `user` object is returned. One of `all` or `key` are required.
|
|
44
|
-
- `key: string`: The value of the key in the `user` object is returned. If the value is not found, `null`, or the specified default value is returned. Dot notation and [block list indexes](/lists) are supported. One of `all` or `key` are required.
|
|
45
|
-
- `default: any`: A value to return if the `key` is not found in `user`. By default, `null` is returned if a value is not found.
|
|
46
|
-
examples: |
|
|
47
|
-
###### Get the value of `name` from `user`:
|
|
48
|
-
```yaml
|
|
49
|
-
_user: name
|
|
50
|
-
```
|
|
51
|
-
```yaml
|
|
52
|
-
_user:
|
|
53
|
-
key: name
|
|
54
|
-
```
|
|
55
|
-
Returns: The value of `name` in `user`.
|
|
56
|
-
|
|
57
|
-
###### Get the entire `user` object:
|
|
58
|
-
```yaml
|
|
59
|
-
_user: true
|
|
60
|
-
```
|
|
61
|
-
```yaml
|
|
62
|
-
_user:
|
|
63
|
-
all: true
|
|
64
|
-
```
|
|
65
|
-
Returns: The entire `user` object.
|
|
66
|
-
|
|
67
|
-
###### Dot notation:
|
|
68
|
-
Assuming user:
|
|
69
|
-
```yaml
|
|
70
|
-
sub: abc123
|
|
71
|
-
name: User Name
|
|
72
|
-
my_object:
|
|
73
|
-
subfield: 'Value'
|
|
74
|
-
```
|
|
75
|
-
then:
|
|
76
|
-
```yaml
|
|
77
|
-
_user: my_object.subfield
|
|
78
|
-
```
|
|
79
|
-
```yaml
|
|
80
|
-
_user:
|
|
81
|
-
key: my_object.subfield
|
|
82
|
-
```
|
|
83
|
-
Returns: `"Value"`.
|
|
84
|
-
|
|
85
|
-
###### Return a default value if the value is not found:
|
|
86
|
-
```yaml
|
|
87
|
-
_user:
|
|
88
|
-
key: might_not_exist
|
|
89
|
-
default: Default value
|
|
90
|
-
```
|
|
91
|
-
Returns: The value of `might_not_exist`, or `"Default value"`.
|
|
92
|
-
|
|
93
|
-
###### Block list indices:
|
|
94
|
-
Assuming `user`:
|
|
95
|
-
```yaml
|
|
96
|
-
sub: abc123
|
|
97
|
-
name: User Name
|
|
98
|
-
my_array:
|
|
99
|
-
- value: 0
|
|
100
|
-
- value: 1
|
|
101
|
-
- value: 2
|
|
102
|
-
```
|
|
103
|
-
then:
|
|
104
|
-
```yaml
|
|
105
|
-
_user: my_array.$.value
|
|
106
|
-
```
|
|
107
|
-
Returns: `0` when used from the first block (0th index) in a list.
|
package/operators/_uuid.yaml
DELETED
|
@@ -1,114 +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/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _uuid
|
|
20
|
-
pageTitle: _uuid
|
|
21
|
-
filePath: operators/_uuid.yaml
|
|
22
|
-
description: |
|
|
23
|
-
The `_uuid` operator creates [UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier). A UUID is a random identifier that is, for all practical purposes, unique. It looks like:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
123e4567-e89b-12d3-a456-426614174000
|
|
27
|
-
```
|
|
28
|
-
types: |
|
|
29
|
-
```
|
|
30
|
-
(void): string
|
|
31
|
-
```
|
|
32
|
-
arguments: |
|
|
33
|
-
###### default:
|
|
34
|
-
`_uuid: true`, `_uuid: null` or `_uuid: undefined` returns a version 4 UUID.
|
|
35
|
-
|
|
36
|
-
examples: |
|
|
37
|
-
###### Generate a v4 uuid:
|
|
38
|
-
```yaml
|
|
39
|
-
_uuid: null
|
|
40
|
-
```
|
|
41
|
-
Returns: A version 4 UUID.
|
|
42
|
-
methods:
|
|
43
|
-
- name: v1
|
|
44
|
-
types: |
|
|
45
|
-
```
|
|
46
|
-
(void): string
|
|
47
|
-
```
|
|
48
|
-
description: |
|
|
49
|
-
Create a version 1 (timestamp) UUID.
|
|
50
|
-
arguments: |
|
|
51
|
-
The `_uuid.v1` method does not take any arguments.
|
|
52
|
-
examples: |
|
|
53
|
-
###### Generate a version 1 UUID:
|
|
54
|
-
```yaml
|
|
55
|
-
_uuid.v1: null
|
|
56
|
-
```
|
|
57
|
-
Returns: A version 1 UUID.
|
|
58
|
-
- name: v3
|
|
59
|
-
types: |
|
|
60
|
-
```
|
|
61
|
-
({name: string | string[], namespace: string | string[]}): string
|
|
62
|
-
([name: string | string[], namespace: string | string[]]): string
|
|
63
|
-
```
|
|
64
|
-
description: |
|
|
65
|
-
Create a version 3 (namespace w/ MD5) UUID.
|
|
66
|
-
arguments: |
|
|
67
|
-
###### object:
|
|
68
|
-
If the `_uuid` operator is called with arguments, it can be one of the following:
|
|
69
|
-
- `name: string | string[]`: A string or an array.
|
|
70
|
-
- `namespace: string | string[]`: A string or an Array[16] - Namespace UUID.
|
|
71
|
-
examples: |
|
|
72
|
-
###### Generate a version 3 UUID:
|
|
73
|
-
```yaml
|
|
74
|
-
_uuid.v3:
|
|
75
|
-
name: hello
|
|
76
|
-
namespace: world
|
|
77
|
-
```
|
|
78
|
-
Returns: A version 3 UUID.
|
|
79
|
-
- name: v4
|
|
80
|
-
types: |
|
|
81
|
-
```
|
|
82
|
-
(void): string
|
|
83
|
-
```
|
|
84
|
-
description: |
|
|
85
|
-
Create a version 4 (random) UUID.
|
|
86
|
-
arguments: |
|
|
87
|
-
The `_uuid.v4` method does not take any arguments.
|
|
88
|
-
examples: |
|
|
89
|
-
###### Generate a version 4 UUID:
|
|
90
|
-
```yaml
|
|
91
|
-
_uuid.v4: null
|
|
92
|
-
```
|
|
93
|
-
Returns: A version 4 UUID.
|
|
94
|
-
- name: v5
|
|
95
|
-
types: |
|
|
96
|
-
```
|
|
97
|
-
({name: string | string[], namespace: string | string[]}): string
|
|
98
|
-
([name: string | string[], namespace: string | string[]]): string
|
|
99
|
-
```
|
|
100
|
-
description: |
|
|
101
|
-
Create a version 5 (namespace w/ SHA-1) UUID.
|
|
102
|
-
arguments: |
|
|
103
|
-
###### object:
|
|
104
|
-
If the `_uuid` operator is called with arguments, it can be one of the following:
|
|
105
|
-
- `name: string | string[]`: A string or an array.
|
|
106
|
-
- `namespace: string | string[]`: A string or an Array[16] - Namespace UUID.
|
|
107
|
-
examples: |
|
|
108
|
-
###### Generate a version 5 UUID:
|
|
109
|
-
```yaml
|
|
110
|
-
_uuid.v5:
|
|
111
|
-
name: hello
|
|
112
|
-
namespace: world
|
|
113
|
-
```
|
|
114
|
-
Returns: A version 5 UUID.
|
package/operators/_var.yaml
DELETED
|
@@ -1,105 +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/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _var
|
|
20
|
-
pageTitle: _var
|
|
21
|
-
filePath: operators/_var.yaml
|
|
22
|
-
env: Build Only
|
|
23
|
-
types: |
|
|
24
|
-
```
|
|
25
|
-
(name: string): any
|
|
26
|
-
(arguments: {
|
|
27
|
-
name: string,
|
|
28
|
-
default?: any,
|
|
29
|
-
}): any
|
|
30
|
-
```
|
|
31
|
-
description: |
|
|
32
|
-
The `_var` operator gets a value from the `vars` object, specified by a [`_ref`](/ref) operator when referencing a file.
|
|
33
|
-
|
|
34
|
-
> The `_var` operator is a build time operator: it is evaluated when the app configuration is being built. This means it is not evaluated dynamically as the app is running, and can be used anywhere in the configuration as long as the resulting configuration files are valid YAML.
|
|
35
|
-
|
|
36
|
-
arguments: |
|
|
37
|
-
###### string
|
|
38
|
-
If the `_var` operator is called with a string argument, the value of the key in the `vars` object is returned. If the value is not found, `null` is returned. Dot notation is supported.
|
|
39
|
-
|
|
40
|
-
###### object
|
|
41
|
-
- `name: string`: The value of the key in the `vars` object is returned. If the value is not found, `null`, or the specified default value is returned. Dot notation is supported.
|
|
42
|
-
- `default: any`: A value to return if the `name` is not found in `vars`. By default, `null` is returned if a value is not found.
|
|
43
|
-
|
|
44
|
-
examples: |
|
|
45
|
-
###### Using a standardized input label template:
|
|
46
|
-
```yaml
|
|
47
|
-
blocks:
|
|
48
|
-
- id: name
|
|
49
|
-
type: TextInput
|
|
50
|
-
properties:
|
|
51
|
-
label:
|
|
52
|
-
_ref:
|
|
53
|
-
path: label.yaml
|
|
54
|
-
vars:
|
|
55
|
-
title: Name
|
|
56
|
-
description: Your name and surname.
|
|
57
|
-
descriptionTextColor: '#546358'
|
|
58
|
-
- id: age
|
|
59
|
-
type: NumberInput
|
|
60
|
-
properties:
|
|
61
|
-
label:
|
|
62
|
-
_ref:
|
|
63
|
-
path: label.yaml
|
|
64
|
-
vars:
|
|
65
|
-
title: Age
|
|
66
|
-
description: Your age.
|
|
67
|
-
```
|
|
68
|
-
```yaml
|
|
69
|
-
# label.yaml
|
|
70
|
-
title:
|
|
71
|
-
_var: title
|
|
72
|
-
extra:
|
|
73
|
-
_var: description
|
|
74
|
-
span: 8
|
|
75
|
-
colon: false
|
|
76
|
-
extraStyle:
|
|
77
|
-
color:
|
|
78
|
-
_var:
|
|
79
|
-
name: descriptionTextColor
|
|
80
|
-
default: '#333333'
|
|
81
|
-
```
|
|
82
|
-
Returns:
|
|
83
|
-
```yaml
|
|
84
|
-
blocks:
|
|
85
|
-
- id: name
|
|
86
|
-
type: TextInput
|
|
87
|
-
properties:
|
|
88
|
-
label:
|
|
89
|
-
title: Name
|
|
90
|
-
extra: Your name and surname.
|
|
91
|
-
span: 8
|
|
92
|
-
colon: false
|
|
93
|
-
extraStyle:
|
|
94
|
-
color: '#546358'
|
|
95
|
-
- id: age
|
|
96
|
-
type: NumberInput
|
|
97
|
-
properties:
|
|
98
|
-
label:
|
|
99
|
-
title: Age
|
|
100
|
-
extra: Your age.
|
|
101
|
-
span: 8
|
|
102
|
-
colon: false
|
|
103
|
-
extraStyle:
|
|
104
|
-
color: '#333333'
|
|
105
|
-
```
|
package/operators/_yaml.yaml
DELETED
|
@@ -1,107 +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/operators.yaml.njk
|
|
17
|
-
transformer: templates/operatorsMethodTransformer.js
|
|
18
|
-
vars:
|
|
19
|
-
pageId: _yaml
|
|
20
|
-
pageTitle: _yaml
|
|
21
|
-
filePath: operators/_yaml.yaml
|
|
22
|
-
description: |
|
|
23
|
-
The `_yaml` parses and writes YAML strings.
|
|
24
|
-
methods:
|
|
25
|
-
- name: parse
|
|
26
|
-
types: |
|
|
27
|
-
```
|
|
28
|
-
({on: string, options?: object}): object
|
|
29
|
-
([on: string, options?: object]): object
|
|
30
|
-
```
|
|
31
|
-
description: |
|
|
32
|
-
The `_yaml.parse` method parses a YAML string into an object.
|
|
33
|
-
arguments: |
|
|
34
|
-
###### object
|
|
35
|
-
- `on: string`: String to parse.
|
|
36
|
-
- `options?: object`: Optional settings. See the [YAML.parse: method here](https://eemeli.org/yaml/#parse-options) for supported settings.
|
|
37
|
-
|
|
38
|
-
examples: |
|
|
39
|
-
###### Parse a YAML string:
|
|
40
|
-
```yaml
|
|
41
|
-
_yaml.parse:
|
|
42
|
-
on: |
|
|
43
|
-
key: Value
|
|
44
|
-
boolean: true
|
|
45
|
-
array:
|
|
46
|
-
- 1
|
|
47
|
-
- 2
|
|
48
|
-
```
|
|
49
|
-
or:
|
|
50
|
-
```yaml
|
|
51
|
-
_yaml.parse:
|
|
52
|
-
- |
|
|
53
|
-
key: Value
|
|
54
|
-
boolean: true
|
|
55
|
-
array:
|
|
56
|
-
- 1
|
|
57
|
-
- 2
|
|
58
|
-
```
|
|
59
|
-
Returns:
|
|
60
|
-
```
|
|
61
|
-
key: Value
|
|
62
|
-
boolean: true
|
|
63
|
-
array:
|
|
64
|
-
- 1
|
|
65
|
-
- 2
|
|
66
|
-
```
|
|
67
|
-
- name: stringify
|
|
68
|
-
types: |
|
|
69
|
-
```
|
|
70
|
-
({on: any, options?: object}): string
|
|
71
|
-
([on: any, options?: object]): string
|
|
72
|
-
```
|
|
73
|
-
description: |
|
|
74
|
-
The `_yaml.stringify` method creates a YAML string from an object.
|
|
75
|
-
arguments: |
|
|
76
|
-
###### object
|
|
77
|
-
- `on: any`: The object to stringify.
|
|
78
|
-
- `options?: object`: Optional settings. See the [YAML.stringify: method here](https://eemeli.org/yaml/#tostring-options) for supported settings.
|
|
79
|
-
|
|
80
|
-
examples: |
|
|
81
|
-
###### Stringify an object as YAML:
|
|
82
|
-
```yaml
|
|
83
|
-
_yaml.stringify:
|
|
84
|
-
on:
|
|
85
|
-
key: Value
|
|
86
|
-
boolean: true
|
|
87
|
-
array:
|
|
88
|
-
- 1
|
|
89
|
-
- 2
|
|
90
|
-
```
|
|
91
|
-
or:
|
|
92
|
-
```yaml
|
|
93
|
-
_yaml.stringify:
|
|
94
|
-
- key: Value
|
|
95
|
-
boolean: true
|
|
96
|
-
array:
|
|
97
|
-
- 1
|
|
98
|
-
- 2
|
|
99
|
-
```
|
|
100
|
-
Returns (as a string):
|
|
101
|
-
```text
|
|
102
|
-
key: Value
|
|
103
|
-
boolean: true
|
|
104
|
-
array:
|
|
105
|
-
- 1
|
|
106
|
-
- 2
|
|
107
|
-
```
|