@atlaskit/editor-plugin-table 42.0.2 → 42.0.3
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 42.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4cdaf1f75d6ad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4cdaf1f75d6ad) -
|
|
8
|
+
Use const for stable local bindings
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 42.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -75,13 +75,11 @@ var toggleSort = exports.toggleSort = function toggleSort(view, event, pluginSta
|
|
|
75
75
|
if (!tableId || !tableNode || (tableNode === null || tableNode === void 0 || (_tableNode$type = tableNode.type) === null || _tableNode$type === void 0 ? void 0 : _tableNode$type.name) !== 'table') {
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
// Ignored via go/ees005
|
|
80
|
-
// eslint-disable-next-line prefer-const
|
|
81
78
|
var _ref = (pluginState === null || pluginState === void 0 ? void 0 : pluginState[tableId]) || {},
|
|
82
79
|
index = _ref.index,
|
|
83
|
-
|
|
80
|
+
initialDirection = _ref.direction,
|
|
84
81
|
oldOrder = _ref.order;
|
|
82
|
+
var direction = initialDirection;
|
|
85
83
|
|
|
86
84
|
// Unsort if there was already a sort
|
|
87
85
|
if (direction !== _types.SortOrder.NO_ORDER && oldOrder !== undefined) {
|
|
@@ -60,14 +60,12 @@ export const toggleSort = (view, event, pluginState) => {
|
|
|
60
60
|
if (!tableId || !tableNode || (tableNode === null || tableNode === void 0 ? void 0 : (_tableNode$type = tableNode.type) === null || _tableNode$type === void 0 ? void 0 : _tableNode$type.name) !== 'table') {
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
// Ignored via go/ees005
|
|
65
|
-
// eslint-disable-next-line prefer-const
|
|
66
|
-
let {
|
|
63
|
+
const {
|
|
67
64
|
index,
|
|
68
|
-
direction,
|
|
65
|
+
direction: initialDirection,
|
|
69
66
|
order: oldOrder
|
|
70
67
|
} = (pluginState === null || pluginState === void 0 ? void 0 : pluginState[tableId]) || {};
|
|
68
|
+
let direction = initialDirection;
|
|
71
69
|
|
|
72
70
|
// Unsort if there was already a sort
|
|
73
71
|
if (direction !== SortOrder.NO_ORDER && oldOrder !== undefined) {
|
|
@@ -68,13 +68,11 @@ export var toggleSort = function toggleSort(view, event, pluginState) {
|
|
|
68
68
|
if (!tableId || !tableNode || (tableNode === null || tableNode === void 0 || (_tableNode$type = tableNode.type) === null || _tableNode$type === void 0 ? void 0 : _tableNode$type.name) !== 'table') {
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
// Ignored via go/ees005
|
|
73
|
-
// eslint-disable-next-line prefer-const
|
|
74
71
|
var _ref = (pluginState === null || pluginState === void 0 ? void 0 : pluginState[tableId]) || {},
|
|
75
72
|
index = _ref.index,
|
|
76
|
-
|
|
73
|
+
initialDirection = _ref.direction,
|
|
77
74
|
oldOrder = _ref.order;
|
|
75
|
+
var direction = initialDirection;
|
|
78
76
|
|
|
79
77
|
// Unsort if there was already a sort
|
|
80
78
|
if (direction !== SortOrder.NO_ORDER && oldOrder !== undefined) {
|