@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.
Files changed (146) hide show
  1. package/CHANGELOG.md +75 -104
  2. package/actions/JsAction.yaml +6 -6
  3. package/blocks/container/Affix.yaml +1 -1
  4. package/blocks/container/Alert.yaml +2 -2
  5. package/blocks/container/Badge.yaml +1 -1
  6. package/blocks/container/Box.yaml +1 -1
  7. package/blocks/container/Card.yaml +1 -1
  8. package/blocks/container/Collapse.yaml +1 -1
  9. package/blocks/container/Comment.yaml +4 -4
  10. package/blocks/container/ConfirmModal.yaml +1 -1
  11. package/blocks/container/Descriptions.yaml +2 -2
  12. package/blocks/container/Drawer.yaml +1 -1
  13. package/blocks/container/Label.yaml +1 -2
  14. package/blocks/container/Modal.yaml +1 -1
  15. package/blocks/container/PageHCF.yaml +1 -1
  16. package/blocks/container/PageHCSF.yaml +1 -1
  17. package/blocks/container/PageHSCF.yaml +1 -1
  18. package/blocks/container/PageHeaderMenu.yaml +3 -3
  19. package/blocks/container/PageSHCF.yaml +1 -1
  20. package/blocks/container/PageSiderMenu.yaml +3 -3
  21. package/blocks/container/Result.yaml +2 -2
  22. package/blocks/container/Span.yaml +1 -1
  23. package/blocks/container/Spin.yaml +2 -2
  24. package/blocks/container/Tabs.yaml +2 -2
  25. package/blocks/container/Tooltip.yaml +1 -1
  26. package/blocks/display/Anchor.yaml +1 -2
  27. package/blocks/display/Avatar.yaml +1 -2
  28. package/blocks/display/Breadcrumb.yaml +2 -3
  29. package/blocks/display/Button.yaml +7 -7
  30. package/blocks/display/DangerousHtml.yaml +1 -1
  31. package/blocks/display/DangerousMarkdown.yaml +1 -1
  32. package/blocks/display/Divider.yaml +1 -3
  33. package/blocks/display/EChart.yaml +1 -1
  34. package/blocks/display/Html.yaml +2 -2
  35. package/blocks/display/Icon.yaml +1 -3
  36. package/blocks/display/Img.yaml +1 -1
  37. package/blocks/display/Markdown.yaml +5 -6
  38. package/blocks/display/MarkdownWithCode.yaml +3 -5
  39. package/blocks/display/Menu.yaml +3 -3
  40. package/blocks/display/Message.yaml +1 -1
  41. package/blocks/display/MobileMenu.yaml +3 -4
  42. package/blocks/display/Notification.yaml +2 -2
  43. package/blocks/display/Paragraph.yaml +2 -4
  44. package/blocks/display/Progress.yaml +8 -9
  45. package/blocks/display/Skeleton.yaml +1 -2
  46. package/blocks/display/Statistic.yaml +3 -5
  47. package/blocks/display/Title.yaml +1 -1
  48. package/blocks/input/AutoComplete.yaml +1 -2
  49. package/blocks/input/ButtonSelector.yaml +1 -2
  50. package/blocks/input/CheckboxSelector.yaml +1 -2
  51. package/blocks/input/CheckboxSwitch.yaml +1 -1
  52. package/blocks/input/ChromeColorSelector.yaml +1 -2
  53. package/blocks/input/CircleColorSelector.yaml +1 -2
  54. package/blocks/input/ColorSelector.yaml +1 -2
  55. package/blocks/input/CompactColorSelector.yaml +1 -2
  56. package/blocks/input/DateRangeSelector.yaml +1 -2
  57. package/blocks/input/DateSelector.yaml +1 -2
  58. package/blocks/input/DateTimeSelector.yaml +1 -2
  59. package/blocks/input/GithubColorSelector.yaml +1 -2
  60. package/blocks/input/MonthSelector.yaml +1 -2
  61. package/blocks/input/MultipleSelector.yaml +1 -1
  62. package/blocks/input/NumberInput.yaml +1 -1
  63. package/blocks/input/Pagination.yaml +3 -3
  64. package/blocks/input/ParagraphInput.yaml +1 -1
  65. package/blocks/input/PasswordInput.yaml +1 -1
  66. package/blocks/input/RadioSelector.yaml +1 -1
  67. package/blocks/input/RatingSlider.yaml +1 -1
  68. package/blocks/input/S3UploadButton.yaml +1 -1
  69. package/blocks/input/Selector.yaml +1 -1
  70. package/blocks/input/SliderColorSelector.yaml +1 -1
  71. package/blocks/input/SwatchesColorSelector.yaml +1 -1
  72. package/blocks/input/Switch.yaml +1 -1
  73. package/blocks/input/TextArea.yaml +1 -2
  74. package/blocks/input/TextInput.yaml +7 -7
  75. package/blocks/input/TitleInput.yaml +1 -1
  76. package/blocks/input/TwitterColorSelector.yaml +1 -1
  77. package/blocks/input/WeekSelector.yaml +1 -1
  78. package/blocks/list/ControlledList.yaml +18 -18
  79. package/blocks/list/List.yaml +16 -17
  80. package/blocks/list/TimelineList.yaml +23 -22
  81. package/concepts/cli.yaml +7 -7
  82. package/concepts/custom-blocks.yaml +16 -2
  83. package/concepts/custom-code.yaml +5 -4
  84. package/concepts/lowdefy-schema.yaml +5 -4
  85. package/connections/AxiosHttp.yaml +1 -1
  86. package/connections/Knex.yaml +7 -7
  87. package/connections/MongoDB.yaml +176 -47
  88. package/deployment/aws-lambda.yaml +3 -3
  89. package/deployment/docker.yaml +4 -4
  90. package/deployment/node-server.yaml +1 -1
  91. package/howto/generate-csv.yaml.njk +7 -6
  92. package/howto/generate-pdf.yaml.njk +21 -21
  93. package/howto/generateCsv/lowdefy.yaml +32 -31
  94. package/howto/generatePdf/lowdefy.yaml +10 -9
  95. package/introduction.yaml +1 -1
  96. package/lowdefy.yaml +1 -1
  97. package/menus.yaml +26 -29
  98. package/operators/_actions.yaml +2 -2
  99. package/operators/_get.yaml +6 -6
  100. package/operators/_js.yaml +2 -2
  101. package/operators/_ref.yaml +40 -6
  102. package/operators/_yaml.yaml +39 -15
  103. package/package.json +6 -7
  104. package/pages.yaml +8 -8
  105. package/public/sitemap.xml +204 -204
  106. package/templates/blocks/defaultValueTransformer.js +4 -2
  107. package/templates/blocks/exampleTransformer.js +1 -1
  108. package/templates/blocks/propertiesFormTransformer.js +3 -3
  109. package/templates/blocks/propertiesGetterTransformer.js +2 -2
  110. package/templates/blocks/schemaTransformer.js +1 -1
  111. package/templates/blocks/template.yaml.njk +3 -4
  112. package/templates/blog.yaml.njk +5 -5
  113. package/templates/cli_command.yaml.njk +2 -2
  114. package/templates/footer.yaml.njk +18 -18
  115. package/templates/general.yaml.njk +4 -4
  116. package/templates/generateSitemap.js +1 -2
  117. package/templates/header.yaml +2 -2
  118. package/templates/navigation_buttons.yaml +2 -2
  119. package/templates/operatorsMethodTransformer.js +2 -2
  120. package/templates/test/array.test.js +146 -166
  121. package/templates/test/boolean.test.js +13 -17
  122. package/templates/test/button.test.js +21 -25
  123. package/templates/test/color.test.js +21 -23
  124. package/templates/test/enum.test.js +15 -19
  125. package/templates/test/icon.test.js +17 -21
  126. package/templates/test/integer.test.js +13 -17
  127. package/templates/test/manual.test.js +66 -74
  128. package/templates/test/number.test.js +13 -17
  129. package/templates/test/object.test.js +90 -98
  130. package/templates/test/oneOf.test.js +108 -120
  131. package/templates/test/string.test.js +13 -17
  132. package/templates/test/yaml.test.js +96 -112
  133. package/tutorial/tutorial-actions-operators-config.yaml +4 -4
  134. package/tutorial/tutorial-actions-operators.yaml +6 -6
  135. package/tutorial/tutorial-add-blocks-config.yaml +4 -4
  136. package/tutorial/tutorial-add-blocks.yaml +4 -4
  137. package/tutorial/tutorial-create-page-config.yaml +2 -2
  138. package/tutorial/tutorial-create-page.yaml +4 -4
  139. package/tutorial/tutorial-deploy.yaml +2 -2
  140. package/tutorial/tutorial-requests-config.yaml +4 -4
  141. package/tutorial/tutorial-requests.yaml +2 -2
  142. package/tutorial/tutorial-start.yaml +6 -6
  143. package/users/login-and-logout.yaml +2 -2
  144. package/users/protected-pages.yaml +2 -2
  145. package/users/roles.yaml +2 -2
  146. package/users/users-introduction.yaml +2 -2
