@lexical/table
Advanced tools
Comparing version 0.17.1-nightly.20240826.0 to 0.17.2-nightly.20240827.0
@@ -79,4 +79,4 @@ /** | ||
a=E();for(q=0;q<b;q++){let {cell:r,startRow:w}=m[q];w===g?(p=ka(m[q].cell.__headerState,x.COLUMN),a.append(A(p).append(u.$createParagraphNode()))):r.setRowSpan(r.__rowSpan+1)}b=d.getChildAtIndex(g);I(b)||J(145);b.insertBefore(a)}};exports.$isTableCellNode=B;exports.$isTableNode=N;exports.$isTableRowNode=I;exports.$isTableSelection=R;exports.$removeTableRowAtIndex=function(a,b){let c=a.getChildren();if(b>=c.length||0>b)throw Error("Expected table cell to be inside of table row.");c[b].remove();return a}; | ||
exports.$unmergeCell=function(){var a=u.$getSelection();u.$isRangeSelection(a)||R(a)||J(188);a=a.anchor.getNode();let [b,c,d]=Q(a);a=b.__colSpan;let e=b.__rowSpan;if(1<a){for(var f=1;f<a;f++)b.insertAfter(A(x.NO_STATUS));b.setColSpan(1)}if(1<e){let [q,p]=P(d,b,b),{startColumn:r,startRow:w}=p,k;for(f=1;f<e;f++){var g=w+f;let l=q[g];k=(k||c).getNextSibling();I(k)||J(125);var m=null;for(let n=0;n<r;n++){let t=l[n],v=t.cell;t.startRow===g&&(m=v);1<v.__colSpan&&(n+=v.__colSpan-1)}if(null===m)for(m=0;m< | ||
a;m++)la(k,A(x.NO_STATUS));else for(g=0;g<a;g++)m.insertAfter(A(x.NO_STATUS))}b.setRowSpan(1)}};exports.INSERT_TABLE_COMMAND=da;exports.TableCellHeaderStates=x;exports.TableCellNode=y;exports.TableNode=Ka;exports.TableObserver=ta;exports.TableRowNode=D; | ||
exports.$unmergeCell=function(){var a=u.$getSelection();u.$isRangeSelection(a)||R(a)||J(188);a=a.anchor.getNode();let [b,c,d]=Q(a);a=b.__colSpan;let e=b.__rowSpan;if(1<a){for(var f=1;f<a;f++)b.insertAfter(A(x.NO_STATUS).append(u.$createParagraphNode()));b.setColSpan(1)}if(1<e){let [q,p]=P(d,b,b),{startColumn:r,startRow:w}=p,k;for(f=1;f<e;f++){var g=w+f;let l=q[g];k=(k||c).getNextSibling();I(k)||J(125);var m=null;for(let n=0;n<r;n++){let t=l[n],v=t.cell;t.startRow===g&&(m=v);1<v.__colSpan&&(n+=v.__colSpan- | ||
1)}if(null===m)for(m=0;m<a;m++)la(k,A(x.NO_STATUS).append(u.$createParagraphNode()));else for(g=0;g<a;g++)m.insertAfter(A(x.NO_STATUS).append(u.$createParagraphNode()))}b.setRowSpan(1)}};exports.INSERT_TABLE_COMMAND=da;exports.TableCellHeaderStates=x;exports.TableCellNode=y;exports.TableNode=Ka;exports.TableObserver=ta;exports.TableRowNode=D; | ||
exports.applyTableHandlers=function(a,b,c,d){function e(k){k=a.getCordsFromCellNode(k,g.table);return a.getDOMCellFromCordsOrThrow(k.x,k.y,g.table)}let f=c.getRootElement();if(null===f)throw Error("No root element.");let g=new ta(c,a.getKey()),m=c._window||window;b.__lexicalTableSelection=g;let q=()=>{const k=()=>{g.isSelecting=!1;m.removeEventListener("mouseup",k);m.removeEventListener("mousemove",l)},l=n=>{setTimeout(()=>{if(1!==(n.buttons&1)&&g.isSelecting)g.isSelecting=!1,m.removeEventListener("mouseup", | ||
@@ -83,0 +83,0 @@ k),m.removeEventListener("mousemove",l);else{var t=ua(n.target);null===t||g.anchorX===t.x&&g.anchorY===t.y||(n.preventDefault(),g.setFocusCellForSelection(t))}},0)};return{onMouseMove:l,onMouseUp:k}};b.addEventListener("mousedown",k=>{setTimeout(()=>{if(0===k.button&&m){var l=ua(k.target);null!==l&&(Z(k),g.setAnchorCellForSelection(l));var {onMouseUp:n,onMouseMove:t}=q();g.isSelecting=!0;m.addEventListener("mouseup",n);m.addEventListener("mousemove",t)}},0)});let p=k=>{0===k.button&&c.update(()=> |
@@ -11,8 +11,8 @@ { | ||
"license": "MIT", | ||
"version": "0.17.1-nightly.20240826.0", | ||
"version": "0.17.2-nightly.20240827.0", | ||
"main": "LexicalTable.js", | ||
"types": "index.d.ts", | ||
"dependencies": { | ||
"@lexical/utils": "0.17.1-nightly.20240826.0", | ||
"lexical": "0.17.1-nightly.20240826.0" | ||
"@lexical/utils": "0.17.2-nightly.20240827.0", | ||
"lexical": "0.17.2-nightly.20240827.0" | ||
}, | ||
@@ -19,0 +19,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
318542
6293
+ Added@lexical/list@0.17.2-nightly.20240827.0(transitive)
+ Added@lexical/selection@0.17.2-nightly.20240827.0(transitive)
+ Added@lexical/utils@0.17.2-nightly.20240827.0(transitive)
+ Addedlexical@0.17.2-nightly.20240827.0(transitive)
- Removed@lexical/list@0.17.1-nightly.20240826.0(transitive)
- Removed@lexical/selection@0.17.1-nightly.20240826.0(transitive)
- Removed@lexical/utils@0.17.1-nightly.20240826.0(transitive)
- Removedlexical@0.17.1-nightly.20240826.0(transitive)