@atlaskit/editor-plugin-media 2.7.3 → 3.0.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 +9 -0
- package/dist/cjs/ui/toolbar/commands.js +12 -1
- package/dist/cjs/ui/toolbar/index.js +32 -10
- package/dist/cjs/ui/toolbar/linking.js +2 -1
- package/dist/cjs/ui/toolbar/mediaInline.js +4 -4
- package/dist/es2019/ui/toolbar/commands.js +12 -1
- package/dist/es2019/ui/toolbar/index.js +33 -11
- package/dist/es2019/ui/toolbar/linking.js +2 -1
- package/dist/es2019/ui/toolbar/mediaInline.js +5 -5
- package/dist/esm/ui/toolbar/commands.js +12 -1
- package/dist/esm/ui/toolbar/index.js +33 -11
- package/dist/esm/ui/toolbar/linking.js +2 -1
- package/dist/esm/ui/toolbar/mediaInline.js +5 -5
- package/dist/types/ui/toolbar/commands.d.ts +1 -0
- package/dist/types-ts4.5/ui/toolbar/commands.d.ts +1 -0
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#149482](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149482)
|
|
8
|
+
[`1f1f73876c3c8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1f1f73876c3c8) -
|
|
9
|
+
ED-27860 Add analytics for copy and delete button in floating toolbars
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 2.7.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -4,9 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.updateMediaSingleWidthTr = exports.updateMediaSingleWidth = exports.toggleBorderMark = exports.setBorderMark = exports.removeInlineCard = exports.getNodeType = exports.changeMediaSingleToMediaInline = exports.changeMediaInlineToMediaSingle = exports.changeMediaCardToInline = exports.changeInlineToMediaCard = exports.DEFAULT_BORDER_SIZE = exports.DEFAULT_BORDER_COLOR = void 0;
|
|
7
|
+
exports.updateMediaSingleWidthTr = exports.updateMediaSingleWidth = exports.toggleBorderMark = exports.setBorderMark = exports.removeInlineCardWithAnalytics = exports.removeInlineCard = exports.getNodeType = exports.changeMediaSingleToMediaInline = exports.changeMediaInlineToMediaSingle = exports.changeMediaCardToInline = exports.changeInlineToMediaCard = exports.DEFAULT_BORDER_SIZE = exports.DEFAULT_BORDER_COLOR = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
|
+
var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
|
|
10
11
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
11
12
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
12
13
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
@@ -143,6 +144,16 @@ var changeMediaInlineToMediaSingle = exports.changeMediaInlineToMediaSingle = fu
|
|
|
143
144
|
return true;
|
|
144
145
|
};
|
|
145
146
|
};
|
|
147
|
+
var removeInlineCardWithAnalytics = exports.removeInlineCardWithAnalytics = function removeInlineCardWithAnalytics(editorAnalyticsAPI) {
|
|
148
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
|
|
149
|
+
action: _analytics.ACTION.DELETED,
|
|
150
|
+
actionSubject: _analytics.ACTION_SUBJECT.MEDIA_INLINE,
|
|
151
|
+
attributes: {
|
|
152
|
+
inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
|
|
153
|
+
},
|
|
154
|
+
eventType: _analytics.EVENT_TYPE.TRACK
|
|
155
|
+
})(removeInlineCard);
|
|
156
|
+
};
|
|
146
157
|
var removeInlineCard = exports.removeInlineCard = function removeInlineCard(state, dispatch) {
|
|
147
158
|
if ((0, _utils.isNodeSelection)(state.selection)) {
|
|
148
159
|
if (dispatch) {
|
|
@@ -12,6 +12,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
14
14
|
var _card = require("@atlaskit/editor-common/card");
|
|
15
|
+
var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
|
|
15
16
|
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
16
17
|
var _messages = _interopRequireWildcard(require("@atlaskit/editor-common/messages"));
|
|
17
18
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
@@ -62,12 +63,32 @@ var mediaTypeMessages = {
|
|
|
62
63
|
archive: _mediaUi.messages.file_archive_is_selected,
|
|
63
64
|
unknown: _mediaUi.messages.file_unknown_is_selected
|
|
64
65
|
};
|
|
66
|
+
var removeWithAnalytics = function removeWithAnalytics(editorAnalyticsApi) {
|
|
67
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsApi, {
|
|
68
|
+
action: _analytics.ACTION.DELETED,
|
|
69
|
+
actionSubject: _analytics.ACTION_SUBJECT.MEDIA_SINGLE,
|
|
70
|
+
attributes: {
|
|
71
|
+
inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
|
|
72
|
+
},
|
|
73
|
+
eventType: _analytics.EVENT_TYPE.TRACK
|
|
74
|
+
})(remove);
|
|
75
|
+
};
|
|
65
76
|
var remove = function remove(state, dispatch) {
|
|
66
77
|
if (dispatch) {
|
|
67
78
|
dispatch((0, _utils.removeSelectedNode)(state.tr));
|
|
68
79
|
}
|
|
69
80
|
return true;
|
|
70
81
|
};
|
|
82
|
+
var handleRemoveMediaGroupWithAnalytics = function handleRemoveMediaGroupWithAnalytics(editorAnalyticsApi) {
|
|
83
|
+
return (0, _editorAnalytics.withAnalytics)(editorAnalyticsApi, {
|
|
84
|
+
action: _analytics.ACTION.DELETED,
|
|
85
|
+
actionSubject: _analytics.ACTION_SUBJECT.MEDIA_GROUP,
|
|
86
|
+
attributes: {
|
|
87
|
+
inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
|
|
88
|
+
},
|
|
89
|
+
eventType: _analytics.EVENT_TYPE.TRACK
|
|
90
|
+
})(handleRemoveMediaGroup);
|
|
91
|
+
};
|
|
71
92
|
var handleRemoveMediaGroup = function handleRemoveMediaGroup(state, dispatch) {
|
|
72
93
|
var tr = (0, _utils2.removeMediaGroupNode)(state);
|
|
73
94
|
if (dispatch) {
|
|
@@ -179,7 +200,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
179
200
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
180
201
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
181
202
|
title: intl.formatMessage(_messages.default.remove),
|
|
182
|
-
onClick: handleRemoveMediaGroup,
|
|
203
|
+
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? handleRemoveMediaGroupWithAnalytics(editorAnalyticsAPI) : handleRemoveMediaGroup,
|
|
183
204
|
testId: 'media-toolbar-remove-button'
|
|
184
205
|
});
|
|
185
206
|
} else {
|
|
@@ -407,7 +428,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
407
428
|
icon: /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
408
429
|
color: "currentColor",
|
|
409
430
|
spacing: "spacious",
|
|
410
|
-
label: inlineTitle,
|
|
431
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : inlineTitle,
|
|
411
432
|
LEGACY_size: "medium",
|
|
412
433
|
LEGACY_fallbackIcon: _card.IconInline
|
|
413
434
|
}),
|
|
@@ -426,7 +447,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
426
447
|
}) : /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
427
448
|
color: "currentColor",
|
|
428
449
|
spacing: "spacious",
|
|
429
|
-
label: floatingSwitcherTitle,
|
|
450
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : floatingSwitcherTitle,
|
|
430
451
|
LEGACY_size: "medium",
|
|
431
452
|
LEGACY_fallbackIcon: _card.IconEmbed
|
|
432
453
|
})
|
|
@@ -609,6 +630,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
609
630
|
});
|
|
610
631
|
}
|
|
611
632
|
if (!isEditorControlsEnabled) {
|
|
633
|
+
var _pluginInjectionApi$a9;
|
|
612
634
|
if (allowAltTextOnImages) {
|
|
613
635
|
var _pluginInjectionApi$a8;
|
|
614
636
|
toolbarButtons.push((0, _altText2.altTextButton)(intl, state, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions), {
|
|
@@ -627,7 +649,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
627
649
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
628
650
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
629
651
|
title: intl.formatMessage(_messages.default.remove),
|
|
630
|
-
onClick: remove,
|
|
652
|
+
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a9 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a9 === void 0 ? void 0 : _pluginInjectionApi$a9.actions) : remove,
|
|
631
653
|
testId: 'media-toolbar-remove-button',
|
|
632
654
|
supportsViewMode: false
|
|
633
655
|
};
|
|
@@ -785,7 +807,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
785
807
|
selectedNodeType = state.selection.node.type;
|
|
786
808
|
}
|
|
787
809
|
if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
|
|
788
|
-
var _pluginInjectionApi$
|
|
810
|
+
var _pluginInjectionApi$a10, _pluginInjectionApi$f2;
|
|
789
811
|
var mediaOffset = state.selection.$from.parentOffset + 1;
|
|
790
812
|
baseToolbar.getDomRef = function () {
|
|
791
813
|
var _mediaPluginState$ele2;
|
|
@@ -794,7 +816,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
794
816
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
795
817
|
return (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(selector);
|
|
796
818
|
};
|
|
797
|
-
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$
|
|
819
|
+
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f2 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f2 === void 0 || (_pluginInjectionApi$f2 = _pluginInjectionApi$f2.actions) === null || _pluginInjectionApi$f2 === void 0 ? void 0 : _pluginInjectionApi$f2.forceFocusSelector, isViewOnly);
|
|
798
820
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
799
821
|
items = (0, _mediaInline2.generateMediaInlineFloatingToolbar)(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
800
822
|
} else {
|
|
@@ -808,9 +830,9 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
808
830
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
809
831
|
}
|
|
810
832
|
if (!mediaPluginState.isResizing && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
|
|
811
|
-
var _pluginInjectionApi$
|
|
833
|
+
var _pluginInjectionApi$a11, _pluginInjectionApi$a12;
|
|
812
834
|
(0, _utils2.updateToFullHeightSeparator)(items);
|
|
813
|
-
var customOptions = [].concat((0, _toConsumableArray2.default)((0, _linking3.getLinkingDropdownOptions)(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly)), (0, _toConsumableArray2.default)((0, _altText2.getAltTextDropdownOption)(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$
|
|
835
|
+
var customOptions = [].concat((0, _toConsumableArray2.default)((0, _linking3.getLinkingDropdownOptions)(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly)), (0, _toConsumableArray2.default)((0, _altText2.getAltTextDropdownOption)(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a11 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a11 === void 0 ? void 0 : _pluginInjectionApi$a11.actions)), (0, _toConsumableArray2.default)((0, _pixelResizing2.getResizeDropdownOption)(options, state, intl.formatMessage, selectedNodeType)));
|
|
814
836
|
if (customOptions.length) {
|
|
815
837
|
customOptions.push({
|
|
816
838
|
type: 'separator'
|
|
@@ -832,7 +854,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
832
854
|
onClick: function onClick() {
|
|
833
855
|
var _pluginInjectionApi$c4, _pluginInjectionApi$f3;
|
|
834
856
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c4 = pluginInjectionApi.core) === null || _pluginInjectionApi$c4 === void 0 || _pluginInjectionApi$c4.actions.execute( // @ts-ignore
|
|
835
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f3 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f3 === void 0 ? void 0 : _pluginInjectionApi$f3.commands.copyNode(nodeType));
|
|
857
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f3 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f3 === void 0 ? void 0 : _pluginInjectionApi$f3.commands.copyNode(nodeType, _analytics.INPUT_METHOD.FLOATING_TB));
|
|
836
858
|
return true;
|
|
837
859
|
},
|
|
838
860
|
icon: /*#__PURE__*/_react.default.createElement(_copy.default, {
|
|
@@ -840,7 +862,7 @@ var floatingToolbar = exports.floatingToolbar = function floatingToolbar(state,
|
|
|
840
862
|
})
|
|
841
863
|
}, hoverDecorationProps(nodeType, _editorSharedStyles.akEditorSelectedNodeClassName)), _objectSpread({
|
|
842
864
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(_messages.default.delete),
|
|
843
|
-
onClick: remove,
|
|
865
|
+
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions) : remove,
|
|
844
866
|
icon: /*#__PURE__*/_react.default.createElement(_delete.default, {
|
|
845
867
|
label: ""
|
|
846
868
|
})
|
|
@@ -14,6 +14,7 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
14
14
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
15
15
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
16
16
|
var _linkExternal = _interopRequireDefault(require("@atlaskit/icon/core/link-external"));
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _linking = require("../../pm-plugins/commands/linking");
|
|
18
19
|
var _linking2 = require("../../pm-plugins/linking");
|
|
19
20
|
var _currentMediaNode = require("../../pm-plugins/utils/current-media-node");
|
|
@@ -136,7 +137,7 @@ var getLinkingDropdownOptions = exports.getLinkingDropdownOptions = function get
|
|
|
136
137
|
return true;
|
|
137
138
|
},
|
|
138
139
|
icon: /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
139
|
-
label: title
|
|
140
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : title
|
|
140
141
|
})
|
|
141
142
|
}];
|
|
142
143
|
} else {
|
|
@@ -137,7 +137,7 @@ var generateMediaInlineFloatingToolbar = exports.generateMediaInlineFloatingTool
|
|
|
137
137
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
138
138
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
139
139
|
title: intl.formatMessage(_messages.default.remove),
|
|
140
|
-
onClick: _commands.removeInlineCard,
|
|
140
|
+
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? (0, _commands.removeInlineCardWithAnalytics)(editorAnalyticsAPI) : _commands.removeInlineCard,
|
|
141
141
|
testId: 'media-toolbar-remove-button'
|
|
142
142
|
});
|
|
143
143
|
} else {
|
|
@@ -333,7 +333,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
333
333
|
icon: /*#__PURE__*/_react.default.createElement(_imageInline.default, {
|
|
334
334
|
color: "currentColor",
|
|
335
335
|
spacing: "spacious",
|
|
336
|
-
label: mediaInlineImageTitle,
|
|
336
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : mediaInlineImageTitle,
|
|
337
337
|
LEGACY_size: "medium",
|
|
338
338
|
LEGACY_fallbackIcon: _card.IconInline
|
|
339
339
|
})
|
|
@@ -348,7 +348,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
348
348
|
}) : /*#__PURE__*/_react.default.createElement(_imageFullscreen.default, {
|
|
349
349
|
color: "currentColor",
|
|
350
350
|
spacing: "spacious",
|
|
351
|
-
label: mediaSingleTitle,
|
|
351
|
+
label: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_7') ? '' : mediaSingleTitle,
|
|
352
352
|
LEGACY_size: "medium",
|
|
353
353
|
LEGACY_fallbackIcon: _card.IconEmbed
|
|
354
354
|
})
|
|
@@ -450,7 +450,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
450
450
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
451
451
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
452
452
|
title: intl.formatMessage(_messages.default.remove),
|
|
453
|
-
onClick: _commands.removeInlineCard,
|
|
453
|
+
onClick: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics_2') ? (0, _commands.removeInlineCardWithAnalytics)(editorAnalyticsAPI) : _commands.removeInlineCard,
|
|
454
454
|
testId: 'media-toolbar-remove-button'
|
|
455
455
|
});
|
|
456
456
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
2
3
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
3
4
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
4
5
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -133,6 +134,16 @@ export const changeMediaInlineToMediaSingle = (editorAnalyticsAPI, widthPluginSt
|
|
|
133
134
|
}
|
|
134
135
|
return true;
|
|
135
136
|
};
|
|
137
|
+
export const removeInlineCardWithAnalytics = editorAnalyticsAPI => {
|
|
138
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
139
|
+
action: ACTION.DELETED,
|
|
140
|
+
actionSubject: ACTION_SUBJECT.MEDIA_INLINE,
|
|
141
|
+
attributes: {
|
|
142
|
+
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
143
|
+
},
|
|
144
|
+
eventType: EVENT_TYPE.TRACK
|
|
145
|
+
})(removeInlineCard);
|
|
146
|
+
};
|
|
136
147
|
export const removeInlineCard = (state, dispatch) => {
|
|
137
148
|
if (isNodeSelection(state.selection)) {
|
|
138
149
|
if (dispatch) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { alignmentIcons, buildLayoutButtons, buildLayoutDropdown, IconCard, IconEmbed, IconInline, layoutToMessages, wrappingIcons } from '@atlaskit/editor-common/card';
|
|
5
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
5
6
|
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
6
7
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
7
8
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -48,12 +49,32 @@ const mediaTypeMessages = {
|
|
|
48
49
|
archive: messages.file_archive_is_selected,
|
|
49
50
|
unknown: messages.file_unknown_is_selected
|
|
50
51
|
};
|
|
52
|
+
const removeWithAnalytics = editorAnalyticsApi => {
|
|
53
|
+
return withAnalytics(editorAnalyticsApi, {
|
|
54
|
+
action: ACTION.DELETED,
|
|
55
|
+
actionSubject: ACTION_SUBJECT.MEDIA_SINGLE,
|
|
56
|
+
attributes: {
|
|
57
|
+
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
58
|
+
},
|
|
59
|
+
eventType: EVENT_TYPE.TRACK
|
|
60
|
+
})(remove);
|
|
61
|
+
};
|
|
51
62
|
const remove = (state, dispatch) => {
|
|
52
63
|
if (dispatch) {
|
|
53
64
|
dispatch(removeSelectedNode(state.tr));
|
|
54
65
|
}
|
|
55
66
|
return true;
|
|
56
67
|
};
|
|
68
|
+
const handleRemoveMediaGroupWithAnalytics = editorAnalyticsApi => {
|
|
69
|
+
return withAnalytics(editorAnalyticsApi, {
|
|
70
|
+
action: ACTION.DELETED,
|
|
71
|
+
actionSubject: ACTION_SUBJECT.MEDIA_GROUP,
|
|
72
|
+
attributes: {
|
|
73
|
+
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
74
|
+
},
|
|
75
|
+
eventType: EVENT_TYPE.TRACK
|
|
76
|
+
})(handleRemoveMediaGroup);
|
|
77
|
+
};
|
|
57
78
|
const handleRemoveMediaGroup = (state, dispatch) => {
|
|
58
79
|
const tr = removeMediaGroupNode(state);
|
|
59
80
|
if (dispatch) {
|
|
@@ -167,7 +188,7 @@ const generateMediaCardFloatingToolbar = (state, intl, mediaPluginState, hoverDe
|
|
|
167
188
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
168
189
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
169
190
|
title: intl.formatMessage(commonMessages.remove),
|
|
170
|
-
onClick: handleRemoveMediaGroup,
|
|
191
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? handleRemoveMediaGroupWithAnalytics(editorAnalyticsAPI) : handleRemoveMediaGroup,
|
|
171
192
|
testId: 'media-toolbar-remove-button'
|
|
172
193
|
});
|
|
173
194
|
} else {
|
|
@@ -394,7 +415,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
394
415
|
icon: /*#__PURE__*/React.createElement(ImageInlineIcon, {
|
|
395
416
|
color: "currentColor",
|
|
396
417
|
spacing: "spacious",
|
|
397
|
-
label: inlineTitle,
|
|
418
|
+
label: fg('platform_editor_controls_patch_7') ? '' : inlineTitle,
|
|
398
419
|
LEGACY_size: "medium",
|
|
399
420
|
LEGACY_fallbackIcon: IconInline
|
|
400
421
|
}),
|
|
@@ -413,7 +434,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
413
434
|
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
414
435
|
color: "currentColor",
|
|
415
436
|
spacing: "spacious",
|
|
416
|
-
label: floatingSwitcherTitle,
|
|
437
|
+
label: fg('platform_editor_controls_patch_7') ? '' : floatingSwitcherTitle,
|
|
417
438
|
LEGACY_size: "medium",
|
|
418
439
|
LEGACY_fallbackIcon: IconEmbed
|
|
419
440
|
})
|
|
@@ -604,6 +625,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
604
625
|
});
|
|
605
626
|
}
|
|
606
627
|
if (!isEditorControlsEnabled) {
|
|
628
|
+
var _pluginInjectionApi$a9;
|
|
607
629
|
if (allowAltTextOnImages) {
|
|
608
630
|
var _pluginInjectionApi$a8;
|
|
609
631
|
toolbarButtons.push(altTextButton(intl, state, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions), {
|
|
@@ -622,7 +644,7 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
622
644
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
623
645
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
624
646
|
title: intl.formatMessage(commonMessages.remove),
|
|
625
|
-
onClick: remove,
|
|
647
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a9 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a9 === void 0 ? void 0 : _pluginInjectionApi$a9.actions) : remove,
|
|
626
648
|
testId: 'media-toolbar-remove-button',
|
|
627
649
|
supportsViewMode: false
|
|
628
650
|
};
|
|
@@ -784,7 +806,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
784
806
|
selectedNodeType = state.selection.node.type;
|
|
785
807
|
}
|
|
786
808
|
if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
|
|
787
|
-
var _pluginInjectionApi$
|
|
809
|
+
var _pluginInjectionApi$a10, _pluginInjectionApi$f3, _pluginInjectionApi$f4;
|
|
788
810
|
const mediaOffset = state.selection.$from.parentOffset + 1;
|
|
789
811
|
baseToolbar.getDomRef = () => {
|
|
790
812
|
var _mediaPluginState$ele2;
|
|
@@ -793,7 +815,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
793
815
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
794
816
|
return (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(selector);
|
|
795
817
|
};
|
|
796
|
-
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
818
|
+
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f3 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f3 === void 0 ? void 0 : (_pluginInjectionApi$f4 = _pluginInjectionApi$f3.actions) === null || _pluginInjectionApi$f4 === void 0 ? void 0 : _pluginInjectionApi$f4.forceFocusSelector, isViewOnly);
|
|
797
819
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
798
820
|
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
799
821
|
} else {
|
|
@@ -807,9 +829,9 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
807
829
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
808
830
|
}
|
|
809
831
|
if (!mediaPluginState.isResizing && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
810
|
-
var _pluginInjectionApi$
|
|
832
|
+
var _pluginInjectionApi$a11, _pluginInjectionApi$a12;
|
|
811
833
|
updateToFullHeightSeparator(items);
|
|
812
|
-
const customOptions = [...getLinkingDropdownOptions(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly), ...getAltTextDropdownOption(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
834
|
+
const customOptions = [...getLinkingDropdownOptions(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly), ...getAltTextDropdownOption(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a11 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a11 === void 0 ? void 0 : _pluginInjectionApi$a11.actions), ...getResizeDropdownOption(options, state, intl.formatMessage, selectedNodeType)];
|
|
813
835
|
if (customOptions.length) {
|
|
814
836
|
customOptions.push({
|
|
815
837
|
type: 'separator'
|
|
@@ -829,7 +851,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
829
851
|
onClick: () => {
|
|
830
852
|
var _pluginInjectionApi$c10, _pluginInjectionApi$f5;
|
|
831
853
|
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c10 = pluginInjectionApi.core) === null || _pluginInjectionApi$c10 === void 0 ? void 0 : _pluginInjectionApi$c10.actions.execute( // @ts-ignore
|
|
832
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f5 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f5 === void 0 ? void 0 : _pluginInjectionApi$f5.commands.copyNode(nodeType));
|
|
854
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f5 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f5 === void 0 ? void 0 : _pluginInjectionApi$f5.commands.copyNode(nodeType, INPUT_METHOD.FLOATING_TB));
|
|
833
855
|
return true;
|
|
834
856
|
},
|
|
835
857
|
icon: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
@@ -838,7 +860,7 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
838
860
|
...hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)
|
|
839
861
|
}, {
|
|
840
862
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(commonMessages.delete),
|
|
841
|
-
onClick: remove,
|
|
863
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions) : remove,
|
|
842
864
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
843
865
|
label: ""
|
|
844
866
|
}),
|
|
@@ -5,6 +5,7 @@ import { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messa
|
|
|
5
5
|
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
6
6
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
7
7
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { hideLinkingToolbar, setUrlToMedia, showLinkingToolbar, unlink } from '../../pm-plugins/commands/linking';
|
|
9
10
|
import { getMediaLinkingState } from '../../pm-plugins/linking';
|
|
10
11
|
import { currentMediaInlineNode, currentMediaNode } from '../../pm-plugins/utils/current-media-node';
|
|
@@ -137,7 +138,7 @@ export const getLinkingDropdownOptions = (editorState, intl, mediaLinkingState,
|
|
|
137
138
|
return true;
|
|
138
139
|
},
|
|
139
140
|
icon: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
140
|
-
label: title
|
|
141
|
+
label: fg('platform_editor_controls_patch_7') ? '' : title
|
|
141
142
|
})
|
|
142
143
|
}];
|
|
143
144
|
} else {
|
|
@@ -20,7 +20,7 @@ import { currentMediaOrInlineNodeBorderMark } from '../../pm-plugins/utils/curre
|
|
|
20
20
|
import { isImage } from '../../pm-plugins/utils/is-type';
|
|
21
21
|
import ImageBorderItem from '../../ui/ImageBorder';
|
|
22
22
|
import { altTextButton } from './alt-text';
|
|
23
|
-
import { changeInlineToMediaCard, changeMediaInlineToMediaSingle, removeInlineCard, setBorderMark, toggleBorderMark } from './commands';
|
|
23
|
+
import { changeInlineToMediaCard, changeMediaInlineToMediaSingle, removeInlineCard, removeInlineCardWithAnalytics, setBorderMark, toggleBorderMark } from './commands';
|
|
24
24
|
import { shouldShowImageBorder } from './imageBorder';
|
|
25
25
|
import { getOpenLinkToolbarButtonOption, shouldShowMediaLinkToolbar } from './linking';
|
|
26
26
|
import { LinkToolbarAppearance } from './linking-toolbar-appearance';
|
|
@@ -125,7 +125,7 @@ export const generateMediaInlineFloatingToolbar = (state, intl, mediaPluginState
|
|
|
125
125
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
126
126
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
127
127
|
title: intl.formatMessage(commonMessages.remove),
|
|
128
|
-
onClick: removeInlineCard,
|
|
128
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeInlineCardWithAnalytics(editorAnalyticsAPI) : removeInlineCard,
|
|
129
129
|
testId: 'media-toolbar-remove-button'
|
|
130
130
|
});
|
|
131
131
|
} else {
|
|
@@ -324,7 +324,7 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
|
|
|
324
324
|
icon: /*#__PURE__*/React.createElement(ImageInlineIcon, {
|
|
325
325
|
color: "currentColor",
|
|
326
326
|
spacing: "spacious",
|
|
327
|
-
label: mediaInlineImageTitle,
|
|
327
|
+
label: fg('platform_editor_controls_patch_7') ? '' : mediaInlineImageTitle,
|
|
328
328
|
LEGACY_size: "medium",
|
|
329
329
|
LEGACY_fallbackIcon: IconInline
|
|
330
330
|
})
|
|
@@ -339,7 +339,7 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
|
|
|
339
339
|
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
340
340
|
color: "currentColor",
|
|
341
341
|
spacing: "spacious",
|
|
342
|
-
label: mediaSingleTitle,
|
|
342
|
+
label: fg('platform_editor_controls_patch_7') ? '' : mediaSingleTitle,
|
|
343
343
|
LEGACY_size: "medium",
|
|
344
344
|
LEGACY_fallbackIcon: IconEmbed
|
|
345
345
|
})
|
|
@@ -439,7 +439,7 @@ const getMediaInlineImageToolbar = (state, intl, mediaPluginState, hoverDecorati
|
|
|
439
439
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
440
440
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
441
441
|
title: intl.formatMessage(commonMessages.remove),
|
|
442
|
-
onClick: removeInlineCard,
|
|
442
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeInlineCardWithAnalytics(editorAnalyticsAPI) : removeInlineCard,
|
|
443
443
|
testId: 'media-toolbar-remove-button'
|
|
444
444
|
});
|
|
445
445
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
5
6
|
import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
|
|
6
7
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
7
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -136,6 +137,16 @@ export var changeMediaInlineToMediaSingle = function changeMediaInlineToMediaSin
|
|
|
136
137
|
return true;
|
|
137
138
|
};
|
|
138
139
|
};
|
|
140
|
+
export var removeInlineCardWithAnalytics = function removeInlineCardWithAnalytics(editorAnalyticsAPI) {
|
|
141
|
+
return withAnalytics(editorAnalyticsAPI, {
|
|
142
|
+
action: ACTION.DELETED,
|
|
143
|
+
actionSubject: ACTION_SUBJECT.MEDIA_INLINE,
|
|
144
|
+
attributes: {
|
|
145
|
+
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
146
|
+
},
|
|
147
|
+
eventType: EVENT_TYPE.TRACK
|
|
148
|
+
})(removeInlineCard);
|
|
149
|
+
};
|
|
139
150
|
export var removeInlineCard = function removeInlineCard(state, dispatch) {
|
|
140
151
|
if (isNodeSelection(state.selection)) {
|
|
141
152
|
if (dispatch) {
|
|
@@ -4,8 +4,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { alignmentIcons, buildLayoutButtons, buildLayoutDropdown, IconCard, IconEmbed, IconInline, layoutToMessages, wrappingIcons } from '@atlaskit/editor-common/card';
|
|
9
|
+
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
9
10
|
import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
|
|
10
11
|
import commonMessages, { cardMessages, mediaAndEmbedToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
11
12
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -52,12 +53,32 @@ var mediaTypeMessages = {
|
|
|
52
53
|
archive: messages.file_archive_is_selected,
|
|
53
54
|
unknown: messages.file_unknown_is_selected
|
|
54
55
|
};
|
|
56
|
+
var removeWithAnalytics = function removeWithAnalytics(editorAnalyticsApi) {
|
|
57
|
+
return withAnalytics(editorAnalyticsApi, {
|
|
58
|
+
action: ACTION.DELETED,
|
|
59
|
+
actionSubject: ACTION_SUBJECT.MEDIA_SINGLE,
|
|
60
|
+
attributes: {
|
|
61
|
+
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
62
|
+
},
|
|
63
|
+
eventType: EVENT_TYPE.TRACK
|
|
64
|
+
})(remove);
|
|
65
|
+
};
|
|
55
66
|
var remove = function remove(state, dispatch) {
|
|
56
67
|
if (dispatch) {
|
|
57
68
|
dispatch(removeSelectedNode(state.tr));
|
|
58
69
|
}
|
|
59
70
|
return true;
|
|
60
71
|
};
|
|
72
|
+
var handleRemoveMediaGroupWithAnalytics = function handleRemoveMediaGroupWithAnalytics(editorAnalyticsApi) {
|
|
73
|
+
return withAnalytics(editorAnalyticsApi, {
|
|
74
|
+
action: ACTION.DELETED,
|
|
75
|
+
actionSubject: ACTION_SUBJECT.MEDIA_GROUP,
|
|
76
|
+
attributes: {
|
|
77
|
+
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
78
|
+
},
|
|
79
|
+
eventType: EVENT_TYPE.TRACK
|
|
80
|
+
})(handleRemoveMediaGroup);
|
|
81
|
+
};
|
|
61
82
|
var handleRemoveMediaGroup = function handleRemoveMediaGroup(state, dispatch) {
|
|
62
83
|
var tr = removeMediaGroupNode(state);
|
|
63
84
|
if (dispatch) {
|
|
@@ -169,7 +190,7 @@ var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar
|
|
|
169
190
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, true),
|
|
170
191
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaGroup, false),
|
|
171
192
|
title: intl.formatMessage(commonMessages.remove),
|
|
172
|
-
onClick: handleRemoveMediaGroup,
|
|
193
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? handleRemoveMediaGroupWithAnalytics(editorAnalyticsAPI) : handleRemoveMediaGroup,
|
|
173
194
|
testId: 'media-toolbar-remove-button'
|
|
174
195
|
});
|
|
175
196
|
} else {
|
|
@@ -397,7 +418,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
397
418
|
icon: /*#__PURE__*/React.createElement(ImageInlineIcon, {
|
|
398
419
|
color: "currentColor",
|
|
399
420
|
spacing: "spacious",
|
|
400
|
-
label: inlineTitle,
|
|
421
|
+
label: fg('platform_editor_controls_patch_7') ? '' : inlineTitle,
|
|
401
422
|
LEGACY_size: "medium",
|
|
402
423
|
LEGACY_fallbackIcon: IconInline
|
|
403
424
|
}),
|
|
@@ -416,7 +437,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
416
437
|
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
417
438
|
color: "currentColor",
|
|
418
439
|
spacing: "spacious",
|
|
419
|
-
label: floatingSwitcherTitle,
|
|
440
|
+
label: fg('platform_editor_controls_patch_7') ? '' : floatingSwitcherTitle,
|
|
420
441
|
LEGACY_size: "medium",
|
|
421
442
|
LEGACY_fallbackIcon: IconEmbed
|
|
422
443
|
})
|
|
@@ -599,6 +620,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
599
620
|
});
|
|
600
621
|
}
|
|
601
622
|
if (!isEditorControlsEnabled) {
|
|
623
|
+
var _pluginInjectionApi$a9;
|
|
602
624
|
if (allowAltTextOnImages) {
|
|
603
625
|
var _pluginInjectionApi$a8;
|
|
604
626
|
toolbarButtons.push(altTextButton(intl, state, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions), {
|
|
@@ -617,7 +639,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
617
639
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, true),
|
|
618
640
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaSingle, false),
|
|
619
641
|
title: intl.formatMessage(commonMessages.remove),
|
|
620
|
-
onClick: remove,
|
|
642
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a9 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a9 === void 0 ? void 0 : _pluginInjectionApi$a9.actions) : remove,
|
|
621
643
|
testId: 'media-toolbar-remove-button',
|
|
622
644
|
supportsViewMode: false
|
|
623
645
|
};
|
|
@@ -775,7 +797,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
775
797
|
selectedNodeType = state.selection.node.type;
|
|
776
798
|
}
|
|
777
799
|
if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
|
|
778
|
-
var _pluginInjectionApi$
|
|
800
|
+
var _pluginInjectionApi$a10, _pluginInjectionApi$f2;
|
|
779
801
|
var mediaOffset = state.selection.$from.parentOffset + 1;
|
|
780
802
|
baseToolbar.getDomRef = function () {
|
|
781
803
|
var _mediaPluginState$ele2;
|
|
@@ -784,7 +806,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
784
806
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
785
807
|
return (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(selector);
|
|
786
808
|
};
|
|
787
|
-
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$
|
|
809
|
+
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a10 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a10 === void 0 ? void 0 : _pluginInjectionApi$a10.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f2 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f2 === void 0 || (_pluginInjectionApi$f2 = _pluginInjectionApi$f2.actions) === null || _pluginInjectionApi$f2 === void 0 ? void 0 : _pluginInjectionApi$f2.forceFocusSelector, isViewOnly);
|
|
788
810
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
789
811
|
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, options);
|
|
790
812
|
} else {
|
|
@@ -798,9 +820,9 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
798
820
|
items = generateMediaSingleFloatingToolbar(state, intl, options, mediaPluginState, mediaLinkingState, pluginInjectionApi);
|
|
799
821
|
}
|
|
800
822
|
if (!mediaPluginState.isResizing && editorExperiment('platform_editor_controls', 'variant1')) {
|
|
801
|
-
var _pluginInjectionApi$
|
|
823
|
+
var _pluginInjectionApi$a11, _pluginInjectionApi$a12;
|
|
802
824
|
updateToFullHeightSeparator(items);
|
|
803
|
-
var customOptions = [].concat(_toConsumableArray(getLinkingDropdownOptions(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly)), _toConsumableArray(getAltTextDropdownOption(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$
|
|
825
|
+
var customOptions = [].concat(_toConsumableArray(getLinkingDropdownOptions(state, intl, mediaLinkingState, allowMediaInline && selectedNodeType && selectedNodeType === mediaInline, allowLinking, isViewOnly)), _toConsumableArray(getAltTextDropdownOption(state, intl.formatMessage, allowAltTextOnImages, selectedNodeType, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a11 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a11 === void 0 ? void 0 : _pluginInjectionApi$a11.actions)), _toConsumableArray(getResizeDropdownOption(options, state, intl.formatMessage, selectedNodeType)));
|
|
804
826
|
if (customOptions.length) {
|
|
805
827
|
customOptions.push({
|
|
806
828
|
type: 'separator'
|
|
@@ -822,7 +844,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
822
844
|
onClick: function onClick() {
|
|
823
845
|
var _pluginInjectionApi$c4, _pluginInjectionApi$f3;
|
|
824
846
|
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$c4 = pluginInjectionApi.core) === null || _pluginInjectionApi$c4 === void 0 || _pluginInjectionApi$c4.actions.execute( // @ts-ignore
|
|
825
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f3 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f3 === void 0 ? void 0 : _pluginInjectionApi$f3.commands.copyNode(nodeType));
|
|
847
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$f3 = pluginInjectionApi.floatingToolbar) === null || _pluginInjectionApi$f3 === void 0 ? void 0 : _pluginInjectionApi$f3.commands.copyNode(nodeType, INPUT_METHOD.FLOATING_TB));
|
|
826
848
|
return true;
|
|
827
849
|
},
|
|
828
850
|
icon: /*#__PURE__*/React.createElement(CopyIcon, {
|
|
@@ -830,7 +852,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
830
852
|
})
|
|
831
853
|
}, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName)), _objectSpread({
|
|
832
854
|
title: intl === null || intl === void 0 ? void 0 : intl.formatMessage(commonMessages.delete),
|
|
833
|
-
onClick: remove,
|
|
855
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeWithAnalytics(pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a12 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a12 === void 0 ? void 0 : _pluginInjectionApi$a12.actions) : remove,
|
|
834
856
|
icon: /*#__PURE__*/React.createElement(DeleteIcon, {
|
|
835
857
|
label: ""
|
|
836
858
|
})
|
|
@@ -8,6 +8,7 @@ import { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messa
|
|
|
8
8
|
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
10
10
|
import LinkExternalIcon from '@atlaskit/icon/core/link-external';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { hideLinkingToolbar, setUrlToMedia, showLinkingToolbar, unlink } from '../../pm-plugins/commands/linking';
|
|
12
13
|
import { getMediaLinkingState } from '../../pm-plugins/linking';
|
|
13
14
|
import { currentMediaInlineNode, currentMediaNode } from '../../pm-plugins/utils/current-media-node';
|
|
@@ -128,7 +129,7 @@ export var getLinkingDropdownOptions = function getLinkingDropdownOptions(editor
|
|
|
128
129
|
return true;
|
|
129
130
|
},
|
|
130
131
|
icon: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
131
|
-
label: title
|
|
132
|
+
label: fg('platform_editor_controls_patch_7') ? '' : title
|
|
132
133
|
})
|
|
133
134
|
}];
|
|
134
135
|
} else {
|
|
@@ -23,7 +23,7 @@ import { currentMediaOrInlineNodeBorderMark } from '../../pm-plugins/utils/curre
|
|
|
23
23
|
import { isImage } from '../../pm-plugins/utils/is-type';
|
|
24
24
|
import ImageBorderItem from '../../ui/ImageBorder';
|
|
25
25
|
import { altTextButton } from './alt-text';
|
|
26
|
-
import { changeInlineToMediaCard, changeMediaInlineToMediaSingle, removeInlineCard, setBorderMark, toggleBorderMark } from './commands';
|
|
26
|
+
import { changeInlineToMediaCard, changeMediaInlineToMediaSingle, removeInlineCard, removeInlineCardWithAnalytics, setBorderMark, toggleBorderMark } from './commands';
|
|
27
27
|
import { shouldShowImageBorder } from './imageBorder';
|
|
28
28
|
import { getOpenLinkToolbarButtonOption, shouldShowMediaLinkToolbar } from './linking';
|
|
29
29
|
import { LinkToolbarAppearance } from './linking-toolbar-appearance';
|
|
@@ -127,7 +127,7 @@ export var generateMediaInlineFloatingToolbar = function generateMediaInlineFloa
|
|
|
127
127
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
128
128
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
129
129
|
title: intl.formatMessage(commonMessages.remove),
|
|
130
|
-
onClick: removeInlineCard,
|
|
130
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeInlineCardWithAnalytics(editorAnalyticsAPI) : removeInlineCard,
|
|
131
131
|
testId: 'media-toolbar-remove-button'
|
|
132
132
|
});
|
|
133
133
|
} else {
|
|
@@ -323,7 +323,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
323
323
|
icon: /*#__PURE__*/React.createElement(ImageInlineIcon, {
|
|
324
324
|
color: "currentColor",
|
|
325
325
|
spacing: "spacious",
|
|
326
|
-
label: mediaInlineImageTitle,
|
|
326
|
+
label: fg('platform_editor_controls_patch_7') ? '' : mediaInlineImageTitle,
|
|
327
327
|
LEGACY_size: "medium",
|
|
328
328
|
LEGACY_fallbackIcon: IconInline
|
|
329
329
|
})
|
|
@@ -338,7 +338,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
338
338
|
}) : /*#__PURE__*/React.createElement(ImageFullscreenIcon, {
|
|
339
339
|
color: "currentColor",
|
|
340
340
|
spacing: "spacious",
|
|
341
|
-
label: mediaSingleTitle,
|
|
341
|
+
label: fg('platform_editor_controls_patch_7') ? '' : mediaSingleTitle,
|
|
342
342
|
LEGACY_size: "medium",
|
|
343
343
|
LEGACY_fallbackIcon: IconEmbed
|
|
344
344
|
})
|
|
@@ -440,7 +440,7 @@ var getMediaInlineImageToolbar = function getMediaInlineImageToolbar(state, intl
|
|
|
440
440
|
onFocus: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, true),
|
|
441
441
|
onBlur: hoverDecoration === null || hoverDecoration === void 0 ? void 0 : hoverDecoration(mediaInline, false),
|
|
442
442
|
title: intl.formatMessage(commonMessages.remove),
|
|
443
|
-
onClick: removeInlineCard,
|
|
443
|
+
onClick: fg('platform_editor_controls_patch_analytics_2') ? removeInlineCardWithAnalytics(editorAnalyticsAPI) : removeInlineCard,
|
|
444
444
|
testId: 'media-toolbar-remove-button'
|
|
445
445
|
});
|
|
446
446
|
}
|
|
@@ -11,6 +11,7 @@ export declare const getNodeType: (state: EditorState) => "mediaSingle" | "media
|
|
|
11
11
|
export declare const changeInlineToMediaCard: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, forceFocusSelector: ForceFocusSelector | undefined) => Command;
|
|
12
12
|
export declare const changeMediaCardToInline: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, forceFocusSelector: ForceFocusSelector | undefined) => Command;
|
|
13
13
|
export declare const changeMediaInlineToMediaSingle: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, widthPluginState: WidthPluginState | undefined, allowPixelResizing?: boolean) => Command;
|
|
14
|
+
export declare const removeInlineCardWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
14
15
|
export declare const removeInlineCard: Command;
|
|
15
16
|
export declare const toggleBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
16
17
|
export declare const setBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (attrs: Partial<BorderMarkAttributes>) => Command;
|
|
@@ -11,6 +11,7 @@ export declare const getNodeType: (state: EditorState) => "mediaSingle" | "media
|
|
|
11
11
|
export declare const changeInlineToMediaCard: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, forceFocusSelector: ForceFocusSelector | undefined) => Command;
|
|
12
12
|
export declare const changeMediaCardToInline: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, forceFocusSelector: ForceFocusSelector | undefined) => Command;
|
|
13
13
|
export declare const changeMediaInlineToMediaSingle: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, widthPluginState: WidthPluginState | undefined, allowPixelResizing?: boolean) => Command;
|
|
14
|
+
export declare const removeInlineCardWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
14
15
|
export declare const removeInlineCard: Command;
|
|
15
16
|
export declare const toggleBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
16
17
|
export declare const setBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (attrs: Partial<BorderMarkAttributes>) => Command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
39
39
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
40
40
|
"@atlaskit/button": "^23.0.0",
|
|
41
|
-
"@atlaskit/editor-common": "^
|
|
41
|
+
"@atlaskit/editor-common": "^104.0.0",
|
|
42
42
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
43
43
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
44
44
|
"@atlaskit/editor-plugin-annotation": "^2.7.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
47
47
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
48
48
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
|
|
49
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^4.
|
|
49
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^4.1.0",
|
|
50
50
|
"@atlaskit/editor-plugin-focus": "^1.5.0",
|
|
51
51
|
"@atlaskit/editor-plugin-grid": "^2.0.0",
|
|
52
52
|
"@atlaskit/editor-plugin-guideline": "^2.0.0",
|
|
@@ -59,18 +59,18 @@
|
|
|
59
59
|
"@atlaskit/form": "^12.0.0",
|
|
60
60
|
"@atlaskit/icon": "^25.6.0",
|
|
61
61
|
"@atlaskit/media-card": "^79.2.0",
|
|
62
|
-
"@atlaskit/media-client": "^
|
|
62
|
+
"@atlaskit/media-client": "^33.0.0",
|
|
63
63
|
"@atlaskit/media-client-react": "^4.0.0",
|
|
64
64
|
"@atlaskit/media-common": "^12.0.0",
|
|
65
|
-
"@atlaskit/media-filmstrip": "^
|
|
66
|
-
"@atlaskit/media-picker": "^
|
|
65
|
+
"@atlaskit/media-filmstrip": "^50.0.0",
|
|
66
|
+
"@atlaskit/media-picker": "^69.0.0",
|
|
67
67
|
"@atlaskit/media-ui": "^28.1.0",
|
|
68
68
|
"@atlaskit/media-viewer": "^52.0.0",
|
|
69
69
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
70
70
|
"@atlaskit/primitives": "^14.7.0",
|
|
71
71
|
"@atlaskit/textfield": "^8.0.0",
|
|
72
72
|
"@atlaskit/theme": "^18.0.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^4.16.0",
|
|
74
74
|
"@atlaskit/tokens": "^4.8.0",
|
|
75
75
|
"@atlaskit/tooltip": "^20.0.0",
|
|
76
76
|
"@babel/runtime": "^7.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"typescript": "~5.4.2"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
|
-
"@atlaskit/media-core": "^
|
|
88
|
+
"@atlaskit/media-core": "^36.0.0",
|
|
89
89
|
"react": "^18.2.0",
|
|
90
90
|
"react-dom": "^18.2.0",
|
|
91
91
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -192,6 +192,9 @@
|
|
|
192
192
|
},
|
|
193
193
|
"platform_editor_track_media_fail_to_insert": {
|
|
194
194
|
"type": "boolean"
|
|
195
|
+
},
|
|
196
|
+
"platform_editor_controls_patch_analytics_2": {
|
|
197
|
+
"type": "boolean"
|
|
195
198
|
}
|
|
196
199
|
},
|
|
197
200
|
"stricter": {
|