@atlaskit/editor-plugin-media 12.6.1 → 12.7.1

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,10 +1,31 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 12.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3a96ba83a62ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3a96ba83a62ba) -
8
+ Clean up feature gate platform_editor_media_disable_save_during_upload. The attempted fix for
9
+ disabling save during upload did not resolve the issue and the code behind this gate has been
10
+ reverted.
11
+ - Updated dependencies
12
+
13
+ ## 12.7.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`64bd49d58dcd8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/64bd49d58dcd8) -
18
+ Remove cc-maui-phase-2-loading fg references. Replace with cc-maui-phase-2
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 12.6.1
4
25
 
5
26
  ### Patch Changes
6
27
 
7
- - [`06cac9d5b6b96`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/06cac9d5b6b96) -
28
+ - [`ebab8f80bfc40`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ebab8f80bfc40) -
8
29
  Cleanup dynamic config maui_ai_border_killswitch (resolved as false). Removed FeatureGates import
9
30
  and killswitch condition check.
10
31
  - Updated dependencies
@@ -115,7 +115,7 @@ function createAIGeneratingDecorationPlugin() {
115
115
  },
116
116
  apply: function apply(tr, pluginState, _oldState, newState) {
117
117
  // Disabled when gate/experiment off — drop decorations.
118
- if (!(0, _platformFeatureFlags.fg)('cc-maui-phase-2-loading') || !(0, _expValEquals.expValEquals)('cc-maui-experiment', 'isEnabled', true)) {
118
+ if (!(0, _platformFeatureFlags.fg)('cc-maui-phase-2') || !(0, _expValEquals.expValEquals)('cc-maui-experiment', 'isEnabled', true)) {
119
119
  if (pluginState.generatingMediaIds.size > 0) {
120
120
  return {
121
121
  generatingMediaIds: new Set(),
@@ -318,27 +318,11 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
318
318
  }
319
319
  });
320
320
  });
321
- if ((0, _platformFeatureFlags.fg)('platform_editor_media_disable_save_during_upload')) {
322
- _this.taskManager.addPendingTask(_uploadingPromise, mediaStateWithContext.id).then(function () {
323
- _this.updateAndDispatch({
324
- allUploadsFinished: true
325
- });
326
- _this.waitForPendingTasks().then(function () {
327
- if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
328
- _this.uploadInProgressSubscriptions.forEach(function (fn) {
329
- return fn(false);
330
- });
331
- _this.uploadInProgressSubscriptionsNotified = false;
332
- }
333
- });
334
- });
335
- } else {
336
- _this.taskManager.addPendingTask(_uploadingPromise, mediaStateWithContext.id).then(function () {
337
- _this.updateAndDispatch({
338
- allUploadsFinished: true
339
- });
321
+ _this.taskManager.addPendingTask(_uploadingPromise, mediaStateWithContext.id).then(function () {
322
+ _this.updateAndDispatch({
323
+ allUploadsFinished: true
340
324
  });
341
- }
325
+ });
342
326
  }
343
327
 
344
328
  // refocus the view
@@ -346,16 +330,14 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
346
330
  if (!view.hasFocus()) {
347
331
  view.focus();
348
332
  }
349
- if (isEndState(mediaStateWithContext) || !(0, _platformFeatureFlags.fg)('platform_editor_media_disable_save_during_upload')) {
350
- _this.waitForPendingTasks().then(function () {
351
- if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
352
- _this.uploadInProgressSubscriptions.forEach(function (fn) {
353
- return fn(false);
354
- });
355
- _this.uploadInProgressSubscriptionsNotified = false;
356
- }
357
- });
358
- }
333
+ _this.waitForPendingTasks().then(function () {
334
+ if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
335
+ _this.uploadInProgressSubscriptions.forEach(function (fn) {
336
+ return fn(false);
337
+ });
338
+ _this.uploadInProgressSubscriptionsNotified = false;
339
+ }
340
+ });
359
341
  _this.selectLastAddedMediaNode();
360
342
  });
361
343
  // Ignored via go/ees005
@@ -100,7 +100,7 @@ export function createAIGeneratingDecorationPlugin() {
100
100
  },
101
101
  apply(tr, pluginState, _oldState, newState) {
102
102
  // Disabled when gate/experiment off — drop decorations.
103
- if (!fg('cc-maui-phase-2-loading') || !expValEquals('cc-maui-experiment', 'isEnabled', true)) {
103
+ if (!fg('cc-maui-phase-2') || !expValEquals('cc-maui-experiment', 'isEnabled', true)) {
104
104
  if (pluginState.generatingMediaIds.size > 0) {
105
105
  return {
106
106
  generatingMediaIds: new Set(),
@@ -302,25 +302,11 @@ export class MediaPluginStateImplementation {
302
302
  }
303
303
  });
304
304
  });
305
- if (fg('platform_editor_media_disable_save_during_upload')) {
306
- this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(() => {
307
- this.updateAndDispatch({
308
- allUploadsFinished: true
309
- });
310
- this.waitForPendingTasks().then(() => {
311
- if (this.uploadInProgressSubscriptions.length > 0 && this.uploadInProgressSubscriptionsNotified) {
312
- this.uploadInProgressSubscriptions.forEach(fn => fn(false));
313
- this.uploadInProgressSubscriptionsNotified = false;
314
- }
315
- });
316
- });
317
- } else {
318
- this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(() => {
319
- this.updateAndDispatch({
320
- allUploadsFinished: true
321
- });
305
+ this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(() => {
306
+ this.updateAndDispatch({
307
+ allUploadsFinished: true
322
308
  });
323
- }
309
+ });
324
310
  }
325
311
 
326
312
  // refocus the view
@@ -330,14 +316,12 @@ export class MediaPluginStateImplementation {
330
316
  if (!view.hasFocus()) {
331
317
  view.focus();
332
318
  }
333
- if (isEndState(mediaStateWithContext) || !fg('platform_editor_media_disable_save_during_upload')) {
334
- this.waitForPendingTasks().then(() => {
335
- if (this.uploadInProgressSubscriptions.length > 0 && this.uploadInProgressSubscriptionsNotified) {
336
- this.uploadInProgressSubscriptions.forEach(fn => fn(false));
337
- this.uploadInProgressSubscriptionsNotified = false;
338
- }
339
- });
340
- }
319
+ this.waitForPendingTasks().then(() => {
320
+ if (this.uploadInProgressSubscriptions.length > 0 && this.uploadInProgressSubscriptionsNotified) {
321
+ this.uploadInProgressSubscriptions.forEach(fn => fn(false));
322
+ this.uploadInProgressSubscriptionsNotified = false;
323
+ }
324
+ });
341
325
  this.selectLastAddedMediaNode();
342
326
  });
343
327
  // Ignored via go/ees005
@@ -105,7 +105,7 @@ export function createAIGeneratingDecorationPlugin() {
105
105
  },
106
106
  apply: function apply(tr, pluginState, _oldState, newState) {
107
107
  // Disabled when gate/experiment off — drop decorations.
108
- if (!fg('cc-maui-phase-2-loading') || !expValEquals('cc-maui-experiment', 'isEnabled', true)) {
108
+ if (!fg('cc-maui-phase-2') || !expValEquals('cc-maui-experiment', 'isEnabled', true)) {
109
109
  if (pluginState.generatingMediaIds.size > 0) {
110
110
  return {
111
111
  generatingMediaIds: new Set(),
@@ -310,27 +310,11 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
310
310
  }
311
311
  });
312
312
  });
313
- if (fg('platform_editor_media_disable_save_during_upload')) {
314
- _this.taskManager.addPendingTask(_uploadingPromise, mediaStateWithContext.id).then(function () {
315
- _this.updateAndDispatch({
316
- allUploadsFinished: true
317
- });
318
- _this.waitForPendingTasks().then(function () {
319
- if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
320
- _this.uploadInProgressSubscriptions.forEach(function (fn) {
321
- return fn(false);
322
- });
323
- _this.uploadInProgressSubscriptionsNotified = false;
324
- }
325
- });
326
- });
327
- } else {
328
- _this.taskManager.addPendingTask(_uploadingPromise, mediaStateWithContext.id).then(function () {
329
- _this.updateAndDispatch({
330
- allUploadsFinished: true
331
- });
313
+ _this.taskManager.addPendingTask(_uploadingPromise, mediaStateWithContext.id).then(function () {
314
+ _this.updateAndDispatch({
315
+ allUploadsFinished: true
332
316
  });
333
- }
317
+ });
334
318
  }
335
319
 
336
320
  // refocus the view
@@ -338,16 +322,14 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
338
322
  if (!view.hasFocus()) {
339
323
  view.focus();
340
324
  }
341
- if (isEndState(mediaStateWithContext) || !fg('platform_editor_media_disable_save_during_upload')) {
342
- _this.waitForPendingTasks().then(function () {
343
- if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
344
- _this.uploadInProgressSubscriptions.forEach(function (fn) {
345
- return fn(false);
346
- });
347
- _this.uploadInProgressSubscriptionsNotified = false;
348
- }
349
- });
350
- }
325
+ _this.waitForPendingTasks().then(function () {
326
+ if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
327
+ _this.uploadInProgressSubscriptions.forEach(function (fn) {
328
+ return fn(false);
329
+ });
330
+ _this.uploadInProgressSubscriptionsNotified = false;
331
+ }
332
+ });
351
333
  _this.selectLastAddedMediaNode();
