@uniformdev/design-system 20.35.1-alpha.228 → 20.35.1-alpha.238
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +55 -67
- package/dist/index.js +37 -49
- package/package.json +14 -14
package/dist/esm/index.js
CHANGED
|
@@ -13648,7 +13648,7 @@ import { MarkdownShortcutPlugin } from "@lexical/react/LexicalMarkdownShortcutPl
|
|
|
13648
13648
|
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
13649
13649
|
import { TablePlugin } from "@lexical/react/LexicalTablePlugin";
|
|
13650
13650
|
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
|
|
13651
|
-
import { TableCellNode as TableCellNode3, TableNode, TableRowNode
|
|
13651
|
+
import { TableCellNode as TableCellNode3, TableNode, TableRowNode } from "@lexical/table";
|
|
13652
13652
|
|
|
13653
13653
|
// ../richtext/dist/index.mjs
|
|
13654
13654
|
function isRichTextNode(node) {
|
|
@@ -14859,22 +14859,22 @@ import { css as css98 } from "@emotion/react";
|
|
|
14859
14859
|
import { useLexicalComposerContext as useLexicalComposerContext5 } from "@lexical/react/LexicalComposerContext";
|
|
14860
14860
|
import { useLexicalEditable } from "@lexical/react/useLexicalEditable";
|
|
14861
14861
|
import {
|
|
14862
|
-
$
|
|
14863
|
-
$
|
|
14862
|
+
$computeTableMapSkipCellCheck,
|
|
14863
|
+
$deleteTableColumnAtSelection,
|
|
14864
|
+
$deleteTableRowAtSelection,
|
|
14864
14865
|
$getTableCellNodeFromLexicalNode,
|
|
14865
14866
|
$getTableColumnIndexFromTableCellNode,
|
|
14866
14867
|
$getTableNodeFromLexicalNodeOrThrow,
|
|
14867
14868
|
$getTableRowIndexFromTableCellNode,
|
|
14868
|
-
$
|
|
14869
|
-
$
|
|
14870
|
-
$isTableCellNode,
|
|
14871
|
-
$isTableRowNode,
|
|
14869
|
+
$insertTableColumnAtSelection,
|
|
14870
|
+
$insertTableRowAtSelection,
|
|
14872
14871
|
$isTableSelection,
|
|
14872
|
+
getTableElement,
|
|
14873
14873
|
getTableObserverFromTableElement,
|
|
14874
14874
|
TableCellHeaderStates,
|
|
14875
14875
|
TableCellNode
|
|
14876
14876
|
} from "@lexical/table";
|
|
14877
|
-
import { $
|
|
14877
|
+
import { $getSelection as $getSelection3, $isRangeSelection as $isRangeSelection3, $setSelection } from "lexical";
|
|
14878
14878
|
import { forwardRef as forwardRef27, useCallback as useCallback10, useEffect as useEffect21, useLayoutEffect, useState as useState18 } from "react";
|
|
14879
14879
|
import { jsx as jsx133, jsxs as jsxs88 } from "@emotion/react/jsx-runtime";
|
|
14880
14880
|
function computeSelectionCount(selection) {
|
|
@@ -14959,46 +14959,42 @@ function TableActionMenu({
|
|
|
14959
14959
|
editor.update(() => {
|
|
14960
14960
|
if (tableCellNode.isAttached()) {
|
|
14961
14961
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
14962
|
-
const tableElement2 = editor.getElementByKey(
|
|
14963
|
-
|
|
14964
|
-
|
|
14965
|
-
if (!tableElement2) {
|
|
14966
|
-
throw new Error("Expected to find tableElement in DOM");
|
|
14962
|
+
const tableElement2 = getTableElement(tableNode, editor.getElementByKey(tableNode.getKey()));
|
|
14963
|
+
if (tableElement2 === null) {
|
|
14964
|
+
throw new Error("TableActionMenu: Expected to find tableElement in DOM");
|
|
14967
14965
|
}
|
|
14968
|
-
const
|
|
14969
|
-
if (
|
|
14970
|
-
|
|
14966
|
+
const tableObserver = getTableObserverFromTableElement(tableElement2);
|
|
14967
|
+
if (tableObserver !== null) {
|
|
14968
|
+
tableObserver.$clearHighlight();
|
|
14971
14969
|
}
|
|
14972
|
-
tableNode.markDirty();
|
|
14973
14970
|
updateTableCellNode(tableCellNode.getLatest());
|
|
14974
14971
|
}
|
|
14975
|
-
|
|
14976
|
-
rootNode.selectStart();
|
|
14972
|
+
$setSelection(null);
|
|
14977
14973
|
});
|
|
14978
14974
|
}, [editor, tableCellNode]);
|
|
14979
14975
|
const insertTableRowAtSelection = useCallback10(
|
|
14980
14976
|
(shouldInsertAfter) => {
|
|
14981
14977
|
editor.update(() => {
|
|
14982
|
-
|
|
14978
|
+
for (let i = 0; i < selectionCounts.rows; i++) {
|
|
14979
|
+
$insertTableRowAtSelection(shouldInsertAfter);
|
|
14980
|
+
}
|
|
14983
14981
|
});
|
|
14984
|
-
incrementMenuTriggerKey();
|
|
14985
14982
|
},
|
|
14986
|
-
[editor]
|
|
14983
|
+
[editor, selectionCounts.rows]
|
|
14987
14984
|
);
|
|
14988
14985
|
const insertTableColumnAtSelection = useCallback10(
|
|
14989
14986
|
(shouldInsertAfter) => {
|
|
14990
14987
|
editor.update(() => {
|
|
14991
14988
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
14992
|
-
$
|
|
14989
|
+
$insertTableColumnAtSelection(shouldInsertAfter);
|
|
14993
14990
|
}
|
|
14994
14991
|
});
|
|
14995
|
-
incrementMenuTriggerKey();
|
|
14996
14992
|
},
|
|
14997
14993
|
[editor, selectionCounts.columns]
|
|
14998
14994
|
);
|
|
14999
14995
|
const deleteTableRowAtSelection = useCallback10(() => {
|
|
15000
14996
|
editor.update(() => {
|
|
15001
|
-
$
|
|
14997
|
+
$deleteTableRowAtSelection();
|
|
15002
14998
|
});
|
|
15003
14999
|
incrementMenuTriggerKey();
|
|
15004
15000
|
}, [editor]);
|
|
@@ -15011,7 +15007,7 @@ function TableActionMenu({
|
|
|
15011
15007
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
15012
15008
|
const deleteTableColumnAtSelection = useCallback10(() => {
|
|
15013
15009
|
editor.update(() => {
|
|
15014
|
-
$
|
|
15010
|
+
$deleteTableColumnAtSelection();
|
|
15015
15011
|
});
|
|
15016
15012
|
incrementMenuTriggerKey();
|
|
15017
15013
|
}, [editor]);
|
|
@@ -15019,20 +15015,19 @@ function TableActionMenu({
|
|
|
15019
15015
|
editor.update(() => {
|
|
15020
15016
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
15021
15017
|
const tableRowIndex = $getTableRowIndexFromTableCellNode(tableCellNode);
|
|
15022
|
-
const
|
|
15023
|
-
|
|
15024
|
-
|
|
15025
|
-
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
}
|
|
15030
|
-
tableRow2.getChildren().forEach((tableCell) => {
|
|
15031
|
-
if (!$isTableCellNode(tableCell)) {
|
|
15032
|
-
throw new Error("Expected table cell");
|
|
15018
|
+
const [gridMap] = $computeTableMapSkipCellCheck(tableNode, null, null);
|
|
15019
|
+
const rowCells = /* @__PURE__ */ new Set();
|
|
15020
|
+
const newStyle = tableCellNode.getHeaderStyles() ^ TableCellHeaderStates.ROW;
|
|
15021
|
+
for (let col = 0; col < gridMap[tableRowIndex].length; col++) {
|
|
15022
|
+
const mapCell = gridMap[tableRowIndex][col];
|
|
15023
|
+
if (!(mapCell == null ? void 0 : mapCell.cell)) {
|
|
15024
|
+
continue;
|
|
15033
15025
|
}
|
|
15034
|
-
|
|
15035
|
-
|
|
15026
|
+
if (!rowCells.has(mapCell.cell)) {
|
|
15027
|
+
rowCells.add(mapCell.cell);
|
|
15028
|
+
mapCell.cell.setHeaderStyles(newStyle, TableCellHeaderStates.ROW);
|
|
15029
|
+
}
|
|
15030
|
+
}
|
|
15036
15031
|
clearTableSelection();
|
|
15037
15032
|
});
|
|
15038
15033
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
@@ -15040,25 +15035,18 @@ function TableActionMenu({
|
|
|
15040
15035
|
editor.update(() => {
|
|
15041
15036
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode);
|
|
15042
15037
|
const tableColumnIndex = $getTableColumnIndexFromTableCellNode(tableCellNode);
|
|
15043
|
-
const
|
|
15044
|
-
const
|
|
15045
|
-
|
|
15046
|
-
|
|
15047
|
-
|
|
15048
|
-
|
|
15049
|
-
const tableRow2 = tableRows[r];
|
|
15050
|
-
if (!$isTableRowNode(tableRow2)) {
|
|
15051
|
-
throw new Error("Expected table row");
|
|
15052
|
-
}
|
|
15053
|
-
const tableCells = tableRow2.getChildren();
|
|
15054
|
-
if (tableColumnIndex >= tableCells.length) {
|
|
15038
|
+
const [gridMap] = $computeTableMapSkipCellCheck(tableNode, null, null);
|
|
15039
|
+
const columnCells = /* @__PURE__ */ new Set();
|
|
15040
|
+
const newStyle = tableCellNode.getHeaderStyles() ^ TableCellHeaderStates.COLUMN;
|
|
15041
|
+
for (let row = 0; row < gridMap.length; row++) {
|
|
15042
|
+
const mapCell = gridMap[row][tableColumnIndex];
|
|
15043
|
+
if (!(mapCell == null ? void 0 : mapCell.cell)) {
|
|
15055
15044
|
continue;
|
|
15056
15045
|
}
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15046
|
+
if (!columnCells.has(mapCell.cell)) {
|
|
15047
|
+
columnCells.add(mapCell.cell);
|
|
15048
|
+
mapCell.cell.setHeaderStyles(newStyle, TableCellHeaderStates.COLUMN);
|
|
15060
15049
|
}
|
|
15061
|
-
tableCell.toggleHeaderStyle(TableCellHeaderStates.COLUMN);
|
|
15062
15050
|
}
|
|
15063
15051
|
clearTableSelection();
|
|
15064
15052
|
});
|
|
@@ -15169,7 +15157,7 @@ function TableCellActionMenuContainer({
|
|
|
15169
15157
|
return;
|
|
15170
15158
|
}
|
|
15171
15159
|
const tableCellParentNodeDOM = editor.getElementByKey(tableCellNodeFromSelection.getKey());
|
|
15172
|
-
if (tableCellParentNodeDOM == null) {
|
|
15160
|
+
if (tableCellParentNodeDOM == null || !tableCellNodeFromSelection.isAttached()) {
|
|
15173
15161
|
setTableMenuCellNode(null);
|
|
15174
15162
|
setTableMenuCellNodeElem(null);
|
|
15175
15163
|
return;
|
|
@@ -15187,7 +15175,7 @@ function TableCellActionMenuContainer({
|
|
|
15187
15175
|
$moveMenu();
|
|
15188
15176
|
});
|
|
15189
15177
|
});
|
|
15190
|
-
});
|
|
15178
|
+
}, [editor, $moveMenu]);
|
|
15191
15179
|
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ jsx133(
|
|
15192
15180
|
TableActionMenu,
|
|
15193
15181
|
{
|
|
@@ -15212,11 +15200,11 @@ import { css as css99 } from "@emotion/react";
|
|
|
15212
15200
|
import { useLexicalComposerContext as useLexicalComposerContext6 } from "@lexical/react/LexicalComposerContext";
|
|
15213
15201
|
import { useLexicalEditable as useLexicalEditable2 } from "@lexical/react/useLexicalEditable";
|
|
15214
15202
|
import {
|
|
15215
|
-
$computeTableMapSkipCellCheck,
|
|
15203
|
+
$computeTableMapSkipCellCheck as $computeTableMapSkipCellCheck2,
|
|
15216
15204
|
$getTableNodeFromLexicalNodeOrThrow as $getTableNodeFromLexicalNodeOrThrow2,
|
|
15217
15205
|
$getTableRowIndexFromTableCellNode as $getTableRowIndexFromTableCellNode2,
|
|
15218
|
-
$isTableCellNode
|
|
15219
|
-
$isTableRowNode
|
|
15206
|
+
$isTableCellNode,
|
|
15207
|
+
$isTableRowNode
|
|
15220
15208
|
} from "@lexical/table";
|
|
15221
15209
|
import { calculateZoomLevel } from "@lexical/utils";
|
|
15222
15210
|
import { $getNearestNodeFromDOMNode } from "lexical";
|
|
@@ -15340,7 +15328,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15340
15328
|
editor.update(
|
|
15341
15329
|
() => {
|
|
15342
15330
|
const tableCellNode = $getNearestNodeFromDOMNode(activeCell.elem);
|
|
15343
|
-
if (!$
|
|
15331
|
+
if (!$isTableCellNode(tableCellNode)) {
|
|
15344
15332
|
throw new Error("TableCellResizer: Table cell node not found.");
|
|
15345
15333
|
}
|
|
15346
15334
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow2(tableCellNode);
|
|
@@ -15350,7 +15338,7 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15350
15338
|
throw new Error("Expected table cell to be inside of table row.");
|
|
15351
15339
|
}
|
|
15352
15340
|
const tableRow2 = tableRows[tableRowIndex];
|
|
15353
|
-
if (!$
|
|
15341
|
+
if (!$isTableRowNode(tableRow2)) {
|
|
15354
15342
|
throw new Error("Expected table row");
|
|
15355
15343
|
}
|
|
15356
15344
|
let height = tableRow2.getHeight();
|
|
@@ -15402,11 +15390,11 @@ function TableCellResizer({ editor, positioningAnchorEl }) {
|
|
|
15402
15390
|
editor.update(
|
|
15403
15391
|
() => {
|
|
15404
15392
|
const tableCellNode = $getNearestNodeFromDOMNode(activeCell.elem);
|
|
15405
|
-
if (!$
|
|
15393
|
+
if (!$isTableCellNode(tableCellNode)) {
|
|
15406
15394
|
throw new Error("TableCellResizer: Table cell node not found.");
|
|
15407
15395
|
}
|
|
15408
15396
|
const tableNode = $getTableNodeFromLexicalNodeOrThrow2(tableCellNode);
|
|
15409
|
-
const [tableMap] = $
|
|
15397
|
+
const [tableMap] = $computeTableMapSkipCellCheck2(tableNode, null, null);
|
|
15410
15398
|
const columnIndex = getCellColumnIndex(tableCellNode, tableMap);
|
|
15411
15399
|
if (columnIndex === void 0) {
|
|
15412
15400
|
throw new Error("TableCellResizer: Table column not found.");
|
|
@@ -15560,7 +15548,7 @@ import { $findCellNode } from "@lexical/table";
|
|
|
15560
15548
|
import {
|
|
15561
15549
|
$getSelection as $getSelection4,
|
|
15562
15550
|
$isRangeSelection as $isRangeSelection4,
|
|
15563
|
-
$setSelection,
|
|
15551
|
+
$setSelection as $setSelection2,
|
|
15564
15552
|
COMMAND_PRIORITY_NORMAL as COMMAND_PRIORITY_NORMAL2,
|
|
15565
15553
|
SELECTION_CHANGE_COMMAND as SELECTION_CHANGE_COMMAND2
|
|
15566
15554
|
} from "lexical";
|
|
@@ -15599,7 +15587,7 @@ var TableSelectionPlugin = () => {
|
|
|
15599
15587
|
event.preventDefault();
|
|
15600
15588
|
editor.update(() => {
|
|
15601
15589
|
const selection = closestTableCellNode.select(0, closestTableCellNode.getChildrenSize());
|
|
15602
|
-
$
|
|
15590
|
+
$setSelection2(selection);
|
|
15603
15591
|
});
|
|
15604
15592
|
}
|
|
15605
15593
|
};
|
|
@@ -16278,7 +16266,7 @@ var ParameterRichTextInner = ({
|
|
|
16278
16266
|
CustomCodeNode,
|
|
16279
16267
|
TableNode,
|
|
16280
16268
|
TableCellNode3,
|
|
16281
|
-
|
|
16269
|
+
TableRowNode,
|
|
16282
16270
|
...customNodes != null ? customNodes : []
|
|
16283
16271
|
],
|
|
16284
16272
|
theme: {
|
package/dist/index.js
CHANGED
|
@@ -16852,46 +16852,42 @@ function TableActionMenu({
|
|
|
16852
16852
|
editor.update(() => {
|
|
16853
16853
|
if (tableCellNode.isAttached()) {
|
|
16854
16854
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
16855
|
-
const tableElement2 = editor.getElementByKey(
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
if (!tableElement2) {
|
|
16859
|
-
throw new Error("Expected to find tableElement in DOM");
|
|
16855
|
+
const tableElement2 = (0, import_table.getTableElement)(tableNode, editor.getElementByKey(tableNode.getKey()));
|
|
16856
|
+
if (tableElement2 === null) {
|
|
16857
|
+
throw new Error("TableActionMenu: Expected to find tableElement in DOM");
|
|
16860
16858
|
}
|
|
16861
|
-
const
|
|
16862
|
-
if (
|
|
16863
|
-
|
|
16859
|
+
const tableObserver = (0, import_table.getTableObserverFromTableElement)(tableElement2);
|
|
16860
|
+
if (tableObserver !== null) {
|
|
16861
|
+
tableObserver.$clearHighlight();
|
|
16864
16862
|
}
|
|
16865
|
-
tableNode.markDirty();
|
|
16866
16863
|
updateTableCellNode(tableCellNode.getLatest());
|
|
16867
16864
|
}
|
|
16868
|
-
|
|
16869
|
-
rootNode.selectStart();
|
|
16865
|
+
(0, import_lexical6.$setSelection)(null);
|
|
16870
16866
|
});
|
|
16871
16867
|
}, [editor, tableCellNode]);
|
|
16872
16868
|
const insertTableRowAtSelection = (0, import_react160.useCallback)(
|
|
16873
16869
|
(shouldInsertAfter) => {
|
|
16874
16870
|
editor.update(() => {
|
|
16875
|
-
(0
|
|
16871
|
+
for (let i = 0; i < selectionCounts.rows; i++) {
|
|
16872
|
+
(0, import_table.$insertTableRowAtSelection)(shouldInsertAfter);
|
|
16873
|
+
}
|
|
16876
16874
|
});
|
|
16877
|
-
incrementMenuTriggerKey();
|
|
16878
16875
|
},
|
|
16879
|
-
[editor]
|
|
16876
|
+
[editor, selectionCounts.rows]
|
|
16880
16877
|
);
|
|
16881
16878
|
const insertTableColumnAtSelection = (0, import_react160.useCallback)(
|
|
16882
16879
|
(shouldInsertAfter) => {
|
|
16883
16880
|
editor.update(() => {
|
|
16884
16881
|
for (let i = 0; i < selectionCounts.columns; i++) {
|
|
16885
|
-
(0, import_table.$
|
|
16882
|
+
(0, import_table.$insertTableColumnAtSelection)(shouldInsertAfter);
|
|
16886
16883
|
}
|
|
16887
16884
|
});
|
|
16888
|
-
incrementMenuTriggerKey();
|
|
16889
16885
|
},
|
|
16890
16886
|
[editor, selectionCounts.columns]
|
|
16891
16887
|
);
|
|
16892
16888
|
const deleteTableRowAtSelection = (0, import_react160.useCallback)(() => {
|
|
16893
16889
|
editor.update(() => {
|
|
16894
|
-
(0, import_table.$
|
|
16890
|
+
(0, import_table.$deleteTableRowAtSelection)();
|
|
16895
16891
|
});
|
|
16896
16892
|
incrementMenuTriggerKey();
|
|
16897
16893
|
}, [editor]);
|
|
@@ -16904,7 +16900,7 @@ function TableActionMenu({
|
|
|
16904
16900
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
16905
16901
|
const deleteTableColumnAtSelection = (0, import_react160.useCallback)(() => {
|
|
16906
16902
|
editor.update(() => {
|
|
16907
|
-
(0, import_table.$
|
|
16903
|
+
(0, import_table.$deleteTableColumnAtSelection)();
|
|
16908
16904
|
});
|
|
16909
16905
|
incrementMenuTriggerKey();
|
|
16910
16906
|
}, [editor]);
|
|
@@ -16912,20 +16908,19 @@ function TableActionMenu({
|
|
|
16912
16908
|
editor.update(() => {
|
|
16913
16909
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
16914
16910
|
const tableRowIndex = (0, import_table.$getTableRowIndexFromTableCellNode)(tableCellNode);
|
|
16915
|
-
const
|
|
16916
|
-
|
|
16917
|
-
|
|
16918
|
-
|
|
16919
|
-
|
|
16920
|
-
|
|
16921
|
-
|
|
16922
|
-
}
|
|
16923
|
-
tableRow2.getChildren().forEach((tableCell) => {
|
|
16924
|
-
if (!(0, import_table.$isTableCellNode)(tableCell)) {
|
|
16925
|
-
throw new Error("Expected table cell");
|
|
16911
|
+
const [gridMap] = (0, import_table.$computeTableMapSkipCellCheck)(tableNode, null, null);
|
|
16912
|
+
const rowCells = /* @__PURE__ */ new Set();
|
|
16913
|
+
const newStyle = tableCellNode.getHeaderStyles() ^ import_table.TableCellHeaderStates.ROW;
|
|
16914
|
+
for (let col = 0; col < gridMap[tableRowIndex].length; col++) {
|
|
16915
|
+
const mapCell = gridMap[tableRowIndex][col];
|
|
16916
|
+
if (!(mapCell == null ? void 0 : mapCell.cell)) {
|
|
16917
|
+
continue;
|
|
16926
16918
|
}
|
|
16927
|
-
|
|
16928
|
-
|
|
16919
|
+
if (!rowCells.has(mapCell.cell)) {
|
|
16920
|
+
rowCells.add(mapCell.cell);
|
|
16921
|
+
mapCell.cell.setHeaderStyles(newStyle, import_table.TableCellHeaderStates.ROW);
|
|
16922
|
+
}
|
|
16923
|
+
}
|
|
16929
16924
|
clearTableSelection();
|
|
16930
16925
|
});
|
|
16931
16926
|
}, [editor, tableCellNode, clearTableSelection]);
|
|
@@ -16933,25 +16928,18 @@ function TableActionMenu({
|
|
|
16933
16928
|
editor.update(() => {
|
|
16934
16929
|
const tableNode = (0, import_table.$getTableNodeFromLexicalNodeOrThrow)(tableCellNode);
|
|
16935
16930
|
const tableColumnIndex = (0, import_table.$getTableColumnIndexFromTableCellNode)(tableCellNode);
|
|
16936
|
-
const
|
|
16937
|
-
const
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
const tableRow2 = tableRows[r];
|
|
16943
|
-
if (!(0, import_table.$isTableRowNode)(tableRow2)) {
|
|
16944
|
-
throw new Error("Expected table row");
|
|
16945
|
-
}
|
|
16946
|
-
const tableCells = tableRow2.getChildren();
|
|
16947
|
-
if (tableColumnIndex >= tableCells.length) {
|
|
16931
|
+
const [gridMap] = (0, import_table.$computeTableMapSkipCellCheck)(tableNode, null, null);
|
|
16932
|
+
const columnCells = /* @__PURE__ */ new Set();
|
|
16933
|
+
const newStyle = tableCellNode.getHeaderStyles() ^ import_table.TableCellHeaderStates.COLUMN;
|
|
16934
|
+
for (let row = 0; row < gridMap.length; row++) {
|
|
16935
|
+
const mapCell = gridMap[row][tableColumnIndex];
|
|
16936
|
+
if (!(mapCell == null ? void 0 : mapCell.cell)) {
|
|
16948
16937
|
continue;
|
|
16949
16938
|
}
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16939
|
+
if (!columnCells.has(mapCell.cell)) {
|
|
16940
|
+
columnCells.add(mapCell.cell);
|
|
16941
|
+
mapCell.cell.setHeaderStyles(newStyle, import_table.TableCellHeaderStates.COLUMN);
|
|
16953
16942
|
}
|
|
16954
|
-
tableCell.toggleHeaderStyle(import_table.TableCellHeaderStates.COLUMN);
|
|
16955
16943
|
}
|
|
16956
16944
|
clearTableSelection();
|
|
16957
16945
|
});
|
|
@@ -17062,7 +17050,7 @@ function TableCellActionMenuContainer({
|
|
|
17062
17050
|
return;
|
|
17063
17051
|
}
|
|
17064
17052
|
const tableCellParentNodeDOM = editor.getElementByKey(tableCellNodeFromSelection.getKey());
|
|
17065
|
-
if (tableCellParentNodeDOM == null) {
|
|
17053
|
+
if (tableCellParentNodeDOM == null || !tableCellNodeFromSelection.isAttached()) {
|
|
17066
17054
|
setTableMenuCellNode(null);
|
|
17067
17055
|
setTableMenuCellNodeElem(null);
|
|
17068
17056
|
return;
|
|
@@ -17080,7 +17068,7 @@ function TableCellActionMenuContainer({
|
|
|
17080
17068
|
$moveMenu();
|
|
17081
17069
|
});
|
|
17082
17070
|
});
|
|
17083
|
-
});
|
|
17071
|
+
}, [editor, $moveMenu]);
|
|
17084
17072
|
return tableCellNode != null && tableCellNodeEl != null && tableCellMenuPortalEl != null && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17085
17073
|
TableActionMenu,
|
|
17086
17074
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "20.35.1-alpha.
|
|
3
|
+
"version": "20.35.1-alpha.238+9863606d41",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"exports": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@storybook/theming": "^8.3.3",
|
|
39
39
|
"@types/react": "19.2.2",
|
|
40
40
|
"@types/react-dom": "19.2.2",
|
|
41
|
-
"@uniformdev/canvas": "^20.35.1-alpha.
|
|
42
|
-
"@uniformdev/richtext": "^20.35.1-alpha.
|
|
41
|
+
"@uniformdev/canvas": "^20.35.1-alpha.238+9863606d41",
|
|
42
|
+
"@uniformdev/richtext": "^20.35.1-alpha.238+9863606d41",
|
|
43
43
|
"autoprefixer": "10.4.21",
|
|
44
44
|
"hygen": "6.2.11",
|
|
45
45
|
"jsdom": "20.0.3",
|
|
@@ -59,19 +59,19 @@
|
|
|
59
59
|
"@emotion/css": "11.13.5",
|
|
60
60
|
"@emotion/react": "11.14.0",
|
|
61
61
|
"@internationalized/date": "^3.10.0",
|
|
62
|
-
"@lexical/code": "0.
|
|
63
|
-
"@lexical/link": "0.
|
|
64
|
-
"@lexical/list": "0.
|
|
65
|
-
"@lexical/markdown": "0.
|
|
66
|
-
"@lexical/react": "0.
|
|
67
|
-
"@lexical/rich-text": "0.
|
|
68
|
-
"@lexical/selection": "0.
|
|
69
|
-
"@lexical/table": "0.
|
|
70
|
-
"@lexical/utils": "0.
|
|
62
|
+
"@lexical/code": "0.39.0",
|
|
63
|
+
"@lexical/link": "0.39.0",
|
|
64
|
+
"@lexical/list": "0.39.0",
|
|
65
|
+
"@lexical/markdown": "0.39.0",
|
|
66
|
+
"@lexical/react": "0.39.0",
|
|
67
|
+
"@lexical/rich-text": "0.39.0",
|
|
68
|
+
"@lexical/selection": "0.39.0",
|
|
69
|
+
"@lexical/table": "0.39.0",
|
|
70
|
+
"@lexical/utils": "0.39.0",
|
|
71
71
|
"@monaco-editor/react": "4.7.0",
|
|
72
72
|
"@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.5.0/react-icons-all-files-5.5.0.tgz",
|
|
73
73
|
"fast-equals": "^5.3.2",
|
|
74
|
-
"lexical": "0.
|
|
74
|
+
"lexical": "0.39.0",
|
|
75
75
|
"monaco-editor": "0.54.0",
|
|
76
76
|
"react-aria-components": "^1.13.0",
|
|
77
77
|
"react-hotkeys-hook": "5.2.1",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "9863606d41f4248fa790dbf7da6db6a755bda19a"
|
|
95
95
|
}
|