@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
package/operators/_event.yaml
DELETED
|
@@ -1,103 +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: _event
|
|
20
|
-
pageTitle: _event
|
|
21
|
-
filePath: operators/_event.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
|
-
}): any
|
|
32
|
-
```
|
|
33
|
-
description: |
|
|
34
|
-
The `_event` operator gets a value from the `event` object. The `event` object is a data object provided to an [`action`](/events-and-actions) by an [`event`](/events-and-actions). This object is also available to a [`request or connection`](/connections-and-requests) called by the [`Request`](/Request) action.
|
|
35
|
-
arguments: |
|
|
36
|
-
###### string
|
|
37
|
-
If the `_event` operator is called with a string argument, the value of the key in the `event` 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 `_event` operator is called with boolean argument `true`, the entire `event` object is returned.
|
|
41
|
-
|
|
42
|
-
###### object
|
|
43
|
-
- `all: boolean`: If `all` is set to `true`, the entire `event` object is returned. One of `all` or `key` are required.
|
|
44
|
-
- `key: string`: The value of the key in the `event` 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 `event`. By default, `null` is returned if a value is not found.
|
|
46
|
-
examples: |
|
|
47
|
-
###### Get the value of `my_key` from `event`:
|
|
48
|
-
```yaml
|
|
49
|
-
_event: my_key
|
|
50
|
-
```
|
|
51
|
-
```yaml
|
|
52
|
-
_event:
|
|
53
|
-
key: my_key
|
|
54
|
-
```
|
|
55
|
-
Returns: The value of `my_key` in `event`.
|
|
56
|
-
|
|
57
|
-
###### Get the entire `event` object:
|
|
58
|
-
```yaml
|
|
59
|
-
_event: true
|
|
60
|
-
```
|
|
61
|
-
```yaml
|
|
62
|
-
_event:
|
|
63
|
-
all: true
|
|
64
|
-
```
|
|
65
|
-
Returns: The entire `event` object.
|
|
66
|
-
|
|
67
|
-
###### Dot notation:
|
|
68
|
-
Assuming args:
|
|
69
|
-
```yaml
|
|
70
|
-
my_object:
|
|
71
|
-
subfield: 'Value'
|
|
72
|
-
```
|
|
73
|
-
then:
|
|
74
|
-
```yaml
|
|
75
|
-
_event: my_object.subfield
|
|
76
|
-
```
|
|
77
|
-
```yaml
|
|
78
|
-
_event:
|
|
79
|
-
key: my_object.subfield
|
|
80
|
-
```
|
|
81
|
-
Returns: `"Value"`.
|
|
82
|
-
|
|
83
|
-
###### Return a default value if the value is not found:
|
|
84
|
-
```yaml
|
|
85
|
-
_event:
|
|
86
|
-
key: might_not_exist
|
|
87
|
-
default: Default value
|
|
88
|
-
```
|
|
89
|
-
Returns: The value of `might_not_exist`, or `"Default value"`.
|
|
90
|
-
|
|
91
|
-
###### Block list indices:
|
|
92
|
-
Assuming `event`:
|
|
93
|
-
```yaml
|
|
94
|
-
my_array:
|
|
95
|
-
- value: 0
|
|
96
|
-
- value: 1
|
|
97
|
-
- value: 2
|
|
98
|
-
```
|
|
99
|
-
then:
|
|
100
|
-
```yaml
|
|
101
|
-
_event: my_array.$.value
|
|
102
|
-
```
|
|
103
|
-
Returns: `0` when used from the first block (0th index) in a list.
|
package/operators/_format.yaml
DELETED
|
@@ -1,209 +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: _format
|
|
20
|
-
pageTitle: _format
|
|
21
|
-
env: Client Only
|
|
22
|
-
description: |
|
|
23
|
-
The `_format` operator converts objects to strings, using a specified format. It can only be used on the web-client (not in requests or connections).
|
|
24
|
-
methods:
|
|
25
|
-
- name: intlDateTimeFormat
|
|
26
|
-
types: |
|
|
27
|
-
```
|
|
28
|
-
(arguments: {
|
|
29
|
-
on: date,
|
|
30
|
-
params?: {
|
|
31
|
-
locale?: string,
|
|
32
|
-
options?: object
|
|
33
|
-
},
|
|
34
|
-
})
|
|
35
|
-
```
|
|
36
|
-
description: |
|
|
37
|
-
The `_format.intlDateTimeFormat` provides language-sensitive date and time formatting, based on [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat). If no locale is provide, the users default locale will be used.
|
|
38
|
-
arguments: |
|
|
39
|
-
###### object
|
|
40
|
-
- `on: date`: The date object to format.
|
|
41
|
-
- `params: object`:
|
|
42
|
-
- `locale: string`: A string with a BCP 47 language tag, or an array of such strings.
|
|
43
|
-
- `options: object`: [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) options.
|
|
44
|
-
examples: |
|
|
45
|
-
###### Format a date:
|
|
46
|
-
```yaml
|
|
47
|
-
_format.intlDateTimeFormat:
|
|
48
|
-
on:
|
|
49
|
-
_date: 2019-06-13
|
|
50
|
-
params:
|
|
51
|
-
locale: en
|
|
52
|
-
options:
|
|
53
|
-
weekday: long
|
|
54
|
-
year: numeric
|
|
55
|
-
month: long
|
|
56
|
-
day: numeric
|
|
57
|
-
```
|
|
58
|
-
Returns: `"Thursday, June 13, 2019"`.
|
|
59
|
-
- name: intlListFormat
|
|
60
|
-
types: |
|
|
61
|
-
```
|
|
62
|
-
(arguments: {
|
|
63
|
-
on: any[],
|
|
64
|
-
params?: {
|
|
65
|
-
locale?: string,
|
|
66
|
-
options?: object
|
|
67
|
-
},
|
|
68
|
-
})
|
|
69
|
-
```
|
|
70
|
-
description: |
|
|
71
|
-
The `_format.intlListFormat` provides language-sensitive list formatting, based on [`Intl.ListFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat). If no locale is provide, the users default locale will be used.
|
|
72
|
-
arguments: |
|
|
73
|
-
###### object
|
|
74
|
-
- `on: any[]`: The array to format.
|
|
75
|
-
- `params: object`:
|
|
76
|
-
- `locale: string`: A string with a BCP 47 language tag, or an array of such strings.
|
|
77
|
-
- `options: object`: [`Intl.ListFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat) options.
|
|
78
|
-
examples: |
|
|
79
|
-
###### Format a list:
|
|
80
|
-
```yaml
|
|
81
|
-
_format.intlListFormat:
|
|
82
|
-
on:
|
|
83
|
-
- Motorcycle
|
|
84
|
-
- Bus
|
|
85
|
-
- Car
|
|
86
|
-
params:
|
|
87
|
-
locale: fr
|
|
88
|
-
```
|
|
89
|
-
Returns: `"Motorcycle, Bus et Car"`.
|
|
90
|
-
- name: intlNumberFormat
|
|
91
|
-
types: |
|
|
92
|
-
```
|
|
93
|
-
(arguments: {
|
|
94
|
-
on: number,
|
|
95
|
-
params?: {
|
|
96
|
-
locale?: string,
|
|
97
|
-
options?: object
|
|
98
|
-
},
|
|
99
|
-
})
|
|
100
|
-
```
|
|
101
|
-
description: |
|
|
102
|
-
The `_format.intlNumberFormat` provides language-sensitive number formatting, based on [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat). If no locale is provide, the users default locale will be used.
|
|
103
|
-
arguments: |
|
|
104
|
-
###### object
|
|
105
|
-
- `on: number`: The number to format.
|
|
106
|
-
- `params: object`:
|
|
107
|
-
- `locale: string`: A string with a BCP 47 language tag, or an array of such strings.
|
|
108
|
-
- `options: object`: [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) options.
|
|
109
|
-
examples: |
|
|
110
|
-
###### Format a number:
|
|
111
|
-
```yaml
|
|
112
|
-
_format.intlNumberFormat:
|
|
113
|
-
on: 13182375813.47422
|
|
114
|
-
params:
|
|
115
|
-
locale: de
|
|
116
|
-
```
|
|
117
|
-
Returns: `"13,18,23,75,813.474"`.
|
|
118
|
-
- name: intlRelativeTimeFormat
|
|
119
|
-
types: |
|
|
120
|
-
```
|
|
121
|
-
(arguments: {
|
|
122
|
-
on: any,
|
|
123
|
-
params: {
|
|
124
|
-
locale?: string,
|
|
125
|
-
unit: enum,
|
|
126
|
-
options?: object
|
|
127
|
-
},
|
|
128
|
-
})
|
|
129
|
-
```
|
|
130
|
-
description: |
|
|
131
|
-
The `_format.intlRelativeTimeFormat` provides language-sensitive relative time formatting, based on [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat). If no locale is provide, the users default locale will be used.
|
|
132
|
-
arguments: |
|
|
133
|
-
###### object
|
|
134
|
-
- `on: number`: The number to format.
|
|
135
|
-
- `params: object`:
|
|
136
|
-
- `locale: string`: A string with a BCP 47 language tag, or an array of such strings.
|
|
137
|
-
- `unit: enum`: Unit to use in the relative time internationalized message. Possible values are: `year`, `quarter`, `month`, `week`, `day`, `hour`, `minute`, `second`. Plural forms are also permitted.
|
|
138
|
-
- `options: object`: [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat) options.
|
|
139
|
-
examples: |
|
|
140
|
-
###### Format a number:
|
|
141
|
-
```yaml
|
|
142
|
-
_format.intlRelativeTimeFormat:
|
|
143
|
-
on: 4
|
|
144
|
-
params:
|
|
145
|
-
unit: 'days'
|
|
146
|
-
locale: fr
|
|
147
|
-
```
|
|
148
|
-
Returns: `"dans 4 jours"`.
|
|
149
|
-
- name: momentFormat
|
|
150
|
-
types: |
|
|
151
|
-
```
|
|
152
|
-
(arguments: {
|
|
153
|
-
on: date | string,
|
|
154
|
-
params?: {
|
|
155
|
-
locale?: string,
|
|
156
|
-
format?: string
|
|
157
|
-
},
|
|
158
|
-
})
|
|
159
|
-
```
|
|
160
|
-
description: |
|
|
161
|
-
The `_format.momentFormat` formats dates using the [moment.js](https://momentjs.com/docs/#/displaying/format/) library.
|
|
162
|
-
arguments: |
|
|
163
|
-
###### object
|
|
164
|
-
- `on: date | string`: The date to format.
|
|
165
|
-
- `params: object`:
|
|
166
|
-
- `locale: string`: A string with a locale name.
|
|
167
|
-
- `format: string`: A date [format string](https://momentjs.com/docs/#/displaying/format/).
|
|
168
|
-
|
|
169
|
-
examples: |
|
|
170
|
-
###### Format a date:
|
|
171
|
-
```yaml
|
|
172
|
-
_format.momentFormat:
|
|
173
|
-
on:
|
|
174
|
-
_date: 2019-06-04
|
|
175
|
-
params:
|
|
176
|
-
format: 'd MMM YYYY'
|
|
177
|
-
```
|
|
178
|
-
Returns: `"4 Jun 2019"`.
|
|
179
|
-
- name: momentHumanizeDuration
|
|
180
|
-
types: |
|
|
181
|
-
```
|
|
182
|
-
(arguments: {
|
|
183
|
-
on: number,
|
|
184
|
-
params?: {
|
|
185
|
-
locale?: string,
|
|
186
|
-
thresholds?: string,
|
|
187
|
-
withSuffix?: boolean
|
|
188
|
-
},
|
|
189
|
-
})
|
|
190
|
-
```
|
|
191
|
-
description: |
|
|
192
|
-
The `_format.momentHumanizeDuration` formats durations in milliseconds using the [moment.js](https://momentjs.com/docs/#/durations/humanize/)
|
|
193
|
-
arguments: |
|
|
194
|
-
###### object
|
|
195
|
-
- `on: number`: The duration in milliseconds to format.
|
|
196
|
-
- `params: object`:
|
|
197
|
-
- `locale: string`: A string with a locale name.
|
|
198
|
-
- `thresholds: object`: Thresholds define when a unit is considered a minute, an hour and so on. For example, by default more than 45 seconds is considered a minute, more than 22 hours is considered a day and so on. See [here](https://momentjs.com/docs/#/customization/relative-time-threshold/)
|
|
199
|
-
- `withSuffix: boolean`: By default, the return string is describing a duration `a month` (suffix-less). If you want an oriented duration `in a month`, `a month ago` (with suffix), pass in true.
|
|
200
|
-
|
|
201
|
-
examples: |
|
|
202
|
-
###### Format a date:
|
|
203
|
-
```yaml
|
|
204
|
-
_format.momentHumanizeDuration:
|
|
205
|
-
on: 245923000
|
|
206
|
-
params:
|
|
207
|
-
withSuffix: true
|
|
208
|
-
```
|
|
209
|
-
Returns: `"in 3 days"`.
|
package/operators/_function.yaml
DELETED
|
@@ -1,66 +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: _function
|
|
20
|
-
pageTitle: _function
|
|
21
|
-
filePath: operators/_function.yaml
|
|
22
|
-
types: |
|
|
23
|
-
```
|
|
24
|
-
(definition: any): function
|
|
25
|
-
```
|
|
26
|
-
description: |
|
|
27
|
-
The `_function` operator returns a function that evaluates the given operator definition when called. The resulting function can then be used by other operators like `_array.map`, or by blocks (for example as a formatter function).
|
|
28
|
-
|
|
29
|
-
To use a operator in a function definition, the operator name should start with a double underscore, `__`, instead of a single underscore. Operators that start with a single underscore will be evaluated when the function is created, and those that start with a double underscore are evaluated when the function is executed.
|
|
30
|
-
|
|
31
|
-
The arguments passed to the function when it is executed can be accessed with the [`_args`](/_args) operator.
|
|
32
|
-
arguments: |
|
|
33
|
-
###### any
|
|
34
|
-
|
|
35
|
-
The function definition. To use operators here, the operator names should start with a double underscore.
|
|
36
|
-
examples: |
|
|
37
|
-
###### Map over an array:
|
|
38
|
-
|
|
39
|
-
```yaml
|
|
40
|
-
_array.map:
|
|
41
|
-
on:
|
|
42
|
-
- firstName: Ted
|
|
43
|
-
lastName: Mosby
|
|
44
|
-
- firstName: Robin
|
|
45
|
-
lastName: Scherbatsky
|
|
46
|
-
- firstName: Marshall
|
|
47
|
-
lastName: Eriksen
|
|
48
|
-
- firstName: Lily
|
|
49
|
-
lastName: Aldrin
|
|
50
|
-
- firstName: Barney
|
|
51
|
-
lastName: Stinson
|
|
52
|
-
callback:
|
|
53
|
-
_function:
|
|
54
|
-
__string.concat:
|
|
55
|
-
- __args: 0.firstName
|
|
56
|
-
- ' '
|
|
57
|
-
- __args: 0.lastName
|
|
58
|
-
```
|
|
59
|
-
Returns:
|
|
60
|
-
```yaml
|
|
61
|
-
- Ted Mosby
|
|
62
|
-
- Robin Scherbatsky
|
|
63
|
-
- Marshall Eriksen
|
|
64
|
-
- Lily Aldrin
|
|
65
|
-
- Barney Stinson
|
|
66
|
-
```
|
package/operators/_get.yaml
DELETED
|
@@ -1,108 +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: _get
|
|
20
|
-
pageTitle: _get
|
|
21
|
-
filePath: operators/_get.yaml
|
|
22
|
-
types: |
|
|
23
|
-
```
|
|
24
|
-
(arguments: {
|
|
25
|
-
from: any[] | object,
|
|
26
|
-
key: string | integer,
|
|
27
|
-
default?: any,
|
|
28
|
-
}): any
|
|
29
|
-
```
|
|
30
|
-
description: |
|
|
31
|
-
The `_get` operator gets a value from the object or array specified in `from`. If the `key` is not found, the provided `default`, or `null` if not specified, are returned.
|
|
32
|
-
|
|
33
|
-
arguments: |
|
|
34
|
-
###### object
|
|
35
|
-
- `from: any[] | object`: __Required__ - The object to get the value from.
|
|
36
|
-
- `key: string`: __Required__ - The value of the key or array index to get from the `from` object or array. If the value is not found, `null`, or the specified default value is returned. Dot notation and [block list indexes](/lists) are supported.
|
|
37
|
-
- `default: any`: A value to return if the `key` is not found in `from`. By default, `null` is returned if a value is not found.
|
|
38
|
-
|
|
39
|
-
examples: |
|
|
40
|
-
###### Get the value of a key from an object:
|
|
41
|
-
```yaml
|
|
42
|
-
_get:
|
|
43
|
-
from:
|
|
44
|
-
name: George
|
|
45
|
-
age: 22
|
|
46
|
-
key: name
|
|
47
|
-
```
|
|
48
|
-
Returns: `"George"`.
|
|
49
|
-
|
|
50
|
-
###### Use _get to as a switch statement to choose an Icon name:
|
|
51
|
-
```yaml
|
|
52
|
-
_get:
|
|
53
|
-
key:
|
|
54
|
-
_state: status
|
|
55
|
-
from:
|
|
56
|
-
new: AiTwoTonePlusCircle
|
|
57
|
-
escalated: AiOutlinedExclamationCircle
|
|
58
|
-
investigation_started: AiTwoToneTool
|
|
59
|
-
client_contacted: AiTwoToneSound
|
|
60
|
-
awaiting_confirmation: AiOutlinedLike
|
|
61
|
-
closed: AiOutlinedStop
|
|
62
|
-
```
|
|
63
|
-
Returns: The icon corresponding to the status in state.
|
|
64
|
-
|
|
65
|
-
###### Get from an array (arrays are `0` indexed):
|
|
66
|
-
```yaml
|
|
67
|
-
_get:
|
|
68
|
-
from:
|
|
69
|
-
- id: 1
|
|
70
|
-
name: Joe
|
|
71
|
-
- id: 2
|
|
72
|
-
Name: Dave
|
|
73
|
-
key: 0.name
|
|
74
|
-
```
|
|
75
|
-
Returns: `1`.
|
|
76
|
-
|
|
77
|
-
###### Dot notation:
|
|
78
|
-
```yaml
|
|
79
|
-
_get:
|
|
80
|
-
from:
|
|
81
|
-
my_object:
|
|
82
|
-
subfield: 'Value'
|
|
83
|
-
key: my_object.subfield
|
|
84
|
-
```
|
|
85
|
-
Returns: `"Value"`.
|
|
86
|
-
|
|
87
|
-
###### Return a default value if the value is not found:
|
|
88
|
-
```yaml
|
|
89
|
-
_get:
|
|
90
|
-
from:
|
|
91
|
-
value1: 1
|
|
92
|
-
key: value2
|
|
93
|
-
default: 99
|
|
94
|
-
```
|
|
95
|
-
Returns: `99`.
|
|
96
|
-
|
|
97
|
-
###### Block list indices:
|
|
98
|
-
Assuming `state`:
|
|
99
|
-
```yaml
|
|
100
|
-
_get:
|
|
101
|
-
from:
|
|
102
|
-
my_array:
|
|
103
|
-
- value: 0
|
|
104
|
-
- value: 1
|
|
105
|
-
- value: 2
|
|
106
|
-
key: my_array.$.value
|
|
107
|
-
```
|
|
108
|
-
Returns: `0` when used from the first block (0th index) in a list.
|
package/operators/_global.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: _global
|
|
20
|
-
pageTitle: _global
|
|
21
|
-
filePath: operators/_global.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 `_global` operator gets a value from the [`global`](/context-and-state) object. The `global` object is a shared data object that can be accessed from any `context` in the app.
|
|
36
|
-
|
|
37
|
-
arguments: |
|
|
38
|
-
###### string
|
|
39
|
-
If the `_global` operator is called with a string argument, the value of the key in the `global` object is returned. If the value is not found, `null` is returned. Dot notation and [block list indexes](/lists) are supported.
|
|
40
|
-
|
|
41
|
-
###### boolean
|
|
42
|
-
If the `_global` operator is called with boolean argument `true`, the entire `global` object is returned.
|
|
43
|
-
|
|
44
|
-
###### object
|
|
45
|
-
- `all: boolean`: If `all` is set to `true`, the entire `global` object is returned. One of `all` or `key` are required.
|
|
46
|
-
- `key: string`: The value of the key in the `global` 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.
|
|
47
|
-
- `default: any`: A value to return if the `key` is not found in `global`. By default, `null` is returned if a value is not found.
|
|
48
|
-
- `contextId: string`: The id of a `context`. Setting this will get the value from the `context` of the specified context. A list of `contexts` that exist are returned by the [`_list_contexts`](/_list_contexts) operator. The value of `global` is the same for all `contexts`. Cannot be used in `connections` or `requests`.
|
|
49
|
-
|
|
50
|
-
examples: |
|
|
51
|
-
###### Get the value of `my_key` from `global`:
|
|
52
|
-
```yaml
|
|
53
|
-
_global: my_key
|
|
54
|
-
```
|
|
55
|
-
```yaml
|
|
56
|
-
_global:
|
|
57
|
-
key: my_key
|
|
58
|
-
```
|
|
59
|
-
Returns: The value of `my_key` in `global`.
|
|
60
|
-
|
|
61
|
-
###### Get the entire `global` object:
|
|
62
|
-
```yaml
|
|
63
|
-
_global: true
|
|
64
|
-
```
|
|
65
|
-
```yaml
|
|
66
|
-
_global:
|
|
67
|
-
all: true
|
|
68
|
-
```
|
|
69
|
-
Returns: The entire `global` object.
|
|
70
|
-
|
|
71
|
-
###### Dot notation:
|
|
72
|
-
Assuming global:
|
|
73
|
-
```yaml
|
|
74
|
-
my_object:
|
|
75
|
-
subfield: 'Value'
|
|
76
|
-
```
|
|
77
|
-
then:
|
|
78
|
-
```yaml
|
|
79
|
-
_global: my_object.subfield
|
|
80
|
-
```
|
|
81
|
-
```yaml
|
|
82
|
-
_global:
|
|
83
|
-
key: my_object.subfield
|
|
84
|
-
```
|
|
85
|
-
Returns: `"Value"`.
|
|
86
|
-
|
|
87
|
-
###### Return a default value if the value is not found:
|
|
88
|
-
```yaml
|
|
89
|
-
_global:
|
|
90
|
-
key: might_not_exist
|
|
91
|
-
default: Default value
|
|
92
|
-
```
|
|
93
|
-
Returns: The value of `might_not_exist`, or `"Default value"`.
|
|
94
|
-
|
|
95
|
-
###### Block list indices:
|
|
96
|
-
Assuming `global`:
|
|
97
|
-
```yaml
|
|
98
|
-
my_array:
|
|
99
|
-
- value: 0
|
|
100
|
-
- value: 1
|
|
101
|
-
- value: 2
|
|
102
|
-
```
|
|
103
|
-
then:
|
|
104
|
-
```yaml
|
|
105
|
-
_global: my_array.$.value
|
|
106
|
-
```
|
|
107
|
-
Returns: `0` when used from the first block (0th index) in a list.
|
package/operators/_gt.yaml
DELETED
|
@@ -1,65 +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: _gt
|
|
20
|
-
pageTitle: _gt
|
|
21
|
-
filePath: operators/_gt.yaml
|
|
22
|
-
types: |
|
|
23
|
-
```
|
|
24
|
-
([value1: any, value2: any]): boolean
|
|
25
|
-
```
|
|
26
|
-
description: |
|
|
27
|
-
The `_gt` operator tests if the first value is greater than the second equal. It takes an array of two values to test.
|
|
28
|
-
|
|
29
|
-
> The `_gt` operator tests using the javascript greater than operator. You can find a description of the algorithm used to compare two values [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Less_than).
|
|
30
|
-
|
|
31
|
-
arguments: |
|
|
32
|
-
###### array
|
|
33
|
-
An array of two values to compare.
|
|
34
|
-
examples: |
|
|
35
|
-
###### Two numbers:
|
|
36
|
-
```yaml
|
|
37
|
-
_gt:
|
|
38
|
-
- 4
|
|
39
|
-
- 3
|
|
40
|
-
```
|
|
41
|
-
Returns: `true`
|
|
42
|
-
|
|
43
|
-
```yaml
|
|
44
|
-
_gt:
|
|
45
|
-
- 1
|
|
46
|
-
- 1
|
|
47
|
-
```
|
|
48
|
-
Returns: `false`
|
|
49
|
-
|
|
50
|
-
```yaml
|
|
51
|
-
_gt:
|
|
52
|
-
- _sum:
|
|
53
|
-
- 3
|
|
54
|
-
- 4
|
|
55
|
-
- 8
|
|
56
|
-
```
|
|
57
|
-
Returns: `false`
|
|
58
|
-
|
|
59
|
-
###### Two strings:
|
|
60
|
-
```yaml
|
|
61
|
-
_gt:
|
|
62
|
-
- "a"
|
|
63
|
-
- "b"
|
|
64
|
-
```
|
|
65
|
-
Returns: `false`
|