@atlaskit/editor-plugin-tasks-and-decisions 11.4.3 → 11.4.5

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,20 @@
1
1
  # @atlaskit/editor-plugin-tasks-and-decisions
2
2
 
3
+ ## 11.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 11.4.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`1c4534dc921e6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1c4534dc921e6) -
14
+ Preserve small text formatting when converting selections to task lists across block menu, block
15
+ type, and paste flows
16
+ - Updated dependencies
17
+
3
18
  ## 11.4.3
4
19
 
5
20
  ### Patch Changes
@@ -73,11 +73,13 @@ var getTaskPasteContext = function getTaskPasteContext(view) {
73
73
  };
74
74
  };
75
75
  var convertTaskItemToBlockTaskItem = function convertTaskItemToBlockTaskItem(node, schema, smallTextAttrs) {
76
- var _schema$nodes2 = schema.nodes,
77
- blockTaskItem = _schema$nodes2.blockTaskItem,
78
- paragraph = _schema$nodes2.paragraph;
79
76
  var fontSize = schema.marks.fontSize;
80
- return blockTaskItem.create(node.attrs, paragraph.createChecked({}, node.content, [fontSize.create(smallTextAttrs)]));
77
+ return (0, _transforms.createBlockTaskItem)({
78
+ attrs: node.attrs,
79
+ content: node.content,
80
+ marks: [fontSize.create(smallTextAttrs)],
81
+ schema: schema
82
+ });
81
83
  };
82
84
  var addSmallTextToBlockTaskItem = function addSmallTextToBlockTaskItem(node, schema, smallTextAttrs) {
83
85
  var paragraph = schema.nodes.paragraph;
@@ -95,10 +97,10 @@ var addSmallTextToBlockTaskItem = function addSmallTextToBlockTaskItem(node, sch
95
97
  return node.type.create(node.attrs, newContent);
96
98
  };
97
99
  var normalizeBlockTaskItemToTaskItems = function normalizeBlockTaskItemToTaskItems(node, schema) {
98
- var _schema$nodes3 = schema.nodes,
99
- taskItem = _schema$nodes3.taskItem,
100
- blockTaskItem = _schema$nodes3.blockTaskItem,
101
- paragraph = _schema$nodes3.paragraph;
100
+ var _schema$nodes2 = schema.nodes,
101
+ taskItem = _schema$nodes2.taskItem,
102
+ blockTaskItem = _schema$nodes2.blockTaskItem,
103
+ paragraph = _schema$nodes2.paragraph;
102
104
  if (!blockTaskItem || node.type !== blockTaskItem) {
103
105
  return [node];
104
106
  }
@@ -135,9 +137,9 @@ var transformSliceContent = function transformSliceContent(slice, transformNode)
135
137
  };
136
138
  var transformSliceToRemoveBlockTaskItemLegacy = function transformSliceToRemoveBlockTaskItemLegacy(slice, view) {
137
139
  var schema = view.state.schema;
138
- var _schema$nodes4 = schema.nodes,
139
- taskItem = _schema$nodes4.taskItem,
140
- blockTaskItem = _schema$nodes4.blockTaskItem;
140
+ var _schema$nodes3 = schema.nodes,
141
+ taskItem = _schema$nodes3.taskItem,
142
+ blockTaskItem = _schema$nodes3.blockTaskItem;
141
143
  var isInTaskItem = view.state.selection.$from.node().type === taskItem;
142
144
  if (!isInTaskItem || !blockTaskItem) {
143
145
  return slice;
@@ -147,10 +149,10 @@ var transformSliceToRemoveBlockTaskItemLegacy = function transformSliceToRemoveB
147
149
  });
148
150
  };