@@ -46,6 +46,8 @@ function getDefaultValues(defaultValues, obj) {
46
46
  return defaultValues;
47
47
  }
48
48
 
49
- const transformer = (obj) => getDefaultValues({}, obj.schema.properties);
49
+ const transformer = (obj) => {
50
+ return getDefaultValues({}, obj.properties);
51
+ };
50
52
 
51
- module.exports = transformer;
53
+ export default transformer;
@@ -78,4 +78,4 @@ ${example.description || ''}
78
78
  return examples;
79
79
  };
80
80
 
81
- module.exports = transformer;
81
+ export default transformer;
@@ -401,8 +401,8 @@ function makeBlockDefinition({
401
401
  }
402
402
 
403
403
  function transformer(obj) {
404
- const blockProperties = obj.schema.properties.properties;
405
- const requiredProperties = obj.schema.properties.required || [];
404
+ const blockProperties = obj.properties.properties;
405
+ const requiredProperties = obj.properties.required || [];
406
406
  const blocks = Object.keys(blockProperties)
407
407
  .sort()
408
408
  .map((propertyName) => {
@@ -416,4 +416,4 @@ function transformer(obj) {
416
416
  return blocks;
417
417
  }
418
418
 
419
- module.exports = transformer;
419
+ export default transformer;
@@ -124,9 +124,9 @@ const transformer = (obj, vars) => {
124
124
  contextId,
125
125
  data: 'state',
126
126
  path: 'block.properties',
127
- properties: obj.schema.properties.properties,
127
+ properties: obj.properties.properties,
128
128
  underscores: '_',
129
129
  });
130
130
  };
131
131
 
132
- module.exports = transformer;
132
+ export default transformer;
@@ -22,4 +22,4 @@ const reviver = (key, value) => {
22
22
 
23
23
  const transformer = (obj) => JSON.parse(JSON.stringify(obj), reviver);
24
24
 
25
- module.exports = transformer;
25
+ export default transformer;
@@ -75,10 +75,10 @@ events:
75
75
  _var: init_state_values
76
76
 
77
77
  onEnterAsync:
78
- - id: connect_docsearch
79
- type: JsAction
78
+ {# - id: connect_docsearch
79
+ type: JsAction # TODO:
80
80
  params:
81
- name: connectDocsearch
81
+ name: connectDocsearch #}
82
82
  - id: post_telemetry
83
83
  type: Request
84
84
  messages:
@@ -493,4 +493,3 @@ areas:
493
493
  path:
494
494
  _var: schema
495
495
  transformer: templates/blocks/schemaTransformer.js
496
-
@@ -44,10 +44,10 @@ events:
44
44
  type: string
45
45
  length: 16
46
46
  onEnterAsync:
47
- - id: connect_docsearch
48
- type: JsAction
47
+ {# - id: connect_docsearch
48
+ type: JsAction # TODO:
49
49
  params:
50
- name: connectDocsearch
50
+ name: connectDocsearch #}
51
51
  - id: post_telemetry
52
52
  type: Request
53
53
  messages:
@@ -182,8 +182,8 @@ areas:
182
182
  - id: links-{{ item.pageId }}
183
183
  type: Anchor
184
184
  properties:
185
- icon: LinkOutlined
186
- href: /{{ item.pageId }}
185
+ icon: AiOutlinedLink
186
+ pageId: {{ item.pageId }}
187
187
  title: {{ item.title }}
188
188
  {% endfor %}
189
189
 
@@ -29,9 +29,9 @@ blocks:
29
29
  marginTop: 16px
30
30
  code: true
31
31
  copyable:
32
- icon: CopyOutlined
32
+ icon: AiOutlinedCopy
33
33
  tooltips:
34
34
  - Click to copy
35
35
  - Copied. Paste in console to run 🚀
36
36
  content:
37
- _var: command
37
+ _var: command
@@ -213,7 +213,7 @@
213
213
  size: auto
214
214
  properties:
215
215
  title: Send
216
- icon: SendOutlined
216
+ icon: AiOutlinedSend
217
217
  color: '#1890ff'
218
218
  events:
219
219
  onClick:
@@ -250,7 +250,7 @@
250
250
  size: auto
251
251
  properties:
252
252
  title: Edit this page on Github
253
- href: https://github.com/lowdefy/lowdefy/blob/main/packages/docs/{{ filePath }}
253
+ url: https://github.com/lowdefy/lowdefy/blob/main/packages/docs/{{ filePath }}
254
254
  newTab: true
255
255
  {% endif %}
256
256
 
@@ -297,7 +297,7 @@
297
297
  layout:
298
298
  size: auto
299
299
  properties:
300
- name: TwitterOutlined
300
+ name: AiOutlinedTwitter
301
301
  size: 24
302
302
  events:
303
303
  onClick:
@@ -310,7 +310,7 @@
310
310
  layout:
311
311
  size: auto
312
312
  properties:
313
- name: CommentOutlined
313
+ name: AiOutlinedComment
314
314
  size: 24
315
315
  events:
316
316
  onClick:
@@ -348,7 +348,7 @@
348
348
  layout:
349
349
  size: auto
350
350
  properties:
351
- name: GithubOutlined
351
+ name: AiOutlinedGithub
352
352
  size: 24
353
353
  events:
354
354
  onClick:
@@ -361,7 +361,7 @@
361
361
  layout:
362
362
  size: auto
363
363
  properties:
364
- name: YoutubeOutlined
364
+ name: AiOutlinedYoutube
365
365
  size: 24
366
366
  events:
367
367
  onClick:
@@ -474,43 +474,43 @@
474
474
  type: Anchor
475
475
  properties:
476
476
  title: Why Lowdefy
477
- href: https://lowdefy.com
478
- ref: 'noopener'
477
+ url: https://lowdefy.com
478
+ rel: 'noopener'
479
479
  - id: tutorial_anchor
480
480
  type: Anchor
481
481
  properties:
482
482
  title: Quick Start Tutorial
483
- href: /tutorial-development-server
483
+ pageId: tutorial-development-server
484
484
  rel: 'noopener'
485
485
  - id: netlify_anchor
486
486
  type: Anchor
487
487
  properties:
488
488
  title: Deploy to Netlify
489
- href: /tutorial-start
489
+ pageId: tutorial-start
490
490
  rel: 'noopener'
491
491
  - id: concepts_anchor
492
492
  type: Anchor
493
493
  properties:
494
494
  title: How Lowdefy Works
495
- href: /overview
495
+ pageId: overview
496
496
  rel: 'noopener'
497
497
  - id: github_anchor
498
498
  type: Anchor
499
499
  properties:
500
500
  title: Github Repository
501
- href: https://github.com/lowdefy/lowdefy
501
+ url: https://github.com/lowdefy/lowdefy
502
502
  newTab: true
503
503
  - id: changelog_anchor
504
504
  type: Anchor
505
505
  properties:
506
506
  title: Version Changelog
507
- href: https://github.com/lowdefy/lowdefy/blob/main/CHANGELOG.md
507
+ url: https://github.com/lowdefy/lowdefy/blob/main/CHANGELOG.md
508
508
  newTab: true
509
509
  - id: license_anchor
510
510
  type: Anchor
511
511
  properties:
512
512
  title: Apache-2.0 License
513
- href: https://github.com/lowdefy/lowdefy/blob/main/LICENSE
513
+ url: https://github.com/lowdefy/lowdefy/blob/main/LICENSE
514
514
  newTab: true
515
515
  - id: footer_logo_box_sm
516
516
  type: Box
@@ -543,7 +543,7 @@
543
543
  layout:
544
544
  size: auto
545
545
  properties:
546
- name: TwitterOutlined
546
+ name: AiOutlinedTwitter
547
547
  size: 24
548
548
  events:
549
549
  onClick:
@@ -557,7 +557,7 @@
557
557
  layout:
558
558
  size: auto
559
559
  properties:
560
- name: CommentOutlined
560
+ name: AiOutlinedComment
561
561
  size: 24
562
562
  events:
563
563
  onClick:
@@ -571,7 +571,7 @@
571
571
  layout:
572
572
  size: auto
573
573
  properties:
574
- name: GithubOutlined
574
+ name: AiOutlinedGithub
575
575
  size: 24
576
576
  events:
577
577
  onClick:
@@ -585,7 +585,7 @@
585
585
  layout:
586
586
  size: auto
587
587
  properties:
588
- name: YoutubeOutlined
588
+ name: AiOutlinedYoutube
589
589
  size: 24
590
590
  events:
591
591
  onClick:
@@ -44,10 +44,10 @@ events:
44
44
  type: string
45
45
  length: 16
46
46
  onEnterAsync:
47
- - id: connect_docsearch
48
- type: JsAction
47
+ {# - id: connect_docsearch
48
+ type: JsAction # TODO:
49
49
  params:
50
- name: connectDocsearch
50
+ name: connectDocsearch #}
51
51
  - id: post_telemetry
52
52
  type: Request
53
53
  messages:
@@ -121,4 +121,4 @@ areas:
121
121
  layout:
122
122
  contentGutter: 16
123
123
  blocks:
124
- _var: content
124
+ _var: content
@@ -38,5 +38,4 @@ function transformer(pages) {
38
38
  fs.writeFileSync('public/sitemap.xml', sitemap);
39
39
  return pages;
40
40
  }
41
-
42
- module.exports = transformer;
41
+ export default transformer;
@@ -36,7 +36,7 @@
36
36
  style:
37
37
  marginLeft: -22
38
38
  properties:
39
- name: SearchOutlined
39
+ name: AiOutlinedSearch
40
40
  - id: why_button
41
41
  type: Button
42
42
  visible:
@@ -128,7 +128,7 @@
128
128
  properties:
129
129
  title: Star on Github
130
130
  type: text
131
- icon: GithubFilled
131
+ icon: AiFilledGithub
132
132
  size: large
133
133
  events:
134
134
  onClick:
@@ -27,7 +27,7 @@ blocks:
27
27
  properties:
28
28
  block: true
29
29
  hideActionLoading: true
30
- icon: ArrowLeftOutlined
30
+ icon: AiOutlinedArrowLeft
31
31
  size: large
32
32
  title:
33
33
  _var: previous_page_title
@@ -50,7 +50,7 @@ blocks:
50
50
  properties:
51
51
  block: true
52
52
  hideActionLoading: true
53
- icon: ArrowRightOutlined
53
+ icon: AiOutlinedArrowRight
54
54
  size: large
55
55
  title:
56
56
  _var: next_page_title
@@ -37,7 +37,7 @@ function transformer(obj) {
37
37
  type: 'Anchor',
38
38
  properties: {
39
39
  title: `${operatorName}.${method.name}`,
40
- icon: 'LinkOutlined',
40
+ icon: 'AiOutlinedLink',
41
41
  },
42
42
  events: {
43
43
  onClick: [
@@ -116,4 +116,4 @@ function transformer(obj) {
116
116
  return obj.page;
117
117
  }
118
118
 
119
- module.exports = transformer;
119
+ export default transformer;