UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

317 lines (316 loc) 10.7 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, __values } from "tslib"; import { Base, String_$type, fromEnum, Number_$type, markType } from "./type"; import { List$1 } from "./List$1"; import { CodeGenerationItemBuilderPropertyInfo } from "./CodeGenerationItemBuilderPropertyInfo"; import { HashSet$1 } from "./HashSet$1"; import { Dictionary$2 } from "./Dictionary$2"; import { CodeGeneratingImportManager } from "./CodeGeneratingImportManager"; /** * @hidden */ var CodeGeneratingRendererResult = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CodeGeneratingRendererResult, _super); function CodeGeneratingRendererResult() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.q = new List$1(CodeGenerationItemBuilderPropertyInfo.$, 0); _this._platform = 0; _this._generationOptions = null; _this.l = new Dictionary$2(String_$type, List$1.$.specialize(String_$type), 0); _this.n = new Dictionary$2(String_$type, List$1.$.specialize(CodeGeneratingImportManager.$), 0); _this.k = new Dictionary$2(String_$type, List$1.$.specialize(String_$type), 0); _this.p = new HashSet$1(String_$type, 0); _this.i = new Dictionary$2(String_$type, Number_$type, 0); _this.o = new Dictionary$2(String_$type, String_$type, 0); _this.m = new Dictionary$2(String_$type, String_$type, 0); _this.j = new Dictionary$2(String_$type, Number_$type, 0); return _this; } Object.defineProperty(CodeGeneratingRendererResult.prototype, "t", { get: function () { return this.q; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingRendererResult.prototype, "platform", { get: function () { return this._platform; }, set: function (a) { this._platform = a; }, enumerable: false, configurable: true }); Object.defineProperty(CodeGeneratingRendererResult.prototype, "generationOptions", { get: function () { return this._generationOptions; }, set: function (a) { this._generationOptions = a; }, enumerable: false, configurable: true }); CodeGeneratingRendererResult.prototype.addPackageRef = function (a) { this.p.add_1(a); }; CodeGeneratingRendererResult.prototype.addContainerResult = function (a, b) { if (!this.l.containsKey(a)) { this.l.addItem(a, new List$1(String_$type, 0)); } var c = this.l.item(a); c.add(b); }; CodeGeneratingRendererResult.prototype.addImportResult = function (a, b) { if (!this.n.containsKey(a)) { this.n.addItem(a, new List$1(CodeGeneratingImportManager.$, 0)); } var c = this.n.item(a); c.add(b); }; CodeGeneratingRendererResult.prototype.addContainerNewFileResult = function (a, b) { if (!this.k.containsKey(a)) { this.k.addItem(a, new List$1(String_$type, 0)); } var c = this.k.item(a); c.add(b); }; CodeGeneratingRendererResult.prototype.getPackages = function () { var e_1, _a; var a = new List$1(String_$type, 0); try { for (var _b = __values(fromEnum(this.p)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a.add(b); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } return a.toArray(); }; CodeGeneratingRendererResult.prototype.getKeys = function () { var e_2, _a; var a = new List$1(String_$type, 0); try { for (var _b = __values(fromEnum(this.l.keys)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a.add(b); } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_2) throw e_2.error; } } return a.toArray(); }; CodeGeneratingRendererResult.prototype.getImportsKeys = function () { var e_3, _a; var a = new List$1(String_$type, 0); try { for (var _b = __values(fromEnum(this.n.keys)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a.add(b); } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_3) throw e_3.error; } } return a.toArray(); }; CodeGeneratingRendererResult.prototype.getContentForKey = function (a) { var e_4, _a; if (!this.l.containsKey(a)) { return ""; } var b = this.l.item(a); if (b.count == 1) { return b._inner[0]; } var c = ""; try { for (var _b = __values(fromEnum(b)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; c += d; } } catch (e_4_1) { e_4 = { error: e_4_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_4) throw e_4.error; } } return c; }; CodeGeneratingRendererResult.prototype.r = function (a) { if (!this.n.containsKey(a)) { return null; } return this.n.item(a); }; CodeGeneratingRendererResult.prototype.getImportsArrayForKey = function (a) { var b = this.r(a); if (b == null) { return null; } return b.toArray(); }; CodeGeneratingRendererResult.prototype.u = function (a) { if (!this.i.containsKey(a)) { this.i.item(a, 1); } var b = this.i.item(a); var c = a + b; this.i.item(a, b + 1); return c; }; CodeGeneratingRendererResult.prototype.af = function (a) { this.q.add(a); }; CodeGeneratingRendererResult.prototype.getNewFiles = function () { var e_5, _a; var a = new List$1(String_$type, 0); try { for (var _b = __values(fromEnum(this.k.keys)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a.add(b); } } catch (e_5_1) { e_5 = { error: e_5_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_5) throw e_5.error; } } return a; }; CodeGeneratingRendererResult.prototype.getNewFileContent = function (a) { var e_6, _a; var b = this.k.item(a); var c = ""; try { for (var _b = __values(fromEnum(b)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; c += d; } } catch (e_6_1) { e_6 = { error: e_6_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_6) throw e_6.error; } } return c; }; CodeGeneratingRendererResult.prototype.defineString = function (a, b) { this.o.item(a, b); }; CodeGeneratingRendererResult.prototype.getStringNames = function () { var e_7, _a; var a = new List$1(String_$type, 0); try { for (var _b = __values(fromEnum(this.o.keys)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a.add(b); } } catch (e_7_1) { e_7 = { error: e_7_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_7) throw e_7.error; } } return a.toArray(); }; CodeGeneratingRendererResult.prototype.getString = function (a) { return this.o.item(a); }; CodeGeneratingRendererResult.prototype.trackDescriptionField = function (a, b) { this.m.item(a, b); }; CodeGeneratingRendererResult.prototype.hasDescription = function (a) { return this.m.containsKey(a); }; CodeGeneratingRendererResult.prototype.getDescriptionField = function (a) { return this.m.item(a); }; CodeGeneratingRendererResult.prototype.v = function (a) { var b = 0; if (!this.j.containsKey(a)) { this.j.addItem(a, b); } else { b = this.j.item(a); } b++; this.j.item(a, b); return a + b; }; CodeGeneratingRendererResult.$t = markType(CodeGeneratingRendererResult, 'CodeGeneratingRendererResult'); return CodeGeneratingRendererResult; }(Base)); export { CodeGeneratingRendererResult };