@atlaskit/adf-schema 36.12.0 → 36.12.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 +13 -0
- package/dist/cjs/next-schema/full-schema.adf.js +1 -1
- package/dist/cjs/next-schema/nodes/blockCard.js +5 -5
- package/dist/cjs/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/cjs/next-schema/nodes/codeBlock.js +2 -1
- package/dist/cjs/next-schema/nodes/extension.js +2 -2
- package/dist/cjs/next-schema/nodes/inlineCard.js +0 -2
- package/dist/cjs/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/cjs/next-schema/nodes/list.js +2 -1
- package/dist/cjs/next-schema/nodes/media.js +11 -11
- package/dist/cjs/next-schema/nodes/mediaInline.js +2 -1
- package/dist/cjs/next-schema/nodes/mediaSingle.js +8 -9
- package/dist/cjs/next-schema/nodes/table.js +3 -1
- package/dist/cjs/next-schema/nodes/tableRow.js +1 -1
- package/dist/es2019/next-schema/full-schema.adf.js +2 -2
- package/dist/es2019/next-schema/nodes/blockCard.js +5 -5
- package/dist/es2019/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/es2019/next-schema/nodes/codeBlock.js +2 -1
- package/dist/es2019/next-schema/nodes/extension.js +2 -2
- package/dist/es2019/next-schema/nodes/inlineCard.js +0 -2
- package/dist/es2019/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/es2019/next-schema/nodes/list.js +2 -1
- package/dist/es2019/next-schema/nodes/media.js +11 -11
- package/dist/es2019/next-schema/nodes/mediaInline.js +2 -1
- package/dist/es2019/next-schema/nodes/mediaSingle.js +8 -9
- package/dist/es2019/next-schema/nodes/table.js +3 -1
- package/dist/es2019/next-schema/nodes/tableRow.js +2 -2
- package/dist/esm/next-schema/full-schema.adf.js +2 -2
- package/dist/esm/next-schema/nodes/blockCard.js +5 -5
- package/dist/esm/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/esm/next-schema/nodes/codeBlock.js +2 -1
- package/dist/esm/next-schema/nodes/extension.js +2 -2
- package/dist/esm/next-schema/nodes/inlineCard.js +0 -2
- package/dist/esm/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/esm/next-schema/nodes/list.js +2 -1
- package/dist/esm/next-schema/nodes/media.js +11 -11
- package/dist/esm/next-schema/nodes/mediaInline.js +2 -1
- package/dist/esm/next-schema/nodes/mediaSingle.js +8 -9
- package/dist/esm/next-schema/nodes/table.js +3 -1
- package/dist/esm/next-schema/nodes/tableRow.js +2 -2
- package/dist/types/next-schema/full-schema.adf.d.ts +1 -0
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +4 -0
- package/dist/types/next-schema/nodes/blockCard.d.ts +1 -0
- package/dist/types/next-schema/nodes/blockquote.d.ts +1 -0
- package/dist/types/next-schema/nodes/bodiedExtension.d.ts +1 -0
- package/dist/types/next-schema/nodes/caption.d.ts +1 -0
- package/dist/types/next-schema/nodes/codeBlock.d.ts +2 -0
- package/dist/types/next-schema/nodes/date.d.ts +1 -0
- package/dist/types/next-schema/nodes/decisionItem.d.ts +1 -0
- package/dist/types/next-schema/nodes/decisionList.d.ts +1 -0
- package/dist/types/next-schema/nodes/embedCard.d.ts +1 -0
- package/dist/types/next-schema/nodes/emoji.d.ts +1 -0
- package/dist/types/next-schema/nodes/expand.d.ts +1 -0
- package/dist/types/next-schema/nodes/extension.d.ts +1 -0
- package/dist/types/next-schema/nodes/extensionFrame.d.ts +1 -0
- package/dist/types/next-schema/nodes/hardBreak.d.ts +1 -0
- package/dist/types/next-schema/nodes/heading.d.ts +2 -0
- package/dist/types/next-schema/nodes/inlineCard.d.ts +1 -0
- package/dist/types/next-schema/nodes/inlineExtension.d.ts +1 -0
- package/dist/types/next-schema/nodes/layoutColumn.d.ts +1 -0
- package/dist/types/next-schema/nodes/layoutSection.d.ts +1 -0
- package/dist/types/next-schema/nodes/list.d.ts +2 -0
- package/dist/types/next-schema/nodes/media.d.ts +1 -0
- package/dist/types/next-schema/nodes/mediaGroup.d.ts +1 -0
- package/dist/types/next-schema/nodes/mediaInline.d.ts +1 -0
- package/dist/types/next-schema/nodes/mediaSingle.d.ts +1 -0
- package/dist/types/next-schema/nodes/mention.d.ts +1 -0
- package/dist/types/next-schema/nodes/multiBodiedExtension.d.ts +1 -0
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +1 -0
- package/dist/types/next-schema/nodes/panel.d.ts +1 -0
- package/dist/types/next-schema/nodes/paragraph.d.ts +1 -0
- package/dist/types/next-schema/nodes/placeholder.d.ts +1 -0
- package/dist/types/next-schema/nodes/rule.d.ts +1 -0
- package/dist/types/next-schema/nodes/status.d.ts +1 -0
- package/dist/types/next-schema/nodes/table.d.ts +1 -0
- package/dist/types/next-schema/nodes/tableCell.d.ts +1 -0
- package/dist/types/next-schema/nodes/tableHeader.d.ts +1 -0
- package/dist/types/next-schema/nodes/tableRow.d.ts +1 -0
- package/dist/types/next-schema/nodes/task.d.ts +2 -0
- package/dist/types/next-schema/nodes/text.d.ts +1 -0
- package/package.json +5 -4
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +86 -44
- package/schema-generators/__tests__/unit/jqueries.md +13 -0
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +103 -0
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 36.12.2
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 94ea518: Move codemods and json-schema-generator to devdeps
|
8
|
+
- 5ba2c7d: updated buildAttrs to clean up objects, added extra test coverage
|
9
|
+
|
10
|
+
## 36.12.1
|
11
|
+
|
12
|
+
### Patch Changes
|
13
|
+
|
14
|
+
- d589477: Add required field to nodes and marks for JSON Schema transformer from ADF DSL
|
15
|
+
|
3
16
|
## 36.12.0
|
4
17
|
|
5
18
|
### Minor Changes
|
@@ -13,6 +13,6 @@ var _paragraph = require("./nodes/paragraph");
|
|
13
13
|
var doc = (0, _adfSchemaGenerator.adfNode)('doc').define({
|
14
14
|
root: true,
|
15
15
|
version: 1,
|
16
|
-
content: [(0, _adfSchemaGenerator.$
|
16
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _layoutSection.layoutSection, _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup, _nestedExpand.nestedExpand, _paragraph.paragraph))]
|
17
17
|
});
|
18
18
|
var _default = exports.default = doc;
|
@@ -16,7 +16,6 @@ var blockCard = exports.blockCard = (0, _adfSchemaGenerator.adfNode)('blockCard'
|
|
16
16
|
},
|
17
17
|
datasource: {
|
18
18
|
type: 'object',
|
19
|
-
optional: true,
|
20
19
|
properties: {
|
21
20
|
id: {
|
22
21
|
type: 'string'
|
@@ -32,12 +31,14 @@ var blockCard = exports.blockCard = (0, _adfSchemaGenerator.adfNode)('blockCard'
|
|
32
31
|
type: 'string'
|
33
32
|
}
|
34
33
|
},
|
34
|
+
required: ['type'],
|
35
35
|
type: 'object'
|
36
36
|
},
|
37
37
|
minItems: 1,
|
38
38
|
type: 'array'
|
39
39
|
}
|
40
|
-
}
|
40
|
+
},
|
41
|
+
required: ['id', 'parameters', 'views']
|
41
42
|
},
|
42
43
|
width: {
|
43
44
|
type: 'number',
|
@@ -50,12 +51,11 @@ var blockCard = exports.blockCard = (0, _adfSchemaGenerator.adfNode)('blockCard'
|
|
50
51
|
}
|
51
52
|
}, {
|
52
53
|
url: {
|
53
|
-
type: 'string'
|
54
|
-
optional: true
|
54
|
+
type: 'string'
|
55
55
|
}
|
56
56
|
}, {
|
57
57
|
data: {
|
58
|
-
|
58
|
+
default: null
|
59
59
|
}
|
60
60
|
}]
|
61
61
|
}
|
@@ -15,12 +15,12 @@ var bodiedExtension = exports.bodiedExtension = (0, _adfSchemaGenerator.adfNode)
|
|
15
15
|
selectable: true,
|
16
16
|
isolating: true,
|
17
17
|
attrs: {
|
18
|
-
|
18
|
+
extensionKey: {
|
19
19
|
minLength: 1,
|
20
20
|
type: 'string',
|
21
21
|
default: ''
|
22
22
|
},
|
23
|
-
|
23
|
+
extensionType: {
|
24
24
|
minLength: 1,
|
25
25
|
type: 'string',
|
26
26
|
default: ''
|
@@ -13,7 +13,8 @@ var codeBlock = exports.codeBlock = (0, _adfSchemaGenerator.adfNode)('codeBlock'
|
|
13
13
|
attrs: {
|
14
14
|
language: {
|
15
15
|
type: 'string',
|
16
|
-
default: null
|
16
|
+
default: null,
|
17
|
+
optional: true
|
17
18
|
}
|
18
19
|
},
|
19
20
|
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_text.text))]
|
@@ -11,12 +11,12 @@ var extension = exports.extension = (0, _adfSchemaGenerator.adfNode)('extension'
|
|
11
11
|
atom: true,
|
12
12
|
selectable: true,
|
13
13
|
attrs: {
|
14
|
-
|
14
|
+
extensionKey: {
|
15
15
|
minLength: 1,
|
16
16
|
type: 'string',
|
17
17
|
default: ''
|
18
18
|
},
|
19
|
-
|
19
|
+
extensionType: {
|
20
20
|
minLength: 1,
|
21
21
|
type: 'string',
|
22
22
|
default: ''
|
@@ -9,12 +9,12 @@ var inlineExtension = exports.inlineExtension = (0, _adfSchemaGenerator.adfNode)
|
|
9
9
|
inline: true,
|
10
10
|
selectable: true,
|
11
11
|
attrs: {
|
12
|
-
|
12
|
+
extensionKey: {
|
13
13
|
minLength: 1,
|
14
14
|
type: 'string',
|
15
15
|
default: ''
|
16
16
|
},
|
17
|
-
|
17
|
+
extensionType: {
|
18
18
|
minLength: 1,
|
19
19
|
type: 'string',
|
20
20
|
default: ''
|
@@ -18,6 +18,11 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
|
|
18
18
|
values: ['link', 'file'],
|
19
19
|
default: 'file'
|
20
20
|
},
|
21
|
+
id: {
|
22
|
+
minLength: 1,
|
23
|
+
type: 'string',
|
24
|
+
default: ''
|
25
|
+
},
|
21
26
|
alt: {
|
22
27
|
type: 'string',
|
23
28
|
default: '',
|
@@ -27,11 +32,6 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
|
|
27
32
|
type: 'string',
|
28
33
|
default: ''
|
29
34
|
},
|
30
|
-
id: {
|
31
|
-
minLength: 1,
|
32
|
-
type: 'string',
|
33
|
-
default: ''
|
34
|
-
},
|
35
35
|
height: {
|
36
36
|
type: 'number',
|
37
37
|
default: null,
|
@@ -84,6 +84,11 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
|
|
84
84
|
optional: true
|
85
85
|
}
|
86
86
|
}, {
|
87
|
+
type: {
|
88
|
+
type: 'enum',
|
89
|
+
values: ['external'],
|
90
|
+
default: 'file'
|
91
|
+
},
|
87
92
|
alt: {
|
88
93
|
type: 'string',
|
89
94
|
default: '',
|
@@ -102,12 +107,7 @@ var media = exports.media = (0, _adfSchemaGenerator.adfNode)('media').define({
|
|
102
107
|
url: {
|
103
108
|
type: 'string',
|
104
109
|
default: null,
|
105
|
-
optional:
|
106
|
-
},
|
107
|
-
type: {
|
108
|
-
type: 'enum',
|
109
|
-
values: ['external'],
|
110
|
-
default: 'file'
|
110
|
+
optional: false
|
111
111
|
}
|
112
112
|
}]
|
113
113
|
}
|
@@ -23,7 +23,8 @@ var mediaSingle = exports.mediaSingle = (0, _adfSchemaGenerator.adfNode)('mediaS
|
|
23
23
|
},
|
24
24
|
layout: {
|
25
25
|
type: 'enum',
|
26
|
-
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start']
|
26
|
+
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
|
27
|
+
default: 'center'
|
27
28
|
},
|
28
29
|
widthType: {
|
29
30
|
type: 'enum',
|
@@ -35,19 +36,17 @@ var mediaSingle = exports.mediaSingle = (0, _adfSchemaGenerator.adfNode)('mediaS
|
|
35
36
|
width: {
|
36
37
|
type: 'number',
|
37
38
|
minimum: 0,
|
38
|
-
default: null
|
39
|
-
|
39
|
+
default: null
|
40
|
+
},
|
41
|
+
widthType: {
|
42
|
+
type: 'enum',
|
43
|
+
values: ['pixel'],
|
44
|
+
default: 'pixel'
|
40
45
|
},
|
41
46
|
layout: {
|
42
47
|
type: 'enum',
|
43
48
|
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
|
44
49
|
default: 'center'
|
45
|
-
},
|
46
|
-
widthType: {
|
47
|
-
type: 'enum',
|
48
|
-
values: ['pixel'],
|
49
|
-
default: 'pixel',
|
50
|
-
optional: true
|
51
50
|
}
|
52
51
|
}]
|
53
52
|
}
|
@@ -14,7 +14,9 @@ var table = exports.table = (0, _adfSchemaGenerator.adfNode)('table').define({
|
|
14
14
|
attrs: {
|
15
15
|
displayMode: {
|
16
16
|
type: 'enum',
|
17
|
-
values: ['default', 'fixed']
|
17
|
+
values: ['default', 'fixed'],
|
18
|
+
default: 'default',
|
19
|
+
optional: true
|
18
20
|
},
|
19
21
|
isNumberColumnEnabled: {
|
20
22
|
type: 'boolean',
|
@@ -9,5 +9,5 @@ var _tableCell = require("./tableCell");
|
|
9
9
|
var _tableHeader = require("./tableHeader");
|
10
10
|
var tableRow = exports.tableRow = (0, _adfSchemaGenerator.adfNode)('tableRow').define({
|
11
11
|
selectable: false,
|
12
|
-
content: [(0, _adfSchemaGenerator.$
|
12
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_tableCell.tableCell, _tableHeader.tableHeader))]
|
13
13
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { $or, $
|
1
|
+
import { $or, $onePlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { blockGroup } from './groups/blockGroup';
|
3
3
|
import { layoutSection } from './nodes/layoutSection';
|
4
4
|
import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
|
@@ -7,6 +7,6 @@ import { paragraph } from './nodes/paragraph';
|
|
7
7
|
const doc = adfNode('doc').define({
|
8
8
|
root: true,
|
9
9
|
version: 1,
|
10
|
-
content: [$
|
10
|
+
content: [$onePlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup, nestedExpand, paragraph))]
|
11
11
|
});
|
12
12
|
export default doc;
|
@@ -10,7 +10,6 @@ export const blockCard = adfNode('blockCard').define({
|
|
10
10
|
},
|
11
11
|
datasource: {
|
12
12
|
type: 'object',
|
13
|
-
optional: true,
|
14
13
|
properties: {
|
15
14
|
id: {
|
16
15
|
type: 'string'
|
@@ -26,12 +25,14 @@ export const blockCard = adfNode('blockCard').define({
|
|
26
25
|
type: 'string'
|
27
26
|
}
|
28
27
|
},
|
28
|
+
required: ['type'],
|
29
29
|
type: 'object'
|
30
30
|
},
|
31
31
|
minItems: 1,
|
32
32
|
type: 'array'
|
33
33
|
}
|
34
|
-
}
|
34
|
+
},
|
35
|
+
required: ['id', 'parameters', 'views']
|
35
36
|
},
|
36
37
|
width: {
|
37
38
|
type: 'number',
|
@@ -44,12 +45,11 @@ export const blockCard = adfNode('blockCard').define({
|
|
44
45
|
}
|
45
46
|
}, {
|
46
47
|
url: {
|
47
|
-
type: 'string'
|
48
|
-
optional: true
|
48
|
+
type: 'string'
|
49
49
|
}
|
50
50
|
}, {
|
51
51
|
data: {
|
52
|
-
|
52
|
+
default: null
|
53
53
|
}
|
54
54
|
}]
|
55
55
|
}
|
@@ -7,12 +7,12 @@ export const bodiedExtension = adfNode('bodiedExtension').define({
|
|
7
7
|
selectable: true,
|
8
8
|
isolating: true,
|
9
9
|
attrs: {
|
10
|
-
|
10
|
+
extensionKey: {
|
11
11
|
minLength: 1,
|
12
12
|
type: 'string',
|
13
13
|
default: ''
|
14
14
|
},
|
15
|
-
|
15
|
+
extensionType: {
|
16
16
|
minLength: 1,
|
17
17
|
type: 'string',
|
18
18
|
default: ''
|
@@ -5,12 +5,12 @@ export const extension = adfNode('extension').define({
|
|
5
5
|
atom: true,
|
6
6
|
selectable: true,
|
7
7
|
attrs: {
|
8
|
-
|
8
|
+
extensionKey: {
|
9
9
|
minLength: 1,
|
10
10
|
type: 'string',
|
11
11
|
default: ''
|
12
12
|
},
|
13
|
-
|
13
|
+
extensionType: {
|
14
14
|
minLength: 1,
|
15
15
|
type: 'string',
|
16
16
|
default: ''
|
@@ -3,12 +3,12 @@ export const inlineExtension = adfNode('inlineExtension').define({
|
|
3
3
|
inline: true,
|
4
4
|
selectable: true,
|
5
5
|
attrs: {
|
6
|
-
|
6
|
+
extensionKey: {
|
7
7
|
minLength: 1,
|
8
8
|
type: 'string',
|
9
9
|
default: ''
|
10
10
|
},
|
11
|
-
|
11
|
+
extensionType: {
|
12
12
|
minLength: 1,
|
13
13
|
type: 'string',
|
14
14
|
default: ''
|
@@ -12,6 +12,11 @@ export const media = adfNode('media').define({
|
|
12
12
|
values: ['link', 'file'],
|
13
13
|
default: 'file'
|
14
14
|
},
|
15
|
+
id: {
|
16
|
+
minLength: 1,
|
17
|
+
type: 'string',
|
18
|
+
default: ''
|
19
|
+
},
|
15
20
|
alt: {
|
16
21
|
type: 'string',
|
17
22
|
default: '',
|
@@ -21,11 +26,6 @@ export const media = adfNode('media').define({
|
|
21
26
|
type: 'string',
|
22
27
|
default: ''
|
23
28
|
},
|
24
|
-
id: {
|
25
|
-
minLength: 1,
|
26
|
-
type: 'string',
|
27
|
-
default: ''
|
28
|
-
},
|
29
29
|
height: {
|
30
30
|
type: 'number',
|
31
31
|
default: null,
|
@@ -78,6 +78,11 @@ export const media = adfNode('media').define({
|
|
78
78
|
optional: true
|
79
79
|
}
|
80
80
|
}, {
|
81
|
+
type: {
|
82
|
+
type: 'enum',
|
83
|
+
values: ['external'],
|
84
|
+
default: 'file'
|
85
|
+
},
|
81
86
|
alt: {
|
82
87
|
type: 'string',
|
83
88
|
default: '',
|
@@ -96,12 +101,7 @@ export const media = adfNode('media').define({
|
|
96
101
|
url: {
|
97
102
|
type: 'string',
|
98
103
|
default: null,
|
99
|
-
optional:
|
100
|
-
},
|
101
|
-
type: {
|
102
|
-
type: 'enum',
|
103
|
-
values: ['external'],
|
104
|
-
default: 'file'
|
104
|
+
optional: false
|
105
105
|
}
|
106
106
|
}]
|
107
107
|
}
|
@@ -17,7 +17,8 @@ export const mediaSingle = adfNode('mediaSingle').define({
|
|
17
17
|
},
|
18
18
|
layout: {
|
19
19
|
type: 'enum',
|
20
|
-
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start']
|
20
|
+
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
|
21
|
+
default: 'center'
|
21
22
|
},
|
22
23
|
widthType: {
|
23
24
|
type: 'enum',
|
@@ -29,19 +30,17 @@ export const mediaSingle = adfNode('mediaSingle').define({
|
|
29
30
|
width: {
|
30
31
|
type: 'number',
|
31
32
|
minimum: 0,
|
32
|
-
default: null
|
33
|
-
|
33
|
+
default: null
|
34
|
+
},
|
35
|
+
widthType: {
|
36
|
+
type: 'enum',
|
37
|
+
values: ['pixel'],
|
38
|
+
default: 'pixel'
|
34
39
|
},
|
35
40
|
layout: {
|
36
41
|
type: 'enum',
|
37
42
|
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
|
38
43
|
default: 'center'
|
39
|
-
},
|
40
|
-
widthType: {
|
41
|
-
type: 'enum',
|
42
|
-
values: ['pixel'],
|
43
|
-
default: 'pixel',
|
44
|
-
optional: true
|
45
44
|
}
|
46
45
|
}]
|
47
46
|
}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { $
|
1
|
+
import { $onePlus, $or, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { tableCell } from './tableCell';
|
3
3
|
import { tableHeader } from './tableHeader';
|
4
4
|
export const tableRow = adfNode('tableRow').define({
|
5
5
|
selectable: false,
|
6
|
-
content: [$
|
6
|
+
content: [$onePlus($or(tableCell, tableHeader))]
|
7
7
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { $or, $
|
1
|
+
import { $or, $onePlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { blockGroup } from './groups/blockGroup';
|
3
3
|
import { layoutSection } from './nodes/layoutSection';
|
4
4
|
import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
|
@@ -7,6 +7,6 @@ import { paragraph } from './nodes/paragraph';
|
|
7
7
|
var doc = adfNode('doc').define({
|
8
8
|
root: true,
|
9
9
|
version: 1,
|
10
|
-
content: [$
|
10
|
+
content: [$onePlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup, nestedExpand, paragraph))]
|
11
11
|
});
|
12
12
|
export default doc;
|
@@ -10,7 +10,6 @@ export var blockCard = adfNode('blockCard').define({
|
|
10
10
|
},
|
11
11
|
datasource: {
|
12
12
|
type: 'object',
|
13
|
-
optional: true,
|
14
13
|
properties: {
|
15
14
|
id: {
|
16
15
|
type: 'string'
|
@@ -26,12 +25,14 @@ export var blockCard = adfNode('blockCard').define({
|
|
26
25
|
type: 'string'
|
27
26
|
}
|
28
27
|
},
|
28
|
+
required: ['type'],
|
29
29
|
type: 'object'
|
30
30
|
},
|
31
31
|
minItems: 1,
|
32
32
|
type: 'array'
|
33
33
|
}
|
34
|
-
}
|
34
|
+
},
|
35
|
+
required: ['id', 'parameters', 'views']
|
35
36
|
},
|
36
37
|
width: {
|
37
38
|
type: 'number',
|
@@ -44,12 +45,11 @@ export var blockCard = adfNode('blockCard').define({
|
|
44
45
|
}
|
45
46
|
}, {
|
46
47
|
url: {
|
47
|
-
type: 'string'
|
48
|
-
optional: true
|
48
|
+
type: 'string'
|
49
49
|
}
|
50
50
|
}, {
|
51
51
|
data: {
|
52
|
-
|
52
|
+
default: null
|
53
53
|
}
|
54
54
|
}]
|
55
55
|
}
|
@@ -8,12 +8,12 @@ export var bodiedExtension = adfNode('bodiedExtension').define({
|
|
8
8
|
selectable: true,
|
9
9
|
isolating: true,
|
10
10
|
attrs: {
|
11
|
-
|
11
|
+
extensionKey: {
|
12
12
|
minLength: 1,
|
13
13
|
type: 'string',
|
14
14
|
default: ''
|
15
15
|
},
|
16
|
-
|
16
|
+
extensionType: {
|
17
17
|
minLength: 1,
|
18
18
|
type: 'string',
|
19
19
|
default: ''
|
@@ -5,12 +5,12 @@ export var extension = adfNode('extension').define({
|
|
5
5
|
atom: true,
|
6
6
|
selectable: true,
|
7
7
|
attrs: {
|
8
|
-
|
8
|
+
extensionKey: {
|
9
9
|
minLength: 1,
|
10
10
|
type: 'string',
|
11
11
|
default: ''
|
12
12
|
},
|
13
|
-
|
13
|
+
extensionType: {
|
14
14
|
minLength: 1,
|
15
15
|
type: 'string',
|
16
16
|
default: ''
|
@@ -3,12 +3,12 @@ export var inlineExtension = adfNode('inlineExtension').define({
|
|
3
3
|
inline: true,
|
4
4
|
selectable: true,
|
5
5
|
attrs: {
|
6
|
-
|
6
|
+
extensionKey: {
|
7
7
|
minLength: 1,
|
8
8
|
type: 'string',
|
9
9
|
default: ''
|
10
10
|
},
|
11
|
-
|
11
|
+
extensionType: {
|
12
12
|
minLength: 1,
|
13
13
|
type: 'string',
|
14
14
|
default: ''
|