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

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 (66) hide show
  1. package/fesm2022/igniteui-webcomponents-datasources.mjs +3611 -0
  2. package/igniteui-webcomponents-datasources.d.ts +754 -1
  3. package/package.json +13 -9
  4. package/bundles/igniteui-webcomponents-datasources.umd.js +0 -4725
  5. package/bundles/igniteui-webcomponents-datasources.umd.min.js +0 -7
  6. package/esm2015/igniteui-webcomponents-datasources.js +0 -1
  7. package/esm2015/lib/Entity.js +0 -65
  8. package/esm2015/lib/EntityProperty.js +0 -27
  9. package/esm2015/lib/EntitySet.js +0 -50
  10. package/esm2015/lib/ODataDataSourcePage.js +0 -67
  11. package/esm2015/lib/ODataSchemaProvider.js +0 -123
  12. package/esm2015/lib/ODataVirtualDataSource.js +0 -132
  13. package/esm2015/lib/ODataVirtualDataSourceDataProvider.js +0 -453
  14. package/esm2015/lib/ODataVirtualDataSourceDataProviderWorker.js +0 -713
  15. package/esm2015/lib/ODataVirtualDataSourceDataProviderWorkerSettings.js +0 -86
  16. package/esm2015/lib/ODataVirtualDataSourceProviderTaskDataHolder.js +0 -9
  17. package/esm2015/lib/RestVirtualDataSource.js +0 -272
  18. package/esm2015/lib/RestVirtualDataSourceDataProvider.js +0 -538
  19. package/esm2015/lib/RestVirtualDataSourceDataProviderWorker.js +0 -765
  20. package/esm2015/lib/RestVirtualDataSourceDataProviderWorkerSettings.js +0 -162
  21. package/esm2015/lib/RestVirtualDataSourcePage.js +0 -67
  22. package/esm2015/lib/RestVirtualDataSourceProviderTaskDataHolder.js +0 -9
  23. package/esm2015/lib/Schema.js +0 -54
  24. package/esm2015/lib/util.js +0 -116
  25. package/esm2015/public_api.js +0 -18
  26. package/esm5/igniteui-webcomponents-datasources.js +0 -1
  27. package/esm5/lib/Entity.js +0 -79
  28. package/esm5/lib/EntityProperty.js +0 -41
  29. package/esm5/lib/EntitySet.js +0 -68
  30. package/esm5/lib/ODataDataSourcePage.js +0 -73
  31. package/esm5/lib/ODataSchemaProvider.js +0 -158
  32. package/esm5/lib/ODataVirtualDataSource.js +0 -169
  33. package/esm5/lib/ODataVirtualDataSourceDataProvider.js +0 -558
  34. package/esm5/lib/ODataVirtualDataSourceDataProviderWorker.js +0 -920
  35. package/esm5/lib/ODataVirtualDataSourceDataProviderWorkerSettings.js +0 -130
  36. package/esm5/lib/ODataVirtualDataSourceProviderTaskDataHolder.js +0 -11
  37. package/esm5/lib/RestVirtualDataSource.js +0 -357
  38. package/esm5/lib/RestVirtualDataSourceDataProvider.js +0 -687
  39. package/esm5/lib/RestVirtualDataSourceDataProviderWorker.js +0 -967
  40. package/esm5/lib/RestVirtualDataSourceDataProviderWorkerSettings.js +0 -250
  41. package/esm5/lib/RestVirtualDataSourcePage.js +0 -73
  42. package/esm5/lib/RestVirtualDataSourceProviderTaskDataHolder.js +0 -11
  43. package/esm5/lib/Schema.js +0 -68
  44. package/esm5/lib/util.js +0 -160
  45. package/esm5/public_api.js +0 -18
  46. package/fesm2015/igniteui-webcomponents-datasources.js +0 -3638
  47. package/fesm5/igniteui-webcomponents-datasources.js +0 -4698
  48. package/lib/Entity.d.ts +0 -14
  49. package/lib/EntityProperty.d.ts +0 -12
  50. package/lib/EntitySet.d.ts +0 -15
  51. package/lib/ODataDataSourcePage.d.ts +0 -19
  52. package/lib/ODataSchemaProvider.d.ts +0 -12
  53. package/lib/ODataVirtualDataSource.d.ts +0 -28
  54. package/lib/ODataVirtualDataSourceDataProvider.d.ts +0 -120
  55. package/lib/ODataVirtualDataSourceDataProviderWorker.d.ts +0 -57
  56. package/lib/ODataVirtualDataSourceDataProviderWorkerSettings.d.ts +0 -42
  57. package/lib/ODataVirtualDataSourceProviderTaskDataHolder.d.ts +0 -5
  58. package/lib/RestVirtualDataSource.d.ts +0 -86
  59. package/lib/RestVirtualDataSourceDataProvider.d.ts +0 -171
  60. package/lib/RestVirtualDataSourceDataProviderWorker.d.ts +0 -70
  61. package/lib/RestVirtualDataSourceDataProviderWorkerSettings.d.ts +0 -93
  62. package/lib/RestVirtualDataSourcePage.d.ts +0 -19
  63. package/lib/RestVirtualDataSourceProviderTaskDataHolder.d.ts +0 -5
  64. package/lib/Schema.d.ts +0 -15
  65. package/lib/util.d.ts +0 -27
  66. package/public_api.d.ts +0 -18
