@atlaskit/renderer 120.3.6 → 120.4.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,27 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 120.4.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
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
17
+ ## 120.3.7
18
+
19
+ ### Patch Changes
20
+
21
+ - [`5e286a9dc4933`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5e286a9dc4933) -
22
+ EDITOR-1230 Created isAdfStreamingEnabled to check if adf streaming is enabled or not.
23
+ - Updated dependencies
24
+
3
25
  ## 120.3.6
4
26
 
5
27
  ### Patch Changes
@@ -67,7 +67,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
67
67
  parentInfo = _ref.parentInfo;
68
68
  var pos = _this.startPos;
69
69
  var currentPath = parentInfo && parentInfo.path || [];
70
- var parentIsIncompleteTask = node.type.name === 'taskItem' && node.attrs.state !== 'DONE';
70
+ var parentIsIncompleteTask = node.type.name === 'taskItem' || node.type.name === 'blockTaskItem' && (0, _expValEquals.expValEquals)('platform_editor_blocktaskitem_node', 'isEnabled', true) && node.attrs.state !== 'DONE';
71
71
  var nodeKey = "".concat(node.type.name, "__").concat(_this.startPos);
72
72
  var serializedContent = _this.serializeFragment(node.content, _this.getNodeProps(node, parentInfo), (0, _nodes.toReact)(node, {
73
73
  allowSelectAllTrap: _this.allowSelectAllTrap,
@@ -136,7 +136,7 @@ function BlockCard(props) {
136
136
  }, cardProps, {
137
137
  url: url,
138
138
  onError: onError,
139
- hideIconLoadingSkeleton: (0, _platformFeatureFlags.fg)('platform_fix_block_card_img_icon_vc')
139
+ hideIconLoadingSkeleton: true
140
140
  }));
141
141
  } else {
142
142
  cardComponent = (0, _react.jsx)(_smartCard.Card, (0, _extends2.default)({
@@ -477,7 +477,8 @@ var nodeToReact = exports.nodeToReact = {
477
477
  unsupportedInline: _ui.UnsupportedInline,
478
478
  expand: Expand,
479
479
  nestedExpand: Expand,
480
- embedCard: EmbedCard
480
+ embedCard: EmbedCard,
481
+ blockTaskItem: TaskItem
481
482
  };
482
483
  var toReact = exports.toReact = function toReact(node, flags, nodeComponents
483
484
  // Ignored via go/ees005
@@ -178,5 +178,6 @@ var nodeToReact = exports.nodeToReact = {
178
178
  tableRow: _tableRow.default,
179
179
  expand: Expand,
180
180
  nestedExpand: Expand,
181
- embedCard: EmbedCard
181
+ embedCard: EmbedCard,
182
+ blockTaskItem: TaskItem
182
183
  };
@@ -63,7 +63,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
63
63
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
64
64
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
65
65
  var packageName = "@atlaskit/renderer";
66
- var packageVersion = "120.3.5";
66
+ var packageVersion = "120.3.7";
67
67
  var setAsQueryContainerStyles = (0, _react2.css)({
68
68
  containerName: 'ak-renderer-wrapper',
69
69
  containerType: 'inline-size'
@@ -600,7 +600,8 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
600
600
  * Telepointer changes will also cause a childList mutation, so we manually ignore it.
601
601
  * Telepointer changes are always a singular node-adds or node-removes.
602
602
  */
603
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_ai_iw_adf_streaming', 'isEnabled', true) && mutation.type === 'childList' && !(mutation.addedNodes.length === 1 && ((_mutation$addedNodes$ = mutation.addedNodes[0]) === null || _mutation$addedNodes$ === void 0 ? void 0 : _mutation$addedNodes$.id) === _style.TELEPOINTER_ID || mutation.removedNodes.length === 1 && ((_mutation$removedNode = mutation.removedNodes[0]) === null || _mutation$removedNode === void 0 ? void 0 : _mutation$removedNode.id) === _style.TELEPOINTER_ID)) {
603
+ var isAdfStreamingEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_ai_iw_adf_streaming', 'isEnabled', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_ai_ct_sg_adf_streaming', 'isEnabled', true);
604
+ if (isAdfStreamingEnabled && mutation.type === 'childList' && !(mutation.addedNodes.length === 1 && ((_mutation$addedNodes$ = mutation.addedNodes[0]) === null || _mutation$addedNodes$ === void 0 ? void 0 : _mutation$addedNodes$.id) === _style.TELEPOINTER_ID || mutation.removedNodes.length === 1 && ((_mutation$removedNode = mutation.removedNodes[0]) === null || _mutation$removedNode === void 0 ? void 0 : _mutation$removedNode.id) === _style.TELEPOINTER_ID)) {
604
605
  var _lastChild2 = _renderer.lastChild;
605
606
  if (_lastChild2) {
606
607
  /**
@@ -52,7 +52,7 @@ export default class ReactSerializer {
52
52
  }) => {
53
53
  const pos = this.startPos;
54
54
  const currentPath = parentInfo && parentInfo.path || [];
55
- const parentIsIncompleteTask = node.type.name === 'taskItem' && node.attrs.state !== 'DONE';
55
+ const parentIsIncompleteTask = node.type.name === 'taskItem' || node.type.name === 'blockTaskItem' && expValEquals('platform_editor_blocktaskitem_node', 'isEnabled', true) && node.attrs.state !== 'DONE';
56
56
  const nodeKey = `${node.type.name}__${this.startPos}`;
57
57
  const serializedContent = this.serializeFragment(node.content, this.getNodeProps(node, parentInfo), toReact(node, {
58
58
  allowSelectAllTrap: this.allowSelectAllTrap,
@@ -123,7 +123,7 @@ export default function BlockCard(props) {
123
123
  }, cardProps, {
124
124
  url: url,
125
125
  onError: onError,
126
- hideIconLoadingSkeleton: fg('platform_fix_block_card_img_icon_vc')
126
+ hideIconLoadingSkeleton: true
127
127
  }));
128
128
  } else {
129
129
  cardComponent = jsx(Card, _extends({
@@ -169,7 +169,8 @@ export const nodeToReact = {
169
169
  unsupportedInline: UnsupportedInline,
170
170
  expand: Expand,
171
171
  nestedExpand: Expand,
172
- embedCard: EmbedCard
172
+ embedCard: EmbedCard,
173
+ blockTaskItem: TaskItem
173
174
  };
174
175
  export const toReact = (node, flags, nodeComponents
175
176
  // Ignored via go/ees005
@@ -65,5 +65,6 @@ export const nodeToReact = {
65
65
  tableRow: TableRow,
66
66
  expand: Expand,
67
67
  nestedExpand: Expand,
68
- embedCard: EmbedCard
68
+ embedCard: EmbedCard,
69
+ blockTaskItem: TaskItem
69
70
  };
@@ -49,7 +49,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
49
49
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
50
50
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
51
51
  const packageName = "@atlaskit/renderer";
52
- const packageVersion = "120.3.5";
52
+ const packageVersion = "120.3.7";
53
53
  const setAsQueryContainerStyles = css({
54
54
  containerName: 'ak-renderer-wrapper',
55
55
  containerType: 'inline-size'
@@ -586,7 +586,8 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
586
586
  * Telepointer changes will also cause a childList mutation, so we manually ignore it.
587
587
  * Telepointer changes are always a singular node-adds or node-removes.
588
588
  */
589
- if (expValEqualsNoExposure('platform_editor_ai_iw_adf_streaming', 'isEnabled', true) && mutation.type === 'childList' && !(mutation.addedNodes.length === 1 && ((_mutation$addedNodes$ = mutation.addedNodes[0]) === null || _mutation$addedNodes$ === void 0 ? void 0 : _mutation$addedNodes$.id) === TELEPOINTER_ID || mutation.removedNodes.length === 1 && ((_mutation$removedNode = mutation.removedNodes[0]) === null || _mutation$removedNode === void 0 ? void 0 : _mutation$removedNode.id) === TELEPOINTER_ID)) {
589
+ const isAdfStreamingEnabled = expValEqualsNoExposure('platform_editor_ai_iw_adf_streaming', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_ai_ct_sg_adf_streaming', 'isEnabled', true);
590
+ if (isAdfStreamingEnabled && mutation.type === 'childList' && !(mutation.addedNodes.length === 1 && ((_mutation$addedNodes$ = mutation.addedNodes[0]) === null || _mutation$addedNodes$ === void 0 ? void 0 : _mutation$addedNodes$.id) === TELEPOINTER_ID || mutation.removedNodes.length === 1 && ((_mutation$removedNode = mutation.removedNodes[0]) === null || _mutation$removedNode === void 0 ? void 0 : _mutation$removedNode.id) === TELEPOINTER_ID)) {
590
591
  const lastChild = renderer.lastChild;
591
592
  if (lastChild) {
592
593
  /**
@@ -60,7 +60,7 @@ var ReactSerializer = /*#__PURE__*/function () {
60
60
  parentInfo = _ref.parentInfo;
61
61
  var pos = _this.startPos;
62
62
  var currentPath = parentInfo && parentInfo.path || [];
63
- var parentIsIncompleteTask = node.type.name === 'taskItem' && node.attrs.state !== 'DONE';
63
+ var parentIsIncompleteTask = node.type.name === 'taskItem' || node.type.name === 'blockTaskItem' && expValEquals('platform_editor_blocktaskitem_node', 'isEnabled', true) && node.attrs.state !== 'DONE';
64
64
  var nodeKey = "".concat(node.type.name, "__").concat(_this.startPos);
65
65
  var serializedContent = _this.serializeFragment(node.content, _this.getNodeProps(node, parentInfo), toReact(node, {
66
66
  allowSelectAllTrap: _this.allowSelectAllTrap,
@@ -128,7 +128,7 @@ export default function BlockCard(props) {
128
128
  }, cardProps, {
129
129
  url: url,
130
130
  onError: onError,
131
- hideIconLoadingSkeleton: fg('platform_fix_block_card_img_icon_vc')
131
+ hideIconLoadingSkeleton: true
132
132
  }));
133
133
  } else {
134
134
  cardComponent = jsx(Card, _extends({
@@ -286,7 +286,8 @@ export var nodeToReact = {
286
286
  unsupportedInline: UnsupportedInline,
287
287
  expand: Expand,
288
288
  nestedExpand: Expand,
289
- embedCard: EmbedCard
289
+ embedCard: EmbedCard,
290
+ blockTaskItem: TaskItem
290
291
  };
291
292
  export var toReact = function toReact(node, flags, nodeComponents
292
293
  // Ignored via go/ees005
@@ -137,5 +137,6 @@ export var nodeToReact = {
137
137
  tableRow: TableRow,
138
138
  expand: Expand,
139
139
  nestedExpand: Expand,
140
- embedCard: EmbedCard
140
+ embedCard: EmbedCard,
141
+ blockTaskItem: TaskItem
141
142
  };
@@ -54,7 +54,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
54
54
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
55
55
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  var packageName = "@atlaskit/renderer";
57
- var packageVersion = "120.3.5";
57
+ var packageVersion = "120.3.7";
58
58
  var setAsQueryContainerStyles = css({
59
59
  containerName: 'ak-renderer-wrapper',
60
60
  containerType: 'inline-size'
@@ -591,7 +591,8 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
591
591
  * Telepointer changes will also cause a childList mutation, so we manually ignore it.
592
592
  * Telepointer changes are always a singular node-adds or node-removes.
593
593
  */
594
- if (expValEqualsNoExposure('platform_editor_ai_iw_adf_streaming', 'isEnabled', true) && mutation.type === 'childList' && !(mutation.addedNodes.length === 1 && ((_mutation$addedNodes$ = mutation.addedNodes[0]) === null || _mutation$addedNodes$ === void 0 ? void 0 : _mutation$addedNodes$.id) === TELEPOINTER_ID || mutation.removedNodes.length === 1 && ((_mutation$removedNode = mutation.removedNodes[0]) === null || _mutation$removedNode === void 0 ? void 0 : _mutation$removedNode.id) === TELEPOINTER_ID)) {
594
+ var isAdfStreamingEnabled = expValEqualsNoExposure('platform_editor_ai_iw_adf_streaming', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_ai_ct_sg_adf_streaming', 'isEnabled', true);
595
+ if (isAdfStreamingEnabled && mutation.type === 'childList' && !(mutation.addedNodes.length === 1 && ((_mutation$addedNodes$ = mutation.addedNodes[0]) === null || _mutation$addedNodes$ === void 0 ? void 0 : _mutation$addedNodes$.id) === TELEPOINTER_ID || mutation.removedNodes.length === 1 && ((_mutation$removedNode = mutation.removedNodes[0]) === null || _mutation$removedNode === void 0 ? void 0 : _mutation$removedNode.id) === TELEPOINTER_ID)) {
595
596
  var _lastChild2 = _renderer.lastChild;
596
597
  if (_lastChild2) {
597
598
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "120.3.6",
3
+ "version": "120.4.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@atlaskit/adf-schema": "^50.2.0",
27
- "@atlaskit/adf-utils": "^19.20.0",
27
+ "@atlaskit/adf-utils": "^19.21.0",
28
28
  "@atlaskit/analytics-listeners": "^9.0.0",
29
29
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
30
30
  "@atlaskit/analytics-next": "^11.1.0",
@@ -33,15 +33,15 @@
33
33
  "@atlaskit/editor-json-transformer": "^8.25.0",
34
34
  "@atlaskit/editor-palette": "^2.1.0",
35
35
  "@atlaskit/editor-prosemirror": "7.0.0",
36
- "@atlaskit/editor-shared-styles": "^3.5.0",
36
+ "@atlaskit/editor-shared-styles": "^3.6.0",
37
37
  "@atlaskit/editor-tables": "^2.9.0",
38
38
  "@atlaskit/emoji": "^69.3.0",
39
39
  "@atlaskit/feature-gate-js-client": "^5.5.0",
40
- "@atlaskit/icon": "^27.9.0",
40
+ "@atlaskit/icon": "^27.10.0",
41
41
  "@atlaskit/link": "^3.2.0",
42
- "@atlaskit/link-datasource": "^4.18.0",
43
- "@atlaskit/media-card": "^79.4.0",
44
- "@atlaskit/media-client": "^35.2.0",
42
+ "@atlaskit/link-datasource": "^4.19.0",
43
+ "@atlaskit/media-card": "^79.5.0",
44
+ "@atlaskit/media-client": "^35.3.0",
45
45
  "@atlaskit/media-client-react": "^4.1.0",
46
46
  "@atlaskit/media-common": "^12.3.0",
47
47
  "@atlaskit/media-filmstrip": "^51.0.0",
@@ -49,12 +49,12 @@
49
49
  "@atlaskit/media-viewer": "^52.4.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/platform-feature-flags-react": "^0.2.0",
52
- "@atlaskit/react-ufo": "^4.1.0",
52
+ "@atlaskit/react-ufo": "^4.2.0",
53
53
  "@atlaskit/smart-card": "^40.7.0",
54
54
  "@atlaskit/status": "^3.0.0",
55
55
  "@atlaskit/task-decision": "^19.2.0",
56
56
  "@atlaskit/theme": "^19.0.0",
57
- "@atlaskit/tmp-editor-statsig": "^9.22.0",
57
+ "@atlaskit/tmp-editor-statsig": "^9.26.0",
58
58
  "@atlaskit/tokens": "^6.0.0",
59
59
  "@atlaskit/tooltip": "^20.4.0",
60
60
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -68,7 +68,7 @@
68
68
  "uuid": "^3.1.0"
69
69
  },
70
70
  "peerDependencies": {
71
- "@atlaskit/editor-common": "^107.16.0",
71
+ "@atlaskit/editor-common": "^107.20.0",
72
72
  "@atlaskit/link-provider": "^3.4.0",
73
73
  "@atlaskit/media-core": "^37.0.0",
74
74
  "react": "^18.2.0",
@@ -89,7 +89,7 @@
89
89
  "@atlaskit/mention": "^24.2.0",
90
90
  "@atlaskit/modal-dialog": "^14.3.0",
91
91
  "@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-d1445f2f74.patch",
92
- "@atlaskit/profilecard": "^24.1.0",
92
+ "@atlaskit/profilecard": "^24.2.0",
93
93
  "@atlaskit/util-data-test": "^18.0.0",
94
94
  "@atlaskit/visual-regression": "workspace:^",
95
95
  "@atlassian/feature-flags-test-utils": "^0.3.0",
@@ -109,7 +109,6 @@
109
109
  "react-test-renderer": "^18.2.0",
110
110
  "rxjs": "^5.5.0",
111
111
  "sinon": "^2.2.0",
112
- "typescript": "~5.4.2",
113
112
  "worker-plugin": "^4.0.2"
114
113
  },
115
114
  "techstack": {
@@ -247,9 +246,6 @@
247
246
  "confluence_frontend_fix_view_page_slo": {
248
247
  "type": "boolean"
249
248
  },
250
- "platform_fix_block_card_img_icon_vc": {
251
- "type": "boolean"
252
- },
253
249
  "prompt_whiteboard_competitor_link_gate": {
254
250
  "type": "boolean"
255
251
  },