igniteui-react-core
Version:
Ignite UI React Core.
115 lines (114 loc) • 4.17 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 { Base, typeCast, markType } from "./type";
import { CodeGeneratingCodeWriter } from "./CodeGeneratingCodeWriter";
import { CodeGeneratingImportManager } from "./CodeGeneratingImportManager";
import { JsonDictionaryArray } from "./JsonDictionaryArray";
import { JsonDictionaryValue } from "./JsonDictionaryValue";
import { stringStartsWith, stringReplace } from "./string";
/**
* @hidden
*/
export let CodeGeneratingComponentRendererModuleEmitter = /*@__PURE__*/ (() => {
class CodeGeneratingComponentRendererModuleEmitter extends Base {
get j() {
return this.i;
}
constructor(a, b) {
super();
this.k = null;
this.i = null;
this.b = null;
this.f = new CodeGeneratingImportManager();
this.e = new CodeGeneratingImportManager();
this.a = null;
this.k = a;
this.i = b;
this.b = new CodeGeneratingCodeWriter(this.k);
this.a = new CodeGeneratingCodeWriter(this.k);
}
get d() {
return this.b;
}
get h() {
return this.f;
}
get g() {
return this.e;
}
get c() {
return this.a;
}
n(a, b) {
this.p();
if (typeCast(JsonDictionaryArray.$, a) !== null) {
let c = a;
for (let d = 0; d < c.items.length; d++) {
let e = c.items[d];
if (typeCast(JsonDictionaryValue.$, e) !== null) {
let f = e;
if (f != null) {
let g = f.value.toString();
let h;
g = ((() => { let i = this.l(g, b, h); h = i.p2; return i.ret; })());
this.m(b, g, h);
}
}
}
}
this.o();
this.i.addImportResult("modulesImports", this.h);
this.i.addContainerResult("modulesRegister", this.d.toString());
this.i.addImportResult("descriptionImports", this.g);
this.i.addContainerResult("descriptionRegister", this.c.toString());
}
l(a, b, c) {
c = false;
if (a == "withDescriptions") {
return {
ret: a,
p2: c
};
}
let d = "";
let e = a.split('/');
if (e.length == 1) {
d = e[0];
return {
ret: d,
p2: c
};
}
else {
let f = e[0];
d = e[1];
if (stringStartsWith(d, "Web") && b.getMetadata(stringReplace(d, "Module", ""), "__qualifiedNameTS") != null) {
c = true;
d = d.substr(3);
if (stringStartsWith(f, "web")) {
this.j.addPackageRef(f);
}
else {
this.j.addPackageRef("web" + f);
}
}
return {
ret: f + "/" + d,
p2: c
};
}
}
o() {
}
m(a, b, c) {
}
p() {
}
}
CodeGeneratingComponentRendererModuleEmitter.$t = /*@__PURE__*/ markType(CodeGeneratingComponentRendererModuleEmitter, 'CodeGeneratingComponentRendererModuleEmitter');
return CodeGeneratingComponentRendererModuleEmitter;
})();