@adobe/acc-js-sdk 1.1.32 → 1.1.33
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/docs/changeLog.html +7 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/src/application.js +3 -1
- package/test/application.test.js +13 -0
package/docs/changeLog.html
CHANGED
|
@@ -3,6 +3,13 @@ layout: page
|
|
|
3
3
|
title: Change Log
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
<section class="changelog"><h1>Version 1.1.33</h1>
|
|
7
|
+
<h2>2023/07/08</h2>
|
|
8
|
+
<li>
|
|
9
|
+
Because of a server-side bug, there could be shemas with multiple copies of an enumeration. Make sure the SDK will not fail loading such schemas (only the first copy of the enumeration will be considered)
|
|
10
|
+
</li>
|
|
11
|
+
</section>
|
|
12
|
+
|
|
6
13
|
<section class="changelog"><h1>Version 1.1.32</h1>
|
|
7
14
|
<h2>2023/06/22</h2>
|
|
8
15
|
<li>
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/acc-js-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.33",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@adobe/acc-js-sdk",
|
|
9
|
-
"version": "1.1.
|
|
9
|
+
"version": "1.1.33",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^1.2.1",
|
package/package.json
CHANGED
package/src/application.js
CHANGED
|
@@ -1224,7 +1224,9 @@ class XtkSchema extends XtkSchemaNode {
|
|
|
1224
1224
|
this.enumerations = new ArrayMap();
|
|
1225
1225
|
for (var child of EntityAccessor.getChildElements(xml, "enumeration")) {
|
|
1226
1226
|
const e = new XtkEnumeration(this.id, child);
|
|
1227
|
-
this.enumerations.
|
|
1227
|
+
if (this.enumerations.get(e.shortName) === undefined) {
|
|
1228
|
+
this.enumerations._push(e.shortName, e);
|
|
1229
|
+
}
|
|
1228
1230
|
}
|
|
1229
1231
|
}
|
|
1230
1232
|
|
package/test/application.test.js
CHANGED
|
@@ -345,6 +345,19 @@ describe('Application', () => {
|
|
|
345
345
|
expect(enumerations[1].label).toBe("Status code");
|
|
346
346
|
});
|
|
347
347
|
|
|
348
|
+
it("Should support duplicate enumerations", () => {
|
|
349
|
+
var xml = DomUtil.parse(`<schema namespace='nms' name='recipient'>
|
|
350
|
+
<enumeration name="duplicated" basetype="byte"/>
|
|
351
|
+
<enumeration name="duplicated" basetype="byte"/>
|
|
352
|
+
<element name='recipient' label='Recipients'></element>
|
|
353
|
+
</schema>`);
|
|
354
|
+
var schema = newSchema(xml);
|
|
355
|
+
var enumerations = schema.enumerations;
|
|
356
|
+
expect(enumerations.duplicated.dummy).toBeFalsy();
|
|
357
|
+
expect(enumerations[0].label).toBe("Duplicated");
|
|
358
|
+
expect(enumerations[1]).toBeUndefined();
|
|
359
|
+
});
|
|
360
|
+
|
|
348
361
|
it("Should test images", () => {
|
|
349
362
|
var xml = DomUtil.parse(`<schema namespace='nms' name='recipient'>
|
|
350
363
|
<enumeration name="gender" basetype="byte">
|