igniteui-webcomponents-datasources 7.1.1-beta.2 → 7.1.1-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/esm2022/lib/Entity.d.ts +14 -0
  2. package/esm2022/lib/Entity.js +65 -0
  3. package/esm2022/lib/EntityProperty.d.ts +12 -0
  4. package/esm2022/lib/EntityProperty.js +27 -0
  5. package/esm2022/lib/EntitySet.d.ts +15 -0
  6. package/esm2022/lib/EntitySet.js +50 -0
  7. package/esm2022/lib/ODataDataSourcePage.d.ts +19 -0
  8. package/esm2022/lib/ODataDataSourcePage.js +67 -0
  9. package/esm2022/lib/ODataSchemaProvider.d.ts +12 -0
  10. package/esm2022/lib/ODataSchemaProvider.js +120 -0
  11. package/esm2022/lib/ODataVirtualDataSource.d.ts +28 -0
  12. package/esm2022/lib/ODataVirtualDataSource.js +132 -0
  13. package/esm2022/lib/ODataVirtualDataSourceDataProvider.d.ts +120 -0
  14. package/esm2022/lib/ODataVirtualDataSourceDataProvider.js +450 -0
  15. package/esm2022/lib/ODataVirtualDataSourceDataProviderWorker.d.ts +57 -0
  16. package/esm2022/lib/ODataVirtualDataSourceDataProviderWorker.js +710 -0
  17. package/esm2022/lib/ODataVirtualDataSourceDataProviderWorkerSettings.d.ts +42 -0
  18. package/esm2022/lib/ODataVirtualDataSourceDataProviderWorkerSettings.js +83 -0
  19. package/esm2022/lib/ODataVirtualDataSourceProviderTaskDataHolder.d.ts +5 -0
  20. package/esm2022/lib/ODataVirtualDataSourceProviderTaskDataHolder.js +6 -0
  21. package/esm2022/lib/RestVirtualDataSource.d.ts +86 -0
  22. package/esm2022/lib/RestVirtualDataSource.js +272 -0
  23. package/esm2022/lib/RestVirtualDataSourceDataProvider.d.ts +171 -0
  24. package/esm2022/lib/RestVirtualDataSourceDataProvider.js +535 -0
  25. package/esm2022/lib/RestVirtualDataSourceDataProviderWorker.d.ts +70 -0
  26. package/esm2022/lib/RestVirtualDataSourceDataProviderWorker.js +762 -0
  27. package/esm2022/lib/RestVirtualDataSourceDataProviderWorkerSettings.d.ts +93 -0
  28. package/esm2022/lib/RestVirtualDataSourceDataProviderWorkerSettings.js +159 -0
  29. package/esm2022/lib/RestVirtualDataSourcePage.d.ts +19 -0
  30. package/esm2022/lib/RestVirtualDataSourcePage.js +67 -0
  31. package/esm2022/lib/RestVirtualDataSourceProviderTaskDataHolder.d.ts +5 -0
  32. package/esm2022/lib/RestVirtualDataSourceProviderTaskDataHolder.js +6 -0
  33. package/esm2022/lib/Schema.d.ts +15 -0
  34. package/esm2022/lib/Schema.js +54 -0
  35. package/esm2022/lib/util.d.ts +27 -0
  36. package/esm2022/lib/util.js +116 -0
  37. package/esm2022/public_api.d.ts +18 -0
  38. package/esm2022/public_api.js +18 -0
  39. package/package.json +7 -7
  40. package/fesm2022/igniteui-webcomponents-datasources.mjs +0 -3611
  41. package/igniteui-webcomponents-datasources.d.ts +0 -754
