UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

105 lines (104 loc) 4.35 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 { CodeGeneratingComponentRendererModuleEmitter } from "./CodeGeneratingComponentRendererModuleEmitter"; import { Dictionary$2 } from "./Dictionary$2"; import { List$1 } from "./List$1"; import { String_$type, markType } from "./type"; import { stringEndsWith } from "./string"; /** * @hidden */ var SwiftCodeGeneratingComponentRendererModuleEmitter = /** @class */ /*@__PURE__*/ (function (_super) { __extends(SwiftCodeGeneratingComponentRendererModuleEmitter, _super); function SwiftCodeGeneratingComponentRendererModuleEmitter(a, b, c) { var _this = _super.call(this, b, c) || this; _this.q = 0; _this.t = 0; _this.r = false; _this.s = new Dictionary$2(String_$type, List$1.$.specialize(String_$type), 0); _this.q = a; return _this; } Object.defineProperty(SwiftCodeGeneratingComponentRendererModuleEmitter.prototype, "u", { get: function () { return this.t; }, enumerable: false, configurable: true }); SwiftCodeGeneratingComponentRendererModuleEmitter.prototype.p = function () { _super.prototype.p.call(this); this.t = 0; }; Object.defineProperty(SwiftCodeGeneratingComponentRendererModuleEmitter.prototype, "v", { get: function () { switch (this.q) { case 0: return "Xam"; case 4: return "Ultra"; case 5: return "Igb"; case 6: return "Iga"; case 7: return "Igs"; } return ""; }, enumerable: false, configurable: true }); SwiftCodeGeneratingComponentRendererModuleEmitter.prototype.m = function (a, b, c) { _super.prototype.m.call(this, a, b, c); if (b == "withDescriptions" && this.q != 5) { this.r = true; return; } var d = ""; var e = b.split('/'); if (e.length == 1) { d = e[0]; this.j.addPackageRef(d); } else { this.j.addPackageRef(e[0]); d = e[1]; } if (this.r) { if (this.t == 0) { this.c.l("private var _componentRenderer: ComponentRenderer? = null;"); this.c.l("public var renderer: ComponentRenderer {"); this.c.h(); this.c.l("get {"); this.c.h(); this.c.l("if (this._componentRenderer == null) {"); this.c.h(); this.c.l("this._componentRenderer = ComponentRenderer();"); this.c.l("var context = this._componentRenderer.context;"); } var f = d; if (stringEndsWith(f, "Module")) { f = f.substr(0, f.length - ("Module").length); f += "DescriptionModule"; } this.c.l(f + ".register(context);"); } this.t++; }; SwiftCodeGeneratingComponentRendererModuleEmitter.prototype.o = function () { _super.prototype.o.call(this); if (this.r) { this.c.f(); this.c.l("}"); this.c.f(); this.c.l("return this._componentRenderer;"); this.c.l("}"); this.c.f(); this.c.l("}"); } }; SwiftCodeGeneratingComponentRendererModuleEmitter.$t = markType(SwiftCodeGeneratingComponentRendererModuleEmitter, 'SwiftCodeGeneratingComponentRendererModuleEmitter', CodeGeneratingComponentRendererModuleEmitter.$); return SwiftCodeGeneratingComponentRendererModuleEmitter; }(CodeGeneratingComponentRendererModuleEmitter)); export { SwiftCodeGeneratingComponentRendererModuleEmitter };