@contrail/document-table 1.0.14 → 1.0.16

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.
@@ -98,7 +98,6 @@ class TableCopyService {
98
98
  }
99
99
  newTableElement.rowIds = rowIds;
100
100
  newTableElement.columnIds = columnIds;
101
- console.log(newChildElements);
102
101
  return [newTableElement, ...newChildElements];
103
102
  }
104
103
  static createTableFromCells(element, rows, columns, cells) {
@@ -80,15 +80,16 @@ class TablePasteService {
80
80
  }
81
81
  }
82
82
  for (const [columnId, width] of columnWidthsToUpdate) {
83
- const updatedColumn = table_service_1.TableService.resizeColumn(tableElement, childElements, columnId, width).elementsToUpdate[1];
84
- const updatedRowAndCells = table_service_1.TableService.autoFitRows(tableElement, childElements, columnId).elementsToUpdate;
83
+ const updatedColumn = table_service_1.TableService.resizeColumn(tableElement, [...childElements, ...elementsToCreate], columnId, width).elementsToUpdate[1];
84
+ const updatedRowAndCells = table_service_1.TableService.autoFitRows(tableElement, [...childElements, ...elementsToCreate], columnId).elementsToUpdate;
85
85
  const uniqueUpdatedRowAndCells = (0, documents_1.uniqueElementsToUpdate)(updatedRowAndCells, elementsToUpdate);
86
86
  elementsToUpdate.push(updatedColumn);
87
87
  elementsToUpdate.push(...uniqueUpdatedRowAndCells);
88
88
  }
89
89
  for (const [rowId, height] of rowHeightsToUpdate) {
90
- const updatedRow = table_service_1.TableService.resizeRow(tableElement, childElements, rowId, height).elementsToUpdate[1];
91
- const updatedColumnAndCells = table_service_1.TableService.autoFitColumns(tableElement, childElements, rowId).elementsToUpdate;
90
+ const updatedRow = table_service_1.TableService.resizeRow(tableElement, [...childElements, ...elementsToCreate], rowId, height)
91
+ .elementsToUpdate[1];
92
+ const updatedColumnAndCells = table_service_1.TableService.autoFitColumns(tableElement, [...childElements, ...elementsToCreate], rowId).elementsToUpdate;
92
93
  const uniqueUpdatedColumnAndCells = (0, documents_1.uniqueElementsToUpdate)(updatedColumnAndCells, elementsToUpdate);
93
94
  elementsToUpdate.push(updatedRow);
94
95
  elementsToUpdate.push(...uniqueUpdatedColumnAndCells);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/document-table",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Library for document tables",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",