@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
|
@@ -46,7 +46,7 @@ _ref:
|
|
|
46
46
|
textAlign: center
|
|
47
47
|
properties:
|
|
48
48
|
title: Generate & Download PDF
|
|
49
|
-
icon:
|
|
49
|
+
icon: AiOutlinedDownload
|
|
50
50
|
color: '#6293F8'
|
|
51
51
|
events:
|
|
52
52
|
onMount:
|
|
@@ -90,13 +90,13 @@ _ref:
|
|
|
90
90
|
qty: 2
|
|
91
91
|
price: 60.667
|
|
92
92
|
code: X12-49A
|
|
93
|
-
onClick:
|
|
94
|
-
- id: generate_pdf
|
|
95
|
-
type: JsAction
|
|
93
|
+
onClick: []
|
|
94
|
+
{# - id: generate_pdf
|
|
95
|
+
type: JsAction # TODO:
|
|
96
96
|
params:
|
|
97
97
|
name: pdfMake
|
|
98
98
|
args:
|
|
99
|
-
_ref: howto/generatePdf/inv_template.yaml
|
|
99
|
+
_ref: howto/generatePdf/inv_template.yaml #}
|
|
100
100
|
|
|
101
101
|
- id: md2
|
|
102
102
|
type: MarkdownWithCode
|
|
@@ -109,7 +109,7 @@ _ref:
|
|
|
109
109
|
textAlign: center
|
|
110
110
|
properties:
|
|
111
111
|
title: Share this post
|
|
112
|
-
icon:
|
|
112
|
+
icon: AiOutlinedUpload
|
|
113
113
|
color: '#6293F8'
|
|
114
114
|
events:
|
|
115
115
|
onClick:
|
|
@@ -237,7 +237,7 @@ _ref:
|
|
|
237
237
|
###### /lowdefy.yaml
|
|
238
238
|
```yaml
|
|
239
239
|
name: Generate a PDF
|
|
240
|
-
lowdefy: 3.23.
|
|
240
|
+
lowdefy: 3.23.2
|
|
241
241
|
|
|
242
242
|
app:
|
|
243
243
|
html:
|
|
@@ -252,11 +252,11 @@ _ref:
|
|
|
252
252
|
type: Button
|
|
253
253
|
properties:
|
|
254
254
|
title: Download PDF
|
|
255
|
-
icon:
|
|
255
|
+
icon: AiOutlinedDownload
|
|
256
256
|
events:
|
|
257
257
|
onClick:
|
|
258
258
|
- id: make_pdf
|
|
259
|
-
type: JsAction
|
|
259
|
+
type: JsAction # TODO:
|
|
260
260
|
params:
|
|
261
261
|
name: pdfMake
|
|
262
262
|
args:
|
|
@@ -277,11 +277,11 @@ _ref:
|
|
|
277
277
|
textAlign: center
|
|
278
278
|
properties:
|
|
279
279
|
title: Download PDF
|
|
280
|
-
icon:
|
|
280
|
+
icon: AiOutlinedDownload
|
|
281
281
|
events:
|
|
282
|
-
onClick:
|
|
283
|
-
- id: make_pdf
|
|
284
|
-
type: JsAction
|
|
282
|
+
onClick: []
|
|
283
|
+
{# - id: make_pdf
|
|
284
|
+
type: JsAction # TODO:
|
|
285
285
|
params:
|
|
286
286
|
name: pdfMake
|
|
287
287
|
args:
|
|
@@ -291,7 +291,7 @@ _ref:
|
|
|
291
291
|
fontSize: 10
|
|
292
292
|
content:
|
|
293
293
|
- text: This pdf has been generated with Lowdefy and pdfMake.
|
|
294
|
-
bold: true
|
|
294
|
+
bold: true #}
|
|
295
295
|
- id: md4
|
|
296
296
|
type: MarkdownWithCode
|
|
297
297
|
properties:
|
|
@@ -302,7 +302,7 @@ _ref:
|
|
|
302
302
|
|
|
303
303
|
###### /lowdefy.yaml
|
|
304
304
|
```yaml
|
|
305
|
-
lowdefy: 3.23.
|
|
305
|
+
lowdefy: 3.23.2
|
|
306
306
|
name: Generate PDF from data with Lowdefy
|
|
307
307
|
|
|
308
308
|
app:
|
|
@@ -370,7 +370,7 @@ _ref:
|
|
|
370
370
|
events:
|
|
371
371
|
onClick:
|
|
372
372
|
- id: make_pdf
|
|
373
|
-
type: JsAction
|
|
373
|
+
type: JsAction # TODO:
|
|
374
374
|
params:
|
|
375
375
|
name: pdfMake
|
|
376
376
|
args:
|
|
@@ -591,7 +591,7 @@ _ref:
|
|
|
591
591
|
textAlign: center
|
|
592
592
|
properties:
|
|
593
593
|
title: Generate Invoice
|
|
594
|
-
icon:
|
|
594
|
+
icon: AiOutlinedDownload
|
|
595
595
|
color: '#6293F8'
|
|
596
596
|
events:
|
|
597
597
|
onMount:
|
|
@@ -635,13 +635,13 @@ _ref:
|
|
|
635
635
|
qty: 2
|
|
636
636
|
price: 60.667
|
|
637
637
|
code: X12-49A
|
|
638
|
-
onClick:
|
|
639
|
-
- id: generate_pdf
|
|
640
|
-
type: JsAction
|
|
638
|
+
onClick: []
|
|
639
|
+
{# - id: generate_pdf
|
|
640
|
+
type: JsAction # TODO:
|
|
641
641
|
params:
|
|
642
642
|
name: pdfMake
|
|
643
643
|
args:
|
|
644
|
-
_ref: howto/generatePdf/inv_template.yaml
|
|
644
|
+
_ref: howto/generatePdf/inv_template.yaml #}
|
|
645
645
|
- id: md5
|
|
646
646
|
type: MarkdownWithCode
|
|
647
647
|
properties:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
lowdefy: 3.23.
|
|
1
|
+
lowdefy: 3.23.2
|
|
2
2
|
name: Generate PDF from data with Lowdefy
|
|
3
3
|
|
|
4
4
|
app:
|
|
@@ -23,36 +23,37 @@ pages:
|
|
|
23
23
|
color: '#1890ff'
|
|
24
24
|
events:
|
|
25
25
|
onClick:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
26
|
+
[]
|
|
27
|
+
# - id: generate_csv
|
|
28
|
+
# type: JsAction # TODO:
|
|
29
|
+
# params:
|
|
30
|
+
# name: csvMake
|
|
31
|
+
# args:
|
|
32
|
+
# - profiles.csv # csv filename
|
|
33
|
+
# - - Username: booker12 # an array of data, usually a reference
|
|
34
|
+
# Identifier: 9012
|
|
35
|
+
# FirstName: Rachel
|
|
36
|
+
# LastName: Booker
|
|
37
|
+
# - Username: grey07
|
|
38
|
+
# Identifier: 2070
|
|
39
|
+
# FirstName: Laura
|
|
40
|
+
# LastName: Grey
|
|
41
|
+
# - Username: johnson81
|
|
42
|
+
# Identifier: 4081
|
|
43
|
+
# FirstName: Craig
|
|
44
|
+
# LastName: Johnson
|
|
45
|
+
# - Username: jenkins46
|
|
46
|
+
# Identifier: 9346
|
|
47
|
+
# FirstName: Mary
|
|
48
|
+
# LastName: Jenkins
|
|
49
|
+
# - Username: smith79
|
|
50
|
+
# Identifier: 5079
|
|
51
|
+
# FirstName: Jamie
|
|
52
|
+
# LastName: Smith
|
|
53
|
+
# - - Username # an array of field definitions
|
|
54
|
+
# - Identifier
|
|
55
|
+
# - FirstName
|
|
56
|
+
# - LastName
|
|
56
57
|
footer:
|
|
57
58
|
blocks:
|
|
58
59
|
- id: footer
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
lowdefy: 3.23.
|
|
1
|
+
lowdefy: 3.23.2
|
|
2
2
|
name: Generate PDF from data with Lowdefy
|
|
3
3
|
|
|
4
4
|
app:
|
|
@@ -68,7 +68,7 @@ pages:
|
|
|
68
68
|
title: Generate PDF from data with Lowdefy
|
|
69
69
|
subTitle: <a href="https://docs.lowdefy.com/generate-pdf-document-from-data">Read the full how to guide</a>
|
|
70
70
|
icon:
|
|
71
|
-
name:
|
|
71
|
+
name: AiTwoTonePrinter
|
|
72
72
|
color: '#ff0000'
|
|
73
73
|
areas:
|
|
74
74
|
extra:
|
|
@@ -99,13 +99,14 @@ pages:
|
|
|
99
99
|
color: '#1890ff'
|
|
100
100
|
events:
|
|
101
101
|
onClick:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
[]
|
|
103
|
+
# - id: make_pdf
|
|
104
|
+
# type: JsAction # TODO:
|
|
105
|
+
# params:
|
|
106
|
+
# name: pdfMake
|
|
107
|
+
# args:
|
|
108
|
+
# _ref:
|
|
109
|
+
# path: inv_template.yaml
|
|
109
110
|
footer:
|
|
110
111
|
blocks:
|
|
111
112
|
- id: footer
|
package/introduction.yaml
CHANGED
package/lowdefy.yaml
CHANGED
package/menus.yaml
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
pageId: introduction
|
|
6
6
|
properties:
|
|
7
7
|
title: Introduction
|
|
8
|
-
icon:
|
|
8
|
+
icon: AiOutlinedCoffee
|
|
9
9
|
- id: tutorial
|
|
10
10
|
type: MenuGroup
|
|
11
11
|
properties:
|
|
12
12
|
title: Tutorial
|
|
13
|
-
icon:
|
|
13
|
+
icon: AiOutlinedRocket
|
|
14
14
|
links:
|
|
15
15
|
- id: tutorial-start
|
|
16
16
|
type: MenuLink
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
type: MenuGroup
|
|
52
52
|
properties:
|
|
53
53
|
title: How To
|
|
54
|
-
icon:
|
|
54
|
+
icon: AiOutlinedQuestion
|
|
55
55
|
links:
|
|
56
56
|
- id: generate-csv
|
|
57
57
|
type: MenuLink
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
type: MenuGroup
|
|
68
68
|
properties:
|
|
69
69
|
title: Concepts
|
|
70
|
-
icon:
|
|
70
|
+
icon: AiOutlinedBulb
|
|
71
71
|
links:
|
|
72
72
|
- id: overview
|
|
73
73
|
type: MenuLink
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
type: MenuGroup
|
|
144
144
|
properties:
|
|
145
145
|
title: Deployment
|
|
146
|
-
icon:
|
|
146
|
+
icon: AiOutlinedCloudUpload
|
|
147
147
|
links:
|
|
148
148
|
- id: aws-lambda
|
|
149
149
|
type: MenuLink
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
type: MenuGroup
|
|
170
170
|
properties:
|
|
171
171
|
title: User Authentication
|
|
172
|
-
icon:
|
|
172
|
+
icon: AiOutlinedTeam
|
|
173
173
|
links:
|
|
174
174
|
- id: users
|
|
175
175
|
type: MenuLink
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
type: MenuGroup
|
|
207
207
|
properties:
|
|
208
208
|
title: Input Blocks
|
|
209
|
-
icon:
|
|
209
|
+
icon: AiOutlinedForm
|
|
210
210
|
links:
|
|
211
211
|
- id: AutoComplete
|
|
212
212
|
type: MenuLink
|
|
@@ -268,9 +268,9 @@
|
|
|
268
268
|
- id: RatingSlider
|
|
269
269
|
type: MenuLink
|
|
270
270
|
pageId: RatingSlider
|
|
271
|
-
- id: S3UploadButton
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
# - id: S3UploadButton
|
|
272
|
+
# type: MenuLink
|
|
273
|
+
# pageId: S3UploadButton
|
|
274
274
|
- id: Selector
|
|
275
275
|
type: MenuLink
|
|
276
276
|
pageId: Selector
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
type: MenuGroup
|
|
303
303
|
properties:
|
|
304
304
|
title: Display Blocks
|
|
305
|
-
icon:
|
|
305
|
+
icon: AiOutlinedPicture
|
|
306
306
|
links:
|
|
307
307
|
- id: Alert
|
|
308
308
|
type: MenuLink
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
type: MenuGroup
|
|
382
382
|
properties:
|
|
383
383
|
title: Container Blocks
|
|
384
|
-
icon:
|
|
384
|
+
icon: AiOutlinedContainer
|
|
385
385
|
links:
|
|
386
386
|
- id: Affix
|
|
387
387
|
type: MenuLink
|
|
@@ -437,9 +437,9 @@
|
|
|
437
437
|
- id: Span
|
|
438
438
|
type: MenuLink
|
|
439
439
|
pageId: Span
|
|
440
|
-
- id: Spin
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
# - id: Spin
|
|
441
|
+
# type: MenuLink
|
|
442
|
+
# pageId: Spin
|
|
443
443
|
- id: Tabs
|
|
444
444
|
type: MenuLink
|
|
445
445
|
pageId: Tabs
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
type: MenuGroup
|
|
452
452
|
properties:
|
|
453
453
|
title: List Blocks
|
|
454
|
-
icon:
|
|
454
|
+
icon: AiOutlinedOrderedList
|
|
455
455
|
links:
|
|
456
456
|
- id: ControlledList
|
|
457
457
|
type: MenuLink
|
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
type: MenuGroup
|
|
464
464
|
properties:
|
|
465
465
|
title: Connections
|
|
466
|
-
icon:
|
|
466
|
+
icon: AiOutlinedApi
|
|
467
467
|
links:
|
|
468
468
|
- id: AmazonRedshift
|
|
469
469
|
type: MenuLink
|
|
@@ -533,14 +533,11 @@
|
|
|
533
533
|
type: MenuGroup
|
|
534
534
|
properties:
|
|
535
535
|
title: Actions
|
|
536
|
-
icon:
|
|
536
|
+
icon: AiOutlinedThunderbolt
|
|
537
537
|
links:
|
|
538
538
|
- id: CallMethod
|
|
539
539
|
type: MenuLink
|
|
540
540
|
pageId: CallMethod
|
|
541
|
-
- id: JsAction
|
|
542
|
-
type: MenuLink
|
|
543
|
-
pageId: JsAction
|
|
544
541
|
- id: Link
|
|
545
542
|
type: MenuLink
|
|
546
543
|
pageId: Link
|
|
@@ -587,11 +584,11 @@
|
|
|
587
584
|
- id: Wait
|
|
588
585
|
type: MenuLink
|
|
589
586
|
pageId: Wait
|
|
590
|
-
- id: operators
|
|
587
|
+
- id: operators-menu-group
|
|
591
588
|
type: MenuGroup
|
|
592
589
|
properties:
|
|
593
590
|
title: Operators
|
|
594
|
-
icon:
|
|
591
|
+
icon: AiOutlinedTool
|
|
595
592
|
links:
|
|
596
593
|
- id: _actions
|
|
597
594
|
type: MenuLink
|
|
@@ -659,9 +656,9 @@
|
|
|
659
656
|
- id: _input
|
|
660
657
|
type: MenuLink
|
|
661
658
|
pageId: _input
|
|
662
|
-
- id: _js
|
|
663
|
-
|
|
664
|
-
|
|
659
|
+
# - id: _js
|
|
660
|
+
# type: MenuLink
|
|
661
|
+
# pageId: _js
|
|
665
662
|
- id: _json
|
|
666
663
|
type: MenuLink
|
|
667
664
|
pageId: _json
|
|
@@ -771,13 +768,13 @@
|
|
|
771
768
|
type: MenuGroup
|
|
772
769
|
properties:
|
|
773
770
|
title: Lowdefy Versions
|
|
774
|
-
icon:
|
|
771
|
+
icon: AiOutlinedBranches
|
|
775
772
|
links:
|
|
776
|
-
- id: v3.23.
|
|
773
|
+
- id: v3.23.2
|
|
777
774
|
type: MenuLink
|
|
778
775
|
url: https://docs.lowdefy.com
|
|
779
776
|
properties:
|
|
780
|
-
title: v3.23.
|
|
777
|
+
title: v3.23.2
|
|
781
778
|
- id: v3.22.0
|
|
782
779
|
type: MenuLink
|
|
783
780
|
url: https://61519bcb8b8ed4412aae3057--lowdefy-docs.netlify.app
|
package/operators/_actions.yaml
CHANGED
|
@@ -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.23.
|
|
80
|
+
lowdefy: '3.23.2'
|
|
81
81
|
app:
|
|
82
82
|
html:
|
|
83
83
|
appendHead: |
|
|
@@ -97,7 +97,7 @@ _ref:
|
|
|
97
97
|
events:
|
|
98
98
|
onClick:
|
|
99
99
|
- id: get_normalized_eigenvector
|
|
100
|
-
type: JsAction
|
|
100
|
+
type: JsAction # TODO:
|
|
101
101
|
params:
|
|
102
102
|
name: getNormalizedEigenvector
|
|
103
103
|
args:
|
package/operators/_get.yaml
CHANGED
|
@@ -53,12 +53,12 @@ _ref:
|
|
|
53
53
|
key:
|
|
54
54
|
_state: status
|
|
55
55
|
from:
|
|
56
|
-
new:
|
|
57
|
-
escalated:
|
|
58
|
-
investigation_started:
|
|
59
|
-
client_contacted:
|
|
60
|
-
awaiting_confirmation:
|
|
61
|
-
closed:
|
|
56
|
+
new: AiTwoTonePlusCircle
|
|
57
|
+
escalated: AiOutlinedExclamationCircle
|
|
58
|
+
investigation_started: AiTwoToneTool
|
|
59
|
+
client_contacted: AiTwoToneSound
|
|
60
|
+
awaiting_confirmation: AiOutlinedLike
|
|
61
|
+
closed: AiOutlinedStop
|
|
62
62
|
```
|
|
63
63
|
Returns: The icon corresponding to the status in state.
|
|
64
64
|
|
package/operators/_js.yaml
CHANGED
|
@@ -51,7 +51,7 @@ _ref:
|
|
|
51
51
|
```yaml
|
|
52
52
|
# lowdefy.yaml
|
|
53
53
|
name: make-me-primes
|
|
54
|
-
lowdefy: '3.23.
|
|
54
|
+
lowdefy: '3.23.2'
|
|
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.23.
|
|
122
|
+
lowdefy: '3.23.2'
|
|
123
123
|
app:
|
|
124
124
|
html:
|
|
125
125
|
appendHead:
|
package/operators/_ref.yaml
CHANGED
|
@@ -59,6 +59,12 @@ _ref:
|
|
|
59
59
|
|
|
60
60
|
A transformer is a JavaScript function that receives the result of the `_ref` operator, and its `vars` as arguments. The value returned by this function will be included in the configuration as the final result of the `_ref` operator. The `transformer` argument should be the file path (relative to the root of the project) to a JavaScript file that exports a transformer function.
|
|
61
61
|
|
|
62
|
+
###### CommonJS and ES Modules
|
|
63
|
+
|
|
64
|
+
Both [CommonJS](https://nodejs.org/api/modules.html) and [ES Modules](https://nodejs.org/api/esm.html) are supported for in resolver and transformer functions. By default the functions are imported as CommonJs modules, and the function should be exported as a default export (`module.exports = transformer`). Files can also use the `.cjs` file extension to indicate they are CommonJs modules.
|
|
65
|
+
|
|
66
|
+
To use ES Modules, either use files with `.mjs` file extension, or add a `package.json` in the project directory file with `"type": "module"` set. When using ES Modules, the functions should also be a default export (`export default transformer;`)
|
|
67
|
+
|
|
62
68
|
arguments: |
|
|
63
69
|
###### string
|
|
64
70
|
The file path to the referenced file, from the root of the project directory.
|
|
@@ -73,7 +79,7 @@ _ref:
|
|
|
73
79
|
###### Reference pages:
|
|
74
80
|
```yaml
|
|
75
81
|
# lowdefy.yaml
|
|
76
|
-
lowdefy: '3.23.
|
|
82
|
+
lowdefy: '3.23.2'
|
|
77
83
|
pages:
|
|
78
84
|
- _ref: pages/page1.yaml
|
|
79
85
|
- _ref: pages/page2.yaml
|
|
@@ -94,7 +100,7 @@ _ref:
|
|
|
94
100
|
```
|
|
95
101
|
Returns:
|
|
96
102
|
```
|
|
97
|
-
lowdefy: '3.23.
|
|
103
|
+
lowdefy: '3.23.2'
|
|
98
104
|
pages:
|
|
99
105
|
- id: page1
|
|
100
106
|
type: PageHeaderMenu
|
|
@@ -170,8 +176,8 @@ _ref:
|
|
|
170
176
|
|
|
171
177
|
```js
|
|
172
178
|
// resolvers/useLocalOrSharedConfig.js
|
|
173
|
-
const fs = require('fs')
|
|
174
|
-
const path = require('path')
|
|
179
|
+
const fs = require('fs');
|
|
180
|
+
const path = require('path');
|
|
175
181
|
const { promisify } = require('util');
|
|
176
182
|
|
|
177
183
|
const readFilePromise = promisify(fs.readFile);
|
|
@@ -197,7 +203,7 @@ _ref:
|
|
|
197
203
|
|
|
198
204
|
```yaml
|
|
199
205
|
// lowdefy.yaml
|
|
200
|
-
lowdefy: 3.23.
|
|
206
|
+
lowdefy: 3.23.2
|
|
201
207
|
|
|
202
208
|
cli:
|
|
203
209
|
refResolver: resolvers/useLocalOrSharedConfig.js
|
|
@@ -223,10 +229,38 @@ _ref:
|
|
|
223
229
|
```
|
|
224
230
|
```yaml
|
|
225
231
|
// lowdefy.yaml
|
|
226
|
-
lowdefy: 3.23.
|
|
232
|
+
lowdefy: 3.23.2
|
|
227
233
|
|
|
228
234
|
pages:
|
|
229
235
|
- _ref:
|
|
230
236
|
path: pages/page1.yaml
|
|
231
237
|
transformer: transformers/addFooter.js
|
|
232
238
|
```
|
|
239
|
+
###### Using ES Modules with `.mjs` file extension:
|
|
240
|
+
|
|
241
|
+
```js
|
|
242
|
+
// resolvers/useLocalOrSharedConfig.mjs
|
|
243
|
+
import fs from 'fs';
|
|
244
|
+
import path from 'path';
|
|
245
|
+
import { promisify } from 'util';
|
|
246
|
+
|
|
247
|
+
const readFilePromise = promisify(fs.readFile);
|
|
248
|
+
|
|
249
|
+
async function useLocalOrSharedConfig(refPath, vars, context) {
|
|
250
|
+
let fileContent
|
|
251
|
+
try {
|
|
252
|
+
fileContent = await readFilePromise(path.resolve(refPath), 'utf8');
|
|
253
|
+
return fileContent;
|
|
254
|
+
} catch (error) {
|
|
255
|
+
if (error.code === 'ENOENT') {
|
|
256
|
+
fileContent = readFilePromise(path.resolve('../shared', refPath), 'utf8');
|
|
257
|
+
return fileContent;
|
|
258
|
+
}
|
|
259
|
+
throw error;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export default useLocalOrSharedConfig;
|
|
266
|
+
```
|
package/operators/_yaml.yaml
CHANGED
|
@@ -25,22 +25,36 @@ _ref:
|
|
|
25
25
|
- name: parse
|
|
26
26
|
types: |
|
|
27
27
|
```
|
|
28
|
-
(
|
|
28
|
+
({on: string, options?: object}): object
|
|
29
|
+
([on: string, options?: object]): object
|
|
29
30
|
```
|
|
30
31
|
description: |
|
|
31
32
|
The `_yaml.parse` method parses a YAML string into an object.
|
|
32
33
|
arguments: |
|
|
33
|
-
######
|
|
34
|
-
|
|
34
|
+
###### object
|
|
35
|
+
- `on: string`: String to parse.
|
|
36
|
+
- `options?: object`: Optional settings. See the [YAML.parse: method here](https://eemeli.org/yaml/#parse-options) for supported settings.
|
|
37
|
+
|
|
35
38
|
examples: |
|
|
36
39
|
###### Parse a YAML string:
|
|
37
40
|
```yaml
|
|
38
|
-
_yaml.parse:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
_yaml.parse:
|
|
42
|
+
on: |
|
|
43
|
+
key: Value
|
|
44
|
+
boolean: true
|
|
45
|
+
array:
|
|
46
|
+
- 1
|
|
47
|
+
- 2
|
|
48
|
+
```
|
|
49
|
+
or:
|
|
50
|
+
```yaml
|
|
51
|
+
_yaml.parse:
|
|
52
|
+
- |
|
|
53
|
+
key: Value
|
|
54
|
+
boolean: true
|
|
55
|
+
array:
|
|
56
|
+
- 1
|
|
57
|
+
- 2
|
|
44
58
|
```
|
|
45
59
|
Returns:
|
|
46
60
|
```
|
|
@@ -61,17 +75,27 @@ _ref:
|
|
|
61
75
|
arguments: |
|
|
62
76
|
###### object
|
|
63
77
|
- `on: any`: The object to stringify.
|
|
64
|
-
- `options
|
|
78
|
+
- `options?: object`: Optional settings. See the [YAML.stringify: method here](https://eemeli.org/yaml/#tostring-options) for supported settings.
|
|
65
79
|
|
|
66
80
|
examples: |
|
|
67
81
|
###### Stringify an object as YAML:
|
|
68
82
|
```yaml
|
|
69
83
|
_yaml.stringify:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
84
|
+
on:
|
|
85
|
+
key: Value
|
|
86
|
+
boolean: true
|
|
87
|
+
array:
|
|
88
|
+
- 1
|
|
89
|
+
- 2
|
|
90
|
+
```
|
|
91
|
+
or:
|
|
92
|
+
```yaml
|
|
93
|
+
_yaml.stringify:
|
|
94
|
+
- key: Value
|
|
95
|
+
boolean: true
|
|
96
|
+
array:
|
|
97
|
+
- 1
|
|
98
|
+
- 2
|
|
75
99
|
```
|
|
76
100
|
Returns (as a string):
|
|
77
101
|
```text
|