UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

184 lines (183 loc) 6.45 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 { GridColumnOptionsViewBase } from "./GridColumnOptionsViewBase"; import { EventArgs, runOn, delegateCombine, markType } from "igniteui-react-core"; import { Size } from "igniteui-react-core"; import { GridColumnOptionsUtilities } from "./GridColumnOptionsUtilities"; import { GridColumnOptionsSectionBase } from "./GridColumnOptionsSectionBase"; import { StringComparer } from "igniteui-react-core"; import { ApplyButtonClickEventArgs } from "./ApplyButtonClickEventArgs"; import { CancelButtonClickEventArgs } from "./CancelButtonClickEventArgs"; /** * @hidden */ export let GridColumnButtonOptionsView = /*@__PURE__*/ (() => { class GridColumnButtonOptionsView extends GridColumnOptionsViewBase { constructor() { super(...arguments); this.t = null; this.s = null; this.u = null; this.o = null; this.p = null; this.applyButtonClick = null; this.cancelButtonClick = null; } m() { super.m(); let a = this.n; a.bh(this.o); a.bh(this.p); if (null != this.s) { this.s.setRawText(a.bz); } if (null != this.u) { this.u.setRawText(a.b3); } } get n() { return this.b; } z(a) { let b = this.e; let c = this.n; this.t = a; let d = b.createElement("hr"); d.setStyleProperty("margin", "4px -7px"); d.setStyleProperty("border-top", "1px solid #dde2eb"); d.setStyleProperty("border-left", "0px"); d.setStyleProperty("border-right", "0px"); d.setStyleProperty("border-bottom", "0px"); this.t.append(d); let e; let f = ((() => { let g = GridColumnOptionsUtilities.g(this.n, b, null, c.p, c.j, Size.empty, this.o, e, this.s); this.o = g.p6; e = g.p7; this.s = g.p8; return g.ret; })()); f.setStyleProperty("margin-left", "1rem"); let g = this.o; g.clicked = delegateCombine(g.clicked, runOn(this, this.v)); this.o.g6 = "1"; let h; let i = ((() => { let j = GridColumnOptionsUtilities.g(this.n, b, null, c.p, c.j, Size.empty, this.p, h, this.u); this.p = j.p6; h = j.p7; this.u = j.p8; return j.ret; })()); let j = this.p; j.clicked = delegateCombine(j.clicked, runOn(this, this.w)); this.p.g6 = "1"; this.p.e = 2; let k = b.createElement("div"); k.setStyleProperty("display", "flex"); k.setStyleProperty("justify-content", "space-between"); k.append(i); k.append(f); this.t.append(k); this.m(); } aa(a) { this.h(a); } x() { if (null != this.applyButtonClick) { this.applyButtonClick(this, EventArgs.empty); } } y() { if (null != this.cancelButtonClick) { this.cancelButtonClick(this, EventArgs.empty); } } v(a, b) { this.x(); } w(a, b) { this.y(); } } GridColumnButtonOptionsView.$t = /*@__PURE__*/ markType(GridColumnButtonOptionsView, 'GridColumnButtonOptionsView', GridColumnOptionsViewBase.$); return GridColumnButtonOptionsView; })(); /** * @hidden */ export let GridColumnButtonOptions = /*@__PURE__*/ (() => { class GridColumnButtonOptions extends GridColumnOptionsSectionBase { constructor() { super(); this.by = "Apply"; this.b2 = "Cancel"; this.applyButtonClick = null; this.cancelButtonClick = null; } f() { return new GridColumnButtonOptionsView(); } bs() { return true; } be(a, b, c) { super.be(a, b, c); switch (a) { case "ApplyButtonCaption": case "CancelButtonCaption": this.bx.m(); break; } } onViewInitialized() { super.onViewInitialized(); let a = this.bx; a.applyButtonClick = delegateCombine(a.applyButtonClick, runOn(this, this.ca)); let b = this.bx; b.cancelButtonClick = delegateCombine(b.cancelButtonClick, runOn(this, this.cb)); } get bx() { return this.e; } get bz() { return this.by; } set bz(a) { if (0 == StringComparer.b.compare(a, this.by)) { return; } let b = this.by; this.by = a; this.bc("ApplyButtonCaption", b, this.by); } get b3() { return this.b2; } set b3(a) { if (0 == StringComparer.b.compare(a, this.b2)) { return; } let b = this.b2; this.b2 = a; this.bc("CancelButtonCaption", b, this.b2); } provideButtonSection(a) { this.bx.z(a); } provideMainDiv(a) { this.bx.aa(a); } ca(a, b) { this.b6(); } cb(a, b) { this.b7(); } b6() { if (null != this.applyButtonClick) { this.applyButtonClick(this, new ApplyButtonClickEventArgs()); } } b7() { if (null != this.cancelButtonClick) { this.cancelButtonClick(this, new CancelButtonClickEventArgs()); } } } GridColumnButtonOptions.$t = /*@__PURE__*/ markType(GridColumnButtonOptions, 'GridColumnButtonOptions', GridColumnOptionsSectionBase.$); return GridColumnButtonOptions; })();