@salesforce/lds-drafts 1.305.0 → 1.307.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.
- package/dist/ldsDrafts.js +12 -4
- package/dist/types/DraftManager.d.ts +6 -1
- package/package.json +2 -2
package/dist/ldsDrafts.js
CHANGED
|
@@ -1628,9 +1628,14 @@ var DraftQueueOperationType;
|
|
|
1628
1628
|
DraftQueueOperationType["ItemCompleted"] = "completed";
|
|
1629
1629
|
DraftQueueOperationType["ItemFailed"] = "failed";
|
|
1630
1630
|
DraftQueueOperationType["ItemUpdated"] = "updated";
|
|
1631
|
+
/** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
|
|
1632
|
+
* Planned to be removed in 256 (W-16217436) */
|
|
1631
1633
|
DraftQueueOperationType["QueueStarted"] = "started";
|
|
1634
|
+
/** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
|
|
1635
|
+
* Planned to be removed in 256 (W-16217436) */
|
|
1632
1636
|
DraftQueueOperationType["QueueStopped"] = "stopped";
|
|
1633
|
-
|
|
1637
|
+
/** @since 252 */
|
|
1638
|
+
DraftQueueOperationType["QueueStateChanged"] = "queueStateChanged";
|
|
1634
1639
|
})(DraftQueueOperationType || (DraftQueueOperationType = {}));
|
|
1635
1640
|
/**
|
|
1636
1641
|
* Converts the internal DraftAction's ResourceRequest into
|
|
@@ -1726,8 +1731,6 @@ class DraftManager {
|
|
|
1726
1731
|
return DraftQueueOperationType.QueueStarted;
|
|
1727
1732
|
case DraftQueueState.Stopped:
|
|
1728
1733
|
return DraftQueueOperationType.QueueStopped;
|
|
1729
|
-
case DraftQueueState.Waiting:
|
|
1730
|
-
return DraftQueueOperationType.QueueWaiting;
|
|
1731
1734
|
default:
|
|
1732
1735
|
throw Error('Unsupported event type');
|
|
1733
1736
|
}
|
|
@@ -1900,7 +1903,12 @@ class DraftManager {
|
|
|
1900
1903
|
const managerState = await this.getQueue();
|
|
1901
1904
|
let operationType, item;
|
|
1902
1905
|
if (isDraftQueueStateChangeEvent(event)) {
|
|
1903
|
-
|
|
1906
|
+
if (this.listenerVersion === undefined) {
|
|
1907
|
+
operationType = this.draftQueueStateToOperationType(event.state);
|
|
1908
|
+
}
|
|
1909
|
+
else {
|
|
1910
|
+
operationType = DraftQueueOperationType.QueueStateChanged;
|
|
1911
|
+
}
|
|
1904
1912
|
}
|
|
1905
1913
|
else {
|
|
1906
1914
|
const { action, type } = event;
|
|
@@ -72,9 +72,14 @@ export declare enum DraftQueueOperationType {
|
|
|
72
72
|
ItemCompleted = "completed",
|
|
73
73
|
ItemFailed = "failed",
|
|
74
74
|
ItemUpdated = "updated",
|
|
75
|
+
/** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
|
|
76
|
+
* Planned to be removed in 256 (W-16217436) */
|
|
75
77
|
QueueStarted = "started",
|
|
78
|
+
/** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
|
|
79
|
+
* Planned to be removed in 256 (W-16217436) */
|
|
76
80
|
QueueStopped = "stopped",
|
|
77
|
-
|
|
81
|
+
/** @since 252 */
|
|
82
|
+
QueueStateChanged = "queueStateChanged"
|
|
78
83
|
}
|
|
79
84
|
/**
|
|
80
85
|
* A closure that draft queue change listeners pass to
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-drafts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.307.0",
|
|
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.3",
|
|
28
28
|
"@luvio/environments": "0.156.3",
|
|
29
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
29
|
+
"@salesforce/lds-utils-adapters": "^1.307.0"
|
|
30
30
|
},
|
|
31
31
|
"volta": {
|
|
32
32
|
"extends": "../../package.json"
|