@atlaskit/editor-plugin-card 5.4.20 → 5.4.21
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 +9 -0
- package/dist/cjs/ui/DatasourceIcon/index.js +2 -8
- package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +2 -5
- package/dist/cjs/ui/EditToolbarButton/index.js +2 -5
- package/dist/cjs/ui/InlineCardOverlay/index.js +1 -7
- package/dist/cjs/ui/LayoutButton/index.js +5 -14
- package/dist/es2019/ui/DatasourceIcon/index.js +2 -8
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -4
- package/dist/es2019/ui/EditToolbarButton/index.js +1 -4
- package/dist/es2019/ui/InlineCardOverlay/index.js +1 -7
- package/dist/es2019/ui/LayoutButton/index.js +5 -14
- package/dist/esm/ui/DatasourceIcon/index.js +2 -8
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -4
- package/dist/esm/ui/EditToolbarButton/index.js +1 -4
- package/dist/esm/ui/InlineCardOverlay/index.js +1 -7
- package/dist/esm/ui/LayoutButton/index.js +5 -14
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 5.4.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#146194](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/146194)
|
|
8
|
+
[`dc301c3dad7a8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dc301c3dad7a8) -
|
|
9
|
+
[ux] Feature gate cleanup: platform-editor-plugin-card-icon-migration
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 5.4.20
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -7,9 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.DatasourceIcon = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _icon = _interopRequireDefault(require("@atlaskit/icon"));
|
|
11
10
|
var _smartLinkList = _interopRequireDefault(require("@atlaskit/icon/core/smart-link-list"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
11
|
var _primitives = require("@atlaskit/primitives");
|
|
14
12
|
var IconDatasourceGlyph = function IconDatasourceGlyph(props) {
|
|
15
13
|
return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
|
|
@@ -37,12 +35,8 @@ var wrapperStyles = (0, _primitives.xcss)({
|
|
|
37
35
|
var DatasourceIcon = exports.DatasourceIcon = function DatasourceIcon(props) {
|
|
38
36
|
return /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
|
|
39
37
|
xcss: wrapperStyles
|
|
40
|
-
},
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(_smartLinkList.default, {
|
|
41
39
|
LEGACY_fallbackIcon: IconDatasourceGlyph,
|
|
42
40
|
label: props === null || props === void 0 ? void 0 : props.label
|
|
43
|
-
})
|
|
44
|
-
glyph: IconDatasourceGlyph
|
|
45
|
-
// Ignored via go/ees005
|
|
46
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
47
|
-
}, props)));
|
|
41
|
+
}));
|
|
48
42
|
};
|
|
@@ -13,8 +13,7 @@ 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 _edit = _interopRequireDefault(require("@atlaskit/icon/core/edit"));
|
|
16
|
-
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/
|
|
17
|
-
var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
16
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
18
17
|
var _menu = require("@atlaskit/menu");
|
|
19
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
@@ -103,9 +102,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
103
102
|
testId: "edit-dropdown-trigger",
|
|
104
103
|
iconAfter: (0, _react2.jsx)("span", {
|
|
105
104
|
css: dropdownExpandContainer
|
|
106
|
-
}, (0,
|
|
107
|
-
label: intl.formatMessage(_messages.cardMessages.editDropdownTriggerTitle)
|
|
108
|
-
}) : (0, _react2.jsx)(_chevronDown.default, {
|
|
105
|
+
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
109
106
|
label: intl.formatMessage(_messages.cardMessages.editDropdownTriggerTitle)
|
|
110
107
|
})),
|
|
111
108
|
onClick: toggleOpen,
|
|
@@ -13,8 +13,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
13
13
|
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
|
-
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/
|
|
17
|
-
var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
16
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
18
17
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
19
18
|
var _menu = require("@atlaskit/menu");
|
|
20
19
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -129,9 +128,7 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
129
128
|
testId: "edit-dropdown-trigger",
|
|
130
129
|
iconAfter: (0, _react2.jsx)("span", {
|
|
131
130
|
css: dropdownExpandContainer
|
|
132
|
-
}, (0,
|
|
133
|
-
label: intl.formatMessage(_messages.cardMessages.editDropdownTriggerTitle)
|
|
134
|
-
}) : (0, _react2.jsx)(_chevronDown.default, {
|
|
131
|
+
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
135
132
|
label: intl.formatMessage(_messages.cardMessages.editDropdownTriggerTitle)
|
|
136
133
|
})),
|
|
137
134
|
onClick: toggleOpen,
|
|
@@ -17,8 +17,6 @@ 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
19
|
var _customizePreferences = _interopRequireDefault(require("@atlaskit/icon/core/migration/customize--preferences"));
|
|
20
|
-
var _preferences = _interopRequireDefault(require("@atlaskit/icon/glyph/preferences"));
|
|
21
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
20
|
var _colors = require("@atlaskit/theme/colors");
|
|
23
21
|
var _utils = require("./utils");
|
|
24
22
|
var _excluded = ["children", "isSelected", "isVisible", "testId", "url"];
|
|
@@ -260,14 +258,10 @@ var InlineCardOverlay = function InlineCardOverlay(_ref) {
|
|
|
260
258
|
className: ICON_AND_LABEL_CLASSNAME
|
|
261
259
|
}, (0, _react2.jsx)("span", {
|
|
262
260
|
css: iconStyles
|
|
263
|
-
}, (0,
|
|
261
|
+
}, (0, _react2.jsx)(_customizePreferences.default, {
|
|
264
262
|
label: label,
|
|
265
263
|
LEGACY_size: iconSize.current,
|
|
266
264
|
testId: "".concat(testId, "-icon")
|
|
267
|
-
}) : (0, _react2.jsx)(_preferences.default, {
|
|
268
|
-
label: label,
|
|
269
|
-
size: iconSize.current,
|
|
270
|
-
testId: "".concat(testId, "-icon")
|
|
271
265
|
})), showLabel && (0, _react2.jsx)("span", {
|
|
272
266
|
css: labelStyles
|
|
273
267
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -15,10 +15,7 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
|
15
15
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
16
|
var _growHorizontalEditorExpand = _interopRequireDefault(require("@atlaskit/icon/core/migration/grow-horizontal--editor-expand"));
|
|
17
17
|
var _shrinkHorizontalEditorCollapse = _interopRequireDefault(require("@atlaskit/icon/core/migration/shrink-horizontal--editor-collapse"));
|
|
18
|
-
var _collapse = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/collapse"));
|
|
19
|
-
var _expand = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/expand"));
|
|
20
18
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
21
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
19
|
var _colors = require("@atlaskit/theme/colors");
|
|
23
20
|
var _actions = require("../../pm-plugins/actions");
|
|
24
21
|
var _utils2 = require("../../pm-plugins/utils");
|
|
@@ -58,16 +55,6 @@ var LayoutButton = exports.LayoutButton = function LayoutButton(_ref) {
|
|
|
58
55
|
if (!targetElement) {
|
|
59
56
|
return null;
|
|
60
57
|
}
|
|
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
|
-
});
|
|
71
58
|
return (0, _react2.jsx)(_ui.Popup, {
|
|
72
59
|
mountTo: mountPoint,
|
|
73
60
|
boundariesElement: boundariesElement,
|
|
@@ -83,7 +70,11 @@ var LayoutButton = exports.LayoutButton = function LayoutButton(_ref) {
|
|
|
83
70
|
css: toolbarButtonWrapperStyles,
|
|
84
71
|
title: title,
|
|
85
72
|
onClick: handleClick,
|
|
86
|
-
iconBefore: layout === 'full-width' ?
|
|
73
|
+
iconBefore: layout === 'full-width' ? (0, _react2.jsx)(_shrinkHorizontalEditorCollapse.default, {
|
|
74
|
+
label: title
|
|
75
|
+
}) : (0, _react2.jsx)(_growHorizontalEditorExpand.default, {
|
|
76
|
+
label: title
|
|
77
|
+
})
|
|
87
78
|
}));
|
|
88
79
|
};
|
|
89
80
|
var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Icon from '@atlaskit/icon';
|
|
4
3
|
import SmartLinkListIcon from '@atlaskit/icon/core/smart-link-list';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
4
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
7
5
|
const IconDatasourceGlyph = props => {
|
|
8
6
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
@@ -30,12 +28,8 @@ const wrapperStyles = xcss({
|
|
|
30
28
|
export const DatasourceIcon = props => {
|
|
31
29
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
32
30
|
xcss: wrapperStyles
|
|
33
|
-
},
|
|
31
|
+
}, /*#__PURE__*/React.createElement(SmartLinkListIcon, {
|
|
34
32
|
LEGACY_fallbackIcon: IconDatasourceGlyph,
|
|
35
33
|
label: props === null || props === void 0 ? void 0 : props.label
|
|
36
|
-
})
|
|
37
|
-
glyph: IconDatasourceGlyph
|
|
38
|
-
// Ignored via go/ees005
|
|
39
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
40
|
-
}, props)));
|
|
34
|
+
}));
|
|
41
35
|
};
|
|
@@ -11,7 +11,6 @@ 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 EditIcon from '@atlaskit/icon/core/edit';
|
|
14
|
-
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
15
14
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
16
15
|
import { ButtonItem } from '@atlaskit/menu';
|
|
17
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -86,9 +85,7 @@ const EditToolbarButtonPresentation = ({
|
|
|
86
85
|
testId: "edit-dropdown-trigger",
|
|
87
86
|
iconAfter: jsx("span", {
|
|
88
87
|
css: dropdownExpandContainer
|
|
89
|
-
},
|
|
90
|
-
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
91
|
-
}) : jsx(ExpandIcon, {
|
|
88
|
+
}, jsx(ChevronDownIcon, {
|
|
92
89
|
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
93
90
|
})),
|
|
94
91
|
onClick: toggleOpen,
|
|
@@ -10,7 +10,6 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
10
10
|
import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
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
|
-
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
14
13
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
15
14
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
16
15
|
import { ButtonItem } from '@atlaskit/menu';
|
|
@@ -114,9 +113,7 @@ const EditToolbarButtonWithCardContext = props => {
|
|
|
114
113
|
testId: "edit-dropdown-trigger",
|
|
115
114
|
iconAfter: jsx("span", {
|
|
116
115
|
css: dropdownExpandContainer
|
|
117
|
-
},
|
|
118
|
-
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
119
|
-
}) : jsx(ExpandIcon, {
|
|
116
|
+
}, jsx(ChevronDownIcon, {
|
|
120
117
|
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
121
118
|
})),
|
|
122
119
|
onClick: toggleOpen,
|
|
@@ -14,8 +14,6 @@ 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
16
|
import CustomizeIcon from '@atlaskit/icon/core/migration/customize--preferences';
|
|
17
|
-
import PreferencesIcon from '@atlaskit/icon/glyph/preferences';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
17
|
import { B100, N0, N700 } from '@atlaskit/theme/colors';
|
|
20
18
|
import { getChildElement, getIconSize, getInlineCardAvailableWidth, getOverlayWidths, isOneLine } from './utils';
|
|
21
19
|
const DEBOUNCE_IN_MS = 5;
|
|
@@ -240,14 +238,10 @@ const InlineCardOverlay = ({
|
|
|
240
238
|
className: ICON_AND_LABEL_CLASSNAME
|
|
241
239
|
}, jsx("span", {
|
|
242
240
|
css: iconStyles
|
|
243
|
-
},
|
|
241
|
+
}, jsx(CustomizeIcon, {
|
|
244
242
|
label: label,
|
|
245
243
|
LEGACY_size: iconSize.current,
|
|
246
244
|
testId: `${testId}-icon`
|
|
247
|
-
}) : jsx(PreferencesIcon, {
|
|
248
|
-
label: label,
|
|
249
|
-
size: iconSize.current,
|
|
250
|
-
testId: `${testId}-icon`
|
|
251
245
|
})), showLabel && jsx("span", {
|
|
252
246
|
css: labelStyles
|
|
253
247
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -13,10 +13,7 @@ import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
|
13
13
|
import { getNextBreakoutMode, getTitle } from '@atlaskit/editor-common/utils';
|
|
14
14
|
import GrowHorizontalIcon from '@atlaskit/icon/core/migration/grow-horizontal--editor-expand';
|
|
15
15
|
import ShrinkHorizontalIcon from '@atlaskit/icon/core/migration/shrink-horizontal--editor-collapse';
|
|
16
|
-
import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
|
|
17
|
-
import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
18
16
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
17
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
21
18
|
import { setCardLayout } from '../../pm-plugins/actions';
|
|
22
19
|
import { isDatasourceNode } from '../../pm-plugins/utils';
|
|
@@ -52,16 +49,6 @@ export const LayoutButton = ({
|
|
|
52
49
|
if (!targetElement) {
|
|
53
50
|
return null;
|
|
54
51
|
}
|
|
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
|
-
});
|
|
65
52
|
return jsx(Popup, {
|
|
66
53
|
mountTo: mountPoint,
|
|
67
54
|
boundariesElement: boundariesElement,
|
|
@@ -77,7 +64,11 @@ export const LayoutButton = ({
|
|
|
77
64
|
css: toolbarButtonWrapperStyles,
|
|
78
65
|
title: title,
|
|
79
66
|
onClick: handleClick,
|
|
80
|
-
iconBefore: layout === 'full-width' ?
|
|
67
|
+
iconBefore: layout === 'full-width' ? jsx(ShrinkHorizontalIcon, {
|
|
68
|
+
label: title
|
|
69
|
+
}) : jsx(GrowHorizontalIcon, {
|
|
70
|
+
label: title
|
|
71
|
+
})
|
|
81
72
|
}));
|
|
82
73
|
};
|
|
83
74
|
const LayoutButtonWrapper = ({
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Icon from '@atlaskit/icon';
|
|
4
3
|
import SmartLinkListIcon from '@atlaskit/icon/core/smart-link-list';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
4
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
7
5
|
var IconDatasourceGlyph = function IconDatasourceGlyph(props) {
|
|
8
6
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
@@ -30,12 +28,8 @@ var wrapperStyles = xcss({
|
|
|
30
28
|
export var DatasourceIcon = function DatasourceIcon(props) {
|
|
31
29
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
32
30
|
xcss: wrapperStyles
|
|
33
|
-
},
|
|
31
|
+
}, /*#__PURE__*/React.createElement(SmartLinkListIcon, {
|
|
34
32
|
LEGACY_fallbackIcon: IconDatasourceGlyph,
|
|
35
33
|
label: props === null || props === void 0 ? void 0 : props.label
|
|
36
|
-
})
|
|
37
|
-
glyph: IconDatasourceGlyph
|
|
38
|
-
// Ignored via go/ees005
|
|
39
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
40
|
-
}, props)));
|
|
34
|
+
}));
|
|
41
35
|
};
|
|
@@ -12,7 +12,6 @@ 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 EditIcon from '@atlaskit/icon/core/edit';
|
|
15
|
-
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
16
15
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
17
16
|
import { ButtonItem } from '@atlaskit/menu';
|
|
18
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -95,9 +94,7 @@ var EditToolbarButtonPresentation = function EditToolbarButtonPresentation(_ref)
|
|
|
95
94
|
testId: "edit-dropdown-trigger",
|
|
96
95
|
iconAfter: jsx("span", {
|
|
97
96
|
css: dropdownExpandContainer
|
|
98
|
-
},
|
|
99
|
-
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
100
|
-
}) : jsx(ExpandIcon, {
|
|
97
|
+
}, jsx(ChevronDownIcon, {
|
|
101
98
|
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
102
99
|
})),
|
|
103
100
|
onClick: toggleOpen,
|
|
@@ -13,7 +13,6 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
13
13
|
import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
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
|
-
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
17
16
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
18
17
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
19
18
|
import { ButtonItem } from '@atlaskit/menu';
|
|
@@ -123,9 +122,7 @@ var EditToolbarButtonWithCardContext = function EditToolbarButtonWithCardContext
|
|
|
123
122
|
testId: "edit-dropdown-trigger",
|
|
124
123
|
iconAfter: jsx("span", {
|
|
125
124
|
css: dropdownExpandContainer
|
|
126
|
-
},
|
|
127
|
-
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
128
|
-
}) : jsx(ExpandIcon, {
|
|
125
|
+
}, jsx(ChevronDownIcon, {
|
|
129
126
|
label: intl.formatMessage(messages.editDropdownTriggerTitle)
|
|
130
127
|
})),
|
|
131
128
|
onClick: toggleOpen,
|
|
@@ -18,8 +18,6 @@ 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
20
|
import CustomizeIcon from '@atlaskit/icon/core/migration/customize--preferences';
|
|
21
|
-
import PreferencesIcon from '@atlaskit/icon/glyph/preferences';
|
|
22
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
21
|
import { B100, N0, N700 } from '@atlaskit/theme/colors';
|
|
24
22
|
import { getChildElement, getIconSize, getInlineCardAvailableWidth, getOverlayWidths, isOneLine } from './utils';
|
|
25
23
|
var DEBOUNCE_IN_MS = 5;
|
|
@@ -251,14 +249,10 @@ var InlineCardOverlay = function InlineCardOverlay(_ref) {
|
|
|
251
249
|
className: ICON_AND_LABEL_CLASSNAME
|
|
252
250
|
}, jsx("span", {
|
|
253
251
|
css: iconStyles
|
|
254
|
-
},
|
|
252
|
+
}, jsx(CustomizeIcon, {
|
|
255
253
|
label: label,
|
|
256
254
|
LEGACY_size: iconSize.current,
|
|
257
255
|
testId: "".concat(testId, "-icon")
|
|
258
|
-
}) : jsx(PreferencesIcon, {
|
|
259
|
-
label: label,
|
|
260
|
-
size: iconSize.current,
|
|
261
|
-
testId: "".concat(testId, "-icon")
|
|
262
256
|
})), showLabel && jsx("span", {
|
|
263
257
|
css: labelStyles
|
|
264
258
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -16,10 +16,7 @@ import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
|
16
16
|
import { getNextBreakoutMode, getTitle } from '@atlaskit/editor-common/utils';
|
|
17
17
|
import GrowHorizontalIcon from '@atlaskit/icon/core/migration/grow-horizontal--editor-expand';
|
|
18
18
|
import ShrinkHorizontalIcon from '@atlaskit/icon/core/migration/shrink-horizontal--editor-collapse';
|
|
19
|
-
import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
|
|
20
|
-
import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
21
19
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
22
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
20
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
24
21
|
import { setCardLayout } from '../../pm-plugins/actions';
|
|
25
22
|
import { isDatasourceNode } from '../../pm-plugins/utils';
|
|
@@ -54,16 +51,6 @@ export var LayoutButton = function LayoutButton(_ref) {
|
|
|
54
51
|
if (!targetElement) {
|
|
55
52
|
return null;
|
|
56
53
|
}
|
|
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
|
-
});
|
|
67
54
|
return jsx(Popup, {
|
|
68
55
|
mountTo: mountPoint,
|
|
69
56
|
boundariesElement: boundariesElement,
|
|
@@ -79,7 +66,11 @@ export var LayoutButton = function LayoutButton(_ref) {
|
|
|
79
66
|
css: toolbarButtonWrapperStyles,
|
|
80
67
|
title: title,
|
|
81
68
|
onClick: handleClick,
|
|
82
|
-
iconBefore: layout === 'full-width' ?
|
|
69
|
+
iconBefore: layout === 'full-width' ? jsx(ShrinkHorizontalIcon, {
|
|
70
|
+
label: title
|
|
71
|
+
}) : jsx(GrowHorizontalIcon, {
|
|
72
|
+
label: title
|
|
73
|
+
})
|
|
83
74
|
}));
|
|
84
75
|
};
|
|
85
76
|
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.4.
|
|
3
|
+
"version": "5.4.21",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
38
38
|
"@atlaskit/button": "^23.0.0",
|
|
39
39
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
40
|
-
"@atlaskit/editor-common": "^103.
|
|
40
|
+
"@atlaskit/editor-common": "^103.17.0",
|
|
41
41
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
42
42
|
"@atlaskit/editor-plugin-base": "^2.3.0",
|
|
43
43
|
"@atlaskit/editor-plugin-connectivity": "^2.0.0",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@atlaskit/icon": "^25.6.0",
|
|
55
55
|
"@atlaskit/link-analytics": "^9.1.0",
|
|
56
56
|
"@atlaskit/link-client-extension": "^4.0.0",
|
|
57
|
-
"@atlaskit/link-datasource": "^4.
|
|
57
|
+
"@atlaskit/link-datasource": "^4.8.0",
|
|
58
58
|
"@atlaskit/linking-common": "^8.0.0",
|
|
59
|
-
"@atlaskit/linking-types": "^9.
|
|
59
|
+
"@atlaskit/linking-types": "^9.10.0",
|
|
60
60
|
"@atlaskit/menu": "^3.2.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
62
62
|
"@atlaskit/primitives": "^14.4.0",
|
|
@@ -125,9 +125,6 @@
|
|
|
125
125
|
"platform_editor_fix_card_plugin_state": {
|
|
126
126
|
"type": "boolean"
|
|
127
127
|
},
|
|
128
|
-
"platform-editor-plugin-card-icon-migration": {
|
|
129
|
-
"type": "boolean"
|
|
130
|
-
},
|
|
131
128
|
"confluence-issue-terminology-refresh": {
|
|
132
129
|
"type": "boolean"
|
|
133
130
|
},
|