@atlaskit/editor-plugin-card 0.8.7 → 0.9.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,11 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#40876](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/40876) [`c43a6a9cbd2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c43a6a9cbd2) - [ux] Adds copy button to datasource toolbar
8
+
3
9
  ## 0.8.7
4
10
 
5
11
  ### Patch Changes
@@ -232,7 +232,7 @@ var generateToolbarItems = function generateToolbarItems(state, featureFlags, in
232
232
  pluginInjectionApi: pluginInjectionApi
233
233
  })];
234
234
  } else if (shouldRenderDatasourceToolbar) {
235
- return getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, node.attrs.datasource.id);
235
+ return getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, node.attrs.datasource.id, state);
236
236
  } else {
237
237
  var inlineCard = state.schema.nodes.inlineCard;
238
238
  var toolbarItems = [{
@@ -361,7 +361,7 @@ var getSettingsButtonGroup = function getSettingsButtonGroup(state, featureFlags
361
361
  type: 'separator'
362
362
  }] : [];
363
363
  };
364
- var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId) {
364
+ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state) {
365
365
  var _node$attrs3;
366
366
  var toolbarItems = [{
367
367
  id: 'editor.edit.datasource',
@@ -388,6 +388,15 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
388
388
  }
389
389
  toolbarItems.push({
390
390
  type: 'separator'
391
+ }, {
392
+ type: 'copy-button',
393
+ items: [{
394
+ state: state,
395
+ formatMessage: intl.formatMessage,
396
+ nodeType: node.type
397
+ }, {
398
+ type: 'separator'
399
+ }]
391
400
  }, {
392
401
  id: 'editor.link.delete',
393
402
  focusEditoronEnter: true,
@@ -222,7 +222,7 @@ const generateToolbarItems = (state, featureFlags, intl, providerFactory, cardOp
222
222
  pluginInjectionApi
223
223
  })];
224
224
  } else if (shouldRenderDatasourceToolbar) {
225
- return getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, node.attrs.datasource.id);
225
+ return getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, node.attrs.datasource.id, state);
226
226
  } else {
227
227
  const {
228
228
  inlineCard
@@ -352,7 +352,7 @@ const getSettingsButtonGroup = (state, featureFlags, intl, editorAnalyticsApi) =
352
352
  type: 'separator'
353
353
  }] : [];
354
354
  };
355
- const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId) => {
355
+ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state) => {
356
356
  var _node$attrs3;
357
357
  const toolbarItems = [{
358
358
  id: 'editor.edit.datasource',
@@ -379,6 +379,15 @@ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hove
379
379
  }
380
380
  toolbarItems.push({
381
381
  type: 'separator'
382
+ }, {
383
+ type: 'copy-button',
384
+ items: [{
385
+ state,
386
+ formatMessage: intl.formatMessage,
387
+ nodeType: node.type
388
+ }, {
389
+ type: 'separator'
390
+ }]
382
391
  }, {
383
392
  id: 'editor.link.delete',
384
393
  focusEditoronEnter: true,
@@ -218,7 +218,7 @@ var generateToolbarItems = function generateToolbarItems(state, featureFlags, in
218
218
  pluginInjectionApi: pluginInjectionApi
219
219
  })];
220
220
  } else if (shouldRenderDatasourceToolbar) {
221
- return getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, node.attrs.datasource.id);
221
+ return getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, node.attrs.datasource.id, state);
222
222
  } else {
223
223
  var inlineCard = state.schema.nodes.inlineCard;
224
224
  var toolbarItems = [{
@@ -347,7 +347,7 @@ var getSettingsButtonGroup = function getSettingsButtonGroup(state, featureFlags
347
347
  type: 'separator'
348
348
  }] : [];
349
349
  };
350
- var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId) {
350
+ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl, editorAnalyticsApi, node, hoverDecoration, datasourceId, state) {
351
351
  var _node$attrs3;
352
352
  var toolbarItems = [{
353
353
  id: 'editor.edit.datasource',
@@ -374,6 +374,15 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
374
374
  }
375
375
  toolbarItems.push({
376
376
  type: 'separator'
377
+ }, {
378
+ type: 'copy-button',
379
+ items: [{
380
+ state: state,
381
+ formatMessage: intl.formatMessage,
382
+ nodeType: node.type
383
+ }, {
384
+ type: 'separator'
385
+ }]
377
386
  }, {
378
387
  id: 'editor.link.delete',
379
388
  focusEditoronEnter: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "0.8.7",
3
+ "version": "0.9.0",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/editor-shared-styles": "^2.8.0",
47
47
  "@atlaskit/icon": "^21.12.0",
48
48
  "@atlaskit/link-analytics": "^8.3.0",
49
- "@atlaskit/link-datasource": "^1.4.0",
49
+ "@atlaskit/link-datasource": "^1.5.0",
50
50
  "@atlaskit/platform-feature-flags": "^0.2.0",
51
51
  "@atlaskit/smart-card": "^26.31.0",
52
52
  "@atlaskit/theme": "^12.6.0",