@atlaskit/adf-utils 19.20.2 → 19.21.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/adf-utils
2
2
 
3
+ ## 19.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`13a1ad07bb39e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13a1ad07bb39e) -
8
+ [ux] EDITOR-1146 | EDITOR-1176 Introduce `blockTaskItem` node to Renderer and Editor
9
+ `editor-plugin-tasks-and-decisions` which adopts the same code and functionality as the regular
10
+ `taskItem` except that it allows block content such as extensions to be inserted. This is to
11
+ facilitate TinyMCE migration which requires usage of the Legacy Content Extension.
12
+
13
+ ## 19.20.3
14
+
15
+ ### Patch Changes
16
+
17
+ - [#195649](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/195649)
18
+ [`231bb33e06dfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/231bb33e06dfe) -
19
+ EDITOR-1131 Bump adf-schema version to 50.2.0
20
+
3
21
  ## 19.20.2
4
22
 
5
23
  ### Patch Changes
@@ -14,7 +14,13 @@
14
14
  "exclude": [
15
15
  "../src/**/__tests__/*",
16
16
  "../src/**/*.test.*",
17
- "../src/**/test.*"
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
18
24
  ],
19
25
  "references": []
20
26
  }
@@ -14,7 +14,13 @@
14
14
  "exclude": [
15
15
  "../src/**/__tests__/*",
16
16
  "../src/**/*.test.*",
17
- "../src/**/test.*"
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
18
24
  ],
19
25
  "references": []
20
26
  }
@@ -14,7 +14,13 @@
14
14
  "exclude": [
15
15
  "../src/**/__tests__/*",
16
16
  "../src/**/*.test.*",
17
- "../src/**/test.*"
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
18
24
  ],
19
25
  "references": []
20
26
  }
@@ -14,7 +14,13 @@
14
14
  "exclude": [
15
15
  "../src/**/__tests__/*",
16
16
  "../src/**/*.test.*",
17
- "../src/**/test.*"
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
18
24
  ],
19
25
  "references": []
20
26
  }
@@ -14,7 +14,13 @@
14
14
  "exclude": [
15
15
  "../src/**/__tests__/*",
16
16
  "../src/**/*.test.*",
17
- "../src/**/test.*"
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
18
24
  ],
19
25
  "references": []
20
26
  }
@@ -14,7 +14,13 @@
14
14
  "exclude": [
15
15
  "../src/**/__tests__/*",
16
16
  "../src/**/*.test.*",
17
- "../src/**/test.*"
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
18
24
  ],
19
25
  "references": []
20
26
  }
@@ -12,6 +12,12 @@
12
12
  "exclude": [
13
13
  "../src/**/__tests__/*",
14
14
  "../src/**/*.test.*",
15
- "../src/**/test.*"
15
+ "../src/**/test.*",
16
+ "../src/**/examples.*",
17
+ "../src/**/examples/*",
18
+ "../src/**/examples/**/*",
19
+ "../src/**/*.stories.*",
20
+ "../src/**/stories/*",
21
+ "../src/**/stories/**/*"
16
22
  ]
17
- }
23
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.blockTaskItem = void 0;
7
+ var blockTaskItem = exports.blockTaskItem = function blockTaskItem(attrs) {
8
+ return function () {
9
+ for (var _len = arguments.length, content = new Array(_len), _key = 0; _key < _len; _key++) {
10
+ content[_key] = arguments[_key];
11
+ }
12
+ return {
13
+ type: 'blockTaskItem',
14
+ attrs: attrs,
15
+ content: content
16
+ };
17
+ };
18
+ };
@@ -39,6 +39,12 @@ Object.defineProperty(exports, "blockQuote", {
39
39
  return _blockquote.blockQuote;
40
40
  }
41
41
  });
42
+ Object.defineProperty(exports, "blockTaskItem", {
43
+ enumerable: true,
44
+ get: function get() {
45
+ return _blockTaskItem.blockTaskItem;
46
+ }
47
+ });
42
48
  Object.defineProperty(exports, "bodiedExtension", {
43
49
  enumerable: true,
44
50
  get: function get() {
@@ -445,4 +451,5 @@ var _table = require("./builders/nodes/table");
445
451
  var _taskItem = require("./builders/nodes/task-item");
446
452
  var _taskList = require("./builders/nodes/task-list");
447
453
  var _text = require("./builders/nodes/text");
448
- var _embedCard = require("./builders/nodes/embed-card");
454
+ var _embedCard = require("./builders/nodes/embed-card");
455
+ var _blockTaskItem = require("./builders/nodes/block-task-item");
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "blockRootOnly", {
33
33
  return _schemaValidator.blockRootOnly;
34
34
  }
35
35
  });
36
+ Object.defineProperty(exports, "blockTaskItem", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _schemaValidator.blockTaskItem;
40
+ }
41
+ });
36
42
  Object.defineProperty(exports, "block_content", {
37
43
  enumerable: true,
38
44
  get: function get() {
@@ -0,0 +1,5 @@
1
+ export const blockTaskItem = attrs => (...content) => ({
2
+ type: 'blockTaskItem',
3
+ attrs,
4
+ content
5
+ });
@@ -69,4 +69,5 @@ export { table } from './builders/nodes/table';
69
69
  export { taskItem } from './builders/nodes/task-item';
70
70
  export { taskList } from './builders/nodes/task-list';
71
71
  export { text } from './builders/nodes/text';
72
- export { embedCard } from './builders/nodes/embed-card';
72
+ export { embedCard } from './builders/nodes/embed-card';
73
+ export { blockTaskItem } from './builders/nodes/block-task-item';
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline } from '@atlaskit/adf-schema/schema-validator';
2
+ export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline } from '@atlaskit/adf-schema/schema-validator';
@@ -0,0 +1,12 @@
1
+ export var blockTaskItem = function blockTaskItem(attrs) {
2
+ return function () {
3
+ for (var _len = arguments.length, content = new Array(_len), _key = 0; _key < _len; _key++) {
4
+ content[_key] = arguments[_key];
5
+ }
6
+ return {
7
+ type: 'blockTaskItem',
8
+ attrs: attrs,
9
+ content: content
10
+ };
11
+ };
12
+ };
@@ -69,4 +69,5 @@ export { table } from './builders/nodes/table';
69
69
  export { taskItem } from './builders/nodes/task-item';
70
70
  export { taskList } from './builders/nodes/task-list';
71
71
  export { text } from './builders/nodes/text';
72
- export { embedCard } from './builders/nodes/embed-card';
72
+ export { embedCard } from './builders/nodes/embed-card';
73
+ export { blockTaskItem } from './builders/nodes/block-task-item';
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
2
- export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline } from '@atlaskit/adf-schema/schema-validator';
2
+ export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline } from '@atlaskit/adf-schema/schema-validator';
@@ -0,0 +1,2 @@
1
+ import { type BlockTaskItemDefinition, type ParagraphDefinition, type ExtensionDefinition } from '@atlaskit/adf-schema';
2
+ export declare const blockTaskItem: (attrs: BlockTaskItemDefinition['attrs']) => (...content: Array<ParagraphDefinition | ExtensionDefinition>) => BlockTaskItemDefinition;
@@ -63,3 +63,4 @@ export { taskItem } from './builders/nodes/task-item';
63
63
  export { taskList } from './builders/nodes/task-list';
64
64
  export { text } from './builders/nodes/text';
65
65
  export { embedCard } from './builders/nodes/embed-card';
66
+ export { blockTaskItem } from './builders/nodes/block-task-item';
@@ -1 +1 @@
1
- export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, } from '@atlaskit/adf-schema/schema-validator';
1
+ export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, } from '@atlaskit/adf-schema/schema-validator';
@@ -0,0 +1,2 @@
1
+ import { type BlockTaskItemDefinition, type ParagraphDefinition, type ExtensionDefinition } from '@atlaskit/adf-schema';
2
+ export declare const blockTaskItem: (attrs: BlockTaskItemDefinition['attrs']) => (...content: Array<ParagraphDefinition | ExtensionDefinition>) => BlockTaskItemDefinition;
@@ -63,3 +63,4 @@ export { taskItem } from './builders/nodes/task-item';
63
63
  export { taskList } from './builders/nodes/task-list';
64
64
  export { text } from './builders/nodes/text';
65
65
  export { embedCard } from './builders/nodes/embed-card';
66
+ export { blockTaskItem } from './builders/nodes/block-task-item';
@@ -1 +1 @@
1
- export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, } from '@atlaskit/adf-schema/schema-validator';
1
+ export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, } from '@atlaskit/adf-schema/schema-validator';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-utils",
3
- "version": "19.20.2",
3
+ "version": "19.21.0",
4
4
  "description": "Set of utilities to traverse, modify and create ADF documents.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,13 +36,12 @@
36
36
  "./validatorTypes": "./src/types/validatorTypes.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@atlaskit/adf-schema": "^50.0.1",
39
+ "@atlaskit/adf-schema": "^50.2.0",
40
40
  "@babel/runtime": "^7.0.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@atlassian/adf-schema-json": "^1.31.0",
44
44
  "react": "^18.2.0",
45
- "typescript": "~5.4.2",
46
45
  "wait-for-expect": "^1.2.0"
47
46
  },
48
47
  "techstack": {
package/tsconfig.json CHANGED
@@ -1,14 +1,19 @@
1
1
  {
2
- "extends": "../../../tsconfig.json",
3
- "compilerOptions": {
4
- },
5
- "include": [
6
- "./src/**/*.ts",
7
- "./src/**/*.tsx",
8
- "./docs/**/*.ts",
9
- "./docs/**/*.tsx",
10
- "./examples/**/*.ts",
11
- "./examples/**/*.tsx",
12
- "codemods"
13
- ]
2
+ "extends": "../../../tsconfig.json",
3
+ "compilerOptions": {},
4
+ "include": [
5
+ "./src/**/*.ts",
6
+ "./src/**/*.tsx",
7
+ "./docs/**/*.ts",
8
+ "./docs/**/*.tsx",
9
+ "./examples/**/*.ts",
10
+ "./examples/**/*.tsx",
11
+ "codemods",
12
+ "**/stories.ts",
13
+ "**/stories.tsx",
14
+ "**/stories/*.ts",
15
+ "**/stories/*.tsx",
16
+ "**/stories/**/*.ts",
17
+ "**/stories/**/*.tsx"
18
+ ]
14
19
  }