igniteui-webcomponents-datasources 7.1.1-beta.1 → 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.
- package/fesm2022/igniteui-webcomponents-datasources.mjs +3611 -0
- package/igniteui-webcomponents-datasources.d.ts +754 -1
- package/package.json +13 -9
- 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/Entity.js +0 -65
- package/esm2015/lib/EntityProperty.js +0 -27
- package/esm2015/lib/EntitySet.js +0 -50
- package/esm2015/lib/ODataDataSourcePage.js +0 -67
- package/esm2015/lib/ODataSchemaProvider.js +0 -123
- package/esm2015/lib/ODataVirtualDataSource.js +0 -132
- 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/RestVirtualDataSource.js +0 -272
- package/esm2015/lib/RestVirtualDataSourceDataProvider.js +0 -538
- package/esm2015/lib/RestVirtualDataSourceDataProviderWorker.js +0 -765
- package/esm2015/lib/RestVirtualDataSourceDataProviderWorkerSettings.js +0 -162
- package/esm2015/lib/RestVirtualDataSourcePage.js +0 -67
- package/esm2015/lib/RestVirtualDataSourceProviderTaskDataHolder.js +0 -9
- package/esm2015/lib/Schema.js +0 -54
- package/esm2015/lib/util.js +0 -116
- package/esm2015/public_api.js +0 -18
- 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/lib/Entity.d.ts +0 -14
- package/lib/EntityProperty.d.ts +0 -12
- package/lib/EntitySet.d.ts +0 -15
- package/lib/ODataDataSourcePage.d.ts +0 -19
- package/lib/ODataSchemaProvider.d.ts +0 -12
- package/lib/ODataVirtualDataSource.d.ts +0 -28
- package/lib/ODataVirtualDataSourceDataProvider.d.ts +0 -120
- package/lib/ODataVirtualDataSourceDataProviderWorker.d.ts +0 -57
- package/lib/ODataVirtualDataSourceDataProviderWorkerSettings.d.ts +0 -42
- package/lib/ODataVirtualDataSourceProviderTaskDataHolder.d.ts +0 -5
- package/lib/RestVirtualDataSource.d.ts +0 -86
- package/lib/RestVirtualDataSourceDataProvider.d.ts +0 -171
- package/lib/RestVirtualDataSourceDataProviderWorker.d.ts +0 -70
- package/lib/RestVirtualDataSourceDataProviderWorkerSettings.d.ts +0 -93
- package/lib/RestVirtualDataSourcePage.d.ts +0 -19
- package/lib/RestVirtualDataSourceProviderTaskDataHolder.d.ts +0 -5
- package/lib/Schema.d.ts +0 -15
- package/lib/util.d.ts +0 -27
- package/public_api.d.ts +0 -18
|
@@ -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,67 +0,0 @@
|
|
|
1
|
-
import { DataSourceSchemaPropertyType } from "igniteui-webcomponents-core";
|
|
2
|
-
export class RestVirtualDataSourcePage {
|
|
3
|
-
constructor(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
|
-
let count = (sourceData_.items.length);
|
|
14
|
-
this._actualData = [];
|
|
15
|
-
let dateProps = new Set();
|
|
16
|
-
for (let 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
|
-
let value_;
|
|
22
|
-
for (let i_ = 0; i_ < count; i_++) {
|
|
23
|
-
let currItem_ = sourceData_.items[i_];
|
|
24
|
-
let dict = new Map();
|
|
25
|
-
let properties = Array.from(Object.keys(currItem_));
|
|
26
|
-
let values = (properties.map((k) => currItem_[k]));
|
|
27
|
-
for (let 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._actualData[i_] = dict;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
this._schema = schema;
|
|
38
|
-
this._groupInformation = groupInformation;
|
|
39
|
-
this._summaryInformation = summaryInformation;
|
|
40
|
-
this._pageIndex = pageIndex;
|
|
41
|
-
}
|
|
42
|
-
count() {
|
|
43
|
-
return this._actualData.length;
|
|
44
|
-
}
|
|
45
|
-
getItemAtIndex(index) {
|
|
46
|
-
return this._actualData[index];
|
|
47
|
-
}
|
|
48
|
-
getItemValueAtIndex(index, valueName) {
|
|
49
|
-
let item = this._actualData[index];
|
|
50
|
-
if (!item.has(valueName)) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
return item.get(valueName);
|
|
54
|
-
}
|
|
55
|
-
pageIndex() {
|
|
56
|
-
return this._pageIndex;
|
|
57
|
-
}
|
|
58
|
-
schema() {
|
|
59
|
-
return this._schema;
|
|
60
|
-
}
|
|
61
|
-
getGroupInformation() {
|
|
62
|
-
return this._groupInformation;
|
|
63
|
-
}
|
|
64
|
-
getSummaryInformation() {
|
|
65
|
-
return this._summaryInformation;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -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 };
|
package/esm2015/lib/Schema.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Entity } from "./Entity";
|
|
2
|
-
import { EntitySet } from "./EntitySet";
|
|
3
|
-
import { XName } from "igniteui-webcomponents-core";
|
|
4
|
-
export class Schema {
|
|
5
|
-
constructor(namespace, entityTypeElements, entitySetElements) {
|
|
6
|
-
this._entities = null;
|
|
7
|
-
this._entitySets = null;
|
|
8
|
-
this._namespace = null;
|
|
9
|
-
this.namespace = namespace;
|
|
10
|
-
this.loadEntities(entityTypeElements);
|
|
11
|
-
this.loadEntitySets(entitySetElements);
|
|
12
|
-
}
|
|
13
|
-
get entities() {
|
|
14
|
-
if (null == this._entities) {
|
|
15
|
-
this._entities = new Map();
|
|
16
|
-
}
|
|
17
|
-
return this._entities;
|
|
18
|
-
}
|
|
19
|
-
get entitySets() {
|
|
20
|
-
if (null == this._entitySets) {
|
|
21
|
-
this._entitySets = new Map();
|
|
22
|
-
}
|
|
23
|
-
return this._entitySets;
|
|
24
|
-
}
|
|
25
|
-
get namespace() {
|
|
26
|
-
return this._namespace;
|
|
27
|
-
}
|
|
28
|
-
set namespace(value) {
|
|
29
|
-
this._namespace = value;
|
|
30
|
-
}
|
|
31
|
-
loadEntities(entityTypeElements) {
|
|
32
|
-
let list = entityTypeElements;
|
|
33
|
-
let elementCount = list.length;
|
|
34
|
-
let name = XName.get("Name", "");
|
|
35
|
-
for (let i = 0; i < elementCount; i++) {
|
|
36
|
-
let node = list[i];
|
|
37
|
-
let entity = new Entity(node.attribute(name).value, node);
|
|
38
|
-
this.entities.set(entity.name, entity);
|
|
39
|
-
}
|
|
40
|
-
;
|
|
41
|
-
}
|
|
42
|
-
loadEntitySets(entitySetElements) {
|
|
43
|
-
let list = entitySetElements;
|
|
44
|
-
let elementCount = list.length;
|
|
45
|
-
let nameAttr = XName.get("Name", "");
|
|
46
|
-
let entityType = XName.get("EntityType", "");
|
|
47
|
-
for (let i = 0; i < elementCount; i++) {
|
|
48
|
-
let node = list[i];
|
|
49
|
-
let entitySet = new EntitySet(node.attribute(nameAttr).value, node.attribute(entityType).value);
|
|
50
|
-
this.entitySets.set(entitySet.name, entitySet);
|
|
51
|
-
}
|
|
52
|
-
;
|
|
53
|
-
}
|
|
54
|
-
}
|
package/esm2015/lib/util.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { fromEnum } from "igniteui-webcomponents-core";
|
|
2
|
-
export function toArray(en) {
|
|
3
|
-
return Array.from(fromEnum(en));
|
|
4
|
-
}
|
|
5
|
-
export function first(iter) {
|
|
6
|
-
for (let v of iter) {
|
|
7
|
-
return v;
|
|
8
|
-
}
|
|
9
|
-
throw new Error("Iterable contained no elements, expected at least one");
|
|
10
|
-
}
|
|
11
|
-
export class LinkedList {
|
|
12
|
-
get first() {
|
|
13
|
-
return this._first;
|
|
14
|
-
}
|
|
15
|
-
get last() {
|
|
16
|
-
return this._last;
|
|
17
|
-
}
|
|
18
|
-
addFirst(item) {
|
|
19
|
-
if (this._first == null) {
|
|
20
|
-
this._first = new LinkedListNode(item);
|
|
21
|
-
this._last = this._first;
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
var oldFirst = this._first;
|
|
25
|
-
this._first = new LinkedListNode(item);
|
|
26
|
-
this._first.next = oldFirst;
|
|
27
|
-
oldFirst.prev = this._first;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
addLast(item) {
|
|
31
|
-
if (this._last == null) {
|
|
32
|
-
this._first = new LinkedListNode(item);
|
|
33
|
-
this._last = this._first;
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
var oldLast = this._last;
|
|
37
|
-
this._last = new LinkedListNode(item);
|
|
38
|
-
this._last.prev = oldLast;
|
|
39
|
-
oldLast.next = this._last;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
removeFirst() {
|
|
43
|
-
this.remove(this.first);
|
|
44
|
-
}
|
|
45
|
-
clear() {
|
|
46
|
-
this._first = null;
|
|
47
|
-
this._last = null;
|
|
48
|
-
}
|
|
49
|
-
contains(value) {
|
|
50
|
-
let curr = this.first;
|
|
51
|
-
while (curr != null) {
|
|
52
|
-
if (curr.value === value) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
curr = curr.next;
|
|
56
|
-
}
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
removeValue(value) {
|
|
60
|
-
let curr = this.first;
|
|
61
|
-
while (curr != null) {
|
|
62
|
-
if (curr.value === value) {
|
|
63
|
-
this.remove(curr);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
curr = curr.next;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
remove(node) {
|
|
70
|
-
if (this._first == node) {
|
|
71
|
-
this._first = node.next;
|
|
72
|
-
if (node.next != null) {
|
|
73
|
-
node.next.prev = null;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (this._last == node) {
|
|
77
|
-
this._last = node.prev;
|
|
78
|
-
if (node.prev != null) {
|
|
79
|
-
node.prev.next = null;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (node.prev != null) {
|
|
83
|
-
node.prev.next = node.next;
|
|
84
|
-
}
|
|
85
|
-
if (node.next != null) {
|
|
86
|
-
node.next.prev = node.prev;
|
|
87
|
-
}
|
|
88
|
-
node.next = null;
|
|
89
|
-
node.prev = null;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
export class LinkedListNode {
|
|
93
|
-
get value() {
|
|
94
|
-
return this._value;
|
|
95
|
-
}
|
|
96
|
-
set value(value) {
|
|
97
|
-
this._value = value;
|
|
98
|
-
}
|
|
99
|
-
get prev() {
|
|
100
|
-
return this._prev;
|
|
101
|
-
}
|
|
102
|
-
set prev(value) {
|
|
103
|
-
this._prev = value;
|
|
104
|
-
}
|
|
105
|
-
get next() {
|
|
106
|
-
return this._next;
|
|
107
|
-
}
|
|
108
|
-
set next(value) {
|
|
109
|
-
this._next = value;
|
|
110
|
-
}
|
|
111
|
-
constructor(item) {
|
|
112
|
-
if (item !== undefined) {
|
|
113
|
-
this.value = item;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
package/esm2015/public_api.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export * from './lib/Entity';
|
|
2
|
-
export * from './lib/EntityProperty';
|
|
3
|
-
export * from './lib/EntitySet';
|
|
4
|
-
export * from './lib/ODataDataSourcePage';
|
|
5
|
-
export * from './lib/ODataSchemaProvider';
|
|
6
|
-
export * from './lib/ODataVirtualDataSource';
|
|
7
|
-
export * from './lib/ODataVirtualDataSourceDataProvider';
|
|
8
|
-
export * from './lib/ODataVirtualDataSourceDataProviderWorker';
|
|
9
|
-
export * from './lib/ODataVirtualDataSourceDataProviderWorkerSettings';
|
|
10
|
-
export * from './lib/ODataVirtualDataSourceProviderTaskDataHolder';
|
|
11
|
-
export * from './lib/RestVirtualDataSource';
|
|
12
|
-
export * from './lib/RestVirtualDataSourceDataProvider';
|
|
13
|
-
export * from './lib/RestVirtualDataSourceDataProviderWorker';
|
|
14
|
-
export * from './lib/RestVirtualDataSourceDataProviderWorkerSettings';
|
|
15
|
-
export * from './lib/RestVirtualDataSourcePage';
|
|
16
|
-
export * from './lib/RestVirtualDataSourceProviderTaskDataHolder';
|
|
17
|
-
export * from './lib/Schema';
|
|
18
|
-
export * from './lib/util';
|
|
@@ -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 };
|