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,132 +0,0 @@
1
- import { VirtualDataSource } from "igniteui-webcomponents-core";
2
- import { ODataVirtualDataSourceDataProvider } from "./ODataVirtualDataSourceDataProvider";
3
- import { typeCast } from "igniteui-webcomponents-core";
4
- export class ODataVirtualDataSource extends VirtualDataSource {
5
- constructor() {
6
- super();
7
- this._baseUri = null;
8
- this._entitySet = null;
9
- this._timeoutMilliseconds = 10000;
10
- this._isAggregationSupportedByServer = false;
11
- this._enableJsonp = true;
12
- this.dataProvider = ((() => {
13
- let $ret = new ODataVirtualDataSourceDataProvider();
14
- $ret.executionContext = this.executionContext;
15
- $ret.enableJsonp = this.enableJsonp;
16
- $ret.isAggregationSupported = this.isGroupingSupported;
17
- return $ret;
18
- })());
19
- this.externalDataSource = this;
20
- }
21
- onBaseUriChanged(oldValue, newValue) {
22
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
23
- this.actualDataProvider.baseUri = this.baseUri;
24
- }
25
- this.queueAutoRefresh();
26
- }
27
- get baseUri() {
28
- return this._baseUri;
29
- }
30
- set baseUri(value) {
31
- let oldValue = this._baseUri;
32
- this._baseUri = value;
33
- if (oldValue != this._baseUri) {
34
- this.onBaseUriChanged(oldValue, this._baseUri);
35
- }
36
- }
37
- onEntitySetChanged(oldValue, newValue) {
38
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
39
- this.actualDataProvider.entitySet = this.entitySet;
40
- }
41
- this.queueAutoRefresh();
42
- }
43
- get entitySet() {
44
- return this._entitySet;
45
- }
46
- set entitySet(value) {
47
- let oldValue = this._entitySet;
48
- this._entitySet = value;
49
- if (this._entitySet != oldValue) {
50
- this.onEntitySetChanged(oldValue, this._entitySet);
51
- }
52
- }
53
- onTimeoutMillisecondsChanged(oldValue, newValue) {
54
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
55
- this.actualDataProvider.timeoutMilliseconds = this.timeoutMilliseconds;
56
- }
57
- }
58
- get timeoutMilliseconds() {
59
- return this._timeoutMilliseconds;
60
- }
61
- set timeoutMilliseconds(value) {
62
- let oldValue = this._timeoutMilliseconds;
63
- this._timeoutMilliseconds = value;
64
- if (oldValue != this._timeoutMilliseconds) {
65
- this.onTimeoutMillisecondsChanged(oldValue, this._timeoutMilliseconds);
66
- }
67
- }
68
- get isSortingSupportedOverride() {
69
- return true;
70
- }
71
- get isFilteringSupportedOverride() {
72
- return true;
73
- }
74
- get isGroupingSupportedOverride() {
75
- return this.isAggregationSupportedByServer;
76
- }
77
- get isAggregationSupportedByServer() {
78
- return this._isAggregationSupportedByServer;
79
- }
80
- set isAggregationSupportedByServer(isSupported) {
81
- this._isAggregationSupportedByServer = isSupported;
82
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
83
- this.actualDataProvider.isAggregationSupported = isSupported;
84
- }
85
- }
86
- get enableJsonp() {
87
- return this._enableJsonp;
88
- }
89
- set enableJsonp(isEnabled) {
90
- this._enableJsonp = isEnabled;
91
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
92
- this.actualDataProvider.enableJsonp = isEnabled;
93
- }
94
- }
95
- clone() {
96
- let dataSource = new ODataVirtualDataSource();
97
- dataSource.executionContext = this.executionContext;
98
- dataSource.includeSummaryRowsInSection = this.includeSummaryRowsInSection;
99
- dataSource.isSectionCollapsable = this.isSectionCollapsable;
100
- dataSource.isSectionExpandedDefault = this.isSectionExpandedDefault;
101
- //dataSource.isSectionHeaderNormalRow = this.isSectionHeaderNormalRow;
102
- dataSource.isSectionSummaryRowsAtBottom = this.isSectionSummaryRowsAtBottom;
103
- //dataSource.isSectionContentVisible = this.isSectionContentVisible;
104
- dataSource.primaryKey = this.primaryKey;
105
- dataSource.propertiesRequested = this.propertiesRequested;
106
- dataSource.sectionHeaderDisplayMode = this.sectionHeaderDisplayMode;
107
- dataSource.shouldEmitSectionFooters = this.shouldEmitSectionFooters;
108
- dataSource.shouldEmitSectionHeaders = this.shouldEmitSectionHeaders;
109
- dataSource.shouldEmitShiftedRows = this.shouldEmitShiftedRows;
110
- dataSource.summaryScope = this.summaryScope;
111
- for (var i = 0; i < this.groupDescriptions.size(); i++) {
112
- dataSource.groupDescriptions.add(this.groupDescriptions.get(i));
113
- }
114
- for (var i = 0; i < this.sortDescriptions.size(); i++) {
115
- dataSource.sortDescriptions.add(this.sortDescriptions.get(i));
116
- }
117
- for (var i = 0; i < this.filterExpressions.size(); i++) {
118
- dataSource.filterExpressions.add(this.filterExpressions.get(i));
119
- }
120
- for (var i = 0; i < this.summaryDescriptions.size(); i++) {
121
- dataSource.summaryDescriptions.add(this.summaryDescriptions.get(i));
122
- }
123
- dataSource.pageSizeRequested = this.pageSizeRequested;
124
- dataSource.maxCachedPages = this.maxCachedPages;
125
- dataSource.baseUri = this.baseUri;
126
- dataSource.entitySet = this.entitySet;
127
- dataSource.timeoutMilliseconds = this.timeoutMilliseconds;
128
- dataSource.isAggregationSupportedByServer = this.isAggregationSupportedByServer;
129
- dataSource.enableJsonp = this.enableJsonp;
130
- return dataSource;
131
- }
132
- }
@@ -1,453 +0,0 @@
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
- let ODataVirtualDataSourceDataProvider = /*@__PURE__*/ (() => {
14
- class ODataVirtualDataSourceDataProvider extends Base {
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
- ODataVirtualDataSourceDataProvider.$t = /*@__PURE__*/ markType(ODataVirtualDataSourceDataProvider, 'ODataVirtualDataSourceDataProvider', Base.$type, [IDataSourceVirtualDataProvider_$type]);
451
- return ODataVirtualDataSourceDataProvider;
452
- })();
453
- export { ODataVirtualDataSourceDataProvider };