Skip to content

Commit

Permalink
Removed console.log in lib ><
Browse files Browse the repository at this point in the history
  • Loading branch information
renanlecaro committed May 2, 2024
1 parent 5ff4531 commit 5b8f4ed
Show file tree
Hide file tree
Showing 12 changed files with 19,478 additions and 144 deletions.
80 changes: 38 additions & 42 deletions dist/index-pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
r(this, "_height", 1),
r(this, "_data", new s()),
r(this, "paste", (t) => {
if ((console.log("paste", t), this._editing)) return;
if (this._editing) return;
t.preventDefault();
const e = (function (t) {
var e,
Expand Down Expand Up @@ -170,7 +170,7 @@
});
}),
r(this, "copy", (t) => {
if ((console.log("copy", t), this._editing)) return;
if (this._editing) return;
const e = this._getSelectionAsArray();
e &&
(t.preventDefault(),
Expand Down Expand Up @@ -198,52 +198,48 @@
));
}),
r(this, "cut", (t) => {
console.log("cut", t),
this._editing ||
(this.copy(t), this._setAllSelectedCellsTo(""));
this._editing ||
(this.copy(t), this._setAllSelectedCellsTo(""));
}),
r(this, "keydown", (t) => {
console.log("keydown v2", t),
t.ctrlKey ||
t.metaKey ||
(this._selectionStart &&
("Escape" === t.key &&
this._editing &&
t.ctrlKey ||
t.metaKey ||
(this._selectionStart &&
("Escape" === t.key &&
this._editing &&
(t.preventDefault(),
this._revertEdit(),
this._stopEditing()),
"Enter" === t.key &&
(t.preventDefault(),
this._tabCursorInSelection(!1, t.shiftKey ? -1 : 1)),
"Tab" === t.key &&
(t.preventDefault(),
this._tabCursorInSelection(!0, t.shiftKey ? -1 : 1)),
this._editing ||
("F2" === t.key &&
(t.preventDefault(), this._startEditing(this._focus)),
("Delete" !== t.key && "Backspace" !== t.key) ||
(t.preventDefault(), this._setAllSelectedCellsTo("")),
"ArrowDown" === t.key &&
(t.preventDefault(),
this._revertEdit(),
this._stopEditing()),
"Enter" === t.key &&
this._moveCursor({ y: 1 }, t.shiftKey)),
"ArrowUp" === t.key &&
(t.preventDefault(),
this._tabCursorInSelection(!1, t.shiftKey ? -1 : 1)),
"Tab" === t.key &&
this._moveCursor({ y: -1 }, t.shiftKey)),
"ArrowLeft" === t.key &&
(t.preventDefault(),
this._tabCursorInSelection(!0, t.shiftKey ? -1 : 1)),
this._moveCursor({ x: -1 }, t.shiftKey)),
"ArrowRight" === t.key &&
(t.preventDefault(),
this._moveCursor({ x: 1 }, t.shiftKey))),
1 !== t.key.length ||
this._editing ||
("F2" === t.key &&
(t.preventDefault(),
this._startEditing(this._focus)),
("Delete" !== t.key && "Backspace" !== t.key) ||
(t.preventDefault(),
this._setAllSelectedCellsTo("")),
"ArrowDown" === t.key &&
(t.preventDefault(),
this._moveCursor({ y: 1 }, t.shiftKey)),
"ArrowUp" === t.key &&
(t.preventDefault(),
this._moveCursor({ y: -1 }, t.shiftKey)),
"ArrowLeft" === t.key &&
(t.preventDefault(),
this._moveCursor({ x: -1 }, t.shiftKey)),
"ArrowRight" === t.key &&
(t.preventDefault(),
this._moveCursor({ x: 1 }, t.shiftKey))),
1 !== t.key.length ||
this._editing ||
this._changeSelectedCellsStyle(() => {
const { x: t, y: e } = this._focus;
this._startEditing({ x: t, y: e }),
(this._getCell(t, e).firstChild.value = "");
})));
this._changeSelectedCellsStyle(() => {
const { x: t, y: e } = this._focus;
this._startEditing({ x: t, y: e }),
(this._getCell(t, e).firstChild.value = "");
})));
}),
r(this, "_selecting", !1),
r(this, "_selectionStart", null),
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

Binary file modified dist/index.js.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit 5b8f4ed

Please sign in to comment.