@atlaskit/adf-schema 47.3.1 → 47.5.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 +4 -4
- package/dist/cjs/next-schema/generated/nodeTypes.js +11 -11
- package/dist/cjs/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/expand.js +1 -1
- package/dist/cjs/next-schema/nodes/nestedExpand.js +7 -12
- package/dist/cjs/next-schema/nodes/panel.js +3 -17
- package/dist/cjs/schema/default-schema.js +1 -3
- package/dist/cjs/schema/index.js +4 -4
- package/dist/cjs/schema/nodes/index.js +4 -4
- package/dist/cjs/schema/nodes/nested-expand.js +27 -3
- package/dist/cjs/schema/nodes/panel.js +3 -3
- package/dist/cjs/validator-schema/generated/validatorSpec.js +8 -39
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +10 -10
- package/dist/es2019/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/expand.js +1 -1
- package/dist/es2019/next-schema/nodes/nestedExpand.js +7 -12
- package/dist/es2019/next-schema/nodes/panel.js +3 -17
- package/dist/es2019/schema/default-schema.js +2 -4
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/index.js +2 -2
- package/dist/es2019/schema/nodes/nested-expand.js +27 -3
- package/dist/es2019/schema/nodes/panel.js +2 -2
- package/dist/es2019/validator-schema/generated/validatorSpec.js +7 -38
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +10 -10
- package/dist/esm/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/esm/next-schema/nodes/expand.js +1 -1
- package/dist/esm/next-schema/nodes/nestedExpand.js +7 -12
- package/dist/esm/next-schema/nodes/panel.js +3 -17
- package/dist/esm/schema/default-schema.js +2 -4
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/index.js +2 -2
- package/dist/esm/schema/nodes/nested-expand.js +27 -3
- package/dist/esm/schema/nodes/panel.js +3 -3
- package/dist/esm/validator-schema/generated/validatorSpec.js +7 -38
- package/dist/json-schema/v1/full.json +6 -0
- package/dist/json-schema/v1/stage-0.json +3 -172
- package/dist/types/index.d.ts +1 -1
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +16 -16
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +2 -2
- package/dist/types/next-schema/groups/tableCellContentPseudoGroup.d.ts +3 -3
- package/dist/types/next-schema/nodes/nestedExpand.d.ts +2 -2
- package/dist/types/next-schema/nodes/panel.d.ts +2 -2
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/nodes/index.d.ts +2 -2
- package/dist/types/schema/nodes/nested-expand.d.ts +2 -2
- package/dist/types/schema/nodes/panel.d.ts +1 -1
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +1 -32
- package/json-schema/v1/full.json +6 -0
- package/json-schema/v1/stage-0.json +3 -172
- package/package.json +2 -2
@@ -31,7 +31,7 @@ export const nestedExpand = adfNode('nestedExpand').define({
|
|
31
31
|
optional: true
|
32
32
|
}
|
33
33
|
},
|
34
|
-
content: [$onePlus($or(...nestedExpandContent))],
|
34
|
+
content: [$onePlus($or(...nestedExpandContent, extension.use('with_marks')))],
|
35
35
|
DANGEROUS_MANUAL_OVERRIDE: {
|
36
36
|
'validator-spec': {
|
37
37
|
'props.attrs.optional': {
|
@@ -39,13 +39,8 @@ export const nestedExpand = adfNode('nestedExpand').define({
|
|
39
39
|
reason: '@DSLCompatibilityException - mismatch with DSL'
|
40
40
|
},
|
41
41
|
'props.content': {
|
42
|
-
value:
|
43
|
-
|
44
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
|
45
|
-
minItems: 1,
|
46
|
-
allowUnsupportedBlock: true
|
47
|
-
},
|
48
|
-
reason: '@DSLCompatibilityException - this is to loose the validator ristriction to allow extension to be nested inside nestedExpand'
|
42
|
+
value: 'nestedExpand_content',
|
43
|
+
reason: '@DSLCompatibilityException - mismatch with DSL'
|
49
44
|
},
|
50
45
|
required: {
|
51
46
|
reason: '@DSLCompatibilityException - required for nestedExpand validator spec',
|
@@ -59,10 +54,10 @@ export const nestedExpand = adfNode('nestedExpand').define({
|
|
59
54
|
marks: [],
|
60
55
|
content: [],
|
61
56
|
noMarks: true
|
62
|
-
}).variant('
|
57
|
+
}).variant('without_non_bodied_macros', {
|
63
58
|
marks: [],
|
64
|
-
content: [$onePlus($or(...nestedExpandContent
|
65
|
-
stage0: true,
|
59
|
+
content: [$onePlus($or(...nestedExpandContent))],
|
66
60
|
noMarks: true,
|
67
|
-
noExtend: true
|
61
|
+
noExtend: true,
|
62
|
+
ignore: ['json-schema', 'validator-spec']
|
68
63
|
});
|
@@ -44,23 +44,9 @@ export const panel = adfNode('panel').define({
|
|
44
44
|
optional: true
|
45
45
|
}
|
46
46
|
},
|
47
|
+
content: [$onePlus($or(...panelContent, extension.use('with_marks')))]
|
48
|
+
}).variant('without_nested_non_bodied_macros', {
|
47
49
|
content: [$onePlus($or(...panelContent))],
|
48
|
-
// TODO: remove the mannual override once with_nested_non_bodied_macros is promoted to full schema
|
49
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
50
|
-
'validator-spec': {
|
51
|
-
'props.content': {
|
52
|
-
value: {
|
53
|
-
type: 'array',
|
54
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList', 'extension_with_marks']],
|
55
|
-
minItems: 1,
|
56
|
-
allowUnsupportedBlock: true
|
57
|
-
},
|
58
|
-
reason: '@DSLCompatibilityException - this is to loose the validator ristriction to allow extension to be nested inside panel'
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
}).variant('with_nested_non_bodied_macros', {
|
63
|
-
content: [$onePlus($or(...panelContent, extension.use('with_marks')))],
|
64
50
|
noExtend: true,
|
65
|
-
|
51
|
+
ignore: ['json-schema', 'validator-spec']
|
66
52
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, listItemWithNonBodiedMacrosStage0,
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, listItemWithNonBodiedMacrosStage0, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
const getDefaultSchemaConfig = () => {
|
5
5
|
const defaultSchemaConfig = {
|
@@ -20,12 +20,10 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
|
|
20
20
|
extensionFrame: extensionFrame,
|
21
21
|
expand: expandWithNestedExpand,
|
22
22
|
listItem: listItemWithNonBodiedMacrosStage0,
|
23
|
-
panel: panelWithNonBodiedMacrosStage0(true),
|
24
23
|
table: tableWithNestedTable,
|
25
24
|
tableRow: tableRowWithNestedTable,
|
26
25
|
tableCell: tableCellWithNestedTable,
|
27
|
-
tableHeader: tableHeaderWithNestedTable
|
28
|
-
nestedExpand: nestedExpandWithNonBodiedMacrosStage0
|
26
|
+
tableHeader: tableHeaderWithNestedTable
|
29
27
|
};
|
30
28
|
}
|
31
29
|
return createSchema(defaultSchemaConfig);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, extendedBlockquote, blockquoteWithoutNonBodiedMacros, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, listItemWithDecisionStage0, listItemWithNonBodiedMacrosStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
1
|
+
export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, extendedBlockquote, blockquoteWithoutNonBodiedMacros, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, listItemWithDecisionStage0, listItemWithNonBodiedMacrosStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithoutNonBodiedMacros, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, panelWithoutNestedNonBodiedMacros, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
2
2
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
3
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -15,7 +15,7 @@ export { emoji } from './emoji';
|
|
15
15
|
export { image } from './image';
|
16
16
|
export { mention, toJSON as mentionToJSON } from './mention';
|
17
17
|
export { listItem, listItemWithTask, listItemWithDecisionStage0, listItemWithNonBodiedMacrosStage0 } from './list-item';
|
18
|
-
export { extendedPanel,
|
18
|
+
export { extendedPanel, panelWithoutNestedNonBodiedMacros, PanelType } from './panel';
|
19
19
|
export { text } from './text';
|
20
20
|
export { default as unknownBlock } from './unknown-block';
|
21
21
|
export { caption } from './caption';
|
@@ -37,7 +37,7 @@ export { blockCard } from './block-card';
|
|
37
37
|
export { unsupportedBlock } from './unsupported-block';
|
38
38
|
export { unsupportedInline } from './unsupported-inline';
|
39
39
|
export { status } from './status';
|
40
|
-
export { nestedExpand,
|
40
|
+
export { nestedExpand, nestedExpandWithoutNonBodiedMacros } from './nested-expand';
|
41
41
|
export { embedCard } from './embed-card';
|
42
42
|
// Extensions
|
43
43
|
export { extension } from './extension';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { nestedExpand as nestedExpandFactory,
|
1
|
+
import { nestedExpand as nestedExpandFactory, nestedExpandWithoutNonBodiedMacros as nestedExpandWithoutNonBodiedMacrosFactory } from '../../next-schema/generated/nodeTypes';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* @name nestedExpand_content
|
@@ -45,6 +45,30 @@ const nestedExpandFactoryOptions = {
|
|
45
45
|
return ['div', attrs, 0];
|
46
46
|
}
|
47
47
|
};
|
48
|
+
const nestedExpandWithoutNonBodiedMacrosFactoryOptions = {
|
49
|
+
parseDOM: [{
|
50
|
+
context: 'nestedExpand//',
|
51
|
+
tag: '[data-node-type="nestedExpand"]',
|
52
|
+
getAttrs: getExpandAttrs
|
53
|
+
}, {
|
54
|
+
tag: '[data-node-type="nestedExpand"] button',
|
55
|
+
ignore: true
|
56
|
+
}, {
|
57
|
+
tag: '[data-node-type="expand"] button',
|
58
|
+
ignore: true
|
59
|
+
}, {
|
60
|
+
tag: 'div[data-node-type="nestedExpand"]',
|
61
|
+
getAttrs: getExpandAttrs
|
62
|
+
}],
|
63
|
+
toDOM(node) {
|
64
|
+
const attrs = {
|
65
|
+
'data-node-type': 'nestedExpand',
|
66
|
+
'data-title': node.attrs.title,
|
67
|
+
'data-expanded': node.attrs.__expanded
|
68
|
+
};
|
69
|
+
return ['div', attrs, 0];
|
70
|
+
}
|
71
|
+
};
|
48
72
|
|
49
73
|
/**
|
50
74
|
* @name nestedExpand
|
@@ -53,7 +77,7 @@ const nestedExpandFactoryOptions = {
|
|
53
77
|
export const nestedExpand = nestedExpandFactory(nestedExpandFactoryOptions);
|
54
78
|
|
55
79
|
/**
|
56
|
-
* @name
|
80
|
+
* @name nestedExpandWithNonBodiedMacros
|
57
81
|
* @description an expand that can be nested (eg. inside table, layout).
|
58
82
|
*/
|
59
|
-
export const
|
83
|
+
export const nestedExpandWithoutNonBodiedMacros = nestedExpandWithoutNonBodiedMacrosFactory(nestedExpandWithoutNonBodiedMacrosFactoryOptions);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { panel as panelFactory,
|
1
|
+
import { panel as panelFactory, panelWithoutNestedNonBodiedMacros as panelWithoutNestedNonBodiedMacrosFactory } from '../../next-schema/generated/nodeTypes';
|
2
2
|
export let PanelType = /*#__PURE__*/function (PanelType) {
|
3
3
|
PanelType["INFO"] = "info";
|
4
4
|
PanelType["NOTE"] = "note";
|
@@ -62,4 +62,4 @@ const createPanelNodeSpecOptions = allowCustomPanel => ({
|
|
62
62
|
* addition to content allowed inside panel
|
63
63
|
*/
|
64
64
|
export const extendedPanel = allowCustomPanel => panelFactory(createPanelNodeSpecOptions(allowCustomPanel));
|
65
|
-
export const
|
65
|
+
export const panelWithoutNestedNonBodiedMacros = allowCustomPanel => panelWithoutNestedNonBodiedMacrosFactory(createPanelNodeSpecOptions(allowCustomPanel));
|
@@ -49,7 +49,7 @@ export const backgroundColor = {
|
|
49
49
|
}
|
50
50
|
}
|
51
51
|
};
|
52
|
-
export const block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', '
|
52
|
+
export const block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks'];
|
53
53
|
export const blockCard = {
|
54
54
|
props: {
|
55
55
|
type: {
|
@@ -412,7 +412,7 @@ export const doc = {
|
|
412
412
|
},
|
413
413
|
content: {
|
414
414
|
type: 'array',
|
415
|
-
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', '
|
415
|
+
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only']],
|
416
416
|
allowUnsupportedBlock: true
|
417
417
|
}
|
418
418
|
}
|
@@ -504,7 +504,7 @@ export const expand = {
|
|
504
504
|
},
|
505
505
|
content: {
|
506
506
|
type: 'array',
|
507
|
-
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks'
|
507
|
+
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
508
508
|
minItems: 1,
|
509
509
|
allowUnsupportedBlock: true
|
510
510
|
}
|
@@ -1249,18 +1249,13 @@ export const nestedExpand = {
|
|
1249
1249
|
}
|
1250
1250
|
}
|
1251
1251
|
},
|
1252
|
-
content:
|
1253
|
-
type: 'array',
|
1254
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
|
1255
|
-
minItems: 1,
|
1256
|
-
allowUnsupportedBlock: true
|
1257
|
-
}
|
1252
|
+
content: 'nestedExpand_content'
|
1258
1253
|
},
|
1259
1254
|
required: ['content']
|
1260
1255
|
};
|
1261
1256
|
export const nestedExpand_content = {
|
1262
1257
|
type: 'array',
|
1263
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote']],
|
1258
|
+
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
|
1264
1259
|
minItems: 1,
|
1265
1260
|
allowUnsupportedBlock: true
|
1266
1261
|
};
|
@@ -1274,22 +1269,6 @@ export const nestedExpand_with_no_marks = ['nestedExpand', {
|
|
1274
1269
|
}
|
1275
1270
|
}
|
1276
1271
|
}];
|
1277
|
-
export const nestedExpand_with_non_bodied_macros = ['nestedExpand', {
|
1278
|
-
props: {
|
1279
|
-
content: {
|
1280
|
-
type: 'array',
|
1281
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
|
1282
|
-
minItems: 1,
|
1283
|
-
allowUnsupportedBlock: true
|
1284
|
-
},
|
1285
|
-
marks: {
|
1286
|
-
type: 'array',
|
1287
|
-
maxItems: 0,
|
1288
|
-
items: [],
|
1289
|
-
optional: true
|
1290
|
-
}
|
1291
|
-
}
|
1292
|
-
}];
|
1293
1272
|
export const non_nestable_block_content = ['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks'];
|
1294
1273
|
export const orderedList = {
|
1295
1274
|
props: {
|
@@ -1352,16 +1331,6 @@ export const panel = {
|
|
1352
1331
|
}
|
1353
1332
|
}
|
1354
1333
|
};
|
1355
|
-
export const panel_with_nested_non_bodied_macros = ['panel', {
|
1356
|
-
props: {
|
1357
|
-
content: {
|
1358
|
-
type: 'array',
|
1359
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList', 'extension_with_marks']],
|
1360
|
-
minItems: 1,
|
1361
|
-
allowUnsupportedBlock: true
|
1362
|
-
}
|
1363
|
-
}
|
1364
|
-
}];
|
1365
1334
|
export const paragraph = {
|
1366
1335
|
props: {
|
1367
1336
|
type: {
|
@@ -1584,7 +1553,7 @@ export const tableCell = {
|
|
1584
1553
|
},
|
1585
1554
|
content: {
|
1586
1555
|
type: 'array',
|
1587
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks'
|
1556
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
1588
1557
|
minItems: 1,
|
1589
1558
|
allowUnsupportedBlock: true
|
1590
1559
|
}
|
@@ -1623,7 +1592,7 @@ export const tableHeader = {
|
|
1623
1592
|
},
|
1624
1593
|
content: {
|
1625
1594
|
type: 'array',
|
1626
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', '
|
1595
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
|
1627
1596
|
minItems: 1
|
1628
1597
|
}
|
1629
1598
|
},
|
package/dist/esm/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, extendedBlockquote, blockquoteWithoutNonBodiedMacros, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
2
|
-
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandWithNestedExpand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, listItemWithDecisionStage0, listItemWithNonBodiedMacrosStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
2
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandWithNestedExpand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, listItemWithDecisionStage0, listItemWithNonBodiedMacrosStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithoutNonBodiedMacros, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, panelWithoutNestedNonBodiedMacros, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } 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
|
@@ -845,8 +845,8 @@ export var multiBodiedExtensionStage0 = createPMNodeSpecFactory({
|
|
845
845
|
definingAsContext: true
|
846
846
|
});
|
847
847
|
export var nestedExpand = createPMNodeSpecFactory({
|
848
|
-
content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+',
|
849
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
848
|
+
content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock | extension)+',
|
849
|
+
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
850
850
|
attrs: {
|
851
851
|
title: {
|
852
852
|
default: ''
|
@@ -870,9 +870,9 @@ export var nestedExpandWithNoMarks = createPMNodeSpecFactory({
|
|
870
870
|
selectable: true,
|
871
871
|
isolating: true
|
872
872
|
});
|
873
|
-
export var
|
874
|
-
content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock
|
875
|
-
marks: 'unsupportedMark unsupportedNodeAttribute
|
873
|
+
export var nestedExpandWithoutNonBodiedMacros = createPMNodeSpecFactory({
|
874
|
+
content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock)+',
|
875
|
+
marks: 'unsupportedMark unsupportedNodeAttribute',
|
876
876
|
attrs: {
|
877
877
|
title: {
|
878
878
|
default: ''
|
@@ -896,8 +896,8 @@ export var orderedList = createPMNodeSpecFactory({
|
|
896
896
|
selectable: false
|
897
897
|
});
|
898
898
|
export var panel = createPMNodeSpecFactory({
|
899
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock)+',
|
900
|
-
marks: 'unsupportedMark unsupportedNodeAttribute',
|
899
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | extension)+',
|
900
|
+
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
901
901
|
group: 'block',
|
902
902
|
attrs: {
|
903
903
|
panelType: {
|
@@ -918,9 +918,9 @@ export var panel = createPMNodeSpecFactory({
|
|
918
918
|
},
|
919
919
|
selectable: true
|
920
920
|
});
|
921
|
-
export var
|
922
|
-
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock
|
923
|
-
marks: 'unsupportedMark unsupportedNodeAttribute
|
921
|
+
export var panelWithoutNestedNonBodiedMacros = createPMNodeSpecFactory({
|
922
|
+
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock)+',
|
923
|
+
marks: 'unsupportedMark unsupportedNodeAttribute',
|
924
924
|
group: 'block',
|
925
925
|
attrs: {
|
926
926
|
panelType: {
|
@@ -30,7 +30,7 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
30
30
|
* - no base mediaSingle
|
31
31
|
* - no base heading
|
32
32
|
*/
|
33
|
-
export var blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, panel.use('
|
33
|
+
export var blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, panel.use('without_nested_non_bodied_macros'), blockquote, blockquote.use('without_nested_codeblock_or_media'), blockquote.use('without_non_bodied_macros'), extension.use('with_marks'), embedCard, table,
|
34
34
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
35
35
|
table.use('with_nested_table'), expand, expand.use('without_nested_expand'), bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
|
36
36
|
ignore: ['pm-spec']
|
@@ -18,7 +18,7 @@ import { rule } from '../nodes/rule';
|
|
18
18
|
import { table } from '../nodes/tableNodes';
|
19
19
|
import { taskList } from '../nodes/task';
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
21
|
-
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), blockquote.use('without_non_bodied_macros'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('
|
21
|
+
export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), blockquote.use('without_non_bodied_macros'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('without_nested_non_bodied_macros'), table,
|
22
22
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
23
23
|
table.use('with_nested_table'), bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('without_nested_expand'), confluenceUnsupportedBlock, unsupportedBlock], {
|
24
24
|
// @DSLCompatibilityException
|
@@ -15,7 +15,7 @@ import { paragraph } from '../nodes/paragraph';
|
|
15
15
|
import { rule } from '../nodes/rule';
|
16
16
|
import { taskList } from '../nodes/task';
|
17
17
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
18
|
-
export var tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks'), nestedExpand.use('
|
18
|
+
export var tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks'), nestedExpand.use('without_non_bodied_macros')];
|
19
19
|
|
20
20
|
// This is not an actual group, but a collection of nodes
|
21
21
|
// @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
|
@@ -20,7 +20,7 @@ export var expand = adfNode('expand').define({
|
|
20
20
|
optional: true
|
21
21
|
}
|
22
22
|
},
|
23
|
-
content: [$onePlus($or(nonNestableBlockContentGroup, nestedExpand.use('with_no_marks'), nestedExpand.use('
|
23
|
+
content: [$onePlus($or(nonNestableBlockContentGroup, nestedExpand.use('with_no_marks'), nestedExpand.use('without_non_bodied_macros')))]
|
24
24
|
}).variant('without_nested_expand', {
|
25
25
|
content: [$onePlus($or(nonNestableBlockContentGroup))],
|
26
26
|
ignore: ['json-schema', 'validator-spec']
|
@@ -31,7 +31,7 @@ export var nestedExpand = adfNode('nestedExpand').define({
|
|
31
31
|
optional: true
|
32
32
|
}
|
33
33
|
},
|
34
|
-
content: [$onePlus($or.apply(void 0, nestedExpandContent))],
|
34
|
+
content: [$onePlus($or.apply(void 0, nestedExpandContent.concat([extension.use('with_marks')])))],
|
35
35
|
DANGEROUS_MANUAL_OVERRIDE: {
|
36
36
|
'validator-spec': {
|
37
37
|
'props.attrs.optional': {
|
@@ -39,13 +39,8 @@ export var nestedExpand = adfNode('nestedExpand').define({
|
|
39
39
|
reason: '@DSLCompatibilityException - mismatch with DSL'
|
40
40
|
},
|
41
41
|
'props.content': {
|
42
|
-
value:
|
43
|
-
|
44
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
|
45
|
-
minItems: 1,
|
46
|
-
allowUnsupportedBlock: true
|
47
|
-
},
|
48
|
-
reason: '@DSLCompatibilityException - this is to loose the validator ristriction to allow extension to be nested inside nestedExpand'
|
42
|
+
value: 'nestedExpand_content',
|
43
|
+
reason: '@DSLCompatibilityException - mismatch with DSL'
|
49
44
|
},
|
50
45
|
required: {
|
51
46
|
reason: '@DSLCompatibilityException - required for nestedExpand validator spec',
|
@@ -59,10 +54,10 @@ export var nestedExpand = adfNode('nestedExpand').define({
|
|
59
54
|
marks: [],
|
60
55
|
content: [],
|
61
56
|
noMarks: true
|
62
|
-
}).variant('
|
57
|
+
}).variant('without_non_bodied_macros', {
|
63
58
|
marks: [],
|
64
|
-
content: [$onePlus($or.apply(void 0, nestedExpandContent
|
65
|
-
stage0: true,
|
59
|
+
content: [$onePlus($or.apply(void 0, nestedExpandContent))],
|
66
60
|
noMarks: true,
|
67
|
-
noExtend: true
|
61
|
+
noExtend: true,
|
62
|
+
ignore: ['json-schema', 'validator-spec']
|
68
63
|
});
|
@@ -44,23 +44,9 @@ export var panel = adfNode('panel').define({
|
|
44
44
|
optional: true
|
45
45
|
}
|
46
46
|
},
|
47
|
+
content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))]
|
48
|
+
}).variant('without_nested_non_bodied_macros', {
|
47
49
|
content: [$onePlus($or.apply(void 0, panelContent))],
|
48
|
-
// TODO: remove the mannual override once with_nested_non_bodied_macros is promoted to full schema
|
49
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
50
|
-
'validator-spec': {
|
51
|
-
'props.content': {
|
52
|
-
value: {
|
53
|
-
type: 'array',
|
54
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList', 'extension_with_marks']],
|
55
|
-
minItems: 1,
|
56
|
-
allowUnsupportedBlock: true
|
57
|
-
},
|
58
|
-
reason: '@DSLCompatibilityException - this is to loose the validator ristriction to allow extension to be nested inside panel'
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
}).variant('with_nested_non_bodied_macros', {
|
63
|
-
content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))],
|
64
50
|
noExtend: true,
|
65
|
-
|
51
|
+
ignore: ['json-schema', 'validator-spec']
|
66
52
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
2
|
-
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, listItemWithNonBodiedMacrosStage0,
|
2
|
+
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, listItemWithNonBodiedMacrosStage0, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
5
5
|
var defaultSchemaConfig = {
|
@@ -21,12 +21,10 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
|
|
21
21
|
extensionFrame: extensionFrame,
|
22
22
|
expand: expandWithNestedExpand,
|
23
23
|
listItem: listItemWithNonBodiedMacrosStage0,
|
24
|
-
panel: panelWithNonBodiedMacrosStage0(true),
|
25
24
|
table: tableWithNestedTable,
|
26
25
|
tableRow: tableRowWithNestedTable,
|
27
26
|
tableCell: tableCellWithNestedTable,
|
28
|
-
tableHeader: tableHeaderWithNestedTable
|
29
|
-
nestedExpand: nestedExpandWithNonBodiedMacrosStage0
|
27
|
+
tableHeader: tableHeaderWithNestedTable
|
30
28
|
};
|
31
29
|
}
|
32
30
|
return createSchema(defaultSchemaConfig);
|
package/dist/esm/schema/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, extendedBlockquote, blockquoteWithoutNonBodiedMacros, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, listItemWithDecisionStage0, listItemWithNonBodiedMacrosStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand,
|
1
|
+
export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, extendedBlockquote, blockquoteWithoutNonBodiedMacros, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, listItemWithDecisionStage0, listItemWithNonBodiedMacrosStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithoutNonBodiedMacros, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, panelWithoutNestedNonBodiedMacros, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
|
2
2
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
3
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -15,7 +15,7 @@ export { emoji } from './emoji';
|
|
15
15
|
export { image } from './image';
|
16
16
|
export { mention, toJSON as mentionToJSON } from './mention';
|
17
17
|
export { listItem, listItemWithTask, listItemWithDecisionStage0, listItemWithNonBodiedMacrosStage0 } from './list-item';
|
18
|
-
export { extendedPanel,
|
18
|
+
export { extendedPanel, panelWithoutNestedNonBodiedMacros, PanelType } from './panel';
|
19
19
|
export { text } from './text';
|
20
20
|
export { default as unknownBlock } from './unknown-block';
|
21
21
|
export { caption } from './caption';
|
@@ -37,7 +37,7 @@ export { blockCard } from './block-card';
|
|
37
37
|
export { unsupportedBlock } from './unsupported-block';
|
38
38
|
export { unsupportedInline } from './unsupported-inline';
|
39
39
|
export { status } from './status';
|
40
|
-
export { nestedExpand,
|
40
|
+
export { nestedExpand, nestedExpandWithoutNonBodiedMacros } from './nested-expand';
|
41
41
|
export { embedCard } from './embed-card';
|
42
42
|
// Extensions
|
43
43
|
export { extension } from './extension';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { nestedExpand as nestedExpandFactory,
|
1
|
+
import { nestedExpand as nestedExpandFactory, nestedExpandWithoutNonBodiedMacros as nestedExpandWithoutNonBodiedMacrosFactory } from '../../next-schema/generated/nodeTypes';
|
2
2
|
|
3
3
|
/**
|
4
4
|
* @name nestedExpand_content
|
@@ -45,6 +45,30 @@ var nestedExpandFactoryOptions = {
|
|
45
45
|
return ['div', attrs, 0];
|
46
46
|
}
|
47
47
|
};
|
48
|
+
var nestedExpandWithoutNonBodiedMacrosFactoryOptions = {
|
49
|
+
parseDOM: [{
|
50
|
+
context: 'nestedExpand//',
|
51
|
+
tag: '[data-node-type="nestedExpand"]',
|
52
|
+
getAttrs: getExpandAttrs
|
53
|
+
}, {
|
54
|
+
tag: '[data-node-type="nestedExpand"] button',
|
55
|
+
ignore: true
|
56
|
+
}, {
|
57
|
+
tag: '[data-node-type="expand"] button',
|
58
|
+
ignore: true
|
59
|
+
}, {
|
60
|
+
tag: 'div[data-node-type="nestedExpand"]',
|
61
|
+
getAttrs: getExpandAttrs
|
62
|
+
}],
|
63
|
+
toDOM: function toDOM(node) {
|
64
|
+
var attrs = {
|
65
|
+
'data-node-type': 'nestedExpand',
|
66
|
+
'data-title': node.attrs.title,
|
67
|
+
'data-expanded': node.attrs.__expanded
|
68
|
+
};
|
69
|
+
return ['div', attrs, 0];
|
70
|
+
}
|
71
|
+
};
|
48
72
|
|
49
73
|
/**
|
50
74
|
* @name nestedExpand
|
@@ -53,7 +77,7 @@ var nestedExpandFactoryOptions = {
|
|
53
77
|
export var nestedExpand = nestedExpandFactory(nestedExpandFactoryOptions);
|
54
78
|
|
55
79
|
/**
|
56
|
-
* @name
|
80
|
+
* @name nestedExpandWithNonBodiedMacros
|
57
81
|
* @description an expand that can be nested (eg. inside table, layout).
|
58
82
|
*/
|
59
|
-
export var
|
83
|
+
export var nestedExpandWithoutNonBodiedMacros = nestedExpandWithoutNonBodiedMacrosFactory(nestedExpandWithoutNonBodiedMacrosFactoryOptions);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
|
-
import { panel as panelFactory,
|
4
|
+
import { panel as panelFactory, panelWithoutNestedNonBodiedMacros as panelWithoutNestedNonBodiedMacrosFactory } from '../../next-schema/generated/nodeTypes';
|
5
5
|
export var PanelType = /*#__PURE__*/function (PanelType) {
|
6
6
|
PanelType["INFO"] = "info";
|
7
7
|
PanelType["NOTE"] = "note";
|
@@ -70,6 +70,6 @@ var createPanelNodeSpecOptions = function createPanelNodeSpecOptions(allowCustom
|
|
70
70
|
export var extendedPanel = function extendedPanel(allowCustomPanel) {
|
71
71
|
return panelFactory(createPanelNodeSpecOptions(allowCustomPanel));
|
72
72
|
};
|
73
|
-
export var
|
74
|
-
return
|
73
|
+
export var panelWithoutNestedNonBodiedMacros = function panelWithoutNestedNonBodiedMacros(allowCustomPanel) {
|
74
|
+
return panelWithoutNestedNonBodiedMacrosFactory(createPanelNodeSpecOptions(allowCustomPanel));
|
75
75
|
};
|