UNPKG

igniteui-react-core

Version:
193 lines (192 loc) 5.72 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, toNullable, Point_$type, markType, PointUtil } from "./type"; import { Brush } from "./Brush"; import { BrushCollectionUtil } from "./BrushCollectionUtil"; import { Color } from "./Color"; import { Size } from "./Size"; import { Rect } from "./Rect"; import { DoubleCollection } from "./DoubleCollection"; /** * @hidden */ export let PlatformAPIHelper = /*@__PURE__*/ (() => { class PlatformAPIHelper extends Base { static b(a) { if (a == null) { return null; } return a._fill; } static a(a) { if (a == null) { return null; } return BrushCollectionUtil.a(a); } static c(a) { if (Color.c(toNullable(Color.$, a), toNullable(Color.$, null))) { return null; } return a.colorString; } static e(a) { if (PointUtil.equals(a, null)) { return null; } let b = {}; let c = b; c["x"] = a.x; c["y"] = a.y; return c; } static h(a) { if (Size.l_op_Equality_Lifted(toNullable(Size.$, a), toNullable(Size.$, null))) { return null; } let b = {}; let c = b; c["width"] = a.width; c["height"] = a.height; return c; } static g(a) { if (Rect.l_op_Equality(a, null)) { return null; } let b = {}; let c = b; c["left"] = a.left; c["top"] = a.top; c["width"] = a.width; c["height"] = a.height; return c; } static d(a) { if (a == null) { return null; } return a.toArray(); } static j(a) { if (a == null) { return null; } return Brush.create(a); } static k(a) { if (a == null) { return null; } return Brush.create(a).color; } static i(a) { if (a == null) { return null; } return BrushCollectionUtil.c(a); } static m(a) { if (a == null) { return null; } let b = a; return { $type: Point_$type, x: b["x"], y: b["y"] }; } static p(a) { if (a == null) { return null; } let b = a; return new Size(1, b["width"], b["height"]); } static o(a) { if (a == null) { return null; } let b = a; return new Rect(0, b["left"], b["top"], b["width"], b["height"]); } static l(a) { if (a == null) { return null; } let b = a; let c = new DoubleCollection(); for (let d = 0; d < b.length; d++) { c.add(b[d]); } return c; } static f(a, b) { if (a == Brush.$) { return PlatformAPIHelper.b(b); } if (a == Color.$) { return PlatformAPIHelper.c(b); } if (a == Point_$type) { return PlatformAPIHelper.e(b); } if (a == Size.$) { return PlatformAPIHelper.h(b); } if (a == Rect.$) { return PlatformAPIHelper.g(b); } if (a == DoubleCollection.$) { return PlatformAPIHelper.d(b); } return b; } static n(a, b) { if (a == Brush.$) { return PlatformAPIHelper.j(b); } if (a == Color.$) { let c = PlatformAPIHelper.j(b); if (c == null) { return null; } return c._fill; } if (a == Point_$type) { return PlatformAPIHelper.m(b); } if (a == Size.$) { return PlatformAPIHelper.p(b); } if (a == Rect.$) { return PlatformAPIHelper.o(b); } if (a == DoubleCollection.$) { return PlatformAPIHelper.l(b); } return b; } static q(a) { if (a == null) { return null; } if (a.length == 1) { return a.toLowerCase(); } return a.substr(0, 1).toLowerCase() + a.substr(1); } static r(a) { if (a == null) { return null; } if (a.length == 1) { return a.toUpperCase(); } return a.substr(0, 1).toUpperCase() + a.substr(1); } } PlatformAPIHelper.$t = /*@__PURE__*/ markType(PlatformAPIHelper, 'PlatformAPIHelper'); return PlatformAPIHelper; })();