@atlaskit/editor-plugin-card 2.0.4 → 2.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 +18 -0
- package/dist/cjs/nodeviews/datasource.js +4 -2
- package/dist/cjs/pm-plugins/doc.js +2 -0
- package/dist/cjs/toolbar.js +3 -3
- package/dist/cjs/ui/AwarenessWrapper/index.js +3 -1
- package/dist/cjs/ui/DatasourceAppearanceButton.js +2 -0
- package/dist/cjs/ui/EditDatasourceButton.js +1 -0
- package/dist/cjs/ui/EditLinkToolbar.js +2 -1
- package/dist/cjs/ui/EditToolbarButton.js +2 -0
- package/dist/cjs/ui/HyperlinkToolbarAppearance.js +2 -1
- package/dist/cjs/ui/InlineCardOverlay/index.js +5 -0
- package/dist/cjs/ui/LayoutButton/index.js +3 -1
- package/dist/cjs/ui/LeftIconOverlay/ConfigureLinkDropdown/index.js +5 -5
- package/dist/cjs/ui/LeftIconOverlay/index.js +7 -1
- package/dist/cjs/ui/ResizableEmbedCard.js +3 -1
- package/dist/es2019/nodeviews/datasource.js +5 -1
- package/dist/es2019/pm-plugins/doc.js +2 -0
- package/dist/es2019/toolbar.js +3 -3
- package/dist/es2019/ui/AwarenessWrapper/index.js +3 -1
- package/dist/es2019/ui/DatasourceAppearanceButton.js +2 -0
- package/dist/es2019/ui/EditDatasourceButton.js +1 -0
- package/dist/es2019/ui/EditLinkToolbar.js +2 -1
- package/dist/es2019/ui/EditToolbarButton.js +2 -0
- package/dist/es2019/ui/HyperlinkToolbarAppearance.js +2 -1
- package/dist/es2019/ui/InlineCardOverlay/index.js +8 -0
- package/dist/es2019/ui/LayoutButton/index.js +4 -0
- package/dist/es2019/ui/LeftIconOverlay/ConfigureLinkDropdown/index.js +12 -12
- package/dist/es2019/ui/LeftIconOverlay/index.js +8 -1
- package/dist/es2019/ui/ResizableEmbedCard.js +4 -0
- package/dist/esm/nodeviews/datasource.js +5 -1
- package/dist/esm/pm-plugins/doc.js +2 -0
- package/dist/esm/toolbar.js +3 -3
- package/dist/esm/ui/AwarenessWrapper/index.js +3 -1
- package/dist/esm/ui/DatasourceAppearanceButton.js +2 -0
- package/dist/esm/ui/EditDatasourceButton.js +1 -0
- package/dist/esm/ui/EditLinkToolbar.js +2 -1
- package/dist/esm/ui/EditToolbarButton.js +2 -0
- package/dist/esm/ui/HyperlinkToolbarAppearance.js +2 -1
- package/dist/esm/ui/InlineCardOverlay/index.js +6 -0
- package/dist/esm/ui/LayoutButton/index.js +4 -0
- package/dist/esm/ui/LeftIconOverlay/ConfigureLinkDropdown/index.js +12 -12
- package/dist/esm/ui/LeftIconOverlay/index.js +8 -1
- package/dist/esm/ui/ResizableEmbedCard.js +4 -0
- package/dist/types/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +1 -1
- package/package.json +147 -147
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 2.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.0.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#110890](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110890)
|
|
14
|
+
[`a0ec52861fce2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a0ec52861fce2) -
|
|
15
|
+
[ux] Fixed a duplicate separator showing in the floating toolbar.
|
|
16
|
+
- [#110903](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/110903)
|
|
17
|
+
[`7fafce0ccd594`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7fafce0ccd594) -
|
|
18
|
+
[ux] Clicking edit link or edit datasource while in SLLV view will no longer trigger scrolling.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 2.0.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -29,7 +29,7 @@ var _EditorAnalyticsContext = require("../ui/EditorAnalyticsContext");
|
|
|
29
29
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
30
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
31
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
32
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
32
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
33
33
|
var getPosSafely = function getPosSafely(pos) {
|
|
34
34
|
if (!pos || typeof pos === 'boolean') {
|
|
35
35
|
return;
|
|
@@ -284,7 +284,9 @@ var Datasource = exports.Datasource = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
284
284
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
285
285
|
className: _styles.DATASOURCE_INNER_CONTAINER_CLASSNAME,
|
|
286
286
|
style: {
|
|
287
|
-
minWidth: this.isNodeNested ? '100%' :
|
|
287
|
+
minWidth: this.isNodeNested ? '100%' :
|
|
288
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
289
|
+
(0, _utils.calcBreakoutWidth)(attrs.layout || _linkingCommon.DATASOURCE_DEFAULT_LAYOUT, this.tableWidth)
|
|
288
290
|
}
|
|
289
291
|
}, (0, _react2.jsx)(DatasourceComponent, {
|
|
290
292
|
node: this.node,
|
|
@@ -622,6 +622,8 @@ var getStartingToolbarItems = exports.getStartingToolbarItems = function getStar
|
|
|
622
622
|
title: intl.formatMessage(_messages.linkToolbarMessages.editLink),
|
|
623
623
|
showTitle: true,
|
|
624
624
|
metadata: metadata
|
|
625
|
+
}, {
|
|
626
|
+
type: 'separator'
|
|
625
627
|
}];
|
|
626
628
|
return [{
|
|
627
629
|
type: 'custom',
|
package/dist/cjs/toolbar.js
CHANGED
|
@@ -236,7 +236,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
236
236
|
intl: intl,
|
|
237
237
|
editorAnalyticsApi: editorAnalyticsApi,
|
|
238
238
|
editorView: editorView,
|
|
239
|
-
onLinkEditClick: (0, _EditLinkToolbar.editLink)(editorAnalyticsApi)
|
|
239
|
+
onLinkEditClick: (0, _EditLinkToolbar.editLink)(editorAnalyticsApi, true)
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
}] : [{
|
|
@@ -247,7 +247,7 @@ var generateToolbarItems = function generateToolbarItems(state, intl, providerFa
|
|
|
247
247
|
title: intl.formatMessage(_messages.linkToolbarMessages.editLink),
|
|
248
248
|
showTitle: true,
|
|
249
249
|
testId: 'link-toolbar-edit-link-button',
|
|
250
|
-
onClick: (0, _EditLinkToolbar.editLink)(editorAnalyticsApi)
|
|
250
|
+
onClick: (0, _EditLinkToolbar.editLink)(editorAnalyticsApi, true)
|
|
251
251
|
}, {
|
|
252
252
|
type: 'separator'
|
|
253
253
|
}];
|
|
@@ -479,7 +479,7 @@ var getDatasourceButtonGroup = function getDatasourceButtonGroup(metadata, intl,
|
|
|
479
479
|
intl: intl,
|
|
480
480
|
editorAnalyticsApi: editorAnalyticsApi,
|
|
481
481
|
editorView: editorView,
|
|
482
|
-
onLinkEditClick: (0, _EditLinkToolbar.editLink)(editorAnalyticsApi)
|
|
482
|
+
onLinkEditClick: (0, _EditLinkToolbar.editLink)(editorAnalyticsApi, false)
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
});
|
|
@@ -18,10 +18,12 @@ var _LeftIconOverlay = _interopRequireDefault(require("../LeftIconOverlay"));
|
|
|
18
18
|
var _Pulse = require("../Pulse");
|
|
19
19
|
/** @jsx jsx */
|
|
20
20
|
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
|
+
|
|
21
23
|
// editor adds a standard line-height that is bigger than an inline smart link
|
|
22
24
|
// due to that the link has a bit of white space around it, which doesn't look right when there is pulse around it
|
|
23
25
|
var loaderWrapperStyles = (0, _react2.css)({
|
|
24
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
25
27
|
'.loader-wrapper': {
|
|
26
28
|
lineHeight: 'normal'
|
|
27
29
|
}
|
|
@@ -20,6 +20,8 @@ var _DatasourceIcon = require("./DatasourceIcon");
|
|
|
20
20
|
var _useFetchDatasourceInfo = require("./useFetchDatasourceInfo");
|
|
21
21
|
/** @jsx jsx */
|
|
22
22
|
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
24
|
+
|
|
23
25
|
var buttonStyles = (0, _react2.css)({
|
|
24
26
|
pointerEvents: 'auto'
|
|
25
27
|
});
|
|
@@ -13,6 +13,7 @@ var _utils = require("../utils");
|
|
|
13
13
|
var _CardContextProvider = require("./CardContextProvider");
|
|
14
14
|
var _useFetchDatasourceInfo = require("./useFetchDatasourceInfo");
|
|
15
15
|
/** @jsx jsx */
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
17
|
|
|
17
18
|
var buttonStyles = (0, _react.css)({
|
|
18
19
|
pointerEvents: 'auto'
|
|
@@ -133,7 +133,7 @@ var EditLinkToolbar = exports.EditLinkToolbar = /*#__PURE__*/function (_React$Co
|
|
|
133
133
|
}]);
|
|
134
134
|
return EditLinkToolbar;
|
|
135
135
|
}(_react.default.Component);
|
|
136
|
-
var editLink = exports.editLink = function editLink(editorAnalyticsApi) {
|
|
136
|
+
var editLink = exports.editLink = function editLink(editorAnalyticsApi, scrollIntoView) {
|
|
137
137
|
return function (state, dispatch) {
|
|
138
138
|
var type = 'hyperlink';
|
|
139
139
|
if (state.selection instanceof _state.NodeSelection) {
|
|
@@ -143,6 +143,7 @@ var editLink = exports.editLink = function editLink(editorAnalyticsApi) {
|
|
|
143
143
|
var tr = state.tr;
|
|
144
144
|
(0, _actions.showLinkToolbar)(tr);
|
|
145
145
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent((0, _analytics.buildEditLinkPayload)(type))(tr);
|
|
146
|
+
tr.setMeta('scrollIntoView', scrollIntoView);
|
|
146
147
|
dispatch(tr);
|
|
147
148
|
return true;
|
|
148
149
|
}
|
|
@@ -21,6 +21,8 @@ var _CardContextProvider = require("./CardContextProvider");
|
|
|
21
21
|
var _useFetchDatasourceInfo = require("./useFetchDatasourceInfo");
|
|
22
22
|
/** @jsx jsx */
|
|
23
23
|
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
|
+
|
|
24
26
|
var dropdownExpandContainer = (0, _react2.css)({
|
|
25
27
|
margin: "0px ".concat("var(--ds-space-negative-050, -4px)")
|
|
26
28
|
});
|
|
@@ -17,6 +17,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
20
|
+
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
21
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
22
|
var _primitives = require("@atlaskit/primitives");
|
|
22
23
|
var _DatasourceAppearanceButton = require("./DatasourceAppearanceButton");
|
|
@@ -183,7 +184,7 @@ var HyperlinkToolbarAppearance = exports.HyperlinkToolbarAppearance = /*#__PURE_
|
|
|
183
184
|
editorView: editorView,
|
|
184
185
|
editorAnalyticsApi: editorAnalyticsApi,
|
|
185
186
|
inputMethod: _analytics.INPUT_METHOD.FLOATING_TB
|
|
186
|
-
}));
|
|
187
|
+
}), /*#__PURE__*/_react.default.createElement(_ui.FloatingToolbarSeparator, null));
|
|
187
188
|
}
|
|
188
189
|
}]);
|
|
189
190
|
return HyperlinkToolbarAppearance;
|
|
@@ -24,6 +24,7 @@ var _active;
|
|
|
24
24
|
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
25
25
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
26
26
|
/** @jsx jsx */
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
27
28
|
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); }
|
|
28
29
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
29
30
|
var DEBOUNCE_IN_MS = 5;
|
|
@@ -43,9 +44,11 @@ var getGradientWithColor = function getGradientWithColor(color) {
|
|
|
43
44
|
var containerStyles = (0, _react2.css)({
|
|
44
45
|
position: 'relative',
|
|
45
46
|
lineHeight: 'normal',
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
46
48
|
':active': (_active = {}, (0, _defineProperty2.default)(_active, ".".concat(ICON_AND_LABEL_CLASSNAME), {
|
|
47
49
|
background: SMART_LINK_ACTIVE_COLOR
|
|
48
50
|
}), (0, _defineProperty2.default)(_active, ".".concat(OVERLAY_GRADIENT_CLASSNAME), {
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
49
52
|
background: getGradientWithColor(SMART_LINK_ACTIVE_COLOR)
|
|
50
53
|
}), _active)
|
|
51
54
|
});
|
|
@@ -72,6 +75,7 @@ var showOverlayStyles = (0, _react2.css)({
|
|
|
72
75
|
});
|
|
73
76
|
var iconStyles = (0, _react2.css)({
|
|
74
77
|
// Position icon in the middle
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
75
79
|
span: {
|
|
76
80
|
display: 'flex'
|
|
77
81
|
}
|
|
@@ -102,6 +106,7 @@ var overflowingContainerStyles = (0, _react2.css)({
|
|
|
102
106
|
var gradientStyles = (0, _react2.css)({
|
|
103
107
|
width: '2.5rem',
|
|
104
108
|
height: '100%',
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
105
110
|
background: getGradientWithColor(SMART_LINK_BACKGROUND_COLOR)
|
|
106
111
|
});
|
|
107
112
|
var InlineCardOverlay = function InlineCardOverlay(_ref) {
|
|
@@ -22,12 +22,14 @@ var _actions = require("../../pm-plugins/actions");
|
|
|
22
22
|
var _utils2 = require("../../utils");
|
|
23
23
|
var _utils3 = require("./utils");
|
|
24
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */
|
|
25
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var toolbarButtonWrapperStyles = (0, _react2.css)({
|
|
27
27
|
background: "".concat("var(--ds-background-neutral, ".concat(_colors.N20A, ")")),
|
|
28
28
|
color: "".concat("var(--ds-icon, ".concat(_colors.N300, ")")),
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
29
30
|
':hover': {
|
|
30
31
|
background: "".concat("var(--ds-background-neutral-hovered, ".concat(_colors.B300, ")")),
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
31
33
|
color: "var(--ds-icon, white)".concat(" !important")
|
|
32
34
|
}
|
|
33
35
|
});
|
|
@@ -29,7 +29,7 @@ var ConfigureLinkDropdown = function ConfigureLinkDropdown(props) {
|
|
|
29
29
|
var triggerRef = _ref.triggerRef,
|
|
30
30
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
31
|
return /*#__PURE__*/_react.default.createElement(_new.default, (0, _extends2.default)({}, props, {
|
|
32
|
-
spacing:
|
|
32
|
+
spacing: 'none',
|
|
33
33
|
ref: triggerRef
|
|
34
34
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
35
35
|
style: {
|
|
@@ -41,17 +41,17 @@ var ConfigureLinkDropdown = function ConfigureLinkDropdown(props) {
|
|
|
41
41
|
testId: "".concat(testId, "-icon")
|
|
42
42
|
})));
|
|
43
43
|
},
|
|
44
|
-
spacing:
|
|
45
|
-
placement:
|
|
44
|
+
spacing: 'compact',
|
|
45
|
+
placement: 'bottom-start'
|
|
46
46
|
}, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItemGroup, null, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
|
|
47
47
|
elemBefore: /*#__PURE__*/_react.default.createElement(_shortcut.default, {
|
|
48
48
|
label: goToLinkLabel,
|
|
49
|
-
size:
|
|
49
|
+
size: 'small'
|
|
50
50
|
})
|
|
51
51
|
}, goToLinkLabel), /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
|
|
52
52
|
elemBefore: /*#__PURE__*/_react.default.createElement(_preferences.default, {
|
|
53
53
|
label: configureLinkLabel,
|
|
54
|
-
size:
|
|
54
|
+
size: 'small'
|
|
55
55
|
})
|
|
56
56
|
}, configureLinkLabel)));
|
|
57
57
|
};
|
|
@@ -23,6 +23,7 @@ var _excluded = ["children", "isSelected", "isVisible", "testId"];
|
|
|
23
23
|
/* eslint-disable @atlaskit/design-system/no-nested-styles */
|
|
24
24
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
25
25
|
/** @jsx jsx */
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
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); }
|
|
27
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
29
|
var DEBOUNCE_IN_MS = 5;
|
|
@@ -55,12 +56,15 @@ var showOverlayStyles = (0, _react2.css)({
|
|
|
55
56
|
});
|
|
56
57
|
var iconStyles = (0, _react2.css)({
|
|
57
58
|
background: CONFIGURE_ICON_BACKGROUND_COLOR,
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
58
60
|
':hover': {
|
|
59
61
|
background: CONFIGURE_ICON_BACKGROUND_HOVERED_COLOR
|
|
60
62
|
},
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
61
64
|
':active': {
|
|
62
65
|
background: CONFIGURE_ICON_BACKGROUND_ACTIVE_COLOR
|
|
63
66
|
},
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
64
68
|
span: {
|
|
65
69
|
// If PreferencesIcon left as inline-block (default), height is incorrect and border radius is clipped when parent element
|
|
66
70
|
// uses 1lh height (rather than 100%)
|
|
@@ -179,7 +183,9 @@ var LeftIconOverlay = function LeftIconOverlay(_ref) {
|
|
|
179
183
|
tabIndex: -1,
|
|
180
184
|
"data-testid": testId
|
|
181
185
|
}, (0, _react2.jsx)("span", (0, _extends2.default)({}, tooltipProps, {
|
|
182
|
-
css: iconAndLabelStyles
|
|
186
|
+
css: iconAndLabelStyles
|
|
187
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
188
|
+
,
|
|
183
189
|
className: ICON_AND_LABEL_CLASSNAME
|
|
184
190
|
}), (0, _react2.jsx)("span", {
|
|
185
191
|
css: iconStyles
|
|
@@ -22,7 +22,7 @@ var _smartCard = require("@atlaskit/smart-card");
|
|
|
22
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
25
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
27
27
|
var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
28
28
|
(0, _inherits2.default)(ResizableEmbedCard, _React$Component);
|
|
@@ -366,9 +366,11 @@ var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Compone
|
|
|
366
366
|
return (0, _react2.jsx)("div", {
|
|
367
367
|
"data-testid": "resizable-embed-card-spacing"
|
|
368
368
|
}, (0, _react2.jsx)("div", {
|
|
369
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
369
370
|
css: (0, _ui.wrapperStyle)({
|
|
370
371
|
layout: layout,
|
|
371
372
|
isResized: !!pctWidth,
|
|
373
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
372
374
|
containerWidth: containerWidth || _editorSharedStyles.DEFAULT_EMBED_CARD_WIDTH,
|
|
373
375
|
fullWidthMode: fullWidthMode
|
|
374
376
|
})
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import React from 'react';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
6
|
import { jsx } from '@emotion/react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
@@ -232,7 +234,9 @@ export class Datasource extends ReactNodeView {
|
|
|
232
234
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
233
235
|
className: DATASOURCE_INNER_CONTAINER_CLASSNAME,
|
|
234
236
|
style: {
|
|
235
|
-
minWidth: this.isNodeNested ? '100%' :
|
|
237
|
+
minWidth: this.isNodeNested ? '100%' :
|
|
238
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
239
|
+
calcBreakoutWidth(attrs.layout || DATASOURCE_DEFAULT_LAYOUT, this.tableWidth)
|
|
236
240
|
}
|
|
237
241
|
}, jsx(DatasourceComponent, {
|
|
238
242
|
node: this.node,
|
package/dist/es2019/toolbar.js
CHANGED
|
@@ -229,7 +229,7 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkP
|
|
|
229
229
|
intl: intl,
|
|
230
230
|
editorAnalyticsApi: editorAnalyticsApi,
|
|
231
231
|
editorView: editorView,
|
|
232
|
-
onLinkEditClick: editLink(editorAnalyticsApi)
|
|
232
|
+
onLinkEditClick: editLink(editorAnalyticsApi, true)
|
|
233
233
|
})
|
|
234
234
|
}] : [{
|
|
235
235
|
id: 'editor.link.edit',
|
|
@@ -239,7 +239,7 @@ const generateToolbarItems = (state, intl, providerFactory, cardOptions, lpLinkP
|
|
|
239
239
|
title: intl.formatMessage(linkToolbarMessages.editLink),
|
|
240
240
|
showTitle: true,
|
|
241
241
|
testId: 'link-toolbar-edit-link-button',
|
|
242
|
-
onClick: editLink(editorAnalyticsApi)
|
|
242
|
+
onClick: editLink(editorAnalyticsApi, true)
|
|
243
243
|
}, {
|
|
244
244
|
type: 'separator'
|
|
245
245
|
}];
|
|
@@ -467,7 +467,7 @@ const getDatasourceButtonGroup = (metadata, intl, editorAnalyticsApi, node, hove
|
|
|
467
467
|
intl: intl,
|
|
468
468
|
editorAnalyticsApi: editorAnalyticsApi,
|
|
469
469
|
editorView: editorView,
|
|
470
|
-
onLinkEditClick: editLink(editorAnalyticsApi)
|
|
470
|
+
onLinkEditClick: editLink(editorAnalyticsApi, false)
|
|
471
471
|
})
|
|
472
472
|
});
|
|
473
473
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
5
|
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
5
7
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -12,7 +14,7 @@ import { DiscoveryPulse } from '../Pulse';
|
|
|
12
14
|
// editor adds a standard line-height that is bigger than an inline smart link
|
|
13
15
|
// due to that the link has a bit of white space around it, which doesn't look right when there is pulse around it
|
|
14
16
|
const loaderWrapperStyles = css({
|
|
15
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
17
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
16
18
|
'.loader-wrapper': {
|
|
17
19
|
lineHeight: 'normal'
|
|
18
20
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
5
|
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
7
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator, SmallerEditIcon } from '@atlaskit/editor-common/ui';
|
|
@@ -107,7 +107,7 @@ export class EditLinkToolbar extends React.Component {
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
export const editLink = editorAnalyticsApi => (state, dispatch) => {
|
|
110
|
+
export const editLink = (editorAnalyticsApi, scrollIntoView) => (state, dispatch) => {
|
|
111
111
|
let type = 'hyperlink';
|
|
112
112
|
if (state.selection instanceof NodeSelection) {
|
|
113
113
|
type = state.selection.node.type.name;
|
|
@@ -118,6 +118,7 @@ export const editLink = editorAnalyticsApi => (state, dispatch) => {
|
|
|
118
118
|
} = state;
|
|
119
119
|
showLinkToolbar(tr);
|
|
120
120
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent(buildEditLinkPayload(type))(tr);
|
|
121
|
+
tr.setMeta('scrollIntoView', scrollIntoView);
|
|
121
122
|
dispatch(tr);
|
|
122
123
|
return true;
|
|
123
124
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
5
|
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
7
|
import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
4
5
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { Flex } from '@atlaskit/primitives';
|
|
6
7
|
import { DatasourceAppearanceButton } from './DatasourceAppearanceButton';
|
|
@@ -98,6 +99,6 @@ export class HyperlinkToolbarAppearance extends Component {
|
|
|
98
99
|
editorView: editorView,
|
|
99
100
|
editorAnalyticsApi: editorAnalyticsApi,
|
|
100
101
|
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
101
|
-
}));
|
|
102
|
+
}), /*#__PURE__*/React.createElement(Separator, null));
|
|
102
103
|
}
|
|
103
104
|
}
|
|
@@ -3,6 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
8
|
import { css, jsx } from '@emotion/react';
|
|
7
9
|
import debounce from 'lodash/debounce';
|
|
8
10
|
import { useIntl } from 'react-intl-next';
|
|
@@ -28,11 +30,15 @@ const getGradientWithColor = color => {
|
|
|
28
30
|
const containerStyles = css({
|
|
29
31
|
position: 'relative',
|
|
30
32
|
lineHeight: 'normal',
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
31
34
|
':active': {
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
36
|
[`.${ICON_AND_LABEL_CLASSNAME}`]: {
|
|
33
37
|
background: SMART_LINK_ACTIVE_COLOR
|
|
34
38
|
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
35
40
|
[`.${OVERLAY_GRADIENT_CLASSNAME}`]: {
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
36
42
|
background: getGradientWithColor(SMART_LINK_ACTIVE_COLOR)
|
|
37
43
|
}
|
|
38
44
|
}
|
|
@@ -60,6 +66,7 @@ const showOverlayStyles = css({
|
|
|
60
66
|
});
|
|
61
67
|
const iconStyles = css({
|
|
62
68
|
// Position icon in the middle
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
63
70
|
span: {
|
|
64
71
|
display: 'flex'
|
|
65
72
|
}
|
|
@@ -90,6 +97,7 @@ const overflowingContainerStyles = css({
|
|
|
90
97
|
const gradientStyles = css({
|
|
91
98
|
width: '2.5rem',
|
|
92
99
|
height: '100%',
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
93
101
|
background: getGradientWithColor(SMART_LINK_BACKGROUND_COLOR)
|
|
94
102
|
});
|
|
95
103
|
const InlineCardOverlay = ({
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback, useMemo } from 'react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
5
|
import { css, jsx } from '@emotion/react';
|
|
4
6
|
import { injectIntl } from 'react-intl-next';
|
|
5
7
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
@@ -17,8 +19,10 @@ import { getDatasource, isDatasourceTableLayout } from './utils';
|
|
|
17
19
|
const toolbarButtonWrapperStyles = css({
|
|
18
20
|
background: `${`var(--ds-background-neutral, ${N20A})`}`,
|
|
19
21
|
color: `${`var(--ds-icon, ${N300})`}`,
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
20
23
|
':hover': {
|
|
21
24
|
background: `${`var(--ds-background-neutral-hovered, ${B300})`}`,
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
22
26
|
color: `${"var(--ds-icon, white)"} !important`
|
|
23
27
|
}
|
|
24
28
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { useIntl } from
|
|
4
|
-
import Button from
|
|
5
|
-
import DropdownMenu, { DropdownItem, DropdownItemGroup } from
|
|
6
|
-
import { cardMessages as messages } from
|
|
7
|
-
import ChevronDownIcon from
|
|
8
|
-
import PreferencesIcon from
|
|
9
|
-
import ShortcutIcon from
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import Button from '@atlaskit/button/new';
|
|
5
|
+
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
6
|
+
import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
|
+
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
8
|
+
import PreferencesIcon from '@atlaskit/icon/glyph/preferences';
|
|
9
|
+
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
10
10
|
const ConfigureLinkDropdown = props => {
|
|
11
11
|
const {
|
|
12
12
|
testId
|
|
@@ -19,7 +19,7 @@ const ConfigureLinkDropdown = props => {
|
|
|
19
19
|
triggerRef,
|
|
20
20
|
...props
|
|
21
21
|
}) => /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
22
|
-
spacing:
|
|
22
|
+
spacing: 'none',
|
|
23
23
|
ref: triggerRef
|
|
24
24
|
}), /*#__PURE__*/React.createElement("span", {
|
|
25
25
|
style: {
|
|
@@ -30,17 +30,17 @@ const ConfigureLinkDropdown = props => {
|
|
|
30
30
|
size: 'small',
|
|
31
31
|
testId: `${testId}-icon`
|
|
32
32
|
}))),
|
|
33
|
-
spacing:
|
|
34
|
-
placement:
|
|
33
|
+
spacing: 'compact',
|
|
34
|
+
placement: 'bottom-start'
|
|
35
35
|
}, /*#__PURE__*/React.createElement(DropdownItemGroup, null, /*#__PURE__*/React.createElement(DropdownItem, {
|
|
36
36
|
elemBefore: /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
37
37
|
label: goToLinkLabel,
|
|
38
|
-
size:
|
|
38
|
+
size: 'small'
|
|
39
39
|
})
|
|
40
40
|
}, goToLinkLabel), /*#__PURE__*/React.createElement(DropdownItem, {
|
|
41
41
|
elemBefore: /*#__PURE__*/React.createElement(PreferencesIcon, {
|
|
42
42
|
label: configureLinkLabel,
|
|
43
|
-
size:
|
|
43
|
+
size: 'small'
|
|
44
44
|
})
|
|
45
45
|
}, configureLinkLabel)));
|
|
46
46
|
};
|
|
@@ -3,6 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
8
|
import { css, jsx } from '@emotion/react';
|
|
7
9
|
import debounce from 'lodash/debounce';
|
|
8
10
|
import { useIntl } from 'react-intl-next';
|
|
@@ -42,12 +44,15 @@ const showOverlayStyles = css({
|
|
|
42
44
|
});
|
|
43
45
|
const iconStyles = css({
|
|
44
46
|
background: CONFIGURE_ICON_BACKGROUND_COLOR,
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
45
48
|
':hover': {
|
|
46
49
|
background: CONFIGURE_ICON_BACKGROUND_HOVERED_COLOR
|
|
47
50
|
},
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
48
52
|
':active': {
|
|
49
53
|
background: CONFIGURE_ICON_BACKGROUND_ACTIVE_COLOR
|
|
50
54
|
},
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
56
|
span: {
|
|
52
57
|
// If PreferencesIcon left as inline-block (default), height is incorrect and border radius is clipped when parent element
|
|
53
58
|
// uses 1lh height (rather than 100%)
|
|
@@ -157,7 +162,9 @@ const LeftIconOverlay = ({
|
|
|
157
162
|
tabIndex: -1,
|
|
158
163
|
"data-testid": testId
|
|
159
164
|
}, jsx("span", _extends({}, tooltipProps, {
|
|
160
|
-
css: iconAndLabelStyles
|
|
165
|
+
css: iconAndLabelStyles
|
|
166
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
167
|
+
,
|
|
161
168
|
className: ICON_AND_LABEL_CLASSNAME
|
|
162
169
|
}), jsx("span", {
|
|
163
170
|
css: iconStyles
|
|
@@ -2,6 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React from 'react';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
7
|
import { jsx } from '@emotion/react';
|
|
6
8
|
import { calcColumnsFromPx, calcMediaPxWidth, calcPctFromPx, calcPxFromColumns, handleSides, imageAlignmentMap, Resizer, snapTo, wrappedLayouts, wrapperStyle } from '@atlaskit/editor-common/ui';
|
|
7
9
|
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
@@ -341,9 +343,11 @@ export default class ResizableEmbedCard extends React.Component {
|
|
|
341
343
|
return jsx("div", {
|
|
342
344
|
"data-testid": "resizable-embed-card-spacing"
|
|
343
345
|
}, jsx("div", {
|
|
346
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
344
347
|
css: wrapperStyle({
|
|
345
348
|
layout,
|
|
346
349
|
isResized: !!pctWidth,
|
|
350
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
347
351
|
containerWidth: containerWidth || DEFAULT_EMBED_CARD_WIDTH,
|
|
348
352
|
fullWidthMode
|
|
349
353
|
})
|