@@ -1,687 +0,0 @@
1
- import { __extends } from "tslib";
2
- import { Base, runOn, markType } from "igniteui-webcomponents-core";
3
- import { IDataSourceVirtualDataProvider_$type } from "igniteui-webcomponents-core";
4
- import { SortDescriptionCollection } from "igniteui-webcomponents-core";
5
- import { FilterExpressionCollection } from "igniteui-webcomponents-core";
6
- import { LinkedList } from "./util";
7
- import { DataSourcePageRequestPriority } from "igniteui-webcomponents-core";
8
- import { RestVirtualDataSourceDataProviderWorker } from "./RestVirtualDataSourceDataProviderWorker";
9
- import { RestVirtualDataSourceDataProviderWorkerSettings } from "./RestVirtualDataSourceDataProviderWorkerSettings";
10
- import { DataSourceDataProviderSchemaChangedEventArgs } from "igniteui-webcomponents-core";
11
- import { DataSourceSchemaPropertyType } from "igniteui-webcomponents-core";
12
- import { stringContains } from "igniteui-webcomponents-core";
13
- import { SummaryDescriptionCollection } from "igniteui-webcomponents-core";
14
- export var RestVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (_super) {
15
- __extends(RestVirtualDataSourceDataProvider, _super);
16
- function RestVirtualDataSourceDataProvider() {
17
- var _this = _super.call(this) || this;
18
- _this._worker = null;
19
- _this._requests = new LinkedList();
20
- _this._callback = null;
21
- _this._pageLoaded = null;
22
- _this._pageSizeRequested = 50;
23
- _this._baseUri = null;
24
- _this._entitySet = null;
25
- _this._timeoutMilliseconds = 10000;
26
- _this.schemaChanged = null;
27
- _this._currentFullCount = 0;
28
- _this._currentSchema = null;
29
- _this._executionContext = null;
30
- _this._updateNotifier = null;
31
- _this._deferAutoRefresh = false;
32
- _this._sortDescriptions = null;
33
- _this._groupDescriptions = null;
34
- _this._propertiesRequested = null;
35
- _this._schemaIncludedProperties = null;
36
- _this._filterExpressions = null;
37
- _this._summaryDescriptions = null;
38
- _this._enableJsonp = true;
39
- _this._fixedFullCount = -1;
40
- _this._provideFullCount = null;
41
- _this._provideOrderByParameter = null;
42
- _this._provideFilterParameter = null;
43
- _this._provideAggregationParameter = null;
44
- _this._provideAggregatedCount = null;
45
- _this._provideUri = null;
46
- _this._performFetch = null;
47
- _this._providePagingParameter = null;
48
- _this._provideDesiredPropertiesParameter = null;
49
- _this._schemaFetchQueued = false;
50
- _this._autoRefreshQueued = false;
51
- _this._sortDescriptions = new SortDescriptionCollection();
52
- _this._sortDescriptions.onChanged = function () { return _this.sortDescriptions_CollectionChanged(null, null); };
53
- _this._groupDescriptions = new SortDescriptionCollection();
54
- _this._groupDescriptions.onChanged = function () { return _this.groupDescriptions_CollectionChanged(null, null); };
55
- _this._filterExpressions = new FilterExpressionCollection();
56
- _this._filterExpressions.onChanged = function () { return _this.filterExpressions_CollectionChanged(null, null); };
57
- _this._summaryDescriptions = new SummaryDescriptionCollection();
58
- _this._summaryDescriptions.onChanged = function () { return _this.summaryDescriptions_CollectionChanged(null, null); };
59
- return _this;
60
- }
61
- RestVirtualDataSourceDataProvider.prototype.filterExpressions_CollectionChanged = function (sender, e) {
62
- this.queueAutoRefresh();
63
- };
64
- RestVirtualDataSourceDataProvider.prototype.sortDescriptions_CollectionChanged = function (sender, e) {
65
- this.queueAutoRefresh();
66
- };
67
- RestVirtualDataSourceDataProvider.prototype.groupDescriptions_CollectionChanged = function (sender, e) {
68
- this.queueAutoRefresh();
69
- };
70
- RestVirtualDataSourceDataProvider.prototype.summaryDescriptions_CollectionChanged = function (sender, e) {
71
- this.queueAutoRefresh();
72
- };
73
- RestVirtualDataSourceDataProvider.prototype.addPageRequest = function (pageIndex, priority) {
74
- if (this.deferAutoRefresh) {
75
- return;
76
- }
77
- if (this._worker != null && this._worker.isShutdown) {
78
- this._worker = null;
79
- this._callback = null;
80
- }
81
- if (this._worker == null) {
82
- this.createWorker();
83
- }
84
- if (priority == DataSourcePageRequestPriority.High) {
85
- this._requests.addFirst(pageIndex);
86
- }
87
- else {
88
- this._requests.addLast(pageIndex);
89
- }
90
- if (!this._worker.addPageRequest(pageIndex, priority)) {
91
- this._worker = null;
92
- this._callback = null;
93
- this.addPageRequest(pageIndex, priority);
94
- }
95
- };
96
- RestVirtualDataSourceDataProvider.prototype.createWorker = function () {
97
- if (!this.valid()) {
98
- return;
99
- }
100
- this._callback = runOn(this, this.raisePageLoaded);
101
- var settings = this.getWorkerSettings();
102
- this._worker = new RestVirtualDataSourceDataProviderWorker(settings);
103
- };
104
- RestVirtualDataSourceDataProvider.prototype.valid = function () {
105
- return this.entitySet != null && this.baseUri != null;
106
- };
107
- RestVirtualDataSourceDataProvider.prototype.getWorkerSettings = function () {
108
- var _this = this;
109
- return ((function () {
110
- var $ret = new RestVirtualDataSourceDataProviderWorkerSettings();
111
- $ret.baseUri = _this._baseUri;
112
- $ret.entitySet = _this._entitySet;
113
- $ret.pageSizeRequested = _this._pageSizeRequested;
114
- $ret.timeoutMilliseconds = _this._timeoutMilliseconds;
115
- $ret.pageLoaded = _this._callback;
116
- $ret.executionContext = _this._executionContext;
117
- $ret.sortDescriptions = _this._sortDescriptions;
118
- $ret.groupDescriptions = _this._groupDescriptions;
119
- $ret.filterExpressions = _this._filterExpressions;
120
- $ret.propertiesRequested = _this._propertiesRequested;
121
- $ret.schemaIncludedProperties = _this._schemaIncludedProperties;
122
- $ret.summaryDescriptions = _this._summaryDescriptions;
123
- $ret.summaryScope = _this._summaryScope;
124
- $ret.enableJsonp = _this._enableJsonp;
125
- $ret.isAggregationSupported = _this.isAggregationSupported;
126
- $ret.performFetch = _this.performFetch;
127
- $ret.provideAggregationParameter = _this.provideAggregationParameter;
128
- $ret.provideAggregatedCount = _this.provideAggregatedCount;
129
- $ret.provideDesiredPropertiesParameter = _this.provideDesiredPropertiesParameter;
130
- $ret.provideFilterParameter = _this.provideFilterParameter;
131
- $ret.provideFullCount = _this.provideFullCount;
132
- $ret.provideItems = _this.provideItems;
133
- $ret.provideOrderByParameter = _this.provideOrderByParameter;
134
- $ret.providePagingParameter = _this.providePagingParameter;
135
- $ret.provideUri = _this.provideUri;
136
- $ret.fixedFullCount = _this.fixedFullCount;
137
- return $ret;
138
- })());
139
- };
140
- RestVirtualDataSourceDataProvider.prototype.removePageRequest = function (pageIndex) {
141
- var current = this._requests.first;
142
- while (current != null) {
143
- if (current.value == pageIndex) {
144
- this._requests.remove(current);
145
- }
146
- current = current.next;
147
- }
148
- if (this._worker == null) {
149
- return;
150
- }
151
- this._worker.removePageRequest(pageIndex);
152
- };
153
- RestVirtualDataSourceDataProvider.prototype.removeAllPageRequests = function () {
154
- this._requests.clear();
155
- if (this._worker == null) {
156
- return;
157
- }
158
- this._worker.removeAllPageRequests();
159
- };
160
- RestVirtualDataSourceDataProvider.prototype.close = function () {
161
- if (this._worker != null) {
162
- this._worker.shutdown();
163
- this._worker = null;
164
- this._callback = null;
165
- }
166
- };
167
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "pageLoaded", {
168
- get: function () {
169
- return this._pageLoaded;
170
- },
171
- set: function (value) {
172
- this._pageLoaded = value;
173
- this.queueAutoRefresh();
174
- },
175
- enumerable: false,
176
- configurable: true
177
- });
178
- RestVirtualDataSourceDataProvider.prototype.raisePageLoaded = function (page, fullCount, actualPageSize) {
179
- if (this._pageLoaded != null) {
180
- this._currentFullCount = fullCount;
181
- if (this._currentSchema == null) {
182
- var currentSchema = null;
183
- if (page != null) {
184
- currentSchema = page.schema();
185
- }
186
- this._currentSchema = currentSchema;
187
- if (this.schemaChanged != null) {
188
- this.schemaChanged(this, new DataSourceDataProviderSchemaChangedEventArgs(this._currentSchema, this._currentFullCount));
189
- }
190
- }
191
- if (page.pageIndex() != RestVirtualDataSourceDataProviderWorker.schemaRequestIndex) {
192
- this._pageLoaded(page, fullCount, actualPageSize);
193
- }
194
- }
195
- };
196
- RestVirtualDataSourceDataProvider.prototype.killWorker = function () {
197
- if (this._worker != null) {
198
- this._worker.shutdown();
199
- this._worker = null;
200
- this._callback = null;
201
- }
202
- };
203
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "pageSizeRequested", {
204
- get: function () {
205
- return this._pageSizeRequested;
206
- },
207
- set: function (value) {
208
- this._pageSizeRequested = value;
209
- this.queueAutoRefresh();
210
- },
211
- enumerable: false,
212
- configurable: true
213
- });
214
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "baseUri", {
215
- get: function () {
216
- return this._baseUri;
217
- },
218
- set: function (value) {
219
- var oldValue = this._baseUri;
220
- this._baseUri = value;
221
- if (oldValue != this._baseUri) {
222
- this.queueAutoRefresh();
223
- if (this.valid() && this.deferAutoRefresh) {
224
- this.queueSchemaFetch();
225
- }
226
- }
227
- },
228
- enumerable: false,
229
- configurable: true
230
- });
231
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "entitySet", {
232
- get: function () {
233
- return this._entitySet;
234
- },
235
- set: function (value) {
236
- var oldValue = this._entitySet;
237
- this._entitySet = value;
238
- if (oldValue != this._entitySet) {
239
- this.queueAutoRefresh();
240
- if (this.valid() && this.deferAutoRefresh) {
241
- this.queueSchemaFetch();
242
- }
243
- }
244
- },
245
- enumerable: false,
246
- configurable: true
247
- });
248
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "timeoutMilliseconds", {
249
- get: function () {
250
- return this._timeoutMilliseconds;
251
- },
252
- set: function (value) {
253
- this._timeoutMilliseconds = value;
254
- this.queueAutoRefresh();
255
- },
256
- enumerable: false,
257
- configurable: true
258
- });
259
- RestVirtualDataSourceDataProvider.prototype.getItemValue = function (item, valueName) {
260
- var dic = item;
261
- if (dic.has(valueName)) {
262
- return dic.get(valueName);
263
- }
264
- else {
265
- return null;
266
- }
267
- };
268
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "actualCount", {
269
- get: function () {
270
- return this._currentFullCount;
271
- },
272
- enumerable: false,
273
- configurable: true
274
- });
275
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "actualSchema", {
276
- get: function () {
277
- return this._currentSchema;
278
- },
279
- enumerable: false,
280
- configurable: true
281
- });
282
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "executionContext", {
283
- get: function () {
284
- return this._executionContext;
285
- },
286
- set: function (value) {
287
- this._executionContext = value;
288
- this.queueAutoRefresh();
289
- },
290
- enumerable: false,
291
- configurable: true
292
- });
293
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "updateNotifier", {
294
- get: function () {
295
- return this._updateNotifier;
296
- },
297
- set: function (value) {
298
- this._updateNotifier = value;
299
- },
300
- enumerable: false,
301
- configurable: true
302
- });
303
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "deferAutoRefresh", {
304
- get: function () {
305
- return this._deferAutoRefresh;
306
- },
307
- set: function (value) {
308
- this._deferAutoRefresh = value;
309
- if (!this._deferAutoRefresh) {
310
- this.queueAutoRefresh();
311
- }
312
- if (this._deferAutoRefresh && this.valid() && this._currentSchema == null) {
313
- this.queueSchemaFetch();
314
- }
315
- },
316
- enumerable: false,
317
- configurable: true
318
- });
319
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "isSortingSupported", {
320
- get: function () {
321
- return true;
322
- },
323
- enumerable: false,
324
- configurable: true
325
- });
326
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "isGroupingSupported", {
327
- get: function () {
328
- return this.isAggregationSupported;
329
- },
330
- enumerable: false,
331
- configurable: true
332
- });
333
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "isFilteringSupported", {
334
- get: function () {
335
- return true;
336
- },
337
- enumerable: false,
338
- configurable: true
339
- });
340
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "isAggregationSupported", {
341
- get: function () {
342
- return this._isAggregationSupported;
343
- },
344
- set: function (isSupported) {
345
- this._isAggregationSupported = isSupported;
346
- },
347
- enumerable: false,
348
- configurable: true
349
- });
350
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "sortDescriptions", {
351
- get: function () {
352
- return this._sortDescriptions;
353
- },
354
- enumerable: false,
355
- configurable: true
356
- });
357
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "groupDescriptions", {
358
- get: function () {
359
- return this._groupDescriptions;
360
- },
361
- enumerable: false,
362
- configurable: true
363
- });
364
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "propertiesRequested", {
365
- get: function () {
366
- return this._propertiesRequested;
367
- },
368
- set: function (value) {
369
- this._propertiesRequested = value;
370
- this.queueAutoRefresh();
371
- },
372
- enumerable: false,
373
- configurable: true
374
- });
375
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "schemaIncludedProperties", {
376
- get: function () {
377
- return this._schemaIncludedProperties;
378
- },
379
- set: function (value) {
380
- this._schemaIncludedProperties = value;
381
- this.queueAutoRefresh();
382
- },
383
- enumerable: false,
384
- configurable: true
385
- });
386
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "filterExpressions", {
387
- get: function () {
388
- return this._filterExpressions;
389
- },
390
- enumerable: false,
391
- configurable: true
392
- });
393
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "summaryDescriptions", {
394
- get: function () {
395
- return this._summaryDescriptions;
396
- },
397
- enumerable: false,
398
- configurable: true
399
- });
400
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "summaryScope", {
401
- get: function () {
402
- return this._summaryScope;
403
- },
404
- set: function (value) {
405
- this._summaryScope = value;
406
- },
407
- enumerable: false,
408
- configurable: true
409
- });
410
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "enableJsonp", {
411
- get: function () {
412
- return this._enableJsonp;
413
- },
414
- set: function (isEnabled) {
415
- this._enableJsonp = isEnabled;
416
- },
417
- enumerable: false,
418
- configurable: true
419
- });
420
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "fixedFullCount", {
421
- get: function () {
422
- return this._fixedFullCount;
423
- },
424
- set: function (value) {
425
- this._fixedFullCount = value;
426
- },
427
- enumerable: false,
428
- configurable: true
429
- });
430
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "provideFullCount", {
431
- get: function () {
432
- return this._provideFullCount;
433
- },
434
- set: function (value) {
435
- this._provideFullCount = value;
436
- },
437
- enumerable: false,
438
- configurable: true
439
- });
440
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "provideOrderByParameter", {
441
- get: function () {
442
- return this._provideOrderByParameter;
443
- },
444
- set: function (value) {
445
- this._provideOrderByParameter = value;
446
- },
447
- enumerable: false,
448
- configurable: true
449
- });
450
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "provideFilterParameter", {
451
- get: function () {
452
- return this._provideFilterParameter;
453
- },
454
- set: function (value) {
455
- this._provideFilterParameter = value;
456
- },
457
- enumerable: false,
458
- configurable: true
459
- });
460
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "provideAggregationParameter", {
461
- get: function () {
462
- return this._provideAggregationParameter;
463
- },
464
- set: function (value) {
465
- this._provideAggregationParameter = value;
466
- },
467
- enumerable: false,
468
- configurable: true
469
- });
470
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "provideAggregatedCount", {
471
- get: function () {
472
- return this._provideAggregatedCount;
473
- },
474
- set: function (value) {
475
- this._provideAggregatedCount = value;
476
- },
477
- enumerable: false,
478
- configurable: true
479
- });
480
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "provideUri", {
481
- get: function () {
482
- return this._provideUri;
483
- },
484
- set: function (value) {
485
- this._provideUri = value;
486
- },
487
- enumerable: false,
488
- configurable: true
489
- });
490
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "performFetch", {
491
- get: function () {
492
- return this._performFetch;
493
- },
494
- set: function (value) {
495
- this._performFetch = value;
496
- },
497
- enumerable: false,
498
- configurable: true
499
- });
500
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "providePagingParameter", {
501
- get: function () {
502
- return this._providePagingParameter;
503
- },
504
- set: function (value) {
505
- this._providePagingParameter = value;
506
- },
507
- enumerable: false,
508
- configurable: true
509
- });
510
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "provideDesiredPropertiesParameter", {
511
- get: function () {
512
- return this._provideDesiredPropertiesParameter;
513
- },
514
- set: function (value) {
515
- this._provideDesiredPropertiesParameter = value;
516
- },
517
- enumerable: false,
518
- configurable: true
519
- });
520
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "provideItems", {
521
- get: function () {
522
- return this._provideItems;
523
- },
524
- set: function (value) {
525
- this._provideItems = value;
526
- },
527
- enumerable: false,
528
- configurable: true
529
- });
530
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "notifyUsingSourceIndexes", {
531
- get: function () {
532
- return true;
533
- },
534
- enumerable: false,
535
- configurable: true
536
- });
537
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "isItemIndexLookupSupported", {
538
- get: function () {
539
- return false;
540
- },
541
- enumerable: false,
542
- configurable: true
543
- });
544
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "isKeyIndexLookupSupported", {
545
- get: function () {
546
- return false;
547
- },
548
- enumerable: false,
549
- configurable: true
550
- });
551
- RestVirtualDataSourceDataProvider.prototype.notifySetItem = function (index, oldItem, newItem) {
552
- if (this.updateNotifier != null) {
553
- this.updateNotifier.notifySetItem(index, oldItem, newItem);
554
- }
555
- };
556
- RestVirtualDataSourceDataProvider.prototype.notifyClearItems = function () {
557
- if (this.updateNotifier != null) {
558
- this.updateNotifier.notifyClearItems();
559
- }
560
- };
561
- RestVirtualDataSourceDataProvider.prototype.notifyInsertItem = function (index, newItem) {
562
- if (this.updateNotifier != null) {
563
- this.updateNotifier.notifyInsertItem(index, newItem);
564
- }
565
- };
566
- RestVirtualDataSourceDataProvider.prototype.notifyRemoveItem = function (index, oldItem) {
567
- if (this.updateNotifier != null) {
568
- this.updateNotifier.notifyRemoveItem(index, oldItem);
569
- }
570
- };
571
- RestVirtualDataSourceDataProvider.prototype.queueSchemaFetch = function () {
572
- if (this._schemaFetchQueued) {
573
- return;
574
- }
575
- if (this.executionContext != null) {
576
- this._schemaFetchQueued = true;
577
- this.executionContext.enqueueAction(runOn(this, this.doSchemaFetchInternal));
578
- }
579
- };
580
- RestVirtualDataSourceDataProvider.prototype.doSchemaFetchInternal = function () {
581
- if (!this._schemaFetchQueued) {
582
- return;
583
- }
584
- this._schemaFetchQueued = false;
585
- this.schemaFetchInternal();
586
- };
587
- RestVirtualDataSourceDataProvider.prototype.schemaFetchInternal = function () {
588
- this.schemaFetchInternalOverride();
589
- };
590
- RestVirtualDataSourceDataProvider.prototype.schemaFetchInternalOverride = function () {
591
- if (!this.deferAutoRefresh) {
592
- return;
593
- }
594
- this.removeAllPageRequests();
595
- this.killWorker();
596
- this.createWorker();
597
- this.addSchemaRequest();
598
- };
599
- RestVirtualDataSourceDataProvider.prototype.addSchemaRequest = function () {
600
- this._worker.addPageRequest(RestVirtualDataSourceDataProviderWorker.schemaRequestIndex, DataSourcePageRequestPriority.High);
601
- };
602
- RestVirtualDataSourceDataProvider.prototype.queueAutoRefresh = function () {
603
- if (this.deferAutoRefresh) {
604
- return;
605
- }
606
- if (this._autoRefreshQueued) {
607
- return;
608
- }
609
- if (this.executionContext != null) {
610
- this._autoRefreshQueued = true;
611
- this.executionContext.enqueueAction(runOn(this, this.doRefreshInternal));
612
- }
613
- };
614
- RestVirtualDataSourceDataProvider.prototype.doRefreshInternal = function () {
615
- if (this.deferAutoRefresh) {
616
- this._autoRefreshQueued = false;
617
- return;
618
- }
619
- if (!this._autoRefreshQueued) {
620
- return;
621
- }
622
- this._autoRefreshQueued = false;
623
- this.refreshInternal();
624
- };
625
- RestVirtualDataSourceDataProvider.prototype.refreshInternal = function () {
626
- this.refreshInternalOverride();
627
- };
628
- RestVirtualDataSourceDataProvider.prototype.refreshInternalOverride = function () {
629
- this.removeAllPageRequests();
630
- this.killWorker();
631
- this.createWorker();
632
- this._worker.addPageRequest(0, DataSourcePageRequestPriority.Normal);
633
- };
634
- RestVirtualDataSourceDataProvider.prototype.flushAutoRefresh = function () {
635
- this.doRefreshInternal();
636
- };
637
- RestVirtualDataSourceDataProvider.prototype.refresh = function () {
638
- this.refreshInternal();
639
- };
640
- RestVirtualDataSourceDataProvider.prototype.indexOfItem = function (item) {
641
- return -1;
642
- };
643
- RestVirtualDataSourceDataProvider.prototype.indexOfKey = function (key) {
644
- return -1;
645
- };
646
- RestVirtualDataSourceDataProvider.prototype.resolveSchemaPropertyType = function (propertyPath) {
647
- if (this.actualSchema == null) {
648
- return DataSourceSchemaPropertyType.ObjectValue;
649
- }
650
- if (stringContains(propertyPath, ".")) {
651
- return DataSourceSchemaPropertyType.ObjectValue;
652
- }
653
- for (var i = 0; i < this.actualSchema.propertyNames.length; i++) {
654
- var name_1 = this.actualSchema.propertyNames[i];
655
- if (name_1 == propertyPath) {
656
- return this.actualSchema.propertyTypes[i];
657
- }
658
- }
659
- return DataSourceSchemaPropertyType.ObjectValue;
660
- };
661
- RestVirtualDataSourceDataProvider.prototype.setItemValue = function (item, valueName, value) {
662
- // does nothing.
663
- };
664
- RestVirtualDataSourceDataProvider.prototype.removeItem = function (item) {
665
- // does nothing.
666
- };
667
- RestVirtualDataSourceDataProvider.prototype.addItem = function (item) {
668
- // does nothing.
669
- };
670
- RestVirtualDataSourceDataProvider.prototype.createBatchRequest = function (changes) {
671
- if (this._worker != null) {
672
- this._worker.createBatchRequest(changes);
673
- }
674
- };
675
- Object.defineProperty(RestVirtualDataSourceDataProvider.prototype, "batchCompleted", {
676
- get: function () {
677
- return this._batchCompleted;
678
- },
679
- set: function (v) {
680
- this._batchCompleted = v;
681
- },
682
- enumerable: false,
683
- configurable: true
684
- });
685
- RestVirtualDataSourceDataProvider.$t = markType(RestVirtualDataSourceDataProvider, 'ODataVirtualDataSourceDataProvider', Base.$type, [IDataSourceVirtualDataProvider_$type]);
686
- return RestVirtualDataSourceDataProvider;
687
- }(Base));