@atlaskit/renderer 112.7.12 → 112.7.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/actions/index.js +6 -0
- package/dist/cjs/actions/matches-utils.js +6 -0
- package/dist/cjs/analytics/unsupported-content.js +7 -0
- package/dist/cjs/react/index.js +61 -10
- package/dist/cjs/react/marks/alignment.js +5 -5
- package/dist/cjs/react/marks/annotation.js +8 -3
- package/dist/cjs/react/marks/breakout.js +2 -0
- package/dist/cjs/react/marks/code.js +2 -0
- package/dist/cjs/react/marks/confluence-inline-comment.js +2 -0
- package/dist/cjs/react/marks/data-consumer.js +2 -0
- package/dist/cjs/react/marks/em.js +2 -0
- package/dist/cjs/react/marks/fragment.js +2 -0
- package/dist/cjs/react/marks/index.js +3 -0
- package/dist/cjs/react/marks/link.js +2 -0
- package/dist/cjs/react/marks/strike.js +5 -8
- package/dist/cjs/react/marks/strong.js +2 -0
- package/dist/cjs/react/marks/subsup.js +5 -0
- package/dist/cjs/react/marks/underline.js +2 -0
- package/dist/cjs/react/marks/unsupportedMark.js +2 -0
- package/dist/cjs/react/marks/unsupportedNodeAttribute.js +2 -0
- package/dist/cjs/react/nodes/TableStickyScrollbar.js +17 -1
- package/dist/cjs/react/nodes/blockCard.js +6 -0
- package/dist/cjs/react/nodes/bodiedExtension.js +8 -2
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -3
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +5 -1
- package/dist/cjs/react/nodes/date.js +13 -11
- package/dist/cjs/react/nodes/decisionList.js +2 -0
- package/dist/cjs/react/nodes/doc.js +5 -0
- package/dist/cjs/react/nodes/embedCard.js +42 -36
- package/dist/cjs/react/nodes/emoji.js +13 -9
- package/dist/cjs/react/nodes/extension.js +8 -2
- package/dist/cjs/react/nodes/fallback.js +6 -1
- package/dist/cjs/react/nodes/heading-anchor.js +9 -6
- package/dist/cjs/react/nodes/heading.js +16 -11
- package/dist/cjs/react/nodes/index.js +12 -1
- package/dist/cjs/react/nodes/inline.js +2 -0
- package/dist/cjs/react/nodes/inlineCard.js +8 -0
- package/dist/cjs/react/nodes/inlineExtension.js +20 -15
- package/dist/cjs/react/nodes/media/index.js +17 -1
- package/dist/cjs/react/nodes/mediaGroup.js +21 -7
- package/dist/cjs/react/nodes/mediaInline.js +2 -0
- package/dist/cjs/react/nodes/mediaSingle/index.js +21 -0
- package/dist/cjs/react/nodes/mention.js +13 -8
- package/dist/cjs/react/nodes/multiBodiedExtension.js +10 -2
- package/dist/cjs/react/nodes/orderedList.js +2 -0
- package/dist/cjs/react/nodes/panel.js +3 -1
- package/dist/cjs/react/nodes/paragraph.js +2 -0
- package/dist/cjs/react/nodes/status.js +16 -11
- package/dist/cjs/react/nodes/table/colgroup.js +6 -2
- package/dist/cjs/react/nodes/table/sticky.js +13 -0
- package/dist/cjs/react/nodes/table.js +31 -2
- package/dist/cjs/react/nodes/tableCell.js +18 -1
- package/dist/cjs/react/nodes/tableRow.js +2 -0
- package/dist/cjs/react/nodes/task-item-with-providers.js +3 -0
- package/dist/cjs/react/nodes/taskItem.js +4 -0
- package/dist/cjs/react/nodes/taskList.js +2 -0
- package/dist/cjs/react/utils/render-text-segments.js +2 -0
- package/dist/cjs/react/utils/segment-text.js +4 -1
- package/dist/cjs/react/utils/use-select-all-trap.js +11 -0
- package/dist/cjs/render-document.js +11 -2
- package/dist/cjs/steps/index.js +6 -1
- package/dist/cjs/text/index.js +3 -0
- package/dist/cjs/ui/Expand.js +7 -3
- package/dist/cjs/ui/ExtensionRenderer.js +3 -0
- package/dist/cjs/ui/MediaCard.js +34 -19
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +4 -0
- package/dist/cjs/ui/Renderer/breakout-ssr.js +28 -2
- package/dist/cjs/ui/Renderer/count-nodes.js +2 -0
- package/dist/cjs/ui/Renderer/index.js +68 -7
- package/dist/cjs/ui/Renderer/style.js +12 -7
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +3 -0
- package/dist/cjs/ui/SmartCardStorage.js +6 -1
- package/dist/cjs/ui/annotations/context.js +3 -0
- package/dist/cjs/ui/annotations/draft/component.js +24 -12
- package/dist/cjs/ui/annotations/element/mark.js +5 -0
- package/dist/cjs/ui/annotations/element/useInlineAnnotationProps.js +7 -1
- package/dist/cjs/ui/annotations/hooks/user-selection.js +9 -1
- package/dist/cjs/ui/annotations/hover/mounter.js +4 -1
- package/dist/cjs/ui/annotations/selection/mounter.js +4 -1
- package/dist/cjs/ui/annotations/wrapper.js +8 -2
- package/dist/cjs/utils.js +9 -1
- package/dist/es2019/actions/index.js +6 -0
- package/dist/es2019/actions/matches-utils.js +6 -0
- package/dist/es2019/analytics/unsupported-content.js +8 -0
- package/dist/es2019/react/index.js +67 -10
- package/dist/es2019/react/marks/alignment.js +5 -5
- package/dist/es2019/react/marks/annotation.js +8 -3
- package/dist/es2019/react/marks/breakout.js +2 -0
- package/dist/es2019/react/marks/code.js +2 -0
- package/dist/es2019/react/marks/confluence-inline-comment.js +2 -0
- package/dist/es2019/react/marks/data-consumer.js +2 -0
- package/dist/es2019/react/marks/em.js +2 -0
- package/dist/es2019/react/marks/fragment.js +2 -0
- package/dist/es2019/react/marks/index.js +3 -0
- package/dist/es2019/react/marks/link.js +2 -0
- package/dist/es2019/react/marks/strike.js +5 -8
- package/dist/es2019/react/marks/strong.js +2 -0
- package/dist/es2019/react/marks/subsup.js +5 -0
- package/dist/es2019/react/marks/underline.js +2 -0
- package/dist/es2019/react/marks/unsupportedMark.js +2 -0
- package/dist/es2019/react/marks/unsupportedNodeAttribute.js +2 -0
- package/dist/es2019/react/nodes/TableStickyScrollbar.js +16 -1
- package/dist/es2019/react/nodes/blockCard.js +6 -0
- package/dist/es2019/react/nodes/bodiedExtension.js +8 -2
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +4 -1
- package/dist/es2019/react/nodes/date.js +13 -11
- package/dist/es2019/react/nodes/decisionList.js +2 -0
- package/dist/es2019/react/nodes/doc.js +6 -0
- package/dist/es2019/react/nodes/embedCard.js +42 -36
- package/dist/es2019/react/nodes/emoji.js +13 -9
- package/dist/es2019/react/nodes/extension.js +8 -2
- package/dist/es2019/react/nodes/fallback.js +6 -1
- package/dist/es2019/react/nodes/heading-anchor.js +10 -6
- package/dist/es2019/react/nodes/heading.js +16 -11
- package/dist/es2019/react/nodes/index.js +13 -1
- package/dist/es2019/react/nodes/inline.js +3 -0
- package/dist/es2019/react/nodes/inlineCard.js +8 -0
- package/dist/es2019/react/nodes/inlineExtension.js +21 -16
- package/dist/es2019/react/nodes/media/index.js +17 -1
- package/dist/es2019/react/nodes/mediaGroup.js +14 -1
- package/dist/es2019/react/nodes/mediaInline.js +2 -0
- package/dist/es2019/react/nodes/mediaSingle/index.js +21 -0
- package/dist/es2019/react/nodes/mention.js +13 -8
- package/dist/es2019/react/nodes/multiBodiedExtension.js +10 -2
- package/dist/es2019/react/nodes/orderedList.js +2 -0
- package/dist/es2019/react/nodes/panel.js +3 -1
- package/dist/es2019/react/nodes/paragraph.js +2 -0
- package/dist/es2019/react/nodes/status.js +16 -11
- package/dist/es2019/react/nodes/table/colgroup.js +6 -2
- package/dist/es2019/react/nodes/table/sticky.js +13 -0
- package/dist/es2019/react/nodes/table.js +32 -3
- package/dist/es2019/react/nodes/tableCell.js +18 -1
- package/dist/es2019/react/nodes/tableRow.js +2 -0
- package/dist/es2019/react/nodes/task-item-with-providers.js +3 -0
- package/dist/es2019/react/nodes/taskItem.js +4 -0
- package/dist/es2019/react/nodes/taskList.js +2 -0
- package/dist/es2019/react/utils/render-text-segments.js +2 -0
- package/dist/es2019/react/utils/segment-text.js +4 -1
- package/dist/es2019/react/utils/use-select-all-trap.js +11 -0
- package/dist/es2019/render-document.js +11 -2
- package/dist/es2019/steps/index.js +6 -1
- package/dist/es2019/text/index.js +3 -0
- package/dist/es2019/ui/Expand.js +7 -3
- package/dist/es2019/ui/ExtensionRenderer.js +3 -0
- package/dist/es2019/ui/MediaCard.js +34 -19
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +4 -0
- package/dist/es2019/ui/Renderer/breakout-ssr.js +28 -2
- package/dist/es2019/ui/Renderer/count-nodes.js +3 -0
- package/dist/es2019/ui/Renderer/index.js +68 -7
- package/dist/es2019/ui/Renderer/style.js +47 -37
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +3 -0
- package/dist/es2019/ui/SmartCardStorage.js +6 -1
- package/dist/es2019/ui/annotations/context.js +3 -0
- package/dist/es2019/ui/annotations/draft/component.js +24 -12
- package/dist/es2019/ui/annotations/element/mark.js +5 -0
- package/dist/es2019/ui/annotations/element/useInlineAnnotationProps.js +7 -1
- package/dist/es2019/ui/annotations/hooks/user-selection.js +9 -1
- package/dist/es2019/ui/annotations/hover/mounter.js +4 -1
- package/dist/es2019/ui/annotations/selection/mounter.js +4 -1
- package/dist/es2019/ui/annotations/wrapper.js +8 -2
- package/dist/es2019/utils.js +12 -1
- package/dist/esm/actions/index.js +6 -0
- package/dist/esm/actions/matches-utils.js +6 -0
- package/dist/esm/analytics/unsupported-content.js +8 -0
- package/dist/esm/react/index.js +61 -10
- package/dist/esm/react/marks/alignment.js +5 -5
- package/dist/esm/react/marks/annotation.js +8 -3
- package/dist/esm/react/marks/breakout.js +2 -0
- package/dist/esm/react/marks/code.js +2 -0
- package/dist/esm/react/marks/confluence-inline-comment.js +2 -0
- package/dist/esm/react/marks/data-consumer.js +2 -0
- package/dist/esm/react/marks/em.js +2 -0
- package/dist/esm/react/marks/fragment.js +2 -0
- package/dist/esm/react/marks/index.js +3 -0
- package/dist/esm/react/marks/link.js +2 -0
- package/dist/esm/react/marks/strike.js +5 -8
- package/dist/esm/react/marks/strong.js +2 -0
- package/dist/esm/react/marks/subsup.js +5 -0
- package/dist/esm/react/marks/underline.js +2 -0
- package/dist/esm/react/marks/unsupportedMark.js +2 -0
- package/dist/esm/react/marks/unsupportedNodeAttribute.js +2 -0
- package/dist/esm/react/nodes/TableStickyScrollbar.js +17 -1
- package/dist/esm/react/nodes/blockCard.js +6 -0
- package/dist/esm/react/nodes/bodiedExtension.js +8 -2
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -3
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +5 -1
- package/dist/esm/react/nodes/date.js +13 -11
- package/dist/esm/react/nodes/decisionList.js +2 -0
- package/dist/esm/react/nodes/doc.js +6 -0
- package/dist/esm/react/nodes/embedCard.js +42 -36
- package/dist/esm/react/nodes/emoji.js +13 -9
- package/dist/esm/react/nodes/extension.js +8 -2
- package/dist/esm/react/nodes/fallback.js +6 -1
- package/dist/esm/react/nodes/heading-anchor.js +9 -6
- package/dist/esm/react/nodes/heading.js +16 -11
- package/dist/esm/react/nodes/index.js +13 -1
- package/dist/esm/react/nodes/inline.js +3 -0
- package/dist/esm/react/nodes/inlineCard.js +8 -0
- package/dist/esm/react/nodes/inlineExtension.js +20 -15
- package/dist/esm/react/nodes/media/index.js +17 -1
- package/dist/esm/react/nodes/mediaGroup.js +21 -7
- package/dist/esm/react/nodes/mediaInline.js +2 -0
- package/dist/esm/react/nodes/mediaSingle/index.js +21 -0
- package/dist/esm/react/nodes/mention.js +13 -8
- package/dist/esm/react/nodes/multiBodiedExtension.js +10 -2
- package/dist/esm/react/nodes/orderedList.js +2 -0
- package/dist/esm/react/nodes/panel.js +3 -1
- package/dist/esm/react/nodes/paragraph.js +2 -0
- package/dist/esm/react/nodes/status.js +16 -11
- package/dist/esm/react/nodes/table/colgroup.js +6 -2
- package/dist/esm/react/nodes/table/sticky.js +13 -0
- package/dist/esm/react/nodes/table.js +31 -2
- package/dist/esm/react/nodes/tableCell.js +18 -1
- package/dist/esm/react/nodes/tableRow.js +2 -0
- package/dist/esm/react/nodes/task-item-with-providers.js +3 -0
- package/dist/esm/react/nodes/taskItem.js +4 -0
- package/dist/esm/react/nodes/taskList.js +2 -0
- package/dist/esm/react/utils/render-text-segments.js +2 -0
- package/dist/esm/react/utils/segment-text.js +4 -1
- package/dist/esm/react/utils/use-select-all-trap.js +11 -0
- package/dist/esm/render-document.js +11 -2
- package/dist/esm/steps/index.js +6 -1
- package/dist/esm/text/index.js +3 -0
- package/dist/esm/ui/Expand.js +7 -3
- package/dist/esm/ui/ExtensionRenderer.js +3 -0
- package/dist/esm/ui/MediaCard.js +34 -19
- package/dist/esm/ui/Renderer/ErrorBoundary.js +4 -0
- package/dist/esm/ui/Renderer/breakout-ssr.js +28 -2
- package/dist/esm/ui/Renderer/count-nodes.js +3 -0
- package/dist/esm/ui/Renderer/index.js +68 -7
- package/dist/esm/ui/Renderer/style.js +12 -7
- package/dist/esm/ui/Renderer/truncated-wrapper.js +3 -0
- package/dist/esm/ui/SmartCardStorage.js +6 -1
- package/dist/esm/ui/annotations/context.js +3 -0
- package/dist/esm/ui/annotations/draft/component.js +24 -12
- package/dist/esm/ui/annotations/element/mark.js +5 -0
- package/dist/esm/ui/annotations/element/useInlineAnnotationProps.js +7 -1
- package/dist/esm/ui/annotations/hooks/user-selection.js +9 -1
- package/dist/esm/ui/annotations/hover/mounter.js +4 -1
- package/dist/esm/ui/annotations/selection/mounter.js +4 -1
- package/dist/esm/ui/annotations/wrapper.js +8 -2
- package/dist/esm/utils.js +10 -1
- package/dist/types/analytics/events.d.ts +1 -2
- package/dist/types/react/marks/confluence-inline-comment.d.ts +1 -1
- package/dist/types/react/nodes/decisionList.d.ts +1 -1
- package/dist/types/react/nodes/index.d.ts +1 -1
- package/dist/types/react/nodes/taskItem.d.ts +1 -1
- package/dist/types/react/nodes/taskList.d.ts +1 -1
- package/dist/types/react/types.d.ts +2 -2
- package/dist/types/utils.d.ts +1 -2
- package/dist/types-ts4.5/analytics/events.d.ts +1 -2
- package/dist/types-ts4.5/react/marks/confluence-inline-comment.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/decisionList.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/index.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/taskItem.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/taskList.d.ts +1 -1
- package/dist/types-ts4.5/react/types.d.ts +2 -2
- package/dist/types-ts4.5/utils.d.ts +1 -2
- package/docs/0-intro.tsx +14 -1
- package/package.json +1 -1
- package/tsconfig.json +0 -1
|
@@ -33,6 +33,9 @@ export function createBreakoutInlineScript(id) {
|
|
|
33
33
|
return "\n (function(window){\n ".concat(breakoutInlineScriptContext, ";\n (").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts, ").concat(Boolean(fg('platform-fix-table-ssr-resizing')), ");\n })(window);\n");
|
|
34
34
|
}
|
|
35
35
|
export var breakoutInlineScriptContext = "\n var breakoutConsts = ".concat(JSON.stringify(breakoutConsts), ";\n breakoutConsts.mapBreakpointToLayoutMaxWidth = ").concat(breakoutConsts.mapBreakpointToLayoutMaxWidth.toString(), ";\n breakoutConsts.getBreakpoint = ").concat(breakoutConsts.getBreakpoint.toString(), ";\n breakoutConsts.calcBreakoutWidth = ").concat(breakoutConsts.calcBreakoutWidth.toString(), ";\n breakoutConsts.calcBreakoutWithCustomWidth = ").concat(breakoutConsts.calcBreakoutWithCustomWidth.toString(), ";\n breakoutConsts.calcLineLength = ").concat(breakoutConsts.calcLineLength.toString(), ";\n breakoutConsts.calcWideWidth = ").concat(breakoutConsts.calcWideWidth.toString(), ";\n breakoutConsts.FullPagePadding = ").concat(FullPagePadding.toString(), ";\n");
|
|
36
|
+
|
|
37
|
+
// Ignored via go/ees005
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36
39
|
function applyBreakoutAfterSSR(id, breakoutConsts, shouldFixTableResizing) {
|
|
37
40
|
var MEDIA_NODE_TYPE = 'mediaSingle';
|
|
38
41
|
var WIDE_LAYOUT_MODES = ['full-width', 'wide', 'custom'];
|
|
@@ -59,6 +62,9 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldFixTableResizing) {
|
|
|
59
62
|
if (item.target.nodeType !== Node.ELEMENT_NODE) {
|
|
60
63
|
return;
|
|
61
64
|
}
|
|
65
|
+
|
|
66
|
+
// Ignored via go/ees005
|
|
67
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
62
68
|
if (item.target.classList.contains('ak-renderer-document')) {
|
|
63
69
|
item.addedNodes.forEach(function (maybeNode) {
|
|
64
70
|
// maybeNode may contain comments which doesn't have a dataset property
|
|
@@ -66,6 +72,8 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldFixTableResizing) {
|
|
|
66
72
|
return;
|
|
67
73
|
}
|
|
68
74
|
var width;
|
|
75
|
+
// Ignored via go/ees005
|
|
76
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
69
77
|
var node = maybeNode;
|
|
70
78
|
var mode = node.dataset.mode || node.dataset.layout || '';
|
|
71
79
|
var resizedBreakout = node.dataset.hasWidth === 'true';
|
|
@@ -76,12 +84,19 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldFixTableResizing) {
|
|
|
76
84
|
// When flag is on we are using CSS to calculate the table width thus don't need logic below to set the width and left.
|
|
77
85
|
if (!shouldFixTableResizing) {
|
|
78
86
|
if (node.classList.contains('pm-table-container') && mode === 'custom') {
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
79
89
|
var rendererWidth = renderer.offsetWidth;
|
|
80
90
|
var effectiveWidth = rendererWidth - breakoutConsts.padding;
|
|
81
91
|
width = "".concat(Math.min(parseInt(node.style.width), effectiveWidth), "px");
|
|
82
92
|
} else if (resizedBreakout) {
|
|
83
|
-
width = breakoutConsts.calcBreakoutWithCustomWidth(mode, node.dataset.width || null,
|
|
93
|
+
width = breakoutConsts.calcBreakoutWithCustomWidth(mode, node.dataset.width || null,
|
|
94
|
+
// Ignored via go/ees005
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
96
|
+
renderer.offsetWidth);
|
|
84
97
|
} else {
|
|
98
|
+
// Ignored via go/ees005
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
85
100
|
width = breakoutConsts.calcBreakoutWidth(mode, renderer.offsetWidth);
|
|
86
101
|
}
|
|
87
102
|
if (node.style.width === width) {
|
|
@@ -92,7 +107,10 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldFixTableResizing) {
|
|
|
92
107
|
// Tables require some special logic, as they are not using common css transform approach,
|
|
93
108
|
// because it breaks with sticky headers. This logic is copied from a table node:
|
|
94
109
|
// https://bitbucket.org/atlassian/atlassian-frontend/src/77938aee0c140d02ff99b98a03849be1236865b4/packages/editor/renderer/src/react/nodes/table.tsx#table.tsx-235:245
|
|
95
|
-
if (node.classList.contains('pm-table-container') &&
|
|
110
|
+
if (node.classList.contains('pm-table-container') &&
|
|
111
|
+
// Ignored via go/ees005
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
113
|
+
!renderer.classList.contains('is-full-width')) {
|
|
96
114
|
var lineLength = breakoutConsts.calcLineLength();
|
|
97
115
|
var left = lineLength / 2 - parseInt(width) / 2;
|
|
98
116
|
if (left < 0 && parseInt(width) > lineLength) {
|
|
@@ -111,7 +129,11 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldFixTableResizing) {
|
|
|
111
129
|
* So nested media elements which are not immediately loaded as sub children are not available in the above conditional.
|
|
112
130
|
* Thus adding this conditional to deal with all media elements directly.
|
|
113
131
|
*/
|
|
132
|
+
// Ignored via go/ees005
|
|
133
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
114
134
|
item.target.dataset.nodeType === MEDIA_NODE_TYPE) {
|
|
135
|
+
// Ignored via go/ees005
|
|
136
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
115
137
|
applyMediaBreakout(item.target);
|
|
116
138
|
}
|
|
117
139
|
});
|
|
@@ -158,8 +180,12 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldFixTableResizing) {
|
|
|
158
180
|
*/
|
|
159
181
|
var disconnect = function disconnect() {
|
|
160
182
|
observer.disconnect();
|
|
183
|
+
// Ignored via go/ees005
|
|
184
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
161
185
|
window.removeEventListener('load', disconnect);
|
|
162
186
|
};
|
|
187
|
+
// Ignored via go/ees005
|
|
188
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
163
189
|
window.addEventListener('load', disconnect);
|
|
164
190
|
}
|
|
165
191
|
export var calcLineLength = breakoutConsts.calcLineLength;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { reduce } from '@atlaskit/adf-utils/traverse';
|
|
2
|
+
|
|
3
|
+
// Ignored via go/ees005
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2
5
|
export function countNodes(adfDocument) {
|
|
3
6
|
return reduce(adfDocument, function (acc, node) {
|
|
4
7
|
acc[node.type] = (acc[node.type] || 0) + 1;
|
|
@@ -54,7 +54,7 @@ import { TruncatedWrapper } from './truncated-wrapper';
|
|
|
54
54
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
55
55
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
var packageName = "@atlaskit/renderer";
|
|
57
|
-
var packageVersion = "112.7.
|
|
57
|
+
var packageVersion = "112.7.13";
|
|
58
58
|
var setAsQueryContainerStyles = css({
|
|
59
59
|
containerName: 'ak-renderer-wrapper',
|
|
60
60
|
containerType: 'inline-size',
|
|
@@ -125,13 +125,19 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
125
125
|
if (!rangeSelection) {
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
+
// Ignored via go/ees005
|
|
129
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
128
130
|
var target = event.target;
|
|
129
131
|
var tableCell = target.closest('td,th');
|
|
130
132
|
var clickedInCell = Boolean(tableCell);
|
|
131
133
|
if (!clickedInCell) {
|
|
132
134
|
return;
|
|
133
135
|
}
|
|
136
|
+
// Ignored via go/ees005
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
134
138
|
var anchorInCell = tableCell.contains(anchorNode);
|
|
139
|
+
// Ignored via go/ees005
|
|
140
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
135
141
|
var focusInCell = tableCell.contains(focusNode);
|
|
136
142
|
var selectionStartsOrEndsOutsideClickedCell = !(anchorInCell && focusInCell);
|
|
137
143
|
if (!selectionStartsOrEndsOutsideClickedCell) {
|
|
@@ -142,7 +148,11 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
142
148
|
// cell, we select the cell's contents instead). We want to select the nearest
|
|
143
149
|
// parent block, so that a whole line of text/content is selected (rather than
|
|
144
150
|
// selecting a span that would select one specific chunk of text).
|
|
145
|
-
var elementToSelect = anchorInCell ?
|
|
151
|
+
var elementToSelect = anchorInCell ? // Ignored via go/ees005
|
|
152
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
153
|
+
(_parentElement = anchorNode.parentElement) === null || _parentElement === void 0 ? void 0 : _parentElement.closest('div,p') : focusInCell ? // Ignored via go/ees005
|
|
154
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
155
|
+
(_parentElement2 = focusNode.parentElement) === null || _parentElement2 === void 0 ? void 0 : _parentElement2.closest('div,p') : tableCell;
|
|
146
156
|
if (elementToSelect) {
|
|
147
157
|
selection.selectAllChildren(elementToSelect);
|
|
148
158
|
}
|
|
@@ -207,7 +217,10 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
207
217
|
attributes: {
|
|
208
218
|
platform: PLATFORM.WEB,
|
|
209
219
|
duration: duration,
|
|
210
|
-
distortedDuration:
|
|
220
|
+
distortedDuration:
|
|
221
|
+
// Ignored via go/ees005
|
|
222
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
223
|
+
_this2.renderedMeasurementDistortedDurationMonitor.distortedDuration,
|
|
211
224
|
ttfb: getResponseEndTime(),
|
|
212
225
|
nodes: countNodes(_this2.props.document),
|
|
213
226
|
severity: severity
|
|
@@ -215,12 +228,18 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
215
228
|
eventType: EVENT_TYPE.OPERATIONAL
|
|
216
229
|
});
|
|
217
230
|
}
|
|
231
|
+
|
|
232
|
+
// Ignored via go/ees005
|
|
233
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
218
234
|
_this2.renderedMeasurementDistortedDurationMonitor.cleanup();
|
|
219
235
|
delete _this2.renderedMeasurementDistortedDurationMonitor;
|
|
220
236
|
});
|
|
221
237
|
_this2.anchorLinkAnalytics();
|
|
222
238
|
});
|
|
223
239
|
}
|
|
240
|
+
|
|
241
|
+
// Ignored via go/ees005
|
|
242
|
+
// eslint-disable-next-line react/no-unsafe
|
|
224
243
|
}, {
|
|
225
244
|
key: "UNSAFE_componentWillReceiveProps",
|
|
226
245
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
@@ -311,6 +330,8 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
311
330
|
*/
|
|
312
331
|
var handleWrapperOnClick = function handleWrapperOnClick(event) {
|
|
313
332
|
var _this3$props$eventHan;
|
|
333
|
+
// Ignored via go/ees005
|
|
334
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
314
335
|
var targetElement = event.target;
|
|
315
336
|
|
|
316
337
|
// ED-14862: When a user triple clicks to select a line of content inside a
|
|
@@ -324,6 +345,9 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
324
345
|
if (!(targetElement instanceof window.Element)) {
|
|
325
346
|
return;
|
|
326
347
|
}
|
|
348
|
+
|
|
349
|
+
// Ignored via go/ees005
|
|
350
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
327
351
|
var rendererWrapper = event.currentTarget;
|
|
328
352
|
|
|
329
353
|
// Check if the click was on an interactive element
|
|
@@ -454,13 +478,19 @@ var handleMouseTripleClickInTables = function handleMouseTripleClickInTables(eve
|
|
|
454
478
|
if (!rangeSelection) {
|
|
455
479
|
return;
|
|
456
480
|
}
|
|
481
|
+
// Ignored via go/ees005
|
|
482
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
457
483
|
var target = event.target;
|
|
458
484
|
var tableCell = target.closest('td,th');
|
|
459
485
|
var clickedInCell = Boolean(tableCell);
|
|
460
486
|
if (!clickedInCell) {
|
|
461
487
|
return;
|
|
462
488
|
}
|
|
489
|
+
// Ignored via go/ees005
|
|
490
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
463
491
|
var anchorInCell = tableCell.contains(anchorNode);
|
|
492
|
+
// Ignored via go/ees005
|
|
493
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
464
494
|
var focusInCell = tableCell.contains(focusNode);
|
|
465
495
|
var selectionStartsOrEndsOutsideClickedCell = !(anchorInCell && focusInCell);
|
|
466
496
|
if (!selectionStartsOrEndsOutsideClickedCell) {
|
|
@@ -475,7 +505,11 @@ var handleMouseTripleClickInTables = function handleMouseTripleClickInTables(eve
|
|
|
475
505
|
// selection isn't reported; if not in `onMouseDown`, a click outside the selection will
|
|
476
506
|
// return an empty selection, which will erroneously fire onUnhandledClick.
|
|
477
507
|
|
|
478
|
-
var elementToSelect = anchorInCell ?
|
|
508
|
+
var elementToSelect = anchorInCell ? // Ignored via go/ees005
|
|
509
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
510
|
+
(_parentElement3 = anchorNode.parentElement) === null || _parentElement3 === void 0 ? void 0 : _parentElement3.closest('div,p') : focusInCell ? // Ignored via go/ees005
|
|
511
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
512
|
+
(_parentElement4 = focusNode.parentElement) === null || _parentElement4 === void 0 ? void 0 : _parentElement4.closest('div,p') : tableCell;
|
|
479
513
|
if (elementToSelect) {
|
|
480
514
|
selection.selectAllChildren(elementToSelect);
|
|
481
515
|
}
|
|
@@ -489,6 +523,8 @@ var handleMouseTripleClickInTables = function handleMouseTripleClickInTables(eve
|
|
|
489
523
|
*/
|
|
490
524
|
var handleWrapperOnClick = function handleWrapperOnClick(event, props, mouseDownSelection) {
|
|
491
525
|
var _props$eventHandlers;
|
|
526
|
+
// Ignored via go/ees005
|
|
527
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
492
528
|
var targetElement = event.target;
|
|
493
529
|
handleMouseTripleClickInTables(event);
|
|
494
530
|
|
|
@@ -502,6 +538,9 @@ var handleWrapperOnClick = function handleWrapperOnClick(event, props, mouseDown
|
|
|
502
538
|
if (!(targetElement instanceof window.Element)) {
|
|
503
539
|
return;
|
|
504
540
|
}
|
|
541
|
+
|
|
542
|
+
// Ignored via go/ees005
|
|
543
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
505
544
|
var rendererWrapper = event.currentTarget;
|
|
506
545
|
var isInteractiveElementInTree = findInTree(targetElement, rendererWrapper, isInteractiveElement);
|
|
507
546
|
if (isInteractiveElementInTree) {
|
|
@@ -671,6 +710,8 @@ var RendererFunctionalComponent = function RendererFunctionalComponent(props) {
|
|
|
671
710
|
attributes: {
|
|
672
711
|
platform: PLATFORM.WEB,
|
|
673
712
|
duration: duration,
|
|
713
|
+
// Ignored via go/ees005
|
|
714
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
674
715
|
distortedDuration: renderedMeasurementDistortedDurationMonitor.distortedDuration,
|
|
675
716
|
ttfb: getResponseEndTime(),
|
|
676
717
|
nodes: countNodes(props.document),
|
|
@@ -679,6 +720,9 @@ var RendererFunctionalComponent = function RendererFunctionalComponent(props) {
|
|
|
679
720
|
eventType: EVENT_TYPE.OPERATIONAL
|
|
680
721
|
});
|
|
681
722
|
}
|
|
723
|
+
|
|
724
|
+
// Ignored via go/ees005
|
|
725
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
682
726
|
renderedMeasurementDistortedDurationMonitor.cleanup();
|
|
683
727
|
});
|
|
684
728
|
anchorLinkAnalytics();
|
|
@@ -775,12 +819,18 @@ export function Renderer(props) {
|
|
|
775
819
|
startPos = _React$useContext.startPos;
|
|
776
820
|
var _useRendererContext = useRendererContext(),
|
|
777
821
|
isTopLevelRenderer = _useRendererContext.isTopLevelRenderer;
|
|
778
|
-
return fg('platform_editor_react18_renderer') ? jsx(RendererFunctionalComponent
|
|
822
|
+
return fg('platform_editor_react18_renderer') ? jsx(RendererFunctionalComponent
|
|
823
|
+
// Ignored via go/ees005
|
|
824
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
825
|
+
, _extends({}, props, {
|
|
779
826
|
startPos: startPos,
|
|
780
827
|
isTopLevelRenderer: isTopLevelRenderer
|
|
781
828
|
})) :
|
|
782
829
|
// eslint-disable-next-line react/jsx-pascal-case
|
|
783
|
-
jsx(__RendererClassComponent
|
|
830
|
+
jsx(__RendererClassComponent
|
|
831
|
+
// Ignored via go/ees005
|
|
832
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
833
|
+
, _extends({}, props, {
|
|
784
834
|
startPos: startPos,
|
|
785
835
|
isTopLevelRenderer: isTopLevelRenderer
|
|
786
836
|
}));
|
|
@@ -806,7 +856,10 @@ export var RendererWithAnalytics = /*#__PURE__*/React.memo(function (props) {
|
|
|
806
856
|
rethrowError: true,
|
|
807
857
|
fallbackComponent: null,
|
|
808
858
|
createAnalyticsEvent: createAnalyticsEvent
|
|
809
|
-
}, jsx(IntlErrorBoundary, null, jsx(Renderer
|
|
859
|
+
}, jsx(IntlErrorBoundary, null, jsx(Renderer
|
|
860
|
+
// Ignored via go/ees005
|
|
861
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
862
|
+
, _extends({}, props, {
|
|
810
863
|
createAnalyticsEvent: createAnalyticsEvent
|
|
811
864
|
}))));
|
|
812
865
|
}
|
|
@@ -837,6 +890,8 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
837
890
|
// We must check if window is defined, if it isn't we are in a SSR environment
|
|
838
891
|
// and we don't want to add the telepointer
|
|
839
892
|
if (typeof window !== 'undefined' && addTelepointer && innerRef !== null && innerRef !== void 0 && innerRef.current) {
|
|
893
|
+
// Ignored via go/ees005
|
|
894
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
840
895
|
var _renderer = innerRef.current.querySelector('.ak-renderer-document');
|
|
841
896
|
if (initialUpdate.current) {
|
|
842
897
|
var lastChild = _renderer.lastChild;
|
|
@@ -860,6 +915,8 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
860
915
|
if (_oldTelepointer) {
|
|
861
916
|
_oldTelepointer.remove();
|
|
862
917
|
}
|
|
918
|
+
// Ignored via go/ees005
|
|
919
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
863
920
|
parentNode.appendChild(createTelepointer());
|
|
864
921
|
}
|
|
865
922
|
}
|
|
@@ -971,6 +1028,8 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
|
|
|
971
1028
|
var localRef = React.useRef(null);
|
|
972
1029
|
var innerRef = props.innerRef || localRef;
|
|
973
1030
|
if (!allowAnnotations) {
|
|
1031
|
+
// Ignored via go/ees005
|
|
1032
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
974
1033
|
return jsx(RendererWithAnalytics, _extends({
|
|
975
1034
|
innerRef: innerRef
|
|
976
1035
|
}, props));
|
|
@@ -982,6 +1041,8 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
|
|
|
982
1041
|
isNestedRender: true
|
|
983
1042
|
}, jsx(RendererWithAnalytics, _extends({
|
|
984
1043
|
innerRef: innerRef
|
|
1044
|
+
// Ignored via go/ees005
|
|
1045
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
985
1046
|
}, props, {
|
|
986
1047
|
featureFlags: props.featureFlags
|
|
987
1048
|
}))));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
3
3
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
|
|
4
4
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -7,6 +7,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
7
7
|
import { css } from '@emotion/react';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
10
|
+
// Ignored via go/ees005
|
|
11
|
+
// eslint-disable-next-line import/no-namespace
|
|
10
12
|
import * as colors from '@atlaskit/theme/colors';
|
|
11
13
|
import { N60A, Y300, Y75, N40A } from '@atlaskit/theme/colors';
|
|
12
14
|
import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
|
|
@@ -75,7 +77,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
|
|
|
75
77
|
if (allowNestedHeaderLinks) {
|
|
76
78
|
headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
|
|
77
79
|
}
|
|
78
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t\t.", " {\n\t\t\tpadding: 0;\n\n\t\t\t.", " {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tpadding: ", ";\n\t\t\t\tborder-width: 1.5px;\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\n\t\t\t\t> *:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t@supports selector(:focus-visible) {\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\toutline: unset;\n\t\t\t\t\t}\n\t\t\t\t\t&:focus-visible {\n\t\t\t\t\t\tborder-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\t"])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, editorExperiment('table-nested-dnd', true) ? "".concat(tableCellPadding, "px ", "var(--ds-space-250, 20px)") : "".concat(tableCellPadding, "px"), "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, fg('platform_editor_nested_tables_renderer_styles') ? "\n\t\t\t\t\t// New styles\n\t\t\t\t\t> ."
|
|
80
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t\t.", " {\n\t\t\tpadding: 0;\n\n\t\t\t.", " {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tpadding: ", ";\n\t\t\t\tborder-width: 1.5px;\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\n\t\t\t\t> *:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t@supports selector(:focus-visible) {\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\toutline: unset;\n\t\t\t\t\t}\n\t\t\t\t\t&:focus-visible {\n\t\t\t\t\t\tborder-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\t"])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, editorExperiment('table-nested-dnd', true) ? "".concat(tableCellPadding, "px ", "var(--ds-space-250, 20px)") : "".concat(tableCellPadding, "px"), "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, fg('platform_editor_nested_tables_renderer_styles') ? css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n\t\t\t\t\t\t// New styles\n\t\t\t\t\t\t> .", "\n\t\t\t\t\t\t\t> .", " {\n\t\t\t\t\t\t\tmargin: 0;\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\ttransition: opacity 0.2s ease-in-out;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t> .", "\n\t\t\t\t\t\t\t> .", " {\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\t\t&:focus {\n\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&:hover:not(\n\t\t\t\t\t\t\t\t:has(\n\t\t\t\t\t\t\t\t\t\t.", "\n\t\t\t\t\t\t\t\t\t\t\t.", ":hover\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t> .", "\n\t\t\t\t\t\t\t> .", " {\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t"])), RendererCssClassName.SORTABLE_COLUMN, RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, SORTABLE_COLUMN_ICON_CLASSNAME, RendererCssClassName.SORTABLE_COLUMN, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, SORTABLE_COLUMN_ICON_CLASSNAME, RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, RendererCssClassName.SORTABLE_COLUMN, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, SORTABLE_COLUMN_ICON_CLASSNAME) : css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t\t\t\t\t\t// old styles\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\ttransition: opacity 0.2s ease-in-out;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\t\t&:focus {\n\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t"])), RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, SORTABLE_COLUMN_ICON_CLASSNAME, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, SORTABLE_COLUMN_ICON_CLASSNAME, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, SORTABLE_COLUMN_ICON_CLASSNAME));
|
|
79
81
|
};
|
|
80
82
|
var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
|
|
81
83
|
var appearance = _ref3.appearance;
|
|
@@ -83,20 +85,20 @@ var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
|
|
|
83
85
|
if (appearance !== 'full-page') {
|
|
84
86
|
return '';
|
|
85
87
|
}
|
|
86
|
-
return css(
|
|
88
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\t\tmax-width: ", ";\n\t\tmargin: 0 auto;\n\t\tpadding: 0 ", "px;\n\t"])), theme && theme.layoutMaxWidth ? "".concat(theme.layoutMaxWidth, "px") : 'none', appearance === 'full-page' ? FullPagePadding : 0);
|
|
87
89
|
};
|
|
88
90
|
var fullWidthStyles = function fullWidthStyles(_ref5) {
|
|
89
91
|
var appearance = _ref5.appearance;
|
|
90
92
|
if (appearance !== 'full-width') {
|
|
91
93
|
return '';
|
|
92
94
|
}
|
|
93
|
-
return css(
|
|
95
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t/* don't override if the breakout mark has width attribute defined */\n\t\t.fabric-editor-breakout-mark:not([data-has-width='true']),\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), akEditorFullWidthLayoutWidth, isTableResizingEnabled(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
|
|
94
96
|
};
|
|
95
97
|
var breakoutWidthStyle = function breakoutWidthStyle() {
|
|
96
|
-
return css(
|
|
98
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n\t\t*:not([data-mark-type='fragment']) .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\n\t\t[data-mark-type='fragment'] * .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\t"])), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
|
|
97
99
|
};
|
|
98
100
|
var getShadowOverrides = function getShadowOverrides() {
|
|
99
|
-
return css(
|
|
101
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n\t\t/** Shadow overrides */\n\t\t&.", "::after, &.", "::before {\n\t\t\twidth: ", "px;\n\t\t\tbackground: linear-gradient(\n\t\t\t\t\tto left,\n\t\t\t\t\ttransparent 0,\n\t\t\t\t\t", " 140%\n\t\t\t\t),\n\t\t\t\tlinear-gradient(\n\t\t\t\t\tto right,\n\t\t\t\t\t", " 0px,\n\t\t\t\t\ttransparent 1px\n\t\t\t\t);\n\t\t}\n\n\t\t&.", "::after {\n\t\t\tbackground: linear-gradient(\n\t\t\t\t\tto right,\n\t\t\t\t\ttransparent 0,\n\t\t\t\t\t", " 140%\n\t\t\t\t),\n\t\t\t\tlinear-gradient(\n\t\t\t\t\tto left,\n\t\t\t\t\t", " 0px,\n\t\t\t\t\ttransparent 1px\n\t\t\t\t);\n\t\t\tright: 0px;\n\t\t}\n\t"])), shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableShadowWidth, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", shadowClassNames.RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)");
|
|
100
102
|
};
|
|
101
103
|
function getAnnotationStyles(_ref6) {
|
|
102
104
|
var allowAnnotations = _ref6.allowAnnotations;
|
|
@@ -137,6 +139,9 @@ function getAnnotationStyles(_ref6) {
|
|
|
137
139
|
}
|
|
138
140
|
var tableRowHeight = 44;
|
|
139
141
|
var stickyScrollbarStyles = "\n\tposition: relative;\n\tflex-direction: column;\n\n\t> .".concat(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER, " {\n\t width: 100%;\n\t display: block;\n\t visibility: hidden;\n\t overflow-x: auto;\n\t position: sticky;\n\t bottom: ", "var(--ds-space-0, 0px)", ";\n\t z-index: 1;\n\t}\n\n\t> .").concat(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, ",\n\t> .").concat(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP, " {\n\t position: absolute;\n\t width: 100%;\n\t height: 1px;\n\t margin-top: -1px;\n\t // need this to avoid sentinel being focused via keyboard\n\t // this still allows it to be detected by intersection observer\n\t visibility: hidden;\n\t }\n\t > .").concat(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP, " {\n\t top: ").concat(tableRowHeight * 3, "px;\n\t }\n\t > .").concat(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, " {\n\t bottom: ", "var(--ds-space-250, 20px)", "; // MAX_BROWSER_SCROLLBAR_HEIGHT = 20;\n\t }\n ");
|
|
142
|
+
|
|
143
|
+
// Ignored via go/ees005
|
|
144
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
140
145
|
export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
141
146
|
return function (theme) {
|
|
142
147
|
var _getGlobalTheme = getGlobalTheme(),
|
|
@@ -151,7 +156,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
151
156
|
var isAdvancedLayoutsOn = editorExperiment('advanced_layouts', true);
|
|
152
157
|
|
|
153
158
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/design-system/no-css-tagged-template-expression
|
|
154
|
-
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n\t\tfont-size: ", "px;\n\t\tline-height: 1.5rem;\n\t\tcolor: ", ";\n\n\t\t.", "::after {\n\t\t\t// we add a clearfix after ak-renderer-document in order to\n\t\t\t// contain internal floats (such as media images that are \"wrap-left\")\n\t\t\t// to just the renderer (and not spill outside of it)\n\t\t\tcontent: '';\n\t\t\tvisibility: hidden;\n\t\t\tdisplay: block;\n\t\t\theight: 0;\n\t\t\tclear: both;\n\t\t}\n\n\t\t", "\n\t\t", "\n\n .", " {\n\t\t\t", "\n\t\t}\n\n\t\t& h1 {\n\t\t\t", "\n\t\t}\n\n\t\t& h2 {\n\t\t\t", "\n\t\t}\n\n\t\t& h3 {\n\t\t\t", "\n\t\t}\n\n\t\t& h4 {\n\t\t\t", "\n\t\t}\n\n\t\t& h5 {\n\t\t\t", "\n\t\t}\n\n\t\t& h6 {\n\t\t\t", "\n\t\t}\n\n\t\t& span.akActionMark {\n\t\t\tcolor: ", ";\n\t\t\ttext-decoration: none;\n\n\t\t\t&:hover {\n\t\t\t\tcolor: ", ";\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\n\t\t\t&:active {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t}\n\n\t\t& span.akActionMark {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t& span[data-placeholder] {\n\t\t\tcolor: ", ";\n\t\t}\n\n\t\t", "\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", "\n\t\t", "\n\t\t", "\n\n\t\t& .UnknownBlock {\n\t\t\tfont-family: ", ";\n\t\t\tfont-size: ", ";\n\t\t\tfont-weight: ", ";\n\t\t\twhite-space: pre-wrap;\n\t\t\tword-wrap: break-word;\n\t\t}\n\n\t\t& span.date-node {\n\t\t\tbackground: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tcolor: ", ";\n\t\t\tpadding: ", " ", ";\n\t\t\tmargin: 0 1px;\n\t\t\ttransition: background 0.3s;\n\t\t}\n\n\t\t& span.date-node-highlighted {\n\t\t\tbackground: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\n\t\t& .renderer-image {\n\t\t\tmax-width: 100%;\n\t\t\tdisplay: block;\n\t\t\tmargin: ", " 0;\n\t\t}\n\n\t\t.", ".rich-media-wrapped + .", ":not(.rich-media-wrapped) {\n\t\t\tclear: both;\n\t\t}\n\n\t\t& .code-block,\n\t\t& blockquote,\n\t\t& hr,\n\t\t& > div > div:not(.rich-media-wrapped),\n\t\t.", ".rich-media-wrapped + .rich-media-wrapped + *:not(.rich-media-wrapped),\n\t\t.", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n\t\t.", ".image-align-start,\n\t\t\t.", ".image-center,\n\t\t\t.", ".image-align-end {\n\t\t\tclear: both;\n\t\t}\n\n\t\t& .rich-media-wrapped {\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\t\t}\n\n\t\t", "\n\t\t/* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n\t\t\tmargin-left: 0;\n\t\t\tmargin-right: 0;\n\t\t}\n\n\t\t/* Breakout for tables and extensions */\n\t\t.", " > {\n\t\t\t", "\n\n\t\t\t* .", " {\n\t\t\t\toverflow-x: auto;\n\t\t\t}\n\n\t\t\t& .", ":first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\t.", " {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\tmargin-left: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\toverflow-x: auto;\n\t\t\t}\n\n\t\t\t.", " .", " {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.", " .", " {\n\t\t\tz-index: 0;\n\t\t\ttransition: all 0.1s linear;\n\t\t\tdisplay: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n\t\t\t/** Shadow overrides */\n\t\t\t&.", "::after, &.", "::before {\n\t\t\t\ttop: ", "px;\n\t\t\t\theight: calc(100% - ", "px);\n\t\t\t\tz-index: ", ";\n\t\t\t}\n\n\t\t\t", "\n\n\t\t\t", "\n\n\t\t\t&\n .", ",\n &\n .", " {\n\t\t\t\theight: calc(100% - ", "px);\n\t\t\t}\n\n\t\t\t/**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n\t\t\ttable {\n\t\t\t\theight: 1px; /* will be ignored */\n\t\t\t\t", ";\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\n\t\t\ttable tr:first-of-type {\n\t\t\t\theight: 100%;\n\n\t\t\t\ttd,\n\t\t\t\tth {\n\t\t\t\t\tposition: relative;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttable[data-number-column='true'] {\n\t\t\t\t.", " {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tborder-right: 1px solid\n\t\t\t\t\t\t", ";\n\t\t\t\t\twidth: ", "px;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tfont-size: ", ";\n\t\t\t\t}\n\n\t\t\t\t.fixed .", " {\n\t\t\t\t\tborder-right: 0px none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttr[data-header-row].fixed {\n\t\t\tposition: fixed !important;\n\t\t\tdisplay: flex;\n\t\t\toverflow: hidden;\n\t\t\tz-index: ", ";\n\n\t\t\tborder-right: 1px solid ", ";\n\t\t\tborder-bottom: 1px solid ", ";\n\n\t\t\t/* this is to compensate for the table border */\n\t\t\ttransform: translateX(-1px);\n\t\t}\n\n\t\t.sticky > th {\n\t\t\tz-index: ", ";\n\t\t\tposition: sticky !important;\n\t\t\ttop: 0;\n\t\t}\n\n\t\t/* Make the number column header sticky */\n\t\t.sticky > td {\n\t\t\tposition: sticky !important;\n\t\t\ttop: 0;\n\t\t}\n\n\t\t/* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n\t\t.sticky th,\n\t\t.sticky td {\n\t\t\tbox-shadow:\n\t\t\t\t0px 1px ", ",\n\t\t\t\t0px -0.5px ", ",\n\t\t\t\tinset -1px 0px ", ",\n\t\t\t\t0px -1px ", ";\n\t\t}\n\n\t\t/* this will remove jumpiness caused in Chrome for sticky headers */\n\t\t.fixed + tr {\n\t\t\tmin-height: 0px;\n\t\t}\n\n\t\t/*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n\t\t& .code-block {\n\t\t\tmax-width: 100%;\n\t\t\t/* -ms- properties are necessary until MS supports the latest version of the grid spec */\n\t\t\t/* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n\t\t\tdisplay: block;\n\t\t\t/* stylelint-enable */\n\n\t\t\tposition: relative;\n\t\t\tborder-radius: ", ";\n\n\t\t\t/*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n\t\t\tword-wrap: normal;\n\t\t}\n\n\t\t& .MediaGroup,\n\t\t& .code-block {\n\t\t\tmargin-top: ", ";\n\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t", "\n\n ", ";\n\t\t", ";\n\t\t& [data-layout-section] {\n\t\t\tmargin-top: ", ";\n\t\t\t& > div + div {\n\t\t\t\tmargin-left: ", ";\n\t\t\t}\n\n\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t& > div + div {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .MediaGroup,\n\t\t\t& .code-block {\n\t\t\t\tmargin-top: ", ";\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& li {\n\t\t\t> .code-block {\n\t\t\t\tmargin: ", " 0 0 0;\n\t\t\t}\n\t\t\t> .code-block:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\n\t\t\t> div:last-of-type.code-block {\n\t\t\t\tmargin-bottom: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:not([data-node-type='decisionList']) > li,\n // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t"])), editorFontSize(themeProps), "var(--ds-text, ".concat(colors.N800, ")"), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), RendererCssClassName.DOCUMENT, mediaInlineImageStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), "var(--ds-text-subtlest, ".concat(colors.N200, ")"), telepointerStyles(colorMode), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(typography), ruleSharedStyles(), paragraphSharedStyles(typography), listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(), shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles(), tasksAndDecisionsStyles, smartCardSharedStyles, getAnnotationStyles(wrapperProps), getStatusSharedStyles(), "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", relativeFontSizeToBase16(fontSize()), "var(--ds-font-weight-regular, 400)", "var(--ds-background-neutral, ".concat(colors.N30A, ")"), "var(--ds-border-radius-100, 3px)", "var(--ds-text, ".concat(colors.N800, ")"), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-space-100, 8px)", alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, breakoutWidthStyle(), RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, getShadowOverrides(), isStickyScrollbarEnabled(appearance) ? stickyScrollbarStyles : '', shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), akEditorTableNumberColumnWidth, "var(--ds-text-subtlest, ".concat(colors.N200, ")"), relativeFontSizeToBase16(fontSize()), RendererCssClassName.NUMBER_COLUMN, akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"), "var(--ds-border-radius-100, 3px)", blockNodesVerticalMargin, useGridRenderForCodeBlock(useBlockRenderForCodeBlock), getLightWeightCodeBlockStylesForRootRendererStyleSheet(), isAdvancedLayoutsOn ? columnLayoutResponsiveSharedStyle : columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, "var(--ds-space-250, 20px)", isAdvancedLayoutsOn ? 0 : "var(--ds-space-400, 32px)", gridMediumMaxWidth, blockNodesVerticalMargin, blockNodesVerticalMargin, blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
|
|
159
|
+
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n\t\tfont-size: ", "px;\n\t\tline-height: 1.5rem;\n\t\tcolor: ", ";\n\n\t\t.", "::after {\n\t\t\t// we add a clearfix after ak-renderer-document in order to\n\t\t\t// contain internal floats (such as media images that are \"wrap-left\")\n\t\t\t// to just the renderer (and not spill outside of it)\n\t\t\tcontent: '';\n\t\t\tvisibility: hidden;\n\t\t\tdisplay: block;\n\t\t\theight: 0;\n\t\t\tclear: both;\n\t\t}\n\n\t\t", "\n\t\t", "\n\n .", " {\n\t\t\t", "\n\t\t}\n\n\t\t& h1 {\n\t\t\t", "\n\t\t}\n\n\t\t& h2 {\n\t\t\t", "\n\t\t}\n\n\t\t& h3 {\n\t\t\t", "\n\t\t}\n\n\t\t& h4 {\n\t\t\t", "\n\t\t}\n\n\t\t& h5 {\n\t\t\t", "\n\t\t}\n\n\t\t& h6 {\n\t\t\t", "\n\t\t}\n\n\t\t& span.akActionMark {\n\t\t\tcolor: ", ";\n\t\t\ttext-decoration: none;\n\n\t\t\t&:hover {\n\t\t\t\tcolor: ", ";\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\n\t\t\t&:active {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t}\n\n\t\t& span.akActionMark {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t& span[data-placeholder] {\n\t\t\tcolor: ", ";\n\t\t}\n\n\t\t", "\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", "\n\t\t", "\n\t\t", "\n\n\t\t& .UnknownBlock {\n\t\t\tfont-family: ", ";\n\t\t\tfont-size: ", ";\n\t\t\tfont-weight: ", ";\n\t\t\twhite-space: pre-wrap;\n\t\t\tword-wrap: break-word;\n\t\t}\n\n\t\t& span.date-node {\n\t\t\tbackground: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tcolor: ", ";\n\t\t\tpadding: ", " ", ";\n\t\t\tmargin: 0 1px;\n\t\t\ttransition: background 0.3s;\n\t\t}\n\n\t\t& span.date-node-highlighted {\n\t\t\tbackground: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\n\t\t& .renderer-image {\n\t\t\tmax-width: 100%;\n\t\t\tdisplay: block;\n\t\t\tmargin: ", " 0;\n\t\t}\n\n\t\t.", ".rich-media-wrapped + .", ":not(.rich-media-wrapped) {\n\t\t\tclear: both;\n\t\t}\n\n\t\t& .code-block,\n\t\t& blockquote,\n\t\t& hr,\n\t\t& > div > div:not(.rich-media-wrapped),\n\t\t.", ".rich-media-wrapped + .rich-media-wrapped + *:not(.rich-media-wrapped),\n\t\t.", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n\t\t.", ".image-align-start,\n\t\t\t.", ".image-center,\n\t\t\t.", ".image-align-end {\n\t\t\tclear: both;\n\t\t}\n\n\t\t& .rich-media-wrapped {\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\t\t}\n\n\t\t", "\n\t\t/* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n\t\t\tmargin-left: 0;\n\t\t\tmargin-right: 0;\n\t\t}\n\n\t\t/* Breakout for tables and extensions */\n\t\t.", " > {\n\t\t\t", "\n\n\t\t\t* .", " {\n\t\t\t\toverflow-x: auto;\n\t\t\t}\n\n\t\t\t& .", ":first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\t.", " {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\tmargin-left: 50%;\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\toverflow-x: auto;\n\t\t\t}\n\n\t\t\t.", " .", " {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.", " .", " {\n\t\t\tz-index: 0;\n\t\t\ttransition: all 0.1s linear;\n\t\t\tdisplay: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n\t\t\t/** Shadow overrides */\n\t\t\t&.", "::after, &.", "::before {\n\t\t\t\ttop: ", "px;\n\t\t\t\theight: calc(100% - ", "px);\n\t\t\t\tz-index: ", ";\n\t\t\t}\n\n\t\t\t", "\n\n\t\t\t", "\n\n\t\t\t&\n .", ",\n &\n .", " {\n\t\t\t\theight: calc(100% - ", "px);\n\t\t\t}\n\n\t\t\t/**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n\t\t\ttable {\n\t\t\t\theight: 1px; /* will be ignored */\n\t\t\t\t", ";\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\n\t\t\ttable tr:first-of-type {\n\t\t\t\theight: 100%;\n\n\t\t\t\ttd,\n\t\t\t\tth {\n\t\t\t\t\tposition: relative;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttable[data-number-column='true'] {\n\t\t\t\t.", " {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\tborder-right: 1px solid\n\t\t\t\t\t\t", ";\n\t\t\t\t\twidth: ", "px;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tfont-size: ", ";\n\t\t\t\t}\n\n\t\t\t\t.fixed .", " {\n\t\t\t\t\tborder-right: 0px none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttr[data-header-row].fixed {\n\t\t\tposition: fixed !important;\n\t\t\tdisplay: flex;\n\t\t\toverflow: hidden;\n\t\t\tz-index: ", ";\n\n\t\t\tborder-right: 1px solid ", ";\n\t\t\tborder-bottom: 1px solid ", ";\n\n\t\t\t/* this is to compensate for the table border */\n\t\t\ttransform: translateX(-1px);\n\t\t}\n\n\t\t.sticky > th {\n\t\t\tz-index: ", ";\n\t\t\tposition: sticky !important;\n\t\t\ttop: 0;\n\t\t}\n\n\t\t/* Make the number column header sticky */\n\t\t.sticky > td {\n\t\t\tposition: sticky !important;\n\t\t\ttop: 0;\n\t\t}\n\n\t\t/* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n\t\t.sticky th,\n\t\t.sticky td {\n\t\t\tbox-shadow:\n\t\t\t\t0px 1px ", ",\n\t\t\t\t0px -0.5px ", ",\n\t\t\t\tinset -1px 0px ", ",\n\t\t\t\t0px -1px ", ";\n\t\t}\n\n\t\t/* this will remove jumpiness caused in Chrome for sticky headers */\n\t\t.fixed + tr {\n\t\t\tmin-height: 0px;\n\t\t}\n\n\t\t/*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n\t\t& .code-block {\n\t\t\tmax-width: 100%;\n\t\t\t/* -ms- properties are necessary until MS supports the latest version of the grid spec */\n\t\t\t/* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n\t\t\tdisplay: block;\n\t\t\t/* stylelint-enable */\n\n\t\t\tposition: relative;\n\t\t\tborder-radius: ", ";\n\n\t\t\t/*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n\t\t\tword-wrap: normal;\n\t\t}\n\n\t\t& .MediaGroup,\n\t\t& .code-block {\n\t\t\tmargin-top: ", ";\n\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t", "\n\n ", ";\n\t\t", ";\n\t\t& [data-layout-section] {\n\t\t\tmargin-top: ", ";\n\t\t\t& > div + div {\n\t\t\t\tmargin-left: ", ";\n\t\t\t}\n\n\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t& > div + div {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .MediaGroup,\n\t\t\t& .code-block {\n\t\t\t\tmargin-top: ", ";\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& li {\n\t\t\t> .code-block {\n\t\t\t\tmargin: ", " 0 0 0;\n\t\t\t}\n\t\t\t> .code-block:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\n\t\t\t> div:last-of-type.code-block {\n\t\t\t\tmargin-bottom: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:not([data-node-type='decisionList']) > li,\n // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t"])), editorFontSize(themeProps), "var(--ds-text, ".concat(colors.N800, ")"), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), RendererCssClassName.DOCUMENT, mediaInlineImageStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), "var(--ds-text-subtlest, ".concat(colors.N200, ")"), telepointerStyles(colorMode), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(typography), ruleSharedStyles(), paragraphSharedStyles(typography), listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(), shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles(), tasksAndDecisionsStyles, smartCardSharedStyles, getAnnotationStyles(wrapperProps), getStatusSharedStyles(), "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)", relativeFontSizeToBase16(fontSize()), "var(--ds-font-weight-regular, 400)", "var(--ds-background-neutral, ".concat(colors.N30A, ")"), "var(--ds-border-radius-100, 3px)", "var(--ds-text, ".concat(colors.N800, ")"), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-space-100, 8px)", alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, breakoutWidthStyle(), RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, getShadowOverrides(), isStickyScrollbarEnabled(appearance) ? stickyScrollbarStyles : '', shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), akEditorTableNumberColumnWidth, "var(--ds-text-subtlest, ".concat(colors.N200, ")"), relativeFontSizeToBase16(fontSize()), RendererCssClassName.NUMBER_COLUMN, akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"), "var(--ds-border-radius-100, 3px)", blockNodesVerticalMargin, useGridRenderForCodeBlock(useBlockRenderForCodeBlock), getLightWeightCodeBlockStylesForRootRendererStyleSheet(), isAdvancedLayoutsOn ? columnLayoutResponsiveSharedStyle : columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, "var(--ds-space-250, 20px)", isAdvancedLayoutsOn ? 0 : "var(--ds-space-400, 32px)", gridMediumMaxWidth, blockNodesVerticalMargin, blockNodesVerticalMargin, blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
|
|
155
160
|
};
|
|
156
161
|
};
|
|
157
162
|
var useGridRenderForCodeBlock = function useGridRenderForCodeBlock(codeBlockRenderAsBlock) {
|
|
@@ -42,6 +42,9 @@ var FadeOut = function FadeOut(props) {
|
|
|
42
42
|
css: styles
|
|
43
43
|
}, children);
|
|
44
44
|
};
|
|
45
|
+
|
|
46
|
+
// Ignored via go/ees005
|
|
47
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, react/prefer-stateless-function
|
|
45
48
|
export var TruncatedWrapper = /*#__PURE__*/function (_Component) {
|
|
46
49
|
function TruncatedWrapper(props) {
|
|
47
50
|
_classCallCheck(this, TruncatedWrapper);
|
|
@@ -15,6 +15,8 @@ export var Provider = function Provider(_ref) {
|
|
|
15
15
|
}, children);
|
|
16
16
|
};
|
|
17
17
|
export var withSmartCardStorage = function withSmartCardStorage(WrappedComponent) {
|
|
18
|
+
// Ignored via go/ees005
|
|
19
|
+
// eslint-disable-next-line react/prefer-stateless-function
|
|
18
20
|
return /*#__PURE__*/function (_React$Component) {
|
|
19
21
|
function _class() {
|
|
20
22
|
_classCallCheck(this, _class);
|
|
@@ -26,7 +28,10 @@ export var withSmartCardStorage = function withSmartCardStorage(WrappedComponent
|
|
|
26
28
|
value: function render() {
|
|
27
29
|
var _this = this;
|
|
28
30
|
return /*#__PURE__*/React.createElement(Context.Consumer, null, function (storage) {
|
|
29
|
-
return /*#__PURE__*/React.createElement(WrappedComponent
|
|
31
|
+
return /*#__PURE__*/React.createElement(WrappedComponent
|
|
32
|
+
// Ignored via go/ees005
|
|
33
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
34
|
+
, _extends({}, _this.props, {
|
|
30
35
|
smartCardStorage: storage
|
|
31
36
|
}));
|
|
32
37
|
});
|
|
@@ -10,6 +10,9 @@ import React, { createContext } from 'react';
|
|
|
10
10
|
export var AnnotationsDraftContext = /*#__PURE__*/createContext(null);
|
|
11
11
|
export var ProvidersContext = /*#__PURE__*/createContext(null);
|
|
12
12
|
export var InlineCommentsStateContext = /*#__PURE__*/createContext({});
|
|
13
|
+
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
13
16
|
export var AnnotationsDraftContextWrapper = /*#__PURE__*/function (_React$Component) {
|
|
14
17
|
function AnnotationsDraftContextWrapper() {
|
|
15
18
|
var _this;
|
|
@@ -30,11 +30,15 @@ var markStyles = function markStyles() {
|
|
|
30
30
|
export var AnnotationDraft = function AnnotationDraft(_ref) {
|
|
31
31
|
var draftPosition = _ref.draftPosition,
|
|
32
32
|
children = _ref.children;
|
|
33
|
-
return
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
return (
|
|
34
|
+
// Ignored via go/ees005
|
|
35
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
36
|
+
jsx("mark", _extends({
|
|
37
|
+
"data-renderer-mark": true
|
|
38
|
+
}, dataAttributes(draftPosition), {
|
|
39
|
+
css: markStyles
|
|
40
|
+
}), children)
|
|
41
|
+
);
|
|
38
42
|
};
|
|
39
43
|
export var getAnnotationIndex = function getAnnotationIndex(annotationPosition, fragmentCount) {
|
|
40
44
|
if (annotationPosition === InsertDraftPosition.START) {
|
|
@@ -58,14 +62,22 @@ export var applyAnnotationOnText = function applyAnnotationOnText(_ref2) {
|
|
|
58
62
|
return texts.map(function (value, index) {
|
|
59
63
|
var segments = segmentText(value, textHighlighter);
|
|
60
64
|
if (annotateIndex === index) {
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
return (
|
|
66
|
+
// Ignored via go/ees005
|
|
67
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
68
|
+
jsx(AnnotationDraft, {
|
|
69
|
+
key: index,
|
|
70
|
+
draftPosition: draftPosition
|
|
71
|
+
}, renderTextSegments(segments, textHighlighter, marks || [], draftPosition.from))
|
|
72
|
+
);
|
|
65
73
|
}
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
return (
|
|
75
|
+
// Ignored via go/ees005
|
|
76
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
77
|
+
jsx(React.Fragment, {
|
|
78
|
+
key: index
|
|
79
|
+
}, renderTextSegments(segments, textHighlighter, marks || [], draftPosition.from))
|
|
80
|
+
);
|
|
69
81
|
});
|
|
70
82
|
};
|
|
71
83
|
export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
@@ -23,6 +23,8 @@ var markStyles = function markStyles() {
|
|
|
23
23
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']) {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus, fg('confluence-frontend-comments-panel') ? AnnotationSharedCSSByState().hover : '');
|
|
24
24
|
};
|
|
25
25
|
var isMobile = function isMobile() {
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
26
28
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
27
29
|
};
|
|
28
30
|
var accessibilityStyles = function accessibilityStyles(startMarker, endMarker) {
|
|
@@ -87,6 +89,9 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
87
89
|
// prevents from opening link URL inside webView in Safari
|
|
88
90
|
event.preventDefault();
|
|
89
91
|
}
|
|
92
|
+
|
|
93
|
+
// Ignored via go/ees005
|
|
94
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
90
95
|
onClick({
|
|
91
96
|
eventTarget: event.target,
|
|
92
97
|
annotationIds: annotationIds
|
|
@@ -12,7 +12,13 @@ export function useInlineAnnotationProps(props) {
|
|
|
12
12
|
return {};
|
|
13
13
|
}
|
|
14
14
|
var inlineCardPosition = props.dataAttributes['data-renderer-start-pos'] - 1;
|
|
15
|
-
var hasDraft = draftPosition &&
|
|
15
|
+
var hasDraft = draftPosition &&
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
18
|
+
(draftPosition === null || draftPosition === void 0 ? void 0 : draftPosition.from) <= inlineCardPosition &&
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
21
|
+
(draftPosition === null || draftPosition === void 0 ? void 0 : draftPosition.to) >= inlineCardPosition + 1;
|
|
16
22
|
if (hasDraft) {
|
|
17
23
|
return {
|
|
18
24
|
'data-renderer-mark': true,
|