@lowdefy/docs 3.22.0 → 4.0.0-alpha.1

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/actions/JsAction.yaml +2 -2
  3. package/blocks/all_icons.yaml +1 -0
  4. package/blocks/{display → container}/Alert.yaml +3 -2
  5. package/blocks/{display → container}/Descriptions.yaml +3 -1
  6. package/blocks/container/Drawer.yaml +1 -0
  7. package/blocks/{context → container}/PageHCF.yaml +2 -2
  8. package/blocks/{context → container}/PageHCSF.yaml +2 -2
  9. package/blocks/{context → container}/PageHSCF.yaml +2 -2
  10. package/blocks/{context → container}/PageHeaderMenu.yaml +2 -2
  11. package/blocks/{context → container}/PageSHCF.yaml +2 -2
  12. package/blocks/{context → container}/PageSiderMenu.yaml +2 -2
  13. package/blocks/display/DangerousHtml.yaml +11 -12
  14. package/blocks/display/DangerousMarkdown.yaml +8 -8
  15. package/blocks/display/Img.yaml +1 -1
  16. package/blocks/input/MultipleSelector.yaml +80 -0
  17. package/blocks/input/Selector.yaml +62 -0
  18. package/concepts/custom-blocks.yaml +2 -2
  19. package/concepts/custom-code.yaml +3 -3
  20. package/concepts/lowdefy-schema.yaml +16 -0
  21. package/connections/AxiosHttp.yaml +1 -1
  22. package/deployment/aws-lambda.yaml +2 -2
  23. package/deployment/docker.yaml +2 -2
  24. package/head.html +2 -0
  25. package/howto/generate-csv.yaml.njk +251 -0
  26. package/howto/generate-pdf.yaml.njk +651 -0
  27. package/howto/generateCsv/lowdefy.yaml +63 -0
  28. package/howto/generateCsv/public/csvMake.js +27 -0
  29. package/howto/generatePdf/inv_template.yaml +200 -0
  30. package/howto/generatePdf/lowdefy.yaml +116 -0
  31. package/howto/generatePdf/my_header.html +1 -0
  32. package/howto/generatePdf/public/logo_example.png +0 -0
  33. package/howto/generatePdf/public/modules/importUmd.js +7 -0
  34. package/howto/generatePdf/public/modules/pdfMake.js +7 -0
  35. package/howto/generatePdf/public/modules/vfs_fonts.js +12 -0
  36. package/howto/use-refrences.md +5 -0
  37. package/lowdefy.yaml +1 -1
  38. package/menus.yaml +41 -26
  39. package/operators/_actions.yaml +1 -1
  40. package/operators/_change_case.yaml +4 -4
  41. package/operators/_event.yaml +1 -0
  42. package/operators/_global.yaml +1 -0
  43. package/operators/_index.yaml +1 -0
  44. package/operators/_input.yaml +1 -0
  45. package/operators/_js.yaml +2 -2
  46. package/operators/_ref.yaml +16 -8
  47. package/operators/_state.yaml +1 -0
  48. package/operators/_switch.yaml +51 -0
  49. package/operators/_url_query.yaml +1 -0
  50. package/package.json +7 -7
  51. package/pages.yaml +18 -8
  52. package/public/images/authors/gervwyk.jpeg +0 -0
  53. package/public/images/authors/sandile.jpeg +0 -0
  54. package/public/images/howto/header_generate_csv.jpg +0 -0
  55. package/public/images/howto/header_generate_pdf.jpg +0 -0
  56. package/public/logo_example.png +0 -0
  57. package/public/modules/csvMake.js +27 -0
  58. package/public/modules/importUmd.js +7 -0
  59. package/public/modules/pdfMake.js +7 -0
  60. package/public/modules/vfs_fonts.js +12 -0
  61. package/public/sitemap.xml +216 -201
  62. package/templates/blocks/exampleTransformer.js +1 -1
  63. package/templates/blog.yaml.njk +221 -0
  64. package/templates/footer.yaml.njk +2 -2
  65. package/tutorial/tutorial-create-page.yaml +1 -1
  66. package/tutorial/tutorial-start.yaml +1 -1
  67. package/users/login-and-logout.yaml +2 -2
  68. package/users/openid-connect.yaml +1 -0
  69. package/users/protected-pages.yaml +2 -2
  70. package/users/roles.yaml +2 -2
  71. package/users/users-introduction.yaml +1 -1
  72. package/version.yaml +1 -1
  73. package/blocks/context/Context.yaml +0 -27
