igniteui-react-core
Version:
Ignite UI React Core.
951 lines (950 loc) • 36.4 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 { BaseDataSource } from "./BaseDataSource";
import { Base, typeCast, runOn, delegateCombine, delegateRemove, Array_$type, Number_$type, fromEnum, markType } from "./type";
import { RearrangedListView } from "./RearrangedListView";
import { DataSourcePropertiesComparer } from "./DataSourcePropertiesComparer";
import { List$1 } from "./List$1";
import { DataSourceExecutionContext } from "./DataSourceExecutionContext";
import { DataSourceLocalDataProvider } from "./DataSourceLocalDataProvider";
import { DataSourceSpecialRow } from "./DataSourceSpecialRow";
import { ISupportsDataChangeNotifications_$type } from "./ISupportsDataChangeNotifications";
import { IDataSourceClonableDataProvider_$type } from "./IDataSourceClonableDataProvider";
import { TransactionType, TransactionType_$type } from "./TransactionType";
import { ISupportsExpansionChangeNotifications_$type } from "./ISupportsExpansionChangeNotifications";
/**
* @hidden
*/
export let LocalDataSource = /*@__PURE__*/ (() => {
class LocalDataSource extends BaseDataSource {
get_actualBaseDataProvider() {
return this.actualDataProvider;
}
get actualBaseDataProvider() {
return this.get_actualBaseDataProvider();
}
get dataProvider() {
return this.c0;
}
set dataProvider(a) {
let b = this.c0;
this.c0 = a;
if (b != this.c0) {
this.onPropertyUpdated("DataProvider", b, this.c0);
}
}
get actualDataProvider() {
if (this.cz == null) {
this.actualDataProvider = this.resolveDataProvider();
}
return this.cz;
}
set actualDataProvider(a) {
let b = this.cz;
this.cz = a;
if (b != this.cz) {
this.onPropertyUpdated("ActualDataProvider", b, this.cz);
}
}
get dataSource() {
return this.d1;
}
set dataSource(a) {
let b = this.d1;
this.d1 = a;
if (b != this.d1) {
this.onPropertyUpdated("ItemsSource", b, this.d1);
}
}
canInitialize() {
let a = super.canInitialize();
if (!a) {
return false;
}
return this.dataSource != null;
}
get c6() {
return this.c5;
}
set c6(a) {
this.c5 = a;
{
this.actualDataProvider = this.resolveDataProvider();
}
}
constructor() {
super();
this.c0 = null;
this.dd = false;
this.cz = null;
this.d1 = null;
this.c5 = null;
this.c9 = null;
this.db = null;
this.d5 = null;
this.c7 = null;
this.dm = new List$1(Array_$type, 0);
this.dc = false;
this.cy = null;
this.dv = -1;
this.dn = -1;
this.dx = -1;
this.dq = -1;
this.dy = -1;
this.dr = -1;
this.dw = -1;
this.dp = -1;
this.d0 = -1;
this.dz = -1;
this.dt = -1;
this.ds = -1;
this.du = -1;
this.executionContext = new DataSourceExecutionContext();
this.v.l = false;
}
resolveDataProvider() {
let provider_ = new DataSourceLocalDataProvider();
provider_.executionContext = new DataSourceExecutionContext();
return provider_;
}
propertyUpdatedOverride(a, b, c) {
super.propertyUpdatedOverride(a, b, c);
switch (a) {
case "DataProvider":
this.dd = true;
this.actualDataProvider = this.dataProvider;
break;
case "ActualDataProvider":
if (this.actualDataProvider != null) {
this.actualDataProvider.dataSource = this.dataSource;
this.actualSchema = this.actualDataProvider.actualSchema;
this.actualCount = this.resolveFullCount(this.actualDataProvider.actualCount);
}
this.queueAutoRefresh();
break;
case "ItemsSource":
if (this.actualDataProvider != null) {
this.actualDataProvider.dataSource = this.dataSource;
this.actualSchema = this.actualDataProvider.actualSchema;
this.actualCount = this.resolveFullCount(this.actualDataProvider.actualCount);
}
this.queueAutoRefresh();
break;
}
}
getItemAtIndex(a) {
if (this.c9 != null && this.c9.a8 != null) {
return this.c9.a8.item(a);
}
else {
return this.actualDataProvider.getItemAtIndex(a);
}
}
getItemFromKey(a) {
let b = this.actualPrimaryKey;
if (b == null || b.length < 1 || this.actualBaseDataProvider == null) {
return a[0];
}
let c = this.c8();
let d;
if (this.c9 != null) {
let e = this.c9.a8.count;
for (let f = 0; f < e; f++) {
d = this.c9.a8.item(f);
if (typeCast(DataSourceSpecialRow.$, d) !== null) {
let g = d;
if (g.rowType == 1 && !this.isSectionContentVisible && this.isSectionHeaderNormalRow) {
if (c.i(d, a) == 0) {
return d;
}
}
}
else if (c.i(d, a) == 0) {
return d;
}
}
return null;
}
if (this.actualDataProvider != null && this.actualDataProvider.isKeyIndexLookupSupported) {
let h = this.actualDataProvider.indexOfKey(a);
return this.actualDataProvider.getItemAtIndex(h);
}
if (this.actualDataProvider != null) {
let i = this.actualDataProvider.actualCount;
for (let j = 0; j < i; j++) {
d = this.actualDataProvider.getItemAtIndex(j);
if (c.i(d, a) == 0) {
return d;
}
}
}
return null;
}
getItemPropertyAtIndex(a, b) {
let c;
if (this.c9 != null) {
c = this.c9.a8.item(a);
}
else {
c = this.actualDataProvider.getItemAtIndex(a);
}
if (c == null) {
return null;
}
let item_ = c;
if ((item_ != null && item_.$$isSpecialRow !== undefined)) {
return this.getSpecialRowItemValue(c, b);
}
if (this.ar()) {
let d = this.ao(c, b);
if (d) {
let e = this.a2(c, b);
return e;
}
}
return this.actualDataProvider.getItemValue(c, b);
}
c4() {
return this.actualDataProvider;
}
df() {
return this.dm != null && this.dm.count > 0;
}
refreshInternalOverride() {
super.refreshInternalOverride();
if (this.actualDataProvider != null) {
if (this.dg() || this.dh() || this.di() || this.dj() || this.df()) {
if (this.c9 == null) {
if (this.db == null) {
this.db = new LocalDataSourceViewUpdateNotifier(this);
}
this.c9 = new RearrangedListView(this.actualDataProvider);
this.c9.ac = this.db;
this.c9.ae = new LocalDataSourceViewExpansionNotifier(this);
let a = this.c9;
a.rootSummariesChanged = delegateCombine(a.rootSummariesChanged, runOn(this, this.d7));
}
this.ensureComparables(this.actualDataProvider.actualSchema);
this.c9.aw = this.shouldEmitSectionHeaders && this.aq;
this.c9.av = this.shouldEmitSectionFooters && this.aq;
this.c9.ax = this.shouldEmitShiftedRows;
this.c9.ay = this.shouldEmitSummaryRows;
this.c9.ce(this.dm);
this.c9.a4 = this.dl();
this.c9.a3 = this.dk();
this.c9.q = this.c8();
this.c9.af = this.groupDescriptions;
this.c9.ag = this.sortDescriptions;
this.c9.ah = this.summaryDescriptions;
this.c9.m = this.summaryScope;
this.c9.an = this.includeSummaryRowsInSection;
this.c9.at = this.isSectionSummaryRowsAtBottom;
this.c9.k = this.sectionHeaderDisplayMode;
this.c9.n = this;
this.c9.aq = this.groupDescriptions != null && this.groupDescriptions.k.count > 0;
this.c9.u = this.da();
this.c9.b9();
this.actualSchema = this.actualDataProvider.actualSchema;
this.actualCount = this.c9.a8.count;
}
else {
let b = this.c4();
this.actualSchema = this.actualDataProvider.actualSchema;
if (b != null) {
this.actualCount = b.actualCount;
}
else {
this.actualCount = 0;
}
if (this.c9 != null) {
this.c9.ac = null;
let c = this.c9;
c.rootSummariesChanged = delegateRemove(c.rootSummariesChanged, runOn(this, this.d7));
this.c9 = null;
this.onBroadcastClearItems();
}
}
}
else {
this.actualCount = 0;
this.actualSchema = null;
}
}
d7(a, b) {
this.cl();
}
get_isItemIndexLookupSupported() {
return true;
}
get_isKeyIndexLookupSupported() {
return true;
}
indexOfItem(a) {
if (this.c9 != null) {
return this.c9.a8.indexOf(a);
}
if (this.actualDataProvider != null && this.actualDataProvider.isItemIndexLookupSupported) {
return this.actualDataProvider.indexOfItem(a);
}
if (this.actualDataProvider != null) {
let b = this.actualDataProvider.actualCount;
let c;
for (let d = 0; d < b; d++) {
c = this.actualDataProvider.getItemAtIndex(d);
if (this.de(c, a)) {
return d;
}
}
}
return -1;
}
de(a, b) {
if (a == null && b == null) {
return true;
}
if (a == null || b == null) {
return false;
}
return Base.equalsStatic(a, b);
}
indexOfKey(a) {
let b = this.actualPrimaryKey;
if (b == null || b.length < 1 || this.actualBaseDataProvider == null) {
return this.indexOfItem(a[0]);
}
let c = this.c8();
let d;
if (this.c9 != null) {
let e = this.c9.a8.count;
for (let f = 0; f < e; f++) {
d = this.c9.a8.item(f);
if (typeCast(DataSourceSpecialRow.$, d) !== null) {
let g = d;
if (g.rowType == 1 && !this.isSectionContentVisible && this.isSectionHeaderNormalRow) {
if (c.i(d, a) == 0) {
return f;
}
}
}
else if (c.i(d, a) == 0) {
return f;
}
}
return -1;
}
if (this.actualDataProvider != null && this.actualDataProvider.isKeyIndexLookupSupported) {
return this.actualDataProvider.indexOfKey(a);
}
if (this.actualDataProvider != null) {
let h = this.actualDataProvider.actualCount;
for (let i = 0; i < h; i++) {
d = this.actualDataProvider.getItemAtIndex(i);
if (c.i(d, a) == 0) {
return i;
}
}
}
return -1;
}
onActualPrimaryKeyChangedOverrride(a, b) {
super.onActualPrimaryKeyChangedOverrride(a, b);
this.c7 = null;
}
c8() {
if (this.c7 != null) {
return this.c7;
}
if (this.actualPrimaryKey == null) {
this.c7 = new DataSourcePropertiesComparer(null, null, null, this);
return this.c7;
}
let a = new Array(this.actualPrimaryKey.length);
for (let b = 0; b < a.length; b++) {
a[b] = 0;
}
this.c7 = new DataSourcePropertiesComparer(this.actualPrimaryKey, a, this.d, this);
return this.c7;
}
da() {
if (this.filterExpressions.k.count == 0) {
return null;
}
let a = this.actualDataProvider;
let b = this.actualDataProvider.actualSchema;
let c = this.filterExpressions.k;
let d = (e) => {
for (let f = 0; f < c.count; f++) {
if (!c.item(f).match(e, a, b)) {
return false;
}
}
return true;
};
return d;
}
dl() {
let a = 0;
if (this.sortDescriptions.k.count == 0 && (this.groupDescriptions == null || this.groupDescriptions.k.count == 0)) {
return null;
}
a = this.sortDescriptions.k.count;
if (this.groupDescriptions != null) {
a += this.groupDescriptions.k.count;
}
let b = new Array(a);
let c = new Array(a);
let d = 0;
if (this.groupDescriptions != null) {
for (let e = 0; e < this.groupDescriptions.k.count; e++) {
b[e] = this.groupDescriptions.k.item(e).propertyName;
c[e] = this.groupDescriptions.k.item(e).direction;
d++;
}
}
for (let f = 0; f < this.sortDescriptions.k.count; f++) {
b[f + d] = this.sortDescriptions.k.item(f).propertyName;
c[f + d] = this.sortDescriptions.k.item(f).direction;
}
return new DataSourcePropertiesComparer(b, c, this.d, this);
}
dk() {
if (this.groupDescriptions == null || this.groupDescriptions.k.count < 1) {
return null;
}
let a = 0;
a = this.groupDescriptions.k.count;
let b = new Array(a);
let c = new Array(a);
if (this.groupDescriptions != null) {
for (let d = 0; d < this.groupDescriptions.k.count; d++) {
b[d] = this.groupDescriptions.k.item(d).propertyName;
c[d] = this.groupDescriptions.k.item(d).direction;
}
}
return new DataSourcePropertiesComparer(b, c, this.d, this);
}
dh() {
if (this.groupDescriptions == null || this.groupDescriptions.k.count < 1) {
return false;
}
if (this.actualDataProvider == null) {
return false;
}
if (this.actualDataProvider.isGroupingSupported) {
return false;
}
return true;
}
di() {
if (this.sortDescriptions == null || this.sortDescriptions.k.count < 1) {
return false;
}
if (this.actualDataProvider == null) {
return false;
}
if (this.actualDataProvider.isSortingSupported) {
return false;
}
return true;
}
dg() {
return this.filterExpressions != null && this.filterExpressions.k.count > 0;
}
dj() {
if (this.summaryDescriptions == null || this.summaryDescriptions.k.count < 1) {
return false;
}
return true;
}
onClearItemsOverride() {
if (this.c9 != null) {
this.c9.notifyClearItems();
this.queueAutoRefresh();
}
else {
super.onClearItemsOverride();
}
}
onSetItemOverride(a, b, c) {
if (this.c9 != null) {
this.c9.notifySetItem(a, b, c);
}
else {
super.onSetItemOverride(a, b, c);
}
}
onInsertItemOverride(a, b) {
if (this.c9 != null) {
this.c9.notifyInsertItem(a, b);
}
else {
super.onInsertItemOverride(a, b);
}
}
onRemoveItemOverride(a, b) {
if (this.c9 != null) {
this.c9.notifyRemoveItem(a, b);
}
else {
super.onRemoveItemOverride(a, b);
}
}
d8() {
this.actualCount = this.c9.a8.count;
this.onBroadcastClearItems();
}
eb(a, b, c) {
this.actualCount = this.c9.a8.count;
this.onBroadcastSetItem(a, b, c);
}
d9(a, b) {
this.actualCount = this.c9.a8.count;
this.onBroadcastInsertItem(a, b);
}
ea(a, b) {
this.actualCount = this.c9.a8.count;
this.onBroadcastRemoveItem(a, b);
}
pinRow(a) {
super.pinRow(a);
this.dv = -1;
this.dn = -1;
if (this.c9 != null) {
this.dm.add(a);
this.c9.b8(a);
}
else {
this.dm.add(a);
this.queueAutoRefresh();
}
}
unpinRow(a) {
super.unpinRow(a);
let b = this.c8();
if (this.c9 != null) {
for (let c = this.dm.count - 1; c >= 0; c--) {
let d = this.dm._inner[c];
if (d.length != a.length) {
continue;
}
if (b.h(d, a) == 0) {
this.dm.removeAt(c);
this.c9.cf(d);
}
}
}
else {
for (let e = this.dm.count - 1; e >= 0; e--) {
let f = this.dm._inner[e];
if (f.length != a.length) {
continue;
}
if (b.h(f, a) == 0) {
this.dm.removeAt(e);
}
}
this.queueAutoRefresh();
}
this.dv = -1;
this.dn = -1;
}
clearPinnedRows() {
for (let a = this.dm.count - 1; a >= 0; a--) {
this.unpinRow(this.dm._inner[a]);
}
}
isRowPinned(a) {
if (this.c9 == null) {
return false;
}
let b = this.getItemAtIndex(a);
if (b == null) {
return false;
}
let item_ = b;
if ((item_ != null && item_.$$isSpecialRow !== undefined)) {
if (item_.rowType == 3) {
return true;
}
}
let c = this.c8();
let d;
if (this.actualPrimaryKey == null) {
d = new Array(1);
d[0] = b;
}
else {
let e = this.actualPrimaryKey;
let f = e.length;
d = new Array(f);
for (let g = 0; g < f; g++) {
d[g] = this.getItemProperty(b, e[g]);
}
}
for (let h = 0; h < this.dm.count; h++) {
if (c.h(this.dm._inner[h], d) == 0) {
return true;
}
}
return false;
}
get_isSortingSupported() {
if (this.externalDataSource != null && !this.dc) {
this.dc = true;
let a = this.externalDataSource.isSortingSupportedOverride;
this.dc = false;
return a;
}
return true;
}
get_isFilteringSupported() {
if (this.externalDataSource != null && !this.dc) {
this.dc = true;
let a = this.externalDataSource.isFilteringSupportedOverride;
this.dc = false;
return a;
}
return true;
}
get_isGroupingSupported() {
if (this.externalDataSource != null && !this.dc) {
this.dc = true;
let a = this.externalDataSource.isGroupingSupportedOverride;
this.dc = false;
return a;
}
return true;
}
getStickyRowPriority(a) {
let b = this.getRowType(a);
switch (b) {
case 1: return 100 - this.getRowLevel(a);
case 2: return 99 - this.getRowLevel(a);
case 3:
case 5: return 2;
case 4: return 3;
}
return 1;
}
getStickyRowsInRange(a, b) {
if (this.c9 == null || ((this.groupDescriptions == null || this.groupDescriptions.k.count == 0) && (this.summaryDescriptions == null || this.summaryDescriptions.k.count == 0) && !this.df())) {
return null;
}
let c = null;
let d = null;
if (this.c9.a7.count == 1) {
c = this.c9.a7._inner[0];
d = this.c9.a7._inner[0];
}
else {
c = this.c9.x(a);
if (c != null) {
while (c.z != -1) {
c = this.c9.a7._inner[c.z];
}
}
d = this.c9.x(b);
if (b >= this.c9.a8.count - this.c9.bm) {
d = this.c9.w();
}
}
if (c == null || d == null) {
return null;
}
if (c.ae == this.dv && c.aa == this.dx && c.af == this.dy && c.ad == this.dw && c.ah == this.d0 && c.ag == this.dz && d.ae == this.dn && d.aa == this.dq && d.af == this.dr && d.ad == this.dp && d.ah == this.dt && d.ag == this.ds && this.c9.bm == this.du) {
return this.cy;
}
this.dv = c.ae;
this.dn = d.ae;
this.dx = c.aa;
this.dq = d.aa;
this.dy = c.af;
this.dr = d.af;
this.dw = c.ad;
this.dp = d.ad;
this.d0 = c.ah;
this.dz = c.ag;
this.dt = d.ah;
this.ds = d.ag;
this.du = this.c9.bm;
if (this.c9.a7.count == 1) {
this.dn = d.ad;
}
let e = 0;
if (this.shouldEmitSectionHeaders && this.aq) {
e = 1;
}
let f = this.c9.bc();
let g = new List$1(Number_$type, 0);
for (let h = c.ae; h <= d.ae; h++) {
let i = this.c9.a7._inner[h];
let j = this.c9.a7._inner[h].c.length;
let k = this.c9.a7._inner[h].v();
if (this.shouldEmitSectionHeaders && this.aq) {
for (let l = 0; l < j; l++) {
if (this.c9.a7._inner[h].a[l] != null) {
let m = i.af + i.b[l];
g.add(m);
if (this.summaryScope == 0 || this.summaryScope == 2) {
if (i.c[l] && this.includeSummaryRowsInSection && !this.isSectionSummaryRowsAtBottom) {
for (let n = 0; n < f; n++) {
g.add(m + 1 + n);
}
}
}
}
if (!this.c9.a7._inner[h].c[l]) {
break;
}
}
}
if (this.c9.a7._inner[h].p) {
if (this.shouldEmitShiftedRows) {
for (let o = 0; o < this.c9.a7._inner[h].aa; o++) {
g.add(this.c9.a7._inner[h].af + this.c9.a7._inner[h].ah + o + k);
}
}
}
if (this.summaryScope == 0 || this.summaryScope == 2) {
if (this.shouldEmitSummaryRows && this.includeSummaryRowsInSection && this.isSectionSummaryRowsAtBottom) {
for (let p = this.c9.a7._inner[h].ag - 1; p >= 0; p--) {
if (this.shouldEmitSectionFooters) {
g.add(this.c9.a7._inner[h].ad - k - p);
}
else {
g.add(this.c9.a7._inner[h].ad - p);
}
}
}
}
if (this.shouldEmitSectionFooters && this.aq) {
for (let q = j - 1; q >= 0; q--) {
if (!this.c9.a7._inner[h].c[q]) {
break;
}
g.add(this.c9.a7._inner[h].ad - q);
}
}
}
for (let r = this.c9.a8.count - this.c9.bm; r < this.c9.a8.count; r++) {
g.add(r);
}
this.cy = g.toArray();
return this.cy;
}
isExclusivelySticky(a) {
let b = this.getRowType(a);
return b == 1 || b == 2 || b == 4 || (this.isSectionSummaryRowsAtBottom && b == 5);
}
getRowType(a) {
if (a < 0) {
return 0;
}
let b = this.getItemAtIndex(a);
let item_ = b;
if ((item_ != null && item_.$$isSpecialRow !== undefined)) {
let c = b.rowType;
if (this.isSectionHeaderNormalRow && c == 1) {
return 0;
}
return c;
}
return 0;
}
setIsRowExpandedAtIndex(a, b) {
if (this.isSectionCollapsable && this.c9 != null && this.c9.a8.count > 0 && this.c9.a8.count > a) {
this.c9.cd(a, b);
}
}
getIsRowExpandedAtIndex(a) {
if (this.c9 != null && this.c9.a8.count > 0 && this.c9.a8.count > a) {
return this.c9.al(a);
}
return true;
}
getRowLevel(a) {
if (a < 0) {
return 0;
}
let b = this.getItemAtIndex(a);
let item_ = b;
if ((item_ != null && item_.$$isSpecialRow !== undefined)) {
return b.level;
}
if (this.sectionHeaderDisplayMode == 1) {
return this.groupDescriptions.k.count;
}
else if (this.groupDescriptions.k.count > 0) {
return 1;
}
return 0;
}
getRootSummaryRowCount() {
if (this.c9 != null) {
return this.c9.bm;
}
return 0;
}
getRootSummaryResults() {
if (this.c9 != null) {
return this.c9.i;
}
return null;
}
getSectionSummaryResults(a) {
if (this.c9 != null && this.c9.a7.count > 0 && a >= 0 && a < this.c9.a7.count) {
return this.c9.a7._inner[a].i;
}
return null;
}
clone() {
let a = new LocalDataSource();
a.dataSource = this.dataSource;
super.cloneProperties(a);
if (this.dd && this.dataProvider != null && typeCast(IDataSourceClonableDataProvider_$type, this.dataProvider) !== null) {
a.dataProvider = this.dataProvider.clone();
}
return a;
}
ar() {
return !this.isReadOnly && this.actualBaseDataProvider != null && this.v != null;
}
cr(a, b) {
if (a == 5) {
let c = new List$1(TransactionType_$type, 0);
let d = new List$1(Base.$, 0);
let e = b;
let f = e.a;
for (let g = 0; g < f.length; g++) {
if (f[g].transactionType == 1) {
let h = f[g].id;
let i = this.getItemFromKey(h);
if (i != null) {
let j = f[g].value;
let k = this.indexOfItem(i);
let l = null;
if (this.c9 != null && k > -1) {
l = this.c9.x(k);
for (let m = 0; m < this.summaryDescriptions.k.count; m++) {
let n = this.summaryDescriptions.k.item(m);
if (n.operand == 5 || j.containsKey(n.propertyName)) {
this.c9.co(m, k, i, false, l);
}
}
}
for (let o of fromEnum(j)) {
this.actualDataProvider.setItemValue(i, o.key, o.value);
}
if (l != null && this.c9 != null && k > -1) {
for (let p = 0; p < this.summaryDescriptions.k.count; p++) {
let q = this.summaryDescriptions.k.item(p);
if (q.operand == 5 || j.containsKey(q.propertyName)) {
this.c9.co(p, k, i, true, l);
}
}
}
if (k > -1) {
this.onBroadcastSetItem(k, i, i);
}
d.add1(i);
c.add(1);
if (this.dm.count > 0) {
let r = this.c8();
for (let s = 0; s < this.dm.count; s++) {
if (r.h(this.dm._inner[s], h) == 0) {
let t = this.getStickyRows();
for (let u = 0; u < t.length; u++) {
let v = t[u];
let w = typeCast(DataSourceSpecialRow.$, this.c9.a8.item(v));
if (w != null && w.rowType == 3 && w.targetRow == i) {
this.onBroadcastSetItem(v, w, w);
break;
}
}
break;
}
}
}
}
}
else if (f[g].transactionType == TransactionType.Delete) {
let x = f[g].id;
let y = this.indexOfKey(x);
if (y > -1) {
let z = this.getItemAtIndex(y);
this.actualDataProvider.removeItem(z);
this.notifyRemoveItem(y, z);
d.add1(z);
c.add(TransactionType.Delete);
}
}
else if (f[g].transactionType == 0) {
let aa = f[g].id;
let ab = aa[0];
if (f[g].value != null) {
let ac = f[g].value;
for (let ad of fromEnum(ac)) {
this.actualDataProvider.setItemValue(ab, ad.key, ad.value);
}
}
this.actualDataProvider.addItem(ab);
d.add1(ab);
c.add(0);
}
}
if (f.length > 0) {
this.b2(e.id, this.getAggregatedChanges(e.id));
}
}
}
}
LocalDataSource.$t = /*@__PURE__*/ markType(LocalDataSource, 'LocalDataSource', BaseDataSource.$);
return LocalDataSource;
})();
/**
* @hidden
*/
export let LocalDataSourceViewUpdateNotifier = /*@__PURE__*/ (() => {
class LocalDataSourceViewUpdateNotifier extends Base {
notifyClearItems() {
this.a.d8();
}
notifyInsertItem(a, b) {
this.a.d9(a, b);
}
notifyRemoveItem(a, b) {
this.a.ea(a, b);
}
notifySetItem(a, b, c) {
this.a.eb(a, b, c);
}
constructor(a) {
super();
this.a = null;
this.a = a;
}
}
LocalDataSourceViewUpdateNotifier.$t = /*@__PURE__*/ markType(LocalDataSourceViewUpdateNotifier, 'LocalDataSourceViewUpdateNotifier', Base.$, [ISupportsDataChangeNotifications_$type]);
return LocalDataSourceViewUpdateNotifier;
})();
/**
* @hidden
*/
export let LocalDataSourceViewExpansionNotifier = /*@__PURE__*/ (() => {
class LocalDataSourceViewExpansionNotifier extends Base {
notifyRowExpansionChanged(a, b, c) {
this.a.onRowExpansionChanged(a, b, c);
}
constructor(a) {
super();
this.a = null;
this.a = a;
}
}
LocalDataSourceViewExpansionNotifier.$t = /*@__PURE__*/ markType(LocalDataSourceViewExpansionNotifier, 'LocalDataSourceViewExpansionNotifier', Base.$, [ISupportsExpansionChangeNotifications_$type]);
return LocalDataSourceViewExpansionNotifier;
})();