UNPKG

igniteui-angular-core

Version:

Ignite UI Angular Core logic used in multiple UI components.

97 lines (96 loc) 3.15 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 { SyncableObservableCollection$2 } from "./SyncableObservableCollection$2"; import { DataSourceSortDescription } from "./DataSourceSortDescription"; import { SortDescription } from "./SortDescription"; /** * @hidden */ export let DataSourceSortDescriptionCollection = /*@__PURE__*/ (() => { class DataSourceSortDescriptionCollection extends Base { constructor() { super(); this.f = new SyncableObservableCollection$2(DataSourceSortDescription.$, SortDescription.$, 0); this.d = null; let a = this.f; a.compare = (b, c) => { if (b.f == c.propertyName) { return true; } return false; }; a.createFrom = (b) => new DataSourceSortDescription(2, b.propertyName, b.direction); a.createTo = (b) => { let c = b.c; return SortDescription.create(b.f, c, null); }; } get i() { return this.f.shouldDetachOnTargetChange; } set i(a) { this.f.shouldDetachOnTargetChange = a; } get e() { return this.d; } set e(a) { if (a == null) { this.f.syncTarget = null; this.d = null; return; } this.d = a; this.f.syncTarget = this.d.getInner(); } g(a) { return this.f.add(a); } n(a) { this.f.addOneWayTarget(a.getInner()); } r(a) { this.f.removeOneWayTarget(a.getInner()); } p(a, b) { this.f.add1(a, b); } o() { this.f.clear(); } get(a) { return this.f.get(a); } k(a) { return this.f.indexOf(a); } h(a) { return this.f.remove1(a); } b(a) { return this.f.remove(a); } set(a, b) { return this.f.set(a, b); } size() { return this.f.size(); } m(a) { this.f.addListener(a); } q(a) { this.f.removeListener(a); } get j() { return this.f.all; } } DataSourceSortDescriptionCollection.$t = markType(DataSourceSortDescriptionCollection, 'DataSourceSortDescriptionCollection'); return DataSourceSortDescriptionCollection; })();