@atlaskit/editor-tables 2.9.16 → 2.9.18

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,18 @@
1
1
  # @atlaskit/editor-tables
2
2
 
3
+ ## 2.9.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.9.17
10
+
11
+ ### Patch Changes
12
+
13
+ - [`c60de47015108`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c60de47015108) -
14
+ Fix types for editor related dependencies
15
+
3
16
  ## 2.9.16
4
17
 
5
18
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  "compilerOptions": {
4
4
  "declaration": true,
5
5
  "target": "es5",
6
- "outDir": "../../../../../tsDist/@atlaskit__editor-tables/app",
6
+ "outDir": "../../../../../jira/tsDist/@atlaskit__editor-tables/app",
7
7
  "rootDir": "../",
8
8
  "composite": true
9
9
  },
@@ -140,7 +140,8 @@ var CellSelection = exports.CellSelection = /*#__PURE__*/function (_Selection) {
140
140
  rowContent.push(cell);
141
141
  }
142
142
  }
143
- rows.push(table.child(row).copy(_model.Fragment.from(rowContent)));
143
+ var rowNode = table.child(row).copy(_model.Fragment.from(rowContent));
144
+ rows.push(rowNode);
144
145
  }
145
146
  var fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
146
147
  return new _model.Slice(_model.Fragment.from(fragment), 1, 1);
