@atlaskit/editor-plugin-card 5.0.2 → 5.0.4
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 +18 -0
- package/dist/cjs/ui/DatasourceIcon/index.js +6 -1
- package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +5 -1
- package/dist/cjs/ui/EditToolbarButton/index.js +5 -1
- package/dist/cjs/ui/InlineCardOverlay/index.js +7 -1
- package/dist/cjs/ui/LayoutButton/index.js +14 -5
- package/dist/es2019/ui/DatasourceIcon/index.js +6 -1
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +5 -1
- package/dist/es2019/ui/EditToolbarButton/index.js +5 -1
- package/dist/es2019/ui/InlineCardOverlay/index.js +7 -1
- package/dist/es2019/ui/LayoutButton/index.js +14 -5
- package/dist/esm/ui/DatasourceIcon/index.js +6 -1
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +5 -1
- package/dist/esm/ui/EditToolbarButton/index.js +5 -1
- package/dist/esm/ui/InlineCardOverlay/index.js +7 -1
- package/dist/esm/ui/LayoutButton/index.js +14 -5
- package/package.json +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 5.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 5.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#118829](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/118829)
|
|
14
|
+
[`7c89303bd91d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7c89303bd91d3) -
|
|
15
|
+
[ux] Migrate to new ADS icon
|
|
16
|
+
- [#118799](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/118799)
|
|
17
|
+
[`11c8209cb910d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/11c8209cb910d) -
|
|
18
|
+
Fixes missing dependency declarations in package.json
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 5.0.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -8,6 +8,8 @@ exports.DatasourceIcon = 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 _smartLinkList = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-list"));
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
13
|
var _primitives = require("@atlaskit/primitives");
|
|
12
14
|
var IconDatasourceGlyph = function IconDatasourceGlyph(props) {
|
|
13
15
|
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
|
|
@@ -35,7 +37,10 @@ var wrapperStyles = (0, _primitives.xcss)({
|
|
|
35
37
|
var DatasourceIcon = exports.DatasourceIcon = function DatasourceIcon(props) {
|
|
36
38
|
return /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
|
|
37
39
|
xcss: wrapperStyles
|
|
38
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
40
|
+
}, (0, _platformFeatureFlags.fg)('platform-editor-plugin-card-icon-migration') ? /*#__PURE__*/_react.default.createElement(_smartLinkList.default, {
|
|
41
|
+
LEGACY_fallbackIcon: IconDatasourceGlyph,
|
|
42
|
+
label: props === null || props === void 0 ? void 0 : props.label
|
|
43
|
+
}) : /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({
|
|
39
44
|
glyph: IconDatasourceGlyph
|
|
40
45
|
// Ignored via go/ees005
|
|
41
46
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -13,7 +13,9 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
13
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
14
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
15
15
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
16
|
+
var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
16
17
|
var _menu = require("@atlaskit/menu");
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
19
|
var _primitives = require("@atlaskit/primitives");
|
|
18
20
|
var _utils = require("../../pm-plugins/utils");
|
|
19
21
|
var _editDatasourceAction = require("../editDatasourceAction");
|
|
@@ -95,7 +97,9 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
95
97
|
testId: "edit-dropdown-trigger",
|
|
96
98
|
iconAfter: (0, _react2.jsx)("span", {
|
|
97
99
|
css: dropdownExpandContainer
|
|
98
|
-
}, (0, _react2.jsx)(
|
|
100
|
+
}, (0, _platformFeatureFlags.fg)('platform-editor-plugin-card-icon-migration') ? (0, _react2.jsx)(_chevronDown2.default, {
|
|
101
|
+
label: intl.formatMessage(_messages.cardMessages.editDropdownTriggerTitle)
|
|
102
|
+
}) : (0, _react2.jsx)(_chevronDown.default, {
|
|
99
103
|
label: intl.formatMessage(_messages.cardMessages.editDropdownTriggerTitle)
|
|
100
104
|
})),
|
|
101
105
|
onClick: toggleOpen,
|
|
@@ -14,8 +14,10 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
14
14
|
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
|
+
var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
17
18
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
18
19
|
var _menu = require("@atlaskit/menu");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
21
|
var _primitives = require("@atlaskit/primitives");
|
|
20
22
|
var _utils = require("../../pm-plugins/utils");
|
|
21
23
|
var _editDatasourceAction = require("../editDatasourceAction");
|
|
@@ -126,7 +128,9 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
126
128
|
testId: "edit-dropdown-trigger",
|
|
127
129
|
iconAfter: (0, _react2.jsx)("span", {
|
|
128
130
|
css: dropdownExpandContainer
|
|
129
|
-
}, (0, _react2.jsx)(
|
|
131
|
+
}, (0, _platformFeatureFlags.fg)('platform-editor-plugin-card-icon-migration') ? (0, _react2.jsx)(_chevronDown2.default, {
|
|
132
|
+
label: intl.formatMessage(_messages.cardMessages.editDropdownTriggerTitle)
|
|
133
|
+
}) : (0, _react2.jsx)(_chevronDown.default, {
|
|
130
134
|
label: intl.formatMessage(_messages.cardMessages.editDropdownTriggerTitle)
|
|
131
135
|
})),
|
|
132
136
|
onClick: toggleOpen,
|
|
@@ -16,7 +16,9 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
18
18
|
var _whitespace = require("@atlaskit/editor-common/whitespace");
|
|
19
|
+
var _customizePreferences = _interopRequireDefault(require("@atlaskit/icon/core/migration/customize--preferences"));
|
|
19
20
|
var _preferences = _interopRequireDefault(require("@atlaskit/icon/glyph/preferences"));
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
23
|
var _utils = require("./utils");
|
|
22
24
|
var _excluded = ["children", "isSelected", "isVisible", "testId", "url"];
|
|
@@ -258,7 +260,11 @@ var InlineCardOverlay = function InlineCardOverlay(_ref) {
|
|
|
258
260
|
className: ICON_AND_LABEL_CLASSNAME
|
|
259
261
|
}, (0, _react2.jsx)("span", {
|
|
260
262
|
css: iconStyles
|
|
261
|
-
}, (0, _react2.jsx)(
|
|
263
|
+
}, (0, _platformFeatureFlags.fg)('platform-editor-plugin-card-icon-migration') ? (0, _react2.jsx)(_customizePreferences.default, {
|
|
264
|
+
label: label,
|
|
265
|
+
LEGACY_size: iconSize.current,
|
|
266
|
+
testId: "".concat(testId, "-icon")
|
|
267
|
+
}) : (0, _react2.jsx)(_preferences.default, {
|
|
262
268
|
label: label,
|
|
263
269
|
size: iconSize.current,
|
|
264
270
|
testId: "".concat(testId, "-icon")
|
|
@@ -13,9 +13,12 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
13
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
14
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
15
15
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
|
+
var _growHorizontalEditorExpand = _interopRequireDefault(require("@atlaskit/icon/core/migration/grow-horizontal--editor-expand"));
|
|
17
|
+
var _shrinkHorizontalEditorCollapse = _interopRequireDefault(require("@atlaskit/icon/core/migration/shrink-horizontal--editor-collapse"));
|
|
16
18
|
var _collapse = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/collapse"));
|
|
17
19
|
var _expand = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/expand"));
|
|
18
20
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
20
23
|
var _actions = require("../../pm-plugins/actions");
|
|
21
24
|
var _utils2 = require("../../pm-plugins/utils");
|
|
@@ -55,6 +58,16 @@ var LayoutButton = exports.LayoutButton = function LayoutButton(_ref) {
|
|
|
55
58
|
if (!targetElement) {
|
|
56
59
|
return null;
|
|
57
60
|
}
|
|
61
|
+
var collapseIcon = (0, _platformFeatureFlags.fg)('platform-editor-plugin-card-icon-migration') ? (0, _react2.jsx)(_shrinkHorizontalEditorCollapse.default, {
|
|
62
|
+
label: title
|
|
63
|
+
}) : (0, _react2.jsx)(_collapse.default, {
|
|
64
|
+
label: title
|
|
65
|
+
});
|
|
66
|
+
var expandIcon = (0, _platformFeatureFlags.fg)('platform-editor-plugin-card-icon-migration') ? (0, _react2.jsx)(_growHorizontalEditorExpand.default, {
|
|
67
|
+
label: title
|
|
68
|
+
}) : (0, _react2.jsx)(_expand.default, {
|
|
69
|
+
label: title
|
|
70
|
+
});
|
|
58
71
|
return (0, _react2.jsx)(_ui.Popup, {
|
|
59
72
|
mountTo: mountPoint,
|
|
60
73
|
boundariesElement: boundariesElement,
|
|
@@ -70,11 +83,7 @@ var LayoutButton = exports.LayoutButton = function LayoutButton(_ref) {
|
|
|
70
83
|
css: toolbarButtonWrapperStyles,
|
|
71
84
|
title: title,
|
|
72
85
|
onClick: handleClick,
|
|
73
|
-
iconBefore: layout === 'full-width' ?
|
|
74
|
-
label: title
|
|
75
|
-
}) : (0, _react2.jsx)(_expand.default, {
|
|
76
|
-
label: title
|
|
77
|
-
})
|
|
86
|
+
iconBefore: layout === 'full-width' ? collapseIcon : expandIcon
|
|
78
87
|
}));
|
|
79
88
|
};
|
|
80
89
|
var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Icon from '@atlaskit/icon';
|
|
4
|
+
import SmartLinkListIcon from '@atlaskit/icon/core/smart-link-list';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
6
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
5
7
|
const IconDatasourceGlyph = props => {
|
|
6
8
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
@@ -28,7 +30,10 @@ const wrapperStyles = xcss({
|
|
|
28
30
|
export const DatasourceIcon = props => {
|
|
29
31
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
30
32
|
xcss: wrapperStyles
|
|
31
|
-
}, /*#__PURE__*/React.createElement(
|
|
33
|
+
}, fg('platform-editor-plugin-card-icon-migration') ? /*#__PURE__*/React.createElement(SmartLinkListIcon, {
|
|
34
|
+
LEGACY_fallbackIcon: IconDatasourceGlyph,
|
|
35
|
+
label: props === null || props === void 0 ? void 0 : props.label
|
|
36
|
+
}) : /*#__PURE__*/React.createElement(Icon, _extends({
|
|
32
37
|
glyph: IconDatasourceGlyph
|
|
33
38
|
// Ignored via go/ees005
|
|
34
39
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -11,7 +11,9 @@ import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-
|
|
|
11
11
|
import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
13
13
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
14
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
14
15
|
import { ButtonItem } from '@atlaskit/menu';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
17
|
import { Flex } from '@atlaskit/primitives';
|
|
16
18
|
import { focusEditorView } from '../../pm-plugins/utils';
|
|
17
19
|
import { editDatasource } from '../editDatasourceAction';
|
|
@@ -78,7 +80,9 @@ const EditToolbarButtonPresentation = ({
|
|
|
78
80
|
testId: "edit-dropdown-trigger",
|
|
79
81
|
iconAfter: jsx("span", {
|
|
80
82
|
css: dropdownExpandContainer
|
|
81
|
-
}, jsx(
|
|
83
|
+
}, fg('platform-editor-plugin-card-icon-migration') ? jsx(ChevronDownIcon, {
|
|
84
|
+
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
85
|
+
}) : jsx(ExpandIcon, {
|
|
82
86
|
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
83
87
|
})),
|
|
84
88
|
onClick: toggleOpen,
|
|
@@ -11,8 +11,10 @@ import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-
|
|
|
11
11
|
import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
13
13
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
14
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
14
15
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
15
16
|
import { ButtonItem } from '@atlaskit/menu';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
18
|
import { Flex } from '@atlaskit/primitives';
|
|
17
19
|
import { focusEditorView, isDatasourceConfigEditable } from '../../pm-plugins/utils';
|
|
18
20
|
import { editDatasource } from '../editDatasourceAction';
|
|
@@ -111,7 +113,9 @@ const EditToolbarButtonWithCardContext = props => {
|
|
|
111
113
|
testId: "edit-dropdown-trigger",
|
|
112
114
|
iconAfter: jsx("span", {
|
|
113
115
|
css: dropdownExpandContainer
|
|
114
|
-
}, jsx(
|
|
116
|
+
}, fg('platform-editor-plugin-card-icon-migration') ? jsx(ChevronDownIcon, {
|
|
117
|
+
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
118
|
+
}) : jsx(ExpandIcon, {
|
|
115
119
|
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
116
120
|
})),
|
|
117
121
|
onClick: toggleOpen,
|
|
@@ -13,7 +13,9 @@ import debounce from 'lodash/debounce';
|
|
|
13
13
|
import { useIntl } from 'react-intl-next';
|
|
14
14
|
import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
15
15
|
import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/whitespace';
|
|
16
|
+
import CustomizeIcon from '@atlaskit/icon/core/migration/customize--preferences';
|
|
16
17
|
import PreferencesIcon from '@atlaskit/icon/glyph/preferences';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
19
|
import { B100, N0, N700 } from '@atlaskit/theme/colors';
|
|
18
20
|
import { getChildElement, getIconSize, getInlineCardAvailableWidth, getOverlayWidths, isOneLine } from './utils';
|
|
19
21
|
const DEBOUNCE_IN_MS = 5;
|
|
@@ -238,7 +240,11 @@ const InlineCardOverlay = ({
|
|
|
238
240
|
className: ICON_AND_LABEL_CLASSNAME
|
|
239
241
|
}, jsx("span", {
|
|
240
242
|
css: iconStyles
|
|
241
|
-
}, jsx(
|
|
243
|
+
}, fg('platform-editor-plugin-card-icon-migration') ? jsx(CustomizeIcon, {
|
|
244
|
+
label: label,
|
|
245
|
+
LEGACY_size: iconSize.current,
|
|
246
|
+
testId: `${testId}-icon`
|
|
247
|
+
}) : jsx(PreferencesIcon, {
|
|
242
248
|
label: label,
|
|
243
249
|
size: iconSize.current,
|
|
244
250
|
testId: `${testId}-icon`
|
|
@@ -11,9 +11,12 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
|
11
11
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
13
13
|
import { getNextBreakoutMode, getTitle } from '@atlaskit/editor-common/utils';
|
|
14
|
+
import GrowHorizontalIcon from '@atlaskit/icon/core/migration/grow-horizontal--editor-expand';
|
|
15
|
+
import ShrinkHorizontalIcon from '@atlaskit/icon/core/migration/shrink-horizontal--editor-collapse';
|
|
14
16
|
import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
|
|
15
17
|
import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
16
18
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
19
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
20
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
18
21
|
import { setCardLayout } from '../../pm-plugins/actions';
|
|
19
22
|
import { isDatasourceNode } from '../../pm-plugins/utils';
|
|
@@ -49,6 +52,16 @@ export const LayoutButton = ({
|
|
|
49
52
|
if (!targetElement) {
|
|
50
53
|
return null;
|
|
51
54
|
}
|
|
55
|
+
const collapseIcon = fg('platform-editor-plugin-card-icon-migration') ? jsx(ShrinkHorizontalIcon, {
|
|
56
|
+
label: title
|
|
57
|
+
}) : jsx(CollapseIcon, {
|
|
58
|
+
label: title
|
|
59
|
+
});
|
|
60
|
+
const expandIcon = fg('platform-editor-plugin-card-icon-migration') ? jsx(GrowHorizontalIcon, {
|
|
61
|
+
label: title
|
|
62
|
+
}) : jsx(ExpandIcon, {
|
|
63
|
+
label: title
|
|
64
|
+
});
|
|
52
65
|
return jsx(Popup, {
|
|
53
66
|
mountTo: mountPoint,
|
|
54
67
|
boundariesElement: boundariesElement,
|
|
@@ -64,11 +77,7 @@ export const LayoutButton = ({
|
|
|
64
77
|
css: toolbarButtonWrapperStyles,
|
|
65
78
|
title: title,
|
|
66
79
|
onClick: handleClick,
|
|
67
|
-
iconBefore: layout === 'full-width' ?
|
|
68
|
-
label: title
|
|
69
|
-
}) : jsx(ExpandIcon, {
|
|
70
|
-
label: title
|
|
71
|
-
})
|
|
80
|
+
iconBefore: layout === 'full-width' ? collapseIcon : expandIcon
|
|
72
81
|
}));
|
|
73
82
|
};
|
|
74
83
|
const LayoutButtonWrapper = ({
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Icon from '@atlaskit/icon';
|
|
4
|
+
import SmartLinkListIcon from '@atlaskit/icon/core/smart-link-list';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
6
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
5
7
|
var IconDatasourceGlyph = function IconDatasourceGlyph(props) {
|
|
6
8
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
@@ -28,7 +30,10 @@ var wrapperStyles = xcss({
|
|
|
28
30
|
export var DatasourceIcon = function DatasourceIcon(props) {
|
|
29
31
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
30
32
|
xcss: wrapperStyles
|
|
31
|
-
}, /*#__PURE__*/React.createElement(
|
|
33
|
+
}, fg('platform-editor-plugin-card-icon-migration') ? /*#__PURE__*/React.createElement(SmartLinkListIcon, {
|
|
34
|
+
LEGACY_fallbackIcon: IconDatasourceGlyph,
|
|
35
|
+
label: props === null || props === void 0 ? void 0 : props.label
|
|
36
|
+
}) : /*#__PURE__*/React.createElement(Icon, _extends({
|
|
32
37
|
glyph: IconDatasourceGlyph
|
|
33
38
|
// Ignored via go/ees005
|
|
34
39
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -12,7 +12,9 @@ import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-
|
|
|
12
12
|
import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
14
14
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
15
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
15
16
|
import { ButtonItem } from '@atlaskit/menu';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
18
|
import { Flex } from '@atlaskit/primitives';
|
|
17
19
|
import { focusEditorView } from '../../pm-plugins/utils';
|
|
18
20
|
import { editDatasource } from '../editDatasourceAction';
|
|
@@ -87,7 +89,9 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
87
89
|
testId: "edit-dropdown-trigger",
|
|
88
90
|
iconAfter: jsx("span", {
|
|
89
91
|
css: dropdownExpandContainer
|
|
90
|
-
}, jsx(
|
|
92
|
+
}, fg('platform-editor-plugin-card-icon-migration') ? jsx(ChevronDownIcon, {
|
|
93
|
+
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
94
|
+
}) : jsx(ExpandIcon, {
|
|
91
95
|
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
92
96
|
})),
|
|
93
97
|
onClick: toggleOpen,
|
|
@@ -14,8 +14,10 @@ import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-
|
|
|
14
14
|
import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
15
15
|
import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlaskit/editor-common/ui-menu';
|
|
16
16
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
17
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
17
18
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
18
19
|
import { ButtonItem } from '@atlaskit/menu';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
21
|
import { Flex } from '@atlaskit/primitives';
|
|
20
22
|
import { focusEditorView, isDatasourceConfigEditable } from '../../pm-plugins/utils';
|
|
21
23
|
import { editDatasource } from '../editDatasourceAction';
|
|
@@ -120,7 +122,9 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
120
122
|
testId: "edit-dropdown-trigger",
|
|
121
123
|
iconAfter: jsx("span", {
|
|
122
124
|
css: dropdownExpandContainer
|
|
123
|
-
}, jsx(
|
|
125
|
+
}, fg('platform-editor-plugin-card-icon-migration') ? jsx(ChevronDownIcon, {
|
|
126
|
+
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
127
|
+
}) : jsx(ExpandIcon, {
|
|
124
128
|
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
125
129
|
})),
|
|
126
130
|
onClick: toggleOpen,
|
|
@@ -17,7 +17,9 @@ import debounce from 'lodash/debounce';
|
|
|
17
17
|
import { useIntl } from 'react-intl-next';
|
|
18
18
|
import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
19
19
|
import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/whitespace';
|
|
20
|
+
import CustomizeIcon from '@atlaskit/icon/core/migration/customize--preferences';
|
|
20
21
|
import PreferencesIcon from '@atlaskit/icon/glyph/preferences';
|
|
22
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
23
|
import { B100, N0, N700 } from '@atlaskit/theme/colors';
|
|
22
24
|
import { getChildElement, getIconSize, getInlineCardAvailableWidth, getOverlayWidths, isOneLine } from './utils';
|
|
23
25
|
var DEBOUNCE_IN_MS = 5;
|
|
@@ -249,7 +251,11 @@ var InlineCardOverlay = function InlineCardOverlay(_ref) {
|
|
|
249
251
|
className: ICON_AND_LABEL_CLASSNAME
|
|
250
252
|
}, jsx("span", {
|
|
251
253
|
css: iconStyles
|
|
252
|
-
}, jsx(
|
|
254
|
+
}, fg('platform-editor-plugin-card-icon-migration') ? jsx(CustomizeIcon, {
|
|
255
|
+
label: label,
|
|
256
|
+
LEGACY_size: iconSize.current,
|
|
257
|
+
testId: "".concat(testId, "-icon")
|
|
258
|
+
}) : jsx(PreferencesIcon, {
|
|
253
259
|
label: label,
|
|
254
260
|
size: iconSize.current,
|
|
255
261
|
testId: "".concat(testId, "-icon")
|
|
@@ -14,9 +14,12 @@ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
|
14
14
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
15
15
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
16
16
|
import { getNextBreakoutMode, getTitle } from '@atlaskit/editor-common/utils';
|
|
17
|
+
import GrowHorizontalIcon from '@atlaskit/icon/core/migration/grow-horizontal--editor-expand';
|
|
18
|
+
import ShrinkHorizontalIcon from '@atlaskit/icon/core/migration/shrink-horizontal--editor-collapse';
|
|
17
19
|
import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
|
|
18
20
|
import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
19
21
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
22
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
23
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
21
24
|
import { setCardLayout } from '../../pm-plugins/actions';
|
|
22
25
|
import { isDatasourceNode } from '../../pm-plugins/utils';
|
|
@@ -51,6 +54,16 @@ export var LayoutButton = function LayoutButton(_ref) {
|
|
|
51
54
|
if (!targetElement) {
|
|
52
55
|
return null;
|
|
53
56
|
}
|
|
57
|
+
var collapseIcon = fg('platform-editor-plugin-card-icon-migration') ? jsx(ShrinkHorizontalIcon, {
|
|
58
|
+
label: title
|
|
59
|
+
}) : jsx(CollapseIcon, {
|
|
60
|
+
label: title
|
|
61
|
+
});
|
|
62
|
+
var expandIcon = fg('platform-editor-plugin-card-icon-migration') ? jsx(GrowHorizontalIcon, {
|
|
63
|
+
label: title
|
|
64
|
+
}) : jsx(ExpandIcon, {
|
|
65
|
+
label: title
|
|
66
|
+
});
|
|
54
67
|
return jsx(Popup, {
|
|
55
68
|
mountTo: mountPoint,
|
|
56
69
|
boundariesElement: boundariesElement,
|
|
@@ -66,11 +79,7 @@ export var LayoutButton = function LayoutButton(_ref) {
|
|
|
66
79
|
css: toolbarButtonWrapperStyles,
|
|
67
80
|
title: title,
|
|
68
81
|
onClick: handleClick,
|
|
69
|
-
iconBefore: layout === 'full-width' ?
|
|
70
|
-
label: title
|
|
71
|
-
}) : jsx(ExpandIcon, {
|
|
72
|
-
label: title
|
|
73
|
-
})
|
|
82
|
+
iconBefore: layout === 'full-width' ? collapseIcon : expandIcon
|
|
74
83
|
}));
|
|
75
84
|
};
|
|
76
85
|
var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,8 +33,9 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^47.2.1",
|
|
35
35
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
36
|
+
"@atlaskit/button": "^21.1.0",
|
|
36
37
|
"@atlaskit/custom-steps": "^0.10.0",
|
|
37
|
-
"@atlaskit/editor-common": "^100.
|
|
38
|
+
"@atlaskit/editor-common": "^100.3.0",
|
|
38
39
|
"@atlaskit/editor-plugin-analytics": "^2.0.0",
|
|
39
40
|
"@atlaskit/editor-plugin-base": "^2.2.0",
|
|
40
41
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -42,11 +43,11 @@
|
|
|
42
43
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
43
44
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
|
|
44
45
|
"@atlaskit/editor-plugin-feature-flags": "^1.3.0",
|
|
45
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^
|
|
46
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^3.0.0",
|
|
46
47
|
"@atlaskit/editor-plugin-grid": "^2.0.0",
|
|
47
48
|
"@atlaskit/editor-plugin-width": "^3.0.0",
|
|
48
49
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
49
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
50
|
+
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
50
51
|
"@atlaskit/frontend-utilities": "^3.0.0",
|
|
51
52
|
"@atlaskit/icon": "^24.1.0",
|
|
52
53
|
"@atlaskit/link-analytics": "^9.0.0",
|
|
@@ -57,9 +58,9 @@
|
|
|
57
58
|
"@atlaskit/menu": "3.1.0",
|
|
58
59
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
59
60
|
"@atlaskit/primitives": "^14.1.0",
|
|
60
|
-
"@atlaskit/smart-card": "^35.
|
|
61
|
+
"@atlaskit/smart-card": "^35.1.0",
|
|
61
62
|
"@atlaskit/theme": "^17.0.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^3.
|
|
63
|
+
"@atlaskit/tmp-editor-statsig": "^3.3.0",
|
|
63
64
|
"@atlaskit/tokens": "^4.2.0",
|
|
64
65
|
"@babel/runtime": "^7.0.0",
|
|
65
66
|
"@emotion/react": "^11.7.1",
|
|
@@ -136,6 +137,9 @@
|
|
|
136
137
|
},
|
|
137
138
|
"platform_fix_embedded_card_re-rendering": {
|
|
138
139
|
"type": "boolean"
|
|
140
|
+
},
|
|
141
|
+
"platform-editor-plugin-card-icon-migration": {
|
|
142
|
+
"type": "boolean"
|
|
139
143
|
}
|
|
140
144
|
},
|
|
141
145
|
"stricter": {
|