igniteui-react-core
Version:
Ignite UI React Core.
97 lines (96 loc) • 3.77 kB
JavaScript
/*
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 { 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
*/
export let DotNetCodeGeneratingComponentRendererModuleEmitter = /*@__PURE__*/ (() => {
class DotNetCodeGeneratingComponentRendererModuleEmitter extends CodeGeneratingComponentRendererModuleEmitter {
constructor(a, b, c) {
super(b, c);
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;
}
get u() {
return this.t;
}
p() {
super.p();
this.t = 0;
}
get v() {
switch (this.q) {
case 0: return "Xam";
case 4: return "Ultra";
case 5: return "Igb";
}
return "";
}
m(a, b, c) {
super.m(a, b, c);
if (b == "withDescriptions" && this.q != 5) {
this.r = true;
return;
}
let d = "";
let 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 ComponentRenderer _componentRenderer = null;");
this.c.l("public ComponentRenderer Renderer");
this.c.l("{");
this.c.h();
this.c.l("get");
this.c.l("{");
this.c.h();
this.c.l("if (this._componentRenderer == null)");
this.c.l("{");
this.c.h();
this.c.l("this._componentRenderer = new ComponentRenderer();");
this.c.l("var context = this._componentRenderer.Context;");
}
let f = d;
if (stringEndsWith(f, "Module")) {
f = f.substr(0, f.length - ("Module").length);
f += "DescriptionModule";
}
this.c.l(f + ".Register(context);");
}
this.t++;
}
o() {
super.o();
if (this.r) {
this.g.addUsing("using Infragistics.Controls.Description;");
this.c.f();
this.c.l("}");
this.c.f();
this.c.l("return this._componentRenderer;");
this.c.l("}");
this.c.f();
this.c.l("}");
}
}
}
DotNetCodeGeneratingComponentRendererModuleEmitter.$t = /*@__PURE__*/ markType(DotNetCodeGeneratingComponentRendererModuleEmitter, 'DotNetCodeGeneratingComponentRendererModuleEmitter', CodeGeneratingComponentRendererModuleEmitter.$);
return DotNetCodeGeneratingComponentRendererModuleEmitter;
})();