@spiffcommerce/core 32.4.0-beta.363e50d8-0581-5d51-b4bf-cf795131d06b → 32.4.0-beta.6d92b322-020c-59a4-a579-c88f99c2e235
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/index.d.ts +1 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -13493,9 +13493,6 @@ class Da {
|
|
13493
13493
|
isMandatoryFulfilled() {
|
13494
13494
|
return !this.property.mandatory || !!this.bundle.getGlobalPropertyStateManager().getAspectMandatoryFulfilled(this.property.name);
|
13495
13495
|
}
|
13496
|
-
clear() {
|
13497
|
-
this.bundle.getGlobalPropertyStateManager().clearAspect(this.property.name);
|
13498
|
-
}
|
13499
13496
|
/**
|
13500
13497
|
* Returns all steps that share this property.
|
13501
13498
|
* @param targetExperiences Optionally filter the steps to only those in the given experiences.
|
@@ -13938,11 +13935,11 @@ class yl {
|
|
13938
13935
|
console.log("Setting global property state to new state."), this.globalPropertyState = ue(s), this.recalculateMandatoryStates();
|
13939
13936
|
}), this.onGlobalPropertyStateChange = r;
|
13940
13937
|
}
|
13941
|
-
async
|
13938
|
+
async clearAspects(t) {
|
13942
13939
|
if (!this.globalPropertyState)
|
13943
13940
|
throw new Error("Global property state not initialized");
|
13944
13941
|
const e = this.globalPropertyState.aspects, a = ht(this.globalPropertyState);
|
13945
|
-
this.globalPropertyState.aspects = e.filter((r) => r.name
|
13942
|
+
this.globalPropertyState.aspects = e.filter((r) => !t.includes(r.name)), !Wt(a, this.globalPropertyState) && (await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(a, this.globalPropertyState));
|
13946
13943
|
}
|
13947
13944
|
recalculateMandatoryStates() {
|
13948
13945
|
this.mandatoryFulfilledAspects = rr(this.globalPropertyState);
|
@@ -15384,16 +15381,19 @@ class Ze {
|
|
15384
15381
|
return;
|
15385
15382
|
const a = await this.globalPropertyHandleService.getHandles(), r = this.globalPropertyHandleService.applyConditionsFromState(a, t), i = this.globalPropertyHandleService.applyConditionsFromState(a, e);
|
15386
15383
|
this.checkConditionalHandlesChanged(r, i), this.checkMandatoryHandlesChanged(t, i);
|
15387
|
-
const o = a.map((
|
15388
|
-
if (
|
15389
|
-
const
|
15390
|
-
if (!e.aspects.find((
|
15391
|
-
return
|
15384
|
+
const o = a.map((c) => {
|
15385
|
+
if (c.getType() === U.ColorOption || c.getType() === U.Option) {
|
15386
|
+
const d = c;
|
15387
|
+
if (!e.aspects.find((u) => u.name === d.getName()))
|
15388
|
+
return d.initDefaultVariant();
|
15392
15389
|
}
|
15393
15390
|
});
|
15394
|
-
await Promise.all(o)
|
15395
|
-
|
15396
|
-
|
15391
|
+
await Promise.all(o);
|
15392
|
+
const s = this.getGlobalPropertyStateManager();
|
15393
|
+
let l = [];
|
15394
|
+
for (const c of a)
|
15395
|
+
i.find((d) => d.getName() == c.getName()) || (l = [...l, c.getName()]);
|
15396
|
+
await s.clearAspects(l), await Promise.all(i.map((c) => c.applyGlobalState()));
|
15397
15397
|
}
|
15398
15398
|
checkConditionalHandlesChanged(t, e) {
|
15399
15399
|
(() => {
|
@@ -16011,7 +16011,7 @@ class Ed {
|
|
16011
16011
|
} catch (a) {
|
16012
16012
|
throw console.error(a), new mt("Critical - Unable to synchronize workflow state with server.");
|
16013
16013
|
}
|
16014
|
-
}, this.options = t, this.options.applicationKey && Wr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 32.4.0-beta.
|
16014
|
+
}, this.options = t, this.options.applicationKey && Wr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 32.4.0-beta.cd474f46-545e-5665-a996-1f7685b6328c"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
16015
16015
|
}
|
16016
16016
|
configure(t) {
|
16017
16017
|
pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && Hr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|