@atlaskit/editor-plugin-table 34.0.13 → 35.0.0
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
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 35.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 34.0.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`8d075961b3c2c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8d075961b3c2c) -
|
|
14
|
+
Prevent automatic table width commits in view mode behind
|
|
15
|
+
`platform_editor_table_view_mode_scaling_fix`.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 34.0.13
|
|
4
19
|
|
|
5
20
|
### 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
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.0",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"@atlaskit/button": "^25.4.0",
|
|
25
25
|
"@atlaskit/custom-steps": "^1.1.0",
|
|
26
26
|
"@atlaskit/editor-palette": "^3.5.0",
|
|
27
|
-
"@atlaskit/editor-plugin-accessibility-utils": "^
|
|
28
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
29
|
-
"@atlaskit/editor-plugin-batch-attribute-updates": "^
|
|
30
|
-
"@atlaskit/editor-plugin-content-insertion": "^
|
|
31
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
32
|
-
"@atlaskit/editor-plugin-extension": "
|
|
33
|
-
"@atlaskit/editor-plugin-guideline": "^
|
|
34
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
35
|
-
"@atlaskit/editor-plugin-limited-mode": "^
|
|
36
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
37
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
38
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^
|
|
39
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
40
|
-
"@atlaskit/editor-plugin-width": "^
|
|
27
|
+
"@atlaskit/editor-plugin-accessibility-utils": "^23.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-analytics": "^23.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-batch-attribute-updates": "^23.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-content-insertion": "^23.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^25.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-extension": "26.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-guideline": "^23.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-interaction": "^37.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-limited-mode": "^20.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-selection": "^23.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-toolbar": "^20.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-ui-control-registry": "^17.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-user-intent": "^21.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-width": "^24.0.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.2.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^3.0.0",
|
|
55
55
|
"@atlaskit/primitives": "^22.5.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^219.0.0",
|
|
57
57
|
"@atlaskit/toggle": "^17.3.0",
|
|
58
58
|
"@atlaskit/tokens": "^20.1.0",
|
|
59
59
|
"@atlaskit/tooltip": "^24.3.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uuid": "^11.1.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@atlaskit/editor-common": "^
|
|
71
|
+
"@atlaskit/editor-common": "^127.0.0",
|
|
72
72
|
"react": "^18.2.0 || ^19.2.0",
|
|
73
73
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
74
74
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"platform_editor_table_menu_updates_patch_1": {
|
|
100
100
|
"type": "boolean"
|
|
101
101
|
},
|
|
102
|
+
"platform_editor_table_view_mode_scaling_fix": {
|
|
103
|
+
"type": "boolean"
|
|
104
|
+
},
|
|
102
105
|
"platform_editor_table_cell_menu_update": {
|
|
103
106
|
"type": "boolean"
|
|
104
107
|
},
|