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,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
- }());
@@ -1,169 +0,0 @@
1
- import { __extends } from "tslib";
2
- import { VirtualDataSource } from "igniteui-webcomponents-core";
3
- import { ODataVirtualDataSourceDataProvider } from "./ODataVirtualDataSourceDataProvider";
4
- import { typeCast } from "igniteui-webcomponents-core";
5
- var ODataVirtualDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
6
- __extends(ODataVirtualDataSource, _super);
7
- function ODataVirtualDataSource() {
8
- var _this = _super.call(this) || this;
9
- _this._baseUri = null;
10
- _this._entitySet = null;
11
- _this._timeoutMilliseconds = 10000;
12
- _this._isAggregationSupportedByServer = false;
13
- _this._enableJsonp = true;
14
- _this.dataProvider = ((function () {
15
- var $ret = new ODataVirtualDataSourceDataProvider();
16
- $ret.executionContext = _this.executionContext;
17
- $ret.enableJsonp = _this.enableJsonp;
18
- $ret.isAggregationSupported = _this.isGroupingSupported;
19
- return $ret;
20
- })());
21
- _this.externalDataSource = _this;
22
- return _this;
23
- }
24
- ODataVirtualDataSource.prototype.onBaseUriChanged = function (oldValue, newValue) {
25
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
26
- this.actualDataProvider.baseUri = this.baseUri;
27
- }
28
- this.queueAutoRefresh();
29
- };
30
- Object.defineProperty(ODataVirtualDataSource.prototype, "baseUri", {
31
- get: function () {
32
- return this._baseUri;
33
- },
34
- set: function (value) {
35
- var oldValue = this._baseUri;
36
- this._baseUri = value;
37
- if (oldValue != this._baseUri) {
38
- this.onBaseUriChanged(oldValue, this._baseUri);
39
- }
40
- },
41
- enumerable: false,
42
- configurable: true
43
- });
44
- ODataVirtualDataSource.prototype.onEntitySetChanged = function (oldValue, newValue) {
45
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
46
- this.actualDataProvider.entitySet = this.entitySet;
47
- }
48
- this.queueAutoRefresh();
49
- };
50
- Object.defineProperty(ODataVirtualDataSource.prototype, "entitySet", {
51
- get: function () {
52
- return this._entitySet;
53
- },
54
- set: function (value) {
55
- var oldValue = this._entitySet;
56
- this._entitySet = value;
57
- if (this._entitySet != oldValue) {
58
- this.onEntitySetChanged(oldValue, this._entitySet);
59
- }
60
- },
61
- enumerable: false,
62
- configurable: true
63
- });
64
- ODataVirtualDataSource.prototype.onTimeoutMillisecondsChanged = function (oldValue, newValue) {
65
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
66
- this.actualDataProvider.timeoutMilliseconds = this.timeoutMilliseconds;
67
- }
68
- };
69
- Object.defineProperty(ODataVirtualDataSource.prototype, "timeoutMilliseconds", {
70
- get: function () {
71
- return this._timeoutMilliseconds;
72
- },
73
- set: function (value) {
74
- var oldValue = this._timeoutMilliseconds;
75
- this._timeoutMilliseconds = value;
76
- if (oldValue != this._timeoutMilliseconds) {
77
- this.onTimeoutMillisecondsChanged(oldValue, this._timeoutMilliseconds);
78
- }
79
- },
80
- enumerable: false,
81
- configurable: true
82
- });
83
- Object.defineProperty(ODataVirtualDataSource.prototype, "isSortingSupportedOverride", {
84
- get: function () {
85
- return true;
86
- },
87
- enumerable: false,
88
- configurable: true
89
- });
90
- Object.defineProperty(ODataVirtualDataSource.prototype, "isFilteringSupportedOverride", {
91
- get: function () {
92
- return true;
93
- },
94
- enumerable: false,
95
- configurable: true
96
- });
97
- Object.defineProperty(ODataVirtualDataSource.prototype, "isGroupingSupportedOverride", {
98
- get: function () {
99
- return this.isAggregationSupportedByServer;
100
- },
101
- enumerable: false,
102
- configurable: true
103
- });
104
- Object.defineProperty(ODataVirtualDataSource.prototype, "isAggregationSupportedByServer", {
105
- get: function () {
106
- return this._isAggregationSupportedByServer;
107
- },
108
- set: function (isSupported) {
109
- this._isAggregationSupportedByServer = isSupported;
110
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
111
- this.actualDataProvider.isAggregationSupported = isSupported;
112
- }
113
- },
114
- enumerable: false,
115
- configurable: true
116
- });
117
- Object.defineProperty(ODataVirtualDataSource.prototype, "enableJsonp", {
118
- get: function () {
119
- return this._enableJsonp;
120
- },
121
- set: function (isEnabled) {
122
- this._enableJsonp = isEnabled;
123
- if (typeCast(ODataVirtualDataSourceDataProvider.$type, this.actualDataProvider) !== null) {
124
- this.actualDataProvider.enableJsonp = isEnabled;
125
- }
126
- },
127
- enumerable: false,
128
- configurable: true
129
- });
130
- ODataVirtualDataSource.prototype.clone = function () {
131
- var dataSource = new ODataVirtualDataSource();
132
- dataSource.executionContext = this.executionContext;
133
- dataSource.includeSummaryRowsInSection = this.includeSummaryRowsInSection;
134
- dataSource.isSectionCollapsable = this.isSectionCollapsable;
135
- dataSource.isSectionExpandedDefault = this.isSectionExpandedDefault;
136
- //dataSource.isSectionHeaderNormalRow = this.isSectionHeaderNormalRow;
137
- dataSource.isSectionSummaryRowsAtBottom = this.isSectionSummaryRowsAtBottom;
138
- //dataSource.isSectionContentVisible = this.isSectionContentVisible;
139
- dataSource.primaryKey = this.primaryKey;
140
- dataSource.propertiesRequested = this.propertiesRequested;
141
- dataSource.sectionHeaderDisplayMode = this.sectionHeaderDisplayMode;
142
- dataSource.shouldEmitSectionFooters = this.shouldEmitSectionFooters;
143
- dataSource.shouldEmitSectionHeaders = this.shouldEmitSectionHeaders;
144
- dataSource.shouldEmitShiftedRows = this.shouldEmitShiftedRows;
145
- dataSource.summaryScope = this.summaryScope;
146
- for (var i = 0; i < this.groupDescriptions.size(); i++) {
147
- dataSource.groupDescriptions.add(this.groupDescriptions.get(i));
148
- }
149
- for (var i = 0; i < this.sortDescriptions.size(); i++) {
150
- dataSource.sortDescriptions.add(this.sortDescriptions.get(i));
151
- }
152
- for (var i = 0; i < this.filterExpressions.size(); i++) {
153
- dataSource.filterExpressions.add(this.filterExpressions.get(i));
154
- }
155
- for (var i = 0; i < this.summaryDescriptions.size(); i++) {
156
- dataSource.summaryDescriptions.add(this.summaryDescriptions.get(i));
157
- }
158
- dataSource.pageSizeRequested = this.pageSizeRequested;
159
- dataSource.maxCachedPages = this.maxCachedPages;
160
- dataSource.baseUri = this.baseUri;
161
- dataSource.entitySet = this.entitySet;
162
- dataSource.timeoutMilliseconds = this.timeoutMilliseconds;
163
- dataSource.isAggregationSupportedByServer = this.isAggregationSupportedByServer;
164
- dataSource.enableJsonp = this.enableJsonp;
165
- return dataSource;
166
- };
167
- return ODataVirtualDataSource;
168
- }(VirtualDataSource));
169
- export { ODataVirtualDataSource };