pptx-angular-viewer 1.1.36 → 1.1.38

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.
@@ -14750,6 +14750,41 @@ function deleteTableColumn(tableData, colIdx) {
14750
14750
  return { ...tableData, rows: newRows, columnWidths: newWidths };
14751
14751
  }
14752
14752
 
14753
+ /**
14754
+ * Return a new `TablePptxElement` with the text of a single cell replaced.
14755
+ *
14756
+ * The element is not mutated: the affected row and cell are shallow-cloned and
14757
+ * every other row/cell is reused by reference. Returns the original element
14758
+ * unchanged when it carries no `tableData`.
14759
+ *
14760
+ * @param element - The source table element (not mutated).
14761
+ * @param rowIndex - Zero-based row index of the cell.
14762
+ * @param colIndex - Zero-based column index of the cell.
14763
+ * @param text - New plain-text content for the cell.
14764
+ * @returns A new `TablePptxElement` with the cell text applied.
14765
+ *
14766
+ * @example
14767
+ * ```ts
14768
+ * const updated = setCellText(el, 0, 1, "Revenue");
14769
+ * ```
14770
+ */
14771
+ function setCellText$1(element, rowIndex, colIndex, text) {
14772
+ const tableData = element.tableData;
14773
+ if (!tableData) {
14774
+ return element;
14775
+ }
14776
+ const rows = tableData.rows.map((row, ri) => {
14777
+ if (ri !== rowIndex) {
14778
+ return row;
14779
+ }
14780
+ return {
14781
+ ...row,
14782
+ cells: row.cells.map((cell, ci) => (ci === colIndex ? { ...cell, text } : cell)),
14783
+ };
14784
+ });
14785
+ return { ...element, tableData: { ...tableData, rows } };
14786
+ }
14787
+
14753
14788
  /**
14754
14789
  * Pure geometry helpers for the align / distribute editor operations.
14755
14790
  *