149
151
  var _normalizeNodeForTaskTextSize = exports.normalizeNodeForTaskTextSize = function normalizeNodeForTaskTextSize(node, schema, smallTextAttrs) {
150
- var _schema$nodes5 = schema.nodes,
151
- taskList = _schema$nodes5.taskList,
152
- taskItem = _schema$nodes5.taskItem,
153
- blockTaskItem = _schema$nodes5.blockTaskItem;
152
+ var _schema$nodes4 = schema.nodes,
153
+ taskList = _schema$nodes4.taskList,
154
+ taskItem = _schema$nodes4.taskItem,
155
+ blockTaskItem = _schema$nodes4.blockTaskItem;
154
156
  var fontSize = schema.marks.fontSize;
155
157
  if (!smallTextAttrs) {
156
158
  return [node];
@@ -1,6 +1,6 @@
1
1
  import { uuid } from '@atlaskit/adf-schema';
2
2
  import { getBlockMarkAttrs, getFirstParagraphBlockMarkAttrs } from '@atlaskit/editor-common/lists';
3
- import { isTaskList } from '@atlaskit/editor-common/transforms';
3
+ import { createBlockTaskItem, isTaskList } from '@atlaskit/editor-common/transforms';
4
4
  import { Slice, Fragment } from '@atlaskit/editor-prosemirror/model';
5
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
 
@@ -70,14 +70,15 @@ const getTaskPasteContext = view => {
70
70
  };
71
71
  };
72
72
  const convertTaskItemToBlockTaskItem = (node, schema, smallTextAttrs) => {
73
- const {
74
- blockTaskItem,
75
- paragraph
76
- } = schema.nodes;
77
73
  const {
78
74
  fontSize
79
75
  } = schema.marks;
80
- return blockTaskItem.create(node.attrs, paragraph.createChecked({}, node.content, [fontSize.create(smallTextAttrs)]));
76
+ return createBlockTaskItem({
77
+ attrs: node.attrs,
78
+ content: node.content,
79
+ marks: [fontSize.create(smallTextAttrs)],
80
+ schema
81
+ });
81
82
  };
82
83
  const addSmallTextToBlockTaskItem = (node, schema, smallTextAttrs) => {
83
84
  const {
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import { uuid } from '@atlaskit/adf-schema';
3
3
  import { getBlockMarkAttrs, getFirstParagraphBlockMarkAttrs } from '@atlaskit/editor-common/lists';
4
- import { isTaskList } from '@atlaskit/editor-common/transforms';
4
+ import { createBlockTaskItem, isTaskList } from '@atlaskit/editor-common/transforms';
5
5
  import { Slice, Fragment } from '@atlaskit/editor-prosemirror/model';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
7
 
@@ -67,11 +67,13 @@ var getTaskPasteContext = function getTaskPasteContext(view) {
67
67
  };
68
68
  };
69
69
  var convertTaskItemToBlockTaskItem = function convertTaskItemToBlockTaskItem(node, schema, smallTextAttrs) {
70
- var _schema$nodes2 = schema.nodes,
71
- blockTaskItem = _schema$nodes2.blockTaskItem,
72
- paragraph = _schema$nodes2.paragraph;
73
70
  var fontSize = schema.marks.fontSize;
74
- return blockTaskItem.create(node.attrs, paragraph.createChecked({}, node.content, [fontSize.create(smallTextAttrs)]));
71
+ return createBlockTaskItem({
72
+ attrs: node.attrs,
73
+ content: node.content,
74
+ marks: [fontSize.create(smallTextAttrs)],
75
+ schema: schema
76
+ });
75
77
  };
76
78
  var addSmallTextToBlockTaskItem = function addSmallTextToBlockTaskItem(node, schema, smallTextAttrs) {
77
79
  var paragraph = schema.nodes.paragraph;
@@ -89,10 +91,10 @@ var addSmallTextToBlockTaskItem = function addSmallTextToBlockTaskItem(node, sch
89
91
  return node.type.create(node.attrs, newContent);
90
92
  };
91
93
  var normalizeBlockTaskItemToTaskItems = function normalizeBlockTaskItemToTaskItems(node, schema) {
92
- var _schema$nodes3 = schema.nodes,
93
- taskItem = _schema$nodes3.taskItem,
94
- blockTaskItem = _schema$nodes3.blockTaskItem,
95
- paragraph = _schema$nodes3.paragraph;
94
+ var _schema$nodes2 = schema.nodes,
95
+ taskItem = _schema$nodes2.taskItem,
96
+ blockTaskItem = _schema$nodes2.blockTaskItem,
97
+ paragraph = _schema$nodes2.paragraph;
96
98
  if (!blockTaskItem || node.type !== blockTaskItem) {
97
99
  return [node];
98
100
  }
@@ -129,9 +131,9 @@ var transformSliceContent = function transformSliceContent(slice, transformNode)
129
131
  };
130
132
  var transformSliceToRemoveBlockTaskItemLegacy = function transformSliceToRemoveBlockTaskItemLegacy(slice, view) {
131
133
  var schema = view.state.schema;
132
- var _schema$nodes4 = schema.nodes,
133
- taskItem = _schema$nodes4.taskItem,
134
- blockTaskItem = _schema$nodes4.blockTaskItem;
134
+ var _schema$nodes3 = schema.nodes,
135
+ taskItem = _schema$nodes3.taskItem,
136
+ blockTaskItem = _schema$nodes3.blockTaskItem;
135
137
  var isInTaskItem = view.state.selection.$from.node().type === taskItem;
136
138
  if (!isInTaskItem || !blockTaskItem) {
137
139
  return slice;
@@ -141,10 +143,10 @@ var transformSliceToRemoveBlockTaskItemLegacy = function transformSliceToRemoveB
141
143
  });
142
144
  };
143
145
  var _normalizeNodeForTaskTextSize = function normalizeNodeForTaskTextSize(node, schema, smallTextAttrs) {
144
- var _schema$nodes5 = schema.nodes,
145
- taskList = _schema$nodes5.taskList,
146
- taskItem = _schema$nodes5.taskItem,
147
- blockTaskItem = _schema$nodes5.blockTaskItem;
146
+ var _schema$nodes4 = schema.nodes,
147
+ taskList = _schema$nodes4.taskList,
148
+ taskItem = _schema$nodes4.taskItem,
149
+ blockTaskItem = _schema$nodes4.blockTaskItem;
148
150
  var fontSize = schema.marks.fontSize;
149
151
  if (!smallTextAttrs) {
150
152
  return [node];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-tasks-and-decisions",
3
- "version": "11.4.3",
3
+ "version": "11.4.5",
4
4
  "description": "Tasks and decisions plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -44,19 +44,19 @@
44
44
  "@atlaskit/editor-toolbar": "^0.20.0",
45
45
  "@atlaskit/editor-toolbar-model": "^0.4.0",
46
46
  "@atlaskit/heading": "^5.3.0",
47
- "@atlaskit/icon": "^33.1.0",
47
+ "@atlaskit/icon": "^34.0.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/primitives": "^18.1.0",
50
50
  "@atlaskit/prosemirror-input-rules": "^3.6.0",
51
51
  "@atlaskit/task-decision": "^19.3.0",
52
- "@atlaskit/tmp-editor-statsig": "^52.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^53.0.0",
53
53
  "@atlaskit/tokens": "^11.4.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@compiled/react": "^0.20.0",
56
56
  "bind-event-listener": "^3.0.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^112.13.0",
59
+ "@atlaskit/editor-common": "^112.15.0",
60
60
  "react": "^18.2.0",
61
61
  "react-dom": "^18.2.0",
62
62
  "react-intl-next": "npm:react-intl@^5.18.1"