@atlaskit/editor-plugin-expand 2.9.5 → 2.10.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-expand
2
2
 
3
+ ## 2.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#162141](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/162141)
8
+ [`e292090371d60`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e292090371d60) -
9
+ migrate expand chevron to new icon
10
+
11
+ ## 2.10.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
  ## 2.9.5
4
24
 
5
25
  ### Patch Changes
@@ -8,6 +8,7 @@ exports.getToolbarConfig = void 0;
8
8
  var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
9
9
  var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
10
10
  var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var _commands = require("./commands");
12
13
  var _pluginFactory = require("./pm-plugins/plugin-factory");
13
14
  var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(api) {
@@ -35,7 +36,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(api)
35
36
  offset: [0, 6],
36
37
  items: [{
37
38
  type: 'copy-button',
38
- supportsViewMode: true,
39
+ supportsViewMode: !(0, _platformFeatureFlags.fg)('platform_editor_remove_copy_button_from_view_mode'),
39
40
  items: [{
40
41
  state: state,
41
42
  formatMessage: formatMessage,
@@ -21,6 +21,7 @@ var _styles = require("@atlaskit/editor-common/styles");
21
21
  var _ui = require("@atlaskit/editor-common/ui");
22
22
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
23
23
  var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-right"));
24
+ var _chevronRight2 = _interopRequireDefault(require("@atlaskit/icon/utility/chevron-right"));
24
25
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
25
26
  var _excluded = ["buttonStyles"];
26
27
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -76,8 +77,9 @@ var CustomButton = exports.CustomButton = function CustomButton(props) {
76
77
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
77
78
  ,
78
79
  className: _styles.expandClassNames.iconContainer,
79
- iconBefore: (0, _react2.jsx)(_chevronRight.default, {
80
- label: ''
80
+ iconBefore: (0, _react2.jsx)(_chevronRight2.default, {
81
+ label: '',
82
+ LEGACY_fallbackIcon: _chevronRight.default
81
83
  }),
82
84
  shouldFitContainer: true,
83
85
  theme: useTheme,
@@ -9,6 +9,7 @@ var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages
9
9
  var _utils = require("@atlaskit/editor-prosemirror/utils");
10
10
  var _delete = _interopRequireDefault(require("@atlaskit/icon/core/delete"));
11
11
  var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _commands = require("./commands");
13
14
  var _utils2 = require("./utils");
14
15
  var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(api) {
@@ -32,7 +33,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(api)
32
33
  offset: [0, 6],
33
34
  items: [{
34
35
  type: 'copy-button',
35
- supportsViewMode: true,
36
+ supportsViewMode: !(0, _platformFeatureFlags.fg)('platform_editor_remove_copy_button_from_view_mode'),
36
37
  items: [{
37
38
  state: state,
38
39
  formatMessage: formatMessage,
@@ -16,6 +16,7 @@ var _styles = require("@atlaskit/editor-common/styles");
16
16
  var _ui = require("@atlaskit/editor-common/ui");
17
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
18
18
  var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-right"));
19
+ var _chevronRight2 = _interopRequireDefault(require("@atlaskit/icon/utility/chevron-right"));
19
20
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
20
21
  var _excluded = ["buttonStyles"];
21
22
  /**
@@ -56,8 +57,9 @@ var ExpandButtonInner = exports.ExpandButtonInner = function ExpandButtonInner(p
56
57
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
57
58
  ,
58
59
  className: _styles.expandClassNames.iconContainer,
59
- iconBefore: (0, _react2.jsx)(_chevronRight.default, {
60
- label: ''
60
+ iconBefore: (0, _react2.jsx)(_chevronRight2.default, {
61
+ label: '',
62
+ LEGACY_fallbackIcon: _chevronRight.default
61
63
  }),
62
64
  shouldFitContainer: true,
63
65
  theme: useTheme,
@@ -1,6 +1,7 @@
1
1
  import commonMessages from '@atlaskit/editor-common/messages';
2
2
  import DeleteIcon from '@atlaskit/icon/core/delete';
3
3
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { deleteExpand } from './commands';
5
6
  import { getPluginState } from './pm-plugins/plugin-factory';
6
7
  export const getToolbarConfig = api => (state, {
@@ -29,7 +30,7 @@ export const getToolbarConfig = api => (state, {
29
30
  offset: [0, 6],
30
31
  items: [{
31
32
  type: 'copy-button',
32
- supportsViewMode: true,
33
+ supportsViewMode: !fg('platform_editor_remove_copy_button_from_view_mode'),
33
34
  items: [{
34
35
  state,
35
36
  formatMessage,
@@ -11,7 +11,8 @@ import Button from '@atlaskit/button/custom-theme-button';
11
11
  import { expandClassNames } from '@atlaskit/editor-common/styles';
12
12
  import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
13
13
  import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
14
- import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
14
+ import { default as ChevronRightIconLegacy } from '@atlaskit/icon/glyph/chevron-right';
15
+ import ChevronRightIcon from '@atlaskit/icon/utility/chevron-right';
15
16
  import Tooltip from '@atlaskit/tooltip';
16
17
  export const withTooltip = WrapperComponent => {
17
18
  return class WithSortableColumn extends React.Component {
@@ -58,7 +59,8 @@ export const CustomButton = props => {
58
59
  ,
59
60
  className: expandClassNames.iconContainer,
60
61
  iconBefore: jsx(ChevronRightIcon, {
61
- label: ''
62
+ label: '',
63
+ LEGACY_fallbackIcon: ChevronRightIconLegacy
62
64
  }),
63
65
  shouldFitContainer: true,
64
66
  theme: useTheme,
@@ -2,6 +2,7 @@ import commonMessages from '@atlaskit/editor-common/messages';
2
2
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  import DeleteIcon from '@atlaskit/icon/core/delete';
4
4
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { deleteExpand } from './commands';
6
7
  import { findParentExpandNode } from './utils';
7
8
  export const getToolbarConfig = api => (state, {
@@ -25,7 +26,7 @@ export const getToolbarConfig = api => (state, {
25
26
  offset: [0, 6],
26
27
  items: [{
27
28
  type: 'copy-button',
28
- supportsViewMode: true,
29
+ supportsViewMode: !fg('platform_editor_remove_copy_button_from_view_mode'),
29
30
  items: [{
30
31
  state,
31
32
  formatMessage,
@@ -11,7 +11,8 @@ import Button from '@atlaskit/button/custom-theme-button';
11
11
  import { expandClassNames } from '@atlaskit/editor-common/styles';
12
12
  import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
13
13
  import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
14
- import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
14
+ import { default as ChevronRightIconLegacy } from '@atlaskit/icon/glyph/chevron-right';
15
+ import ChevronRightIcon from '@atlaskit/icon/utility/chevron-right';
15
16
  import Tooltip from '@atlaskit/tooltip';
16
17
  function withTooltip(Component) {
17
18
  return function WithTooltip(props) {
@@ -46,7 +47,8 @@ export const ExpandButtonInner = props => {
46
47
  ,
47
48
  className: expandClassNames.iconContainer,
48
49
  iconBefore: jsx(ChevronRightIcon, {
49
- label: ''
50
+ label: '',
51
+ LEGACY_fallbackIcon: ChevronRightIconLegacy
50
52
  }),
51
53
  shouldFitContainer: true,
52
54
  theme: useTheme,
@@ -1,6 +1,7 @@
1
1
  import commonMessages from '@atlaskit/editor-common/messages';
2
2
  import DeleteIcon from '@atlaskit/icon/core/delete';
3
3
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { deleteExpand } from './commands';
5
6
  import { getPluginState } from './pm-plugins/plugin-factory';
6
7
  export var getToolbarConfig = function getToolbarConfig(api) {
@@ -28,7 +29,7 @@ export var getToolbarConfig = function getToolbarConfig(api) {
28
29
  offset: [0, 6],
29
30
  items: [{
30
31
  type: 'copy-button',
31
- supportsViewMode: true,
32
+ supportsViewMode: !fg('platform_editor_remove_copy_button_from_view_mode'),
32
33
  items: [{
33
34
  state: state,
34
35
  formatMessage: formatMessage,
@@ -23,7 +23,8 @@ import Button from '@atlaskit/button/custom-theme-button';
23
23
  import { expandClassNames } from '@atlaskit/editor-common/styles';
24
24
  import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
25
25
  import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
26
- import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
26
+ import { default as ChevronRightIconLegacy } from '@atlaskit/icon/glyph/chevron-right';
27
+ import ChevronRightIcon from '@atlaskit/icon/utility/chevron-right';
27
28
  import Tooltip from '@atlaskit/tooltip';
28
29
  export var withTooltip = function withTooltip(WrapperComponent) {
29
30
  return /*#__PURE__*/function (_React$Component) {
@@ -70,7 +71,8 @@ export var CustomButton = function CustomButton(props) {
70
71
  ,
71
72
  className: expandClassNames.iconContainer,
72
73
  iconBefore: jsx(ChevronRightIcon, {
73
- label: ''
74
+ label: '',
75
+ LEGACY_fallbackIcon: ChevronRightIconLegacy
74
76
  }),
75
77
  shouldFitContainer: true,
76
78
  theme: useTheme,
@@ -2,6 +2,7 @@ import commonMessages from '@atlaskit/editor-common/messages';
2
2
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
3
3
  import DeleteIcon from '@atlaskit/icon/core/delete';
4
4
  import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { deleteExpand } from './commands';
6
7
  import { findParentExpandNode } from './utils';
7
8
  export var getToolbarConfig = function getToolbarConfig(api) {
@@ -25,7 +26,7 @@ export var getToolbarConfig = function getToolbarConfig(api) {
25
26
  offset: [0, 6],
26
27
  items: [{
27
28
  type: 'copy-button',
28
- supportsViewMode: true,
29
+ supportsViewMode: !fg('platform_editor_remove_copy_button_from_view_mode'),
29
30
  items: [{
30
31
  state: state,
31
32
  formatMessage: formatMessage,
@@ -16,7 +16,8 @@ import Button from '@atlaskit/button/custom-theme-button';
16
16
  import { expandClassNames } from '@atlaskit/editor-common/styles';
17
17
  import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
18
18
  import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
19
- import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
19
+ import { default as ChevronRightIconLegacy } from '@atlaskit/icon/glyph/chevron-right';
20
+ import ChevronRightIcon from '@atlaskit/icon/utility/chevron-right';
20
21
  import Tooltip from '@atlaskit/tooltip';
21
22
  function withTooltip(Component) {
22
23
  return function WithTooltip(props) {
@@ -48,7 +49,8 @@ export var ExpandButtonInner = function ExpandButtonInner(props) {
48
49
  ,
49
50
  className: expandClassNames.iconContainer,
50
51
  iconBefore: jsx(ChevronRightIcon, {
51
- label: ''
52
+ label: '',
53
+ LEGACY_fallbackIcon: ChevronRightIconLegacy
52
54
  }),
53
55
  shouldFitContainer: true,
54
56
  theme: useTheme,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "2.9.5",
3
+ "version": "2.10.1",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^44.2.0",
35
35
  "@atlaskit/button": "^20.3.0",
36
- "@atlaskit/editor-common": "^94.12.0",
36
+ "@atlaskit/editor-common": "^94.17.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
38
38
  "@atlaskit/editor-plugin-decorations": "^1.3.0",
39
39
  "@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
@@ -44,9 +44,9 @@
44
44
  "@atlaskit/editor-tables": "^2.8.0",
45
45
  "@atlaskit/icon": "^22.24.0",
46
46
  "@atlaskit/platform-feature-flags": "^0.3.0",
47
- "@atlaskit/tmp-editor-statsig": "^2.11.0",
48
- "@atlaskit/tokens": "^2.1.0",
49
- "@atlaskit/tooltip": "^18.8.0",
47
+ "@atlaskit/tmp-editor-statsig": "^2.12.0",
48
+ "@atlaskit/tokens": "^2.2.0",
49
+ "@atlaskit/tooltip": "^18.9.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
52
52
  "w3c-keyname": "^2.1.8"
@@ -60,7 +60,7 @@
60
60
  "@atlaskit/analytics-next": "^10.1.0",
61
61
  "@atlaskit/editor-plugin-content-insertion": "^1.9.0",
62
62
  "@atlaskit/editor-plugin-guideline": "^1.2.0",
63
- "@atlaskit/editor-plugin-quick-insert": "^1.6.0",
63
+ "@atlaskit/editor-plugin-quick-insert": "^1.7.0",
64
64
  "@atlaskit/editor-plugin-table": "^7.30.0",
65
65
  "@atlaskit/editor-plugin-type-ahead": "^1.10.0",
66
66
  "@atlaskit/editor-plugin-width": "^1.3.0",
@@ -119,6 +119,9 @@
119
119
  },
120
120
  "platform_editor_expand_auto_scroll": {
121
121
  "type": "boolean"
122
+ },
123
+ "platform_editor_remove_copy_button_from_view_mode": {
124
+ "type": "boolean"
122
125
  }
123
126
  }
124
127
  }