@atlaskit/renderer 124.16.0 → 124.16.2
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 +16 -0
- package/dist/cjs/actions/index.js +1 -1
- package/dist/cjs/react/index.js +4 -5
- package/dist/cjs/react/nodes/mediaInline.js +1 -1
- package/dist/cjs/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/cjs/react/nodes/table/colgroup.js +2 -2
- package/dist/cjs/react/nodes/table.js +9 -4
- package/dist/cjs/react/nodes/tableNew.js +8 -4
- package/dist/cjs/react/utils/appearance.js +5 -2
- package/dist/cjs/text/nodes/date.js +1 -1
- package/dist/cjs/text/nodes/inlineCard.js +1 -1
- package/dist/cjs/text/nodes/mention.js +1 -1
- package/dist/cjs/text/nodes/status.js +1 -1
- package/dist/cjs/ui/Expand.js +3 -2
- package/dist/cjs/ui/ExtensionRenderer.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/cjs/ui/annotations/element/index.js +1 -1
- package/dist/cjs/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/react/index.js +3 -4
- package/dist/es2019/react/nodes/mediaInline.js +1 -1
- package/dist/es2019/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/es2019/react/nodes/table/colgroup.js +2 -2
- package/dist/es2019/react/nodes/table.js +11 -6
- package/dist/es2019/react/nodes/tableNew.js +10 -6
- package/dist/es2019/react/utils/appearance.js +2 -1
- package/dist/es2019/text/nodes/date.js +1 -1
- package/dist/es2019/text/nodes/inlineCard.js +1 -1
- package/dist/es2019/text/nodes/mention.js +1 -1
- package/dist/es2019/text/nodes/status.js +1 -1
- package/dist/es2019/ui/Expand.js +3 -2
- package/dist/es2019/ui/ExtensionRenderer.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/es2019/ui/annotations/element/index.js +1 -1
- package/dist/es2019/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/react/index.js +4 -5
- package/dist/esm/react/nodes/mediaInline.js +1 -1
- package/dist/esm/react/nodes/multiBodiedExtensionOld.js +2 -2
- package/dist/esm/react/nodes/table/colgroup.js +2 -2
- package/dist/esm/react/nodes/table.js +11 -6
- package/dist/esm/react/nodes/tableNew.js +10 -6
- package/dist/esm/react/utils/appearance.js +4 -1
- package/dist/esm/text/nodes/date.js +1 -1
- package/dist/esm/text/nodes/inlineCard.js +1 -1
- package/dist/esm/text/nodes/mention.js +1 -1
- package/dist/esm/text/nodes/status.js +1 -1
- package/dist/esm/ui/Expand.js +3 -2
- package/dist/esm/ui/ExtensionRenderer.js +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/contexts/AnnotationManagerContext.js +2 -2
- package/dist/esm/ui/annotations/element/index.js +1 -1
- package/dist/esm/ui/annotations/hooks/user-selection.js +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/analytics/events.d.ts +1 -1
- package/dist/types/react/utils/appearance.d.ts +2 -1
- package/dist/types-ts4.5/actions/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/events.d.ts +1 -1
- package/dist/types-ts4.5/react/utils/appearance.d.ts +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.16.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d3461a5b84b81`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d3461a5b84b81) -
|
|
8
|
+
Suppress i18n errors
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 124.16.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`516909774accc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/516909774accc) -
|
|
16
|
+
Fixing type issues
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 124.16.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -152,7 +152,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
|
|
|
152
152
|
}
|
|
153
153
|
}, {
|
|
154
154
|
key: "annotate",
|
|
155
|
-
value: function annotate(range, annotationId,
|
|
155
|
+
value: function annotate(range, annotationId, _annotationType) {
|
|
156
156
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
157
157
|
return false;
|
|
158
158
|
}
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -300,15 +300,14 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
300
300
|
key: "serializeTextWrapper",
|
|
301
301
|
value: function serializeTextWrapper(content, _ref2) {
|
|
302
302
|
var _this3 = this;
|
|
303
|
-
var
|
|
304
|
-
parentInfo = _ref2.parentInfo;
|
|
303
|
+
var parentInfo = _ref2.parentInfo;
|
|
305
304
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
306
305
|
var nodePosition = parentInfo && parentInfo.pos || 1;
|
|
307
306
|
if ((0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
308
307
|
var _this$standaloneBackg;
|
|
309
308
|
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, (0, _toConsumableArray2.default)((0, _getStandaloneBackgroundColorMarks.getStandaloneBackgroundColorMarks)(content)));
|
|
310
309
|
}
|
|
311
|
-
return ReactSerializer.buildMarkStructure(content).map(function (mark,
|
|
310
|
+
return ReactSerializer.buildMarkStructure(content).map(function (mark, _index) {
|
|
312
311
|
return _this3.serializeMark({
|
|
313
312
|
mark: mark,
|
|
314
313
|
parentNode: {
|
|
@@ -329,7 +328,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
329
328
|
parentNode = _ref3.parentNode,
|
|
330
329
|
parentMark = _ref3.parentMark;
|
|
331
330
|
if (!(0, _nodes.isTextNode)(mark)) {
|
|
332
|
-
var serializeContent = function serializeContent(childMark,
|
|
331
|
+
var serializeContent = function serializeContent(childMark, _index) {
|
|
333
332
|
return _this4.serializeMark({
|
|
334
333
|
mark: childMark,
|
|
335
334
|
parentNode: parentNode,
|
|
@@ -665,7 +664,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
665
664
|
key: "getExpandProps",
|
|
666
665
|
value: function getExpandProps(node) {
|
|
667
666
|
var _this7 = this;
|
|
668
|
-
var
|
|
667
|
+
var _path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
669
668
|
if (!(0, _links.isNestedHeaderLinksEnabled)(this.allowHeadingAnchorLinks)) {
|
|
670
669
|
return this.getProps(node);
|
|
671
670
|
}
|
|
@@ -27,7 +27,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
27
27
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
28
|
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; }
|
|
29
29
|
var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
30
|
-
var
|
|
30
|
+
var _rendererAppearance = _ref.rendererAppearance,
|
|
31
31
|
clipboardAttrs = _ref.clipboardAttrs,
|
|
32
32
|
collectionName = _ref.collection,
|
|
33
33
|
eventHandlers = _ref.eventHandlers,
|
|
@@ -39,10 +39,10 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
39
39
|
getChildrenCount: function getChildrenCount() {
|
|
40
40
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
41
41
|
},
|
|
42
|
-
removeChild: function removeChild(
|
|
42
|
+
removeChild: function removeChild(_index) {
|
|
43
43
|
return false;
|
|
44
44
|
},
|
|
45
|
-
updateParameters: function updateParameters(
|
|
45
|
+
updateParameters: function updateParameters(_parameters) {
|
|
46
46
|
return false;
|
|
47
47
|
},
|
|
48
48
|
// Ignored via go/ees005
|
|
@@ -234,12 +234,12 @@ var Colgroup = exports.Colgroup = function Colgroup(props) {
|
|
|
234
234
|
}
|
|
235
235
|
var colStyles = renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
236
236
|
isTopLevelRenderer: isTopLevelRenderer,
|
|
237
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'comment' && (0, _experiments.editorExperiment)('support_table_in_comment', true, {
|
|
237
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || props.rendererAppearance === 'comment' && (0, _experiments.editorExperiment)('support_table_in_comment', true, {
|
|
238
238
|
exposure: true
|
|
239
239
|
}) || props.rendererAppearance === 'comment' && (0, _experiments.editorExperiment)('support_table_in_comment_jira', true, {
|
|
240
240
|
exposure: true
|
|
241
241
|
}),
|
|
242
|
-
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width')
|
|
242
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true))
|
|
243
243
|
}));
|
|
244
244
|
if (!colStyles) {
|
|
245
245
|
return null;
|
|
@@ -32,6 +32,7 @@ var _table = require("./table/table");
|
|
|
32
32
|
var _appearance = require("../utils/appearance");
|
|
33
33
|
var _TableStickyScrollbar = require("./TableStickyScrollbar");
|
|
34
34
|
var _tableNew = require("./tableNew");
|
|
35
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
35
36
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
36
37
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
37
38
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -432,6 +433,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
432
433
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
433
434
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
434
435
|
return [isRenderWidthValid ? Math.min(_editorSharedStyles.akEditorFullWidthLayoutWidth, renderWidth) : _editorSharedStyles.akEditorFullWidthLayoutWidth, "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")")];
|
|
436
|
+
} else if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
437
|
+
return [isRenderWidthValid ? Math.min(_editorSharedStyles.akEditorMaxWidthLayoutWidth, renderWidth) : _editorSharedStyles.akEditorMaxWidthLayoutWidth, "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")")];
|
|
435
438
|
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
436
439
|
var tableContainerWidth = (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
437
440
|
return [isRenderWidthValid ? renderWidth : tableContainerWidth, renderWidthCSS];
|
|
@@ -450,15 +453,17 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
450
453
|
var isTableAlignStart = tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment;
|
|
451
454
|
var fullWidthLineLength = isRenderWidthValid ? Math.min(_editorSharedStyles.akEditorFullWidthLayoutWidth, renderWidth) : _editorSharedStyles.akEditorFullWidthLayoutWidth;
|
|
452
455
|
var fullWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
456
|
+
var maxWidthLineLength = isRenderWidthValid ? Math.min(_editorSharedStyles.akEditorMaxWidthLayoutWidth, renderWidth) : _editorSharedStyles.akEditorMaxWidthLayoutWidth;
|
|
457
|
+
var maxWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
453
458
|
var commentLineLength = isRenderWidthValid ? renderWidth : lineLengthFixedWidth;
|
|
454
459
|
var isCommentAppearanceAndTableAlignmentEnabled = (0, _appearance.isCommentAppearance)(rendererAppearance) && allowTableAlignment;
|
|
455
|
-
var lineLength = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
456
|
-
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
460
|
+
var lineLength = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLength : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
461
|
+
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
457
462
|
|
|
458
463
|
// Setting fixTableSSRResizing to false while FG logic is true in tableNew
|
|
459
464
|
var fixTableSSRResizing = false;
|
|
460
465
|
var tableWidthNew = fixTableSSRResizing ? (0, _nodeWidth.getTableContainerWidth)(tableNode) : tableWidth;
|
|
461
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
466
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && (0, _appearance.isMaxWidthAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
462
467
|
var leftCSS;
|
|
463
468
|
if (shouldCalculateLeftForAlignment) {
|
|
464
469
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -494,7 +499,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
494
499
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
495
500
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
496
501
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
497
|
-
if ((rendererAppearance === 'full-page' || rendererAppearance === 'full-width') && fixTableSSRResizing) {
|
|
502
|
+
if ((rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max') && fixTableSSRResizing) {
|
|
498
503
|
finalTableContainerWidth = allowTableResizing ? "calc(".concat(tableWidthCSS, ")") : 'inherit';
|
|
499
504
|
}
|
|
500
505
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -25,6 +25,7 @@ var _sticky = require("./table/sticky");
|
|
|
25
25
|
var _table = require("./table/table");
|
|
26
26
|
var _appearance = require("../utils/appearance");
|
|
27
27
|
var _TableStickyScrollbar = require("./TableStickyScrollbar");
|
|
28
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
28
29
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
30
|
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; }
|
|
30
31
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
@@ -404,7 +405,9 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
404
405
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(_style.FullPagePadding, "px * 2");
|
|
405
406
|
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
406
407
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
407
|
-
if (rendererAppearance === '
|
|
408
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
409
|
+
return "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
410
|
+
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
408
411
|
return "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
409
412
|
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
410
413
|
return renderWidthCSS;
|
|
@@ -419,10 +422,11 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
419
422
|
// Logic for table alignment in renderer
|
|
420
423
|
var isTableAlignStart = tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment;
|
|
421
424
|
var fullWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
425
|
+
var maxWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
422
426
|
var isCommentAppearanceAndTableAlignmentEnabled = (0, _appearance.isCommentAppearance)(rendererAppearance) && allowTableAlignment;
|
|
423
|
-
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
427
|
+
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
424
428
|
var tableWidthNew = (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
425
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
429
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || (0, _appearance.isMaxWidthAppearance)(rendererAppearance) && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
426
430
|
var leftCSS;
|
|
427
431
|
if (shouldCalculateLeftForAlignment) {
|
|
428
432
|
leftCSS = "(".concat(tableWidthCSS, " - ").concat(lineLengthCSS, ") / 2");
|
|
@@ -451,7 +455,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
451
455
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
452
456
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
453
457
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
454
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width') {
|
|
458
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
455
459
|
finalTableContainerWidth = allowTableResizing ? "calc(".concat(tableWidthCSS, ")") : 'inherit';
|
|
456
460
|
}
|
|
457
461
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isFullWidthOrFullPageAppearance = exports.isFullWidthAppearance = exports.isFullPageAppearance = exports.isCommentAppearance = void 0;
|
|
6
|
+
exports.isMaxWidthAppearance = exports.isFullWidthOrFullPageAppearance = exports.isFullWidthAppearance = exports.isFullPageAppearance = exports.isCommentAppearance = void 0;
|
|
7
7
|
var isFullWidthAppearance = exports.isFullWidthAppearance = function isFullWidthAppearance(appearance) {
|
|
8
8
|
return appearance === 'full-width';
|
|
9
9
|
};
|
|
10
|
+
var isMaxWidthAppearance = exports.isMaxWidthAppearance = function isMaxWidthAppearance(appearance) {
|
|
11
|
+
return appearance === 'max';
|
|
12
|
+
};
|
|
10
13
|
var isFullPageAppearance = exports.isFullPageAppearance = function isFullPageAppearance(appearance) {
|
|
11
14
|
return appearance === 'full-page';
|
|
12
15
|
};
|
|
@@ -14,5 +17,5 @@ var isCommentAppearance = exports.isCommentAppearance = function isCommentAppear
|
|
|
14
17
|
return appearance === 'comment';
|
|
15
18
|
};
|
|
16
19
|
var isFullWidthOrFullPageAppearance = exports.isFullWidthOrFullPageAppearance = function isFullWidthOrFullPageAppearance(appearance) {
|
|
17
|
-
return isFullPageAppearance(appearance) || isFullWidthAppearance(appearance);
|
|
20
|
+
return isFullPageAppearance(appearance) || isFullWidthAppearance(appearance) || isMaxWidthAppearance(appearance);
|
|
18
21
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
8
8
|
var _utils2 = require("../../utils");
|
|
9
|
-
var date = function date(node,
|
|
9
|
+
var date = function date(node, _schema) {
|
|
10
10
|
return node.attrs.timestamp ? (0, _utils.timestampToIsoFormat)(node.attrs.timestamp) : (0, _utils2.getText)(node);
|
|
11
11
|
};
|
|
12
12
|
var _default = exports.default = date;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../../utils");
|
|
8
|
-
var inlineCard = function inlineCard(node,
|
|
8
|
+
var inlineCard = function inlineCard(node, _schema) {
|
|
9
9
|
var _node$attrs$data;
|
|
10
10
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || (0, _utils.getText)(node);
|
|
11
11
|
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var mention = function mention(node,
|
|
7
|
+
var mention = function mention(node, _schema) {
|
|
8
8
|
if (['all', 'here'].indexOf(node.attrs.id) !== -1) {
|
|
9
9
|
return "@".concat(node.attrs.id);
|
|
10
10
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _utils = require("../../utils");
|
|
8
|
-
var status = function status(node,
|
|
8
|
+
var status = function status(node, _schema) {
|
|
9
9
|
return node.attrs.text ? "[ ".concat(node.attrs.text.toUpperCase(), " ]") : (0, _utils.getText)(node);
|
|
10
10
|
};
|
|
11
11
|
var _default = exports.default = status;
|
package/dist/cjs/ui/Expand.js
CHANGED
|
@@ -202,7 +202,6 @@ function Expand(_ref2) {
|
|
|
202
202
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent,
|
|
203
203
|
localId = _ref2.localId,
|
|
204
204
|
nestedHeaderIds = _ref2.nestedHeaderIds,
|
|
205
|
-
rendererAppearance = _ref2.rendererAppearance,
|
|
206
205
|
rendererContentMode = _ref2.rendererContentMode;
|
|
207
206
|
var _React$useState = _react2.default.useState(false),
|
|
208
207
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
@@ -295,7 +294,9 @@ function Expand(_ref2) {
|
|
|
295
294
|
className: "".concat(nodeType, "-content-wrapper")
|
|
296
295
|
}, (0, _react.jsx)(_ui.WidthProvider, null, (0, _react.jsx)("div", {
|
|
297
296
|
css: clearNextSiblingMarginTopStyle
|
|
298
|
-
}), (0, _platformFeatureFlags.fg)('hot-121622_lazy_load_expand_content') ? hasLoadedChildren ?
|
|
297
|
+
}), (0, _platformFeatureFlags.fg)('hot-121622_lazy_load_expand_content') ? hasLoadedChildren ?
|
|
298
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
299
|
+
(0, _react.jsx)(_react2.Suspense, {
|
|
299
300
|
fallback: (0, _react.jsx)("div", null, "Loading...")
|
|
300
301
|
}, (0, _react.jsx)(LazyChildren, null, children)) : null : children))));
|
|
301
302
|
}
|
|
@@ -69,7 +69,7 @@ function ExtensionRenderer(props) {
|
|
|
69
69
|
|
|
70
70
|
// Ignored via go/ees005
|
|
71
71
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
-
var handleProvider = _react2.default.useCallback(function (
|
|
72
|
+
var handleProvider = _react2.default.useCallback(function (_name, providerPromise) {
|
|
73
73
|
providerPromise && providerPromise.then(function (provider) {
|
|
74
74
|
if (isMounted.current) {
|
|
75
75
|
setExtensionProvider(provider);
|
|
@@ -616,7 +616,7 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
616
616
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
617
617
|
}
|
|
618
618
|
var mutateTelepointer = function mutateTelepointer(mutations) {
|
|
619
|
-
mutations.forEach(function (mutation,
|
|
619
|
+
mutations.forEach(function (mutation, _index) {
|
|
620
620
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
621
621
|
if (initialUpdate.current) {
|
|
622
622
|
var oldTelepointer = _renderer.querySelector("#".concat(_style.TELEPOINTER_ID));
|
|
@@ -451,8 +451,8 @@ var AnnotationManagerProvider = exports.AnnotationManagerProvider = function Ann
|
|
|
451
451
|
var onAnnotationClick = function onAnnotationClick(_ref2) {
|
|
452
452
|
var annotationIds = _ref2.annotationIds,
|
|
453
453
|
eventTarget = _ref2.eventTarget,
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
_eventTargetType = _ref2.eventTargetType,
|
|
455
|
+
_viewMethod = _ref2.viewMethod;
|
|
456
456
|
dispatch({
|
|
457
457
|
type: 'updateAnnotation',
|
|
458
458
|
data: {
|
|
@@ -74,7 +74,7 @@ var MarkElement = exports.MarkElement = function MarkElement(_ref) {
|
|
|
74
74
|
} else {
|
|
75
75
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
76
76
|
}
|
|
77
|
-
}).catch(function (
|
|
77
|
+
}).catch(function (_error) {
|
|
78
78
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
79
79
|
});
|
|
80
80
|
} else {
|
|
@@ -22,7 +22,7 @@ var useUserSelectionRange = exports.useUserSelectionRange = function useUserSele
|
|
|
22
22
|
annotationManager = _useAnnotationManager.annotationManager;
|
|
23
23
|
var lastRangeRef = (0, _react.useRef)(null);
|
|
24
24
|
var isAnnotationManagerEnabled = !!annotationManager;
|
|
25
|
-
var onSelectionChange = (0, _react.useCallback)(function (
|
|
25
|
+
var onSelectionChange = (0, _react.useCallback)(function (_event) {
|
|
26
26
|
if (selectionTimeoutRef.current) {
|
|
27
27
|
clearTimeout(selectionTimeoutRef.current);
|
|
28
28
|
}
|
|
@@ -130,7 +130,7 @@ export default class RendererActions {
|
|
|
130
130
|
}
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
|
-
annotate(range, annotationId,
|
|
133
|
+
annotate(range, annotationId, _annotationType) {
|
|
134
134
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
135
135
|
return false;
|
|
136
136
|
}
|
|
@@ -278,7 +278,6 @@ export default class ReactSerializer {
|
|
|
278
278
|
}));
|
|
279
279
|
}
|
|
280
280
|
serializeTextWrapper(content, {
|
|
281
|
-
index,
|
|
282
281
|
parentInfo
|
|
283
282
|
}) {
|
|
284
283
|
const currentPath = parentInfo && parentInfo.path || [];
|
|
@@ -286,7 +285,7 @@ export default class ReactSerializer {
|
|
|
286
285
|
if (expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
287
286
|
this.standaloneBackgroundColorMarks.push(...getStandaloneBackgroundColorMarks(content));
|
|
288
287
|
}
|
|
289
|
-
return ReactSerializer.buildMarkStructure(content).map((mark,
|
|
288
|
+
return ReactSerializer.buildMarkStructure(content).map((mark, _index) => {
|
|
290
289
|
return this.serializeMark({
|
|
291
290
|
mark,
|
|
292
291
|
parentNode: {
|
|
@@ -305,7 +304,7 @@ export default class ReactSerializer {
|
|
|
305
304
|
parentMark
|
|
306
305
|
}) {
|
|
307
306
|
if (!isTextNode(mark)) {
|
|
308
|
-
const serializeContent = (childMark,
|
|
307
|
+
const serializeContent = (childMark, _index) => this.serializeMark({
|
|
309
308
|
mark: childMark,
|
|
310
309
|
parentNode,
|
|
311
310
|
parentMark: {
|
|
@@ -589,7 +588,7 @@ export default class ReactSerializer {
|
|
|
589
588
|
showAnchorLink: this.appearance !== 'comment' && this.allowHeadingAnchorLinks && !this.disableHeadingIDs && this.headingAnchorSupported(path)
|
|
590
589
|
};
|
|
591
590
|
}
|
|
592
|
-
getExpandProps(node,
|
|
591
|
+
getExpandProps(node, _path = []) {
|
|
593
592
|
if (!isNestedHeaderLinksEnabled(this.allowHeadingAnchorLinks)) {
|
|
594
593
|
return this.getProps(node);
|
|
595
594
|
}
|
|
@@ -12,7 +12,7 @@ import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
|
12
12
|
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
13
13
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
const RenderMediaInline = ({
|
|
15
|
-
rendererAppearance,
|
|
15
|
+
rendererAppearance: _rendererAppearance,
|
|
16
16
|
clipboardAttrs,
|
|
17
17
|
collection: collectionName,
|
|
18
18
|
eventHandlers,
|
|
@@ -29,10 +29,10 @@ const useMultiBodiedExtensionActions = ({
|
|
|
29
29
|
getChildrenCount() {
|
|
30
30
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
31
31
|
},
|
|
32
|
-
removeChild(
|
|
32
|
+
removeChild(_index) {
|
|
33
33
|
return false;
|
|
34
34
|
},
|
|
35
|
-
updateParameters(
|
|
35
|
+
updateParameters(_parameters) {
|
|
36
36
|
return false;
|
|
37
37
|
},
|
|
38
38
|
// Ignored via go/ees005
|
|
@@ -223,12 +223,12 @@ export const Colgroup = props => {
|
|
|
223
223
|
const colStyles = renderScaleDownColgroup({
|
|
224
224
|
...props,
|
|
225
225
|
isTopLevelRenderer,
|
|
226
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment', true, {
|
|
226
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment', true, {
|
|
227
227
|
exposure: true
|
|
228
228
|
}) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment_jira', true, {
|
|
229
229
|
exposure: true
|
|
230
230
|
}),
|
|
231
|
-
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width')
|
|
231
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true))
|
|
232
232
|
});
|
|
233
233
|
if (!colStyles) {
|
|
234
234
|
return null;
|
|
@@ -8,7 +8,7 @@ import { WidthConsumer, overflowShadow } from '@atlaskit/editor-common/ui';
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMergedCell, compose } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
11
|
-
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
13
13
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
14
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
@@ -16,9 +16,10 @@ import { TableHeader } from './tableCell';
|
|
|
16
16
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
17
17
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
18
18
|
import { Table } from './table/table';
|
|
19
|
-
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
|
|
19
|
+
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance, isMaxWidthAppearance } from '../utils/appearance';
|
|
20
20
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
21
21
|
import { TableProcessorWithContainerStyles } from './tableNew';
|
|
22
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
22
23
|
export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppearance(appearance) || isCommentAppearance(appearance) && editorExperiment('support_table_in_comment', true, {
|
|
23
24
|
exposure: true
|
|
24
25
|
});
|
|
@@ -378,6 +379,8 @@ export class TableContainer extends React.Component {
|
|
|
378
379
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
379
380
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
380
381
|
return [isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth, `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`];
|
|
382
|
+
} else if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
383
|
+
return [isRenderWidthValid ? Math.min(akEditorMaxWidthLayoutWidth, renderWidth) : akEditorMaxWidthLayoutWidth, `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`];
|
|
381
384
|
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
382
385
|
const tableContainerWidth = getTableContainerWidth(tableNode);
|
|
383
386
|
return [isRenderWidthValid ? renderWidth : tableContainerWidth, renderWidthCSS];
|
|
@@ -393,15 +396,17 @@ export class TableContainer extends React.Component {
|
|
|
393
396
|
const isTableAlignStart = tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment;
|
|
394
397
|
const fullWidthLineLength = isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth;
|
|
395
398
|
const fullWidthLineLengthCSS = `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
399
|
+
const maxWidthLineLength = isRenderWidthValid ? Math.min(akEditorMaxWidthLayoutWidth, renderWidth) : akEditorMaxWidthLayoutWidth;
|
|
400
|
+
const maxWidthLineLengthCSS = `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
396
401
|
const commentLineLength = isRenderWidthValid ? renderWidth : lineLengthFixedWidth;
|
|
397
402
|
const isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
398
|
-
const lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
399
|
-
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
403
|
+
const lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
404
|
+
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
400
405
|
|
|
401
406
|
// Setting fixTableSSRResizing to false while FG logic is true in tableNew
|
|
402
407
|
const fixTableSSRResizing = false;
|
|
403
408
|
const tableWidthNew = fixTableSSRResizing ? getTableContainerWidth(tableNode) : tableWidth;
|
|
404
|
-
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
409
|
+
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && isMaxWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
405
410
|
let leftCSS;
|
|
406
411
|
if (shouldCalculateLeftForAlignment) {
|
|
407
412
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -437,7 +442,7 @@ export class TableContainer extends React.Component {
|
|
|
437
442
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
438
443
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
439
444
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
440
|
-
if ((rendererAppearance === 'full-page' || rendererAppearance === 'full-width') && fixTableSSRResizing) {
|
|
445
|
+
if ((rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max') && fixTableSSRResizing) {
|
|
441
446
|
finalTableContainerWidth = allowTableResizing ? `calc(${tableWidthCSS})` : 'inherit';
|
|
442
447
|
}
|
|
443
448
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -7,13 +7,14 @@ import { FullPagePadding } from '../../ui/Renderer/style';
|
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMergedCell, compose } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
10
|
-
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
12
|
import { TableHeader } from './tableCell';
|
|
13
13
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
14
14
|
import { Table } from './table/table';
|
|
15
|
-
import { isCommentAppearance, isFullWidthOrFullPageAppearance, isFullWidthAppearance, isFullPageAppearance } from '../utils/appearance';
|
|
15
|
+
import { isCommentAppearance, isFullWidthOrFullPageAppearance, isFullWidthAppearance, isMaxWidthAppearance, isFullPageAppearance } from '../utils/appearance';
|
|
16
16
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
17
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
18
|
const stickyContainerBaseStyles = {
|
|
18
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
19
20
|
height: "var(--ds-space-250, 20px)",
|
|
@@ -348,7 +349,9 @@ export class TableContainer extends React.Component {
|
|
|
348
349
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : `100cqw - ${FullPagePadding}px * 2`;
|
|
349
350
|
const renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : `100cqw`;
|
|
350
351
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
351
|
-
if (rendererAppearance === '
|
|
352
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
353
|
+
return `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
354
|
+
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
352
355
|
return `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
353
356
|
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
354
357
|
return renderWidthCSS;
|
|
@@ -363,10 +366,11 @@ export class TableContainer extends React.Component {
|
|
|
363
366
|
// Logic for table alignment in renderer
|
|
364
367
|
const isTableAlignStart = tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment;
|
|
365
368
|
const fullWidthLineLengthCSS = `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
369
|
+
const maxWidthLineLengthCSS = `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
366
370
|
const isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
367
|
-
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
371
|
+
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
368
372
|
const tableWidthNew = getTableContainerWidth(tableNode);
|
|
369
|
-
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
373
|
+
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
370
374
|
let leftCSS;
|
|
371
375
|
if (shouldCalculateLeftForAlignment) {
|
|
372
376
|
leftCSS = `(${tableWidthCSS} - ${lineLengthCSS}) / 2`;
|
|
@@ -395,7 +399,7 @@ export class TableContainer extends React.Component {
|
|
|
395
399
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
396
400
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
397
401
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
398
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width') {
|
|
402
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
399
403
|
finalTableContainerWidth = allowTableResizing ? `calc(${tableWidthCSS})` : 'inherit';
|
|
400
404
|
}
|
|
401
405
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const isFullWidthAppearance = appearance => appearance === 'full-width';
|
|
2
|
+
export const isMaxWidthAppearance = appearance => appearance === 'max';
|
|
2
3
|
export const isFullPageAppearance = appearance => appearance === 'full-page';
|
|
3
4
|
export const isCommentAppearance = appearance => appearance === 'comment';
|
|
4
|
-
export const isFullWidthOrFullPageAppearance = appearance => isFullPageAppearance(appearance) || isFullWidthAppearance(appearance);
|
|
5
|
+
export const isFullWidthOrFullPageAppearance = appearance => isFullPageAppearance(appearance) || isFullWidthAppearance(appearance) || isMaxWidthAppearance(appearance);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { timestampToIsoFormat } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { getText } from '../../utils';
|
|
3
|
-
const date = (node,
|
|
3
|
+
const date = (node, _schema) => {
|
|
4
4
|
return node.attrs.timestamp ? timestampToIsoFormat(node.attrs.timestamp) : getText(node);
|
|
5
5
|
};
|
|
6
6
|
export default date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getText } from '../../utils';
|
|
2
|
-
const inlineCard = (node,
|
|
2
|
+
const inlineCard = (node, _schema) => {
|
|
3
3
|
var _node$attrs$data;
|
|
4
4
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || getText(node);
|
|
5
5
|
};
|
package/dist/es2019/ui/Expand.js
CHANGED
|
@@ -193,7 +193,6 @@ function Expand({
|
|
|
193
193
|
fireAnalyticsEvent,
|
|
194
194
|
localId,
|
|
195
195
|
nestedHeaderIds,
|
|
196
|
-
rendererAppearance,
|
|
197
196
|
rendererContentMode
|
|
198
197
|
}) {
|
|
199
198
|
const [expanded, setExpanded] = React.useState(false);
|
|
@@ -275,7 +274,9 @@ function Expand({
|
|
|
275
274
|
className: `${nodeType}-content-wrapper`
|
|
276
275
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
277
276
|
css: clearNextSiblingMarginTopStyle
|
|
278
|
-
}), fg('hot-121622_lazy_load_expand_content') ? hasLoadedChildren ?
|
|
277
|
+
}), fg('hot-121622_lazy_load_expand_content') ? hasLoadedChildren ?
|
|
278
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
279
|
+
jsx(Suspense, {
|
|
279
280
|
fallback: jsx("div", null, "Loading...")
|
|
280
281
|
}, jsx(LazyChildren, null, children)) : null : children))));
|
|
281
282
|
}
|
|
@@ -56,7 +56,7 @@ export default function ExtensionRenderer(props) {
|
|
|
56
56
|
|
|
57
57
|
// Ignored via go/ees005
|
|
58
58
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
59
|
-
const handleProvider = React.useCallback((
|
|
59
|
+
const handleProvider = React.useCallback((_name, providerPromise) => {
|
|
60
60
|
providerPromise && providerPromise.then(provider => {
|
|
61
61
|
if (isMounted.current) {
|
|
62
62
|
setExtensionProvider(provider);
|
|
@@ -604,7 +604,7 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
604
604
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
605
605
|
}
|
|
606
606
|
const mutateTelepointer = mutations => {
|
|
607
|
-
mutations.forEach((mutation,
|
|
607
|
+
mutations.forEach((mutation, _index) => {
|
|
608
608
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
609
609
|
if (initialUpdate.current) {
|
|
610
610
|
const oldTelepointer = renderer.querySelector(`#${TELEPOINTER_ID}`);
|
|
@@ -450,8 +450,8 @@ export const AnnotationManagerProvider = ({
|
|
|
450
450
|
const onAnnotationClick = ({
|
|
451
451
|
annotationIds,
|
|
452
452
|
eventTarget,
|
|
453
|
-
eventTargetType,
|
|
454
|
-
viewMethod
|
|
453
|
+
eventTargetType: _eventTargetType,
|
|
454
|
+
viewMethod: _viewMethod
|
|
455
455
|
}) => {
|
|
456
456
|
dispatch({
|
|
457
457
|
type: 'updateAnnotation',
|
|
@@ -69,7 +69,7 @@ const MarkElement = ({
|
|
|
69
69
|
} else {
|
|
70
70
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
71
71
|
}
|
|
72
|
-
}).catch(
|
|
72
|
+
}).catch(_error => {
|
|
73
73
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
74
74
|
});
|
|
75
75
|
} else {
|
|
@@ -23,7 +23,7 @@ export const useUserSelectionRange = props => {
|
|
|
23
23
|
} = useAnnotationManagerDispatch();
|
|
24
24
|
const lastRangeRef = useRef(null);
|
|
25
25
|
const isAnnotationManagerEnabled = !!annotationManager;
|
|
26
|
-
const onSelectionChange = useCallback(
|
|
26
|
+
const onSelectionChange = useCallback(_event => {
|
|
27
27
|
if (selectionTimeoutRef.current) {
|
|
28
28
|
clearTimeout(selectionTimeoutRef.current);
|
|
29
29
|
}
|
|
@@ -145,7 +145,7 @@ var RendererActions = /*#__PURE__*/function () {
|
|
|
145
145
|
}
|
|
146
146
|
}, {
|
|
147
147
|
key: "annotate",
|
|
148
|
-
value: function annotate(range, annotationId,
|
|
148
|
+
value: function annotate(range, annotationId, _annotationType) {
|
|
149
149
|
if (!this.doc || !this.schema || !this.schema.marks.annotation) {
|
|
150
150
|
return false;
|
|
151
151
|
}
|
package/dist/esm/react/index.js
CHANGED
|
@@ -293,15 +293,14 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
293
293
|
key: "serializeTextWrapper",
|
|
294
294
|
value: function serializeTextWrapper(content, _ref2) {
|
|
295
295
|
var _this3 = this;
|
|
296
|
-
var
|
|
297
|
-
parentInfo = _ref2.parentInfo;
|
|
296
|
+
var parentInfo = _ref2.parentInfo;
|
|
298
297
|
var currentPath = parentInfo && parentInfo.path || [];
|
|
299
298
|
var nodePosition = parentInfo && parentInfo.pos || 1;
|
|
300
299
|
if (expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true)) {
|
|
301
300
|
var _this$standaloneBackg;
|
|
302
301
|
(_this$standaloneBackg = this.standaloneBackgroundColorMarks).push.apply(_this$standaloneBackg, _toConsumableArray(getStandaloneBackgroundColorMarks(content)));
|
|
303
302
|
}
|
|
304
|
-
return ReactSerializer.buildMarkStructure(content).map(function (mark,
|
|
303
|
+
return ReactSerializer.buildMarkStructure(content).map(function (mark, _index) {
|
|
305
304
|
return _this3.serializeMark({
|
|
306
305
|
mark: mark,
|
|
307
306
|
parentNode: {
|
|
@@ -322,7 +321,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
322
321
|
parentNode = _ref3.parentNode,
|
|
323
322
|
parentMark = _ref3.parentMark;
|
|
324
323
|
if (!isTextNode(mark)) {
|
|
325
|
-
var serializeContent = function serializeContent(childMark,
|
|
324
|
+
var serializeContent = function serializeContent(childMark, _index) {
|
|
326
325
|
return _this4.serializeMark({
|
|
327
326
|
mark: childMark,
|
|
328
327
|
parentNode: parentNode,
|
|
@@ -658,7 +657,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
658
657
|
key: "getExpandProps",
|
|
659
658
|
value: function getExpandProps(node) {
|
|
660
659
|
var _this7 = this;
|
|
661
|
-
var
|
|
660
|
+
var _path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
662
661
|
if (!isNestedHeaderLinksEnabled(this.allowHeadingAnchorLinks)) {
|
|
663
662
|
return this.getProps(node);
|
|
664
663
|
}
|
|
@@ -18,7 +18,7 @@ import { ErrorBoundary } from '../../ui/Renderer/ErrorBoundary';
|
|
|
18
18
|
import { ACTION_SUBJECT } from '../../analytics/enums';
|
|
19
19
|
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
20
20
|
var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
21
|
-
var
|
|
21
|
+
var _rendererAppearance = _ref.rendererAppearance,
|
|
22
22
|
clipboardAttrs = _ref.clipboardAttrs,
|
|
23
23
|
collectionName = _ref.collection,
|
|
24
24
|
eventHandlers = _ref.eventHandlers,
|
|
@@ -31,10 +31,10 @@ var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActions(_re
|
|
|
31
31
|
getChildrenCount: function getChildrenCount() {
|
|
32
32
|
return children ? children === null || children === void 0 ? void 0 : children.length : 0;
|
|
33
33
|
},
|
|
34
|
-
removeChild: function removeChild(
|
|
34
|
+
removeChild: function removeChild(_index) {
|
|
35
35
|
return false;
|
|
36
36
|
},
|
|
37
|
-
updateParameters: function updateParameters(
|
|
37
|
+
updateParameters: function updateParameters(_parameters) {
|
|
38
38
|
return false;
|
|
39
39
|
},
|
|
40
40
|
// Ignored via go/ees005
|
|
@@ -228,12 +228,12 @@ export var Colgroup = function Colgroup(props) {
|
|
|
228
228
|
}
|
|
229
229
|
var colStyles = renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
230
230
|
isTopLevelRenderer: isTopLevelRenderer,
|
|
231
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment', true, {
|
|
231
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment', true, {
|
|
232
232
|
exposure: true
|
|
233
233
|
}) || props.rendererAppearance === 'comment' && editorExperiment('support_table_in_comment_jira', true, {
|
|
234
234
|
exposure: true
|
|
235
235
|
}),
|
|
236
|
-
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width')
|
|
236
|
+
isTableFixedColumnWidthsOptionEnabled: !!(flags && 'tableWithFixedColumnWidthsOption' in flags && flags.tableWithFixedColumnWidthsOption) && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true))
|
|
237
237
|
}));
|
|
238
238
|
if (!colStyles) {
|
|
239
239
|
return null;
|
|
@@ -19,7 +19,7 @@ import { WidthConsumer, overflowShadow } from '@atlaskit/editor-common/ui';
|
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMergedCell, compose } from '@atlaskit/editor-common/utils';
|
|
21
21
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
22
|
-
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
22
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
23
23
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
24
24
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
25
25
|
import { FullPagePadding } from '../../ui/Renderer/style';
|
|
@@ -27,9 +27,10 @@ import { TableHeader } from './tableCell';
|
|
|
27
27
|
import { withSmartCardStorage } from '../../ui/SmartCardStorage';
|
|
28
28
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
29
29
|
import { Table } from './table/table';
|
|
30
|
-
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
|
|
30
|
+
import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance, isMaxWidthAppearance } from '../utils/appearance';
|
|
31
31
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
32
32
|
import { TableProcessorWithContainerStyles } from './tableNew';
|
|
33
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
33
34
|
export var isTableResizingEnabled = function isTableResizingEnabled(appearance) {
|
|
34
35
|
return isFullWidthOrFullPageAppearance(appearance) || isCommentAppearance(appearance) && editorExperiment('support_table_in_comment', true, {
|
|
35
36
|
exposure: true
|
|
@@ -425,6 +426,8 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
425
426
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
426
427
|
if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
427
428
|
return [isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth, "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")")];
|
|
429
|
+
} else if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
430
|
+
return [isRenderWidthValid ? Math.min(akEditorMaxWidthLayoutWidth, renderWidth) : akEditorMaxWidthLayoutWidth, "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")")];
|
|
428
431
|
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
429
432
|
var tableContainerWidth = getTableContainerWidth(tableNode);
|
|
430
433
|
return [isRenderWidthValid ? renderWidth : tableContainerWidth, renderWidthCSS];
|
|
@@ -443,15 +446,17 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
443
446
|
var isTableAlignStart = tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment;
|
|
444
447
|
var fullWidthLineLength = isRenderWidthValid ? Math.min(akEditorFullWidthLayoutWidth, renderWidth) : akEditorFullWidthLayoutWidth;
|
|
445
448
|
var fullWidthLineLengthCSS = "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
449
|
+
var maxWidthLineLength = isRenderWidthValid ? Math.min(akEditorMaxWidthLayoutWidth, renderWidth) : akEditorMaxWidthLayoutWidth;
|
|
450
|
+
var maxWidthLineLengthCSS = "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
446
451
|
var commentLineLength = isRenderWidthValid ? renderWidth : lineLengthFixedWidth;
|
|
447
452
|
var isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
448
|
-
var lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
449
|
-
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
453
|
+
var lineLength = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLength : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLength : isCommentAppearanceAndTableAlignmentEnabled ? commentLineLength : lineLengthFixedWidth;
|
|
454
|
+
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
450
455
|
|
|
451
456
|
// Setting fixTableSSRResizing to false while FG logic is true in tableNew
|
|
452
457
|
var fixTableSSRResizing = false;
|
|
453
458
|
var tableWidthNew = fixTableSSRResizing ? getTableContainerWidth(tableNode) : tableWidth;
|
|
454
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
459
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && isMaxWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
455
460
|
var leftCSS;
|
|
456
461
|
if (shouldCalculateLeftForAlignment) {
|
|
457
462
|
left = (tableWidth - lineLength) / 2;
|
|
@@ -487,7 +492,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
487
492
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
488
493
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
489
494
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
490
|
-
if ((rendererAppearance === 'full-page' || rendererAppearance === 'full-width') && fixTableSSRResizing) {
|
|
495
|
+
if ((rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max') && fixTableSSRResizing) {
|
|
491
496
|
finalTableContainerWidth = allowTableResizing ? "calc(".concat(tableWidthCSS, ")") : 'inherit';
|
|
492
497
|
}
|
|
493
498
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -19,13 +19,14 @@ import { FullPagePadding } from '../../ui/Renderer/style';
|
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { createCompareNodes, convertProsemirrorTableNodeToArrayOfRows, hasMergedCell, compose } from '@atlaskit/editor-common/utils';
|
|
21
21
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
22
|
-
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
22
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
23
23
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
24
24
|
import { TableHeader } from './tableCell';
|
|
25
25
|
import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
|
|
26
26
|
import { Table } from './table/table';
|
|
27
|
-
import { isCommentAppearance, isFullWidthOrFullPageAppearance, isFullWidthAppearance, isFullPageAppearance } from '../utils/appearance';
|
|
27
|
+
import { isCommentAppearance, isFullWidthOrFullPageAppearance, isFullWidthAppearance, isMaxWidthAppearance, isFullPageAppearance } from '../utils/appearance';
|
|
28
28
|
import { TableStickyScrollbar } from './TableStickyScrollbar';
|
|
29
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
29
30
|
var stickyContainerBaseStyles = {
|
|
30
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
31
32
|
height: "var(--ds-space-250, 20px)",
|
|
@@ -398,7 +399,9 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
398
399
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(FullPagePadding, "px * 2");
|
|
399
400
|
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
400
401
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
401
|
-
if (rendererAppearance === '
|
|
402
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
403
|
+
return "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
404
|
+
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
402
405
|
return "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
403
406
|
} else if (rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
404
407
|
return renderWidthCSS;
|
|
@@ -413,10 +416,11 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
413
416
|
// Logic for table alignment in renderer
|
|
414
417
|
var isTableAlignStart = tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment;
|
|
415
418
|
var fullWidthLineLengthCSS = "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
419
|
+
var maxWidthLineLengthCSS = "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
416
420
|
var isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
417
|
-
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
421
|
+
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
418
422
|
var tableWidthNew = getTableContainerWidth(tableNode);
|
|
419
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
423
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance) && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
420
424
|
var leftCSS;
|
|
421
425
|
if (shouldCalculateLeftForAlignment) {
|
|
422
426
|
leftCSS = "(".concat(tableWidthCSS, " - ").concat(lineLengthCSS, ") / 2");
|
|
@@ -445,7 +449,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
445
449
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
446
450
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
447
451
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
448
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width') {
|
|
452
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
|
|
449
453
|
finalTableContainerWidth = allowTableResizing ? "calc(".concat(tableWidthCSS, ")") : 'inherit';
|
|
450
454
|
}
|
|
451
455
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export var isFullWidthAppearance = function isFullWidthAppearance(appearance) {
|
|
2
2
|
return appearance === 'full-width';
|
|
3
3
|
};
|
|
4
|
+
export var isMaxWidthAppearance = function isMaxWidthAppearance(appearance) {
|
|
5
|
+
return appearance === 'max';
|
|
6
|
+
};
|
|
4
7
|
export var isFullPageAppearance = function isFullPageAppearance(appearance) {
|
|
5
8
|
return appearance === 'full-page';
|
|
6
9
|
};
|
|
@@ -8,5 +11,5 @@ export var isCommentAppearance = function isCommentAppearance(appearance) {
|
|
|
8
11
|
return appearance === 'comment';
|
|
9
12
|
};
|
|
10
13
|
export var isFullWidthOrFullPageAppearance = function isFullWidthOrFullPageAppearance(appearance) {
|
|
11
|
-
return isFullPageAppearance(appearance) || isFullWidthAppearance(appearance);
|
|
14
|
+
return isFullPageAppearance(appearance) || isFullWidthAppearance(appearance) || isMaxWidthAppearance(appearance);
|
|
12
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { timestampToIsoFormat } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { getText } from '../../utils';
|
|
3
|
-
var date = function date(node,
|
|
3
|
+
var date = function date(node, _schema) {
|
|
4
4
|
return node.attrs.timestamp ? timestampToIsoFormat(node.attrs.timestamp) : getText(node);
|
|
5
5
|
};
|
|
6
6
|
export default date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getText } from '../../utils';
|
|
2
|
-
var inlineCard = function inlineCard(node,
|
|
2
|
+
var inlineCard = function inlineCard(node, _schema) {
|
|
3
3
|
var _node$attrs$data;
|
|
4
4
|
return node.attrs.url || ((_node$attrs$data = node.attrs.data) === null || _node$attrs$data === void 0 ? void 0 : _node$attrs$data.url) || getText(node);
|
|
5
5
|
};
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -193,7 +193,6 @@ function Expand(_ref2) {
|
|
|
193
193
|
fireAnalyticsEvent = _ref2.fireAnalyticsEvent,
|
|
194
194
|
localId = _ref2.localId,
|
|
195
195
|
nestedHeaderIds = _ref2.nestedHeaderIds,
|
|
196
|
-
rendererAppearance = _ref2.rendererAppearance,
|
|
197
196
|
rendererContentMode = _ref2.rendererContentMode;
|
|
198
197
|
var _React$useState = React.useState(false),
|
|
199
198
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -286,7 +285,9 @@ function Expand(_ref2) {
|
|
|
286
285
|
className: "".concat(nodeType, "-content-wrapper")
|
|
287
286
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
288
287
|
css: clearNextSiblingMarginTopStyle
|
|
289
|
-
}), fg('hot-121622_lazy_load_expand_content') ? hasLoadedChildren ?
|
|
288
|
+
}), fg('hot-121622_lazy_load_expand_content') ? hasLoadedChildren ?
|
|
289
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
290
|
+
jsx(Suspense, {
|
|
290
291
|
fallback: jsx("div", null, "Loading...")
|
|
291
292
|
}, jsx(LazyChildren, null, children)) : null : children))));
|
|
292
293
|
}
|
|
@@ -60,7 +60,7 @@ export default function ExtensionRenderer(props) {
|
|
|
60
60
|
|
|
61
61
|
// Ignored via go/ees005
|
|
62
62
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
-
var handleProvider = React.useCallback(function (
|
|
63
|
+
var handleProvider = React.useCallback(function (_name, providerPromise) {
|
|
64
64
|
providerPromise && providerPromise.then(function (provider) {
|
|
65
65
|
if (isMounted.current) {
|
|
66
66
|
setExtensionProvider(provider);
|
|
@@ -607,7 +607,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
607
607
|
lastChild && lastChild.appendChild(createTelepointer());
|
|
608
608
|
}
|
|
609
609
|
var mutateTelepointer = function mutateTelepointer(mutations) {
|
|
610
|
-
mutations.forEach(function (mutation,
|
|
610
|
+
mutations.forEach(function (mutation, _index) {
|
|
611
611
|
var _mutation$addedNodes$, _mutation$removedNode;
|
|
612
612
|
if (initialUpdate.current) {
|
|
613
613
|
var oldTelepointer = _renderer.querySelector("#".concat(TELEPOINTER_ID));
|
|
@@ -442,8 +442,8 @@ export var AnnotationManagerProvider = function AnnotationManagerProvider(_ref)
|
|
|
442
442
|
var onAnnotationClick = function onAnnotationClick(_ref2) {
|
|
443
443
|
var annotationIds = _ref2.annotationIds,
|
|
444
444
|
eventTarget = _ref2.eventTarget,
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
_eventTargetType = _ref2.eventTargetType,
|
|
446
|
+
_viewMethod = _ref2.viewMethod;
|
|
447
447
|
dispatch({
|
|
448
448
|
type: 'updateAnnotation',
|
|
449
449
|
data: {
|
|
@@ -66,7 +66,7 @@ var MarkElement = function MarkElement(_ref) {
|
|
|
66
66
|
} else {
|
|
67
67
|
// TODO: EDITOR-595 - If the preemptive gate returns false, should we track the analytics event?
|
|
68
68
|
}
|
|
69
|
-
}).catch(function (
|
|
69
|
+
}).catch(function (_error) {
|
|
70
70
|
// TODO: EDITOR-595 - An error occurred while checking the preemptive gate. We should report this error.
|
|
71
71
|
});
|
|
72
72
|
} else {
|
|
@@ -16,7 +16,7 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
|
|
|
16
16
|
annotationManager = _useAnnotationManager.annotationManager;
|
|
17
17
|
var lastRangeRef = useRef(null);
|
|
18
18
|
var isAnnotationManagerEnabled = !!annotationManager;
|
|
19
|
-
var onSelectionChange = useCallback(function (
|
|
19
|
+
var onSelectionChange = useCallback(function (_event) {
|
|
20
20
|
if (selectionTimeoutRef.current) {
|
|
21
21
|
clearTimeout(selectionTimeoutRef.current);
|
|
22
22
|
}
|
|
@@ -49,7 +49,7 @@ export default class RendererActions implements RendererActionsOptions, Annotati
|
|
|
49
49
|
step: RemoveNodeMarkStep | RemoveMarkStep;
|
|
50
50
|
doc: JSONDocNode;
|
|
51
51
|
};
|
|
52
|
-
annotate(range: Range, annotationId: string,
|
|
52
|
+
annotate(range: Range, annotationId: string, _annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
53
|
isValidAnnotationRange(range: Range | null): boolean;
|
|
54
54
|
isRangeAnnotatable(range: Range | null): boolean;
|
|
55
55
|
/**
|
|
@@ -142,6 +142,6 @@ export type MediaRenderErrorEvent = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.RENDERE
|
|
|
142
142
|
external?: boolean;
|
|
143
143
|
reason: string;
|
|
144
144
|
}>;
|
|
145
|
-
export type AnalyticsEventPayload<
|
|
145
|
+
export type AnalyticsEventPayload<_T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | TableRendererHeightInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent;
|
|
146
146
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
147
147
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type RendererAppearance } from '../../ui/Renderer/types';
|
|
2
2
|
export declare const isFullWidthAppearance: (appearance: RendererAppearance) => appearance is "full-width";
|
|
3
|
+
export declare const isMaxWidthAppearance: (appearance: RendererAppearance) => appearance is "max";
|
|
3
4
|
export declare const isFullPageAppearance: (appearance: RendererAppearance) => appearance is "full-page";
|
|
4
5
|
export declare const isCommentAppearance: (appearance: RendererAppearance) => appearance is "comment";
|
|
5
|
-
export declare const isFullWidthOrFullPageAppearance: (appearance: RendererAppearance) => appearance is "full-page" | "full-width";
|
|
6
|
+
export declare const isFullWidthOrFullPageAppearance: (appearance: RendererAppearance) => appearance is "full-page" | "full-width" | "max";
|
|
@@ -49,7 +49,7 @@ export default class RendererActions implements RendererActionsOptions, Annotati
|
|
|
49
49
|
step: RemoveNodeMarkStep | RemoveMarkStep;
|
|
50
50
|
doc: JSONDocNode;
|
|
51
51
|
};
|
|
52
|
-
annotate(range: Range, annotationId: string,
|
|
52
|
+
annotate(range: Range, annotationId: string, _annotationType: 'inlineComment'): AnnotationActionResult;
|
|
53
53
|
isValidAnnotationRange(range: Range | null): boolean;
|
|
54
54
|
isRangeAnnotatable(range: Range | null): boolean;
|
|
55
55
|
/**
|
|
@@ -142,6 +142,6 @@ export type MediaRenderErrorEvent = UIAEP<ACTION.ERRORED, ACTION_SUBJECT.RENDERE
|
|
|
142
142
|
external?: boolean;
|
|
143
143
|
reason: string;
|
|
144
144
|
}>;
|
|
145
|
-
export type AnalyticsEventPayload<
|
|
145
|
+
export type AnalyticsEventPayload<_T = void> = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | HeadingAnchorLinkButtonAEP | HoverLabelAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | TableWidthInfoAEP | TableRendererHeightInfoAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | MediaLnkTransformedAEP | InvalidProsemirrorDocumentErrorAEP | NestedTableTransformedAEP | MediaRenderErrorEvent;
|
|
146
146
|
export type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
147
147
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type RendererAppearance } from '../../ui/Renderer/types';
|
|
2
2
|
export declare const isFullWidthAppearance: (appearance: RendererAppearance) => appearance is "full-width";
|
|
3
|
+
export declare const isMaxWidthAppearance: (appearance: RendererAppearance) => appearance is "max";
|
|
3
4
|
export declare const isFullPageAppearance: (appearance: RendererAppearance) => appearance is "full-page";
|
|
4
5
|
export declare const isCommentAppearance: (appearance: RendererAppearance) => appearance is "comment";
|
|
5
|
-
export declare const isFullWidthOrFullPageAppearance: (appearance: RendererAppearance) => appearance is "full-page" | "full-width";
|
|
6
|
+
export declare const isFullWidthOrFullPageAppearance: (appearance: RendererAppearance) => appearance is "full-page" | "full-width" | "max";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.16.
|
|
3
|
+
"version": "124.16.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
55
55
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
56
56
|
"@atlaskit/react-ufo": "^4.15.0",
|
|
57
|
-
"@atlaskit/smart-card": "^43.
|
|
57
|
+
"@atlaskit/smart-card": "^43.9.0",
|
|
58
58
|
"@atlaskit/status": "^3.0.0",
|
|
59
59
|
"@atlaskit/task-decision": "^19.2.0",
|
|
60
60
|
"@atlaskit/theme": "^21.0.0",
|
|
61
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
62
|
-
"@atlaskit/tokens": "^8.
|
|
61
|
+
"@atlaskit/tmp-editor-statsig": "^13.40.0",
|
|
62
|
+
"@atlaskit/tokens": "^8.1.0",
|
|
63
63
|
"@atlaskit/tooltip": "^20.10.0",
|
|
64
64
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
65
65
|
"@babel/runtime": "^7.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^110.
|
|
75
|
+
"@atlaskit/editor-common": "^110.33.0",
|
|
76
76
|
"@atlaskit/link-provider": "^4.0.0",
|
|
77
77
|
"@atlaskit/media-core": "^37.0.0",
|
|
78
78
|
"react": "^18.2.0",
|