UNPKG

igniteui-react-core

Version:
135 lines (134 loc) 5.21 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, markType } from "./type"; import { IDataSeriesAdapterRule_$type } from "./IDataSeriesAdapterRule"; /** * @hidden */ export let SubCollectionsRule = /*@__PURE__*/ (() => { class SubCollectionsRule extends Base { constructor() { super(); this._priority = 0; this._collectionTransformationThreshold = 0; this.priority = 0; this.collectionTransformationThreshold = 50; } get priority() { return this._priority; } set priority(a) { this._priority = a; } get collectionTransformationThreshold() { return this._collectionTransformationThreshold; } set collectionTransformationThreshold(a) { this._collectionTransformationThreshold = a; } evaluate(a) { let b = a.getCurrentDataSource(); if (b == null) { return; } if (b.actualCount == 0 || b.actualCount > this.collectionTransformationThreshold) { return; } let c = b.getItemAtIndex(0); if (a.analyzer.isCollection(c)) { for (let d = 0; d < b.actualCount; d++) { if (a.analyzer.isCollection(b.getItemAtIndex(d))) { let e = a.analyzer.getTitleString(b.getItemAtIndex(d), null); if (e != null) { a.pushParentTitle(e); } a.ay(1); a.recurseRules(b.getItemAtIndex(d), "[" + d + "]", false); a.ay(0); if (e != null) { a.popParentTitle(); } } } } } getPrimaryAxisLabelsString(a) { return null; } getAdditionalValuePropertyStrings(a) { let b = a.getCurrentDataSource(); if (b == null) { return null; } if (b.actualCount == 0 || b.actualCount > this.collectionTransformationThreshold) { return null; } let c = a.analyzer; let d = b.getItemAtIndex(0); if (!c.isCollection(d)) { return null; } for (let e = 0; e < b.actualCount; e++) { if (!a.analyzer.isCollection(b.getItemAtIndex(e))) { continue; } let f = a.analyzer.getTitleString(b.getItemAtIndex(e), null); if (f != null) { a.pushParentTitle(f); } a.ay(3); a.recurseRules(b.getItemAtIndex(e), "[" + e + "]", false); a.ay(0); if (f != null) { a.popParentTitle(); } let g = b.getItemAtIndex(e); let h = a.getSubProvider(g, "[" + e + "]"); let i = h.actualSchema.propertyNames; for (let j = 0; j < i.length; j++) { let k = i[j]; let l = h.actualSchema.propertyTypes[j]; let m = l == 0 ? 0 : l == 8 || l == 9 ? 1 : 2; a.am(a.getCurrentPath(), k, m); } a.popSubProvider(); } return a.d(); } getPrimaryAxisLabelsStrings(a) { let b = a.getCurrentDataSource(); if (b == null) { return null; } if (b.actualCount == 0 || b.actualCount > this.collectionTransformationThreshold) { return null; } let c = a.analyzer; let d = b.getItemAtIndex(0); if (!c.isCollection(d)) { return null; } for (let e = 0; e < b.actualCount; e++) { if (a.analyzer.isCollection(b.getItemAtIndex(e))) { let f = a.analyzer.getTitleString(b.getItemAtIndex(e), null); if (f != null) { a.pushParentTitle(f); } a.ay(2); a.recurseRules(b.getItemAtIndex(e), "[" + e + "]", false); a.ay(0); if (f != null) { a.popParentTitle(); } } } return a.d(); } } SubCollectionsRule.$t = /*@__PURE__*/ markType(SubCollectionsRule, 'SubCollectionsRule', Base.$, [IDataSeriesAdapterRule_$type]); return SubCollectionsRule; })();