@@ -62,7 +62,7 @@ var cloneRowAt = exports.cloneRowAt = function cloneRowAt(rowIndex) {
62
62
  if (rowWidth < map.width) {
63
63
  var rowSpanCells = [];
64
64
  var _loop = function _loop(_i) {
65
- var foundCells = filterCellsInRow(_i, function (cell, tr) {
65
+ var foundCells = filterCellsInRow(_i, function (cell, _tr) {
66
66
  var rowspan = cell.node.attrs.rowspan;
67
67
  var spanRange = _i + rowspan;
68
68
  return rowspan > 1 && spanRange > rowIndex;
@@ -118,7 +118,7 @@ var cloneRow = exports.cloneRow = function cloneRow(state, originRowIndex, targe
118
118
  */
119
119
  function normalizeRowNode(rowNode, rowHeaderEnabled, columnHeaderEnabled, types) {
120
120
  var content = [];
121
- rowNode.forEach(function (node, offset, index) {
121
+ rowNode.forEach(function (node, _offset, index) {
122
122
  var newTargetType = rowHeaderEnabled || columnHeaderEnabled && index === 0 ? types.header_cell : types.cell;
123
123
  content.push(node.type !== newTargetType ? newTargetType.create(node.attrs, node.content, node.marks) : node);
124
124
  });
@@ -18,7 +18,7 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
18
18
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
19
19
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
20
20
  var SKIP_NESTED_TABLE_PASTE_SOURCES = ['microsoft-excel', 'google-spreadsheets'];
21
- function handlePaste(view, event, slice, options) {
21
+ function handlePaste(view, _event, slice, options) {
22
22
  var _slice$content$firstC;
23
23
  if (!(0, _tables.isInTable)(view.state)) {
24
24
  return false;
@@ -270,7 +270,7 @@ var moveRow = exports.moveRow = function moveRow(state, originRowIndex, targetRo
270
270
  */
271
271
  function normalizeRowNode(rowNode, rowHeaderEnabled, columnHeaderEnabled, types) {
272
272
  var content = [];
273
- rowNode.forEach(function (node, offset, index) {
273
+ rowNode.forEach(function (node, _offset, index) {
274
274
  var newTargetType = rowHeaderEnabled || columnHeaderEnabled && index === 0 ? types.header_cell : types.cell;
275
275
  content.push(node.type !== newTargetType ? newTargetType.create(node.attrs, node.content, node.marks) : node);
276
276
  });
@@ -122,7 +122,8 @@ export class CellSelection extends Selection {
122
122
  rowContent.push(cell);
123
123
  }
124
124
  }
125
- rows.push(table.child(row).copy(Fragment.from(rowContent)));
125
+ const rowNode = table.child(row).copy(Fragment.from(rowContent));
126
+ rows.push(rowNode);
126
127
  }
127
128
  const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
128
129
  return new Slice(Fragment.from(fragment), 1, 1);
@@ -51,7 +51,7 @@ export const cloneRowAt = rowIndex => tr => {
51
51
  if (rowWidth < map.width) {
52
52
  const rowSpanCells = [];
53
53
  for (let i = rowIndex; i >= 0; i--) {
54
- const foundCells = filterCellsInRow(i, (cell, tr) => {
54
+ const foundCells = filterCellsInRow(i, (cell, _tr) => {
55
55
  const rowspan = cell.node.attrs.rowspan;
56
56
  const spanRange = i + rowspan;
57
57
  return rowspan > 1 && spanRange > rowIndex;
@@ -96,7 +96,7 @@ export const cloneRow = (state, originRowIndex, targetRowIndex, targetDirection,
96
96
  */
97
97
  function normalizeRowNode(rowNode, rowHeaderEnabled, columnHeaderEnabled, types) {
98
98
  const content = [];
99
- rowNode.forEach((node, offset, index) => {
99
+ rowNode.forEach((node, _offset, index) => {
100
100
  const newTargetType = rowHeaderEnabled || columnHeaderEnabled && index === 0 ? types.header_cell : types.cell;
101
101
  content.push(node.type !== newTargetType ? newTargetType.create(node.attrs, node.content, node.marks) : node);
102
102
  });
@@ -9,7 +9,7 @@ import { tableNodeTypes } from '../utils/table-node-types';
9
9
  import { isInTable } from '../utils/tables';
10
10
  import { clipCells, fitSlice, insertCells, pastedCells } from './copy-paste';
11
11
  const SKIP_NESTED_TABLE_PASTE_SOURCES = ['microsoft-excel', 'google-spreadsheets'];
12
- export function handlePaste(view, event, slice, options) {
12
+ export function handlePaste(view, _event, slice, options) {
13
13
  var _slice$content$firstC;
14
14
  if (!isInTable(view.state)) {
15
15
  return false;
@@ -250,7 +250,7 @@ export const moveRow = (state, originRowIndex, targetRowIndex, options = {
250
250
  */
251
251
  function normalizeRowNode(rowNode, rowHeaderEnabled, columnHeaderEnabled, types) {
252
252
  const content = [];
253
- rowNode.forEach((node, offset, index) => {
253
+ rowNode.forEach((node, _offset, index) => {
254
254
  const newTargetType = rowHeaderEnabled || columnHeaderEnabled && index === 0 ? types.header_cell : types.cell;
255
255
  content.push(node.type !== newTargetType ? newTargetType.create(node.attrs, node.content, node.marks) : node);
256
256
  });
@@ -139,7 +139,8 @@ export var CellSelection = /*#__PURE__*/function (_Selection) {
139
139
  rowContent.push(cell);
140
140
  }
141
141
  }
142
- rows.push(table.child(row).copy(Fragment.from(rowContent)));
142
+ var rowNode = table.child(row).copy(Fragment.from(rowContent));
143
+ rows.push(rowNode);
143
144
  }
144
145
  var fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
145
146
  return new Slice(Fragment.from(fragment), 1, 1);
@@ -55,7 +55,7 @@ export var cloneRowAt = function cloneRowAt(rowIndex) {
55
55
  if (rowWidth < map.width) {
56
56
  var rowSpanCells = [];
57
57
  var _loop = function _loop(_i) {
58
- var foundCells = filterCellsInRow(_i, function (cell, tr) {
58
+ var foundCells = filterCellsInRow(_i, function (cell, _tr) {
59
59
  var rowspan = cell.node.attrs.rowspan;
60
60
  var spanRange = _i + rowspan;
61
61
  return rowspan > 1 && spanRange > rowIndex;
@@ -111,7 +111,7 @@ export var cloneRow = function cloneRow(state, originRowIndex, targetRowIndex, t
111
111
  */
112
112
  function normalizeRowNode(rowNode, rowHeaderEnabled, columnHeaderEnabled, types) {
113
113
  var content = [];
114
- rowNode.forEach(function (node, offset, index) {
114
+ rowNode.forEach(function (node, _offset, index) {
115
115
  var newTargetType = rowHeaderEnabled || columnHeaderEnabled && index === 0 ? types.header_cell : types.cell;
116
116
  content.push(node.type !== newTargetType ? newTargetType.create(node.attrs, node.content, node.marks) : node);
117
117
  });
@@ -12,7 +12,7 @@ import { tableNodeTypes } from '../utils/table-node-types';
12
12
  import { isInTable } from '../utils/tables';
13
13
  import { clipCells, fitSlice, insertCells, pastedCells } from './copy-paste';
14
14
  var SKIP_NESTED_TABLE_PASTE_SOURCES = ['microsoft-excel', 'google-spreadsheets'];
15
- export function handlePaste(view, event, slice, options) {
15
+ export function handlePaste(view, _event, slice, options) {
16
16
  var _slice$content$firstC;
17
17
  if (!isInTable(view.state)) {
18
18
  return false;
@@ -264,7 +264,7 @@ export var moveRow = function moveRow(state, originRowIndex, targetRowIndex) {
264
264
  */
265
265
  function normalizeRowNode(rowNode, rowHeaderEnabled, columnHeaderEnabled, types) {
266
266
  var content = [];
267
- rowNode.forEach(function (node, offset, index) {
267
+ rowNode.forEach(function (node, _offset, index) {
268
268
  var newTargetType = rowHeaderEnabled || columnHeaderEnabled && index === 0 ? types.header_cell : types.cell;
269
269
  content.push(node.type !== newTargetType ? newTargetType.create(node.attrs, node.content, node.marks) : node);
270
270
  });
@@ -3,5 +3,5 @@ import { type EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  type PasteOptions = {
4
4
  pasteSource: string;
5
5
  };
6
- export declare function handlePaste(view: EditorView, event: ClipboardEvent, slice: Slice, options?: PasteOptions): boolean;
6
+ export declare function handlePaste(view: EditorView, _event: ClipboardEvent, slice: Slice, options?: PasteOptions): boolean;
7
7
  export {};
@@ -3,5 +3,5 @@ import { type EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  type PasteOptions = {
4
4
  pasteSource: string;
5
5
  };
6
- export declare function handlePaste(view: EditorView, event: ClipboardEvent, slice: Slice, options?: PasteOptions): boolean;
6
+ export declare function handlePaste(view: EditorView, _event: ClipboardEvent, slice: Slice, options?: PasteOptions): boolean;
7
7
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-tables",
3
- "version": "2.9.16",
3
+ "version": "2.9.18",
4
4
  "description": "A package that contains common classes and utility functions for editor tables",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/editor-prosemirror": "7.0.0",
31
31
  "@atlaskit/platform-feature-flags": "^1.1.0",
32
- "@atlaskit/tmp-editor-statsig": "^13.31.0",
32
+ "@atlaskit/tmp-editor-statsig": "^14.0.0",
33
33
  "@babel/runtime": "^7.0.0"
34
34
  },
35
35
  "techstack": {