angular-odata 0.158.0 → 0.160.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.
|
@@ -1779,11 +1779,13 @@ class ODataAnnotation {
|
|
|
1779
1779
|
string;
|
|
1780
1780
|
bool;
|
|
1781
1781
|
int;
|
|
1782
|
-
|
|
1783
|
-
properties;
|
|
1782
|
+
values;
|
|
1784
1783
|
constructor(annot) {
|
|
1785
1784
|
this.term = annot.term;
|
|
1786
|
-
|
|
1785
|
+
this.string = annot.string;
|
|
1786
|
+
this.bool = annot.bool;
|
|
1787
|
+
this.int = annot.int;
|
|
1788
|
+
this.values = annot.values;
|
|
1787
1789
|
}
|
|
1788
1790
|
}
|
|
1789
1791
|
class ODataAnnotatable {
|
|
@@ -1813,8 +1815,7 @@ class ODataAnnotatable {
|
|
|
1813
1815
|
return (annot.string ||
|
|
1814
1816
|
annot.bool ||
|
|
1815
1817
|
annot.int ||
|
|
1816
|
-
annot.
|
|
1817
|
-
annot.properties);
|
|
1818
|
+
annot.values);
|
|
1818
1819
|
}
|
|
1819
1820
|
}
|
|
1820
1821
|
|
|
@@ -7986,11 +7987,22 @@ class CsdlAnnotation {
|
|
|
7986
7987
|
return json;
|
|
7987
7988
|
}
|
|
7988
7989
|
toConfig() {
|
|
7990
|
+
var items = undefined;
|
|
7991
|
+
if (Array.isArray(this.Collection) && this.Collection.length > 0) {
|
|
7992
|
+
items = this.Collection.map((m) => m.toConfig()).flat();
|
|
7993
|
+
}
|
|
7994
|
+
else if (Array.isArray(this.Record) && this.Record.length > 0) {
|
|
7995
|
+
items = this.Record.map((m) => m.toConfig()).flat();
|
|
7996
|
+
}
|
|
7997
|
+
else if (Array.isArray(this.EnumMember) && this.EnumMember.length > 0) {
|
|
7998
|
+
items = this.EnumMember.map((m) => m.toConfig());
|
|
7999
|
+
}
|
|
7989
8000
|
return {
|
|
7990
8001
|
term: this.Term,
|
|
7991
8002
|
string: this.String,
|
|
7992
8003
|
bool: this.Bool,
|
|
7993
8004
|
int: this.Int,
|
|
8005
|
+
values: items,
|
|
7994
8006
|
};
|
|
7995
8007
|
}
|
|
7996
8008
|
}
|
|
@@ -8090,6 +8102,21 @@ class CsdlCollection {
|
|
|
8090
8102
|
}
|
|
8091
8103
|
return json;
|
|
8092
8104
|
}
|
|
8105
|
+
toConfig() {
|
|
8106
|
+
if (Array.isArray(this.String) && this.String.length > 0) {
|
|
8107
|
+
return this.String.map((s) => s.toConfig());
|
|
8108
|
+
}
|
|
8109
|
+
if (Array.isArray(this.Record) && this.Record.length > 0) {
|
|
8110
|
+
return this.Record.map((r) => r.toConfig()).flat();
|
|
8111
|
+
}
|
|
8112
|
+
if (Array.isArray(this.PropertyPath) && this.PropertyPath.length > 0) {
|
|
8113
|
+
return this.PropertyPath.map((p) => p.toConfig());
|
|
8114
|
+
}
|
|
8115
|
+
if (Array.isArray(this.NavigationPropertyPath) && this.NavigationPropertyPath.length > 0) {
|
|
8116
|
+
return this.NavigationPropertyPath.map((p) => p.toConfig());
|
|
8117
|
+
}
|
|
8118
|
+
return [];
|
|
8119
|
+
}
|
|
8093
8120
|
}
|
|
8094
8121
|
class CsdlRecord {
|
|
8095
8122
|
PropertyValue;
|
|
@@ -8103,6 +8130,12 @@ class CsdlRecord {
|
|
|
8103
8130
|
}
|
|
8104
8131
|
return json;
|
|
8105
8132
|
}
|
|
8133
|
+
toConfig() {
|
|
8134
|
+
if (Array.isArray(this.PropertyValue) && this.PropertyValue.length > 0) {
|
|
8135
|
+
return this.PropertyValue.map((p) => p.toConfig());
|
|
8136
|
+
}
|
|
8137
|
+
return [];
|
|
8138
|
+
}
|
|
8106
8139
|
}
|
|
8107
8140
|
class CsdlPropertyValue {
|
|
8108
8141
|
Name;
|
|
@@ -8128,6 +8161,19 @@ class CsdlPropertyValue {
|
|
|
8128
8161
|
}
|
|
8129
8162
|
return json;
|
|
8130
8163
|
}
|
|
8164
|
+
toConfig() {
|
|
8165
|
+
const config = { name: this.Name };
|
|
8166
|
+
if (this.String !== undefined) {
|
|
8167
|
+
config['string'] = this.String;
|
|
8168
|
+
}
|
|
8169
|
+
if (this.Date !== undefined) {
|
|
8170
|
+
config['date'] = this.Date;
|
|
8171
|
+
}
|
|
8172
|
+
if (Array.isArray(this.EnumMember) && this.EnumMember.length > 0) {
|
|
8173
|
+
config['enumMembers'] = this.EnumMember.map((m) => m.toConfig());
|
|
8174
|
+
}
|
|
8175
|
+
return config;
|
|
8176
|
+
}
|
|
8131
8177
|
}
|
|
8132
8178
|
class CsdlEnumMember {
|
|
8133
8179
|
TextContent;
|
|
@@ -8139,6 +8185,9 @@ class CsdlEnumMember {
|
|
|
8139
8185
|
TextContent: this.TextContent,
|
|
8140
8186
|
};
|
|
8141
8187
|
}
|
|
8188
|
+
toConfig() {
|
|
8189
|
+
return this.TextContent;
|
|
8190
|
+
}
|
|
8142
8191
|
}
|
|
8143
8192
|
class CsdlString {
|
|
8144
8193
|
TextContent;
|
|
@@ -8150,6 +8199,9 @@ class CsdlString {
|
|
|
8150
8199
|
TextContent: this.TextContent,
|
|
8151
8200
|
};
|
|
8152
8201
|
}
|
|
8202
|
+
toConfig() {
|
|
8203
|
+
return this.TextContent;
|
|
8204
|
+
}
|
|
8153
8205
|
}
|
|
8154
8206
|
class CsdlPropertyPath {
|
|
8155
8207
|
TextContent;
|
|
@@ -8161,6 +8213,9 @@ class CsdlPropertyPath {
|
|
|
8161
8213
|
TextContent: this.TextContent,
|
|
8162
8214
|
};
|
|
8163
8215
|
}
|
|
8216
|
+
toConfig() {
|
|
8217
|
+
return this.TextContent;
|
|
8218
|
+
}
|
|
8164
8219
|
}
|
|
8165
8220
|
class CsdlNavigationPropertyPath {
|
|
8166
8221
|
TextContent;
|
|
@@ -8172,6 +8227,9 @@ class CsdlNavigationPropertyPath {
|
|
|
8172
8227
|
TextContent: this.TextContent,
|
|
8173
8228
|
};
|
|
8174
8229
|
}
|
|
8230
|
+
toConfig() {
|
|
8231
|
+
return this.TextContent;
|
|
8232
|
+
}
|
|
8175
8233
|
}
|
|
8176
8234
|
|
|
8177
8235
|
class CsdlReference extends CsdlAnnotable {
|
|
@@ -9086,7 +9144,7 @@ class CsdlSchema {
|
|
|
9086
9144
|
return {
|
|
9087
9145
|
namespace: this.Namespace,
|
|
9088
9146
|
alias: base?.alias ?? this.Alias,
|
|
9089
|
-
annotations: this.Annotations?.
|
|
9147
|
+
annotations: this.Annotations?.flatMap((t) => t.toConfig()),
|
|
9090
9148
|
enums: this.EnumType?.map((t) => t.toConfig(base?.enums?.find((cs) => cs.name === t.Name))),
|
|
9091
9149
|
entities: [
|
|
9092
9150
|
...(this.ComplexType ?? []).map((t) => t.toConfig(base?.entities?.find((cs) => cs.name === t.Name))),
|