UNPKG

igniteui-angular-spreadsheet

Version:

Ignite UI Angular spreadsheet component for displaying and editing Microsoft Excel workbooks for modern web apps.

132 lines (131 loc) 5.28 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { SpreadsheetCellEditManager } from "./SpreadsheetCellEditManager"; import { SpreadsheetCommandExecutingEventArgs } from "./SpreadsheetCommandExecutingEventArgs"; import { SpreadsheetCommandExecutedEventArgs } from "./SpreadsheetCommandExecutedEventArgs"; import { SpreadsheetUtilities } from "./SpreadsheetUtilities"; import { toNullable, Boolean_$type, markType } from "igniteui-angular-core"; import { nullableEquals } from "igniteui-angular-core"; /** * @hidden */ export let SpreadsheetCellEditManager$1 = /*@__PURE__*/ (() => { class SpreadsheetCellEditManager$1 extends SpreadsheetCellEditManager { constructor($tEditor, a) { super(a); this.$tEditor = null; this.$tEditor = $tEditor; this.$type = this.$type.specialize(this.$tEditor); } ac(a) { let b; if (!((() => { let c = this.a4(b); b = c.p0; return c.ret; })())) { return false; } return this.a2(a, b); } ah(a, b = true) { let c; if (!((() => { let d = this.a4(c); c = d.p0; return d.ret; })())) { return false; } switch (a) { case 86: case 85: b = false; break; } if (b) { let d = new SpreadsheetCommandExecutingEventArgs(a, null, c); this.g._g0(d); if (d.cancel) { return true; } } if (!this.a3(a, c)) { return false; } if (b) { this.g._gz(new SpreadsheetCommandExecutedEventArgs(a, null, c)); } return true; } a2(a, b) { if (this.g.isInEditMode) { switch (a) { case 198: case 125: case 126: case 119: case 161: case 120: case 121: case 163: case 162: case 160: return true; } } return true; } a3(a, b) { if (this.g.isInEditMode) { let c = this.g.activeSelectionCellRangeFormat.font; switch (a) { case 119: c._bold$i = toNullable(Boolean_$type, nullableEquals(c._bold$i, true) ? false : true); return true; case 120: c._italic$i = toNullable(Boolean_$type, nullableEquals(c._italic$i, true) ? false : true); return true; case 121: c._strikeout$i = toNullable(Boolean_$type, nullableEquals(c._strikeout$i, true) ? false : true); return true; case 125: c.height = SpreadsheetUtilities.cm(c.height, true); return true; case 126: c.height = SpreadsheetUtilities.cm(c.height, false); return true; case 163: c.superscriptSubscriptStyle = c.superscriptSubscriptStyle == 2 ? 0 : 2; return true; case 162: c.superscriptSubscriptStyle = c.superscriptSubscriptStyle == 1 ? 0 : 1; return true; case 161: c.underlineStyle = SpreadsheetUtilities.al(c.underlineStyle, this.g._d9()); return true; case 160: c.underlineStyle = SpreadsheetUtilities.am(c.underlineStyle, this.g._d9()); return true; case 198: this.g._iv(); return true; } } return false; } a4(a) { if (!this.g.isInEditMode) { a = null; return { ret: false, p0: a }; } else { a = this.a1; return { ret: a != null, p0: a }; } } } SpreadsheetCellEditManager$1.$t = markType(SpreadsheetCellEditManager$1, 'SpreadsheetCellEditManager$1', SpreadsheetCellEditManager.$); return SpreadsheetCellEditManager$1; })();