@atlaskit/editor-plugin-media-insert 23.1.0 → 23.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-media-insert
2
2
 
3
+ ## 23.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`09301dc1b0c55`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/09301dc1b0c55) -
8
+ [ux] Switches the order of the image generation tab in the media insert picker to the first
9
+ position and renames the tab to Create. All changes behind an experiment.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 23.1.0
4
16
 
5
17
  ### Minor Changes
@@ -142,11 +142,27 @@ var MediaInsertPicker = exports.MediaInsertPicker = function MediaInsertPicker(_
142
142
  id: "media-insert-tab-navigation"
143
143
  }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
144
144
  paddingBlockEnd: "space.150"
145
- }, /*#__PURE__*/_react.default.createElement(_tabs.TabList, null, !isOnlyExternalLinks && /*#__PURE__*/_react.default.createElement(_tabs.Tab, null, intl.formatMessage(_messages.mediaInsertMessages.fileTabTitle)), /*#__PURE__*/_react.default.createElement(_tabs.Tab, null, intl.formatMessage(_messages.mediaInsertMessages.linkTabTitle)), registeredTabs.map(function (tab) {
145
+ }, /*#__PURE__*/_react.default.createElement(_tabs.TabList, null, registeredTabs.map(function (tab) {
146
146
  return /*#__PURE__*/_react.default.createElement(_tabs.Tab, {
147
147
  key: tab.key
148
148
  }, tab.label);
149
- }))), !isOnlyExternalLinks && /*#__PURE__*/_react.default.createElement(CustomTabPanel, null, /*#__PURE__*/_react.default.createElement(_LocalMedia.LocalMedia, {
149
+ }), !isOnlyExternalLinks && /*#__PURE__*/_react.default.createElement(_tabs.Tab, null, intl.formatMessage(_messages.mediaInsertMessages.fileTabTitle)), /*#__PURE__*/_react.default.createElement(_tabs.Tab, null, intl.formatMessage(_messages.mediaInsertMessages.linkTabTitle)))), registeredTabs.map(function (_ref3) {
150
+ var key = _ref3.key,
151
+ TabComponent = _ref3.component;
152
+ return /*#__PURE__*/_react.default.createElement(CustomTabPanel, {
153
+ key: key
154
+ }, /*#__PURE__*/_react.default.createElement(TabComponent
155
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
156
+ , {
157
+ closeMediaInsertPicker: function closeMediaInsertPicker() {
158
+ _closeMediaInsertPicker();
159
+ focusEditor();
160
+ },
161
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
162
+ insertMediaSingle: insertMediaSingle,
163
+ mediaProvider: mediaProvider
164
+ }));
165
+ }), !isOnlyExternalLinks && /*#__PURE__*/_react.default.createElement(CustomTabPanel, null, /*#__PURE__*/_react.default.createElement(_LocalMedia.LocalMedia, {
150
166
  ref: autofocusRef,
151
167
  mediaProvider: mediaProvider
152
168
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
@@ -171,22 +187,6 @@ var MediaInsertPicker = exports.MediaInsertPicker = function MediaInsertPicker(_
171
187
  isOnlyExternalLinks: isOnlyExternalLinks,
172
188
  customizedUrlValidation: customizedUrlValidation,
173
189
  customizedHelperMessage: customizedHelperMessage
174
- })), registeredTabs.map(function (_ref3) {
175
- var key = _ref3.key,
176
- TabComponent = _ref3.component;
177
- return /*#__PURE__*/_react.default.createElement(CustomTabPanel, {
178
- key: key
179
- }, /*#__PURE__*/_react.default.createElement(TabComponent
180
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
181
- , {
182
- closeMediaInsertPicker: function closeMediaInsertPicker() {
183
- _closeMediaInsertPicker();
184
- focusEditor();
185
- },
186
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
187
- insertMediaSingle: insertMediaSingle,
188
- mediaProvider: mediaProvider
189
- }));
190
- })));
190
+ }))));
191
191
  }));
192
192
  };
@@ -133,9 +133,24 @@ export const MediaInsertPicker = ({
133
133
  id: "media-insert-tab-navigation"
134
134
  }, /*#__PURE__*/React.createElement(Box, {
135
135
  paddingBlockEnd: "space.150"
136
- }, /*#__PURE__*/React.createElement(TabList, null, !isOnlyExternalLinks && /*#__PURE__*/React.createElement(Tab, null, intl.formatMessage(mediaInsertMessages.fileTabTitle)), /*#__PURE__*/React.createElement(Tab, null, intl.formatMessage(mediaInsertMessages.linkTabTitle)), registeredTabs.map(tab => /*#__PURE__*/React.createElement(Tab, {
136
+ }, /*#__PURE__*/React.createElement(TabList, null, registeredTabs.map(tab => /*#__PURE__*/React.createElement(Tab, {
137
137
  key: tab.key
138
- }, tab.label)))), !isOnlyExternalLinks && /*#__PURE__*/React.createElement(CustomTabPanel, null, /*#__PURE__*/React.createElement(LocalMedia, {
138
+ }, tab.label)), !isOnlyExternalLinks && /*#__PURE__*/React.createElement(Tab, null, intl.formatMessage(mediaInsertMessages.fileTabTitle)), /*#__PURE__*/React.createElement(Tab, null, intl.formatMessage(mediaInsertMessages.linkTabTitle)))), registeredTabs.map(({
139
+ key,
140
+ component: TabComponent
141
+ }) => /*#__PURE__*/React.createElement(CustomTabPanel, {
142
+ key: key
143
+ }, /*#__PURE__*/React.createElement(TabComponent
144
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
145
+ , {
146
+ closeMediaInsertPicker: () => {
147
+ closeMediaInsertPicker();
148
+ focusEditor();
149
+ },
150
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
151
+ insertMediaSingle: insertMediaSingle,
152
+ mediaProvider: mediaProvider
153
+ }))), !isOnlyExternalLinks && /*#__PURE__*/React.createElement(CustomTabPanel, null, /*#__PURE__*/React.createElement(LocalMedia, {
139
154
  ref: autofocusRef,
140
155
  mediaProvider: mediaProvider
141
156
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
@@ -160,20 +175,5 @@ export const MediaInsertPicker = ({
160
175
  isOnlyExternalLinks: isOnlyExternalLinks,
161
176
  customizedUrlValidation: customizedUrlValidation,
162
177
  customizedHelperMessage: customizedHelperMessage
163
- })), registeredTabs.map(({
164
- key,
165
- component: TabComponent
166
- }) => /*#__PURE__*/React.createElement(CustomTabPanel, {
167
- key: key
168
- }, /*#__PURE__*/React.createElement(TabComponent
169
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
170
- , {
171
- closeMediaInsertPicker: () => {
172
- closeMediaInsertPicker();
173
- focusEditor();
174
- },
175
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
176
- insertMediaSingle: insertMediaSingle,
177
- mediaProvider: mediaProvider
178
- })))))));
178
+ }))))));
179
179
  };
