@atlaskit/renderer 95.0.0 → 96.0.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 +40 -1
- package/dist/cjs/react/index.js +0 -2
- package/dist/cjs/react/nodes/embedCard.js +2 -5
- package/dist/cjs/react/nodes/inlineCard.js +5 -1
- package/dist/cjs/react/nodes/mediaInline.js +41 -4
- package/dist/cjs/react/nodes/mediaSingle/index.js +3 -7
- package/dist/cjs/react/nodes/panel.js +7 -5
- package/dist/cjs/react/nodes/table/colgroup.js +6 -12
- package/dist/cjs/react/nodes/table/sticky.js +28 -17
- package/dist/cjs/react/nodes/table/table.js +1 -3
- package/dist/cjs/react/nodes/table.js +20 -9
- package/dist/cjs/react/nodes/tableCell.js +5 -3
- package/dist/cjs/render-document.js +2 -2
- package/dist/cjs/ui/MediaCard.js +2 -2
- package/dist/cjs/ui/Renderer/breakout-ssr.js +6 -8
- package/dist/cjs/ui/Renderer/index.js +4 -12
- package/dist/cjs/ui/Renderer/style.js +3 -3
- package/dist/cjs/ui/annotations/hooks/use-events.js +4 -2
- package/dist/cjs/utils.js +0 -24
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/react/index.js +0 -2
- package/dist/es2019/react/nodes/embedCard.js +4 -7
- package/dist/es2019/react/nodes/inlineCard.js +4 -1
- package/dist/es2019/react/nodes/mediaInline.js +36 -4
- package/dist/es2019/react/nodes/mediaSingle/index.js +5 -9
- package/dist/es2019/react/nodes/panel.js +19 -16
- package/dist/es2019/react/nodes/table/colgroup.js +2 -8
- package/dist/es2019/react/nodes/table/sticky.js +26 -10
- package/dist/es2019/react/nodes/table/table.js +1 -3
- package/dist/es2019/react/nodes/table.js +18 -9
- package/dist/es2019/react/nodes/tableCell.js +4 -1
- package/dist/es2019/render-document.js +1 -1
- package/dist/es2019/ui/MediaCard.js +1 -1
- package/dist/es2019/ui/Renderer/breakout-ssr.js +6 -8
- package/dist/es2019/ui/Renderer/index.js +3 -11
- package/dist/es2019/ui/Renderer/style.js +16 -3
- package/dist/es2019/ui/annotations/hooks/use-events.js +2 -2
- package/dist/es2019/utils.js +0 -22
- package/dist/es2019/version.json +1 -1
- package/dist/esm/react/index.js +0 -2
- package/dist/esm/react/nodes/embedCard.js +4 -7
- package/dist/esm/react/nodes/inlineCard.js +4 -1
- package/dist/esm/react/nodes/mediaInline.js +36 -4
- package/dist/esm/react/nodes/mediaSingle/index.js +5 -9
- package/dist/esm/react/nodes/panel.js +7 -5
- package/dist/esm/react/nodes/table/colgroup.js +6 -12
- package/dist/esm/react/nodes/table/sticky.js +26 -8
- package/dist/esm/react/nodes/table/table.js +1 -3
- package/dist/esm/react/nodes/table.js +20 -9
- package/dist/esm/react/nodes/tableCell.js +5 -3
- package/dist/esm/render-document.js +1 -1
- package/dist/esm/ui/MediaCard.js +1 -1
- package/dist/esm/ui/Renderer/breakout-ssr.js +6 -8
- package/dist/esm/ui/Renderer/index.js +3 -11
- package/dist/esm/ui/Renderer/style.js +4 -3
- package/dist/esm/ui/annotations/hooks/use-events.js +4 -2
- package/dist/esm/utils.js +0 -22
- package/dist/esm/version.json +1 -1
- package/dist/types/react/index.d.ts +0 -2
- package/dist/types/react/nodes/embedCard.d.ts +0 -1
- package/dist/types/react/nodes/extension.d.ts +6 -0
- package/dist/types/react/nodes/index.d.ts +1 -2
- package/dist/types/react/nodes/media.d.ts +0 -1
- package/dist/types/react/nodes/mediaInline.d.ts +6 -3
- package/dist/types/react/nodes/mediaSingle/index.d.ts +0 -1
- package/dist/types/react/nodes/table/sticky.d.ts +1 -2
- package/dist/types/react/nodes/table/table.d.ts +1 -1
- package/dist/types/react/nodes/table/types.d.ts +0 -1
- package/dist/types/react/types.d.ts +0 -1
- package/dist/types/renderer-context.d.ts +1 -0
- package/dist/types/ui/MediaCard.d.ts +1 -1
- package/dist/types/ui/Renderer/breakout-ssr.d.ts +2 -4
- package/dist/types/ui/renderer-props.d.ts +1 -0
- package/dist/types/utils.d.ts +4 -8
- package/package.json +17 -16
|
@@ -293,13 +293,12 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
293
293
|
isNumberColumnEnabled = _this$props.isNumberColumnEnabled,
|
|
294
294
|
layout = _this$props.layout,
|
|
295
295
|
renderWidth = _this$props.renderWidth,
|
|
296
|
-
allowDynamicTextSizing = _this$props.allowDynamicTextSizing,
|
|
297
296
|
columnWidths = _this$props.columnWidths,
|
|
298
297
|
stickyHeaders = _this$props.stickyHeaders,
|
|
299
298
|
tableNode = _this$props.tableNode;
|
|
300
299
|
var stickyMode = this.state.stickyMode;
|
|
301
300
|
var tableWidth = calcTableWidth(layout, renderWidth, false);
|
|
302
|
-
var lineLength = calcLineLength(
|
|
301
|
+
var lineLength = calcLineLength();
|
|
303
302
|
var left;
|
|
304
303
|
|
|
305
304
|
if (canUseLinelength(this.props.rendererAppearance) && tableWidth !== 'inherit') {
|
|
@@ -322,10 +321,9 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
322
321
|
innerRef: this.stickyWrapperRef,
|
|
323
322
|
wrapperWidth: wrapperWidth,
|
|
324
323
|
columnWidths: columnWidths,
|
|
325
|
-
rowHeight: this.headerRowHeight
|
|
326
|
-
allowDynamicTextSizing: allowDynamicTextSizing
|
|
324
|
+
rowHeight: this.headerRowHeight
|
|
327
325
|
}, [children && children[0]]), /*#__PURE__*/React.createElement("div", {
|
|
328
|
-
className: "".concat(TableSharedCssClassName.TABLE_CONTAINER, " ").concat(this.props.shadowClassNames),
|
|
326
|
+
className: "".concat(TableSharedCssClassName.TABLE_CONTAINER, " ").concat(this.props.shadowClassNames || ''),
|
|
329
327
|
"data-layout": layout,
|
|
330
328
|
ref: this.props.handleRef,
|
|
331
329
|
style: {
|
|
@@ -341,8 +339,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
341
339
|
columnWidths: columnWidths,
|
|
342
340
|
layout: layout,
|
|
343
341
|
isNumberColumnEnabled: isNumberColumnEnabled,
|
|
344
|
-
renderWidth: renderWidth
|
|
345
|
-
allowDynamicTextSizing: allowDynamicTextSizing
|
|
342
|
+
renderWidth: renderWidth
|
|
346
343
|
}, this.grabFirstRowRef(children)))));
|
|
347
344
|
}
|
|
348
345
|
}]);
|
|
@@ -425,14 +422,28 @@ export var TableProcessor = /*#__PURE__*/function (_React$Component2) {
|
|
|
425
422
|
return TableProcessor;
|
|
426
423
|
}(React.Component);
|
|
427
424
|
var TableWithShadows = overflowShadow(TableProcessor, {
|
|
428
|
-
overflowSelector: ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER)
|
|
425
|
+
overflowSelector: ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER),
|
|
426
|
+
useShadowObserver: true
|
|
429
427
|
});
|
|
430
428
|
|
|
431
429
|
var TableWithWidth = function TableWithWidth(props) {
|
|
432
430
|
return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref2) {
|
|
431
|
+
var _props$columnWidths;
|
|
432
|
+
|
|
433
433
|
var width = _ref2.width;
|
|
434
434
|
var renderWidth = props.rendererAppearance === 'full-page' ? width - FullPagePadding * 2 : width;
|
|
435
|
-
|
|
435
|
+
var colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce(function (total, val) {
|
|
436
|
+
return total + val;
|
|
437
|
+
}, 0)) || 0;
|
|
438
|
+
|
|
439
|
+
if (colWidthsSum) {
|
|
440
|
+
return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
|
|
441
|
+
renderWidth: renderWidth
|
|
442
|
+
}, props));
|
|
443
|
+
} // there should not be a case when colWidthsSum is 0 and table is in overflow state - so no need to render shadows in this case
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
return /*#__PURE__*/React.createElement(TableProcessor, _extends({
|
|
436
447
|
renderWidth: renderWidth
|
|
437
448
|
}, props));
|
|
438
449
|
});
|
|
@@ -146,8 +146,10 @@ export var withSortableColumn = function withSortableColumn(WrapperComponent) {
|
|
|
146
146
|
|
|
147
147
|
_defineProperty(_assertThisInitialized(_this), "onKeyPress", function (event) {
|
|
148
148
|
var keys = [' ', 'Enter', 'Spacebar'];
|
|
149
|
+
var _ref = event.target,
|
|
150
|
+
tagName = _ref.tagName; // trigger sorting if space or enter are clicked but not when in an input field (template variables)
|
|
149
151
|
|
|
150
|
-
if (keys.includes(event.key)) {
|
|
152
|
+
if (keys.includes(event.key) && !IgnoreSorting.includes(tagName)) {
|
|
151
153
|
event.preventDefault();
|
|
152
154
|
|
|
153
155
|
_this.onClick(event);
|
|
@@ -156,8 +158,8 @@ export var withSortableColumn = function withSortableColumn(WrapperComponent) {
|
|
|
156
158
|
|
|
157
159
|
_defineProperty(_assertThisInitialized(_this), "onClick", function (event) {
|
|
158
160
|
// ignore sorting when specific elements are clicked
|
|
159
|
-
var
|
|
160
|
-
tagName =
|
|
161
|
+
var _ref2 = event.target,
|
|
162
|
+
tagName = _ref2.tagName;
|
|
161
163
|
|
|
162
164
|
if (IgnoreSorting.includes(tagName)) {
|
|
163
165
|
return;
|
|
@@ -6,7 +6,7 @@ import { validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaski
|
|
|
6
6
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from './analytics/enums';
|
|
7
7
|
import { PLATFORM } from './analytics/events';
|
|
8
8
|
import { trackUnsupportedContentLevels } from './analytics/unsupported-content';
|
|
9
|
-
import { transformMediaLinkMarks } from '@atlaskit/adf-utils';
|
|
9
|
+
import { transformMediaLinkMarks } from '@atlaskit/adf-utils/transforms';
|
|
10
10
|
var SUPPORTS_HIRES_TIMER_API = !!(window.performance && performance.now);
|
|
11
11
|
|
|
12
12
|
var withStopwatch = function withStopwatch(cb) {
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -17,7 +17,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
17
17
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
18
|
|
|
19
19
|
import React, { Component } from 'react';
|
|
20
|
-
import { filter } from '@atlaskit/adf-utils';
|
|
20
|
+
import { filter } from '@atlaskit/adf-utils/traverse';
|
|
21
21
|
import { Card, CardLoading, CardError } from '@atlaskit/media-card';
|
|
22
22
|
import { getMediaClient } from '@atlaskit/media-client';
|
|
23
23
|
import { withImageLoader } from '@atlaskit/editor-common/utils';
|
|
@@ -7,9 +7,7 @@ import { breakoutConsts } from '@atlaskit/editor-common/utils';
|
|
|
7
7
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
export function BreakoutSSRInlineScript(
|
|
11
|
-
var allowDynamicTextSizing = _ref.allowDynamicTextSizing;
|
|
12
|
-
|
|
10
|
+
export function BreakoutSSRInlineScript() {
|
|
13
11
|
/**
|
|
14
12
|
* Should only inline this script while SSR,
|
|
15
13
|
* not needed on the client side.
|
|
@@ -19,7 +17,7 @@ export function BreakoutSSRInlineScript(_ref) {
|
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
var id = Math.floor(Math.random() * (9999999999 - 9999 + 1)) + 9999;
|
|
22
|
-
var context = createBreakoutInlineScript(id
|
|
20
|
+
var context = createBreakoutInlineScript(id);
|
|
23
21
|
return /*#__PURE__*/React.createElement("script", {
|
|
24
22
|
"data-breakout-script-id": id,
|
|
25
23
|
dangerouslySetInnerHTML: {
|
|
@@ -27,12 +25,12 @@ export function BreakoutSSRInlineScript(_ref) {
|
|
|
27
25
|
}
|
|
28
26
|
});
|
|
29
27
|
}
|
|
30
|
-
export function createBreakoutInlineScript(id
|
|
31
|
-
return "\n (function(window){\n ".concat(breakoutInlineScriptContext, ";\n (").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\",
|
|
28
|
+
export function createBreakoutInlineScript(id) {
|
|
29
|
+
return "\n (function(window){\n ".concat(breakoutInlineScriptContext, ";\n (").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts);\n })(window);\n");
|
|
32
30
|
}
|
|
33
31
|
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.calcLineLength = ").concat(breakoutConsts.calcLineLength.toString(), ";\n breakoutConsts.calcWideWidth = ").concat(breakoutConsts.calcWideWidth.toString(), ";\n");
|
|
34
32
|
|
|
35
|
-
function applyBreakoutAfterSSR(id,
|
|
33
|
+
function applyBreakoutAfterSSR(id, breakoutConsts) {
|
|
36
34
|
var MEDIA_NODE_TYPE = 'mediaSingle';
|
|
37
35
|
var WIDE_LAYOUT_MODES = ['full-width', 'wide'];
|
|
38
36
|
|
|
@@ -86,7 +84,7 @@ function applyBreakoutAfterSSR(id, allowDynamicTextSizing, breakoutConsts) {
|
|
|
86
84
|
// https://bitbucket.org/atlassian/atlassian-frontend/src/77938aee0c140d02ff99b98a03849be1236865b4/packages/editor/renderer/src/react/nodes/table.tsx#table.tsx-235:245
|
|
87
85
|
|
|
88
86
|
if (node.classList.contains('pm-table-container')) {
|
|
89
|
-
var lineLength = breakoutConsts.calcLineLength(
|
|
87
|
+
var lineLength = breakoutConsts.calcLineLength();
|
|
90
88
|
var left = lineLength / 2 - parseInt(width) / 2;
|
|
91
89
|
|
|
92
90
|
if (left < 0) {
|
|
@@ -20,7 +20,7 @@ import React, { Fragment, useContext, useLayoutEffect, useRef } from 'react';
|
|
|
20
20
|
import { jsx } from '@emotion/react';
|
|
21
21
|
import { PureComponent } from 'react';
|
|
22
22
|
import { getSchemaBasedOnStage } from '@atlaskit/adf-schema/schema-default';
|
|
23
|
-
import { reduce } from '@atlaskit/adf-utils';
|
|
23
|
+
import { reduce } from '@atlaskit/adf-utils/traverse';
|
|
24
24
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
25
25
|
import { UnsupportedBlock, BaseTheme, WidthProvider, WithCreateAnalyticsEvent, IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
26
26
|
import { getAnalyticsAppearance, getAnalyticsEventSeverity, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking, measureTTI } from '@atlaskit/editor-common/utils';
|
|
@@ -217,7 +217,6 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
217
217
|
appearance: props.appearance,
|
|
218
218
|
disableHeadingIDs: props.disableHeadingIDs,
|
|
219
219
|
disableActions: props.disableActions,
|
|
220
|
-
allowDynamicTextSizing: props.allowDynamicTextSizing,
|
|
221
220
|
allowHeadingAnchorLinks: props.allowHeadingAnchorLinks,
|
|
222
221
|
allowColumnSorting: props.allowColumnSorting,
|
|
223
222
|
fireAnalyticsEvent: this.fireAnalyticsEvent,
|
|
@@ -246,7 +245,6 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
246
245
|
onError = _this$props.onError,
|
|
247
246
|
appearance = _this$props.appearance,
|
|
248
247
|
adfStage = _this$props.adfStage,
|
|
249
|
-
allowDynamicTextSizing = _this$props.allowDynamicTextSizing,
|
|
250
248
|
truncated = _this$props.truncated,
|
|
251
249
|
maxHeight = _this$props.maxHeight,
|
|
252
250
|
fadeOutHeight = _this$props.fadeOutHeight,
|
|
@@ -328,7 +326,6 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
328
326
|
}
|
|
329
327
|
}, jsx(SmartCardStorageProvider, null, jsx(RendererWrapper, {
|
|
330
328
|
appearance: appearance,
|
|
331
|
-
dynamicTextSizing: !!allowDynamicTextSizing,
|
|
332
329
|
allowNestedHeaderLinks: allowNestedHeaderLinks,
|
|
333
330
|
allowColumnSorting: allowColumnSorting,
|
|
334
331
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
@@ -337,9 +334,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
337
334
|
innerRef: this.editorRef,
|
|
338
335
|
onClick: handleWrapperOnClick,
|
|
339
336
|
onMouseDown: this.onMouseDownEditView
|
|
340
|
-
}, enableSsrInlineScripts ? jsx(BreakoutSSRInlineScript, {
|
|
341
|
-
allowDynamicTextSizing: !!allowDynamicTextSizing
|
|
342
|
-
}) : null, jsx(RendererActionsInternalUpdater, {
|
|
337
|
+
}, enableSsrInlineScripts ? jsx(BreakoutSSRInlineScript, null) : null, jsx(RendererActionsInternalUpdater, {
|
|
343
338
|
doc: pmDoc,
|
|
344
339
|
schema: schema,
|
|
345
340
|
onAnalyticsEvent: this.fireAnalyticsEvent
|
|
@@ -364,7 +359,6 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
364
359
|
|
|
365
360
|
return jsx(RendererWrapper, {
|
|
366
361
|
appearance: appearance,
|
|
367
|
-
dynamicTextSizing: !!allowDynamicTextSizing,
|
|
368
362
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
369
363
|
allowPlaceholderText: allowPlaceholderText,
|
|
370
364
|
allowColumnSorting: allowColumnSorting,
|
|
@@ -417,7 +411,6 @@ var RendererWithAnalytics = /*#__PURE__*/React.memo(function (props) {
|
|
|
417
411
|
});
|
|
418
412
|
var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
419
413
|
var allowColumnSorting = props.allowColumnSorting,
|
|
420
|
-
dynamicTextSizing = props.dynamicTextSizing,
|
|
421
414
|
allowNestedHeaderLinks = props.allowNestedHeaderLinks,
|
|
422
415
|
innerRef = props.innerRef,
|
|
423
416
|
appearance = props.appearance,
|
|
@@ -427,8 +420,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
427
420
|
return jsx(WidthProvider, {
|
|
428
421
|
className: "ak-renderer-wrapper"
|
|
429
422
|
}, jsx(BaseTheme, {
|
|
430
|
-
|
|
431
|
-
baseFontSize: !dynamicTextSizing && appearance && appearance !== 'comment' ? akEditorFullPageDefaultFontSize : undefined
|
|
423
|
+
baseFontSize: appearance && appearance !== 'comment' ? akEditorFullPageDefaultFontSize : undefined
|
|
432
424
|
}, jsx("div", {
|
|
433
425
|
ref: innerRef,
|
|
434
426
|
onClick: onClick,
|
|
@@ -13,6 +13,7 @@ import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
|
13
13
|
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import { RendererCssClassName } from '../../consts';
|
|
15
15
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
16
|
+
import { shadowObserverClassNames } from '@atlaskit/editor-common/ui';
|
|
16
17
|
export var FullPagePadding = 32;
|
|
17
18
|
|
|
18
19
|
var getLineHeight = function getLineHeight(fontCode) {
|
|
@@ -68,7 +69,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
|
|
|
68
69
|
headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n cursor: pointer;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-
|
|
72
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " {\n padding: 0;\n\n .", " {\n width: 100%;\n height: 100%;\n cursor: pointer;\n padding: ", "px;\n border-width: 1.5px;\n border-style: solid;\n border-color: transparent;\n\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-of-type + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-of-type + span + * {\n margin-top: 0;\n }\n\n @supports selector(:focus-visible) {\n &:focus {\n outline: unset;\n }\n &:focus-visible {\n border-color: ", ";\n }\n }\n\n ", "\n }\n\n &.", "\n .", " {\n cursor: default;\n }\n\n .", " {\n margin: 0;\n opacity: 1;\n transition: opacity 0.2s ease-in-out;\n }\n\n .", " {\n opacity: 0;\n }\n\n &:hover {\n .", " {\n opacity: 1;\n }\n }\n }\n "])), RendererCssClassName.SORTABLE_COLUMN, RendererCssClassName.SORTABLE_COLUMN_BUTTON, tableCellPadding, token('color.border.focused', colors.B300), headingsCss, RendererCssClassName.SORTABLE_COLUMN_NOT_ALLOWED, RendererCssClassName.SORTABLE_COLUMN_BUTTON, RendererCssClassName.SORTABLE_COLUMN_ICON, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER);
|
|
72
73
|
};
|
|
73
74
|
|
|
74
75
|
var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
|
|
@@ -98,7 +99,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
98
99
|
var themeProps = {
|
|
99
100
|
theme: theme
|
|
100
101
|
};
|
|
101
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-
|
|
102
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard,\n .copy-to-clipboard:focus {\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n "])), editorFontSize(themeProps), themed({
|
|
102
103
|
light: token('color.text', colors.N800),
|
|
103
104
|
dark: token('color.text', '#B8C7E0')
|
|
104
105
|
})(themeProps), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), token('color.link', colors.B400), token('color.link', colors.B300), token('color.link.pressed', colors.B500), colors.placeholderText(themeProps), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(themeProps), ruleSharedStyles(themeProps), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(themeProps), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
@@ -107,7 +108,7 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
|
|
|
107
108
|
})(themeProps), borderRadius(), themed({
|
|
108
109
|
light: token('color.text', colors.N800),
|
|
109
110
|
dark: token('color.text', colors.DN600)
|
|
110
|
-
})(themeProps), token('color.background.danger', colors.R50), token('color.text.danger', colors.R500), gridSize() * 3, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(themeProps), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, themed({
|
|
111
|
+
})(themeProps), token('color.background.danger', colors.R50), token('color.text.danger', colors.R500), gridSize() * 3, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(themeProps), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, themed({
|
|
111
112
|
light: token('color.background.neutral', akEditorTableToolbar),
|
|
112
113
|
dark: token('color.background.neutral', akEditorTableToolbarDark)
|
|
113
114
|
})(themeProps), themed({
|
|
@@ -30,7 +30,7 @@ export var useAnnotationStateByTypeEvent = function useAnnotationStateByTypeEven
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
var nextStates = Object.values(payload).reduce(function (acc, curr) {
|
|
33
|
-
if (curr.annotationType === type) {
|
|
33
|
+
if (curr.id && curr.annotationType === type) {
|
|
34
34
|
// Check for empty state to prevent additional renders
|
|
35
35
|
var isEmpty = curr.state === null || curr.state === undefined;
|
|
36
36
|
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, curr.id, !isEmpty ? curr.state : states[curr.id]));
|
|
@@ -95,7 +95,9 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
|
|
|
95
95
|
var cb = function cb(_ref3) {
|
|
96
96
|
var annotationIds = _ref3.annotationIds,
|
|
97
97
|
eventTarget = _ref3.eventTarget;
|
|
98
|
-
var annotationsByType = annotationIds.
|
|
98
|
+
var annotationsByType = annotationIds.filter(function (id) {
|
|
99
|
+
return !!id;
|
|
100
|
+
}).map(function (id) {
|
|
99
101
|
return {
|
|
100
102
|
id: id,
|
|
101
103
|
type: AnnotationTypes.INLINE_COMMENT
|
package/dist/esm/utils.js
CHANGED
|
@@ -22,28 +22,6 @@ export var getEventHandler = function getEventHandler(eventHandlers, type) {
|
|
|
22
22
|
var eventName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'onClick';
|
|
23
23
|
return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
|
|
24
24
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
export function findHorizontalOverflowScrollParent(table) {
|
|
30
|
-
var parent = table;
|
|
31
|
-
|
|
32
|
-
if (!parent) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
while (parent = parent.parentElement) {
|
|
37
|
-
// IE11 on Window 8 doesn't show styles from CSS when accessing through element.style property.
|
|
38
|
-
var style = window.getComputedStyle(parent);
|
|
39
|
-
|
|
40
|
-
if (style.overflow === 'scroll' || style.overflowY === 'scroll') {
|
|
41
|
-
return parent;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
25
|
export var getPlatform = function getPlatform(rendererAppearance) {
|
|
48
26
|
if (rendererAppearance === 'mobile') {
|
|
49
27
|
return 'mobile';
|
package/dist/esm/version.json
CHANGED
|
@@ -19,7 +19,6 @@ export interface ReactSerializerInit {
|
|
|
19
19
|
appearance?: RendererAppearance;
|
|
20
20
|
disableHeadingIDs?: boolean;
|
|
21
21
|
disableActions?: boolean;
|
|
22
|
-
allowDynamicTextSizing?: boolean;
|
|
23
22
|
allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
|
|
24
23
|
allowColumnSorting?: boolean;
|
|
25
24
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
@@ -60,7 +59,6 @@ export default class ReactSerializer implements Serializer<JSX.Element> {
|
|
|
60
59
|
* for headers under this ticket -> https://product-fabric.atlassian.net/browse/ED-9668
|
|
61
60
|
*/
|
|
62
61
|
private expandHeadingIds;
|
|
63
|
-
private allowDynamicTextSizing?;
|
|
64
62
|
private allowHeadingAnchorLinks?;
|
|
65
63
|
private allowColumnSorting?;
|
|
66
64
|
private allowCopyToClipboard?;
|
|
@@ -28,6 +28,8 @@ declare const _default: {
|
|
|
28
28
|
new (props: Readonly<Props>): {
|
|
29
29
|
overflowContainer?: HTMLElement | null | undefined;
|
|
30
30
|
container?: HTMLElement | undefined;
|
|
31
|
+
shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
|
|
32
|
+
overflowContainerWidth: number;
|
|
31
33
|
scrollable?: NodeList | undefined;
|
|
32
34
|
diff?: number | undefined;
|
|
33
35
|
state: {
|
|
@@ -42,6 +44,7 @@ declare const _default: {
|
|
|
42
44
|
calcOverflowDiff: () => number;
|
|
43
45
|
calcScrollableWidth: () => number;
|
|
44
46
|
handleContainer: (container: HTMLElement | null) => void;
|
|
47
|
+
initShadowObserver(): void;
|
|
45
48
|
render(): JSX.Element;
|
|
46
49
|
context: any;
|
|
47
50
|
setState<K extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K> | null, callback?: (() => void) | undefined): void;
|
|
@@ -66,6 +69,8 @@ declare const _default: {
|
|
|
66
69
|
new (props: Props, context?: any): {
|
|
67
70
|
overflowContainer?: HTMLElement | null | undefined;
|
|
68
71
|
container?: HTMLElement | undefined;
|
|
72
|
+
shadowObserver?: import("@atlaskit/editor-common/ui").ShadowObserver | undefined;
|
|
73
|
+
overflowContainerWidth: number;
|
|
69
74
|
scrollable?: NodeList | undefined;
|
|
70
75
|
diff?: number | undefined;
|
|
71
76
|
state: {
|
|
@@ -80,6 +85,7 @@ declare const _default: {
|
|
|
80
85
|
calcOverflowDiff: () => number;
|
|
81
86
|
calcScrollableWidth: () => number;
|
|
82
87
|
handleContainer: (container: HTMLElement | null) => void;
|
|
88
|
+
initShadowObserver(): void;
|
|
83
89
|
render(): JSX.Element;
|
|
84
90
|
context: any;
|
|
85
91
|
setState<K_1 extends keyof import("@atlaskit/editor-common/ui").OverflowShadowState>(state: import("@atlaskit/editor-common/ui").OverflowShadowState | ((prevState: Readonly<import("@atlaskit/editor-common/ui").OverflowShadowState>, props: Readonly<Props>) => import("@atlaskit/editor-common/ui").OverflowShadowState | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null) | Pick<import("@atlaskit/editor-common/ui").OverflowShadowState, K_1> | null, callback?: (() => void) | undefined): void;
|
|
@@ -41,7 +41,6 @@ declare const EmbedCard: React.ComponentType<{
|
|
|
41
41
|
layout: import("@atlaskit/adf-schema").RichMediaLayout;
|
|
42
42
|
rendererAppearance?: import("../..").RendererAppearance;
|
|
43
43
|
isInsideOfBlockNode?: boolean | undefined;
|
|
44
|
-
allowDynamicTextSizing?: boolean | undefined;
|
|
45
44
|
}> & Loadable.LoadableComponent;
|
|
46
45
|
declare const InlineCard: React.ComponentType<import("@atlaskit/editor-common/utils").Diff<import("./inlineCard").InlineCardProps & import("../../ui/SmartCardStorage").WithSmartCardStorageProps, import("../../ui/SmartCardStorage").WithSmartCardStorageProps>> & Loadable.LoadableComponent;
|
|
47
46
|
declare const BlockCard: React.ComponentType<{
|
|
@@ -53,7 +52,7 @@ declare const BlockCard: React.ComponentType<{
|
|
|
53
52
|
}> & Loadable.LoadableComponent;
|
|
54
53
|
declare const Media: React.ComponentType<import("./media").MediaProps> & Loadable.LoadableComponent;
|
|
55
54
|
declare const MediaGroup: React.ComponentType<import("./mediaGroup").MediaGroupProps> & Loadable.LoadableComponent;
|
|
56
|
-
declare const MediaInline: React.ComponentType<import("./mediaInline").MediaInlineProps
|
|
55
|
+
declare const MediaInline: React.ComponentType<import("react-intl-next").WithIntlProps<import("./mediaInline").MediaInlineProps & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent;
|
|
57
56
|
declare const MediaSingle: React.ComponentType<import("react-intl-next").WithIntlProps<import("./mediaSingle").Props & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent;
|
|
58
57
|
declare const Mention: React.ComponentType<import("./mention").Props> & Loadable.LoadableComponent;
|
|
59
58
|
declare const Expand: React.ComponentType<import("react-intl-next").WithIntlProps<import("../../ui/Expand").ExpandProps & import("react-intl-next").WrappedComponentProps<"intl">>> & Loadable.LoadableComponent;
|
|
@@ -12,7 +12,6 @@ export declare type MediaProps = MediaCardProps & {
|
|
|
12
12
|
providers?: ProviderFactory;
|
|
13
13
|
allowAltTextOnImages?: boolean;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
|
-
allowDynamicTextSizing?: boolean;
|
|
16
15
|
isInsideOfBlockNode?: boolean;
|
|
17
16
|
marks: Array<LinkDefinition>;
|
|
18
17
|
isLinkMark: () => boolean;
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { FileIdentifier } from '@atlaskit/media-client';
|
|
4
4
|
import { MediaProvider } from '../../ui/MediaCard';
|
|
5
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
6
|
export declare type RenderMediaInlineProps = {
|
|
6
7
|
identifier: FileIdentifier;
|
|
7
|
-
mediaProvider
|
|
8
|
+
mediaProvider: Promise<MediaProvider>;
|
|
8
9
|
children?: React.ReactNode;
|
|
9
10
|
};
|
|
10
11
|
export declare type MediaInlineProps = {
|
|
@@ -13,5 +14,7 @@ export declare type MediaInlineProps = {
|
|
|
13
14
|
providers: ProviderFactory;
|
|
14
15
|
};
|
|
15
16
|
export declare const RenderMediaInline: React.FC<RenderMediaInlineProps>;
|
|
16
|
-
declare const
|
|
17
|
-
|
|
17
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl">>> & {
|
|
18
|
+
WrappedComponent: React.ComponentType<MediaInlineProps & WrappedComponentProps<"intl">>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -11,7 +11,6 @@ export interface Props {
|
|
|
11
11
|
layout: MediaSingleLayout;
|
|
12
12
|
eventHandlers?: EventHandlers;
|
|
13
13
|
width?: number;
|
|
14
|
-
allowDynamicTextSizing?: boolean;
|
|
15
14
|
isInsideOfBlockNode?: boolean;
|
|
16
15
|
rendererAppearance: RendererAppearance;
|
|
17
16
|
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
@@ -24,9 +24,8 @@ export declare type StickyTableProps = {
|
|
|
24
24
|
layout: TableLayout;
|
|
25
25
|
columnWidths?: number[];
|
|
26
26
|
renderWidth: number;
|
|
27
|
-
allowDynamicTextSizing?: boolean;
|
|
28
27
|
} & OverflowShadowProps;
|
|
29
|
-
export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth,
|
|
28
|
+
export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, rowHeight, }: StickyTableProps) => jsx.JSX.Element;
|
|
30
29
|
export declare class OverflowParent {
|
|
31
30
|
private ref;
|
|
32
31
|
private constructor();
|
|
@@ -4,4 +4,4 @@ export declare type TableProps = SharedTableProps & {
|
|
|
4
4
|
innerRef?: React.RefObject<HTMLTableElement>;
|
|
5
5
|
children: React.ReactNode[];
|
|
6
6
|
};
|
|
7
|
-
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth,
|
|
7
|
+
export declare const Table: React.MemoExoticComponent<({ innerRef, isNumberColumnEnabled, columnWidths, layout, renderWidth, children, }: TableProps) => JSX.Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { ADFEntity } from '@atlaskit/adf-utils';
|
|
2
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import { CardAppearance, CardDimensions, CardOnClickCallback, NumericalCardDimensions } from '@atlaskit/media-card';
|
|
4
4
|
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
5
5
|
import { ImageResizeMode, Identifier, FileState } from '@atlaskit/media-client';
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
|
|
7
7
|
*/
|
|
8
|
-
export declare function BreakoutSSRInlineScript(
|
|
9
|
-
|
|
10
|
-
}): JSX.Element | null;
|
|
11
|
-
export declare function createBreakoutInlineScript(id: number, allowDynamicTextSizing: boolean): string;
|
|
8
|
+
export declare function BreakoutSSRInlineScript(): JSX.Element | null;
|
|
9
|
+
export declare function createBreakoutInlineScript(id: number): string;
|
|
12
10
|
export declare const breakoutInlineScriptContext: string;
|
|
13
11
|
export declare const calcLineLength: any;
|
|
@@ -39,6 +39,7 @@ export interface RendererProps {
|
|
|
39
39
|
adfStage?: ADFStage;
|
|
40
40
|
disableHeadingIDs?: boolean;
|
|
41
41
|
disableActions?: boolean;
|
|
42
|
+
/** @deprecated [ED-14507] allowDynamicTextSizing is no longer in use */
|
|
42
43
|
allowDynamicTextSizing?: boolean;
|
|
43
44
|
allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
|
|
44
45
|
allowPlaceholderText?: boolean;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Schema } from 'prosemirror-model';
|
|
1
|
+
import type { Schema } from 'prosemirror-model';
|
|
2
2
|
import type { ADNode } from '@atlaskit/editor-common/validator';
|
|
3
3
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
|
-
import { Transformer } from '@atlaskit/editor-common/types';
|
|
5
|
-
import { Node as PMNode } from 'prosemirror-model';
|
|
6
|
-
import { RendererAppearance } from './ui/Renderer/types';
|
|
4
|
+
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { Node as PMNode } from 'prosemirror-model';
|
|
6
|
+
import type { RendererAppearance } from './ui/Renderer/types';
|
|
7
7
|
export declare type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
|
|
8
8
|
export declare class ADFEncoder<T> {
|
|
9
9
|
encode: (value: T) => any;
|
|
@@ -11,10 +11,6 @@ export declare class ADFEncoder<T> {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const getText: (node: PMNode | ADNode) => string;
|
|
13
13
|
export declare const getEventHandler: (eventHandlers?: EventHandlers | undefined, type?: keyof EventHandlers | undefined, eventName?: string) => any;
|
|
14
|
-
/**
|
|
15
|
-
* Traverse DOM Tree upwards looking for table parents with "overflow: scroll".
|
|
16
|
-
*/
|
|
17
|
-
export declare function findHorizontalOverflowScrollParent(table: HTMLElement | null): HTMLElement | null;
|
|
18
14
|
export declare const getPlatform: (rendererAppearance: RendererAppearance) => "mobile" | "web";
|
|
19
15
|
/**
|
|
20
16
|
* Traverse through parent elements of element. Return element for which evaluate(element) returns
|