dist update
This commit is contained in:
parent
d4e3dcc687
commit
e4c09a517d
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -25,9 +25,19 @@ export default class Spreadsheet {
|
||||||
constructor(target: string | HTMLElement, props?: SpreadsheetConstructorProperties);
|
constructor(target: string | HTMLElement, props?: SpreadsheetConstructorProperties);
|
||||||
private getInitialCache;
|
private getInitialCache;
|
||||||
private buildComponent;
|
private buildComponent;
|
||||||
|
/**Destroy spreadsheet DOM element.
|
||||||
|
*
|
||||||
|
* May be usefull when need to rerender component.
|
||||||
|
*/
|
||||||
|
destroy(): void;
|
||||||
private appendTableToTarget;
|
private appendTableToTarget;
|
||||||
|
/** Canvas rendering context 2D.
|
||||||
|
*
|
||||||
|
* Abble to draw on canvas with default CanvasAPI methods
|
||||||
|
*/
|
||||||
get ctx(): CanvasRenderingContext2D;
|
get ctx(): CanvasRenderingContext2D;
|
||||||
get viewProps(): ViewProperties;
|
get viewProps(): ViewProperties;
|
||||||
|
/** Focusing on interactive part of spreadsheet */
|
||||||
focusTable(): void;
|
focusTable(): void;
|
||||||
getCellByCoords(x: number, y: number): Position;
|
getCellByCoords(x: number, y: number): Position;
|
||||||
getCell(position: Position): Cell;
|
getCell(position: Position): Cell;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
var p = Object.defineProperty;
|
var y = Object.defineProperty;
|
||||||
var y = (r, t, e) => t in r ? p(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
var p = (r, t, e) => t in r ? y(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
||||||
var o = (r, t, e) => (y(r, typeof t != "symbol" ? t + "" : t, e), e);
|
var o = (r, t, e) => (p(r, typeof t != "symbol" ? t + "" : t, e), e);
|
||||||
class w {
|
class w {
|
||||||
constructor(t, e) {
|
constructor(t, e) {
|
||||||
o(this, "x");
|
o(this, "x");
|
||||||
|
|
@ -490,6 +490,13 @@ class P {
|
||||||
const t = document.createElement("div");
|
const t = document.createElement("div");
|
||||||
t.appendChild(this.header.element), t.appendChild(this.sheet.element), t.classList.add("content"), this.table.element.appendChild(this.toolbar.element), this.table.element.appendChild(t), this.table.element.appendChild(this.scroller.element), this.table.element.append(this.editor.element);
|
t.appendChild(this.header.element), t.appendChild(this.sheet.element), t.classList.add("content"), this.table.element.appendChild(this.toolbar.element), this.table.element.appendChild(t), this.table.element.appendChild(this.scroller.element), this.table.element.append(this.editor.element);
|
||||||
}
|
}
|
||||||
|
/**Destroy spreadsheet DOM element.
|
||||||
|
*
|
||||||
|
* May be usefull when need to rerender component.
|
||||||
|
*/
|
||||||
|
destroy() {
|
||||||
|
this.table.element.remove();
|
||||||
|
}
|
||||||
appendTableToTarget(t) {
|
appendTableToTarget(t) {
|
||||||
if (typeof t == "string") {
|
if (typeof t == "string") {
|
||||||
const e = document.querySelector(t);
|
const e = document.querySelector(t);
|
||||||
|
|
@ -500,12 +507,17 @@ class P {
|
||||||
}
|
}
|
||||||
t instanceof HTMLElement && t.append(this.table.element);
|
t instanceof HTMLElement && t.append(this.table.element);
|
||||||
}
|
}
|
||||||
|
/** Canvas rendering context 2D.
|
||||||
|
*
|
||||||
|
* Abble to draw on canvas with default CanvasAPI methods
|
||||||
|
*/
|
||||||
get ctx() {
|
get ctx() {
|
||||||
return this.sheet.ctx;
|
return this.sheet.ctx;
|
||||||
}
|
}
|
||||||
get viewProps() {
|
get viewProps() {
|
||||||
return this.config.view;
|
return this.config.view;
|
||||||
}
|
}
|
||||||
|
/** Focusing on interactive part of spreadsheet */
|
||||||
focusTable() {
|
focusTable() {
|
||||||
this.scroller.element.focus();
|
this.scroller.element.focus();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue