@atlaskit/editor-plugin-media 10.1.12 → 10.2.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 +17 -0
- package/dist/cjs/pm-plugins/main.js +30 -12
- package/dist/es2019/pm-plugins/main.js +26 -10
- package/dist/esm/pm-plugins/main.js +30 -12
- package/dist/types/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 10.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3778325d7b086`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3778325d7b086) -
|
|
8
|
+
Fix save button disable in editor
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 10.1.13
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 10.1.12
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -182,11 +182,27 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
});
|
|
185
|
-
|
|
186
|
-
_this.
|
|
187
|
-
|
|
185
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_media_disable_save_during_upload')) {
|
|
186
|
+
_this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(function () {
|
|
187
|
+
_this.updateAndDispatch({
|
|
188
|
+
allUploadsFinished: true
|
|
189
|
+
});
|
|
190
|
+
_this.waitForPendingTasks().then(function () {
|
|
191
|
+
if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
|
|
192
|
+
_this.uploadInProgressSubscriptions.forEach(function (fn) {
|
|
193
|
+
return fn(false);
|
|
194
|
+
});
|
|
195
|
+
_this.uploadInProgressSubscriptionsNotified = false;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
188
198
|
});
|
|
189
|
-
}
|
|
199
|
+
} else {
|
|
200
|
+
_this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(function () {
|
|
201
|
+
_this.updateAndDispatch({
|
|
202
|
+
allUploadsFinished: true
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
}
|
|
190
206
|
}
|
|
191
207
|
|
|
192
208
|
// refocus the view
|
|
@@ -194,14 +210,16 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
194
210
|
if (!view.hasFocus()) {
|
|
195
211
|
view.focus();
|
|
196
212
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
_this.uploadInProgressSubscriptions.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
213
|
+
if (isEndState(mediaStateWithContext) || !(0, _platformFeatureFlags.fg)('platform_editor_media_disable_save_during_upload')) {
|
|
214
|
+
_this.waitForPendingTasks().then(function () {
|
|
215
|
+
if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
|
|
216
|
+
_this.uploadInProgressSubscriptions.forEach(function (fn) {
|
|
217
|
+
return fn(false);
|
|
218
|
+
});
|
|
219
|
+
_this.uploadInProgressSubscriptionsNotified = false;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
205
223
|
_this.selectLastAddedMediaNode();
|
|
206
224
|
});
|
|
207
225
|
// Ignored via go/ees005
|
|
@@ -158,11 +158,25 @@ export class MediaPluginStateImplementation {
|
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
});
|
|
161
|
-
|
|
162
|
-
this.
|
|
163
|
-
|
|
161
|
+
if (fg('platform_editor_media_disable_save_during_upload')) {
|
|
162
|
+
this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(() => {
|
|
163
|
+
this.updateAndDispatch({
|
|
164
|
+
allUploadsFinished: true
|
|
165
|
+
});
|
|
166
|
+
this.waitForPendingTasks().then(() => {
|
|
167
|
+
if (this.uploadInProgressSubscriptions.length > 0 && this.uploadInProgressSubscriptionsNotified) {
|
|
168
|
+
this.uploadInProgressSubscriptions.forEach(fn => fn(false));
|
|
169
|
+
this.uploadInProgressSubscriptionsNotified = false;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
164
172
|
});
|
|
165
|
-
}
|
|
173
|
+
} else {
|
|
174
|
+
this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(() => {
|
|
175
|
+
this.updateAndDispatch({
|
|
176
|
+
allUploadsFinished: true
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
}
|
|
166
180
|
}
|
|
167
181
|
|
|
168
182
|
// refocus the view
|
|
@@ -172,12 +186,14 @@ export class MediaPluginStateImplementation {
|
|
|
172
186
|
if (!view.hasFocus()) {
|
|
173
187
|
view.focus();
|
|
174
188
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
this.uploadInProgressSubscriptions.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
189
|
+
if (isEndState(mediaStateWithContext) || !fg('platform_editor_media_disable_save_during_upload')) {
|
|
190
|
+
this.waitForPendingTasks().then(() => {
|
|
191
|
+
if (this.uploadInProgressSubscriptions.length > 0 && this.uploadInProgressSubscriptionsNotified) {
|
|
192
|
+
this.uploadInProgressSubscriptions.forEach(fn => fn(false));
|
|
193
|
+
this.uploadInProgressSubscriptionsNotified = false;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
181
197
|
this.selectLastAddedMediaNode();
|
|
182
198
|
});
|
|
183
199
|
// Ignored via go/ees005
|
|
@@ -174,11 +174,27 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
|
-
|
|
178
|
-
_this.
|
|
179
|
-
|
|
177
|
+
if (fg('platform_editor_media_disable_save_during_upload')) {
|
|
178
|
+
_this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(function () {
|
|
179
|
+
_this.updateAndDispatch({
|
|
180
|
+
allUploadsFinished: true
|
|
181
|
+
});
|
|
182
|
+
_this.waitForPendingTasks().then(function () {
|
|
183
|
+
if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
|
|
184
|
+
_this.uploadInProgressSubscriptions.forEach(function (fn) {
|
|
185
|
+
return fn(false);
|
|
186
|
+
});
|
|
187
|
+
_this.uploadInProgressSubscriptionsNotified = false;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
180
190
|
});
|
|
181
|
-
}
|
|
191
|
+
} else {
|
|
192
|
+
_this.taskManager.addPendingTask(uploadingPromise, mediaStateWithContext.id).then(function () {
|
|
193
|
+
_this.updateAndDispatch({
|
|
194
|
+
allUploadsFinished: true
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
}
|
|
182
198
|
}
|
|
183
199
|
|
|
184
200
|
// refocus the view
|
|
@@ -186,14 +202,16 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
186
202
|
if (!view.hasFocus()) {
|
|
187
203
|
view.focus();
|
|
188
204
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
_this.uploadInProgressSubscriptions.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
205
|
+
if (isEndState(mediaStateWithContext) || !fg('platform_editor_media_disable_save_during_upload')) {
|
|
206
|
+
_this.waitForPendingTasks().then(function () {
|
|
207
|
+
if (_this.uploadInProgressSubscriptions.length > 0 && _this.uploadInProgressSubscriptionsNotified) {
|
|
208
|
+
_this.uploadInProgressSubscriptions.forEach(function (fn) {
|
|
209
|
+
return fn(false);
|
|
210
|
+
});
|
|
211
|
+
_this.uploadInProgressSubscriptionsNotified = false;
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
197
215
|
_this.selectLastAddedMediaNode();
|
|
198
216
|
});
|
|
199
217
|
// Ignored via go/ees005
|
|
@@ -23,9 +23,9 @@ export declare class AltTextEditComponent extends React.Component<Props, AltText
|
|
|
23
23
|
private fireCustomAnalytics?;
|
|
24
24
|
private errorsListRef;
|
|
25
25
|
state: {
|
|
26
|
+
lastValue: string | undefined;
|
|
26
27
|
showClearTextButton: boolean;
|
|
27
28
|
validationErrors: string[];
|
|
28
|
-
lastValue: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
constructor(props: Props);
|
|
31
31
|
prevValue: string | undefined;
|
|
@@ -23,9 +23,9 @@ export declare class AltTextEditComponent extends React.Component<Props, AltText
|
|
|
23
23
|
private fireCustomAnalytics?;
|
|
24
24
|
private errorsListRef;
|
|
25
25
|
state: {
|
|
26
|
+
lastValue: string | undefined;
|
|
26
27
|
showClearTextButton: boolean;
|
|
27
28
|
validationErrors: string[];
|
|
28
|
-
lastValue: string | undefined;
|
|
29
29
|
};
|
|
30
30
|
constructor(props: Props);
|
|
31
31
|
prevValue: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
54
54
|
"@atlaskit/form": "^15.5.0",
|
|
55
55
|
"@atlaskit/icon": "^34.0.0",
|
|
56
|
-
"@atlaskit/icon-lab": "^6.
|
|
56
|
+
"@atlaskit/icon-lab": "^6.3.0",
|
|
57
57
|
"@atlaskit/media-card": "^79.16.0",
|
|
58
58
|
"@atlaskit/media-client": "^36.0.0",
|
|
59
59
|
"@atlaskit/media-client-react": "^5.0.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/primitives": "^18.1.0",
|
|
67
67
|
"@atlaskit/textfield": "^8.2.0",
|
|
68
68
|
"@atlaskit/theme": "^22.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^54.3.0",
|
|
70
70
|
"@atlaskit/tokens": "^11.4.0",
|
|
71
71
|
"@atlaskit/tooltip": "^21.1.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"uuid": "^3.1.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@atlaskit/editor-common": "^112.
|
|
81
|
+
"@atlaskit/editor-common": "^112.17.0",
|
|
82
82
|
"@atlaskit/media-core": "^37.0.0",
|
|
83
83
|
"react": "^18.2.0",
|
|
84
84
|
"react-dom": "^18.2.0",
|
|
@@ -165,6 +165,9 @@
|
|
|
165
165
|
},
|
|
166
166
|
"platform_editor_media_border_radius_fix": {
|
|
167
167
|
"type": "boolean"
|
|
168
|
+
},
|
|
169
|
+
"platform_editor_media_disable_save_during_upload": {
|
|
170
|
+
"type": "boolean"
|
|
168
171
|
}
|
|
169
172
|
},
|
|
170
173
|
"stricter": {
|