@atlaskit/editor-plugin-table 15.3.23 → 15.4.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/nodeviews/TableContainer.js +2 -1
  3. package/dist/cjs/nodeviews/TableResizer.js +3 -3
  4. package/dist/cjs/nodeviews/TableRowNativeStickyWithFallback.js +67 -32
  5. package/dist/cjs/nodeviews/toDOM.js +1 -1
  6. package/dist/cjs/pm-plugins/commands/insert.js +7 -2
  7. package/dist/cjs/pm-plugins/table-resizing/utils/consts.js +4 -2
  8. package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +2 -1
  9. package/dist/cjs/pm-plugins/table-width.js +7 -4
  10. package/dist/cjs/pm-plugins/utils/create.js +9 -3
  11. package/dist/cjs/pm-plugins/utils/snapping.js +10 -5
  12. package/dist/cjs/tablePlugin.js +8 -2
  13. package/dist/cjs/types/index.js +1 -0
  14. package/dist/cjs/ui/common-styles.js +1 -1
  15. package/dist/es2019/nodeviews/TableContainer.js +3 -2
  16. package/dist/es2019/nodeviews/TableResizer.js +4 -4
  17. package/dist/es2019/nodeviews/TableRowNativeStickyWithFallback.js +32 -0
  18. package/dist/es2019/nodeviews/toDOM.js +2 -2
  19. package/dist/es2019/pm-plugins/commands/insert.js +6 -2
  20. package/dist/es2019/pm-plugins/table-resizing/utils/consts.js +3 -1
  21. package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +3 -2
  22. package/dist/es2019/pm-plugins/table-width.js +9 -6
  23. package/dist/es2019/pm-plugins/utils/create.js +10 -4
  24. package/dist/es2019/pm-plugins/utils/snapping.js +11 -6
  25. package/dist/es2019/tablePlugin.js +8 -2
  26. package/dist/es2019/types/index.js +1 -0
  27. package/dist/es2019/ui/common-styles.js +10 -3
  28. package/dist/esm/nodeviews/TableContainer.js +3 -2
  29. package/dist/esm/nodeviews/TableResizer.js +4 -4
  30. package/dist/esm/nodeviews/TableRowNativeStickyWithFallback.js +67 -32
  31. package/dist/esm/nodeviews/toDOM.js +2 -2
  32. package/dist/esm/pm-plugins/commands/insert.js +7 -2
  33. package/dist/esm/pm-plugins/table-resizing/utils/consts.js +3 -1
  34. package/dist/esm/pm-plugins/table-resizing/utils/misc.js +3 -2
  35. package/dist/esm/pm-plugins/table-width.js +9 -6
  36. package/dist/esm/pm-plugins/utils/create.js +10 -4
  37. package/dist/esm/pm-plugins/utils/snapping.js +11 -6
  38. package/dist/esm/tablePlugin.js +8 -2
  39. package/dist/esm/types/index.js +1 -0
  40. package/dist/esm/ui/common-styles.js +1 -1
  41. package/dist/types/nodeviews/TableRowNativeStickyWithFallback.d.ts +7 -0
  42. package/dist/types/pm-plugins/commands/insert.d.ts +3 -2
  43. package/dist/types/pm-plugins/table-resizing/utils/consts.d.ts +2 -1
  44. package/dist/types/pm-plugins/table-width.d.ts +1 -1
  45. package/dist/types/pm-plugins/utils/create.d.ts +2 -1
  46. package/dist/types/pm-plugins/utils/snapping.d.ts +1 -1
  47. package/dist/types/tablePluginType.d.ts +2 -0
  48. package/dist/types/types/index.d.ts +5 -2
  49. package/dist/types-ts4.5/nodeviews/TableRowNativeStickyWithFallback.d.ts +7 -0
  50. package/dist/types-ts4.5/pm-plugins/commands/insert.d.ts +3 -2
  51. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/consts.d.ts +2 -1
  52. package/dist/types-ts4.5/pm-plugins/table-width.d.ts +1 -1
  53. package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +2 -1
  54. package/dist/types-ts4.5/pm-plugins/utils/snapping.d.ts +1 -1
  55. package/dist/types-ts4.5/tablePluginType.d.ts +2 -0
  56. package/dist/types-ts4.5/types/index.d.ts +5 -2
  57. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 15.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3e9ac3a2226fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3e9ac3a2226fd) -
8
+ Detect 'stuck' state for sticky positioned table header and toggle drop shadow
9
+
10
+ ## 15.4.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`8f759171c089b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8f759171c089b) -
15
+ [EDITOR-3322] Make sure that tables are able to handle the new max-width
16
+
3
17
  ## 15.3.23
4
18
 
5
19
  ### Patch Changes
@@ -15,6 +15,7 @@ var _hooks = require("@atlaskit/editor-common/hooks");
15
15
  var _nodeWidth = require("@atlaskit/editor-common/node-width");
16
16
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
17
17
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
19
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
19
20
  var _commandsWithAnalytics = require("../pm-plugins/commands/commands-with-analytics");
20
21
  var _pluginFactory = require("../pm-plugins/plugin-factory");
@@ -257,7 +258,7 @@ var ResizableTableContainer = exports.ResizableTableContainer = /*#__PURE__*/_re
257
258
 
258
259
  // Ensure minimum width for usability while respecting container constraints
259
260
  var width = Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300));
