@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
|
@@ -52,7 +52,10 @@ var useUserSelectionRange = exports.useUserSelectionRange = function useUserSele
|
|
|
52
52
|
// platform/packages/editor/renderer/src/steps/index.ts Line 180
|
|
53
53
|
|
|
54
54
|
// This workaround ensures the endContainer is set to a text node when endContainer is non-text and the parent container is the root element
|
|
55
|
-
if (isTripleClick &&
|
|
55
|
+
if (isTripleClick &&
|
|
56
|
+
// Ignored via go/ees005
|
|
57
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
58
|
+
(0, _steps.isRoot)(commonAncestorContainer) && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) === 'P' // ignore if the parent node is strong, em, etc.
|
|
56
59
|
) {
|
|
57
60
|
var _parentNode$lastChild, _parentNode$lastChild2;
|
|
58
61
|
var lastChild = parentNode !== null && parentNode !== void 0 && parentNode.lastChild && (parentNode === null || parentNode === void 0 || (_parentNode$lastChild = parentNode.lastChild) === null || _parentNode$lastChild === void 0 ? void 0 : _parentNode$lastChild.nodeType) === Node.TEXT_NODE ? parentNode === null || parentNode === void 0 ? void 0 : parentNode.lastChild : parentNode === null || parentNode === void 0 || (_parentNode$lastChild2 = parentNode.lastChild) === null || _parentNode$lastChild2 === void 0 ? void 0 : _parentNode$lastChild2.childNodes[0];
|
|
@@ -63,8 +66,13 @@ var useUserSelectionRange = exports.useUserSelectionRange = function useUserSele
|
|
|
63
66
|
}
|
|
64
67
|
}, 250);
|
|
65
68
|
};
|
|
69
|
+
|
|
70
|
+
// Ignored via go/ees005
|
|
71
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
66
72
|
document.addEventListener('selectionchange', onSelectionChange);
|
|
67
73
|
return function () {
|
|
74
|
+
// Ignored via go/ees005
|
|
75
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
68
76
|
document.removeEventListener('selectionchange', onSelectionChange);
|
|
69
77
|
clearRange();
|
|
70
78
|
};
|
|
@@ -132,7 +132,10 @@ var Mounter = exports.Mounter = /*#__PURE__*/_react.default.memo(function (props
|
|
|
132
132
|
}, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
|
|
133
133
|
return /*#__PURE__*/_react.default.createElement(Component, {
|
|
134
134
|
range: range,
|
|
135
|
-
isWithinRange: isWithinRange
|
|
135
|
+
isWithinRange: isWithinRange
|
|
136
|
+
// Ignored via go/ees005
|
|
137
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
138
|
+
,
|
|
136
139
|
wrapperDOM: wrapperDOM.current,
|
|
137
140
|
isAnnotationAllowed: isAnnotationAllowed,
|
|
138
141
|
onClose: onCloseCallback,
|
|
@@ -173,7 +173,10 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
|
|
|
173
173
|
}, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent, inlineNodeTypes]);
|
|
174
174
|
return /*#__PURE__*/_react.default.createElement(Component, {
|
|
175
175
|
range: range,
|
|
176
|
-
draftRange: draftRange
|
|
176
|
+
draftRange: draftRange
|
|
177
|
+
// Ignored via go/ees005
|
|
178
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
179
|
+
,
|
|
177
180
|
wrapperDOM: wrapperDOM.current,
|
|
178
181
|
isAnnotationAllowed: isAnnotationAllowed,
|
|
179
182
|
onClose: onCloseCallback,
|
|
@@ -39,13 +39,19 @@ var AnnotationsContextWrapper = exports.AnnotationsContextWrapper = function Ann
|
|
|
39
39
|
clearAnnotationDraft = _ref.clearAnnotationDraft;
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, !!hoverComponent && /*#__PURE__*/_react.default.createElement(_rangeValidator.RangeValidator, {
|
|
41
41
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
42
|
-
rendererRef: rendererRef
|
|
42
|
+
rendererRef: rendererRef
|
|
43
|
+
// Ignored via go/ees005
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
45
|
+
,
|
|
43
46
|
component: hoverComponent,
|
|
44
47
|
applyAnnotationDraftAt: applyAnnotationDraftAt,
|
|
45
48
|
clearAnnotationDraft: clearAnnotationDraft
|
|
46
49
|
}), !!selectionComponent && /*#__PURE__*/_react.default.createElement(_rangeValidator2.SelectionRangeValidator, {
|
|
47
50
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
48
|
-
rendererRef: rendererRef
|
|
51
|
+
rendererRef: rendererRef
|
|
52
|
+
// Ignored via go/ees005
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
54
|
+
,
|
|
49
55
|
selectionComponent: selectionComponent,
|
|
50
56
|
applyAnnotationDraftAt: applyAnnotationDraftAt,
|
|
51
57
|
clearAnnotationDraft: clearAnnotationDraft
|
package/dist/cjs/utils.js
CHANGED
|
@@ -14,12 +14,18 @@ var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
|
|
|
14
14
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
15
15
|
// Entry file in package.json
|
|
16
16
|
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
19
|
function createEncoder(parser, encoder) {
|
|
18
20
|
return function (value) {
|
|
19
21
|
return encoder.encode(parser.parse(value));
|
|
20
22
|
};
|
|
21
23
|
}
|
|
22
|
-
var ADFEncoder = exports.ADFEncoder = /*#__PURE__*/(0, _createClass2.default)(
|
|
24
|
+
var ADFEncoder = exports.ADFEncoder = /*#__PURE__*/(0, _createClass2.default)(
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
|
|
28
|
+
function ADFEncoder(createTransformerWithSchema) {
|
|
23
29
|
(0, _classCallCheck2.default)(this, ADFEncoder);
|
|
24
30
|
var transformer = createTransformerWithSchema(_schemaDefault.defaultSchema);
|
|
25
31
|
this.encode = createEncoder(transformer, new _editorJsonTransformer.JSONTransformer());
|
|
@@ -29,6 +35,8 @@ var getText = exports.getText = function getText(node) {
|
|
|
29
35
|
};
|
|
30
36
|
var getEventHandler = exports.getEventHandler = function getEventHandler(eventHandlers, type) {
|
|
31
37
|
var eventName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'onClick';
|
|
38
|
+
// Ignored via go/ees005
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
40
|
return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
|
|
33
41
|
};
|
|
34
42
|
|
|
@@ -11,6 +11,8 @@ import { getRendererRangeInlineNodeNames } from './get-renderer-range-inline-nod
|
|
|
11
11
|
import { getIndexMatch } from './matches-utils';
|
|
12
12
|
export default class RendererActions {
|
|
13
13
|
// Any kind of refence is allowed
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
16
|
|
|
15
17
|
constructor(initFromContext = false) {
|
|
16
18
|
// This is our psuedo feature flag for now
|
|
@@ -22,6 +24,8 @@ export default class RendererActions {
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
//#region private
|
|
27
|
+
// Ignored via go/ees005
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
25
29
|
_privateRegisterRenderer(ref, doc, schema, onAnalyticsEvent) {
|
|
26
30
|
if (!this.initFromContext) {
|
|
27
31
|
return;
|
|
@@ -114,6 +118,8 @@ export default class RendererActions {
|
|
|
114
118
|
eventType: EVENT_TYPE.TRACK,
|
|
115
119
|
attributes: {
|
|
116
120
|
inlineNodeNames: step instanceof RemoveMarkStep ? getRendererRangeInlineNodeNames({
|
|
121
|
+
// Ignored via go/ees005
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
117
123
|
pos: {
|
|
118
124
|
from: from,
|
|
119
125
|
to: to
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// getIndexMatch finds the position of a given string within a given document, in accordance to the Confluence Annotation backend
|
|
2
2
|
// The document is serialised into one large string, excluding any nodes that can not have annotations (eg: emojis, media).
|
|
3
3
|
// Finds where the given query string is relative to the serialised partial document
|
|
4
|
+
// Ignored via go/ees005
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
4
6
|
export function getIndexMatch(doc, schema, selectedText, startIndex) {
|
|
5
7
|
let textContent = '';
|
|
6
8
|
let matchIndex = 0;
|
|
@@ -57,6 +59,10 @@ export function countMatches(searchString, query) {
|
|
|
57
59
|
return 0;
|
|
58
60
|
}
|
|
59
61
|
// Escape characters that would trigger as syntax in a regex query before converting to the query
|
|
62
|
+
// Ignored via go/ees005
|
|
63
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
64
|
+
// Ignored via go/ees005
|
|
65
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
60
66
|
const reg = new RegExp(query.replace(/(?=[.\\+*?[^\]$(){}\|])/g, '\\'), 'g');
|
|
61
67
|
return (searchString.match(reg) || []).length;
|
|
62
68
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { getUnsupportedContentLevelData, getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { PLATFORM } from './events';
|
|
4
|
+
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
|
|
4
8
|
let rendersMap = {};
|
|
5
9
|
const processLevelsAndTrack = (item, thresholds, dispatchAnalyticsEvent) => {
|
|
6
10
|
try {
|
|
@@ -40,7 +44,11 @@ const processLevelsAndTrack = (item, thresholds, dispatchAnalyticsEvent) => {
|
|
|
40
44
|
}
|
|
41
45
|
};
|
|
42
46
|
const schedule = fn => {
|
|
47
|
+
// Ignored via go/ees005
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
43
49
|
if (typeof window.requestIdleCallback === 'function') {
|
|
50
|
+
// Ignored via go/ees005
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
44
52
|
window.requestIdleCallback(fn);
|
|
45
53
|
} else {
|
|
46
54
|
setTimeout(fn, 0);
|
|
@@ -76,6 +76,10 @@ export default class ReactSerializer {
|
|
|
76
76
|
return this.renderMark(markToReact(mark), this.withMediaMarkProps(node, mark, this.getMarkProps(mark, [], node)), `${mark.type.name}-${index}`, content);
|
|
77
77
|
}, serializedContent);
|
|
78
78
|
});
|
|
79
|
+
// Ignored via go/ees005
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
+
// Ignored via go/ees005
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
83
|
_defineProperty(this, "withMediaMarkProps", (node, mark, defaultProps) => {
|
|
80
84
|
if (mark.type.name === 'link' && node.type.name === 'media') {
|
|
81
85
|
return {
|
|
@@ -235,7 +239,16 @@ export default class ReactSerializer {
|
|
|
235
239
|
return this.getProps(node, path);
|
|
236
240
|
}
|
|
237
241
|
}
|
|
238
|
-
|
|
242
|
+
|
|
243
|
+
// Ignored via go/ees005
|
|
244
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
245
|
+
serializeFragment(fragment,
|
|
246
|
+
// Ignored via go/ees005
|
|
247
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
248
|
+
props = {},
|
|
249
|
+
// Ignored via go/ees005
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
251
|
+
target = this.allowSelectAllTrap ? DocWithSelectAllTrap : Doc, key = 'root-0', parentInfo) {
|
|
239
252
|
// This makes sure that we reset internal state on re-render.
|
|
240
253
|
if (key === 'root-0') {
|
|
241
254
|
this.resetState();
|
|
@@ -285,6 +298,9 @@ export default class ReactSerializer {
|
|
|
285
298
|
path: [...parentMark.path, childMark]
|
|
286
299
|
}
|
|
287
300
|
});
|
|
301
|
+
|
|
302
|
+
// Ignored via go/ees005
|
|
303
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
288
304
|
const content = (mark.content || []).map(serializeContent);
|
|
289
305
|
const markKey = `${mark.type.name}-component__${this.startPos}__${parentMark.path.length}`;
|
|
290
306
|
return this.renderMark(markToReact(mark), this.getMarkProps(mark, parentMark.path), markKey, content);
|
|
@@ -306,15 +322,46 @@ export default class ReactSerializer {
|
|
|
306
322
|
const segments = segmentText(mark.text, this.textHighlighter);
|
|
307
323
|
return renderTextSegments(segments, this.textHighlighter, mark.marks, startPos);
|
|
308
324
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
325
|
+
|
|
326
|
+
// Ignored via go/ees005
|
|
327
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
328
|
+
renderNode(
|
|
329
|
+
// Ignored via go/ees005
|
|
330
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
331
|
+
NodeComponent,
|
|
332
|
+
// Ignored via go/ees005
|
|
333
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
334
|
+
props, key,
|
|
335
|
+
// Ignored via go/ees005
|
|
336
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
337
|
+
content) {
|
|
338
|
+
return (
|
|
339
|
+
/*#__PURE__*/
|
|
340
|
+
// Ignored via go/ees005
|
|
341
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
342
|
+
React.createElement(NodeComponent, _extends({
|
|
343
|
+
key: key
|
|
344
|
+
}, props), content)
|
|
345
|
+
);
|
|
313
346
|
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
347
|
+
|
|
348
|
+
// Ignored via go/ees005
|
|
349
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
350
|
+
renderMark(
|
|
351
|
+
// Ignored via go/ees005
|
|
352
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
353
|
+
MarkComponent, props, key,
|
|
354
|
+
// Ignored via go/ees005
|
|
355
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
356
|
+
content) {
|
|
357
|
+
return (
|
|
358
|
+
/*#__PURE__*/
|
|
359
|
+
// Ignored via go/ees005
|
|
360
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
361
|
+
React.createElement(MarkComponent, _extends({
|
|
362
|
+
key: key
|
|
363
|
+
}, props), content)
|
|
364
|
+
);
|
|
318
365
|
}
|
|
319
366
|
getTableChildrenProps(node) {
|
|
320
367
|
return {
|
|
@@ -543,7 +590,15 @@ export default class ReactSerializer {
|
|
|
543
590
|
|
|
544
591
|
// We are not use node.textContent here, because we would like to handle cases where
|
|
545
592
|
// headings only contain inline blocks like emoji, status and date.
|
|
546
|
-
|
|
593
|
+
// Ignored via go/ees005
|
|
594
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
595
|
+
const nodeContent = node.content.toJSON()
|
|
596
|
+
// Ignored via go/ees005
|
|
597
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
598
|
+
.reduce((acc, node) => acc.concat(getText(node) || ''), '').trim()
|
|
599
|
+
// Ignored via go/ees005
|
|
600
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
601
|
+
.replace(/\s/g, '-');
|
|
547
602
|
if (!nodeContent) {
|
|
548
603
|
return;
|
|
549
604
|
}
|
|
@@ -590,6 +645,8 @@ export default class ReactSerializer {
|
|
|
590
645
|
eq,
|
|
591
646
|
content: [acc]
|
|
592
647
|
};
|
|
648
|
+
// Ignored via go/ees005
|
|
649
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
593
650
|
}, node);
|
|
594
651
|
}));
|
|
595
652
|
}
|
|
@@ -13,12 +13,12 @@ const MarkWrapper = props => {
|
|
|
13
13
|
css`
|
|
14
14
|
text-align: ${alignmentPositionMap[props['data-align']]};
|
|
15
15
|
` : '';
|
|
16
|
-
return (
|
|
16
|
+
return jsx("div", _extends({
|
|
17
17
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
18
|
+
css: styles
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
21
|
+
}, props), props.children);
|
|
22
22
|
};
|
|
23
23
|
export default function Alignment(props) {
|
|
24
24
|
return jsx(MarkWrapper
|
|
@@ -39,8 +39,13 @@ const AnnotationComponent = ({
|
|
|
39
39
|
useBlockLevel: useBlockLevel
|
|
40
40
|
}, children);
|
|
41
41
|
}
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
return (
|
|
43
|
+
/*#__PURE__*/
|
|
44
|
+
// Ignored via go/ees005
|
|
45
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
46
|
+
React.createElement("span", _extends({
|
|
47
|
+
id: id
|
|
48
|
+
}, data), children)
|
|
49
|
+
);
|
|
45
50
|
};
|
|
46
51
|
export default AnnotationComponent;
|
|
@@ -22,6 +22,8 @@ export default function Breakout(props) {
|
|
|
22
22
|
}) => jsx("div", _extends({
|
|
23
23
|
css: wrapperStyles,
|
|
24
24
|
"data-mode": props.mode
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
25
27
|
}, editorExperiment('advanced_layouts', true) && {
|
|
26
28
|
'data-has-width': !!props.width,
|
|
27
29
|
'data-width': props.width
|
|
@@ -14,6 +14,8 @@ export function CodeWithIntl(props) {
|
|
|
14
14
|
className: "code",
|
|
15
15
|
codeBidiWarningLabel: codeBidiWarningLabel,
|
|
16
16
|
codeBidiWarningTooltipEnabled: props.codeBidiWarningTooltipEnabled
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
17
19
|
}, props.dataAttributes), props.children);
|
|
18
20
|
}
|
|
19
21
|
export default injectIntl(CodeWithIntl);
|
|
@@ -5,5 +5,7 @@ export default function DataConsumer(props) {
|
|
|
5
5
|
return /*#__PURE__*/React.createElement(WrapperElement, _extends({
|
|
6
6
|
"data-source": props.sources ? JSON.stringify(props.sources) : undefined,
|
|
7
7
|
"data-mark-type": "dataConsumer"
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
8
10
|
}, props.dataAttributes), props.children);
|
|
9
11
|
}
|
|
@@ -2,5 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export default function Em(props) {
|
|
3
3
|
// ignore the eslint warning Text primitive does not support dataAttributes
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/use-primitives-text
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
5
7
|
return /*#__PURE__*/React.createElement("em", props.dataAttributes, props.children);
|
|
6
8
|
}
|
|
@@ -6,5 +6,7 @@ export default function FragmentMark(props) {
|
|
|
6
6
|
"data-localId": props.localId,
|
|
7
7
|
"data-name": props.name,
|
|
8
8
|
"data-mark-type": "fragment"
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
9
11
|
}, props.dataAttributes), props.children);
|
|
10
12
|
}
|
|
@@ -44,6 +44,9 @@ export const markToReact = {
|
|
|
44
44
|
dataConsumer: DataConsumer,
|
|
45
45
|
fragment: FragmentMark
|
|
46
46
|
};
|
|
47
|
+
|
|
48
|
+
// Ignored via go/ees005
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
50
|
export const toReact = mark => {
|
|
48
51
|
return markToReact[mark.type.name];
|
|
49
52
|
};
|
|
@@ -71,6 +71,8 @@ export default function Link(props) {
|
|
|
71
71
|
handler(e, href);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
+
// Ignored via go/ees005
|
|
75
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
74
76
|
}, anchorProps, dataAttributes, fg('platform_editor_hyperlink_underline') && {
|
|
75
77
|
isLinkComponent: true
|
|
76
78
|
}), props.children));
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export default function Strike(props) {
|
|
4
|
-
return (
|
|
5
|
-
/*#__PURE__*/
|
|
4
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, props.dataAttributes, {
|
|
6
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}), props.children)
|
|
12
|
-
);
|
|
6
|
+
style: {
|
|
7
|
+
textDecoration: 'line-through'
|
|
8
|
+
}
|
|
9
|
+
}), props.children);
|
|
13
10
|
}
|
|
@@ -2,5 +2,7 @@ import React from 'react';
|
|
|
2
2
|
export default function Strong(props) {
|
|
3
3
|
// ignore the eslint warning Text primitive does not support dataAttributes
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/use-primitives-text
|
|
5
|
+
// Ignored via go/ees005
|
|
6
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
5
7
|
return /*#__PURE__*/React.createElement("strong", props.dataAttributes, props.children);
|
|
6
8
|
}
|
|
@@ -4,7 +4,12 @@ const isSub = type => {
|
|
|
4
4
|
};
|
|
5
5
|
export default function SubSup(props) {
|
|
6
6
|
if (isSub(props.type)) {
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
7
9
|
return /*#__PURE__*/React.createElement("sub", props.dataAttributes, props.children);
|
|
8
10
|
}
|
|
11
|
+
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
9
14
|
return /*#__PURE__*/React.createElement("sup", props.dataAttributes, props.children);
|
|
10
15
|
}
|
|
@@ -14,6 +14,8 @@ export class TableStickyScrollbar {
|
|
|
14
14
|
}
|
|
15
15
|
dispose() {
|
|
16
16
|
if (this.stickyScrollbarContainerElement) {
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
17
19
|
this.stickyScrollbarContainerElement.removeEventListener('scroll', this.handleScroll);
|
|
18
20
|
}
|
|
19
21
|
this.deleteIntersectionObserver();
|
|
@@ -30,6 +32,8 @@ export class TableStickyScrollbar {
|
|
|
30
32
|
}
|
|
31
33
|
this.stickyScrollbarContainerElement = (_this$wrapper$parentE = this.wrapper.parentElement) === null || _this$wrapper$parentE === void 0 ? void 0 : _this$wrapper$parentE.querySelector(`.${TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER}`);
|
|
32
34
|
if (this.stickyScrollbarContainerElement) {
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
33
37
|
this.stickyScrollbarContainerElement.addEventListener('scroll', this.handleScroll, {
|
|
34
38
|
passive: true
|
|
35
39
|
});
|
|
@@ -47,6 +51,8 @@ export class TableStickyScrollbar {
|
|
|
47
51
|
return;
|
|
48
52
|
}
|
|
49
53
|
entries.forEach(entry => {
|
|
54
|
+
// Ignored via go/ees005
|
|
55
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
50
56
|
const target = entry.target;
|
|
51
57
|
if (target.classList.contains(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM)) {
|
|
52
58
|
this.sentinelBottomCallback(entry);
|
|
@@ -58,9 +64,18 @@ export class TableStickyScrollbar {
|
|
|
58
64
|
}, {
|
|
59
65
|
root: this.rendererScrollableElement
|
|
60
66
|
});
|
|
67
|
+
|
|
68
|
+
// Ignored via go/ees005
|
|
69
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
61
70
|
this.sentinels.bottom = (_this$wrapper = this.wrapper) === null || _this$wrapper === void 0 ? void 0 : (_this$wrapper$parentE2 = _this$wrapper.parentElement) === null || _this$wrapper$parentE2 === void 0 ? void 0 : (_this$wrapper$parentE3 = _this$wrapper$parentE2.getElementsByClassName(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM)) === null || _this$wrapper$parentE3 === void 0 ? void 0 : _this$wrapper$parentE3.item(0);
|
|
71
|
+
|
|
72
|
+
// Ignored via go/ees005
|
|
73
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
62
74
|
this.sentinels.top = (_this$wrapper2 = this.wrapper) === null || _this$wrapper2 === void 0 ? void 0 : (_this$wrapper2$parent = _this$wrapper2.parentElement) === null || _this$wrapper2$parent === void 0 ? void 0 : (_this$wrapper2$parent2 = _this$wrapper2$parent.getElementsByClassName(TableSharedCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP)) === null || _this$wrapper2$parent2 === void 0 ? void 0 : _this$wrapper2$parent2.item(0);
|
|
63
|
-
[this.sentinels.bottom, this.sentinels.top].forEach(el =>
|
|
75
|
+
[this.sentinels.bottom, this.sentinels.top].forEach(el =>
|
|
76
|
+
// Ignored via go/ees005
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
78
|
+
this.intersectionObserver.observe(el));
|
|
64
79
|
}
|
|
65
80
|
deleteIntersectionObserver() {
|
|
66
81
|
if (this.intersectionObserver) {
|
|
@@ -84,6 +84,8 @@ export default function BlockCard(props) {
|
|
|
84
84
|
}, jsx(CardErrorBoundary, _extends({
|
|
85
85
|
unsupportedComponent: UnsupportedInline,
|
|
86
86
|
datasourceId: props.datasource.id
|
|
87
|
+
// Ignored via go/ees005
|
|
88
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
87
89
|
}, cardProps), jsx(WidthConsumer, null, ({
|
|
88
90
|
width
|
|
89
91
|
}) => jsx("div", {
|
|
@@ -117,9 +119,13 @@ export default function BlockCard(props) {
|
|
|
117
119
|
"data-card-url": url
|
|
118
120
|
}, jsx(CardErrorBoundary, _extends({
|
|
119
121
|
unsupportedComponent: UnsupportedBlock
|
|
122
|
+
// Ignored via go/ees005
|
|
123
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
120
124
|
}, cardProps), jsx(Card, _extends({
|
|
121
125
|
appearance: "block",
|
|
122
126
|
platform: platform
|
|
127
|
+
// Ignored via go/ees005
|
|
128
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
123
129
|
}, cardProps, {
|
|
124
130
|
onError: onError
|
|
125
131
|
})))));
|
|
@@ -18,7 +18,10 @@ const BodiedExtension = props => {
|
|
|
18
18
|
const {
|
|
19
19
|
createAnalyticsEvent
|
|
20
20
|
} = useAnalyticsEvents();
|
|
21
|
-
const removeOverflow = React.Children.toArray(children)
|
|
21
|
+
const removeOverflow = React.Children.toArray(children)
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
|
+
.map(child => /*#__PURE__*/React.isValidElement(child) ? child.props.nodeType === 'table' : false).every(Boolean);
|
|
22
25
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
23
26
|
component: ACTION_SUBJECT.RENDERER,
|
|
24
27
|
componentId: ACTION_SUBJECT_ID.EXTENSION_BODIED,
|
|
@@ -28,7 +31,10 @@ const BodiedExtension = props => {
|
|
|
28
31
|
value: {
|
|
29
32
|
startPos: props.startPos + 1
|
|
30
33
|
}
|
|
31
|
-
}, /*#__PURE__*/React.createElement(ExtensionRenderer
|
|
34
|
+
}, /*#__PURE__*/React.createElement(ExtensionRenderer
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
37
|
+
, _extends({}, props, {
|
|
32
38
|
type: "bodiedExtension"
|
|
33
39
|
}), ({
|
|
34
40
|
result
|
|
@@ -61,7 +61,10 @@ const LightWeightCodeBlock = /*#__PURE__*/forwardRef(({
|
|
|
61
61
|
}, jsx("div", {
|
|
62
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
63
63
|
className: CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER
|
|
64
|
-
}, textRows.map((_, index) =>
|
|
64
|
+
}, textRows.map((_, index) =>
|
|
65
|
+
// Ignored via go/ees005
|
|
66
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
67
|
+
jsx("span", {
|
|
65
68
|
key: index
|
|
66
69
|
}))), jsx("div", {
|
|
67
70
|
className: CodeBlockSharedCssClassName.CODEBLOCK_CONTENT
|
|
@@ -10,7 +10,10 @@ import { useInViewport } from '../../hooks/use-in-viewport';
|
|
|
10
10
|
import { useBidiWarnings } from '../../hooks/use-bidi-warnings';
|
|
11
11
|
import LightWeightCodeBlock from './components/lightWeightCodeBlock';
|
|
12
12
|
import CodeBlockContainer from './components/codeBlockContainer';
|
|
13
|
-
const LazyAkCodeBlock = /*#__PURE__*/lazy(
|
|
13
|
+
const LazyAkCodeBlock = /*#__PURE__*/lazy(
|
|
14
|
+
// Ignored via go/ees005
|
|
15
|
+
// eslint-disable-next-line require-await
|
|
16
|
+
async () => import( /* webpackChunkName: "@atlaskit-internal_renderer-codeBlock" */
|
|
14
17
|
'@atlaskit/code/block'));
|
|
15
18
|
const joinWithSpaces = (...strs) => strs.join(' ');
|
|
16
19
|
const MemoizedLightWeightCodeBlock = /*#__PURE__*/memo(LightWeightCodeBlock);
|
|
@@ -13,18 +13,17 @@ const Date = /*#__PURE__*/memo(function Date(props) {
|
|
|
13
13
|
intl
|
|
14
14
|
} = props;
|
|
15
15
|
const className = !!parentIsIncompleteTask && isPastDate(timestamp) ? 'date-node date-node-highlighted' : 'date-node';
|
|
16
|
-
return (
|
|
17
|
-
/*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
18
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
);
|
|
18
|
+
className: DateSharedCssClassName.DATE_WRAPPER
|
|
19
|
+
// Ignored via go/ees005
|
|
20
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
21
|
+
}, inlineAnnotationProps), /*#__PURE__*/React.createElement("span", {
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
23
|
+
className: className,
|
|
24
|
+
"data-node-type": "date",
|
|
25
|
+
"data-timestamp": timestamp
|
|
26
|
+
}, parentIsIncompleteTask ? timestampToTaskContext(timestamp, intl) : timestampToString(timestamp, intl)));
|
|
28
27
|
});
|
|
29
28
|
export const DateComponent = injectIntl(Date);
|
|
30
29
|
function DateWithFormatContext(props) {
|
|
@@ -33,6 +32,9 @@ function DateWithFormatContext(props) {
|
|
|
33
32
|
if (typeof isChecked !== 'undefined') {
|
|
34
33
|
parentIsIncompleteTask = !isChecked;
|
|
35
34
|
}
|
|
35
|
+
|
|
36
|
+
// Ignored via go/ees005
|
|
37
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
36
38
|
return /*#__PURE__*/React.createElement(DateComponent, _extends({}, props, {
|
|
37
39
|
parentIsIncompleteTask: parentIsIncompleteTask
|
|
38
40
|
}));
|