@atlaskit/adf-schema 40.5.0 → 40.7.0
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 +12 -0
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/next-schema/generated/nodeTypes.js +29 -6
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/expand.js +4 -5
- package/dist/cjs/next-schema/nodes/panel.js +5 -0
- package/dist/cjs/schema/create-schema.js +1 -1
- package/dist/cjs/schema/default-schema.js +3 -2
- package/dist/cjs/schema/index.js +8 -2
- package/dist/cjs/schema/nodes/expand.js +3 -3
- package/dist/cjs/schema/nodes/index.js +8 -2
- package/dist/cjs/schema/nodes/panel.js +19 -1
- package/dist/cjs/validator-schema/generated/validatorSpec.js +15 -4
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +28 -5
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/expand.js +4 -5
- package/dist/es2019/next-schema/nodes/panel.js +5 -0
- package/dist/es2019/schema/create-schema.js +2 -2
- package/dist/es2019/schema/default-schema.js +4 -3
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/expand.js +3 -3
- package/dist/es2019/schema/nodes/index.js +2 -2
- package/dist/es2019/schema/nodes/panel.js +17 -1
- package/dist/es2019/validator-schema/generated/validatorSpec.js +13 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +28 -5
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/nodes/expand.js +4 -5
- package/dist/esm/next-schema/nodes/panel.js +5 -0
- package/dist/esm/schema/create-schema.js +2 -2
- package/dist/esm/schema/default-schema.js +4 -3
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/expand.js +3 -3
- package/dist/esm/schema/nodes/index.js +2 -2
- package/dist/esm/schema/nodes/panel.js +19 -1
- package/dist/esm/validator-schema/generated/validatorSpec.js +13 -3
- package/dist/json-schema/v1/full.json +8 -1
- package/dist/json-schema/v1/stage-0.json +101 -40
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +23 -9
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +5 -1
- package/dist/types/next-schema/nodes/expand.d.ts +2 -3
- package/dist/types/next-schema/nodes/panel.d.ts +5 -1
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/expand.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +2 -2
- package/dist/types/schema/nodes/panel.d.ts +1 -0
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +13 -3
- package/json-schema/v1/full.json +8 -1
- package/json-schema/v1/stage-0.json +101 -40
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 40.7.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- b198a5c: [ED-24170] Stage 0 - Quotes in Panels
|
8
|
+
|
9
|
+
## 40.6.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- cc19189: [ED-24187 promoting to full schema - Nested Expands in Expands
|
14
|
+
|
3
15
|
## 40.5.0
|
4
16
|
|
5
17
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
@@ -561,10 +561,10 @@ Object.defineProperty(exports, "expandToJSON", {
|
|
561
561
|
return _schema.expandToJSON;
|
562
562
|
}
|
563
563
|
});
|
564
|
-
Object.defineProperty(exports, "
|
564
|
+
Object.defineProperty(exports, "expandWithNestedExpand", {
|
565
565
|
enumerable: true,
|
566
566
|
get: function get() {
|
567
|
-
return _schema.
|
567
|
+
return _schema.expandWithNestedExpand;
|
568
568
|
}
|
569
569
|
});
|
570
570
|
Object.defineProperty(exports, "extendedPanel", {
|
@@ -873,6 +873,12 @@ Object.defineProperty(exports, "orderedListWithOrder", {
|
|
873
873
|
return _schema.orderedListWithOrder;
|
874
874
|
}
|
875
875
|
});
|
876
|
+
Object.defineProperty(exports, "panelWithBlockquoteStage0", {
|
877
|
+
enumerable: true,
|
878
|
+
get: function get() {
|
879
|
+
return _schema.panelWithBlockquoteStage0;
|
880
|
+
}
|
881
|
+
});
|
876
882
|
Object.defineProperty(exports, "paragraph", {
|
877
883
|
enumerable: true,
|
878
884
|
get: function get() {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelLegacy = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemWithNestedDecisionStage0 = exports.listItemLegacy = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelWithNestedBlockquoteStage0 = exports.panelLegacy = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemWithNestedDecisionStage0 = exports.listItemLegacy = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandWithoutNestedExpand = exports.expandWithNoMark = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockWithNoMarks = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteWithoutNestedCodeblockOrMedia = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
|
7
7
|
var _createPMSpecFactory = require("../../schema/createPMSpecFactory");
|
8
8
|
/**
|
9
9
|
* This file was automatically generated by @atlaskit/adf-schema-generator
|
@@ -290,7 +290,7 @@ var emojiStage0 = exports.emojiStage0 = (0, _createPMSpecFactory.createPMNodeSpe
|
|
290
290
|
selectable: true
|
291
291
|
});
|
292
292
|
var expand = exports.expand = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
293
|
-
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
293
|
+
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock | nestedExpand)+',
|
294
294
|
marks: 'unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
295
295
|
group: 'block',
|
296
296
|
attrs: {
|
@@ -304,9 +304,7 @@ var expand = exports.expand = (0, _createPMSpecFactory.createPMNodeSpecFactory)(
|
|
304
304
|
selectable: true,
|
305
305
|
isolating: true
|
306
306
|
});
|
307
|
-
var
|
308
|
-
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock | nestedExpand)+',
|
309
|
-
marks: 'unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
307
|
+
var expandWithNoMark = exports.expandWithNoMark = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
310
308
|
group: 'block',
|
311
309
|
attrs: {
|
312
310
|
title: {
|
@@ -319,7 +317,9 @@ var expandWithNestedExpandStage0 = exports.expandWithNestedExpandStage0 = (0, _c
|
|
319
317
|
selectable: true,
|
320
318
|
isolating: true
|
321
319
|
});
|
322
|
-
var
|
320
|
+
var expandWithoutNestedExpand = exports.expandWithoutNestedExpand = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
321
|
+
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
322
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
323
323
|
group: 'block',
|
324
324
|
attrs: {
|
325
325
|
title: {
|
@@ -909,6 +909,29 @@ var panelLegacy = exports.panelLegacy = (0, _createPMSpecFactory.createPMNodeSpe
|
|
909
909
|
},
|
910
910
|
selectable: true
|
911
911
|
});
|
912
|
+
var panelWithNestedBlockquoteStage0 = exports.panelWithNestedBlockquoteStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
913
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | blockquote)+',
|
914
|
+
marks: 'unsupportedMark unsupportedNodeAttribute',
|
915
|
+
group: 'block',
|
916
|
+
attrs: {
|
917
|
+
panelType: {
|
918
|
+
default: 'info'
|
919
|
+
},
|
920
|
+
panelIcon: {
|
921
|
+
default: null
|
922
|
+
},
|
923
|
+
panelIconId: {
|
924
|
+
default: null
|
925
|
+
},
|
926
|
+
panelIconText: {
|
927
|
+
default: null
|
928
|
+
},
|
929
|
+
panelColor: {
|
930
|
+
default: null
|
931
|
+
}
|
932
|
+
},
|
933
|
+
selectable: true
|
934
|
+
});
|
912
935
|
var paragraph = exports.paragraph = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
913
936
|
content: 'inline*',
|
914
937
|
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
@@ -24,7 +24,7 @@ var _rule = require("../nodes/rule");
|
|
24
24
|
var _table = require("../nodes/table");
|
25
25
|
var _task = require("../nodes/task");
|
26
26
|
var _unsupportedBlock = require("../nodes/unsupportedBlock");
|
27
|
-
var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_marks'), _codeBlock.codeBlock.use('with_no_marks'), _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _blockquote.blockquote.use('without_nested_codeblock_or_media'), _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _extension.extension.use('with_marks'), _heading.heading, _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _panel.panel.use('legacy'), _table.table, _bodiedExtension.bodiedExtension, _bodiedExtension.bodiedExtension.use('with_marks'), _expand.expand, _expand.expand.use('with_no_mark'), _expand.expand.use('with_breakout_mark'), _expand.expand.use('
|
27
|
+
var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_marks'), _codeBlock.codeBlock.use('with_no_marks'), _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _blockquote.blockquote.use('without_nested_codeblock_or_media'), _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _extension.extension.use('with_marks'), _heading.heading, _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _panel.panel.use('legacy'), _panel.panel.use('with_nested_blockquote'), _table.table, _bodiedExtension.bodiedExtension, _bodiedExtension.bodiedExtension.use('with_marks'), _expand.expand, _expand.expand.use('with_no_mark'), _expand.expand.use('with_breakout_mark'), _expand.expand.use('without_nested_expand'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
|
28
28
|
// @DSLCompatibilityException
|
29
29
|
// Block group in PM doesn't match ADF
|
30
30
|
ignore: ['validator-spec']
|
@@ -27,7 +27,7 @@ var expand = exports.expand = (0, _adfSchemaGenerator.adfNode)('expand').define(
|
|
27
27
|
optional: true
|
28
28
|
}
|
29
29
|
},
|
30
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_nonNestableBlockContentGroup.nonNestableBlockContentGroup))],
|
30
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_nonNestableBlockContentGroup.nonNestableBlockContentGroup, _nestedExpand.nestedExpand.use('with_no_marks')))],
|
31
31
|
DANGEROUS_MANUAL_OVERRIDE: {
|
32
32
|
'validator-spec': {
|
33
33
|
'props.attrs.optional': {
|
@@ -36,10 +36,9 @@ var expand = exports.expand = (0, _adfSchemaGenerator.adfNode)('expand').define(
|
|
36
36
|
}
|
37
37
|
}
|
38
38
|
}
|
39
|
-
}).variant('
|
40
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_nonNestableBlockContentGroup.nonNestableBlockContentGroup
|
41
|
-
|
42
|
-
stage0: true
|
39
|
+
}).variant('without_nested_expand', {
|
40
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_nonNestableBlockContentGroup.nonNestableBlockContentGroup))],
|
41
|
+
ignore: ['json-schema', 'validator-spec']
|
43
42
|
}).variant('with_breakout_mark', {
|
44
43
|
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
45
44
|
content: [],
|
@@ -18,6 +18,7 @@ var _paragraph = require("./paragraph");
|
|
18
18
|
var _rule = require("./rule");
|
19
19
|
var _task = require("./task");
|
20
20
|
var _unsupportedBlock = require("./unsupportedBlock");
|
21
|
+
var _blockquote = require("./blockquote");
|
21
22
|
var panel = exports.panel = (0, _adfSchemaGenerator.adfNode)('panel').define({
|
22
23
|
selectable: true,
|
23
24
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
@@ -52,4 +53,8 @@ var panel = exports.panel = (0, _adfSchemaGenerator.adfNode)('panel').define({
|
|
52
53
|
}).variant('legacy', {
|
53
54
|
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _unsupportedBlock.unsupportedBlock))],
|
54
55
|
ignore: ['json-schema', 'validator-spec']
|
56
|
+
}).variant('with_nested_blockquote', {
|
57
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock.use('with_no_marks'), _task.taskList, _rule.rule, _decisionList.decisionList, _unsupportedBlock.unsupportedBlock, _blockquote.blockquote))],
|
58
|
+
noExtend: true,
|
59
|
+
stage0: true
|
55
60
|
});
|
@@ -26,9 +26,10 @@ var getSchemaBasedOnStage = exports.getSchemaBasedOnStage = (0, _memoizeOne.defa
|
|
26
26
|
layoutSection: _nodes.layoutSectionWithSingleColumn,
|
27
27
|
multiBodiedExtension: _nodes.multiBodiedExtension,
|
28
28
|
extensionFrame: _nodes.extensionFrame,
|
29
|
-
expand: _nodes.
|
29
|
+
expand: _nodes.expandWithNestedExpand,
|
30
30
|
blockquote: _nodes.blockquoteWithNestedCodeblockOrMedia,
|
31
|
-
listItem: _nodes.listItemWithDecisionStage0
|
31
|
+
listItem: _nodes.listItemWithDecisionStage0,
|
32
|
+
panel: (0, _nodes.panelWithBlockquoteStage0)(true)
|
32
33
|
};
|
33
34
|
}
|
34
35
|
return (0, _createSchema.createSchema)(defaultSchemaConfig);
|
package/dist/cjs/schema/index.js
CHANGED
@@ -273,10 +273,10 @@ Object.defineProperty(exports, "expandToJSON", {
|
|
273
273
|
return _nodes.expandToJSON;
|
274
274
|
}
|
275
275
|
});
|
276
|
-
Object.defineProperty(exports, "
|
276
|
+
Object.defineProperty(exports, "expandWithNestedExpand", {
|
277
277
|
enumerable: true,
|
278
278
|
get: function get() {
|
279
|
-
return _nodes.
|
279
|
+
return _nodes.expandWithNestedExpand;
|
280
280
|
}
|
281
281
|
});
|
282
282
|
Object.defineProperty(exports, "extendedPanel", {
|
@@ -513,6 +513,12 @@ Object.defineProperty(exports, "orderedListWithOrder", {
|
|
513
513
|
return _nodes.orderedListWithOrder;
|
514
514
|
}
|
515
515
|
});
|
516
|
+
Object.defineProperty(exports, "panelWithBlockquoteStage0", {
|
517
|
+
enumerable: true,
|
518
|
+
get: function get() {
|
519
|
+
return _nodes.panelWithBlockquoteStage0;
|
520
|
+
}
|
521
|
+
});
|
516
522
|
Object.defineProperty(exports, "paragraph", {
|
517
523
|
enumerable: true,
|
518
524
|
get: function get() {
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.toJSON = exports.
|
7
|
+
exports.toJSON = exports.expandWithNestedExpand = exports.expand = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
9
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
@@ -60,8 +60,8 @@ var nodeSpecOptions = {
|
|
60
60
|
return ['div', attrs, 0];
|
61
61
|
}
|
62
62
|
};
|
63
|
-
var expand = exports.expand = (0, _nodeTypes.
|
64
|
-
var
|
63
|
+
var expand = exports.expand = (0, _nodeTypes.expandWithoutNestedExpand)(nodeSpecOptions);
|
64
|
+
var expandWithNestedExpand = exports.expandWithNestedExpand = (0, _nodeTypes.expand)(nodeSpecOptions);
|
65
65
|
var toJSON = exports.toJSON = function toJSON(node) {
|
66
66
|
return {
|
67
67
|
attrs: Object.keys(node.attrs).filter(function (key) {
|
@@ -148,10 +148,10 @@ Object.defineProperty(exports, "expandToJSON", {
|
|
148
148
|
return _expand.toJSON;
|
149
149
|
}
|
150
150
|
});
|
151
|
-
Object.defineProperty(exports, "
|
151
|
+
Object.defineProperty(exports, "expandWithNestedExpand", {
|
152
152
|
enumerable: true,
|
153
153
|
get: function get() {
|
154
|
-
return _expand.
|
154
|
+
return _expand.expandWithNestedExpand;
|
155
155
|
}
|
156
156
|
});
|
157
157
|
Object.defineProperty(exports, "extendedPanel", {
|
@@ -352,6 +352,12 @@ Object.defineProperty(exports, "orderedListWithOrder", {
|
|
352
352
|
return _orderedList.orderedListWithOrder;
|
353
353
|
}
|
354
354
|
});
|
355
|
+
Object.defineProperty(exports, "panelWithBlockquoteStage0", {
|
356
|
+
enumerable: true,
|
357
|
+
get: function get() {
|
358
|
+
return _panel.panelWithBlockquoteStage0;
|
359
|
+
}
|
360
|
+
});
|
355
361
|
Object.defineProperty(exports, "paragraph", {
|
356
362
|
enumerable: true,
|
357
363
|
get: function get() {
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.extendedPanel = exports.PanelType = void 0;
|
7
|
+
exports.panelWithBlockquoteStage0 = exports.extendedPanel = exports.PanelType = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
9
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
@@ -72,4 +72,22 @@ var extendedPanel = exports.extendedPanel = function extendedPanel(allowCustomPa
|
|
72
72
|
}
|
73
73
|
});
|
74
74
|
return panelNodeSpec;
|
75
|
+
};
|
76
|
+
var panelWithBlockquoteStage0 = exports.panelWithBlockquoteStage0 = function panelWithBlockquoteStage0(allowCustomPanel) {
|
77
|
+
var panelNodeSpec = (0, _nodeTypes.panelWithNestedBlockquoteStage0)({
|
78
|
+
parseDOM: [{
|
79
|
+
tag: 'div[data-panel-type]',
|
80
|
+
getAttrs: function getAttrs(dom) {
|
81
|
+
return getParseDOMAttrs(allowCustomPanel, dom);
|
82
|
+
}
|
83
|
+
}],
|
84
|
+
toDOM: function toDOM(node) {
|
85
|
+
var attrs = getDomAttrs(node.attrs);
|
86
|
+
var contentAttrs = {
|
87
|
+
'data-panel-content': 'true'
|
88
|
+
};
|
89
|
+
return ['div', attrs, ['div', contentAttrs, 0]];
|
90
|
+
}
|
91
|
+
});
|
92
|
+
return panelNodeSpec;
|
75
93
|
};
|
@@ -3,7 +3,8 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.unsupportedBlock = exports.underline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell_content = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel_with_nested_blockquote = exports.panel_legacy = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_nested_decision = exports.listItem_legacy = exports.listItem = exports.link_text_inline = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_comment_marker = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.inline = exports.indentation = exports.image = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.formatted_text_inline = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_without_nested_expand = exports.expand_with_no_mark = exports.expand_with_breakout_mark = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.code_inline = exports.codeBlock_with_no_marks = exports.codeBlock_with_marks = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote_without_nested_codeblock_or_media = exports.blockquote_legacy = exports.blockquote = exports.block_content = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.atomic_inline = exports.annotation = exports.alignment = void 0;
|
7
|
+
exports.unsupportedInline = void 0;
|
7
8
|
var blockCard = exports.blockCard = {
|
8
9
|
props: {
|
9
10
|
type: {
|
@@ -1356,6 +1357,16 @@ var panel_legacy = exports.panel_legacy = ['panel', {
|
|
1356
1357
|
}
|
1357
1358
|
}
|
1358
1359
|
}];
|
1360
|
+
var panel_with_nested_blockquote = exports.panel_with_nested_blockquote = ['panel', {
|
1361
|
+
props: {
|
1362
|
+
content: {
|
1363
|
+
type: 'array',
|
1364
|
+
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'taskList', 'rule', 'decisionList', 'blockquote']],
|
1365
|
+
minItems: 1,
|
1366
|
+
allowUnsupportedBlock: true
|
1367
|
+
}
|
1368
|
+
}
|
1369
|
+
}];
|
1359
1370
|
var nestedExpand_content = exports.nestedExpand_content = {
|
1360
1371
|
type: 'array',
|
1361
1372
|
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote']],
|
@@ -1669,7 +1680,7 @@ var expand = exports.expand = {
|
|
1669
1680
|
},
|
1670
1681
|
content: {
|
1671
1682
|
type: 'array',
|
1672
|
-
items: ['non_nestable_block_content'],
|
1683
|
+
items: [['non_nestable_block_content', 'nestedExpand_with_no_marks']],
|
1673
1684
|
minItems: 1,
|
1674
1685
|
allowUnsupportedBlock: true
|
1675
1686
|
},
|
@@ -1699,11 +1710,11 @@ var expand_with_breakout_mark = exports.expand_with_breakout_mark = ['expand', {
|
|
1699
1710
|
}
|
1700
1711
|
}
|
1701
1712
|
}];
|
1702
|
-
var
|
1713
|
+
var expand_without_nested_expand = exports.expand_without_nested_expand = ['expand', {
|
1703
1714
|
props: {
|
1704
1715
|
content: {
|
1705
1716
|
type: 'array',
|
1706
|
-
items: [
|
1717
|
+
items: ['non_nestable_block_content'],
|
1707
1718
|
minItems: 1,
|
1708
1719
|
allowUnsupportedBlock: true
|
1709
1720
|
}
|
package/dist/es2019/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
2
|
-
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand,
|
2
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandWithNestedExpand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, panelWithBlockquoteStage0, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette } from './schema';
|
3
3
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
|
4
4
|
|
5
5
|
// ADF createPMSpecFactory
|
@@ -284,7 +284,7 @@ export const emojiStage0 = createPMNodeSpecFactory({
|
|
284
284
|
selectable: true
|
285
285
|
});
|
286
286
|
export const expand = createPMNodeSpecFactory({
|
287
|
-
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
287
|
+
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock | nestedExpand)+',
|
288
288
|
marks: 'unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
289
289
|
group: 'block',
|
290
290
|
attrs: {
|
@@ -298,9 +298,7 @@ export const expand = createPMNodeSpecFactory({
|
|
298
298
|
selectable: true,
|
299
299
|
isolating: true
|
300
300
|
});
|
301
|
-
export const
|
302
|
-
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock | nestedExpand)+',
|
303
|
-
marks: 'unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
301
|
+
export const expandWithNoMark = createPMNodeSpecFactory({
|
304
302
|
group: 'block',
|
305
303
|
attrs: {
|
306
304
|
title: {
|
@@ -313,7 +311,9 @@ export const expandWithNestedExpandStage0 = createPMNodeSpecFactory({
|
|
313
311
|
selectable: true,
|
314
312
|
isolating: true
|
315
313
|
});
|
316
|
-
export const
|
314
|
+
export const expandWithoutNestedExpand = createPMNodeSpecFactory({
|
315
|
+
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
|
316
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
317
317
|
group: 'block',
|
318
318
|
attrs: {
|
319
319
|
title: {
|
@@ -903,6 +903,29 @@ export const panelLegacy = createPMNodeSpecFactory({
|
|
903
903
|
},
|
904
904
|
selectable: true
|
905
905
|
});
|
906
|
+
export const panelWithNestedBlockquoteStage0 = createPMNodeSpecFactory({
|
907
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | blockquote)+',
|
908
|
+
marks: 'unsupportedMark unsupportedNodeAttribute',
|
909
|
+
group: 'block',
|
910
|
+
attrs: {
|
911
|
+
panelType: {
|
912
|
+
default: 'info'
|
913
|
+
},
|
914
|
+
panelIcon: {
|
915
|
+
default: null
|
916
|
+
},
|
917
|
+
panelIconId: {
|
918
|
+
default: null
|
919
|
+
},
|
920
|
+
panelIconText: {
|
921
|
+
default: null
|
922
|
+
},
|
923
|
+
panelColor: {
|
924
|
+
default: null
|
925
|
+
}
|
926
|
+
},
|
927
|
+
selectable: true
|
928
|
+
});
|
906
929
|
export const paragraph = createPMNodeSpecFactory({
|
907
930
|
content: 'inline*',
|
908
931
|
marks: 'link em strong strike subsup underline textColor annotation backgroundColor typeAheadQuery confluenceInlineComment unsupportedNodeAttribute unsupportedMark code dataConsumer fragment border',
|
@@ -18,7 +18,7 @@ import { rule } from '../nodes/rule';
|
|
18
18
|
import { table } from '../nodes/table';
|
19
19
|
import { taskList } from '../nodes/task';
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
21
|
-
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('legacy'), table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_no_mark'), expand.use('with_breakout_mark'), expand.use('
|
21
|
+
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('legacy'), panel.use('with_nested_blockquote'), table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_no_mark'), expand.use('with_breakout_mark'), expand.use('without_nested_expand'), confluenceUnsupportedBlock, unsupportedBlock], {
|
22
22
|
// @DSLCompatibilityException
|
23
23
|
// Block group in PM doesn't match ADF
|
24
24
|
ignore: ['validator-spec']
|
@@ -21,7 +21,7 @@ export const expand = adfNode('expand').define({
|
|
21
21
|
optional: true
|
22
22
|
}
|
23
23
|
},
|
24
|
-
content: [$onePlus($or(nonNestableBlockContentGroup))],
|
24
|
+
content: [$onePlus($or(nonNestableBlockContentGroup, nestedExpand.use('with_no_marks')))],
|
25
25
|
DANGEROUS_MANUAL_OVERRIDE: {
|
26
26
|
'validator-spec': {
|
27
27
|
'props.attrs.optional': {
|
@@ -30,10 +30,9 @@ export const expand = adfNode('expand').define({
|
|
30
30
|
}
|
31
31
|
}
|
32
32
|
}
|
33
|
-
}).variant('
|
34
|
-
content: [$onePlus($or(nonNestableBlockContentGroup
|
35
|
-
|
36
|
-
stage0: true
|
33
|
+
}).variant('without_nested_expand', {
|
34
|
+
content: [$onePlus($or(nonNestableBlockContentGroup))],
|
35
|
+
ignore: ['json-schema', 'validator-spec']
|
37
36
|
}).variant('with_breakout_mark', {
|
38
37
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
39
38
|
content: [],
|
@@ -12,6 +12,7 @@ import { paragraph } from './paragraph';
|
|
12
12
|
import { rule } from './rule';
|
13
13
|
import { taskList } from './task';
|
14
14
|
import { unsupportedBlock } from './unsupportedBlock';
|
15
|
+
import { blockquote } from './blockquote';
|
15
16
|
export const panel = adfNode('panel').define({
|
16
17
|
selectable: true,
|
17
18
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
@@ -46,4 +47,8 @@ export const panel = adfNode('panel').define({
|
|
46
47
|
}).variant('legacy', {
|
47
48
|
content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, unsupportedBlock))],
|
48
49
|
ignore: ['json-schema', 'validator-spec']
|
50
|
+
}).variant('with_nested_blockquote', {
|
51
|
+
content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), taskList, rule, decisionList, unsupportedBlock, blockquote))],
|
52
|
+
noExtend: true,
|
53
|
+
stage0: true
|
49
54
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
2
2
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
3
3
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
|
4
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItemWithTask, heading, blockquoteWithNestedCodeblockOrMedia, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status,
|
4
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItemWithTask, heading, blockquoteWithNestedCodeblockOrMedia, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption } from './nodes';
|
5
5
|
function addItems(builtInItems, config, customSpecs = {}) {
|
6
6
|
if (!config) {
|
7
7
|
return {};
|
@@ -159,7 +159,7 @@ const nodesInOrder = [{
|
|
159
159
|
spec: status
|
160
160
|
}, {
|
161
161
|
name: 'expand',
|
162
|
-
spec:
|
162
|
+
spec: expandWithNestedExpand
|
163
163
|
}, {
|
164
164
|
name: 'nestedExpand',
|
165
165
|
spec: nestedExpand
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension,
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, blockquoteWithNestedCodeblockOrMedia, listItemWithDecisionStage0, panelWithBlockquoteStage0 } from './nodes';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
const getDefaultSchemaConfig = () => {
|
5
5
|
const defaultSchemaConfig = {
|
@@ -18,9 +18,10 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
|
|
18
18
|
layoutSection: layoutSectionWithSingleColumn,
|
19
19
|
multiBodiedExtension: multiBodiedExtension,
|
20
20
|
extensionFrame: extensionFrame,
|
21
|
-
expand:
|
21
|
+
expand: expandWithNestedExpand,
|
22
22
|
blockquote: blockquoteWithNestedCodeblockOrMedia,
|
23
|
-
listItem: listItemWithDecisionStage0
|
23
|
+
listItem: listItemWithDecisionStage0,
|
24
|
+
panel: panelWithBlockquoteStage0(true)
|
24
25
|
};
|
25
26
|
}
|
26
27
|
return createSchema(defaultSchemaConfig);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand,
|
1
|
+
export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, panelWithBlockquoteStage0, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
|
2
2
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
3
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { expandWithoutNestedExpand as expandWithoutNestedExpandFactory, expand as expandFactory } from '../../next-schema/generated/nodeTypes';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* @name expand_node
|
@@ -51,8 +51,8 @@ const nodeSpecOptions = {
|
|
51
51
|
return ['div', attrs, 0];
|
52
52
|
}
|
53
53
|
};
|
54
|
-
export const expand =
|
55
|
-
export const
|
54
|
+
export const expand = expandWithoutNestedExpandFactory(nodeSpecOptions);
|
55
|
+
export const expandWithNestedExpand = expandFactory(nodeSpecOptions);
|
56
56
|
export const toJSON = node => ({
|
57
57
|
attrs: Object.keys(node.attrs).filter(key => !key.startsWith('__')).reduce((obj, key) => {
|
58
58
|
return {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { expand,
|
1
|
+
export { expand, expandWithNestedExpand, toJSON as expandToJSON } from './expand';
|
2
2
|
export { confluenceJiraIssue } from './confluence-jira-issue';
|
3
3
|
export { confluenceUnsupportedBlock } from './confluence-unsupported-block';
|
4
4
|
export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
|
@@ -15,7 +15,7 @@ export { emoji } from './emoji';
|
|
15
15
|
export { image } from './image';
|
16
16
|
export { mention, toJSON as mentionToJSON } from './mention';
|
17
17
|
export { listItem, listItemWithTask, listItemWithDecisionStage0 } from './list-item';
|
18
|
-
export { extendedPanel, PanelType } from './panel';
|
18
|
+
export { extendedPanel, PanelType, panelWithBlockquoteStage0 } from './panel';
|
19
19
|
export { text } from './text';
|
20
20
|
export { default as unknownBlock } from './unknown-block';
|
21
21
|
export { caption } from './caption';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { panel as panelFactory } from '../../next-schema/generated/nodeTypes';
|
1
|
+
import { panel as panelFactory, panelWithNestedBlockquoteStage0 as panelWithNestedBlockquoteStage0Factory } from '../../next-schema/generated/nodeTypes';
|
2
2
|
export let PanelType = /*#__PURE__*/function (PanelType) {
|
3
3
|
PanelType["INFO"] = "info";
|
4
4
|
PanelType["NOTE"] = "note";
|
@@ -63,4 +63,20 @@ export const extendedPanel = allowCustomPanel => {
|
|
63
63
|
}
|
64
64
|
});
|
65
65
|
return panelNodeSpec;
|
66
|
+
};
|
67
|
+
export const panelWithBlockquoteStage0 = allowCustomPanel => {
|
68
|
+
const panelNodeSpec = panelWithNestedBlockquoteStage0Factory({
|
69
|
+
parseDOM: [{
|
70
|
+
tag: 'div[data-panel-type]',
|
71
|
+
getAttrs: dom => getParseDOMAttrs(allowCustomPanel, dom)
|
72
|
+
}],
|
73
|
+
toDOM(node) {
|
74
|
+
const attrs = getDomAttrs(node.attrs);
|
75
|
+
const contentAttrs = {
|
76
|
+
'data-panel-content': 'true'
|
77
|
+
};
|
78
|
+
return ['div', attrs, ['div', contentAttrs, 0]];
|
79
|
+
}
|
80
|
+
});
|
81
|
+
return panelNodeSpec;
|
66
82
|
};
|