@atlaskit/editor-plugin-table 15.5.4 → 15.5.5
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
|
+
## 15.5.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f5fb826bac3cd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f5fb826bac3cd) -
|
|
8
|
+
fix eslint disable in editor table plugin get cell position
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 15.5.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -169,30 +169,28 @@ var FloatingInsertButton = exports.FloatingInsertButton = /*#__PURE__*/function
|
|
|
169
169
|
var _this$props2 = this.props,
|
|
170
170
|
insertColumnButtonIndex = _this$props2.insertColumnButtonIndex,
|
|
171
171
|
insertRowButtonIndex = _this$props2.insertRowButtonIndex;
|
|
172
|
-
// Ignored via go/ees005
|
|
173
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
174
172
|
var tableMap = _tableMap.TableMap.get(tableNode);
|
|
175
173
|
if (type === 'column') {
|
|
176
|
-
//
|
|
177
|
-
//
|
|
174
|
+
// This condition is to make typescript happy.
|
|
175
|
+
// Previously insertColumnButtonIndex - 1 would produce NaN and return null anyway.
|
|
176
|
+
if (insertColumnButtonIndex === undefined) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
178
179
|
var columnIndex = insertColumnButtonIndex === 0 ? 0 : insertColumnButtonIndex - 1;
|
|
179
180
|
if (columnIndex > tableMap.width - 1) {
|
|
180
181
|
return null;
|
|
181
182
|
}
|
|
182
|
-
|
|
183
|
-
// Ignored via go/ees005
|
|
184
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
185
183
|
return tableMap.positionAt(0, columnIndex, tableNode);
|
|
186
184
|
} else {
|
|
187
|
-
//
|
|
188
|
-
//
|
|
185
|
+
// This condition is to make typescript happy.
|
|
186
|
+
// Previously insertRowButtonIndex - 1 would produce NaN and return null anyway.
|
|
187
|
+
if (insertRowButtonIndex === undefined) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
189
190
|
var rowIndex = insertRowButtonIndex === 0 ? 0 : insertRowButtonIndex - 1;
|
|
190
191
|
if (rowIndex > tableMap.height - 1) {
|
|
191
192
|
return null;
|
|
192
193
|
}
|
|
193
|
-
|
|
194
|
-
// Ignored via go/ees005
|
|
195
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
196
194
|
return tableMap.positionAt(rowIndex, 0, tableNode);
|
|
197
195
|
}
|
|
198
196
|
}
|
|
@@ -151,30 +151,28 @@ export class FloatingInsertButton extends React.Component {
|
|
|
151
151
|
insertColumnButtonIndex,
|
|
152
152
|
insertRowButtonIndex
|
|
153
153
|
} = this.props;
|
|
154
|
-
// Ignored via go/ees005
|
|
155
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
156
154
|
const tableMap = TableMap.get(tableNode);
|
|
157
155
|
if (type === 'column') {
|
|
158
|
-
//
|
|
159
|
-
//
|
|
156
|
+
// This condition is to make typescript happy.
|
|
157
|
+
// Previously insertColumnButtonIndex - 1 would produce NaN and return null anyway.
|
|
158
|
+
if (insertColumnButtonIndex === undefined) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
160
161
|
const columnIndex = insertColumnButtonIndex === 0 ? 0 : insertColumnButtonIndex - 1;
|
|
161
162
|
if (columnIndex > tableMap.width - 1) {
|
|
162
163
|
return null;
|
|
163
164
|
}
|
|
164
|
-
|
|
165
|
-
// Ignored via go/ees005
|
|
166
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
167
165
|
return tableMap.positionAt(0, columnIndex, tableNode);
|
|
168
166
|
} else {
|
|
169
|
-
//
|
|
170
|
-
//
|
|
167
|
+
// This condition is to make typescript happy.
|
|
168
|
+
// Previously insertRowButtonIndex - 1 would produce NaN and return null anyway.
|
|
169
|
+
if (insertRowButtonIndex === undefined) {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
171
172
|
const rowIndex = insertRowButtonIndex === 0 ? 0 : insertRowButtonIndex - 1;
|
|
172
173
|
if (rowIndex > tableMap.height - 1) {
|
|
173
174
|
return null;
|
|
174
175
|
}
|
|
175
|
-
|
|
176
|
-
// Ignored via go/ees005
|
|
177
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
178
176
|
return tableMap.positionAt(rowIndex, 0, tableNode);
|
|
179
177
|
}
|
|
180
178
|
}
|
|
@@ -160,30 +160,28 @@ export var FloatingInsertButton = /*#__PURE__*/function (_React$Component) {
|
|
|
160
160
|
var _this$props2 = this.props,
|
|
161
161
|
insertColumnButtonIndex = _this$props2.insertColumnButtonIndex,
|
|
162
162
|
insertRowButtonIndex = _this$props2.insertRowButtonIndex;
|
|
163
|
-
// Ignored via go/ees005
|
|
164
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
165
163
|
var tableMap = TableMap.get(tableNode);
|
|
166
164
|
if (type === 'column') {
|
|
167
|
-
//
|
|
168
|
-
//
|
|
165
|
+
// This condition is to make typescript happy.
|
|
166
|
+
// Previously insertColumnButtonIndex - 1 would produce NaN and return null anyway.
|
|
167
|
+
if (insertColumnButtonIndex === undefined) {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
169
170
|
var columnIndex = insertColumnButtonIndex === 0 ? 0 : insertColumnButtonIndex - 1;
|
|
170
171
|
if (columnIndex > tableMap.width - 1) {
|
|
171
172
|
return null;
|
|
172
173
|
}
|
|
173
|
-
|
|
174
|
-
// Ignored via go/ees005
|
|
175
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
176
174
|
return tableMap.positionAt(0, columnIndex, tableNode);
|
|
177
175
|
} else {
|
|
178
|
-
//
|
|
179
|
-
//
|
|
176
|
+
// This condition is to make typescript happy.
|
|
177
|
+
// Previously insertRowButtonIndex - 1 would produce NaN and return null anyway.
|
|
178
|
+
if (insertRowButtonIndex === undefined) {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
180
181
|
var rowIndex = insertRowButtonIndex === 0 ? 0 : insertRowButtonIndex - 1;
|
|
181
182
|
if (rowIndex > tableMap.height - 1) {
|
|
182
183
|
return null;
|
|
183
184
|
}
|
|
184
|
-
|
|
185
|
-
// Ignored via go/ees005
|
|
186
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
187
185
|
return tableMap.positionAt(rowIndex, 0, tableNode);
|
|
188
186
|
}
|
|
189
187
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "15.5.
|
|
3
|
+
"version": "15.5.5",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
58
58
|
"@atlaskit/primitives": "^16.4.0",
|
|
59
59
|
"@atlaskit/theme": "^21.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^15.11.0",
|
|
61
61
|
"@atlaskit/toggle": "^15.2.0",
|
|
62
|
-
"@atlaskit/tokens": "^8.
|
|
62
|
+
"@atlaskit/tokens": "^8.5.0",
|
|
63
63
|
"@atlaskit/tooltip": "^20.11.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
65
65
|
"@emotion/react": "^11.7.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"uuid": "^3.1.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"@atlaskit/editor-common": "^110.
|
|
73
|
+
"@atlaskit/editor-common": "^110.44.0",
|
|
74
74
|
"react": "^18.2.0",
|
|
75
75
|
"react-dom": "^18.2.0",
|
|
76
76
|
"react-intl-next": "npm:react-intl@^5.18.1"
|