352
334
  });
353
335
  // Ignored via go/ees005
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "12.6.1",
3
+ "version": "12.7.1",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^10.0.0",
38
38
  "@atlaskit/editor-plugin-annotation": "^10.3.0",
39
- "@atlaskit/editor-plugin-connectivity": "^10.0.0",
39
+ "@atlaskit/editor-plugin-connectivity": "^10.1.0",
40
40
  "@atlaskit/editor-plugin-decorations": "^10.1.0",
41
41
  "@atlaskit/editor-plugin-editor-disabled": "^10.1.0",
42
42
  "@atlaskit/editor-plugin-editor-viewmode": "^12.1.0",
@@ -45,16 +45,16 @@
45
45
  "@atlaskit/editor-plugin-grid": "^10.2.0",
46
46
  "@atlaskit/editor-plugin-guideline": "^10.1.0",
47
47
  "@atlaskit/editor-plugin-interaction": "^19.1.0",
48
- "@atlaskit/editor-plugin-selection": "^10.0.0",
49
- "@atlaskit/editor-plugin-toolbar": "^7.2.0",
50
- "@atlaskit/editor-plugin-width": "^11.0.0",
48
+ "@atlaskit/editor-plugin-selection": "^10.1.0",
49
+ "@atlaskit/editor-plugin-toolbar": "^7.3.0",
50
+ "@atlaskit/editor-plugin-width": "^11.1.0",
51
51
  "@atlaskit/editor-prosemirror": "^7.3.0",
52
- "@atlaskit/editor-shared-styles": "^3.10.0",
53
- "@atlaskit/editor-tables": "^2.9.0",
52
+ "@atlaskit/editor-shared-styles": "^3.11.0",
53
+ "@atlaskit/editor-tables": "^2.10.0",
54
54
  "@atlaskit/form": "^15.5.0",
55
55
  "@atlaskit/icon": "^34.5.0",
56
56
  "@atlaskit/icon-lab": "^6.9.0",
57
- "@atlaskit/media-card": "^80.4.0",
57
+ "@atlaskit/media-card": "^80.5.0",
58
58
  "@atlaskit/media-client": "^36.2.0",
59
59
  "@atlaskit/media-client-react": "^5.1.0",
60
60
  "@atlaskit/media-common": "^13.3.0",
@@ -65,7 +65,7 @@
65
65
  "@atlaskit/platform-feature-flags": "^1.1.0",
66
66
  "@atlaskit/primitives": "^19.0.0",
67
67
  "@atlaskit/textfield": "^8.3.0",
68
- "@atlaskit/tmp-editor-statsig": "^80.0.0",
68
+ "@atlaskit/tmp-editor-statsig": "^80.3.0",
69
69
  "@atlaskit/tokens": "^13.0.0",
70
70
  "@atlaskit/tooltip": "^22.2.0",
71
71
  "@babel/runtime": "^7.0.0",
@@ -77,7 +77,7 @@
77
77
  "uuid": "^3.1.0"
78
78
  },
79
79
  "peerDependencies": {
80
- "@atlaskit/editor-common": "^114.30.0",
80
+ "@atlaskit/editor-common": "^114.32.0",
81
81
  "@atlaskit/media-core": "^37.0.0",
82
82
  "react": "^18.2.0",
83
83
  "react-dom": "^18.2.0",
@@ -159,10 +159,7 @@
159
159
  "platform_editor_media_border_radius_fix": {
160
160
  "type": "boolean"
161
161
  },
162
- "platform_editor_media_disable_save_during_upload": {
163
- "type": "boolean"
164
- },
165
- "cc-maui-phase-2-loading": {
162
+ "cc-maui-phase-2": {
166
163
  "type": "boolean"
167
164
  }
168
165
  },