@salesforce/lds-drafts 1.342.0 → 1.343.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 CHANGED
@@ -1030,13 +1030,6 @@ var DraftQueueOperationType;
1030
1030
  DraftQueueOperationType["ItemCompleted"] = "completed";
1031
1031
  DraftQueueOperationType["ItemFailed"] = "failed";
1032
1032
  DraftQueueOperationType["ItemUpdated"] = "updated";
1033
- /** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
1034
- * Planned to be removed in 256 (W-16217436) */
1035
- DraftQueueOperationType["QueueStarted"] = "started";
1036
- /** @deprecated in 252. All Queue state changed events are consolidated in QueueStateChanged
1037
- * Planned to be removed in 256 (W-16217436) */
1038
- DraftQueueOperationType["QueueStopped"] = "stopped";
1039
- /** @since 252 */
1040
1033
  DraftQueueOperationType["QueueStateChanged"] = "queueStateChanged";
1041
1034
  })(DraftQueueOperationType || (DraftQueueOperationType = {}));
1042
1035
  /**
@@ -1120,16 +1113,6 @@ class DraftManager {
1120
1113
  throw Error('Unsupported event type');
1121
1114
  }
1122
1115
  }
1123
- draftQueueStateToOperationType(state) {
1124
- switch (state) {
1125
- case DraftQueueState.Started:
1126
- return DraftQueueOperationType.QueueStarted;
1127
- case DraftQueueState.Stopped:
1128
- return DraftQueueOperationType.QueueStopped;
1129
- default:
1130
- throw Error('Unsupported event type');
1131
- }
1132
- }
1133
1116
  /**
1134
1117
  * Enqueue a custom action on the DraftQueue for a handler
1135
1118
  * @param handler the handler's id
@@ -1191,8 +1174,7 @@ class DraftManager {
1191
1174
  *
1192
1175
  * @param listener The listener closure to subscribe to changes
1193
1176
  */
1194
- registerDraftQueueChangedListener(listener, version = undefined) {
1195
- this.listenerVersion = version;
1177
+ registerDraftQueueChangedListener(listener, _version = undefined) {
1196
1178
  this.listeners.push(listener);
1197
1179
  return () => {
1198
1180
  this.listeners = this.listeners.filter((l) => {
@@ -1308,12 +1290,7 @@ class DraftManager {
1308
1290
  const managerState = await this.getQueue();
1309
1291
  let operationType, item;
1310
1292
  if (isDraftQueueStateChangeEvent(event)) {
1311
- if (this.listenerVersion === undefined) {
1312
- operationType = this.draftQueueStateToOperationType(event.state);
1313
- }
1314
- else {
1315
- operationType = DraftQueueOperationType.QueueStateChanged;
1316
- }
1293
+ operationType = DraftQueueOperationType.QueueStateChanged;
1317
1294
  }
1318
1295
  else {
1319
1296
  const { action, type } = event;
@@ -72,13 +72,6 @@ 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) */
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) */
80
- QueueStopped = "stopped",
81
- /** @since 252 */
82
75
  QueueStateChanged = "queueStateChanged"
83
76
  }
84
77
  /**
@@ -89,12 +82,10 @@ export declare type DraftQueueListener = (state: DraftManagerState, operationTyp
89
82
  export declare class DraftManager {
90
83
  private draftQueue;
91
84
  private listeners;
92
- private listenerVersion;
93
85
  private draftEventsShouldBeEmitted;
94
86
  private shouldEmitEvent;
95
87
  constructor(draftQueue: DraftQueue);
96
88
  private draftQueueEventTypeToOperationType;
97
- private draftQueueStateToOperationType;
98
89
  /**
99
90
  * Enqueue a custom action on the DraftQueue for a handler
100
91
  * @param handler the handler's id
@@ -132,7 +123,7 @@ export declare class DraftManager {
132
123
  *
133
124
  * @param listener The listener closure to subscribe to changes
134
125
  */
135
- registerDraftQueueChangedListener(listener: DraftQueueListener, version?: 252 | undefined): () => Promise<void>;
126
+ registerDraftQueueChangedListener(listener: DraftQueueListener, _version?: 252 | undefined): () => Promise<void>;
136
127
  /**
137
128
  * Creates a custom action handler for the given handler
138
129
  * @param handlerId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-drafts",
3
- "version": "1.342.0",
3
+ "version": "1.343.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS Drafts",
6
6
  "main": "dist/ldsDrafts.js",
@@ -26,10 +26,10 @@
26
26
  "dependencies": {
27
27
  "@luvio/engine": "0.156.5",
28
28
  "@luvio/environments": "0.156.5",
29
- "@salesforce/lds-utils-adapters": "^1.342.0"
29
+ "@salesforce/lds-utils-adapters": "^1.343.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@salesforce/nimbus-plugin-lds": "^1.342.0"
32
+ "@salesforce/nimbus-plugin-lds": "^1.343.0"
33
33
  },
34
34
  "volta": {
35
35
  "extends": "../../package.json"