igniteui-webcomponents-datasources 7.1.1-beta.1 → 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.
- package/esm2022/lib/ODataSchemaProvider.js +120 -0
- package/esm2022/lib/ODataVirtualDataSourceDataProvider.js +450 -0
- package/esm2022/lib/ODataVirtualDataSourceDataProviderWorker.js +710 -0
- package/esm2022/lib/ODataVirtualDataSourceDataProviderWorkerSettings.js +83 -0
- package/esm2022/lib/ODataVirtualDataSourceProviderTaskDataHolder.js +6 -0
- package/esm2022/lib/RestVirtualDataSourceDataProvider.js +535 -0
- package/esm2022/lib/RestVirtualDataSourceDataProviderWorker.js +762 -0
- package/esm2022/lib/RestVirtualDataSourceDataProviderWorkerSettings.js +159 -0
- package/esm2022/lib/RestVirtualDataSourceProviderTaskDataHolder.js +6 -0
- package/package.json +14 -10
- package/bundles/igniteui-webcomponents-datasources.umd.js +0 -4725
- package/bundles/igniteui-webcomponents-datasources.umd.min.js +0 -7
- package/esm2015/igniteui-webcomponents-datasources.js +0 -1
- package/esm2015/lib/ODataSchemaProvider.js +0 -123
- package/esm2015/lib/ODataVirtualDataSourceDataProvider.js +0 -453
- package/esm2015/lib/ODataVirtualDataSourceDataProviderWorker.js +0 -713
- package/esm2015/lib/ODataVirtualDataSourceDataProviderWorkerSettings.js +0 -86
- package/esm2015/lib/ODataVirtualDataSourceProviderTaskDataHolder.js +0 -9
- package/esm2015/lib/RestVirtualDataSourceDataProvider.js +0 -538
- package/esm2015/lib/RestVirtualDataSourceDataProviderWorker.js +0 -765
- package/esm2015/lib/RestVirtualDataSourceDataProviderWorkerSettings.js +0 -162
- package/esm2015/lib/RestVirtualDataSourceProviderTaskDataHolder.js +0 -9
- package/esm5/igniteui-webcomponents-datasources.js +0 -1
- package/esm5/lib/Entity.js +0 -79
- package/esm5/lib/EntityProperty.js +0 -41
- package/esm5/lib/EntitySet.js +0 -68
- package/esm5/lib/ODataDataSourcePage.js +0 -73
- package/esm5/lib/ODataSchemaProvider.js +0 -158
- package/esm5/lib/ODataVirtualDataSource.js +0 -169
- package/esm5/lib/ODataVirtualDataSourceDataProvider.js +0 -558
- package/esm5/lib/ODataVirtualDataSourceDataProviderWorker.js +0 -920
- package/esm5/lib/ODataVirtualDataSourceDataProviderWorkerSettings.js +0 -130
- package/esm5/lib/ODataVirtualDataSourceProviderTaskDataHolder.js +0 -11
- package/esm5/lib/RestVirtualDataSource.js +0 -357
- package/esm5/lib/RestVirtualDataSourceDataProvider.js +0 -687
- package/esm5/lib/RestVirtualDataSourceDataProviderWorker.js +0 -967
- package/esm5/lib/RestVirtualDataSourceDataProviderWorkerSettings.js +0 -250
- package/esm5/lib/RestVirtualDataSourcePage.js +0 -73
- package/esm5/lib/RestVirtualDataSourceProviderTaskDataHolder.js +0 -11
- package/esm5/lib/Schema.js +0 -68
- package/esm5/lib/util.js +0 -160
- package/esm5/public_api.js +0 -18
- package/fesm2015/igniteui-webcomponents-datasources.js +0 -3638
- package/fesm5/igniteui-webcomponents-datasources.js +0 -4698
- package/igniteui-webcomponents-datasources.d.ts +0 -1
- /package/{lib → esm2022/lib}/Entity.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/Entity.js +0 -0
- /package/{lib → esm2022/lib}/EntityProperty.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/EntityProperty.js +0 -0
- /package/{lib → esm2022/lib}/EntitySet.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/EntitySet.js +0 -0
- /package/{lib → esm2022/lib}/ODataDataSourcePage.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/ODataDataSourcePage.js +0 -0
- /package/{lib → esm2022/lib}/ODataSchemaProvider.d.ts +0 -0
- /package/{lib → esm2022/lib}/ODataVirtualDataSource.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/ODataVirtualDataSource.js +0 -0
- /package/{lib → esm2022/lib}/ODataVirtualDataSourceDataProvider.d.ts +0 -0
- /package/{lib → esm2022/lib}/ODataVirtualDataSourceDataProviderWorker.d.ts +0 -0
- /package/{lib → esm2022/lib}/ODataVirtualDataSourceDataProviderWorkerSettings.d.ts +0 -0
- /package/{lib → esm2022/lib}/ODataVirtualDataSourceProviderTaskDataHolder.d.ts +0 -0
- /package/{lib → esm2022/lib}/RestVirtualDataSource.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/RestVirtualDataSource.js +0 -0
- /package/{lib → esm2022/lib}/RestVirtualDataSourceDataProvider.d.ts +0 -0
- /package/{lib → esm2022/lib}/RestVirtualDataSourceDataProviderWorker.d.ts +0 -0
- /package/{lib → esm2022/lib}/RestVirtualDataSourceDataProviderWorkerSettings.d.ts +0 -0
- /package/{lib → esm2022/lib}/RestVirtualDataSourcePage.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/RestVirtualDataSourcePage.js +0 -0
- /package/{lib → esm2022/lib}/RestVirtualDataSourceProviderTaskDataHolder.d.ts +0 -0
- /package/{lib → esm2022/lib}/Schema.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/Schema.js +0 -0
- /package/{lib → esm2022/lib}/util.d.ts +0 -0
- /package/{esm2015 → esm2022}/lib/util.js +0 -0
- /package/{public_api.d.ts → esm2022/public_api.d.ts} +0 -0
- /package/{esm2015 → esm2022}/public_api.js +0 -0
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { AsyncVirtualDataSourceDataProviderWorkerSettings } from "igniteui-webcomponents-core";
|
|
2
|
-
import { markType } from "igniteui-webcomponents-core";
|
|
3
|
-
let RestVirtualDataSourceDataProviderWorkerSettings = /*@__PURE__*/ (() => {
|
|
4
|
-
class RestVirtualDataSourceDataProviderWorkerSettings extends AsyncVirtualDataSourceDataProviderWorkerSettings {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this._baseUri = null;
|
|
8
|
-
this._entitySet = null;
|
|
9
|
-
this._sortDescriptions = null;
|
|
10
|
-
this._filterExpressions = null;
|
|
11
|
-
this._propertiesRequested = null;
|
|
12
|
-
this._schemaIncludedProperties = null;
|
|
13
|
-
this._groupDescriptions = null;
|
|
14
|
-
this._summaryDescriptions = null;
|
|
15
|
-
this._fixedFullCount = -1;
|
|
16
|
-
this._provideFullCount = null;
|
|
17
|
-
this._provideOrderByParameter = null;
|
|
18
|
-
this._provideFilterParameter = null;
|
|
19
|
-
this._provideAggregationParameter = null;
|
|
20
|
-
this._provideAggregatedCount = null;
|
|
21
|
-
this._provideUri = null;
|
|
22
|
-
this._providePagingParameter = null;
|
|
23
|
-
this._provideDesiredPropertiesParameter = null;
|
|
24
|
-
this._performFetch = null;
|
|
25
|
-
}
|
|
26
|
-
get baseUri() {
|
|
27
|
-
return this._baseUri;
|
|
28
|
-
}
|
|
29
|
-
set baseUri(value) {
|
|
30
|
-
this._baseUri = value;
|
|
31
|
-
}
|
|
32
|
-
get entitySet() {
|
|
33
|
-
return this._entitySet;
|
|
34
|
-
}
|
|
35
|
-
set entitySet(value) {
|
|
36
|
-
this._entitySet = value;
|
|
37
|
-
}
|
|
38
|
-
get sortDescriptions() {
|
|
39
|
-
return this._sortDescriptions;
|
|
40
|
-
}
|
|
41
|
-
set sortDescriptions(value) {
|
|
42
|
-
this._sortDescriptions = value;
|
|
43
|
-
}
|
|
44
|
-
get filterExpressions() {
|
|
45
|
-
return this._filterExpressions;
|
|
46
|
-
}
|
|
47
|
-
set filterExpressions(value) {
|
|
48
|
-
this._filterExpressions = value;
|
|
49
|
-
}
|
|
50
|
-
get propertiesRequested() {
|
|
51
|
-
return this._propertiesRequested;
|
|
52
|
-
}
|
|
53
|
-
set propertiesRequested(value) {
|
|
54
|
-
this._propertiesRequested = value;
|
|
55
|
-
}
|
|
56
|
-
get schemaIncludedProperties() {
|
|
57
|
-
return this._schemaIncludedProperties;
|
|
58
|
-
}
|
|
59
|
-
set schemaIncludedProperties(value) {
|
|
60
|
-
this._schemaIncludedProperties = value;
|
|
61
|
-
}
|
|
62
|
-
get groupDescriptions() {
|
|
63
|
-
return this._groupDescriptions;
|
|
64
|
-
}
|
|
65
|
-
set groupDescriptions(value) {
|
|
66
|
-
this._groupDescriptions = value;
|
|
67
|
-
}
|
|
68
|
-
get summaryDescriptions() {
|
|
69
|
-
return this._summaryDescriptions;
|
|
70
|
-
}
|
|
71
|
-
set summaryDescriptions(value) {
|
|
72
|
-
this._summaryDescriptions = value;
|
|
73
|
-
}
|
|
74
|
-
get summaryScope() {
|
|
75
|
-
return this._summaryscope;
|
|
76
|
-
}
|
|
77
|
-
set summaryScope(value) {
|
|
78
|
-
this._summaryscope = value;
|
|
79
|
-
}
|
|
80
|
-
get enableJsonp() {
|
|
81
|
-
return this._enableJsonp;
|
|
82
|
-
}
|
|
83
|
-
set enableJsonp(isEnabled) {
|
|
84
|
-
this._enableJsonp = isEnabled;
|
|
85
|
-
}
|
|
86
|
-
get isAggregationSupported() {
|
|
87
|
-
return this._isAggregationSupported;
|
|
88
|
-
}
|
|
89
|
-
set isAggregationSupported(isSupported) {
|
|
90
|
-
this._isAggregationSupported = isSupported;
|
|
91
|
-
}
|
|
92
|
-
get fixedFullCount() {
|
|
93
|
-
return this._fixedFullCount;
|
|
94
|
-
}
|
|
95
|
-
set fixedFullCount(value) {
|
|
96
|
-
this._fixedFullCount = value;
|
|
97
|
-
}
|
|
98
|
-
get provideFullCount() {
|
|
99
|
-
return this._provideFullCount;
|
|
100
|
-
}
|
|
101
|
-
set provideFullCount(value) {
|
|
102
|
-
this._provideFullCount = value;
|
|
103
|
-
}
|
|
104
|
-
get provideOrderByParameter() {
|
|
105
|
-
return this._provideOrderByParameter;
|
|
106
|
-
}
|
|
107
|
-
set provideOrderByParameter(value) {
|
|
108
|
-
this._provideOrderByParameter = value;
|
|
109
|
-
}
|
|
110
|
-
get provideFilterParameter() {
|
|
111
|
-
return this._provideFilterParameter;
|
|
112
|
-
}
|
|
113
|
-
set provideFilterParameter(value) {
|
|
114
|
-
this._provideFilterParameter = value;
|
|
115
|
-
}
|
|
116
|
-
get provideAggregationParameter() {
|
|
117
|
-
return this._provideAggregationParameter;
|
|
118
|
-
}
|
|
119
|
-
set provideAggregationParameter(value) {
|
|
120
|
-
this._provideAggregationParameter = value;
|
|
121
|
-
}
|
|
122
|
-
get provideAggregatedCount() {
|
|
123
|
-
return this._provideAggregatedCount;
|
|
124
|
-
}
|
|
125
|
-
set provideAggregatedCount(value) {
|
|
126
|
-
this._provideAggregatedCount = value;
|
|
127
|
-
}
|
|
128
|
-
get provideUri() {
|
|
129
|
-
return this._provideUri;
|
|
130
|
-
}
|
|
131
|
-
set provideUri(value) {
|
|
132
|
-
this._provideUri = value;
|
|
133
|
-
}
|
|
134
|
-
get providePagingParameter() {
|
|
135
|
-
return this._providePagingParameter;
|
|
136
|
-
}
|
|
137
|
-
set providePagingParameter(value) {
|
|
138
|
-
this._providePagingParameter = value;
|
|
139
|
-
}
|
|
140
|
-
get provideDesiredPropertiesParameter() {
|
|
141
|
-
return this._provideDesiredPropertiesParameter;
|
|
142
|
-
}
|
|
143
|
-
set provideDesiredPropertiesParameter(value) {
|
|
144
|
-
this._provideDesiredPropertiesParameter = value;
|
|
145
|
-
}
|
|
146
|
-
get provideItems() {
|
|
147
|
-
return this._provideItems;
|
|
148
|
-
}
|
|
149
|
-
set provideItems(value) {
|
|
150
|
-
this._provideItems = value;
|
|
151
|
-
}
|
|
152
|
-
get performFetch() {
|
|
153
|
-
return this._performFetch;
|
|
154
|
-
}
|
|
155
|
-
set performFetch(value) {
|
|
156
|
-
this._performFetch = value;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
RestVirtualDataSourceDataProviderWorkerSettings.$t = /*@__PURE__*/ markType(RestVirtualDataSourceDataProviderWorkerSettings, 'RestVirtualDataSourceDataProviderWorkerSettings', AsyncVirtualDataSourceDataProviderWorkerSettings.$type);
|
|
160
|
-
return RestVirtualDataSourceDataProviderWorkerSettings;
|
|
161
|
-
})();
|
|
162
|
-
export { RestVirtualDataSourceDataProviderWorkerSettings };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AsyncVirtualDataSourceProviderTaskDataHolder } from "igniteui-webcomponents-core";
|
|
2
|
-
import { markType } from "igniteui-webcomponents-core";
|
|
3
|
-
let RestVirtualDataSourceProviderTaskDataHolder = /*@__PURE__*/ (() => {
|
|
4
|
-
class RestVirtualDataSourceProviderTaskDataHolder extends AsyncVirtualDataSourceProviderTaskDataHolder {
|
|
5
|
-
}
|
|
6
|
-
RestVirtualDataSourceProviderTaskDataHolder.$t = /*@__PURE__*/ markType(RestVirtualDataSourceProviderTaskDataHolder, 'ODataVirtualDataSourceProviderTaskDataHolder', AsyncVirtualDataSourceProviderTaskDataHolder.$type);
|
|
7
|
-
return RestVirtualDataSourceProviderTaskDataHolder;
|
|
8
|
-
})();
|
|
9
|
-
export { RestVirtualDataSourceProviderTaskDataHolder };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public_api';
|
package/esm5/lib/Entity.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { EntityProperty } from "./EntityProperty";
|
|
2
|
-
import { XName } from "igniteui-webcomponents-core";
|
|
3
|
-
import { toArray } from './util';
|
|
4
|
-
var Entity = /** @class */ /*@__PURE__*/ (function () {
|
|
5
|
-
function Entity(name, entityNode) {
|
|
6
|
-
this._properties = null;
|
|
7
|
-
this._primaryKey = null;
|
|
8
|
-
this._name = null;
|
|
9
|
-
this.name = name;
|
|
10
|
-
this.loadProperties(entityNode);
|
|
11
|
-
this.loadPrimaryKey(entityNode);
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(Entity.prototype, "name", {
|
|
14
|
-
get: function () {
|
|
15
|
-
return this._name;
|
|
16
|
-
},
|
|
17
|
-
set: function (value) {
|
|
18
|
-
this._name = value;
|
|
19
|
-
},
|
|
20
|
-
enumerable: false,
|
|
21
|
-
configurable: true
|
|
22
|
-
});
|
|
23
|
-
Object.defineProperty(Entity.prototype, "properties", {
|
|
24
|
-
get: function () {
|
|
25
|
-
if (null == this._properties) {
|
|
26
|
-
this._properties = new Map();
|
|
27
|
-
}
|
|
28
|
-
return this._properties;
|
|
29
|
-
},
|
|
30
|
-
enumerable: false,
|
|
31
|
-
configurable: true
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(Entity.prototype, "primaryKey", {
|
|
34
|
-
get: function () {
|
|
35
|
-
if (null == this._primaryKey) {
|
|
36
|
-
this._primaryKey = [];
|
|
37
|
-
}
|
|
38
|
-
return this._primaryKey;
|
|
39
|
-
},
|
|
40
|
-
enumerable: false,
|
|
41
|
-
configurable: true
|
|
42
|
-
});
|
|
43
|
-
Entity.prototype.loadProperties = function (entityNode) {
|
|
44
|
-
var children = toArray(entityNode.elements());
|
|
45
|
-
var elementCount = children.length;
|
|
46
|
-
var nameAttr = XName.get("Name", "");
|
|
47
|
-
var typeAttr = XName.get("Type", "");
|
|
48
|
-
for (var i = 0; i < elementCount; i++) {
|
|
49
|
-
var node = children[i];
|
|
50
|
-
if (node.name.localName == "Property") {
|
|
51
|
-
var name_1 = node.attribute(nameAttr).value;
|
|
52
|
-
var type = node.attribute(typeAttr).value;
|
|
53
|
-
this.properties.set(name_1, new EntityProperty(name_1, type));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
;
|
|
57
|
-
};
|
|
58
|
-
Entity.prototype.loadPrimaryKey = function (entityNode) {
|
|
59
|
-
var children = toArray(entityNode.elements());
|
|
60
|
-
var elementCount = children.length;
|
|
61
|
-
var nameAttr = XName.get("Name", "");
|
|
62
|
-
for (var i = 0; i < elementCount; i++) {
|
|
63
|
-
var node = children[i];
|
|
64
|
-
if (node.name.localName == "Key") {
|
|
65
|
-
var subChildren = toArray(node.elements());
|
|
66
|
-
var keyNodeCOunt = subChildren.length;
|
|
67
|
-
for (var j = 0; j < keyNodeCOunt; j++) {
|
|
68
|
-
var keyNode = subChildren[j];
|
|
69
|
-
if (keyNode.name.localName == "PropertyRef") {
|
|
70
|
-
this.primaryKey.push(keyNode.attribute(nameAttr).value);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
;
|
|
76
|
-
};
|
|
77
|
-
return Entity;
|
|
78
|
-
}());
|
|
79
|
-
export { Entity };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var EntityProperty = /** @class */ /*@__PURE__*/ (function () {
|
|
2
|
-
function EntityProperty(name, schemaType) {
|
|
3
|
-
this._name = null;
|
|
4
|
-
this._isNullable = false;
|
|
5
|
-
this._type = null;
|
|
6
|
-
this.name = name;
|
|
7
|
-
this.type = schemaType;
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(EntityProperty.prototype, "name", {
|
|
10
|
-
get: function () {
|
|
11
|
-
return this._name;
|
|
12
|
-
},
|
|
13
|
-
set: function (value) {
|
|
14
|
-
this._name = value;
|
|
15
|
-
},
|
|
16
|
-
enumerable: false,
|
|
17
|
-
configurable: true
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(EntityProperty.prototype, "isNullable", {
|
|
20
|
-
get: function () {
|
|
21
|
-
return this._isNullable;
|
|
22
|
-
},
|
|
23
|
-
set: function (value) {
|
|
24
|
-
this._isNullable = value;
|
|
25
|
-
},
|
|
26
|
-
enumerable: false,
|
|
27
|
-
configurable: true
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(EntityProperty.prototype, "type", {
|
|
30
|
-
get: function () {
|
|
31
|
-
return this._type;
|
|
32
|
-
},
|
|
33
|
-
set: function (value) {
|
|
34
|
-
this._type = value;
|
|
35
|
-
},
|
|
36
|
-
enumerable: false,
|
|
37
|
-
configurable: true
|
|
38
|
-
});
|
|
39
|
-
return EntityProperty;
|
|
40
|
-
}());
|
|
41
|
-
export { EntityProperty };
|
package/esm5/lib/EntitySet.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var EntitySet = /** @class */ /*@__PURE__*/ (function () {
|
|
2
|
-
function EntitySet(name, entityType) {
|
|
3
|
-
this._entityName = null;
|
|
4
|
-
this._entityNamespace = null;
|
|
5
|
-
this._entityType = null;
|
|
6
|
-
this._name = null;
|
|
7
|
-
this.name = name;
|
|
8
|
-
this.entityType = entityType;
|
|
9
|
-
if (entityType.indexOf(".") >= 0) {
|
|
10
|
-
var parts = entityType.split('.');
|
|
11
|
-
if (parts.length == 2) {
|
|
12
|
-
this.entityNamespace = parts[0];
|
|
13
|
-
this.entityName = parts[1];
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
var i = entityType.lastIndexOf('.');
|
|
17
|
-
this.entityNamespace = entityType.substr(0, i);
|
|
18
|
-
this.entityName = entityType.substr(i + 1);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
this.entityNamespace = entityType;
|
|
23
|
-
this.entityName = entityType;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
Object.defineProperty(EntitySet.prototype, "entityName", {
|
|
27
|
-
get: function () {
|
|
28
|
-
return this._entityName;
|
|
29
|
-
},
|
|
30
|
-
set: function (value) {
|
|
31
|
-
this._entityName = value;
|
|
32
|
-
},
|
|
33
|
-
enumerable: false,
|
|
34
|
-
configurable: true
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(EntitySet.prototype, "entityNamespace", {
|
|
37
|
-
get: function () {
|
|
38
|
-
return this._entityNamespace;
|
|
39
|
-
},
|
|
40
|
-
set: function (value) {
|
|
41
|
-
this._entityNamespace = value;
|
|
42
|
-
},
|
|
43
|
-
enumerable: false,
|
|
44
|
-
configurable: true
|
|
45
|
-
});
|
|
46
|
-
Object.defineProperty(EntitySet.prototype, "entityType", {
|
|
47
|
-
get: function () {
|
|
48
|
-
return this._entityType;
|
|
49
|
-
},
|
|
50
|
-
set: function (value) {
|
|
51
|
-
this._entityType = value;
|
|
52
|
-
},
|
|
53
|
-
enumerable: false,
|
|
54
|
-
configurable: true
|
|
55
|
-
});
|
|
56
|
-
Object.defineProperty(EntitySet.prototype, "name", {
|
|
57
|
-
get: function () {
|
|
58
|
-
return this._name;
|
|
59
|
-
},
|
|
60
|
-
set: function (value) {
|
|
61
|
-
this._name = value;
|
|
62
|
-
},
|
|
63
|
-
enumerable: false,
|
|
64
|
-
configurable: true
|
|
65
|
-
});
|
|
66
|
-
return EntitySet;
|
|
67
|
-
}());
|
|
68
|
-
export { EntitySet };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { DataSourceSchemaPropertyType } from "igniteui-webcomponents-core";
|
|
2
|
-
var ODataDataSourcePage = /** @class */ /*@__PURE__*/ (function () {
|
|
3
|
-
function ODataDataSourcePage(sourceData_, schema, groupInformation, summaryInformation, pageIndex) {
|
|
4
|
-
this._actualData = null;
|
|
5
|
-
this._schema = null;
|
|
6
|
-
this._pageIndex = 0;
|
|
7
|
-
this._groupInformation = null;
|
|
8
|
-
this._summaryInformation = null;
|
|
9
|
-
if (sourceData_ == null) {
|
|
10
|
-
this._actualData = null;
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
var count = (sourceData_.value.length);
|
|
14
|
-
this._actualData = [];
|
|
15
|
-
var dateProps = new Set();
|
|
16
|
-
for (var i = 0; i < schema.propertyNames.length; i++) {
|
|
17
|
-
if (schema.propertyTypes[i] == DataSourceSchemaPropertyType.DateTimeValue || schema.propertyTypes[i] == DataSourceSchemaPropertyType.DateTimeOffsetValue) {
|
|
18
|
-
dateProps.add(schema.propertyNames[i]);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
var value_ = void 0;
|
|
22
|
-
var _loop_1 = function (i_) {
|
|
23
|
-
var currItem_ = sourceData_.value[i_];
|
|
24
|
-
var dict = new Map();
|
|
25
|
-
var properties = Array.from(Object.keys(currItem_));
|
|
26
|
-
var values = (properties.map(function (k) { return currItem_[k]; }));
|
|
27
|
-
for (var i1 = 0; i1 < properties.length; i1++) {
|
|
28
|
-
value_ = values[i1];
|
|
29
|
-
if (dateProps.has(properties[i1])) {
|
|
30
|
-
value_ = new Date(value_);
|
|
31
|
-
}
|
|
32
|
-
dict.set(properties[i1], value_);
|
|
33
|
-
}
|
|
34
|
-
this_1._actualData[i_] = dict;
|
|
35
|
-
};
|
|
36
|
-
var this_1 = this;
|
|
37
|
-
for (var i_ = 0; i_ < count; i_++) {
|
|
38
|
-
_loop_1(i_);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
this._schema = schema;
|
|
42
|
-
this._groupInformation = groupInformation;
|
|
43
|
-
this._summaryInformation = summaryInformation;
|
|
44
|
-
this._pageIndex = pageIndex;
|
|
45
|
-
}
|
|
46
|
-
ODataDataSourcePage.prototype.count = function () {
|
|
47
|
-
return this._actualData.length;
|
|
48
|
-
};
|
|
49
|
-
ODataDataSourcePage.prototype.getItemAtIndex = function (index) {
|
|
50
|
-
return this._actualData[index];
|
|
51
|
-
};
|
|
52
|
-
ODataDataSourcePage.prototype.getItemValueAtIndex = function (index, valueName) {
|
|
53
|
-
var item = this._actualData[index];
|
|
54
|
-
if (!item.has(valueName)) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
return item.get(valueName);
|
|
58
|
-
};
|
|
59
|
-
ODataDataSourcePage.prototype.pageIndex = function () {
|
|
60
|
-
return this._pageIndex;
|
|
61
|
-
};
|
|
62
|
-
ODataDataSourcePage.prototype.schema = function () {
|
|
63
|
-
return this._schema;
|
|
64
|
-
};
|
|
65
|
-
ODataDataSourcePage.prototype.getGroupInformation = function () {
|
|
66
|
-
return this._groupInformation;
|
|
67
|
-
};
|
|
68
|
-
ODataDataSourcePage.prototype.getSummaryInformation = function () {
|
|
69
|
-
return this._summaryInformation;
|
|
70
|
-
};
|
|
71
|
-
return ODataDataSourcePage;
|
|
72
|
-
}());
|
|
73
|
-
export { ODataDataSourcePage };
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { __values } from "tslib";
|
|
2
|
-
import { Schema } from "./Schema";
|
|
3
|
-
import { XDocument } from "igniteui-webcomponents-core";
|
|
4
|
-
import { XElement } from "igniteui-webcomponents-core";
|
|
5
|
-
import { XName } from "igniteui-webcomponents-core";
|
|
6
|
-
import { XNamespace } from "igniteui-webcomponents-core";
|
|
7
|
-
import { DataSourceSchemaPropertyType } from "igniteui-webcomponents-core";
|
|
8
|
-
import { ODataDataSourceSchema } from "igniteui-webcomponents-core";
|
|
9
|
-
import { XmlNodeType } from "igniteui-webcomponents-core";
|
|
10
|
-
import { toArray, first } from './util';
|
|
11
|
-
import { fromEnum, typeCast } from "igniteui-webcomponents-core";
|
|
12
|
-
export var ODataSchemaProvider = /** @class */ /*@__PURE__*/ (function () {
|
|
13
|
-
function ODataSchemaProvider(metadataDocument) {
|
|
14
|
-
this._entityTypeSchemaNamespace = null;
|
|
15
|
-
this._entitySetSchemaNamespace = null;
|
|
16
|
-
this._schema = null;
|
|
17
|
-
if (null == metadataDocument) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
var xmlDoc = XDocument.parse(metadataDocument);
|
|
21
|
-
var schemaElements = toArray(first(fromEnum(first(fromEnum(xmlDoc.elements())).elements())).elements1(XName.get("Schema", ODataSchemaProvider.nS.namespaceName)));
|
|
22
|
-
if (null == schemaElements) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
var entitySetElements = null;
|
|
26
|
-
var entityTypeElements = null;
|
|
27
|
-
var elementCount = schemaElements.length;
|
|
28
|
-
var entityContainer = XName.get("EntityContainer", ODataSchemaProvider.nS.namespaceName);
|
|
29
|
-
var entitySet = XName.get("EntitySet", ODataSchemaProvider.nS.namespaceName);
|
|
30
|
-
var namespaceAttribute = XName.get("Namespace", "");
|
|
31
|
-
var entityType = XName.get("EntityType", ODataSchemaProvider.nS.namespaceName);
|
|
32
|
-
for (var i = 0; i < elementCount; i++) {
|
|
33
|
-
var node = schemaElements[i];
|
|
34
|
-
if (node.nodeType != XmlNodeType.Element) {
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
var schemaElement = schemaElements[i];
|
|
38
|
-
if (null == entitySetElements) {
|
|
39
|
-
var nodes = toArray(schemaElement.elements1(entityContainer));
|
|
40
|
-
if (null != nodes && nodes.length > 0) {
|
|
41
|
-
entitySetElements = toArray((typeCast(XElement.$type, nodes[0])).elements1(entitySet));
|
|
42
|
-
if (null != entitySetElements) {
|
|
43
|
-
this._entitySetSchemaNamespace = schemaElement.attribute(namespaceAttribute).value;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (null == entityTypeElements) {
|
|
48
|
-
entityTypeElements = toArray(schemaElement.elements1(entityType));
|
|
49
|
-
if (null != entityTypeElements) {
|
|
50
|
-
this._entityTypeSchemaNamespace = schemaElement.attribute(namespaceAttribute).value;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (null == entitySetElements || null == entityTypeElements) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
this.schema = new Schema(this._entityTypeSchemaNamespace, entityTypeElements, entitySetElements);
|
|
58
|
-
}
|
|
59
|
-
Object.defineProperty(ODataSchemaProvider.prototype, "schema", {
|
|
60
|
-
get: function () {
|
|
61
|
-
return this._schema;
|
|
62
|
-
},
|
|
63
|
-
set: function (value) {
|
|
64
|
-
this._schema = value;
|
|
65
|
-
},
|
|
66
|
-
enumerable: false,
|
|
67
|
-
configurable: true
|
|
68
|
-
});
|
|
69
|
-
ODataSchemaProvider.prototype.getODataDataSourceSchema = function (entitySet) {
|
|
70
|
-
var e_1, _a, e_2, _b;
|
|
71
|
-
if (this.schema == null) {
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
var valueNames = [];
|
|
75
|
-
var valueTypes = [];
|
|
76
|
-
var primaryKey = [];
|
|
77
|
-
var es = this.schema.entitySets.get(entitySet);
|
|
78
|
-
if (null != es) {
|
|
79
|
-
var entity = this.schema.entities.get(es.entityName);
|
|
80
|
-
if (null != entity) {
|
|
81
|
-
try {
|
|
82
|
-
for (var _c = __values(entity.properties.values()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
83
|
-
var property = _d.value;
|
|
84
|
-
valueNames.push(property.name);
|
|
85
|
-
if (property.type == "Edm.String") {
|
|
86
|
-
valueTypes.push(DataSourceSchemaPropertyType.StringValue);
|
|
87
|
-
}
|
|
88
|
-
else if (property.type == "Edm.Int16" || property.type == "Edm.Int32") {
|
|
89
|
-
valueTypes.push(DataSourceSchemaPropertyType.IntValue);
|
|
90
|
-
}
|
|
91
|
-
else if (property.type == "Edm.Double") {
|
|
92
|
-
valueTypes.push(DataSourceSchemaPropertyType.DoubleValue);
|
|
93
|
-
}
|
|
94
|
-
else if (property.type == "Edm.Single") {
|
|
95
|
-
valueTypes.push(DataSourceSchemaPropertyType.SingleValue);
|
|
96
|
-
}
|
|
97
|
-
else if (property.type == "Edm.Boolean") {
|
|
98
|
-
valueTypes.push(DataSourceSchemaPropertyType.BooleanValue);
|
|
99
|
-
}
|
|
100
|
-
else if (property.type == "Edm.Byte") {
|
|
101
|
-
valueTypes.push(DataSourceSchemaPropertyType.ShortValue);
|
|
102
|
-
}
|
|
103
|
-
else if (property.type == "Edm.DateTime" || property.type == "Edm.DateTimeOffset") {
|
|
104
|
-
valueTypes.push(DataSourceSchemaPropertyType.DateTimeValue);
|
|
105
|
-
}
|
|
106
|
-
else if (property.type == "Edm.Int64") {
|
|
107
|
-
valueTypes.push(DataSourceSchemaPropertyType.LongValue);
|
|
108
|
-
}
|
|
109
|
-
else if (property.type == "Edm.Decimal") {
|
|
110
|
-
valueTypes.push(DataSourceSchemaPropertyType.DecimalValue);
|
|
111
|
-
}
|
|
112
|
-
else if (property.type == "Edm.SByte") {
|
|
113
|
-
valueTypes.push(DataSourceSchemaPropertyType.ShortValue);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
valueTypes.push(DataSourceSchemaPropertyType.ObjectValue);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
catch (e_1_1) {
|
|
121
|
-
e_1 = { error: e_1_1 };
|
|
122
|
-
}
|
|
123
|
-
finally {
|
|
124
|
-
try {
|
|
125
|
-
if (_d && !_d.done && (_a = _c.return))
|
|
126
|
-
_a.call(_c);
|
|
127
|
-
}
|
|
128
|
-
finally {
|
|
129
|
-
if (e_1)
|
|
130
|
-
throw e_1.error;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
try {
|
|
134
|
-
for (var _e = __values(entity.primaryKey), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
135
|
-
var k = _f.value;
|
|
136
|
-
primaryKey.push(k);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
catch (e_2_1) {
|
|
140
|
-
e_2 = { error: e_2_1 };
|
|
141
|
-
}
|
|
142
|
-
finally {
|
|
143
|
-
try {
|
|
144
|
-
if (_f && !_f.done && (_b = _e.return))
|
|
145
|
-
_b.call(_e);
|
|
146
|
-
}
|
|
147
|
-
finally {
|
|
148
|
-
if (e_2)
|
|
149
|
-
throw e_2.error;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return new ODataDataSourceSchema(valueNames, valueTypes, primaryKey);
|
|
155
|
-
};
|
|
156
|
-
ODataSchemaProvider.nS = XNamespace.get("http://docs.oasis-open.org/odata/ns/edm");
|
|
157
|
-
return ODataSchemaProvider;
|
|
158
|
-
}());
|