@atlaskit/renderer 109.42.6 → 109.43.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/dist/cjs/react/marks/alignment.js +4 -1
- package/dist/cjs/react/marks/border.js +4 -1
- package/dist/cjs/react/marks/breakout.js +4 -1
- package/dist/cjs/react/marks/link.js +4 -1
- package/dist/cjs/react/nodes/blockCard.js +4 -1
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +4 -1
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockButtonContainer.js +4 -1
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +4 -1
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockCopyButton.js +4 -1
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockWrapButton.js +4 -1
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +4 -1
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +4 -1
- package/dist/cjs/react/nodes/embedCard.js +4 -1
- package/dist/cjs/react/nodes/emoji.js +4 -1
- package/dist/cjs/react/nodes/extensionFrame.js +4 -1
- package/dist/cjs/react/nodes/heading-anchor.js +4 -1
- package/dist/cjs/react/nodes/inlineCard.js +4 -1
- package/dist/cjs/react/nodes/layoutColumn.js +4 -1
- package/dist/cjs/react/nodes/media/index.js +4 -1
- package/dist/cjs/react/nodes/mediaSingle/index.js +4 -1
- package/dist/cjs/react/nodes/mediaSingle/styles.js +4 -1
- package/dist/cjs/react/nodes/multiBodiedExtension.js +4 -1
- package/dist/cjs/react/nodes/panel.js +4 -1
- package/dist/cjs/react/nodes/table/colgroup.js +3 -1
- package/dist/cjs/react/nodes/table/sticky.js +4 -1
- package/dist/cjs/react/nodes/table/table.js +4 -0
- package/dist/cjs/react/nodes/table.js +5 -1
- package/dist/cjs/react/utils/appearance.js +4 -1
- package/dist/cjs/ui/Expand.js +4 -1
- package/dist/cjs/ui/ExtensionRenderer.js +4 -1
- package/dist/cjs/ui/Renderer/index.js +5 -2
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +4 -1
- package/dist/cjs/ui/annotations/draft/component.js +4 -1
- package/dist/cjs/ui/annotations/element/mark.js +4 -1
- package/dist/es2019/react/marks/alignment.js +4 -1
- package/dist/es2019/react/marks/border.js +4 -1
- package/dist/es2019/react/marks/breakout.js +4 -1
- package/dist/es2019/react/marks/link.js +4 -1
- package/dist/es2019/react/nodes/blockCard.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockButtonContainer.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockCopyButton.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockWrapButton.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +4 -1
- package/dist/es2019/react/nodes/embedCard.js +4 -1
- package/dist/es2019/react/nodes/emoji.js +4 -1
- package/dist/es2019/react/nodes/extensionFrame.js +4 -1
- package/dist/es2019/react/nodes/heading-anchor.js +4 -1
- package/dist/es2019/react/nodes/inlineCard.js +4 -1
- package/dist/es2019/react/nodes/layoutColumn.js +4 -1
- package/dist/es2019/react/nodes/media/index.js +4 -1
- package/dist/es2019/react/nodes/mediaSingle/index.js +4 -1
- package/dist/es2019/react/nodes/mediaSingle/styles.js +4 -1
- package/dist/es2019/react/nodes/multiBodiedExtension.js +4 -1
- package/dist/es2019/react/nodes/panel.js +4 -1
- package/dist/es2019/react/nodes/table/colgroup.js +3 -1
- package/dist/es2019/react/nodes/table/sticky.js +4 -1
- package/dist/es2019/react/nodes/table/table.js +5 -1
- package/dist/es2019/react/nodes/table.js +6 -2
- package/dist/es2019/react/utils/appearance.js +1 -0
- package/dist/es2019/ui/Expand.js +4 -1
- package/dist/es2019/ui/ExtensionRenderer.js +4 -1
- package/dist/es2019/ui/Renderer/index.js +5 -2
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +4 -1
- package/dist/es2019/ui/annotations/draft/component.js +4 -1
- package/dist/es2019/ui/annotations/element/mark.js +4 -1
- package/dist/esm/react/marks/alignment.js +4 -1
- package/dist/esm/react/marks/border.js +4 -1
- package/dist/esm/react/marks/breakout.js +4 -1
- package/dist/esm/react/marks/link.js +4 -1
- package/dist/esm/react/nodes/blockCard.js +4 -1
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +4 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockButtonContainer.js +4 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +4 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockCopyButton.js +4 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockWrapButton.js +4 -1
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +4 -1
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +4 -1
- package/dist/esm/react/nodes/embedCard.js +4 -1
- package/dist/esm/react/nodes/emoji.js +4 -1
- package/dist/esm/react/nodes/extensionFrame.js +4 -1
- package/dist/esm/react/nodes/heading-anchor.js +4 -1
- package/dist/esm/react/nodes/inlineCard.js +4 -1
- package/dist/esm/react/nodes/layoutColumn.js +4 -1
- package/dist/esm/react/nodes/media/index.js +4 -1
- package/dist/esm/react/nodes/mediaSingle/index.js +4 -1
- package/dist/esm/react/nodes/mediaSingle/styles.js +4 -1
- package/dist/esm/react/nodes/multiBodiedExtension.js +4 -1
- package/dist/esm/react/nodes/panel.js +4 -1
- package/dist/esm/react/nodes/table/colgroup.js +3 -1
- package/dist/esm/react/nodes/table/sticky.js +4 -1
- package/dist/esm/react/nodes/table/table.js +4 -0
- package/dist/esm/react/nodes/table.js +6 -2
- package/dist/esm/react/utils/appearance.js +3 -0
- package/dist/esm/ui/Expand.js +4 -1
- package/dist/esm/ui/ExtensionRenderer.js +4 -1
- package/dist/esm/ui/Renderer/index.js +5 -2
- package/dist/esm/ui/Renderer/truncated-wrapper.js +4 -1
- package/dist/esm/ui/annotations/draft/component.js +4 -1
- package/dist/esm/ui/annotations/element/mark.js +4 -1
- package/dist/types/react/marks/border.d.ts +4 -1
- package/dist/types/react/marks/breakout.d.ts +4 -1
- package/dist/types/react/nodes/codeBlock/components/codeBlockButtonContainer.d.ts +4 -1
- package/dist/types/react/nodes/codeBlock/components/codeBlockContainer.d.ts +4 -1
- package/dist/types/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +4 -1
- package/dist/types/react/nodes/embedCard.d.ts +4 -1
- package/dist/types/react/nodes/emoji.d.ts +4 -1
- package/dist/types/react/nodes/extensionFrame.d.ts +4 -1
- package/dist/types/react/nodes/layoutColumn.d.ts +4 -1
- package/dist/types/react/nodes/media/index.d.ts +4 -1
- package/dist/types/react/nodes/multiBodiedExtension.d.ts +4 -1
- package/dist/types/react/nodes/panel.d.ts +4 -1
- package/dist/types/react/nodes/table/sticky.d.ts +4 -1
- package/dist/types/react/utils/appearance.d.ts +1 -0
- package/dist/types/ui/Renderer/index.d.ts +4 -1
- package/dist/types/ui/Renderer/truncated-wrapper.d.ts +4 -1
- package/dist/types/ui/annotations/draft/component.d.ts +4 -1
- package/dist/types/ui/annotations/element/mark.d.ts +4 -1
- package/dist/types-ts4.5/react/marks/border.d.ts +4 -1
- package/dist/types-ts4.5/react/marks/breakout.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockButtonContainer.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockContainer.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/embedCard.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/emoji.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/extensionFrame.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/layoutColumn.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/media/index.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/multiBodiedExtension.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/panel.d.ts +4 -1
- package/dist/types-ts4.5/react/nodes/table/sticky.d.ts +4 -1
- package/dist/types-ts4.5/react/utils/appearance.d.ts +1 -0
- package/dist/types-ts4.5/ui/Renderer/index.d.ts +4 -1
- package/dist/types-ts4.5/ui/Renderer/truncated-wrapper.d.ts +4 -1
- package/dist/types-ts4.5/ui/annotations/draft/component.d.ts +4 -1
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +4 -1
- package/package.json +15 -12
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
import { Fragment, lazy, memo, Suspense, useState } from 'react';
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { css, jsx } from '@emotion/react';
|
|
5
8
|
import { useMemo, useContext, useState, useRef } from 'react';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
|
|
5
8
|
import React from 'react';
|
|
6
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { Card } from '@atlaskit/smart-card';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
|
|
5
8
|
import React, { PureComponent, Fragment, useEffect, useState, useMemo, useContext } from 'react';
|
|
6
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
|
|
4
7
|
import { default as React, Fragment, useCallback, useContext, useMemo, useEffect } from 'react';
|
|
5
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
|
|
5
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
9
|
import { jsx } from '@emotion/react';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
import React from 'react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -54,10 +54,12 @@ const renderScaleDownColgroup = props => {
|
|
|
54
54
|
if (!columnWidths) {
|
|
55
55
|
return [];
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
// isTableResized checks if table columns were resized
|
|
57
59
|
const tableResized = isTableResized(columnWidths);
|
|
58
60
|
const noOfColumns = columnWidths.length;
|
|
59
61
|
let targetWidths;
|
|
60
|
-
const tableContainerWidth = getTableContainerWidth(tableNode);
|
|
62
|
+
const tableContainerWidth = rendererAppearance === 'comment' && isTableResizingEnabled(rendererAppearance) && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) ? renderWidth : getTableContainerWidth(tableNode);
|
|
61
63
|
if (isTableResizingEnabled(rendererAppearance) && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableResized) {
|
|
62
64
|
// for tables with no column widths defined, assume that the real table width
|
|
63
65
|
// is defined by node.attrs.width
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Colgroup } from './colgroup';
|
|
3
3
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
4
4
|
import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { isTableResizingEnabled } from '../table';
|
|
5
6
|
export const Table = /*#__PURE__*/React.memo(({
|
|
6
7
|
innerRef,
|
|
7
8
|
isNumberColumnEnabled,
|
|
@@ -14,7 +15,10 @@ export const Table = /*#__PURE__*/React.memo(({
|
|
|
14
15
|
isInsideOfBlockNode,
|
|
15
16
|
isinsideMultiBodiedExtension
|
|
16
17
|
}) => {
|
|
17
|
-
|
|
18
|
+
let tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
|
|
19
|
+
if (rendererAppearance === 'comment' && isTableResizingEnabled(rendererAppearance) && tableNode && !tableNode.attrs.width) {
|
|
20
|
+
tableWidth = renderWidth; // we could set it to 'inherit' here
|
|
21
|
+
}
|
|
18
22
|
const tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
|
|
19
23
|
const tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
|
|
20
24
|
return /*#__PURE__*/React.createElement("table", {
|
|
@@ -13,8 +13,10 @@ import { TableHeader } from './tableCell';
|
|
|
13
13
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
14
14
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
15
15
|
import { Table } from './table/table';
|
|
16
|
-
import { isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
|
|
17
|
-
export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppearance(appearance)
|
|
16
|
+
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
|
|
17
|
+
export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppearance(appearance) ||
|
|
18
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
19
|
+
isCommentAppearance(appearance) && fg('platform_editor_table_support_in_comment');
|
|
18
20
|
const orderChildren = (children, tableNode, smartCardStorage, tableOrderStatus) => {
|
|
19
21
|
if (!tableOrderStatus || tableOrderStatus.order === SortOrder.NO_ORDER) {
|
|
20
22
|
return children;
|
|
@@ -256,6 +258,8 @@ export class TableContainer extends React.Component {
|
|
|
256
258
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
257
259
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
258
260
|
return isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth;
|
|
261
|
+
} else if (rendererAppearance === 'comment' && isTableResizingEnabled(rendererAppearance) && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
262
|
+
return renderWidth;
|
|
259
263
|
} else {
|
|
260
264
|
// custom width, or width mapped to breakpoint
|
|
261
265
|
const tableContainerWidth = getTableContainerWidth(tableNode);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export const isFullWidthAppearance = appearance => appearance === 'full-width';
|
|
2
2
|
export const isFullPageAppearance = appearance => appearance === 'full-page';
|
|
3
|
+
export const isCommentAppearance = appearance => appearance === 'comment';
|
|
3
4
|
export const isFullWidthOrFullPageAppearance = appearance => isFullPageAppearance(appearance) || isFullWidthAppearance(appearance);
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { css, jsx } from '@emotion/react';
|
|
5
8
|
import React, { useCallback, useMemo, useRef } from 'react';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
import React, { Fragment, useContext, useLayoutEffect, useRef, PureComponent } from 'react';
|
|
5
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
9
|
import { jsx } from '@emotion/react';
|
|
@@ -39,7 +42,7 @@ import { nodeToReact } from '../../react/nodes';
|
|
|
39
42
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
40
43
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
41
44
|
const packageName = "@atlaskit/renderer";
|
|
42
|
-
const packageVersion = "109.
|
|
45
|
+
const packageVersion = "109.43.0";
|
|
43
46
|
export const defaultNodeComponents = nodeToReact;
|
|
44
47
|
export class Renderer extends PureComponent {
|
|
45
48
|
constructor(props) {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
import React, { Fragment } from 'react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
7
|
+
*/
|
|
5
8
|
import React from 'react';
|
|
6
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
10
|
import { css, jsx } from '@emotion/react';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
2
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
6
|
import { css, jsx } from '@emotion/react';
|
|
4
7
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
import React, { Fragment } from 'react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
import { useMemo } from 'react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { css, jsx } from '@emotion/react';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
import { useState } from 'react';
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { jsx } from '@emotion/react';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { jsx, css } from '@emotion/react';
|
|
6
9
|
import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { useState } from 'react';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
import React, { forwardRef, useMemo } from 'react';
|
|
5
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
9
|
import { css, jsx } from '@emotion/react';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
7
|
+
*/
|
|
5
8
|
import { Fragment, lazy, memo, Suspense, useState } from 'react';
|
|
6
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
10
|
import { jsx } from '@emotion/react';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
8
|
import { css, jsx } from '@emotion/react';
|
|
6
9
|
import { useMemo, useContext, useState, useRef } from 'react';
|
|
@@ -12,7 +12,10 @@ var _excluded = ["children"];
|
|
|
12
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* @jsxRuntime classic
|
|
17
|
+
* @jsx jsx
|
|
18
|
+
*/
|
|
16
19
|
|
|
17
20
|
import React from 'react';
|
|
18
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { jsx } from '@emotion/react';
|
|
5
8
|
import { Card } from '@atlaskit/smart-card';
|
|
@@ -15,7 +15,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
15
15
|
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) { _defineProperty(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; }
|
|
16
16
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
17
17
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* @jsxRuntime classic
|
|
20
|
+
* @jsx jsx
|
|
21
|
+
*/
|
|
19
22
|
|
|
20
23
|
import React, { PureComponent, Fragment, useEffect, useState, useMemo, useContext } from 'react';
|
|
21
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
4
7
|
|
|
5
8
|
import { default as React, Fragment, useCallback, useContext, useMemo, useEffect } from 'react';
|
|
6
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -3,7 +3,10 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
4
|
var _templateObject, _templateObject2;
|
|
5
5
|
/* eslint-disable @atlaskit/design-system/prefer-primitives */
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @jsxRuntime classic
|
|
8
|
+
* @jsx jsx
|
|
9
|
+
*/
|
|
7
10
|
|
|
8
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
12
|
import { jsx } from '@emotion/react';
|
|
@@ -3,7 +3,10 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _templateObject, _templateObject2;
|
|
5
5
|
var _excluded = ["backgroundColor", "hasIcon"];
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @jsxRuntime classic
|
|
8
|
+
* @jsx jsx
|
|
9
|
+
*/
|
|
7
10
|
import React from 'react';
|
|
8
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
12
|
import { css, jsx } from '@emotion/react';
|
|
@@ -60,10 +60,12 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
|
|
|
60
60
|
if (!columnWidths) {
|
|
61
61
|
return [];
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
// isTableResized checks if table columns were resized
|
|
63
65
|
var tableResized = isTableResized(columnWidths);
|
|
64
66
|
var noOfColumns = columnWidths.length;
|
|
65
67
|
var targetWidths;
|
|
66
|
-
var tableContainerWidth = getTableContainerWidth(tableNode);
|
|
68
|
+
var tableContainerWidth = rendererAppearance === 'comment' && isTableResizingEnabled(rendererAppearance) && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) ? renderWidth : getTableContainerWidth(tableNode);
|
|
67
69
|
if (isTableResizingEnabled(rendererAppearance) && !isInsideOfBlockNode && !isinsideMultiBodiedExtension && !tableResized) {
|
|
68
70
|
// for tables with no column widths defined, assume that the real table width
|
|
69
71
|
// is defined by node.attrs.width
|
|
@@ -2,7 +2,10 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* @jsxRuntime classic
|
|
7
|
+
* @jsx jsx
|
|
8
|
+
*/
|
|
6
9
|
import React from 'react';
|
|
7
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
11
|
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Colgroup } from './colgroup';
|
|
3
3
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
4
4
|
import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { isTableResizingEnabled } from '../table';
|
|
5
6
|
export var Table = /*#__PURE__*/React.memo(function (_ref) {
|
|
6
7
|
var innerRef = _ref.innerRef,
|
|
7
8
|
isNumberColumnEnabled = _ref.isNumberColumnEnabled,
|
|
@@ -14,6 +15,9 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
14
15
|
isInsideOfBlockNode = _ref.isInsideOfBlockNode,
|
|
15
16
|
isinsideMultiBodiedExtension = _ref.isinsideMultiBodiedExtension;
|
|
16
17
|
var tableWidth = tableNode ? getTableContainerWidth(tableNode) : akEditorDefaultLayoutWidth;
|
|
18
|
+
if (rendererAppearance === 'comment' && isTableResizingEnabled(rendererAppearance) && tableNode && !tableNode.attrs.width) {
|
|
19
|
+
tableWidth = renderWidth; // we could set it to 'inherit' here
|
|
20
|
+
}
|
|
17
21
|
var tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
|
|
18
22
|
var tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;
|
|
19
23
|
return /*#__PURE__*/React.createElement("table", {
|