@atlaskit/editor-plugin-card 4.3.11 → 4.4.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,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 4.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#161054](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161054)
8
+ [`20f069140338e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/20f069140338e) -
9
+ Remove enable_datasource_nourl_edit_dropdown_datafetch FF
10
+
11
+ ## 4.4.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#159018](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159018)
16
+ [`14d5e189df870`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/14d5e189df870) -
17
+ [ux] ED-25367-remove-copy-button-from-view-mode-when-its-the-only-item
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 4.3.11
4
24
 
5
25
  ### Patch Changes
@@ -26,6 +26,7 @@ var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove
26
26
  var _settings2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/settings"));
27
27
  var _unlink = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/unlink"));
28
28
  var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
29
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
29
30
  var _doc = require("./pm-plugins/doc");
30
31
  var _main = require("./pm-plugins/main");
31
32
  var _DatasourceAppearanceButton = require("./ui/DatasourceAppearanceButton");
@@ -262,7 +263,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
262
263
  type: 'separator'
263
264
  }], (0, _toConsumableArray2.default)(getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi)), [{
264
265
  type: 'copy-button',
265
- supportsViewMode: true,
266
+ supportsViewMode: !(0, _platformFeatureFlags.fg)('platform_editor_remove_copy_button_from_view_mode'),
266
267
  items: [{
267
268
  state: state,
268
269
  formatMessage: intl.formatMessage,
@@ -15,7 +15,6 @@ var _ui = require("@atlaskit/editor-common/ui");
15
15
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
16
16
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
17
17
  var _menu = require("@atlaskit/menu");
18
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
18
  var _primitives = require("@atlaskit/primitives");
20
19
  var _utils = require("../../utils");
21
20
  var _CardContextProvider = require("../CardContextProvider");
@@ -253,30 +252,28 @@ var EditToolbarButton = exports.EditToolbarButton = function EditToolbarButton(p
253
252
  url = props.url;
254
253
  return (0, _react2.jsx)(_CardContextProvider.CardContextProvider, null, function (_ref) {
255
254
  var cardContext = _ref.cardContext;
256
- if ((0, _platformFeatureFlags.fg)('enable_datasource_nourl_edit_dropdown_datafetch')) {
257
- if (props.url) {
258
- return (0, _react2.jsx)(EditToolbarButtonWithUrl, {
259
- datasourceId: datasourceId,
260
- url: props.url,
261
- intl: intl,
262
- editorAnalyticsApi: editorAnalyticsApi,
263
- editorView: editorView,
264
- cardContext: cardContext,
265
- onLinkEditClick: onLinkEditClick,
266
- currentAppearance: currentAppearance
267
- });
268
- }
269
- if (props.datasourceId && props.node) {
270
- return (0, _react2.jsx)(EditToolbarButtonWithDatasourceId, {
271
- datasourceId: props.datasourceId,
272
- node: props.node,
273
- intl: intl,
274
- editorAnalyticsApi: editorAnalyticsApi,
275
- editorView: editorView,
276
- onLinkEditClick: onLinkEditClick,
277
- currentAppearance: currentAppearance
278
- });
279
- }
255
+ if (props.url) {
256
+ return (0, _react2.jsx)(EditToolbarButtonWithUrl, {
257
+ datasourceId: datasourceId,
258
+ url: props.url,
259
+ intl: intl,
260
+ editorAnalyticsApi: editorAnalyticsApi,
261
+ editorView: editorView,
262
+ cardContext: cardContext,
263
+ onLinkEditClick: onLinkEditClick,
264
+ currentAppearance: currentAppearance
265
+ });
266
+ }
267
+ if (props.datasourceId && props.node) {
268
+ return (0, _react2.jsx)(EditToolbarButtonWithDatasourceId, {
269
+ datasourceId: props.datasourceId,
270
+ node: props.node,
271
+ intl: intl,
272
+ editorAnalyticsApi: editorAnalyticsApi,
273
+ editorView: editorView,
274
+ onLinkEditClick: onLinkEditClick,
275
+ currentAppearance: currentAppearance
276
+ });
280
277
  }
281
278
  return (0, _react2.jsx)(EditToolbarButtonWithCardContext, {
282
279
  datasourceId: datasourceId,
@@ -16,6 +16,7 @@ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
16
16
  import CogIcon from '@atlaskit/icon/glyph/editor/settings';
17
17
  import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
18
18
  import OpenIcon from '@atlaskit/icon/glyph/shortcut';
19
+ import { fg } from '@atlaskit/platform-feature-flags';
19
20
  import { changeSelectedCardToText } from './pm-plugins/doc';
20
21
  import { pluginKey } from './pm-plugins/main';
21
22
  import { DatasourceAppearanceButton } from './ui/DatasourceAppearanceButton';
@@ -254,7 +255,7 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkP
254
255
  type: 'separator'
255
256
  }, ...getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi), {
256
257
  type: 'copy-button',
257
- supportsViewMode: true,
258
+ supportsViewMode: !fg('platform_editor_remove_copy_button_from_view_mode'),
258
259
  items: [{
259
260
  state,
260
261
  formatMessage: intl.formatMessage,
@@ -12,7 +12,6 @@ import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator
12
12
  import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
13
13
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
14
14
  import { ButtonItem } from '@atlaskit/menu';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { Flex } from '@atlaskit/primitives';
17
16
  import { focusEditorView, isDatasourceConfigEditable } from '../../utils';
18
17
  import { CardContextProvider } from '../CardContextProvider';
@@ -245,30 +244,28 @@ export const EditToolbarButton = props => {
245
244
  return jsx(CardContextProvider, null, ({
246
245
  cardContext
247
246
  }) => {
248
- if (fg('enable_datasource_nourl_edit_dropdown_datafetch')) {
249
- if (props.url) {
250
- return jsx(EditToolbarButtonWithUrl, {
251
- datasourceId: datasourceId,
252
- url: props.url,
253
- intl: intl,
254
- editorAnalyticsApi: editorAnalyticsApi,
255
- editorView: editorView,
256
- cardContext: cardContext,
257
- onLinkEditClick: onLinkEditClick,
258
- currentAppearance: currentAppearance
259
- });
260
- }
261
- if (props.datasourceId && props.node) {
262
- return jsx(EditToolbarButtonWithDatasourceId, {
263
- datasourceId: props.datasourceId,
264
- node: props.node,
265
- intl: intl,
266
- editorAnalyticsApi: editorAnalyticsApi,
267
- editorView: editorView,
268
- onLinkEditClick: onLinkEditClick,
269
- currentAppearance: currentAppearance
270
- });
271
- }
247
+ if (props.url) {
248
+ return jsx(EditToolbarButtonWithUrl, {
249
+ datasourceId: datasourceId,
250
+ url: props.url,
251
+ intl: intl,
252
+ editorAnalyticsApi: editorAnalyticsApi,
253
+ editorView: editorView,
254
+ cardContext: cardContext,
255
+ onLinkEditClick: onLinkEditClick,
256
+ currentAppearance: currentAppearance
257
+ });
258
+ }
259
+ if (props.datasourceId && props.node) {
260
+ return jsx(EditToolbarButtonWithDatasourceId, {
261
+ datasourceId: props.datasourceId,
262
+ node: props.node,
263
+ intl: intl,
264
+ editorAnalyticsApi: editorAnalyticsApi,
265
+ editorView: editorView,
266
+ onLinkEditClick: onLinkEditClick,
267
+ currentAppearance: currentAppearance
268
+ });
272
269
  }
273
270
  return jsx(EditToolbarButtonWithCardContext, {
274
271
  datasourceId: datasourceId,
@@ -20,6 +20,7 @@ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
20
20
  import CogIcon from '@atlaskit/icon/glyph/editor/settings';
21
21
  import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
22
22
  import OpenIcon from '@atlaskit/icon/glyph/shortcut';
23
+ import { fg } from '@atlaskit/platform-feature-flags';
23
24
  import { changeSelectedCardToText } from './pm-plugins/doc';
24
25
  import { pluginKey } from './pm-plugins/main';
25
26
  import { DatasourceAppearanceButton } from './ui/DatasourceAppearanceButton';
@@ -252,7 +253,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
252
253
  type: 'separator'
253
254
  }], _toConsumableArray(getUnlinkButtonGroup(state, intl, node, inlineCard, editorAnalyticsApi)), [{
254
255
  type: 'copy-button',
255
- supportsViewMode: true,
256
+ supportsViewMode: !fg('platform_editor_remove_copy_button_from_view_mode'),
256
257
  items: [{
257
258
  state: state,
258
259
  formatMessage: intl.formatMessage,
@@ -15,7 +15,6 @@ import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator
15
15
  import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
16
16
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
17
17
  import { ButtonItem } from '@atlaskit/menu';
18
- import { fg } from '@atlaskit/platform-feature-flags';
19
18
  import { Flex } from '@atlaskit/primitives';
20
19
  import { focusEditorView, isDatasourceConfigEditable } from '../../utils';
21
20
  import { CardContextProvider } from '../CardContextProvider';
@@ -247,30 +246,28 @@ export var EditToolbarButton = function EditToolbarButton(props) {
247
246
  url = props.url;
248
247
  return jsx(CardContextProvider, null, function (_ref) {
249
248
  var cardContext = _ref.cardContext;
250
- if (fg('enable_datasource_nourl_edit_dropdown_datafetch')) {
251
- if (props.url) {
252
- return jsx(EditToolbarButtonWithUrl, {
253
- datasourceId: datasourceId,
254
- url: props.url,
255
- intl: intl,
256
- editorAnalyticsApi: editorAnalyticsApi,
257
- editorView: editorView,
258
- cardContext: cardContext,
259
- onLinkEditClick: onLinkEditClick,
260
- currentAppearance: currentAppearance
261
- });
262
- }
263
- if (props.datasourceId && props.node) {
264
- return jsx(EditToolbarButtonWithDatasourceId, {
265
- datasourceId: props.datasourceId,
266
- node: props.node,
267
- intl: intl,
268
- editorAnalyticsApi: editorAnalyticsApi,
269
- editorView: editorView,
270
- onLinkEditClick: onLinkEditClick,
271
- currentAppearance: currentAppearance
272
- });
273
- }
249
+ if (props.url) {
250
+ return jsx(EditToolbarButtonWithUrl, {
251
+ datasourceId: datasourceId,
252
+ url: props.url,
253
+ intl: intl,
254
+ editorAnalyticsApi: editorAnalyticsApi,
255
+ editorView: editorView,
256
+ cardContext: cardContext,
257
+ onLinkEditClick: onLinkEditClick,
258
+ currentAppearance: currentAppearance
259
+ });
260
+ }
261
+ if (props.datasourceId && props.node) {
262
+ return jsx(EditToolbarButtonWithDatasourceId, {
263
+ datasourceId: props.datasourceId,
264
+ node: props.node,
265
+ intl: intl,
266
+ editorAnalyticsApi: editorAnalyticsApi,
267
+ editorView: editorView,
268
+ onLinkEditClick: onLinkEditClick,
269
+ currentAppearance: currentAppearance
270
+ });
274
271
  }
275
272
  return jsx(EditToolbarButtonWithCardContext, {
276
273
  datasourceId: datasourceId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "4.3.11",
3
+ "version": "4.4.1",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/adf-schema": "^44.2.0",
35
35
  "@atlaskit/analytics-next": "^10.1.0",
36
36
  "@atlaskit/custom-steps": "^0.8.0",
37
- "@atlaskit/editor-common": "^94.11.0",
37
+ "@atlaskit/editor-common": "^94.13.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
39
39
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
40
40
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
@@ -49,16 +49,16 @@
49
49
  "@atlaskit/icon": "^22.24.0",
50
50
  "@atlaskit/link-analytics": "^8.5.0",
51
51
  "@atlaskit/link-client-extension": "^2.4.0",
52
- "@atlaskit/link-datasource": "^3.7.0",
52
+ "@atlaskit/link-datasource": "^3.8.0",
53
53
  "@atlaskit/linking-common": "^6.0.0",
54
- "@atlaskit/linking-types": "^9.3.0",
54
+ "@atlaskit/linking-types": "^9.4.0",
55
55
  "@atlaskit/menu": "2.13.2",
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
57
  "@atlaskit/primitives": "^13.0.0",
58
58
  "@atlaskit/smart-card": "^30.2.0",
59
59
  "@atlaskit/theme": "^14.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^2.11.0",
61
- "@atlaskit/tokens": "^2.0.0",
60
+ "@atlaskit/tmp-editor-statsig": "^2.12.0",
61
+ "@atlaskit/tokens": "^2.2.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@emotion/react": "^11.7.1",
64
64
  "lodash": "^4.17.21",
@@ -108,9 +108,6 @@
108
108
  "type": "boolean",
109
109
  "referenceOnly": true
110
110
  },
111
- "enable_datasource_nourl_edit_dropdown_datafetch": {
112
- "type": "boolean"
113
- },
114
111
  "platform-datasources-enable-two-way-sync": {
115
112
  "type": "boolean"
116
113
  },
@@ -131,6 +128,9 @@
131
128
  },
132
129
  "platform_editor_ssr_fix_smartlinks": {
133
130
  "type": "boolean"
131
+ },
132
+ "platform_editor_remove_copy_button_from_view_mode": {
133
+ "type": "boolean"
134
134
  }
135
135
  },
136
136
  "stricter": {