@atlaskit/adf-schema 19.2.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 +1524 -0
- package/LICENSE +13 -0
- package/build/tsconfig.json +17 -0
- package/dist/cjs/index.js +1089 -0
- package/dist/cjs/schema/bitbucket-schema.js +14 -0
- package/dist/cjs/schema/confluence-schema.js +21 -0
- package/dist/cjs/schema/create-schema.js +354 -0
- package/dist/cjs/schema/default-schema.js +52 -0
- package/dist/cjs/schema/groups.js +35 -0
- package/dist/cjs/schema/index.js +755 -0
- package/dist/cjs/schema/inline-nodes.js +20 -0
- package/dist/cjs/schema/jira-schema.js +118 -0
- package/dist/cjs/schema/marks/alignment.js +39 -0
- package/dist/cjs/schema/marks/annotation.js +96 -0
- package/dist/cjs/schema/marks/breakout.js +32 -0
- package/dist/cjs/schema/marks/code.js +46 -0
- package/dist/cjs/schema/marks/confluence-inline-comment.js +30 -0
- package/dist/cjs/schema/marks/data-consumer.js +71 -0
- package/dist/cjs/schema/marks/em.js +25 -0
- package/dist/cjs/schema/marks/indentation.js +32 -0
- package/dist/cjs/schema/marks/index.js +189 -0
- package/dist/cjs/schema/marks/link.js +128 -0
- package/dist/cjs/schema/marks/strike.js +29 -0
- package/dist/cjs/schema/marks/strong.js +37 -0
- package/dist/cjs/schema/marks/subsup.js +61 -0
- package/dist/cjs/schema/marks/text-color.js +93 -0
- package/dist/cjs/schema/marks/type-ahead-query.js +31 -0
- package/dist/cjs/schema/marks/underline.js +25 -0
- package/dist/cjs/schema/marks/unsupported-mark.js +15 -0
- package/dist/cjs/schema/marks/unsupported-node-attributes.js +16 -0
- package/dist/cjs/schema/nodes/block-card.js +56 -0
- package/dist/cjs/schema/nodes/blockquote.js +23 -0
- package/dist/cjs/schema/nodes/bodied-extension.js +66 -0
- package/dist/cjs/schema/nodes/bullet-list.js +29 -0
- package/dist/cjs/schema/nodes/caption.js +27 -0
- package/dist/cjs/schema/nodes/code-block.js +160 -0
- package/dist/cjs/schema/nodes/confluence-jira-issue.js +54 -0
- package/dist/cjs/schema/nodes/confluence-unsupported-block.js +33 -0
- package/dist/cjs/schema/nodes/confluence-unsupported-inline.js +34 -0
- package/dist/cjs/schema/nodes/date.js +36 -0
- package/dist/cjs/schema/nodes/decision-item.js +45 -0
- package/dist/cjs/schema/nodes/decision-list.js +45 -0
- package/dist/cjs/schema/nodes/doc.js +15 -0
- package/dist/cjs/schema/nodes/embed-card.js +62 -0
- package/dist/cjs/schema/nodes/emoji.js +73 -0
- package/dist/cjs/schema/nodes/expand.js +86 -0
- package/dist/cjs/schema/nodes/extension.js +59 -0
- package/dist/cjs/schema/nodes/hard-break.js +22 -0
- package/dist/cjs/schema/nodes/heading.js +69 -0
- package/dist/cjs/schema/nodes/image.js +40 -0
- package/dist/cjs/schema/nodes/index.js +539 -0
- package/dist/cjs/schema/nodes/inline-card.js +64 -0
- package/dist/cjs/schema/nodes/inline-extension.js +54 -0
- package/dist/cjs/schema/nodes/layout-column.js +53 -0
- package/dist/cjs/schema/nodes/layout-section.js +61 -0
- package/dist/cjs/schema/nodes/list-item.js +25 -0
- package/dist/cjs/schema/nodes/media-group.js +29 -0
- package/dist/cjs/schema/nodes/media-inline.js +11 -0
- package/dist/cjs/schema/nodes/media-single.js +101 -0
- package/dist/cjs/schema/nodes/media.js +196 -0
- package/dist/cjs/schema/nodes/mention.js +90 -0
- package/dist/cjs/schema/nodes/nested-expand.js +64 -0
- package/dist/cjs/schema/nodes/ordered-list.js +29 -0
- package/dist/cjs/schema/nodes/panel.js +85 -0
- package/dist/cjs/schema/nodes/paragraph.js +45 -0
- package/dist/cjs/schema/nodes/placeholder.js +39 -0
- package/dist/cjs/schema/nodes/rule.js +21 -0
- package/dist/cjs/schema/nodes/status.js +56 -0
- package/dist/cjs/schema/nodes/tableNodes.js +276 -0
- package/dist/cjs/schema/nodes/task-item.js +46 -0
- package/dist/cjs/schema/nodes/task-list.js +45 -0
- package/dist/cjs/schema/nodes/text.js +17 -0
- package/dist/cjs/schema/nodes/types/block-content.js +5 -0
- package/dist/cjs/schema/nodes/types/extensions.js +5 -0
- package/dist/cjs/schema/nodes/types/inline-content.js +5 -0
- package/dist/cjs/schema/nodes/types/mark.js +5 -0
- package/dist/cjs/schema/nodes/types/non-nestable-block-content.js +5 -0
- package/dist/cjs/schema/nodes/types/rich-media-common.js +5 -0
- package/dist/cjs/schema/nodes/unknown-block.js +21 -0
- package/dist/cjs/schema/nodes/unsupported-block.js +33 -0
- package/dist/cjs/schema/nodes/unsupported-inline.js +32 -0
- package/dist/cjs/schema/unsupported.js +8 -0
- package/dist/cjs/steps/analytics.js +183 -0
- package/dist/cjs/steps/set-attrs.js +106 -0
- package/dist/cjs/steps/table/add-column.js +453 -0
- package/dist/cjs/steps/table/constants.js +13 -0
- package/dist/cjs/steps/table/sort-column.js +87 -0
- package/dist/cjs/steps/table/types.js +5 -0
- package/dist/cjs/steps/table/utils/cell-step.js +233 -0
- package/dist/cjs/steps/table/utils/cells-at-column.js +94 -0
- package/dist/cjs/steps/table/utils/find-column.js +94 -0
- package/dist/cjs/steps/table/utils/get-table-rect-from-doc.js +38 -0
- package/dist/cjs/steps/table/utils/side-effects/rows.js +370 -0
- package/dist/cjs/steps/table/utils/side-effects/side-effects.js +106 -0
- package/dist/cjs/steps/table/utils/side-effects/table.js +126 -0
- package/dist/cjs/steps/table/utils/side-effects/types.js +5 -0
- package/dist/cjs/steps/table/utils/table-map.js +36 -0
- package/dist/cjs/steps/type-ahead.js +134 -0
- package/dist/cjs/steps.js +59 -0
- package/dist/cjs/utils/colors.js +234 -0
- package/dist/cjs/utils/confluence/emoji.js +97 -0
- package/dist/cjs/utils/extensions.js +39 -0
- package/dist/cjs/utils/index.js +373 -0
- package/dist/cjs/utils/parseDOM.js +12 -0
- package/dist/cjs/utils/url.js +38 -0
- package/dist/cjs/utils/uuid.js +28 -0
- package/dist/cjs/version.json +5 -0
- package/dist/es2019/index.js +2 -0
- package/dist/es2019/schema/bitbucket-schema.js +5 -0
- package/dist/es2019/schema/confluence-schema.js +11 -0
- package/dist/es2019/schema/create-schema.js +325 -0
- package/dist/es2019/schema/default-schema.js +35 -0
- package/dist/es2019/schema/groups.js +23 -0
- package/dist/es2019/schema/index.js +9 -0
- package/dist/es2019/schema/inline-nodes.js +3 -0
- package/dist/es2019/schema/jira-schema.js +88 -0
- package/dist/es2019/schema/marks/alignment.js +32 -0
- package/dist/es2019/schema/marks/annotation.js +80 -0
- package/dist/es2019/schema/marks/breakout.js +29 -0
- package/dist/es2019/schema/marks/code.js +43 -0
- package/dist/es2019/schema/marks/confluence-inline-comment.js +24 -0
- package/dist/es2019/schema/marks/data-consumer.js +61 -0
- package/dist/es2019/schema/marks/em.js +22 -0
- package/dist/es2019/schema/marks/indentation.js +27 -0
- package/dist/es2019/schema/marks/index.js +17 -0
- package/dist/es2019/schema/marks/link.js +105 -0
- package/dist/es2019/schema/marks/strike.js +24 -0
- package/dist/es2019/schema/marks/strong.js +40 -0
- package/dist/es2019/schema/marks/subsup.js +51 -0
- package/dist/es2019/schema/marks/text-color.js +67 -0
- package/dist/es2019/schema/marks/type-ahead-query.js +23 -0
- package/dist/es2019/schema/marks/underline.js +20 -0
- package/dist/es2019/schema/marks/unsupported-mark.js +9 -0
- package/dist/es2019/schema/marks/unsupported-node-attributes.js +10 -0
- package/dist/es2019/schema/nodes/block-card.js +50 -0
- package/dist/es2019/schema/nodes/blockquote.js +17 -0
- package/dist/es2019/schema/nodes/bodied-extension.js +58 -0
- package/dist/es2019/schema/nodes/bullet-list.js +23 -0
- package/dist/es2019/schema/nodes/caption.js +21 -0
- package/dist/es2019/schema/nodes/code-block.js +143 -0
- package/dist/es2019/schema/nodes/confluence-jira-issue.js +49 -0
- package/dist/es2019/schema/nodes/confluence-unsupported-block.js +30 -0
- package/dist/es2019/schema/nodes/confluence-unsupported-inline.js +31 -0
- package/dist/es2019/schema/nodes/date.js +28 -0
- package/dist/es2019/schema/nodes/decision-item.js +37 -0
- package/dist/es2019/schema/nodes/decision-list.js +41 -0
- package/dist/es2019/schema/nodes/doc.js +7 -0
- package/dist/es2019/schema/nodes/embed-card.js +55 -0
- package/dist/es2019/schema/nodes/emoji.js +67 -0
- package/dist/es2019/schema/nodes/expand.js +73 -0
- package/dist/es2019/schema/nodes/extension.js +51 -0
- package/dist/es2019/schema/nodes/hard-break.js +16 -0
- package/dist/es2019/schema/nodes/heading.js +63 -0
- package/dist/es2019/schema/nodes/image.js +37 -0
- package/dist/es2019/schema/nodes/index.js +44 -0
- package/dist/es2019/schema/nodes/inline-card.js +58 -0
- package/dist/es2019/schema/nodes/inline-extension.js +46 -0
- package/dist/es2019/schema/nodes/layout-column.js +49 -0
- package/dist/es2019/schema/nodes/layout-section.js +56 -0
- package/dist/es2019/schema/nodes/list-item.js +20 -0
- package/dist/es2019/schema/nodes/media-group.js +23 -0
- package/dist/es2019/schema/nodes/media-inline.js +2 -0
- package/dist/es2019/schema/nodes/media-single.js +77 -0
- package/dist/es2019/schema/nodes/media.js +165 -0
- package/dist/es2019/schema/nodes/mention.js +81 -0
- package/dist/es2019/schema/nodes/nested-expand.js +58 -0
- package/dist/es2019/schema/nodes/ordered-list.js +23 -0
- package/dist/es2019/schema/nodes/panel.js +79 -0
- package/dist/es2019/schema/nodes/paragraph.js +39 -0
- package/dist/es2019/schema/nodes/placeholder.js +33 -0
- package/dist/es2019/schema/nodes/rule.js +15 -0
- package/dist/es2019/schema/nodes/status.js +54 -0
- package/dist/es2019/schema/nodes/tableNodes.js +222 -0
- package/dist/es2019/schema/nodes/task-item.js +38 -0
- package/dist/es2019/schema/nodes/task-list.js +37 -0
- package/dist/es2019/schema/nodes/text.js +7 -0
- package/dist/es2019/schema/nodes/types/block-content.js +1 -0
- package/dist/es2019/schema/nodes/types/extensions.js +1 -0
- package/dist/es2019/schema/nodes/types/inline-content.js +1 -0
- package/dist/es2019/schema/nodes/types/mark.js +1 -0
- package/dist/es2019/schema/nodes/types/non-nestable-block-content.js +1 -0
- package/dist/es2019/schema/nodes/types/rich-media-common.js +1 -0
- package/dist/es2019/schema/nodes/unknown-block.js +16 -0
- package/dist/es2019/schema/nodes/unsupported-block.js +26 -0
- package/dist/es2019/schema/nodes/unsupported-inline.js +25 -0
- package/dist/es2019/schema/unsupported.js +1 -0
- package/dist/es2019/steps/analytics.js +122 -0
- package/dist/es2019/steps/set-attrs.js +57 -0
- package/dist/es2019/steps/table/add-column.js +349 -0
- package/dist/es2019/steps/table/constants.js +6 -0
- package/dist/es2019/steps/table/sort-column.js +41 -0
- package/dist/es2019/steps/table/types.js +1 -0
- package/dist/es2019/steps/table/utils/cell-step.js +204 -0
- package/dist/es2019/steps/table/utils/cells-at-column.js +57 -0
- package/dist/es2019/steps/table/utils/find-column.js +86 -0
- package/dist/es2019/steps/table/utils/get-table-rect-from-doc.js +30 -0
- package/dist/es2019/steps/table/utils/side-effects/rows.js +297 -0
- package/dist/es2019/steps/table/utils/side-effects/side-effects.js +81 -0
- package/dist/es2019/steps/table/utils/side-effects/table.js +99 -0
- package/dist/es2019/steps/table/utils/side-effects/types.js +1 -0
- package/dist/es2019/steps/table/utils/table-map.js +19 -0
- package/dist/es2019/steps/type-ahead.js +85 -0
- package/dist/es2019/steps.js +6 -0
- package/dist/es2019/utils/colors.js +148 -0
- package/dist/es2019/utils/confluence/emoji.js +83 -0
- package/dist/es2019/utils/extensions.js +26 -0
- package/dist/es2019/utils/index.js +4 -0
- package/dist/es2019/utils/parseDOM.js +1 -0
- package/dist/es2019/utils/url.js +19 -0
- package/dist/es2019/utils/uuid.js +18 -0
- package/dist/es2019/version.json +5 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/schema/bitbucket-schema.js +5 -0
- package/dist/esm/schema/confluence-schema.js +11 -0
- package/dist/esm/schema/create-schema.js +338 -0
- package/dist/esm/schema/default-schema.js +36 -0
- package/dist/esm/schema/groups.js +23 -0
- package/dist/esm/schema/index.js +9 -0
- package/dist/esm/schema/inline-nodes.js +5 -0
- package/dist/esm/schema/jira-schema.js +88 -0
- package/dist/esm/schema/marks/alignment.js +30 -0
- package/dist/esm/schema/marks/annotation.js +82 -0
- package/dist/esm/schema/marks/breakout.js +25 -0
- package/dist/esm/schema/marks/code.js +41 -0
- package/dist/esm/schema/marks/confluence-inline-comment.js +22 -0
- package/dist/esm/schema/marks/data-consumer.js +63 -0
- package/dist/esm/schema/marks/em.js +20 -0
- package/dist/esm/schema/marks/indentation.js +23 -0
- package/dist/esm/schema/marks/index.js +17 -0
- package/dist/esm/schema/marks/link.js +113 -0
- package/dist/esm/schema/marks/strike.js +24 -0
- package/dist/esm/schema/marks/strong.js +32 -0
- package/dist/esm/schema/marks/subsup.js +53 -0
- package/dist/esm/schema/marks/text-color.js +78 -0
- package/dist/esm/schema/marks/type-ahead-query.js +21 -0
- package/dist/esm/schema/marks/underline.js +20 -0
- package/dist/esm/schema/marks/unsupported-mark.js +8 -0
- package/dist/esm/schema/marks/unsupported-node-attributes.js +9 -0
- package/dist/esm/schema/nodes/block-card.js +48 -0
- package/dist/esm/schema/nodes/blockquote.js +15 -0
- package/dist/esm/schema/nodes/bodied-extension.js +58 -0
- package/dist/esm/schema/nodes/bullet-list.js +21 -0
- package/dist/esm/schema/nodes/caption.js +19 -0
- package/dist/esm/schema/nodes/code-block.js +149 -0
- package/dist/esm/schema/nodes/confluence-jira-issue.js +47 -0
- package/dist/esm/schema/nodes/confluence-unsupported-block.js +26 -0
- package/dist/esm/schema/nodes/confluence-unsupported-inline.js +27 -0
- package/dist/esm/schema/nodes/date.js +28 -0
- package/dist/esm/schema/nodes/decision-item.js +36 -0
- package/dist/esm/schema/nodes/decision-list.js +39 -0
- package/dist/esm/schema/nodes/doc.js +7 -0
- package/dist/esm/schema/nodes/embed-card.js +54 -0
- package/dist/esm/schema/nodes/emoji.js +68 -0
- package/dist/esm/schema/nodes/expand.js +75 -0
- package/dist/esm/schema/nodes/extension.js +51 -0
- package/dist/esm/schema/nodes/hard-break.js +14 -0
- package/dist/esm/schema/nodes/heading.js +61 -0
- package/dist/esm/schema/nodes/image.js +33 -0
- package/dist/esm/schema/nodes/index.js +44 -0
- package/dist/esm/schema/nodes/inline-card.js +56 -0
- package/dist/esm/schema/nodes/inline-extension.js +46 -0
- package/dist/esm/schema/nodes/layout-column.js +45 -0
- package/dist/esm/schema/nodes/layout-section.js +52 -0
- package/dist/esm/schema/nodes/list-item.js +18 -0
- package/dist/esm/schema/nodes/media-group.js +21 -0
- package/dist/esm/schema/nodes/media-inline.js +2 -0
- package/dist/esm/schema/nodes/media-single.js +84 -0
- package/dist/esm/schema/nodes/media.js +174 -0
- package/dist/esm/schema/nodes/mention.js +80 -0
- package/dist/esm/schema/nodes/nested-expand.js +56 -0
- package/dist/esm/schema/nodes/ordered-list.js +21 -0
- package/dist/esm/schema/nodes/panel.js +76 -0
- package/dist/esm/schema/nodes/paragraph.js +37 -0
- package/dist/esm/schema/nodes/placeholder.js +31 -0
- package/dist/esm/schema/nodes/rule.js +13 -0
- package/dist/esm/schema/nodes/status.js +51 -0
- package/dist/esm/schema/nodes/tableNodes.js +238 -0
- package/dist/esm/schema/nodes/task-item.js +37 -0
- package/dist/esm/schema/nodes/task-list.js +35 -0
- package/dist/esm/schema/nodes/text.js +9 -0
- package/dist/esm/schema/nodes/types/block-content.js +1 -0
- package/dist/esm/schema/nodes/types/extensions.js +1 -0
- package/dist/esm/schema/nodes/types/inline-content.js +1 -0
- package/dist/esm/schema/nodes/types/mark.js +1 -0
- package/dist/esm/schema/nodes/types/non-nestable-block-content.js +1 -0
- package/dist/esm/schema/nodes/types/rich-media-common.js +1 -0
- package/dist/esm/schema/nodes/unknown-block.js +14 -0
- package/dist/esm/schema/nodes/unsupported-block.js +26 -0
- package/dist/esm/schema/nodes/unsupported-inline.js +25 -0
- package/dist/esm/schema/unsupported.js +1 -0
- package/dist/esm/steps/analytics.js +166 -0
- package/dist/esm/steps/set-attrs.js +89 -0
- package/dist/esm/steps/table/add-column.js +431 -0
- package/dist/esm/steps/table/constants.js +6 -0
- package/dist/esm/steps/table/sort-column.js +69 -0
- package/dist/esm/steps/table/types.js +1 -0
- package/dist/esm/steps/table/utils/cell-step.js +216 -0
- package/dist/esm/steps/table/utils/cells-at-column.js +84 -0
- package/dist/esm/steps/table/utils/find-column.js +87 -0
- package/dist/esm/steps/table/utils/get-table-rect-from-doc.js +30 -0
- package/dist/esm/steps/table/utils/side-effects/rows.js +360 -0
- package/dist/esm/steps/table/utils/side-effects/side-effects.js +93 -0
- package/dist/esm/steps/table/utils/side-effects/table.js +113 -0
- package/dist/esm/steps/table/utils/side-effects/types.js +1 -0
- package/dist/esm/steps/table/utils/table-map.js +19 -0
- package/dist/esm/steps/type-ahead.js +117 -0
- package/dist/esm/steps.js +6 -0
- package/dist/esm/utils/colors.js +160 -0
- package/dist/esm/utils/confluence/emoji.js +85 -0
- package/dist/esm/utils/extensions.js +27 -0
- package/dist/esm/utils/index.js +4 -0
- package/dist/esm/utils/parseDOM.js +3 -0
- package/dist/esm/utils/url.js +21 -0
- package/dist/esm/utils/uuid.js +18 -0
- package/dist/esm/version.json +5 -0
- package/dist/json-schema/v1/full.json +2536 -0
- package/dist/json-schema/v1/stage-0.json +2737 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/schema/bitbucket-schema.d.ts +2 -0
- package/dist/types/schema/confluence-schema.d.ts +3 -0
- package/dist/types/schema/create-schema.d.ts +31 -0
- package/dist/types/schema/default-schema.d.ts +7 -0
- package/dist/types/schema/groups.d.ts +6 -0
- package/dist/types/schema/index.d.ts +11 -0
- package/dist/types/schema/inline-nodes.d.ts +1 -0
- package/dist/types/schema/jira-schema.d.ts +26 -0
- package/dist/types/schema/marks/alignment.d.ts +16 -0
- package/dist/types/schema/marks/annotation.d.ts +32 -0
- package/dist/types/schema/marks/breakout.d.ts +12 -0
- package/dist/types/schema/marks/code.d.ts +8 -0
- package/dist/types/schema/marks/confluence-inline-comment.d.ts +12 -0
- package/dist/types/schema/marks/data-consumer.d.ts +41 -0
- package/dist/types/schema/marks/em.d.ts +8 -0
- package/dist/types/schema/marks/indentation.d.ts +16 -0
- package/dist/types/schema/marks/index.d.ts +30 -0
- package/dist/types/schema/marks/link.d.ts +32 -0
- package/dist/types/schema/marks/strike.d.ts +8 -0
- package/dist/types/schema/marks/strong.d.ts +8 -0
- package/dist/types/schema/marks/subsup.d.ts +15 -0
- package/dist/types/schema/marks/text-color.d.ts +21 -0
- package/dist/types/schema/marks/type-ahead-query.d.ts +2 -0
- package/dist/types/schema/marks/underline.d.ts +8 -0
- package/dist/types/schema/marks/unsupported-mark.d.ts +2 -0
- package/dist/types/schema/marks/unsupported-node-attributes.d.ts +2 -0
- package/dist/types/schema/nodes/block-card.d.ts +19 -0
- package/dist/types/schema/nodes/blockquote.d.ts +14 -0
- package/dist/types/schema/nodes/bodied-extension.d.ts +27 -0
- package/dist/types/schema/nodes/bullet-list.d.ts +14 -0
- package/dist/types/schema/nodes/caption.d.ts +21 -0
- package/dist/types/schema/nodes/code-block.d.ts +31 -0
- package/dist/types/schema/nodes/confluence-jira-issue.d.ts +2 -0
- package/dist/types/schema/nodes/confluence-unsupported-block.d.ts +2 -0
- package/dist/types/schema/nodes/confluence-unsupported-inline.d.ts +2 -0
- package/dist/types/schema/nodes/date.d.ts +14 -0
- package/dist/types/schema/nodes/decision-item.d.ts +17 -0
- package/dist/types/schema/nodes/decision-list.d.ts +18 -0
- package/dist/types/schema/nodes/doc.d.ts +18 -0
- package/dist/types/schema/nodes/embed-card.d.ts +15 -0
- package/dist/types/schema/nodes/emoji.d.ts +14 -0
- package/dist/types/schema/nodes/expand.d.ts +33 -0
- package/dist/types/schema/nodes/extension.d.ts +21 -0
- package/dist/types/schema/nodes/hard-break.d.ts +11 -0
- package/dist/types/schema/nodes/heading.d.ts +36 -0
- package/dist/types/schema/nodes/image.d.ts +2 -0
- package/dist/types/schema/nodes/index.d.ts +93 -0
- package/dist/types/schema/nodes/inline-card.d.ts +19 -0
- package/dist/types/schema/nodes/inline-extension.d.ts +21 -0
- package/dist/types/schema/nodes/layout-column.d.ts +21 -0
- package/dist/types/schema/nodes/layout-section.d.ts +44 -0
- package/dist/types/schema/nodes/list-item.d.ts +20 -0
- package/dist/types/schema/nodes/media-group.d.ts +14 -0
- package/dist/types/schema/nodes/media-inline.d.ts +16 -0
- package/dist/types/schema/nodes/media-single.d.ts +59 -0
- package/dist/types/schema/nodes/media.d.ts +60 -0
- package/dist/types/schema/nodes/mention.d.ts +26 -0
- package/dist/types/schema/nodes/nested-expand.d.ts +27 -0
- package/dist/types/schema/nodes/ordered-list.d.ts +20 -0
- package/dist/types/schema/nodes/panel.d.ts +46 -0
- package/dist/types/schema/nodes/paragraph.d.ts +37 -0
- package/dist/types/schema/nodes/placeholder.d.ts +11 -0
- package/dist/types/schema/nodes/rule.d.ts +8 -0
- package/dist/types/schema/nodes/status.d.ts +20 -0
- package/dist/types/schema/nodes/tableNodes.d.ts +111 -0
- package/dist/types/schema/nodes/task-item.d.ts +17 -0
- package/dist/types/schema/nodes/task-list.d.ts +21 -0
- package/dist/types/schema/nodes/text.d.ts +15 -0
- package/dist/types/schema/nodes/types/block-content.d.ts +22 -0
- package/dist/types/schema/nodes/types/extensions.d.ts +34 -0
- package/dist/types/schema/nodes/types/inline-content.d.ts +32 -0
- package/dist/types/schema/nodes/types/mark.d.ts +15 -0
- package/dist/types/schema/nodes/types/non-nestable-block-content.d.ts +20 -0
- package/dist/types/schema/nodes/types/rich-media-common.d.ts +9 -0
- package/dist/types/schema/nodes/unknown-block.d.ts +3 -0
- package/dist/types/schema/nodes/unsupported-block.d.ts +2 -0
- package/dist/types/schema/nodes/unsupported-inline.d.ts +2 -0
- package/dist/types/schema/unsupported.d.ts +1 -0
- package/dist/types/steps/analytics.d.ts +59 -0
- package/dist/types/steps/set-attrs.d.ts +23 -0
- package/dist/types/steps/table/add-column.d.ts +88 -0
- package/dist/types/steps/table/constants.d.ts +4 -0
- package/dist/types/steps/table/sort-column.d.ts +18 -0
- package/dist/types/steps/table/types.d.ts +39 -0
- package/dist/types/steps/table/utils/cell-step.d.ts +47 -0
- package/dist/types/steps/table/utils/cells-at-column.d.ts +20 -0
- package/dist/types/steps/table/utils/find-column.d.ts +8 -0
- package/dist/types/steps/table/utils/get-table-rect-from-doc.d.ts +8 -0
- package/dist/types/steps/table/utils/side-effects/rows.d.ts +25 -0
- package/dist/types/steps/table/utils/side-effects/side-effects.d.ts +15 -0
- package/dist/types/steps/table/utils/side-effects/table.d.ts +16 -0
- package/dist/types/steps/table/utils/side-effects/types.d.ts +33 -0
- package/dist/types/steps/table/utils/table-map.d.ts +6 -0
- package/dist/types/steps/type-ahead.d.ts +35 -0
- package/dist/types/steps.d.ts +8 -0
- package/dist/types/utils/colors.d.ts +71 -0
- package/dist/types/utils/confluence/emoji.d.ts +50 -0
- package/dist/types/utils/extensions.d.ts +3 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/parseDOM.d.ts +1 -0
- package/dist/types/utils/url.d.ts +15 -0
- package/dist/types/utils/uuid.d.ts +5 -0
- package/document-fixtures/unsupported-content.json +526 -0
- package/json-schema/v1/full.json +2536 -0
- package/json-schema/v1/stage-0.json +2737 -0
- package/package.json +63 -0
- package/steps/package.json +7 -0
- package/test-helpers/html-helpers.ts +40 -0
- package/test-helpers/matches.ts +8 -0
- package/test-helpers/schema-builder.ts +329 -0
- package/test-helpers/schema.ts +79 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { getExtensionAttrs } from '../../utils/extensions';
|
|
2
|
+
|
|
3
|
+
const createBodiedExtensionNodeSpec = () => {
|
|
4
|
+
const nodeSpec = {
|
|
5
|
+
inline: false,
|
|
6
|
+
group: 'block',
|
|
7
|
+
marks: 'link dataConsumer',
|
|
8
|
+
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | extension | unsupportedBlock | embedCard)+',
|
|
9
|
+
defining: true,
|
|
10
|
+
selectable: true,
|
|
11
|
+
isolating: true,
|
|
12
|
+
attrs: {
|
|
13
|
+
extensionType: {
|
|
14
|
+
default: ''
|
|
15
|
+
},
|
|
16
|
+
extensionKey: {
|
|
17
|
+
default: ''
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
default: null
|
|
21
|
+
},
|
|
22
|
+
text: {
|
|
23
|
+
default: null
|
|
24
|
+
},
|
|
25
|
+
layout: {
|
|
26
|
+
default: 'default'
|
|
27
|
+
},
|
|
28
|
+
localId: {
|
|
29
|
+
default: null
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
parseDOM: [{
|
|
33
|
+
context: 'bodiedExtension//',
|
|
34
|
+
tag: '[data-node-type="bodied-extension"]',
|
|
35
|
+
skip: true
|
|
36
|
+
}, {
|
|
37
|
+
tag: '[data-node-type="bodied-extension"]',
|
|
38
|
+
getAttrs: domNode => getExtensionAttrs(domNode)
|
|
39
|
+
}],
|
|
40
|
+
|
|
41
|
+
toDOM(node) {
|
|
42
|
+
const attrs = {
|
|
43
|
+
'data-node-type': 'bodied-extension',
|
|
44
|
+
'data-extension-type': node.attrs.extensionType,
|
|
45
|
+
'data-extension-key': node.attrs.extensionKey,
|
|
46
|
+
'data-text': node.attrs.text,
|
|
47
|
+
'data-parameters': JSON.stringify(node.attrs.parameters),
|
|
48
|
+
'data-layout': node.attrs.layout,
|
|
49
|
+
'data-local-id:': node.attrs.localId
|
|
50
|
+
};
|
|
51
|
+
return ['div', attrs, 0];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
};
|
|
55
|
+
return nodeSpec;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const bodiedExtension = createBodiedExtensionNodeSpec();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-cycle
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name bulletList_node
|
|
5
|
+
*/
|
|
6
|
+
export const bulletListSelector = '.ak-ul';
|
|
7
|
+
export const bulletList = {
|
|
8
|
+
group: 'block',
|
|
9
|
+
content: 'listItem+',
|
|
10
|
+
selectable: false,
|
|
11
|
+
parseDOM: [{
|
|
12
|
+
tag: 'ul'
|
|
13
|
+
}],
|
|
14
|
+
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
15
|
+
|
|
16
|
+
toDOM() {
|
|
17
|
+
const attrs = {
|
|
18
|
+
class: bulletListSelector.substr(1)
|
|
19
|
+
};
|
|
20
|
+
return ['ul', attrs, 0];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @stage 0
|
|
3
|
+
* @name caption_node
|
|
4
|
+
*/
|
|
5
|
+
export const caption = {
|
|
6
|
+
content: '(text|hardBreak|mention|emoji|date|placeholder|inlineCard|status)*',
|
|
7
|
+
isolating: true,
|
|
8
|
+
marks: '_',
|
|
9
|
+
selectable: false,
|
|
10
|
+
parseDOM: [{
|
|
11
|
+
tag: 'figcaption[data-caption]'
|
|
12
|
+
}],
|
|
13
|
+
|
|
14
|
+
toDOM(node) {
|
|
15
|
+
const attrs = {
|
|
16
|
+
'data-caption': 'true'
|
|
17
|
+
};
|
|
18
|
+
return ['figcaption', attrs, 0];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Fragment } from 'prosemirror-model';
|
|
2
|
+
|
|
3
|
+
const getLanguageFromEditorStyle = dom => {
|
|
4
|
+
return dom.getAttribute('data-language') || undefined;
|
|
5
|
+
}; // example of BB style:
|
|
6
|
+
// <div class="codehilite language-javascript"><pre><span>hello world</span><span>\n</span></pre></div>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
const getLanguageFromBitbucketStyle = dom => {
|
|
10
|
+
if (dom && dom.classList.contains('codehilite')) {
|
|
11
|
+
// code block html from Bitbucket always contains an extra new line
|
|
12
|
+
return extractLanguageFromClass(dom.className);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return;
|
|
16
|
+
}; // If there is a child code element, check that for data-language
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
const getLanguageFromCode = dom => {
|
|
20
|
+
const firstChild = dom.firstElementChild;
|
|
21
|
+
|
|
22
|
+
if (firstChild && firstChild.nodeName === 'CODE') {
|
|
23
|
+
return firstChild.getAttribute('data-language') || undefined;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const extractLanguageFromClass = className => {
|
|
28
|
+
const languageRegex = /(?:^|\s)language-([^\s]+)/;
|
|
29
|
+
const result = languageRegex.exec(className);
|
|
30
|
+
|
|
31
|
+
if (result && result[1]) {
|
|
32
|
+
return result[1];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const removeLastNewLine = dom => {
|
|
39
|
+
const parent = dom && dom.parentElement;
|
|
40
|
+
|
|
41
|
+
if (parent && parent.classList.contains('codehilite')) {
|
|
42
|
+
dom.textContent = dom.textContent.replace(/\n$/, '');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return dom;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const codeBlock = {
|
|
49
|
+
attrs: {
|
|
50
|
+
language: {
|
|
51
|
+
default: null
|
|
52
|
+
},
|
|
53
|
+
uniqueId: {
|
|
54
|
+
default: null
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
content: '(text | unsupportedInline)*',
|
|
58
|
+
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
59
|
+
group: 'block',
|
|
60
|
+
code: true,
|
|
61
|
+
defining: true,
|
|
62
|
+
parseDOM: [{
|
|
63
|
+
tag: 'pre',
|
|
64
|
+
preserveWhitespace: 'full',
|
|
65
|
+
getAttrs: domNode => {
|
|
66
|
+
let dom = domNode;
|
|
67
|
+
const language = getLanguageFromBitbucketStyle(dom.parentElement) || getLanguageFromEditorStyle(dom.parentElement) || getLanguageFromCode(dom) || dom.getAttribute('data-language');
|
|
68
|
+
dom = removeLastNewLine(dom);
|
|
69
|
+
return {
|
|
70
|
+
language
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}, // Handle VSCode paste
|
|
74
|
+
// Checking `white-space: pre-wrap` is too aggressive @see ED-2627
|
|
75
|
+
{
|
|
76
|
+
tag: 'div[style]',
|
|
77
|
+
preserveWhitespace: 'full',
|
|
78
|
+
getAttrs: domNode => {
|
|
79
|
+
const dom = domNode;
|
|
80
|
+
|
|
81
|
+
if (dom.style.whiteSpace === 'pre' || dom.style.fontFamily && dom.style.fontFamily.toLowerCase().indexOf('monospace') > -1) {
|
|
82
|
+
return {};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return false;
|
|
86
|
+
},
|
|
87
|
+
// @see ED-5682
|
|
88
|
+
getContent: (domNode, schema) => {
|
|
89
|
+
const dom = domNode;
|
|
90
|
+
const code = Array.from(dom.children).map(child => child.textContent).filter(x => x !== undefined).join('\n');
|
|
91
|
+
return code ? Fragment.from(schema.text(code)) : Fragment.empty;
|
|
92
|
+
}
|
|
93
|
+
}, // Handle GitHub/Gist paste
|
|
94
|
+
{
|
|
95
|
+
tag: 'table[style]',
|
|
96
|
+
preserveWhitespace: 'full',
|
|
97
|
+
getAttrs: dom => {
|
|
98
|
+
if (dom.querySelector('td[class*="blob-code"]')) {
|
|
99
|
+
return {};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
tag: 'div.code-block',
|
|
106
|
+
preserveWhitespace: 'full',
|
|
107
|
+
getAttrs: domNode => {
|
|
108
|
+
const dom = domNode; // TODO: ED-5604 Fix it inside `react-syntax-highlighter`
|
|
109
|
+
// Remove line numbers
|
|
110
|
+
|
|
111
|
+
const lineNumber = dom.querySelectorAll('.react-syntax-highlighter-line-number');
|
|
112
|
+
|
|
113
|
+
if (lineNumber.length > 0) {
|
|
114
|
+
// It's possible to copy without the line numbers too hence this
|
|
115
|
+
// `react-syntax-highlighter-line-number` check, so that we don't remove real code
|
|
116
|
+
lineNumber.forEach(line => line.remove());
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return {};
|
|
120
|
+
}
|
|
121
|
+
}],
|
|
122
|
+
|
|
123
|
+
toDOM(node) {
|
|
124
|
+
return ['pre', ['code', {
|
|
125
|
+
'data-language': node.attrs.language
|
|
126
|
+
}, 0]];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
};
|
|
130
|
+
export const toJSON = node => ({
|
|
131
|
+
attrs: Object.keys(node.attrs).reduce((memo, key) => {
|
|
132
|
+
if (key === 'uniqueId') {
|
|
133
|
+
return memo;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (key === 'language' && node.attrs.language === null) {
|
|
137
|
+
return memo;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
memo[key] = node.attrs[key];
|
|
141
|
+
return memo;
|
|
142
|
+
}, {})
|
|
143
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const name = 'confluenceJiraIssue';
|
|
2
|
+
export const confluenceJiraIssue = {
|
|
3
|
+
group: 'inline',
|
|
4
|
+
inline: true,
|
|
5
|
+
atom: true,
|
|
6
|
+
attrs: {
|
|
7
|
+
issueKey: {
|
|
8
|
+
default: ''
|
|
9
|
+
},
|
|
10
|
+
macroId: {
|
|
11
|
+
default: null
|
|
12
|
+
},
|
|
13
|
+
schemaVersion: {
|
|
14
|
+
default: null
|
|
15
|
+
},
|
|
16
|
+
server: {
|
|
17
|
+
default: null
|
|
18
|
+
},
|
|
19
|
+
serverId: {
|
|
20
|
+
default: null
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
parseDOM: [{
|
|
24
|
+
tag: `span[data-node-type="${name}"]`,
|
|
25
|
+
getAttrs: domNode => {
|
|
26
|
+
const dom = domNode;
|
|
27
|
+
return {
|
|
28
|
+
issueKey: dom.textContent,
|
|
29
|
+
macroId: dom.dataset && dom.dataset.macroId,
|
|
30
|
+
schemaVersion: dom.dataset && dom.dataset.schemaVersion,
|
|
31
|
+
server: dom.dataset && dom.dataset.server,
|
|
32
|
+
serverId: dom.dataset && dom.dataset.serverId
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}],
|
|
36
|
+
|
|
37
|
+
toDOM(node) {
|
|
38
|
+
const attrs = {
|
|
39
|
+
'data-node-type': name,
|
|
40
|
+
'data-macro-id': node.attrs.macroId,
|
|
41
|
+
'data-schema-version': node.attrs.schemaVersion,
|
|
42
|
+
'data-server': node.attrs.server,
|
|
43
|
+
'data-server-id': node.attrs.serverId,
|
|
44
|
+
'data-jira-issue': node.attrs.issueKey
|
|
45
|
+
};
|
|
46
|
+
return ['span', attrs, node.attrs.issueKey];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const name = 'confluenceUnsupportedBlock';
|
|
2
|
+
export const confluenceUnsupportedBlock = {
|
|
3
|
+
group: 'block',
|
|
4
|
+
attrs: {
|
|
5
|
+
cxhtml: {
|
|
6
|
+
default: null
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
toDOM(node) {
|
|
11
|
+
// NOTE: This node cannot be "contenteditable: false". If it's the only node in a document, PM throws an error because there's nowhere to put the cursor.
|
|
12
|
+
const attrs = {
|
|
13
|
+
'data-node-type': name,
|
|
14
|
+
'data-confluence-unsupported': 'block',
|
|
15
|
+
'data-confluence-unsupported-block-cxhtml': node.attrs['cxhtml']
|
|
16
|
+
};
|
|
17
|
+
return ['div', attrs, 'Unsupported content'];
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
parseDOM: [{
|
|
21
|
+
tag: `div[data-node-type="${name}"]`,
|
|
22
|
+
|
|
23
|
+
getAttrs(dom) {
|
|
24
|
+
return {
|
|
25
|
+
cxhtml: dom.getAttribute('data-confluence-unsupported-block-cxhtml')
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}]
|
|
30
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const name = 'confluenceUnsupportedInline';
|
|
2
|
+
export const confluenceUnsupportedInline = {
|
|
3
|
+
group: 'inline',
|
|
4
|
+
inline: true,
|
|
5
|
+
atom: true,
|
|
6
|
+
attrs: {
|
|
7
|
+
cxhtml: {
|
|
8
|
+
default: null
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
toDOM(node) {
|
|
13
|
+
const attrs = {
|
|
14
|
+
'data-node-type': name,
|
|
15
|
+
'data-confluence-unsupported': 'inline',
|
|
16
|
+
'data-confluence-unsupported-inline-cxhtml': node.attrs['cxhtml']
|
|
17
|
+
};
|
|
18
|
+
return ['div', attrs, 'Unsupported content'];
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
parseDOM: [{
|
|
22
|
+
tag: `div[data-node-type="${name}"]`,
|
|
23
|
+
|
|
24
|
+
getAttrs(dom) {
|
|
25
|
+
return {
|
|
26
|
+
cxhtml: dom.getAttribute('data-confluence-unsupported-inline-cxhtml')
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}]
|
|
31
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name date_node
|
|
3
|
+
*/
|
|
4
|
+
export const date = {
|
|
5
|
+
inline: true,
|
|
6
|
+
group: 'inline',
|
|
7
|
+
selectable: true,
|
|
8
|
+
attrs: {
|
|
9
|
+
timestamp: {
|
|
10
|
+
default: ''
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
parseDOM: [{
|
|
14
|
+
tag: 'span[data-node-type="date"]',
|
|
15
|
+
getAttrs: dom => ({
|
|
16
|
+
timestamp: dom.getAttribute('data-timestamp')
|
|
17
|
+
})
|
|
18
|
+
}],
|
|
19
|
+
|
|
20
|
+
toDOM(node) {
|
|
21
|
+
const attrs = {
|
|
22
|
+
'data-node-type': 'date',
|
|
23
|
+
'data-timestamp': node.attrs.timestamp
|
|
24
|
+
};
|
|
25
|
+
return ['span', attrs];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { uuid } from '../../utils/uuid';
|
|
2
|
+
export const decisionItem = {
|
|
3
|
+
content: 'inline*',
|
|
4
|
+
defining: true,
|
|
5
|
+
marks: '_',
|
|
6
|
+
attrs: {
|
|
7
|
+
localId: {
|
|
8
|
+
default: ''
|
|
9
|
+
},
|
|
10
|
+
state: {
|
|
11
|
+
default: 'DECIDED'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
parseDOM: [{
|
|
15
|
+
tag: 'li[data-decision-local-id]',
|
|
16
|
+
// Default priority is 50. We normally don't change this but since this node type is
|
|
17
|
+
// also used by list-item we need to make sure that we run this parser first.
|
|
18
|
+
priority: 100,
|
|
19
|
+
getAttrs: dom => ({
|
|
20
|
+
localId: uuid.generate(),
|
|
21
|
+
state: dom.getAttribute('data-decision-state')
|
|
22
|
+
})
|
|
23
|
+
}],
|
|
24
|
+
|
|
25
|
+
toDOM(node) {
|
|
26
|
+
const {
|
|
27
|
+
localId,
|
|
28
|
+
state
|
|
29
|
+
} = node.attrs;
|
|
30
|
+
const attrs = {
|
|
31
|
+
'data-decision-local-id': localId || 'local-decision',
|
|
32
|
+
'data-decision-state': state
|
|
33
|
+
};
|
|
34
|
+
return ['li', attrs, 0];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { uuid } from '../../utils/uuid';
|
|
2
|
+
/**
|
|
3
|
+
* @name decisionList_node
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const name = 'decisionList';
|
|
7
|
+
export const decisionListSelector = `[data-node-type="${name}"]`;
|
|
8
|
+
export const decisionList = {
|
|
9
|
+
group: 'block',
|
|
10
|
+
defining: true,
|
|
11
|
+
content: '(decisionItem|unsupportedBlock)+',
|
|
12
|
+
marks: 'unsupportedMark unsupportedNodeAttribute',
|
|
13
|
+
selectable: false,
|
|
14
|
+
attrs: {
|
|
15
|
+
localId: {
|
|
16
|
+
default: ''
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
parseDOM: [{
|
|
20
|
+
tag: `ol${decisionListSelector}`,
|
|
21
|
+
// Default priority is 50. We normally don't change this but since this node type is
|
|
22
|
+
// also used by ordered-list we need to make sure that we run this parser first.
|
|
23
|
+
priority: 100,
|
|
24
|
+
getAttrs: () => ({
|
|
25
|
+
localId: uuid.generate()
|
|
26
|
+
})
|
|
27
|
+
}],
|
|
28
|
+
|
|
29
|
+
toDOM(node) {
|
|
30
|
+
const {
|
|
31
|
+
localId
|
|
32
|
+
} = node.attrs;
|
|
33
|
+
const attrs = {
|
|
34
|
+
'data-node-type': name,
|
|
35
|
+
'data-decision-list-local-id': localId || 'local-decision-list',
|
|
36
|
+
style: 'list-style: none; padding-left: 0'
|
|
37
|
+
};
|
|
38
|
+
return ['ol', attrs, 0];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
};
|