@salesforce/lds-drafts 1.309.0-dev11 → 1.309.0-dev12
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/dist/ldsDrafts.js +5 -3
- package/package.json +2 -2
package/dist/ldsDrafts.js
CHANGED
|
@@ -525,7 +525,7 @@ class DurableDraftQueue {
|
|
|
525
525
|
switch (result) {
|
|
526
526
|
case ProcessActionResult.BLOCKED_ON_ERROR:
|
|
527
527
|
this.state = DraftQueueState.Error;
|
|
528
|
-
return Promise.reject();
|
|
528
|
+
return Promise.reject('Unable to start queue - first action is in error state');
|
|
529
529
|
default:
|
|
530
530
|
return Promise.resolve();
|
|
531
531
|
}
|
|
@@ -1831,16 +1831,17 @@ class DraftManager {
|
|
|
1831
1831
|
return Promise.reject('cannot edit incompatible action type or uploading actions');
|
|
1832
1832
|
}
|
|
1833
1833
|
action.data.body.fields = { ...action.data.body.fields, ...fields };
|
|
1834
|
+
action.status = DraftActionStatus.Pending;
|
|
1834
1835
|
await this.draftQueue.updateDraftAction(action);
|
|
1835
1836
|
return this.buildDraftQueueItem(action);
|
|
1836
1837
|
}
|
|
1837
1838
|
isValidFieldMap(fields) {
|
|
1838
1839
|
const keys$1 = keys(fields);
|
|
1839
|
-
const validTypes = ['string', 'number', '
|
|
1840
|
+
const validTypes = ['string', 'number', 'boolean'];
|
|
1840
1841
|
for (let i = 0; i < keys$1.length; i++) {
|
|
1841
1842
|
const key = keys$1[i];
|
|
1842
1843
|
const value = fields[key];
|
|
1843
|
-
if (!validTypes.includes(typeof value)) {
|
|
1844
|
+
if (!validTypes.includes(typeof value) && value !== null) {
|
|
1844
1845
|
return false;
|
|
1845
1846
|
}
|
|
1846
1847
|
}
|
|
@@ -1868,6 +1869,7 @@ class DraftManager {
|
|
|
1868
1869
|
}
|
|
1869
1870
|
const data = action.data;
|
|
1870
1871
|
data.body.fields = { ...data.body.fields, ...fields };
|
|
1872
|
+
action.status = DraftActionStatus.Pending;
|
|
1871
1873
|
await this.draftQueue.updateDraftAction(action);
|
|
1872
1874
|
return this.buildDraftQueueItem(action);
|
|
1873
1875
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-drafts",
|
|
3
|
-
"version": "1.309.0-
|
|
3
|
+
"version": "1.309.0-dev12",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS Drafts",
|
|
6
6
|
"main": "dist/ldsDrafts.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@luvio/engine": "0.156.4-dev1",
|
|
28
28
|
"@luvio/environments": "0.156.4-dev1",
|
|
29
|
-
"@salesforce/lds-utils-adapters": "^1.309.0-
|
|
29
|
+
"@salesforce/lds-utils-adapters": "^1.309.0-dev12"
|
|
30
30
|
},
|
|
31
31
|
"volta": {
|
|
32
32
|
"extends": "../../package.json"
|