@lowdefy/docs 4.0.0-alpha.6 → 4.0.0-alpha.7
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 +75 -104
- package/actions/JsAction.yaml +6 -6
- package/blocks/container/Affix.yaml +1 -1
- package/blocks/container/Alert.yaml +2 -2
- package/blocks/container/Badge.yaml +1 -1
- package/blocks/container/Box.yaml +1 -1
- package/blocks/container/Card.yaml +1 -1
- package/blocks/container/Collapse.yaml +1 -1
- package/blocks/container/Comment.yaml +4 -4
- package/blocks/container/ConfirmModal.yaml +1 -1
- package/blocks/container/Descriptions.yaml +2 -2
- package/blocks/container/Drawer.yaml +1 -1
- package/blocks/container/Label.yaml +1 -2
- package/blocks/container/Modal.yaml +1 -1
- package/blocks/container/PageHCF.yaml +1 -1
- package/blocks/container/PageHCSF.yaml +1 -1
- package/blocks/container/PageHSCF.yaml +1 -1
- package/blocks/container/PageHeaderMenu.yaml +3 -3
- package/blocks/container/PageSHCF.yaml +1 -1
- package/blocks/container/PageSiderMenu.yaml +3 -3
- package/blocks/container/Result.yaml +2 -2
- package/blocks/container/Span.yaml +1 -1
- package/blocks/container/Spin.yaml +2 -2
- package/blocks/container/Tabs.yaml +2 -2
- package/blocks/container/Tooltip.yaml +1 -1
- package/blocks/display/Anchor.yaml +1 -2
- package/blocks/display/Avatar.yaml +1 -2
- package/blocks/display/Breadcrumb.yaml +2 -3
- package/blocks/display/Button.yaml +7 -7
- package/blocks/display/DangerousHtml.yaml +1 -1
- package/blocks/display/DangerousMarkdown.yaml +1 -1
- package/blocks/display/Divider.yaml +1 -3
- package/blocks/display/EChart.yaml +1 -1
- package/blocks/display/Html.yaml +2 -2
- package/blocks/display/Icon.yaml +1 -3
- package/blocks/display/Img.yaml +1 -1
- package/blocks/display/Markdown.yaml +5 -6
- package/blocks/display/MarkdownWithCode.yaml +3 -5
- package/blocks/display/Menu.yaml +3 -3
- package/blocks/display/Message.yaml +1 -1
- package/blocks/display/MobileMenu.yaml +3 -4
- package/blocks/display/Notification.yaml +2 -2
- package/blocks/display/Paragraph.yaml +2 -4
- package/blocks/display/Progress.yaml +8 -9
- package/blocks/display/Skeleton.yaml +1 -2
- package/blocks/display/Statistic.yaml +3 -5
- package/blocks/display/Title.yaml +1 -1
- package/blocks/input/AutoComplete.yaml +1 -2
- package/blocks/input/ButtonSelector.yaml +1 -2
- package/blocks/input/CheckboxSelector.yaml +1 -2
- package/blocks/input/CheckboxSwitch.yaml +1 -1
- package/blocks/input/ChromeColorSelector.yaml +1 -2
- package/blocks/input/CircleColorSelector.yaml +1 -2
- package/blocks/input/ColorSelector.yaml +1 -2
- package/blocks/input/CompactColorSelector.yaml +1 -2
- package/blocks/input/DateRangeSelector.yaml +1 -2
- package/blocks/input/DateSelector.yaml +1 -2
- package/blocks/input/DateTimeSelector.yaml +1 -2
- package/blocks/input/GithubColorSelector.yaml +1 -2
- package/blocks/input/MonthSelector.yaml +1 -2
- package/blocks/input/MultipleSelector.yaml +1 -1
- package/blocks/input/NumberInput.yaml +1 -1
- package/blocks/input/Pagination.yaml +3 -3
- package/blocks/input/ParagraphInput.yaml +1 -1
- package/blocks/input/PasswordInput.yaml +1 -1
- package/blocks/input/RadioSelector.yaml +1 -1
- package/blocks/input/RatingSlider.yaml +1 -1
- package/blocks/input/S3UploadButton.yaml +1 -1
- package/blocks/input/Selector.yaml +1 -1
- package/blocks/input/SliderColorSelector.yaml +1 -1
- package/blocks/input/SwatchesColorSelector.yaml +1 -1
- package/blocks/input/Switch.yaml +1 -1
- package/blocks/input/TextArea.yaml +1 -2
- package/blocks/input/TextInput.yaml +7 -7
- package/blocks/input/TitleInput.yaml +1 -1
- package/blocks/input/TwitterColorSelector.yaml +1 -1
- package/blocks/input/WeekSelector.yaml +1 -1
- package/blocks/list/ControlledList.yaml +18 -18
- package/blocks/list/List.yaml +16 -17
- package/blocks/list/TimelineList.yaml +23 -22
- package/concepts/cli.yaml +7 -7
- package/concepts/custom-blocks.yaml +16 -2
- package/concepts/custom-code.yaml +5 -4
- package/concepts/lowdefy-schema.yaml +5 -4
- package/connections/AxiosHttp.yaml +1 -1
- package/connections/Knex.yaml +7 -7
- package/connections/MongoDB.yaml +176 -47
- package/deployment/aws-lambda.yaml +3 -3
- package/deployment/docker.yaml +4 -4
- package/deployment/node-server.yaml +1 -1
- package/howto/generate-csv.yaml.njk +7 -6
- package/howto/generate-pdf.yaml.njk +21 -21
- package/howto/generateCsv/lowdefy.yaml +32 -31
- package/howto/generatePdf/lowdefy.yaml +10 -9
- package/introduction.yaml +1 -1
- package/lowdefy.yaml +1 -1
- package/menus.yaml +26 -29
- package/operators/_actions.yaml +2 -2
- package/operators/_get.yaml +6 -6
- package/operators/_js.yaml +2 -2
- package/operators/_ref.yaml +40 -6
- package/operators/_yaml.yaml +39 -15
- package/package.json +6 -7
- package/pages.yaml +8 -8
- package/public/sitemap.xml +204 -204
- package/templates/blocks/defaultValueTransformer.js +4 -2
- package/templates/blocks/exampleTransformer.js +1 -1
- package/templates/blocks/propertiesFormTransformer.js +3 -3
- package/templates/blocks/propertiesGetterTransformer.js +2 -2
- package/templates/blocks/schemaTransformer.js +1 -1
- package/templates/blocks/template.yaml.njk +3 -4
- package/templates/blog.yaml.njk +5 -5
- package/templates/cli_command.yaml.njk +2 -2
- package/templates/footer.yaml.njk +18 -18
- package/templates/general.yaml.njk +4 -4
- package/templates/generateSitemap.js +1 -2
- package/templates/header.yaml +2 -2
- package/templates/navigation_buttons.yaml +2 -2
- package/templates/operatorsMethodTransformer.js +2 -2
- package/templates/test/array.test.js +146 -166
- package/templates/test/boolean.test.js +13 -17
- package/templates/test/button.test.js +21 -25
- package/templates/test/color.test.js +21 -23
- package/templates/test/enum.test.js +15 -19
- package/templates/test/icon.test.js +17 -21
- package/templates/test/integer.test.js +13 -17
- package/templates/test/manual.test.js +66 -74
- package/templates/test/number.test.js +13 -17
- package/templates/test/object.test.js +90 -98
- package/templates/test/oneOf.test.js +108 -120
- package/templates/test/string.test.js +13 -17
- package/templates/test/yaml.test.js +96 -112
- package/tutorial/tutorial-actions-operators-config.yaml +4 -4
- package/tutorial/tutorial-actions-operators.yaml +6 -6
- package/tutorial/tutorial-add-blocks-config.yaml +4 -4
- package/tutorial/tutorial-add-blocks.yaml +4 -4
- package/tutorial/tutorial-create-page-config.yaml +2 -2
- package/tutorial/tutorial-create-page.yaml +4 -4
- package/tutorial/tutorial-deploy.yaml +2 -2
- package/tutorial/tutorial-requests-config.yaml +4 -4
- package/tutorial/tutorial-requests.yaml +2 -2
- package/tutorial/tutorial-start.yaml +6 -6
- package/users/login-and-logout.yaml +2 -2
- package/users/protected-pages.yaml +2 -2
- package/users/roles.yaml +2 -2
- package/users/users-introduction.yaml +2 -2
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: ParagraphInput
|
|
19
19
|
value_type: string
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/ParagraphInput/schema.json
|
|
22
22
|
filePath: blocks/input/ParagraphInput.yaml
|
|
23
23
|
init_state_values:
|
|
24
24
|
__type_block.properties.copyable: boolean
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: PasswordInput
|
|
19
19
|
value_type: string
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/PasswordInput/schema.json
|
|
22
22
|
filePath: blocks/input/PasswordInput.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
The `PasswordInput` block is a single line password input.
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: RadioSelector
|
|
19
19
|
value_type: any
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/RadioSelector/schema.json
|
|
22
22
|
filePath: blocks/input/RadioSelector.yaml
|
|
23
23
|
init_state_values:
|
|
24
24
|
__type_block.properties.options: object[]
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: RatingSlider
|
|
19
19
|
value_type: number
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/RatingSlider/schema.json
|
|
22
22
|
filePath: blocks/input/RatingSlider.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
The `RatingSlider` block allows a user to choose a numerical value on a slider input. It is typically used for scores or ratings. It has the option to have a "Not Applicable" checkbox, which leaves the value as null.
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: S3UploadButton
|
|
19
19
|
value_type: object
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../
|
|
21
|
+
schema: ../plugins/plugins/plugin-aws/src/blocks/S3UploadButton/schema.json
|
|
22
22
|
filePath: blocks/input/S3UploadButton.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
The `S3UploadButton` block allows a user to to upload a file to AWS S3.
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: Selector
|
|
19
19
|
value_type: any
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/Selector/schema.json
|
|
22
22
|
filePath: blocks/input/Selector.yaml
|
|
23
23
|
init_state_values:
|
|
24
24
|
__type_block.properties.options: object[]
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: SliderColorSelector
|
|
19
19
|
value_type: string
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-color-selectors/src/blocks/SliderColorSelector/schema.json
|
|
22
22
|
filePath: blocks/input/SliderColorSelector.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
A slider color selector component.
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: SwatchesColorSelector
|
|
19
19
|
value_type: string
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-color-selectors/src/blocks/SwatchesColorSelector/schema.json
|
|
22
22
|
filePath: blocks/input/SwatchesColorSelector.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
A swatches color selector component.
|
package/blocks/input/Switch.yaml
CHANGED
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: Switch
|
|
19
19
|
value_type: boolean
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/Switch/schema.json
|
|
22
22
|
filePath: blocks/input/Switch.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
The `Switch` block is an on/off input. It has a boolean value (true/false).
|
|
@@ -18,11 +18,10 @@ _ref:
|
|
|
18
18
|
block_type: TextArea
|
|
19
19
|
value_type: string
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/TextArea/schema.json
|
|
22
22
|
filePath: blocks/input/TextArea.yaml
|
|
23
23
|
init_state_values:
|
|
24
24
|
__type_block.properties.autoSize: boolean
|
|
25
25
|
__boolean_block.properties.autoSize: true
|
|
26
26
|
description_content: |
|
|
27
27
|
The `TextArea` block is a text input that has multiple rows of input. It can be set to a fixed number of rows, or it can expand automatically as the user inputs more text.
|
|
28
|
-
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: TextInput
|
|
19
19
|
value_type: string
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/TextInput/schema.json
|
|
22
22
|
filePath: blocks/input/TextInput.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
The `TextInput` block is a single line text input.
|
|
@@ -41,19 +41,19 @@ _ref:
|
|
|
41
41
|
block:
|
|
42
42
|
id: prefix_suffix_example
|
|
43
43
|
type: TextInput
|
|
44
|
-
properties:
|
|
45
|
-
label:
|
|
44
|
+
properties:
|
|
45
|
+
label:
|
|
46
46
|
extra: Prefix and suffix text
|
|
47
47
|
prefix: The cat
|
|
48
|
-
placeholder: chased
|
|
48
|
+
placeholder: chased
|
|
49
49
|
suffix: the rat
|
|
50
50
|
- title: User name
|
|
51
51
|
block:
|
|
52
52
|
id: username
|
|
53
53
|
type: TextInput
|
|
54
|
-
properties:
|
|
54
|
+
properties:
|
|
55
55
|
title: First Name
|
|
56
|
-
suffixIcon:
|
|
56
|
+
suffixIcon: AiOutlinedUser
|
|
57
57
|
placeholder: Your name
|
|
58
|
-
label:
|
|
58
|
+
label:
|
|
59
59
|
span: 6
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: TitleInput
|
|
19
19
|
value_type: string
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/TitleInput/schema.json
|
|
22
22
|
filePath: blocks/input/TitleInput.yaml
|
|
23
23
|
init_state_values:
|
|
24
24
|
__type_block.properties.copyable: boolean
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: TwitterColorSelector
|
|
19
19
|
value_type: string
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-color-selectors/src/blocks/TwitterColorSelector/schema.json
|
|
22
22
|
filePath: blocks/input/TwitterColorSelector.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
A color selector component similar to the twitter color selector..
|
|
@@ -18,7 +18,7 @@ _ref:
|
|
|
18
18
|
block_type: WeekSelector
|
|
19
19
|
value_type: date
|
|
20
20
|
category: input
|
|
21
|
-
schema: ../blocks/
|
|
21
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/WeekSelector/schema.json
|
|
22
22
|
filePath: blocks/input/WeekSelector.yaml
|
|
23
23
|
description_content: |
|
|
24
24
|
The `WeekSelector` block allows a user to select a week. The value is a date object, with day and time values of midnight on the first monday of the week GMT.
|
|
@@ -17,7 +17,7 @@ _ref:
|
|
|
17
17
|
vars:
|
|
18
18
|
block_type: ControlledList
|
|
19
19
|
category: list
|
|
20
|
-
schema: ../blocks/
|
|
20
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/ControlledList/schema.json
|
|
21
21
|
filePath: blocks/ControlledList/ControlledList.yaml
|
|
22
22
|
description_content: |
|
|
23
23
|
The ControlledList block renders a content area for all items in the array into the list card and provides easy UI elements to add or remove items in the list. All list blocks create a array in state at their block `id`. The list content areas are rendered for each index in the array. See the [List Concept](/lists) page for a detailed description on how to work with lists.
|
|
@@ -26,11 +26,11 @@ _ref:
|
|
|
26
26
|
methods:
|
|
27
27
|
- name: pushItem
|
|
28
28
|
onClick:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
- id: pushItem
|
|
30
|
+
type: CallMethod
|
|
31
|
+
params:
|
|
32
|
+
blockId: block_id
|
|
33
|
+
method: pushItem
|
|
34
34
|
- name: unshiftItem
|
|
35
35
|
onClick:
|
|
36
36
|
- id: unshiftItem
|
|
@@ -45,7 +45,7 @@ _ref:
|
|
|
45
45
|
params:
|
|
46
46
|
blockId: block_id
|
|
47
47
|
method: removeItem
|
|
48
|
-
args:
|
|
48
|
+
args:
|
|
49
49
|
- 1
|
|
50
50
|
- name: for index 1 moveItemDown
|
|
51
51
|
onClick:
|
|
@@ -54,7 +54,7 @@ _ref:
|
|
|
54
54
|
params:
|
|
55
55
|
blockId: block_id
|
|
56
56
|
method: moveItemDown
|
|
57
|
-
args:
|
|
57
|
+
args:
|
|
58
58
|
- 1
|
|
59
59
|
- name: for index 1 moveItemUp
|
|
60
60
|
onClick:
|
|
@@ -63,10 +63,10 @@ _ref:
|
|
|
63
63
|
params:
|
|
64
64
|
blockId: block_id
|
|
65
65
|
method: moveItemUp
|
|
66
|
-
args:
|
|
66
|
+
args:
|
|
67
67
|
- 1
|
|
68
68
|
init_state_values:
|
|
69
|
-
todos:
|
|
69
|
+
todos:
|
|
70
70
|
- Add the noodles.
|
|
71
71
|
- Let it cook for a minute.
|
|
72
72
|
- Add some 🌶.
|
|
@@ -86,7 +86,7 @@ _ref:
|
|
|
86
86
|
style:
|
|
87
87
|
paddingTop: 16
|
|
88
88
|
properties:
|
|
89
|
-
content:
|
|
89
|
+
content:
|
|
90
90
|
_nunjucks:
|
|
91
91
|
template: |
|
|
92
92
|
###### Todos State Value:
|
|
@@ -97,10 +97,10 @@ _ref:
|
|
|
97
97
|
value:
|
|
98
98
|
_yaml.stringify:
|
|
99
99
|
on:
|
|
100
|
-
todos:
|
|
100
|
+
todos:
|
|
101
101
|
_state: todos
|
|
102
102
|
options:
|
|
103
|
-
sortKeys: false
|
|
103
|
+
sortKeys: false
|
|
104
104
|
- title: List of Contacts
|
|
105
105
|
block:
|
|
106
106
|
id: contacts
|
|
@@ -126,7 +126,7 @@ _ref:
|
|
|
126
126
|
label:
|
|
127
127
|
span: 10
|
|
128
128
|
align: right
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
- id: contacts.$.date_of_birth
|
|
131
131
|
type: DateSelector
|
|
132
132
|
layout:
|
|
@@ -143,7 +143,7 @@ _ref:
|
|
|
143
143
|
span: 12
|
|
144
144
|
required: true
|
|
145
145
|
properties:
|
|
146
|
-
title: Email address
|
|
146
|
+
title: Email address
|
|
147
147
|
label:
|
|
148
148
|
span: 10
|
|
149
149
|
align: right
|
|
@@ -174,7 +174,7 @@ _ref:
|
|
|
174
174
|
style:
|
|
175
175
|
paddingTop: 16
|
|
176
176
|
properties:
|
|
177
|
-
content:
|
|
177
|
+
content:
|
|
178
178
|
_nunjucks:
|
|
179
179
|
template: |
|
|
180
180
|
###### Contacts State Value:
|
|
@@ -185,7 +185,7 @@ _ref:
|
|
|
185
185
|
value:
|
|
186
186
|
_yaml.stringify:
|
|
187
187
|
on:
|
|
188
|
-
contacts:
|
|
188
|
+
contacts:
|
|
189
189
|
_state: contacts
|
|
190
190
|
options:
|
|
191
|
-
sortKeys: false
|
|
191
|
+
sortKeys: false
|
package/blocks/list/List.yaml
CHANGED
|
@@ -17,25 +17,25 @@ _ref:
|
|
|
17
17
|
vars:
|
|
18
18
|
block_type: List
|
|
19
19
|
category: list
|
|
20
|
-
schema: ../blocks/
|
|
20
|
+
schema: ../plugins/blocks/blocks-basic/src/blocks/List/schema.json
|
|
21
21
|
filePath: blocks/list/List.yaml
|
|
22
22
|
description_content: |
|
|
23
23
|
The List block renders a content area for all items in the array. All list blocks create a array in state at their block `id`. The list content areas are rendered for each index in the array. See the [List Concept](/lists) page for a detailed description on how to work with lists.
|
|
24
24
|
areas:
|
|
25
25
|
- content
|
|
26
26
|
init_state_values:
|
|
27
|
-
todos:
|
|
28
|
-
- Bake a 🧁
|
|
27
|
+
todos:
|
|
28
|
+
- Bake a 🧁
|
|
29
29
|
- Eat a🍦
|
|
30
30
|
- Phone a 🦖
|
|
31
31
|
methods:
|
|
32
32
|
- name: pushItem
|
|
33
33
|
onClick:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
- id: pushItem
|
|
35
|
+
type: CallMethod
|
|
36
|
+
params:
|
|
37
|
+
blockId: block_id
|
|
38
|
+
method: pushItem
|
|
39
39
|
- name: unshiftItem
|
|
40
40
|
onClick:
|
|
41
41
|
- id: unshiftItem
|
|
@@ -50,7 +50,7 @@ _ref:
|
|
|
50
50
|
params:
|
|
51
51
|
blockId: block_id
|
|
52
52
|
method: removeItem
|
|
53
|
-
args:
|
|
53
|
+
args:
|
|
54
54
|
- 1
|
|
55
55
|
- name: for index 1 moveItemDown
|
|
56
56
|
onClick:
|
|
@@ -59,7 +59,7 @@ _ref:
|
|
|
59
59
|
params:
|
|
60
60
|
blockId: block_id
|
|
61
61
|
method: moveItemDown
|
|
62
|
-
args:
|
|
62
|
+
args:
|
|
63
63
|
- 1
|
|
64
64
|
- name: for index 1 moveItemUp
|
|
65
65
|
onClick:
|
|
@@ -68,7 +68,7 @@ _ref:
|
|
|
68
68
|
params:
|
|
69
69
|
blockId: block_id
|
|
70
70
|
method: moveItemUp
|
|
71
|
-
args:
|
|
71
|
+
args:
|
|
72
72
|
- 1
|
|
73
73
|
examples:
|
|
74
74
|
- title: Todo List
|
|
@@ -92,7 +92,7 @@ _ref:
|
|
|
92
92
|
shrink: 1
|
|
93
93
|
properties:
|
|
94
94
|
title: Add item
|
|
95
|
-
icon:
|
|
95
|
+
icon: AiOutlinedPlus
|
|
96
96
|
events:
|
|
97
97
|
onClick:
|
|
98
98
|
- id: add
|
|
@@ -119,7 +119,7 @@ _ref:
|
|
|
119
119
|
layout:
|
|
120
120
|
shrink: 1
|
|
121
121
|
properties:
|
|
122
|
-
name:
|
|
122
|
+
name: AiOutlinedMinusCircle
|
|
123
123
|
size: 18
|
|
124
124
|
events:
|
|
125
125
|
onClick:
|
|
@@ -133,7 +133,6 @@ _ref:
|
|
|
133
133
|
method: removeItem
|
|
134
134
|
args:
|
|
135
135
|
- _index: 0
|
|
136
|
-
|
|
137
136
|
|
|
138
137
|
extra:
|
|
139
138
|
id: ex_state
|
|
@@ -141,7 +140,7 @@ _ref:
|
|
|
141
140
|
style:
|
|
142
141
|
paddingTop: 16
|
|
143
142
|
properties:
|
|
144
|
-
content:
|
|
143
|
+
content:
|
|
145
144
|
_nunjucks:
|
|
146
145
|
template: |
|
|
147
146
|
###### Todos State Value:
|
|
@@ -152,7 +151,7 @@ _ref:
|
|
|
152
151
|
value:
|
|
153
152
|
_yaml.stringify:
|
|
154
153
|
on:
|
|
155
|
-
todos:
|
|
154
|
+
todos:
|
|
156
155
|
_state: todos
|
|
157
156
|
options:
|
|
158
|
-
sortKeys: false
|
|
157
|
+
sortKeys: false
|
|
@@ -12,12 +12,14 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
+
# TODO: Fix schema to add to docs
|
|
16
|
+
|
|
15
17
|
_ref:
|
|
16
18
|
path: templates/blocks/template.yaml.njk
|
|
17
19
|
vars:
|
|
18
20
|
block_type: TimelineList
|
|
19
21
|
category: list
|
|
20
|
-
schema: ../blocks/
|
|
22
|
+
schema: ../plugins/blocks/blocks-antd/src/blocks/TimelineList/schema.json
|
|
21
23
|
filePath: blocks/TimelineList/TimelineList.yaml
|
|
22
24
|
description_content: |
|
|
23
25
|
The TimelineList block renders a content area for all items in the array. All list blocks create a array in state at their block `id`. The list content areas are rendered for each index in the array. See the [List Concept](/lists) page for a detailed description on how to work with lists.
|
|
@@ -28,41 +30,41 @@ _ref:
|
|
|
28
30
|
init_state_values:
|
|
29
31
|
shipment_events:
|
|
30
32
|
- type: Order Placed
|
|
31
|
-
icon:
|
|
33
|
+
icon: AiTwoToneShoppingCart
|
|
32
34
|
color: '#2f54eb'
|
|
33
35
|
orderNumber: 2112
|
|
34
|
-
timestamp:
|
|
36
|
+
timestamp:
|
|
35
37
|
_date: '2021-02-10T20:30:00.000Z'
|
|
36
38
|
item:
|
|
37
39
|
code: ax2m-83kl9-ck
|
|
38
40
|
title: Useless Glue
|
|
39
41
|
- type: Shipped
|
|
40
|
-
icon:
|
|
42
|
+
icon: AiTwoToneGift
|
|
41
43
|
color: '#fa8c16'
|
|
42
44
|
orderNumber: 2112
|
|
43
|
-
timestamp:
|
|
45
|
+
timestamp:
|
|
44
46
|
_date: '2021-02-11T08:33:00.000Z'
|
|
45
47
|
- type: Cleared Customs
|
|
46
|
-
icon:
|
|
48
|
+
icon: AiTwoToneFileDone
|
|
47
49
|
color: '#13c2c2'
|
|
48
50
|
orderNumber: 2112
|
|
49
|
-
timestamp:
|
|
51
|
+
timestamp:
|
|
50
52
|
_date: '2021-02-11T16:12:00.000Z'
|
|
51
53
|
- type: Delivered
|
|
52
|
-
icon:
|
|
54
|
+
icon: AiTwoToneCheckCircle
|
|
53
55
|
color: '#52c41a'
|
|
54
56
|
orderNumber: 2112
|
|
55
|
-
timestamp:
|
|
57
|
+
timestamp:
|
|
56
58
|
_date: '2021-02-11T16:12:00.000Z'
|
|
57
59
|
|
|
58
60
|
methods:
|
|
59
61
|
- name: pushItem
|
|
60
62
|
onClick:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
- id: pushItem
|
|
64
|
+
type: CallMethod
|
|
65
|
+
params:
|
|
66
|
+
blockId: block_id
|
|
67
|
+
method: pushItem
|
|
66
68
|
- name: unshiftItem
|
|
67
69
|
onClick:
|
|
68
70
|
- id: unshiftItem
|
|
@@ -77,7 +79,7 @@ _ref:
|
|
|
77
79
|
params:
|
|
78
80
|
blockId: block_id
|
|
79
81
|
method: removeItem
|
|
80
|
-
args:
|
|
82
|
+
args:
|
|
81
83
|
- 1
|
|
82
84
|
- name: for index 1 moveItemDown
|
|
83
85
|
onClick:
|
|
@@ -86,7 +88,7 @@ _ref:
|
|
|
86
88
|
params:
|
|
87
89
|
blockId: block_id
|
|
88
90
|
method: moveItemDown
|
|
89
|
-
args:
|
|
91
|
+
args:
|
|
90
92
|
- 1
|
|
91
93
|
- name: for index 1 moveItemUp
|
|
92
94
|
onClick:
|
|
@@ -95,8 +97,8 @@ _ref:
|
|
|
95
97
|
params:
|
|
96
98
|
blockId: block_id
|
|
97
99
|
method: moveItemUp
|
|
98
|
-
args:
|
|
99
|
-
|
|
100
|
+
args:
|
|
101
|
+
- 1
|
|
100
102
|
examples:
|
|
101
103
|
- title: Shipment Event Log
|
|
102
104
|
block:
|
|
@@ -117,7 +119,7 @@ _ref:
|
|
|
117
119
|
style:
|
|
118
120
|
paddingTop: 16
|
|
119
121
|
properties:
|
|
120
|
-
content:
|
|
122
|
+
content:
|
|
121
123
|
_nunjucks:
|
|
122
124
|
template: |
|
|
123
125
|
###### Shipment Events State Value:
|
|
@@ -128,8 +130,7 @@ _ref:
|
|
|
128
130
|
value:
|
|
129
131
|
_yaml.stringify:
|
|
130
132
|
on:
|
|
131
|
-
shipment_events:
|
|
133
|
+
shipment_events:
|
|
132
134
|
_state: shipment_events
|
|
133
135
|
options:
|
|
134
|
-
sortKeys: false
|
|
135
|
-
|
|
136
|
+
sortKeys: false
|
package/concepts/cli.yaml
CHANGED
|
@@ -58,10 +58,10 @@ _ref:
|
|
|
58
58
|
|
|
59
59
|
The `build` command runs a Lowdefy build. The options are:
|
|
60
60
|
|
|
61
|
-
- `--
|
|
61
|
+
- `--config-directory <config-directory>`: Change config directory. The default is the current working directory.
|
|
62
62
|
- `--blocks-server-url <blocks-server-url>`: The URL from where Lowdefy blocks will be served. See below for more information.
|
|
63
63
|
- `--disable-telemetry`: Disable telemetry.
|
|
64
|
-
- `--output-directory <output-directory>`: Change the directory to which build artifacts are saved. The default is `<
|
|
64
|
+
- `--output-directory <output-directory>`: Change the directory to which build artifacts are saved. The default is `<config-directory>/.lowdefy/build`.
|
|
65
65
|
- `--ref-resolver <ref-resolver-function-path>`: Path to a JavaScript file containing a `_ref` resolver function to be used as the app default `_ref` resolver.
|
|
66
66
|
|
|
67
67
|
## build-netlify
|
|
@@ -69,7 +69,7 @@ _ref:
|
|
|
69
69
|
|
|
70
70
|
We recommend setting the build command to `npx lowdefy@latest build-netlify`. The Netlify publish directory should be set to `.lowdefy/publish`, and the functions directory set to `.lowdefy/functions`.
|
|
71
71
|
|
|
72
|
-
- `--
|
|
72
|
+
- `--config-directory <config-directory>`: Change config directory. The default is the current working directory (The config directory should rather be configured in the Netlify build settings).
|
|
73
73
|
- `--blocks-server-url <blocks-server-url>`: The URL from where Lowdefy blocks will be served. See below for more information.
|
|
74
74
|
- `--disable-telemetry`: Disable telemetry.
|
|
75
75
|
- `--ref-resolver <ref-resolver-function-path>`: Path to a JavaScript file containing a `_ref` resolver function to be used as the app default `_ref` resolver.
|
|
@@ -78,14 +78,14 @@ _ref:
|
|
|
78
78
|
|
|
79
79
|
The Lowdefy CLI caches block metadata, and build and server scripts in the `.lowdefy/cache` directory. These cached files can be removed using the `clean-cache` command.
|
|
80
80
|
|
|
81
|
-
- `--
|
|
81
|
+
- `--config-directory <config-directory>`: Change config directory. The default is the current working directory.
|
|
82
82
|
- `--disable-telemetry`: Disable telemetry.
|
|
83
83
|
|
|
84
84
|
## dev
|
|
85
85
|
|
|
86
86
|
The `dev` command starts a Lowdefy development server, running locally. It can be accessed in a browser at [http://localhost:3000](http://localhost:3000). The CLI watches the file system, and rebuilds the app and reloads served pages every time a change is made to any of the files in the project directory.
|
|
87
87
|
|
|
88
|
-
- `--
|
|
88
|
+
- `--config-directory <config-directory>`: Change config directory. The default is the current working directory.
|
|
89
89
|
- `--blocks-server-url <blocks-server-url>`: The URL from where Lowdefy blocks will be served. See below for more information.
|
|
90
90
|
- `--disable-telemetry`: Disable telemetry.
|
|
91
91
|
- `--port <port>`: Change the port the server is hosted at. The default is `3000`.
|
|
@@ -113,13 +113,13 @@ _ref:
|
|
|
113
113
|
Options set in the `lowdefy.yaml` should be defined in camelCase. The options that can be set are:
|
|
114
114
|
- `blocksServerUrl: string`: The URL from where Lowdefy blocks will be served. See below for more information.
|
|
115
115
|
- `disableTelemetry: boolean`: Disable telemetry.
|
|
116
|
-
- `outputDirectory: string`: Change the directory to which build artifacts are saved. The default is `<
|
|
116
|
+
- `outputDirectory: string`: Change the directory to which build artifacts are saved. The default is `<config-directory>/.lowdefy/build`.
|
|
117
117
|
- `refResolver: string`: Path to a JavaScript file containing a `_ref` resolver function to be used as the app default `_ref` resolver.
|
|
118
118
|
- `port: number`: Change the port the server is hosted at. The default is `3000`.
|
|
119
119
|
- `watch: string[]`: A list of paths to files or directories that should be watched for changes.
|
|
120
120
|
- `watchIgnore: string[]`: A list of paths to files or directories that should be ignored by the file watcher. Globs are supported.
|
|
121
121
|
|
|
122
|
-
The `--
|
|
122
|
+
The `--config-directory` option cannot be set from the `lowdefy.yaml` file.
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
# Telemetry
|
|
@@ -45,7 +45,7 @@ _ref:
|
|
|
45
45
|
|
|
46
46
|
```yaml
|
|
47
47
|
name: dashboard-app
|
|
48
|
-
lowdefy: 3.23.
|
|
48
|
+
lowdefy: 3.23.2
|
|
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.23.
|
|
98
|
+
lowdefy: 3.23.2
|
|
99
99
|
types:
|
|
100
100
|
MyCustomBlock:
|
|
101
101
|
url: http://localhost:3002/meta/MyCustomBlock.json
|
|
@@ -123,6 +123,20 @@ _ref:
|
|
|
123
123
|
|
|
124
124
|
- `basePath: string`: The base path setting for the application. This variable is used to prefix route paths for example `${basePath}/public/logo-square-light-theme.png`. The default base path is ''.
|
|
125
125
|
- `blockId: string`: The block's id within the Lowdefy app, this is useful for setting a unique `id` on DOM elements.
|
|
126
|
+
- `components: object`: Helper React components that are exposed to blocks to use internally.
|
|
127
|
+
- `Icon`: component`: Lowdefy standard Icon React component to render build in icons.
|
|
128
|
+
- `Link`: component`: Lowdefy standard Link React component used as links to pages or external urls. The following props apply:
|
|
129
|
+
- `ariaLabel: string`: Arial-label to apply to link tag.
|
|
130
|
+
- `back: boolean`: When the link is clicked, trigger the browser back.
|
|
131
|
+
- `home: boolean`: When the link is clicked, route to the home page.
|
|
132
|
+
- `input: object`: When the link is clicked, pass data as the input object to the next Lowdefy page. Can only be used with pageId link and newTab false. See [Input]( TODO: Link to input page? ).
|
|
133
|
+
- `newTab: boolean`: When the link is clicked, open the page in a new browser tab.
|
|
134
|
+
- `pageId: string`: When the link is clicked, route to the provided Lowdefy page.
|
|
135
|
+
- `rel: string`: The relationship of the linked URL as space-separated link types.
|
|
136
|
+
- `replace: boolean`: Prevent adding a new entry into browser history by replacing the url instead of pushing into history. Can only be used with pageId link and newTab false.
|
|
137
|
+
- `scroll: boolean`: Disable scrolling to the top of the page after page transition. Can only be used with pageId link and newTab false.
|
|
138
|
+
- `url: string`: When the link is clicked, route to an external url.
|
|
139
|
+
- `urlQuery: object`: When the link is clicked, pass data as a url query to the next page. See [url query]( TODO: Link to url query page? ).
|
|
126
140
|
- `content: object`: Passed to `container` and `context` block categories. The `content` object with methods to render sub blocks into content areas. The method name is the same as the area key, for example, 'content.content()` renders a blocks default `content` area.
|
|
127
141
|
- `events: object`: All events defined on the block in the Lowdefy app config.
|
|
128
142
|
- `[event_key]: object`: Event keys gives a handle name to the event details.
|
|
@@ -29,6 +29,7 @@ _ref:
|
|
|
29
29
|
- id: md1
|
|
30
30
|
type: MarkdownWithCode
|
|
31
31
|
properties:
|
|
32
|
+
# TODO: Remove JsAction reference.
|
|
32
33
|
content: |
|
|
33
34
|
Lowdefy runs as a single page web app (SPA). It is possible to extend the functionality of a Lowdefy app by loading custom code (HTML, CSS and JavaScript) into the HTML `head` and `body` to of the default `index.html` page.
|
|
34
35
|
|
|
@@ -53,7 +54,7 @@ _ref:
|
|
|
53
54
|
|
|
54
55
|
```yaml
|
|
55
56
|
name: google-analytics-example
|
|
56
|
-
lowdefy: 3.23.
|
|
57
|
+
lowdefy: 3.23.2
|
|
57
58
|
# ...
|
|
58
59
|
app:
|
|
59
60
|
html:
|
|
@@ -98,7 +99,7 @@ _ref:
|
|
|
98
99
|
```yaml
|
|
99
100
|
# /lowdefy.yaml
|
|
100
101
|
name: json-todos
|
|
101
|
-
lowdefy: 3.23.
|
|
102
|
+
lowdefy: 3.23.2
|
|
102
103
|
app:
|
|
103
104
|
html:
|
|
104
105
|
appendHead:
|
|
@@ -109,7 +110,7 @@ _ref:
|
|
|
109
110
|
events:
|
|
110
111
|
onEnter:
|
|
111
112
|
- id: get_todos
|
|
112
|
-
type: JsAction
|
|
113
|
+
type: JsAction # TODO:
|
|
113
114
|
params:
|
|
114
115
|
name: fetchTodos # Trigger the custom JavaScript action.
|
|
115
116
|
args:
|
|
@@ -156,7 +157,7 @@ _ref:
|
|
|
156
157
|
```yaml
|
|
157
158
|
# /lowdefy.yaml
|
|
158
159
|
name: operator-example
|
|
159
|
-
lowdefy: 3.23.
|
|
160
|
+
lowdefy: 3.23.2
|
|
160
161
|
app:
|
|
161
162
|
html:
|
|
162
163
|
appendHead:
|