UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

204 lines (203 loc) 7.77 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 { __extends } from "tslib"; 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 */ var GridColumnButtonOptionsView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(GridColumnButtonOptionsView, _super); function GridColumnButtonOptionsView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.t = null; _this.s = null; _this.u = null; _this.o = null; _this.p = null; _this.applyButtonClick = null; _this.cancelButtonClick = null; return _this; } GridColumnButtonOptionsView.prototype.m = function () { _super.prototype.m.call(this); var 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); } }; Object.defineProperty(GridColumnButtonOptionsView.prototype, "n", { get: function () { return this.b; }, enumerable: false, configurable: true }); GridColumnButtonOptionsView.prototype.z = function (a) { var _this = this; var b = this.e; var c = this.n; this.t = a; var 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); var e; var f = ((function () { var 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"); var g = this.o; g.clicked = delegateCombine(g.clicked, runOn(this, this.v)); this.o.g6 = "1"; var h; var i = ((function () { var 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; })()); var j = this.p; j.clicked = delegateCombine(j.clicked, runOn(this, this.w)); this.p.g6 = "1"; this.p.e = 2; var 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(); }; GridColumnButtonOptionsView.prototype.aa = function (a) { this.h(a); }; GridColumnButtonOptionsView.prototype.x = function () { if (null != this.applyButtonClick) { this.applyButtonClick(this, EventArgs.empty); } }; GridColumnButtonOptionsView.prototype.y = function () { if (null != this.cancelButtonClick) { this.cancelButtonClick(this, EventArgs.empty); } }; GridColumnButtonOptionsView.prototype.v = function (a, b) { this.x(); }; GridColumnButtonOptionsView.prototype.w = function (a, b) { this.y(); }; GridColumnButtonOptionsView.$t = markType(GridColumnButtonOptionsView, 'GridColumnButtonOptionsView', GridColumnOptionsViewBase.$); return GridColumnButtonOptionsView; }(GridColumnOptionsViewBase)); export { GridColumnButtonOptionsView }; /** * @hidden */ var GridColumnButtonOptions = /** @class */ /*@__PURE__*/ (function (_super) { __extends(GridColumnButtonOptions, _super); function GridColumnButtonOptions() { var _this = _super.call(this) || this; _this.by = "Apply"; _this.b2 = "Cancel"; _this.applyButtonClick = null; _this.cancelButtonClick = null; return _this; } GridColumnButtonOptions.prototype.f = function () { return new GridColumnButtonOptionsView(); }; GridColumnButtonOptions.prototype.bs = function () { return true; }; GridColumnButtonOptions.prototype.be = function (a, b, c) { _super.prototype.be.call(this, a, b, c); switch (a) { case "ApplyButtonCaption": case "CancelButtonCaption": this.bx.m(); break; } }; GridColumnButtonOptions.prototype.onViewInitialized = function () { _super.prototype.onViewInitialized.call(this); var a = this.bx; a.applyButtonClick = delegateCombine(a.applyButtonClick, runOn(this, this.ca)); var b = this.bx; b.cancelButtonClick = delegateCombine(b.cancelButtonClick, runOn(this, this.cb)); }; Object.defineProperty(GridColumnButtonOptions.prototype, "bx", { get: function () { return this.e; }, enumerable: false, configurable: true }); Object.defineProperty(GridColumnButtonOptions.prototype, "bz", { get: function () { return this.by; }, set: function (a) { if (0 == StringComparer.b.compare(a, this.by)) { return; } var b = this.by; this.by = a; this.bc("ApplyButtonCaption", b, this.by); }, enumerable: false, configurable: true }); Object.defineProperty(GridColumnButtonOptions.prototype, "b3", { get: function () { return this.b2; }, set: function (a) { if (0 == StringComparer.b.compare(a, this.b2)) { return; } var b = this.b2; this.b2 = a; this.bc("CancelButtonCaption", b, this.b2); }, enumerable: false, configurable: true }); GridColumnButtonOptions.prototype.provideButtonSection = function (a) { this.bx.z(a); }; GridColumnButtonOptions.prototype.provideMainDiv = function (a) { this.bx.aa(a); }; GridColumnButtonOptions.prototype.ca = function (a, b) { this.b6(); }; GridColumnButtonOptions.prototype.cb = function (a, b) { this.b7(); }; GridColumnButtonOptions.prototype.b6 = function () { if (null != this.applyButtonClick) { this.applyButtonClick(this, new ApplyButtonClickEventArgs()); } }; GridColumnButtonOptions.prototype.b7 = function () { if (null != this.cancelButtonClick) { this.cancelButtonClick(this, new CancelButtonClickEventArgs()); } }; GridColumnButtonOptions.$t = markType(GridColumnButtonOptions, 'GridColumnButtonOptions', GridColumnOptionsSectionBase.$); return GridColumnButtonOptions; }(GridColumnOptionsSectionBase)); export { GridColumnButtonOptions };