@atlaskit/renderer 112.9.0 → 112.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/actions/index.js +0 -2
- package/dist/cjs/actions/matches-utils.js +0 -2
- package/dist/cjs/react/index.js +0 -9
- package/dist/cjs/react/nodes/extension.js +1 -4
- package/dist/cjs/react/nodes/table/colgroup.js +1 -4
- package/dist/cjs/react/nodes/table.js +2 -8
- package/dist/cjs/react/utils/render-text-segments.js +0 -2
- package/dist/cjs/render-document.js +2 -8
- package/dist/cjs/ui/Renderer/breakout-ssr.js +13 -4
- package/dist/cjs/ui/Renderer/index.js +8 -3
- package/dist/es2019/actions/index.js +0 -2
- package/dist/es2019/actions/matches-utils.js +0 -2
- package/dist/es2019/react/index.js +0 -9
- package/dist/es2019/react/nodes/extension.js +1 -4
- package/dist/es2019/react/nodes/table/colgroup.js +1 -4
- package/dist/es2019/react/nodes/table.js +2 -8
- package/dist/es2019/react/utils/render-text-segments.js +0 -2
- package/dist/es2019/render-document.js +2 -8
- package/dist/es2019/ui/Renderer/breakout-ssr.js +17 -5
- package/dist/es2019/ui/Renderer/index.js +8 -3
- package/dist/esm/actions/index.js +0 -2
- package/dist/esm/actions/matches-utils.js +0 -2
- package/dist/esm/react/index.js +0 -9
- package/dist/esm/react/nodes/extension.js +1 -4
- package/dist/esm/react/nodes/table/colgroup.js +1 -4
- package/dist/esm/react/nodes/table.js +2 -8
- package/dist/esm/react/utils/render-text-segments.js +0 -2
- package/dist/esm/render-document.js +2 -8
- package/dist/esm/ui/Renderer/breakout-ssr.js +13 -5
- package/dist/esm/ui/Renderer/index.js +8 -3
- package/dist/types/ui/Renderer/breakout-ssr.d.ts +8 -1
- package/dist/types/ui/renderer-props.d.ts +1 -0
- package/dist/types-ts4.5/ui/Renderer/breakout-ssr.d.ts +8 -1
- package/dist/types-ts4.5/ui/renderer-props.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 112.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#98097](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98097)
|
|
8
|
+
[`087604ddd0822`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/087604ddd0822) -
|
|
9
|
+
Update the SSR inline script to be included on client on hydrateRoot for confluence but don't
|
|
10
|
+
execute the the script on client
|
|
11
|
+
|
|
3
12
|
## 112.9.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -38,8 +38,6 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
//#region private
|
|
41
|
-
// Ignored via go/ees005
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
43
41
|
return (0, _createClass2.default)(RendererActions, [{
|
|
44
42
|
key: "_privateRegisterRenderer",
|
|
45
43
|
value: function _privateRegisterRenderer(ref, doc, schema, onAnalyticsEvent) {
|
|
@@ -8,8 +8,6 @@ exports.getIndexMatch = getIndexMatch;
|
|
|
8
8
|
// getIndexMatch finds the position of a given string within a given document, in accordance to the Confluence Annotation backend
|
|
9
9
|
// The document is serialised into one large string, excluding any nodes that can not have annotations (eg: emojis, media).
|
|
10
10
|
// Finds where the given query string is relative to the serialised partial document
|
|
11
|
-
// Ignored via go/ees005
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
13
11
|
function getIndexMatch(doc, schema, selectedText, startIndex) {
|
|
14
12
|
var textContent = '';
|
|
15
13
|
var matchIndex = 0;
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -257,9 +257,6 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
257
257
|
return this.getProps(node, path);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
|
|
261
|
-
// Ignored via go/ees005
|
|
262
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
263
260
|
}, {
|
|
264
261
|
key: "serializeFragment",
|
|
265
262
|
value: function serializeFragment(fragment) {
|
|
@@ -347,9 +344,6 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
347
344
|
var segments = (0, _segmentText.segmentText)(mark.text, this.textHighlighter);
|
|
348
345
|
return (0, _renderTextSegments.renderTextSegments)(segments, this.textHighlighter, mark.marks, startPos);
|
|
349
346
|
}
|
|
350
|
-
|
|
351
|
-
// Ignored via go/ees005
|
|
352
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
353
347
|
}, {
|
|
354
348
|
key: "renderNode",
|
|
355
349
|
value: function renderNode(
|
|
@@ -371,9 +365,6 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
371
365
|
}, props), content)
|
|
372
366
|
);
|
|
373
367
|
}
|
|
374
|
-
|
|
375
|
-
// Ignored via go/ees005
|
|
376
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
377
368
|
}, {
|
|
378
369
|
key: "renderMark",
|
|
379
370
|
value: function renderMark(
|
|
@@ -13,10 +13,7 @@ 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
|
|
17
|
-
// Ignored via go/ees005
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
19
|
-
= arguments.length > 3 ? arguments[3] : undefined;
|
|
16
|
+
var removeOverflow = arguments.length > 3 ? arguments[3] : undefined;
|
|
20
17
|
var overflowContainerClass = !removeOverflow ? _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
21
18
|
|
|
22
19
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
@@ -28,10 +28,7 @@ var isTableColumnResized = function isTableColumnResized(columnWidths) {
|
|
|
28
28
|
});
|
|
29
29
|
return !!filteredWidths.length;
|
|
30
30
|
};
|
|
31
|
-
var fixColumnWidth = function fixColumnWidth(columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount, scaleDownPercent
|
|
32
|
-
// Ignored via go/ees005
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
34
|
-
) {
|
|
31
|
+
var fixColumnWidth = function fixColumnWidth(columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount, scaleDownPercent) {
|
|
35
32
|
if (columnWidth === 0) {
|
|
36
33
|
return columnWidth;
|
|
37
34
|
}
|
|
@@ -44,10 +44,7 @@ var isStickyScrollbarEnabled = exports.isStickyScrollbarEnabled = function isSti
|
|
|
44
44
|
exposure: true
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus
|
|
48
|
-
// Ignored via go/ees005
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
50
|
-
) {
|
|
47
|
+
var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus) {
|
|
51
48
|
if (!tableOrderStatus || tableOrderStatus.order === _types.SortOrder.NO_ORDER) {
|
|
52
49
|
return children;
|
|
53
50
|
}
|
|
@@ -91,10 +88,7 @@ var hasRowspan = function hasRowspan(row) {
|
|
|
91
88
|
var getRefTop = function getRefTop(refElement) {
|
|
92
89
|
return Math.round(refElement.getBoundingClientRect().top);
|
|
93
90
|
};
|
|
94
|
-
var shouldHeaderStick = function shouldHeaderStick(scrollTop, tableTop, tableBottom, rowHeight
|
|
95
|
-
// Ignored via go/ees005
|
|
96
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
97
|
-
) {
|
|
91
|
+
var shouldHeaderStick = function shouldHeaderStick(scrollTop, tableTop, tableBottom, rowHeight) {
|
|
98
92
|
return tableTop <= scrollTop && !(tableBottom - rowHeight <= scrollTop);
|
|
99
93
|
};
|
|
100
94
|
var shouldHeaderPinBottom = function shouldHeaderPinBottom(scrollTop, tableBottom, rowHeight) {
|
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.renderTextSegments = renderTextSegments;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
// Ignored via go/ees005
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
11
9
|
function renderTextSegments(segments, textHighlighter, marksList, startPos) {
|
|
12
10
|
var Component = textHighlighter === null || textHighlighter === void 0 ? void 0 : textHighlighter.component;
|
|
13
11
|
var marks = new Set(marksList.map(function (m) {
|
|
@@ -30,10 +30,7 @@ var withStopwatch = function withStopwatch(cb) {
|
|
|
30
30
|
time: time
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
var _validation = function _validation(doc, schema, adfStage, useSpecBasedValidator, dispatchAnalyticsEvent, skipValidation
|
|
34
|
-
// Ignored via go/ees005
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
36
|
-
) {
|
|
33
|
+
var _validation = function _validation(doc, schema, adfStage, useSpecBasedValidator, dispatchAnalyticsEvent, skipValidation) {
|
|
37
34
|
var result;
|
|
38
35
|
if (useSpecBasedValidator) {
|
|
39
36
|
// link mark on mediaSingle is deprecated, need to move link mark to child media node
|
|
@@ -187,10 +184,7 @@ var renderDocument = exports.renderDocument = function renderDocument(doc, seria
|
|
|
187
184
|
var unsupportedContentLevelsTracking = arguments.length > 7 ? arguments[7] : undefined;
|
|
188
185
|
var appearance = arguments.length > 8 ? arguments[8] : undefined;
|
|
189
186
|
var includeNodesCountInStats = arguments.length > 9 ? arguments[9] : undefined;
|
|
190
|
-
var skipValidation
|
|
191
|
-
// Ignored via go/ees005
|
|
192
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
193
|
-
= arguments.length > 10 ? arguments[10] : undefined;
|
|
187
|
+
var skipValidation = arguments.length > 10 ? arguments[10] : undefined;
|
|
194
188
|
var stat = {
|
|
195
189
|
sanitizeTime: 0
|
|
196
190
|
};
|
|
@@ -17,13 +17,21 @@ var _style = require("./style");
|
|
|
17
17
|
*
|
|
18
18
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
19
19
|
*/
|
|
20
|
-
function BreakoutSSRInlineScript() {
|
|
20
|
+
function BreakoutSSRInlineScript(_ref) {
|
|
21
|
+
var noOpSSRInlineScript = _ref.noOpSSRInlineScript;
|
|
21
22
|
/**
|
|
22
23
|
* Should only inline this script while SSR,
|
|
23
24
|
* not needed on the client side.
|
|
24
25
|
*/
|
|
26
|
+
// For hydrateRoot there is a mismatch on client for this script.
|
|
27
|
+
// So we want to add the script on client side but guard it with check to
|
|
28
|
+
// not execute logic
|
|
25
29
|
if (typeof window !== 'undefined' && !window.navigator.userAgent.includes('jsdom')) {
|
|
26
|
-
|
|
30
|
+
if (!noOpSSRInlineScript) {
|
|
31
|
+
return null;
|
|
32
|
+
} else {
|
|
33
|
+
window.__RENDERER_BYPASS_BREAKOUT_SSR__ = true;
|
|
34
|
+
}
|
|
27
35
|
}
|
|
28
36
|
var id = Math.floor(Math.random() * (9999999999 - 9999 + 1)) + 9999;
|
|
29
37
|
var context = createBreakoutInlineScript(id);
|
|
@@ -34,11 +42,12 @@ function BreakoutSSRInlineScript() {
|
|
|
34
42
|
,
|
|
35
43
|
dangerouslySetInnerHTML: {
|
|
36
44
|
__html: context
|
|
37
|
-
}
|
|
45
|
+
},
|
|
46
|
+
"data-testid": "breakout-ssr-inline-script"
|
|
38
47
|
});
|
|
39
48
|
}
|
|
40
49
|
function createBreakoutInlineScript(id) {
|
|
41
|
-
return "\n
|
|
50
|
+
return "\n\t (function(window){\n\t\tif(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) {\n\t\t\treturn;\n\t\t}\n ".concat(breakoutInlineScriptContext, ";\n (").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts, ").concat(Boolean((0, _platformFeatureFlags.fg)('platform-fix-table-ssr-resizing')), ");\n })(window);\n");
|
|
42
51
|
}
|
|
43
52
|
var breakoutInlineScriptContext = exports.breakoutInlineScriptContext = "\n var breakoutConsts = ".concat(JSON.stringify(_utils.breakoutConsts), ";\n breakoutConsts.mapBreakpointToLayoutMaxWidth = ").concat(_utils.breakoutConsts.mapBreakpointToLayoutMaxWidth.toString(), ";\n breakoutConsts.getBreakpoint = ").concat(_utils.breakoutConsts.getBreakpoint.toString(), ";\n breakoutConsts.calcBreakoutWidth = ").concat(_utils.breakoutConsts.calcBreakoutWidth.toString(), ";\n breakoutConsts.calcBreakoutWithCustomWidth = ").concat(_utils.breakoutConsts.calcBreakoutWithCustomWidth.toString(), ";\n breakoutConsts.calcLineLength = ").concat(_utils.breakoutConsts.calcLineLength.toString(), ";\n breakoutConsts.calcWideWidth = ").concat(_utils.breakoutConsts.calcWideWidth.toString(), ";\n breakoutConsts.FullPagePadding = ").concat(_style.FullPagePadding.toString(), ";\n");
|
|
44
53
|
|
|
@@ -64,7 +64,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
64
64
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
65
65
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
66
66
|
var packageName = "@atlaskit/renderer";
|
|
67
|
-
var packageVersion = "112.9.
|
|
67
|
+
var packageVersion = "112.9.1";
|
|
68
68
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
69
69
|
containerName: 'ak-renderer-wrapper',
|
|
70
70
|
containerType: 'inline-size',
|
|
@@ -322,6 +322,7 @@ var __RendererClassComponent = exports.__RendererClassComponent = /*#__PURE__*/f
|
|
|
322
322
|
maxHeight = _this$props.maxHeight,
|
|
323
323
|
fadeOutHeight = _this$props.fadeOutHeight,
|
|
324
324
|
enableSsrInlineScripts = _this$props.enableSsrInlineScripts,
|
|
325
|
+
noOpSSRInlineScript = _this$props.noOpSSRInlineScript,
|
|
325
326
|
allowHeadingAnchorLinks = _this$props.allowHeadingAnchorLinks,
|
|
326
327
|
allowPlaceholderText = _this$props.allowPlaceholderText,
|
|
327
328
|
allowColumnSorting = _this$props.allowColumnSorting,
|
|
@@ -421,7 +422,9 @@ var __RendererClassComponent = exports.__RendererClassComponent = /*#__PURE__*/f
|
|
|
421
422
|
ssr: media === null || media === void 0 ? void 0 : media.ssr,
|
|
422
423
|
isInsideOfInlineExtension: this.props.isInsideOfInlineExtension,
|
|
423
424
|
isTopLevelRenderer: rendererContext.isTopLevelRenderer
|
|
424
|
-
}, enableSsrInlineScripts ? (0, _react2.jsx)(_breakoutSsr.BreakoutSSRInlineScript,
|
|
425
|
+
}, enableSsrInlineScripts || noOpSSRInlineScript ? (0, _react2.jsx)(_breakoutSsr.BreakoutSSRInlineScript, {
|
|
426
|
+
noOpSSRInlineScript: Boolean(noOpSSRInlineScript)
|
|
427
|
+
}) : null, (0, _react2.jsx)(RendererActionsInternalUpdater, {
|
|
425
428
|
doc: pmDoc,
|
|
426
429
|
schema: schema,
|
|
427
430
|
onAnalyticsEvent: this.fireAnalyticsEvent
|
|
@@ -792,7 +795,9 @@ var RendererFunctionalComponent = function RendererFunctionalComponent(props) {
|
|
|
792
795
|
ssr: (_props$media = props.media) === null || _props$media === void 0 ? void 0 : _props$media.ssr,
|
|
793
796
|
isInsideOfInlineExtension: props.isInsideOfInlineExtension,
|
|
794
797
|
isTopLevelRenderer: createRendererContext(props.featureFlags, props.isTopLevelRenderer).isTopLevelRenderer
|
|
795
|
-
}, props.enableSsrInlineScripts ? (0, _react2.jsx)(_breakoutSsr.BreakoutSSRInlineScript,
|
|
798
|
+
}, props.enableSsrInlineScripts || props.noOpSSRInlineScript ? (0, _react2.jsx)(_breakoutSsr.BreakoutSSRInlineScript, {
|
|
799
|
+
noOpSSRInlineScript: Boolean(props.noOpSSRInlineScript)
|
|
800
|
+
}) : null, (0, _react2.jsx)(RendererActionsInternalUpdater, {
|
|
796
801
|
doc: pmDoc,
|
|
797
802
|
schema: schema,
|
|
798
803
|
onAnalyticsEvent: _fireAnalyticsEvent
|
|
@@ -24,8 +24,6 @@ export default class RendererActions {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
//#region private
|
|
27
|
-
// Ignored via go/ees005
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
29
27
|
_privateRegisterRenderer(ref, doc, schema, onAnalyticsEvent) {
|
|
30
28
|
if (!this.initFromContext) {
|
|
31
29
|
return;
|
|
@@ -1,8 +1,6 @@
|
|
|
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
|
|
6
4
|
export function getIndexMatch(doc, schema, selectedText, startIndex) {
|
|
7
5
|
let textContent = '';
|
|
8
6
|
let matchIndex = 0;
|
|
@@ -239,9 +239,6 @@ export default class ReactSerializer {
|
|
|
239
239
|
return this.getProps(node, path);
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
|
|
243
|
-
// Ignored via go/ees005
|
|
244
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
245
242
|
serializeFragment(fragment,
|
|
246
243
|
// Ignored via go/ees005
|
|
247
244
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -322,9 +319,6 @@ export default class ReactSerializer {
|
|
|
322
319
|
const segments = segmentText(mark.text, this.textHighlighter);
|
|
323
320
|
return renderTextSegments(segments, this.textHighlighter, mark.marks, startPos);
|
|
324
321
|
}
|
|
325
|
-
|
|
326
|
-
// Ignored via go/ees005
|
|
327
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
328
322
|
renderNode(
|
|
329
323
|
// Ignored via go/ees005
|
|
330
324
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -344,9 +338,6 @@ export default class ReactSerializer {
|
|
|
344
338
|
}, props), content)
|
|
345
339
|
);
|
|
346
340
|
}
|
|
347
|
-
|
|
348
|
-
// Ignored via go/ees005
|
|
349
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
350
341
|
renderMark(
|
|
351
342
|
// Ignored via go/ees005
|
|
352
343
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -4,10 +4,7 @@ import ExtensionRenderer from '../../ui/ExtensionRenderer';
|
|
|
4
4
|
import { overflowShadow, WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { RendererCssClassName } from '../../consts';
|
|
7
|
-
export const renderExtension = (content, layout, options = {}, removeOverflow
|
|
8
|
-
// Ignored via go/ees005
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
10
|
-
) => {
|
|
7
|
+
export const renderExtension = (content, layout, options = {}, removeOverflow) => {
|
|
11
8
|
const overflowContainerClass = !removeOverflow ? RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
12
9
|
|
|
13
10
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
@@ -17,10 +17,7 @@ const isTableColumnResized = columnWidths => {
|
|
|
17
17
|
const filteredWidths = columnWidths.filter(width => width !== 0);
|
|
18
18
|
return !!filteredWidths.length;
|
|
19
19
|
};
|
|
20
|
-
const fixColumnWidth = (columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount, scaleDownPercent
|
|
21
|
-
// Ignored via go/ees005
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
23
|
-
) => {
|
|
20
|
+
const fixColumnWidth = (columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount, scaleDownPercent) => {
|
|
24
21
|
if (columnWidth === 0) {
|
|
25
22
|
return columnWidth;
|
|
26
23
|
}
|
|
@@ -22,10 +22,7 @@ export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppeara
|
|
|
22
22
|
export const isStickyScrollbarEnabled = appearance => isFullWidthOrFullPageAppearance(appearance) && editorExperiment('platform_renderer_table_sticky_scrollbar', true, {
|
|
23
23
|
exposure: true
|
|
24
24
|
});
|
|
25
|
-
const orderChildren = (children, tableNode, smartCardStorage, tableOrderStatus
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
28
|
-
) => {
|
|
25
|
+
const orderChildren = (children, tableNode, smartCardStorage, tableOrderStatus) => {
|
|
29
26
|
if (!tableOrderStatus || tableOrderStatus.order === SortOrder.NO_ORDER) {
|
|
30
27
|
return children;
|
|
31
28
|
}
|
|
@@ -64,10 +61,7 @@ const hasRowspan = row => {
|
|
|
64
61
|
const getRefTop = refElement => {
|
|
65
62
|
return Math.round(refElement.getBoundingClientRect().top);
|
|
66
63
|
};
|
|
67
|
-
const shouldHeaderStick = (scrollTop, tableTop, tableBottom, rowHeight
|
|
68
|
-
// Ignored via go/ees005
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
70
|
-
) => tableTop <= scrollTop && !(tableBottom - rowHeight <= scrollTop);
|
|
64
|
+
const shouldHeaderStick = (scrollTop, tableTop, tableBottom, rowHeight) => tableTop <= scrollTop && !(tableBottom - rowHeight <= scrollTop);
|
|
71
65
|
const shouldHeaderPinBottom = (scrollTop, tableBottom, rowHeight) => tableBottom - rowHeight <= scrollTop && !(tableBottom < scrollTop);
|
|
72
66
|
const addSortableColumn = (rows, tableOrderStatus, onSorting) => {
|
|
73
67
|
return React.Children.map(rows, (row, index) => {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
// Ignored via go/ees005
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
4
2
|
export function renderTextSegments(segments, textHighlighter, marksList, startPos) {
|
|
5
3
|
const Component = textHighlighter === null || textHighlighter === void 0 ? void 0 : textHighlighter.component;
|
|
6
4
|
const marks = new Set(marksList.map(m => m.type.name));
|
|
@@ -22,10 +22,7 @@ const withStopwatch = cb => {
|
|
|
22
22
|
time
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
const _validation = (doc, schema, adfStage, useSpecBasedValidator, dispatchAnalyticsEvent, skipValidation
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
28
|
-
) => {
|
|
25
|
+
const _validation = (doc, schema, adfStage, useSpecBasedValidator, dispatchAnalyticsEvent, skipValidation) => {
|
|
29
26
|
let result;
|
|
30
27
|
if (useSpecBasedValidator) {
|
|
31
28
|
// link mark on mediaSingle is deprecated, need to move link mark to child media node
|
|
@@ -154,10 +151,7 @@ const memoCreateNodeAndCheck = memoizeOne(_createNodeAndCheck, (newArgs, lastArg
|
|
|
154
151
|
const [oldSchema, oldDoc] = lastArgs;
|
|
155
152
|
return newSchema === oldSchema && areDocsEqual(newDoc, oldDoc);
|
|
156
153
|
});
|
|
157
|
-
export const renderDocument = (doc, serializer, schema = defaultSchema, adfStage = 'final', useSpecBasedValidator = false, rendererId = 'noid', dispatchAnalyticsEvent, unsupportedContentLevelsTracking, appearance, includeNodesCountInStats, skipValidation
|
|
158
|
-
// Ignored via go/ees005
|
|
159
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
160
|
-
) => {
|
|
154
|
+
export const renderDocument = (doc, serializer, schema = defaultSchema, adfStage = 'final', useSpecBasedValidator = false, rendererId = 'noid', dispatchAnalyticsEvent, unsupportedContentLevelsTracking, appearance, includeNodesCountInStats, skipValidation) => {
|
|
161
155
|
const stat = {
|
|
162
156
|
sanitizeTime: 0
|
|
163
157
|
};
|
|
@@ -2,20 +2,28 @@ import React from 'react';
|
|
|
2
2
|
import { breakoutConsts } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { FullPagePadding } from './style';
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Inline Script that updates breakout node width on client side,
|
|
8
7
|
* before main JavaScript bundle is ready.
|
|
9
8
|
*
|
|
10
9
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
11
10
|
*/
|
|
12
|
-
export function BreakoutSSRInlineScript(
|
|
11
|
+
export function BreakoutSSRInlineScript({
|
|
12
|
+
noOpSSRInlineScript
|
|
13
|
+
}) {
|
|
13
14
|
/**
|
|
14
15
|
* Should only inline this script while SSR,
|
|
15
16
|
* not needed on the client side.
|
|
16
17
|
*/
|
|
18
|
+
// For hydrateRoot there is a mismatch on client for this script.
|
|
19
|
+
// So we want to add the script on client side but guard it with check to
|
|
20
|
+
// not execute logic
|
|
17
21
|
if (typeof window !== 'undefined' && !window.navigator.userAgent.includes('jsdom')) {
|
|
18
|
-
|
|
22
|
+
if (!noOpSSRInlineScript) {
|
|
23
|
+
return null;
|
|
24
|
+
} else {
|
|
25
|
+
window.__RENDERER_BYPASS_BREAKOUT_SSR__ = true;
|
|
26
|
+
}
|
|
19
27
|
}
|
|
20
28
|
const id = Math.floor(Math.random() * (9999999999 - 9999 + 1)) + 9999;
|
|
21
29
|
const context = createBreakoutInlineScript(id);
|
|
@@ -26,12 +34,16 @@ export function BreakoutSSRInlineScript() {
|
|
|
26
34
|
,
|
|
27
35
|
dangerouslySetInnerHTML: {
|
|
28
36
|
__html: context
|
|
29
|
-
}
|
|
37
|
+
},
|
|
38
|
+
"data-testid": "breakout-ssr-inline-script"
|
|
30
39
|
});
|
|
31
40
|
}
|
|
32
41
|
export function createBreakoutInlineScript(id) {
|
|
33
42
|
return `
|
|
34
|
-
|
|
43
|
+
(function(window){
|
|
44
|
+
if(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
35
47
|
${breakoutInlineScriptContext};
|
|
36
48
|
(${applyBreakoutAfterSSR.toString()})("${id}", breakoutConsts, ${Boolean(fg('platform-fix-table-ssr-resizing'))});
|
|
37
49
|
})(window);
|
|
@@ -45,7 +45,7 @@ import { TruncatedWrapper } from './truncated-wrapper';
|
|
|
45
45
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
const packageName = "@atlaskit/renderer";
|
|
48
|
-
const packageVersion = "112.9.
|
|
48
|
+
const packageVersion = "112.9.1";
|
|
49
49
|
const setAsQueryContainerStyles = css({
|
|
50
50
|
containerName: 'ak-renderer-wrapper',
|
|
51
51
|
containerType: 'inline-size',
|
|
@@ -299,6 +299,7 @@ export class __RendererClassComponent extends PureComponent {
|
|
|
299
299
|
maxHeight,
|
|
300
300
|
fadeOutHeight,
|
|
301
301
|
enableSsrInlineScripts,
|
|
302
|
+
noOpSSRInlineScript,
|
|
302
303
|
allowHeadingAnchorLinks,
|
|
303
304
|
allowPlaceholderText,
|
|
304
305
|
allowColumnSorting,
|
|
@@ -398,7 +399,9 @@ export class __RendererClassComponent extends PureComponent {
|
|
|
398
399
|
ssr: media === null || media === void 0 ? void 0 : media.ssr,
|
|
399
400
|
isInsideOfInlineExtension: this.props.isInsideOfInlineExtension,
|
|
400
401
|
isTopLevelRenderer: rendererContext.isTopLevelRenderer
|
|
401
|
-
}, enableSsrInlineScripts ? jsx(BreakoutSSRInlineScript,
|
|
402
|
+
}, enableSsrInlineScripts || noOpSSRInlineScript ? jsx(BreakoutSSRInlineScript, {
|
|
403
|
+
noOpSSRInlineScript: Boolean(noOpSSRInlineScript)
|
|
404
|
+
}) : null, jsx(RendererActionsInternalUpdater, {
|
|
402
405
|
doc: pmDoc,
|
|
403
406
|
schema: schema,
|
|
404
407
|
onAnalyticsEvent: this.fireAnalyticsEvent
|
|
@@ -768,7 +771,9 @@ const RendererFunctionalComponent = props => {
|
|
|
768
771
|
ssr: (_props$media = props.media) === null || _props$media === void 0 ? void 0 : _props$media.ssr,
|
|
769
772
|
isInsideOfInlineExtension: props.isInsideOfInlineExtension,
|
|
770
773
|
isTopLevelRenderer: createRendererContext(props.featureFlags, props.isTopLevelRenderer).isTopLevelRenderer
|
|
771
|
-
}, props.enableSsrInlineScripts ? jsx(BreakoutSSRInlineScript,
|
|
774
|
+
}, props.enableSsrInlineScripts || props.noOpSSRInlineScript ? jsx(BreakoutSSRInlineScript, {
|
|
775
|
+
noOpSSRInlineScript: Boolean(props.noOpSSRInlineScript)
|
|
776
|
+
}) : null, jsx(RendererActionsInternalUpdater, {
|
|
772
777
|
doc: pmDoc,
|
|
773
778
|
schema: schema,
|
|
774
779
|
onAnalyticsEvent: fireAnalyticsEvent
|
|
@@ -31,8 +31,6 @@ var RendererActions = /*#__PURE__*/function () {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
//#region private
|
|
34
|
-
// Ignored via go/ees005
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
36
34
|
return _createClass(RendererActions, [{
|
|
37
35
|
key: "_privateRegisterRenderer",
|
|
38
36
|
value: function _privateRegisterRenderer(ref, doc, schema, onAnalyticsEvent) {
|
|
@@ -1,8 +1,6 @@
|
|
|
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
|
|
6
4
|
export function getIndexMatch(doc, schema, selectedText, startIndex) {
|
|
7
5
|
var textContent = '';
|
|
8
6
|
var matchIndex = 0;
|
package/dist/esm/react/index.js
CHANGED
|
@@ -250,9 +250,6 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
250
250
|
return this.getProps(node, path);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
|
|
254
|
-
// Ignored via go/ees005
|
|
255
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
256
253
|
}, {
|
|
257
254
|
key: "serializeFragment",
|
|
258
255
|
value: function serializeFragment(fragment) {
|
|
@@ -340,9 +337,6 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
340
337
|
var segments = segmentText(mark.text, this.textHighlighter);
|
|
341
338
|
return renderTextSegments(segments, this.textHighlighter, mark.marks, startPos);
|
|
342
339
|
}
|
|
343
|
-
|
|
344
|
-
// Ignored via go/ees005
|
|
345
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
346
340
|
}, {
|
|
347
341
|
key: "renderNode",
|
|
348
342
|
value: function renderNode(
|
|
@@ -364,9 +358,6 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
364
358
|
}, props), content)
|
|
365
359
|
);
|
|
366
360
|
}
|
|
367
|
-
|
|
368
|
-
// Ignored via go/ees005
|
|
369
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
370
361
|
}, {
|
|
371
362
|
key: "renderMark",
|
|
372
363
|
value: function renderMark(
|
|
@@ -6,10 +6,7 @@ import { calcBreakoutWidth } from '@atlaskit/editor-common/utils';
|
|
|
6
6
|
import { RendererCssClassName } from '../../consts';
|
|
7
7
|
export var renderExtension = function renderExtension(content, layout) {
|
|
8
8
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9
|
-
var removeOverflow
|
|
10
|
-
// Ignored via go/ees005
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
12
|
-
= arguments.length > 3 ? arguments[3] : undefined;
|
|
9
|
+
var removeOverflow = arguments.length > 3 ? arguments[3] : undefined;
|
|
13
10
|
var overflowContainerClass = !removeOverflow ? RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
|
|
14
11
|
|
|
15
12
|
// by default, we assume the extension is at top level, (direct child of doc node)
|
|
@@ -22,10 +22,7 @@ var isTableColumnResized = function isTableColumnResized(columnWidths) {
|
|
|
22
22
|
});
|
|
23
23
|
return !!filteredWidths.length;
|
|
24
24
|
};
|
|
25
|
-
var fixColumnWidth = function fixColumnWidth(columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount, scaleDownPercent
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
28
|
-
) {
|
|
25
|
+
var fixColumnWidth = function fixColumnWidth(columnWidth, _tableWidth, _layoutWidth, zeroWidthColumnsCount, scaleDownPercent) {
|
|
29
26
|
if (columnWidth === 0) {
|
|
30
27
|
return columnWidth;
|
|
31
28
|
}
|
|
@@ -37,10 +37,7 @@ export var isStickyScrollbarEnabled = function isStickyScrollbarEnabled(appearan
|
|
|
37
37
|
exposure: true
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus
|
|
41
|
-
// Ignored via go/ees005
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
43
|
-
) {
|
|
40
|
+
var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus) {
|
|
44
41
|
if (!tableOrderStatus || tableOrderStatus.order === SortOrder.NO_ORDER) {
|
|
45
42
|
return children;
|
|
46
43
|
}
|
|
@@ -84,10 +81,7 @@ var hasRowspan = function hasRowspan(row) {
|
|
|
84
81
|
var getRefTop = function getRefTop(refElement) {
|
|
85
82
|
return Math.round(refElement.getBoundingClientRect().top);
|
|
86
83
|
};
|
|
87
|
-
var shouldHeaderStick = function shouldHeaderStick(scrollTop, tableTop, tableBottom, rowHeight
|
|
88
|
-
// Ignored via go/ees005
|
|
89
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
90
|
-
) {
|
|
84
|
+
var shouldHeaderStick = function shouldHeaderStick(scrollTop, tableTop, tableBottom, rowHeight) {
|
|
91
85
|
return tableTop <= scrollTop && !(tableBottom - rowHeight <= scrollTop);
|
|
92
86
|
};
|
|
93
87
|
var shouldHeaderPinBottom = function shouldHeaderPinBottom(scrollTop, tableBottom, rowHeight) {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
// Ignored via go/ees005
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
4
2
|
export function renderTextSegments(segments, textHighlighter, marksList, startPos) {
|
|
5
3
|
var Component = textHighlighter === null || textHighlighter === void 0 ? void 0 : textHighlighter.component;
|
|
6
4
|
var marks = new Set(marksList.map(function (m) {
|
|
@@ -23,10 +23,7 @@ var withStopwatch = function withStopwatch(cb) {
|
|
|
23
23
|
time: time
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
var _validation = function _validation(doc, schema, adfStage, useSpecBasedValidator, dispatchAnalyticsEvent, skipValidation
|
|
27
|
-
// Ignored via go/ees005
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
29
|
-
) {
|
|
26
|
+
var _validation = function _validation(doc, schema, adfStage, useSpecBasedValidator, dispatchAnalyticsEvent, skipValidation) {
|
|
30
27
|
var result;
|
|
31
28
|
if (useSpecBasedValidator) {
|
|
32
29
|
// link mark on mediaSingle is deprecated, need to move link mark to child media node
|
|
@@ -180,10 +177,7 @@ export var renderDocument = function renderDocument(doc, serializer) {
|
|
|
180
177
|
var unsupportedContentLevelsTracking = arguments.length > 7 ? arguments[7] : undefined;
|
|
181
178
|
var appearance = arguments.length > 8 ? arguments[8] : undefined;
|
|
182
179
|
var includeNodesCountInStats = arguments.length > 9 ? arguments[9] : undefined;
|
|
183
|
-
var skipValidation
|
|
184
|
-
// Ignored via go/ees005
|
|
185
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
186
|
-
= arguments.length > 10 ? arguments[10] : undefined;
|
|
180
|
+
var skipValidation = arguments.length > 10 ? arguments[10] : undefined;
|
|
187
181
|
var stat = {
|
|
188
182
|
sanitizeTime: 0
|
|
189
183
|
};
|
|
@@ -2,20 +2,27 @@ import React from 'react';
|
|
|
2
2
|
import { breakoutConsts } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { FullPagePadding } from './style';
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Inline Script that updates breakout node width on client side,
|
|
8
7
|
* before main JavaScript bundle is ready.
|
|
9
8
|
*
|
|
10
9
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
11
10
|
*/
|
|
12
|
-
export function BreakoutSSRInlineScript() {
|
|
11
|
+
export function BreakoutSSRInlineScript(_ref) {
|
|
12
|
+
var noOpSSRInlineScript = _ref.noOpSSRInlineScript;
|
|
13
13
|
/**
|
|
14
14
|
* Should only inline this script while SSR,
|
|
15
15
|
* not needed on the client side.
|
|
16
16
|
*/
|
|
17
|
+
// For hydrateRoot there is a mismatch on client for this script.
|
|
18
|
+
// So we want to add the script on client side but guard it with check to
|
|
19
|
+
// not execute logic
|
|
17
20
|
if (typeof window !== 'undefined' && !window.navigator.userAgent.includes('jsdom')) {
|
|
18
|
-
|
|
21
|
+
if (!noOpSSRInlineScript) {
|
|
22
|
+
return null;
|
|
23
|
+
} else {
|
|
24
|
+
window.__RENDERER_BYPASS_BREAKOUT_SSR__ = true;
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
27
|
var id = Math.floor(Math.random() * (9999999999 - 9999 + 1)) + 9999;
|
|
21
28
|
var context = createBreakoutInlineScript(id);
|
|
@@ -26,11 +33,12 @@ export function BreakoutSSRInlineScript() {
|
|
|
26
33
|
,
|
|
27
34
|
dangerouslySetInnerHTML: {
|
|
28
35
|
__html: context
|
|
29
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"data-testid": "breakout-ssr-inline-script"
|
|
30
38
|
});
|
|
31
39
|
}
|
|
32
40
|
export function createBreakoutInlineScript(id) {
|
|
33
|
-
return "\n
|
|
41
|
+
return "\n\t (function(window){\n\t\tif(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) {\n\t\t\treturn;\n\t\t}\n ".concat(breakoutInlineScriptContext, ";\n (").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts, ").concat(Boolean(fg('platform-fix-table-ssr-resizing')), ");\n })(window);\n");
|
|
34
42
|
}
|
|
35
43
|
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
44
|
|
|
@@ -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.9.
|
|
57
|
+
var packageVersion = "112.9.1";
|
|
58
58
|
var setAsQueryContainerStyles = css({
|
|
59
59
|
containerName: 'ak-renderer-wrapper',
|
|
60
60
|
containerType: 'inline-size',
|
|
@@ -312,6 +312,7 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
312
312
|
maxHeight = _this$props.maxHeight,
|
|
313
313
|
fadeOutHeight = _this$props.fadeOutHeight,
|
|
314
314
|
enableSsrInlineScripts = _this$props.enableSsrInlineScripts,
|
|
315
|
+
noOpSSRInlineScript = _this$props.noOpSSRInlineScript,
|
|
315
316
|
allowHeadingAnchorLinks = _this$props.allowHeadingAnchorLinks,
|
|
316
317
|
allowPlaceholderText = _this$props.allowPlaceholderText,
|
|
317
318
|
allowColumnSorting = _this$props.allowColumnSorting,
|
|
@@ -411,7 +412,9 @@ export var __RendererClassComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
411
412
|
ssr: media === null || media === void 0 ? void 0 : media.ssr,
|
|
412
413
|
isInsideOfInlineExtension: this.props.isInsideOfInlineExtension,
|
|
413
414
|
isTopLevelRenderer: rendererContext.isTopLevelRenderer
|
|
414
|
-
}, enableSsrInlineScripts ? jsx(BreakoutSSRInlineScript,
|
|
415
|
+
}, enableSsrInlineScripts || noOpSSRInlineScript ? jsx(BreakoutSSRInlineScript, {
|
|
416
|
+
noOpSSRInlineScript: Boolean(noOpSSRInlineScript)
|
|
417
|
+
}) : null, jsx(RendererActionsInternalUpdater, {
|
|
415
418
|
doc: pmDoc,
|
|
416
419
|
schema: schema,
|
|
417
420
|
onAnalyticsEvent: this.fireAnalyticsEvent
|
|
@@ -782,7 +785,9 @@ var RendererFunctionalComponent = function RendererFunctionalComponent(props) {
|
|
|
782
785
|
ssr: (_props$media = props.media) === null || _props$media === void 0 ? void 0 : _props$media.ssr,
|
|
783
786
|
isInsideOfInlineExtension: props.isInsideOfInlineExtension,
|
|
784
787
|
isTopLevelRenderer: createRendererContext(props.featureFlags, props.isTopLevelRenderer).isTopLevelRenderer
|
|
785
|
-
}, props.enableSsrInlineScripts ? jsx(BreakoutSSRInlineScript,
|
|
788
|
+
}, props.enableSsrInlineScripts || props.noOpSSRInlineScript ? jsx(BreakoutSSRInlineScript, {
|
|
789
|
+
noOpSSRInlineScript: Boolean(props.noOpSSRInlineScript)
|
|
790
|
+
}) : null, jsx(RendererActionsInternalUpdater, {
|
|
786
791
|
doc: pmDoc,
|
|
787
792
|
schema: schema,
|
|
788
793
|
onAnalyticsEvent: _fireAnalyticsEvent
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
__RENDERER_BYPASS_BREAKOUT_SSR__?: boolean;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Inline Script that updates breakout node width on client side,
|
|
4
9
|
* before main JavaScript bundle is ready.
|
|
5
10
|
*
|
|
6
11
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
7
12
|
*/
|
|
8
|
-
export declare function BreakoutSSRInlineScript(
|
|
13
|
+
export declare function BreakoutSSRInlineScript({ noOpSSRInlineScript }: {
|
|
14
|
+
noOpSSRInlineScript: Boolean;
|
|
15
|
+
}): JSX.Element | null;
|
|
9
16
|
export declare function createBreakoutInlineScript(id: number): string;
|
|
10
17
|
export declare const breakoutInlineScriptContext: string;
|
|
11
18
|
export declare const calcLineLength: any;
|
|
@@ -24,6 +24,7 @@ export interface RendererProps {
|
|
|
24
24
|
eventHandlers?: EventHandlers;
|
|
25
25
|
extensionHandlers?: ExtensionHandlers;
|
|
26
26
|
enableSsrInlineScripts?: boolean;
|
|
27
|
+
noOpSSRInlineScript?: boolean;
|
|
27
28
|
onComplete?: (stat: RenderOutputStat) => void;
|
|
28
29
|
onError?: (error: any) => void;
|
|
29
30
|
portal?: HTMLElement;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
__RENDERER_BYPASS_BREAKOUT_SSR__?: boolean;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Inline Script that updates breakout node width on client side,
|
|
4
9
|
* before main JavaScript bundle is ready.
|
|
5
10
|
*
|
|
6
11
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
7
12
|
*/
|
|
8
|
-
export declare function BreakoutSSRInlineScript(
|
|
13
|
+
export declare function BreakoutSSRInlineScript({ noOpSSRInlineScript }: {
|
|
14
|
+
noOpSSRInlineScript: Boolean;
|
|
15
|
+
}): JSX.Element | null;
|
|
9
16
|
export declare function createBreakoutInlineScript(id: number): string;
|
|
10
17
|
export declare const breakoutInlineScriptContext: string;
|
|
11
18
|
export declare const calcLineLength: any;
|
|
@@ -24,6 +24,7 @@ export interface RendererProps {
|
|
|
24
24
|
eventHandlers?: EventHandlers;
|
|
25
25
|
extensionHandlers?: ExtensionHandlers;
|
|
26
26
|
enableSsrInlineScripts?: boolean;
|
|
27
|
+
noOpSSRInlineScript?: boolean;
|
|
27
28
|
onComplete?: (stat: RenderOutputStat) => void;
|
|
28
29
|
onError?: (error: any) => void;
|
|
29
30
|
portal?: HTMLElement;
|