@atlaskit/adf-schema 50.2.3 → 50.3.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 +2 -2
- package/dist/cjs/next-schema/generated/nodeTypes.js +2 -2
- package/dist/cjs/next-schema/nodes/task.js +1 -2
- package/dist/cjs/schema/create-schema.js +3 -0
- package/dist/cjs/schema/default-schema.js +2 -3
- package/dist/cjs/schema/index.js +2 -2
- package/dist/cjs/schema/nodes/index.js +2 -2
- package/dist/cjs/schema/nodes/tableNodes.js +3 -1
- package/dist/cjs/schema/nodes/task-item.js +2 -2
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +1 -1
- package/dist/es2019/next-schema/nodes/task.js +1 -2
- package/dist/es2019/schema/create-schema.js +4 -1
- package/dist/es2019/schema/default-schema.js +3 -4
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/schema/nodes/tableNodes.js +3 -1
- package/dist/es2019/schema/nodes/task-item.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +1 -1
- package/dist/esm/next-schema/nodes/task.js +1 -2
- package/dist/esm/schema/create-schema.js +4 -1
- package/dist/esm/schema/default-schema.js +3 -4
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/schema/nodes/tableNodes.js +3 -1
- package/dist/esm/schema/nodes/task-item.js +2 -2
- package/dist/json-schema/v1/full.json +60 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +4 -4
- package/dist/types/schema/default-schema.d.ts +1 -1
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +1 -1
- package/dist/types/schema/nodes/task-item.d.ts +1 -1
- package/json-schema/v1/full.json +60 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 50.3.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- 5e27e9b: EDITOR-1432 Promote blockTaskItem to the full schema
|
8
|
+
|
9
|
+
## 50.2.4
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 79c4757: Added fix for table cell attribute parser which was not correctly identifying background colors when the data-cell-background attribute was not lowercase
|
14
|
+
|
3
15
|
## 50.2.3
|
4
16
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
@@ -351,10 +351,10 @@ Object.defineProperty(exports, "blockCardWithLocalId", {
|
|
351
351
|
return _schema.blockCardWithLocalId;
|
352
352
|
}
|
353
353
|
});
|
354
|
-
Object.defineProperty(exports, "
|
354
|
+
Object.defineProperty(exports, "blockTaskItem", {
|
355
355
|
enumerable: true,
|
356
356
|
get: function get() {
|
357
|
-
return _schema.
|
357
|
+
return _schema.blockTaskItem;
|
358
358
|
}
|
359
359
|
});
|
360
360
|
Object.defineProperty(exports, "blockquote", {
|
@@ -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.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = 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.listItemWithNestedDecisionStage0 = 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.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.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = 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.listItemWithNestedDecisionStage0 = 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.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.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = 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
|
@@ -60,7 +60,7 @@ var blockquoteLegacy = exports.blockquoteLegacy = (0, _createPMSpecFactory.creat
|
|
60
60
|
selectable: true,
|
61
61
|
defining: true
|
62
62
|
});
|
63
|
-
var
|
63
|
+
var blockTaskItem = exports.blockTaskItem = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
64
64
|
content: '(paragraph | extension) (paragraph | extension)*',
|
65
65
|
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
66
66
|
attrs: {
|
@@ -44,8 +44,7 @@ blockTaskItem.define(_objectSpread(_objectSpread({}, commonTaskItemProps), {}, {
|
|
44
44
|
allowAnyChildMark: false,
|
45
45
|
// Override the commonTaskItemProps setting
|
46
46
|
contentMinItems: 1,
|
47
|
-
content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _extension.extension.use('with_marks')), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _extension.extension.use('with_marks')))]
|
48
|
-
stage0: true
|
47
|
+
content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _extension.extension.use('with_marks')), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _extension.extension.use('with_marks')))]
|
49
48
|
}));
|
50
49
|
taskList.define({
|
51
50
|
defining: true,
|
@@ -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', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
|
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', 'unsupportedBlock', 'unsupportedInline'],
|
14
14
|
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
15
15
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
16
16
|
'fragment']
|
@@ -31,8 +31,7 @@ var getSchemaBasedOnStage = exports.getSchemaBasedOnStage = (0, _memoizeOne.defa
|
|
31
31
|
table: _nodes.tableWithNestedTable,
|
32
32
|
tableRow: _nodes.tableRowWithNestedTable,
|
33
33
|
tableCell: _nodes.tableCellWithNestedTable,
|
34
|
-
tableHeader: _nodes.tableHeaderWithNestedTable
|
35
|
-
blockTaskItem: _nodes.blockTaskItemStage0
|
34
|
+
tableHeader: _nodes.tableHeaderWithNestedTable
|
36
35
|
};
|
37
36
|
}
|
38
37
|
return (0, _createSchema.createSchema)(defaultSchemaConfig);
|
package/dist/cjs/schema/index.js
CHANGED
@@ -69,10 +69,10 @@ Object.defineProperty(exports, "blockCardWithLocalId", {
|
|
69
69
|
return _nodes.blockCardWithLocalId;
|
70
70
|
}
|
71
71
|
});
|
72
|
-
Object.defineProperty(exports, "
|
72
|
+
Object.defineProperty(exports, "blockTaskItem", {
|
73
73
|
enumerable: true,
|
74
74
|
get: function get() {
|
75
|
-
return _nodes.
|
75
|
+
return _nodes.blockTaskItem;
|
76
76
|
}
|
77
77
|
});
|
78
78
|
Object.defineProperty(exports, "blockquote", {
|
@@ -22,10 +22,10 @@ Object.defineProperty(exports, "blockCardWithLocalId", {
|
|
22
22
|
return _blockCard.blockCardWithLocalId;
|
23
23
|
}
|
24
24
|
});
|
25
|
-
Object.defineProperty(exports, "
|
25
|
+
Object.defineProperty(exports, "blockTaskItem", {
|
26
26
|
enumerable: true,
|
27
27
|
get: function get() {
|
28
|
-
return _taskItem.
|
28
|
+
return _taskItem.blockTaskItem;
|
29
29
|
}
|
30
30
|
});
|
31
31
|
Object.defineProperty(exports, "blockquote", {
|
@@ -172,7 +172,9 @@ var getCellDomAttrs = exports.getCellDomAttrs = function getCellDomAttrs(node) {
|
|
172
172
|
if (color) {
|
173
173
|
attrs['data-cell-background'] = color;
|
174
174
|
}
|
175
|
-
|
175
|
+
if (typeof color === 'string') {
|
176
|
+
attrs.colorname = tableBackgroundColorPalette.get(color.toLowerCase());
|
177
|
+
}
|
176
178
|
}
|
177
179
|
}
|
178
180
|
if (nodeType === 'tableHeader') {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.taskItem = exports.
|
6
|
+
exports.taskItem = exports.blockTaskItem = void 0;
|
7
7
|
var _uuid = require("../../utils/uuid");
|
8
8
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
9
9
|
/**
|
@@ -38,7 +38,7 @@ var taskItem = exports.taskItem = (0, _nodeTypes.taskItem)({
|
|
38
38
|
return ['div', attrs, 0];
|
39
39
|
}
|
40
40
|
});
|
41
|
-
var
|
41
|
+
var blockTaskItem = exports.blockTaskItem = (0, _nodeTypes.blockTaskItem)({
|
42
42
|
parseDOM: [{
|
43
43
|
tag: 'div[data-task-is-block]',
|
44
44
|
// Default priority is 50. We normally don't change this but since this node type is
|
package/dist/es2019/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, 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, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem,
|
2
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } 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
|
@@ -54,7 +54,7 @@ export const blockquoteLegacy = createPMNodeSpecFactory({
|
|
54
54
|
selectable: true,
|
55
55
|
defining: true
|
56
56
|
});
|
57
|
-
export const
|
57
|
+
export const blockTaskItem = createPMNodeSpecFactory({
|
58
58
|
content: '(paragraph | extension) (paragraph | extension)*',
|
59
59
|
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
60
60
|
attrs: {
|
@@ -36,8 +36,7 @@ blockTaskItem.define({
|
|
36
36
|
allowAnyChildMark: false,
|
37
37
|
// Override the commonTaskItemProps setting
|
38
38
|
contentMinItems: 1,
|
39
|
-
content: [$or(paragraph.use('with_no_marks'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), extension.use('with_marks')))]
|
40
|
-
stage0: true
|
39
|
+
content: [$or(paragraph.use('with_no_marks'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), extension.use('with_marks')))]
|
41
40
|
});
|
42
41
|
taskList.define({
|
43
42
|
defining: true,
|
@@ -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, 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, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote } from './nodes';
|
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 } from './nodes';
|
6
6
|
function addItems(builtInItems, config, customSpecs = {}) {
|
7
7
|
if (!config) {
|
8
8
|
return {};
|
@@ -152,6 +152,9 @@ const nodesInOrder = [{
|
|
152
152
|
}, {
|
153
153
|
name: 'taskItem',
|
154
154
|
spec: taskItem
|
155
|
+
}, {
|
156
|
+
name: 'blockTaskItem',
|
157
|
+
spec: blockTaskItem
|
155
158
|
}, {
|
156
159
|
name: 'date',
|
157
160
|
spec: date
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithDecisionStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithDecisionStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
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', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
|
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', 'unsupportedBlock', 'unsupportedInline'],
|
7
7
|
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
8
8
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
9
9
|
'fragment']
|
@@ -23,8 +23,7 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
|
|
23
23
|
table: tableWithNestedTable,
|
24
24
|
tableRow: tableRowWithNestedTable,
|
25
25
|
tableCell: tableCellWithNestedTable,
|
26
|
-
tableHeader: tableHeaderWithNestedTable
|
27
|
-
blockTaskItem: blockTaskItemStage0
|
26
|
+
tableHeader: tableHeaderWithNestedTable
|
28
27
|
};
|
29
28
|
}
|
30
29
|
return createSchema(defaultSchemaConfig);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem,
|
1
|
+
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } 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, backgroundColorPaletteNext } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -27,7 +27,7 @@ export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNest
|
|
27
27
|
export { decisionList, decisionListSelector } from './decision-list';
|
28
28
|
export { decisionItem } from './decision-item';
|
29
29
|
export { taskList, taskListSelector } from './task-list';
|
30
|
-
export { taskItem,
|
30
|
+
export { taskItem, blockTaskItem } from './task-item';
|
31
31
|
export { date, dateWithLocalId } from './date';
|
32
32
|
export { placeholder, placeholderWithLocalId } from './placeholder';
|
33
33
|
export { layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId } from './layout-section';
|
@@ -163,7 +163,9 @@ export const getCellDomAttrs = node => {
|
|
163
163
|
if (color) {
|
164
164
|
attrs['data-cell-background'] = color;
|
165
165
|
}
|
166
|
-
|
166
|
+
if (typeof color === 'string') {
|
167
|
+
attrs.colorname = tableBackgroundColorPalette.get(color.toLowerCase());
|
168
|
+
}
|
167
169
|
}
|
168
170
|
}
|
169
171
|
if (nodeType === 'tableHeader') {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
2
|
-
import { taskItem as taskItemFactory,
|
2
|
+
import { taskItem as taskItemFactory, blockTaskItem as blockTaskItemFactory } from '../../next-schema/generated/nodeTypes';
|
3
3
|
|
4
4
|
/**
|
5
5
|
* @name taskItem_node
|
@@ -32,7 +32,7 @@ export const taskItem = taskItemFactory({
|
|
32
32
|
return ['div', attrs, 0];
|
33
33
|
}
|
34
34
|
});
|
35
|
-
export const
|
35
|
+
export const blockTaskItem = blockTaskItemFactory({
|
36
36
|
parseDOM: [{
|
37
37
|
tag: 'div[data-task-is-block]',
|
38
38
|
// Default priority is 50. We normally don't change this but since this node type is
|
package/dist/esm/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, 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, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem,
|
2
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } 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
|
@@ -54,7 +54,7 @@ export var blockquoteLegacy = createPMNodeSpecFactory({
|
|
54
54
|
selectable: true,
|
55
55
|
defining: true
|
56
56
|
});
|
57
|
-
export var
|
57
|
+
export var blockTaskItem = createPMNodeSpecFactory({
|
58
58
|
content: '(paragraph | extension) (paragraph | extension)*',
|
59
59
|
marks: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
|
60
60
|
attrs: {
|
@@ -37,8 +37,7 @@ blockTaskItem.define(_objectSpread(_objectSpread({}, commonTaskItemProps), {}, {
|
|
37
37
|
allowAnyChildMark: false,
|
38
38
|
// Override the commonTaskItemProps setting
|
39
39
|
contentMinItems: 1,
|
40
|
-
content: [$or(paragraph.use('with_no_marks'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), extension.use('with_marks')))]
|
41
|
-
stage0: true
|
40
|
+
content: [$or(paragraph.use('with_no_marks'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), extension.use('with_marks')))]
|
42
41
|
}));
|
43
42
|
taskList.define({
|
44
43
|
defining: true,
|
@@ -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, 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, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote } from './nodes';
|
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 } from './nodes';
|
6
6
|
function addItems(builtInItems, config) {
|
7
7
|
var customSpecs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
8
8
|
if (!config) {
|
@@ -154,6 +154,9 @@ var nodesInOrder = [{
|
|
154
154
|
}, {
|
155
155
|
name: 'taskItem',
|
156
156
|
spec: taskItem
|
157
|
+
}, {
|
158
|
+
name: 'blockTaskItem',
|
159
|
+
spec: blockTaskItem
|
157
160
|
}, {
|
158
161
|
name: 'date',
|
159
162
|
spec: date
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithDecisionStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithDecisionStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
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', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'unsupportedBlock', 'unsupportedInline'],
|
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', 'unsupportedBlock', 'unsupportedInline'],
|
7
7
|
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
8
8
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
9
9
|
'fragment']
|
@@ -24,8 +24,7 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
|
|
24
24
|
table: tableWithNestedTable,
|
25
25
|
tableRow: tableRowWithNestedTable,
|
26
26
|
tableCell: tableCellWithNestedTable,
|
27
|
-
tableHeader: tableHeaderWithNestedTable
|
28
|
-
blockTaskItem: blockTaskItemStage0
|
27
|
+
tableHeader: tableHeaderWithNestedTable
|
29
28
|
};
|
30
29
|
}
|
31
30
|
return createSchema(defaultSchemaConfig);
|
package/dist/esm/schema/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem,
|
1
|
+
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } 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, backgroundColorPaletteNext } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -27,7 +27,7 @@ export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNest
|
|
27
27
|
export { decisionList, decisionListSelector } from './decision-list';
|
28
28
|
export { decisionItem } from './decision-item';
|
29
29
|
export { taskList, taskListSelector } from './task-list';
|
30
|
-
export { taskItem,
|
30
|
+
export { taskItem, blockTaskItem } from './task-item';
|
31
31
|
export { date, dateWithLocalId } from './date';
|
32
32
|
export { placeholder, placeholderWithLocalId } from './placeholder';
|
33
33
|
export { layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId } from './layout-section';
|
@@ -165,7 +165,9 @@ export var getCellDomAttrs = function getCellDomAttrs(node) {
|
|
165
165
|
if (color) {
|
166
166
|
attrs['data-cell-background'] = color;
|
167
167
|
}
|
168
|
-
|
168
|
+
if (typeof color === 'string') {
|
169
|
+
attrs.colorname = tableBackgroundColorPalette.get(color.toLowerCase());
|
170
|
+
}
|
169
171
|
}
|
170
172
|
}
|
171
173
|
if (nodeType === 'tableHeader') {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { uuid } from '../../utils/uuid';
|
2
|
-
import { taskItem as taskItemFactory,
|
2
|
+
import { taskItem as taskItemFactory, blockTaskItem as blockTaskItemFactory } from '../../next-schema/generated/nodeTypes';
|
3
3
|
|
4
4
|
/**
|
5
5
|
* @name taskItem_node
|
@@ -33,7 +33,7 @@ export var taskItem = taskItemFactory({
|
|
33
33
|
return ['div', attrs, 0];
|
34
34
|
}
|
35
35
|
});
|
36
|
-
export var
|
36
|
+
export var blockTaskItem = blockTaskItemFactory({
|
37
37
|
parseDOM: [{
|
38
38
|
tag: 'div[data-task-is-block]',
|
39
39
|
// Default priority is 50. We normally don't change this but since this node type is
|
@@ -282,6 +282,55 @@
|
|
282
282
|
"additionalProperties": false,
|
283
283
|
"required": ["type", "content"]
|
284
284
|
},
|
285
|
+
"blockTaskItem_node": {
|
286
|
+
"type": "object",
|
287
|
+
"properties": {
|
288
|
+
"type": {
|
289
|
+
"enum": ["blockTaskItem"]
|
290
|
+
},
|
291
|
+
"attrs": {
|
292
|
+
"type": "object",
|
293
|
+
"properties": {
|
294
|
+
"localId": {
|
295
|
+
"type": "string"
|
296
|
+
},
|
297
|
+
"state": {
|
298
|
+
"enum": ["TODO", "DONE"]
|
299
|
+
}
|
300
|
+
},
|
301
|
+
"required": ["localId", "state"],
|
302
|
+
"additionalProperties": false
|
303
|
+
},
|
304
|
+
"content": {
|
305
|
+
"type": "array",
|
306
|
+
"items": [
|
307
|
+
{
|
308
|
+
"anyOf": [
|
309
|
+
{
|
310
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
311
|
+
},
|
312
|
+
{
|
313
|
+
"$ref": "#/definitions/extension_with_marks_node"
|
314
|
+
}
|
315
|
+
]
|
316
|
+
},
|
317
|
+
{
|
318
|
+
"anyOf": [
|
319
|
+
{
|
320
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
321
|
+
},
|
322
|
+
{
|
323
|
+
"$ref": "#/definitions/extension_with_marks_node"
|
324
|
+
}
|
325
|
+
]
|
326
|
+
}
|
327
|
+
],
|
328
|
+
"minItems": 1
|
329
|
+
}
|
330
|
+
},
|
331
|
+
"additionalProperties": false,
|
332
|
+
"required": ["type", "attrs", "content"]
|
333
|
+
},
|
285
334
|
"bodiedExtension_node": {
|
286
335
|
"type": "object",
|
287
336
|
"properties": {
|
@@ -2622,7 +2671,14 @@
|
|
2622
2671
|
"type": "array",
|
2623
2672
|
"items": [
|
2624
2673
|
{
|
2625
|
-
"
|
2674
|
+
"anyOf": [
|
2675
|
+
{
|
2676
|
+
"$ref": "#/definitions/taskItem_node"
|
2677
|
+
},
|
2678
|
+
{
|
2679
|
+
"$ref": "#/definitions/blockTaskItem_node"
|
2680
|
+
}
|
2681
|
+
]
|
2626
2682
|
},
|
2627
2683
|
{
|
2628
2684
|
"anyOf": [
|
@@ -2631,6 +2687,9 @@
|
|
2631
2687
|
},
|
2632
2688
|
{
|
2633
2689
|
"$ref": "#/definitions/taskList_node"
|
2690
|
+
},
|
2691
|
+
{
|
2692
|
+
"$ref": "#/definitions/blockTaskItem_node"
|
2634
2693
|
}
|
2635
2694
|
]
|
2636
2695
|
}
|
package/dist/types/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
|
2
2
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
|
-
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem,
|
3
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './schema';
|
4
4
|
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, BlockTaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, MultiBodiedExtensionDefinition, ExtensionFrameDefinition, BackgroundColorDefinition, } from './schema';
|
5
5
|
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';
|
6
6
|
export type { Match, NameToEmoji } from './utils';
|
@@ -48,7 +48,7 @@ export interface BlockquoteLegacyDefinition {
|
|
48
48
|
}
|
49
49
|
export type BlockquoteLegacyNode = PMNode & BlockquoteLegacyDefinition;
|
50
50
|
export declare const blockquoteLegacy: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<BlockquoteLegacyNode>) => import("prosemirror-model").NodeSpec;
|
51
|
-
export interface
|
51
|
+
export interface BlockTaskItemDefinition {
|
52
52
|
type: 'blockTaskItem';
|
53
53
|
content: Array<ExtensionWithMarksDefinition | ExtensionWithMarksDefinition | ParagraphWithNoMarksDefinition | ParagraphWithNoMarksDefinition>;
|
54
54
|
marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
@@ -57,8 +57,8 @@ export interface BlockTaskItemStage0Definition {
|
|
57
57
|
state: 'TODO' | 'DONE';
|
58
58
|
};
|
59
59
|
}
|
60
|
-
export type
|
61
|
-
export declare const
|
60
|
+
export type BlockTaskItemNode = PMNode & BlockTaskItemDefinition;
|
61
|
+
export declare const blockTaskItem: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<BlockTaskItemNode>) => import("prosemirror-model").NodeSpec;
|
62
62
|
export interface BodiedExtensionDefinition {
|
63
63
|
type: 'bodiedExtension';
|
64
64
|
content: Array<BlockCardDefinition | BlockquoteDefinition | BulletListDefinition | CodeBlockDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionWithMarksDefinition | HeadingWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | PanelDefinition | ParagraphWithNoMarksDefinition | RuleDefinition | TableDefinition | TableWithNestedTableDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
|
@@ -907,7 +907,7 @@ export type TaskItemNode = PMNode & TaskItemDefinition;
|
|
907
907
|
export declare const taskItem: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<TaskItemNode>) => import("prosemirror-model").NodeSpec;
|
908
908
|
export interface TaskListDefinition {
|
909
909
|
type: 'taskList';
|
910
|
-
content: Array<
|
910
|
+
content: Array<BlockTaskItemDefinition | BlockTaskItemDefinition | TaskItemDefinition | TaskItemDefinition | TaskListDefinition | UnsupportedBlockDefinition | UnsupportedBlockDefinition>;
|
911
911
|
marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
912
912
|
attrs: {
|
913
913
|
localId: string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SchemaConfig } from './create-schema';
|
2
|
-
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' | 'unknownBlock' | 'date' | 'status' | 'placeholder' | 'layoutSection' | 'layoutColumn' | 'inlineCard' | 'blockCard' | 'embedCard' | 'unsupportedBlock' | 'unsupportedInline';
|
2
|
+
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' | 'unsupportedBlock' | 'unsupportedInline';
|
3
3
|
type DefaultSchemaMarks = 'link' | 'em' | 'strong' | 'strike' | 'subsup' | 'underline' | 'code' | 'textColor' | 'backgroundColor' | 'confluenceInlineComment' | 'breakout' | 'alignment' | 'indentation' | 'annotation' | 'border' | 'unsupportedMark' | 'unsupportedNodeAttribute' | 'typeAheadQuery' | 'dataConsumer' | 'fragment';
|
4
4
|
export declare const defaultSchemaConfig: SchemaConfig<DefaultSchemaNodes, DefaultSchemaMarks>;
|
5
5
|
export declare const getSchemaBasedOnStage: import("memoize-one").MemoizedFn<(this: any, stage?: any) => import("prosemirror-model").Schema<DefaultSchemaNodes, DefaultSchemaMarks>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem,
|
1
|
+
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './nodes';
|
2
2
|
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableWithNestedTableDefinition, TableRowWithNestedTableDefinition, TableCellWithNestedTableDefinition, TableHeaderWithNestedTableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, BlockTaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
@@ -51,7 +51,7 @@ export { decisionItem } from './decision-item';
|
|
51
51
|
export type { DecisionItemDefinition } from './decision-item';
|
52
52
|
export { taskList, taskListSelector } from './task-list';
|
53
53
|
export type { TaskListDefinition, TaskListContent } from './task-list';
|
54
|
-
export { taskItem,
|
54
|
+
export { taskItem, blockTaskItem } from './task-item';
|
55
55
|
export type { TaskItemDefinition, BlockTaskItemDefinition } from './task-item';
|
56
56
|
export { date, dateWithLocalId } from './date';
|
57
57
|
export type { DateDefinition } from './date';
|
@@ -30,4 +30,4 @@ export interface BlockTaskItemDefinition {
|
|
30
30
|
};
|
31
31
|
}
|
32
32
|
export declare const taskItem: import("prosemirror-model").NodeSpec;
|
33
|
-
export declare const
|
33
|
+
export declare const blockTaskItem: import("prosemirror-model").NodeSpec;
|
package/json-schema/v1/full.json
CHANGED
@@ -282,6 +282,55 @@
|
|
282
282
|
"additionalProperties": false,
|
283
283
|
"required": ["type", "content"]
|
284
284
|
},
|
285
|
+
"blockTaskItem_node": {
|
286
|
+
"type": "object",
|
287
|
+
"properties": {
|
288
|
+
"type": {
|
289
|
+
"enum": ["blockTaskItem"]
|
290
|
+
},
|
291
|
+
"attrs": {
|
292
|
+
"type": "object",
|
293
|
+
"properties": {
|
294
|
+
"localId": {
|
295
|
+
"type": "string"
|
296
|
+
},
|
297
|
+
"state": {
|
298
|
+
"enum": ["TODO", "DONE"]
|
299
|
+
}
|
300
|
+
},
|
301
|
+
"required": ["localId", "state"],
|
302
|
+
"additionalProperties": false
|
303
|
+
},
|
304
|
+
"content": {
|
305
|
+
"type": "array",
|
306
|
+
"items": [
|
307
|
+
{
|
308
|
+
"anyOf": [
|
309
|
+
{
|
310
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
311
|
+
},
|
312
|
+
{
|
313
|
+
"$ref": "#/definitions/extension_with_marks_node"
|
314
|
+
}
|
315
|
+
]
|
316
|
+
},
|
317
|
+
{
|
318
|
+
"anyOf": [
|
319
|
+
{
|
320
|
+
"$ref": "#/definitions/paragraph_with_no_marks_node"
|
321
|
+
},
|
322
|
+
{
|
323
|
+
"$ref": "#/definitions/extension_with_marks_node"
|
324
|
+
}
|
325
|
+
]
|
326
|
+
}
|
327
|
+
],
|
328
|
+
"minItems": 1
|
329
|
+
}
|
330
|
+
},
|
331
|
+
"additionalProperties": false,
|
332
|
+
"required": ["type", "attrs", "content"]
|
333
|
+
},
|
285
334
|
"bodiedExtension_node": {
|
286
335
|
"type": "object",
|
287
336
|
"properties": {
|
@@ -2622,7 +2671,14 @@
|
|
2622
2671
|
"type": "array",
|
2623
2672
|
"items": [
|
2624
2673
|
{
|
2625
|
-
"
|
2674
|
+
"anyOf": [
|
2675
|
+
{
|
2676
|
+
"$ref": "#/definitions/taskItem_node"
|
2677
|
+
},
|
2678
|
+
{
|
2679
|
+
"$ref": "#/definitions/blockTaskItem_node"
|
2680
|
+
}
|
2681
|
+
]
|
2626
2682
|
},
|
2627
2683
|
{
|
2628
2684
|
"anyOf": [
|
@@ -2631,6 +2687,9 @@
|
|
2631
2687
|
},
|
2632
2688
|
{
|
2633
2689
|
"$ref": "#/definitions/taskList_node"
|
2690
|
+
},
|
2691
|
+
{
|
2692
|
+
"$ref": "#/definitions/blockTaskItem_node"
|
2634
2693
|
}
|
2635
2694
|
]
|
2636
2695
|
}
|
package/package.json
CHANGED