@atlaskit/editor-plugin-table 34.0.12 → 34.0.14
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/nodeviews/TableComponent.js +7 -2
- package/dist/cjs/nodeviews/TableRow.js +0 -26
- package/dist/cjs/nodeviews/TableRowNativeStickyWithFallback.js +0 -24
- package/dist/es2019/nodeviews/TableComponent.js +7 -2
- package/dist/es2019/nodeviews/TableRow.js +0 -26
- package/dist/es2019/nodeviews/TableRowNativeStickyWithFallback.js +0 -24
- package/dist/esm/nodeviews/TableComponent.js +7 -2
- package/dist/esm/nodeviews/TableRow.js +0 -26
- package/dist/esm/nodeviews/TableRowNativeStickyWithFallback.js +0 -24
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 34.0.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8d075961b3c2c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d075961b3c2c) -
|
|
8
|
+
Prevent automatic table width commits in view mode behind
|
|
9
|
+
`platform_editor_table_view_mode_scaling_fix`.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 34.0.13
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`2fa5b04eb1bd2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2fa5b04eb1bd2) -
|
|
17
|
+
Clean up feature gate `platform_editor_table_flicker_issue`
|
|
18
|
+
|
|
3
19
|
## 34.0.12
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -27,6 +27,7 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
27
27
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
28
28
|
var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
29
29
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
30
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
30
31
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/utils/combine");
|
|
31
32
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
32
33
|
var _commands = require("../pm-plugins/commands");
|
|
@@ -232,7 +233,11 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
232
233
|
});
|
|
233
234
|
// Function gets called when table is nested.
|
|
234
235
|
(0, _defineProperty2.default)(_this, "scaleTable", function (scaleOptions) {
|
|
236
|
+
var _this$props$pluginInj;
|
|
235
237
|
var isUserTriggered = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
238
|
+
if ((0, _fg.fg)('platform_editor_table_view_mode_scaling_fix') && ((_this$props$pluginInj = _this.props.pluginInjectionApi) === null || _this$props$pluginInj === void 0 || (_this$props$pluginInj = _this$props$pluginInj.editorViewMode) === null || _this$props$pluginInj === void 0 || (_this$props$pluginInj = _this$props$pluginInj.sharedState.currentState()) === null || _this$props$pluginInj === void 0 ? void 0 : _this$props$pluginInj.mode) === 'view') {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
236
241
|
var _this$props2 = _this.props,
|
|
237
242
|
view = _this$props2.view,
|
|
238
243
|
getNode = _this$props2.getNode,
|
|
@@ -756,8 +761,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
756
761
|
var isNoOfColumnsChanged = (0, _nodes.tablesHaveDifferentNoOfColumns)(currentTable, previousTable);
|
|
757
762
|
var isNoOfRowsChanged = (0, _nodes.tablesHaveDifferentNoOfRows)(currentTable, previousTable);
|
|
758
763
|
if (isNoOfColumnsChanged || isNoOfRowsChanged) {
|
|
759
|
-
var _this$props$
|
|
760
|
-
(_this$props$
|
|
764
|
+
var _this$props$pluginInj2;
|
|
765
|
+
(_this$props$pluginInj2 = this.props.pluginInjectionApi) === null || _this$props$pluginInj2 === void 0 || (_this$props$pluginInj2 = _this$props$pluginInj2.accessibilityUtils) === null || _this$props$pluginInj2 === void 0 || _this$props$pluginInj2.actions.ariaNotify((0, _table2.getAssistiveMessage)(previousTable, currentTable, this.props.intl), {
|
|
761
766
|
priority: 'important'
|
|
762
767
|
});
|
|
763
768
|
}
|
|
@@ -18,7 +18,6 @@ var _nodeVisibility = require("@atlaskit/editor-common/node-visibility");
|
|
|
18
18
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
19
19
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
20
20
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
21
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
22
21
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
22
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
24
23
|
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
@@ -616,36 +615,11 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
616
615
|
var wrapper = tree.wrapper;
|
|
617
616
|
var tableContainer = wrapper.parentElement;
|
|
618
617
|
var tableContentWrapper = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.parentElement;
|
|
619
|
-
var parentContainer = tableContentWrapper && tableContentWrapper.parentElement;
|
|
620
|
-
var isTableInsideLayout = parentContainer && parentContainer.getAttribute('data-layout-content');
|
|
621
618
|
if (tableContentWrapper) {
|
|
622
619
|
if (isCurrentTableSelected) {
|
|
623
620
|
this.colControlsOffset = _consts.tableControlsSpacing;
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
627
|
-
* and selection moves in/out of table.
|
|
628
|
-
*/
|
|
629
|
-
if (!(0, _fg.fg)('platform_editor_table_flicker_issue')) {
|
|
630
|
-
// move table a little out of the way
|
|
631
|
-
// to provide spacing for table controls
|
|
632
|
-
if (isTableInsideLayout) {
|
|
633
|
-
tableContentWrapper.style.paddingLeft = '11px';
|
|
634
|
-
tableContentWrapper.style.marginLeft = '-11px';
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
621
|
} else {
|
|
638
622
|
this.colControlsOffset = 0;
|
|
639
|
-
/**
|
|
640
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
641
|
-
* and selection moves in/out of table.
|
|
642
|
-
*/
|
|
643
|
-
if (!(0, _fg.fg)('platform_editor_table_flicker_issue')) {
|
|
644
|
-
if (isTableInsideLayout) {
|
|
645
|
-
tableContentWrapper.style.removeProperty('padding-left');
|
|
646
|
-
tableContentWrapper.style.removeProperty('margin-left');
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
623
|
}
|
|
650
624
|
}
|
|
651
625
|
|
|
@@ -20,7 +20,6 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
20
20
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
21
21
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
22
22
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
24
23
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
24
|
var _editorContentAreaHeight = require("../pm-plugins/editor-content-area-height");
|
|
26
25
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
@@ -853,34 +852,11 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
|
|
|
853
852
|
var wrapper = tree.wrapper;
|
|
854
853
|
var tableContainer = wrapper.parentElement;
|
|
855
854
|
var tableContentWrapper = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.parentElement;
|
|
856
|
-
var parentContainer = tableContentWrapper && tableContentWrapper.parentElement;
|
|
857
|
-
var isTableInsideLayout = parentContainer && parentContainer.getAttribute('data-layout-content');
|
|
858
855
|
if (tableContentWrapper) {
|
|
859
856
|
if (isCurrentTableSelected) {
|
|
860
857
|
this.colControlsOffset = _consts.tableControlsSpacing;
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
864
|
-
* and selection moves in/out of table.
|
|
865
|
-
*/
|
|
866
|
-
if (!(0, _fg.fg)('platform_editor_table_flicker_issue')) {
|
|
867
|
-
// move table a little out of the way
|
|
868
|
-
// to provide spacing for table controls
|
|
869
|
-
if (isTableInsideLayout) {
|
|
870
|
-
tableContentWrapper.style.paddingLeft = '11px';
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
858
|
} else {
|
|
874
859
|
this.colControlsOffset = 0;
|
|
875
|
-
/**
|
|
876
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
877
|
-
* and selection moves in/out of table.
|
|
878
|
-
*/
|
|
879
|
-
if (!(0, _fg.fg)('platform_editor_table_flicker_issue')) {
|
|
880
|
-
if (isTableInsideLayout) {
|
|
881
|
-
tableContentWrapper.style.removeProperty('padding-left');
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
860
|
}
|
|
885
861
|
}
|
|
886
862
|
|
|
@@ -14,6 +14,7 @@ import { isValidPosition } from '@atlaskit/editor-common/utils';
|
|
|
14
14
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
16
16
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
18
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
18
19
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
20
|
import { autoSizeTable, clearHoverSelection, setTableRef } from '../pm-plugins/commands';
|
|
@@ -212,6 +213,10 @@ class TableComponent extends React.Component {
|
|
|
212
213
|
});
|
|
213
214
|
// Function gets called when table is nested.
|
|
214
215
|
_defineProperty(this, "scaleTable", (scaleOptions, isUserTriggered = false) => {
|
|
216
|
+
var _this$props$pluginInj, _this$props$pluginInj2, _this$props$pluginInj3;
|
|
217
|
+
if (fg('platform_editor_table_view_mode_scaling_fix') && ((_this$props$pluginInj = this.props.pluginInjectionApi) === null || _this$props$pluginInj === void 0 ? void 0 : (_this$props$pluginInj2 = _this$props$pluginInj.editorViewMode) === null || _this$props$pluginInj2 === void 0 ? void 0 : (_this$props$pluginInj3 = _this$props$pluginInj2.sharedState.currentState()) === null || _this$props$pluginInj3 === void 0 ? void 0 : _this$props$pluginInj3.mode) === 'view') {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
215
220
|
const {
|
|
216
221
|
view,
|
|
217
222
|
getNode,
|
|
@@ -717,8 +722,8 @@ class TableComponent extends React.Component {
|
|
|
717
722
|
const isNoOfColumnsChanged = tablesHaveDifferentNoOfColumns(currentTable, previousTable);
|
|
718
723
|
const isNoOfRowsChanged = tablesHaveDifferentNoOfRows(currentTable, previousTable);
|
|
719
724
|
if (isNoOfColumnsChanged || isNoOfRowsChanged) {
|
|
720
|
-
var _this$props$
|
|
721
|
-
(_this$props$
|
|
725
|
+
var _this$props$pluginInj4, _this$props$pluginInj5;
|
|
726
|
+
(_this$props$pluginInj4 = this.props.pluginInjectionApi) === null || _this$props$pluginInj4 === void 0 ? void 0 : (_this$props$pluginInj5 = _this$props$pluginInj4.accessibilityUtils) === null || _this$props$pluginInj5 === void 0 ? void 0 : _this$props$pluginInj5.actions.ariaNotify(getAssistiveMessage(previousTable, currentTable, this.props.intl), {
|
|
722
727
|
priority: 'important'
|
|
723
728
|
});
|
|
724
729
|
}
|
|
@@ -6,7 +6,6 @@ import { nodeVisibilityManager } from '@atlaskit/editor-common/node-visibility';
|
|
|
6
6
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
7
7
|
import { findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
12
11
|
import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
@@ -578,36 +577,11 @@ export default class TableRow extends TableNodeView {
|
|
|
578
577
|
} = tree;
|
|
579
578
|
const tableContainer = wrapper.parentElement;
|
|
580
579
|
const tableContentWrapper = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.parentElement;
|
|
581
|
-
const parentContainer = tableContentWrapper && tableContentWrapper.parentElement;
|
|
582
|
-
const isTableInsideLayout = parentContainer && parentContainer.getAttribute('data-layout-content');
|
|
583
580
|
if (tableContentWrapper) {
|
|
584
581
|
if (isCurrentTableSelected) {
|
|
585
582
|
this.colControlsOffset = tableControlsSpacing;
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
589
|
-
* and selection moves in/out of table.
|
|
590
|
-
*/
|
|
591
|
-
if (!fg('platform_editor_table_flicker_issue')) {
|
|
592
|
-
// move table a little out of the way
|
|
593
|
-
// to provide spacing for table controls
|
|
594
|
-
if (isTableInsideLayout) {
|
|
595
|
-
tableContentWrapper.style.paddingLeft = '11px';
|
|
596
|
-
tableContentWrapper.style.marginLeft = '-11px';
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
583
|
} else {
|
|
600
584
|
this.colControlsOffset = 0;
|
|
601
|
-
/**
|
|
602
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
603
|
-
* and selection moves in/out of table.
|
|
604
|
-
*/
|
|
605
|
-
if (!fg('platform_editor_table_flicker_issue')) {
|
|
606
|
-
if (isTableInsideLayout) {
|
|
607
|
-
tableContentWrapper.style.removeProperty('padding-left');
|
|
608
|
-
tableContentWrapper.style.removeProperty('margin-left');
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
585
|
}
|
|
612
586
|
}
|
|
613
587
|
|
|
@@ -8,7 +8,6 @@ import { tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
|
8
8
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import { findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
12
|
import { INITIAL_STATIC_VIEWPORT_HEIGHT } from '../pm-plugins/editor-content-area-height';
|
|
14
13
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -806,34 +805,11 @@ export default class TableRowNativeStickyWithFallback extends TableNodeView {
|
|
|
806
805
|
} = tree;
|
|
807
806
|
const tableContainer = wrapper.parentElement;
|
|
808
807
|
const tableContentWrapper = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.parentElement;
|
|
809
|
-
const parentContainer = tableContentWrapper && tableContentWrapper.parentElement;
|
|
810
|
-
const isTableInsideLayout = parentContainer && parentContainer.getAttribute('data-layout-content');
|
|
811
808
|
if (tableContentWrapper) {
|
|
812
809
|
if (isCurrentTableSelected) {
|
|
813
810
|
this.colControlsOffset = tableControlsSpacing;
|
|
814
|
-
|
|
815
|
-
/**
|
|
816
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
817
|
-
* and selection moves in/out of table.
|
|
818
|
-
*/
|
|
819
|
-
if (!fg('platform_editor_table_flicker_issue')) {
|
|
820
|
-
// move table a little out of the way
|
|
821
|
-
// to provide spacing for table controls
|
|
822
|
-
if (isTableInsideLayout) {
|
|
823
|
-
tableContentWrapper.style.paddingLeft = '11px';
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
811
|
} else {
|
|
827
812
|
this.colControlsOffset = 0;
|
|
828
|
-
/**
|
|
829
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
830
|
-
* and selection moves in/out of table.
|
|
831
|
-
*/
|
|
832
|
-
if (!fg('platform_editor_table_flicker_issue')) {
|
|
833
|
-
if (isTableInsideLayout) {
|
|
834
|
-
tableContentWrapper.style.removeProperty('padding-left');
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
813
|
}
|
|
838
814
|
}
|
|
839
815
|
|
|
@@ -27,6 +27,7 @@ import { isValidPosition } from '@atlaskit/editor-common/utils';
|
|
|
27
27
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
28
28
|
import { isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
29
29
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
30
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
30
31
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
31
32
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
32
33
|
import { autoSizeTable, clearHoverSelection, setTableRef } from '../pm-plugins/commands';
|
|
@@ -226,7 +227,11 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
226
227
|
});
|
|
227
228
|
// Function gets called when table is nested.
|
|
228
229
|
_defineProperty(_this, "scaleTable", function (scaleOptions) {
|
|
230
|
+
var _this$props$pluginInj;
|
|
229
231
|
var isUserTriggered = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
232
|
+
if (fg('platform_editor_table_view_mode_scaling_fix') && ((_this$props$pluginInj = _this.props.pluginInjectionApi) === null || _this$props$pluginInj === void 0 || (_this$props$pluginInj = _this$props$pluginInj.editorViewMode) === null || _this$props$pluginInj === void 0 || (_this$props$pluginInj = _this$props$pluginInj.sharedState.currentState()) === null || _this$props$pluginInj === void 0 ? void 0 : _this$props$pluginInj.mode) === 'view') {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
230
235
|
var _this$props2 = _this.props,
|
|
231
236
|
view = _this$props2.view,
|
|
232
237
|
getNode = _this$props2.getNode,
|
|
@@ -750,8 +755,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
750
755
|
var isNoOfColumnsChanged = tablesHaveDifferentNoOfColumns(currentTable, previousTable);
|
|
751
756
|
var isNoOfRowsChanged = tablesHaveDifferentNoOfRows(currentTable, previousTable);
|
|
752
757
|
if (isNoOfColumnsChanged || isNoOfRowsChanged) {
|
|
753
|
-
var _this$props$
|
|
754
|
-
(_this$props$
|
|
758
|
+
var _this$props$pluginInj2;
|
|
759
|
+
(_this$props$pluginInj2 = this.props.pluginInjectionApi) === null || _this$props$pluginInj2 === void 0 || (_this$props$pluginInj2 = _this$props$pluginInj2.accessibilityUtils) === null || _this$props$pluginInj2 === void 0 || _this$props$pluginInj2.actions.ariaNotify(getAssistiveMessage(previousTable, currentTable, this.props.intl), {
|
|
755
760
|
priority: 'important'
|
|
756
761
|
});
|
|
757
762
|
}
|
|
@@ -13,7 +13,6 @@ import { nodeVisibilityManager } from '@atlaskit/editor-common/node-visibility';
|
|
|
13
13
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
14
14
|
import { findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
15
15
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
17
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
19
18
|
import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
@@ -609,36 +608,11 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
|
|
|
609
608
|
var wrapper = tree.wrapper;
|
|
610
609
|
var tableContainer = wrapper.parentElement;
|
|
611
610
|
var tableContentWrapper = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.parentElement;
|
|
612
|
-
var parentContainer = tableContentWrapper && tableContentWrapper.parentElement;
|
|
613
|
-
var isTableInsideLayout = parentContainer && parentContainer.getAttribute('data-layout-content');
|
|
614
611
|
if (tableContentWrapper) {
|
|
615
612
|
if (isCurrentTableSelected) {
|
|
616
613
|
this.colControlsOffset = tableControlsSpacing;
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
620
|
-
* and selection moves in/out of table.
|
|
621
|
-
*/
|
|
622
|
-
if (!fg('platform_editor_table_flicker_issue')) {
|
|
623
|
-
// move table a little out of the way
|
|
624
|
-
// to provide spacing for table controls
|
|
625
|
-
if (isTableInsideLayout) {
|
|
626
|
-
tableContentWrapper.style.paddingLeft = '11px';
|
|
627
|
-
tableContentWrapper.style.marginLeft = '-11px';
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
614
|
} else {
|
|
631
615
|
this.colControlsOffset = 0;
|
|
632
|
-
/**
|
|
633
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
634
|
-
* and selection moves in/out of table.
|
|
635
|
-
*/
|
|
636
|
-
if (!fg('platform_editor_table_flicker_issue')) {
|
|
637
|
-
if (isTableInsideLayout) {
|
|
638
|
-
tableContentWrapper.style.removeProperty('padding-left');
|
|
639
|
-
tableContentWrapper.style.removeProperty('margin-left');
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
616
|
}
|
|
643
617
|
}
|
|
644
618
|
|
|
@@ -15,7 +15,6 @@ import { tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
|
15
15
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
16
16
|
import { findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
17
17
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
18
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
19
|
import { INITIAL_STATIC_VIEWPORT_HEIGHT } from '../pm-plugins/editor-content-area-height';
|
|
21
20
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -846,34 +845,11 @@ var TableRowNativeStickyWithFallback = /*#__PURE__*/function (_TableNodeView) {
|
|
|
846
845
|
var wrapper = tree.wrapper;
|
|
847
846
|
var tableContainer = wrapper.parentElement;
|
|
848
847
|
var tableContentWrapper = tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.parentElement;
|
|
849
|
-
var parentContainer = tableContentWrapper && tableContentWrapper.parentElement;
|
|
850
|
-
var isTableInsideLayout = parentContainer && parentContainer.getAttribute('data-layout-content');
|
|
851
848
|
if (tableContentWrapper) {
|
|
852
849
|
if (isCurrentTableSelected) {
|
|
853
850
|
this.colControlsOffset = tableControlsSpacing;
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
857
|
-
* and selection moves in/out of table.
|
|
858
|
-
*/
|
|
859
|
-
if (!fg('platform_editor_table_flicker_issue')) {
|
|
860
|
-
// move table a little out of the way
|
|
861
|
-
// to provide spacing for table controls
|
|
862
|
-
if (isTableInsideLayout) {
|
|
863
|
-
tableContentWrapper.style.paddingLeft = '11px';
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
851
|
} else {
|
|
867
852
|
this.colControlsOffset = 0;
|
|
868
|
-
/**
|
|
869
|
-
* Adding padding left causes flicker when table is inside layout column
|
|
870
|
-
* and selection moves in/out of table.
|
|
871
|
-
*/
|
|
872
|
-
if (!fg('platform_editor_table_flicker_issue')) {
|
|
873
|
-
if (isTableInsideLayout) {
|
|
874
|
-
tableContentWrapper.style.removeProperty('padding-left');
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
853
|
}
|
|
878
854
|
}
|
|
879
855
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "34.0.
|
|
3
|
+
"version": "34.0.14",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -99,13 +99,13 @@
|
|
|
99
99
|
"platform_editor_table_menu_updates_patch_1": {
|
|
100
100
|
"type": "boolean"
|
|
101
101
|
},
|
|
102
|
-
"
|
|
102
|
+
"platform_editor_table_view_mode_scaling_fix": {
|
|
103
103
|
"type": "boolean"
|
|
104
104
|
},
|
|
105
|
-
"
|
|
105
|
+
"platform_editor_table_cell_menu_update": {
|
|
106
106
|
"type": "boolean"
|
|
107
107
|
},
|
|
108
|
-
"
|
|
108
|
+
"platform-dst-top-layer-tooltip": {
|
|
109
109
|
"type": "boolean"
|
|
110
110
|
}
|
|
111
111
|
},
|