@atlaskit/renderer 83.0.0 → 85.0.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 +81 -0
- package/dist/cjs/actions/index.js +3 -3
- package/dist/cjs/actions/matches-utils.js +1 -1
- package/dist/cjs/analytics/enums.js +2 -1
- package/dist/cjs/analytics/events.js +1 -1
- package/dist/cjs/analytics/unsupported-content.js +3 -3
- package/dist/cjs/i18n/index.js +26 -26
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/messages.js +4 -4
- package/dist/cjs/react/index.js +13 -9
- package/dist/cjs/react/marks/annotation.js +3 -3
- package/dist/cjs/react/marks/breakout.js +6 -4
- package/dist/cjs/react/marks/code.js +3 -3
- package/dist/cjs/react/marks/index.js +24 -24
- package/dist/cjs/react/marks/textColor.js +15 -4
- package/dist/cjs/react/nodes/blockCard.js +2 -2
- package/dist/cjs/react/nodes/caption.js +2 -2
- package/dist/cjs/react/nodes/codeBlock.js +2 -2
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +2 -2
- package/dist/cjs/react/nodes/copy-text-provider.js +1 -1
- package/dist/cjs/react/nodes/date.js +8 -6
- package/dist/cjs/react/nodes/doc.js +1 -1
- package/dist/cjs/react/nodes/embedCard.js +5 -5
- package/dist/cjs/react/nodes/emoji.js +2 -2
- package/dist/cjs/react/nodes/extension.js +7 -5
- package/dist/cjs/react/nodes/heading-anchor.js +5 -3
- package/dist/cjs/react/nodes/index.js +92 -58
- package/dist/cjs/react/nodes/inlineCard.js +2 -2
- package/dist/cjs/react/nodes/layoutColumn.js +2 -2
- package/dist/cjs/react/nodes/media.js +5 -3
- package/dist/cjs/react/nodes/mediaGroup.js +2 -2
- package/dist/cjs/react/nodes/mediaInline.js +2 -2
- package/dist/cjs/react/nodes/mediaSingle/index.js +6 -6
- package/dist/cjs/react/nodes/mediaSingle/styles.js +2 -2
- package/dist/cjs/react/nodes/mention.js +2 -2
- package/dist/cjs/react/nodes/panel.js +18 -20
- package/dist/cjs/react/nodes/table/colgroup.js +3 -3
- package/dist/cjs/react/nodes/table/sticky.js +5 -5
- package/dist/cjs/react/nodes/table.js +19 -13
- package/dist/cjs/react/nodes/tableCell.js +16 -14
- package/dist/cjs/react/nodes/tableRow.js +6 -4
- package/dist/cjs/react/nodes/task-item-with-providers.js +3 -1
- package/dist/cjs/react/nodes/taskItem.js +3 -3
- package/dist/cjs/react/renderer-node.js +1 -1
- package/dist/cjs/react/utils/links.js +1 -1
- package/dist/cjs/render-document.js +24 -4
- package/dist/cjs/renderer-context.js +1 -1
- package/dist/cjs/steps/index.js +2 -2
- package/dist/cjs/text/nodes/date.js +3 -3
- package/dist/cjs/text/nodes/index.js +1 -1
- package/dist/cjs/ui/Expand.js +11 -11
- package/dist/cjs/ui/ExtensionRenderer.js +8 -4
- package/dist/cjs/ui/MediaCard.js +5 -5
- package/dist/cjs/ui/Renderer/breakout-ssr.js +4 -4
- package/dist/cjs/ui/Renderer/index.js +27 -23
- package/dist/cjs/ui/Renderer/style.js +9 -7
- package/dist/cjs/ui/RendererActionsContext/index.js +1 -1
- package/dist/cjs/ui/SortingIcon.js +9 -9
- package/dist/cjs/ui/active-header-id-provider.js +1 -1
- package/dist/cjs/ui/annotations/context.js +1 -1
- package/dist/cjs/ui/annotations/draft/component.js +3 -3
- package/dist/cjs/ui/annotations/draft/index.js +4 -4
- package/dist/cjs/ui/annotations/draft/text.js +1 -1
- package/dist/cjs/ui/annotations/element/index.js +2 -2
- package/dist/cjs/ui/annotations/element/mark.js +4 -4
- package/dist/cjs/ui/annotations/hooks/index.js +8 -8
- package/dist/cjs/ui/annotations/hooks/use-events.js +12 -12
- package/dist/cjs/ui/annotations/hooks/use-load-annotations.js +4 -4
- package/dist/cjs/ui/annotations/index.js +5 -5
- package/dist/cjs/utils.js +6 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/analytics/enums.js +1 -0
- package/dist/es2019/analytics/unsupported-content.js +1 -1
- package/dist/es2019/messages.js +1 -1
- package/dist/es2019/react/index.js +2 -1
- package/dist/es2019/react/marks/breakout.js +2 -1
- package/dist/es2019/react/marks/code.js +1 -1
- package/dist/es2019/react/marks/textColor.js +7 -4
- package/dist/es2019/react/nodes/blockCard.js +1 -1
- package/dist/es2019/react/nodes/caption.js +1 -1
- package/dist/es2019/react/nodes/codeBlock.js +1 -1
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +1 -1
- package/dist/es2019/react/nodes/date.js +3 -2
- package/dist/es2019/react/nodes/embedCard.js +1 -1
- package/dist/es2019/react/nodes/emoji.js +1 -1
- package/dist/es2019/react/nodes/extension.js +2 -1
- package/dist/es2019/react/nodes/heading-anchor.js +1 -1
- package/dist/es2019/react/nodes/index.js +32 -7
- package/dist/es2019/react/nodes/inlineCard.js +1 -1
- package/dist/es2019/react/nodes/layoutColumn.js +1 -1
- package/dist/es2019/react/nodes/media.js +2 -1
- package/dist/es2019/react/nodes/mediaInline.js +1 -1
- package/dist/es2019/react/nodes/mediaSingle/index.js +2 -2
- package/dist/es2019/react/nodes/mediaSingle/styles.js +1 -1
- package/dist/es2019/react/nodes/mention.js +1 -1
- package/dist/es2019/react/nodes/panel.js +14 -12
- package/dist/es2019/react/nodes/table/colgroup.js +1 -1
- package/dist/es2019/react/nodes/table/sticky.js +1 -1
- package/dist/es2019/react/nodes/table.js +4 -1
- package/dist/es2019/react/nodes/tableCell.js +2 -1
- package/dist/es2019/react/nodes/tableRow.js +2 -1
- package/dist/es2019/react/nodes/taskItem.js +1 -1
- package/dist/es2019/render-document.js +20 -2
- package/dist/es2019/text/nodes/date.js +1 -1
- package/dist/es2019/ui/Expand.js +2 -2
- package/dist/es2019/ui/ExtensionRenderer.js +3 -1
- package/dist/es2019/ui/MediaCard.js +1 -1
- package/dist/es2019/ui/Renderer/breakout-ssr.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +8 -6
- package/dist/es2019/ui/Renderer/style.js +3 -1
- package/dist/es2019/ui/SortingIcon.js +2 -2
- package/dist/es2019/ui/annotations/draft/component.js +1 -1
- package/dist/es2019/ui/annotations/element/index.js +1 -1
- package/dist/es2019/ui/annotations/element/mark.js +1 -1
- package/dist/es2019/ui/annotations/hooks/use-events.js +1 -1
- package/dist/es2019/ui/annotations/hooks/use-load-annotations.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/analytics/enums.js +1 -0
- package/dist/esm/analytics/unsupported-content.js +1 -1
- package/dist/esm/messages.js +1 -1
- package/dist/esm/react/index.js +6 -4
- package/dist/esm/react/marks/annotation.js +2 -2
- package/dist/esm/react/marks/breakout.js +2 -1
- package/dist/esm/react/marks/code.js +1 -1
- package/dist/esm/react/marks/textColor.js +8 -4
- package/dist/esm/react/nodes/blockCard.js +1 -1
- package/dist/esm/react/nodes/caption.js +1 -1
- package/dist/esm/react/nodes/codeBlock.js +1 -1
- package/dist/esm/react/nodes/codeBlockCopyButton.js +1 -1
- package/dist/esm/react/nodes/date.js +3 -2
- package/dist/esm/react/nodes/embedCard.js +1 -1
- package/dist/esm/react/nodes/emoji.js +1 -1
- package/dist/esm/react/nodes/extension.js +2 -1
- package/dist/esm/react/nodes/heading-anchor.js +4 -2
- package/dist/esm/react/nodes/index.js +62 -7
- package/dist/esm/react/nodes/inlineCard.js +1 -1
- package/dist/esm/react/nodes/layoutColumn.js +1 -1
- package/dist/esm/react/nodes/media.js +2 -1
- package/dist/esm/react/nodes/mediaGroup.js +2 -2
- package/dist/esm/react/nodes/mediaInline.js +1 -1
- package/dist/esm/react/nodes/mediaSingle/index.js +2 -2
- package/dist/esm/react/nodes/mediaSingle/styles.js +1 -1
- package/dist/esm/react/nodes/mention.js +1 -1
- package/dist/esm/react/nodes/panel.js +14 -12
- package/dist/esm/react/nodes/table/colgroup.js +1 -1
- package/dist/esm/react/nodes/table/sticky.js +1 -1
- package/dist/esm/react/nodes/table.js +4 -1
- package/dist/esm/react/nodes/tableCell.js +2 -1
- package/dist/esm/react/nodes/tableRow.js +2 -1
- package/dist/esm/react/nodes/task-item-with-providers.js +2 -1
- package/dist/esm/react/nodes/taskItem.js +1 -1
- package/dist/esm/render-document.js +20 -2
- package/dist/esm/text/nodes/date.js +1 -1
- package/dist/esm/ui/Expand.js +2 -2
- package/dist/esm/ui/ExtensionRenderer.js +3 -1
- package/dist/esm/ui/MediaCard.js +3 -3
- package/dist/esm/ui/Renderer/breakout-ssr.js +1 -1
- package/dist/esm/ui/Renderer/index.js +10 -8
- package/dist/esm/ui/Renderer/style.js +4 -3
- package/dist/esm/ui/SortingIcon.js +2 -2
- package/dist/esm/ui/annotations/draft/component.js +1 -1
- package/dist/esm/ui/annotations/element/index.js +1 -1
- package/dist/esm/ui/annotations/element/mark.js +3 -3
- package/dist/esm/ui/annotations/hooks/use-events.js +3 -3
- package/dist/esm/ui/annotations/hooks/use-load-annotations.js +3 -3
- package/dist/esm/utils.js +3 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/analytics/enums.d.ts +1 -0
- package/dist/types/analytics/events.d.ts +8 -2
- package/dist/types/analytics/unsupported-content.d.ts +1 -1
- package/dist/types/react/index.d.ts +4 -1
- package/dist/types/react/marks/alignment.d.ts +1 -0
- package/dist/types/react/marks/annotation.d.ts +1 -0
- package/dist/types/react/marks/code.d.ts +6 -6
- package/dist/types/react/marks/data-consumer.d.ts +1 -0
- package/dist/types/react/marks/em.d.ts +1 -0
- package/dist/types/react/marks/fragment.d.ts +1 -0
- package/dist/types/react/marks/indentation.d.ts +1 -0
- package/dist/types/react/marks/link.d.ts +1 -0
- package/dist/types/react/marks/strike.d.ts +1 -0
- package/dist/types/react/marks/strong.d.ts +1 -0
- package/dist/types/react/marks/subsup.d.ts +1 -0
- package/dist/types/react/marks/textColor.d.ts +1 -0
- package/dist/types/react/marks/underline.d.ts +1 -0
- package/dist/types/react/marks/unsupportedMark.d.ts +1 -0
- package/dist/types/react/marks/unsupportedNodeAttribute.d.ts +1 -0
- package/dist/types/react/nodes/blockCard.d.ts +2 -1
- package/dist/types/react/nodes/bodiedExtension.d.ts +2 -1
- package/dist/types/react/nodes/caption.d.ts +1 -0
- package/dist/types/react/nodes/codeBlock.d.ts +11 -3
- package/dist/types/react/nodes/codeBlockCopyButton.d.ts +3 -3
- package/dist/types/react/nodes/date.d.ts +3 -3
- package/dist/types/react/nodes/decisionItem.d.ts +1 -0
- package/dist/types/react/nodes/doc.d.ts +1 -0
- package/dist/types/react/nodes/embedCard.d.ts +2 -1
- package/dist/types/react/nodes/emoji.d.ts +1 -1
- package/dist/types/react/nodes/extension.d.ts +14 -13
- package/dist/types/react/nodes/heading-anchor.d.ts +4 -4
- package/dist/types/react/nodes/heading.d.ts +1 -0
- package/dist/types/react/nodes/index.d.ts +41 -17
- package/dist/types/react/nodes/inlineCard.d.ts +21 -21
- package/dist/types/react/nodes/inlineExtension.d.ts +2 -1
- package/dist/types/react/nodes/media.d.ts +2 -2
- package/dist/types/react/nodes/mediaGroup.d.ts +1 -1
- package/dist/types/react/nodes/mediaInline.d.ts +1 -1
- package/dist/types/react/nodes/mediaSingle/index.d.ts +4 -4
- package/dist/types/react/nodes/mediaSingle/styles.d.ts +1 -1
- package/dist/types/react/nodes/mention.d.ts +2 -1
- package/dist/types/react/nodes/panel.d.ts +3 -1
- package/dist/types/react/nodes/paragraph.d.ts +1 -0
- package/dist/types/react/nodes/placeholder.d.ts +1 -0
- package/dist/types/react/nodes/rule.d.ts +1 -0
- package/dist/types/react/nodes/table/colgroup.d.ts +1 -0
- package/dist/types/react/nodes/table/sticky.d.ts +1 -1
- package/dist/types/react/nodes/table.d.ts +22 -21
- package/dist/types/react/nodes/tableCell.d.ts +1 -1
- package/dist/types/react/nodes/tableRow.d.ts +1 -1
- package/dist/types/react/nodes/task-item-with-providers.d.ts +1 -1
- package/dist/types/react/nodes/taskItem.d.ts +1 -1
- package/dist/types/react/nodes/text-wrapper.d.ts +1 -0
- package/dist/types/react/types.d.ts +3 -1
- package/dist/types/react/utils/getCardClickHandler.d.ts +1 -1
- package/dist/types/render-document.d.ts +1 -1
- package/dist/types/ui/Expand.d.ts +3 -3
- package/dist/types/ui/ExtensionRenderer.d.ts +3 -1
- package/dist/types/ui/MediaCard.d.ts +3 -2
- package/dist/types/ui/Renderer/breakout-ssr.d.ts +1 -0
- package/dist/types/ui/SortingIcon.d.ts +2 -1
- package/dist/types/ui/annotations/context.d.ts +1 -1
- package/dist/types/ui/annotations/element/mark.d.ts +1 -1
- package/dist/types/ui/annotations/hooks/use-events.d.ts +2 -1
- package/dist/types/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +1 -1
- package/dist/types/ui/annotations/selection/mounter.d.ts +1 -1
- package/dist/types/ui/annotations/selection/range-validator.d.ts +1 -1
- package/dist/types/ui/annotations/types.d.ts +1 -1
- package/dist/types/ui/renderer-props.d.ts +6 -1
- package/dist/types/utils.d.ts +3 -1
- package/package.json +20 -20
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import InfoIcon from '@atlaskit/icon/glyph/editor/info';
|
|
4
3
|
import TipIcon from '@atlaskit/icon/glyph/editor/hint';
|
|
5
|
-
import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
6
|
-
import ErrorIcon from '@atlaskit/icon/glyph/editor/error';
|
|
7
|
-
import NoteIcon from '@atlaskit/icon/glyph/editor/note';
|
|
8
|
-
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
9
4
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
10
|
-
import { PanelSharedCssClassName } from '@atlaskit/editor-common';
|
|
5
|
+
import { PanelSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
11
6
|
import EmojiIcon from '@atlaskit/icon/glyph/editor/emoji';
|
|
12
7
|
import EmojiItem from './emoji'; // AFP-2532 TODO: Fix automatic suppressions below
|
|
13
8
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
14
9
|
|
|
15
10
|
import { themed } from '@atlaskit/theme';
|
|
16
|
-
import { getPanelBackgroundDarkModeColors } from '@atlaskit/editor-common';
|
|
11
|
+
import { getPanelBackgroundDarkModeColors } from '@atlaskit/editor-common/styles';
|
|
12
|
+
import { PanelInfoIcon, PanelSuccessIcon, PanelNoteIcon, PanelWarningIcon, PanelErrorIcon } from '@atlaskit/editor-common/icons';
|
|
17
13
|
const PanelStyled = styled.div`
|
|
18
14
|
${props => {
|
|
19
15
|
if (props['data-panel-type'] !== PanelType.CUSTOM || !props.backgroundColor) {
|
|
@@ -32,12 +28,12 @@ const PanelStyled = styled.div`
|
|
|
32
28
|
}}
|
|
33
29
|
`;
|
|
34
30
|
const panelIcons = {
|
|
35
|
-
info:
|
|
36
|
-
success:
|
|
37
|
-
note:
|
|
31
|
+
info: PanelInfoIcon,
|
|
32
|
+
success: PanelSuccessIcon,
|
|
33
|
+
note: PanelNoteIcon,
|
|
38
34
|
tip: TipIcon,
|
|
39
|
-
warning:
|
|
40
|
-
error:
|
|
35
|
+
warning: PanelWarningIcon,
|
|
36
|
+
error: PanelErrorIcon,
|
|
41
37
|
custom: EmojiIcon
|
|
42
38
|
};
|
|
43
39
|
|
|
@@ -47,6 +43,8 @@ const Panel = props => {
|
|
|
47
43
|
panelType: type,
|
|
48
44
|
panelColor,
|
|
49
45
|
panelIcon,
|
|
46
|
+
panelIconId,
|
|
47
|
+
panelIconText,
|
|
50
48
|
providers,
|
|
51
49
|
children
|
|
52
50
|
} = props; // only allow custom panel type if flag is set
|
|
@@ -58,6 +56,8 @@ const Panel = props => {
|
|
|
58
56
|
if (panelType === PanelType.CUSTOM) {
|
|
59
57
|
if (panelIcon && providers) {
|
|
60
58
|
return /*#__PURE__*/React.createElement(EmojiItem, {
|
|
59
|
+
id: panelIconId,
|
|
60
|
+
text: panelIconText,
|
|
61
61
|
shortName: panelIcon,
|
|
62
62
|
providers: providers
|
|
63
63
|
});
|
|
@@ -87,6 +87,8 @@ const Panel = props => {
|
|
|
87
87
|
"data-panel-type": panelType,
|
|
88
88
|
"data-panel-color": panelColor,
|
|
89
89
|
"data-panel-icon": panelIcon,
|
|
90
|
+
"data-panel-icon-id": panelIconId,
|
|
91
|
+
"data-panel-icon-text": panelIconText,
|
|
90
92
|
backgroundColor: panelColor
|
|
91
93
|
}, renderIcon(), /*#__PURE__*/React.createElement("div", {
|
|
92
94
|
className: PanelSharedCssClassName.content
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common';
|
|
2
|
+
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorTableNumberColumnWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { calcLineLength } from '../../../ui/Renderer/breakout-ssr';
|
|
5
5
|
// we allow scaling down column widths by no more than 15%
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { TableSharedCssClassName } from '@atlaskit/editor-common';
|
|
3
|
+
import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import * as colors from '@atlaskit/theme/colors';
|
|
6
6
|
const {
|
|
@@ -2,7 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import { calcTableWidth,
|
|
5
|
+
import { calcTableWidth, TableSharedCssClassName, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
6
|
+
import { WidthConsumer, overflowShadow } from '@atlaskit/editor-common/ui';
|
|
7
|
+
import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMergedCell, compose } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
6
9
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
7
10
|
import { TableHeader } from './tableCell';
|
|
8
11
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
@@ -2,7 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { tableBackgroundColorPalette } from '@atlaskit/adf-schema';
|
|
5
|
-
import { compose
|
|
5
|
+
import { compose } from '@atlaskit/editor-common/utils';
|
|
6
|
+
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
6
7
|
import SortingIcon from '../../ui/SortingIcon';
|
|
7
8
|
import { MODE, PLATFORM } from '../../analytics/events';
|
|
8
9
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../analytics/enums';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { compose } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
4
5
|
import { RendererCssClassName } from '../../consts';
|
|
5
6
|
export default class TableRow extends React.Component {
|
|
6
7
|
constructor(...args) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PureComponent } from 'react';
|
|
4
|
-
import { ProviderFactory, WithProviders } from '@atlaskit/editor-common';
|
|
4
|
+
import { ProviderFactory, WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import TaskItemWithProviders from './task-item-with-providers';
|
|
6
6
|
import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
|
|
7
7
|
export default class TaskItem extends PureComponent {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defaultSchema } from '@atlaskit/adf-schema';
|
|
2
2
|
import { getValidDocument } from '@atlaskit/editor-common/validator';
|
|
3
|
-
import { validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaskit/editor-common';
|
|
3
|
+
import { validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from './analytics/enums';
|
|
5
|
+
import { PLATFORM } from './analytics/events';
|
|
4
6
|
import { trackUnsupportedContentLevels } from './analytics/unsupported-content';
|
|
5
7
|
const SUPPORTS_HIRES_TIMER_API = !!(window.performance && performance.now);
|
|
6
8
|
|
|
@@ -59,7 +61,23 @@ export const renderDocument = (doc, serializer, schema = defaultSchema, adfStage
|
|
|
59
61
|
time: buildTreeTime
|
|
60
62
|
} = withStopwatch(() => {
|
|
61
63
|
const pmNode = schema.nodeFromJSON(validDoc);
|
|
62
|
-
|
|
64
|
+
|
|
65
|
+
try {
|
|
66
|
+
pmNode.check();
|
|
67
|
+
} catch (err) {
|
|
68
|
+
if (dispatchAnalyticsEvent) {
|
|
69
|
+
dispatchAnalyticsEvent({
|
|
70
|
+
action: ACTION.INVALID_PROSEMIRROR_DOCUMENT,
|
|
71
|
+
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
72
|
+
attributes: {
|
|
73
|
+
platform: PLATFORM.WEB,
|
|
74
|
+
error: err === null || err === void 0 ? void 0 : err.toString()
|
|
75
|
+
},
|
|
76
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
63
81
|
return pmNode;
|
|
64
82
|
}); // save build tree time to stats
|
|
65
83
|
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -4,11 +4,11 @@ import styled from 'styled-components';
|
|
|
4
4
|
import { gridSize, fontSize } from '@atlaskit/theme/constants';
|
|
5
5
|
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
6
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
|
-
import { expandMessages, sharedExpandStyles, WidthProvider, ExpandIconWrapper, ExpandLayoutWrapper, ClearNextSiblingMarginTop } from '@atlaskit/editor-common';
|
|
7
|
+
import { expandMessages, sharedExpandStyles, WidthProvider, ExpandIconWrapper, ExpandLayoutWrapper, ClearNextSiblingMarginTop } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import { akEditorLineHeight, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { PLATFORM, MODE } from '../analytics/events';
|
|
10
10
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics/enums';
|
|
11
|
-
import { injectIntl } from 'react-intl';
|
|
11
|
+
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
13
13
|
import _uniqueId from 'lodash/uniqueId';
|
|
14
14
|
const Title = styled.span`
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import memoizeOne from 'memoize-one';
|
|
4
|
-
import {
|
|
4
|
+
import { getNodeRenderer } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
+
import { getExtensionRenderer } from '@atlaskit/editor-common/utils';
|
|
5
7
|
export default class ExtensionRenderer extends React.Component {
|
|
6
8
|
constructor(...args) {
|
|
7
9
|
super(...args);
|
|
@@ -4,7 +4,7 @@ import { Component } from 'react';
|
|
|
4
4
|
import { filter } from '@atlaskit/adf-utils';
|
|
5
5
|
import { Card, CardLoading, CardError } from '@atlaskit/media-card';
|
|
6
6
|
import { getMediaClient } from '@atlaskit/media-client';
|
|
7
|
-
import { withImageLoader } from '@atlaskit/editor-common';
|
|
7
|
+
import { withImageLoader } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
const mediaIdentifierMap = new Map();
|
|
10
10
|
export const getListOfIdentifiersFromDoc = doc => {
|
|
@@ -2,10 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React, { useContext, useLayoutEffect, useRef } from 'react';
|
|
4
4
|
import { PureComponent } from 'react';
|
|
5
|
-
import { IntlProvider } from 'react-intl';
|
|
6
5
|
import { getSchemaBasedOnStage } from '@atlaskit/adf-schema';
|
|
7
6
|
import { reduce } from '@atlaskit/adf-utils';
|
|
8
|
-
import {
|
|
7
|
+
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
+
import { UnsupportedBlock, BaseTheme, WidthProvider, WithCreateAnalyticsEvent, LegacyToNextIntlProvider, IntlLegacyFallbackProvider, IntlNextErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
9
|
+
import { getAnalyticsAppearance, getAnalyticsEventSeverity, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
9
10
|
import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
10
11
|
import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
|
|
11
12
|
import { IframeWidthObserverFallbackWrapper, IframeWrapperConsumer } from '@atlaskit/width-detector';
|
|
@@ -270,7 +271,7 @@ export class Renderer extends PureComponent {
|
|
|
270
271
|
value: this.featureFlags(this.props.featureFlags)
|
|
271
272
|
}, /*#__PURE__*/React.createElement(CopyTextProvider, null, /*#__PURE__*/React.createElement(ActiveHeaderIdProvider, {
|
|
272
273
|
value: getActiveHeadingId(allowHeadingAnchorLinks)
|
|
273
|
-
}, /*#__PURE__*/React.createElement(
|
|
274
|
+
}, /*#__PURE__*/React.createElement(LegacyToNextIntlProvider, null, /*#__PURE__*/React.createElement(IntlLegacyFallbackProvider, null, /*#__PURE__*/React.createElement(AnalyticsContext.Provider, {
|
|
274
275
|
value: {
|
|
275
276
|
fireAnalyticsEvent: event => this.fireAnalyticsEvent(event)
|
|
276
277
|
}
|
|
@@ -291,7 +292,7 @@ export class Renderer extends PureComponent {
|
|
|
291
292
|
doc: pmDoc,
|
|
292
293
|
schema: schema,
|
|
293
294
|
onAnalyticsEvent: this.fireAnalyticsEvent
|
|
294
|
-
}, result))))))));
|
|
295
|
+
}, result)))))))));
|
|
295
296
|
return truncated ? /*#__PURE__*/React.createElement(TruncatedWrapper, {
|
|
296
297
|
height: maxHeight,
|
|
297
298
|
fadeHeight: fadeOutHeight
|
|
@@ -340,14 +341,15 @@ const RendererWithAnalytics = /*#__PURE__*/React.memo(props => /*#__PURE__*/Reac
|
|
|
340
341
|
}
|
|
341
342
|
}, /*#__PURE__*/React.createElement(WithCreateAnalyticsEvent, {
|
|
342
343
|
render: createAnalyticsEvent => {
|
|
344
|
+
// `IntlNextErrorBoundary` only captures Internationalisation errors, leaving others for `ErrorBoundary`.
|
|
343
345
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
344
346
|
component: ACTION_SUBJECT.RENDERER,
|
|
345
347
|
rethrowError: true,
|
|
346
348
|
fallbackComponent: null,
|
|
347
349
|
createAnalyticsEvent: createAnalyticsEvent
|
|
348
|
-
}, /*#__PURE__*/React.createElement(Renderer, _extends({}, props, {
|
|
350
|
+
}, /*#__PURE__*/React.createElement(IntlNextErrorBoundary, null, /*#__PURE__*/React.createElement(Renderer, _extends({}, props, {
|
|
349
351
|
createAnalyticsEvent: createAnalyticsEvent
|
|
350
|
-
})));
|
|
352
|
+
}))));
|
|
351
353
|
}
|
|
352
354
|
})));
|
|
353
355
|
const RendererWithIframeFallbackWrapper = /*#__PURE__*/React.memo(props => {
|
|
@@ -3,7 +3,8 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
3
3
|
import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/constants';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
5
|
import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
|
|
6
|
-
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, panelSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle,
|
|
6
|
+
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, panelSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles } from '@atlaskit/editor-common/styles';
|
|
7
|
+
import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
7
8
|
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
8
9
|
import { RendererCssClassName } from '../../consts';
|
|
9
10
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
@@ -333,6 +334,7 @@ export const Wrapper = styled.div`
|
|
|
333
334
|
${codeMarkSharedStyles};
|
|
334
335
|
${shadowSharedStyle};
|
|
335
336
|
${dateSharedStyle};
|
|
337
|
+
${textColorStyles};
|
|
336
338
|
${tasksAndDecisionsStyles};
|
|
337
339
|
${smartCardSharedStyles}
|
|
338
340
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { SortOrder } from '@atlaskit/editor-common';
|
|
4
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
5
4
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
-
import { N20, N30 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { N20, N30 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { SortOrder } from '@atlaskit/editor-common/types'; // We use data url here because of this issue:
|
|
7
7
|
// https://product-fabric.atlassian.net/browse/ED-8001
|
|
8
8
|
// Remove this workaround if Firefox has fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1664350
|
|
9
9
|
|
|
@@ -6,7 +6,7 @@ import { splitText, calcTextSplitOffset } from './text';
|
|
|
6
6
|
import { calcInsertDraftPositionOnText } from './position';
|
|
7
7
|
import { dataAttributes } from './dom';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
|
-
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common';
|
|
9
|
+
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
10
10
|
const DraftAnnotation = styled.mark`
|
|
11
11
|
color: inherit;
|
|
12
12
|
background-color: unset;
|
|
@@ -3,7 +3,7 @@ import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import { MarkComponent } from './mark';
|
|
4
4
|
import { useInlineCommentSubscriberContext, useHasFocusEvent, useInlineCommentsFilter } from '../hooks';
|
|
5
5
|
import { InlineCommentsStateContext } from '../context';
|
|
6
|
-
import { AnnotationUpdateEvent } from '@atlaskit/editor-common';
|
|
6
|
+
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
7
7
|
|
|
8
8
|
const MarkElement = ({
|
|
9
9
|
annotationParentIds,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useMemo, useCallback } from 'react';
|
|
3
|
-
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common';
|
|
3
|
+
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
4
4
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
const MarkStyled = styled.mark`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useLayoutEffect, useState } from 'react';
|
|
2
|
-
import { AnnotationUpdateEvent } from '@atlaskit/editor-common';
|
|
2
|
+
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
4
4
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '../../../analytics/enums';
|
|
5
5
|
import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext, useEffect } from 'react';
|
|
2
|
-
import { AnnotationUpdateEvent } from '@atlaskit/editor-common';
|
|
2
|
+
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { ProvidersContext } from '../context';
|
|
4
4
|
import { RendererContext as ActionsContext } from '../../RendererActionsContext';
|
|
5
5
|
export const useLoadAnnotations = ({
|
package/dist/es2019/version.json
CHANGED
|
@@ -3,7 +3,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
6
|
-
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange } from '@atlaskit/editor-common';
|
|
6
|
+
import { canApplyAnnotationOnRange, getAnnotationIdsFromRange } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
8
8
|
import { RemoveMarkStep } from 'prosemirror-transform';
|
|
9
9
|
import { createAnnotationStep, getPosFromRange } from '../steps';
|
|
@@ -13,6 +13,7 @@ export var ACTION;
|
|
|
13
13
|
ACTION["STARTED"] = "started";
|
|
14
14
|
ACTION["RENDERED"] = "rendered";
|
|
15
15
|
ACTION["CRASHED"] = "unhandledErrorCaught";
|
|
16
|
+
ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
|
|
16
17
|
ACTION["SELECT_ALL_CAUGHT"] = "selectAllCaught";
|
|
17
18
|
ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
|
|
18
19
|
ACTION["CLICKED"] = "clicked";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getUnsupportedContentLevelData, getAnalyticsAppearance } from '@atlaskit/editor-common';
|
|
1
|
+
import { getUnsupportedContentLevelData, getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from './enums';
|
|
3
3
|
import { PLATFORM } from './events';
|
|
4
4
|
var rendersMap = {};
|
package/dist/esm/messages.js
CHANGED
package/dist/esm/react/index.js
CHANGED
|
@@ -4,10 +4,11 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
4
4
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
5
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
var _excluded = ["key"];
|
|
7
8
|
|
|
8
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
9
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
10
|
|
|
10
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
12
|
|
|
12
13
|
import React from 'react';
|
|
13
14
|
import { MarkType } from 'prosemirror-model';
|
|
@@ -15,7 +16,8 @@ import { isNestedHeaderLinksEnabled } from './utils/links';
|
|
|
15
16
|
import { Doc, DocWithSelectAllTrap, mergeTextNodes, isTextWrapper, isTextNode, toReact } from './nodes';
|
|
16
17
|
import TextWrapperComponent from './nodes/text-wrapper';
|
|
17
18
|
import { toReact as markToReact, isAnnotationMark } from './marks';
|
|
18
|
-
import { getMarksByOrder, isSameMark
|
|
19
|
+
import { getMarksByOrder, isSameMark } from '@atlaskit/editor-common/validator';
|
|
20
|
+
import { calcTableColumnWidths } from '@atlaskit/editor-common/utils';
|
|
19
21
|
import { getText } from '../utils';
|
|
20
22
|
import { findChildrenByType } from 'prosemirror-utils';
|
|
21
23
|
import { insideBreakoutLayout } from './renderer-node';
|
|
@@ -141,7 +143,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
141
143
|
|
|
142
144
|
var _mark$attrs = mark.attrs,
|
|
143
145
|
key = _mark$attrs.key,
|
|
144
|
-
otherAttrs = _objectWithoutProperties(_mark$attrs,
|
|
146
|
+
otherAttrs = _objectWithoutProperties(_mark$attrs, _excluded);
|
|
145
147
|
|
|
146
148
|
var extraProps = {
|
|
147
149
|
isInline: node === null || node === void 0 ? void 0 : node.isInline
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { buildAnnotationMarkDataAttributes } from '@atlaskit/adf-schema';
|
|
@@ -4,7 +4,8 @@ var _templateObject;
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
|
-
import {
|
|
7
|
+
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
8
|
+
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
8
9
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
export var Wrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: ", " 0;\n margin-left: 50%;\n transform: translateX(-50%);\n"])), blockNodesVerticalMargin);
|
|
10
11
|
export default function Breakout(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { injectIntl } from 'react-intl';
|
|
3
|
+
import { injectIntl } from 'react-intl-next';
|
|
4
4
|
import AkCode from '@atlaskit/code/inline';
|
|
5
5
|
import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { useFeatureFlags } from '../../use-feature-flags';
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
3
4
|
export default function TextColor(props) {
|
|
5
|
+
var style = useMemo(function () {
|
|
6
|
+
return _defineProperty({}, '--custom-text-color', props.color);
|
|
7
|
+
}, [props.color]);
|
|
4
8
|
return /*#__PURE__*/React.createElement("span", _extends({}, props.dataAttributes, {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
"data-text-custom-color": props.color,
|
|
10
|
+
className: "fabric-text-color-mark",
|
|
11
|
+
style: style
|
|
8
12
|
}), props.children);
|
|
9
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { Card } from '@atlaskit/smart-card';
|
|
4
|
-
import { UnsupportedBlock } from '@atlaskit/editor-common';
|
|
4
|
+
import { UnsupportedBlock } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { getPlatform } from '../../utils';
|
|
6
6
|
import { CardErrorBoundary } from './fallback';
|
|
7
7
|
import { getCardClickHandler } from '../utils/getCardClickHandler';
|
|
@@ -3,7 +3,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { injectIntl } from 'react-intl';
|
|
6
|
+
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { CodeBlock as AkCodeBlock } from '@atlaskit/code';
|
|
9
9
|
import { overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
@@ -4,7 +4,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
4
4
|
var _templateObject;
|
|
5
5
|
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
|
-
import { injectIntl } from 'react-intl';
|
|
7
|
+
import { injectIntl } from 'react-intl-next';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
10
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
@@ -10,8 +10,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { PureComponent } from 'react';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { DateSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
14
|
+
import { isPastDate, timestampToString, timestampToTaskContext } from '@atlaskit/editor-common/utils';
|
|
15
|
+
import { injectIntl } from 'react-intl-next';
|
|
15
16
|
|
|
16
17
|
var Date = /*#__PURE__*/function (_PureComponent) {
|
|
17
18
|
_inherits(Date, _PureComponent);
|
|
@@ -6,7 +6,7 @@ var _templateObject, _templateObject2;
|
|
|
6
6
|
|
|
7
7
|
import React, { useMemo, useContext, useState, useRef } from 'react';
|
|
8
8
|
import { Card, Context as CardContext, EmbedResizeMessageListener } from '@atlaskit/smart-card';
|
|
9
|
-
import { WidthConsumer, mapBreakpointToLayoutMaxWidth, UnsupportedBlock, MediaSingle as UIMediaSingle } from '@atlaskit/editor-common';
|
|
9
|
+
import { WidthConsumer, mapBreakpointToLayoutMaxWidth, UnsupportedBlock, MediaSingle as UIMediaSingle } from '@atlaskit/editor-common/ui';
|
|
10
10
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH, getAkEditorFullPageMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { getPlatform } from '../../utils';
|
|
12
12
|
import { CardErrorBoundary } from './fallback';
|
|
@@ -10,7 +10,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { PureComponent } from 'react';
|
|
13
|
-
import { Emoji } from '@atlaskit/editor-common';
|
|
13
|
+
import { Emoji } from '@atlaskit/editor-common/emoji';
|
|
14
14
|
|
|
15
15
|
var EmojiItem = /*#__PURE__*/function (_PureComponent) {
|
|
16
16
|
_inherits(EmojiItem, _PureComponent);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
4
|
-
import {
|
|
4
|
+
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
5
6
|
import { RendererCssClassName } from '../../consts';
|
|
6
7
|
export var renderExtension = function renderExtension(content, layout) {
|
|
7
8
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -13,6 +13,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
+
var _excluded = ["children"];
|
|
17
|
+
|
|
16
18
|
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
19
|
|
|
18
20
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -22,12 +24,12 @@ import styled from 'styled-components';
|
|
|
22
24
|
import { N200, N500, B400 } from '@atlaskit/theme/colors';
|
|
23
25
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
24
26
|
import Tooltip from '@atlaskit/tooltip';
|
|
25
|
-
import { injectIntl } from 'react-intl';
|
|
27
|
+
import { injectIntl } from 'react-intl-next';
|
|
26
28
|
import { headingAnchorLinkMessages } from '../../messages';
|
|
27
29
|
export var HeadingAnchorWrapperClassName = 'heading-anchor-wrapper';
|
|
28
30
|
var CopyAnchorWrapperWithRef = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
29
31
|
var children = props.children,
|
|
30
|
-
rest = _objectWithoutProperties(props,
|
|
32
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
31
33
|
|
|
32
34
|
return /*#__PURE__*/React.createElement("span", _extends({}, rest, {
|
|
33
35
|
className: HeadingAnchorWrapperClassName,
|