UNPKG

igniteui-webcomponents-grids

Version:

Ignite UI Web Components grid components.

311 lines (310 loc) 11.1 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 { DomWrapper_$type } from "igniteui-webcomponents-core"; import { List$1 } from "igniteui-webcomponents-core"; import { Size } from "igniteui-webcomponents-core"; import { GridColumnOptionsUtilities } from "./GridColumnOptionsUtilities"; import { runOn, delegateCombine, markType } from "igniteui-webcomponents-core"; import { GridColumnOptionsSimpleSectionBase } from "./GridColumnOptionsSimpleSectionBase"; import { StringComparer } from "igniteui-webcomponents-core"; /** * @hidden */ var GridColumnPinOptionsView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(GridColumnPinOptionsView, _super); function GridColumnPinOptionsView() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.y = null; _this.z = null; _this.q = null; _this.v = null; _this.u = null; _this.o = null; _this.p = null; _this.r = null; _this.s = null; _this.t = false; return _this; } Object.defineProperty(GridColumnPinOptionsView.prototype, "n", { get: function () { return this.b; }, enumerable: false, configurable: true }); GridColumnPinOptionsView.prototype.w = function () { var _this = this; var a = this.e; var b = this.n; this.u = a.createElement("div"); var c = new List$1(DomWrapper_$type, 0); var d = ((function () { var e = GridColumnOptionsUtilities.g(_this.n, a, GridColumnPinOptionsView.aa, b.p, b.j, new Size(1, 18, 18), _this.o, _this.r, _this.y, true, true); _this.o = e.p6; _this.r = e.p7; _this.y = e.p8; return e.ret; })()); var e = ((function () { var f = GridColumnOptionsUtilities.g(_this.n, a, GridColumnPinOptionsView.ab, b.p, b.j, new Size(1, 18, 18), _this.p, _this.s, _this.z, false, true); _this.p = f.p6; _this.s = f.p7; _this.z = f.p8; return f.ret; })()); c.add(d); c.add(e); var f = [this.o, this.p]; var g = ((function () { var h = GridColumnOptionsUtilities.h(_this.n, a, f, c, b.p, b.j, _this.q); _this.q = h.p6; return h.ret; })()); var h = this.q; h.selectionChanged = delegateCombine(h.selectionChanged, runOn(this, this.ae)); this.u.append(g); return this.u; }; GridColumnPinOptionsView.prototype.x = function () { var a = this.e.createElement("label"); return a; }; GridColumnPinOptionsView.prototype.af = function () { if (null == this.r || null == this.s) { return; } var a = this.n.b4; var t1 = a; L0: while (true) { switch (t1) { case 0: this.r.svgPath = GridColumnPinOptionsView.aa; this.s.svgPath = GridColumnPinOptionsView.ab; break; case 1: this.r.svgPath = GridColumnPinOptionsView.ac; this.s.svgPath = GridColumnPinOptionsView.ab; break; case 2: this.r.svgPath = GridColumnPinOptionsView.aa; this.s.svgPath = GridColumnPinOptionsView.ad; break; default: t1 = 0; continue L0; } break; } }; GridColumnPinOptionsView.prototype.ag = function () { if (null == this.q) { return; } this.t = true; try { var a = this.n.b4; switch (a) { case 0: this.q.d = []; break; case 1: this.q.d = [0]; break; case 2: this.q.d = [1]; break; } } finally { this.t = false; } }; GridColumnPinOptionsView.prototype.k = function () { _super.prototype.k.call(this); if (null == this.g || null == this.e) { return; } this.v = this.x(); var a = this.w(); var b = this.e; var c = this.g; c.setStyleProperty("display", "flex"); c.setStyleProperty("flex-direction", "row"); c.setStyleProperty("flex-wrap", "no-wrap"); c.setStyleProperty("justify-content", "space-between"); c.setStyleProperty("align-items", "center"); c.append(this.v); c.append(a); }; GridColumnPinOptionsView.prototype.m = function () { _super.prototype.m.call(this); this.ag(); this.af(); var a = this.n; if (null != this.v) { this.v.setRawText(a.by); if (a.bw) { this.g.setStyleProperty("display", "flex"); this.v.setStyleProperty("display", "inline-block"); } else { this.g.setStyleProperty("display", "block"); this.v.setStyleProperty("display", "none"); } this.v.setStyleProperty("font", a.aa.fontString); } if (null != this.y) { this.y.setRawText(this.n.b6); } if (null != this.z) { this.z.setRawText(this.n.ca); } a.bh(this.o); a.bh(this.p); a.bg(this.q); }; GridColumnPinOptionsView.prototype.ae = function (a, b) { if (this.t) { return; } var c; if (null == this.q || null == this.q.d || 0 == this.q.d.length) { c = 0; } else { if (this.q.d.length > 1) { } var d = this.q.d[0]; switch (d) { case 0: c = 1; break; case 1: c = 2; break; default: c = 0; break; } } this.n.b4 = c; this.af(); }; GridColumnPinOptionsView.$t = markType(GridColumnPinOptionsView, 'GridColumnPinOptionsView', GridColumnOptionsViewBase.$); GridColumnPinOptionsView.aa = "M13.2,3.8l7.1,7.1l-2.8-0.1l-3.4,3.4l0.1,4.2l-3.5-3.5l-5.4,5.4l-1.4,0l0-1.4l5.4-5.4L5.7,9.8l4.2,0.1l3.4-3.4L13.2,3.8z"; GridColumnPinOptionsView.ab = "M10.8,3.8l-7.1,7.1l2.8-0.1l3.4,3.4l-0.1,4.2l3.5-3.5l5.4,5.4l1.4,0l0-1.4l-5.4-5.4l3.5-3.5l-4.2,0.1l-3.4-3.4L10.8,3.8z"; GridColumnPinOptionsView.ac = "M3,3.4l19,17.1l-1.3,1.2L12.1,14l-4.9,4.9l-1.4-0.1l-0.1-1.4l4.8-4.8l-8.9-8L3,3.4z M14.9,2.3l7.5,7.5l-2.8-0.1L16.1,13 l0,0.3l-5.4-4.8l0.9,0L15,5.1L14.9,2.3z"; GridColumnPinOptionsView.ad = "M21,3.4L2,20.5l1.3,1.2l8.5-7.7l4.9,4.9l1.4-0.1l0.1-1.4l-4.8-4.8l8.9-8L21,3.4z M9.1,2.3L1.7,9.8l2.8-0.1L7.9,13l0,0.3 l5.4-4.8l-0.9,0L9,5.1L9.1,2.3z"; return GridColumnPinOptionsView; }(GridColumnOptionsViewBase)); export { GridColumnPinOptionsView }; /** * @hidden */ var GridColumnPinOptions = /** @class */ /*@__PURE__*/ (function (_super) { __extends(GridColumnPinOptions, _super); function GridColumnPinOptions() { var _this = _super.call(this) || this; _this.b3 = 0; _this.b5 = "Left"; _this.b9 = "Right"; return _this; } GridColumnPinOptions.prototype.f = function () { return new GridColumnPinOptionsView(); }; GridColumnPinOptions.prototype.get_b0 = function () { return "Pin"; }; Object.defineProperty(GridColumnPinOptions.prototype, "b0", { get: function () { return this.get_b0(); }, enumerable: false, configurable: true }); GridColumnPinOptions.prototype.bs = function () { if (null == this.column) { return false; } return true; }; GridColumnPinOptions.prototype.a6 = function () { var a = this.column; this.b3 = a != null ? a.il : 0; _super.prototype.a6.call(this); }; GridColumnPinOptions.prototype.a7 = function (a, b) { _super.prototype.a7.call(this, a, b); var c = this.column; if (null == c) { return; } switch (b.propertyName) { case "Pinned": this.b3 = c != null ? c.il : 0; this.b2.m(); break; } }; GridColumnPinOptions.prototype.be = function (a, b, c) { _super.prototype.be.call(this, a, b, c); switch (a) { case "PinLeftCaption": case "PinRightCaption": this.b2.m(); break; } }; Object.defineProperty(GridColumnPinOptions.prototype, "b4", { get: function () { var a = this.column; if (null != a) { return a.il; } return this.b3; }, set: function (a) { this.b3 = a; var b = this.c; var c = this.column; if (null != b && null != c) { b.pinColumn(c, this.b3); c.m0("Pinned"); } }, enumerable: false, configurable: true }); Object.defineProperty(GridColumnPinOptions.prototype, "b2", { get: function () { return this.e; }, enumerable: false, configurable: true }); Object.defineProperty(GridColumnPinOptions.prototype, "b6", { get: function () { return this.b5; }, set: function (a) { if (0 == StringComparer.b.compare(a, this.b5)) { return; } var b = this.b5; this.b5 = a; this.bc("PinLeftCaption", b, this.b5); }, enumerable: false, configurable: true }); Object.defineProperty(GridColumnPinOptions.prototype, "ca", { get: function () { return this.b9; }, set: function (a) { if (0 == StringComparer.b.compare(a, this.b9)) { return; } var b = this.b9; this.b9 = a; this.bc("PinRightCaption", b, this.b9); }, enumerable: false, configurable: true }); GridColumnPinOptions.$t = markType(GridColumnPinOptions, 'GridColumnPinOptions', GridColumnOptionsSimpleSectionBase.$); return GridColumnPinOptions; }(GridColumnOptionsSimpleSectionBase)); export { GridColumnPinOptions };