UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

93 lines (92 loc) 3.99 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 { Base, markType } from "igniteui-react-core"; import { Size } from "igniteui-react-core"; import { XButton } from "igniteui-react-inputs"; import { XIcon } from "igniteui-react-inputs"; import { stringFormat } from "igniteui-react-core"; import { stringEmpty } from "igniteui-react-core"; /** * @hidden */ export let MultiColumnComboBoxUtilities = /*@__PURE__*/ (() => { class MultiColumnComboBoxUtilities extends Base { static a(a, b, c, d, e, f, g, h, i) { let j = b.createElement("div"); let k = b.getSubRenderer(j); h = new XButton(); h.provideContainer(k); let l = k.getExternal(h, k.rootWrapper, k.getExternal(a, null, null)); h.e = d; h.r = e; h.n = f; let m = b.createElement("div"); m.setStyleProperty("display", "inline-block"); i = new XIcon(); let n = b.getSubRenderer(m); i.provideContainer(n); let o = n.getExternal(i, n.rootWrapper, n.getExternal(a, null, null)); i.svgPath = c; m.setStyleProperty("width", stringFormat("{0}px", g.width.toString())); m.setStyleProperty("height", stringFormat("{0}px", g.height.toString())); let p = b.createElement("div"); p.setStyleProperty("display", "flex"); p.setStyleProperty("flex-direction", "row"); p.setStyleProperty("flex-wrap", "no-wrap"); p.setStyleProperty("align-items", "center"); p.append(m); h.appendButtonContent(p); return { ret: j, p7: h, p8: i }; } static d(a) { let b = 0; if (a.altKey) { b |= 1; } if (a.shiftKey) { b |= 4; } if (a.ctrlKey) { b |= 2; } return b; } static c(a, b, c = "block") { let d = b ? c : "none"; a.setStyleProperty("display", d); } static e(a, b, c) { if (null == MultiColumnComboBoxUtilities.b) { MultiColumnComboBoxUtilities.b = a.createElement("div"); MultiColumnComboBoxUtilities.b.setStyleProperty("height", "auto"); MultiColumnComboBoxUtilities.b.setStyleProperty("width", "auto"); MultiColumnComboBoxUtilities.b.setStyleProperty("white-space", "nowrap"); MultiColumnComboBoxUtilities.b.setStyleProperty("position", "absolute"); } if (null != c) { MultiColumnComboBoxUtilities.b.setStyleProperty("font", c.fontString); } else { MultiColumnComboBoxUtilities.b.setStyleProperty("font", stringEmpty()); } let d = MultiColumnComboBoxUtilities.b.getNativeElement(); document.body.appendChild(d); MultiColumnComboBoxUtilities.b.setRawText(b); let e = MultiColumnComboBoxUtilities.b.outerWidth(); let f = MultiColumnComboBoxUtilities.b.outerHeight(); document.body.removeChild(d); return new Size(1, e, f); } } MultiColumnComboBoxUtilities.$t = /*@__PURE__*/ markType(MultiColumnComboBoxUtilities, 'MultiColumnComboBoxUtilities'); MultiColumnComboBoxUtilities.b = null; return MultiColumnComboBoxUtilities; })();