@spiffcommerce/core 28.0.1-beta.ac9a049c-ad73-555a-adbf-f7557a7cdbde → 28.0.1-beta.c9d47279-485f-5468-a067-5177a42fb1ae
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.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11468,7 +11468,7 @@ class Bo extends it {
|
|
|
11468
11468
|
*/
|
|
11469
11469
|
async setFillColor(t) {
|
|
11470
11470
|
const e = this.manager.getRegionElements(this.step.stepName);
|
|
11471
|
-
await j.changeFillColor(this.step, t, e, this.manager);
|
|
11471
|
+
console.log(`LOG: changing fill color of step ${this.step.stepTitle} (${this.step.stepName}) with ${e.length} elements to ${t}`), await j.changeFillColor(this.step, t, e, this.manager);
|
|
11472
11472
|
}
|
|
11473
11473
|
/**
|
|
11474
11474
|
* Gets the color currently applied to the element.
|
|
@@ -13492,17 +13492,15 @@ class Ia {
|
|
|
13492
13492
|
* @param targetExperiences Optionally filter the steps to only those in the given experiences.
|
|
13493
13493
|
*/
|
|
13494
13494
|
getSharedSteps(t) {
|
|
13495
|
-
return (t ?? this.bundle.getWorkflowExperiences()).flatMap(
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
|
|
13503
|
-
|
|
13504
|
-
})
|
|
13505
|
-
);
|
|
13495
|
+
return (t ?? this.bundle.getWorkflowExperiences()).flatMap((n) => n.getSteps().filter((s) => {
|
|
13496
|
+
var o;
|
|
13497
|
+
return s.getOverrideGlobalPropertyConfiguration(this.property.type) ? !1 : (o = s.getRaw().globalPropertyAspectConfigurations) == null ? void 0 : o.some(
|
|
13498
|
+
(l) => {
|
|
13499
|
+
var c, d;
|
|
13500
|
+
return l.globalPropertyConfigurationId === ((d = (c = this.bundle.getProductCollection()) == null ? void 0 : c.getResource().globalPropertyConfiguration) == null ? void 0 : d.id) && l.aspectName === this.property.name;
|
|
13501
|
+
}
|
|
13502
|
+
);
|
|
13503
|
+
}));
|
|
13506
13504
|
}
|
|
13507
13505
|
getStateValue() {
|
|
13508
13506
|
return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);
|
|
@@ -13869,6 +13867,7 @@ class Ja extends Zn {
|
|
|
13869
13867
|
}
|
|
13870
13868
|
async applyGlobalState(t) {
|
|
13871
13869
|
var i, s, o;
|
|
13870
|
+
console.log(`LOG: applying global state for color ${this.property.name}`);
|
|
13872
13871
|
const e = this.getStateValue();
|
|
13873
13872
|
if (!e)
|
|
13874
13873
|
return Promise.resolve();
|
|
@@ -13877,11 +13876,13 @@ class Ja extends Zn {
|
|
|
13877
13876
|
return Promise.resolve();
|
|
13878
13877
|
await this.applyColorVariant(new st(a), t);
|
|
13879
13878
|
const n = (o = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)) == null ? void 0 : o.customColor;
|
|
13880
|
-
n && this.setCustomColor(n);
|
|
13879
|
+
console.log(`LOG: custom color ${n}`), n && this.setCustomColor(n);
|
|
13881
13880
|
}
|
|
13882
13881
|
async applyColorVariant(t, e, a) {
|
|
13883
|
-
const
|
|
13884
|
-
|
|
13882
|
+
const n = this.getSharedSteps(e);
|
|
13883
|
+
console.log(`LOG: applying color variant for ${n.length} shared steps`);
|
|
13884
|
+
const i = n.map((s) => {
|
|
13885
|
+
switch (console.log(`LOG: applying to step type ${s.getType()}`), s.getType()) {
|
|
13885
13886
|
case P.Shape:
|
|
13886
13887
|
return s.selectVariant(t);
|
|
13887
13888
|
case P.Text:
|
|
@@ -15992,7 +15993,7 @@ class Ad {
|
|
|
15992
15993
|
} catch (a) {
|
|
15993
15994
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15994
15995
|
}
|
|
15995
|
-
}, this.options = t, this.options.applicationKey && $r(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 28.0.1-beta.
|
|
15996
|
+
}, this.options = t, this.options.applicationKey && $r(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 28.0.1-beta.10d96995-f841-5fe3-9e44-7c0791da863a"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15996
15997
|
}
|
|
15997
15998
|
configure(t) {
|
|
15998
15999
|
mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.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 && Lr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|