igniteui-webcomponents-datasources 4.2.5 → 4.3.0-beta.0
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.
- package/bundles/igniteui-webcomponents-datasources.umd.js +194 -194
- package/bundles/igniteui-webcomponents-datasources.umd.min.js +1 -1
- package/esm2015/lib/ODataVirtualDataSourceDataProviderWorker.js +37 -37
- package/esm2015/lib/RestVirtualDataSourceDataProviderWorker.js +40 -40
- package/esm2015/lib/util.js +5 -5
- package/esm5/lib/Entity.js +3 -3
- package/esm5/lib/EntityProperty.js +3 -3
- package/esm5/lib/EntitySet.js +4 -4
- package/esm5/lib/ODataSchemaProvider.js +4 -4
- package/esm5/lib/ODataVirtualDataSource.js +10 -10
- package/esm5/lib/ODataVirtualDataSourceDataProvider.js +27 -27
- package/esm5/lib/ODataVirtualDataSourceDataProviderWorker.js +26 -26
- package/esm5/lib/ODataVirtualDataSourceDataProviderWorkerSettings.js +12 -12
- package/esm5/lib/ODataVirtualDataSourceProviderTaskDataHolder.js +2 -2
- package/esm5/lib/RestVirtualDataSource.js +22 -22
- package/esm5/lib/RestVirtualDataSourceDataProvider.js +38 -38
- package/esm5/lib/RestVirtualDataSourceDataProviderWorker.js +18 -18
- package/esm5/lib/RestVirtualDataSourceDataProviderWorkerSettings.js +23 -23
- package/esm5/lib/RestVirtualDataSourceProviderTaskDataHolder.js +2 -2
- package/esm5/lib/Schema.js +3 -3
- package/esm5/lib/util.js +7 -7
- package/fesm2015/igniteui-webcomponents-datasources.js +82 -82
- package/fesm5/igniteui-webcomponents-datasources.js +157 -157
- package/lib/Entity.d.ts +4 -3
- package/lib/EntityProperty.d.ts +6 -3
- package/lib/EntitySet.d.ts +8 -4
- package/lib/ODataSchemaProvider.d.ts +2 -1
- package/lib/ODataVirtualDataSource.d.ts +13 -8
- package/lib/ODataVirtualDataSourceDataProvider.d.ts +38 -25
- package/lib/ODataVirtualDataSourceDataProviderWorker.d.ts +3 -3
- package/lib/ODataVirtualDataSourceDataProviderWorkerSettings.d.ts +20 -10
- package/lib/RestVirtualDataSource.d.ts +46 -20
- package/lib/RestVirtualDataSourceDataProvider.d.ts +69 -36
- package/lib/RestVirtualDataSourceDataProviderWorker.d.ts +3 -3
- package/lib/RestVirtualDataSourceDataProviderWorkerSettings.d.ts +51 -21
- package/lib/Schema.d.ts +4 -3
- package/lib/util.d.ts +8 -5
- package/package.json +2 -2
package/esm5/lib/Entity.js
CHANGED
|
@@ -17,7 +17,7 @@ var Entity = /** @class */ /*@__PURE__*/ (function () {
|
|
|
17
17
|
set: function (value) {
|
|
18
18
|
this._name = value;
|
|
19
19
|
},
|
|
20
|
-
enumerable:
|
|
20
|
+
enumerable: false,
|
|
21
21
|
configurable: true
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(Entity.prototype, "properties", {
|
|
@@ -27,7 +27,7 @@ var Entity = /** @class */ /*@__PURE__*/ (function () {
|
|
|
27
27
|
}
|
|
28
28
|
return this._properties;
|
|
29
29
|
},
|
|
30
|
-
enumerable:
|
|
30
|
+
enumerable: false,
|
|
31
31
|
configurable: true
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(Entity.prototype, "primaryKey", {
|
|
@@ -37,7 +37,7 @@ var Entity = /** @class */ /*@__PURE__*/ (function () {
|
|
|
37
37
|
}
|
|
38
38
|
return this._primaryKey;
|
|
39
39
|
},
|
|
40
|
-
enumerable:
|
|
40
|
+
enumerable: false,
|
|
41
41
|
configurable: true
|
|
42
42
|
});
|
|
43
43
|
Entity.prototype.loadProperties = function (entityNode) {
|
|
@@ -13,7 +13,7 @@ var EntityProperty = /** @class */ /*@__PURE__*/ (function () {
|
|
|
13
13
|
set: function (value) {
|
|
14
14
|
this._name = value;
|
|
15
15
|
},
|
|
16
|
-
enumerable:
|
|
16
|
+
enumerable: false,
|
|
17
17
|
configurable: true
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(EntityProperty.prototype, "isNullable", {
|
|
@@ -23,7 +23,7 @@ var EntityProperty = /** @class */ /*@__PURE__*/ (function () {
|
|
|
23
23
|
set: function (value) {
|
|
24
24
|
this._isNullable = value;
|
|
25
25
|
},
|
|
26
|
-
enumerable:
|
|
26
|
+
enumerable: false,
|
|
27
27
|
configurable: true
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(EntityProperty.prototype, "type", {
|
|
@@ -33,7 +33,7 @@ var EntityProperty = /** @class */ /*@__PURE__*/ (function () {
|
|
|
33
33
|
set: function (value) {
|
|
34
34
|
this._type = value;
|
|
35
35
|
},
|
|
36
|
-
enumerable:
|
|
36
|
+
enumerable: false,
|
|
37
37
|
configurable: true
|
|
38
38
|
});
|
|
39
39
|
return EntityProperty;
|
package/esm5/lib/EntitySet.js
CHANGED
|
@@ -30,7 +30,7 @@ var EntitySet = /** @class */ /*@__PURE__*/ (function () {
|
|
|
30
30
|
set: function (value) {
|
|
31
31
|
this._entityName = value;
|
|
32
32
|
},
|
|
33
|
-
enumerable:
|
|
33
|
+
enumerable: false,
|
|
34
34
|
configurable: true
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(EntitySet.prototype, "entityNamespace", {
|
|
@@ -40,7 +40,7 @@ var EntitySet = /** @class */ /*@__PURE__*/ (function () {
|
|
|
40
40
|
set: function (value) {
|
|
41
41
|
this._entityNamespace = value;
|
|
42
42
|
},
|
|
43
|
-
enumerable:
|
|
43
|
+
enumerable: false,
|
|
44
44
|
configurable: true
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(EntitySet.prototype, "entityType", {
|
|
@@ -50,7 +50,7 @@ var EntitySet = /** @class */ /*@__PURE__*/ (function () {
|
|
|
50
50
|
set: function (value) {
|
|
51
51
|
this._entityType = value;
|
|
52
52
|
},
|
|
53
|
-
enumerable:
|
|
53
|
+
enumerable: false,
|
|
54
54
|
configurable: true
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(EntitySet.prototype, "name", {
|
|
@@ -60,7 +60,7 @@ var EntitySet = /** @class */ /*@__PURE__*/ (function () {
|
|
|
60
60
|
set: function (value) {
|
|
61
61
|
this._name = value;
|
|
62
62
|
},
|
|
63
|
-
enumerable:
|
|
63
|
+
enumerable: false,
|
|
64
64
|
configurable: true
|
|
65
65
|
});
|
|
66
66
|
return EntitySet;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { __values } from "tslib";
|
|
2
2
|
import { Schema } from "./Schema";
|
|
3
3
|
import { XDocument } from "igniteui-webcomponents-core";
|
|
4
4
|
import { XElement } from "igniteui-webcomponents-core";
|
|
@@ -63,7 +63,7 @@ var ODataSchemaProvider = /** @class */ /*@__PURE__*/ (function () {
|
|
|
63
63
|
set: function (value) {
|
|
64
64
|
this._schema = value;
|
|
65
65
|
},
|
|
66
|
-
enumerable:
|
|
66
|
+
enumerable: false,
|
|
67
67
|
configurable: true
|
|
68
68
|
});
|
|
69
69
|
ODataSchemaProvider.prototype.getODataDataSourceSchema = function (entitySet) {
|
|
@@ -79,7 +79,7 @@ var ODataSchemaProvider = /** @class */ /*@__PURE__*/ (function () {
|
|
|
79
79
|
var entity = this.schema.entities.get(es.entityName);
|
|
80
80
|
if (null != entity) {
|
|
81
81
|
try {
|
|
82
|
-
for (var _c =
|
|
82
|
+
for (var _c = __values(entity.properties.values()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
83
83
|
var property = _d.value;
|
|
84
84
|
valueNames.push(property.name);
|
|
85
85
|
if (property.type == "Edm.String") {
|
|
@@ -131,7 +131,7 @@ var ODataSchemaProvider = /** @class */ /*@__PURE__*/ (function () {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
try {
|
|
134
|
-
for (var _e =
|
|
134
|
+
for (var _e = __values(entity.primaryKey), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
135
135
|
var k = _f.value;
|
|
136
136
|
primaryKey.push(k);
|
|
137
137
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
2
|
import { VirtualDataSource } from "igniteui-webcomponents-core";
|
|
3
3
|
import { ODataVirtualDataSourceDataProvider } from "./ODataVirtualDataSourceDataProvider";
|
|
4
4
|
import { typeCast } from "igniteui-webcomponents-core";
|
|
5
5
|
var ODataVirtualDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
|
|
6
|
-
|
|
6
|
+
__extends(ODataVirtualDataSource, _super);
|
|
7
7
|
function ODataVirtualDataSource() {
|
|
8
8
|
var _this = _super.call(this) || this;
|
|
9
9
|
_this._baseUri = null;
|
|
@@ -38,7 +38,7 @@ var ODataVirtualDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
|
|
|
38
38
|
this.onBaseUriChanged(oldValue, this._baseUri);
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
enumerable:
|
|
41
|
+
enumerable: false,
|
|
42
42
|
configurable: true
|
|
43
43
|
});
|
|
44
44
|
ODataVirtualDataSource.prototype.onEntitySetChanged = function (oldValue, newValue) {
|
|
@@ -58,7 +58,7 @@ var ODataVirtualDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
|
|
|
58
58
|
this.onEntitySetChanged(oldValue, this._entitySet);
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
-
enumerable:
|
|
61
|
+
enumerable: false,
|
|
62
62
|
configurable: true
|
|
63
63
|
});
|
|
64
64
|
ODataVirtualDataSource.prototype.onTimeoutMillisecondsChanged = function (oldValue, newValue) {
|
|
@@ -77,28 +77,28 @@ var ODataVirtualDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
|
|
|
77
77
|
this.onTimeoutMillisecondsChanged(oldValue, this._timeoutMilliseconds);
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
enumerable:
|
|
80
|
+
enumerable: false,
|
|
81
81
|
configurable: true
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(ODataVirtualDataSource.prototype, "isSortingSupportedOverride", {
|
|
84
84
|
get: function () {
|
|
85
85
|
return true;
|
|
86
86
|
},
|
|
87
|
-
enumerable:
|
|
87
|
+
enumerable: false,
|
|
88
88
|
configurable: true
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(ODataVirtualDataSource.prototype, "isFilteringSupportedOverride", {
|
|
91
91
|
get: function () {
|
|
92
92
|
return true;
|
|
93
93
|
},
|
|
94
|
-
enumerable:
|
|
94
|
+
enumerable: false,
|
|
95
95
|
configurable: true
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(ODataVirtualDataSource.prototype, "isGroupingSupportedOverride", {
|
|
98
98
|
get: function () {
|
|
99
99
|
return this.isAggregationSupportedByServer;
|
|
100
100
|
},
|
|
101
|
-
enumerable:
|
|
101
|
+
enumerable: false,
|
|
102
102
|
configurable: true
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(ODataVirtualDataSource.prototype, "isAggregationSupportedByServer", {
|
|
@@ -111,7 +111,7 @@ var ODataVirtualDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
|
|
|
111
111
|
this.actualDataProvider.isAggregationSupported = isSupported;
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
|
-
enumerable:
|
|
114
|
+
enumerable: false,
|
|
115
115
|
configurable: true
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(ODataVirtualDataSource.prototype, "enableJsonp", {
|
|
@@ -124,7 +124,7 @@ var ODataVirtualDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
|
|
|
124
124
|
this.actualDataProvider.enableJsonp = isEnabled;
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
enumerable:
|
|
127
|
+
enumerable: false,
|
|
128
128
|
configurable: true
|
|
129
129
|
});
|
|
130
130
|
ODataVirtualDataSource.prototype.clone = function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
2
|
import { Base, runOn, markType } from "igniteui-webcomponents-core";
|
|
3
3
|
import { IDataSourceVirtualDataProvider_$type } from "igniteui-webcomponents-core";
|
|
4
4
|
import { SortDescriptionCollection } from "igniteui-webcomponents-core";
|
|
@@ -12,7 +12,7 @@ import { DataSourceSchemaPropertyType } from "igniteui-webcomponents-core";
|
|
|
12
12
|
import { stringContains } from "igniteui-webcomponents-core";
|
|
13
13
|
import { SummaryDescriptionCollection } from "igniteui-webcomponents-core";
|
|
14
14
|
var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (_super) {
|
|
15
|
-
|
|
15
|
+
__extends(ODataVirtualDataSourceDataProvider, _super);
|
|
16
16
|
function ODataVirtualDataSourceDataProvider() {
|
|
17
17
|
var _this = _super.call(this) || this;
|
|
18
18
|
_this._worker = null;
|
|
@@ -151,7 +151,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
151
151
|
this._pageLoaded = value;
|
|
152
152
|
this.queueAutoRefresh();
|
|
153
153
|
},
|
|
154
|
-
enumerable:
|
|
154
|
+
enumerable: false,
|
|
155
155
|
configurable: true
|
|
156
156
|
});
|
|
157
157
|
ODataVirtualDataSourceDataProvider.prototype.raisePageLoaded = function (page, fullCount, actualPageSize) {
|
|
@@ -187,7 +187,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
187
187
|
this._pageSizeRequested = value;
|
|
188
188
|
this.queueAutoRefresh();
|
|
189
189
|
},
|
|
190
|
-
enumerable:
|
|
190
|
+
enumerable: false,
|
|
191
191
|
configurable: true
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "baseUri", {
|
|
@@ -204,7 +204,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
},
|
|
207
|
-
enumerable:
|
|
207
|
+
enumerable: false,
|
|
208
208
|
configurable: true
|
|
209
209
|
});
|
|
210
210
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "entitySet", {
|
|
@@ -221,7 +221,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
|
-
enumerable:
|
|
224
|
+
enumerable: false,
|
|
225
225
|
configurable: true
|
|
226
226
|
});
|
|
227
227
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "timeoutMilliseconds", {
|
|
@@ -232,7 +232,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
232
232
|
this._timeoutMilliseconds = value;
|
|
233
233
|
this.queueAutoRefresh();
|
|
234
234
|
},
|
|
235
|
-
enumerable:
|
|
235
|
+
enumerable: false,
|
|
236
236
|
configurable: true
|
|
237
237
|
});
|
|
238
238
|
ODataVirtualDataSourceDataProvider.prototype.getItemValue = function (item, valueName) {
|
|
@@ -257,14 +257,14 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
257
257
|
get: function () {
|
|
258
258
|
return this._currentFullCount;
|
|
259
259
|
},
|
|
260
|
-
enumerable:
|
|
260
|
+
enumerable: false,
|
|
261
261
|
configurable: true
|
|
262
262
|
});
|
|
263
263
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "actualSchema", {
|
|
264
264
|
get: function () {
|
|
265
265
|
return this._currentSchema;
|
|
266
266
|
},
|
|
267
|
-
enumerable:
|
|
267
|
+
enumerable: false,
|
|
268
268
|
configurable: true
|
|
269
269
|
});
|
|
270
270
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "executionContext", {
|
|
@@ -275,7 +275,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
275
275
|
this._executionContext = value;
|
|
276
276
|
this.queueAutoRefresh();
|
|
277
277
|
},
|
|
278
|
-
enumerable:
|
|
278
|
+
enumerable: false,
|
|
279
279
|
configurable: true
|
|
280
280
|
});
|
|
281
281
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "updateNotifier", {
|
|
@@ -285,7 +285,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
285
285
|
set: function (value) {
|
|
286
286
|
this._updateNotifier = value;
|
|
287
287
|
},
|
|
288
|
-
enumerable:
|
|
288
|
+
enumerable: false,
|
|
289
289
|
configurable: true
|
|
290
290
|
});
|
|
291
291
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "deferAutoRefresh", {
|
|
@@ -301,28 +301,28 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
301
301
|
this.queueSchemaFetch();
|
|
302
302
|
}
|
|
303
303
|
},
|
|
304
|
-
enumerable:
|
|
304
|
+
enumerable: false,
|
|
305
305
|
configurable: true
|
|
306
306
|
});
|
|
307
307
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "isSortingSupported", {
|
|
308
308
|
get: function () {
|
|
309
309
|
return true;
|
|
310
310
|
},
|
|
311
|
-
enumerable:
|
|
311
|
+
enumerable: false,
|
|
312
312
|
configurable: true
|
|
313
313
|
});
|
|
314
314
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "isGroupingSupported", {
|
|
315
315
|
get: function () {
|
|
316
316
|
return this.isAggregationSupported;
|
|
317
317
|
},
|
|
318
|
-
enumerable:
|
|
318
|
+
enumerable: false,
|
|
319
319
|
configurable: true
|
|
320
320
|
});
|
|
321
321
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "isFilteringSupported", {
|
|
322
322
|
get: function () {
|
|
323
323
|
return true;
|
|
324
324
|
},
|
|
325
|
-
enumerable:
|
|
325
|
+
enumerable: false,
|
|
326
326
|
configurable: true
|
|
327
327
|
});
|
|
328
328
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "isAggregationSupported", {
|
|
@@ -332,21 +332,21 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
332
332
|
set: function (isSupported) {
|
|
333
333
|
this._isAggregationSupported = isSupported;
|
|
334
334
|
},
|
|
335
|
-
enumerable:
|
|
335
|
+
enumerable: false,
|
|
336
336
|
configurable: true
|
|
337
337
|
});
|
|
338
338
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "sortDescriptions", {
|
|
339
339
|
get: function () {
|
|
340
340
|
return this._sortDescriptions;
|
|
341
341
|
},
|
|
342
|
-
enumerable:
|
|
342
|
+
enumerable: false,
|
|
343
343
|
configurable: true
|
|
344
344
|
});
|
|
345
345
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "groupDescriptions", {
|
|
346
346
|
get: function () {
|
|
347
347
|
return this._groupDescriptions;
|
|
348
348
|
},
|
|
349
|
-
enumerable:
|
|
349
|
+
enumerable: false,
|
|
350
350
|
configurable: true
|
|
351
351
|
});
|
|
352
352
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "propertiesRequested", {
|
|
@@ -357,21 +357,21 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
357
357
|
this._propertiesRequested = value;
|
|
358
358
|
this.queueAutoRefresh();
|
|
359
359
|
},
|
|
360
|
-
enumerable:
|
|
360
|
+
enumerable: false,
|
|
361
361
|
configurable: true
|
|
362
362
|
});
|
|
363
363
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "filterExpressions", {
|
|
364
364
|
get: function () {
|
|
365
365
|
return this._filterExpressions;
|
|
366
366
|
},
|
|
367
|
-
enumerable:
|
|
367
|
+
enumerable: false,
|
|
368
368
|
configurable: true
|
|
369
369
|
});
|
|
370
370
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "summaryDescriptions", {
|
|
371
371
|
get: function () {
|
|
372
372
|
return this._summaryDescriptions;
|
|
373
373
|
},
|
|
374
|
-
enumerable:
|
|
374
|
+
enumerable: false,
|
|
375
375
|
configurable: true
|
|
376
376
|
});
|
|
377
377
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "summaryScope", {
|
|
@@ -381,7 +381,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
381
381
|
set: function (value) {
|
|
382
382
|
this._summaryScope = value;
|
|
383
383
|
},
|
|
384
|
-
enumerable:
|
|
384
|
+
enumerable: false,
|
|
385
385
|
configurable: true
|
|
386
386
|
});
|
|
387
387
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "enableJsonp", {
|
|
@@ -391,28 +391,28 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
391
391
|
set: function (isEnabled) {
|
|
392
392
|
this._enableJsonp = isEnabled;
|
|
393
393
|
},
|
|
394
|
-
enumerable:
|
|
394
|
+
enumerable: false,
|
|
395
395
|
configurable: true
|
|
396
396
|
});
|
|
397
397
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "notifyUsingSourceIndexes", {
|
|
398
398
|
get: function () {
|
|
399
399
|
return true;
|
|
400
400
|
},
|
|
401
|
-
enumerable:
|
|
401
|
+
enumerable: false,
|
|
402
402
|
configurable: true
|
|
403
403
|
});
|
|
404
404
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "isItemIndexLookupSupported", {
|
|
405
405
|
get: function () {
|
|
406
406
|
return false;
|
|
407
407
|
},
|
|
408
|
-
enumerable:
|
|
408
|
+
enumerable: false,
|
|
409
409
|
configurable: true
|
|
410
410
|
});
|
|
411
411
|
Object.defineProperty(ODataVirtualDataSourceDataProvider.prototype, "isKeyIndexLookupSupported", {
|
|
412
412
|
get: function () {
|
|
413
413
|
return false;
|
|
414
414
|
},
|
|
415
|
-
enumerable:
|
|
415
|
+
enumerable: false,
|
|
416
416
|
configurable: true
|
|
417
417
|
});
|
|
418
418
|
ODataVirtualDataSourceDataProvider.prototype.notifySetItem = function (index, oldItem, newItem) {
|
|
@@ -537,7 +537,7 @@ var ODataVirtualDataSourceDataProvider = /** @class */ /*@__PURE__*/ (function (
|
|
|
537
537
|
set: function (value) {
|
|
538
538
|
this._batchCompleted = value;
|
|
539
539
|
},
|
|
540
|
-
enumerable:
|
|
540
|
+
enumerable: false,
|
|
541
541
|
configurable: true
|
|
542
542
|
});
|
|
543
543
|
ODataVirtualDataSourceDataProvider.$t = markType(ODataVirtualDataSourceDataProvider, 'ODataVirtualDataSourceDataProvider', Base.$type, [IDataSourceVirtualDataProvider_$type]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { __extends, __generator, __values } from "tslib";
|
|
2
2
|
import { AsyncVirtualDataSourceProviderWorker } from "igniteui-webcomponents-core";
|
|
3
3
|
import { SortDescriptionCollection } from "igniteui-webcomponents-core";
|
|
4
4
|
import { ODataVirtualDataSourceProviderTaskDataHolder } from "./ODataVirtualDataSourceProviderTaskDataHolder";
|
|
@@ -16,7 +16,7 @@ import { DataSourceSummaryScope } from "igniteui-webcomponents-core";
|
|
|
16
16
|
import { DefaultSummaryResult } from "igniteui-webcomponents-core";
|
|
17
17
|
import { TransactionType } from "igniteui-webcomponents-core";
|
|
18
18
|
var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (function (_super) {
|
|
19
|
-
|
|
19
|
+
__extends(ODataVirtualDataSourceDataProviderWorker, _super);
|
|
20
20
|
function ODataVirtualDataSourceDataProviderWorker(settings) {
|
|
21
21
|
var e_1, _a;
|
|
22
22
|
var _this = _super.call(this, settings) || this;
|
|
@@ -41,7 +41,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
41
41
|
if (_this._groupDescriptions != null && _this._groupDescriptions.size() > 0) {
|
|
42
42
|
_this._sortDescriptions = new SortDescriptionCollection();
|
|
43
43
|
try {
|
|
44
|
-
for (var _b =
|
|
44
|
+
for (var _b = __values(_this.iter(settings.sortDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
45
45
|
var sd = _c.value;
|
|
46
46
|
_this._sortDescriptions.add(sd);
|
|
47
47
|
}
|
|
@@ -76,21 +76,21 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
76
76
|
get: function () {
|
|
77
77
|
return this._sortDescriptions;
|
|
78
78
|
},
|
|
79
|
-
enumerable:
|
|
79
|
+
enumerable: false,
|
|
80
80
|
configurable: true
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(ODataVirtualDataSourceDataProviderWorker.prototype, "filterExpressions", {
|
|
83
83
|
get: function () {
|
|
84
84
|
return this._filterExpressions;
|
|
85
85
|
},
|
|
86
|
-
enumerable:
|
|
86
|
+
enumerable: false,
|
|
87
87
|
configurable: true
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(ODataVirtualDataSourceDataProviderWorker.prototype, "desiredProperties", {
|
|
90
90
|
get: function () {
|
|
91
91
|
return this._desiredPropeties;
|
|
92
92
|
},
|
|
93
|
-
enumerable:
|
|
93
|
+
enumerable: false,
|
|
94
94
|
configurable: true
|
|
95
95
|
});
|
|
96
96
|
ODataVirtualDataSourceDataProviderWorker.prototype.initialize = function () {
|
|
@@ -111,7 +111,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
111
111
|
};
|
|
112
112
|
ODataVirtualDataSourceDataProviderWorker.prototype.iter = function (coll) {
|
|
113
113
|
var i;
|
|
114
|
-
return
|
|
114
|
+
return __generator(this, function (_a) {
|
|
115
115
|
switch (_a.label) {
|
|
116
116
|
case 0:
|
|
117
117
|
i = 0;
|
|
@@ -132,7 +132,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
132
132
|
};
|
|
133
133
|
ODataVirtualDataSourceDataProviderWorker.prototype.iterFilter = function (coll) {
|
|
134
134
|
var i;
|
|
135
|
-
return
|
|
135
|
+
return __generator(this, function (_a) {
|
|
136
136
|
switch (_a.label) {
|
|
137
137
|
case 0:
|
|
138
138
|
i = 0;
|
|
@@ -153,7 +153,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
153
153
|
};
|
|
154
154
|
ODataVirtualDataSourceDataProviderWorker.prototype.iterSummaries = function (summaries) {
|
|
155
155
|
var i;
|
|
156
|
-
return
|
|
156
|
+
return __generator(this, function (_a) {
|
|
157
157
|
switch (_a.label) {
|
|
158
158
|
case 0:
|
|
159
159
|
i = 0;
|
|
@@ -309,7 +309,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
309
309
|
if (this._groupDescriptions != null) {
|
|
310
310
|
var first1 = true;
|
|
311
311
|
try {
|
|
312
|
-
for (var _b =
|
|
312
|
+
for (var _b = __values(this.iter(this._groupDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
313
313
|
var group = _c.value;
|
|
314
314
|
if (first1) {
|
|
315
315
|
first1 = false;
|
|
@@ -381,7 +381,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
381
381
|
var e_3, _a;
|
|
382
382
|
var groupNames = [];
|
|
383
383
|
try {
|
|
384
|
-
for (var _b =
|
|
384
|
+
for (var _b = __values(this.iter(this._groupDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
385
385
|
var group = _c.value;
|
|
386
386
|
groupNames.push(group.propertyName);
|
|
387
387
|
}
|
|
@@ -413,7 +413,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
413
413
|
var e_4, _a;
|
|
414
414
|
var groupValues = [];
|
|
415
415
|
try {
|
|
416
|
-
for (var groupNames_1 =
|
|
416
|
+
for (var groupNames_1 = __values(groupNames), groupNames_1_1 = groupNames_1.next(); !groupNames_1_1.done; groupNames_1_1 = groupNames_1.next()) {
|
|
417
417
|
var name_1 = groupNames_1_1.value;
|
|
418
418
|
if (group[name_1]) {
|
|
419
419
|
groupValues.push(group[name_1]);
|
|
@@ -506,7 +506,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
506
506
|
var first = true;
|
|
507
507
|
var countExists = false;
|
|
508
508
|
try {
|
|
509
|
-
for (var _b =
|
|
509
|
+
for (var _b = __values(this.iterSummaries(this._summaryDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
510
510
|
var summary = _c.value;
|
|
511
511
|
if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
|
|
512
512
|
continue;
|
|
@@ -555,7 +555,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
555
555
|
var e_6, _a;
|
|
556
556
|
var summaryResults = [];
|
|
557
557
|
try {
|
|
558
|
-
for (var _b =
|
|
558
|
+
for (var _b = __values(this.iterSummaries(this._summaryDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
559
559
|
var summary = _c.value;
|
|
560
560
|
var summaryName = summary.propertyName;
|
|
561
561
|
switch (summary.operand) {
|
|
@@ -645,7 +645,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
645
645
|
if (this.sortDescriptions != null) {
|
|
646
646
|
var sortString = null;
|
|
647
647
|
try {
|
|
648
|
-
for (var _b =
|
|
648
|
+
for (var _b = __values(this.iter(this.sortDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
649
649
|
var sort = _c.value;
|
|
650
650
|
if (sortString == null) {
|
|
651
651
|
sortString = "";
|
|
@@ -725,7 +725,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
725
725
|
var sb = "";
|
|
726
726
|
var first = true;
|
|
727
727
|
try {
|
|
728
|
-
for (var _b =
|
|
728
|
+
for (var _b = __values(this.iterFilter(this.filterExpressions)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
729
729
|
var expr = _c.value;
|
|
730
730
|
if (first) {
|
|
731
731
|
first = false;
|
|
@@ -802,9 +802,9 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
802
802
|
if (c.transactionType === TransactionType.Add) {
|
|
803
803
|
requests.push({
|
|
804
804
|
method: "POST",
|
|
805
|
-
id: "r"
|
|
805
|
+
id: "r".concat(i),
|
|
806
806
|
atomicityGroup: "g1",
|
|
807
|
-
url: this._baseUri
|
|
807
|
+
url: "".concat(this._baseUri, "/").concat(this._entitySet),
|
|
808
808
|
headers: headers,
|
|
809
809
|
body: c.value,
|
|
810
810
|
});
|
|
@@ -815,9 +815,9 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
815
815
|
}
|
|
816
816
|
requests.push({
|
|
817
817
|
method: "PATCH",
|
|
818
|
-
id: "r"
|
|
818
|
+
id: "r".concat(i),
|
|
819
819
|
atomicityGroup: "g1",
|
|
820
|
-
url: this._baseUri
|
|
820
|
+
url: "".concat(this._baseUri, "/").concat(this.getRequestUriWithKey(c.id)),
|
|
821
821
|
headers: headers,
|
|
822
822
|
body: c.value,
|
|
823
823
|
});
|
|
@@ -828,15 +828,15 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
828
828
|
}
|
|
829
829
|
requests.push({
|
|
830
830
|
method: "DELETE",
|
|
831
|
-
id: "r"
|
|
831
|
+
id: "r".concat(i),
|
|
832
832
|
atomicityGroup: "g1",
|
|
833
|
-
url: this._baseUri
|
|
833
|
+
url: "".concat(this._baseUri, "/").concat(this.getRequestUriWithKey(c.id)),
|
|
834
834
|
headers: headers,
|
|
835
835
|
});
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
838
|
var request = {
|
|
839
|
-
requestUri: this._baseUri
|
|
839
|
+
requestUri: "".concat(this._baseUri, "/$batch"),
|
|
840
840
|
method: "POST",
|
|
841
841
|
headers: { "Content-Type": "application/json" },
|
|
842
842
|
body: JSON.stringify({ requests: requests })
|
|
@@ -853,7 +853,7 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
853
853
|
success = false;
|
|
854
854
|
var failedRequest = requests.filter(function (r) { return r.id == data.responses[i].id; })[0];
|
|
855
855
|
if (failedRequest) {
|
|
856
|
-
var msg = failedRequest.method
|
|
856
|
+
var msg = "".concat(failedRequest.method, " request failed with code ").concat(data.responses[i].status);
|
|
857
857
|
messages.push(msg);
|
|
858
858
|
console.error(msg);
|
|
859
859
|
}
|
|
@@ -891,9 +891,9 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
|
|
|
891
891
|
if (i > 0) {
|
|
892
892
|
result += ",";
|
|
893
893
|
}
|
|
894
|
-
result += keys[i]
|
|
894
|
+
result += "".concat(keys[i], "=").concat(key[keys[i]]);
|
|
895
895
|
}
|
|
896
|
-
return this._entitySet
|
|
896
|
+
return "".concat(this._entitySet, "(").concat(result, ")");
|
|
897
897
|
};
|
|
898
898
|
ODataVirtualDataSourceDataProviderWorker.schemaRequestIndex = -1;
|
|
899
899
|
return ODataVirtualDataSourceDataProviderWorker;
|