pptx-angular-viewer 1.1.38 → 1.1.39
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.
|
@@ -14768,7 +14768,7 @@ function deleteTableColumn(tableData, colIdx) {
|
|
|
14768
14768
|
* const updated = setCellText(el, 0, 1, "Revenue");
|
|
14769
14769
|
* ```
|
|
14770
14770
|
*/
|
|
14771
|
-
function setCellText
|
|
14771
|
+
function setCellText(element, rowIndex, colIndex, text) {
|
|
14772
14772
|
const tableData = element.tableData;
|
|
14773
14773
|
if (!tableData) {
|
|
14774
14774
|
return element;
|
|
@@ -35983,6 +35983,11 @@ function inputValue(event) {
|
|
|
35983
35983
|
*
|
|
35984
35984
|
* @module angular-viewer/table-data-helpers
|
|
35985
35985
|
*/
|
|
35986
|
+
// `setCellText` is the framework-agnostic single-cell text edit. It lives in
|
|
35987
|
+
// `pptx-viewer-shared` (`render/table-cell-edit`) so the three bindings share
|
|
35988
|
+
// one copy; Angular consumes the vendored, inlined copy under
|
|
35989
|
+
// `../internal/shared-src`. Re-exported here so existing consumers and the
|
|
35990
|
+
// colocated test keep importing it from this module unchanged.
|
|
35986
35991
|
// ---------------------------------------------------------------------------
|
|
35987
35992
|
// Internal utilities
|
|
35988
35993
|
// ---------------------------------------------------------------------------
|
|
@@ -36019,39 +36024,6 @@ function clearAllMerges(rows) {
|
|
|
36019
36024
|
}));
|
|
36020
36025
|
}
|
|
36021
36026
|
// ---------------------------------------------------------------------------
|
|
36022
|
-
// setCellText
|
|
36023
|
-
// ---------------------------------------------------------------------------
|
|
36024
|
-
/**
|
|
36025
|
-
* Return a new `TablePptxElement` with the text of a single cell updated.
|
|
36026
|
-
*
|
|
36027
|
-
* @param element - The source table element (not mutated).
|
|
36028
|
-
* @param rowIndex - Zero-based row index.
|
|
36029
|
-
* @param colIndex - Zero-based column index.
|
|
36030
|
-
* @param text - New text content for the cell.
|
|
36031
|
-
* @returns A new `TablePptxElement`.
|
|
36032
|
-
*
|
|
36033
|
-
* @example
|
|
36034
|
-
* ```ts
|
|
36035
|
-
* const updated = setCellText(el, 0, 1, "Revenue");
|
|
36036
|
-
* ```
|
|
36037
|
-
*/
|
|
36038
|
-
function setCellText(element, rowIndex, colIndex, text) {
|
|
36039
|
-
const tableData = element.tableData;
|
|
36040
|
-
if (!tableData) {
|
|
36041
|
-
return element;
|
|
36042
|
-
}
|
|
36043
|
-
const rows = tableData.rows.map((row, ri) => {
|
|
36044
|
-
if (ri !== rowIndex) {
|
|
36045
|
-
return row;
|
|
36046
|
-
}
|
|
36047
|
-
return {
|
|
36048
|
-
...row,
|
|
36049
|
-
cells: row.cells.map((cell, ci) => (ci === colIndex ? { ...cell, text } : cell)),
|
|
36050
|
-
};
|
|
36051
|
-
});
|
|
36052
|
-
return { ...element, tableData: { ...tableData, rows } };
|
|
36053
|
-
}
|
|
36054
|
-
// ---------------------------------------------------------------------------
|
|
36055
36027
|
// addTableRow
|
|
36056
36028
|
// ---------------------------------------------------------------------------
|
|
36057
36029
|
/**
|