@adobe/acc-js-sdk 1.1.21 → 1.1.22

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.
@@ -3,6 +3,15 @@ layout: page
3
3
  title: Change Log
4
4
  ---
5
5
 
6
+ <section class="changelog"><h1>Version 1.1.22</h1>
7
+ <h2>2023/01/19</h2>
8
+
9
+ <li>
10
+ Fix enumeration default value support (XtkEnumeration class). When an enumertion as a default value ('default' attribute of the enumeration)
11
+ object, this value should match the 'name' attribute of one of the enumeration values, not the 'value' attribute.
12
+ </li>
13
+ </section>
14
+
6
15
  <section class="changelog"><h1>Version 1.1.21</h1>
7
16
  <h2>2023/01/18</h2>
8
17
 
package/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/acc-js-sdk",
3
- "version": "1.1.20",
3
+ "version": "1.1.22",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/acc-js-sdk",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "ACC Javascript SDK",
5
5
  "main": "src/index.js",
6
6
  "homepage": "https://github.com/adobe/acc-js-sdk#readme",
@@ -1065,7 +1065,7 @@ class XtkEnumeration {
1065
1065
  const e = new XtkEnumerationValue(child, this.baseType, this._localizationId);
1066
1066
  this.values._push(e.name, e);
1067
1067
  if (e.image != "") this.hasImage = true;
1068
- const stringValue = EntityAccessor.getAttributeAsString(child, "value");
1068
+ const stringValue = EntityAccessor.getAttributeAsString(child, "name");
1069
1069
  if (defaultValue == stringValue)
1070
1070
  this.default = e;
1071
1071
  }
@@ -467,7 +467,7 @@ describe('Application', () => {
467
467
 
468
468
  it("Should support default values", () => {
469
469
  var xml = DomUtil.parse(`<schema namespace='nms' name='recipient'>
470
- <enumeration basetype="byte" name="instanceType" default="1">
470
+ <enumeration basetype="byte" name="instanceType" default="master">
471
471
  <value label="One-off event" name="single" value="0"/>
472
472
  <value label="Reference recurrence" name="master" value="1"/>
473
473
  <value label="Instance of a recurrence" name="instance" value="2"/>
@@ -492,7 +492,7 @@ describe('Application', () => {
492
492
  <GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
493
493
  <pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
494
494
  <schema name="profile" namespace="nms" xtkschema="xtk:schema">
495
- <enumeration basetype="byte" name="instanceType" default="1" label="Instance type">
495
+ <enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
496
496
  <value label="One-off event" name="single" value="0"/>
497
497
  <value label="Reference recurrence" name="master" value="1"/>
498
498
  <value label="Instance of a recurrence" name="instance" value="2"/>
@@ -517,7 +517,7 @@ describe('Application', () => {
517
517
  <GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
518
518
  <pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
519
519
  <schema name="profile" namespace="nms" xtkschema="xtk:schema">
520
- <enumeration basetype="byte" name="instanceType" default="1" label="Instance type">
520
+ <enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
521
521
  <value label="One-off event" name="single" value="0"/>
522
522
  <value label="Reference recurrence" name="master" value="1"/>
523
523
  <value label="Instance of a recurrence" name="instance" value="2"/>
@@ -558,7 +558,7 @@ describe('Application', () => {
558
558
  <GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
559
559
  <pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
560
560
  <schema name="profile" namespace="nms" xtkschema="xtk:schema">
561
- <enumeration basetype="byte" name="instanceType" default="1" label="Instance type">
561
+ <enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
562
562
  <value label="One-off event" name="single" value="0"/>
563
563
  <value label="Reference recurrence" name="master" value="1"/>
564
564
  <value label="Instance of a recurrence" name="instance" value="2"/>
@@ -584,7 +584,7 @@ describe('Application', () => {
584
584
  <GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
585
585
  <pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
586
586
  <schema name="profile" namespace="nms" xtkschema="xtk:schema">
587
- <enumeration basetype="byte" name="instanceType" default="1" label="Instance type">
587
+ <enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
588
588
  <value label="One-off event" name="single" value="0"/>
589
589
  <value label="Reference recurrence" name="master" value="1"/>
590
590
  <value label="Instance of a recurrence" name="instance" value="2"/>
@@ -625,7 +625,7 @@ describe('Application', () => {
625
625
  <GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
626
626
  <pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
627
627
  <schema name="profile" namespace="nms" xtkschema="xtk:schema">
628
- <enumeration basetype="byte" name="instanceType" default="1" label="Instance type">
628
+ <enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
629
629
  <value label="One-off event" name="single" value="0"/>
630
630
  <value label="Reference recurrence" name="master" value="1"/>
631
631
  <value label="Instance of a recurrence" name="instance" value="2"/>