@atlaskit/editor-plugin-paste-options-toolbar 7.0.5 → 7.0.6

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,12 @@
1
1
  # @atlaskit/editor-plugin-paste-options-toolbar
2
2
 
3
+ ## 7.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`840338033507a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/840338033507a) -
8
+ Migrating custom icons behind feature flag.
9
+
3
10
  ## 7.0.5
4
11
 
5
12
  ### Patch Changes
@@ -8,6 +8,8 @@ exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _icon = _interopRequireDefault(require("@atlaskit/icon"));
11
+ var _clipboard = _interopRequireDefault(require("@atlaskit/icon/core/clipboard"));
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
13
  //Using a custom icon for now since Design System Team is in the process of updating the icon set for project griffin.
12
14
 
13
15
  var CustomGlyph = function CustomGlyph(props) {
@@ -19,7 +21,9 @@ var CustomGlyph = function CustomGlyph(props) {
19
21
  xmlns: "http://www.w3.org/2000/svg"
20
22
  // Ignored via go/ees005
21
23
  // eslint-disable-next-line react/jsx-props-no-spreading
22
- }, props), /*#__PURE__*/_react.default.createElement("path", {
24
+ }, props, {
25
+ color: "orange"
26
+ }), /*#__PURE__*/_react.default.createElement("path", {
23
27
  fillRule: "evenodd",
24
28
  clipRule: "evenodd",
25
29
  d: "M14.8293 4C14.4175 2.83481 13.3062 2 12 2C10.6938 2 9.58254 2.83481 9.17071 4H9H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V6C20 4.89543 19.1046 4 18 4H15H14.8293ZM6 6H8V7C8 7.55228 8.44772 8 9 8H15C15.5523 8 16 7.55228 16 7V6H18V18H6V6ZM12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z",
@@ -44,9 +48,13 @@ var CustomGlyph = function CustomGlyph(props) {
44
48
  // Ignored via go/ees005
45
49
  // eslint-disable-next-line react/jsx-props-no-spreading
46
50
  var EditorPasteIcon = function EditorPasteIcon(props) {
47
- return /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({}, props, {
51
+ if ((0, _platformFeatureFlags.fg)('platform-custom-icon-migration')) {
52
+ // eslint-disable-next-line react/jsx-props-no-spreading
53
+ return /*#__PURE__*/_react.default.createElement(_clipboard.default, props);
54
+ }
55
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({}, props, {
48
56
  glyph: CustomGlyph
49
- }));
57
+ })));
50
58
  };
51
59
  EditorPasteIcon.displayName = 'EditorPasteIcon';
52
60
  var _default = exports.default = EditorPasteIcon;
@@ -3,6 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
 
4
4
  import React from 'react';
5
5
  import Icon from '@atlaskit/icon';
