@talrace/ngx-noder 19.0.70 → 19.0.72

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.
@@ -17,19 +17,19 @@ import { TranslateModule } from '@ngx-translate/core';
17
17
  import * as i3 from '@angular/common';
18
18
  import { CommonModule, AsyncPipe } from '@angular/common';
19
19
  import * as i2 from '@angular/forms';
20
- import { FormsModule, FormControl, ReactiveFormsModule, Validators } from '@angular/forms';
20
+ import { FormControl, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
21
21
  import * as i1$1 from '@angular/material/dialog';
22
- import { MatDialogRef, MatDialogModule, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
22
+ import { MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog';
23
23
  import * as i6$1 from '@angular/material/input';
24
24
  import { MatInputModule } from '@angular/material/input';
25
+ import * as i5$3 from '@angular/material/select';
26
+ import { MatSelectModule } from '@angular/material/select';
25
27
  import * as i5$2 from '@angular/material/form-field';
26
28
  import { MatFormFieldModule } from '@angular/material/form-field';
29
+ import * as i3$1 from '@angular/material/core';
27
30
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
28
31
  import * as i6$2 from '@angular/cdk/clipboard';
29
32
  import { marker } from '@biesbjerg/ngx-translate-extract-marker';
30
- import * as i7 from '@angular/material/select';
31
- import { MatSelectModule } from '@angular/material/select';
32
- import * as i3$1 from '@angular/material/core';
33
33
  import * as i10 from '@angular/material/sidenav';
34
34
  import { MatSidenavModule } from '@angular/material/sidenav';
35
35
  import * as i4$1 from '@angular/material/menu';
@@ -43,7 +43,7 @@ import * as i2$2 from '@angular/material/autocomplete';
43
43
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
44
44
  import * as i2$3 from '@angular/material/divider';
45
45
  import { MatDividerModule } from '@angular/material/divider';
46
- import * as i5$3 from 'ngx-colors';
46
+ import * as i5$4 from 'ngx-colors';
47
47
  import { NgxColorsModule } from 'ngx-colors';
48
48
  import * as i3$2 from '@angular/material/button-toggle';
49
49
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
@@ -1171,8 +1171,8 @@ class EditorService {
1171
1171
  insertTableColumns(insertIndex, columnsCount, targetIndex, inheritIndex, sessionId) {
1172
1172
  this._insertTableColumns$.next({ insertIndex, columnsCount, targetIndex, inheritIndex, sessionId });
1173
1173
  }
1174
- mergeTableCells(insertIndex, rowStartIndex, rowEndIndex, columnStartIndex, columnEndIndex, sessionId) {
1175
- this._mergeTableCells$.next({ insertIndex, rowStartIndex, rowEndIndex, columnStartIndex, columnEndIndex, sessionId });
1174
+ mergeTableCells(insertIndex, rowIndex, rowCount, columnIndex, columnCount, sessionId) {
1175
+ this._mergeTableCells$.next({ insertIndex, rowIndex, rowCount, columnIndex, columnCount, sessionId });
1176
1176
  }
1177
1177
  splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, sessionId) {
1178
1178
  this._splitTableCells$.next({ insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, sessionId });
@@ -1678,6 +1678,8 @@ var CommandType;
1678
1678
  CommandType[CommandType["ReplaceByContents"] = 43] = "ReplaceByContents";
1679
1679
  CommandType[CommandType["MergeTableCells"] = 44] = "MergeTableCells";
1680
1680
  CommandType[CommandType["SplitTableCells"] = 45] = "SplitTableCells";
1681
+ CommandType[CommandType["RestoreTableCells"] = 46] = "RestoreTableCells";
1682
+ CommandType[CommandType["RestoreTableSplitCells"] = 47] = "RestoreTableSplitCells";
1681
1683
  })(CommandType || (CommandType = {}));
1682
1684
 
1683
1685
  class PageNumbersModel {
@@ -3096,14 +3098,6 @@ class RestoreTextStylesModel {
3096
3098
  }
3097
3099
  }
3098
3100
 
3099
- class SplitTableCellsModel {
3100
- constructor(fields) {
3101
- if (fields) {
3102
- Object.assign(this, fields);
3103
- }
3104
- }
3105
- }
3106
-
3107
3101
  class OperationHistory {
3108
3102
  constructor(editorService, regulatorService) {
3109
3103
  this.editorService = editorService;
@@ -3206,27 +3200,11 @@ class OperationHistory {
3206
3200
  const undoStep = new RemoveTableColumnsModel({ insertIndex, startIndex: targetIndex, endIndex: targetIndex + columnsCount - 1 });
3207
3201
  this.addToHistory(undoStep, redoStep);
3208
3202
  }
3209
- pushMergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount) {
3210
- const redoStep = new MergeTableCellsModel({ insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount });
3211
- const undoStep = new SplitTableCellsModel({
3212
- insertIndex,
3213
- rowIndex: rowStartIndex,
3214
- columnIndex: columnStartIndex,
3215
- targetRowsCount: rowsCount,
3216
- targetColumnsCount: columnCount
3217
- });
3218
- this.addToHistory(undoStep, redoStep);
3203
+ pushMergeTableCells(undo, redo) {
3204
+ this.addToHistory(undo, redo);
3219
3205
  }
3220
- pushSplitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount) {
3221
- const redoStep = new SplitTableCellsModel({ insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount });
3222
- const undoStep = new MergeTableCellsModel({
3223
- insertIndex,
3224
- rowStartIndex: rowIndex,
3225
- rowsCount: targetRowsCount,
3226
- columnStartIndex: columnIndex,
3227
- columnCount: targetColumnsCount
3228
- });
3229
- this.addToHistory(undoStep, redoStep);
3206
+ pushSplitTableCells(undo, redo) {
3207
+ this.addToHistory(undo, redo);
3230
3208
  }
3231
3209
  pushRemoveTableRows(insertIndex, startIndex, endIndex) {
3232
3210
  const redoStep = new RemoveTableRowsModel({ insertIndex, startIndex, endIndex });
@@ -3440,6 +3418,14 @@ class CellModel {
3440
3418
  }
3441
3419
  }
3442
3420
 
3421
+ class ColumnModel {
3422
+ constructor(fields) {
3423
+ if (fields) {
3424
+ Object.assign(this, fields);
3425
+ }
3426
+ }
3427
+ }
3428
+
3443
3429
  class EdgeModel {
3444
3430
  constructor(fields) {
3445
3431
  if (fields) {
@@ -5193,7 +5179,7 @@ class ParagraphOperationsHelper {
5193
5179
  }
5194
5180
  }
5195
5181
 
5196
- class ColumnModel {
5182
+ class RowModel {
5197
5183
  constructor(fields) {
5198
5184
  if (fields) {
5199
5185
  Object.assign(this, fields);
@@ -5220,7 +5206,7 @@ var ResizerSide;
5220
5206
  ResizerSide[ResizerSide["Bottom"] = 3] = "Bottom";
5221
5207
  })(ResizerSide || (ResizerSide = {}));
5222
5208
 
5223
- class RowModel {
5209
+ class RestoreCellModel {
5224
5210
  constructor(fields) {
5225
5211
  if (fields) {
5226
5212
  Object.assign(this, fields);
@@ -5242,6 +5228,24 @@ var VerticalMerge;
5242
5228
  })(VerticalMerge || (VerticalMerge = {}));
5243
5229
 
5244
5230
  class TableOperationsHelper {
5231
+ static { this.MinColumnWidth = 15; }
5232
+ static createEmptyCell(columnWidth) {
5233
+ return new CellModel({
5234
+ breaks: [],
5235
+ borders: this.getDefaultCellBorders(),
5236
+ content: '',
5237
+ elements: [],
5238
+ formats: [new FormatModel({ startIndex: 0, endIndex: 0, textStyle: DEFAULT_TEXT_STYLE })],
5239
+ images: [],
5240
+ paragraphs: [new ParagraphModel({ insertIndex: 0, paragraphStyle: DEFAULT_PARAGRAPH_STYLE })],
5241
+ tables: [],
5242
+ tabs: [],
5243
+ links: [],
5244
+ comments: [],
5245
+ width: columnWidth,
5246
+ widthType: 'dxa'
5247
+ });
5248
+ }
5245
5249
  static insertContent(tables, insertIndex, columnsCount, rowsCount, contentWidth) {
5246
5250
  let rows = [];
5247
5251
  const columnWidth = Math.round(contentWidth / columnsCount);
@@ -5738,6 +5742,7 @@ class TableOperationsHelper {
5738
5742
  const isTargetRow = i >= startRow && i < startRow + anchorCellRows;
5739
5743
  if (isTargetRow) {
5740
5744
  const anchorColumnCell = matrix[i].cells[insertColumnIndex - 1];
5745
+ anchorColumnCell.width = newColumnWidth;
5741
5746
  let insertCellIndex = row.cells.indexOf(anchorColumnCell) + 1;
5742
5747
  for (let j = 0; j < columnsToAdd; j++) {
5743
5748
  const newCell = this.createEmptyCell(newColumnWidth);
@@ -5804,6 +5809,64 @@ class TableOperationsHelper {
5804
5809
  }
5805
5810
  return count;
5806
5811
  }
5812
+ static sliceCells(rows, rowIndex, rowCount, columnIndex, columnCount) {
5813
+ const result = [];
5814
+ for (let i = 0; i < rowCount; i++) {
5815
+ result[i] = [];
5816
+ const cellIndex = this.getCellIndex(columnIndex, rows[rowIndex + i].cells);
5817
+ let count = 0;
5818
+ for (let j = 0; count < columnCount; j++) {
5819
+ result[i][j] = structuredClone(rows[rowIndex + i].cells[cellIndex + j]);
5820
+ count += rows[rowIndex + i].cells[cellIndex + j].horizontalMerge ?? 1;
5821
+ }
5822
+ }
5823
+ return result;
5824
+ }
5825
+ static sliceSplitCells(rows, rowIndex, columnIndex) {
5826
+ const cellIndex = this.getCellIndex(columnIndex, rows[rowIndex].cells);
5827
+ const count = rows[rowIndex].cells[cellIndex].horizontalMerge ?? 1;
5828
+ const result = [];
5829
+ for (let i = 0; i < rows.length; i++) {
5830
+ const startIndex = this.getCellIndex(columnIndex, rows[i].cells);
5831
+ let endIndex = startIndex;
5832
+ for (let j = 1; j < count && endIndex + 1 < rows[i].cells.length; j += rows[i].cells[endIndex].horizontalMerge ?? 1) {
5833
+ endIndex++;
5834
+ }
5835
+ result[i] = rows[i].cells.slice(startIndex, endIndex + 1).map(y => new RestoreCellModel(y));
5836
+ }
5837
+ return result;
5838
+ }
5839
+ static sliceColumns(table, rowIndex, columnIndex) {
5840
+ const cellIndex = this.getCellIndex(columnIndex, table.rows[rowIndex].cells);
5841
+ const count = table.rows[rowIndex].cells[cellIndex].horizontalMerge ?? 1;
5842
+ return table.columns.slice(columnIndex, columnIndex + count).map(x => new ColumnModel(x));
5843
+ }
5844
+ static getCellMatrixIndex(cellIndex, cells) {
5845
+ let index = 0;
5846
+ for (let i = 0; i < cellIndex; i++) {
5847
+ index += cells[i].horizontalMerge ?? 1;
5848
+ }
5849
+ return index;
5850
+ }
5851
+ static getCellIndex(cellMatrixIndex, cells) {
5852
+ let index = 0;
5853
+ while (cellMatrixIndex >= (cells[index].horizontalMerge ?? 1)) {
5854
+ cellMatrixIndex -= cells[index].horizontalMerge ?? 1;
5855
+ index++;
5856
+ }
5857
+ return index;
5858
+ }
5859
+ static getVerticalMerge(columnIndex, rowIndex, rows) {
5860
+ let result = 1;
5861
+ while (rowIndex + result < rows.length) {
5862
+ const index = TableOperationsHelper.getCellIndex(columnIndex, rows[rowIndex + result].cells);
5863
+ if (rows[rowIndex + result].cells[index].verticalMerge !== VerticalMerge.Merge.toString()) {
5864
+ break;
5865
+ }
5866
+ result++;
5867
+ }
5868
+ return result - 1;
5869
+ }
5807
5870
  static cloneBorders(borders) {
5808
5871
  if (!borders) {
5809
5872
  return null;
@@ -5902,23 +5965,6 @@ class TableOperationsHelper {
5902
5965
  new BordersStyleModel({ position: Positions.Right, width: 1, lineStyle: LineStyles.Single })
5903
5966
  ];
5904
5967
  }
5905
- static createEmptyCell(columnWidth) {
5906
- return new CellModel({
5907
- breaks: [],
5908
- borders: this.getDefaultCellBorders(),
5909
- content: '',
5910
- elements: [],
5911
- formats: [new FormatModel({ startIndex: 0, endIndex: 0, textStyle: DEFAULT_TEXT_STYLE })],
5912
- images: [],
5913
- paragraphs: [new ParagraphModel({ insertIndex: 0, paragraphStyle: DEFAULT_PARAGRAPH_STYLE })],
5914
- tables: [],
5915
- tabs: [],
5916
- links: [],
5917
- comments: [],
5918
- width: columnWidth,
5919
- widthType: 'dxa'
5920
- });
5921
- }
5922
5968
  }
5923
5969
 
5924
5970
  class TabOperationsHelper {
@@ -6216,6 +6262,16 @@ class OperationsHelper {
6216
6262
  this.splitTableCells(contents, insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
6217
6263
  break;
6218
6264
  }
6265
+ case CommandType.RestoreTableCells: {
6266
+ const { insertIndex, rowIndex, columnIndex, cells } = command.restoreTableCells;
6267
+ this.restoreTableCells(contents, insertIndex, rowIndex, columnIndex, cells);
6268
+ break;
6269
+ }
6270
+ case CommandType.RestoreTableSplitCells: {
6271
+ const { insertIndex, rowIndex, rowCount, columnIndex, columnCount, cells, columns } = command.restoreTableSplitCells;
6272
+ this.restoreTableSplitCells(contents, insertIndex, rowIndex, rowCount, columnIndex, columnCount, cells, columns);
6273
+ break;
6274
+ }
6219
6275
  }
6220
6276
  });
6221
6277
  }
@@ -6546,70 +6602,172 @@ class OperationsHelper {
6546
6602
  }
6547
6603
  static mergeTableCells(document, insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount) {
6548
6604
  const table = document.tables.find(x => x.insertIndex === insertIndex);
6549
- const matrix = TableOperationsHelper.getMatrix(table);
6550
- const anchorCell = matrix[rowStartIndex].cells[columnStartIndex];
6551
- anchorCell.horizontalMerge = columnsCount > 1 ? columnsCount : null;
6552
- if (rowsCount > 1) {
6553
- anchorCell.verticalMerge = VerticalMerge.Restart;
6554
- }
6555
- anchorCell.width = 0;
6556
- for (let i = columnStartIndex; i < columnStartIndex + columnsCount; i++) {
6557
- anchorCell.width += table.columns[i].width || 0;
6605
+ const cellIndex = TableOperationsHelper.getCellIndex(columnStartIndex, table.rows[rowStartIndex].cells);
6606
+ const borders = table.rows[rowStartIndex].cells[cellIndex].borders;
6607
+ const backgroundColor = table.rows[rowStartIndex].cells[cellIndex].backgroundColor;
6608
+ let width = 0;
6609
+ for (let i = 0; i < columnsCount; i++) {
6610
+ width += table.columns[columnStartIndex + i].width ?? 0;
6558
6611
  }
6559
- const visitedCells = new Set([anchorCell]);
6560
6612
  for (let i = rowStartIndex; i < rowStartIndex + rowsCount; i++) {
6561
- const row = table.rows[i];
6562
- const rowAnchorCell = i === rowStartIndex ? anchorCell : matrix[i].cells[columnStartIndex];
6563
- if (i > rowStartIndex) {
6564
- rowAnchorCell.horizontalMerge = columnsCount > 1 ? columnsCount : null;
6565
- rowAnchorCell.verticalMerge = VerticalMerge.Merge;
6566
- rowAnchorCell.width = anchorCell.width;
6567
- rowAnchorCell.borders = anchorCell.borders;
6568
- rowAnchorCell.backgroundColor = anchorCell.backgroundColor;
6569
- visitedCells.add(rowAnchorCell);
6570
- }
6571
- this.mergeAndCleanupRowCells(row, matrix[i], rowAnchorCell, anchorCell, visitedCells, columnStartIndex, columnsCount);
6572
- }
6573
- }
6574
- static mergeAndCleanupRowCells(row, matrixRow, rowAnchorCell, anchorCell, visitedCells, columnStartIndex, columnsCount) {
6575
- for (let i = columnStartIndex; i < columnStartIndex + columnsCount; i++) {
6576
- const rowCell = matrixRow.cells[i];
6577
- if (rowCell === rowAnchorCell) {
6578
- continue;
6579
- }
6580
- if (!visitedCells.has(rowCell)) {
6581
- visitedCells.add(rowCell);
6582
- if (rowCell.content) {
6583
- this.insertText(anchorCell, '\n', anchorCell.content.length);
6584
- this.insertContents(anchorCell, rowCell, anchorCell.content.length);
6613
+ let index = TableOperationsHelper.getCellIndex(columnStartIndex, table.rows[i].cells);
6614
+ table.rows[i].cells.splice(index, 0, TableOperationsHelper.createEmptyCell(width));
6615
+ const mergedCell = table.rows[rowStartIndex].cells[cellIndex];
6616
+ table.rows[i].cells[index].horizontalMerge = columnsCount > 1 ? columnsCount : null;
6617
+ table.rows[i].cells[index].verticalMerge = rowsCount > 1 ? VerticalMerge.Merge : null;
6618
+ table.rows[i].cells[index].borders = borders;
6619
+ table.rows[i].cells[index].backgroundColor = backgroundColor;
6620
+ index++;
6621
+ let count = 0;
6622
+ while (count < columnsCount) {
6623
+ const cell = table.rows[i].cells[index];
6624
+ count += cell.horizontalMerge ?? 1;
6625
+ if (cell.content) {
6626
+ this.insertText(mergedCell, '\n', mergedCell.content.length);
6627
+ this.insertContents(mergedCell, cell, mergedCell.content.length);
6585
6628
  }
6629
+ table.rows[i].cells.splice(index, 1);
6586
6630
  }
6587
- const cellIndex = row.cells.indexOf(rowCell);
6588
- if (cellIndex > -1) {
6589
- row.cells.splice(cellIndex, 1);
6590
- }
6631
+ }
6632
+ table.rows[rowStartIndex].cells[cellIndex].verticalMerge = rowsCount > 1 ? VerticalMerge.Restart : null;
6633
+ }
6634
+ static restoreTableCells(document, insertIndex, rowIndex, columnIndex, cells) {
6635
+ const table = document.tables.find(x => x.insertIndex === insertIndex);
6636
+ for (let i = 0; i < cells.length; i++) {
6637
+ const cellIndex = TableOperationsHelper.getCellIndex(columnIndex, table.rows[rowIndex + i].cells);
6638
+ table.rows[rowIndex + i].cells.splice(cellIndex, 1);
6639
+ table.rows[rowIndex + i].cells.splice(cellIndex, 0, ...cells[i].map(x => structuredClone(x)));
6591
6640
  }
6592
6641
  }
6593
6642
  static splitTableCells(document, insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount) {
6594
6643
  const table = document.tables.find(x => x.insertIndex === insertIndex);
6595
- let matrix = TableOperationsHelper.getMatrix(table);
6596
- const anchorCell = matrix[rowIndex].cells[columnIndex];
6597
- let anchorCellColumns = anchorCell.horizontalMerge ?? 1;
6598
- const anchorCellRows = TableOperationsHelper.getVerticalSize(table, matrix, rowIndex, columnIndex);
6599
- if (targetRowsCount === 1 && targetColumnsCount === 1 && anchorCellColumns === 1 && anchorCellRows === 1) {
6644
+ const cellIndex = TableOperationsHelper.getCellIndex(columnIndex, table.rows[rowIndex].cells);
6645
+ const fullWidth = table.rows[rowIndex].cells[cellIndex].width;
6646
+ const endIndex = rowIndex + TableOperationsHelper.getVerticalMerge(columnIndex, rowIndex, table.rows);
6647
+ const width = Math.floor(fullWidth / targetColumnsCount);
6648
+ let start = columnIndex;
6649
+ for (let i = 0; i < targetColumnsCount; i++) {
6650
+ let merge = 0;
6651
+ let currentWidth = 0;
6652
+ while (currentWidth < width) {
6653
+ if (start + merge === table.columns.length) {
6654
+ table.columns.push(new ColumnModel({
6655
+ spaceBetweenColumns: table.columns[table.columns.length - 1].spaceBetweenColumns,
6656
+ width: width - currentWidth
6657
+ }));
6658
+ }
6659
+ const column = table.columns[start + merge];
6660
+ if (Math.abs(currentWidth + column.width - width) <= TableOperationsHelper.MinColumnWidth) {
6661
+ merge++;
6662
+ break;
6663
+ }
6664
+ if (currentWidth + column.width < width) {
6665
+ currentWidth += column.width ?? 0;
6666
+ }
6667
+ else {
6668
+ const splitWidth = width - currentWidth;
6669
+ column.width -= splitWidth;
6670
+ currentWidth += splitWidth;
6671
+ table.columns.splice(start + merge, 0, new ColumnModel({ spaceBetweenColumns: column.spaceBetweenColumns, width: splitWidth }));
6672
+ for (let j = 0; j < table.rows.length; j++) {
6673
+ if (j >= rowIndex && j <= endIndex) {
6674
+ continue;
6675
+ }
6676
+ const index = TableOperationsHelper.getCellIndex(start + merge, table.rows[j].cells);
6677
+ table.rows[j].cells[index].horizontalMerge ??= 1;
6678
+ table.rows[j].cells[index].horizontalMerge++;
6679
+ }
6680
+ }
6681
+ merge++;
6682
+ }
6683
+ let actualWidth = 0;
6684
+ for (let j = 0; j < merge; j++) {
6685
+ actualWidth += table.columns[start + j].width;
6686
+ }
6687
+ for (let j = rowIndex; j <= endIndex; j++) {
6688
+ const index = TableOperationsHelper.getCellIndex(columnIndex, table.rows[j].cells);
6689
+ if (i === 0) {
6690
+ table.rows[j].cells[index].width = actualWidth;
6691
+ table.rows[j].cells[index].horizontalMerge = merge === 1 ? null : merge;
6692
+ }
6693
+ else {
6694
+ const cell = TableOperationsHelper.createEmptyCell(actualWidth);
6695
+ cell.horizontalMerge = merge === 1 ? null : merge;
6696
+ cell.verticalMerge = table.rows[j].cells[index].verticalMerge;
6697
+ cell.borders = table.rows[j].cells[index].borders;
6698
+ cell.backgroundColor = table.rows[j].cells[index].backgroundColor;
6699
+ table.rows[j].cells.splice(index + i, 0, cell);
6700
+ }
6701
+ }
6702
+ start += merge;
6703
+ }
6704
+ if (targetRowsCount == 1) {
6600
6705
  return;
6601
6706
  }
6602
- TableOperationsHelper.unmergeCellToBaseGrid(table, matrix, rowIndex, columnIndex, anchorCellRows, anchorCellColumns);
6603
- matrix = TableOperationsHelper.getMatrix(table);
6604
- if (targetColumnsCount > anchorCellColumns) {
6605
- const columnsToAdd = targetColumnsCount - anchorCellColumns;
6606
- TableOperationsHelper.splitGridColumns(table, matrix, rowIndex, columnIndex, anchorCellRows, anchorCellColumns, columnsToAdd);
6607
- anchorCellColumns = targetColumnsCount;
6707
+ if (table.rows[rowIndex].cells[cellIndex].verticalMerge) {
6708
+ const step = (endIndex - rowIndex + 1) / targetRowsCount;
6709
+ const verticalMerge = step > 1 ? VerticalMerge.Restart : null;
6710
+ for (let i = rowIndex; i <= endIndex; i += step) {
6711
+ const index = TableOperationsHelper.getCellIndex(columnIndex, table.rows[i].cells);
6712
+ for (let j = 0; j < targetColumnsCount; j++) {
6713
+ table.rows[i].cells[index + j].verticalMerge = verticalMerge;
6714
+ }
6715
+ }
6716
+ return;
6717
+ }
6718
+ for (let i = 0; i < table.rows[rowIndex].cells.length; i++) {
6719
+ if (i >= cellIndex && i < cellIndex + targetColumnsCount) {
6720
+ continue;
6721
+ }
6722
+ table.rows[rowIndex].cells[i].verticalMerge ??= VerticalMerge.Restart;
6723
+ }
6724
+ for (let i = 1; i < targetRowsCount; i++) {
6725
+ const cells = table.rows[rowIndex].cells.map(x => {
6726
+ const result = TableOperationsHelper.createEmptyCell(x.width);
6727
+ result.horizontalMerge = x.horizontalMerge;
6728
+ result.verticalMerge = x.verticalMerge ? VerticalMerge.Merge : null;
6729
+ result.borders = x.borders;
6730
+ result.backgroundColor = x.backgroundColor;
6731
+ return result;
6732
+ });
6733
+ const row = new RowModel({
6734
+ cellSpacing: table.rows[rowIndex].cellSpacing,
6735
+ height: table.rows[rowIndex].height,
6736
+ hRule: table.rows[rowIndex].hRule,
6737
+ cells: cells
6738
+ });
6739
+ table.rows.splice(rowIndex + i, 0, row);
6740
+ }
6741
+ }
6742
+ static restoreTableSplitCells(document, insertIndex, rowIndex, rowCount, columnIndex, columnCount, cells, columns) {
6743
+ const table = document.tables.find(x => x.insertIndex === insertIndex);
6744
+ const cellIndex = TableOperationsHelper.getCellIndex(columnIndex, table.rows[rowIndex].cells);
6745
+ let count = 0;
6746
+ for (let i = 0; i < columnCount; i++) {
6747
+ count += table.rows[rowIndex].cells[cellIndex + i].horizontalMerge ?? 1;
6748
+ }
6749
+ table.columns.splice(columnIndex, count);
6750
+ table.columns.splice(columnIndex, 0, ...columns.map(x => new ColumnModel(x)));
6751
+ if (rowCount > 1 && !cells[rowIndex][0].verticalMerge) {
6752
+ table.rows.splice(rowIndex + 1, rowCount - 1);
6753
+ }
6754
+ if (columnCount > 1) {
6755
+ table.rows[rowIndex].cells.splice(cellIndex + 1, columnCount - 1);
6756
+ for (let i = rowIndex + 1; i < table.rows.length; i++) {
6757
+ const index = TableOperationsHelper.getCellIndex(columnIndex, table.rows[i].cells);
6758
+ if (cells[i][0].verticalMerge != VerticalMerge.Merge) {
6759
+ break;
6760
+ }
6761
+ table.rows[i].cells.splice(index + 1, columnCount - 1);
6762
+ }
6608
6763
  }
6609
- matrix = TableOperationsHelper.getMatrix(table);
6610
- if (targetRowsCount > anchorCellRows) {
6611
- const rowsToAdd = targetRowsCount - anchorCellRows;
6612
- TableOperationsHelper.splitGridRows(table, matrix, rowIndex, columnIndex, anchorCellRows, anchorCellColumns, rowsToAdd);
6764
+ for (let i = 0; i < cells.length; i++) {
6765
+ const index = TableOperationsHelper.getCellIndex(columnIndex, table.rows[i].cells);
6766
+ for (let j = 0; j < cells[i].length; j++) {
6767
+ table.rows[i].cells[index + j].verticalMerge = cells[i][j].verticalMerge;
6768
+ table.rows[i].cells[index + j].horizontalMerge = cells[i][j].horizontalMerge;
6769
+ table.rows[i].cells[index + j].width = cells[i][j].width;
6770
+ }
6613
6771
  }
6614
6772
  }
6615
6773
  static removeTableRows(document, insertIndex, startIndex, endIndex) {
@@ -10139,15 +10297,47 @@ class EditSession {
10139
10297
  OperationsHelper.insertTableColumns(this.model, insertIndex, columnsCount, targetIndex, inheritIndex, pageFormat.contentWidth);
10140
10298
  table.instance.updateTable();
10141
10299
  }
10142
- mergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount) {
10143
- const table = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex);
10144
- OperationsHelper.mergeTableCells(this.model, insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount);
10145
- table.instance.updateTable();
10300
+ mergeCells(insertIndex, rowIndex, rowCount, columnIndex, columnCount) {
10301
+ const tableComponent = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex).instance;
10302
+ return this.mergeTableCells(tableComponent, insertIndex, rowIndex, rowCount, columnIndex, columnCount);
10303
+ }
10304
+ mergeTableCells(tableComponent, insertIndex, rowIndex, rowCount, columnIndex, columnCount) {
10305
+ OperationsHelper.mergeTableCells(this.model, insertIndex, rowIndex, rowCount, columnIndex, columnCount);
10306
+ tableComponent.updateTable();
10307
+ const paragraph = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, insertIndex).row;
10308
+ this.displayData.updateNextLineIndexes(paragraph, paragraph);
10309
+ this.selection.placeCursor(new CursorParagraph(0, 0));
10310
+ return tableComponent.getCellSession(rowIndex, columnIndex);
10311
+ }
10312
+ restoreCells(insertIndex, rowIndex, columnIndex, cells) {
10313
+ const tableComponent = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex).instance;
10314
+ OperationsHelper.restoreTableCells(this.model, insertIndex, rowIndex, columnIndex, cells);
10315
+ tableComponent.updateTable();
10316
+ const paragraph = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, insertIndex).row;
10317
+ this.displayData.updateNextLineIndexes(paragraph, paragraph);
10318
+ const position = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, insertIndex);
10319
+ this.selection.placeCursor(position);
10320
+ return tableComponent.getCellSession(rowIndex, columnIndex);
10146
10321
  }
10147
10322
  splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount) {
10148
- const table = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex);
10323
+ const tableComponent = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex).instance;
10149
10324
  OperationsHelper.splitTableCells(this.model, insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
10150
- table.instance.updateTable();
10325
+ tableComponent.updateTable();
10326
+ const paragraph = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, insertIndex).row;
10327
+ this.displayData.updateNextLineIndexes(paragraph, paragraph);
10328
+ const position = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, insertIndex);
10329
+ this.selection.placeCursor(position);
10330
+ return tableComponent.getCellSession(rowIndex, columnIndex);
10331
+ }
10332
+ restoreSplitCells(insertIndex, rowIndex, rowCount, columnIndex, columnCount, cells, columns) {
10333
+ const tableComponent = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex).instance;
10334
+ OperationsHelper.restoreTableSplitCells(this.model, insertIndex, rowIndex, rowCount, columnIndex, columnCount, cells, columns);
10335
+ tableComponent.updateTable();
10336
+ const paragraph = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, insertIndex).row;
10337
+ this.displayData.updateNextLineIndexes(paragraph, paragraph);
10338
+ const position = ContentHelper.documentIndexToParagraphIndex(this.displayData.paragraphs, insertIndex);
10339
+ this.selection.placeCursor(position);
10340
+ return tableComponent.getCellSession(rowIndex, columnIndex);
10151
10341
  }
10152
10342
  removeTableRows(insertIndex, startIndex, endIndex) {
10153
10343
  const table = this.customComponents.tables.find(x => x.instance.insertIndex === insertIndex);
@@ -12797,6 +12987,7 @@ class NoderTableCellComponent {
12797
12987
  });
12798
12988
  this.cellSession = this.regulatorService.addCellSession(marginModel, this, this.elementRef.nativeElement);
12799
12989
  this.sessionId = this.cellSession.sessionId;
12990
+ this.elementRef.nativeElement.setAttribute('data-session-id', this.sessionId.toString());
12800
12991
  this.addEventListeners();
12801
12992
  }
12802
12993
  getCellContentHeight() {
@@ -12817,7 +13008,7 @@ class NoderTableCellComponent {
12817
13008
  this.session.displayData.addEventListener('pagesCountChanged', this.pagesCountChangedHandler);
12818
13009
  }
12819
13010
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTableCellComponent, deps: [{ token: EditorService }, { token: RegulatorService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
12820
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NoderTableCellComponent, isStandalone: false, selector: "app-nod-table-cell", inputs: { table: "table", cell: "cell", rowIndex: "rowIndex", cellIndex: "cellIndex", columnIndex: "columnIndex", width: "width", parentSessionId: "parentSessionId", generalProperties: "generalProperties", heightChanged: "heightChanged", startResizing: "startResizing" }, host: { properties: { "class.highlighted": "this.isHighlighted", "attr.data-session-id": "this.sessionId" } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, static: true }], ngImport: i0, template: "<div\n *ngIf=\"cellIndex === 0\"\n class=\"resizer left-border\"\n (mousedown)=\"onStartResizing($event, resizerBorder.Left)\"></div>\n<div\n #container\n class=\"edit-container\"></div>\n<div class=\"highlight-container\"></div>\n<div\n class=\"resizer right-border\"\n (mousedown)=\"onStartResizing($event, resizerBorder.Right)\"></div>\n", styles: [".highlight-container{visibility:hidden;position:absolute;width:100%;height:100%;background-color:#5ea8f766;pointer-events:none;overflow:hidden}:host{display:flex;position:relative;min-height:19px;height:100%;background:transparent}:host.highlighted .highlight-container{visibility:visible}.edit-container{min-height:1px;overflow:hidden}.left-border{left:-6px}.resizer{cursor:col-resize;width:11px;height:100%;position:absolute;z-index:1}.right-border{right:-6px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
13011
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: NoderTableCellComponent, isStandalone: false, selector: "app-nod-table-cell", inputs: { table: "table", cell: "cell", rowIndex: "rowIndex", cellIndex: "cellIndex", columnIndex: "columnIndex", width: "width", parentSessionId: "parentSessionId", generalProperties: "generalProperties", heightChanged: "heightChanged", startResizing: "startResizing" }, host: { properties: { "class.highlighted": "this.isHighlighted" } }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, static: true }], ngImport: i0, template: "<div\n *ngIf=\"cellIndex === 0\"\n class=\"resizer left-border\"\n (mousedown)=\"onStartResizing($event, resizerBorder.Left)\"></div>\n<div\n #container\n class=\"edit-container\"></div>\n<div class=\"highlight-container\"></div>\n<div\n class=\"resizer right-border\"\n (mousedown)=\"onStartResizing($event, resizerBorder.Right)\"></div>\n", styles: [".highlight-container{visibility:hidden;position:absolute;width:100%;height:100%;background-color:#5ea8f766;pointer-events:none;overflow:hidden}:host{display:flex;position:relative;min-height:19px;height:100%;background:transparent}:host.highlighted .highlight-container{visibility:visible}.edit-container{min-height:1px;overflow:hidden}.left-border{left:-6px}.resizer{cursor:col-resize;width:11px;height:100%;position:absolute;z-index:1}.right-border{right:-6px}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12821
13012
  }
12822
13013
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: NoderTableCellComponent, decorators: [{
12823
13014
  type: Component,
@@ -12845,9 +13036,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
12845
13036
  }], isHighlighted: [{
12846
13037
  type: HostBinding,
12847
13038
  args: ['class.highlighted']
12848
- }], sessionId: [{
12849
- type: HostBinding,
12850
- args: ['attr.data-session-id']
12851
13039
  }], container: [{
12852
13040
  type: ViewChild,
12853
13041
  args: ['container', { static: true }]
@@ -12954,10 +13142,20 @@ class TableCellHelper {
12954
13142
  }
12955
13143
 
12956
13144
  class SplitCellDialogComponent {
12957
- constructor() {
12958
- this.dialogRef = inject((MatDialogRef));
13145
+ constructor(data, dialogRef) {
13146
+ this.dialogRef = dialogRef;
12959
13147
  this.columns = signal(2);
12960
13148
  this.rows = signal(1);
13149
+ this.rowsControl = new FormControl(1);
13150
+ if (data.verticalMerge > 1) {
13151
+ this.availableRows = [];
13152
+ for (let i = 1; i <= data.verticalMerge / 2; i++) {
13153
+ if (data.verticalMerge % i === 0) {
13154
+ this.availableRows.push(i);
13155
+ }
13156
+ }
13157
+ this.availableRows.push(data.verticalMerge);
13158
+ }
12961
13159
  }
12962
13160
  onApply() {
12963
13161
  const columns = this.columns();
@@ -12967,13 +13165,16 @@ class SplitCellDialogComponent {
12967
13165
  onCancel() {
12968
13166
  this.dialogRef.close();
12969
13167
  }
12970
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SplitCellDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12971
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SplitCellDialogComponent, isStandalone: true, selector: "app-nod-split-cell-dialog", ngImport: i0, template: "<h2 mat-dialog-title>{{ 'NODER.LABEL.SPLIT_CELLS' | translate }}</h2>\n\n<mat-dialog-content>\n <div class=\"split-dialog-container\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_COLUMNS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"columns\" />\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_ROWS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"rows\" />\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button\n mat-button\n (click)=\"onCancel()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"columns() < 1 || rows() < 1\">\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".split-dialog-container{display:flex;flex-direction:column;gap:16px;margin-top:4px}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
13168
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SplitCellDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
13169
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SplitCellDialogComponent, isStandalone: true, selector: "app-nod-split-cell-dialog", ngImport: i0, template: "<h2 mat-dialog-title>{{ 'NODER.LABEL.SPLIT_CELLS' | translate }}</h2>\n\n<mat-dialog-content>\n <div class=\"split-dialog-container\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_COLUMNS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"columns\" />\n </mat-form-field>\n\n @if (!availableRows) {\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_ROWS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"rows\" />\n </mat-form-field>\n } @else {\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_ROWS' | translate }}</mat-label>\n <mat-select [(value)]=\"rows\">\n @for (row of availableRows; track row) {\n <mat-option [value]=\"row\">{{ row }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button\n mat-button\n (click)=\"onCancel()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"columns() < 1 || rows() < 1\">\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".split-dialog-container{display:flex;flex-direction:column;gap:16px;margin-top:4px}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i5$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] }); }
12972
13170
  }
12973
13171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SplitCellDialogComponent, decorators: [{
12974
13172
  type: Component,
12975
- args: [{ selector: 'app-nod-split-cell-dialog', standalone: true, imports: [MatDialogModule, MatButtonModule, MatInputModule, FormsModule, TranslateModule], template: "<h2 mat-dialog-title>{{ 'NODER.LABEL.SPLIT_CELLS' | translate }}</h2>\n\n<mat-dialog-content>\n <div class=\"split-dialog-container\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_COLUMNS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"columns\" />\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_ROWS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"rows\" />\n </mat-form-field>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button\n mat-button\n (click)=\"onCancel()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"columns() < 1 || rows() < 1\">\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".split-dialog-container{display:flex;flex-direction:column;gap:16px;margin-top:4px}\n"] }]
12976
- }] });
13173
+ args: [{ selector: 'app-nod-split-cell-dialog', standalone: true, imports: [MatDialogModule, MatButtonModule, MatInputModule, MatSelectModule, FormsModule, TranslateModule], template: "<h2 mat-dialog-title>{{ 'NODER.LABEL.SPLIT_CELLS' | translate }}</h2>\n\n<mat-dialog-content>\n <div class=\"split-dialog-container\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_COLUMNS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"columns\" />\n </mat-form-field>\n\n @if (!availableRows) {\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_ROWS' | translate }}</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"1\"\n [(ngModel)]=\"rows\" />\n </mat-form-field>\n } @else {\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.NUMBER_OF_ROWS' | translate }}</mat-label>\n <mat-select [(value)]=\"rows\">\n @for (row of availableRows; track row) {\n <mat-option [value]=\"row\">{{ row }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button\n mat-button\n (click)=\"onCancel()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"columns() < 1 || rows() < 1\">\n {{ 'NODER.LABEL.APPLY' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".split-dialog-container{display:flex;flex-direction:column;gap:16px;margin-top:4px}\n"] }]
13174
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
13175
+ type: Inject,
13176
+ args: [MAT_DIALOG_DATA]
13177
+ }] }, { type: i1$1.MatDialogRef }] });
12977
13178
 
12978
13179
  class TableOverlayMenuComponent {
12979
13180
  constructor(editorService, overlayService, translateService, dialog) {
@@ -13027,14 +13228,16 @@ class TableOverlayMenuComponent {
13027
13228
  this.overlayService.close();
13028
13229
  }
13029
13230
  onMergeCells() {
13030
- this.editorService.mergeTableCells(this.tableInsertIndex, this.targets.rowIndexes.startIndex, this.targets.rowIndexes.endIndex, this.targets.cellIndexes.startIndex, this.targets.cellIndexes.endIndex, this.sessionId);
13231
+ this.editorService.mergeTableCells(this.tableInsertIndex, this.targets.rowIndexes.startIndex, this.targets.rowIndexes.endIndex - this.targets.rowIndexes.startIndex, this.targets.cellIndexes.startIndex, this.targets.cellIndexes.endIndex - this.targets.cellIndexes.startIndex, this.sessionId);
13031
13232
  this.overlayService.close();
13032
13233
  }
13033
13234
  onSplitCells() {
13034
13235
  this.overlayService.close();
13035
13236
  const dialogRef = this.dialog.open(SplitCellDialogComponent, {
13036
13237
  width: '320px',
13037
- disableClose: true
13238
+ panelClass: 'noder-modal',
13239
+ disableClose: true,
13240
+ data: { verticalMerge: this.verticalMerge }
13038
13241
  });
13039
13242
  dialogRef
13040
13243
  .afterClosed()
@@ -13056,7 +13259,7 @@ class TableOverlayMenuComponent {
13056
13259
  this.overlayService.close();
13057
13260
  }
13058
13261
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableOverlayMenuComponent, deps: [{ token: EditorService }, { token: OverlayService }, { token: i6.TranslateService }, { token: i1$1.MatDialog }], target: i0.ɵɵFactoryTarget.Component }); }
13059
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: TableOverlayMenuComponent, isStandalone: false, selector: "app-nod-table-overlay-menu", inputs: { selectionRange: "selectionRange", targets: "targets", canRemoveRows: "canRemoveRows", canRemoveColumns: "canRemoveColumns", canMergeCells: "canMergeCells", canSplitCells: "canSplitCells", tableInsertIndex: "tableInsertIndex", sessionId: "sessionId" }, ngImport: i0, template: "<div\n class=\"menu-item\"\n (click)=\"onInsertRowsAbove()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsAboveMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertRowsBelow()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsBelowMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsLeft()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsLeftMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsRight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsRightMessage }}\n</div>\n@if (canSplitCells || canMergeCells) {\n <div class=\"menu-separator\">\n <div class=\"menu-separator-top\"></div>\n <div class=\"menu-separator-bottom\"></div>\n </div>\n @if (canMergeCells) {\n <div\n class=\"menu-item\"\n (click)=\"onMergeCells()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-merge-cells\"></mat-icon>\n {{ 'NODER.LABEL.MERGE_CELLS' | translate }}\n </div>\n } @else if (canSplitCells) {\n <div\n class=\"menu-item\"\n (click)=\"onSplitCells()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-split-cells\"></mat-icon>\n {{ 'NODER.LABEL.SPLIT_CELLS' | translate }}\n </div>\n }\n}\n@if (canRemoveRows || canRemoveColumns) {\n <div class=\"menu-separator\">\n <div class=\"menu-separator-top\"></div>\n <div class=\"menu-separator-bottom\"></div>\n </div>\n @if (canRemoveRows) {\n <div\n class=\"menu-item\"\n (click)=\"onRemoveRows()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeRowsMessage }}\n </div>\n }\n @if (canRemoveColumns) {\n <div\n class=\"menu-item\"\n (click)=\"onRemoveColumns()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeColumnsMessage }}\n </div>\n }\n <div\n class=\"menu-item\"\n (click)=\"onRemoveTable()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeTableMessage }}\n </div>\n}\n", styles: [":host{position:absolute;border:1px solid transparent;border-radius:4px;box-shadow:0 2px 6px 2px #3c404326;overflow-y:auto;background:#fff;cursor:default;font-size:13px;margin:0;padding:6px 0}.menu-item{display:flex;flex-direction:row;align-items:center;cursor:pointer;min-height:20px;color:#202124;font-size:16px;letter-spacing:.2px;line-height:20px;padding:6px}.menu-item:hover{background-color:#0000001a}.mat-icon{margin-right:6px;width:20px;height:20px;font-size:20px}.menu-separator{-webkit-user-select:none;user-select:none}.menu-separator .menu-separator-top{padding:4px}.menu-separator .menu-separator-bottom{border-top:1px solid #dadce0;padding:4px}\n"], dependencies: [{ kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
13262
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: TableOverlayMenuComponent, isStandalone: false, selector: "app-nod-table-overlay-menu", inputs: { selectionRange: "selectionRange", targets: "targets", canRemoveRows: "canRemoveRows", canRemoveColumns: "canRemoveColumns", canMergeCells: "canMergeCells", canSplitCells: "canSplitCells", verticalMerge: "verticalMerge", tableInsertIndex: "tableInsertIndex", sessionId: "sessionId" }, ngImport: i0, template: "<div\n class=\"menu-item\"\n (click)=\"onInsertRowsAbove()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsAboveMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertRowsBelow()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertRowsBelowMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsLeft()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsLeftMessage }}\n</div>\n<div\n class=\"menu-item\"\n (click)=\"onInsertColumnsRight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n {{ insertMessages.insertColumnsRightMessage }}\n</div>\n@if (canSplitCells || canMergeCells) {\n <div class=\"menu-separator\">\n <div class=\"menu-separator-top\"></div>\n <div class=\"menu-separator-bottom\"></div>\n </div>\n @if (canMergeCells) {\n <div\n class=\"menu-item\"\n (click)=\"onMergeCells()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-merge-cells\"></mat-icon>\n {{ 'NODER.LABEL.MERGE_CELLS' | translate }}\n </div>\n } @else if (canSplitCells) {\n <div\n class=\"menu-item\"\n (click)=\"onSplitCells()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-split-cells\"></mat-icon>\n {{ 'NODER.LABEL.SPLIT_CELLS' | translate }}\n </div>\n }\n}\n@if (canRemoveRows || canRemoveColumns) {\n <div class=\"menu-separator\">\n <div class=\"menu-separator-top\"></div>\n <div class=\"menu-separator-bottom\"></div>\n </div>\n @if (canRemoveRows) {\n <div\n class=\"menu-item\"\n (click)=\"onRemoveRows()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeRowsMessage }}\n </div>\n }\n @if (canRemoveColumns) {\n <div\n class=\"menu-item\"\n (click)=\"onRemoveColumns()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeColumnsMessage }}\n </div>\n }\n <div\n class=\"menu-item\"\n (click)=\"onRemoveTable()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n {{ removeMessages.removeTableMessage }}\n </div>\n}\n", styles: [":host{position:absolute;border:1px solid transparent;border-radius:4px;box-shadow:0 2px 6px 2px #3c404326;overflow-y:auto;background:#fff;cursor:default;font-size:13px;margin:0;padding:6px 0}.menu-item{display:flex;flex-direction:row;align-items:center;cursor:pointer;min-height:20px;color:#202124;font-size:16px;letter-spacing:.2px;line-height:20px;padding:6px}.menu-item:hover{background-color:#0000001a}.mat-icon{margin-right:6px;width:20px;height:20px;font-size:20px}.menu-separator{-webkit-user-select:none;user-select:none}.menu-separator .menu-separator-top{padding:4px}.menu-separator .menu-separator-bottom{border-top:1px solid #dadce0;padding:4px}\n"], dependencies: [{ kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
13060
13263
  }
13061
13264
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TableOverlayMenuComponent, decorators: [{
13062
13265
  type: Component,
@@ -13073,6 +13276,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
13073
13276
  type: Input
13074
13277
  }], canSplitCells: [{
13075
13278
  type: Input
13279
+ }], verticalMerge: [{
13280
+ type: Input
13076
13281
  }], tableInsertIndex: [{
13077
13282
  type: Input
13078
13283
  }], sessionId: [{
@@ -13124,7 +13329,11 @@ class TableSelection {
13124
13329
  const selectedColumnsCount = targets.cellIndexes.endIndex - targets.cellIndexes.startIndex;
13125
13330
  const canRemoveRows = selectedRowsCount < this.rowMatrix.length;
13126
13331
  const canRemoveColumns = selectedColumnsCount < this.rowMatrix[0].cells.length;
13332
+ const cellIndex = selectionRange.cellIndexes.startIndex;
13333
+ const rowIndex = selectionRange.rowIndexes.startIndex;
13334
+ const verticalMerge = TableOperationsHelper.getVerticalMerge(cellIndex, rowIndex, this.table.rows) + 1;
13127
13335
  const data = {
13336
+ verticalMerge,
13128
13337
  selectionRange,
13129
13338
  targets,
13130
13339
  canRemoveRows,
@@ -13740,20 +13949,20 @@ class NoderTableComponent extends BaseNoderComponent {
13740
13949
  return { rowHeight, hasMerges };
13741
13950
  }
13742
13951
  getCellHeight(rowIndex, cellIndex, cell) {
13743
- if (cell.componentRef.instance.cell.verticalMerge === VerticalMerge.Restart) {
13744
- const isLastVerticalMergedCell = cell.cell !== this.rowMatrix[rowIndex + 1]?.cells[cellIndex].cell;
13745
- if (isLastVerticalMergedCell) {
13746
- let i = rowIndex - 1;
13747
- let currentHeight = cell.cellContentHeight;
13748
- while (cell.cell === this.rowMatrix[i]?.cells[cellIndex].cell) {
13749
- currentHeight -= this.rowMatrix[i].height;
13750
- i--;
13751
- }
13752
- return { height: currentHeight, isMerged: false };
13753
- }
13952
+ if (!cell.componentRef.instance.cell.verticalMerge) {
13953
+ return { height: cell.cellContentHeight, isMerged: false };
13954
+ }
13955
+ const isNotLastVerticalMergedCell = cell.cell === this.rowMatrix[rowIndex + 1]?.cells[cellIndex].cell;
13956
+ if (isNotLastVerticalMergedCell) {
13754
13957
  return { height: 0, isMerged: true };
13755
13958
  }
13756
- return { height: cell.cellContentHeight, isMerged: false };
13959
+ let i = rowIndex - 1;
13960
+ let currentHeight = cell.cellContentHeight;
13961
+ while (cell.cell === this.rowMatrix[i]?.cells[cellIndex].cell) {
13962
+ currentHeight -= this.rowMatrix[i].height;
13963
+ i--;
13964
+ }
13965
+ return { height: currentHeight, isMerged: false };
13757
13966
  }
13758
13967
  fillTableCells() {
13759
13968
  for (let i = 0; i < this.rowMatrix.length; i++) {
@@ -14444,6 +14653,22 @@ class RestorePageFormatsModel {
14444
14653
  }
14445
14654
  }
14446
14655
 
14656
+ class RestoreTableCellsModel {
14657
+ constructor(fields) {
14658
+ if (fields) {
14659
+ Object.assign(this, fields);
14660
+ }
14661
+ }
14662
+ }
14663
+
14664
+ class RestoreTableSplitCellsModel {
14665
+ constructor(fields) {
14666
+ if (fields) {
14667
+ Object.assign(this, fields);
14668
+ }
14669
+ }
14670
+ }
14671
+
14447
14672
  class RestoreWithParagraphModel {
14448
14673
  constructor(fields) {
14449
14674
  if (fields) {
@@ -14458,6 +14683,14 @@ class RestoreWithParagraphModel {
14458
14683
  }
14459
14684
  }
14460
14685
 
14686
+ class SplitTableCellsModel {
14687
+ constructor(fields) {
14688
+ if (fields) {
14689
+ Object.assign(this, fields);
14690
+ }
14691
+ }
14692
+ }
14693
+
14461
14694
  class CommandModel {
14462
14695
  constructor(fields) {
14463
14696
  if (fields) {
@@ -14587,6 +14820,12 @@ class CommandModel {
14587
14820
  if (fields.restoreParagraphStyles) {
14588
14821
  fields.restoreParagraphStyles = new RestoreParagraphStylesModel(fields.restoreParagraphStyles);
14589
14822
  }
14823
+ if (fields.restoreTableCells) {
14824
+ fields.restoreTableCells = new RestoreTableCellsModel(fields.restoreTableCells);
14825
+ }
14826
+ if (fields.restoreTableSplitCells) {
14827
+ fields.restoreTableSplitCells = new RestoreTableSplitCellsModel(fields.restoreTableSplitCells);
14828
+ }
14590
14829
  if (fields.restoreTextStyles) {
14591
14830
  fields.restoreTextStyles = new RestoreTextStylesModel(fields.restoreTextStyles);
14592
14831
  }
@@ -14670,14 +14909,18 @@ class SaveCommandsHelper {
14670
14909
  const insertTableColumns = new InsertTableColumnsModel({ count: columnsCount, inheritIndex, insertIndex, targetIndex });
14671
14910
  return new CommandModel({ commandType: CommandType.InsertTableColumns, insertTableColumns, targets });
14672
14911
  }
14673
- static getMergeTableCellsCommand(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount, targets) {
14674
- const mergeTableCells = new MergeTableCellsModel({ insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount });
14912
+ static getMergeTableCellsCommand(mergeTableCells, targets) {
14675
14913
  return new CommandModel({ commandType: CommandType.MergeTableCells, mergeTableCells, targets });
14676
14914
  }
14677
- static getSplitTableCellsCommand(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, targets) {
14678
- const splitTableCells = new SplitTableCellsModel({ insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount });
14915
+ static getRestoreTableCellsCommand(restoreTableCells, targets) {
14916
+ return new CommandModel({ commandType: CommandType.RestoreTableCells, restoreTableCells, targets });
14917
+ }
14918
+ static getSplitTableCellsCommand(splitTableCells, targets) {
14679
14919
  return new CommandModel({ commandType: CommandType.SplitTableCells, splitTableCells, targets });
14680
14920
  }
14921
+ static getRestoreTableSplitCellsCommand(restoreTableSplitCells, targets) {
14922
+ return new CommandModel({ commandType: CommandType.RestoreTableSplitCells, restoreTableSplitCells, targets });
14923
+ }
14681
14924
  static getInsertTableRowsCommand(rowsCount, inheritIndex, insertIndex, targetIndex, targets) {
14682
14925
  const insertTableRows = new InsertTableRowsModel({ count: rowsCount, inheritIndex, insertIndex, targetIndex });
14683
14926
  return new CommandModel({ commandType: CommandType.InsertTableRows, insertTableRows, targets });
@@ -16356,14 +16599,28 @@ class Editor {
16356
16599
  command = SaveCommandsHelper.getReplaceByContentsModel(operation, this.targets);
16357
16600
  }
16358
16601
  else if (operation instanceof MergeTableCellsModel) {
16359
- this.session.mergeTableCells(operation.insertIndex, operation.rowStartIndex, operation.rowsCount, operation.columnStartIndex, operation.columnCount);
16360
- this.changedTableSize(operation.insertIndex, this.session.sessionId);
16361
- command = SaveCommandsHelper.getMergeTableCellsCommand(operation.insertIndex, operation.rowStartIndex, operation.rowsCount, operation.columnStartIndex, operation.columnCount, this.targets);
16602
+ command = SaveCommandsHelper.getMergeTableCellsCommand(operation, this.targets);
16603
+ const x = operation;
16604
+ const session = this.session.mergeCells(x.insertIndex, x.rowStartIndex, x.rowsCount, x.columnStartIndex, x.columnCount);
16605
+ this.regulatorService.setCurrentSessionById(session.sessionId);
16606
+ this.focus();
16607
+ }
16608
+ else if (operation instanceof RestoreTableCellsModel) {
16609
+ command = SaveCommandsHelper.getRestoreTableCellsCommand(operation, this.targets);
16610
+ const session = this.session.restoreCells(operation.insertIndex, operation.rowIndex, operation.columnIndex, operation.cells);
16611
+ this.regulatorService.setCurrentSessionById(session.sessionId);
16612
+ }
16613
+ else if (operation instanceof RestoreTableSplitCellsModel) {
16614
+ command = SaveCommandsHelper.getRestoreTableSplitCellsCommand(operation, this.targets);
16615
+ const session = this.session.restoreSplitCells(operation.insertIndex, operation.rowIndex, operation.rowCount, operation.columnIndex, operation.columnCount, operation.cells, operation.columns);
16616
+ this.regulatorService.setCurrentSessionById(session.sessionId);
16362
16617
  }
16363
16618
  else if (operation instanceof SplitTableCellsModel) {
16364
- this.session.splitTableCells(operation.insertIndex, operation.rowIndex, operation.columnIndex, operation.targetRowsCount, operation.targetColumnsCount);
16365
- this.changedTableSize(operation.insertIndex, this.session.sessionId);
16366
- command = SaveCommandsHelper.getSplitTableCellsCommand(operation.insertIndex, operation.rowIndex, operation.columnIndex, operation.targetRowsCount, operation.targetColumnsCount, this.targets);
16619
+ command = SaveCommandsHelper.getSplitTableCellsCommand(operation, this.targets);
16620
+ const x = operation;
16621
+ const session = this.session.splitTableCells(x.insertIndex, x.rowIndex, x.columnIndex, x.targetRowsCount, x.targetColumnsCount);
16622
+ this.regulatorService.setCurrentSessionById(session.sessionId);
16623
+ this.focus();
16367
16624
  }
16368
16625
  else {
16369
16626
  throw new Error('Undo/redo is not implemented for the Operation');
@@ -16434,6 +16691,26 @@ class Editor {
16434
16691
  this.history.pushApplyTableCellsStyles(table, model, targets);
16435
16692
  this.commandsService.createCommand(SaveCommandsHelper.getApplyTableCellsStylesCommand(model, targets));
16436
16693
  }
16694
+ saveMergeTableCellsToHistory(table, redo, targets) {
16695
+ const rowIndex = redo.rowStartIndex;
16696
+ const columnIndex = redo.columnStartIndex;
16697
+ const cells = TableOperationsHelper.sliceCells(table.rows, rowIndex, redo.rowsCount, columnIndex, redo.columnCount);
16698
+ const undo = new RestoreTableCellsModel({ insertIndex: table.insertIndex, rowIndex, columnIndex, cells });
16699
+ this.history.pushMergeTableCells(undo, redo);
16700
+ this.commandsService.createCommand(SaveCommandsHelper.getMergeTableCellsCommand(redo, targets));
16701
+ }
16702
+ saveSplitTableCellsToHistory(table, redo, targets) {
16703
+ const insertIndex = table.insertIndex;
16704
+ const rowIndex = redo.rowIndex;
16705
+ const rowCount = redo.targetRowsCount;
16706
+ const columnIndex = redo.columnIndex;
16707
+ const columnCount = redo.targetColumnsCount;
16708
+ const columns = TableOperationsHelper.sliceColumns(table, rowIndex, columnIndex);
16709
+ const cells = TableOperationsHelper.sliceSplitCells(table.rows, rowIndex, columnIndex);
16710
+ const undo = new RestoreTableSplitCellsModel({ insertIndex, rowIndex, rowCount, columnIndex, columnCount, cells, columns });
16711
+ this.history.pushSplitTableCells(undo, redo);
16712
+ this.commandsService.createCommand(SaveCommandsHelper.getSplitTableCellsCommand(redo, targets));
16713
+ }
16437
16714
  saveApplyTextStyleToHistory(startIndex, endIndex, textStyle) {
16438
16715
  const formats = FormatHelper.sliceSection(this.session.model.formats, startIndex, endIndex);
16439
16716
  const linkFormats = LinkHelper.sliceFormats(this.session.model.links, startIndex, endIndex);
@@ -17244,26 +17521,26 @@ class Editor {
17244
17521
  this.changedTableSize(insertIndex, sessionId);
17245
17522
  this.onContentChange();
17246
17523
  }
17247
- mergeTableCells(insertIndex, rowStartIndex, rowEndIndex, columnStartIndex, columnEndIndex, sessionId) {
17524
+ mergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount, sessionId) {
17248
17525
  this.regulatorService.setCustomSessionAsCurrent(sessionId);
17249
- const beforeTable = ContentHelper.documentIndexToParagraphIndex(this.session.displayData.paragraphs, insertIndex);
17250
- this.selection.placeCursor(beforeTable);
17251
- const rowsCount = rowEndIndex - rowStartIndex;
17252
- const columnsCount = columnEndIndex - columnStartIndex;
17253
- this.history.pushMergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount);
17254
- this.commandsService.createCommand(SaveCommandsHelper.getMergeTableCellsCommand(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount, this.targets));
17255
- this.session.mergeTableCells(insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnsCount);
17256
- this.changedTableSize(insertIndex, sessionId);
17526
+ const table = this.session.customComponents.tables.find(x => x.instance.insertIndex === insertIndex).instance;
17527
+ const model = new MergeTableCellsModel({ insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount });
17528
+ this.saveMergeTableCellsToHistory(table.table, model, this.targets);
17529
+ const session = this.session.mergeTableCells(table, insertIndex, rowStartIndex, rowsCount, columnStartIndex, columnCount);
17530
+ this.regulatorService.setCurrentSessionById(session.sessionId);
17531
+ this.onSelectionChange();
17532
+ this.focus();
17257
17533
  this.onContentChange();
17258
17534
  }
17259
17535
  splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, sessionId) {
17260
17536
  this.regulatorService.setCustomSessionAsCurrent(sessionId);
17261
- const beforeTable = ContentHelper.documentIndexToParagraphIndex(this.session.displayData.paragraphs, insertIndex);
17262
- this.selection.placeCursor(beforeTable);
17263
- this.history.pushSplitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
17264
- this.commandsService.createCommand(SaveCommandsHelper.getSplitTableCellsCommand(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount, this.targets));
17265
- this.session.splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
17266
- this.changedTableSize(insertIndex, sessionId);
17537
+ const table = this.session.customComponents.tables.find(x => x.instance.insertIndex === insertIndex).instance;
17538
+ const model = new SplitTableCellsModel({ insertIndex, rowIndex, targetRowsCount, columnIndex, targetColumnsCount });
17539
+ this.saveSplitTableCellsToHistory(table.table, model, this.targets);
17540
+ const session = this.session.splitTableCells(insertIndex, rowIndex, columnIndex, targetRowsCount, targetColumnsCount);
17541
+ this.regulatorService.setCurrentSessionById(session.sessionId);
17542
+ this.onSelectionChange();
17543
+ this.focus();
17267
17544
  this.onContentChange();
17268
17545
  }
17269
17546
  removeTableRows(insertIndex, startIndex, endIndex, sessionId) {
@@ -17563,7 +17840,7 @@ class Editor {
17563
17840
  }
17564
17841
  mergeTableCellsSubscription() {
17565
17842
  return this.editorService.mergeTableCells$.subscribe(data => {
17566
- this.mergeTableCells(data.insertIndex, data.rowStartIndex, data.rowEndIndex, data.columnStartIndex, data.columnEndIndex, data.sessionId);
17843
+ this.mergeTableCells(data.insertIndex, data.rowIndex, data.rowCount, data.columnIndex, data.columnCount, data.sessionId);
17567
17844
  });
17568
17845
  }
17569
17846
  splitTableCellsSubscription() {
@@ -17988,7 +18265,7 @@ class TabSettingsDialogComponent {
17988
18265
  });
17989
18266
  }
17990
18267
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TabSettingsDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
17991
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: TabSettingsDialogComponent, isStandalone: true, selector: "app-nod-tab-settings-dialog", host: { properties: { "class.noder-modal": "this.modal" } }, ngImport: i0, template: "<div class=\"columns\">\n <span class=\"position\">{{ 'NODER.LABEL.POSITION' | translate }}</span>\n <span class=\"alignment\">{{ 'NODER.LABEL.ALIGNMENT' | translate }}</span>\n</div>\n<form\n [formGroup]=\"form\"\n class=\"form\">\n <div\n class=\"tabs\"\n formArrayName=\"tabs\">\n @for (tabCtrl of tabsArray().controls; let i = $index; track i) {\n <div\n class=\"item\"\n [formGroupName]=\"i\">\n <div class=\"tab\">\n <mat-form-field class=\"position\">\n <input\n matInput\n type=\"number\"\n formControlName=\"position\" />\n </mat-form-field>\n <mat-form-field class=\"alignment\">\n <mat-select formControlName=\"alignment\">\n @for (alignment of alignments; track alignment) {\n <mat-option [value]=\"alignment.type\">\n {{ alignment.title | translate }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <button\n id=\"tab-setting-dialog-delete-btn\"\n mat-icon-button\n type=\"button\"\n (click)=\"onRemove(i)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n </button>\n </div>\n </div>\n }\n </div>\n</form>\n<div class=\"tab-actions\">\n <button\n id=\"tab-setting-dialog-add-btn\"\n mat-stroked-button\n (click)=\"onAddTab()\">\n {{ 'NODER.LABEL.ADD' | translate }}\n </button>\n <button\n id=\"tab-setting-dialog-clear-all-btn\"\n mat-stroked-button\n (click)=\"tabsArray().clear()\">\n {{ 'NODER.LABEL.CLEAR_ALL' | translate }}\n </button>\n</div>\n<div class=\"actions\">\n <button\n id=\"tab-setting-dialog-cancel-btn\"\n mat-stroked-button\n (click)=\"onClose()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n id=\"tab-setting-dialog-ok-btn\"\n mat-stroked-button\n (click)=\"onSave()\">\n {{ 'NODER.LABEL.SAVE' | translate }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:550px;width:360px;padding:20px 0 20px 20px;gap:20px}.tabs{flex:1;overflow:hidden auto;display:flex;flex-direction:column}.form{height:350px;display:flex}.item{display:flex}.tab{display:flex;flex:1;gap:20px}.mat-mdc-form-field{width:120px}.columns{display:flex;gap:30%}.columns .position,.columns .alignment{font-weight:700}.tab-actions{display:flex;justify-content:start;gap:10px}.actions{display:flex;justify-content:end;gap:10px;margin-right:20px}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18268
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: TabSettingsDialogComponent, isStandalone: true, selector: "app-nod-tab-settings-dialog", host: { properties: { "class.noder-modal": "this.modal" } }, ngImport: i0, template: "<div class=\"columns\">\n <span class=\"position\">{{ 'NODER.LABEL.POSITION' | translate }}</span>\n <span class=\"alignment\">{{ 'NODER.LABEL.ALIGNMENT' | translate }}</span>\n</div>\n<form\n [formGroup]=\"form\"\n class=\"form\">\n <div\n class=\"tabs\"\n formArrayName=\"tabs\">\n @for (tabCtrl of tabsArray().controls; let i = $index; track i) {\n <div\n class=\"item\"\n [formGroupName]=\"i\">\n <div class=\"tab\">\n <mat-form-field class=\"position\">\n <input\n matInput\n type=\"number\"\n formControlName=\"position\" />\n </mat-form-field>\n <mat-form-field class=\"alignment\">\n <mat-select formControlName=\"alignment\">\n @for (alignment of alignments; track alignment) {\n <mat-option [value]=\"alignment.type\">\n {{ alignment.title | translate }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n <button\n id=\"tab-setting-dialog-delete-btn\"\n mat-icon-button\n type=\"button\"\n (click)=\"onRemove(i)\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-delete\"></mat-icon>\n </button>\n </div>\n </div>\n }\n </div>\n</form>\n<div class=\"tab-actions\">\n <button\n id=\"tab-setting-dialog-add-btn\"\n mat-stroked-button\n (click)=\"onAddTab()\">\n {{ 'NODER.LABEL.ADD' | translate }}\n </button>\n <button\n id=\"tab-setting-dialog-clear-all-btn\"\n mat-stroked-button\n (click)=\"tabsArray().clear()\">\n {{ 'NODER.LABEL.CLEAR_ALL' | translate }}\n </button>\n</div>\n<div class=\"actions\">\n <button\n id=\"tab-setting-dialog-cancel-btn\"\n mat-stroked-button\n (click)=\"onClose()\">\n {{ 'NODER.LABEL.CANCEL' | translate }}\n </button>\n <button\n id=\"tab-setting-dialog-ok-btn\"\n mat-stroked-button\n (click)=\"onSave()\">\n {{ 'NODER.LABEL.SAVE' | translate }}\n </button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:550px;width:360px;padding:20px 0 20px 20px;gap:20px}.tabs{flex:1;overflow:hidden auto;display:flex;flex-direction:column}.form{height:350px;display:flex}.item{display:flex}.tab{display:flex;flex:1;gap:20px}.mat-mdc-form-field{width:120px}.columns{display:flex;gap:30%}.columns .position,.columns .alignment{font-weight:700}.tab-actions{display:flex;justify-content:start;gap:10px}.actions{display:flex;justify-content:end;gap:10px;margin-right:20px}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17992
18269
  }
17993
18270
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TabSettingsDialogComponent, decorators: [{
17994
18271
  type: Component,
@@ -19434,7 +19711,7 @@ class ColorPickerComponent {
19434
19711
  this.colorChange.emit(color);
19435
19712
  }
19436
19713
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19437
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ColorPickerComponent, isStandalone: true, selector: "app-nod-color-picker", inputs: { color: "color", icon: "icon", isDisabled: "isDisabled", palette: "palette", tooltip: "tooltip" }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: "<button\n mat-button\n ngx-colors-trigger\n overlayClassName=\"noder-color-picker-overlay\"\n [disabled]=\"isDisabled\"\n [(ngModel)]=\"color\"\n [palette]=\"palette\"\n [hideTextInput]=\"true\"\n [attachTo]=\"icon\"\n (input)=\"onChangeColor(color)\"\n [matTooltip]=\"tooltip\"\n matTooltipPosition=\"below\">\n <div class=\"color-text\">\n <mat-icon\n fontSet=\"noder-icon\"\n [ngStyle]=\"{ color: color && color !== 'transparent' ? color : 'inherit' }\"\n [fontIcon]=\"icon\"></mat-icon>\n </div>\n</button>\n", styles: ["button{margin:0 3px}.color-text{display:inline-flex;height:22px}.mdc-button{min-width:32px;height:32px;width:32px;padding:0}.mdc-button mat-icon{height:24px;width:24px;font-size:22px}.mdc-button::ng-deep .mdc-button__label{display:flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: NgxColorsModule }, { kind: "directive", type: i5$3.NgxColorsTriggerDirective, selector: "[ngx-colors-trigger]", inputs: ["colorsAnimation", "palette", "format", "formats", "position", "hideTextInput", "hideColorPicker", "attachTo", "overlayClassName", "colorPickerControls", "acceptLabel", "cancelLabel"], outputs: ["change", "input", "slider", "close", "open"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
19714
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ColorPickerComponent, isStandalone: true, selector: "app-nod-color-picker", inputs: { color: "color", icon: "icon", isDisabled: "isDisabled", palette: "palette", tooltip: "tooltip" }, outputs: { colorChange: "colorChange" }, ngImport: i0, template: "<button\n mat-button\n ngx-colors-trigger\n overlayClassName=\"noder-color-picker-overlay\"\n [disabled]=\"isDisabled\"\n [(ngModel)]=\"color\"\n [palette]=\"palette\"\n [hideTextInput]=\"true\"\n [attachTo]=\"icon\"\n (input)=\"onChangeColor(color)\"\n [matTooltip]=\"tooltip\"\n matTooltipPosition=\"below\">\n <div class=\"color-text\">\n <mat-icon\n fontSet=\"noder-icon\"\n [ngStyle]=\"{ color: color && color !== 'transparent' ? color : 'inherit' }\"\n [fontIcon]=\"icon\"></mat-icon>\n </div>\n</button>\n", styles: ["button{margin:0 3px}.color-text{display:inline-flex;height:22px}.mdc-button{min-width:32px;height:32px;width:32px;padding:0}.mdc-button mat-icon{height:24px;width:24px;font-size:22px}.mdc-button::ng-deep .mdc-button__label{display:flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: NgxColorsModule }, { kind: "directive", type: i5$4.NgxColorsTriggerDirective, selector: "[ngx-colors-trigger]", inputs: ["colorsAnimation", "palette", "format", "formats", "position", "hideTextInput", "hideColorPicker", "attachTo", "overlayClassName", "colorPickerControls", "acceptLabel", "cancelLabel"], outputs: ["change", "input", "slider", "close", "open"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
19438
19715
  }
19439
19716
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ColorPickerComponent, decorators: [{
19440
19717
  type: Component,
@@ -20681,7 +20958,7 @@ class PageSetupComponent {
20681
20958
  return customPageSize;
20682
20959
  }
20683
20960
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PageSetupComponent, deps: [{ token: EditorService }, { token: ToolbarCoreService }, { token: i6.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
20684
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: PageSetupComponent, isStandalone: true, selector: "app-nod-page-setup", viewQueries: [{ propertyName: "pageSizeForm", first: true, predicate: ["pageSizeForm"], descendants: true }], ngImport: i0, template: "<div class=\"title\">\n <mat-icon\n fontSet=\"noder-icon\"\n (click)=\"onClose()\"\n fontIcon=\"icon-arrow-forward\" />\n <span>{{ 'NODER.LABEL.PAGE_SETUP' | translate }}</span>\n</div>\n<form #pageSizeForm=\"ngForm\">\n <div class=\"content\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.APPLY_TO' | translate }}</mat-label>\n <mat-select [(value)]=\"selectedDocumentArea\">\n <mat-option [value]=\"documentAreas.WholeDocument\">{{ 'NODER.LABEL.WHOLE_DOCUMENT' | translate }}</mat-option>\n <mat-option [value]=\"documentAreas.ThisSection\">{{ 'NODER.LABEL.THIS_SECTION' | translate }}</mat-option>\n @if (hasSelection$ | async) {\n <mat-option [value]=\"documentAreas.SelectedText\">{{ 'NODER.LABEL.SELECTED_TEXT' | translate }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n <div class=\"orientation\">\n <div class=\"label\">{{ 'NODER.LABEL.ORIENTATION' | translate }}</div>\n <mat-radio-group\n aria-label=\"Select an option\"\n [(ngModel)]=\"pageSize.orientation\"\n name=\"orientation\"\n (change)=\"onPageOrientationChanged()\">\n <mat-radio-button [value]=\"pageOrientations.Portrait\">\n <span>{{ 'NODER.LABEL.PORTRAIT' | translate }}</span>\n </mat-radio-button>\n <mat-radio-button [value]=\"pageOrientations.Landscape\">\n <span>{{ 'NODER.LABEL.LANDSCAPE' | translate }}</span>\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <div class=\"page-format\">\n <div class=\"page-format-tile\">\n <div class=\"label\">{{ 'NODER.LABEL.PAGE_FORMAT' | translate }}</div>\n <div class=\"checkbox-area\">\n <div class=\"checkbox-label\">{{ 'NODER.LABEL.CUSTOM_SIZE' | translate }}</div>\n <mat-checkbox\n [checked]=\"pageSize.isCustom\"\n (change)=\"toggleCustomSize($event)\" />\n </div>\n </div>\n @if (!pageSize.isCustom) {\n <div class=\"page-size\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SIZE' | translate }}</mat-label>\n <mat-select\n [(value)]=\"pageSizeName\"\n (selectionChange)=\"onPageSizeChange()\">\n @for (option of pageSizes; track option) {\n <mat-option [value]=\"option.name\">\n <div class=\"size-option\">\n <span class=\"option-name\">{{ option.name + ' ' }}</span>\n <span class=\"option-size\">{{ option.size }}</span>\n </div>\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n } @else {\n <div class=\"page-custom-size\">\n <mat-form-field\n appearance=\"outline\"\n class=\"size-unit\">\n <mat-label>{{ 'NODER.LABEL.MEASURE' | translate }}</mat-label>\n <mat-select\n [(ngModel)]=\"pageSize.unit\"\n name=\"unit\"\n (valueChange)=\"onUnitChanged($event)\">\n <mat-option [value]=\"sizeUnits.Millimeters\">{{ 'NODER.LABEL.MILLIMETERS' | translate }}</mat-option>\n <mat-option [value]=\"sizeUnits.Inches\">{{ 'NODER.LABEL.INCHES' | translate }}</mat-option>\n </mat-select>\n </mat-form-field>\n <div class=\"size-panel\">\n <mat-form-field\n appearance=\"outline\"\n class=\"custom-width\">\n <mat-label>{{ ('NODER.LABEL.WIDTH' | translate) + currentUnit }}</mat-label>\n <input\n matInput\n [(ngModel)]=\"pageSize.customWidth\"\n name=\"customWidth\" />\n </mat-form-field>\n <button\n mat-button\n (click)=\"onIncrementWidth()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n </button>\n <button\n mat-button\n (click)=\"onDecrementWidth()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\"></mat-icon>\n </button>\n </div>\n <div class=\"size-panel\">\n <mat-form-field\n appearance=\"outline\"\n class=\"custom-height\">\n <mat-label>{{ ('NODER.LABEL.HEIGHT' | translate) + currentUnit }}</mat-label>\n <input\n matInput\n [(ngModel)]=\"pageSize.customHeight\"\n name=\"customHeight\" />\n </mat-form-field>\n <button\n mat-button\n (click)=\"onIncrementHeight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n </button>\n <button\n mat-button\n (click)=\"onDecrementHeight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\"></mat-icon>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n <div class=\"actions\">\n <button\n mat-stroked-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"pageSizeForm.pristine\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n </div>\n</form>\n", styles: [":host{display:flex;flex-direction:column;height:100%;width:400px}.title{margin:12px 16px;height:32px;display:flex;align-items:center;gap:8px}.title span{overflow:hidden;text-overflow:ellipsis;font-size:16px;font-style:normal;font-weight:500;line-height:normal}.content{display:flex;flex-direction:column;height:100%;overflow:hidden;padding:8px 16px 0;gap:24px}.actions{display:flex;justify-content:flex-end;margin:0 16px 16px;gap:10px}.actions .mdc-button{width:32px;height:32px;min-width:32px;padding:0}.actions .mdc-button .mat-icon{margin-right:0;margin-left:0}.orientation{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orientation mat-radio-group{display:flex;width:100%;gap:16px}.label{font-size:14px;font-style:normal;font-weight:400;line-height:normal}.page-format{display:flex;flex-direction:column;gap:16px}.page-format-tile{display:flex;align-items:center;justify-content:space-between}.page-format-tile .checkbox-area{display:flex;align-items:center}.checkbox-label{font-size:12px;font-style:normal;font-weight:400;line-height:normal}.custom-width,.custom-height,.size-unit{width:120px}.page-custom-size{display:flex;flex-direction:column}.size-panel{display:flex;gap:10px}.size-panel .mdc-button{width:40px;height:40px;min-width:40px;padding:0}.size-panel .mdc-button .mat-icon{margin-right:0;margin-left:0}.size-option{display:flex;flex-direction:column}.option-name{font-weight:400}.option-size{font-size:12px}form{display:flex;flex-direction:column;flex:1}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i12.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i12.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20961
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: PageSetupComponent, isStandalone: true, selector: "app-nod-page-setup", viewQueries: [{ propertyName: "pageSizeForm", first: true, predicate: ["pageSizeForm"], descendants: true }], ngImport: i0, template: "<div class=\"title\">\n <mat-icon\n fontSet=\"noder-icon\"\n (click)=\"onClose()\"\n fontIcon=\"icon-arrow-forward\" />\n <span>{{ 'NODER.LABEL.PAGE_SETUP' | translate }}</span>\n</div>\n<form #pageSizeForm=\"ngForm\">\n <div class=\"content\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.APPLY_TO' | translate }}</mat-label>\n <mat-select [(value)]=\"selectedDocumentArea\">\n <mat-option [value]=\"documentAreas.WholeDocument\">{{ 'NODER.LABEL.WHOLE_DOCUMENT' | translate }}</mat-option>\n <mat-option [value]=\"documentAreas.ThisSection\">{{ 'NODER.LABEL.THIS_SECTION' | translate }}</mat-option>\n @if (hasSelection$ | async) {\n <mat-option [value]=\"documentAreas.SelectedText\">{{ 'NODER.LABEL.SELECTED_TEXT' | translate }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n <div class=\"orientation\">\n <div class=\"label\">{{ 'NODER.LABEL.ORIENTATION' | translate }}</div>\n <mat-radio-group\n aria-label=\"Select an option\"\n [(ngModel)]=\"pageSize.orientation\"\n name=\"orientation\"\n (change)=\"onPageOrientationChanged()\">\n <mat-radio-button [value]=\"pageOrientations.Portrait\">\n <span>{{ 'NODER.LABEL.PORTRAIT' | translate }}</span>\n </mat-radio-button>\n <mat-radio-button [value]=\"pageOrientations.Landscape\">\n <span>{{ 'NODER.LABEL.LANDSCAPE' | translate }}</span>\n </mat-radio-button>\n </mat-radio-group>\n </div>\n <div class=\"page-format\">\n <div class=\"page-format-tile\">\n <div class=\"label\">{{ 'NODER.LABEL.PAGE_FORMAT' | translate }}</div>\n <div class=\"checkbox-area\">\n <div class=\"checkbox-label\">{{ 'NODER.LABEL.CUSTOM_SIZE' | translate }}</div>\n <mat-checkbox\n [checked]=\"pageSize.isCustom\"\n (change)=\"toggleCustomSize($event)\" />\n </div>\n </div>\n @if (!pageSize.isCustom) {\n <div class=\"page-size\">\n <mat-form-field appearance=\"outline\">\n <mat-label>{{ 'NODER.LABEL.SIZE' | translate }}</mat-label>\n <mat-select\n [(value)]=\"pageSizeName\"\n (selectionChange)=\"onPageSizeChange()\">\n @for (option of pageSizes; track option) {\n <mat-option [value]=\"option.name\">\n <div class=\"size-option\">\n <span class=\"option-name\">{{ option.name + ' ' }}</span>\n <span class=\"option-size\">{{ option.size }}</span>\n </div>\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n } @else {\n <div class=\"page-custom-size\">\n <mat-form-field\n appearance=\"outline\"\n class=\"size-unit\">\n <mat-label>{{ 'NODER.LABEL.MEASURE' | translate }}</mat-label>\n <mat-select\n [(ngModel)]=\"pageSize.unit\"\n name=\"unit\"\n (valueChange)=\"onUnitChanged($event)\">\n <mat-option [value]=\"sizeUnits.Millimeters\">{{ 'NODER.LABEL.MILLIMETERS' | translate }}</mat-option>\n <mat-option [value]=\"sizeUnits.Inches\">{{ 'NODER.LABEL.INCHES' | translate }}</mat-option>\n </mat-select>\n </mat-form-field>\n <div class=\"size-panel\">\n <mat-form-field\n appearance=\"outline\"\n class=\"custom-width\">\n <mat-label>{{ ('NODER.LABEL.WIDTH' | translate) + currentUnit }}</mat-label>\n <input\n matInput\n [(ngModel)]=\"pageSize.customWidth\"\n name=\"customWidth\" />\n </mat-form-field>\n <button\n mat-button\n (click)=\"onIncrementWidth()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n </button>\n <button\n mat-button\n (click)=\"onDecrementWidth()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\"></mat-icon>\n </button>\n </div>\n <div class=\"size-panel\">\n <mat-form-field\n appearance=\"outline\"\n class=\"custom-height\">\n <mat-label>{{ ('NODER.LABEL.HEIGHT' | translate) + currentUnit }}</mat-label>\n <input\n matInput\n [(ngModel)]=\"pageSize.customHeight\"\n name=\"customHeight\" />\n </mat-form-field>\n <button\n mat-button\n (click)=\"onIncrementHeight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-add\"></mat-icon>\n </button>\n <button\n mat-button\n (click)=\"onDecrementHeight()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-remove\"></mat-icon>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n <div class=\"actions\">\n <button\n mat-stroked-button\n (click)=\"onClose()\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-cancel-thin\" />\n </button>\n <button\n mat-flat-button\n color=\"primary\"\n (click)=\"onApply()\"\n [disabled]=\"pageSizeForm.pristine\">\n <mat-icon\n fontSet=\"noder-icon\"\n fontIcon=\"icon-done-thin\" />\n </button>\n </div>\n</form>\n", styles: [":host{display:flex;flex-direction:column;height:100%;width:400px}.title{margin:12px 16px;height:32px;display:flex;align-items:center;gap:8px}.title span{overflow:hidden;text-overflow:ellipsis;font-size:16px;font-style:normal;font-weight:500;line-height:normal}.content{display:flex;flex-direction:column;height:100%;overflow:hidden;padding:8px 16px 0;gap:24px}.actions{display:flex;justify-content:flex-end;margin:0 16px 16px;gap:10px}.actions .mdc-button{width:32px;height:32px;min-width:32px;padding:0}.actions .mdc-button .mat-icon{margin-right:0;margin-left:0}.orientation{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.orientation mat-radio-group{display:flex;width:100%;gap:16px}.label{font-size:14px;font-style:normal;font-weight:400;line-height:normal}.page-format{display:flex;flex-direction:column;gap:16px}.page-format-tile{display:flex;align-items:center;justify-content:space-between}.page-format-tile .checkbox-area{display:flex;align-items:center}.checkbox-label{font-size:12px;font-style:normal;font-weight:400;line-height:normal}.custom-width,.custom-height,.size-unit{width:120px}.page-custom-size{display:flex;flex-direction:column}.size-panel{display:flex;gap:10px}.size-panel .mdc-button{width:40px;height:40px;min-width:40px;padding:0}.size-panel .mdc-button .mat-icon{margin-right:0;margin-left:0}.size-option{display:flex;flex-direction:column}.option-name{font-weight:400}.option-size{font-size:12px}form{display:flex;flex-direction:column;flex:1}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5$3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i10$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i12.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i12.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20685
20962
  }
20686
20963
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PageSetupComponent, decorators: [{
20687
20964
  type: Component,