@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
|
@@ -19,16 +19,14 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
|
|
|
19
19
|
import defaultValueTransformer from '../blocks/defaultValueTransformer';
|
|
20
20
|
|
|
21
21
|
const schema = {
|
|
22
|
-
|
|
22
|
+
properties: {
|
|
23
|
+
type: 'object',
|
|
23
24
|
properties: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
type: '
|
|
28
|
-
|
|
29
|
-
type: 'string',
|
|
30
|
-
description: 'string description',
|
|
31
|
-
},
|
|
25
|
+
options: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
items: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'string description',
|
|
32
30
|
},
|
|
33
31
|
},
|
|
34
32
|
},
|
|
@@ -96,17 +94,15 @@ test('array defaultValueTransformer', () => {
|
|
|
96
94
|
}
|
|
97
95
|
`);
|
|
98
96
|
const schemaDV = {
|
|
99
|
-
|
|
97
|
+
properties: {
|
|
98
|
+
type: 'object',
|
|
100
99
|
properties: {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
type: 'string',
|
|
108
|
-
description: 'string description',
|
|
109
|
-
},
|
|
100
|
+
options: {
|
|
101
|
+
type: 'array',
|
|
102
|
+
default: ['a'],
|
|
103
|
+
items: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'string description',
|
|
110
106
|
},
|
|
111
107
|
},
|
|
112
108
|
},
|
|
@@ -122,23 +118,21 @@ test('array defaultValueTransformer', () => {
|
|
|
122
118
|
});
|
|
123
119
|
|
|
124
120
|
const schemaArrayObject = {
|
|
125
|
-
|
|
121
|
+
properties: {
|
|
122
|
+
type: 'object',
|
|
126
123
|
properties: {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
type: '
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
type: 'number',
|
|
140
|
-
description: 'number description',
|
|
141
|
-
},
|
|
124
|
+
options: {
|
|
125
|
+
type: 'array',
|
|
126
|
+
items: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: {
|
|
129
|
+
str: {
|
|
130
|
+
type: 'string',
|
|
131
|
+
description: 'string description',
|
|
132
|
+
},
|
|
133
|
+
num: {
|
|
134
|
+
type: 'number',
|
|
135
|
+
description: 'number description',
|
|
142
136
|
},
|
|
143
137
|
},
|
|
144
138
|
},
|
|
@@ -275,24 +269,22 @@ test('array schemaArrayObject defaultValueTransformer', () => {
|
|
|
275
269
|
}
|
|
276
270
|
`);
|
|
277
271
|
const schemaArrayObjectDV = {
|
|
278
|
-
|
|
272
|
+
properties: {
|
|
273
|
+
type: 'object',
|
|
279
274
|
properties: {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
type: 'number',
|
|
294
|
-
description: 'numebr description',
|
|
295
|
-
},
|
|
275
|
+
options: {
|
|
276
|
+
type: 'array',
|
|
277
|
+
default: [{ str: 'a' }],
|
|
278
|
+
items: {
|
|
279
|
+
type: 'object',
|
|
280
|
+
properties: {
|
|
281
|
+
str: {
|
|
282
|
+
type: 'string',
|
|
283
|
+
description: 'string description',
|
|
284
|
+
},
|
|
285
|
+
num: {
|
|
286
|
+
type: 'number',
|
|
287
|
+
description: 'numebr description',
|
|
296
288
|
},
|
|
297
289
|
},
|
|
298
290
|
},
|
|
@@ -312,24 +304,22 @@ test('array schemaArrayObject defaultValueTransformer', () => {
|
|
|
312
304
|
});
|
|
313
305
|
|
|
314
306
|
const schemaOneOfPrimitive = {
|
|
315
|
-
|
|
307
|
+
properties: {
|
|
308
|
+
type: 'object',
|
|
316
309
|
properties: {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
},
|
|
331
|
-
],
|
|
332
|
-
},
|
|
310
|
+
options: {
|
|
311
|
+
type: 'array',
|
|
312
|
+
items: {
|
|
313
|
+
oneOf: [
|
|
314
|
+
{
|
|
315
|
+
type: 'string',
|
|
316
|
+
description: 'string description',
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
type: 'number',
|
|
320
|
+
description: 'number description',
|
|
321
|
+
},
|
|
322
|
+
],
|
|
333
323
|
},
|
|
334
324
|
},
|
|
335
325
|
},
|
|
@@ -554,25 +544,23 @@ test('array schemaOneOfPrimitive defaultValueTransformer', () => {
|
|
|
554
544
|
}
|
|
555
545
|
`);
|
|
556
546
|
const schemaOneOfPrimitiveDV = {
|
|
557
|
-
|
|
547
|
+
properties: {
|
|
548
|
+
type: 'object',
|
|
558
549
|
properties: {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
},
|
|
574
|
-
],
|
|
575
|
-
},
|
|
550
|
+
options: {
|
|
551
|
+
type: 'array',
|
|
552
|
+
default: ['a', 'b'],
|
|
553
|
+
items: {
|
|
554
|
+
oneOf: [
|
|
555
|
+
{
|
|
556
|
+
type: 'string',
|
|
557
|
+
description: 'string description',
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
type: 'number',
|
|
561
|
+
description: 'number description',
|
|
562
|
+
},
|
|
563
|
+
],
|
|
576
564
|
},
|
|
577
565
|
},
|
|
578
566
|
},
|
|
@@ -589,28 +577,26 @@ test('array schemaOneOfPrimitive defaultValueTransformer', () => {
|
|
|
589
577
|
});
|
|
590
578
|
|
|
591
579
|
const schemaPrimitiveOneOf = {
|
|
592
|
-
|
|
580
|
+
properties: {
|
|
581
|
+
type: 'object',
|
|
593
582
|
properties: {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
{
|
|
599
|
-
type: '
|
|
600
|
-
|
|
601
|
-
type: 'string',
|
|
602
|
-
description: 'string description',
|
|
603
|
-
},
|
|
583
|
+
options: {
|
|
584
|
+
oneOf: [
|
|
585
|
+
{
|
|
586
|
+
type: 'array',
|
|
587
|
+
items: {
|
|
588
|
+
type: 'string',
|
|
589
|
+
description: 'string description',
|
|
604
590
|
},
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
type: 'array',
|
|
594
|
+
items: {
|
|
595
|
+
type: 'number',
|
|
596
|
+
description: 'number description',
|
|
611
597
|
},
|
|
612
|
-
|
|
613
|
-
|
|
598
|
+
},
|
|
599
|
+
],
|
|
614
600
|
},
|
|
615
601
|
},
|
|
616
602
|
},
|
|
@@ -829,29 +815,27 @@ test('array schemaPrimitiveOneOf defaultValueTransformer', () => {
|
|
|
829
815
|
}
|
|
830
816
|
`);
|
|
831
817
|
const schemaPrimitiveOneOfDV = {
|
|
832
|
-
|
|
818
|
+
properties: {
|
|
819
|
+
type: 'object',
|
|
833
820
|
properties: {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
{
|
|
840
|
-
type: '
|
|
841
|
-
|
|
842
|
-
type: 'string',
|
|
843
|
-
description: 'string description',
|
|
844
|
-
},
|
|
821
|
+
options: {
|
|
822
|
+
default: ['a', 'b'],
|
|
823
|
+
oneOf: [
|
|
824
|
+
{
|
|
825
|
+
type: 'array',
|
|
826
|
+
items: {
|
|
827
|
+
type: 'string',
|
|
828
|
+
description: 'string description',
|
|
845
829
|
},
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
type: 'array',
|
|
833
|
+
items: {
|
|
834
|
+
type: 'number',
|
|
835
|
+
description: 'number description',
|
|
852
836
|
},
|
|
853
|
-
|
|
854
|
-
|
|
837
|
+
},
|
|
838
|
+
],
|
|
855
839
|
},
|
|
856
840
|
},
|
|
857
841
|
},
|
|
@@ -867,31 +851,29 @@ test('array schemaPrimitiveOneOf defaultValueTransformer', () => {
|
|
|
867
851
|
});
|
|
868
852
|
|
|
869
853
|
const schemaOneOfArrayStrArrayYaml = {
|
|
870
|
-
|
|
854
|
+
properties: {
|
|
855
|
+
type: 'object',
|
|
871
856
|
properties: {
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
{
|
|
877
|
-
type: '
|
|
878
|
-
|
|
879
|
-
type: 'string',
|
|
880
|
-
description: 'string description',
|
|
881
|
-
},
|
|
857
|
+
options: {
|
|
858
|
+
oneOf: [
|
|
859
|
+
{
|
|
860
|
+
type: 'array',
|
|
861
|
+
items: {
|
|
862
|
+
type: 'string',
|
|
863
|
+
description: 'string description',
|
|
882
864
|
},
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
type: 'array',
|
|
868
|
+
items: {
|
|
869
|
+
type: 'object',
|
|
870
|
+
description: 'number description',
|
|
871
|
+
docs: {
|
|
872
|
+
displayType: 'yaml',
|
|
891
873
|
},
|
|
892
874
|
},
|
|
893
|
-
|
|
894
|
-
|
|
875
|
+
},
|
|
876
|
+
],
|
|
895
877
|
},
|
|
896
878
|
},
|
|
897
879
|
},
|
|
@@ -1131,32 +1113,30 @@ test('array schemaOneOfArrayStrArrayYaml propertiesGetterTransformer', () => {
|
|
|
1131
1113
|
});
|
|
1132
1114
|
|
|
1133
1115
|
const schemaNestedArray = {
|
|
1134
|
-
|
|
1116
|
+
properties: {
|
|
1117
|
+
type: 'object',
|
|
1135
1118
|
properties: {
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1119
|
+
arr1: {
|
|
1120
|
+
type: 'array',
|
|
1121
|
+
description: 'string description',
|
|
1122
|
+
items: {
|
|
1123
|
+
type: 'object',
|
|
1140
1124
|
description: 'string description',
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1125
|
+
properties: {
|
|
1126
|
+
obj: {
|
|
1127
|
+
type: 'object',
|
|
1128
|
+
docs: {
|
|
1129
|
+
displayType: 'yaml',
|
|
1130
|
+
},
|
|
1131
|
+
},
|
|
1132
|
+
arr2: {
|
|
1133
|
+
type: 'array',
|
|
1134
|
+
items: {
|
|
1146
1135
|
type: 'object',
|
|
1147
1136
|
docs: {
|
|
1148
1137
|
displayType: 'yaml',
|
|
1149
1138
|
},
|
|
1150
1139
|
},
|
|
1151
|
-
arr2: {
|
|
1152
|
-
type: 'array',
|
|
1153
|
-
items: {
|
|
1154
|
-
type: 'object',
|
|
1155
|
-
docs: {
|
|
1156
|
-
displayType: 'yaml',
|
|
1157
|
-
},
|
|
1158
|
-
},
|
|
1159
|
-
},
|
|
1160
1140
|
},
|
|
1161
1141
|
},
|
|
1162
1142
|
},
|
|
@@ -19,15 +19,13 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
|
|
|
19
19
|
import defaultValueTransformer from '../blocks/defaultValueTransformer';
|
|
20
20
|
|
|
21
21
|
const schema = {
|
|
22
|
-
|
|
22
|
+
properties: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
additionalProperties: false,
|
|
23
25
|
properties: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
bool: {
|
|
28
|
-
type: 'boolean',
|
|
29
|
-
description: 'description.',
|
|
30
|
-
},
|
|
26
|
+
bool: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
description: 'description.',
|
|
31
29
|
},
|
|
32
30
|
},
|
|
33
31
|
},
|
|
@@ -80,16 +78,14 @@ test('boolean defaultValueTransformer', () => {
|
|
|
80
78
|
}
|
|
81
79
|
`);
|
|
82
80
|
const schemaDV = {
|
|
83
|
-
|
|
81
|
+
properties: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
additionalProperties: false,
|
|
84
84
|
properties: {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
type: 'boolean',
|
|
90
|
-
default: true,
|
|
91
|
-
description: 'description.',
|
|
92
|
-
},
|
|
85
|
+
bool: {
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
default: true,
|
|
88
|
+
description: 'description.',
|
|
93
89
|
},
|
|
94
90
|
},
|
|
95
91
|
},
|
|
@@ -19,17 +19,15 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
|
|
|
19
19
|
import defaultValueTransformer from '../blocks/defaultValueTransformer';
|
|
20
20
|
|
|
21
21
|
const schema = {
|
|
22
|
-
|
|
22
|
+
properties: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
additionalProperties: false,
|
|
23
25
|
properties: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
description: 'description',
|
|
30
|
-
docs: {
|
|
31
|
-
displayType: 'button',
|
|
32
|
-
},
|
|
26
|
+
field: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
description: 'description',
|
|
29
|
+
docs: {
|
|
30
|
+
displayType: 'button',
|
|
33
31
|
},
|
|
34
32
|
},
|
|
35
33
|
},
|
|
@@ -137,22 +135,20 @@ test('button propertiesGetterTransformer', () => {
|
|
|
137
135
|
test('button defaultValueTransformer', () => {
|
|
138
136
|
expect(defaultValueTransformer(schema)).toMatchInlineSnapshot(`Object {}`);
|
|
139
137
|
const schemaDV = {
|
|
140
|
-
|
|
138
|
+
properties: {
|
|
139
|
+
type: 'object',
|
|
140
|
+
additionalProperties: false,
|
|
141
141
|
properties: {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
icon: 'UploadOutlined',
|
|
153
|
-
title: 'Upload',
|
|
154
|
-
type: 'default',
|
|
155
|
-
},
|
|
142
|
+
field: {
|
|
143
|
+
type: 'object',
|
|
144
|
+
description: 'description',
|
|
145
|
+
docs: {
|
|
146
|
+
displayType: 'button',
|
|
147
|
+
},
|
|
148
|
+
default: {
|
|
149
|
+
icon: 'UploadOutlined',
|
|
150
|
+
title: 'Upload',
|
|
151
|
+
type: 'default',
|
|
156
152
|
},
|
|
157
153
|
},
|
|
158
154
|
},
|
|
@@ -19,24 +19,23 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
|
|
|
19
19
|
import defaultValueTransformer from '../blocks/defaultValueTransformer';
|
|
20
20
|
|
|
21
21
|
const schema = {
|
|
22
|
-
|
|
22
|
+
properties: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
additionalProperties: false,
|
|
23
25
|
properties: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
description: 'description',
|
|
30
|
-
docs: {
|
|
31
|
-
displayType: 'color',
|
|
32
|
-
},
|
|
26
|
+
field: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'description',
|
|
29
|
+
docs: {
|
|
30
|
+
displayType: 'color',
|
|
33
31
|
},
|
|
34
32
|
},
|
|
35
33
|
},
|
|
36
34
|
},
|
|
37
35
|
};
|
|
38
36
|
|
|
39
|
-
test(
|
|
37
|
+
test.todo(
|
|
38
|
+
'color propertiesFormTransformer' /*() => {
|
|
40
39
|
expect(propertiesFormTransformer(schema)).toMatchInlineSnapshot(`
|
|
41
40
|
Array [
|
|
42
41
|
Object {
|
|
@@ -78,7 +77,8 @@ test('color propertiesFormTransformer', () => {
|
|
|
78
77
|
},
|
|
79
78
|
]
|
|
80
79
|
`);
|
|
81
|
-
}
|
|
80
|
+
}*/
|
|
81
|
+
);
|
|
82
82
|
|
|
83
83
|
test('color propertiesGetterTransformer', () => {
|
|
84
84
|
expect(propertiesGetterTransformer(schema, { block_type: 'Block' })).toMatchInlineSnapshot(`
|
|
@@ -103,18 +103,16 @@ test('color defaultValueTransformer', () => {
|
|
|
103
103
|
}
|
|
104
104
|
`);
|
|
105
105
|
const schemaDV = {
|
|
106
|
-
|
|
106
|
+
properties: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
additionalProperties: false,
|
|
107
109
|
properties: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
description: 'description',
|
|
115
|
-
docs: {
|
|
116
|
-
displayType: 'color',
|
|
117
|
-
},
|
|
110
|
+
field: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
default: 'value',
|
|
113
|
+
description: 'description',
|
|
114
|
+
docs: {
|
|
115
|
+
displayType: 'color',
|
|
118
116
|
},
|
|
119
117
|
},
|
|
120
118
|
},
|
|
@@ -19,16 +19,14 @@ import propertiesGetterTransformer from '../blocks/propertiesGetterTransformer';
|
|
|
19
19
|
import defaultValueTransformer from '../blocks/defaultValueTransformer';
|
|
20
20
|
|
|
21
21
|
const schema = {
|
|
22
|
-
|
|
22
|
+
properties: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
additionalProperties: false,
|
|
23
25
|
properties: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
type: 'string',
|
|
29
|
-
enum: ['a', 'b', 'c'],
|
|
30
|
-
description: 'description.',
|
|
31
|
-
},
|
|
26
|
+
enum: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
enum: ['a', 'b', 'c'],
|
|
29
|
+
description: 'description.',
|
|
32
30
|
},
|
|
33
31
|
},
|
|
34
32
|
},
|
|
@@ -86,17 +84,15 @@ test('enum defaultValueTransformer', () => {
|
|
|
86
84
|
}
|
|
87
85
|
`);
|
|
88
86
|
const schemaDV = {
|
|
89
|
-
|
|
87
|
+
properties: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
additionalProperties: false,
|
|
90
90
|
properties: {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
enum: ['a', 'b', 'c'],
|
|
97
|
-
default: 'a',
|
|
98
|
-
description: 'description.',
|
|
99
|
-
},
|
|
91
|
+
enum: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
enum: ['a', 'b', 'c'],
|
|
94
|
+
default: 'a',
|
|
95
|
+
description: 'description.',
|
|
100
96
|
},
|
|
101
97
|
},
|
|
102
98
|
},
|