@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
@@ -19,17 +19,15 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
19
19
  import defaultValueTransformer from '../blocks/defaultValueTransformer';
20
20
 
21
21
  const schema = {
22
- schema: {
22
+ properties: {
23
+ type: 'object',
24
+ additionalProperties: false,
23
25
  properties: {
24
- type: 'object',
25
- additionalProperties: false,
26
- properties: {
27
- field: {
28
- type: ['string', 'object'],
29
- description: 'description',
30
- docs: {
31
- displayType: 'icon',
32
- },
26
+ field: {
27
+ type: ['string', 'object'],
28
+ description: 'description',
29
+ docs: {
30
+ displayType: 'icon',
33
31
  },
34
32
  },
35
33
  },
@@ -88,18 +86,16 @@ test('icon defaultValueTransformer', () => {
88
86
  }
89
87
  `);
90
88
  const schemaDV = {
91
- schema: {
89
+ properties: {
90
+ type: 'object',
91
+ additionalProperties: false,
92
92
  properties: {
93
- type: 'object',
94
- additionalProperties: false,
95
- properties: {
96
- field: {
97
- type: ['string', 'object'],
98
- default: 'value',
99
- description: 'description',
100
- docs: {
101
- displayType: 'icon',
102
- },
93
+ field: {
94
+ type: ['string', 'object'],
95
+ default: 'value',
96
+ description: 'description',
97
+ docs: {
98
+ displayType: 'icon',
103
99
  },
104
100
  },
105
101
  },
@@ -19,15 +19,13 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
19
19
  import defaultValueTransformer from '../blocks/defaultValueTransformer';
20
20
 
21
21
  const schema = {
22
- schema: {
22
+ properties: {
23
+ type: 'object',
24
+ additionalProperties: false,
23
25
  properties: {
24
- type: 'object',
25
- additionalProperties: false,
26
- properties: {
27
- num: {
28
- type: 'integer',
29
- description: 'description.',
30
- },
26
+ num: {
27
+ type: 'integer',
28
+ description: 'description.',
31
29
  },
32
30
  },
33
31
  },
@@ -81,16 +79,14 @@ test('integer defaultValueTransformer', () => {
81
79
  }
82
80
  `);
83
81
  const schemaDV = {
84
- schema: {
82
+ properties: {
83
+ type: 'object',
84
+ additionalProperties: false,
85
85
  properties: {
86
- type: 'object',
87
- additionalProperties: false,
88
- properties: {
89
- num: {
90
- type: 'integer',
91
- default: 1,
92
- description: 'description.',
93
- },
86
+ num: {
87
+ type: 'integer',
88
+ default: 1,
89
+ description: 'description.',
94
90
  },
95
91
  },
96
92
  },
@@ -19,23 +19,21 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
19
19
  import defaultValueTransformer from '../blocks/defaultValueTransformer';
20
20
 
21
21
  const schema = {
22
- schema: {
22
+ properties: {
23
+ type: 'object',
24
+ additionalProperties: false,
23
25
  properties: {
24
- type: 'object',
25
- additionalProperties: false,
26
- properties: {
27
- field: {
28
- type: 'object',
29
- description: 'description',
30
- docs: {
31
- displayType: 'manual',
32
- block: {
33
- id: 'manual',
34
- type: 'TestInput',
35
- },
36
- getter: {
37
- a: 1,
38
- },
26
+ field: {
27
+ type: 'object',
28
+ description: 'description',
29
+ docs: {
30
+ displayType: 'manual',
31
+ block: {
32
+ id: 'manual',
33
+ type: 'TestInput',
34
+ },
35
+ getter: {
36
+ a: 1,
39
37
  },
40
38
  },
41
39
  },
@@ -78,24 +76,22 @@ test('manual propertiesGetterTransformer', () => {
78
76
  test('manual defaultValueTransformer', () => {
79
77
  expect(defaultValueTransformer(schema)).toMatchInlineSnapshot(`Object {}`);
80
78
  const schemaDV = {
81
- schema: {
79
+ properties: {
80
+ type: 'object',
81
+ additionalProperties: false,
82
82
  properties: {
83
- type: 'object',
84
- additionalProperties: false,
85
- properties: {
86
- field: {
87
- type: 'object',
88
- default: 'value',
89
- description: 'description',
90
- docs: {
91
- displayType: 'manual',
92
- block: {
93
- id: 'manual',
94
- type: 'TestInput',
95
- },
96
- getter: {
97
- a: 1,
98
- },
83
+ field: {
84
+ type: 'object',
85
+ default: 'value',
86
+ description: 'description',
87
+ docs: {
88
+ displayType: 'manual',
89
+ block: {
90
+ id: 'manual',
91
+ type: 'TestInput',
92
+ },
93
+ getter: {
94
+ a: 1,
99
95
  },
100
96
  },
101
97
  },
@@ -110,27 +106,25 @@ test('manual defaultValueTransformer', () => {
110
106
  });
111
107
 
112
108
  const schemaNested = {
113
- schema: {
109
+ properties: {
110
+ type: 'object',
111
+ additionalProperties: false,
114
112
  properties: {
115
- type: 'object',
116
- additionalProperties: false,
117
- properties: {
118
- obj: {
119
- type: 'object',
120
- description: 'obj description',
121
- properties: {
122
- field: {
123
- type: 'object',
124
- description: 'field description',
125
- docs: {
126
- displayType: 'manual',
127
- block: {
128
- id: 'manual',
129
- type: 'TestInput',
130
- },
131
- getter: {
132
- a: 1,
133
- },
113
+ obj: {
114
+ type: 'object',
115
+ description: 'obj description',
116
+ properties: {
117
+ field: {
118
+ type: 'object',
119
+ description: 'field description',
120
+ docs: {
121
+ displayType: 'manual',
122
+ block: {
123
+ id: 'manual',
124
+ type: 'TestInput',
125
+ },
126
+ getter: {
127
+ a: 1,
134
128
  },
135
129
  },
136
130
  },
@@ -204,28 +198,26 @@ test('manual schemaNested propertiesGetterTransformer', () => {
204
198
  test('manual schemaNested defaultValueTransformer', () => {
205
199
  expect(defaultValueTransformer(schemaNested)).toMatchInlineSnapshot(`Object {}`);
206
200
  const schemaDV = {
207
- schema: {
201
+ properties: {
202
+ type: 'object',
203
+ additionalProperties: false,
208
204
  properties: {
209
- type: 'object',
210
- additionalProperties: false,
211
- properties: {
212
- obj: {
213
- type: 'object',
214
- description: 'obj description',
215
- properties: {
216
- field: {
217
- type: 'object',
218
- default: { a: 1 },
219
- description: 'field description',
220
- docs: {
221
- displayType: 'manual',
222
- block: {
223
- id: 'manual',
224
- type: 'TestInput',
225
- },
226
- getter: {
227
- a: 1,
228
- },
205
+ obj: {
206
+ type: 'object',
207
+ description: 'obj description',
208
+ properties: {
209
+ field: {
210
+ type: 'object',
211
+ default: { a: 1 },
212
+ description: 'field description',
213
+ docs: {
214
+ displayType: 'manual',
215
+ block: {
216
+ id: 'manual',
217
+ type: 'TestInput',
218
+ },
219
+ getter: {
220
+ a: 1,
229
221
  },
230
222
  },
231
223
  },
@@ -19,15 +19,13 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
19
19
  import defaultValueTransformer from '../blocks/defaultValueTransformer';
20
20
 
21
21
  const schema = {
22
- schema: {
22
+ properties: {
23
+ type: 'object',
24
+ additionalProperties: false,
23
25
  properties: {
24
- type: 'object',
25
- additionalProperties: false,
26
- properties: {
27
- num: {
28
- type: 'number',
29
- description: 'description.',
30
- },
26
+ num: {
27
+ type: 'number',
28
+ description: 'description.',
31
29
  },
32
30
  },
33
31
  },
@@ -81,16 +79,14 @@ test('number defaultValueTransformer', () => {
81
79
  }
82
80
  `);
83
81
  const schemaDV = {
84
- schema: {
82
+ properties: {
83
+ type: 'object',
84
+ additionalProperties: false,
85
85
  properties: {
86
- type: 'object',
87
- additionalProperties: false,
88
- properties: {
89
- num: {
90
- type: 'number',
91
- default: 1,
92
- description: 'description.',
93
- },
86
+ num: {
87
+ type: 'number',
88
+ default: 1,
89
+ description: 'description.',
94
90
  },
95
91
  },
96
92
  },
@@ -19,23 +19,21 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
19
19
  import defaultValueTransformer from '../blocks/defaultValueTransformer';
20
20
 
21
21
  const schema = {
22
- schema: {
22
+ properties: {
23
+ type: 'object',
24
+ additionalProperties: false,
23
25
  properties: {
24
- type: 'object',
25
- additionalProperties: false,
26
- properties: {
27
- field: {
28
- type: 'object',
29
- description: 'description',
30
- properties: {
31
- str: {
32
- type: 'string',
33
- description: 'str description',
34
- },
35
- num: {
36
- type: 'number',
37
- description: 'num description',
38
- },
26
+ field: {
27
+ type: 'object',
28
+ description: 'description',
29
+ properties: {
30
+ str: {
31
+ type: 'string',
32
+ description: 'str description',
33
+ },
34
+ num: {
35
+ type: 'number',
36
+ description: 'num description',
39
37
  },
40
38
  },
41
39
  },
@@ -140,26 +138,24 @@ test('object defaultValueTransformer', () => {
140
138
  }
141
139
  `);
142
140
  const schemaDV = {
143
- schema: {
141
+ properties: {
142
+ type: 'object',
143
+ additionalProperties: false,
144
144
  properties: {
145
- type: 'object',
146
- additionalProperties: false,
147
- properties: {
148
- field: {
149
- type: 'object',
150
- default: {
151
- num: 1,
145
+ field: {
146
+ type: 'object',
147
+ default: {
148
+ num: 1,
149
+ },
150
+ description: 'description',
151
+ properties: {
152
+ str: {
153
+ type: 'string',
154
+ description: 'str description',
152
155
  },
153
- description: 'description',
154
- properties: {
155
- str: {
156
- type: 'string',
157
- description: 'str description',
158
- },
159
- num: {
160
- type: 'number',
161
- description: 'num description',
162
- },
156
+ num: {
157
+ type: 'number',
158
+ description: 'num description',
163
159
  },
164
160
  },
165
161
  },
@@ -177,39 +173,37 @@ test('object defaultValueTransformer', () => {
177
173
  });
178
174
 
179
175
  const schemaNested = {
180
- schema: {
176
+ properties: {
177
+ type: 'object',
178
+ additionalProperties: false,
181
179
  properties: {
182
- type: 'object',
183
- additionalProperties: false,
184
- properties: {
185
- field: {
186
- type: 'object',
187
- default: {
188
- num: 1,
180
+ field: {
181
+ type: 'object',
182
+ default: {
183
+ num: 1,
184
+ },
185
+ description: 'description',
186
+ properties: {
187
+ str: {
188
+ type: 'string',
189
+ description: 'str description',
189
190
  },
190
- description: 'description',
191
- properties: {
192
- str: {
193
- type: 'string',
194
- description: 'str description',
195
- },
196
- num: {
197
- type: 'number',
198
- description: 'num description',
199
- },
200
- bool: {
201
- type: 'boolean',
202
- default: true,
203
- description: 'bool description',
204
- },
205
- obj: {
206
- type: 'object',
207
- description: 'obj description',
208
- properties: {
209
- str: {
210
- type: 'string',
211
- description: 'obj.str description',
212
- },
191
+ num: {
192
+ type: 'number',
193
+ description: 'num description',
194
+ },
195
+ bool: {
196
+ type: 'boolean',
197
+ default: true,
198
+ description: 'bool description',
199
+ },
200
+ obj: {
201
+ type: 'object',
202
+ description: 'obj description',
203
+ properties: {
204
+ str: {
205
+ type: 'string',
206
+ description: 'obj.str description',
213
207
  },
214
208
  },
215
209
  },
@@ -383,42 +377,40 @@ test('object schemaNested defaultValueTransformer', () => {
383
377
  }
384
378
  `);
385
379
  const schemaDVNested = {
386
- schema: {
380
+ properties: {
381
+ type: 'object',
382
+ additionalProperties: false,
387
383
  properties: {
388
- type: 'object',
389
- additionalProperties: false,
390
- properties: {
391
- field: {
392
- type: 'object',
393
- default: {
394
- num: 1,
384
+ field: {
385
+ type: 'object',
386
+ default: {
387
+ num: 1,
388
+ },
389
+ description: 'description',
390
+ properties: {
391
+ str: {
392
+ type: 'string',
393
+ description: 'str description',
395
394
  },
396
- description: 'description',
397
- properties: {
398
- str: {
399
- type: 'string',
400
- description: 'str description',
401
- },
402
- num: {
403
- type: 'number',
404
- description: 'num description',
405
- },
406
- bool: {
407
- type: 'boolean',
408
- default: true,
409
- description: 'bool description',
395
+ num: {
396
+ type: 'number',
397
+ description: 'num description',
398
+ },
399
+ bool: {
400
+ type: 'boolean',
401
+ default: true,
402
+ description: 'bool description',
403
+ },
404
+ obj: {
405
+ type: 'object',
406
+ default: {
407
+ str: 'a',
410
408
  },
411
- obj: {
412
- type: 'object',
413
- default: {
414
- str: 'a',
415
- },
416
- description: 'obj description',
417
- properties: {
418
- str: {
419
- type: 'string',
420
- description: 'obj.str description',
421
- },
409
+ description: 'obj description',
410
+ properties: {
411
+ str: {
412
+ type: 'string',
413
+ description: 'obj.str description',
422
414
  },
423
415
  },
424
416
  },