@atlaskit/adf-schema 49.1.0 → 50.0.1
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 +18 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +22 -0
- package/dist/cjs/next-schema/nodes/tableNodes.js +17 -0
- package/dist/cjs/schema/index.js +18 -0
- package/dist/cjs/schema/nodes/index.js +18 -0
- package/dist/cjs/schema/nodes/tableNodes.js +69 -6
- package/dist/cjs/steps/types.js +5 -0
- package/dist/cjs/validator-schema/generated/validatorSpec.js +17 -0
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +22 -0
- package/dist/es2019/next-schema/nodes/tableNodes.js +17 -0
- package/dist/es2019/schema/default-schema.js +1 -1
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/schema/nodes/tableNodes.js +59 -3
- package/dist/es2019/steps/types.js +1 -0
- package/dist/es2019/validator-schema/generated/validatorSpec.js +17 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +22 -0
- package/dist/esm/next-schema/nodes/tableNodes.js +17 -0
- package/dist/esm/schema/default-schema.js +1 -1
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/schema/nodes/tableNodes.js +68 -5
- package/dist/esm/steps/types.js +1 -0
- package/dist/esm/validator-schema/generated/validatorSpec.js +17 -0
- package/dist/json-schema/v1/full.json +15 -0
- package/dist/json-schema/v1/stage-0.json +15 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeTypes.d.ts +10 -0
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +1 -1
- package/dist/types/schema/nodes/tableNodes.d.ts +6 -0
- package/dist/types/steps/override-document-step.d.ts +2 -3
- package/dist/types/steps/types.d.ts +96 -0
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +17 -0
- package/json-schema/v1/full.json +15 -0
- package/json-schema/v1/stage-0.json +15 -0
- package/package.json +1 -1
@@ -1678,6 +1678,10 @@ export const tableCell = {
|
|
1678
1678
|
background: {
|
1679
1679
|
type: 'string',
|
1680
1680
|
optional: true
|
1681
|
+
},
|
1682
|
+
localId: {
|
1683
|
+
type: 'string',
|
1684
|
+
optional: true
|
1681
1685
|
}
|
1682
1686
|
},
|
1683
1687
|
optional: true
|
@@ -1717,6 +1721,10 @@ export const tableHeader = {
|
|
1717
1721
|
background: {
|
1718
1722
|
type: 'string',
|
1719
1723
|
optional: true
|
1724
|
+
},
|
1725
|
+
localId: {
|
1726
|
+
type: 'string',
|
1727
|
+
optional: true
|
1720
1728
|
}
|
1721
1729
|
},
|
1722
1730
|
optional: true
|
@@ -1735,6 +1743,15 @@ export const tableRow = {
|
|
1735
1743
|
type: 'enum',
|
1736
1744
|
values: ['tableRow']
|
1737
1745
|
},
|
1746
|
+
attrs: {
|
1747
|
+
props: {
|
1748
|
+
localId: {
|
1749
|
+
type: 'string',
|
1750
|
+
optional: true
|
1751
|
+
}
|
1752
|
+
},
|
1753
|
+
optional: true
|
1754
|
+
},
|
1738
1755
|
content: {
|
1739
1756
|
type: 'array',
|
1740
1757
|
items: [['tableCell', 'tableHeader']]
|
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, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, 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, 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 } from './schema';
|
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, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, 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, 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 } 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
|
@@ -1147,6 +1147,9 @@ export var tableCell = createPMNodeSpecFactory({
|
|
1147
1147
|
},
|
1148
1148
|
background: {
|
1149
1149
|
default: null
|
1150
|
+
},
|
1151
|
+
localId: {
|
1152
|
+
default: null
|
1150
1153
|
}
|
1151
1154
|
},
|
1152
1155
|
selectable: false,
|
@@ -1168,6 +1171,9 @@ export var tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
1168
1171
|
},
|
1169
1172
|
background: {
|
1170
1173
|
default: null
|
1174
|
+
},
|
1175
|
+
localId: {
|
1176
|
+
default: null
|
1171
1177
|
}
|
1172
1178
|
},
|
1173
1179
|
selectable: false,
|
@@ -1189,6 +1195,9 @@ export var tableHeader = createPMNodeSpecFactory({
|
|
1189
1195
|
},
|
1190
1196
|
background: {
|
1191
1197
|
default: null
|
1198
|
+
},
|
1199
|
+
localId: {
|
1200
|
+
default: null
|
1192
1201
|
}
|
1193
1202
|
},
|
1194
1203
|
selectable: false,
|
@@ -1210,6 +1219,9 @@ export var tableHeaderWithNestedTable = createPMNodeSpecFactory({
|
|
1210
1219
|
},
|
1211
1220
|
background: {
|
1212
1221
|
default: null
|
1222
|
+
},
|
1223
|
+
localId: {
|
1224
|
+
default: null
|
1213
1225
|
}
|
1214
1226
|
},
|
1215
1227
|
selectable: false,
|
@@ -1219,12 +1231,22 @@ export var tableHeaderWithNestedTable = createPMNodeSpecFactory({
|
|
1219
1231
|
export var tableRow = createPMNodeSpecFactory({
|
1220
1232
|
content: '(tableCell | tableHeader)+',
|
1221
1233
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
1234
|
+
attrs: {
|
1235
|
+
localId: {
|
1236
|
+
default: null
|
1237
|
+
}
|
1238
|
+
},
|
1222
1239
|
selectable: false,
|
1223
1240
|
tableRole: 'row'
|
1224
1241
|
});
|
1225
1242
|
export var tableRowWithNestedTable = createPMNodeSpecFactory({
|
1226
1243
|
content: '(tableCell | tableHeader)+',
|
1227
1244
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
1245
|
+
attrs: {
|
1246
|
+
localId: {
|
1247
|
+
default: null
|
1248
|
+
}
|
1249
|
+
},
|
1228
1250
|
selectable: false,
|
1229
1251
|
tableRole: 'row'
|
1230
1252
|
});
|
@@ -38,6 +38,11 @@ var tableCell = adfNode('tableCell').define({
|
|
38
38
|
type: 'string',
|
39
39
|
default: null,
|
40
40
|
optional: true
|
41
|
+
},
|
42
|
+
localId: {
|
43
|
+
type: 'string',
|
44
|
+
default: null,
|
45
|
+
optional: true
|
41
46
|
}
|
42
47
|
},
|
43
48
|
content: [tableCellContentPseudoGroup],
|
@@ -81,6 +86,11 @@ var tableHeader = adfNode('tableHeader').define({
|
|
81
86
|
type: 'string',
|
82
87
|
default: null,
|
83
88
|
optional: true
|
89
|
+
},
|
90
|
+
localId: {
|
91
|
+
type: 'string',
|
92
|
+
default: null,
|
93
|
+
optional: true
|
84
94
|
}
|
85
95
|
},
|
86
96
|
content: [tableHeaderContentPseudoGroup],
|
@@ -101,6 +111,13 @@ var tableRow = adfNode('tableRow').define({
|
|
101
111
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
102
112
|
content: [$onePlus($or(tableCell, tableHeader, tableCellContent))],
|
103
113
|
tableRole: 'row',
|
114
|
+
attrs: {
|
115
|
+
localId: {
|
116
|
+
type: 'string',
|
117
|
+
default: null,
|
118
|
+
optional: true
|
119
|
+
}
|
120
|
+
},
|
104
121
|
DANGEROUS_MANUAL_OVERRIDE: {
|
105
122
|
'validator-spec': {
|
106
123
|
'props.content.minItems': {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, 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 = {
|
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, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, 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, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
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, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, 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, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } 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';
|
@@ -23,7 +23,7 @@ export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as m
|
|
23
23
|
export { mediaGroup } from './media-group';
|
24
24
|
export { mediaInline } from './media-inline';
|
25
25
|
export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, toJSON as mediaSingleToJSON } from './media-single';
|
26
|
-
export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
26
|
+
export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
27
27
|
export { decisionList, decisionListSelector } from './decision-list';
|
28
28
|
export { decisionItem } from './decision-item';
|
29
29
|
export { taskList, taskListSelector } from './task-list';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
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; }
|
4
4
|
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; }
|
5
5
|
import { hexToEditorBackgroundPaletteRawValue } from '../../utils/editor-palette';
|
@@ -44,12 +44,15 @@ export var getCellAttrs = function getCellAttrs(dom) {
|
|
44
44
|
}
|
45
45
|
}
|
46
46
|
var backgroundHexCode = dataCellBackgroundHexCode || (backgroundColor && backgroundColor !== defaultValues['background'] ? backgroundColor : null);
|
47
|
-
|
47
|
+
var localId = dom.getAttribute('data-local-id') || defaultValues.localId;
|
48
|
+
return _objectSpread({
|
48
49
|
colspan: colspan,
|
49
50
|
rowspan: Number(dom.getAttribute('rowspan') || 1),
|
50
51
|
colwidth: width && width.length === colspan ? width : null,
|
51
52
|
background: backgroundHexCode
|
52
|
-
}
|
53
|
+
}, localId && {
|
54
|
+
localId: localId
|
55
|
+
});
|
53
56
|
};
|
54
57
|
// these are for test only
|
55
58
|
var testGlobalTheme;
|
@@ -81,6 +84,7 @@ var cssVariablePattern = /^var\(--.*\)$/;
|
|
81
84
|
* @returns CellDomAttrs
|
82
85
|
*/
|
83
86
|
export var getCellDomAttrs = function getCellDomAttrs(node) {
|
87
|
+
var _node$attrs;
|
84
88
|
var attrs = {};
|
85
89
|
var nodeType = node.type.name;
|
86
90
|
if (node.attrs.colspan !== 1) {
|
@@ -169,6 +173,9 @@ export var getCellDomAttrs = function getCellDomAttrs(node) {
|
|
169
173
|
} else {
|
170
174
|
attrs.class = tableCellSelector;
|
171
175
|
}
|
176
|
+
if (node !== null && node !== void 0 && (_node$attrs = node.attrs) !== null && _node$attrs !== void 0 && _node$attrs.localId) {
|
177
|
+
attrs['data-local-id'] = node.attrs.localId;
|
178
|
+
}
|
172
179
|
return attrs;
|
173
180
|
};
|
174
181
|
export var tableBackgroundColorPalette = new Map();
|
@@ -282,6 +289,10 @@ var cellAttrs = {
|
|
282
289
|
},
|
283
290
|
background: {
|
284
291
|
default: null
|
292
|
+
},
|
293
|
+
localId: {
|
294
|
+
default: null,
|
295
|
+
optional: true
|
285
296
|
}
|
286
297
|
};
|
287
298
|
var tableCellNodeSpecOptions = {
|
@@ -304,7 +315,8 @@ export var tableCell = tableCellFactory(tableCellNodeSpecOptions);
|
|
304
315
|
export var toJSONTableCell = function toJSONTableCell(node) {
|
305
316
|
return {
|
306
317
|
attrs: Object.keys(node.attrs).reduce(function (obj, key) {
|
307
|
-
|
318
|
+
// Only process keys that are defined in cellAttrs
|
319
|
+
if (cellAttrs[key] && cellAttrs[key].default !== node.attrs[key]) {
|
308
320
|
obj[key] = node.attrs[key];
|
309
321
|
}
|
310
322
|
return obj;
|
@@ -331,4 +343,55 @@ export var toJSONTableHeader = toJSONTableCell;
|
|
331
343
|
export var tableWithNestedTable = tableWithNestedTableFactory(tableNodeSpecOptions);
|
332
344
|
export var tableRowWithNestedTable = tableRowWithNestedTableFactory(tableRowNodeSpecOptions);
|
333
345
|
export var tableCellWithNestedTable = tableCellWithNestedTableFactory(tableCellNodeSpecOptions);
|
334
|
-
export var tableHeaderWithNestedTable = tableHeaderWithNestedTableFactory(tableHeaderNodeSpecOptions);
|
346
|
+
export var tableHeaderWithNestedTable = tableHeaderWithNestedTableFactory(tableHeaderNodeSpecOptions);
|
347
|
+
|
348
|
+
// table nodes with localId support
|
349
|
+
var tableRowNodeSpecOptionsWithLocalId = {
|
350
|
+
parseDOM: [{
|
351
|
+
tag: 'tr',
|
352
|
+
getAttrs: function getAttrs() {
|
353
|
+
return {
|
354
|
+
localId: uuid.generate()
|
355
|
+
};
|
356
|
+
}
|
357
|
+
}],
|
358
|
+
toDOM: function toDOM(node) {
|
359
|
+
var _node$attrs2;
|
360
|
+
return ['tr', {
|
361
|
+
'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.localId) || undefined
|
362
|
+
}, 0];
|
363
|
+
}
|
364
|
+
};
|
365
|
+
export var tableRowWithLocalId = tableRowFactory(tableRowNodeSpecOptionsWithLocalId);
|
366
|
+
var tableCellNodeSpecOptionsWithLocalId = {
|
367
|
+
parseDOM: [{
|
368
|
+
tag: 'td',
|
369
|
+
getAttrs: function getAttrs() {
|
370
|
+
return {
|
371
|
+
localId: uuid.generate()
|
372
|
+
};
|
373
|
+
}
|
374
|
+
}],
|
375
|
+
toDOM: function toDOM(node) {
|
376
|
+
var _node$attrs3;
|
377
|
+
return ['td', {
|
378
|
+
'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.localId) || undefined
|
379
|
+
}, 0];
|
380
|
+
}
|
381
|
+
};
|
382
|
+
export var tableCellWithLocalId = tableCellFactory(tableCellNodeSpecOptionsWithLocalId);
|
383
|
+
var tableHeaderNodeSpecOptionsWithLocalId = {
|
384
|
+
parseDOM: [{
|
385
|
+
tag: 'th',
|
386
|
+
getAttrs: function getAttrs(dom) {
|
387
|
+
return getCellAttrs(dom, {
|
388
|
+
background: DEFAULT_TABLE_HEADER_CELL_BACKGROUND,
|
389
|
+
localId: uuid.generate()
|
390
|
+
});
|
391
|
+
}
|
392
|
+
}],
|
393
|
+
toDOM: function toDOM(node) {
|
394
|
+
return ['th', getCellDomAttrs(node), 0];
|
395
|
+
}
|
396
|
+
};
|
397
|
+
export var tableHeaderWithLocalId = tableHeaderFactory(tableHeaderNodeSpecOptionsWithLocalId);
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1678,6 +1678,10 @@ export var tableCell = {
|
|
1678
1678
|
background: {
|
1679
1679
|
type: 'string',
|
1680
1680
|
optional: true
|
1681
|
+
},
|
1682
|
+
localId: {
|
1683
|
+
type: 'string',
|
1684
|
+
optional: true
|
1681
1685
|
}
|
1682
1686
|
},
|
1683
1687
|
optional: true
|
@@ -1717,6 +1721,10 @@ export var tableHeader = {
|
|
1717
1721
|
background: {
|
1718
1722
|
type: 'string',
|
1719
1723
|
optional: true
|
1724
|
+
},
|
1725
|
+
localId: {
|
1726
|
+
type: 'string',
|
1727
|
+
optional: true
|
1720
1728
|
}
|
1721
1729
|
},
|
1722
1730
|
optional: true
|
@@ -1735,6 +1743,15 @@ export var tableRow = {
|
|
1735
1743
|
type: 'enum',
|
1736
1744
|
values: ['tableRow']
|
1737
1745
|
},
|
1746
|
+
attrs: {
|
1747
|
+
props: {
|
1748
|
+
localId: {
|
1749
|
+
type: 'string',
|
1750
|
+
optional: true
|
1751
|
+
}
|
1752
|
+
},
|
1753
|
+
optional: true
|
1754
|
+
},
|
1738
1755
|
content: {
|
1739
1756
|
type: 'array',
|
1740
1757
|
items: [['tableCell', 'tableHeader']]
|
@@ -2438,6 +2438,9 @@
|
|
2438
2438
|
},
|
2439
2439
|
"background": {
|
2440
2440
|
"type": "string"
|
2441
|
+
},
|
2442
|
+
"localId": {
|
2443
|
+
"type": "string"
|
2441
2444
|
}
|
2442
2445
|
},
|
2443
2446
|
"additionalProperties": false
|
@@ -2472,6 +2475,9 @@
|
|
2472
2475
|
},
|
2473
2476
|
"background": {
|
2474
2477
|
"type": "string"
|
2478
|
+
},
|
2479
|
+
"localId": {
|
2480
|
+
"type": "string"
|
2475
2481
|
}
|
2476
2482
|
},
|
2477
2483
|
"additionalProperties": false
|
@@ -2541,6 +2547,15 @@
|
|
2541
2547
|
"type": {
|
2542
2548
|
"enum": ["tableRow"]
|
2543
2549
|
},
|
2550
|
+
"attrs": {
|
2551
|
+
"type": "object",
|
2552
|
+
"properties": {
|
2553
|
+
"localId": {
|
2554
|
+
"type": "string"
|
2555
|
+
}
|
2556
|
+
},
|
2557
|
+
"additionalProperties": false
|
2558
|
+
},
|
2544
2559
|
"content": {
|
2545
2560
|
"type": "array",
|
2546
2561
|
"items": {
|
@@ -2733,6 +2733,9 @@
|
|
2733
2733
|
},
|
2734
2734
|
"background": {
|
2735
2735
|
"type": "string"
|
2736
|
+
},
|
2737
|
+
"localId": {
|
2738
|
+
"type": "string"
|
2736
2739
|
}
|
2737
2740
|
},
|
2738
2741
|
"additionalProperties": false
|
@@ -2767,6 +2770,9 @@
|
|
2767
2770
|
},
|
2768
2771
|
"background": {
|
2769
2772
|
"type": "string"
|
2773
|
+
},
|
2774
|
+
"localId": {
|
2775
|
+
"type": "string"
|
2770
2776
|
}
|
2771
2777
|
},
|
2772
2778
|
"additionalProperties": false
|
@@ -2836,6 +2842,15 @@
|
|
2836
2842
|
"type": {
|
2837
2843
|
"enum": ["tableRow"]
|
2838
2844
|
},
|
2845
|
+
"attrs": {
|
2846
|
+
"type": "object",
|
2847
|
+
"properties": {
|
2848
|
+
"localId": {
|
2849
|
+
"type": "string"
|
2850
|
+
}
|
2851
|
+
},
|
2852
|
+
"additionalProperties": false
|
2853
|
+
},
|
2839
2854
|
"content": {
|
2840
2855
|
"type": "array",
|
2841
2856
|
"items": {
|
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, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, 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, 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, } from './schema';
|
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, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, 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, 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, } 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, 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';
|
@@ -816,6 +816,7 @@ export interface TableCellDefinition {
|
|
816
816
|
rowspan?: number;
|
817
817
|
colwidth?: Array<number>;
|
818
818
|
background?: string;
|
819
|
+
localId?: string;
|
819
820
|
};
|
820
821
|
}
|
821
822
|
export type TableCellNode = PMNode & TableCellDefinition;
|
@@ -829,6 +830,7 @@ export interface TableCellWithNestedTableDefinition {
|
|
829
830
|
rowspan?: number;
|
830
831
|
colwidth?: Array<number>;
|
831
832
|
background?: string;
|
833
|
+
localId?: string;
|
832
834
|
};
|
833
835
|
}
|
834
836
|
export type TableCellWithNestedTableNode = PMNode & TableCellWithNestedTableDefinition;
|
@@ -842,6 +844,7 @@ export interface TableHeaderDefinition {
|
|
842
844
|
rowspan?: number;
|
843
845
|
colwidth?: Array<number>;
|
844
846
|
background?: string;
|
847
|
+
localId?: string;
|
845
848
|
};
|
846
849
|
}
|
847
850
|
export type TableHeaderNode = PMNode & TableHeaderDefinition;
|
@@ -855,6 +858,7 @@ export interface TableHeaderWithNestedTableDefinition {
|
|
855
858
|
rowspan?: number;
|
856
859
|
colwidth?: Array<number>;
|
857
860
|
background?: string;
|
861
|
+
localId?: string;
|
858
862
|
};
|
859
863
|
}
|
860
864
|
export type TableHeaderWithNestedTableNode = PMNode & TableHeaderWithNestedTableDefinition;
|
@@ -863,6 +867,9 @@ export interface TableRowDefinition {
|
|
863
867
|
type: 'tableRow';
|
864
868
|
content: Array<TableCellDefinition | TableHeaderDefinition>;
|
865
869
|
marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
870
|
+
attrs: {
|
871
|
+
localId?: string;
|
872
|
+
};
|
866
873
|
}
|
867
874
|
export type TableRowNode = PMNode & TableRowDefinition;
|
868
875
|
export declare const tableRow: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<TableRowNode>) => import("prosemirror-model").NodeSpec;
|
@@ -870,6 +877,9 @@ export interface TableRowWithNestedTableDefinition {
|
|
870
877
|
type: 'tableRow';
|
871
878
|
content: Array<TableCellWithNestedTableDefinition | TableHeaderWithNestedTableDefinition>;
|
872
879
|
marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
|
880
|
+
attrs: {
|
881
|
+
localId?: string;
|
882
|
+
};
|
873
883
|
}
|
874
884
|
export type TableRowWithNestedTableNode = PMNode & TableRowWithNestedTableDefinition;
|
875
885
|
export declare const tableRowWithNestedTable: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<TableRowWithNestedTableNode>) => import("prosemirror-model").NodeSpec;
|
@@ -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, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, 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, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, } from './nodes';
|
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, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, 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, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, } 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, 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. */
|
@@ -43,7 +43,7 @@ export type { MediaInlineAttributes, MediaInlineDefinition, } from './media-inli
|
|
43
43
|
export type { MediaGroupDefinition } from './media-group';
|
44
44
|
export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, toJSON as mediaSingleToJSON, } from './media-single';
|
45
45
|
export type { MediaSingleDefinition } from './media-single';
|
46
|
-
export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
|
46
|
+
export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
|
47
47
|
export type { DisplayMode as TableDisplayMode, TableAttributes, CellAttributes, Layout as TableLayout, TableDefinition, TableCell as TableCellDefinition, TableHeader as TableHeaderDefinition, TableRow as TableRowDefinition, TableWithNestedTableDefinition, TableRowWithNestedTableDefinition, TableCellWithNestedTableDefinition, TableHeaderWithNestedTableDefinition, CellDomAttrs, } from './tableNodes';
|
48
48
|
export { decisionList, decisionListSelector } from './decision-list';
|
49
49
|
export type { DecisionListDefinition } from './decision-list';
|
@@ -21,6 +21,7 @@ export interface CellAttributes {
|
|
21
21
|
rowspan?: number;
|
22
22
|
colwidth?: number[];
|
23
23
|
background?: string;
|
24
|
+
localId?: string;
|
24
25
|
}
|
25
26
|
export declare const tablePrefixSelector = "pm-table";
|
26
27
|
export declare const tableCellSelector = "pm-table-cell-content-wrap";
|
@@ -32,6 +33,7 @@ export declare const getCellAttrs: (dom: HTMLElement, defaultValues?: CellAttrib
|
|
32
33
|
rowspan: number;
|
33
34
|
colwidth: number[] | null;
|
34
35
|
background: string | null;
|
36
|
+
localId?: string;
|
35
37
|
};
|
36
38
|
export type CellDomAttrs = {
|
37
39
|
colspan?: string;
|
@@ -41,6 +43,7 @@ export type CellDomAttrs = {
|
|
41
43
|
'data-colwidth'?: string;
|
42
44
|
'data-cell-background'?: string;
|
43
45
|
class?: string;
|
46
|
+
'data-local-id'?: string;
|
44
47
|
};
|
45
48
|
export declare const setGlobalTheme: (theme: string) => void;
|
46
49
|
/**
|
@@ -149,3 +152,6 @@ export declare const tableWithNestedTable: import("prosemirror-model").NodeSpec;
|
|
149
152
|
export declare const tableRowWithNestedTable: import("prosemirror-model").NodeSpec;
|
150
153
|
export declare const tableCellWithNestedTable: import("prosemirror-model").NodeSpec;
|
151
154
|
export declare const tableHeaderWithNestedTable: import("prosemirror-model").NodeSpec;
|
155
|
+
export declare const tableRowWithLocalId: import("prosemirror-model").NodeSpec;
|
156
|
+
export declare const tableCellWithLocalId: import("prosemirror-model").NodeSpec;
|
157
|
+
export declare const tableHeaderWithLocalId: import("prosemirror-model").NodeSpec;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Step, StepResult, StepMap } from '@atlaskit/editor-prosemirror/transform';
|
2
2
|
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
3
|
+
import { ADFEntity } from './types';
|
3
4
|
type Options = {
|
4
5
|
nextDocument: PMNode;
|
5
6
|
inverted?: boolean;
|
@@ -20,8 +21,6 @@ export declare class OverrideDocumentStep extends Step {
|
|
20
21
|
export type OverrideDocumentStepJSON = {
|
21
22
|
stepType: 'override-document';
|
22
23
|
inverted: boolean;
|
23
|
-
nextDocument:
|
24
|
-
[key: string]: any;
|
25
|
-
};
|
24
|
+
nextDocument: ADFEntity;
|
26
25
|
};
|
27
26
|
export {};
|