@lowdefy/docs 3.21.2-alpha.0 → 3.22.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,64 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.22.0](https://github.com/lowdefy/lowdefy/compare/v3.22.0-alpha.1...v3.22.0) (2021-09-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **cli:** Use renderer served from blocks server url if configured. ([69d14b4](https://github.com/lowdefy/lowdefy/commit/69d14b4a862827beac955a5039df225af689f297)), closes [#840](https://github.com/lowdefy/lowdefy/issues/840)
12
+ * **docs:** Fix AxiosHttp connection type spelling in docs. ([d9b53a0](https://github.com/lowdefy/lowdefy/commit/d9b53a034111bc65813d81c036376d05274ff6c7))
13
+
14
+
15
+ ### Features
16
+
17
+ * Add `_array.reduce` examples. ([c9a6b50](https://github.com/lowdefy/lowdefy/commit/c9a6b50017c05774654388244b06076646449ce9))
18
+
19
+
20
+
21
+
22
+
23
+ # [3.22.0-alpha.1](https://github.com/lowdefy/lowdefy/compare/v3.22.0-alpha.0...v3.22.0-alpha.1) (2021-09-20)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **docs:** Added CheckboxSwitch examples and CheckboxSelector note. ([9cf56bf](https://github.com/lowdefy/lowdefy/commit/9cf56bfbaa5c7a75c55d24d2f965ec351c1672e0))
29
+ * **docs:** Added copyable and ellipsis config to Title block. ([9f8632e](https://github.com/lowdefy/lowdefy/commit/9f8632ec577196ea45471470a9dd13d3dbc09446))
30
+ * **docs:** Change npx commands to specific versions for deployments. ([f2c380b](https://github.com/lowdefy/lowdefy/commit/f2c380b07a78defff79281d5c07c61a718bfe750))
31
+ * **docs:** Convert CLI commands to npx commands. ([c9cd643](https://github.com/lowdefy/lowdefy/commit/c9cd643f3809fdc0cde7ba47e17e392b3236c17b))
32
+ * **docs:** Update CLI npm install docs. ([98a8b71](https://github.com/lowdefy/lowdefy/commit/98a8b71ff2ef961ccfcb8b94e115b4162881dd38))
33
+
34
+
35
+ ### Features
36
+
37
+ * **docs:** Add _get operator switch example. ([b727b9e](https://github.com/lowdefy/lowdefy/commit/b727b9edd0f37d3d10d5add32cbd9411fa4b6f98))
38
+ * **docs:** Added CheckboxSwitch docs. ([81752aa](https://github.com/lowdefy/lowdefy/commit/81752aa927f1d6050a290440ca15a87c05f3ea51))
39
+
40
+
41
+
42
+
43
+
44
+ # [3.22.0-alpha.0](https://github.com/lowdefy/lowdefy/compare/v3.21.2...v3.22.0-alpha.0) (2021-09-08)
45
+
46
+
47
+ ### Features
48
+
49
+ * **docs:** Add Stripe documentation. ([ed963ec](https://github.com/lowdefy/lowdefy/commit/ed963ec823ef19e88ed8320d71b83a7eef2e6cfe))
50
+ * **docs:** Added Password Input block docs. ([ee8bda4](https://github.com/lowdefy/lowdefy/commit/ee8bda4a5bd6248c03433a720652d72c3b9ddbae))
51
+
52
+
53
+
54
+
55
+
56
+ ## [3.21.2](https://github.com/lowdefy/lowdefy/compare/v3.21.2-alpha.0...v3.21.2) (2021-08-31)
57
+
58
+ **Note:** Version bump only for package @lowdefy/docs
59
+
60
+
61
+
62
+
63
+
6
64
  ## [3.21.2-alpha.0](https://github.com/lowdefy/lowdefy/compare/v3.21.1...v3.21.2-alpha.0) (2021-08-31)
7
65
 
8
66
 
@@ -66,7 +66,7 @@ _ref:
66
66
  ```yaml
67
67
  # lowdefy.yaml
68
68
  name: intercom-example
69
- lowdefy: '3.21.1'
69
+ lowdefy: '3.22.0'
70
70
  app:
71
71
  html:
72
72
  appendBody: |
@@ -137,7 +137,7 @@ _ref:
137
137
  ```yaml
138
138
  # file: lowdefy.yaml
139
139
  name: text-highlight-example
140
- lowdefy: '3.21.1'
140
+ lowdefy: '3.22.0'
141
141
  app:
142
142
  html:
143
143
  # Load the custom modules into the index.html head tag.
@@ -20,11 +20,13 @@ _ref:
20
20
  schema: ../blocks/blocksAntd/src/blocks/Title/Title.json
21
21
  filePath: blocks/display/Title.yaml
22
22
  init_state_values:
23
+ __type_block.properties.copyable: boolean
24
+ __type_block.properties.ellipsis: boolean
25
+ __boolean_block.properties.copyable: false
26
+ __boolean_block.properties.ellipsis: false
23
27
  __type_block.properties.value: number
24
28
  __number_block.properties.value: 33.3
25
29
  init_property_values:
26
30
  content: A title block.
27
31
  description_content: |
28
32
  A title component. Corresponds to html h1, h2, h3 and h4 elements.
29
-
30
-
@@ -0,0 +1,56 @@
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/blocks/template.yaml.njk
17
+ vars:
18
+ block_type: CheckboxSwitch
19
+ value_type: any[]
20
+ category: input
21
+ schema: ../blocks/blocksAntd/src/blocks/CheckboxSwitch/CheckboxSwitch.json
22
+ filePath: blocks/input/CheckboxSwitch.yaml
23
+ description_content: |
24
+ The `CheckboxSwitch` block allows a user to select a boolean value between (true/false).
25
+
26
+ > A similar switch block is `Switch`. Alternatively the `CheckboxSelector` can be used to list multiple options.
27
+ examples:
28
+ - title: Checkbox only
29
+ block:
30
+ id: checkbox_example
31
+ type: CheckboxSwitch
32
+ properties:
33
+ label:
34
+ disabled: true
35
+ - title: Description only
36
+ block:
37
+ id: description_example
38
+ type: CheckboxSwitch
39
+ properties:
40
+ description: Option
41
+ - title: Description and label
42
+ block:
43
+ id: description_label_example
44
+ type: CheckboxSwitch
45
+ properties:
46
+ description: Option
47
+ label:
48
+ title: Label
49
+ - title: Agree to terms and conditions
50
+ block:
51
+ id: terms_example
52
+ type: CheckboxSwitch
53
+ properties:
54
+ description: I agree to the terms and conditions and privacy policy as found on the website.... Thoroughly I agree to the terms and conditions and privacy policy as found on the website....
55
+ label:
56
+ disabled: true
@@ -0,0 +1,48 @@
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/blocks/template.yaml.njk
17
+ vars:
18
+ block_type: PasswordInput
19
+ value_type: string
20
+ category: input
21
+ schema: ../blocks/blocksAntd/src/blocks/PasswordInput/PasswordInput.json
22
+ filePath: blocks/input/PasswordInput.yaml
23
+ description_content: |
24
+ The `PasswordInput` block is a single line password input.
25
+
26
+ examples:
27
+ - title: Required password input
28
+ block:
29
+ id: required_example
30
+ type: PasswordInput
31
+ required: true
32
+ properties:
33
+ title: Required password input
34
+ - title: Placeholder
35
+ block:
36
+ id: placeholder_example
37
+ type: PasswordInput
38
+ properties:
39
+ placeholder: Placeholder
40
+ - title: Password
41
+ block:
42
+ id: password
43
+ type: PasswordInput
44
+ properties:
45
+ title: Password
46
+ placeholder: Your password
47
+ label:
48
+ span: 6
package/concepts/cli.yaml CHANGED
@@ -38,7 +38,15 @@ _ref:
38
38
  npx lowdefy@version <command>
39
39
  ```
40
40
 
41
- Alternative, you can install the CLI globally or to a npm project (with a `package.json` file) via npm. The CLI can then be used using `lowdefy` as the executable name:
41
+ Alternative, you can install the CLI globally or to a npm project (with a `package.json` file) via npm or yarn.
42
+
43
+ To install the CLI globally run:
44
+
45
+ ```
46
+ npm install lowdefy -g
47
+ ```
48
+
49
+ The CLI can then be run using `lowdefy` as the executable name:
42
50
 
43
51
  ```
44
52
  lowdefy <command>
@@ -90,12 +98,12 @@ _ref:
90
98
 
91
99
  Run the dev server, watching a relative directory for file changes:
92
100
  ```txt
93
- lowdefy dev --watch ../other-project
101
+ npx lowdefy@latest dev --watch ../other-project
94
102
  ```
95
103
 
96
104
  Run the dev server, ignoring the public directory:
97
105
  ```txt
98
- lowdefy dev --watch-ignore public/**
106
+ npx lowdefy@latest dev --watch-ignore public/**
99
107
  ```
100
108
 
101
109
  # Configuration
@@ -154,6 +162,8 @@ _ref:
154
162
  - `@lowdefy/blocks-markdown` to be hosted at `{BLOCK_SERVER_URL}/blocks-markdown/`.
155
163
  - `@lowdefy/blocks-echarts` to be hosted at `{BLOCK_SERVER_URL}/blocks-echarts/`.
156
164
 
165
+ If you wish to run the CLI dev server, the `@lowdefy/renderer` package build artifacts (located in the `dist` directory) should also be served from `{BLOCK_SERVER_URL}/renderer/`.
166
+
157
167
  - _ref:
158
168
  path: templates/navigation_buttons.yaml
159
169
  vars:
@@ -45,7 +45,7 @@ _ref:
45
45
 
46
46
  ```yaml
47
47
  name: dashboard-app
48
- lowdefy: 3.21.1
48
+ lowdefy: 3.22.0
49
49
  types:
50
50
  AmChartsXY:
51
51
  url: https://blocks-cdn.lowdefy.com/v3.10.1/blocks-amcharts/meta/AmChartsXY.json
@@ -95,7 +95,7 @@ _ref:
95
95
 
96
96
  ```yaml
97
97
  name: dashboard-app
98
- lowdefy: 3.21.1
98
+ lowdefy: 3.22.0
99
99
  types:
100
100
  MyCustomBlock:
101
101
  url: http://localhost:3002/meta/MyCustomBlock.json
@@ -53,7 +53,7 @@ _ref:
53
53
 
54
54
  ```yaml
55
55
  name: google-analytics-example
56
- lowdefy: 3.21.1
56
+ lowdefy: 3.22.0
57
57
  # ...
58
58
  app:
59
59
  html:
@@ -98,7 +98,7 @@ _ref:
98
98
  ```yaml
99
99
  # /lowdefy.yaml
100
100
  name: json-todos
101
- lowdefy: 3.21.1
101
+ lowdefy: 3.22.0
102
102
  app:
103
103
  html:
104
104
  appendHead:
@@ -156,7 +156,7 @@ _ref:
156
156
  ```yaml
157
157
  # /lowdefy.yaml
158
158
  name: operator-example
159
- lowdefy: 3.21.1
159
+ lowdefy: 3.22.0
160
160
  app:
161
161
  html:
162
162
  appendHead:
@@ -24,7 +24,7 @@ _ref:
24
24
  type: MarkdownWithCode
25
25
  properties:
26
26
  content: |
27
- The `AxiosHTTP` connection is used to connect to APIs and web servers using HTTP or HTTPS.
27
+ The `AxiosHttp` connection is used to connect to APIs and web servers using HTTP or HTTPS.
28
28
 
29
29
  It uses the [axios](https://github.com/axios/axios) library.
30
30
 
@@ -35,14 +35,14 @@ _ref:
35
35
  ## Connections
36
36
 
37
37
  Connection types:
38
- - AxiosHTTP
38
+ - AxiosHttp
39
39
 
40
40
  ## Requests
41
41
 
42
42
  Request types:
43
- - AxiosHTTP
43
+ - AxiosHttp
44
44
 
45
- ### AxiosHTTP
45
+ ### AxiosHttp
46
46
 
47
47
  #### Properties
48
48
 
@@ -88,7 +88,7 @@ _ref:
88
88
  ###### A basic full example requesting data from https://jsonplaceholder.typicode.com
89
89
 
90
90
  ```yaml
91
- lowdefy: 3.21.1
91
+ lowdefy: 3.22.0
92
92
  name: Lowdefy starter
93
93
  connections:
94
94
  - id: my_api
@@ -0,0 +1,139 @@
1
+ # Copyright 2020-2021 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ _ref:
16
+ path: templates/general.yaml.njk
17
+ vars:
18
+ pageId: Stripe
19
+ pageTitle: Stripe
20
+ section: Connections
21
+ filePath: connections/Stripe.yaml
22
+ content:
23
+ - id: markdown
24
+ type: MarkdownWithCode
25
+ properties:
26
+ content: |
27
+ ## Connections
28
+
29
+ Connection types:
30
+ - Stripe
31
+
32
+ ### Stripe
33
+
34
+ [Stripe](https://stripe.com/) is a popular payment provider which allows you to accept payments, send payouts, and manage your business online.
35
+ The `Stripe` connector uses the official [Node.js client from Stripe](https://github.com/stripe/stripe-node).
36
+ In order to use the `Stripe` connection, you first need to create a [Stripe](https://stripe.com/) account and setup an API key.
37
+
38
+ > Secrets like API keys should be stored using the [`_secret`](operators/secret.md) operator.
39
+
40
+ #### Properties
41
+ - `secretKey: string`: __Required__ - Stripe [secret key](https://stripe.com/docs/keys).
42
+ - `apiVersion: string`: Stripe API version to use. Defaults to the account-wide version.
43
+ - `timeout: number`: Timeout for requests to the Stripe API.
44
+ - `maxNetworkRetries: number`: Maximum number of times failed requests are repeated before throwing an error.
45
+ - `telemetry: boolean`: Whether to send telemetry data to Stripe (this is forwarded to the Stripe client library. Lowdefy does not receive any telemetry data from your Stripe connection.)
46
+
47
+ #### Examples
48
+
49
+ ###### Simple connection:
50
+ ```yaml
51
+ connections:
52
+ - id: stripe
53
+ type: Stripe
54
+ properties:
55
+ secretKey:
56
+ _secret: STRIPE_SECRET_KEY
57
+ ```
58
+ Environment variables:
59
+ ```
60
+ LOWDEFY_SECRET_STRIPE_SECRET_KEY = sk_test_KyvNyie...
61
+ ```
62
+
63
+ ###### Using an older API version:
64
+ ```yaml
65
+ connections:
66
+ - id: stripe
67
+ type: Stripe
68
+ properties:
69
+ secretKey:
70
+ _secret: STRIPE_SECRET_KEY
71
+ apiVersion: 2017-12-14
72
+ ```
73
+ Environment variables:
74
+ ```
75
+ LOWDEFY_SECRET_STRIPE_SECRET_KEY = sk_test_KyvNyie...
76
+ ```
77
+
78
+ ## Requests
79
+
80
+ Request types:
81
+ - StripeRequest
82
+
83
+ ### StripeRequest
84
+
85
+ The `StripeRequest` request allows calls to all modules supported by the [Stripe API client](https://stripe.com/docs/api?lang=node) by nesting the resource and method calls:
86
+ ```yaml
87
+ resource:
88
+ method:
89
+ - parameter1
90
+ - parameter2
91
+ ```
92
+
93
+ #### Properties
94
+ - `{{ apiResource }}: object`: A Stripe API resource, eg. `customers`.
95
+ - `{{ method }}: array | null`: A resource method, eg. `create`. The arguments array will be passed on to the client method.
96
+
97
+ The Stripe client exposes all resources as objects, with the API methods being available as function properties on those resource objects.
98
+ In Lowdefy, you may access these properties by nesting them.
99
+
100
+ ### Examples
101
+
102
+ ###### List the 30 most recent customers
103
+ ```yaml
104
+ requests:
105
+ - id: list_customers
106
+ type: StripeRequest
107
+ connectionId: stripe
108
+ properties:
109
+ customers:
110
+ list:
111
+ limit: 30
112
+ ```
113
+
114
+ ###### Create a payment intent
115
+ ```yaml
116
+ requests:
117
+ - id: create_payment_intent
118
+ type: StripeRequest
119
+ connectionId: stripe
120
+ properties:
121
+ paymentIntents:
122
+ create:
123
+ - amount: 2000
124
+ currency: eur
125
+ payment_method_types: [ card ]
126
+ ```
127
+
128
+ ###### Retrieve a checkout session by ID
129
+ ```yaml
130
+ requests:
131
+ - id: retrieve_checkout_session
132
+ type: StripeRequest
133
+ connectionId: stripe
134
+ properties:
135
+ checkout:
136
+ sessions:
137
+ retrieve:
138
+ - cs_test_onpT2icY2lrSU0IgDGXEhhcOHcWeJS5BpLcQGMx0uI9TZHLMBdzvWpvx
139
+ ```
@@ -55,10 +55,10 @@ _ref:
55
55
  COPY --chown=node:node . .
56
56
 
57
57
  # Build the Lowdefy config using the Lowdefy CLI
58
- RUN npx lowdefy@latest build
58
+ RUN npx lowdefy@3.22.0 build
59
59
 
60
60
  # Use the correct Lowdefy base image
61
- FROM lowdefy/lowdefy-aws-lambda:3.21.1
61
+ FROM lowdefy/lowdefy-aws-lambda:3.22.0
62
62
 
63
63
  # Copy build output from build stage
64
64
  COPY --from=build /home/node/lowdefy/.lowdefy/build ./build
@@ -65,10 +65,10 @@ _ref:
65
65
  COPY --chown=node:node . .
66
66
 
67
67
  # Build the Lowdefy config using the Lowdefy CLI
68
- RUN npx lowdefy@latest build
68
+ RUN npx lowdefy@3.22.0 build
69
69
 
70
70
  # Use the correct Lowdefy base image
71
- FROM lowdefy/lowdefy:3.21.1
71
+ FROM lowdefy/lowdefy:3.22.0
72
72
 
73
73
  # Copy build output from build stage
74
74
  COPY --from=build --chown=node:node /home/node/lowdefy/.lowdefy/build ./build
@@ -46,7 +46,7 @@ _ref:
46
46
 
47
47
  Configure your Netlify deployment.
48
48
 
49
- - Set your build command to `npx lowdefy@latest build-netlify`.
49
+ - Set your build command to `npx lowdefy@3 build-netlify`.
50
50
  - Set your publish directory to `.lowdefy/publish`.
51
51
 
52
52
  #### Step 4
package/lowdefy.yaml CHANGED
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
  name: '@lowdefy/docs'
16
- lowdefy: 3.21.1
16
+ lowdefy: 3.22.0
17
17
  licence: Apache-2.0
18
18
 
19
19
  cli:
package/menus.yaml CHANGED
@@ -201,6 +201,9 @@
201
201
  - id: CheckboxSelector
202
202
  type: MenuLink
203
203
  pageId: CheckboxSelector
204
+ - id: CheckboxSwitch
205
+ type: MenuLink
206
+ pageId: CheckboxSwitch
204
207
  - id: ChromeColorSelector
205
208
  type: MenuLink
206
209
  pageId: ChromeColorSelector
@@ -240,6 +243,9 @@
240
243
  - id: ParagraphInput
241
244
  type: MenuLink
242
245
  pageId: ParagraphInput
246
+ - id: PasswordInput
247
+ type: MenuLink
248
+ pageId: PasswordInput
243
249
  - id: RadioSelector
244
250
  type: MenuLink
245
251
  pageId: RadioSelector
@@ -510,6 +516,9 @@
510
516
  - id: SQLite
511
517
  type: MenuLink
512
518
  pageId: SQLite
519
+ - id: Stripe
520
+ type: MenuLink
521
+ pageId: Stripe
513
522
  - id: actions
514
523
  type: MenuGroup
515
524
  properties:
@@ -751,11 +760,16 @@
751
760
  title: Lowdefy Versions
752
761
  icon: BranchesOutlined
753
762
  links:
754
- - id: v3.21.1
763
+ - id: v3.22.0
755
764
  type: MenuLink
756
765
  url: https://docs.lowdefy.com
757
766
  properties:
758
- title: v3.21.1
767
+ title: v3.22.0
768
+ - id: v3.21.2
769
+ type: MenuLink
770
+ url: https://612e10d3dc02710008646251--lowdefy-docs.netlify.app/introduction
771
+ properties:
772
+ title: v3.21.2
759
773
  - id: v3.20.4
760
774
  type: MenuLink
761
775
  url: https://6121f02416ea332ef213ab7d--lowdefy-docs.netlify.app
@@ -77,7 +77,7 @@ _ref:
77
77
  First register a custom JavaScript action: `getNormalizedEigenvector`
78
78
  ```yaml
79
79
  # file: lowdefy.yaml
80
- lowdefy: '3.21.1'
80
+ lowdefy: '3.22.0'
81
81
  app:
82
82
  html:
83
83
  appendHead: |
@@ -198,6 +198,54 @@ _ref:
198
198
  ```
199
199
  description: |
200
200
  The `_array.reduce` method [executes a reducer function on each element of the array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce), resulting in single output value.
201
+ examples: |
202
+ The simplest example would probably be adding all the elements in an array:
203
+ ```yaml
204
+ sum:
205
+ _array.reduce:
206
+ on: [1, 2, 3, 4]
207
+ callback:
208
+ _function:
209
+ __sum:
210
+ - __args: 0
211
+ - __args: 1
212
+ ```
213
+ This will return `sum: 10`
214
+
215
+ You can start off by counting from 10 by specifying an `initialValue` for the reducer:
216
+ ```yaml
217
+ sum:
218
+ _array.reduce:
219
+ on: [1, 2, 3, 4]
220
+ callback:
221
+ _function:
222
+ __sum:
223
+ - __args: 0
224
+ - __args: 1
225
+ initialValue: 10
226
+ ```
227
+ This will return `sum: 20`
228
+
229
+ You can use the index of the array element to add some logic to your `callback`. For instance, when you reach index 2 of your array (the 3rd entry), add 100 instead of the current element value:
230
+ ```yaml
231
+ sum:
232
+ _array.reduce:
233
+ on: [1, 2, 3, 4]
234
+ callback:
235
+ _function:
236
+ __sum:
237
+ - __args: 0
238
+ - __if:
239
+ test:
240
+ __eq:
241
+ - __args: 2
242
+ - 2
243
+ then: 100
244
+ else:
245
+ __args: 1
246
+ ```
247
+ This will return `sum: 107`
248
+
201
249
  - name: reduceRight
202
250
  types: |
203
251
  ```
@@ -47,6 +47,21 @@ _ref:
47
47
  ```
48
48
  Returns: `"George"`.
49
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: PlusCircleTwoTone
57
+ escalated: ExclamationCircleOutlined
58
+ investigation_started: ToolTwoTone
59
+ client_contacted: SoundTwoTone
60
+ awaiting_confirmation: LikeOutlined
61
+ closed: StopOutlined
62
+ ```
63
+ Returns: The icon corresponding to the status in state.
64
+
50
65
  ###### Get from an array (arrays are `0` indexed):
51
66
  ```yaml
52
67
  _get:
@@ -51,7 +51,7 @@ _ref:
51
51
  ```yaml
52
52
  # lowdefy.yaml
53
53
  name: make-me-primes
54
- lowdefy: '3.21.1'
54
+ lowdefy: '3.22.0'
55
55
  app:
56
56
  html:
57
57
  # This HTML will be appended to the head HTML tag in the Lowdefy app
@@ -119,7 +119,7 @@ _ref:
119
119
  ```yaml
120
120
  # file: lowdefy.yaml
121
121
  name: my-chart
122
- lowdefy: '3.21.1'
122
+ lowdefy: '3.22.0'
123
123
  app:
124
124
  html:
125
125
  appendHead: