@spiffcommerce/core 40.3.10 → 40.3.12
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/CHANGELOG.md +6 -0
- package/dist/{index-DQnieHbr.js → index-C5BLW3rS.js} +35 -27
- package/dist/{index-DQnieHbr.js.map → index-C5BLW3rS.js.map} +1 -1
- package/dist/{index-CLKUSCWu.cjs → index-CafQZysB.cjs} +4 -4
- package/dist/{index-CLKUSCWu.cjs.map → index-CafQZysB.cjs.map} +1 -1
- package/dist/{index-B-huNJvh.cjs → index-Darx-14I.cjs} +2 -2
- package/dist/{index-B-huNJvh.cjs.map → index-Darx-14I.cjs.map} +1 -1
- package/dist/{index-Be2NvJRw.js → index-eRS5bBM0.js} +2 -2
- package/dist/{index-Be2NvJRw.js.map → index-eRS5bBM0.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
14
|
- `Fixed` for any bug fixes.
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
|
+
## [40.3.11] - 20-04-2026
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- If a product collection is assigned to a bundle, products not in the collection will be cleared from the bundle.
|
|
22
|
+
|
|
17
23
|
## [40.3.10] - 17-04-2026
|
|
18
24
|
|
|
19
25
|
### Fixed
|
|
@@ -69300,7 +69300,7 @@ class eE {
|
|
|
69300
69300
|
if (t.data?.bundleAssignProductCollection.productCollection) {
|
|
69301
69301
|
this.productCollection = t.data.bundleAssignProductCollection.productCollection;
|
|
69302
69302
|
const n = t.data.bundleAssignProductCollection.productCollection.globalPropertyConfiguration;
|
|
69303
|
-
this.globalPropertyStateManager.setConfiguration(n), await this.globalPropertyHandleService.getHandles(), this.globalConfigurationPropertyId = n?.id;
|
|
69303
|
+
this.globalPropertyStateManager.setConfiguration(n), await this.globalPropertyHandleService.getHandles(), this.globalConfigurationPropertyId = n?.id, await this.clearOldProducts(this.workflowExperiences);
|
|
69304
69304
|
}
|
|
69305
69305
|
}
|
|
69306
69306
|
onModelLoadEvent(e) {
|
|
@@ -69330,19 +69330,23 @@ class eE {
|
|
|
69330
69330
|
), i.forEach((a) => a.setBundle(this)), i.forEach((a) => a.checkForPriceBreakChanges()), this.workflowExperiences = i, this.previewService))
|
|
69331
69331
|
for (const a of i)
|
|
69332
69332
|
await this.injectExperienceIntoPreviewService(a);
|
|
69333
|
+
await this.clearOldProducts(i);
|
|
69334
|
+
}
|
|
69335
|
+
// Remove products from bundle that aren't in the collection.
|
|
69336
|
+
async clearOldProducts(e) {
|
|
69333
69337
|
if (!this.globalPropertyStateManager.getBundleOptions()?.readonly) {
|
|
69334
|
-
const
|
|
69335
|
-
if (
|
|
69336
|
-
await
|
|
69337
|
-
const
|
|
69338
|
-
for (const
|
|
69339
|
-
if (!
|
|
69340
|
-
for (const
|
|
69341
|
-
|
|
69342
|
-
|
|
69338
|
+
const t = this.getProductIds() || [], n = this.getProductCollection();
|
|
69339
|
+
if (n && t.length > 0) {
|
|
69340
|
+
await n.fetchProducts();
|
|
69341
|
+
const i = n.getProducts(), a = [], s = [];
|
|
69342
|
+
for (const l of t)
|
|
69343
|
+
if (!i.find((c) => c.getId() === l)) {
|
|
69344
|
+
for (const c of e)
|
|
69345
|
+
c.getProduct()?.id === l && s.push(c);
|
|
69346
|
+
a.push(l);
|
|
69343
69347
|
}
|
|
69344
|
-
const
|
|
69345
|
-
|
|
69348
|
+
const o = [];
|
|
69349
|
+
a.length > 0 && o.push(this.removeProductIds(a)), s.length > 0 && o.push(Promise.all(s.map((l) => l.clearProduct()))), o.length > 0 && await Promise.all(o);
|
|
69346
69350
|
}
|
|
69347
69351
|
}
|
|
69348
69352
|
}
|
|
@@ -70952,7 +70956,7 @@ class fV extends cV {
|
|
|
70952
70956
|
});
|
|
70953
70957
|
}
|
|
70954
70958
|
async loadEventStreamCapability() {
|
|
70955
|
-
const { EventStreamSerde: e } = await import("./index-
|
|
70959
|
+
const { EventStreamSerde: e } = await import("./index-eRS5bBM0.js");
|
|
70956
70960
|
return new e({
|
|
70957
70961
|
marshaller: this.getEventStreamMarshaller(),
|
|
70958
70962
|
serializer: this.serializer,
|
|
@@ -78515,7 +78519,7 @@ class AW {
|
|
|
78515
78519
|
} catch (n) {
|
|
78516
78520
|
throw console.error(n), new oo("Critical - Unable to synchronize workflow state with server.");
|
|
78517
78521
|
}
|
|
78518
|
-
}, this.options = e, this.options.applicationKey && j4(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 40.3.
|
|
78522
|
+
}, this.options = e, this.options.applicationKey && j4(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 40.3.11"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
78519
78523
|
}
|
|
78520
78524
|
configure(e) {
|
|
78521
78525
|
go.setHubUrl(e.hubUrl), go.setServerUrl(e.serverUrl), go.setServicesApiUrl(e.servicesApiUrl), this.marketplaceThemeInstallId = e.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = e.marketplaceThemeInstallConfigurationId, this.userPoolClientId = e.userPoolClientId, this.userPoolRegion = e.userPoolRegion, this.spiffRegion = e.spiffRegion, e.bearerAuthenticationToken && $4(e.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Pf.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
|
@@ -79370,18 +79374,22 @@ class hQ {
|
|
|
79370
79374
|
const s = this.workflowManager.getRegionElements(this.stepName || ""), o = this.workflowManager.getCommandDispatcher();
|
|
79371
79375
|
this.targetElements.forEach((l, u) => {
|
|
79372
79376
|
let c = s.find((h) => h.id === l)?.regionIndex ?? u;
|
|
79373
|
-
c >= e.length && (c = u)
|
|
79374
|
-
|
|
79375
|
-
|
|
79376
|
-
new
|
|
79377
|
-
l,
|
|
79378
|
-
|
|
79379
|
-
|
|
79380
|
-
|
|
79381
|
-
|
|
79382
|
-
|
|
79383
|
-
|
|
79384
|
-
|
|
79377
|
+
c >= e.length && (c = u);
|
|
79378
|
+
try {
|
|
79379
|
+
o(
|
|
79380
|
+
new _n([
|
|
79381
|
+
new QN(l, t, e[c]),
|
|
79382
|
+
new WN(
|
|
79383
|
+
l,
|
|
79384
|
+
i.useThreshold,
|
|
79385
|
+
i.invertThreshold,
|
|
79386
|
+
i.threshold,
|
|
79387
|
+
i.thresholdSaturation
|
|
79388
|
+
)
|
|
79389
|
+
])
|
|
79390
|
+
);
|
|
79391
|
+
} catch {
|
|
79392
|
+
}
|
|
79385
79393
|
}), this.stepName && this.workflowManager.updateStorage(this.stepName, {
|
|
79386
79394
|
frameOffsetsList: e
|
|
79387
79395
|
}), a && a();
|
|
@@ -80344,4 +80352,4 @@ export {
|
|
|
80344
80352
|
qN as y,
|
|
80345
80353
|
GN as z
|
|
80346
80354
|
};
|
|
80347
|
-
//# sourceMappingURL=index-
|
|
80355
|
+
//# sourceMappingURL=index-C5BLW3rS.js.map
|