@atlaskit/renderer 114.11.1 → 114.11.2
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 +8 -0
- package/dist/cjs/react/marks/alignment.js +3 -15
- 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/sticky.js +3 -57
- package/dist/cjs/ui/Expand.js +12 -62
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +19 -42
- 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/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/sticky.js +3 -70
- package/dist/es2019/ui/Expand.js +11 -67
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +20 -43
- 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/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/sticky.js +3 -57
- package/dist/esm/ui/Expand.js +12 -62
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +20 -43
- 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/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/ui/Renderer/style.d.ts +0 -11
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +30 -6
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 114.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#147828](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/147828)
|
|
8
|
+
[`874be077a3f5f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/874be077a3f5f) -
|
|
9
|
+
Wrap RendererFunctionalComponent into memo
|
|
10
|
+
|
|
3
11
|
## 114.11.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -6,28 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = Alignment;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
9
|
var _react = _interopRequireDefault(require("react"));
|
|
11
10
|
var _react2 = require("@emotion/react");
|
|
12
11
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
13
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
14
|
-
var _templateObject;
|
|
15
12
|
/**
|
|
16
13
|
* @jsxRuntime classic
|
|
17
14
|
* @jsx jsx
|
|
18
15
|
*/
|
|
16
|
+
|
|
19
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\ttext-align: ", ";\n\t\t\t"])), _adfSchema.alignmentPositionMap[props['data-align']]) : '';
|
|
23
|
-
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
24
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
25
|
-
css: styles
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
28
|
-
}, props), props.children);
|
|
29
|
-
};
|
|
30
|
-
var MarkWrapperNew = function MarkWrapperNew(props) {
|
|
18
|
+
|
|
19
|
+
var MarkWrapper = function MarkWrapper(props) {
|
|
31
20
|
var dataAlign = props['data-align'] ? _adfSchema.alignmentPositionMap[props['data-align']] : undefined;
|
|
32
21
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
33
22
|
style: {
|
|
@@ -37,7 +26,6 @@ var MarkWrapperNew = function MarkWrapperNew(props) {
|
|
|
37
26
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
38
27
|
}, props), props.children);
|
|
39
28
|
};
|
|
40
|
-
var MarkWrapper = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', MarkWrapperNew, MarkWrapperOld);
|
|
41
29
|
function Alignment(props) {
|
|
42
30
|
return (0, _react2.jsx)(MarkWrapper
|
|
43
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
@@ -6,24 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
9
|
var _react = require("@emotion/react");
|
|
11
|
-
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
14
12
|
var _codeBlockButtonContainer = _interopRequireDefault(require("./codeBlockButtonContainer"));
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
-
var _templateObject;
|
|
17
13
|
/**
|
|
18
14
|
* @jsxRuntime classic
|
|
19
15
|
* @jsx jsx
|
|
20
16
|
*/
|
|
21
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
25
|
-
}));
|
|
26
|
-
var codeBlockStyleOverridesNew = (0, _react.css)((0, _defineProperty2.default)({
|
|
18
|
+
|
|
19
|
+
var codeBlockStyleOverrides = (0, _react.css)((0, _defineProperty2.default)({
|
|
27
20
|
tabSize: 4,
|
|
28
21
|
backgroundColor: "var(--ds-surface-raised, ".concat(_colors.N20, ")"),
|
|
29
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -57,7 +50,7 @@ var CodeBlockContainer = function CodeBlockContainer(_ref) {
|
|
|
57
50
|
return (0, _react.jsx)("div", {
|
|
58
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
59
52
|
className: className,
|
|
60
|
-
css:
|
|
53
|
+
css: codeBlockStyleOverrides
|
|
61
54
|
}, (0, _react.jsx)(_codeBlockButtonContainer.default, {
|
|
62
55
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
63
56
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
@@ -12,10 +12,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
14
14
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
15
|
-
var
|
|
15
|
+
var _useBidiWarnings2 = require("../../../hooks/use-bidi-warnings");
|
|
16
16
|
var _consts = require("../../../../consts");
|
|
17
|
-
var
|
|
18
|
-
var _templateObject, _templateObject2;
|
|
17
|
+
var _templateObject;
|
|
19
18
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
20
19
|
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
21
20
|
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
|
|
@@ -26,7 +25,7 @@ var _templateObject, _templateObject2;
|
|
|
26
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
27
26
|
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
27
|
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; }
|
|
29
|
-
var
|
|
28
|
+
var codeBlockSharedStyles = (0, _react2.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED, "\n\t\t> .").concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "\n\t\t> .").concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT), {
|
|
30
29
|
marginRight: "var(--ds-space-100, 8px)",
|
|
31
30
|
code: {
|
|
32
31
|
display: 'block',
|
|
@@ -125,10 +124,7 @@ var codeBlockSharedStylesNew = (0, _react2.css)((0, _defineProperty2.default)((0
|
|
|
125
124
|
color: "var(--ds-text-subtlest, #505F79)",
|
|
126
125
|
boxSizing: 'content-box'
|
|
127
126
|
})));
|
|
128
|
-
|
|
129
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
130
|
-
var lightWeightCodeBlockStylesOld = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tcursor: text;\n\t}\n"])), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER);
|
|
131
|
-
var lightWeightCodeBlockStylesNew = (0, _react2.css)((0, _defineProperty2.default)({}, ".".concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER), {
|
|
127
|
+
var lightWeightCodeBlockStyles = (0, _react2.css)((0, _defineProperty2.default)({}, ".".concat(_styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER), {
|
|
132
128
|
cursor: 'text'
|
|
133
129
|
}));
|
|
134
130
|
var LightWeightCodeBlockCssClassName = exports.LightWeightCodeBlockCssClassName = {
|
|
@@ -147,9 +143,9 @@ var getLightWeightCodeBlockStylesForRootRendererStyleSheet = exports.getLightWei
|
|
|
147
143
|
// NOTE: This must be added after other .code-block styles in the root
|
|
148
144
|
// Renderer stylesheet.
|
|
149
145
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
150
|
-
return (0, _react2.css)(
|
|
146
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t.", "\n\t\t\t> .", "\n\t\t\t.", " {\n\t\t\tmargin-top: ", ";\n\t\t}\n\t"])), _consts.RendererCssClassName.DOCUMENT, LightWeightCodeBlockCssClassName.CONTAINER, _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, _editorSharedStyles.blockNodesVerticalMargin);
|
|
151
147
|
};
|
|
152
|
-
var
|
|
148
|
+
var LightWeightCodeBlock = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
153
149
|
var text = _ref.text,
|
|
154
150
|
_ref$codeBidiWarningT = _ref.codeBidiWarningTooltipEnabled,
|
|
155
151
|
codeBidiWarningTooltipEnabled = _ref$codeBidiWarningT === void 0 ? true : _ref$codeBidiWarningT,
|
|
@@ -157,51 +153,11 @@ var LightWeightCodeBlockOld = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
157
153
|
var textRows = (0, _react.useMemo)(function () {
|
|
158
154
|
return (text !== null && text !== void 0 ? text : '').split('\n');
|
|
159
155
|
}, [text]);
|
|
160
|
-
var _useBidiWarnings = (0,
|
|
156
|
+
var _useBidiWarnings = (0, _useBidiWarnings2.useBidiWarnings)({
|
|
161
157
|
enableWarningTooltip: codeBidiWarningTooltipEnabled
|
|
162
158
|
}),
|
|
163
159
|
renderBidiWarnings = _useBidiWarnings.renderBidiWarnings;
|
|
164
160
|
var classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
|
|
165
|
-
return (0, _react2.jsx)("div", {
|
|
166
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
167
|
-
className: classNames,
|
|
168
|
-
ref: ref
|
|
169
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
170
|
-
,
|
|
171
|
-
css: [(0, _styles.codeBlockSharedStyles)(), lightWeightCodeBlockStylesOld]
|
|
172
|
-
}, (0, _react2.jsx)("div", {
|
|
173
|
-
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER
|
|
174
|
-
}, (0, _react2.jsx)("div", {
|
|
175
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
176
|
-
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER
|
|
177
|
-
}, (0, _react2.jsx)("div", {
|
|
178
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
179
|
-
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER
|
|
180
|
-
}, textRows.map(function (_, index) {
|
|
181
|
-
return (
|
|
182
|
-
// Ignored via go/ees005
|
|
183
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
184
|
-
(0, _react2.jsx)("span", {
|
|
185
|
-
key: index
|
|
186
|
-
})
|
|
187
|
-
);
|
|
188
|
-
})), (0, _react2.jsx)("div", {
|
|
189
|
-
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
190
|
-
}, (0, _react2.jsx)("code", null, renderBidiWarnings(text))))));
|
|
191
|
-
});
|
|
192
|
-
var LightWeightCodeBlockNew = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
193
|
-
var text = _ref2.text,
|
|
194
|
-
_ref2$codeBidiWarning = _ref2.codeBidiWarningTooltipEnabled,
|
|
195
|
-
codeBidiWarningTooltipEnabled = _ref2$codeBidiWarning === void 0 ? true : _ref2$codeBidiWarning,
|
|
196
|
-
className = _ref2.className;
|
|
197
|
-
var textRows = (0, _react.useMemo)(function () {
|
|
198
|
-
return (text !== null && text !== void 0 ? text : '').split('\n');
|
|
199
|
-
}, [text]);
|
|
200
|
-
var _useBidiWarnings2 = (0, _useBidiWarnings3.useBidiWarnings)({
|
|
201
|
-
enableWarningTooltip: codeBidiWarningTooltipEnabled
|
|
202
|
-
}),
|
|
203
|
-
renderBidiWarnings = _useBidiWarnings2.renderBidiWarnings;
|
|
204
|
-
var classNames = [LightWeightCodeBlockCssClassName.CONTAINER, className].join(' ');
|
|
205
161
|
var codeBlockBackgroundImage = (0, _editorSharedStyles.overflowShadow)({
|
|
206
162
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
207
163
|
});
|
|
@@ -211,7 +167,7 @@ var LightWeightCodeBlockNew = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
211
167
|
ref: ref
|
|
212
168
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
213
169
|
,
|
|
214
|
-
css: [
|
|
170
|
+
css: [codeBlockSharedStyles, lightWeightCodeBlockStyles],
|
|
215
171
|
style: {
|
|
216
172
|
'--ak-renderer-codeblock-content-wrapper-bg-img': codeBlockBackgroundImage
|
|
217
173
|
}
|
|
@@ -235,5 +191,4 @@ var LightWeightCodeBlockNew = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
235
191
|
className: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
236
192
|
}, (0, _react2.jsx)("code", null, renderBidiWarnings(text))))));
|
|
237
193
|
});
|
|
238
|
-
var LightWeightCodeBlock = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', LightWeightCodeBlockNew, LightWeightCodeBlockOld);
|
|
239
194
|
var _default = exports.default = LightWeightCodeBlock;
|
|
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
/**
|
|
14
13
|
* @jsxRuntime classic
|
|
15
14
|
* @jsx jsx
|
|
@@ -18,7 +17,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
18
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
18
|
|
|
20
19
|
// localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
|
|
21
|
-
var
|
|
20
|
+
var clearNextSiblingMarginTopStyle = (0, _react2.css)({
|
|
22
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
23
22
|
'& + *': {
|
|
24
23
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
@@ -27,17 +26,10 @@ var clearNextSiblingMarginTopStyleNew = (0, _react2.css)({
|
|
|
27
26
|
});
|
|
28
27
|
|
|
29
28
|
// localized styles, was from clearNextSiblingBlockMarkMarginTopStyle in @atlaskit/editor-common/ui
|
|
30
|
-
var
|
|
29
|
+
var clearNextSiblingBlockMarkMarginTopStyle = (0, _react2.css)((0, _defineProperty2.default)({}, "+ .fabric-editor-block-mark > p,\n\t + .fabric-editor-block-mark > h1,\n\t + .fabric-editor-block-mark > h2,\n\t + .fabric-editor-block-mark > h3,\n\t + .fabric-editor-block-mark > h4,\n\t + .fabric-editor-block-mark > h5,\n\t + .fabric-editor-block-mark > h6\n\t", {
|
|
31
30
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
32
31
|
marginTop: '0 !important'
|
|
33
32
|
}));
|
|
34
|
-
|
|
35
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
36
|
-
var layoutColumnClearMarginTopStyles = (0, _react2.css)(
|
|
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
|
-
_ui.clearNextSiblingMarginTopStyle,
|
|
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
|
-
_ui.clearNextSiblingBlockMarkMarginTopStyle);
|
|
41
33
|
function LayoutSection(props) {
|
|
42
34
|
return (0, _react2.jsx)("div", {
|
|
43
35
|
"data-layout-column": true,
|
|
@@ -46,6 +38,6 @@ function LayoutSection(props) {
|
|
|
46
38
|
flexBasis: "".concat(props.width, "%")
|
|
47
39
|
}
|
|
48
40
|
}, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
|
|
49
|
-
css:
|
|
41
|
+
css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
|
|
50
42
|
}), props.children));
|
|
51
43
|
}
|
|
@@ -15,7 +15,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
16
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
17
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
18
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
19
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
20
19
|
var _react2 = require("@emotion/react");
|
|
21
20
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
@@ -36,10 +35,8 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
36
35
|
var _useInlineCommentsFilter = require("../../../ui/annotations/hooks/use-inline-comments-filter");
|
|
37
36
|
var _useInlineCommentSubscriber = require("../../../ui/annotations/hooks/use-inline-comment-subscriber");
|
|
38
37
|
var _types = require("@atlaskit/editor-common/types");
|
|
39
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
40
38
|
var _excluded = ["marks", "mediaSingleElement", "isDrafting"],
|
|
41
39
|
_excluded2 = ["marks", "mediaSingleElement", "isDrafting"];
|
|
42
|
-
var _templateObject;
|
|
43
40
|
/**
|
|
44
41
|
* @jsxRuntime classic
|
|
45
42
|
* @jsx jsx
|
|
@@ -65,19 +62,14 @@ var linkStyle = (0, _react2.css)({
|
|
|
65
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
66
63
|
height: '100% !important'
|
|
67
64
|
});
|
|
68
|
-
|
|
69
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
70
|
-
var borderStyleOld = function borderStyleOld(color, width) {
|
|
71
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tposition: absolute;\n\twidth: 100% !important;\n\theight: 100% !important;\n\tborder-radius: ", "px;\n\tbox-shadow: 0 0 0 ", "px ", ";\n"])), width, width, color);
|
|
72
|
-
};
|
|
73
|
-
var borderStyleNew = (0, _react2.css)({
|
|
65
|
+
var borderStyle = (0, _react2.css)({
|
|
74
66
|
position: 'absolute',
|
|
75
67
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
76
68
|
width: '100% !important',
|
|
77
69
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
78
70
|
height: '100% !important'
|
|
79
71
|
});
|
|
80
|
-
var
|
|
72
|
+
var MediaBorder = function MediaBorder(_ref) {
|
|
81
73
|
var _mark$attrs$color, _mark$attrs$size;
|
|
82
74
|
var mark = _ref.mark,
|
|
83
75
|
children = _ref.children;
|
|
@@ -87,32 +79,11 @@ var MediaBorderOld = function MediaBorderOld(_ref) {
|
|
|
87
79
|
var borderColor = (_mark$attrs$color = mark === null || mark === void 0 ? void 0 : mark.attrs.color) !== null && _mark$attrs$color !== void 0 ? _mark$attrs$color : '';
|
|
88
80
|
var borderWidth = (_mark$attrs$size = mark === null || mark === void 0 ? void 0 : mark.attrs.size) !== null && _mark$attrs$size !== void 0 ? _mark$attrs$size : 0;
|
|
89
81
|
var paletteColorValue = (0, _editorPalette.hexToEditorBorderPaletteColor)(borderColor) || borderColor;
|
|
90
|
-
return (0, _react2.jsx)("div", {
|
|
91
|
-
"data-mark-type": "border",
|
|
92
|
-
"data-color": borderColor,
|
|
93
|
-
"data-size": borderWidth
|
|
94
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
95
|
-
,
|
|
96
|
-
css: borderStyleOld(paletteColorValue, borderWidth)
|
|
97
|
-
}, (0, _react2.jsx)(_ui.MediaBorderGapFiller, {
|
|
98
|
-
borderColor: borderColor
|
|
99
|
-
}), children);
|
|
100
|
-
};
|
|
101
|
-
var MediaBorderNew = function MediaBorderNew(_ref2) {
|
|
102
|
-
var _mark$attrs$color2, _mark$attrs$size2;
|
|
103
|
-
var mark = _ref2.mark,
|
|
104
|
-
children = _ref2.children;
|
|
105
|
-
if (!mark) {
|
|
106
|
-
return (0, _react2.jsx)(_react.Fragment, null, children);
|
|
107
|
-
}
|
|
108
|
-
var borderColor = (_mark$attrs$color2 = mark === null || mark === void 0 ? void 0 : mark.attrs.color) !== null && _mark$attrs$color2 !== void 0 ? _mark$attrs$color2 : '';
|
|
109
|
-
var borderWidth = (_mark$attrs$size2 = mark === null || mark === void 0 ? void 0 : mark.attrs.size) !== null && _mark$attrs$size2 !== void 0 ? _mark$attrs$size2 : 0;
|
|
110
|
-
var paletteColorValue = (0, _editorPalette.hexToEditorBorderPaletteColor)(borderColor) || borderColor;
|
|
111
82
|
return (0, _react2.jsx)("div", {
|
|
112
83
|
"data-mark-type": "border",
|
|
113
84
|
"data-color": borderColor,
|
|
114
85
|
"data-size": borderWidth,
|
|
115
|
-
css:
|
|
86
|
+
css: borderStyle,
|
|
116
87
|
style: {
|
|
117
88
|
borderRadius: "".concat(borderWidth, "px"),
|
|
118
89
|
boxShadow: "0 0 0 ".concat(borderWidth, "px ").concat(paletteColorValue)
|
|
@@ -121,11 +92,10 @@ var MediaBorderNew = function MediaBorderNew(_ref2) {
|
|
|
121
92
|
borderColor: borderColor
|
|
122
93
|
}), children);
|
|
123
94
|
};
|
|
124
|
-
var
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
onClick = _ref3.onClick;
|
|
95
|
+
var MediaLink = function MediaLink(_ref2) {
|
|
96
|
+
var mark = _ref2.mark,
|
|
97
|
+
children = _ref2.children,
|
|
98
|
+
onClick = _ref2.onClick;
|
|
129
99
|
if (!mark) {
|
|
130
100
|
return (0, _react2.jsx)(_react.Fragment, null, children);
|
|
131
101
|
}
|
|
@@ -138,9 +108,9 @@ var MediaLink = function MediaLink(_ref3) {
|
|
|
138
108
|
css: linkStyle
|
|
139
109
|
}, children);
|
|
140
110
|
};
|
|
141
|
-
var MediaAnnotation = function MediaAnnotation(
|
|
142
|
-
var mark =
|
|
143
|
-
children =
|
|
111
|
+
var MediaAnnotation = function MediaAnnotation(_ref3) {
|
|
112
|
+
var mark = _ref3.mark,
|
|
113
|
+
children = _ref3.children;
|
|
144
114
|
if (!mark) {
|
|
145
115
|
return (0, _react2.jsx)(_react.Fragment, null, children);
|
|
146
116
|
}
|
|
@@ -158,10 +128,10 @@ var MediaAnnotation = function MediaAnnotation(_ref4) {
|
|
|
158
128
|
useBlockLevel: true
|
|
159
129
|
}, children);
|
|
160
130
|
};
|
|
161
|
-
var _MediaAnnotations = function MediaAnnotations(
|
|
162
|
-
var
|
|
163
|
-
marks =
|
|
164
|
-
children =
|
|
131
|
+
var _MediaAnnotations = function MediaAnnotations(_ref4) {
|
|
132
|
+
var _ref4$marks = _ref4.marks,
|
|
133
|
+
marks = _ref4$marks === void 0 ? [] : _ref4$marks,
|
|
134
|
+
children = _ref4.children;
|
|
165
135
|
// Early Exit
|
|
166
136
|
if (marks.length === 0) {
|
|
167
137
|
return (0, _react2.jsx)(_react.Fragment, null, children);
|
|
@@ -178,13 +148,13 @@ var _MediaAnnotations = function MediaAnnotations(_ref5) {
|
|
|
178
148
|
}, children) : (0, _react2.jsx)(_react.Fragment, null, children)));
|
|
179
149
|
};
|
|
180
150
|
var CommentBadge = (0, _reactIntlNext.injectIntl)(_mediaSingle.CommentBadge);
|
|
181
|
-
var CommentBadgeWrapper = function CommentBadgeWrapper(
|
|
151
|
+
var CommentBadgeWrapper = function CommentBadgeWrapper(_ref5) {
|
|
182
152
|
var _marks$map;
|
|
183
|
-
var marks =
|
|
184
|
-
mediaSingleElement =
|
|
185
|
-
|
|
186
|
-
isDrafting =
|
|
187
|
-
rest = (0, _objectWithoutProperties2.default)(
|
|
153
|
+
var marks = _ref5.marks,
|
|
154
|
+
mediaSingleElement = _ref5.mediaSingleElement,
|
|
155
|
+
_ref5$isDrafting = _ref5.isDrafting,
|
|
156
|
+
isDrafting = _ref5$isDrafting === void 0 ? false : _ref5$isDrafting,
|
|
157
|
+
rest = (0, _objectWithoutProperties2.default)(_ref5, _excluded);
|
|
188
158
|
var _useState = (0, _react.useState)('default'),
|
|
189
159
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
190
160
|
status = _useState2[0],
|
|
@@ -261,13 +231,13 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref6) {
|
|
|
261
231
|
* when clean up platform_editor_add_media_from_url feature flag
|
|
262
232
|
*/
|
|
263
233
|
|
|
264
|
-
var CommentBadgeNextWrapper = function CommentBadgeNextWrapper(
|
|
234
|
+
var CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref6) {
|
|
265
235
|
var _marks$map2;
|
|
266
|
-
var marks =
|
|
267
|
-
mediaSingleElement =
|
|
268
|
-
|
|
269
|
-
isDrafting =
|
|
270
|
-
rest = (0, _objectWithoutProperties2.default)(
|
|
236
|
+
var marks = _ref6.marks,
|
|
237
|
+
mediaSingleElement = _ref6.mediaSingleElement,
|
|
238
|
+
_ref6$isDrafting = _ref6.isDrafting,
|
|
239
|
+
isDrafting = _ref6$isDrafting === void 0 ? false : _ref6$isDrafting,
|
|
240
|
+
rest = (0, _objectWithoutProperties2.default)(_ref6, _excluded2);
|
|
271
241
|
var _useState5 = (0, _react.useState)('default'),
|
|
272
242
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
273
243
|
status = _useState6[0],
|
|
@@ -386,8 +356,8 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
386
356
|
mediaWidth: width,
|
|
387
357
|
mediaHeight: height,
|
|
388
358
|
useMinimumZIndex: true
|
|
389
|
-
}, function (
|
|
390
|
-
var visible =
|
|
359
|
+
}, function (_ref8) {
|
|
360
|
+
var visible = _ref8.visible;
|
|
391
361
|
return (0, _react2.jsx)(_react.default.Fragment, null, visible && (0, _react2.jsx)(_mediaSingle.ExternalImageBadge, {
|
|
392
362
|
type: _this.props.type,
|
|
393
363
|
url: _this.props.type === 'external' ? _this.props.url : undefined
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
10
|
var _react = _interopRequireDefault(require("react"));
|
|
12
11
|
var _react2 = require("@emotion/react");
|
|
@@ -18,11 +17,8 @@ var _emojiEditorEmoji = _interopRequireDefault(require("@atlaskit/icon/core/migr
|
|
|
18
17
|
var _emoji = _interopRequireDefault(require("./emoji"));
|
|
19
18
|
var _icons = require("@atlaskit/editor-common/icons");
|
|
20
19
|
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
21
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
22
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
|
-
var
|
|
24
|
-
var _excluded = ["backgroundColor", "hasIcon"],
|
|
25
|
-
_excluded2 = ["backgroundColor", "hasIcon"];
|
|
21
|
+
var _excluded = ["backgroundColor", "hasIcon"];
|
|
26
22
|
/**
|
|
27
23
|
* @jsxRuntime classic
|
|
28
24
|
* @jsx jsx
|
|
@@ -167,29 +163,10 @@ var panelCustomBackground = (0, _react2.css)({
|
|
|
167
163
|
}
|
|
168
164
|
}
|
|
169
165
|
});
|
|
170
|
-
var
|
|
166
|
+
var PanelStyled = function PanelStyled(_ref) {
|
|
171
167
|
var backgroundColor = _ref.backgroundColor,
|
|
172
168
|
hasIcon = _ref.hasIcon,
|
|
173
169
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
174
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- nested css mixins are violations
|
|
175
|
-
var styles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t&.", " {\n\t\t\t", "\n\n\t\t\t&[data-panel-type=", "] {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t"])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;');
|
|
176
|
-
if (props['data-panel-type'] === _adfSchema.PanelType.CUSTOM && backgroundColor) {
|
|
177
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- nested css mixins are violations
|
|
178
|
-
styles = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t&.", " {\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t&[data-panel-type=", "] {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\t", "\n\t\t\t}\n\t\t"])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor, hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;');
|
|
179
|
-
}
|
|
180
|
-
return (
|
|
181
|
-
// eslint-disable-next-line
|
|
182
|
-
// Ignored via go/ees005
|
|
183
|
-
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
184
|
-
(0, _react2.jsx)("div", (0, _extends2.default)({
|
|
185
|
-
css: styles
|
|
186
|
-
}, props), props.children)
|
|
187
|
-
);
|
|
188
|
-
};
|
|
189
|
-
var PanelStyledNew = function PanelStyledNew(_ref2) {
|
|
190
|
-
var backgroundColor = _ref2.backgroundColor,
|
|
191
|
-
hasIcon = _ref2.hasIcon,
|
|
192
|
-
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
193
170
|
var customBackgroundColor = backgroundColor ? (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor : undefined;
|
|
194
171
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
195
172
|
style:
|
|
@@ -202,7 +179,6 @@ var PanelStyledNew = function PanelStyledNew(_ref2) {
|
|
|
202
179
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
203
180
|
}, props), props.children);
|
|
204
181
|
};
|
|
205
|
-
var PanelStyled = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', PanelStyledNew, PanelStyledOld);
|
|
206
182
|
PanelStyled.displayName = 'PanelStyled';
|
|
207
183
|
var panelIcons = {
|
|
208
184
|
info: _icons.PanelInfoIcon,
|
|
@@ -17,7 +17,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
18
|
var _table = require("./table");
|
|
19
19
|
var _injectProps = require("../../utils/inject-props");
|
|
20
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
21
20
|
/**
|
|
22
21
|
* @jsxRuntime classic
|
|
23
22
|
* @jsx jsx
|
|
@@ -42,7 +41,7 @@ var modeSpecficStyles = {
|
|
|
42
41
|
|
|
43
42
|
// refactored based on fixedTableDivStaticStyles
|
|
44
43
|
// TODO: DSP-4123 - Quality ticket
|
|
45
|
-
var
|
|
44
|
+
var fixedTableDivStaticStyles = (0, _react2.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
46
45
|
zIndex: 'var(--ak-renderer-sticky-header-zindex)'
|
|
47
46
|
}, "& .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ", & .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
48
47
|
marginTop: 0,
|
|
@@ -60,59 +59,7 @@ var fixedTableDivStaticStylesNew = (0, _react2.css)((0, _defineProperty2.default
|
|
|
60
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
61
60
|
zIndex: 'var(--ak-renderer-sticky-header-zindex)'
|
|
62
61
|
}));
|
|
63
|
-
|
|
64
|
-
// TODO: DSP-4123 - Quality ticket
|
|
65
|
-
var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width, allowTableResizing) {
|
|
66
|
-
var stickyHeaderZIndex;
|
|
67
|
-
if (allowTableResizing) {
|
|
68
|
-
stickyHeaderZIndex = 13;
|
|
69
|
-
} else {
|
|
70
|
-
stickyHeaderZIndex = _editorSharedStyles.akEditorStickyHeaderZIndex;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
74
|
-
return (0, _react2.css)(typeof top === 'number' && "top: ".concat(top, "px;"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
75
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
76
|
-
width: "".concat(width, "px"),
|
|
77
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
78
|
-
zIndex: stickyHeaderZIndex
|
|
79
|
-
}, "& .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ", & .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
|
|
80
|
-
marginTop: 0,
|
|
81
|
-
marginBottom: 0,
|
|
82
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
83
|
-
tr: {
|
|
84
|
-
background: "var(--ds-surface, white)"
|
|
85
|
-
}
|
|
86
|
-
}), "borderTop", "".concat(tableStickyPadding, "px solid ", "var(--ds-surface, white)")), "background", "var(--ds-surface-overlay, white)"), "boxShadow", "0 6px 4px -4px ".concat("var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"))), "div[data-expanded='false'] &", {
|
|
87
|
-
display: 'none'
|
|
88
|
-
}), "& .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ".is-sticky.right-shadow::after, & .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ".is-sticky.left-shadow::before"), {
|
|
89
|
-
top: '0px',
|
|
90
|
-
height: '100%'
|
|
91
|
-
}), "&.fixed-table-div-custom-table-resizing[mode='stick']", {
|
|
92
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
93
|
-
zIndex: stickyHeaderZIndex
|
|
94
|
-
}));
|
|
95
|
-
};
|
|
96
|
-
var FixedTableDivOld = function FixedTableDivOld(props) {
|
|
97
|
-
var top = props.top,
|
|
98
|
-
wrapperWidth = props.wrapperWidth,
|
|
99
|
-
mode = props.mode,
|
|
100
|
-
allowTableResizing = props.allowTableResizing;
|
|
101
|
-
var fixedTableCss = [fixedTableDivStaticStyles(top, wrapperWidth, allowTableResizing), modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]];
|
|
102
|
-
var attrs = {
|
|
103
|
-
mode: mode
|
|
104
|
-
};
|
|
105
|
-
return (0, _react2.jsx)("div", (0, _extends2.default)({}, attrs, {
|
|
106
|
-
"data-testid": "sticky-table-fixed"
|
|
107
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
108
|
-
,
|
|
109
|
-
className: allowTableResizing ? 'fixed-table-div-custom-table-resizing' : ''
|
|
110
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
111
|
-
,
|
|
112
|
-
css: fixedTableCss
|
|
113
|
-
}), props.children);
|
|
114
|
-
};
|
|
115
|
-
var FixedTableDivNew = function FixedTableDivNew(props) {
|
|
62
|
+
var FixedTableDiv = function FixedTableDiv(props) {
|
|
116
63
|
var top = props.top,
|
|
117
64
|
wrapperWidth = props.wrapperWidth,
|
|
118
65
|
mode = props.mode,
|
|
@@ -131,7 +78,7 @@ var FixedTableDivNew = function FixedTableDivNew(props) {
|
|
|
131
78
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
132
79
|
,
|
|
133
80
|
className: allowTableResizing ? 'fixed-table-div-custom-table-resizing' : '',
|
|
134
|
-
css: [
|
|
81
|
+
css: [fixedTableDivStaticStyles, modeSpecficStyles === null || modeSpecficStyles === void 0 ? void 0 : modeSpecficStyles[mode]],
|
|
135
82
|
style: {
|
|
136
83
|
'--ak-renderer-sticky-header-zindex': stickyHeaderZIndex,
|
|
137
84
|
width: "".concat(wrapperWidth, "px"),
|
|
@@ -139,7 +86,6 @@ var FixedTableDivNew = function FixedTableDivNew(props) {
|
|
|
139
86
|
}
|
|
140
87
|
}), props.children);
|
|
141
88
|
};
|
|
142
|
-
var FixedTableDiv = (0, _platformFeatureFlagsReact.componentWithFG)('platform_editor_emotion_refactor_renderer', FixedTableDivNew, FixedTableDivOld);
|
|
143
89
|
var StickyTable = exports.StickyTable = function StickyTable(_ref) {
|
|
144
90
|
var top = _ref.top,
|
|
145
91
|
left = _ref.left,
|