@atlaskit/renderer 114.11.1 → 114.12.0
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 +20 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/react/marks/alignment.js +3 -15
- package/dist/cjs/react/nodes/blockCard.js +24 -8
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +3 -10
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +8 -53
- package/dist/cjs/react/nodes/layoutColumn.js +3 -11
- package/dist/cjs/react/nodes/media/index.js +28 -58
- package/dist/cjs/react/nodes/panel.js +2 -26
- package/dist/cjs/react/nodes/table/colgroup.js +5 -2
- package/dist/cjs/react/nodes/table/sticky.js +3 -57
- package/dist/cjs/react/nodes/table/table.js +6 -1
- package/dist/cjs/react/nodes/table.js +51 -23
- package/dist/cjs/react/nodes/tableNew.js +550 -0
- package/dist/cjs/ui/Expand.js +12 -62
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +19 -42
- package/dist/cjs/ui/Renderer/breakout-ssr.js +22 -22
- package/dist/cjs/ui/Renderer/index.js +4 -2
- package/dist/cjs/ui/Renderer/style.js +2 -208
- package/dist/cjs/ui/annotations/draft/component.js +2 -17
- package/dist/cjs/ui/annotations/element/mark.js +12 -61
- package/dist/es2019/react/marks/alignment.js +2 -17
- package/dist/es2019/react/nodes/blockCard.js +24 -8
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +2 -39
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +5 -50
- package/dist/es2019/react/nodes/layoutColumn.js +4 -12
- package/dist/es2019/react/nodes/media/index.js +3 -36
- package/dist/es2019/react/nodes/panel.js +2 -41
- package/dist/es2019/react/nodes/table/colgroup.js +5 -2
- package/dist/es2019/react/nodes/table/sticky.js +3 -70
- package/dist/es2019/react/nodes/table/table.js +6 -1
- package/dist/es2019/react/nodes/table.js +50 -22
- package/dist/es2019/react/nodes/tableNew.js +501 -0
- package/dist/es2019/ui/Expand.js +11 -67
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +20 -43
- package/dist/es2019/ui/Renderer/breakout-ssr.js +22 -22
- package/dist/es2019/ui/Renderer/index.js +4 -2
- package/dist/es2019/ui/Renderer/style.js +1 -889
- package/dist/es2019/ui/annotations/draft/component.js +2 -15
- package/dist/es2019/ui/annotations/element/mark.js +9 -71
- package/dist/esm/react/marks/alignment.js +2 -16
- package/dist/esm/react/nodes/blockCard.js +24 -8
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +2 -11
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -52
- package/dist/esm/react/nodes/layoutColumn.js +4 -12
- package/dist/esm/react/nodes/media/index.js +28 -58
- package/dist/esm/react/nodes/panel.js +3 -27
- package/dist/esm/react/nodes/table/colgroup.js +5 -2
- package/dist/esm/react/nodes/table/sticky.js +3 -57
- package/dist/esm/react/nodes/table/table.js +6 -1
- package/dist/esm/react/nodes/table.js +51 -21
- package/dist/esm/react/nodes/tableNew.js +544 -0
- package/dist/esm/ui/Expand.js +12 -62
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +20 -43
- package/dist/esm/ui/Renderer/breakout-ssr.js +22 -22
- package/dist/esm/ui/Renderer/index.js +4 -2
- package/dist/esm/ui/Renderer/style.js +1 -203
- package/dist/esm/ui/annotations/draft/component.js +2 -17
- package/dist/esm/ui/annotations/element/mark.js +9 -56
- package/dist/types/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +1 -1
- package/dist/types/react/nodes/table.d.ts +35 -254
- package/dist/types/react/nodes/tableNew.d.ts +83 -0
- package/dist/types/ui/Renderer/breakout-ssr.d.ts +1 -2
- package/dist/types/ui/Renderer/style.d.ts +0 -11
- package/dist/types/ui/annotations/element/mark.d.ts +30 -6
- package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/table.d.ts +35 -254
- package/dist/types-ts4.5/react/nodes/tableNew.d.ts +83 -0
- package/dist/types-ts4.5/ui/Renderer/breakout-ssr.d.ts +1 -2
- package/dist/types-ts4.5/ui/Renderer/style.d.ts +0 -11
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +30 -6
- package/package.json +14 -7
|
@@ -14,10 +14,8 @@ var _context = require("../context");
|
|
|
14
14
|
var _text = require("./text");
|
|
15
15
|
var _position = require("./position");
|
|
16
16
|
var _dom = require("./dom");
|
|
17
|
-
var _styles = require("@atlaskit/editor-common/styles");
|
|
18
17
|
var _segmentText = require("../../../react/utils/segment-text");
|
|
19
18
|
var _renderTextSegments = require("../../../react/utils/render-text-segments");
|
|
20
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
19
|
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); }
|
|
22
20
|
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 && {}.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; }
|
|
23
21
|
/**
|
|
@@ -27,21 +25,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
27
25
|
|
|
28
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
29
27
|
|
|
30
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
31
|
-
var markStyles = function markStyles() {
|
|
32
|
-
return (0, _react2.css)({
|
|
33
|
-
color: 'inherit',
|
|
34
|
-
backgroundColor: 'unset',
|
|
35
|
-
WebkitTapHighlightColor: 'transparent'
|
|
36
|
-
},
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
38
|
-
(0, _styles.AnnotationSharedCSSByState)().common,
|
|
39
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
40
|
-
(0, _styles.AnnotationSharedCSSByState)().focus);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
28
|
// Localized AnnotationSharedCSSByState().common and AnnotationSharedCSSByState().focus
|
|
44
|
-
var
|
|
29
|
+
var markStyles = (0, _react2.css)({
|
|
45
30
|
color: 'inherit',
|
|
46
31
|
backgroundColor: 'unset',
|
|
47
32
|
WebkitTapHighlightColor: 'transparent',
|
|
@@ -68,7 +53,7 @@ var AnnotationDraft = exports.AnnotationDraft = function AnnotationDraft(_ref) {
|
|
|
68
53
|
// Ignored via go/ees005
|
|
69
54
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
70
55
|
}, (0, _dom.dataAttributes)(draftPosition), {
|
|
71
|
-
css:
|
|
56
|
+
css: markStyles
|
|
72
57
|
}), children);
|
|
73
58
|
};
|
|
74
59
|
var getAnnotationIndex = exports.getAnnotationIndex = function getAnnotationIndex(annotationPosition, fragmentCount) {
|
|
@@ -7,27 +7,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.MarkComponent = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
10
|
var _react = require("react");
|
|
12
11
|
var _react2 = require("@emotion/react");
|
|
13
|
-
var _styles = require("@atlaskit/editor-common/styles");
|
|
14
12
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
15
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
14
|
var _reactIntlNext = require("react-intl-next");
|
|
17
15
|
var _messages = require("../../../messages");
|
|
18
|
-
var
|
|
19
|
-
/**
|
|
16
|
+
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; }
|
|
17
|
+
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; } /**
|
|
20
18
|
* @jsxRuntime classic
|
|
21
19
|
* @jsx jsx
|
|
22
|
-
*/
|
|
23
|
-
|
|
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; }
|
|
26
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
|
|
27
|
-
var markStylesOld = function markStylesOld() {
|
|
28
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']) {\n\t\t\t", "\n\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus, (0, _platformFeatureFlags.fg)('confluence-frontend-comments-panel') ? (0, _styles.AnnotationSharedCSSByState)().hover : '');
|
|
29
|
-
};
|
|
30
|
-
var markStylesNew = (0, _react2.css)((0, _defineProperty2.default)({
|
|
20
|
+
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
|
+
var markStyles = (0, _react2.css)((0, _defineProperty2.default)({
|
|
31
22
|
color: 'inherit',
|
|
32
23
|
backgroundColor: 'unset',
|
|
33
24
|
WebkitTapHighlightColor: 'transparent'
|
|
@@ -65,7 +56,7 @@ var markStylesWithUpdatedShadow = (0, _react2.css)((0, _defineProperty2.default)
|
|
|
65
56
|
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
|
|
66
57
|
}
|
|
67
58
|
}));
|
|
68
|
-
var
|
|
59
|
+
var markStylesWithInlineComments = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(_adfSchema.AnnotationMarkStates.ACTIVE, "']"), {
|
|
69
60
|
// was from common in AnnotationSharedCSSByState().common
|
|
70
61
|
borderBottom: '2px solid transparent',
|
|
71
62
|
cursor: 'pointer',
|
|
@@ -89,7 +80,7 @@ var markStylesNewWithInlineComments = (0, _react2.css)((0, _defineProperty2.defa
|
|
|
89
80
|
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)"
|
|
90
81
|
}
|
|
91
82
|
}));
|
|
92
|
-
var
|
|
83
|
+
var markStylesWithCommentsPanel = (0, _react2.css)((0, _defineProperty2.default)({}, "&[data-mark-annotation-state='".concat(_adfSchema.AnnotationMarkStates.ACTIVE, "']"), {
|
|
93
84
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
94
85
|
'&[data-is-hovered="true"]:not([data-has-focus="true"])': {
|
|
95
86
|
background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
|
|
@@ -102,28 +93,7 @@ var isMobile = function isMobile() {
|
|
|
102
93
|
// eslint-disable-next-line require-unicode-regexp
|
|
103
94
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
104
95
|
};
|
|
105
|
-
var
|
|
106
|
-
return (0, _react2.css)({
|
|
107
|
-
'&::before, &::after': {
|
|
108
|
-
clipPath: 'inset(100%)',
|
|
109
|
-
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
110
|
-
height: '1px',
|
|
111
|
-
overflow: 'hidden',
|
|
112
|
-
position: 'absolute',
|
|
113
|
-
whiteSpace: 'nowrap',
|
|
114
|
-
width: '1px'
|
|
115
|
-
},
|
|
116
|
-
'&::before': {
|
|
117
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
118
|
-
content: "' [".concat(startMarker, "] '")
|
|
119
|
-
},
|
|
120
|
-
'&::after': {
|
|
121
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
122
|
-
content: "' [".concat(endMarker, "] '")
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
var accessibilityStylesNew = (0, _react2.css)({
|
|
96
|
+
var accessibilityStyles = (0, _react2.css)({
|
|
127
97
|
'&::before, &::after': {
|
|
128
98
|
clipPath: 'inset(100%)',
|
|
129
99
|
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
@@ -213,32 +183,13 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
213
183
|
} : _objectSpread({
|
|
214
184
|
'aria-details': annotationIds.join(', ')
|
|
215
185
|
}, desktopAccessibilityAttributes);
|
|
216
|
-
var getAccessibilityStylesOld = function getAccessibilityStylesOld() {
|
|
217
|
-
if (isMobile()) {
|
|
218
|
-
return {};
|
|
219
|
-
}
|
|
220
|
-
if (state !== _adfSchema.AnnotationMarkStates.RESOLVED) {
|
|
221
|
-
var startMarker = intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerStart);
|
|
222
|
-
var endMarker = intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerEnd);
|
|
223
|
-
return accessibilityStylesOld(startMarker, endMarker);
|
|
224
|
-
} else {
|
|
225
|
-
return {};
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
if ((0, _platformFeatureFlags.fg)('platform_editor_emotion_refactor_renderer')) {
|
|
229
|
-
return (0, _react2.jsx)(useBlockLevel ? 'div' : 'mark', _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)({
|
|
230
|
-
id: id
|
|
231
|
-
}, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
|
|
232
|
-
css: [markStylesNew, (0, _platformFeatureFlags.fg)('platform_renderer_nested_annotation_styling') && markStylesLayeringFix, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && markStylesNewWithInlineComments, (0, _platformFeatureFlags.fg)('confluence-frontend-comments-panel') && markStylesNewWithCommentsPanel, !isMobile() && accessibilityStylesNew, markStylesWithUpdatedShadow],
|
|
233
|
-
style: {
|
|
234
|
-
'--ak-renderer-annotation-startmarker': intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
235
|
-
'--ak-renderer-annotation-endmarker': intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
|
236
|
-
}
|
|
237
|
-
}), children);
|
|
238
|
-
}
|
|
239
186
|
return (0, _react2.jsx)(useBlockLevel ? 'div' : 'mark', _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)({
|
|
240
187
|
id: id
|
|
241
188
|
}, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
|
|
242
|
-
css: [
|
|
189
|
+
css: [markStyles, (0, _platformFeatureFlags.fg)('platform_renderer_nested_annotation_styling') && markStylesLayeringFix, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && markStylesWithInlineComments, (0, _platformFeatureFlags.fg)('confluence-frontend-comments-panel') && markStylesWithCommentsPanel, !isMobile() && accessibilityStyles, markStylesWithUpdatedShadow],
|
|
190
|
+
style: {
|
|
191
|
+
'--ak-renderer-annotation-startmarker': intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerStart),
|
|
192
|
+
'--ak-renderer-annotation-endmarker': intl.formatMessage(_messages.inlineCommentMessages.contentRendererInlineCommentMarkerEnd)
|
|
193
|
+
}
|
|
243
194
|
}), children);
|
|
244
195
|
};
|
|
@@ -5,23 +5,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import {
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
9
|
import { alignmentPositionMap } from '@atlaskit/adf-schema';
|
|
10
|
-
|
|
11
|
-
const MarkWrapperOld = props => {
|
|
12
|
-
const styles = props['data-align'] ?
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
14
|
-
css`
|
|
15
|
-
text-align: ${alignmentPositionMap[props['data-align']]};
|
|
16
|
-
` : '';
|
|
17
|
-
return jsx("div", _extends({
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
19
|
-
css: styles
|
|
20
|
-
// Ignored via go/ees005
|
|
21
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
22
|
-
}, props), props.children);
|
|
23
|
-
};
|
|
24
|
-
const MarkWrapperNew = props => {
|
|
10
|
+
const MarkWrapper = props => {
|
|
25
11
|
const dataAlign = props['data-align'] ? alignmentPositionMap[props['data-align']] : undefined;
|
|
26
12
|
return jsx("div", _extends({
|
|
27
13
|
style: {
|
|
@@ -31,7 +17,6 @@ const MarkWrapperNew = props => {
|
|
|
31
17
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
32
18
|
}, props), props.children);
|
|
33
19
|
};
|
|
34
|
-
const MarkWrapper = componentWithFG('platform_editor_emotion_refactor_renderer', MarkWrapperNew, MarkWrapperOld);
|
|
35
20
|
export default function Alignment(props) {
|
|
36
21
|
return jsx(MarkWrapper
|
|
37
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -12,6 +12,8 @@ import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
|
12
12
|
import InlineCard from './inlineCard';
|
|
13
13
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
14
14
|
import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
15
|
+
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
17
|
import { N40 } from '@atlaskit/theme/colors';
|
|
16
18
|
import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
17
19
|
const datasourceContainerStyle = css({
|
|
@@ -109,6 +111,27 @@ export default function BlockCard(props) {
|
|
|
109
111
|
url: url
|
|
110
112
|
});
|
|
111
113
|
}
|
|
114
|
+
let cardComponent;
|
|
115
|
+
if (smartLinks !== null && smartLinks !== void 0 && smartLinks.ssr && url && fg('platform_ssr_smartlink_cards')) {
|
|
116
|
+
cardComponent = jsx(CardSSR, _extends({
|
|
117
|
+
appearance: "block",
|
|
118
|
+
platform: platform
|
|
119
|
+
// Ignored via go/ees005
|
|
120
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
121
|
+
}, cardProps, {
|
|
122
|
+
url: url,
|
|
123
|
+
onError: onError
|
|
124
|
+
}));
|
|
125
|
+
} else {
|
|
126
|
+
cardComponent = jsx(Card, _extends({
|
|
127
|
+
appearance: "block",
|
|
128
|
+
platform: platform
|
|
129
|
+
// Ignored via go/ees005
|
|
130
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
131
|
+
}, cardProps, {
|
|
132
|
+
onError: onError
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
112
135
|
return jsx(AnalyticsContext, {
|
|
113
136
|
data: analyticsData
|
|
114
137
|
}, jsx("div", {
|
|
@@ -121,12 +144,5 @@ export default function BlockCard(props) {
|
|
|
121
144
|
unsupportedComponent: UnsupportedBlock
|
|
122
145
|
// Ignored via go/ees005
|
|
123
146
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
124
|
-
}, cardProps),
|
|
125
|
-
appearance: "block",
|
|
126
|
-
platform: platform
|
|
127
|
-
// Ignored via go/ees005
|
|
128
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
129
|
-
}, cardProps, {
|
|
130
|
-
onError: onError
|
|
131
|
-
})))));
|
|
147
|
+
}, cardProps), cardComponent)));
|
|
132
148
|
}
|
|
@@ -4,47 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx, css } from '@emotion/react';
|
|
7
|
-
import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
8
7
|
import { N20 } from '@atlaskit/theme/colors';
|
|
9
8
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
10
9
|
import CodeBlockButtonContainer from './codeBlockButtonContainer';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
14
|
-
const codeBlockStyleOverridesOld = css`
|
|
15
|
-
tab-size: 4;
|
|
16
|
-
background-color: ${`var(--ds-surface-raised, ${N20})`};
|
|
17
|
-
|
|
18
|
-
&:hover {
|
|
19
|
-
button {
|
|
20
|
-
opacity: 1;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
button {
|
|
25
|
-
opacity: 0;
|
|
26
|
-
transition: opacity 0.2s ease 0s;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
${CodeBlockSharedCssClassName.DS_CODEBLOCK} {
|
|
30
|
-
font-size: ${relativeFontSizeToBase16(14)};
|
|
31
|
-
line-height: 1.5rem;
|
|
32
|
-
background-image: ${overflowShadow({
|
|
33
|
-
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
34
|
-
})};
|
|
35
|
-
background-attachment: local, local, local, local, scroll, scroll, scroll, scroll;
|
|
36
|
-
background-position:
|
|
37
|
-
0 0,
|
|
38
|
-
0 0,
|
|
39
|
-
100% 0,
|
|
40
|
-
100% 0,
|
|
41
|
-
100% 0,
|
|
42
|
-
100% 0,
|
|
43
|
-
0 0,
|
|
44
|
-
0 0;
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
const codeBlockStyleOverridesNew = css({
|
|
10
|
+
const codeBlockStyleOverrides = css({
|
|
48
11
|
tabSize: 4,
|
|
49
12
|
backgroundColor: `var(--ds-surface-raised, ${N20})`,
|
|
50
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -113,7 +76,7 @@ const CodeBlockContainer = ({
|
|
|
113
76
|
return jsx("div", {
|
|
114
77
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
115
78
|
className: className,
|
|
116
|
-
css:
|
|
79
|
+
css: codeBlockStyleOverrides
|
|
117
80
|
}, jsx(CodeBlockButtonContainer, {
|
|
118
81
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
119
82
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
@@ -9,11 +9,10 @@ import React, { forwardRef, useMemo } from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
12
|
-
import {
|
|
12
|
+
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
13
13
|
import { useBidiWarnings } from '../../../hooks/use-bidi-warnings';
|
|
14
14
|
import { RendererCssClassName } from '../../../../consts';
|
|
15
|
-
|
|
16
|
-
const codeBlockSharedStylesNew = css({
|
|
15
|
+
const codeBlockSharedStyles = css({
|
|
17
16
|
[`.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED}
|
|
18
17
|
> .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER}
|
|
19
18
|
> .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT}`]: {
|
|
@@ -145,14 +144,7 @@ const codeBlockSharedStylesNew = css({
|
|
|
145
144
|
}
|
|
146
145
|
}
|
|
147
146
|
});
|
|
148
|
-
|
|
149
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
150
|
-
const lightWeightCodeBlockStylesOld = css`
|
|
151
|
-
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
|
|
152
|
-
cursor: text;
|
|
153
|
-
}
|
|
154
|
-
`;
|
|
155
|
-
const lightWeightCodeBlockStylesNew = css({
|
|
147
|
+
const lightWeightCodeBlockStyles = css({
|
|
156
148
|
[`.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER}`]: {
|
|
157
149
|
cursor: 'text'
|
|
158
150
|
}
|
|
@@ -181,43 +173,7 @@ export const getLightWeightCodeBlockStylesForRootRendererStyleSheet = () => {
|
|
|
181
173
|
}
|
|
182
174
|
`;
|
|
183
175
|
};
|
|
184
|
-
const
|
|
185
|
-
text,
|
|
186
|
-
codeBidiWarningTooltipEnabled = true,
|
|
187
|
-
className
|
|
188
|
-
}, ref) => {
|
|
189
|
-
const textRows = useMemo(() => (text !== null && text !== void 0 ? text : '').split('\n'), [text]);
|
|
190
|
-
const {
|
|
191
|
-
renderBidiWarnings
|
|
192
|
-
} = useBidiWarnings({
|
|
193
|
-
enableWarningTooltip: codeBidiWarningTooltipEnabled
|
|
194
|
-
});
|
|
195
|
-
const classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
|
|
196
|
-
return jsx("div", {
|
|
197
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
198
|
-
className: classNames,
|
|
199
|
-
ref: ref
|
|
200
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
201
|
-
,
|
|
202
|
-
css: [codeBlockSharedStyles(), lightWeightCodeBlockStylesOld]
|
|
203
|
-
}, jsx("div", {
|
|
204
|
-
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
205
|
-
}, jsx("div", {
|
|
206
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
207
|
-
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER
|
|
208
|
-
}, jsx("div", {
|
|
209
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
210
|
-
className: CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER
|
|
211
|
-
}, textRows.map((_, index) =>
|
|
212
|
-
// Ignored via go/ees005
|
|
213
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
214
|
-
jsx("span", {
|
|
215
|
-
key: index
|
|
216
|
-
}))), jsx("div", {
|
|
217
|
-
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
218
|
-
}, jsx("code", null, renderBidiWarnings(text))))));
|
|
219
|
-
});
|
|
220
|
-
const LightWeightCodeBlockNew = /*#__PURE__*/forwardRef(({
|
|
176
|
+
const LightWeightCodeBlock = /*#__PURE__*/forwardRef(({
|
|
221
177
|
text,
|
|
222
178
|
codeBidiWarningTooltipEnabled = true,
|
|
223
179
|
className
|
|
@@ -238,7 +194,7 @@ const LightWeightCodeBlockNew = /*#__PURE__*/forwardRef(({
|
|
|
238
194
|
ref: ref
|
|
239
195
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
240
196
|
,
|
|
241
|
-
css: [
|
|
197
|
+
css: [codeBlockSharedStyles, lightWeightCodeBlockStyles],
|
|
242
198
|
style: {
|
|
243
199
|
'--ak-renderer-codeblock-content-wrapper-bg-img': codeBlockBackgroundImage
|
|
244
200
|
}
|
|
@@ -259,5 +215,4 @@ const LightWeightCodeBlockNew = /*#__PURE__*/forwardRef(({
|
|
|
259
215
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
260
216
|
}, jsx("code", null, renderBidiWarnings(text))))));
|
|
261
217
|
});
|
|
262
|
-
const LightWeightCodeBlock = componentWithFG('platform_editor_emotion_refactor_renderer', LightWeightCodeBlockNew, LightWeightCodeBlockOld);
|
|
263
218
|
export default LightWeightCodeBlock;
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { jsx, css } from '@emotion/react';
|
|
8
|
-
import { WidthProvider
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { WidthProvider } from '@atlaskit/editor-common/ui';
|
|
10
9
|
|
|
11
10
|
// localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
|
|
12
|
-
const
|
|
11
|
+
const clearNextSiblingMarginTopStyle = css({
|
|
13
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
13
|
'& + *': {
|
|
15
14
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
@@ -18,7 +17,7 @@ const clearNextSiblingMarginTopStyleNew = css({
|
|
|
18
17
|
});
|
|
19
18
|
|
|
20
19
|
// localized styles, was from clearNextSiblingBlockMarkMarginTopStyle in @atlaskit/editor-common/ui
|
|
21
|
-
const
|
|
20
|
+
const clearNextSiblingBlockMarkMarginTopStyle = css({
|
|
22
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
22
|
[`+ .fabric-editor-block-mark > p,
|
|
24
23
|
+ .fabric-editor-block-mark > h1,
|
|
@@ -32,13 +31,6 @@ const clearNextSiblingBlockMarkMarginTopStyleNew = css({
|
|
|
32
31
|
marginTop: '0 !important'
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
|
-
|
|
36
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
37
|
-
const layoutColumnClearMarginTopStyles = css(
|
|
38
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
39
|
-
clearNextSiblingMarginTopStyle,
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
41
|
-
clearNextSiblingBlockMarkMarginTopStyle);
|
|
42
34
|
export default function LayoutSection(props) {
|
|
43
35
|
return jsx("div", {
|
|
44
36
|
"data-layout-column": true,
|
|
@@ -47,6 +39,6 @@ export default function LayoutSection(props) {
|
|
|
47
39
|
flexBasis: `${props.width}%`
|
|
48
40
|
}
|
|
49
41
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
50
|
-
css:
|
|
42
|
+
css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
|
|
51
43
|
}), props.children));
|
|
52
44
|
}
|
|
@@ -27,7 +27,6 @@ import { injectIntl } from 'react-intl-next';
|
|
|
27
27
|
import { useInlineCommentsFilter } from '../../../ui/annotations/hooks/use-inline-comments-filter';
|
|
28
28
|
import { useInlineCommentSubscriberContext } from '../../../ui/annotations/hooks/use-inline-comment-subscriber';
|
|
29
29
|
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
30
|
-
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
31
30
|
const linkStyle = css({
|
|
32
31
|
position: 'absolute',
|
|
33
32
|
background: 'transparent',
|
|
@@ -41,23 +40,14 @@ const linkStyle = css({
|
|
|
41
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
42
41
|
height: '100% !important'
|
|
43
42
|
});
|
|
44
|
-
|
|
45
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
46
|
-
const borderStyleOld = (color, width) => css`
|
|
47
|
-
position: absolute;
|
|
48
|
-
width: 100% !important;
|
|
49
|
-
height: 100% !important;
|
|
50
|
-
border-radius: ${width}px;
|
|
51
|
-
box-shadow: 0 0 0 ${width}px ${color};
|
|
52
|
-
`;
|
|
53
|
-
const borderStyleNew = css({
|
|
43
|
+
const borderStyle = css({
|
|
54
44
|
position: 'absolute',
|
|
55
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
56
46
|
width: '100% !important',
|
|
57
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
58
48
|
height: '100% !important'
|
|
59
49
|
});
|
|
60
|
-
const
|
|
50
|
+
const MediaBorder = ({
|
|
61
51
|
mark,
|
|
62
52
|
children
|
|
63
53
|
}) => {
|
|
@@ -68,33 +58,11 @@ const MediaBorderOld = ({
|
|
|
68
58
|
const borderColor = (_mark$attrs$color = mark === null || mark === void 0 ? void 0 : mark.attrs.color) !== null && _mark$attrs$color !== void 0 ? _mark$attrs$color : '';
|
|
69
59
|
const borderWidth = (_mark$attrs$size = mark === null || mark === void 0 ? void 0 : mark.attrs.size) !== null && _mark$attrs$size !== void 0 ? _mark$attrs$size : 0;
|
|
70
60
|
const paletteColorValue = hexToEditorBorderPaletteColor(borderColor) || borderColor;
|
|
71
|
-
return jsx("div", {
|
|
72
|
-
"data-mark-type": "border",
|
|
73
|
-
"data-color": borderColor,
|
|
74
|
-
"data-size": borderWidth
|
|
75
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
76
|
-
,
|
|
77
|
-
css: borderStyleOld(paletteColorValue, borderWidth)
|
|
78
|
-
}, jsx(MediaBorderGapFiller, {
|
|
79
|
-
borderColor: borderColor
|
|
80
|
-
}), children);
|
|
81
|
-
};
|
|
82
|
-
const MediaBorderNew = ({
|
|
83
|
-
mark,
|
|
84
|
-
children
|
|
85
|
-
}) => {
|
|
86
|
-
var _mark$attrs$color2, _mark$attrs$size2;
|
|
87
|
-
if (!mark) {
|
|
88
|
-
return jsx(Fragment, null, children);
|
|
89
|
-
}
|
|
90
|
-
const borderColor = (_mark$attrs$color2 = mark === null || mark === void 0 ? void 0 : mark.attrs.color) !== null && _mark$attrs$color2 !== void 0 ? _mark$attrs$color2 : '';
|
|
91
|
-
const borderWidth = (_mark$attrs$size2 = mark === null || mark === void 0 ? void 0 : mark.attrs.size) !== null && _mark$attrs$size2 !== void 0 ? _mark$attrs$size2 : 0;
|
|
92
|
-
const paletteColorValue = hexToEditorBorderPaletteColor(borderColor) || borderColor;
|
|
93
61
|
return jsx("div", {
|
|
94
62
|
"data-mark-type": "border",
|
|
95
63
|
"data-color": borderColor,
|
|
96
64
|
"data-size": borderWidth,
|
|
97
|
-
css:
|
|
65
|
+
css: borderStyle,
|
|
98
66
|
style: {
|
|
99
67
|
borderRadius: `${borderWidth}px`,
|
|
100
68
|
boxShadow: `0 0 0 ${borderWidth}px ${paletteColorValue}`
|
|
@@ -103,7 +71,6 @@ const MediaBorderNew = ({
|
|
|
103
71
|
borderColor: borderColor
|
|
104
72
|
}), children);
|
|
105
73
|
};
|
|
106
|
-
const MediaBorder = componentWithFG('platform_editor_emotion_refactor_renderer', MediaBorderNew, MediaBorderOld);
|
|
107
74
|
const MediaLink = ({
|
|
108
75
|
mark,
|
|
109
76
|
children,
|
|
@@ -8,13 +8,12 @@ import React from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import TipIcon from '@atlaskit/icon/core/migration/lightbulb--editor-hint';
|
|
10
10
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
11
|
-
import { PanelSharedCssClassName
|
|
11
|
+
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
12
12
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
13
13
|
import EmojiIcon from '@atlaskit/icon/core/migration/emoji--editor-emoji';
|
|
14
14
|
import EmojiItem from './emoji';
|
|
15
15
|
import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, PanelErrorIcon } from '@atlaskit/editor-common/icons';
|
|
16
16
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
17
|
-
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
18
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
// New custom icons are a little smaller than predefined icons.
|
|
20
19
|
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
@@ -155,44 +154,7 @@ const panelCustomBackground = css({
|
|
|
155
154
|
}
|
|
156
155
|
}
|
|
157
156
|
});
|
|
158
|
-
const
|
|
159
|
-
backgroundColor,
|
|
160
|
-
hasIcon,
|
|
161
|
-
...props
|
|
162
|
-
}) => {
|
|
163
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- nested css mixins are violations
|
|
164
|
-
let styles = css`
|
|
165
|
-
&.${PanelSharedCssClassName.prefix} {
|
|
166
|
-
${panelSharedStylesWithoutPrefix()}
|
|
167
|
-
|
|
168
|
-
&[data-panel-type=${PanelType.CUSTOM}] {
|
|
169
|
-
${hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;'}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
`;
|
|
173
|
-
if (props['data-panel-type'] === PanelType.CUSTOM && backgroundColor) {
|
|
174
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- nested css mixins are violations
|
|
175
|
-
styles = css`
|
|
176
|
-
&.${PanelSharedCssClassName.prefix} {
|
|
177
|
-
${panelSharedStylesWithoutPrefix()}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
&[data-panel-type=${PanelType.CUSTOM}] {
|
|
181
|
-
background-color: ${hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor};
|
|
182
|
-
${hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;'}
|
|
183
|
-
}
|
|
184
|
-
`;
|
|
185
|
-
}
|
|
186
|
-
return (
|
|
187
|
-
// eslint-disable-next-line
|
|
188
|
-
// Ignored via go/ees005
|
|
189
|
-
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
190
|
-
jsx("div", _extends({
|
|
191
|
-
css: styles
|
|
192
|
-
}, props), props.children)
|
|
193
|
-
);
|
|
194
|
-
};
|
|
195
|
-
const PanelStyledNew = ({
|
|
157
|
+
const PanelStyled = ({
|
|
196
158
|
backgroundColor,
|
|
197
159
|
hasIcon,
|
|
198
160
|
...props
|
|
@@ -209,7 +171,6 @@ const PanelStyledNew = ({
|
|
|
209
171
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
210
172
|
}, props), props.children);
|
|
211
173
|
};
|
|
212
|
-
const PanelStyled = componentWithFG('platform_editor_emotion_refactor_renderer', PanelStyledNew, PanelStyledOld);
|
|
213
174
|
PanelStyled.displayName = 'PanelStyled';
|
|
214
175
|
const panelIcons = {
|
|
215
176
|
info: PanelInfoIcon,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
4
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
4
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -190,7 +191,9 @@ export const Colgroup = props => {
|
|
|
190
191
|
}
|
|
191
192
|
return /*#__PURE__*/React.createElement("colgroup", null, isNumberColumnEnabled && /*#__PURE__*/React.createElement("col", {
|
|
192
193
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
193
|
-
style:
|
|
194
|
+
style: fg('platform-ssr-table-resize') ? undefined :
|
|
195
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
196
|
+
{
|
|
194
197
|
width: akEditorTableNumberColumnWidth
|
|
195
198
|
},
|
|
196
199
|
"data-test-id": 'num'
|
|
@@ -200,6 +203,6 @@ export const Colgroup = props => {
|
|
|
200
203
|
// eslint-disable-next-line react/no-array-index-key, @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
201
204
|
React.createElement("col", {
|
|
202
205
|
key: idx,
|
|
203
|
-
style: style
|
|
206
|
+
style: fg('platform-ssr-table-resize') ? undefined : style
|
|
204
207
|
})));
|
|
205
208
|
};
|