@adobe/acc-js-sdk 1.1.20 → 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.
- package/docs/application.html +3 -2
- package/docs/changeLog.html +19 -2
- package/package-lock.json +1 -1
- package/package.json +1 -1
- package/src/application.js +7 -1
- package/src/cacheRefresher.js +1 -1
- package/test/application.test.js +25 -6
package/docs/application.html
CHANGED
|
@@ -228,13 +228,14 @@ const root = await node.linkTarget();
|
|
|
228
228
|
<tbody>
|
|
229
229
|
<tr><td><b>children</b></td><td>A array/map of children of the node. See note on the ArrayMap structure below</td></tr>
|
|
230
230
|
<tr><td><b>dataPolicy</b></td><td>Returns a string of characters which provides the data policy of the current node.</td></tr>
|
|
231
|
+
<tr><td><b>dbEnum</b></td><td>Returns a string of characters which provides the db enum of the current node.</td></tr>
|
|
231
232
|
<tr><td><b>description</b></td><td>A long, human readable, description of the node</td></tr>
|
|
232
233
|
<tr><td><b>descriptionLocalizationId</b></td><td>The translation id of the description of the node.</td></tr>
|
|
233
234
|
<tr><td><b>editType</b></td><td>Returns a string of characters which specifies the editing type of the current node.
|
|
234
235
|
<tr><td><b>enum</b></td><td>The name of the enumeration for the node, or an empty string if the node does node have an enumeration. See <b>enumeration()</b> method to get the corresponding <b>XtkSchemaNode</b></td></tr>
|
|
235
236
|
<tr><td><b>enumerationImage</b></td><td>Returns the name of the image of the current node in the form of a string of characters.</td></tr>
|
|
236
237
|
<tr><td><b>folderModel</b></td><td>Only on the root node, returns a string which contains the folder template(s). On the other nodes, it returns undefined.
|
|
237
|
-
<tr><td><b>image
|
|
238
|
+
<tr><td><b>image**</b></td><td>Returns the name of the image in the form of a string of characters.
|
|
238
239
|
<tr><td><b>img</b></td><td>Returns the name of the image in the form of a string of characters. (alias to <b>image</b> property)</td></tr>
|
|
239
240
|
<tr><td><b>integrity</b></td><td>Returns the link integrity type.</td></tr>
|
|
240
241
|
<tr><td><b>keys</b></td><td>A array/map of keys in this node, indexed by key name. Map values are of type <b>XtkSchemaKey</b></td></tr>
|
|
@@ -271,7 +272,7 @@ const root = await node.linkTarget();
|
|
|
271
272
|
<tr><td><b>label</b></td><td>The label (i.e. human readable, localised) name of the node.</td></tr>
|
|
272
273
|
<tr><td><b>labelLocalizationId</b></td><td>The translation id of the label of the node.</td></tr>
|
|
273
274
|
<tr><td><b>name</b></td><td>The name of the node (internal name)</td></tr>
|
|
274
|
-
<tr><td><b>nodePath
|
|
275
|
+
<tr><td><b>nodePath**</b></td><td>The xpath of the node
|
|
275
276
|
<tr><td><b>parent</b></td><td>The parent node (a <b>XtkSchemaNode</b> object). Will be null for schema nodes</td></tr>
|
|
276
277
|
<tr><td><b>PKSequence</b></td><td>Returns a character string that provides the name of the sequence to use for the primary key.</td></tr>
|
|
277
278
|
<tr><td><b>packageStatus</b></td><td>Returns a number that gives the package status.</td></tr>
|
package/docs/changeLog.html
CHANGED
|
@@ -3,6 +3,23 @@ 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
|
+
|
|
15
|
+
<section class="changelog"><h1>Version 1.1.21</h1>
|
|
16
|
+
<h2>2023/01/18</h2>
|
|
17
|
+
|
|
18
|
+
<li>
|
|
19
|
+
Extended XtkSchemaNode class with dbEnum attribute.
|
|
20
|
+
</li>
|
|
21
|
+
</section>
|
|
22
|
+
|
|
6
23
|
<section class="changelog"><h1>Version 1.1.20</h1>
|
|
7
24
|
<h2>2023/01/11</h2>
|
|
8
25
|
|
|
@@ -328,5 +345,5 @@ _Breaking changes in 1.0.0_
|
|
|
328
345
|
|
|
329
346
|
</section>
|
|
330
347
|
<section class="changelog"> <h1>0.1.0</h1>
|
|
331
|
-
<h2>Initial
|
|
332
|
-
|
|
348
|
+
<h2>Initial version</h2>
|
|
349
|
+
</section>
|
package/package-lock.json
CHANGED
package/package.json
CHANGED
package/src/application.js
CHANGED
|
@@ -251,6 +251,12 @@ class XtkSchemaNode {
|
|
|
251
251
|
*/
|
|
252
252
|
this.dataPolicy = EntityAccessor.getAttributeAsString(xml, "dataPolicy");
|
|
253
253
|
|
|
254
|
+
/**
|
|
255
|
+
* Returns a string of characters which provides the db enum of the current node.
|
|
256
|
+
* @type {string}
|
|
257
|
+
*/
|
|
258
|
+
this.dbEnum = EntityAccessor.getAttributeAsString(xml, "dbEnum");
|
|
259
|
+
|
|
254
260
|
/**
|
|
255
261
|
* Returns a string of characters which specifies the editing type of the current node.
|
|
256
262
|
* @type {string}
|
|
@@ -1059,7 +1065,7 @@ class XtkEnumeration {
|
|
|
1059
1065
|
const e = new XtkEnumerationValue(child, this.baseType, this._localizationId);
|
|
1060
1066
|
this.values._push(e.name, e);
|
|
1061
1067
|
if (e.image != "") this.hasImage = true;
|
|
1062
|
-
const stringValue = EntityAccessor.getAttributeAsString(child, "
|
|
1068
|
+
const stringValue = EntityAccessor.getAttributeAsString(child, "name");
|
|
1063
1069
|
if (defaultValue == stringValue)
|
|
1064
1070
|
this.default = e;
|
|
1065
1071
|
}
|
package/src/cacheRefresher.js
CHANGED
package/test/application.test.js
CHANGED
|
@@ -141,6 +141,25 @@ describe('Application', () => {
|
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
+
describe('dbEnum', () => {
|
|
145
|
+
it("Should find dbEnum attribute", () => {
|
|
146
|
+
var xml = DomUtil.parse(`<schema namespace='nms' name='recipient'>
|
|
147
|
+
<element name='recipient' label='Recipients'>
|
|
148
|
+
<attribute dbEnum="operationNature" desc="Nature of the campaign" label="Nature"
|
|
149
|
+
length="64" name="nature" type="string"/>
|
|
150
|
+
</element>
|
|
151
|
+
</schema>`);
|
|
152
|
+
var schema = newSchema(xml);
|
|
153
|
+
var root = schema.root;
|
|
154
|
+
expect(!!root.children.get("@nature")).toBe(true);
|
|
155
|
+
var attribute = root.children["@nature"];
|
|
156
|
+
expect(attribute).not.toBeNull();
|
|
157
|
+
expect(attribute.dbEnum).toBe("operationNature");
|
|
158
|
+
expect(attribute.type).toBe("string");
|
|
159
|
+
expect(attribute.length).toBe(64);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
|
|
144
163
|
describe("Children", () => {
|
|
145
164
|
it("Should browse root children", () => {
|
|
146
165
|
var xml = DomUtil.parse(`<schema namespace='nms' name='recipient'>
|
|
@@ -448,7 +467,7 @@ describe('Application', () => {
|
|
|
448
467
|
|
|
449
468
|
it("Should support default values", () => {
|
|
450
469
|
var xml = DomUtil.parse(`<schema namespace='nms' name='recipient'>
|
|
451
|
-
<enumeration basetype="byte" name="instanceType" default="
|
|
470
|
+
<enumeration basetype="byte" name="instanceType" default="master">
|
|
452
471
|
<value label="One-off event" name="single" value="0"/>
|
|
453
472
|
<value label="Reference recurrence" name="master" value="1"/>
|
|
454
473
|
<value label="Instance of a recurrence" name="instance" value="2"/>
|
|
@@ -473,7 +492,7 @@ describe('Application', () => {
|
|
|
473
492
|
<GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
474
493
|
<pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
|
|
475
494
|
<schema name="profile" namespace="nms" xtkschema="xtk:schema">
|
|
476
|
-
<enumeration basetype="byte" name="instanceType" default="
|
|
495
|
+
<enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
|
|
477
496
|
<value label="One-off event" name="single" value="0"/>
|
|
478
497
|
<value label="Reference recurrence" name="master" value="1"/>
|
|
479
498
|
<value label="Instance of a recurrence" name="instance" value="2"/>
|
|
@@ -498,7 +517,7 @@ describe('Application', () => {
|
|
|
498
517
|
<GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
499
518
|
<pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
|
|
500
519
|
<schema name="profile" namespace="nms" xtkschema="xtk:schema">
|
|
501
|
-
<enumeration basetype="byte" name="instanceType" default="
|
|
520
|
+
<enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
|
|
502
521
|
<value label="One-off event" name="single" value="0"/>
|
|
503
522
|
<value label="Reference recurrence" name="master" value="1"/>
|
|
504
523
|
<value label="Instance of a recurrence" name="instance" value="2"/>
|
|
@@ -539,7 +558,7 @@ describe('Application', () => {
|
|
|
539
558
|
<GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
540
559
|
<pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
|
|
541
560
|
<schema name="profile" namespace="nms" xtkschema="xtk:schema">
|
|
542
|
-
<enumeration basetype="byte" name="instanceType" default="
|
|
561
|
+
<enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
|
|
543
562
|
<value label="One-off event" name="single" value="0"/>
|
|
544
563
|
<value label="Reference recurrence" name="master" value="1"/>
|
|
545
564
|
<value label="Instance of a recurrence" name="instance" value="2"/>
|
|
@@ -565,7 +584,7 @@ describe('Application', () => {
|
|
|
565
584
|
<GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
566
585
|
<pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
|
|
567
586
|
<schema name="profile" namespace="nms" xtkschema="xtk:schema">
|
|
568
|
-
<enumeration basetype="byte" name="instanceType" default="
|
|
587
|
+
<enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
|
|
569
588
|
<value label="One-off event" name="single" value="0"/>
|
|
570
589
|
<value label="Reference recurrence" name="master" value="1"/>
|
|
571
590
|
<value label="Instance of a recurrence" name="instance" value="2"/>
|
|
@@ -606,7 +625,7 @@ describe('Application', () => {
|
|
|
606
625
|
<GetEntityIfMoreRecentResponse xmlns='urn:wpp:default' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
|
|
607
626
|
<pdomDoc xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
|
|
608
627
|
<schema name="profile" namespace="nms" xtkschema="xtk:schema">
|
|
609
|
-
<enumeration basetype="byte" name="instanceType" default="
|
|
628
|
+
<enumeration basetype="byte" name="instanceType" default="master" label="Instance type">
|
|
610
629
|
<value label="One-off event" name="single" value="0"/>
|
|
611
630
|
<value label="Reference recurrence" name="master" value="1"/>
|
|
612
631
|
<value label="Instance of a recurrence" name="instance" value="2"/>
|