6
+ import ClipboardIcon from '@atlaskit/icon/core/clipboard';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
6
8
  const CustomGlyph = props => /*#__PURE__*/React.createElement("svg", _extends({
7
9
  width: "24",
8
10
  height: "24",
@@ -11,7 +13,9 @@ const CustomGlyph = props => /*#__PURE__*/React.createElement("svg", _extends({
11
13
  xmlns: "http://www.w3.org/2000/svg"
12
14
  // Ignored via go/ees005
13
15
  // eslint-disable-next-line react/jsx-props-no-spreading
14
- }, props), /*#__PURE__*/React.createElement("path", {
16
+ }, props, {
17
+ color: "orange"
18
+ }), /*#__PURE__*/React.createElement("path", {
15
19
  fillRule: "evenodd",
16
20
  clipRule: "evenodd",
17
21
  d: "M14.8293 4C14.4175 2.83481 13.3062 2 12 2C10.6938 2 9.58254 2.83481 9.17071 4H9H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V6C20 4.89543 19.1046 4 18 4H15H14.8293ZM6 6H8V7C8 7.55228 8.44772 8 9 8H15C15.5523 8 16 7.55228 16 7V6H18V18H6V6ZM12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z",
@@ -34,8 +38,14 @@ const CustomGlyph = props => /*#__PURE__*/React.createElement("svg", _extends({
34
38
 
35
39
  // Ignored via go/ees005
36
40
  // eslint-disable-next-line react/jsx-props-no-spreading
37
- const EditorPasteIcon = props => /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
38
- glyph: CustomGlyph
39
- }));
41
+ const EditorPasteIcon = props => {
42
+ if (fg('platform-custom-icon-migration')) {
43
+ // eslint-disable-next-line react/jsx-props-no-spreading
44
+ return /*#__PURE__*/React.createElement(ClipboardIcon, props);
45
+ }
46
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
47
+ glyph: CustomGlyph
48
+ })));
49
+ };
40
50
  EditorPasteIcon.displayName = 'EditorPasteIcon';
41
51
  export default EditorPasteIcon;
@@ -3,6 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
 
4
4
  import React from 'react';
5
5
  import Icon from '@atlaskit/icon';
6
+ import ClipboardIcon from '@atlaskit/icon/core/clipboard';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
6
8
  var CustomGlyph = function CustomGlyph(props) {
7
9
  return /*#__PURE__*/React.createElement("svg", _extends({
8
10
  width: "24",
@@ -12,7 +14,9 @@ var CustomGlyph = function CustomGlyph(props) {
12
14
  xmlns: "http://www.w3.org/2000/svg"
13
15
  // Ignored via go/ees005
14
16
  // eslint-disable-next-line react/jsx-props-no-spreading
15
- }, props), /*#__PURE__*/React.createElement("path", {
17
+ }, props, {
18
+ color: "orange"
19
+ }), /*#__PURE__*/React.createElement("path", {
16
20
  fillRule: "evenodd",
17
21
  clipRule: "evenodd",
18
22
  d: "M14.8293 4C14.4175 2.83481 13.3062 2 12 2C10.6938 2 9.58254 2.83481 9.17071 4H9H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V6C20 4.89543 19.1046 4 18 4H15H14.8293ZM6 6H8V7C8 7.55228 8.44772 8 9 8H15C15.5523 8 16 7.55228 16 7V6H18V18H6V6ZM12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z",
@@ -37,9 +41,13 @@ var CustomGlyph = function CustomGlyph(props) {
37
41
  // Ignored via go/ees005
38
42
  // eslint-disable-next-line react/jsx-props-no-spreading
39
43
  var EditorPasteIcon = function EditorPasteIcon(props) {
40
- return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
44
+ if (fg('platform-custom-icon-migration')) {
45
+ // eslint-disable-next-line react/jsx-props-no-spreading
46
+ return /*#__PURE__*/React.createElement(ClipboardIcon, props);
47
+ }
48
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
41
49
  glyph: CustomGlyph
42
- }));
50
+ })));
43
51
  };
44
52
  EditorPasteIcon.displayName = 'EditorPasteIcon';
45
53
  export default EditorPasteIcon;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { type IconProps } from '@atlaskit/icon';
2
+ import { type IconProps, type NewCoreIconProps } from '@atlaskit/icon';
3
3
  declare const EditorPasteIcon: {
4
- (props: IconProps): React.JSX.Element;
4
+ (props: Omit<IconProps, "size"> & Omit<NewCoreIconProps, "size">): React.JSX.Element;
5
5
  displayName: string;
6
6
  };
7
7
  export default EditorPasteIcon;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { type IconProps } from '@atlaskit/icon';
2
+ import { type IconProps, type NewCoreIconProps } from '@atlaskit/icon';
3
3
  declare const EditorPasteIcon: {
4
- (props: IconProps): React.JSX.Element;
4
+ (props: Omit<IconProps, "size"> & Omit<NewCoreIconProps, "size">): React.JSX.Element;
5
5
  displayName: string;
6
6
  };
7
7
  export default EditorPasteIcon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste-options-toolbar",
3
- "version": "7.0.5",
3
+ "version": "7.0.6",
4
4
  "description": "Paste options toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,12 +35,13 @@
35
35
  "@atlaskit/editor-prosemirror": "7.0.0",
36
36
  "@atlaskit/editor-shared-styles": "^3.10.0",
37
37
  "@atlaskit/icon": "^29.0.0",
38
+ "@atlaskit/platform-feature-flags": "^1.1.0",
38
39
  "@babel/runtime": "^7.0.0",
39
40
  "@emotion/react": "^11.7.1",
40
41
  "react-intl-next": "npm:react-intl@^5.18.1"
41
42
  },
42
43
  "peerDependencies": {
43
- "@atlaskit/editor-common": "^110.36.0",
44
+ "@atlaskit/editor-common": "^110.38.0",
44
45
  "react": "^18.2.0",
45
46
  "react-dom": "^18.2.0"
46
47
  },
@@ -88,5 +89,10 @@
88
89
  "stricter": [
89
90
  "@atlassian/tangerine/project-structure"
90
91
  ]
92
+ },
93
+ "platform-feature-flags": {
94
+ "platform-custom-icon-migration": {
95
+ "type": "boolean"
96
+ }
91
97
  }
92
98
  }