@@ -0,0 +1,120 @@
1
+ import { Base, Type } from "igniteui-webcomponents-core";
2
+ import { IDataSourceVirtualDataProvider } from "igniteui-webcomponents-core";
3
+ import { IDataSourcePage } from "igniteui-webcomponents-core";
4
+ import { IDataSourceSchema } from "igniteui-webcomponents-core";
5
+ import { IDataSourceExecutionContext } from "igniteui-webcomponents-core";
6
+ import { IDataSourceDataProviderUpdateNotifier } from "igniteui-webcomponents-core";
7
+ import { SortDescriptionCollection } from "igniteui-webcomponents-core";
8
+ import { FilterExpressionCollection } from "igniteui-webcomponents-core";
9
+ import { DataSourcePageRequestPriority } from "igniteui-webcomponents-core";
10
+ import { DataSourceDataProviderSchemaChangedEventArgs } from "igniteui-webcomponents-core";
11
+ import { DataSourceSchemaPropertyType } from "igniteui-webcomponents-core";
12
+ import { SummaryDescriptionCollection } from "igniteui-webcomponents-core";
13
+ import { DataSourceSummaryScope } from "igniteui-webcomponents-core";
14
+ import { TransactionState } from "igniteui-webcomponents-core";
15
+ export declare class ODataVirtualDataSourceDataProvider extends Base implements IDataSourceVirtualDataProvider {
16
+ static $t: Type;
17
+ private _worker;
18
+ private _requests;
19
+ private _callback;
20
+ constructor();
21
+ private filterExpressions_CollectionChanged;
22
+ private sortDescriptions_CollectionChanged;
23
+ private groupDescriptions_CollectionChanged;
24
+ private summaryDescriptions_CollectionChanged;
25
+ addPageRequest(pageIndex: number, priority: DataSourcePageRequestPriority): void;
26
+ private createWorker;
27
+ private valid;
28
+ private getWorkerSettings;
29
+ removePageRequest(pageIndex: number): void;
30
+ removeAllPageRequests(): void;
31
+ close(): void;
32
+ private _pageLoaded;
33
+ get pageLoaded(): (page: IDataSourcePage, currentFullCount: number, actualPageSize: number) => void;
34
+ set pageLoaded(value: (page: IDataSourcePage, currentFullCount: number, actualPageSize: number) => void);
35
+ private raisePageLoaded;
36
+ private killWorker;
37
+ private _pageSizeRequested;
38
+ get pageSizeRequested(): number;
39
+ set pageSizeRequested(value: number);
40
+ private _baseUri;
41
+ get baseUri(): string;
42
+ set baseUri(value: string);
43
+ private _entitySet;
44
+ get entitySet(): string;
45
+ set entitySet(value: string);
46
+ private _timeoutMilliseconds;
47
+ get timeoutMilliseconds(): number;
48
+ set timeoutMilliseconds(value: number);
49
+ getItemValue(item: any, valueName: string): any;
50
+ setItemValue(item: any, valueName: string, value: any): void;
51
+ removeItem(item: any): void;
52
+ addItem(item: any): void;
53
+ schemaChanged: (sender: any, args: DataSourceDataProviderSchemaChangedEventArgs) => void;
54
+ private _currentFullCount;
55
+ private _currentSchema;
56
+ get actualCount(): number;
57
+ get actualSchema(): IDataSourceSchema;
58
+ private _executionContext;
59
+ get executionContext(): IDataSourceExecutionContext;
60
+ set executionContext(value: IDataSourceExecutionContext);
61
+ private _updateNotifier;
62
+ get updateNotifier(): IDataSourceDataProviderUpdateNotifier;
63
+ set updateNotifier(value: IDataSourceDataProviderUpdateNotifier);
64
+ private _deferAutoRefresh;
65
+ get deferAutoRefresh(): boolean;
66
+ set deferAutoRefresh(value: boolean);
67
+ get isSortingSupported(): boolean;
68
+ get isGroupingSupported(): boolean;
69
+ get isFilteringSupported(): boolean;
70
+ private _isAggregationSupported;
71
+ get isAggregationSupported(): boolean;
72
+ set isAggregationSupported(isSupported: boolean);
73
+ private _sortDescriptions;
74
+ get sortDescriptions(): SortDescriptionCollection;
75
+ private _groupDescriptions;
76
+ get groupDescriptions(): SortDescriptionCollection;
77
+ private _propertiesRequested;
78
+ get propertiesRequested(): string[];
79
+ set propertiesRequested(value: string[]);
80
+ private _schemaIncludedProperties;
81
+ get schemaIncludedProperties(): string[];
82
+ set schemaIncludedProperties(value: string[]);
83
+ private _filterExpressions;
84
+ get filterExpressions(): FilterExpressionCollection;
85
+ private _summaryDescriptions;
86
+ get summaryDescriptions(): SummaryDescriptionCollection;
87
+ private _summaryScope;
88
+ get summaryScope(): DataSourceSummaryScope;
89
+ set summaryScope(value: DataSourceSummaryScope);
90
+ private _enableJsonp;
91
+ get enableJsonp(): boolean;
92
+ set enableJsonp(isEnabled: boolean);
93
+ get notifyUsingSourceIndexes(): boolean;
94
+ get isItemIndexLookupSupported(): boolean;
95
+ get isKeyIndexLookupSupported(): boolean;
96
+ notifySetItem(index: number, oldItem: any, newItem: any): void;
97
+ notifyClearItems(): void;
98
+ notifyInsertItem(index: number, newItem: any): void;
99
+ notifyRemoveItem(index: number, oldItem: any): void;
100
+ _schemaFetchQueued: boolean;
101
+ queueSchemaFetch(): void;
102
+ doSchemaFetchInternal(): void;
103
+ schemaFetchInternal(): void;
104
+ protected schemaFetchInternalOverride(): void;
105
+ private addSchemaRequest;
106
+ _autoRefreshQueued: boolean;
107
+ queueAutoRefresh(): void;
108
+ doRefreshInternal(): void;
109
+ refreshInternal(): void;
110
+ protected refreshInternalOverride(): void;
111
+ flushAutoRefresh(): void;
112
+ refresh(): void;
113
+ indexOfItem(item: any): number;
114
+ indexOfKey(key: any[]): number;
115
+ resolveSchemaPropertyType(propertyPath: string): DataSourceSchemaPropertyType;
116
+ createBatchRequest(changes: TransactionState[]): void;
117
+ private _batchCompleted;
118
+ get batchCompleted(): (success: boolean, requiresRefresh: boolean) => void;
119
+ set batchCompleted(value: (success: boolean, requiresRefresh: boolean) => void);
120
+ }
@@ -0,0 +1,450 @@
1
+ import { Base, runOn, markType } from "igniteui-webcomponents-core";
2
+ import { IDataSourceVirtualDataProvider_$type } from "igniteui-webcomponents-core";
3
+ import { SortDescriptionCollection } from "igniteui-webcomponents-core";
4
+ import { FilterExpressionCollection } from "igniteui-webcomponents-core";
5
+ import { LinkedList } from "./util";
6
+ import { DataSourcePageRequestPriority } from "igniteui-webcomponents-core";
7
+ import { ODataVirtualDataSourceDataProviderWorker } from "./ODataVirtualDataSourceDataProviderWorker";
8
+ import { ODataVirtualDataSourceDataProviderWorkerSettings } from "./ODataVirtualDataSourceDataProviderWorkerSettings";
9
+ import { DataSourceDataProviderSchemaChangedEventArgs } from "igniteui-webcomponents-core";
10
+ import { DataSourceSchemaPropertyType } from "igniteui-webcomponents-core";
11
+ import { stringContains } from "igniteui-webcomponents-core";
12
+ import { SummaryDescriptionCollection } from "igniteui-webcomponents-core";
13
+ class ODataVirtualDataSourceDataProvider extends Base {
14
+ static { this.$t = markType(ODataVirtualDataSourceDataProvider, 'ODataVirtualDataSourceDataProvider', Base.$type, [IDataSourceVirtualDataProvider_$type]); }
15
+ constructor() {
16
+ super();
17
+ this._worker = null;
18
+ this._requests = new LinkedList();
19
+ this._callback = null;
20
+ this._pageLoaded = null;
21
+ this._pageSizeRequested = 50;
22
+ this._baseUri = null;
23
+ this._entitySet = null;
24
+ this._timeoutMilliseconds = 10000;
25
+ this.schemaChanged = null;
26
+ this._currentFullCount = 0;
27
+ this._currentSchema = null;
28
+ this._executionContext = null;
29
+ this._updateNotifier = null;
30
+ this._deferAutoRefresh = false;
31
+ this._sortDescriptions = null;
32
+ this._groupDescriptions = null;
33
+ this._propertiesRequested = null;
34
+ this._schemaIncludedProperties = null;
35
+ this._filterExpressions = null;
36
+ this._summaryDescriptions = null;
37
+ this._enableJsonp = true;
38
+ this._schemaFetchQueued = false;
39
+ this._autoRefreshQueued = false;
40
+ this._batchCompleted = null;
41
+ this._sortDescriptions = new SortDescriptionCollection();
42
+ this._sortDescriptions.onChanged = () => this.sortDescriptions_CollectionChanged(null, null);
43
+ this._groupDescriptions = new SortDescriptionCollection();
44
+ this._groupDescriptions.onChanged = () => this.groupDescriptions_CollectionChanged(null, null);
45
+ this._filterExpressions = new FilterExpressionCollection();
46
+ this._filterExpressions.onChanged = () => this.filterExpressions_CollectionChanged(null, null);
47
+ this._summaryDescriptions = new SummaryDescriptionCollection();
48
+ this._summaryDescriptions.onChanged = () => this.summaryDescriptions_CollectionChanged(null, null);
49
+ }
50
+ filterExpressions_CollectionChanged(sender, e) {
51
+ this.queueAutoRefresh();
52
+ }
53
+ sortDescriptions_CollectionChanged(sender, e) {
54
+ this.queueAutoRefresh();
55
+ }
56
+ groupDescriptions_CollectionChanged(sender, e) {
57
+ this.queueAutoRefresh();
58
+ }
59
+ summaryDescriptions_CollectionChanged(sender, e) {
60
+ this.queueAutoRefresh();
61
+ }
62
+ addPageRequest(pageIndex, priority) {
63
+ if (this.deferAutoRefresh) {
64
+ return;
65
+ }
66
+ if (this._worker != null && this._worker.isShutdown) {
67
+ this._worker = null;
68
+ this._callback = null;
69
+ }
70
+ if (this._worker == null) {
71
+ this.createWorker();
72
+ }
73
+ if (priority == DataSourcePageRequestPriority.High) {
74
+ this._requests.addFirst(pageIndex);
75
+ }
76
+ else {
77
+ this._requests.addLast(pageIndex);
78
+ }
79
+ if (!this._worker.addPageRequest(pageIndex, priority)) {
80
+ this._worker = null;
81
+ this._callback = null;
82
+ this.addPageRequest(pageIndex, priority);
83
+ }
84
+ }
85
+ createWorker() {
86
+ if (!this.valid()) {
87
+ return;
88
+ }
89
+ this._callback = runOn(this, this.raisePageLoaded);
90
+ let settings = this.getWorkerSettings();
91
+ this._worker = new ODataVirtualDataSourceDataProviderWorker(settings);
92
+ }
93
+ valid() {
94
+ return this.entitySet != null && this.baseUri != null;
95
+ }
96
+ getWorkerSettings() {
97
+ return ((() => {
98
+ let $ret = new ODataVirtualDataSourceDataProviderWorkerSettings();
99
+ $ret.baseUri = this._baseUri;
100
+ $ret.entitySet = this._entitySet;
101
+ $ret.pageSizeRequested = this._pageSizeRequested;
102
+ $ret.timeoutMilliseconds = this._timeoutMilliseconds;
103
+ $ret.pageLoaded = this._callback;
104
+ $ret.batchCompleted = this._batchCompleted;
105
+ $ret.executionContext = this._executionContext;
106
+ $ret.sortDescriptions = this._sortDescriptions;
107
+ $ret.groupDescriptions = this._groupDescriptions;
108
+ $ret.filterExpressions = this._filterExpressions;
109
+ $ret.propertiesRequested = this._propertiesRequested;
110
+ $ret.schemaIncludedProperties = this._schemaIncludedProperties;
111
+ $ret.summaryDescriptions = this._summaryDescriptions;
112
+ $ret.summaryScope = this._summaryScope;
113
+ $ret.enableJsonp = this._enableJsonp;
114
+ $ret.isAggregationSupported = this.isAggregationSupported;
115
+ return $ret;
116
+ })());
117
+ }
118
+ removePageRequest(pageIndex) {
119
+ let current = this._requests.first;
120
+ while (current != null) {
121
+ if (current.value == pageIndex) {
122
+ this._requests.remove(current);
123
+ }
124
+ current = current.next;
125
+ }
126
+ if (this._worker == null) {
127
+ return;
128
+ }
129
+ this._worker.removePageRequest(pageIndex);
130
+ }
131
+ removeAllPageRequests() {
132
+ this._requests.clear();
133
+ if (this._worker == null) {
134
+ return;
135
+ }
136
+ this._worker.removeAllPageRequests();
137
+ }
138
+ close() {
139
+ if (this._worker != null) {
140
+ this._worker.shutdown();
141
+ this._worker = null;
142
+ this._callback = null;
143
+ }
144
+ }
145
+ get pageLoaded() {
146
+ return this._pageLoaded;
147
+ }
148
+ set pageLoaded(value) {
149
+ this._pageLoaded = value;
150
+ this.queueAutoRefresh();
151
+ }
152
+ raisePageLoaded(page, fullCount, actualPageSize) {
153
+ if (this._pageLoaded != null) {
154
+ this._currentFullCount = fullCount;
155
+ if (this._currentSchema == null) {
156
+ let currentSchema = null;
157
+ if (page != null) {
158
+ currentSchema = page.schema();
159
+ }
160
+ this._currentSchema = currentSchema;
161
+ if (this.schemaChanged != null) {
162
+ this.schemaChanged(this, new DataSourceDataProviderSchemaChangedEventArgs(this._currentSchema, this._currentFullCount));
163
+ }
164
+ }
165
+ if (page.pageIndex() != ODataVirtualDataSourceDataProviderWorker.schemaRequestIndex) {
166
+ this._pageLoaded(page, fullCount, actualPageSize);
167
+ }
168
+ }
169
+ }
170
+ killWorker() {
171
+ if (this._worker != null) {
172
+ this._worker.shutdown();
173
+ this._worker = null;
174
+ this._callback = null;
175
+ }
176
+ }
177
+ get pageSizeRequested() {
178
+ return this._pageSizeRequested;
179
+ }
180
+ set pageSizeRequested(value) {
181
+ this._pageSizeRequested = value;
182
+ this.queueAutoRefresh();
183
+ }
184
+ get baseUri() {
185
+ return this._baseUri;
186
+ }
187
+ set baseUri(value) {
188
+ let oldValue = this._baseUri;
189
+ this._baseUri = value;
190
+ if (oldValue != this._baseUri) {
191
+ this.queueAutoRefresh();
192
+ if (this.valid() && this.deferAutoRefresh) {
193
+ this.queueSchemaFetch();
194
+ }
195
+ }
196
+ }
197
+ get entitySet() {
198
+ return this._entitySet;
199
+ }
200
+ set entitySet(value) {
201
+ let oldValue = this._entitySet;
202
+ this._entitySet = value;
203
+ if (oldValue != this._entitySet) {
204
+ this.queueAutoRefresh();
205
+ if (this.valid() && this.deferAutoRefresh) {
206
+ this.queueSchemaFetch();
207
+ }
208
+ }
209
+ }
210
+ get timeoutMilliseconds() {
211
+ return this._timeoutMilliseconds;
212
+ }
213
+ set timeoutMilliseconds(value) {
214
+ this._timeoutMilliseconds = value;
215
+ this.queueAutoRefresh();
216
+ }
217
+ getItemValue(item, valueName) {
218
+ let dic = item;
219
+ if (dic.has(valueName)) {
220
+ return dic.get(valueName);
221
+ }
222
+ else {
223
+ return null;
224
+ }
225
+ }
226
+ setItemValue(item, valueName, value) {
227
+ // does nothing for virtual data.
228
+ }
229
+ removeItem(item) {
230
+ // does nothing for virtual data.
231
+ }
232
+ addItem(item) {
233
+ // does nothing for virtual data.
234
+ }
235
+ get actualCount() {
236
+ return this._currentFullCount;
237
+ }
238
+ get actualSchema() {
239
+ return this._currentSchema;
240
+ }
241
+ get executionContext() {
242
+ return this._executionContext;
243
+ }
244
+ set executionContext(value) {
245
+ this._executionContext = value;
246
+ this.queueAutoRefresh();
247
+ }
248
+ get updateNotifier() {
249
+ return this._updateNotifier;
250
+ }
251
+ set updateNotifier(value) {
252
+ this._updateNotifier = value;
253
+ }
254
+ get deferAutoRefresh() {
255
+ return this._deferAutoRefresh;
256
+ }
257
+ set deferAutoRefresh(value) {
258
+ this._deferAutoRefresh = value;
259
+ if (!this._deferAutoRefresh) {
260
+ this.queueAutoRefresh();
261
+ }
262
+ if (this._deferAutoRefresh && this.valid() && this._currentSchema == null) {
263
+ this.queueSchemaFetch();
264
+ }
265
+ }
266
+ get isSortingSupported() {
267
+ return true;
268
+ }
269
+ get isGroupingSupported() {
270
+ return this.isAggregationSupported;
271
+ }
272
+ get isFilteringSupported() {
273
+ return true;
274
+ }
275
+ get isAggregationSupported() {
276
+ return this._isAggregationSupported;
277
+ }
278
+ set isAggregationSupported(isSupported) {
279
+ this._isAggregationSupported = isSupported;
280
+ }
281
+ get sortDescriptions() {
282
+ return this._sortDescriptions;
283
+ }
284
+ get groupDescriptions() {
285
+ return this._groupDescriptions;
286
+ }
287
+ get propertiesRequested() {
288
+ return this._propertiesRequested;
289
+ }
290
+ set propertiesRequested(value) {
291
+ this._propertiesRequested = value;
292
+ this.queueAutoRefresh();
293
+ }
294
+ get schemaIncludedProperties() {
295
+ return this._schemaIncludedProperties;
296
+ }
297
+ set schemaIncludedProperties(value) {
298
+ this._schemaIncludedProperties = value;
299
+ this.queueAutoRefresh();
300
+ }
301
+ get filterExpressions() {
302
+ return this._filterExpressions;
303
+ }
304
+ get summaryDescriptions() {
305
+ return this._summaryDescriptions;
306
+ }
307
+ get summaryScope() {
308
+ return this._summaryScope;
309
+ }
310
+ set summaryScope(value) {
311
+ this._summaryScope = value;
312
+ }
313
+ get enableJsonp() {
314
+ return this._enableJsonp;
315
+ }
316
+ set enableJsonp(isEnabled) {
317
+ this._enableJsonp = isEnabled;
318
+ }
319
+ get notifyUsingSourceIndexes() {
320
+ return true;
321
+ }
322
+ get isItemIndexLookupSupported() {
323
+ return false;
324
+ }
325
+ get isKeyIndexLookupSupported() {
326
+ return false;
327
+ }
328
+ notifySetItem(index, oldItem, newItem) {
329
+ if (this.updateNotifier != null) {
330
+ this.updateNotifier.notifySetItem(index, oldItem, newItem);
331
+ }
332
+ }
333
+ notifyClearItems() {
334
+ if (this.updateNotifier != null) {
335
+ this.updateNotifier.notifyClearItems();
336
+ }
337
+ }
338
+ notifyInsertItem(index, newItem) {
339
+ if (this.updateNotifier != null) {
340
+ this.updateNotifier.notifyInsertItem(index, newItem);
341
+ }
342
+ }
343
+ notifyRemoveItem(index, oldItem) {
344
+ if (this.updateNotifier != null) {
345
+ this.updateNotifier.notifyRemoveItem(index, oldItem);
346
+ }
347
+ }
348
+ queueSchemaFetch() {
349
+ if (this._schemaFetchQueued) {
350
+ return;
351
+ }
352
+ if (this.executionContext != null) {
353
+ this._schemaFetchQueued = true;
354
+ this.executionContext.enqueueAction(runOn(this, this.doSchemaFetchInternal));
355
+ }
356
+ }
357
+ doSchemaFetchInternal() {
358
+ if (!this._schemaFetchQueued) {
359
+ return;
360
+ }
361
+ this._schemaFetchQueued = false;
362
+ this.schemaFetchInternal();
363
+ }
364
+ schemaFetchInternal() {
365
+ this.schemaFetchInternalOverride();
366
+ }
367
+ schemaFetchInternalOverride() {
368
+ if (!this.deferAutoRefresh) {
369
+ return;
370
+ }
371
+ this.removeAllPageRequests();
372
+ this.killWorker();
373
+ this.createWorker();
374
+ this.addSchemaRequest();
375
+ }
376
+ addSchemaRequest() {
377
+ this._worker.addPageRequest(ODataVirtualDataSourceDataProviderWorker.schemaRequestIndex, DataSourcePageRequestPriority.High);
378
+ }
379
+ queueAutoRefresh() {
380
+ if (this.deferAutoRefresh) {
381
+ return;
382
+ }
383
+ if (this._autoRefreshQueued) {
384
+ return;
385
+ }
386
+ if (this.executionContext != null) {
387
+ this._autoRefreshQueued = true;
388
+ this.executionContext.enqueueAction(runOn(this, this.doRefreshInternal));
389
+ }
390
+ }
391
+ doRefreshInternal() {
392
+ if (this.deferAutoRefresh) {
393
+ this._autoRefreshQueued = false;
394
+ return;
395
+ }
396
+ if (!this._autoRefreshQueued) {
397
+ return;
398
+ }
399
+ this._autoRefreshQueued = false;
400
+ this.refreshInternal();
401
+ }
402
+ refreshInternal() {
403
+ this.refreshInternalOverride();
404
+ }
405
+ refreshInternalOverride() {
406
+ this.removeAllPageRequests();
407
+ this.killWorker();
408
+ this.createWorker();
409
+ this._worker.addPageRequest(0, DataSourcePageRequestPriority.Normal);
410
+ }
411
+ flushAutoRefresh() {
412
+ this.doRefreshInternal();
413
+ }
414
+ refresh() {
415
+ this.refreshInternal();
416
+ }
417
+ indexOfItem(item) {
418
+ return -1;
419
+ }
420
+ indexOfKey(key) {
421
+ return -1;
422
+ }
423
+ resolveSchemaPropertyType(propertyPath) {
424
+ if (this.actualSchema == null) {
425
+ return DataSourceSchemaPropertyType.ObjectValue;
426
+ }
427
+ if (stringContains(propertyPath, ".")) {
428
+ return DataSourceSchemaPropertyType.ObjectValue;
429
+ }
430
+ for (let i = 0; i < this.actualSchema.propertyNames.length; i++) {
431
+ let name = this.actualSchema.propertyNames[i];
432
+ if (name == propertyPath) {
433
+ return this.actualSchema.propertyTypes[i];
434
+ }
435
+ }
436
+ return DataSourceSchemaPropertyType.ObjectValue;
437
+ }
438
+ createBatchRequest(changes) {
439
+ if (this._worker) {
440
+ this._worker.createBatchRequest(changes);
441
+ }
442
+ }
443
+ get batchCompleted() {
444
+ return this._batchCompleted;
445
+ }
446
+ set batchCompleted(value) {
447
+ this._batchCompleted = value;
448
+ }
449
+ }
450
+ export { ODataVirtualDataSourceDataProvider };
@@ -0,0 +1,57 @@
1
+ import { AsyncVirtualDataSourceProviderWorker } from "igniteui-webcomponents-core";
2
+ import { SortDescriptionCollection } from "igniteui-webcomponents-core";
3
+ import { FilterExpressionCollection } from "igniteui-webcomponents-core";
4
+ import { AsyncVirtualDataSourceProviderTaskDataHolder } from "igniteui-webcomponents-core";
5
+ import { ODataVirtualDataSourceDataProviderWorkerSettings } from "./ODataVirtualDataSourceDataProviderWorkerSettings";
6
+ import { AsyncDataSourcePageTaskHolder } from "igniteui-webcomponents-core";
7
+ import { AsyncDataSourcePageRequest } from "igniteui-webcomponents-core";
8
+ import { TransactionState } from "igniteui-webcomponents-core";
9
+ export declare class ODataVirtualDataSourceDataProviderWorker extends AsyncVirtualDataSourceProviderWorker {
10
+ private _baseUri;
11
+ private _entitySet;
12
+ private _sortDescriptions;
13
+ private _groupDescriptions;
14
+ private _filterExpressions;
15
+ private _summaryDescriptions;
16
+ private _summaryScope;
17
+ private _desiredPropeties;
18
+ private _schemaIncludedProperties;
19
+ private _enableJsonp;
20
+ private _isAggregationSupported;
21
+ protected get sortDescriptions(): SortDescriptionCollection;
22
+ protected get filterExpressions(): FilterExpressionCollection;
23
+ protected get desiredProperties(): string[];
24
+ protected initialize(): void;
25
+ protected getTaskDataHolder(): AsyncVirtualDataSourceProviderTaskDataHolder;
26
+ protected getCompletedTaskData(holder: AsyncVirtualDataSourceProviderTaskDataHolder, completed: number): void;
27
+ protected removeCompletedTaskData(holder: AsyncVirtualDataSourceProviderTaskDataHolder, completed: number): void;
28
+ protected getTasksData(holder: AsyncVirtualDataSourceProviderTaskDataHolder): void;
29
+ private iter;
30
+ private iterFilter;
31
+ private iterSummaries;
32
+ constructor(settings: ODataVirtualDataSourceDataProviderWorkerSettings);
33
+ protected processCompletedTask(completedTask: AsyncDataSourcePageTaskHolder, currentDelay: number, pageIndex: number, taskDataHolder: AsyncVirtualDataSourceProviderTaskDataHolder): void;
34
+ private _groupInformation;
35
+ private _summaryInformation;
36
+ private finishProcessingCompletedTask;
37
+ private resolveGroupInformation;
38
+ private groupError;
39
+ private groupSuccess;
40
+ private addGroup;
41
+ private resolveSummaryInformation;
42
+ private summarySuccess;
43
+ private summaryError;
44
+ private getSummaryQueryParameters;
45
+ private createSummaryResults;
46
+ private resolveSchema;
47
+ private _filterString;
48
+ private _selectedString;
49
+ static readonly schemaRequestIndex: number;
50
+ protected makeTaskForRequest(request: AsyncDataSourcePageRequest, retryDelay: number): void;
51
+ private updateFilterString;
52
+ private executeRequest;
53
+ private success;
54
+ private error;
55
+ createBatchRequest(changes: TransactionState[]): void;
56
+ private getRequestUriWithKey;
57
+ }