@atlaskit/editor-plugin-media 5.0.0 → 5.1.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,26 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 5.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#175869](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175869)
8
+ [`e7f822af7edc1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e7f822af7edc1) -
9
+ Updated usages of deprecated icons with replacement icons
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 5.0.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [#172541](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172541)
20
+ [`6da45cbd2c77f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6da45cbd2c77f) -
21
+ clean up FF for batch media update attributes
22
+ - Updated dependencies
23
+
3
24
  ## 5.0.0
4
25
 
5
26
  ### Major Changes
@@ -53,18 +53,12 @@ var MediaNodeUpdater = exports.MediaNodeUpdater = /*#__PURE__*/function () {
53
53
  return _this.getObjectId();
54
54
  case 6:
55
55
  objectId = _context.sent;
56
- if ((0, _platformFeatureFlags.fg)('platform_editor_media_batch_updates')) {
57
- (0, _batchMediaNodeAttrs.batchMediaNodeAttrsUpdate)(_this.props.view, {
58
- id: id,
59
- nextAttributes: {
60
- __contextId: objectId
61
- }
62
- });
63
- } else {
64
- (0, _helpers.updateAllMediaNodesAttrs)(id, {
56
+ (0, _batchMediaNodeAttrs.batchMediaNodeAttrsUpdate)(_this.props.view, {
57
+ id: id,
58
+ nextAttributes: {
65
59
  __contextId: objectId
66
- })(_this.props.view.state, _this.props.view.dispatch);
67
- }
60
+ }
61
+ });
68
62
  case 8:
69
63
  case "end":
70
64
  return _context.stop();
@@ -188,14 +182,10 @@ var MediaNodeUpdater = exports.MediaNodeUpdater = /*#__PURE__*/function () {
188
182
  newAttrs = _context4.sent;
189
183
  _ref5 = _this.getAttrs(), id = _ref5.id;
190
184
  if (id && newAttrs) {
191
- if ((0, _platformFeatureFlags.fg)('platform_editor_media_batch_updates')) {
192
- (0, _batchMediaNodeAttrs.batchMediaNodeAttrsUpdate)(_this.props.view, {
193
- id: id,
194
- nextAttributes: newAttrs
195
- });
196
- } else {
197
- (0, _helpers.updateAllMediaNodesAttrs)(id, newAttrs)(_this.props.view.state, _this.props.view.dispatch);
198
- }
185
+ (0, _batchMediaNodeAttrs.batchMediaNodeAttrsUpdate)(_this.props.view, {
186
+ id: id,
187
+ nextAttributes: newAttrs
188
+ });
199
189
  }
200
190
  case 5:
201
191
  case "end":
@@ -333,20 +323,13 @@ var MediaNodeUpdater = exports.MediaNodeUpdater = /*#__PURE__*/function () {
333
323
  return attrs.__contextId || null;
334
324
  });
335
325
  (0, _defineProperty2.default)(this, "updateDimensions", function (dimensions) {
336
- if ((0, _platformFeatureFlags.fg)('platform_editor_media_batch_updates')) {
337
- (0, _batchMediaNodeAttrs.batchMediaNodeAttrsUpdate)(_this.props.view, {
338
- id: dimensions.id,
339
- nextAttributes: {
340
- height: dimensions.height,
341
- width: dimensions.width
342
- }
343
- });
344
- } else {
345
- (0, _helpers.updateAllMediaNodesAttrs)(dimensions.id, {
326
+ (0, _batchMediaNodeAttrs.batchMediaNodeAttrsUpdate)(_this.props.view, {
327
+ id: dimensions.id,
328
+ nextAttributes: {
346
329
  height: dimensions.height,
347
330
  width: dimensions.width
348
- })(_this.props.view.state, _this.props.view.dispatch);
349
- }
331
+ }
332
+ });
350
333
  });
351
334
  (0, _defineProperty2.default)(this, "shouldNodeBeDeepCopied", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
352
335
  var _ref0, _this$props$mediaOpti, _this$props$mediaOpti2, _this$mediaPluginStat;
@@ -14,7 +14,7 @@ var _button = _interopRequireDefault(require("@atlaskit/button"));
14
14
  var _new = require("@atlaskit/button/new");
15
15
  var _media = require("@atlaskit/editor-common/media");
16
16
  var _form = _interopRequireWildcard(require("@atlaskit/form"));
17
- var _close = _interopRequireDefault(require("@atlaskit/icon/core/close"));
17
+ var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
18
18
  var _primitives = require("@atlaskit/primitives");
19
19
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
20
20
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
@@ -365,7 +365,7 @@ var PixelEntryComponentNext = exports.PixelEntryComponentNext = function PixelEn
365
365
  xcss: dividerStyles
366
366
  }), (0, _react2.jsx)(_new.IconButton, {
367
367
  icon: function icon() {
368
- return (0, _react2.jsx)(_close.default, {
368
+ return (0, _react2.jsx)(_cross.default, {
369
369
  label: "",
370
370
  color: "var(--ds-icon-subtlest, #626F86)"
371
371
  });
@@ -5,7 +5,7 @@ import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-comm
5
5
  import { getAttrsFromUrl, isImageRepresentationReady, isMediaBlobUrl } from '@atlaskit/media-client';
6
6
  import { getMediaClient } from '@atlaskit/media-client-react';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { replaceExternalMedia, updateAllMediaNodesAttrs, updateCurrentMediaNodeAttrs, updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
8
+ import { replaceExternalMedia, updateCurrentMediaNodeAttrs, updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
9
9
  import { stateKey as mediaStateKey } from '../pm-plugins/plugin-key';
10
10
  import { batchMediaNodeAttrsUpdate } from '../pm-plugins/utils/batchMediaNodeAttrs';
11
11
  import { getIdentifier } from '../pm-plugins/utils/media-common';
@@ -27,18 +27,12 @@ export class MediaNodeUpdater {
27
27
  id
28
28
  } = attrs;
29
29
  const objectId = await this.getObjectId();
30
- if (fg('platform_editor_media_batch_updates')) {
31
- batchMediaNodeAttrsUpdate(this.props.view, {
32
- id: id,
33
- nextAttributes: {
34
- __contextId: objectId
35
- }
36
- });
37
- } else {
38
- updateAllMediaNodesAttrs(id, {
30
+ batchMediaNodeAttrsUpdate(this.props.view, {
31
+ id: id,
32
+ nextAttributes: {
39
33
  __contextId: objectId
40
- })(this.props.view.state, this.props.view.dispatch);
41
- }
34
+ }
35
+ });
42
36
  });
43
37
  _defineProperty(this, "updateNodeContextId", async getPos => {
44
38
  const attrs = this.getAttrs();
@@ -102,14 +96,10 @@ export class MediaNodeUpdater {
102
96
  id
103
97
  } = this.getAttrs();
104
98
  if (id && newAttrs) {
105
- if (fg('platform_editor_media_batch_updates')) {
106
- batchMediaNodeAttrsUpdate(this.props.view, {
107
- id: id,
108
- nextAttributes: newAttrs
109
- });
110
- } else {
111
- updateAllMediaNodesAttrs(id, newAttrs)(this.props.view.state, this.props.view.dispatch);
112
- }
99
+ batchMediaNodeAttrsUpdate(this.props.view, {
100
+ id: id,
101
+ nextAttributes: newAttrs
102
+ });
113
103
  }
114
104
  });
115
105
  _defineProperty(this, "updateNodeAttrs", async getPos => {
@@ -187,20 +177,13 @@ export class MediaNodeUpdater {
187
177
  return attrs.__contextId || null;
188
178
  });
189
179
  _defineProperty(this, "updateDimensions", dimensions => {
190
- if (fg('platform_editor_media_batch_updates')) {
191
- batchMediaNodeAttrsUpdate(this.props.view, {
192
- id: dimensions.id,
193
- nextAttributes: {
194
- height: dimensions.height,
195
- width: dimensions.width
196
- }
197
- });
198
- } else {
199
- updateAllMediaNodesAttrs(dimensions.id, {
180
+ batchMediaNodeAttrsUpdate(this.props.view, {
181
+ id: dimensions.id,
182
+ nextAttributes: {
200
183
  height: dimensions.height,
201
184
  width: dimensions.width
202
- })(this.props.view.state, this.props.view.dispatch);
203
- }
185
+ }
186
+ });
204
187
  });
205
188
  _defineProperty(this, "shouldNodeBeDeepCopied", async () => {
206
189
  var _ref, _this$props$mediaOpti, _this$props$mediaOpti2, _this$mediaPluginStat, _this$mediaPluginStat2;
@@ -11,7 +11,7 @@ import Button from '@atlaskit/button';
11
11
  import { IconButton } from '@atlaskit/button/new';
12
12
  import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
13
13
  import Form, { Field } from '@atlaskit/form';
14
- import CloseIcon from '@atlaskit/icon/core/close';
14
+ import CrossIcon from '@atlaskit/icon/core/cross';
15
15
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives
16
16
  import { Inline, Box, Text, xcss } from '@atlaskit/primitives';
17
17
  import Textfield from '@atlaskit/textfield';
@@ -346,7 +346,7 @@ export const PixelEntryComponentNext = ({
346
346
  }))), !isViewMode && jsx(Fragment, null, jsx(Box, {
347
347
  xcss: dividerStyles
348
348
  }), jsx(IconButton, {
349
- icon: () => jsx(CloseIcon, {
349
+ icon: () => jsx(CrossIcon, {
350
350
  label: "",
351
351
  color: "var(--ds-icon-subtlest, #626F86)"
352
352
  }),
@@ -14,7 +14,7 @@ import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-comm
14
14
  import { getAttrsFromUrl, isImageRepresentationReady, isMediaBlobUrl as _isMediaBlobUrl } from '@atlaskit/media-client';
15
15
  import { getMediaClient } from '@atlaskit/media-client-react';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
- import { replaceExternalMedia, updateAllMediaNodesAttrs, updateCurrentMediaNodeAttrs, updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
17
+ import { replaceExternalMedia, updateCurrentMediaNodeAttrs, updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
18
18
  import { stateKey as mediaStateKey } from '../pm-plugins/plugin-key';
19
19
  import { batchMediaNodeAttrsUpdate } from '../pm-plugins/utils/batchMediaNodeAttrs';
20
20
  import { getIdentifier } from '../pm-plugins/utils/media-common';
@@ -46,18 +46,12 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
46
46
  return _this.getObjectId();
47
47
  case 6:
48
48
  objectId = _context.sent;
49
- if (fg('platform_editor_media_batch_updates')) {
50
- batchMediaNodeAttrsUpdate(_this.props.view, {
51
- id: id,
52
- nextAttributes: {
53
- __contextId: objectId
54
- }
55
- });
56
- } else {
57
- updateAllMediaNodesAttrs(id, {
49
+ batchMediaNodeAttrsUpdate(_this.props.view, {
50
+ id: id,
51
+ nextAttributes: {
58
52
  __contextId: objectId
59
- })(_this.props.view.state, _this.props.view.dispatch);
60
- }
53
+ }
54
+ });
61
55
  case 8:
62
56
  case "end":
63
57
  return _context.stop();
@@ -181,14 +175,10 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
181
175
  newAttrs = _context4.sent;
182
176
  _ref5 = _this.getAttrs(), id = _ref5.id;
183
177
  if (id && newAttrs) {
184
- if (fg('platform_editor_media_batch_updates')) {
185
- batchMediaNodeAttrsUpdate(_this.props.view, {
186
- id: id,
187
- nextAttributes: newAttrs
188
- });
189
- } else {
190
- updateAllMediaNodesAttrs(id, newAttrs)(_this.props.view.state, _this.props.view.dispatch);
191
- }
178
+ batchMediaNodeAttrsUpdate(_this.props.view, {
179
+ id: id,
180
+ nextAttributes: newAttrs
181
+ });
192
182
  }
193
183
  case 5:
194
184
  case "end":
@@ -326,20 +316,13 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
326
316
  return attrs.__contextId || null;
327
317
  });
328
318
  _defineProperty(this, "updateDimensions", function (dimensions) {
329
- if (fg('platform_editor_media_batch_updates')) {
330
- batchMediaNodeAttrsUpdate(_this.props.view, {
331
- id: dimensions.id,
332
- nextAttributes: {
333
- height: dimensions.height,
334
- width: dimensions.width
335
- }
336
- });
337
- } else {
338
- updateAllMediaNodesAttrs(dimensions.id, {
319
+ batchMediaNodeAttrsUpdate(_this.props.view, {
320
+ id: dimensions.id,
321
+ nextAttributes: {
339
322
  height: dimensions.height,
340
323
  width: dimensions.width
341
- })(_this.props.view.state, _this.props.view.dispatch);
342
- }
324
+ }
325
+ });
343
326
  });
344
327
  _defineProperty(this, "shouldNodeBeDeepCopied", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
345
328
  var _ref0, _this$props$mediaOpti, _this$props$mediaOpti2, _this$mediaPluginStat;
@@ -12,7 +12,7 @@ import Button from '@atlaskit/button';
12
12
  import { IconButton } from '@atlaskit/button/new';
13
13
  import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
14
14
  import Form, { Field } from '@atlaskit/form';
15
- import CloseIcon from '@atlaskit/icon/core/close';
15
+ import CrossIcon from '@atlaskit/icon/core/cross';
16
16
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives
17
17
  import { Inline, Box, Text, xcss } from '@atlaskit/primitives';
18
18
  import Textfield from '@atlaskit/textfield';
@@ -353,7 +353,7 @@ export var PixelEntryComponentNext = function PixelEntryComponentNext(_ref5) {
353
353
  xcss: dividerStyles
354
354
  }), jsx(IconButton, {
355
355
  icon: function icon() {
356
- return jsx(CloseIcon, {
356
+ return jsx(CrossIcon, {
357
357
  label: "",
358
358
  color: "var(--ds-icon-subtlest, #626F86)"
359
359
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/editor-shared-styles": "^3.4.0",
56
56
  "@atlaskit/editor-tables": "^2.9.0",
57
57
  "@atlaskit/form": "^12.0.0",
58
- "@atlaskit/icon": "^27.2.0",
58
+ "@atlaskit/icon": "^27.3.0",
59
59
  "@atlaskit/icon-lab": "^5.1.0",
60
60
  "@atlaskit/media-card": "^79.3.0",
61
61
  "@atlaskit/media-client": "^35.0.0",
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/primitives": "^14.10.0",
70
70
  "@atlaskit/textfield": "^8.0.0",
71
71
  "@atlaskit/theme": "^18.0.0",
72
- "@atlaskit/tmp-editor-statsig": "^8.7.0",
72
+ "@atlaskit/tmp-editor-statsig": "^8.8.0",
73
73
  "@atlaskit/tokens": "^5.4.0",
74
74
  "@atlaskit/tooltip": "^20.3.0",
75
75
  "@babel/runtime": "^7.0.0",
@@ -84,7 +84,7 @@
84
84
  "typescript": "~5.4.2"
85
85
  },
86
86
  "peerDependencies": {
87
- "@atlaskit/editor-common": "^107.6.0",
87
+ "@atlaskit/editor-common": "^107.7.0",
88
88
  "@atlaskit/media-core": "^37.0.0",
89
89
  "react": "^18.2.0",
90
90
  "react-dom": "^18.2.0",
@@ -133,9 +133,6 @@
133
133
  "platform_media_cross_client_copy": {
134
134
  "type": "boolean"
135
135
  },
136
- "platform_editor_media_batch_updates": {
137
- "type": "boolean"
138
- },
139
136
  "platform_editor_typography_ugc": {
140
137
  "type": "boolean"
141
138
  },