@atlaskit/adf-schema 52.11.4 → 52.13.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 +23 -0
- package/dist/cjs/next-schema/full-schema.adf.js +5 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +27 -1
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/panel.js +5 -0
- package/dist/cjs/schema/create-schema.js +3 -0
- package/dist/cjs/schema/default-schema.js +1 -1
- package/dist/cjs/schema/nodes/index.js +12 -0
- package/dist/cjs/schema/nodes/panel.js +18 -2
- package/dist/es2019/next-schema/full-schema.adf.js +6 -0
- package/dist/es2019/next-schema/generated/nodeTypes.js +26 -0
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/panel.js +5 -0
- package/dist/es2019/schema/create-schema.js +4 -1
- package/dist/es2019/schema/default-schema.js +1 -1
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/schema/nodes/panel.js +15 -3
- package/dist/esm/next-schema/full-schema.adf.js +6 -0
- package/dist/esm/next-schema/generated/nodeTypes.js +26 -0
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/nodes/panel.js +5 -0
- package/dist/esm/schema/create-schema.js +4 -1
- package/dist/esm/schema/default-schema.js +1 -1
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/schema/nodes/panel.js +18 -2
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +15 -0
- package/dist/types/next-schema/nodes/panel.d.ts +1 -1
- package/dist/types/schema/default-schema.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +1 -1
- package/dist/types/schema/nodes/panel.d.ts +12 -1
- package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +15 -0
- package/dist/types-ts4.5/next-schema/nodes/panel.d.ts +2 -1
- package/dist/types-ts4.5/schema/default-schema.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/index.d.ts +1 -1
- package/dist/types-ts4.5/schema/nodes/panel.d.ts +12 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 52.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`534d05cc607cb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/534d05cc607cb) -
|
|
8
|
+
Add extendedPanelC1 and extendedPanelC1WithLocalId factory wrappers so allowCustomPanel and
|
|
9
|
+
generateLocalId propagate correctly into panel_c1 node specs. Register panel_c1 as a built-in node
|
|
10
|
+
in createSchema and include it in the default schema so consumers reading
|
|
11
|
+
defaultSchema.nodes.panel_c1 see a real NodeType (experiment-gated feature behaviour is unchanged
|
|
12
|
+
— table-in-panel is still controlled by platform_editor_nest_table_in_panel).
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 52.12.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- [`5a9d51dd03237`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5a9d51dd03237) -
|
|
23
|
+
EDITOR-7168: Properly declare panel_c1 variant in next-schema source using addContent() for
|
|
24
|
+
cycle-safe table wiring
|
|
25
|
+
|
|
3
26
|
## 52.11.4
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -13,6 +13,11 @@ var _expand = require("./nodes/expand");
|
|
|
13
13
|
var _codeBlock = require("./nodes/codeBlock");
|
|
14
14
|
var _syncBlock = require("./nodes/syncBlock");
|
|
15
15
|
var _bodiedSyncBlock = require("./nodes/bodiedSyncBlock");
|
|
16
|
+
var _panel = require("./nodes/panel");
|
|
17
|
+
var _tableNodes = require("./nodes/tableNodes");
|
|
18
|
+
// Wire cross-container content after all node modules are fully evaluated,
|
|
19
|
+
// so neither import is undefined when the $or() expression is constructed.
|
|
20
|
+
_panel.panel.use('c1').addContent(_tableNodes.table);
|
|
16
21
|
var doc = (0, _adfSchemaGenerator.adfNode)('doc').define({
|
|
17
22
|
root: true,
|
|
18
23
|
version: 1,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTableStage0 = exports.tableHeaderWithNestedTable = exports.tableHeaderStage0 = exports.tableHeader = exports.tableCellWithNestedTableStage0 = exports.tableCellWithNestedTable = exports.tableCellStage0 = exports.tableCell = exports.table = exports.syncBlock = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithFontSize = exports.paragraphWithAlignment = exports.paragraph = 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.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumnStage0 = 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.expandRootOnly = 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.codeBlockWithExtendedAttributesStage0 = exports.codeBlockRootOnlyWithExtendedAttributesStage0 = exports.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedSyncBlock = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = exports.blockCard = void 0;
|
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTableStage0 = exports.tableHeaderWithNestedTable = exports.tableHeaderStage0 = exports.tableHeader = exports.tableCellWithNestedTableStage0 = exports.tableCellWithNestedTable = exports.tableCellStage0 = exports.tableCell = exports.table = exports.syncBlock = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithFontSize = exports.paragraphWithAlignment = exports.paragraph = exports.panelC1 = 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.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumnStage0 = 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.expandRootOnly = 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.codeBlockWithExtendedAttributesStage0 = exports.codeBlockRootOnlyWithExtendedAttributesStage0 = exports.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedSyncBlock = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = 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
|
|
@@ -1065,6 +1065,32 @@ var panel = exports.panel = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
|
1065
1065
|
},
|
|
1066
1066
|
selectable: true
|
|
1067
1067
|
});
|
|
1068
|
+
var panelC1 = exports.panelC1 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1069
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | extension | table)+',
|
|
1070
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1071
|
+
group: 'block',
|
|
1072
|
+
attrs: {
|
|
1073
|
+
panelType: {
|
|
1074
|
+
default: 'info'
|
|
1075
|
+
},
|
|
1076
|
+
panelIcon: {
|
|
1077
|
+
default: null
|
|
1078
|
+
},
|
|
1079
|
+
panelIconId: {
|
|
1080
|
+
default: null
|
|
1081
|
+
},
|
|
1082
|
+
panelIconText: {
|
|
1083
|
+
default: null
|
|
1084
|
+
},
|
|
1085
|
+
panelColor: {
|
|
1086
|
+
default: null
|
|
1087
|
+
},
|
|
1088
|
+
localId: {
|
|
1089
|
+
default: null
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
selectable: true
|
|
1093
|
+
});
|
|
1068
1094
|
var paragraph = exports.paragraph = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1069
1095
|
content: 'inline*',
|
|
1070
1096
|
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 _tableNodes = require("../nodes/tableNodes");
|
|
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_extended_attributes'), _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'), _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, _tableNodes.table,
|
|
27
|
+
var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_extended_attributes'), _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'), _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('c1'), _tableNodes.table,
|
|
28
28
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
29
29
|
_tableNodes.table.use('with_nested_table'), _bodiedExtension.bodiedExtension, _bodiedExtension.bodiedExtension.use('with_marks'), _expand.expand, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
|
|
30
30
|
// @DSLCompatibilityException
|
|
@@ -56,4 +56,9 @@ var panel = exports.panel = (0, _adfSchemaGenerator.adfNode)('panel').define({
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
content: [(0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, panelContent.concat([_extension.extension.use('with_marks')])))]
|
|
59
|
+
}).variant('c1', {
|
|
60
|
+
// panel_c1 allows all standard panel content plus table (wired via addContent
|
|
61
|
+
// in full-schema.adf.ts to avoid a circular module import).
|
|
62
|
+
content: [(0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, panelContent.concat([_extension.extension.use('with_marks')])))],
|
|
63
|
+
ignore: ['json-schema', 'validator-spec']
|
|
59
64
|
});
|
|
@@ -10,7 +10,7 @@ var _nodes = require("./nodes");
|
|
|
10
10
|
var _createSchema = require("./create-schema");
|
|
11
11
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
12
12
|
var defaultSchemaConfig = {
|
|
13
|
-
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
13
|
+
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'panel_c1', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
14
14
|
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'fontSize', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
|
15
15
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
|
16
16
|
'fragment']
|
|
@@ -220,6 +220,18 @@ Object.defineProperty(exports, "extendedPanel", {
|
|
|
220
220
|
return _panel.extendedPanel;
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
|
+
Object.defineProperty(exports, "extendedPanelC1", {
|
|
224
|
+
enumerable: true,
|
|
225
|
+
get: function get() {
|
|
226
|
+
return _panel.extendedPanelC1;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
Object.defineProperty(exports, "extendedPanelC1WithLocalId", {
|
|
230
|
+
enumerable: true,
|
|
231
|
+
get: function get() {
|
|
232
|
+
return _panel.extendedPanelC1WithLocalId;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
223
235
|
Object.defineProperty(exports, "extendedPanelWithLocalId", {
|
|
224
236
|
enumerable: true,
|
|
225
237
|
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.extendedPanelWithLocalId = exports.extendedPanel = exports.PanelType = void 0;
|
|
7
|
+
exports.extendedPanelWithLocalId = exports.extendedPanelC1WithLocalId = exports.extendedPanelC1 = 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
|
var _uuid = require("../../utils/uuid");
|
|
@@ -79,7 +79,8 @@ var createPanelNodeSpecOptions = function createPanelNodeSpecOptions(allowCustom
|
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* @name extended_panel
|
|
82
|
-
*
|
|
82
|
+
*
|
|
83
|
+
* it allows more content to be nested as compared to panel node.
|
|
83
84
|
* Specifically, it allows Media, action, code-block, rule and decision nodes in
|
|
84
85
|
* addition to content allowed inside panel
|
|
85
86
|
*/
|
|
@@ -88,4 +89,19 @@ var extendedPanel = exports.extendedPanel = function extendedPanel(allowCustomPa
|
|
|
88
89
|
};
|
|
89
90
|
var extendedPanelWithLocalId = exports.extendedPanelWithLocalId = function extendedPanelWithLocalId(allowCustomPanel) {
|
|
90
91
|
return (0, _nodeTypes.panel)(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @name extended_panel_c1
|
|
96
|
+
*
|
|
97
|
+
* Depth-level-1 variant of panel. Allows all standard panel content
|
|
98
|
+
* plus table nodes. Derives its parseDOM/toDOM behaviour from the same
|
|
99
|
+
* createPanelNodeSpecOptions helper as extendedPanel so that allowCustomPanel
|
|
100
|
+
* and generateLocalId propagate identically.
|
|
101
|
+
*/
|
|
102
|
+
var extendedPanelC1 = exports.extendedPanelC1 = function extendedPanelC1(allowCustomPanel) {
|
|
103
|
+
return (0, _nodeTypes.panelC1)(createPanelNodeSpecOptions(allowCustomPanel));
|
|
104
|
+
};
|
|
105
|
+
var extendedPanelC1WithLocalId = exports.extendedPanelC1WithLocalId = function extendedPanelC1WithLocalId(allowCustomPanel) {
|
|
106
|
+
return (0, _nodeTypes.panelC1)(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
91
107
|
};
|
|
@@ -7,6 +7,12 @@ import { expand } from './nodes/expand';
|
|
|
7
7
|
import { codeBlock } from './nodes/codeBlock';
|
|
8
8
|
import { syncBlock } from './nodes/syncBlock';
|
|
9
9
|
import { bodiedSyncBlock } from './nodes/bodiedSyncBlock';
|
|
10
|
+
import { panel } from './nodes/panel';
|
|
11
|
+
import { table } from './nodes/tableNodes';
|
|
12
|
+
|
|
13
|
+
// Wire cross-container content after all node modules are fully evaluated,
|
|
14
|
+
// so neither import is undefined when the $or() expression is constructed.
|
|
15
|
+
panel.use('c1').addContent(table);
|
|
10
16
|
const doc = adfNode('doc').define({
|
|
11
17
|
root: true,
|
|
12
18
|
version: 1,
|
|
@@ -1059,6 +1059,32 @@ export const panel = createPMNodeSpecFactory({
|
|
|
1059
1059
|
},
|
|
1060
1060
|
selectable: true
|
|
1061
1061
|
});
|
|
1062
|
+
export const panelC1 = createPMNodeSpecFactory({
|
|
1063
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | extension | table)+',
|
|
1064
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1065
|
+
group: 'block',
|
|
1066
|
+
attrs: {
|
|
1067
|
+
panelType: {
|
|
1068
|
+
default: 'info'
|
|
1069
|
+
},
|
|
1070
|
+
panelIcon: {
|
|
1071
|
+
default: null
|
|
1072
|
+
},
|
|
1073
|
+
panelIconId: {
|
|
1074
|
+
default: null
|
|
1075
|
+
},
|
|
1076
|
+
panelIconText: {
|
|
1077
|
+
default: null
|
|
1078
|
+
},
|
|
1079
|
+
panelColor: {
|
|
1080
|
+
default: null
|
|
1081
|
+
},
|
|
1082
|
+
localId: {
|
|
1083
|
+
default: null
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
selectable: true
|
|
1087
|
+
});
|
|
1062
1088
|
export const paragraph = createPMNodeSpecFactory({
|
|
1063
1089
|
content: 'inline*',
|
|
1064
1090
|
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/tableNodes';
|
|
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_extended_attributes'), 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'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, table,
|
|
21
|
+
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_extended_attributes'), 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'), 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('c1'), table,
|
|
22
22
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
23
23
|
table.use('with_nested_table'), bodiedExtension, bodiedExtension.use('with_marks'), expand, confluenceUnsupportedBlock, unsupportedBlock], {
|
|
24
24
|
// @DSLCompatibilityException
|
|
@@ -50,4 +50,9 @@ export const panel = adfNode('panel').define({
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
content: [$onePlus($or(...panelContent, extension.use('with_marks')))]
|
|
53
|
+
}).variant('c1', {
|
|
54
|
+
// panel_c1 allows all standard panel content plus table (wired via addContent
|
|
55
|
+
// in full-schema.adf.ts to avoid a circular module import).
|
|
56
|
+
content: [$onePlus($or(...panelContent, extension.use('with_marks')))],
|
|
57
|
+
ignore: ['json-schema', 'validator-spec']
|
|
53
58
|
});
|
|
@@ -2,7 +2,7 @@ import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
|
3
3
|
import { sanitizeNodes } from './sanitizeNodes';
|
|
4
4
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, fontSize, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
|
|
5
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote, syncBlock, bodiedSyncBlock } from './nodes';
|
|
5
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, extendedPanelC1, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote, syncBlock, bodiedSyncBlock } from './nodes';
|
|
6
6
|
function addItems(builtInItems, config, customSpecs = {}) {
|
|
7
7
|
if (!config) {
|
|
8
8
|
return {};
|
|
@@ -80,6 +80,9 @@ const nodesInOrder = [{
|
|
|
80
80
|
}, {
|
|
81
81
|
name: 'panel',
|
|
82
82
|
spec: extendedPanel(true)
|
|
83
|
+
}, {
|
|
84
|
+
name: 'panel_c1',
|
|
85
|
+
spec: extendedPanelC1(true)
|
|
83
86
|
}, {
|
|
84
87
|
name: 'rule',
|
|
85
88
|
spec: rule
|
|
@@ -3,7 +3,7 @@ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, ex
|
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
4
|
const getDefaultSchemaConfig = () => {
|
|
5
5
|
const defaultSchemaConfig = {
|
|
6
|
-
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
6
|
+
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'panel_c1', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
7
7
|
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'fontSize', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
|
8
8
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
|
9
9
|
'fragment']
|
|
@@ -16,7 +16,7 @@ export { emoji, emojiWithLocalId } from './emoji';
|
|
|
16
16
|
export { image } from './image';
|
|
17
17
|
export { mention, toJSON as mentionToJSON } from './mention';
|
|
18
18
|
export { listItem, listItemWithLocalId } from './list-item';
|
|
19
|
-
export { extendedPanel, extendedPanelWithLocalId, PanelType } from './panel';
|
|
19
|
+
export { extendedPanel, extendedPanelWithLocalId, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
|
|
20
20
|
export { text } from './text';
|
|
21
21
|
export { default as unknownBlock } from './unknown-block';
|
|
22
22
|
export { caption, captionWithLocalId } from './caption';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { panel as panelFactory } from '../../next-schema/generated/nodeTypes';
|
|
1
|
+
import { panel as panelFactory, panelC1 as panelC1Factory } from '../../next-schema/generated/nodeTypes';
|
|
2
2
|
import { uuid } from '../../utils/uuid';
|
|
3
3
|
export let PanelType = /*#__PURE__*/function (PanelType) {
|
|
4
4
|
PanelType["INFO"] = "info";
|
|
@@ -68,9 +68,21 @@ const createPanelNodeSpecOptions = (allowCustomPanel, generateLocalId) => ({
|
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* @name extended_panel
|
|
71
|
-
*
|
|
71
|
+
*
|
|
72
|
+
* it allows more content to be nested as compared to panel node.
|
|
72
73
|
* Specifically, it allows Media, action, code-block, rule and decision nodes in
|
|
73
74
|
* addition to content allowed inside panel
|
|
74
75
|
*/
|
|
75
76
|
export const extendedPanel = allowCustomPanel => panelFactory(createPanelNodeSpecOptions(allowCustomPanel));
|
|
76
|
-
export const extendedPanelWithLocalId = allowCustomPanel => panelFactory(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
77
|
+
export const extendedPanelWithLocalId = allowCustomPanel => panelFactory(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @name extended_panel_c1
|
|
81
|
+
*
|
|
82
|
+
* Depth-level-1 variant of panel. Allows all standard panel content
|
|
83
|
+
* plus table nodes. Derives its parseDOM/toDOM behaviour from the same
|
|
84
|
+
* createPanelNodeSpecOptions helper as extendedPanel so that allowCustomPanel
|
|
85
|
+
* and generateLocalId propagate identically.
|
|
86
|
+
*/
|
|
87
|
+
export const extendedPanelC1 = allowCustomPanel => panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel));
|
|
88
|
+
export const extendedPanelC1WithLocalId = allowCustomPanel => panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
@@ -7,6 +7,12 @@ import { expand } from './nodes/expand';
|
|
|
7
7
|
import { codeBlock } from './nodes/codeBlock';
|
|
8
8
|
import { syncBlock } from './nodes/syncBlock';
|
|
9
9
|
import { bodiedSyncBlock } from './nodes/bodiedSyncBlock';
|
|
10
|
+
import { panel } from './nodes/panel';
|
|
11
|
+
import { table } from './nodes/tableNodes';
|
|
12
|
+
|
|
13
|
+
// Wire cross-container content after all node modules are fully evaluated,
|
|
14
|
+
// so neither import is undefined when the $or() expression is constructed.
|
|
15
|
+
panel.use('c1').addContent(table);
|
|
10
16
|
var doc = adfNode('doc').define({
|
|
11
17
|
root: true,
|
|
12
18
|
version: 1,
|
|
@@ -1059,6 +1059,32 @@ export var panel = createPMNodeSpecFactory({
|
|
|
1059
1059
|
},
|
|
1060
1060
|
selectable: true
|
|
1061
1061
|
});
|
|
1062
|
+
export var panelC1 = createPMNodeSpecFactory({
|
|
1063
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | extension | table)+',
|
|
1064
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1065
|
+
group: 'block',
|
|
1066
|
+
attrs: {
|
|
1067
|
+
panelType: {
|
|
1068
|
+
default: 'info'
|
|
1069
|
+
},
|
|
1070
|
+
panelIcon: {
|
|
1071
|
+
default: null
|
|
1072
|
+
},
|
|
1073
|
+
panelIconId: {
|
|
1074
|
+
default: null
|
|
1075
|
+
},
|
|
1076
|
+
panelIconText: {
|
|
1077
|
+
default: null
|
|
1078
|
+
},
|
|
1079
|
+
panelColor: {
|
|
1080
|
+
default: null
|
|
1081
|
+
},
|
|
1082
|
+
localId: {
|
|
1083
|
+
default: null
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
selectable: true
|
|
1087
|
+
});
|
|
1062
1088
|
export var paragraph = createPMNodeSpecFactory({
|
|
1063
1089
|
content: 'inline*',
|
|
1064
1090
|
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/tableNodes';
|
|
19
19
|
import { taskList } from '../nodes/task';
|
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
21
|
-
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_extended_attributes'), 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'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, table,
|
|
21
|
+
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_extended_attributes'), 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'), 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('c1'), table,
|
|
22
22
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
23
23
|
table.use('with_nested_table'), bodiedExtension, bodiedExtension.use('with_marks'), expand, confluenceUnsupportedBlock, unsupportedBlock], {
|
|
24
24
|
// @DSLCompatibilityException
|
|
@@ -50,4 +50,9 @@ export var panel = adfNode('panel').define({
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))]
|
|
53
|
+
}).variant('c1', {
|
|
54
|
+
// panel_c1 allows all standard panel content plus table (wired via addContent
|
|
55
|
+
// in full-schema.adf.ts to avoid a circular module import).
|
|
56
|
+
content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))],
|
|
57
|
+
ignore: ['json-schema', 'validator-spec']
|
|
53
58
|
});
|
|
@@ -2,7 +2,7 @@ import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
|
3
3
|
import { sanitizeNodes } from './sanitizeNodes';
|
|
4
4
|
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, fontSize, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
|
|
5
|
-
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote, syncBlock, bodiedSyncBlock } from './nodes';
|
|
5
|
+
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, extendedPanelC1, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote, syncBlock, bodiedSyncBlock } from './nodes';
|
|
6
6
|
function addItems(builtInItems, config) {
|
|
7
7
|
var customSpecs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
8
8
|
if (!config) {
|
|
@@ -82,6 +82,9 @@ var nodesInOrder = [{
|
|
|
82
82
|
}, {
|
|
83
83
|
name: 'panel',
|
|
84
84
|
spec: extendedPanel(true)
|
|
85
|
+
}, {
|
|
86
|
+
name: 'panel_c1',
|
|
87
|
+
spec: extendedPanelC1(true)
|
|
85
88
|
}, {
|
|
86
89
|
name: 'rule',
|
|
87
90
|
spec: rule
|
|
@@ -3,7 +3,7 @@ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, ex
|
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
4
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
5
5
|
var defaultSchemaConfig = {
|
|
6
|
-
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
6
|
+
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'panel_c1', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
7
7
|
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'fontSize', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
|
8
8
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
|
9
9
|
'fragment']
|
|
@@ -16,7 +16,7 @@ export { emoji, emojiWithLocalId } from './emoji';
|
|
|
16
16
|
export { image } from './image';
|
|
17
17
|
export { mention, toJSON as mentionToJSON } from './mention';
|
|
18
18
|
export { listItem, listItemWithLocalId } from './list-item';
|
|
19
|
-
export { extendedPanel, extendedPanelWithLocalId, PanelType } from './panel';
|
|
19
|
+
export { extendedPanel, extendedPanelWithLocalId, extendedPanelC1, extendedPanelC1WithLocalId, PanelType } from './panel';
|
|
20
20
|
export { text } from './text';
|
|
21
21
|
export { default as unknownBlock } from './unknown-block';
|
|
22
22
|
export { caption, captionWithLocalId } from './caption';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { panel as panelFactory } from '../../next-schema/generated/nodeTypes';
|
|
4
|
+
import { panel as panelFactory, panelC1 as panelC1Factory } from '../../next-schema/generated/nodeTypes';
|
|
5
5
|
import { uuid } from '../../utils/uuid';
|
|
6
6
|
export var PanelType = /*#__PURE__*/function (PanelType) {
|
|
7
7
|
PanelType["INFO"] = "info";
|
|
@@ -74,7 +74,8 @@ var createPanelNodeSpecOptions = function createPanelNodeSpecOptions(allowCustom
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @name extended_panel
|
|
77
|
-
*
|
|
77
|
+
*
|
|
78
|
+
* it allows more content to be nested as compared to panel node.
|
|
78
79
|
* Specifically, it allows Media, action, code-block, rule and decision nodes in
|
|
79
80
|
* addition to content allowed inside panel
|
|
80
81
|
*/
|
|
@@ -83,4 +84,19 @@ export var extendedPanel = function extendedPanel(allowCustomPanel) {
|
|
|
83
84
|
};
|
|
84
85
|
export var extendedPanelWithLocalId = function extendedPanelWithLocalId(allowCustomPanel) {
|
|
85
86
|
return panelFactory(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @name extended_panel_c1
|
|
91
|
+
*
|
|
92
|
+
* Depth-level-1 variant of panel. Allows all standard panel content
|
|
93
|
+
* plus table nodes. Derives its parseDOM/toDOM behaviour from the same
|
|
94
|
+
* createPanelNodeSpecOptions helper as extendedPanel so that allowCustomPanel
|
|
95
|
+
* and generateLocalId propagate identically.
|
|
96
|
+
*/
|
|
97
|
+
export var extendedPanelC1 = function extendedPanelC1(allowCustomPanel) {
|
|
98
|
+
return panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel));
|
|
99
|
+
};
|
|
100
|
+
export var extendedPanelC1WithLocalId = function extendedPanelC1WithLocalId(allowCustomPanel) {
|
|
101
|
+
return panelC1Factory(createPanelNodeSpecOptions(allowCustomPanel, true));
|
|
86
102
|
};
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source files in "packages/adf-schema/src/next-schema" ,
|
|
4
4
|
* and run "yarn workspace @atlaskit/adf-schema build:schema:all" to regenerate this file.
|
|
5
5
|
*/
|
|
6
|
-
import type { BlockCardDefinition, BlockquoteDefinition, BlockquoteLegacyDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CodeBlockDefinition, CodeBlockWithExtendedAttributesStage0Definition, ConfluenceJiraIssueDefinition, ConfluenceUnsupportedBlockDefinition, ConfluenceUnsupportedInlineDefinition, DateDefinition, DateStage0Definition, DecisionListDefinition, EmbedCardDefinition, EmojiDefinition, EmojiStage0Definition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, HardBreakDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithNoMarksDefinition, ImageDefinition, InlineCardDefinition, InlineCardStage0Definition, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, MediaGroupDefinition, MediaInlineDefinition, MediaSingleCaptionDefinition, MediaSingleDefinition, MediaSingleFullDefinition, MediaSingleWidthTypeDefinition, MentionDefinition, MentionStage0Definition, MultiBodiedExtensionStage0Definition, OrderedListDefinition, PanelDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithFontSizeDefinition, ParagraphWithIndentationDefinition, ParagraphWithNoMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StatusStage0Definition, TableDefinition, TableWithNestedTableDefinition, TaskListDefinition, TextCodeInlineDefinition, TextDefinition, TextFormattedDefinition, UnsupportedBlockDefinition, UnsupportedInlineDefinition } from './nodeTypes';
|
|
7
|
-
export type BlockDefinition = Array<BlockCardDefinition | CodeBlockDefinition | CodeBlockWithExtendedAttributesStage0Definition | MediaSingleDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleWidthTypeDefinition | ParagraphDefinition | ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | OrderedListDefinition | BulletListDefinition | BlockquoteDefinition | BlockquoteLegacyDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | ExtensionWithMarksDefinition | HeadingDefinition | HeadingWithIndentationDefinition | HeadingWithNoMarksDefinition | HeadingWithAlignmentDefinition | MediaGroupDefinition | RuleDefinition | PanelDefinition | TableDefinition | TableWithNestedTableDefinition | BodiedExtensionDefinition | BodiedExtensionWithMarksDefinition | ExpandDefinition | ConfluenceUnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
|
6
|
+
import type { BlockCardDefinition, BlockquoteDefinition, BlockquoteLegacyDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CodeBlockDefinition, CodeBlockWithExtendedAttributesStage0Definition, ConfluenceJiraIssueDefinition, ConfluenceUnsupportedBlockDefinition, ConfluenceUnsupportedInlineDefinition, DateDefinition, DateStage0Definition, DecisionListDefinition, EmbedCardDefinition, EmojiDefinition, EmojiStage0Definition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, HardBreakDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithNoMarksDefinition, ImageDefinition, InlineCardDefinition, InlineCardStage0Definition, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, MediaGroupDefinition, MediaInlineDefinition, MediaSingleCaptionDefinition, MediaSingleDefinition, MediaSingleFullDefinition, MediaSingleWidthTypeDefinition, MentionDefinition, MentionStage0Definition, MultiBodiedExtensionStage0Definition, OrderedListDefinition, PanelC1Definition, PanelDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithFontSizeDefinition, ParagraphWithIndentationDefinition, ParagraphWithNoMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StatusStage0Definition, TableDefinition, TableWithNestedTableDefinition, TaskListDefinition, TextCodeInlineDefinition, TextDefinition, TextFormattedDefinition, UnsupportedBlockDefinition, UnsupportedInlineDefinition } from './nodeTypes';
|
|
7
|
+
export type BlockDefinition = Array<BlockCardDefinition | CodeBlockDefinition | CodeBlockWithExtendedAttributesStage0Definition | MediaSingleDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleWidthTypeDefinition | ParagraphDefinition | ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | OrderedListDefinition | BulletListDefinition | BlockquoteDefinition | BlockquoteLegacyDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | ExtensionWithMarksDefinition | HeadingDefinition | HeadingWithIndentationDefinition | HeadingWithNoMarksDefinition | HeadingWithAlignmentDefinition | MediaGroupDefinition | RuleDefinition | PanelDefinition | PanelC1Definition | TableDefinition | TableWithNestedTableDefinition | BodiedExtensionDefinition | BodiedExtensionWithMarksDefinition | ExpandDefinition | ConfluenceUnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
|
8
8
|
export type BlockRootOnlyDefinition = Array<MultiBodiedExtensionStage0Definition>;
|
|
9
9
|
export type InlineDefinition = Array<TextDefinition | TextFormattedDefinition | TextCodeInlineDefinition | DateDefinition | DateStage0Definition | EmojiDefinition | EmojiStage0Definition | HardBreakDefinition | InlineCardDefinition | InlineCardStage0Definition | MentionDefinition | MentionStage0Definition | PlaceholderDefinition | StatusDefinition | StatusStage0Definition | InlineExtensionDefinition | InlineExtensionWithMarksDefinition | MediaInlineDefinition | ImageDefinition | ConfluenceJiraIssueDefinition | ConfluenceUnsupportedInlineDefinition | UnsupportedInlineDefinition>;
|
|
10
10
|
export type NonNestableBlockContentDefinition = Array<ParagraphWithNoMarksDefinition | ParagraphWithFontSizeDefinition | PanelDefinition | BlockquoteDefinition | OrderedListDefinition | BulletListDefinition | RuleDefinition | HeadingWithNoMarksDefinition | CodeBlockDefinition | CodeBlockWithExtendedAttributesStage0Definition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | DecisionListDefinition | TaskListDefinition | TableDefinition | TableWithNestedTableDefinition | BlockCardDefinition | EmbedCardDefinition | ExtensionWithMarksDefinition | UnsupportedBlockDefinition>;
|
|
@@ -751,6 +751,21 @@ export interface PanelDefinition {
|
|
|
751
751
|
}
|
|
752
752
|
export type PanelNode = PMNode & PanelDefinition;
|
|
753
753
|
export declare const panel: PMNodeSpecFactoryInstance<PanelNode>;
|
|
754
|
+
export interface PanelC1Definition {
|
|
755
|
+
type: 'panel';
|
|
756
|
+
content: Array<BlockCardDefinition | BulletListDefinition | CodeBlockDefinition | DecisionListDefinition | ExtensionWithMarksDefinition | HeadingWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithFontSizeDefinition | ParagraphWithNoMarksDefinition | RuleDefinition | TableDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
|
|
757
|
+
marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
|
758
|
+
attrs: {
|
|
759
|
+
panelType: 'info' | 'note' | 'tip' | 'warning' | 'error' | 'success' | 'custom';
|
|
760
|
+
panelIcon?: string;
|
|
761
|
+
panelIconId?: string;
|
|
762
|
+
panelIconText?: string;
|
|
763
|
+
panelColor?: string;
|
|
764
|
+
localId?: string;
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
export type PanelC1Node = PMNode & PanelC1Definition;
|
|
768
|
+
export declare const panelC1: PMNodeSpecFactoryInstance<PanelC1Node>;
|
|
754
769
|
export interface ParagraphDefinition {
|
|
755
770
|
type: 'paragraph';
|
|
756
771
|
content: Array<InlineDefinition>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ADFCommonNodeSpec, ADFNode } from '@atlaskit/adf-schema-generator';
|
|
2
|
-
export declare const panel: ADFNode<[string], ADFCommonNodeSpec>;
|
|
2
|
+
export declare const panel: ADFNode<[string, 'c1'], ADFCommonNodeSpec>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MemoizedFn } from 'memoize-one';
|
|
2
2
|
import type { SchemaConfig } from './create-schema';
|
|
3
3
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'blockTaskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'syncBlock' | 'bodiedSyncBlock' | 'unsupportedBlock' | 'unsupportedInline';
|
|
4
|
+
type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'panel_c1' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'blockTaskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'syncBlock' | 'bodiedSyncBlock' | 'unsupportedBlock' | 'unsupportedInline';
|
|
5
5
|
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'backgroundColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'fontSize' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
|
6
6
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
|
7
7
|
export declare const getSchemaBasedOnStage: MemoizedFn<(this: any, stage?: any) => Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
|
@@ -28,7 +28,7 @@ export { mention, toJSON as mentionToJSON } from './mention';
|
|
|
28
28
|
export type { MentionAttributes, UserType as MentionUserType, MentionDefinition } from './mention';
|
|
29
29
|
export { listItem, listItemWithLocalId } from './list-item';
|
|
30
30
|
export type { ListItemArray, ListItemDefinition } from './types/list';
|
|
31
|
-
export { extendedPanel, extendedPanelWithLocalId, PanelType } from './panel';
|
|
31
|
+
export { extendedPanel, extendedPanelWithLocalId, extendedPanelC1, extendedPanelC1WithLocalId, PanelType, } from './panel';
|
|
32
32
|
export type { PanelAttributes, PanelDefinition } from './panel';
|
|
33
33
|
export { text } from './text';
|
|
34
34
|
export type { TextDefinition } from './text';
|
|
@@ -45,9 +45,20 @@ export interface DOMAttributes {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* @name extended_panel
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
|
+
* it allows more content to be nested as compared to panel node.
|
|
49
50
|
* Specifically, it allows Media, action, code-block, rule and decision nodes in
|
|
50
51
|
* addition to content allowed inside panel
|
|
51
52
|
*/
|
|
52
53
|
export declare const extendedPanel: (allowCustomPanel: boolean) => NodeSpec;
|
|
53
54
|
export declare const extendedPanelWithLocalId: (allowCustomPanel: boolean) => NodeSpec;
|
|
55
|
+
/**
|
|
56
|
+
* @name extended_panel_c1
|
|
57
|
+
*
|
|
58
|
+
* Depth-level-1 variant of panel. Allows all standard panel content
|
|
59
|
+
* plus table nodes. Derives its parseDOM/toDOM behaviour from the same
|
|
60
|
+
* createPanelNodeSpecOptions helper as extendedPanel so that allowCustomPanel
|
|
61
|
+
* and generateLocalId propagate identically.
|
|
62
|
+
*/
|
|
63
|
+
export declare const extendedPanelC1: (allowCustomPanel: boolean) => NodeSpec;
|
|
64
|
+
export declare const extendedPanelC1WithLocalId: (allowCustomPanel: boolean) => NodeSpec;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source files in "packages/adf-schema/src/next-schema" ,
|
|
4
4
|
* and run "yarn workspace @atlaskit/adf-schema build:schema:all" to regenerate this file.
|
|
5
5
|
*/
|
|
6
|
-
import type { BlockCardDefinition, BlockquoteDefinition, BlockquoteLegacyDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CodeBlockDefinition, CodeBlockWithExtendedAttributesStage0Definition, ConfluenceJiraIssueDefinition, ConfluenceUnsupportedBlockDefinition, ConfluenceUnsupportedInlineDefinition, DateDefinition, DateStage0Definition, DecisionListDefinition, EmbedCardDefinition, EmojiDefinition, EmojiStage0Definition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, HardBreakDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithNoMarksDefinition, ImageDefinition, InlineCardDefinition, InlineCardStage0Definition, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, MediaGroupDefinition, MediaInlineDefinition, MediaSingleCaptionDefinition, MediaSingleDefinition, MediaSingleFullDefinition, MediaSingleWidthTypeDefinition, MentionDefinition, MentionStage0Definition, MultiBodiedExtensionStage0Definition, OrderedListDefinition, PanelDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithFontSizeDefinition, ParagraphWithIndentationDefinition, ParagraphWithNoMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StatusStage0Definition, TableDefinition, TableWithNestedTableDefinition, TaskListDefinition, TextCodeInlineDefinition, TextDefinition, TextFormattedDefinition, UnsupportedBlockDefinition, UnsupportedInlineDefinition } from './nodeTypes';
|
|
7
|
-
export type BlockDefinition = Array<BlockCardDefinition | CodeBlockDefinition | CodeBlockWithExtendedAttributesStage0Definition | MediaSingleDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleWidthTypeDefinition | ParagraphDefinition | ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | OrderedListDefinition | BulletListDefinition | BlockquoteDefinition | BlockquoteLegacyDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | ExtensionWithMarksDefinition | HeadingDefinition | HeadingWithIndentationDefinition | HeadingWithNoMarksDefinition | HeadingWithAlignmentDefinition | MediaGroupDefinition | RuleDefinition | PanelDefinition | TableDefinition | TableWithNestedTableDefinition | BodiedExtensionDefinition | BodiedExtensionWithMarksDefinition | ExpandDefinition | ConfluenceUnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
|
6
|
+
import type { BlockCardDefinition, BlockquoteDefinition, BlockquoteLegacyDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CodeBlockDefinition, CodeBlockWithExtendedAttributesStage0Definition, ConfluenceJiraIssueDefinition, ConfluenceUnsupportedBlockDefinition, ConfluenceUnsupportedInlineDefinition, DateDefinition, DateStage0Definition, DecisionListDefinition, EmbedCardDefinition, EmojiDefinition, EmojiStage0Definition, ExpandDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, HardBreakDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithNoMarksDefinition, ImageDefinition, InlineCardDefinition, InlineCardStage0Definition, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, MediaGroupDefinition, MediaInlineDefinition, MediaSingleCaptionDefinition, MediaSingleDefinition, MediaSingleFullDefinition, MediaSingleWidthTypeDefinition, MentionDefinition, MentionStage0Definition, MultiBodiedExtensionStage0Definition, OrderedListDefinition, PanelC1Definition, PanelDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithFontSizeDefinition, ParagraphWithIndentationDefinition, ParagraphWithNoMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StatusStage0Definition, TableDefinition, TableWithNestedTableDefinition, TaskListDefinition, TextCodeInlineDefinition, TextDefinition, TextFormattedDefinition, UnsupportedBlockDefinition, UnsupportedInlineDefinition } from './nodeTypes';
|
|
7
|
+
export type BlockDefinition = Array<BlockCardDefinition | CodeBlockDefinition | CodeBlockWithExtendedAttributesStage0Definition | MediaSingleDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleWidthTypeDefinition | ParagraphDefinition | ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | OrderedListDefinition | BulletListDefinition | BlockquoteDefinition | BlockquoteLegacyDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | ExtensionWithMarksDefinition | HeadingDefinition | HeadingWithIndentationDefinition | HeadingWithNoMarksDefinition | HeadingWithAlignmentDefinition | MediaGroupDefinition | RuleDefinition | PanelDefinition | PanelC1Definition | TableDefinition | TableWithNestedTableDefinition | BodiedExtensionDefinition | BodiedExtensionWithMarksDefinition | ExpandDefinition | ConfluenceUnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
|
8
8
|
export type BlockRootOnlyDefinition = Array<MultiBodiedExtensionStage0Definition>;
|
|
9
9
|
export type InlineDefinition = Array<TextDefinition | TextFormattedDefinition | TextCodeInlineDefinition | DateDefinition | DateStage0Definition | EmojiDefinition | EmojiStage0Definition | HardBreakDefinition | InlineCardDefinition | InlineCardStage0Definition | MentionDefinition | MentionStage0Definition | PlaceholderDefinition | StatusDefinition | StatusStage0Definition | InlineExtensionDefinition | InlineExtensionWithMarksDefinition | MediaInlineDefinition | ImageDefinition | ConfluenceJiraIssueDefinition | ConfluenceUnsupportedInlineDefinition | UnsupportedInlineDefinition>;
|
|
10
10
|
export type NonNestableBlockContentDefinition = Array<ParagraphWithNoMarksDefinition | ParagraphWithFontSizeDefinition | PanelDefinition | BlockquoteDefinition | OrderedListDefinition | BulletListDefinition | RuleDefinition | HeadingWithNoMarksDefinition | CodeBlockDefinition | CodeBlockWithExtendedAttributesStage0Definition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | DecisionListDefinition | TaskListDefinition | TableDefinition | TableWithNestedTableDefinition | BlockCardDefinition | EmbedCardDefinition | ExtensionWithMarksDefinition | UnsupportedBlockDefinition>;
|
|
@@ -751,6 +751,21 @@ export interface PanelDefinition {
|
|
|
751
751
|
}
|
|
752
752
|
export type PanelNode = PMNode & PanelDefinition;
|
|
753
753
|
export declare const panel: PMNodeSpecFactoryInstance<PanelNode>;
|
|
754
|
+
export interface PanelC1Definition {
|
|
755
|
+
type: 'panel';
|
|
756
|
+
content: Array<BlockCardDefinition | BulletListDefinition | CodeBlockDefinition | DecisionListDefinition | ExtensionWithMarksDefinition | HeadingWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithFontSizeDefinition | ParagraphWithNoMarksDefinition | RuleDefinition | TableDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
|
|
757
|
+
marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
|
758
|
+
attrs: {
|
|
759
|
+
panelType: 'info' | 'note' | 'tip' | 'warning' | 'error' | 'success' | 'custom';
|
|
760
|
+
panelIcon?: string;
|
|
761
|
+
panelIconId?: string;
|
|
762
|
+
panelIconText?: string;
|
|
763
|
+
panelColor?: string;
|
|
764
|
+
localId?: string;
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
export type PanelC1Node = PMNode & PanelC1Definition;
|
|
768
|
+
export declare const panelC1: PMNodeSpecFactoryInstance<PanelC1Node>;
|
|
754
769
|
export interface ParagraphDefinition {
|
|
755
770
|
type: 'paragraph';
|
|
756
771
|
content: Array<InlineDefinition>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MemoizedFn } from 'memoize-one';
|
|
2
2
|
import type { SchemaConfig } from './create-schema';
|
|
3
3
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'blockTaskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'syncBlock' | 'bodiedSyncBlock' | 'unsupportedBlock' | 'unsupportedInline';
|
|
4
|
+
type DefaultSchemaNodes = 'doc' | 'paragraph' | 'text' | 'bulletList' | 'orderedList' | 'listItem' | 'heading' | 'blockquote' | 'codeBlock' | 'panel' | 'panel_c1' | 'rule' | 'image' | 'mention' | 'media' | 'caption' | 'mediaGroup' | 'mediaSingle' | 'mediaInline' | 'confluenceUnsupportedBlock' | 'confluenceUnsupportedInline' | 'confluenceJiraIssue' | 'expand' | 'nestedExpand' | 'extension' | 'inlineExtension' | 'bodiedExtension' | 'hardBreak' | 'emoji' | 'table' | 'tableCell' | 'tableHeader' | 'tableRow' | 'decisionList' | 'decisionItem' | 'taskList' | 'taskItem' | 'blockTaskItem' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'syncBlock' | 'bodiedSyncBlock' | 'unsupportedBlock' | 'unsupportedInline';
|
|
5
5
|
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'backgroundColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'fontSize' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
|
6
6
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
|
7
7
|
export declare const getSchemaBasedOnStage: MemoizedFn<(this: any, stage?: any) => Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
|
@@ -28,7 +28,7 @@ export { mention, toJSON as mentionToJSON } from './mention';
|
|
|
28
28
|
export type { MentionAttributes, UserType as MentionUserType, MentionDefinition } from './mention';
|
|
29
29
|
export { listItem, listItemWithLocalId } from './list-item';
|
|
30
30
|
export type { ListItemArray, ListItemDefinition } from './types/list';
|
|
31
|
-
export { extendedPanel, extendedPanelWithLocalId, PanelType } from './panel';
|
|
31
|
+
export { extendedPanel, extendedPanelWithLocalId, extendedPanelC1, extendedPanelC1WithLocalId, PanelType, } from './panel';
|
|
32
32
|
export type { PanelAttributes, PanelDefinition } from './panel';
|
|
33
33
|
export { text } from './text';
|
|
34
34
|
export type { TextDefinition } from './text';
|
|
@@ -45,9 +45,20 @@ export interface DOMAttributes {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* @name extended_panel
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
|
+
* it allows more content to be nested as compared to panel node.
|
|
49
50
|
* Specifically, it allows Media, action, code-block, rule and decision nodes in
|
|
50
51
|
* addition to content allowed inside panel
|
|
51
52
|
*/
|
|
52
53
|
export declare const extendedPanel: (allowCustomPanel: boolean) => NodeSpec;
|
|
53
54
|
export declare const extendedPanelWithLocalId: (allowCustomPanel: boolean) => NodeSpec;
|
|
55
|
+
/**
|
|
56
|
+
* @name extended_panel_c1
|
|
57
|
+
*
|
|
58
|
+
* Depth-level-1 variant of panel. Allows all standard panel content
|
|
59
|
+
* plus table nodes. Derives its parseDOM/toDOM behaviour from the same
|
|
60
|
+
* createPanelNodeSpecOptions helper as extendedPanel so that allowCustomPanel
|
|
61
|
+
* and generateLocalId propagate identically.
|
|
62
|
+
*/
|
|
63
|
+
export declare const extendedPanelC1: (allowCustomPanel: boolean) => NodeSpec;
|
|
64
|
+
export declare const extendedPanelC1WithLocalId: (allowCustomPanel: boolean) => NodeSpec;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-schema",
|
|
3
|
-
"version": "52.
|
|
3
|
+
"version": "52.13.0",
|
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
"build:schema:all": "yarn build:schema:pm && yarn build:schema:json && yarn build:schema:validator"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@atlaskit/adf-schema-generator": "^2.
|
|
40
|
+
"@atlaskit/adf-schema-generator": "^2.3.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^82.0.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"css-color-names": "0.0.4",
|
|
46
46
|
"linkify-it": "^3.0.3",
|
|
47
47
|
"memoize-one": "^6.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@atlaskit/codemod-utils": "^4.
|
|
50
|
+
"@atlaskit/codemod-utils": "^4.3.0",
|
|
51
51
|
"@atlassian/adf-schema-json": "^1.33.0",
|
|
52
52
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
53
53
|
"@babel/cli": "^7.20.0",
|