@atlaskit/renderer 112.7.11 → 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 +14 -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 +2 -2
- package/tsconfig.json +0 -1
|
@@ -146,41 +146,47 @@ function EmbedCard(props) {
|
|
|
146
146
|
throw err;
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
-
return (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
149
|
+
return (
|
|
150
|
+
// Ignored via go/ees005
|
|
151
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
152
|
+
(0, _react.jsx)(_fallback.CardErrorBoundary, (0, _extends2.default)({
|
|
153
|
+
unsupportedComponent: _ui.UnsupportedBlock
|
|
154
|
+
}, cardProps), (0, _react.jsx)(_smartCard.EmbedResizeMessageListener, {
|
|
155
|
+
embedIframeRef: embedIframeRef,
|
|
156
|
+
onHeightUpdate: setLiveHeight
|
|
157
|
+
}, (0, _react.jsx)(_ui.MediaSingle, {
|
|
158
|
+
css: uiMediaSingleStyles,
|
|
159
|
+
layout: layout,
|
|
160
|
+
width: originalWidth,
|
|
161
|
+
containerWidth: containerWidth,
|
|
162
|
+
pctWidth: width,
|
|
163
|
+
height: originalHeight,
|
|
164
|
+
fullWidthMode: isFullWidth,
|
|
165
|
+
nodeType: "embedCard",
|
|
166
|
+
lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
|
|
167
|
+
hasFallbackContainer: hasPreview,
|
|
168
|
+
isInsideOfInlineExtension: isInsideOfInlineExtension
|
|
169
|
+
}, (0, _react.jsx)("div", {
|
|
170
|
+
css: embedCardWrapperStyles
|
|
171
|
+
}, (0, _react.jsx)("div", {
|
|
172
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
173
|
+
className: "embedCardView-content-wrap",
|
|
174
|
+
"data-embed-card": true,
|
|
175
|
+
"data-layout": layout,
|
|
176
|
+
"data-width": width,
|
|
177
|
+
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
178
|
+
"data-card-url": url,
|
|
179
|
+
"data-card-original-height": originalHeight
|
|
180
|
+
}, (0, _react.jsx)(_smartCard.Card, (0, _extends2.default)({
|
|
181
|
+
appearance: "embed"
|
|
182
|
+
// Ignored via go/ees005
|
|
183
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
184
|
+
}, cardProps, {
|
|
185
|
+
onResolve: onResolve,
|
|
186
|
+
inheritDimensions: true,
|
|
187
|
+
embedIframeRef: embedIframeRef,
|
|
188
|
+
onError: onError
|
|
189
|
+
})))))))
|
|
190
|
+
);
|
|
185
191
|
}));
|
|
186
192
|
}
|
|
@@ -103,15 +103,19 @@ function EmojiItem(props) {
|
|
|
103
103
|
resourceConfig = props.resourceConfig;
|
|
104
104
|
var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
|
|
105
105
|
if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
|
|
106
|
-
return (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
return (
|
|
107
|
+
// Ignored via go/ees005
|
|
108
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
109
|
+
(0, _react.jsx)("span", inlineAnnotationProps, (0, _react.jsx)(EmojiNode, {
|
|
110
|
+
allowTextFallback: true,
|
|
111
|
+
id: id,
|
|
112
|
+
shortName: shortName,
|
|
113
|
+
fallback: text,
|
|
114
|
+
providers: providers,
|
|
115
|
+
fitToHeight: fitToHeight,
|
|
116
|
+
resourceConfig: resourceConfig
|
|
117
|
+
}))
|
|
118
|
+
);
|
|
115
119
|
}
|
|
116
120
|
return (0, _react.jsx)(EmojiNode, {
|
|
117
121
|
allowTextFallback: true,
|
|
@@ -13,7 +13,10 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
13
13
|
var _consts = require("../../consts");
|
|
14
14
|
var renderExtension = exports.renderExtension = function renderExtension(content, layout) {
|
|
15
15
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
16
|
-
var removeOverflow
|
|
16
|
+
var removeOverflow
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
19
|
+
= arguments.length > 3 ? arguments[3] : undefined;
|
|
17
20
|
var overflowContainerClass = !removeOverflow ? _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
18
21
|
|
|
19
22
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
@@ -46,7 +49,10 @@ var Extension = function Extension(props) {
|
|
|
46
49
|
shadowClassNames = props.shadowClassNames,
|
|
47
50
|
_props$path = props.path,
|
|
48
51
|
path = _props$path === void 0 ? [] : _props$path;
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_ExtensionRenderer.default
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_ExtensionRenderer.default
|
|
53
|
+
// Ignored via go/ees005
|
|
54
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
55
|
+
, (0, _extends2.default)({}, props, {
|
|
50
56
|
type: "extension"
|
|
51
57
|
}), function (_ref3) {
|
|
52
58
|
var result = _ref3.result;
|
|
@@ -17,6 +17,8 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
17
17
|
var _linkDatasource = require("@atlaskit/link-datasource");
|
|
18
18
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
19
19
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
20
22
|
var CardErrorBoundary = exports.CardErrorBoundary = /*#__PURE__*/function (_React$PureComponent) {
|
|
21
23
|
function CardErrorBoundary() {
|
|
22
24
|
var _this;
|
|
@@ -60,7 +62,10 @@ var CardErrorBoundary = exports.CardErrorBoundary = /*#__PURE__*/function (_Reac
|
|
|
60
62
|
return /*#__PURE__*/_react.default.createElement(_linkDatasource.LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
|
|
61
63
|
datasourceId: datasourceId,
|
|
62
64
|
error: this.state.error
|
|
63
|
-
}, /*#__PURE__*/_react.default.createElement(_.InlineCard
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_.InlineCard
|
|
66
|
+
// Ignored via go/ees005
|
|
67
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
68
|
+
, this.props));
|
|
64
69
|
} else {
|
|
65
70
|
return /*#__PURE__*/_react.default.createElement(_linkDatasource.LazyLoadedDatasourceRenderFailedAnalyticsWrapper, {
|
|
66
71
|
datasourceId: datasourceId,
|
|
@@ -34,13 +34,11 @@ var HeadingAnchorWrapperClassName = exports.HeadingAnchorWrapperClassName = 'hea
|
|
|
34
34
|
var CopyAnchorWrapperWithRef = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
35
35
|
var children = props.children,
|
|
36
36
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
37
|
-
return (
|
|
37
|
+
return (0, _react2.jsx)("span", (0, _extends2.default)({}, rest, {
|
|
38
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}), children)
|
|
43
|
-
);
|
|
39
|
+
className: HeadingAnchorWrapperClassName,
|
|
40
|
+
ref: ref
|
|
41
|
+
}), children);
|
|
44
42
|
});
|
|
45
43
|
var copyAnchorButtonStyles = (0, _react2.css)({
|
|
46
44
|
display: 'inline',
|
|
@@ -51,6 +49,11 @@ var copyAnchorButtonStyles = (0, _react2.css)({
|
|
|
51
49
|
cursor: 'pointer',
|
|
52
50
|
right: 0
|
|
53
51
|
});
|
|
52
|
+
|
|
53
|
+
// Ignored via go/ees005
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
|
+
// Ignored via go/ees005
|
|
56
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
54
57
|
var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
|
|
55
58
|
function HeadingAnchor() {
|
|
56
59
|
var _this;
|
|
@@ -58,16 +58,21 @@ function Heading(props) {
|
|
|
58
58
|
var isRightAligned = hasRightAlignmentMark(marks);
|
|
59
59
|
var enableNestedHeaderLinks = allowHeadingAnchorLinks && allowHeadingAnchorLinks.allowNestedHeaderLinks;
|
|
60
60
|
var headingIdToUse = invisible ? undefined : headingId;
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
return (
|
|
62
|
+
/*#__PURE__*/
|
|
63
|
+
// Ignored via go/ees005
|
|
64
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
65
|
+
_react.default.createElement(HX, (0, _extends2.default)({
|
|
66
|
+
id: headingIdToUse
|
|
67
|
+
}, dataAttributes), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showAnchorLink && headingId && isRightAligned && /*#__PURE__*/_react.default.createElement(WrappedHeadingAnchor, {
|
|
68
|
+
level: props.level,
|
|
69
|
+
enableNestedHeaderLinks: enableNestedHeaderLinks,
|
|
70
|
+
headingId: headingId
|
|
71
|
+
}), props.children, showAnchorLink && headingId && !isRightAligned && /*#__PURE__*/_react.default.createElement(WrappedHeadingAnchor, {
|
|
72
|
+
level: props.level,
|
|
73
|
+
enableNestedHeaderLinks: enableNestedHeaderLinks,
|
|
74
|
+
headingId: headingId
|
|
75
|
+
})))
|
|
76
|
+
);
|
|
72
77
|
}
|
|
73
78
|
var _default = exports.default = Heading;
|
|
@@ -183,6 +183,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
183
183
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
184
184
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
185
185
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /* eslint-disable @atlaskit/editor/no-re-export */ // Mapping file
|
|
186
|
+
// Ignored via go/ees005
|
|
187
|
+
// eslint-disable-next-line import/no-named-as-default
|
|
188
|
+
|
|
186
189
|
var WindowedCodeBlock = exports.WindowedCodeBlock = (0, _reactLoadable.default)({
|
|
187
190
|
loader: function loader() {
|
|
188
191
|
return Promise.resolve().then(function () {
|
|
@@ -475,7 +478,10 @@ var nodeToReact = exports.nodeToReact = {
|
|
|
475
478
|
nestedExpand: Expand,
|
|
476
479
|
embedCard: EmbedCard
|
|
477
480
|
};
|
|
478
|
-
var toReact = exports.toReact = function toReact(node, flags, nodeComponents
|
|
481
|
+
var toReact = exports.toReact = function toReact(node, flags, nodeComponents
|
|
482
|
+
// Ignored via go/ees005
|
|
483
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
484
|
+
) {
|
|
479
485
|
if (node.type.name === 'doc' && (flags === null || flags === void 0 ? void 0 : flags.allowSelectAllTrap) === true) {
|
|
480
486
|
return _doc.DocWithSelectAllTrap;
|
|
481
487
|
}
|
|
@@ -542,6 +548,8 @@ var mergeTextNodes = exports.mergeTextNodes = function mergeTextNodes(nodes) {
|
|
|
542
548
|
// Append node to previous node, if it was a text wrapper
|
|
543
549
|
if (acc.length > 0 && isTextWrapper(acc[acc.length - 1])) {
|
|
544
550
|
var textWrapper = acc[acc.length - 1];
|
|
551
|
+
// Ignored via go/ees005
|
|
552
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
545
553
|
textWrapper.content.push(current);
|
|
546
554
|
textWrapper.nodeSize += current.nodeSize;
|
|
547
555
|
} else {
|
|
@@ -565,6 +573,9 @@ var isTextWrapper = exports.isTextWrapper = function isTextWrapper(node) {
|
|
|
565
573
|
function isTextNode(node) {
|
|
566
574
|
return node.type.name === 'text';
|
|
567
575
|
}
|
|
576
|
+
|
|
577
|
+
// Ignored via go/ees005
|
|
578
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
568
579
|
var whitespaceRegex = /^\s*$/;
|
|
569
580
|
|
|
570
581
|
/**
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = Inline;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
11
|
function Inline(props) {
|
|
10
12
|
var children = props.children;
|
|
11
13
|
var childCount = _react.default.Children.toArray(children).length;
|
|
@@ -56,6 +56,8 @@ var InlineCard = function InlineCard(props) {
|
|
|
56
56
|
"data-inline-card": true,
|
|
57
57
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
58
58
|
"data-card-url": url
|
|
59
|
+
// Ignored via go/ees005
|
|
60
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
59
61
|
}, inlineAnnotationProps), (0, _react.jsx)(_analyticsNext.AnalyticsContext, {
|
|
60
62
|
data: analyticsData
|
|
61
63
|
}, (0, _react.jsx)(_ssr.CardSSR, {
|
|
@@ -90,13 +92,19 @@ var InlineCard = function InlineCard(props) {
|
|
|
90
92
|
"data-inline-card": true,
|
|
91
93
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
92
94
|
"data-card-url": url
|
|
95
|
+
// Ignored via go/ees005
|
|
96
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
93
97
|
}, inlineAnnotationProps), (0, _react.jsx)(_fallback.CardErrorBoundary, (0, _extends2.default)({
|
|
94
98
|
unsupportedComponent: _ui.UnsupportedInline
|
|
99
|
+
// Ignored via go/ees005
|
|
100
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
95
101
|
}, cardProps), (0, _react.jsx)(_smartCard.Card, (0, _extends2.default)({
|
|
96
102
|
appearance: "inline",
|
|
97
103
|
showHoverPreview: !hideHoverPreview,
|
|
98
104
|
showAuthTooltip: showAuthTooltip,
|
|
99
105
|
actionOptions: actionOptions
|
|
106
|
+
// Ignored via go/ees005
|
|
107
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
100
108
|
}, cardProps, {
|
|
101
109
|
onResolve: function onResolve(data) {
|
|
102
110
|
if (!data.url || !data.title) {
|
|
@@ -10,22 +10,27 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _ExtensionRenderer = _interopRequireDefault(require("../../ui/ExtensionRenderer"));
|
|
11
11
|
var InlineExtension = function InlineExtension(props) {
|
|
12
12
|
var text = props.text;
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
return (
|
|
14
|
+
/*#__PURE__*/
|
|
15
|
+
// Ignored via go/ees005
|
|
16
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
17
|
+
_react.default.createElement(_ExtensionRenderer.default, (0, _extends2.default)({}, props, {
|
|
18
|
+
type: "inlineExtension"
|
|
19
|
+
}), function (_ref) {
|
|
20
|
+
var result = _ref.result;
|
|
21
|
+
try {
|
|
22
|
+
// Return the result directly if it's a valid JSX.Element
|
|
23
|
+
if (result && /*#__PURE__*/_react.default.isValidElement(result)) {
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement("span", null, result);
|
|
25
|
+
}
|
|
26
|
+
} catch (e) {
|
|
27
|
+
/** We don't want this error to block renderer */
|
|
28
|
+
/** We keep rendering the default content */
|
|
21
29
|
}
|
|
22
|
-
} catch (e) {
|
|
23
|
-
/** We don't want this error to block renderer */
|
|
24
|
-
/** We keep rendering the default content */
|
|
25
|
-
}
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
// Always return default content if anything goes wrong
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("span", null, text || 'inlineExtension');
|
|
33
|
+
})
|
|
34
|
+
);
|
|
30
35
|
};
|
|
31
36
|
var _default = exports.default = InlineExtension;
|
|
@@ -190,6 +190,8 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref5) {
|
|
|
190
190
|
if (updateSubscriber) {
|
|
191
191
|
updateSubscriber.emit(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, {
|
|
192
192
|
annotationIds: activeParentIds,
|
|
193
|
+
// Ignored via go/ees005
|
|
194
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
193
195
|
eventTarget: e.target,
|
|
194
196
|
// use mediaSingle here to align with annotation viewed event dispatched in editor
|
|
195
197
|
eventTargetType: 'mediaSingle',
|
|
@@ -206,6 +208,8 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref5) {
|
|
|
206
208
|
},
|
|
207
209
|
status: entered ? 'entered' : status,
|
|
208
210
|
onClick: onClick
|
|
211
|
+
// Ignored via go/ees005
|
|
212
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
209
213
|
}, rest));
|
|
210
214
|
};
|
|
211
215
|
|
|
@@ -269,6 +273,8 @@ var CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref6) {
|
|
|
269
273
|
if (updateSubscriber) {
|
|
270
274
|
updateSubscriber.emit(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, {
|
|
271
275
|
annotationIds: activeParentIds,
|
|
276
|
+
// Ignored via go/ees005
|
|
277
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
272
278
|
eventTarget: e.target,
|
|
273
279
|
// use mediaSingle here to align with annotation viewed event dispatched in editor
|
|
274
280
|
eventTargetType: 'mediaSingle',
|
|
@@ -286,8 +292,13 @@ var CommentBadgeNextWrapper = function CommentBadgeNextWrapper(_ref6) {
|
|
|
286
292
|
status: entered ? 'entered' : status,
|
|
287
293
|
onClick: onClick,
|
|
288
294
|
mediaSingleElement: mediaSingleElement
|
|
295
|
+
// Ignored via go/ees005
|
|
296
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
289
297
|
}, rest));
|
|
290
298
|
};
|
|
299
|
+
|
|
300
|
+
// Ignored via go/ees005
|
|
301
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
291
302
|
var Media = /*#__PURE__*/function (_PureComponent) {
|
|
292
303
|
function Media(props) {
|
|
293
304
|
var _this;
|
|
@@ -356,6 +367,8 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
356
367
|
isDrafting: isDrafting
|
|
357
368
|
}), (0, _react2.jsx)(_MediaCard.MediaCard, (0, _extends2.default)({
|
|
358
369
|
contextIdentifierProvider: contextIdentifierProvider
|
|
370
|
+
// Ignored via go/ees005
|
|
371
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
359
372
|
}, _this.props, {
|
|
360
373
|
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
361
374
|
eventHandlers: eventHandlers,
|
|
@@ -442,7 +455,10 @@ var MediaWithDraftAnnotation = function MediaWithDraftAnnotation(props) {
|
|
|
442
455
|
'data-renderer-mark': true
|
|
443
456
|
}) : dataAttributes;
|
|
444
457
|
}, [applyDraftAnnotation, dataAttributes]);
|
|
445
|
-
return (0, _react2.jsx)(Media
|
|
458
|
+
return (0, _react2.jsx)(Media
|
|
459
|
+
// Ignored via go/ees005
|
|
460
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
461
|
+
, (0, _extends2.default)({}, props, {
|
|
446
462
|
dataAttributes: dataAttributesWithDraftAnnotation,
|
|
447
463
|
isDrafting: shouldApplyDraftAnnotation
|
|
448
464
|
}));
|
|
@@ -21,6 +21,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
21
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
22
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
23
23
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
24
26
|
var MediaGroup = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
25
27
|
function MediaGroup() {
|
|
26
28
|
var _this;
|
|
@@ -48,13 +50,19 @@ var MediaGroup = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
48
50
|
});
|
|
49
51
|
});
|
|
50
52
|
(0, _defineProperty2.default)(_this, "onMediaClick", function (cardClickHandler, child, surroundingItems) {
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
return (
|
|
54
|
+
// Ignored via go/ees005
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
|
+
function (event, analyticsEvent) {
|
|
57
|
+
var surroundings = {
|
|
58
|
+
// Ignored via go/ees005
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
60
|
+
collectionName: child.props.collection,
|
|
61
|
+
list: surroundingItems
|
|
62
|
+
};
|
|
63
|
+
cardClickHandler(event, surroundings, analyticsEvent);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
58
66
|
});
|
|
59
67
|
return _this;
|
|
60
68
|
}
|
|
@@ -65,6 +73,8 @@ var MediaGroup = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
65
73
|
var numChildren = _react.default.Children.count(this.props.children);
|
|
66
74
|
var content;
|
|
67
75
|
if (numChildren === 1) {
|
|
76
|
+
// Ignored via go/ees005
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
68
78
|
var card = _react.default.Children.toArray(this.props.children)[0];
|
|
69
79
|
switch (card.props.type) {
|
|
70
80
|
case 'file':
|
|
@@ -165,6 +175,8 @@ var MediaGroup = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
165
175
|
switch (type) {
|
|
166
176
|
case 'file':
|
|
167
177
|
return {
|
|
178
|
+
// Ignored via go/ees005
|
|
179
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
168
180
|
id: id,
|
|
169
181
|
mediaItemType: type,
|
|
170
182
|
occurrenceKey: occurrenceKey,
|
|
@@ -174,6 +186,8 @@ var MediaGroup = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
174
186
|
return undefined;
|
|
175
187
|
case 'external':
|
|
176
188
|
return {
|
|
189
|
+
// Ignored via go/ees005
|
|
190
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
177
191
|
id: id,
|
|
178
192
|
mediaItemType: 'file',
|
|
179
193
|
occurrenceKey: occurrenceKey,
|
|
@@ -164,6 +164,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
164
164
|
var identifier = {
|
|
165
165
|
id: id,
|
|
166
166
|
mediaItemType: 'file',
|
|
167
|
+
// Ignored via go/ees005
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
167
169
|
collectionName: collection
|
|
168
170
|
};
|
|
169
171
|
var mediaClient = (0, _react.useContext)(_mediaClientReact.MediaClientContext);
|
|
@@ -32,6 +32,9 @@ var isMediaElement = function isMediaElement(media) {
|
|
|
32
32
|
if (!media) {
|
|
33
33
|
return false;
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
// Ignored via go/ees005
|
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
38
|
var _ref = media.props || {},
|
|
36
39
|
nodeType = _ref.nodeType,
|
|
37
40
|
type = _ref.type;
|
|
@@ -44,7 +47,11 @@ var checkForMediaElement = function checkForMediaElement(children) {
|
|
|
44
47
|
var _React$Children$toArr = _react.default.Children.toArray(children),
|
|
45
48
|
_React$Children$toArr2 = (0, _slicedToArray2.default)(_React$Children$toArr, 1),
|
|
46
49
|
media = _React$Children$toArr2[0];
|
|
50
|
+
// Ignored via go/ees005
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
52
|
if (media && !isMediaElement(media) && media.props.children) {
|
|
53
|
+
// Ignored via go/ees005
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
55
|
return checkForMediaElement(media.props.children);
|
|
49
56
|
}
|
|
50
57
|
return media;
|
|
@@ -165,6 +172,8 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
|
|
|
165
172
|
var handleMouseEnter = function handleMouseEnter(event) {
|
|
166
173
|
cancelTimeout();
|
|
167
174
|
if (event.buttons === 0) {
|
|
175
|
+
// Ignored via go/ees005
|
|
176
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
168
177
|
setHoverTarget && setHoverTarget(event.target);
|
|
169
178
|
setIsWithinRange(true);
|
|
170
179
|
}
|
|
@@ -173,12 +182,20 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
|
|
|
173
182
|
initiateTimeout();
|
|
174
183
|
};
|
|
175
184
|
if (mediaSingleElement && isFullPageRenderer) {
|
|
185
|
+
// Ignored via go/ees005
|
|
186
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
176
187
|
mediaSingleElement.addEventListener('mouseenter', handleMouseEnter);
|
|
188
|
+
// Ignored via go/ees005
|
|
189
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
177
190
|
mediaSingleElement.addEventListener('mouseleave', handleMouseLeave);
|
|
178
191
|
}
|
|
179
192
|
return function () {
|
|
180
193
|
if (mediaSingleElement && isFullPageRenderer) {
|
|
194
|
+
// Ignored via go/ees005
|
|
195
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
181
196
|
mediaSingleElement.removeEventListener('mouseenter', handleMouseEnter);
|
|
197
|
+
// Ignored via go/ees005
|
|
198
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
182
199
|
mediaSingleElement.removeEventListener('mouseleave', handleMouseLeave);
|
|
183
200
|
}
|
|
184
201
|
};
|
|
@@ -234,6 +251,8 @@ var MediaSingle = function MediaSingle(props) {
|
|
|
234
251
|
node = _React$Children$toArr4[0],
|
|
235
252
|
caption = _React$Children$toArr4[1];
|
|
236
253
|
if (!isMediaElement(node)) {
|
|
254
|
+
// Ignored via go/ees005
|
|
255
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
237
256
|
var mediaElement = checkForMediaElement(node.props.children);
|
|
238
257
|
if (!mediaElement) {
|
|
239
258
|
return node;
|
|
@@ -242,6 +261,8 @@ var MediaSingle = function MediaSingle(props) {
|
|
|
242
261
|
} else {
|
|
243
262
|
media = node;
|
|
244
263
|
}
|
|
264
|
+
// Ignored via go/ees005
|
|
265
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
245
266
|
return (0, _react2.jsx)(MediaSingleWithChildren, (0, _extends2.default)({}, props, {
|
|
246
267
|
media: media,
|
|
247
268
|
caption: caption
|
|
@@ -20,14 +20,19 @@ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function MentionI
|
|
|
20
20
|
localId = props.localId;
|
|
21
21
|
var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
|
|
22
22
|
if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
return (
|
|
24
|
+
/*#__PURE__*/
|
|
25
|
+
// Ignored via go/ees005
|
|
26
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
27
|
+
_react.default.createElement("span", inlineAnnotationProps, /*#__PURE__*/_react.default.createElement(_mention.Mention, {
|
|
28
|
+
id: id,
|
|
29
|
+
text: text,
|
|
30
|
+
accessLevel: accessLevel,
|
|
31
|
+
providers: providers,
|
|
32
|
+
localId: localId,
|
|
33
|
+
eventHandlers: eventHandlers && eventHandlers.mention
|
|
34
|
+
}))
|
|
35
|
+
);
|
|
31
36
|
}
|
|
32
37
|
return /*#__PURE__*/_react.default.createElement(_mention.Mention, {
|
|
33
38
|
id: id,
|
|
@@ -46,6 +46,8 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
46
46
|
updateParameters: function updateParameters(parameters) {
|
|
47
47
|
return false;
|
|
48
48
|
},
|
|
49
|
+
// Ignored via go/ees005
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
51
|
getChildren: function getChildren() {
|
|
50
52
|
return [];
|
|
51
53
|
}
|
|
@@ -66,7 +68,10 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
66
68
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
67
69
|
activeChildIndex = _useState2[0],
|
|
68
70
|
setActiveChildIndex = _useState2[1];
|
|
69
|
-
var removeOverflow = _react2.default.Children.toArray(children)
|
|
71
|
+
var removeOverflow = _react2.default.Children.toArray(children)
|
|
72
|
+
// Ignored via go/ees005
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
74
|
+
.map(function (child) {
|
|
70
75
|
return /*#__PURE__*/_react2.default.isValidElement(child) ? child.props.nodeType === 'table' : false;
|
|
71
76
|
}).every(Boolean);
|
|
72
77
|
var overflowContainerClass = !removeOverflow ? _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
@@ -101,7 +106,10 @@ var MultiBodiedExtension = function MultiBodiedExtension(props) {
|
|
|
101
106
|
className: "multiBodiedExtension-navigation",
|
|
102
107
|
css: navigationCssExtended,
|
|
103
108
|
"data-testid": "multiBodiedExtension-navigation"
|
|
104
|
-
}, (0, _react.jsx)(_ExtensionRenderer.default
|
|
109
|
+
}, (0, _react.jsx)(_ExtensionRenderer.default
|
|
110
|
+
// Ignored via go/ees005
|
|
111
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
112
|
+
, (0, _extends2.default)({}, props, {
|
|
105
113
|
actions: actions,
|
|
106
114
|
type: "multiBodiedExtension"
|
|
107
115
|
}), function (_ref2) {
|
|
@@ -29,5 +29,7 @@ function OrderedList(props) {
|
|
|
29
29
|
className: _adfSchema.orderedListSelector.substr(1),
|
|
30
30
|
"data-indent-level": props.path ? (0, _lists.getListIndentLevel)(props.path) : 1,
|
|
31
31
|
start: props.start
|
|
32
|
+
// Ignored via go/ees005
|
|
33
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
32
34
|
}, extraProps), props.children);
|
|
33
35
|
}
|
|
@@ -35,7 +35,9 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
35
35
|
styles = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t&.", " {\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t&[data-panel-type=", "] {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\t", "\n\t\t\t}\n\t\t"])), _panel.PanelSharedCssClassName.prefix, (0, _panel.panelSharedStylesWithoutPrefix)(), _adfSchema.PanelType.CUSTOM, (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor, hasIcon ? '' : 'padding-left: 12px;padding-right: 12px;');
|
|
36
36
|
}
|
|
37
37
|
return (
|
|
38
|
-
// eslint-disable-next-line
|
|
38
|
+
// eslint-disable-next-line
|
|
39
|
+
// Ignored via go/ees005
|
|
40
|
+
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
39
41
|
(0, _react2.jsx)("div", (0, _extends2.default)({
|
|
40
42
|
css: styles
|
|
41
43
|
}, props), props.children)
|