package/CHANGELOG.md CHANGED
@@ -3,6 +3,78 @@
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
+ # [4.0.0-alpha.1](https://github.com/lowdefy/lowdefy/compare/v3.23.1...v4.0.0-alpha.1) (2021-11-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **docs:** Document that _index operator is client side only. ([72c8228](https://github.com/lowdefy/lowdefy/commit/72c82282a3e6bcd3eb2eeaf3c09b395a0f152405))
12
+ * Replace all front end testing with @testing-library/react, jest and other updates. ([22ec295](https://github.com/lowdefy/lowdefy/commit/22ec2954047853096aabcddba7a2c509342f95f2))
13
+
14
+
15
+ ### Features
16
+
17
+ * **blocksAntd:** Add HolderOutlined icon. ([c39c387](https://github.com/lowdefy/lowdefy/commit/c39c38752e4a681a1146e44b6638ff8486ff9da9))
18
+ * **blocksAntd:** Convert Alert to container and add action content area. ([49c6baa](https://github.com/lowdefy/lowdefy/commit/49c6baabeedd4ed5aaaf14f1d7b4ae5d2545d6cf))
19
+ * **blocksAntd:** Drawer: Add extra content area and contentWrapperStyle property. ([9273fac](https://github.com/lowdefy/lowdefy/commit/9273facac41e5ee6341c80e698f4367b7d8686f3))
20
+ * **blocks:** Convert all context category blocks to container. ([6bc03c8](https://github.com/lowdefy/lowdefy/commit/6bc03c86b80a3506c2b85076626ae15a401bcdfc))
21
+ * **blockTools:** Update to @emotion/css, optimize makeCssClass standarise jest settings. ([947defa](https://github.com/lowdefy/lowdefy/commit/947defa3d8934e061933b1e218b79f2f97456054))
22
+ * Replace server side state with payload and _payload operator. ([1f928d9](https://github.com/lowdefy/lowdefy/commit/1f928d93db4cbe886d322a1a3998a817d769485f))
23
+
24
+
25
+ ### BREAKING CHANGES
26
+
27
+ * The _event, _global, _input, _state, and _url_query operators are no longer evaluated in connections or requests.
28
+
29
+
30
+
31
+
32
+
33
+ ## [3.23.1](https://github.com/lowdefy/lowdefy/compare/v3.23.0...v3.23.1) (2021-11-20)
34
+
35
+ **Note:** Version bump only for package @lowdefy/docs
36
+
37
+
38
+
39
+
40
+
41
+ # [3.23.0](https://github.com/lowdefy/lowdefy/compare/v3.23.0-alpha.0...v3.23.0) (2021-11-19)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * **docs:** Fix _ref resolver function example. ([0903094](https://github.com/lowdefy/lowdefy/commit/0903094ce531f4d8ab7849deb91ab3d6b7e5fd82))
47
+ * **docs:** Included onSearch event example in MultipleSelector and Selector docs. ([0e53cb8](https://github.com/lowdefy/lowdefy/commit/0e53cb8f93ed49e0122ac038113d7378f67501f7))
48
+
49
+
50
+
51
+
52
+
53
+ # [3.23.0-alpha.0](https://github.com/lowdefy/lowdefy/compare/v3.22.0...v3.23.0-alpha.0) (2021-11-09)
54
+
55
+
56
+ ### Bug Fixes
57
+
58
+ * Add _switch operator to docs. ([c5c6f0c](https://github.com/lowdefy/lowdefy/commit/c5c6f0c9a5b0dfc89e09835d3ab940195a077504))
59
+ * Support .yml in lowdefy.yaml file. ([0f7cc2a](https://github.com/lowdefy/lowdefy/commit/0f7cc2a7612a5ad9a8164d5a5437dde5c6d7da49)), closes [#902](https://github.com/lowdefy/lowdefy/issues/902)
60
+ * **docs:** Add avatar and links to blog template. ([d855599](https://github.com/lowdefy/lowdefy/commit/d855599398cae041933dd8b11aaf77648f87d4c2))
61
+ * **docs:** Add how to generate pdfs. ([7b35550](https://github.com/lowdefy/lowdefy/commit/7b35550fa944995be8f8a9d0e809971cabcf12af))
62
+ * **docs:** Fix the iframe videos in the docs. ([c4a957a](https://github.com/lowdefy/lowdefy/commit/c4a957a12ea5adf018b373d8da8c5116e064205f))
63
+ * improvements on blog template. ([30e2291](https://github.com/lowdefy/lowdefy/commit/30e22917fed9932e43cde942532654aa4a6aeac6))
64
+ * **docs:** Add how to generate CSVs. ([2cc8e45](https://github.com/lowdefy/lowdefy/commit/2cc8e45b165aa755dceb9e40525f8a0511fb3485))
65
+
66
+
67
+ ### Features
68
+
69
+ * **docs:** Add how to generate csv. ([3257f51](https://github.com/lowdefy/lowdefy/commit/3257f514b95f7cafb8ac30998194e7ae0a327862))
70
+ * **docs:** Add videos to how tos. ([57c7779](https://github.com/lowdefy/lowdefy/commit/57c77798f0356c606cf90bfd36a4f63ab8d0ff36))
71
+ * Add generate pdf how to. ([5bde460](https://github.com/lowdefy/lowdefy/commit/5bde460934e2dc94d677af5f287e3c85c0ff4c34))
72
+ * **docs:** Added switch operator documentation. ([7c42c78](https://github.com/lowdefy/lowdefy/commit/7c42c7882422ea89332b32bcef985b5bc5059ec8))
73
+
74
+
75
+
76
+
77
+
6
78
  # [3.22.0](https://github.com/lowdefy/lowdefy/compare/v3.22.0-alpha.1...v3.22.0) (2021-09-27)
7
79
 
8
80
 
@@ -66,7 +66,7 @@ _ref:
66
66
  ```yaml
67
67
  # lowdefy.yaml
68
68
  name: intercom-example
69
- lowdefy: '3.22.0'
69
+ lowdefy: '3.23.1'
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.22.0'
140
+ lowdefy: '3.23.1'
141
141
  app:
142
142
  html:
143
143
  # Load the custom modules into the index.html head tag.
@@ -409,6 +409,7 @@
409
409
  - { label: 'HighlightOutlined', value: 'HighlightOutlined' }
410
410
  - { label: 'HighlightTwoTone', value: 'HighlightTwoTone' }
411
411
  - { label: 'HistoryOutlined', value: 'HistoryOutlined' }
412
+ - { label: 'HolderOutlined', value: 'HolderOutlined' }
412
413
  - { label: 'HomeFilled', value: 'HomeFilled' }
413
414
  - { label: 'HomeOutlined', value: 'HomeOutlined' }
414
415
  - { label: 'HomeTwoTone', value: 'HomeTwoTone' }
@@ -16,11 +16,12 @@ _ref:
16
16
  path: templates/blocks/template.yaml.njk
17
17
  vars:
18
18
  block_type: Alert
19
- category: display
19
+ category: container
20
20
  schema: ../blocks/blocksAntd/src/blocks/Alert/Alert.json
21
21
  filePath: blocks/display/Alert.yaml
22
22
  init_property_values:
23
23
  message: Alerts help to highlight important information.
24
24
  description_content: |
25
25
  Alert is used to render user feedback messages in a Alert styled frame.
26
-
26
+ areas:
27
+ - action
@@ -16,7 +16,7 @@ _ref:
16
16
  path: templates/blocks/template.yaml.njk
17
17
  vars:
18
18
  block_type: Descriptions
19
- category: display
19
+ category: container
20
20
  schema: ../blocks/blocksAntd/src/blocks/Descriptions/Descriptions.json
21
21
  filePath: blocks/display/Descriptions.yaml
22
22
  init_state_values:
@@ -47,3 +47,5 @@ _ref:
47
47
  Location: South Africa
48
48
  Temperature: 22
49
49
  Date: 2021-02-02
50
+ areas:
51
+ - extra
@@ -26,6 +26,7 @@ _ref:
26
26
  > To open the drawer, invoke a drawer method.
27
27
  areas:
28
28
  - content
29
+ - extra
29
30
  methods:
30
31
  - name: toggleOpen
31
32
  onClick:
@@ -16,9 +16,9 @@ _ref:
16
16
  path: templates/blocks/template.yaml.njk
17
17
  vars:
18
18
  block_type: PageHCF
19
- category: context
19
+ category: container
20
20
  schema: ../blocks/blocksAntd/src/blocks/PageHCF/PageHCF.json
21
- filePath: blocks/context/PageHCF.yaml
21
+ filePath: blocks/container/PageHCF.yaml
22
22
  description_content: |
23
23
  Page HCF provides a minimal layout structure for a page container with a header, content and footer area.
24
24
 
@@ -16,9 +16,9 @@ _ref:
16
16
  path: templates/blocks/template.yaml.njk
17
17
  vars:
18
18
  block_type: PageHCSF
19
- category: context
19
+ category: container
20
20
  schema: ../blocks/blocksAntd/src/blocks/PageHCSF/PageHCSF.json
21
- filePath: blocks/context/PageHCSF.yaml
21
+ filePath: blocks/container/PageHCSF.yaml
22
22
  description_content: |
23
23
  Page HCSF provides a minimal layout structure for a page container with a header, content, sider and footer arrangement.
24
24
 
@@ -16,9 +16,9 @@ _ref:
16
16
  path: templates/blocks/template.yaml.njk
17
17
  vars:
18
18
  block_type: PageHSCF
19
- category: context
19
+ category: container
20
20
  schema: ../blocks/blocksAntd/src/blocks/PageHSCF/PageHSCF.json
21
- filePath: blocks/context/PageHSCF.yaml
21
+ filePath: blocks/container/PageHSCF.yaml
22
22
  description_content: |
23
23
  Page HSCF provides a minimal layout structure for a page container with a header, sider, content, and footer arrangement.
24
24
 
@@ -16,9 +16,9 @@ _ref:
16
16
  path: templates/blocks/template.yaml.njk
17
17
  vars:
18
18
  block_type: PageHeaderMenu
19
- category: context
19
+ category: container
20
20
  schema: ../blocks/blocksAntd/src/blocks/PageHeaderMenu/PageHeaderMenu.json
21
- filePath: blocks/context/PageHeaderMenu.yaml
21
+ filePath: blocks/container/PageHeaderMenu.yaml
22
22
  description_content: |
23
23
  The Page Header Menu block provides a structured layout for a page with a header containing a menu, content and footer area.
24
24
  init_state_values:
@@ -16,9 +16,9 @@ _ref:
16
16
  path: templates/blocks/template.yaml.njk
17
17
  vars:
18
18
  block_type: PageSHCF
19
- category: context
19
+ category: container
20
20
  schema: ../blocks/blocksAntd/src/blocks/PageSHCF/PageSHCF.json
21
- filePath: blocks/context/PageSHCF.yaml
21
+ filePath: blocks/container/PageSHCF.yaml
22
22
  description_content: |
23
23
  Page SHCF provides a minimal layout structure for a page container with a sider, header, content, and footer arrangement.
24
24
 
@@ -16,9 +16,9 @@ _ref:
16
16
  path: templates/blocks/template.yaml.njk
17
17
  vars:
18
18
  block_type: PageSiderMenu
19
- category: context
19
+ category: container
20
20
  schema: ../blocks/blocksAntd/src/blocks/PageSiderMenu/PageSiderMenu.json
21
- filePath: blocks/context/PageSiderMenu.yaml
21
+ filePath: blocks/container/PageSiderMenu.yaml
22
22
  description_content: |
23
23
  The Page Sider Menu block provides a structured layout for a page with a header, sider including menu, content and footer area.
24
24
  init_state_values:
@@ -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 style="max-width: 512px;" width="100%" src="https://www.youtube.com/embed/7N7GWdlQJlU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> - title: DangerousHtml with iframes enabled
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 style="max-width: 512px;" width="100%" src="https://www.youtube.com/embed/7N7GWdlQJlU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></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 style="max-width: 512px;" width="100%" src="https://www.youtube.com/embed/7N7GWdlQJlU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></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>
@@ -36,5 +36,5 @@ _ref:
36
36
  type: Img
37
37
  properties:
38
38
  src: https://docs.lowdefy.com/public/logo-light-theme.png
39
- srcset: https://docs.lowdefy.com/public/logo-square-light-theme.png 40w, https://docs.lowdefy.com/public/logo-light-theme.png 577w
39
+ srcSet: https://docs.lowdefy.com/public/logo-square-light-theme.png 40w, https://docs.lowdefy.com/public/logo-light-theme.png 577w
40
40
  sizes: '(max-width: 576px) 40px, 577px'
@@ -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.22.0
48
+ lowdefy: 3.23.1
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.22.0
98
+ lowdefy: 3.23.1
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.22.0
56
+ lowdefy: 3.23.1
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.22.0
101
+ lowdefy: 3.23.1
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.22.0
159
+ lowdefy: 3.23.1
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.
@@ -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.22.0
91
+ lowdefy: 3.23.1
92
92
  name: Lowdefy starter
93
93
  connections:
94
94
  - id: my_api
@@ -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.22.0 build
58
+ RUN npx lowdefy@3.23.1 build
59
59
 
60
60
  # Use the correct Lowdefy base image
61
- FROM lowdefy/lowdefy-aws-lambda:3.22.0
61
+ FROM lowdefy/lowdefy-aws-lambda:3.23.1
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@3.22.0 build
68
+ RUN npx lowdefy@3.23.1 build
69
69
 
70
70
  # Use the correct Lowdefy base image
71
- FROM lowdefy/lowdefy:3.22.0
71
+ FROM lowdefy/lowdefy:3.23.1
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
@@ -3,3 +3,5 @@
3
3
  rel="stylesheet"
4
4
  href="https://cdn.jsdelivr.net/npm/docsearch.js@2.6.3/dist/cdn/docsearch.min.css"
5
5
  />
6
+ <script defer type="module" src="/public/modules/pdfMake.js"></script>
7
+ <script defer type="module" src="/public/modules/csvMake.js"></script>