@atlaskit/renderer 101.0.3 → 101.1.1
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 +21 -0
- package/actions/package.json +8 -1
- package/consts/package.json +8 -1
- package/dist/cjs/analytics/unsupported-content.js +1 -1
- package/dist/cjs/messages.js +4 -17
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +1 -1
- package/dist/cjs/react/nodes/table/colgroup.js +5 -34
- package/dist/cjs/react/nodes/table.js +3 -3
- package/dist/cjs/render-document.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +66 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/unsupported-content.js +1 -1
- package/dist/es2019/messages.js +2 -14
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +1 -1
- package/dist/es2019/react/nodes/table/colgroup.js +5 -30
- package/dist/es2019/react/nodes/table.js +2 -2
- package/dist/es2019/render-document.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +70 -6
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/unsupported-content.js +1 -1
- package/dist/esm/messages.js +2 -14
- package/dist/esm/react/nodes/codeBlockCopyButton.js +1 -1
- package/dist/esm/react/nodes/table/colgroup.js +5 -29
- package/dist/esm/react/nodes/table.js +2 -2
- package/dist/esm/render-document.js +1 -1
- package/dist/esm/ui/Renderer/index.js +68 -6
- package/dist/esm/version.json +1 -1
- package/dist/types/messages.d.ts +0 -12
- package/dist/types/react/nodes/table/colgroup.d.ts +0 -6
- package/dist/types/ui/Renderer/index.d.ts +1 -0
- package/dist/types-ts4.0/actions/index.d.ts +61 -0
- package/dist/types-ts4.0/actions/matches-utils.d.ts +7 -0
- package/dist/types-ts4.0/actions.d.ts +3 -0
- package/dist/types-ts4.0/analytics/analyticsContext.d.ts +6 -0
- package/dist/types-ts4.0/analytics/enums.d.ts +56 -0
- package/dist/types-ts4.0/analytics/events.d.ts +110 -0
- package/dist/types-ts4.0/analytics/unsupported-content.d.ts +10 -0
- package/dist/types-ts4.0/consts.d.ts +12 -0
- package/dist/types-ts4.0/i18n/cs.d.ts +20 -0
- package/dist/types-ts4.0/i18n/da.d.ts +20 -0
- package/dist/types-ts4.0/i18n/de.d.ts +20 -0
- package/dist/types-ts4.0/i18n/en.d.ts +20 -0
- package/dist/types-ts4.0/i18n/en_GB.d.ts +20 -0
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +20 -0
- package/dist/types-ts4.0/i18n/es.d.ts +20 -0
- package/dist/types-ts4.0/i18n/et.d.ts +8 -0
- package/dist/types-ts4.0/i18n/fi.d.ts +20 -0
- package/dist/types-ts4.0/i18n/fr.d.ts +20 -0
- package/dist/types-ts4.0/i18n/hu.d.ts +20 -0
- package/dist/types-ts4.0/i18n/index.d.ts +31 -0
- package/dist/types-ts4.0/i18n/it.d.ts +20 -0
- package/dist/types-ts4.0/i18n/ja.d.ts +20 -0
- package/dist/types-ts4.0/i18n/ko.d.ts +20 -0
- package/dist/types-ts4.0/i18n/nb.d.ts +20 -0
- package/dist/types-ts4.0/i18n/nl.d.ts +20 -0
- package/dist/types-ts4.0/i18n/pl.d.ts +20 -0
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +20 -0
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +8 -0
- package/dist/types-ts4.0/i18n/ru.d.ts +20 -0
- package/dist/types-ts4.0/i18n/sk.d.ts +8 -0
- package/dist/types-ts4.0/i18n/sv.d.ts +20 -0
- package/dist/types-ts4.0/i18n/th.d.ts +20 -0
- package/dist/types-ts4.0/i18n/tr.d.ts +20 -0
- package/dist/types-ts4.0/i18n/uk.d.ts +20 -0
- package/dist/types-ts4.0/i18n/vi.d.ts +20 -0
- package/dist/types-ts4.0/i18n/zh.d.ts +20 -0
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +20 -0
- package/dist/types-ts4.0/index.d.ts +11 -0
- package/dist/types-ts4.0/messages.d.ts +61 -0
- package/dist/types-ts4.0/react/hooks/use-bidi-warnings.d.ts +10 -0
- package/dist/types-ts4.0/react/hooks/use-in-viewport.d.ts +5 -0
- package/dist/types-ts4.0/react/hooks/use-observed-width.d.ts +3 -0
- package/dist/types-ts4.0/react/index.d.ts +118 -0
- package/dist/types-ts4.0/react/marks/alignment.d.ts +4 -0
- package/dist/types-ts4.0/react/marks/annotation.d.ts +6 -0
- package/dist/types-ts4.0/react/marks/breakout.d.ts +6 -0
- package/dist/types-ts4.0/react/marks/code.d.ts +16 -0
- package/dist/types-ts4.0/react/marks/confluence-inline-comment.d.ts +8 -0
- package/dist/types-ts4.0/react/marks/data-consumer.d.ts +4 -0
- package/dist/types-ts4.0/react/marks/em.d.ts +3 -0
- package/dist/types-ts4.0/react/marks/fragment.d.ts +4 -0
- package/dist/types-ts4.0/react/marks/indentation.d.ts +4 -0
- package/dist/types-ts4.0/react/marks/index.d.ts +21 -0
- package/dist/types-ts4.0/react/marks/link.d.ts +9 -0
- package/dist/types-ts4.0/react/marks/strike.d.ts +3 -0
- package/dist/types-ts4.0/react/marks/strong.d.ts +3 -0
- package/dist/types-ts4.0/react/marks/subsup.d.ts +4 -0
- package/dist/types-ts4.0/react/marks/textColor.d.ts +4 -0
- package/dist/types-ts4.0/react/marks/underline.d.ts +3 -0
- package/dist/types-ts4.0/react/marks/unsupportedMark.d.ts +3 -0
- package/dist/types-ts4.0/react/marks/unsupportedNodeAttribute.d.ts +3 -0
- package/dist/types-ts4.0/react/nodes/blockCard.d.ts +10 -0
- package/dist/types-ts4.0/react/nodes/blockquote.d.ts +2 -0
- package/dist/types-ts4.0/react/nodes/bodiedExtension.d.ts +23 -0
- package/dist/types-ts4.0/react/nodes/bulletList.d.ts +5 -0
- package/dist/types-ts4.0/react/nodes/caption.d.ts +4 -0
- package/dist/types-ts4.0/react/nodes/codeBlock/codeBlock.d.ts +14 -0
- package/dist/types-ts4.0/react/nodes/codeBlock/components/codeBlockContainer.d.ts +12 -0
- package/dist/types-ts4.0/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +9 -0
- package/dist/types-ts4.0/react/nodes/codeBlock/windowedCodeBlock.d.ts +4 -0
- package/dist/types-ts4.0/react/nodes/codeBlockCopyButton.d.ts +9 -0
- package/dist/types-ts4.0/react/nodes/date.d.ts +11 -0
- package/dist/types-ts4.0/react/nodes/decisionItem.d.ts +3 -0
- package/dist/types-ts4.0/react/nodes/decisionList.d.ts +7 -0
- package/dist/types-ts4.0/react/nodes/doc.d.ts +3 -0
- package/dist/types-ts4.0/react/nodes/embedCard.d.ts +17 -0
- package/dist/types-ts4.0/react/nodes/emoji.d.ts +10 -0
- package/dist/types-ts4.0/react/nodes/extension.d.ts +112 -0
- package/dist/types-ts4.0/react/nodes/fallback.d.ts +16 -0
- package/dist/types-ts4.0/react/nodes/hardBreak.d.ts +6 -0
- package/dist/types-ts4.0/react/nodes/heading-anchor.d.ts +14 -0
- package/dist/types-ts4.0/react/nodes/heading.d.ts +14 -0
- package/dist/types-ts4.0/react/nodes/index.d.ts +94 -0
- package/dist/types-ts4.0/react/nodes/inline.d.ts +1 -0
- package/dist/types-ts4.0/react/nodes/inlineCard.d.ts +65 -0
- package/dist/types-ts4.0/react/nodes/inlineExtension.d.ts +16 -0
- package/dist/types-ts4.0/react/nodes/layoutColumn.d.ts +6 -0
- package/dist/types-ts4.0/react/nodes/layoutSection.d.ts +2 -0
- package/dist/types-ts4.0/react/nodes/listItem.d.ts +2 -0
- package/dist/types-ts4.0/react/nodes/media.d.ts +27 -0
- package/dist/types-ts4.0/react/nodes/mediaGroup.d.ts +29 -0
- package/dist/types-ts4.0/react/nodes/mediaInline.d.ts +20 -0
- package/dist/types-ts4.0/react/nodes/mediaSingle/index.d.ts +23 -0
- package/dist/types-ts4.0/react/nodes/mediaSingle/styles.d.ts +2 -0
- package/dist/types-ts4.0/react/nodes/mention.d.ts +13 -0
- package/dist/types-ts4.0/react/nodes/orderedList.d.ts +6 -0
- package/dist/types-ts4.0/react/nodes/panel.d.ts +17 -0
- package/dist/types-ts4.0/react/nodes/paragraph.d.ts +3 -0
- package/dist/types-ts4.0/react/nodes/placeholder.d.ts +6 -0
- package/dist/types-ts4.0/react/nodes/rule.d.ts +2 -0
- package/dist/types-ts4.0/react/nodes/status.d.ts +10 -0
- package/dist/types-ts4.0/react/nodes/table/colgroup.d.ts +3 -0
- package/dist/types-ts4.0/react/nodes/table/sticky.d.ts +38 -0
- package/dist/types-ts4.0/react/nodes/table/table.d.ts +7 -0
- package/dist/types-ts4.0/react/nodes/table/types.d.ts +7 -0
- package/dist/types-ts4.0/react/nodes/table.d.ts +269 -0
- package/dist/types-ts4.0/react/nodes/tableCell.d.ts +81 -0
- package/dist/types-ts4.0/react/nodes/tableRow.d.ts +24 -0
- package/dist/types-ts4.0/react/nodes/task-item-with-providers.d.ts +29 -0
- package/dist/types-ts4.0/react/nodes/taskItem.d.ts +19 -0
- package/dist/types-ts4.0/react/nodes/taskList.d.ts +8 -0
- package/dist/types-ts4.0/react/nodes/text-wrapper.d.ts +8 -0
- package/dist/types-ts4.0/react/nodes/unknownBlock.d.ts +2 -0
- package/dist/types-ts4.0/react/renderer-node.d.ts +4 -0
- package/dist/types-ts4.0/react/types.d.ts +57 -0
- package/dist/types-ts4.0/react/utils/clipboard.d.ts +1 -0
- package/dist/types-ts4.0/react/utils/element-selection.d.ts +9 -0
- package/dist/types-ts4.0/react/utils/getCardClickHandler.d.ts +2 -0
- package/dist/types-ts4.0/react/utils/inject-props.d.ts +6 -0
- package/dist/types-ts4.0/react/utils/links.d.ts +3 -0
- package/dist/types-ts4.0/react/utils/lists.d.ts +2 -0
- package/dist/types-ts4.0/react/utils/performance/RenderTracking.d.ts +15 -0
- package/dist/types-ts4.0/react/utils/use-select-all-trap.d.ts +2 -0
- package/dist/types-ts4.0/render-document.d.ts +23 -0
- package/dist/types-ts4.0/renderer-context.d.ts +9 -0
- package/dist/types-ts4.0/serializer.d.ts +4 -0
- package/dist/types-ts4.0/steps/index.d.ts +14 -0
- package/dist/types-ts4.0/text/index.d.ts +8 -0
- package/dist/types-ts4.0/text/nodes/blockquote.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/bulletList.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/date.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/decisionItem.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/hardBreak.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/heading.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/index.d.ts +6 -0
- package/dist/types-ts4.0/text/nodes/inlineCard.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/listItem.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/mediaGroup.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/mention.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/orderedList.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/panel.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/paragraph.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/rule.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/status.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/table.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/taskItem.d.ts +3 -0
- package/dist/types-ts4.0/text/nodes/unknown.d.ts +3 -0
- package/dist/types-ts4.0/text-serializer.d.ts +1 -0
- package/dist/types-ts4.0/types/i18n.d.ts +5 -0
- package/dist/types-ts4.0/types/mediaOptions.d.ts +12 -0
- package/dist/types-ts4.0/types/smartLinksOptions.d.ts +3 -0
- package/dist/types-ts4.0/ui/Expand.d.ts +21 -0
- package/dist/types-ts4.0/ui/ExtensionRenderer.d.ts +40 -0
- package/dist/types-ts4.0/ui/MediaCard.d.ts +77 -0
- package/dist/types-ts4.0/ui/Renderer/ErrorBoundary.d.ts +24 -0
- package/dist/types-ts4.0/ui/Renderer/breakout-ssr.d.ts +11 -0
- package/dist/types-ts4.0/ui/Renderer/click-to-edit.d.ts +6 -0
- package/dist/types-ts4.0/ui/Renderer/index.d.ts +33 -0
- package/dist/types-ts4.0/ui/Renderer/style.d.ts +14 -0
- package/dist/types-ts4.0/ui/Renderer/truncated-wrapper.d.ts +12 -0
- package/dist/types-ts4.0/ui/Renderer/types.d.ts +16 -0
- package/dist/types-ts4.0/ui/RendererActionsContext/WithRendererActions.d.ts +6 -0
- package/dist/types-ts4.0/ui/RendererActionsContext/index.d.ts +9 -0
- package/dist/types-ts4.0/ui/SmartCardStorage.d.ts +60 -0
- package/dist/types-ts4.0/ui/SortingIcon.d.ts +20 -0
- package/dist/types-ts4.0/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +15 -0
- package/dist/types-ts4.0/ui/TaskItemsFormatContext/index.d.ts +2 -0
- package/dist/types-ts4.0/ui/active-header-id-provider.d.ts +18 -0
- package/dist/types-ts4.0/ui/annotations/context.d.ts +27 -0
- package/dist/types-ts4.0/ui/annotations/draft/component.d.ts +20 -0
- package/dist/types-ts4.0/ui/annotations/draft/dom.d.ts +7 -0
- package/dist/types-ts4.0/ui/annotations/draft/index.d.ts +2 -0
- package/dist/types-ts4.0/ui/annotations/draft/position.d.ts +2 -0
- package/dist/types-ts4.0/ui/annotations/draft/text.d.ts +11 -0
- package/dist/types-ts4.0/ui/annotations/element/index.d.ts +10 -0
- package/dist/types-ts4.0/ui/annotations/element/mark.d.ts +14 -0
- package/dist/types-ts4.0/ui/annotations/hooks/index.d.ts +3 -0
- package/dist/types-ts4.0/ui/annotations/hooks/use-events.d.ts +18 -0
- package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +1 -0
- package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comments-filter.d.ts +9 -0
- package/dist/types-ts4.0/ui/annotations/hooks/use-load-annotations.d.ts +6 -0
- package/dist/types-ts4.0/ui/annotations/hooks/user-selection.d.ts +9 -0
- package/dist/types-ts4.0/ui/annotations/hooks/utils.d.ts +2 -0
- package/dist/types-ts4.0/ui/annotations/index.d.ts +5 -0
- package/dist/types-ts4.0/ui/annotations/selection/index.d.ts +1 -0
- package/dist/types-ts4.0/ui/annotations/selection/mounter.d.ts +20 -0
- package/dist/types-ts4.0/ui/annotations/selection/range-validator.d.ts +13 -0
- package/dist/types-ts4.0/ui/annotations/selection/wrapper.d.ts +8 -0
- package/dist/types-ts4.0/ui/annotations/types.d.ts +22 -0
- package/dist/types-ts4.0/ui/annotations/view/index.d.ts +7 -0
- package/dist/types-ts4.0/ui/index.d.ts +1 -0
- package/dist/types-ts4.0/ui/renderer-props.d.ts +100 -0
- package/dist/types-ts4.0/use-feature-flags.d.ts +2 -0
- package/dist/types-ts4.0/utils.d.ts +24 -0
- package/messages/package.json +8 -1
- package/package.json +25 -18
- package/render-document/package.json +8 -1
- package/renderer-context/package.json +8 -1
- package/serializer/package.json +8 -1
- package/text-serializer/package.json +8 -1
- package/use-feature-flags/package.json +8 -1
- package/utils/package.json +8 -1
|
@@ -31,7 +31,7 @@ var processLevelsAndTrack = function processLevelsAndTrack(item, thresholds, dis
|
|
|
31
31
|
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
32
32
|
attributes: {
|
|
33
33
|
platform: PLATFORM.WEB,
|
|
34
|
-
error: err
|
|
34
|
+
error: err instanceof Error ? err.message : String(err)
|
|
35
35
|
},
|
|
36
36
|
eventType: EVENT_TYPE.OPERATIONAL
|
|
37
37
|
});
|
package/dist/esm/messages.js
CHANGED
|
@@ -33,7 +33,7 @@ export var tableCellMessages = defineMessages({
|
|
|
33
33
|
description: 'this table column is sorted in ascending order'
|
|
34
34
|
},
|
|
35
35
|
descSortingLabel: {
|
|
36
|
-
id: 'fabric.editor.headingLink.
|
|
36
|
+
id: 'fabric.editor.headingLink.descSortingLabel',
|
|
37
37
|
defaultMessage: 'descending',
|
|
38
38
|
description: 'this table column is sorted in descending order'
|
|
39
39
|
}
|
|
@@ -55,20 +55,8 @@ export var sortingIconMessages = defineMessages({
|
|
|
55
55
|
description: 'clear the sorting from this column'
|
|
56
56
|
},
|
|
57
57
|
invalidLabel: {
|
|
58
|
-
id: 'fabric.editor.headingLink.
|
|
58
|
+
id: 'fabric.editor.headingLink.invalidLabel',
|
|
59
59
|
defaultMessage: "\u26A0\uFE0F You can't sort a table with merged cell",
|
|
60
60
|
description: 'this sort is invalid for merged cells'
|
|
61
61
|
}
|
|
62
|
-
});
|
|
63
|
-
export var codeBlockCopyButtonMessages = defineMessages({
|
|
64
|
-
copyCodeToClipboard: {
|
|
65
|
-
id: 'fabric.editor.codeBlockCopyButton.copyToClipboard',
|
|
66
|
-
defaultMessage: 'Copy',
|
|
67
|
-
description: 'Copy the whole content of the element to your clipboard'
|
|
68
|
-
},
|
|
69
|
-
copiedCodeToClipboard: {
|
|
70
|
-
id: 'fabric.editor.codeBlockCopyButton.copiedToClipboard',
|
|
71
|
-
defaultMessage: 'Copied!',
|
|
72
|
-
description: 'Copied the whole content of the element to clipboard'
|
|
73
|
-
}
|
|
74
62
|
});
|
|
@@ -12,7 +12,7 @@ import Button from '@atlaskit/button/custom-theme-button';
|
|
|
12
12
|
import CopyIcon from '@atlaskit/icon/glyph/copy';
|
|
13
13
|
import { N20, N30, N700 } from '@atlaskit/theme/colors';
|
|
14
14
|
import { copyTextToClipboard } from '../utils/clipboard';
|
|
15
|
-
import { codeBlockCopyButtonMessages } from '
|
|
15
|
+
import { codeBlockCopyButtonMessages } from '@atlaskit/editor-common/messages';
|
|
16
16
|
import { token } from '@atlaskit/tokens';
|
|
17
17
|
var copyButtonWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n position: sticky;\n justify-content: flex-end;\n top: 0;\n\n button {\n position: absolute;\n display: flex;\n justify-content: center;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n opacity: 0;\n transition: opacity 0.2s ease 0s;\n border: 2px solid ", ";\n border-radius: 4px;\n background-color: ", ";\n color: ", ";\n }\n\n button:hover {\n background-color: ", ";\n }\n\n button.clicked {\n background-color: ", ";\n color: ", " !important;\n }\n"])), token('color.border.inverse', '#fff'), token('color.background.neutral.subtle', N20), token('color.icon', 'rgb(66, 82, 110)'), token('color.background.neutral.hovered', N30), token('color.background.neutral.bold.pressed', N700), token('color.icon.inverse', '#fff'));
|
|
18
18
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
|
-
import { akEditorTableNumberColumnWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorTableLegacyCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { calcLineLength } from '../../../ui/Renderer/breakout-ssr';
|
|
5
|
-
// we allow scaling down column widths by no more than 15%
|
|
6
|
-
var MAX_SCALING_PERCENT = 0.15;
|
|
3
|
+
import { akEditorTableNumberColumnWidth, akEditorWideLayoutWidth, akEditorFullWidthLayoutWidth, akEditorTableLegacyCellMinWidth, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
7
4
|
|
|
8
5
|
var getTableLayoutWidth = function getTableLayoutWidth(layout, opts) {
|
|
9
6
|
switch (layout) {
|
|
@@ -14,7 +11,7 @@ var getTableLayoutWidth = function getTableLayoutWidth(layout, opts) {
|
|
|
14
11
|
return akEditorWideLayoutWidth;
|
|
15
12
|
|
|
16
13
|
default:
|
|
17
|
-
return
|
|
14
|
+
return akEditorDefaultLayoutWidth;
|
|
18
15
|
}
|
|
19
16
|
};
|
|
20
17
|
|
|
@@ -25,28 +22,15 @@ var isTableResized = function isTableResized(columnWidths) {
|
|
|
25
22
|
return !!filteredWidths.length;
|
|
26
23
|
};
|
|
27
24
|
|
|
28
|
-
var fixColumnWidth = function fixColumnWidth(columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount
|
|
25
|
+
var fixColumnWidth = function fixColumnWidth(columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount) {
|
|
29
26
|
if (columnWidth === 0) {
|
|
30
27
|
return columnWidth;
|
|
31
|
-
} // If the tables total width (including no zero widths col or cols without width) is less than the current layout
|
|
32
|
-
// We scale up the columns to meet the minimum of the table layout.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (zeroWidthColumnsCount === 0 && scaleDownPercent) {
|
|
36
|
-
return Math.floor((1 - scaleDownPercent) * columnWidth);
|
|
37
28
|
}
|
|
38
29
|
|
|
39
30
|
return Math.max( // We need to take tableCellBorderWidth, to avoid unneccesary overflow.
|
|
40
31
|
columnWidth - tableCellBorderWidth, zeroWidthColumnsCount ? akEditorTableLegacyCellMinWidth : tableCellMinWidth);
|
|
41
32
|
};
|
|
42
33
|
|
|
43
|
-
export var calcScalePercent = function calcScalePercent(_ref) {
|
|
44
|
-
var renderWidth = _ref.renderWidth,
|
|
45
|
-
tableWidth = _ref.tableWidth,
|
|
46
|
-
maxScale = _ref.maxScale;
|
|
47
|
-
var diffPercent = 1 - renderWidth / tableWidth;
|
|
48
|
-
return diffPercent < maxScale ? diffPercent : maxScale;
|
|
49
|
-
};
|
|
50
34
|
export var Colgroup = function Colgroup(props) {
|
|
51
35
|
var columnWidths = props.columnWidths,
|
|
52
36
|
layout = props.layout,
|
|
@@ -81,21 +65,13 @@ export var Colgroup = function Colgroup(props) {
|
|
|
81
65
|
|
|
82
66
|
minTableWidth += Math.ceil(width) || akEditorTableLegacyCellMinWidth;
|
|
83
67
|
});
|
|
84
|
-
var cellMinWidth = 0;
|
|
85
|
-
var scaleDownPercent = 0; // fixes migration tables with zero-width columns
|
|
68
|
+
var cellMinWidth = 0; // fixes migration tables with zero-width columns
|
|
86
69
|
|
|
87
70
|
if (zeroWidthColumnsCount > 0) {
|
|
88
71
|
if (minTableWidth > maxTableWidth) {
|
|
89
72
|
var minWidth = Math.ceil((maxTableWidth - tableWidth) / zeroWidthColumnsCount);
|
|
90
73
|
cellMinWidth = minWidth < akEditorTableLegacyCellMinWidth ? akEditorTableLegacyCellMinWidth : minWidth;
|
|
91
74
|
}
|
|
92
|
-
} // scaling down
|
|
93
|
-
else if (renderWidth < tableWidth) {
|
|
94
|
-
scaleDownPercent = calcScalePercent({
|
|
95
|
-
renderWidth: renderWidth,
|
|
96
|
-
tableWidth: tableWidth,
|
|
97
|
-
maxScale: MAX_SCALING_PERCENT
|
|
98
|
-
});
|
|
99
75
|
}
|
|
100
76
|
|
|
101
77
|
return /*#__PURE__*/React.createElement("colgroup", null, isNumberColumnEnabled && /*#__PURE__*/React.createElement("col", {
|
|
@@ -103,7 +79,7 @@ export var Colgroup = function Colgroup(props) {
|
|
|
103
79
|
width: akEditorTableNumberColumnWidth
|
|
104
80
|
}
|
|
105
81
|
}), columnWidths.map(function (colWidth, idx) {
|
|
106
|
-
var width = fixColumnWidth(colWidth, minTableWidth, maxTableWidth, zeroWidthColumnsCount
|
|
82
|
+
var width = fixColumnWidth(colWidth, minTableWidth, maxTableWidth, zeroWidthColumnsCount) || cellMinWidth;
|
|
107
83
|
var style = width ? {
|
|
108
84
|
width: "".concat(width, "px")
|
|
109
85
|
} : {};
|
|
@@ -19,9 +19,9 @@ import { SortOrder } from '@atlaskit/editor-common/types';
|
|
|
19
19
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
20
20
|
import { TableHeader } from './tableCell';
|
|
21
21
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
22
|
-
import { calcLineLength } from '../../ui/Renderer/breakout-ssr';
|
|
23
22
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
24
23
|
import { Table } from './table/table';
|
|
24
|
+
import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
25
25
|
|
|
26
26
|
var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus) {
|
|
27
27
|
if (!tableOrderStatus || tableOrderStatus.order === SortOrder.NO_ORDER) {
|
|
@@ -298,7 +298,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
298
298
|
tableNode = _this$props.tableNode;
|
|
299
299
|
var stickyMode = this.state.stickyMode;
|
|
300
300
|
var tableWidth = calcTableWidth(layout, renderWidth, false);
|
|
301
|
-
var lineLength =
|
|
301
|
+
var lineLength = akEditorDefaultLayoutWidth;
|
|
302
302
|
var left;
|
|
303
303
|
|
|
304
304
|
if (canUseLinelength(this.props.rendererAppearance) && tableWidth !== 'inherit') {
|
|
@@ -129,7 +129,7 @@ var _createNodeAndCheck = function _createNodeAndCheck(schema, doc, dispatchAnal
|
|
|
129
129
|
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
130
130
|
attributes: {
|
|
131
131
|
platform: PLATFORM.WEB,
|
|
132
|
-
errorStack: err
|
|
132
|
+
errorStack: err instanceof Error ? err.message : String(err)
|
|
133
133
|
},
|
|
134
134
|
eventType: EVENT_TYPE.OPERATIONAL
|
|
135
135
|
});
|
|
@@ -23,7 +23,7 @@ import { getSchemaBasedOnStage } from '@atlaskit/adf-schema/schema-default';
|
|
|
23
23
|
import { reduce } from '@atlaskit/adf-utils/traverse';
|
|
24
24
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
25
25
|
import { UnsupportedBlock, BaseTheme, WidthProvider, WithCreateAnalyticsEvent, IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
26
|
-
import { getAnalyticsAppearance, getAnalyticsEventSeverity, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking, measureTTI } from '@atlaskit/editor-common/utils';
|
|
26
|
+
import { getAnalyticsAppearance, getAnalyticsEventSeverity, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking, measureTTI, browser } from '@atlaskit/editor-common/utils';
|
|
27
27
|
import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
28
28
|
import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
|
|
29
29
|
import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
@@ -50,7 +50,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
50
50
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
51
51
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
52
52
|
var packageName = "@atlaskit/renderer";
|
|
53
|
-
var packageVersion = "101.
|
|
53
|
+
var packageVersion = "101.1.1";
|
|
54
54
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
55
55
|
_inherits(Renderer, _PureComponent);
|
|
56
56
|
|
|
@@ -98,6 +98,63 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
98
98
|
_this.mouseDownSelection = windowSelection !== null ? windowSelection.toString() : undefined;
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseTripleClickInTables", function (event) {
|
|
102
|
+
var _parentElement, _parentElement2;
|
|
103
|
+
|
|
104
|
+
if (browser.ios || browser.android) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
var badBrowser = browser.chrome || browser.safari;
|
|
109
|
+
var tripleClick = event.detail >= 3;
|
|
110
|
+
|
|
111
|
+
if (!(badBrowser && tripleClick)) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
var selection = window.getSelection();
|
|
116
|
+
|
|
117
|
+
if (!selection) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
var type = selection.type,
|
|
122
|
+
anchorNode = selection.anchorNode,
|
|
123
|
+
focusNode = selection.focusNode;
|
|
124
|
+
var rangeSelection = Boolean(type === 'Range' && anchorNode && focusNode);
|
|
125
|
+
|
|
126
|
+
if (!rangeSelection) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
var target = event.target;
|
|
131
|
+
var tableCell = target.closest('td,th');
|
|
132
|
+
var clickedInCell = Boolean(tableCell);
|
|
133
|
+
|
|
134
|
+
if (!clickedInCell) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
var anchorInCell = tableCell.contains(anchorNode);
|
|
139
|
+
var focusInCell = tableCell.contains(focusNode);
|
|
140
|
+
var selectionStartsOrEndsOutsideClickedCell = !(anchorInCell && focusInCell);
|
|
141
|
+
|
|
142
|
+
if (!selectionStartsOrEndsOutsideClickedCell) {
|
|
143
|
+
return;
|
|
144
|
+
} // If selection starts or ends in a different cell than the clicked cell,
|
|
145
|
+
// we select the node inside the clicked cell (or if both are in a different
|
|
146
|
+
// cell, we select the cell's contents instead). We want to select the nearest
|
|
147
|
+
// parent block, so that a whole line of text/content is selected (rather than
|
|
148
|
+
// selecting a span that would select one specific chunk of text).
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
var elementToSelect = anchorInCell ? (_parentElement = anchorNode.parentElement) === null || _parentElement === void 0 ? void 0 : _parentElement.closest('div,p') : focusInCell ? (_parentElement2 = focusNode.parentElement) === null || _parentElement2 === void 0 ? void 0 : _parentElement2.closest('div,p') : tableCell;
|
|
152
|
+
|
|
153
|
+
if (elementToSelect) {
|
|
154
|
+
selection.selectAllChildren(elementToSelect);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
101
158
|
_this.providerFactory = props.dataProviders || new ProviderFactory();
|
|
102
159
|
_this.serializer = new ReactSerializer(_this.deriveSerializerProps(props));
|
|
103
160
|
_this.editorRef = props.innerRef || /*#__PURE__*/React.createRef();
|
|
@@ -247,7 +304,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
247
304
|
var _this3 = this;
|
|
248
305
|
|
|
249
306
|
var _this$props = this.props,
|
|
250
|
-
|
|
307
|
+
adfDocument = _this$props.document,
|
|
251
308
|
onComplete = _this$props.onComplete,
|
|
252
309
|
onError = _this$props.onError,
|
|
253
310
|
appearance = _this$props.appearance,
|
|
@@ -272,12 +329,17 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
272
329
|
var handleWrapperOnClick = function handleWrapperOnClick(event) {
|
|
273
330
|
var _this3$props$eventHan;
|
|
274
331
|
|
|
332
|
+
var targetElement = event.target; // ED-14862: When a user triple clicks to select a line of content inside a
|
|
333
|
+
// a table cell, but the browser incorrectly moves the selection start or end into
|
|
334
|
+
// a different table cell, we manually set the selection back to within the original
|
|
335
|
+
// table cell the user intended to target
|
|
336
|
+
|
|
337
|
+
_this3.handleMouseTripleClickInTables(event);
|
|
338
|
+
|
|
275
339
|
if (!((_this3$props$eventHan = _this3.props.eventHandlers) !== null && _this3$props$eventHan !== void 0 && _this3$props$eventHan.onUnhandledClick)) {
|
|
276
340
|
return;
|
|
277
341
|
}
|
|
278
342
|
|
|
279
|
-
var targetElement = event.target;
|
|
280
|
-
|
|
281
343
|
if (!(targetElement instanceof window.Element)) {
|
|
282
344
|
return;
|
|
283
345
|
}
|
|
@@ -312,7 +374,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
312
374
|
|
|
313
375
|
var schema = this.getSchema(this.props.schema, this.props.adfStage);
|
|
314
376
|
|
|
315
|
-
var _renderDocument = renderDocument(
|
|
377
|
+
var _renderDocument = renderDocument(adfDocument, this.serializer, schema, adfStage, this.props.useSpecBasedValidator, this.id, this.fireAnalyticsEvent, this.props.unsupportedContentLevelsTracking, this.props.appearance),
|
|
316
378
|
result = _renderDocument.result,
|
|
317
379
|
stat = _renderDocument.stat,
|
|
318
380
|
pmDoc = _renderDocument.pmDoc;
|
package/dist/esm/version.json
CHANGED
package/dist/types/messages.d.ts
CHANGED
|
@@ -59,15 +59,3 @@ export declare const sortingIconMessages: {
|
|
|
59
59
|
description: string;
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
|
-
export declare const codeBlockCopyButtonMessages: {
|
|
63
|
-
copyCodeToClipboard: {
|
|
64
|
-
id: string;
|
|
65
|
-
defaultMessage: string;
|
|
66
|
-
description: string;
|
|
67
|
-
};
|
|
68
|
-
copiedCodeToClipboard: {
|
|
69
|
-
id: string;
|
|
70
|
-
defaultMessage: string;
|
|
71
|
-
description: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SharedTableProps } from './types';
|
|
3
|
-
export interface ScaleOptions {
|
|
4
|
-
renderWidth: number;
|
|
5
|
-
tableWidth: number;
|
|
6
|
-
maxScale: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const calcScalePercent: ({ renderWidth, tableWidth, maxScale, }: ScaleOptions) => number;
|
|
9
3
|
export declare const Colgroup: (props: SharedTableProps) => JSX.Element | null;
|
|
@@ -25,6 +25,7 @@ export declare class Renderer extends PureComponent<RendererProps> {
|
|
|
25
25
|
private fireAnalyticsEvent;
|
|
26
26
|
private getSchema;
|
|
27
27
|
private onMouseDownEditView;
|
|
28
|
+
private handleMouseTripleClickInTables;
|
|
28
29
|
render(): jsx.JSX.Element;
|
|
29
30
|
componentWillUnmount(): void;
|
|
30
31
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
3
|
+
import type { AnnotationActionResult, AnnotationByMatches } from '@atlaskit/editor-common/types';
|
|
4
|
+
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
5
|
+
import { Node, Schema, Mark } from 'prosemirror-model';
|
|
6
|
+
import { Step, RemoveMarkStep } from 'prosemirror-transform';
|
|
7
|
+
import { AnalyticsEventPayload } from '../analytics/events';
|
|
8
|
+
declare type ActionResult = {
|
|
9
|
+
step: Step;
|
|
10
|
+
doc: JSONDocNode;
|
|
11
|
+
} | false;
|
|
12
|
+
declare type Position = {
|
|
13
|
+
from: number;
|
|
14
|
+
to: number;
|
|
15
|
+
};
|
|
16
|
+
declare type Annotation = {
|
|
17
|
+
annotationId: string;
|
|
18
|
+
annotationType: AnnotationTypes;
|
|
19
|
+
};
|
|
20
|
+
export interface RendererActionsOptions {
|
|
21
|
+
annotate: (range: Range, annotationId: string, annotationType: 'inlineComment') => ActionResult;
|
|
22
|
+
deleteAnnotation: (annotationId: string, annotationType: 'inlineComment') => ActionResult;
|
|
23
|
+
isValidAnnotationRange: (range: Range) => boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare type ApplyAnnotation = (pos: Position, annotation: Annotation) => AnnotationActionResult;
|
|
26
|
+
export interface AnnotationsRendererActionsOptions {
|
|
27
|
+
isValidAnnotationPosition: (pos: Position) => boolean;
|
|
28
|
+
applyAnnotation: ApplyAnnotation;
|
|
29
|
+
getAnnotationMarks: () => Mark[];
|
|
30
|
+
}
|
|
31
|
+
export interface PositionRendererActionsOptions {
|
|
32
|
+
getPositionFromRange: (range: Range) => Position | false;
|
|
33
|
+
}
|
|
34
|
+
export default class RendererActions implements RendererActionsOptions, AnnotationsRendererActionsOptions, PositionRendererActionsOptions {
|
|
35
|
+
private initFromContext;
|
|
36
|
+
private transformer;
|
|
37
|
+
private doc?;
|
|
38
|
+
private schema?;
|
|
39
|
+
private ref?;
|
|
40
|
+
private onAnalyticsEvent?;
|
|
41
|
+
constructor(initFromContext?: boolean);
|
|
42
|
+
_privateRegisterRenderer(ref: React.MutableRefObject<null>, doc: Node, schema: Schema, onAnalyticsEvent?: (event: AnalyticsEventPayload) => void): void;
|
|
43
|
+
_privateUnregisterRenderer(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Validate whether we can create an annotation between two positions
|
|
46
|
+
*/
|
|
47
|
+
_privateValidatePositionsForAnnotation(from: number, to: number): boolean;
|
|
48
|
+
deleteAnnotation(annotationId: string, annotationType: 'inlineComment'): false | {
|
|
49
|
+
step: RemoveMarkStep<Schema<any, any>>;
|
|
50
|
+
doc: JSONDocNode;
|
|
51
|
+
};
|
|
52
|
+
annotate(range: Range, annotationId: string, annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
|
+
isValidAnnotationRange(range: Range): boolean;
|
|
54
|
+
isValidAnnotationPosition(pos: Position): boolean;
|
|
55
|
+
getPositionFromRange(range: Range): Position | false;
|
|
56
|
+
getAnnotationMarks(): Mark<any>[];
|
|
57
|
+
getAnnotationsByPosition(range: Range): string[];
|
|
58
|
+
applyAnnotation(pos: Position, annotation: Annotation): AnnotationActionResult;
|
|
59
|
+
generateAnnotationIndexMatch(pos: Position): AnnotationByMatches | false;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Node, Schema } from 'prosemirror-model';
|
|
2
|
+
export declare function getIndexMatch(doc: Node, schema: Schema, selectedText: string, startIndex: number): {
|
|
3
|
+
numMatches: number;
|
|
4
|
+
matchIndex: number;
|
|
5
|
+
textContent: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function countMatches(searchString: string, query: string): number;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { RendererActionsContext, RendererActionsContextConsumer } from './ui/RendererActionsContext';
|
|
2
|
+
import { WithRendererActions } from './ui/RendererActionsContext/WithRendererActions';
|
|
3
|
+
export { RendererActionsContext, RendererActionsContextConsumer, WithRendererActions, };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare enum EVENT_TYPE {
|
|
2
|
+
OPERATIONAL = "operational",
|
|
3
|
+
SCREEN = "screen",
|
|
4
|
+
TRACK = "track",
|
|
5
|
+
UI = "ui"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ACTION {
|
|
8
|
+
STARTED = "started",
|
|
9
|
+
RENDERED = "rendered",
|
|
10
|
+
RE_RENDERED = "reRendered",
|
|
11
|
+
RENDERER_TTI = "tti",
|
|
12
|
+
CRASHED = "unhandledErrorCaught",
|
|
13
|
+
INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
|
|
14
|
+
SELECT_ALL_CAUGHT = "selectAllCaught",
|
|
15
|
+
SELECT_ALL_ESCAPED = "selectAllEscaped",
|
|
16
|
+
CLICKED = "clicked",
|
|
17
|
+
VIEWED = "viewed",
|
|
18
|
+
VISITED = "visited",
|
|
19
|
+
SORT_COLUMN = "sortedColumn",
|
|
20
|
+
SORT_COLUMN_NOT_ALLOWED = "sortColumnNotAllowed",
|
|
21
|
+
TOGGLE_EXPAND = "toggleExpand",
|
|
22
|
+
INSERTED = "inserted",
|
|
23
|
+
OPENED = "opened",
|
|
24
|
+
CLOSED = "closed",
|
|
25
|
+
DELETED = "deleted",
|
|
26
|
+
EDITED = "edited",
|
|
27
|
+
RESOLVED = "resolved",
|
|
28
|
+
CREATE_NOT_ALLOWED = "createNotAllowed",
|
|
29
|
+
UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
|
|
30
|
+
UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED = "unsupportedContentLevelsTrackingErrored",
|
|
31
|
+
MEDIA_LINK_TRANSFORMED = "mediaLinkTransformed"
|
|
32
|
+
}
|
|
33
|
+
export declare enum ACTION_SUBJECT {
|
|
34
|
+
RENDERER = "renderer",
|
|
35
|
+
BUTTON = "button",
|
|
36
|
+
ANCHOR_LINK = "anchorLink",
|
|
37
|
+
TABLE = "table",
|
|
38
|
+
EXPAND = "expand",
|
|
39
|
+
NESTED_EXPAND = "nestedExpand",
|
|
40
|
+
MEDIA_SINGLE = "mediaSingle",
|
|
41
|
+
LINK = "link",
|
|
42
|
+
ANNOTATION = "annotation",
|
|
43
|
+
MEDIA = "media"
|
|
44
|
+
}
|
|
45
|
+
export declare enum ACTION_SUBJECT_ID {
|
|
46
|
+
HEADING_ANCHOR_LINK = "headingAnchorLink",
|
|
47
|
+
LINK = "link",
|
|
48
|
+
INLINE_COMMENT = "inlineComment"
|
|
49
|
+
}
|
|
50
|
+
export declare type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
|
|
51
|
+
action: Action;
|
|
52
|
+
actionSubject: ActionSubject;
|
|
53
|
+
actionSubjectId?: ActionSubjectID;
|
|
54
|
+
attributes?: Attributes;
|
|
55
|
+
eventType: EventType;
|
|
56
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, AEP, EVENT_TYPE, ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import { PropsDifference, SEVERITY, ShallowPropsDifference, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
5
|
+
export declare enum PLATFORM {
|
|
6
|
+
NATIVE = "mobileNative",
|
|
7
|
+
HYBRID = "mobileHybrid",
|
|
8
|
+
WEB = "web"
|
|
9
|
+
}
|
|
10
|
+
export declare enum MODE {
|
|
11
|
+
RENDERER = "renderer",
|
|
12
|
+
EDITOR = "editor"
|
|
13
|
+
}
|
|
14
|
+
declare type RendererStartAEP = AEP<ACTION.STARTED, ACTION_SUBJECT.RENDERER, undefined, {
|
|
15
|
+
platform: PLATFORM.WEB;
|
|
16
|
+
}, EVENT_TYPE.UI>;
|
|
17
|
+
declare type RendererRenderedAEP = AEP<ACTION.RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
|
|
18
|
+
platform: PLATFORM.WEB;
|
|
19
|
+
duration: number;
|
|
20
|
+
ttfb?: number;
|
|
21
|
+
nodes: Record<string, number>;
|
|
22
|
+
severity?: SEVERITY;
|
|
23
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
24
|
+
declare type RendererReRenderedAEP<Props> = AEP<ACTION.RE_RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
|
|
25
|
+
propsDifference: PropsDifference<Props> | ShallowPropsDifference<Props>;
|
|
26
|
+
count: number;
|
|
27
|
+
componentId?: string;
|
|
28
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
29
|
+
export declare type ComponentCrashErrorAEP = AEP<ACTION.CRASHED, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
|
|
30
|
+
platform: PLATFORM.WEB;
|
|
31
|
+
errorMessage?: string;
|
|
32
|
+
errorStack?: string;
|
|
33
|
+
componentStack?: string;
|
|
34
|
+
errorRethrown?: boolean;
|
|
35
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
36
|
+
declare type InvalidProsemirrorDocumentErrorAEP = AEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
|
|
37
|
+
platform: PLATFORM.WEB;
|
|
38
|
+
errorStack?: string;
|
|
39
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
40
|
+
declare type RendererUnsupportedContentLevelsTrackingSucceeded = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED, ACTION_SUBJECT.RENDERER, undefined, {
|
|
41
|
+
appearance?: string;
|
|
42
|
+
platform: PLATFORM.WEB;
|
|
43
|
+
unsupportedContentLevelSeverity: UNSUPPORTED_CONTENT_LEVEL_SEVERITY;
|
|
44
|
+
unsupportedContentLevelPercentage: number;
|
|
45
|
+
unsupportedNodesCount: number;
|
|
46
|
+
supportedNodesCount: number;
|
|
47
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
48
|
+
declare type RendererUnsupportedContentLevelsTrackingErrored = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED, ACTION_SUBJECT.RENDERER, undefined, {
|
|
49
|
+
platform: PLATFORM.WEB;
|
|
50
|
+
error: string;
|
|
51
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
52
|
+
declare type RendererSelectAllCaughtAEP = AEP<ACTION.SELECT_ALL_CAUGHT, ACTION_SUBJECT.RENDERER, undefined, {
|
|
53
|
+
platform: PLATFORM.WEB;
|
|
54
|
+
}, EVENT_TYPE.TRACK>;
|
|
55
|
+
declare type RendererSelectAllEscapedAEP = AEP<ACTION.SELECT_ALL_ESCAPED, ACTION_SUBJECT.RENDERER, undefined, {
|
|
56
|
+
platform: PLATFORM.WEB;
|
|
57
|
+
}, EVENT_TYPE.TRACK>;
|
|
58
|
+
declare type UIAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, EVENT_TYPE.UI>;
|
|
59
|
+
declare type ButtonAEP<ActionSubjectID, Attributes> = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.BUTTON, ActionSubjectID, Attributes>;
|
|
60
|
+
declare type AnchorLinkAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.ANCHOR_LINK, undefined, {
|
|
61
|
+
platform: PLATFORM.WEB;
|
|
62
|
+
mode: MODE.RENDERER;
|
|
63
|
+
}>;
|
|
64
|
+
declare type HeadingAnchorLinkButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.HEADING_ANCHOR_LINK, undefined>;
|
|
65
|
+
declare type TableSortColumnNotAllowedAEP = AEP<ACTION.SORT_COLUMN_NOT_ALLOWED, ACTION_SUBJECT.TABLE, undefined, {
|
|
66
|
+
platform: PLATFORM.WEB;
|
|
67
|
+
mode: MODE.RENDERER;
|
|
68
|
+
}, EVENT_TYPE.TRACK>;
|
|
69
|
+
declare type TableSortColumnAEP = AEP<ACTION.SORT_COLUMN, ACTION_SUBJECT.TABLE, undefined, {
|
|
70
|
+
platform: PLATFORM.WEB;
|
|
71
|
+
mode: MODE.RENDERER;
|
|
72
|
+
sortOrder: SortOrder;
|
|
73
|
+
columnIndex: number;
|
|
74
|
+
}, EVENT_TYPE.TRACK>;
|
|
75
|
+
declare type VisitLinkAEP = AEP<ACTION.VISITED, ACTION_SUBJECT.LINK, undefined, {
|
|
76
|
+
platform: PLATFORM.WEB;
|
|
77
|
+
mode: MODE.RENDERER;
|
|
78
|
+
}, EVENT_TYPE.TRACK>;
|
|
79
|
+
declare type VisitMediaLinkAEP = AEP<ACTION.VISITED, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.LINK, {
|
|
80
|
+
platform: PLATFORM.WEB;
|
|
81
|
+
mode: MODE.RENDERER;
|
|
82
|
+
}, EVENT_TYPE.TRACK>;
|
|
83
|
+
declare type ExpandAEP = AEP<ACTION.TOGGLE_EXPAND, ACTION_SUBJECT.EXPAND | ACTION_SUBJECT.NESTED_EXPAND, undefined, {
|
|
84
|
+
platform: PLATFORM.WEB;
|
|
85
|
+
mode: MODE.RENDERER;
|
|
86
|
+
expanded: boolean;
|
|
87
|
+
}, EVENT_TYPE.TRACK>;
|
|
88
|
+
export declare type AnnotationActionType = ACTION.INSERTED | ACTION.CLOSED | ACTION.EDITED | ACTION.DELETED | ACTION.OPENED | ACTION.RESOLVED | ACTION.VIEWED | ACTION.CREATE_NOT_ALLOWED;
|
|
89
|
+
export declare type AnnotationAEPAttributes = AnnotationDraftAEPAttributes | AnnotationResolvedAEPAttributes;
|
|
90
|
+
export declare type AnnotationDraftAEPAttributes = {
|
|
91
|
+
overlap?: number;
|
|
92
|
+
};
|
|
93
|
+
export declare type AnnotationResolvedAEPAttributes = {
|
|
94
|
+
method?: RESOLVE_METHOD;
|
|
95
|
+
};
|
|
96
|
+
export declare type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, undefined, EVENT_TYPE.TRACK>;
|
|
97
|
+
export declare enum RESOLVE_METHOD {
|
|
98
|
+
COMPONENT = "component",
|
|
99
|
+
CONSUMER = "consumer",
|
|
100
|
+
ORPHANED = "orphaned"
|
|
101
|
+
}
|
|
102
|
+
export declare type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
103
|
+
declare type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
|
|
104
|
+
declare type RendererTTIAEP = AEP<ACTION.RENDERER_TTI, ACTION_SUBJECT.RENDERER, undefined, {
|
|
105
|
+
tti: number;
|
|
106
|
+
ttiFromInvocation: number;
|
|
107
|
+
canceled: boolean;
|
|
108
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
109
|
+
export declare type AnalyticsEventPayload<T = void> = RendererStartAEP | RendererRenderedAEP | RendererReRenderedAEP<T> | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | HeadingAnchorLinkButtonAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | RendererTTIAEP;
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { AnalyticsEventPayload } from './events';
|
|
3
|
+
declare type DispatchAnalyticsEvent = (event: AnalyticsEventPayload) => void;
|
|
4
|
+
declare type DocumentData = {
|
|
5
|
+
rendererId: string;
|
|
6
|
+
doc: any;
|
|
7
|
+
appearance?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const trackUnsupportedContentLevels: (item: DocumentData, trackingOptions: UnsupportedContentLevelsTracking, dispatchAnalyticsEvent: DispatchAnalyticsEvent) => void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const RendererCssClassName: {
|
|
2
|
+
DOCUMENT: string;
|
|
3
|
+
EXTENSION: string;
|
|
4
|
+
EXTENSION_CENTER_ALIGN: string;
|
|
5
|
+
EXTENSION_OVERFLOW_CONTAINER: string;
|
|
6
|
+
NUMBER_COLUMN: string;
|
|
7
|
+
SORTABLE_COLUMN: string;
|
|
8
|
+
SORTABLE_COLUMN_BUTTON: string;
|
|
9
|
+
SORTABLE_COLUMN_NOT_ALLOWED: string;
|
|
10
|
+
SORTABLE_COLUMN_ICON: string;
|
|
11
|
+
SORTABLE_COLUMN_NO_ORDER: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
3
|
+
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
4
|
+
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
5
|
+
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
6
|
+
'fabric.editor.headingLink.copied': string;
|
|
7
|
+
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
8
|
+
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
9
|
+
'fabric.editor.headingLink.descOrderLabel': string;
|
|
10
|
+
'fabric.editor.headingLink.failedToCopy': string;
|
|
11
|
+
'fabric.editor.headingLink.noOrderLabel': string;
|
|
12
|
+
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* NOTE:
|
|
16
|
+
*
|
|
17
|
+
* This file is automatically generated by Traduki 2.0.
|
|
18
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
19
|
+
*/
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'fabric.editor.codeBlockCopyButton.copiedToClipboard': string;
|
|
3
|
+
'fabric.editor.codeBlockCopyButton.copyToClipboard': string;
|
|
4
|
+
'fabric.editor.headingLink.ascOrderLabel': string;
|
|
5
|
+
'fabric.editor.headingLink.ascSortingLabel': string;
|
|
6
|
+
'fabric.editor.headingLink.copied': string;
|
|
7
|
+
'fabric.editor.headingLink.copyAnchorLink': string;
|
|
8
|
+
'fabric.editor.headingLink.copyAriaLabel': string;
|
|
9
|
+
'fabric.editor.headingLink.descOrderLabel': string;
|
|
10
|
+
'fabric.editor.headingLink.failedToCopy': string;
|
|
11
|
+
'fabric.editor.headingLink.noOrderLabel': string;
|
|
12
|
+
'fabric.editor.headingLink.noneSortingLabel': string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* NOTE:
|
|
16
|
+
*
|
|
17
|
+
* This file is automatically generated by Traduki 2.0.
|
|
18
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
19
|
+
*/
|
|
20
|
+
export default _default;
|