@lowdefy/docs 3.22.0 → 3.23.2
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 +53 -0
- package/actions/JsAction.yaml +2 -2
- package/blocks/display/DangerousHtml.yaml +11 -12
- package/blocks/display/DangerousMarkdown.yaml +8 -8
- package/blocks/input/MultipleSelector.yaml +80 -0
- package/blocks/input/Selector.yaml +62 -0
- package/concepts/custom-blocks.yaml +2 -2
- package/concepts/custom-code.yaml +3 -3
- package/concepts/lowdefy-schema.yaml +16 -0
- package/connections/AxiosHttp.yaml +1 -1
- package/deployment/aws-lambda.yaml +2 -2
- package/deployment/docker.yaml +2 -2
- package/head.html +2 -0
- package/howto/generate-csv.yaml.njk +251 -0
- package/howto/generate-pdf.yaml.njk +651 -0
- package/howto/generateCsv/lowdefy.yaml +63 -0
- package/howto/generateCsv/public/csvMake.js +27 -0
- package/howto/generatePdf/inv_template.yaml +200 -0
- package/howto/generatePdf/lowdefy.yaml +116 -0
- package/howto/generatePdf/my_header.html +1 -0
- package/howto/generatePdf/public/logo_example.png +0 -0
- package/howto/generatePdf/public/modules/importUmd.js +7 -0
- package/howto/generatePdf/public/modules/pdfMake.js +7 -0
- package/howto/generatePdf/public/modules/vfs_fonts.js +12 -0
- package/lowdefy.yaml +1 -1
- package/menus.yaml +25 -1
- package/operators/_actions.yaml +1 -1
- package/operators/_change_case.yaml +4 -4
- package/operators/_js.yaml +2 -2
- package/operators/_ref.yaml +16 -8
- package/operators/_switch.yaml +51 -0
- package/package.json +2 -2
- package/pages.yaml +12 -0
- 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/modules/csvMake.js +27 -0
- package/public/modules/importUmd.js +7 -0
- package/public/modules/pdfMake.js +7 -0
- package/public/modules/vfs_fonts.js +12 -0
- package/public/sitemap.xml +216 -201
- package/templates/blocks/exampleTransformer.js +1 -1
- package/templates/blog.yaml.njk +221 -0
- package/templates/footer.yaml.njk +2 -2
- package/tutorial/tutorial-create-page.yaml +1 -1
- package/tutorial/tutorial-start.yaml +1 -1
- package/users/login-and-logout.yaml +2 -2
- package/users/openid-connect.yaml +1 -0
- package/users/protected-pages.yaml +2 -2
- package/users/roles.yaml +2 -2
- package/users/users-introduction.yaml +1 -1
- package/version.yaml +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,59 @@
|
|
|
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.23.2](https://github.com/lowdefy/lowdefy/compare/v3.23.1...v3.23.2) (2021-11-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @lowdefy/docs
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.23.1](https://github.com/lowdefy/lowdefy/compare/v3.23.0...v3.23.1) (2021-11-20)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @lowdefy/docs
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.23.0](https://github.com/lowdefy/lowdefy/compare/v3.23.0-alpha.0...v3.23.0) (2021-11-19)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **docs:** Fix _ref resolver function example. ([0903094](https://github.com/lowdefy/lowdefy/commit/0903094ce531f4d8ab7849deb91ab3d6b7e5fd82))
|
|
28
|
+
* **docs:** Included onSearch event example in MultipleSelector and Selector docs. ([0e53cb8](https://github.com/lowdefy/lowdefy/commit/0e53cb8f93ed49e0122ac038113d7378f67501f7))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# [3.23.0-alpha.0](https://github.com/lowdefy/lowdefy/compare/v3.22.0...v3.23.0-alpha.0) (2021-11-09)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* Add _switch operator to docs. ([c5c6f0c](https://github.com/lowdefy/lowdefy/commit/c5c6f0c9a5b0dfc89e09835d3ab940195a077504))
|
|
40
|
+
* Support .yml in lowdefy.yaml file. ([0f7cc2a](https://github.com/lowdefy/lowdefy/commit/0f7cc2a7612a5ad9a8164d5a5437dde5c6d7da49)), closes [#902](https://github.com/lowdefy/lowdefy/issues/902)
|
|
41
|
+
* **docs:** Add avatar and links to blog template. ([d855599](https://github.com/lowdefy/lowdefy/commit/d855599398cae041933dd8b11aaf77648f87d4c2))
|
|
42
|
+
* **docs:** Add how to generate pdfs. ([7b35550](https://github.com/lowdefy/lowdefy/commit/7b35550fa944995be8f8a9d0e809971cabcf12af))
|
|
43
|
+
* **docs:** Fix the iframe videos in the docs. ([c4a957a](https://github.com/lowdefy/lowdefy/commit/c4a957a12ea5adf018b373d8da8c5116e064205f))
|
|
44
|
+
* improvements on blog template. ([30e2291](https://github.com/lowdefy/lowdefy/commit/30e22917fed9932e43cde942532654aa4a6aeac6))
|
|
45
|
+
* **docs:** Add how to generate CSVs. ([2cc8e45](https://github.com/lowdefy/lowdefy/commit/2cc8e45b165aa755dceb9e40525f8a0511fb3485))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* **docs:** Add how to generate csv. ([3257f51](https://github.com/lowdefy/lowdefy/commit/3257f514b95f7cafb8ac30998194e7ae0a327862))
|
|
51
|
+
* **docs:** Add videos to how tos. ([57c7779](https://github.com/lowdefy/lowdefy/commit/57c77798f0356c606cf90bfd36a4f63ab8d0ff36))
|
|
52
|
+
* Add generate pdf how to. ([5bde460](https://github.com/lowdefy/lowdefy/commit/5bde460934e2dc94d677af5f287e3c85c0ff4c34))
|
|
53
|
+
* **docs:** Added switch operator documentation. ([7c42c78](https://github.com/lowdefy/lowdefy/commit/7c42c7882422ea89332b32bcef985b5bc5059ec8))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
6
59
|
# [3.22.0](https://github.com/lowdefy/lowdefy/compare/v3.22.0-alpha.1...v3.22.0) (2021-09-27)
|
|
7
60
|
|
|
8
61
|
|
package/actions/JsAction.yaml
CHANGED
|
@@ -66,7 +66,7 @@ _ref:
|
|
|
66
66
|
```yaml
|
|
67
67
|
# lowdefy.yaml
|
|
68
68
|
name: intercom-example
|
|
69
|
-
lowdefy: '3.
|
|
69
|
+
lowdefy: '3.23.2'
|
|
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.
|
|
140
|
+
lowdefy: '3.23.2'
|
|
141
141
|
app:
|
|
142
142
|
html:
|
|
143
143
|
# Load the custom modules into the index.html head tag.
|
|
@@ -22,10 +22,10 @@ _ref:
|
|
|
22
22
|
init_property_values:
|
|
23
23
|
html: <a href="https://lowdefy.com">Lowdefy Website</a>
|
|
24
24
|
description_content: |
|
|
25
|
-
A block to render HTML with the ability to customize the [DOMPurify's options](https://github.com/cure53/DOMPurify#can-i-configure-dompurify).
|
|
26
|
-
|
|
27
|
-
> The DangerousHtml block sanitizes HTML using [DOMPurify's](https://github.com/cure53/DOMPurify) with the ability to customize the sanitization options. This comes with some security considerations, please consider [DOMPurify's Security Goals and Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for more details regarding the security impact of using the DangerousHtml block.
|
|
28
|
-
>
|
|
25
|
+
A block to render HTML with the ability to customize the [DOMPurify's options](https://github.com/cure53/DOMPurify#can-i-configure-dompurify).
|
|
26
|
+
|
|
27
|
+
> The DangerousHtml block sanitizes HTML using [DOMPurify's](https://github.com/cure53/DOMPurify) with the ability to customize the sanitization options. This comes with some security considerations, please consider [DOMPurify's Security Goals and Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for more details regarding the security impact of using the DangerousHtml block.
|
|
28
|
+
>
|
|
29
29
|
> In short, it is strongly advised to never render any user input DangerousHtml content, only render hardcoded or trusted HTML content.
|
|
30
30
|
|
|
31
31
|
examples:
|
|
@@ -33,31 +33,30 @@ _ref:
|
|
|
33
33
|
block:
|
|
34
34
|
id: basic_example
|
|
35
35
|
type: DangerousHtml
|
|
36
|
-
properties:
|
|
36
|
+
properties:
|
|
37
37
|
html: |
|
|
38
38
|
<div style="background: #123456; padding: 10px;"><h1 style="color: white;">A simple white title box</h1></div>
|
|
39
39
|
- title: DangerousHtml with iframes sanitized
|
|
40
40
|
block:
|
|
41
41
|
id: sanitized_iframes_example
|
|
42
42
|
type: DangerousHtml
|
|
43
|
-
properties:
|
|
43
|
+
properties:
|
|
44
44
|
html: |
|
|
45
|
-
The iframe was removed: <iframe
|
|
45
|
+
The iframe was removed: <iframe width="560" height="315" src="https://www.youtube.com/embed/pkCJpDleMtI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> - title: DangerousHtml with iframes enabled
|
|
46
46
|
- title: DangerousHtml with iframes not sanitized
|
|
47
47
|
block:
|
|
48
48
|
id: iframes_example
|
|
49
49
|
type: DangerousHtml
|
|
50
50
|
properties:
|
|
51
|
-
DOMPurifyOptions:
|
|
52
|
-
ADD_TAGS:
|
|
51
|
+
DOMPurifyOptions:
|
|
52
|
+
ADD_TAGS:
|
|
53
53
|
- iframe
|
|
54
54
|
html: |
|
|
55
|
-
The iframe was not removed: <iframe
|
|
55
|
+
The iframe was not removed: <iframe width="560" height="315" src="https://www.youtube.com/embed/pkCJpDleMtI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
|
56
56
|
- title: DangerousHtml basic sanitization
|
|
57
57
|
block:
|
|
58
58
|
id: sanitized_example
|
|
59
59
|
type: DangerousHtml
|
|
60
|
-
properties:
|
|
60
|
+
properties:
|
|
61
61
|
html: |
|
|
62
62
|
<div style="color: red; border: 2px dashed blue; padding: 10px;"><script>alert("hello world")</script><img src=x onerror=alert("img") />A little bit of bad html sanitized.</div>
|
|
63
|
-
|
|
@@ -24,23 +24,23 @@ _ref:
|
|
|
24
24
|
## Some Html content:
|
|
25
25
|
|
|
26
26
|
<div style="background: #123456; padding: 10px;"><h4 style="color: white;">A simple white title box</h4></div>
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
description_content: |
|
|
29
29
|
Render markdown content which can include HTML elements. If the markdown content does not need to render HTML, use the [Markdown](/Markdown) or [MarkdownWithCode](/MarkdownWithCode) blocks instead. Specify what HTML element to allow or remove by changing the default modifying the [DOMPurify's options](https://github.com/cure53/DOMPurify#can-i-configure-dompurify).
|
|
30
|
-
|
|
31
|
-
> The DangerousMarkdown block sanitizes the markdown content using [DOMPurify's](https://github.com/cure53/DOMPurify) before converting the markdown to HTML. DangerousMarkdown provides the ability to customize the sanitization options. This comes with some security considerations, please consider [DOMPurify's Security Goals and Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for more details regarding the security impact of using the DangerousMarkdown block.
|
|
32
|
-
>
|
|
30
|
+
|
|
31
|
+
> The DangerousMarkdown block sanitizes the markdown content using [DOMPurify's](https://github.com/cure53/DOMPurify) before converting the markdown to HTML. DangerousMarkdown provides the ability to customize the sanitization options. This comes with some security considerations, please consider [DOMPurify's Security Goals and Threat Model](https://github.com/cure53/DOMPurify/wiki/Security-Goals-&-Threat-Model) for more details regarding the security impact of using the DangerousMarkdown block.
|
|
32
|
+
>
|
|
33
33
|
> In short, it is strongly advised to never render any user input DangerousMarkdown content, only render hardcoded or trusted markdown and HTML content.
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
examples:
|
|
36
36
|
- title: DangerousMarkdown headings
|
|
37
37
|
block:
|
|
38
38
|
id: iframes_example
|
|
39
39
|
type: DangerousMarkdown
|
|
40
40
|
properties:
|
|
41
|
-
DOMPurifyOptions":
|
|
42
|
-
ADD_TAGS":
|
|
41
|
+
DOMPurifyOptions":
|
|
42
|
+
ADD_TAGS":
|
|
43
43
|
- iframe
|
|
44
44
|
content: |
|
|
45
45
|
# Markdown with an iframe:
|
|
46
|
-
<iframe
|
|
46
|
+
<iframe width="560" height="315" src="https://www.youtube.com/embed/pkCJpDleMtI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
|
@@ -35,3 +35,83 @@ _ref:
|
|
|
35
35
|
|
|
36
36
|
> Other selector blocks are `ButtonSelector`, `CheckboxSelector`, `RadioSelector` and `Selector`.
|
|
37
37
|
|
|
38
|
+
examples:
|
|
39
|
+
- title: Listing options from database search
|
|
40
|
+
block:
|
|
41
|
+
id: example_selector
|
|
42
|
+
type: MultipleSelector
|
|
43
|
+
requests:
|
|
44
|
+
- id: example_search
|
|
45
|
+
type: MongoDBAggregation
|
|
46
|
+
connectionId: companies
|
|
47
|
+
properties:
|
|
48
|
+
pipeline:
|
|
49
|
+
- $search:
|
|
50
|
+
compound:
|
|
51
|
+
should:
|
|
52
|
+
- wildcard:
|
|
53
|
+
query:
|
|
54
|
+
_string.concat:
|
|
55
|
+
- '*'
|
|
56
|
+
- _state: search_input
|
|
57
|
+
- '*'
|
|
58
|
+
path: # field names to search in the companies collection
|
|
59
|
+
- _id
|
|
60
|
+
- company_name
|
|
61
|
+
allowAnalyzedField: true
|
|
62
|
+
- $addFields:
|
|
63
|
+
score:
|
|
64
|
+
$meta: searchScore
|
|
65
|
+
- $sort:
|
|
66
|
+
score: -1
|
|
67
|
+
- $limit: 50
|
|
68
|
+
- $project:
|
|
69
|
+
_id: 0
|
|
70
|
+
value: $_id
|
|
71
|
+
label:
|
|
72
|
+
$concat:
|
|
73
|
+
- $_id
|
|
74
|
+
- ' - '
|
|
75
|
+
- $ifNull:
|
|
76
|
+
- $company_name
|
|
77
|
+
- ''
|
|
78
|
+
properties:
|
|
79
|
+
placeholder: Search
|
|
80
|
+
options: # search request results will be used as options
|
|
81
|
+
_array.concat:
|
|
82
|
+
- _if_none:
|
|
83
|
+
- _state: example_options
|
|
84
|
+
- []
|
|
85
|
+
- _if_none:
|
|
86
|
+
- _request: example_search
|
|
87
|
+
- []
|
|
88
|
+
label:
|
|
89
|
+
disabled: true
|
|
90
|
+
events:
|
|
91
|
+
onChange: # selector onChange actions - triggered when the value of the selector changes
|
|
92
|
+
- id: set_state
|
|
93
|
+
type: SetState
|
|
94
|
+
params:
|
|
95
|
+
example_options:
|
|
96
|
+
_mql.aggregate:
|
|
97
|
+
on:
|
|
98
|
+
_array.concat:
|
|
99
|
+
- _state: example_options
|
|
100
|
+
- _request: example_search
|
|
101
|
+
pipeline:
|
|
102
|
+
- $match:
|
|
103
|
+
value:
|
|
104
|
+
$in:
|
|
105
|
+
_state: example_selector
|
|
106
|
+
onSearch: # selector onSearch actions - triggered when the user types in the search input
|
|
107
|
+
debounce:
|
|
108
|
+
ms: 500
|
|
109
|
+
try:
|
|
110
|
+
- id: set_state
|
|
111
|
+
type: SetState
|
|
112
|
+
params:
|
|
113
|
+
search_input:
|
|
114
|
+
_event: value
|
|
115
|
+
- id: perform_search
|
|
116
|
+
type: Request
|
|
117
|
+
params: example_search
|
|
@@ -34,3 +34,65 @@ _ref:
|
|
|
34
34
|
The options for the selector can be provides as either an array of primitive values (Strings, numbers, booleans or dates), or as an array of label-value pairs, where the label is a string, and the value can be of any type, including objects like dates and arrays.
|
|
35
35
|
|
|
36
36
|
> Other selector blocks are `ButtonSelector`, `CheckboxSelector`, `MultipleSelector` and `RadioSelector`.
|
|
37
|
+
|
|
38
|
+
examples:
|
|
39
|
+
- title: Listing options from database search
|
|
40
|
+
block:
|
|
41
|
+
id: example_selector
|
|
42
|
+
type: Selector
|
|
43
|
+
requests:
|
|
44
|
+
- id: example_search
|
|
45
|
+
type: MongoDBAggregation
|
|
46
|
+
connectionId: companies
|
|
47
|
+
properties:
|
|
48
|
+
pipeline:
|
|
49
|
+
- $search:
|
|
50
|
+
compound:
|
|
51
|
+
should:
|
|
52
|
+
- wildcard:
|
|
53
|
+
query:
|
|
54
|
+
_string.concat:
|
|
55
|
+
- '*'
|
|
56
|
+
- _state: search_input
|
|
57
|
+
- '*'
|
|
58
|
+
path: # field names to search in the companies collection
|
|
59
|
+
- _id
|
|
60
|
+
- company_name
|
|
61
|
+
allowAnalyzedField: true
|
|
62
|
+
- $addFields:
|
|
63
|
+
score:
|
|
64
|
+
$meta: searchScore
|
|
65
|
+
- $sort:
|
|
66
|
+
score: -1
|
|
67
|
+
- $limit: 50
|
|
68
|
+
- $project: # selector options value, label pairs
|
|
69
|
+
_id: 0
|
|
70
|
+
value: $_id
|
|
71
|
+
label:
|
|
72
|
+
$concat:
|
|
73
|
+
- $_id
|
|
74
|
+
- ' - '
|
|
75
|
+
- $ifNull:
|
|
76
|
+
- $company_name
|
|
77
|
+
- ''
|
|
78
|
+
properties:
|
|
79
|
+
placeholder: Search
|
|
80
|
+
options:
|
|
81
|
+
_if_none: # search request results will be used as options
|
|
82
|
+
- _request: example_search
|
|
83
|
+
- []
|
|
84
|
+
label:
|
|
85
|
+
disabled: true
|
|
86
|
+
events:
|
|
87
|
+
onSearch: # selector onSearch actions
|
|
88
|
+
debounce:
|
|
89
|
+
ms: 500
|
|
90
|
+
try:
|
|
91
|
+
- id: set_state
|
|
92
|
+
type: SetState
|
|
93
|
+
params:
|
|
94
|
+
search_input:
|
|
95
|
+
_event: value
|
|
96
|
+
- id: perform_search
|
|
97
|
+
type: Request
|
|
98
|
+
params: example_search
|
|
@@ -45,7 +45,7 @@ _ref:
|
|
|
45
45
|
|
|
46
46
|
```yaml
|
|
47
47
|
name: dashboard-app
|
|
48
|
-
lowdefy: 3.
|
|
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.
|
|
98
|
+
lowdefy: 3.23.2
|
|
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.
|
|
56
|
+
lowdefy: 3.23.2
|
|
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.
|
|
101
|
+
lowdefy: 3.23.2
|
|
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.
|
|
159
|
+
lowdefy: 3.23.2
|
|
160
160
|
app:
|
|
161
161
|
html:
|
|
162
162
|
appendHead:
|
|
@@ -43,7 +43,19 @@ _ref:
|
|
|
43
43
|
The config object has the following properties:
|
|
44
44
|
|
|
45
45
|
- `homePageId: string`: The pageId of the page that should be loaded when a user loads the app without a pageId in the url route. This is the page that is loaded when you navigate to `yourdomain.com`.
|
|
46
|
+
- `experimental_initPageId: string`: The pageId of the page that should be loaded when app is initialized. User is then redirected to requeted page. You can use onInit/onInitAsync/onEnter/onEnterAsync events to fetch and prepare global variables for other parts of the app.
|
|
46
47
|
|
|
48
|
+
- id: alert1
|
|
49
|
+
type: Alert
|
|
50
|
+
properties:
|
|
51
|
+
type: warning
|
|
52
|
+
showIcon: false
|
|
53
|
+
message: Init page is an experimental feature, that may disappear in future releases as well as the flag itself can be changed. Use at your own risk.
|
|
54
|
+
|
|
55
|
+
- id: md2
|
|
56
|
+
type: MarkdownWithCode
|
|
57
|
+
properties:
|
|
58
|
+
content: |
|
|
47
59
|
# Global
|
|
48
60
|
|
|
49
61
|
Any data that you wish to use in your app can be stored in the __global__ object, and accessed using the [`_global`](/_global) operator. This is a good place to store data or configuration that is used throughout the app, for example the url of a logo or configuration of a page, since then these are only written once, and can be updated easily.
|
|
@@ -201,6 +213,10 @@ _ref:
|
|
|
201
213
|
|
|
202
214
|
The `_ref` operator can also be extended with custom JavaScript functions. A `resolver` function can be specified, which can overwrite the default way configuration files are read from the filesystem. A `transformer` function can be used to transform the value returned by the `_ref` operator.
|
|
203
215
|
|
|
216
|
+
## YAML file extensions
|
|
217
|
+
|
|
218
|
+
Both files with the `.yaml` and `.yml` file extensions are supported as YAML files.
|
|
219
|
+
|
|
204
220
|
## JSON instead of YAML
|
|
205
221
|
|
|
206
222
|
Since you can reference JSON files, you can build your app using JSON instead of YAML files. The `lowdefy.yaml` file needs to be a YAML file, but all other configuration can be in referenced JSON files. It also makes sense to use JSON instead of YAML if you are generating configuration using code.
|
|
@@ -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@3.
|
|
58
|
+
RUN npx lowdefy@3.23.2 build
|
|
59
59
|
|
|
60
60
|
# Use the correct Lowdefy base image
|
|
61
|
-
FROM lowdefy/lowdefy-aws-lambda:3.
|
|
61
|
+
FROM lowdefy/lowdefy-aws-lambda:3.23.2
|
|
62
62
|
|
|
63
63
|
# Copy build output from build stage
|
|
64
64
|
COPY --from=build /home/node/lowdefy/.lowdefy/build ./build
|
package/deployment/docker.yaml
CHANGED
|
@@ -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@3.
|
|
68
|
+
RUN npx lowdefy@3.23.2 build
|
|
69
69
|
|
|
70
70
|
# Use the correct Lowdefy base image
|
|
71
|
-
FROM lowdefy/lowdefy:3.
|
|
71
|
+
FROM lowdefy/lowdefy:3.23.2
|
|
72
72
|
|
|
73
73
|
# Copy build output from build stage
|
|
74
74
|
COPY --from=build --chown=node:node /home/node/lowdefy/.lowdefy/build ./build
|
package/head.html
CHANGED