260
- var maxResizerWidth = isCommentEditor ? responsiveContainerWidth : Math.min(responsiveContainerWidth, _consts.TABLE_MAX_WIDTH);
261
+ var maxResizerWidth = isCommentEditor ? responsiveContainerWidth : Math.min(responsiveContainerWidth, (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? _consts.TABLE_MAX_WIDTH : _consts.TABLE_FULL_WIDTH);
261
262
  return {
262
263
  width: width,
263
264
  maxResizerWidth: maxResizerWidth
@@ -306,8 +306,8 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
306
306
  var fullWidthGuideline = (0, _guidelines.defaultGuidelinesForPreserveTable)(_guidelines.PRESERVE_TABLE_GUIDELINES_LENGTH_OFFSET, editorContainerWidth, excludeGuidelineConfig).filter(function (guideline) {
307
307
  return guideline.isFullWidth;
308
308
  })[0];
309
- var isFullWidthGuidelineActive = closestSnap && closestSnap.keys.includes(fullWidthGuideline.key);
310
- var tableMaxWidth = isCommentEditor ? Math.floor(containerWidth - _consts.TABLE_OFFSET_IN_COMMENT_EDITOR) : _consts.TABLE_MAX_WIDTH;
309
+ var isFullWidthGuidelineActive = (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? closestSnap && fullWidthGuideline && closestSnap.keys.includes(fullWidthGuideline.key) : closestSnap && closestSnap.keys.includes(fullWidthGuideline.key);
310
+ var tableMaxWidth = isCommentEditor ? Math.floor(containerWidth - _consts.TABLE_OFFSET_IN_COMMENT_EDITOR) : (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? _consts.TABLE_MAX_WIDTH : _consts.TABLE_FULL_WIDTH;
311
311
  var shouldUpdateWidthToWidest = isCommentEditor ? tableMaxWidth <= newWidth : !!isTableScalingEnabled && isFullWidthGuidelineActive;
312
312
  var previewParentWidth = isCommentEditor && shouldUpdateWidthToWidest ? tableMaxWidth : newWidth;
313
313
  (0, _scaleTable.previewScaleTable)(tableRef, {
@@ -335,7 +335,7 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
335
335
  var pos = getPos();
336
336
  var currentTableNodeLocalId = (_node$attrs$localId2 = node === null || node === void 0 || (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.localId) !== null && _node$attrs$localId2 !== void 0 ? _node$attrs$localId2 : '';
337
337
  var tableMaxWidth = isCommentEditor ? undefined // Table's full-width in comment appearance inherit the width of the Editor/Renderer
338
- : _consts.TABLE_MAX_WIDTH;
338
+ : (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? _consts.TABLE_MAX_WIDTH : _consts.TABLE_FULL_WIDTH;
339
339
  newWidth = widthToWidest && currentTableNodeLocalId && widthToWidest[currentTableNodeLocalId] ? tableMaxWidth : newWidth;
340
340
  var tr = state.tr.setMeta(_tableWidth.pluginKey, {
341
341
  resizing: false,
@@ -15,6 +15,7 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
15
15
  var _throttle = _interopRequireDefault(require("lodash/throttle"));
16
16
  var _nesting = require("@atlaskit/editor-common/nesting");
17
17
  var _nodeVisibility = require("@atlaskit/editor-common/node-visibility");
18
+ var _styles = require("@atlaskit/editor-common/styles");
18
19
  var _ui = require("@atlaskit/editor-common/ui");
19
20
  var _utils = require("@atlaskit/editor-prosemirror/utils");
20
21
  var _pluginFactory = require("../pm-plugins/plugin-factory");
@@ -176,6 +177,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
176
177
  if (this.isStickyHeaderEnabled) {
177
178
  this.unsubscribe();
178
179
  this.overflowObserver && this.overflowObserver.disconnect();
180
+ this.stickyStateObserver && this.stickyStateObserver.disconnect();
179
181
  this.nodeVisibilityObserverCleanupFn && this.nodeVisibilityObserverCleanupFn();
180
182
  var tree = (0, _dom2.getTree)(this.dom);
181
183
  if (tree) {
@@ -306,11 +308,41 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
306
308
  });
307
309
  }, options);
308
310
  }
311
+
312
+ /**
313
+ * This observer is used to track the 'stuck' state of the header row.
314
+ * This roughly mimics `(at)container scroll-state(stuck: top)` in CSS,
315
+ * but with full browser support.
316
+ */
317
+ }, {
318
+ key: "initStickyStateObserver",
319
+ value: function initStickyStateObserver() {
320
+ var _this3 = this;
321
+ if (!this.editorScrollableElement || !(this.editorScrollableElement instanceof Element)) {
322
+ return;
323
+ }
324
+ var options = {
325
+ root: this.editorScrollableElement,
326
+ rootMargin: "-".concat(_styles.tableMarginTop + 16, "px 0px 0px 0px"),
327
+ threshold: 1
328
+ };
329
+ this.stickyStateObserver = new IntersectionObserver(function (entries) {
330
+ entries.forEach(function (entry) {
331
+ var _entry$rootBounds;
332
+ if (entry.intersectionRect.top === ((_entry$rootBounds = entry.rootBounds) === null || _entry$rootBounds === void 0 ? void 0 : _entry$rootBounds.top)) {
333
+ _this3.dom.classList.add(_types.TableCssClassName.NATIVE_STICKY_ACTIVE);
334
+ } else {
335
+ _this3.dom.classList.remove(_types.TableCssClassName.NATIVE_STICKY_ACTIVE);
336
+ }
337
+ });
338
+ }, options);
339
+ }
340
+
309
341
  // initialize intersection observer to track if table is within scroll area
310
342
  }, {
311
343
  key: "initObservers",
312
344
  value: function initObservers() {
313
- var _this3 = this;
345
+ var _this4 = this;
314
346
  if (!this.dom || this.dom.dataset.isObserved) {
315
347
  return;
316
348
  }
@@ -321,12 +353,15 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
321
353
  return;
322
354
  }
323
355
  if (this.isHeaderRow && !this.isInNestedTable) {
356
+ var _this$stickyStateObse;
324
357
  this.initOverflowObserver();
325
358
  var closestTable = this.dom.closest('table');
326
359
  if (closestTable) {
327
360
  var _this$overflowObserve;
328
361
  (_this$overflowObserve = this.overflowObserver) === null || _this$overflowObserve === void 0 || _this$overflowObserve.observe(closestTable);
329
362
  }
363
+ this.initStickyStateObserver();
364
+ (_this$stickyStateObse = this.stickyStateObserver) === null || _this$stickyStateObse === void 0 || _this$stickyStateObse.observe(this.dom);
330
365
  }
331
366
  this.resizeObserver.observe(this.dom);
332
367
  if (this.editorScrollableElement) {
@@ -337,7 +372,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
337
372
  window.requestAnimationFrame(function () {
338
373
  var getTableContainer = function getTableContainer() {
339
374
  var _getTree;
340
- return (_getTree = (0, _dom2.getTree)(_this3.dom)) === null || _getTree === void 0 ? void 0 : _getTree.wrapper.closest(".".concat(_types.TableCssClassName.NODEVIEW_WRAPPER));
375
+ return (_getTree = (0, _dom2.getTree)(_this4.dom)) === null || _getTree === void 0 ? void 0 : _getTree.wrapper.closest(".".concat(_types.TableCssClassName.NODEVIEW_WRAPPER));
341
376
  };
342
377
 
343
378
  // we expect tree to be defined after animation frame
@@ -363,16 +398,16 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
363
398
  return getSentinelTop() !== null && getSentinelBottom() !== null;
364
399
  };
365
400
  var observeStickySentinels = function observeStickySentinels() {
366
- _this3.sentinels.top = getSentinelTop();
367
- _this3.sentinels.bottom = getSentinelBottom();
368
- [_this3.sentinels.top, _this3.sentinels.bottom].forEach(function (el) {
401
+ _this4.sentinels.top = getSentinelTop();
402
+ _this4.sentinels.bottom = getSentinelBottom();
403
+ [_this4.sentinels.top, _this4.sentinels.bottom].forEach(function (el) {
369
404
  // skip if already observed for another row on this table
370
405
  if (el && !el.dataset.isObserved) {
371
406
  el.dataset.isObserved = 'true';
372
407
 
373
408
  // Ignored via go/ees005
374
409
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
375
- _this3.intersectionObserver.observe(el);
410
+ _this4.intersectionObserver.observe(el);
376
411
  }
377
412
  });
378
413
  };
@@ -387,7 +422,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
387
422
  // observe sentinels before they are in the DOM, use MutationObserver
388
423
  // to wait for sentinels to be added to the parent Table node DOM
389
424
  // then attach the IntersectionObserver
390
- _this3.tableContainerObserver = new MutationObserver(function () {
425
+ _this4.tableContainerObserver = new MutationObserver(function () {
391
426
  // Check if the tableContainer is still connected to the DOM. It can become disconnected when the placholder
392
427
  // prosemirror node is replaced with the fully rendered React node (see _handleTableRef).
393
428
 
@@ -395,14 +430,14 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
395
430
  tableContainer = getTableContainer();
396
431
  }
397
432
  if (sentinelsInDom()) {
398
- var _this3$tableContainer;
433
+ var _this4$tableContainer;
399
434
  observeStickySentinels();
400
- (_this3$tableContainer = _this3.tableContainerObserver) === null || _this3$tableContainer === void 0 || _this3$tableContainer.disconnect();
435
+ (_this4$tableContainer = _this4.tableContainerObserver) === null || _this4$tableContainer === void 0 || _this4$tableContainer.disconnect();
401
436
  }
402
437
  });
403
438
  var mutatingNode = tableContainer;
404
- if (mutatingNode && _this3.tableContainerObserver) {
405
- _this3.tableContainerObserver.observe(mutatingNode, {
439
+ if (mutatingNode && _this4.tableContainerObserver) {
440
+ _this4.tableContainerObserver.observe(mutatingNode, {
406
441
  subtree: true,
407
442
  childList: true
408
443
  });
@@ -417,32 +452,32 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
417
452
  }, {
418
453
  key: "createResizeObserver",
419
454
  value: function createResizeObserver() {
420
- var _this4 = this;
455
+ var _this5 = this;
421
456
  this.resizeObserver = new ResizeObserver(function (entries) {
422
- var tree = (0, _dom2.getTree)(_this4.dom);
457
+ var tree = (0, _dom2.getTree)(_this5.dom);
423
458
  if (!tree) {
424
459
  return;
425
460
  }
426
461
  var table = tree.table;
427
462
  entries.forEach(function (entry) {
428
- var _this4$editorScrollab;
463
+ var _this5$editorScrollab;
429
464
  // On resize of the parent scroll element we need to adjust the width
430
465
  // of the sticky header
431
466
  // Ignored via go/ees005
432
467
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
433
- if (entry.target.className === ((_this4$editorScrollab = _this4.editorScrollableElement) === null || _this4$editorScrollab === void 0 ? void 0 : _this4$editorScrollab.className)) {
434
- _this4.updateStickyHeaderWidth();
468
+ if (entry.target.className === ((_this5$editorScrollab = _this5.editorScrollableElement) === null || _this5$editorScrollab === void 0 ? void 0 : _this5$editorScrollab.className)) {
469
+ _this5.updateStickyHeaderWidth();
435
470
  } else {
436
471
  var newHeight = entry.contentRect ? entry.contentRect.height :
437
472
  // Ignored via go/ees005
438
473
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
439
474
  entry.target.offsetHeight;
440
- if (_this4.sentinels.bottom &&
475
+ if (_this5.sentinels.bottom &&
441
476
  // When the table header is sticky, it would be taller by a 1px (border-bottom),
442
477
  // So we adding this check to allow a 1px difference.
443
- Math.abs(newHeight - (_this4.stickyRowHeight || 0)) > _consts.stickyHeaderBorderBottomWidth) {
444
- _this4.stickyRowHeight = newHeight;
445
- _this4.sentinels.bottom.style.bottom = "".concat(_consts.tableScrollbarOffset + _consts.stickyRowOffsetTop + newHeight, "px");
478
+ Math.abs(newHeight - (_this5.stickyRowHeight || 0)) > _consts.stickyHeaderBorderBottomWidth) {
479
+ _this5.stickyRowHeight = newHeight;
480
+ _this5.sentinels.bottom.style.bottom = "".concat(_consts.tableScrollbarOffset + _consts.stickyRowOffsetTop + newHeight, "px");
446
481
  (0, _dom.updateStickyMargins)(table);
447
482
  }
448
483
  }
@@ -452,13 +487,13 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
452
487
  }, {
453
488
  key: "createIntersectionObserver",
454
489
  value: function createIntersectionObserver() {
455
- var _this5 = this;
490
+ var _this6 = this;
456
491
  this.intersectionObserver = new IntersectionObserver(function (entries, _) {
457
- var _this5$editorScrollab, _this5$editorScrollab2;
492
+ var _this6$editorScrollab, _this6$editorScrollab2;
458
493
  // IMPORTANT: please try and avoid using entry.rootBounds it's terribly inconsistent. For example; sometimes it may return
459
494
  // 0 height. In safari it will multiply all values by the window scale factor, however chrome & firfox won't.
460
495
  // This is why i just get the scroll view bounding rect here and use it, and fallback to the entry.rootBounds if needed.
461
- var rootBounds = (_this5$editorScrollab = _this5.editorScrollableElement) === null || _this5$editorScrollab === void 0 || (_this5$editorScrollab2 = _this5$editorScrollab.getBoundingClientRect) === null || _this5$editorScrollab2 === void 0 ? void 0 : _this5$editorScrollab2.call(_this5$editorScrollab);
496
+ var rootBounds = (_this6$editorScrollab = _this6.editorScrollableElement) === null || _this6$editorScrollab === void 0 || (_this6$editorScrollab2 = _this6$editorScrollab.getBoundingClientRect) === null || _this6$editorScrollab2 === void 0 ? void 0 : _this6$editorScrollab2.call(_this6$editorScrollab);
462
497
  entries.forEach(function (entry) {
463
498
  var target = entry.target,
464
499
  isIntersecting = entry.isIntersecting,
@@ -466,15 +501,15 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
466
501
  // This observer only every looks at the top/bottom sentinels, we can assume if it's not one then it's the other.
467
502
  var targetKey = target.classList.contains(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP) ? 'top' : 'bottom';
468
503
  // Cache the latest sentinel information
469
- _this5.sentinelData[targetKey] = {
504
+ _this6.sentinelData[targetKey] = {
470
505
  isIntersecting: isIntersecting,
471
506
  boundingClientRect: boundingClientRect,
472
507
  rootBounds: rootBounds !== null && rootBounds !== void 0 ? rootBounds : entry.rootBounds
473
508
  };
474
509
  // Keep the other sentinels rootBounds in sync with this latest one
475
- _this5.sentinelData[targetKey === 'top' ? 'bottom' : targetKey].rootBounds = rootBounds !== null && rootBounds !== void 0 ? rootBounds : entry.rootBounds;
510
+ _this6.sentinelData[targetKey === 'top' ? 'bottom' : targetKey].rootBounds = rootBounds !== null && rootBounds !== void 0 ? rootBounds : entry.rootBounds;
476
511
  });
477
- _this5.refreshStickyState();
512
+ _this6.refreshStickyState();
478
513
  }, {
479
514
  threshold: 0,
480
515
  root: this.editorScrollableElement
@@ -645,12 +680,12 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
645
680
  }, {
646
681
  key: "refireIntersectionObservers",
647
682
  value: function refireIntersectionObservers() {
648
- var _this6 = this;
683
+ var _this7 = this;
649
684
  if (this.isSticky) {
650
685
  [this.sentinels.top, this.sentinels.bottom].forEach(function (el) {
651
- if (el && _this6.intersectionObserver) {
652
- _this6.intersectionObserver.unobserve(el);
653
- _this6.intersectionObserver.observe(el);
686
+ if (el && _this7.intersectionObserver) {
687
+ _this7.intersectionObserver.unobserve(el);
688
+ _this7.intersectionObserver.observe(el);
654
689
  }
655
690
  });
656
691
  }
@@ -659,7 +694,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
659
694
  key: "makeHeaderRowSticky",
660
695
  value: function makeHeaderRowSticky(tree, scrollTop) {
661
696
  var _tbody$firstChild,
662
- _this7 = this;
697
+ _this8 = this;
663
698
  // If header row height is more than 50% of viewport height don't do this
664
699
  if (this.isSticky || this.stickyRowHeight && this.stickyRowHeight > window.innerHeight / 2 || this.isInNestedTable) {
665
700
  return;
@@ -698,7 +733,7 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
698
733
  });
699
734
  var fastScrollThresholdMs = 500;
700
735
  setTimeout(function () {
701
- _this7.refireIntersectionObservers();
736
+ _this8.refireIntersectionObservers();
702
737
  }, fastScrollThresholdMs);
703
738
  }
704
739
  this.dom.style.top = "0px";
@@ -119,7 +119,7 @@ var tableNodeSpecWithFixedToDOM = exports.tableNodeSpecWithFixedToDOM = function
119
119
  position: 'relative',
120
120
  userSelect: 'auto',
121
121
  boxSizing: 'border-box',
122
- '--ak-editor-table-max-width': "".concat(_consts.TABLE_MAX_WIDTH, "px"),
122
+ '--ak-editor-table-max-width': "".concat((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? _consts.TABLE_MAX_WIDTH : _consts.TABLE_FULL_WIDTH, "px"),
123
123
  '--ak-editor-table-min-width': "".concat(tableMinWidth, "px"),
124
124
  minWidth: 'var(--ak-editor-table-min-width)',
125
125
  maxWidth: (0, _misc.getTableResizerContainerMaxWidthInCSS)(config.isCommentEditor, config.isChromelessEditor, config.isTableScalingEnabled),
@@ -163,12 +163,13 @@ var insertRow = exports.insertRow = function insertRow(row, moveCursorToTheNewRo
163
163
  * @deprecated This function is deprecated - please use insertTableWithNestingSupport instead.
164
164
  * (To be removed with feature gate: `platform_editor_use_nested_table_pm_nodes`)
165
165
  */
166
- var createTable = exports.createTable = function createTable(isTableScalingEnabled, isTableAlignmentEnabled, isFullWidthModeEnabled, editorAnalyticsAPI, isCommentEditor, isChromelessEditor, isTableResizingEnabled) {
166
+ var createTable = exports.createTable = function createTable(isTableScalingEnabled, isTableAlignmentEnabled, isFullWidthModeEnabled, isMaxWidthModeEnabled, editorAnalyticsAPI, isCommentEditor, isChromelessEditor, isTableResizingEnabled) {
167
167
  return function (state, dispatch) {
168
168
  var table = (0, _create.createTableWithWidth)({
169
169
  isTableScalingEnabled: isTableScalingEnabled,
170
170
  isTableAlignmentEnabled: isTableAlignmentEnabled,
171
171
  isFullWidthModeEnabled: isFullWidthModeEnabled,
172
+ isMaxWidthModeEnabled: isMaxWidthModeEnabled,
172
173
  isCommentEditor: isCommentEditor,
173
174
  isChromelessEditor: isChromelessEditor,
174
175
  isTableResizingEnabled: isTableResizingEnabled
@@ -197,13 +198,14 @@ var createTable = exports.createTable = function createTable(isTableScalingEnabl
197
198
  * @deprecated This function is deprecated - please use insertTableWithNestingSupport instead.
198
199
  * (To be removed with feature gate: `platform_editor_use_nested_table_pm_nodes`)
199
200
  */
200
- var insertTableWithSize = exports.insertTableWithSize = function insertTableWithSize(isFullWidthModeEnabled, isTableScalingEnabled, isTableAlignmentEnabled, editorAnalyticsAPI, isCommentEditor, isChromelessEditor) {
201
+ var insertTableWithSize = exports.insertTableWithSize = function insertTableWithSize(isFullWidthModeEnabled, isMaxWidthModeEnabled, isTableScalingEnabled, isTableAlignmentEnabled, editorAnalyticsAPI, isCommentEditor, isChromelessEditor) {
201
202
  return function (rowsCount, colsCount, inputMethod) {
202
203
  return function (_ref) {
203
204
  var tr = _ref.tr;
204
205
  var tableNode = (0, _create.createTableWithWidth)({
205
206
  isTableScalingEnabled: isTableScalingEnabled,
206
207
  isFullWidthModeEnabled: isFullWidthModeEnabled,
208
+ isMaxWidthModeEnabled: isMaxWidthModeEnabled,
207
209
  isTableAlignmentEnabled: isTableAlignmentEnabled,
208
210
  isCommentEditor: isCommentEditor,
209
211
  isChromelessEditor: isChromelessEditor,
@@ -254,6 +256,8 @@ var insertTableWithNestingSupport = exports.insertTableWithNestingSupport = func
254
256
  isTableAlignmentEnabled = _ref2$isTableAlignmen === void 0 ? false : _ref2$isTableAlignmen,
255
257
  _ref2$isFullWidthMode = _ref2.isFullWidthModeEnabled,
256
258
  isFullWidthModeEnabled = _ref2$isFullWidthMode === void 0 ? false : _ref2$isFullWidthMode,
259
+ _ref2$isMaxWidthModeE = _ref2.isMaxWidthModeEnabled,
260
+ isMaxWidthModeEnabled = _ref2$isMaxWidthModeE === void 0 ? false : _ref2$isMaxWidthModeE,
257
261
  _ref2$isCommentEditor = _ref2.isCommentEditor,
258
262
  isCommentEditor = _ref2$isCommentEditor === void 0 ? false : _ref2$isCommentEditor,
259
263
  _ref2$isChromelessEdi = _ref2.isChromelessEditor,
@@ -289,6 +293,7 @@ var insertTableWithNestingSupport = exports.insertTableWithNestingSupport = func
289
293
  isTableScalingEnabled: isTableScalingEnabled,
290
294
  isTableAlignmentEnabled: isTableAlignmentEnabled,
291
295
  isFullWidthModeEnabled: isFullWidthModeEnabled,
296
+ isMaxWidthModeEnabled: isMaxWidthModeEnabled,
292
297
  isCommentEditor: isCommentEditor,
293
298
  isChromelessEditor: isChromelessEditor,
294
299
  isTableResizingEnabled: isTableResizingEnabled,
@@ -3,9 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TABLE_OFFSET_IN_COMMENT_EDITOR = exports.TABLE_MAX_WIDTH = exports.TABLE_EDITOR_MARGIN = exports.MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = exports.MAX_SCALING_PERCENT = exports.FULL_WIDTH_EDITOR_CONTENT_WIDTH = exports.COLUMN_MIN_WIDTH = void 0;
6
+ exports.TABLE_OFFSET_IN_COMMENT_EDITOR = exports.TABLE_MAX_WIDTH = exports.TABLE_FULL_WIDTH = exports.TABLE_EDITOR_MARGIN = exports.MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = exports.MAX_SCALING_PERCENT = exports.FULL_WIDTH_EDITOR_CONTENT_WIDTH = exports.COLUMN_MIN_WIDTH = void 0;
7
7
  var COLUMN_MIN_WIDTH = exports.COLUMN_MIN_WIDTH = 48;
8
- var TABLE_MAX_WIDTH = exports.TABLE_MAX_WIDTH = 1800;
8
+ // Remove TABLE_MAX_WIDTH_OLD when cleaning up editor_tinymce_full_width_mode experiment
9
+ var TABLE_FULL_WIDTH = exports.TABLE_FULL_WIDTH = 1800;
10
+ var TABLE_MAX_WIDTH = exports.TABLE_MAX_WIDTH = 4000;
9
11
  var FULL_WIDTH_EDITOR_CONTENT_WIDTH = exports.FULL_WIDTH_EDITOR_CONTENT_WIDTH = 1800;
10
12
  var MAX_SCALING_PERCENT = exports.MAX_SCALING_PERCENT = 0.3;
11
13
  var MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = exports.MAX_SCALING_PERCENT_TABLES_WITH_FIXED_COLUMN_WIDTHS_OPTION = 0.4;
@@ -11,6 +11,7 @@ var _nodeWidth = require("@atlaskit/editor-common/node-width");
11
11
  var _styles = require("@atlaskit/editor-common/styles");
12
12
  var _utils = require("@atlaskit/editor-common/utils");
13
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
15
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
16
  var _colgroup = require("./colgroup");
16
17
  var _consts = require("./consts");
@@ -105,7 +106,7 @@ var getTableContainerElementWidth = exports.getTableContainerElementWidth = func
105
106
  * @returns The CSS max-width value
106
107
  */
107
108
  var getTableResizerContainerMaxWidthInCSS = exports.getTableResizerContainerMaxWidthInCSS = function getTableResizerContainerMaxWidthInCSS(isCommentEditor, isChromelessEditor, isTableScalingEnabled) {
108
- var maxResizerWidthForNonCommentEditor = isTableScalingEnabled ? "min(calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2)), ".concat(_consts.TABLE_MAX_WIDTH, "px)") : "min(calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2) - var(--ak-editor--resizer-handle-spacing)), ".concat(_consts.TABLE_MAX_WIDTH, "px)");
109
+ var maxResizerWidthForNonCommentEditor = isTableScalingEnabled ? "min(calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2)), ".concat((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? _consts.TABLE_MAX_WIDTH : _consts.TABLE_FULL_WIDTH, "px)") : "min(calc(100cqw - calc(var(--ak-editor--large-gutter-padding) * 2) - var(--ak-editor--resizer-handle-spacing)), ".concat((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? _consts.TABLE_MAX_WIDTH : _consts.TABLE_FULL_WIDTH, "px)");
109
110
  return isCommentEditor || isChromelessEditor ? '100%' : maxResizerWidthForNonCommentEditor;
110
111
  };
111
112
 
@@ -12,6 +12,7 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
12
12
  var _document = require("@atlaskit/editor-common/utils/document");
13
13
  var _state = require("@atlaskit/editor-prosemirror/state");
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
16
  var _consts = require("./table-resizing/utils/consts");
16
17
  var _alignment = require("./utils/alignment");
17
18
  var _excluded = ["width"];
@@ -22,7 +23,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
22
23
  * Also holds resizing state to hide / show table controls
23
24
  */
24
25
  var pluginKey = exports.pluginKey = new _state.PluginKey('tableWidthPlugin');
25
- var createPlugin = exports.createPlugin = function createPlugin(dispatch, dispatchAnalyticsEvent, fullWidthEnabled, isTableScalingEnabled, isTableAlignmentEnabled, isCommentEditor) {
26
+ var createPlugin = exports.createPlugin = function createPlugin(dispatch, dispatchAnalyticsEvent, fullWidthEnabled, maxWidthEnabled, isTableScalingEnabled, isTableAlignmentEnabled, isCommentEditor) {
26
27
  return new _safePlugin.SafePlugin({
27
28
  key: pluginKey,
28
29
  state: {
@@ -72,7 +73,9 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, dispat
72
73
  var layout = node.attrs.layout;
73
74
  if (!width && layout) {
74
75
  var tableWidthCal;
75
- if (fullWidthEnabled) {
76
+ if (maxWidthEnabled) {
77
+ tableWidthCal = _editorSharedStyles.akEditorMaxWidthLayoutWidth;
78
+ } else if (fullWidthEnabled) {
76
79
  tableWidthCal = _editorSharedStyles.akEditorFullWidthLayoutWidth;
77
80
  } else {
78
81
  switch (layout) {
@@ -106,8 +109,8 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, dispat
106
109
  step.getMap().forEach(function (_, __, newStart, newEnd) {
107
110
  newState.doc.nodesBetween(newStart, newEnd, function (node, pos) {
108
111
  if (node.type === table) {
109
- if (shouldPatchTableWidth && node.attrs.width !== _consts.TABLE_MAX_WIDTH) {
110
- tr.setNodeAttribute(pos, 'width', _consts.TABLE_MAX_WIDTH);
112
+ if (shouldPatchTableWidth && node.attrs.width !== (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? _consts.TABLE_MAX_WIDTH : _consts.TABLE_FULL_WIDTH) {
113
+ tr.setNodeAttribute(pos, 'width', (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) ? _consts.TABLE_MAX_WIDTH : _consts.TABLE_FULL_WIDTH);
111
114
  }
112
115
  if (shouldPatchTableAlignment) {
113
116
  tr.setNodeAttribute(pos, 'layout', _alignment.ALIGN_START);
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.createTableWithWidth = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _utils = require("@atlaskit/editor-tables/utils");
10
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
11
  var _consts = require("../table-resizing/utils/consts");
11
12
  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; }
12
13
  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; }
@@ -16,6 +17,7 @@ var createTableWithWidth = exports.createTableWithWidth = function createTableWi
16
17
  var isTableScalingEnabled = _ref.isTableScalingEnabled,
17
18
  isTableAlignmentEnabled = _ref.isTableAlignmentEnabled,
18
19
  isFullWidthModeEnabled = _ref.isFullWidthModeEnabled,
20
+ isMaxWidthModeEnabled = _ref.isMaxWidthModeEnabled,
19
21
  isCommentEditor = _ref.isCommentEditor,
20
22
  isChromelessEditor = _ref.isChromelessEditor,
21
23
  isTableResizingEnabled = _ref.isTableResizingEnabled,
@@ -27,10 +29,14 @@ var createTableWithWidth = exports.createTableWithWidth = function createTableWi
27
29
  attrsOverrides.rowsCount = createTableProps !== null && createTableProps !== void 0 && createTableProps.rowsCount ? createTableProps === null || createTableProps === void 0 ? void 0 : createTableProps.rowsCount : NESTED_TABLE_DEFAULT_ROWS;
28
30
  attrsOverrides.colsCount = createTableProps !== null && createTableProps !== void 0 && createTableProps.colsCount ? createTableProps === null || createTableProps === void 0 ? void 0 : createTableProps.colsCount : NESTED_TABLE_DEFAULT_COLS;
29
31
  }
30
- if (isTableScalingEnabled && isFullWidthModeEnabled && !isCommentEditor) {
31
- attrsOverrides.tableWidth = _consts.TABLE_MAX_WIDTH;
32
+ if (isTableScalingEnabled && !isCommentEditor) {
33
+ if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && isMaxWidthModeEnabled) {
34
+ attrsOverrides.tableWidth = _consts.TABLE_MAX_WIDTH;
35
+ } else if (isFullWidthModeEnabled) {
36
+ attrsOverrides.tableWidth = _consts.TABLE_FULL_WIDTH;
37
+ }
32
38
  }
33
- if (isTableAlignmentEnabled && (isFullWidthModeEnabled || isCommentEditor)) {
39
+ if (isTableAlignmentEnabled && (isFullWidthModeEnabled || (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && isMaxWidthModeEnabled || isCommentEditor)) {
34
40
  attrsOverrides.layout = 'align-start';
35
41
  }
36
42
  if (isCommentEditor && isTableResizingEnabled || isChromelessEditor) {
@@ -8,6 +8,7 @@ exports.findClosestSnap = exports.defaultTablePreserveSnappingWidths = exports.d
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _guideline = require("@atlaskit/editor-common/guideline");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
13
  var numberOfLanesInDefaultLayoutWidth = 12;
13
14
  var calculateSubSnappingWidths = function calculateSubSnappingWidths(totalLanes, totalWidth) {
@@ -19,8 +20,8 @@ var calculateDefaultSnappings = exports.calculateDefaultSnappings = function cal
19
20
  var lengthOffset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
20
21
  return [].concat((0, _toConsumableArray2.default)(calculateSubSnappingWidths(numberOfLanesInDefaultLayoutWidth, _editorSharedStyles.akEditorDefaultLayoutWidth + lengthOffset)), [_editorSharedStyles.akEditorDefaultLayoutWidth + lengthOffset, _editorSharedStyles.akEditorCalculatedWideLayoutWidth + lengthOffset, _editorSharedStyles.akEditorFullWidthLayoutWidth + lengthOffset]);
21
22
  };
22
- var getPadding = function getPadding(editorContainerWith) {
23
- return editorContainerWith <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
23
+ var getPadding = function getPadding(editorContainerWidth) {
24
+ return editorContainerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
24
25
  exposure: true
25
26
  }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
26
27
  };
@@ -28,14 +29,18 @@ var getPadding = function getPadding(editorContainerWith) {
28
29
  // FF TablePreserve for calculateDefaultSnappings
29
30
  var calculateDefaultTablePreserveSnappings = exports.calculateDefaultTablePreserveSnappings = function calculateDefaultTablePreserveSnappings() {
30
31
  var lengthOffset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
31
- var editorContainerWith = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _editorSharedStyles.akEditorFullWidthLayoutWidth;
32
+ var editorContainerWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _editorSharedStyles.akEditorFullWidthLayoutWidth;
32
33
  var exclude = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
33
34
  innerGuidelines: false,
34
35
  breakoutPoints: false
35
36
  };
36
- var padding = getPadding(editorContainerWith);
37
- var dynamicFullWidthLine = editorContainerWith - padding * 2 >= _editorSharedStyles.akEditorFullWidthLayoutWidth ? _editorSharedStyles.akEditorFullWidthLayoutWidth : editorContainerWith - padding * 2;
37
+ var padding = getPadding(editorContainerWidth);
38
+ var dynamicFullWidthLine = editorContainerWidth - padding * 2 >= _editorSharedStyles.akEditorFullWidthLayoutWidth ? _editorSharedStyles.akEditorFullWidthLayoutWidth : editorContainerWidth - padding * 2;
39
+ var dynamicMaxWidthLine = editorContainerWidth - padding * 2 >= _editorSharedStyles.akEditorMaxWidthLayoutWidth ? _editorSharedStyles.akEditorMaxWidthLayoutWidth : editorContainerWidth - padding * 2;
38
40
  var guides = [dynamicFullWidthLine - lengthOffset];
41
+ if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
42
+ guides.push(dynamicMaxWidthLine - lengthOffset);
43
+ }
39
44
  if (!exclude.breakoutPoints) {
40
45
  guides.unshift(_editorSharedStyles.akEditorDefaultLayoutWidth + lengthOffset, _editorSharedStyles.akEditorCalculatedWideLayoutWidth + lengthOffset);
41
46
  }
@@ -105,6 +105,8 @@ var tablePlugin = function tablePlugin(_ref) {
105
105
  var sharedStateInternal = {
106
106
  isFullWidthModeEnabled: !!(options !== null && options !== void 0 && options.fullWidthEnabled),
107
107
  wasFullWidthModeEnabled: !!(options !== null && options !== void 0 && options.wasFullWidthEnabled),
108
+ isMaxWidthModeEnabled: !!(options !== null && options !== void 0 && options.maxWidthEnabled),
109
+ wasMaxWidthModeEnabled: !!(options !== null && options !== void 0 && options.wasMaxWidthEnabled),
108
110
  isHeaderRowEnabled: tablePluginState.isHeaderRowEnabled,
109
111
  isHeaderColumnEnabled: tablePluginState.isHeaderColumnEnabled,
110
112
  ordering: tablePluginState.ordering,
@@ -150,6 +152,7 @@ var tablePlugin = function tablePlugin(_ref) {
150
152
  isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
151
153
  isTableAlignmentEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableAlignment,
152
154
  isFullWidthModeEnabled: options === null || options === void 0 ? void 0 : options.fullWidthEnabled,
155
+ isMaxWidthModeEnabled: options === null || options === void 0 ? void 0 : options.maxWidthEnabled,
153
156
  isCommentEditor: options === null || options === void 0 ? void 0 : options.isCommentEditor,
154
157
  isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor,
155
158
  isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing
@@ -160,6 +163,7 @@ var tablePlugin = function tablePlugin(_ref) {
160
163
  isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
161
164
  isTableAlignmentEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableAlignment,
162
165
  isFullWidthModeEnabled: options === null || options === void 0 ? void 0 : options.fullWidthEnabled,
166
+ isMaxWidthModeEnabled: options === null || options === void 0 ? void 0 : options.maxWidthEnabled,
163
167
  isCommentEditor: options === null || options === void 0 ? void 0 : options.isCommentEditor,
164
168
  isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor,
165
169
  isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing
@@ -187,6 +191,7 @@ var tablePlugin = function tablePlugin(_ref) {
187
191
  isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
188
192
  isTableAlignmentEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableAlignment,
189
193
  isFullWidthModeEnabled: options === null || options === void 0 ? void 0 : options.fullWidthEnabled,
194
+ isMaxWidthModeEnabled: options === null || options === void 0 ? void 0 : options.maxWidthEnabled,
190
195
  isCommentEditor: options === null || options === void 0 ? void 0 : options.isCommentEditor,
191
196
  isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor,
192
197
  isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing,
@@ -384,10 +389,10 @@ var tablePlugin = function tablePlugin(_ref) {
384
389
  }, {
385
390
  name: 'tableWidth',
386
391
  plugin: function plugin(_ref13) {
387
- var _options$fullWidthEna, _options$isTableScali, _options$tableOptions3, _options$isCommentEdi;
392
+ var _options$fullWidthEna, _options$maxWidthEnab, _options$isTableScali, _options$tableOptions3, _options$isCommentEdi;
388
393
  var dispatchAnalyticsEvent = _ref13.dispatchAnalyticsEvent,
389
394
  dispatch = _ref13.dispatch;
390
- return options !== null && options !== void 0 && options.tableOptions.allowTableResizing ? (0, _tableWidth.createPlugin)(dispatch, dispatchAnalyticsEvent, (_options$fullWidthEna = options.fullWidthEnabled) !== null && _options$fullWidthEna !== void 0 ? _options$fullWidthEna : false, (_options$isTableScali = options.isTableScalingEnabled) !== null && _options$isTableScali !== void 0 ? _options$isTableScali : false, (_options$tableOptions3 = options.tableOptions.allowTableResizing) !== null && _options$tableOptions3 !== void 0 ? _options$tableOptions3 : false, (_options$isCommentEdi = options.isCommentEditor) !== null && _options$isCommentEdi !== void 0 ? _options$isCommentEdi : false) : undefined;
395
+ return options !== null && options !== void 0 && options.tableOptions.allowTableResizing ? (0, _tableWidth.createPlugin)(dispatch, dispatchAnalyticsEvent, (_options$fullWidthEna = options.fullWidthEnabled) !== null && _options$fullWidthEna !== void 0 ? _options$fullWidthEna : false, (_options$maxWidthEnab = options.maxWidthEnabled) !== null && _options$maxWidthEnab !== void 0 ? _options$maxWidthEnab : false, (_options$isTableScali = options.isTableScalingEnabled) !== null && _options$isTableScali !== void 0 ? _options$isTableScali : false, (_options$tableOptions3 = options.tableOptions.allowTableResizing) !== null && _options$tableOptions3 !== void 0 ? _options$tableOptions3 : false, (_options$isCommentEdi = options.isCommentEditor) !== null && _options$isCommentEdi !== void 0 ? _options$isCommentEdi : false) : undefined;
391
396
  }
392
397
  }, {
393
398
  name: 'tableWidthInCommentFix',
@@ -539,6 +544,7 @@ var tablePlugin = function tablePlugin(_ref) {
539
544
  isTableScalingEnabled: options === null || options === void 0 ? void 0 : options.isTableScalingEnabled,
540
545
  isTableAlignmentEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableAlignment,
541
546
  isFullWidthModeEnabled: tableState === null || tableState === void 0 ? void 0 : tableState.isFullWidthModeEnabled,
547
+ isMaxWidthModeEnabled: tableState === null || tableState === void 0 ? void 0 : tableState.isMaxWidthModeEnabled,
542
548
  isCommentEditor: options === null || options === void 0 ? void 0 : options.isCommentEditor,
543
549
  isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor,
544
550
  isTableResizingEnabled: options === null || options === void 0 ? void 0 : options.tableOptions.allowTableResizing
@@ -168,6 +168,7 @@ var TableCssClassName = exports.TableCssClassName = _objectSpread(_objectSpread(
168
168
  WITH_LAST_ROW_INSERT_LINE: "".concat(_adfSchema.tablePrefixSelector, "-last-row-insert-line"),
169
169
  WITH_LAST_ROW_INSERT_LINE_INACTIVE: "".concat(_adfSchema.tablePrefixSelector, "-last-row-insert-line__inactive"),
170
170
  NATIVE_STICKY: "".concat(_adfSchema.tablePrefixSelector, "-row-native-sticky"),
171
+ NATIVE_STICKY_ACTIVE: "".concat(_adfSchema.tablePrefixSelector, "-row-native-sticky-active"),
171
172
  NO_OVERFLOW: "".concat(_adfSchema.tablePrefixSelector, "-no-overflow")
172
173
  });
173
174
  var ShadowEvent = exports.ShadowEvent = /*#__PURE__*/function (ShadowEvent) {