@@ -133,11 +133,27 @@ export var MediaInsertPicker = function MediaInsertPicker(_ref2) {
133
133
  id: "media-insert-tab-navigation"
134
134
  }, /*#__PURE__*/React.createElement(Box, {
135
135
  paddingBlockEnd: "space.150"
136
- }, /*#__PURE__*/React.createElement(TabList, null, !isOnlyExternalLinks && /*#__PURE__*/React.createElement(Tab, null, intl.formatMessage(mediaInsertMessages.fileTabTitle)), /*#__PURE__*/React.createElement(Tab, null, intl.formatMessage(mediaInsertMessages.linkTabTitle)), registeredTabs.map(function (tab) {
136
+ }, /*#__PURE__*/React.createElement(TabList, null, registeredTabs.map(function (tab) {
137
137
  return /*#__PURE__*/React.createElement(Tab, {
138
138
  key: tab.key
139
139
  }, tab.label);
140
- }))), !isOnlyExternalLinks && /*#__PURE__*/React.createElement(CustomTabPanel, null, /*#__PURE__*/React.createElement(LocalMedia, {
140
+ }), !isOnlyExternalLinks && /*#__PURE__*/React.createElement(Tab, null, intl.formatMessage(mediaInsertMessages.fileTabTitle)), /*#__PURE__*/React.createElement(Tab, null, intl.formatMessage(mediaInsertMessages.linkTabTitle)))), registeredTabs.map(function (_ref3) {
141
+ var key = _ref3.key,
142
+ TabComponent = _ref3.component;
143
+ return /*#__PURE__*/React.createElement(CustomTabPanel, {
144
+ key: key
145
+ }, /*#__PURE__*/React.createElement(TabComponent
146
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
147
+ , {
148
+ closeMediaInsertPicker: function closeMediaInsertPicker() {
149
+ _closeMediaInsertPicker();
150
+ focusEditor();
151
+ },
152
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
153
+ insertMediaSingle: insertMediaSingle,
154
+ mediaProvider: mediaProvider
155
+ }));
156
+ }), !isOnlyExternalLinks && /*#__PURE__*/React.createElement(CustomTabPanel, null, /*#__PURE__*/React.createElement(LocalMedia, {
141
157
  ref: autofocusRef,
142
158
  mediaProvider: mediaProvider
143
159
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
@@ -162,22 +178,6 @@ export var MediaInsertPicker = function MediaInsertPicker(_ref2) {
162
178
  isOnlyExternalLinks: isOnlyExternalLinks,
163
179
  customizedUrlValidation: customizedUrlValidation,
164
180
  customizedHelperMessage: customizedHelperMessage
165
- })), registeredTabs.map(function (_ref3) {
166
- var key = _ref3.key,
167
- TabComponent = _ref3.component;
168
- return /*#__PURE__*/React.createElement(CustomTabPanel, {
169
- key: key
170
- }, /*#__PURE__*/React.createElement(TabComponent
171
- // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
172
- , {
173
- closeMediaInsertPicker: function closeMediaInsertPicker() {
174
- _closeMediaInsertPicker();
175
- focusEditor();
176
- },
177
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
178
- insertMediaSingle: insertMediaSingle,
179
- mediaProvider: mediaProvider
180
- }));
181
- })));
181
+ }))));
182
182
  }));
183
183
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media-insert",
3
- "version": "23.1.0",
3
+ "version": "23.2.0",
4
4
  "description": "Media Insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -24,7 +24,7 @@
24
24
  "@atlaskit/adf-schema": "^52.7.0",
25
25
  "@atlaskit/button": "^23.11.0",
26
26
  "@atlaskit/editor-plugin-analytics": "^10.0.0",
27
- "@atlaskit/editor-plugin-media": "^12.2.0",
27
+ "@atlaskit/editor-plugin-media": "^12.3.0",
28
28
  "@atlaskit/editor-prosemirror": "^7.3.0",
29
29
  "@atlaskit/editor-shared-styles": "^3.10.0",
30
30
  "@atlaskit/form": "^15.5.0",
@@ -41,7 +41,7 @@
41
41
  "@babel/runtime": "^7.0.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@atlaskit/editor-common": "^114.14.0",
44
+ "@atlaskit/editor-common": "^114.17.0",
45
45
  "@atlaskit/tokens": "^13.0.0",
46
46
  "react": "^18.2.0",
47
47
  "react-dom": "^18.2.0",