@spiffcommerce/core 32.2.4-beta.9da300ae-589f-5e7b-a3be-8260e47d3e47 → 32.2.4-beta.dc196f53-5f18-5038-aa12-74b58d514361
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 +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11347,6 +11347,7 @@ class xo extends Z {
|
|
|
11347
11347
|
super(t, e, a);
|
|
11348
11348
|
}
|
|
11349
11349
|
selectVariant(t) {
|
|
11350
|
+
console.log("setting shape variant");
|
|
11350
11351
|
const e = t.getResource();
|
|
11351
11352
|
return zt.selectVariant(
|
|
11352
11353
|
this.step,
|
|
@@ -11366,7 +11367,7 @@ class xo extends Z {
|
|
|
11366
11367
|
* @deprecated The shape step can now pass through colors returned by getColors via selectVariant. Please swap setColor for selectVariant.
|
|
11367
11368
|
*/
|
|
11368
11369
|
setColor(t) {
|
|
11369
|
-
return zt.selectVariant(
|
|
11370
|
+
return console.log("setting shape color variant"), zt.selectVariant(
|
|
11370
11371
|
this.step,
|
|
11371
11372
|
t,
|
|
11372
11373
|
this.manager.getRegionElements(this.step.stepName) || [],
|
|
@@ -11385,12 +11386,19 @@ class xo extends Z {
|
|
|
11385
11386
|
* throw when a non-custom variant is selected.
|
|
11386
11387
|
*/
|
|
11387
11388
|
setCustomColor(t) {
|
|
11388
|
-
return this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
|
|
11389
|
+
return console.log("setting shape variant custom"), this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
|
|
11390
|
+
`setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`
|
|
11391
|
+
), zt.setCustomColor(t, this.step, this.manager);
|
|
11389
11392
|
}
|
|
11390
11393
|
getCustomColor() {
|
|
11391
|
-
this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
|
|
11394
|
+
this.getCurrentVariant()?.getColor() !== "#custom" && console.warn(
|
|
11395
|
+
`setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`
|
|
11396
|
+
);
|
|
11392
11397
|
const t = this.manager.getStepStorage(this.step.stepName)?.colour;
|
|
11393
|
-
if (!t)
|
|
11398
|
+
if (!t)
|
|
11399
|
+
throw new Error(
|
|
11400
|
+
`Color not available on step ${this.step.stepName}. Set a default on the workflow to fix this.`
|
|
11401
|
+
);
|
|
11394
11402
|
return t;
|
|
11395
11403
|
}
|
|
11396
11404
|
}
|
|
@@ -13862,7 +13870,7 @@ class Za extends nr {
|
|
|
13862
13870
|
* Sets a custom color on the global state.
|
|
13863
13871
|
*/
|
|
13864
13872
|
setCustomColor(t) {
|
|
13865
|
-
this.getSharedSteps().forEach((a) => a.setCustomColor(t)), this.bundle.getGlobalPropertyStateManager().setAspectStorage(this.property.name, { customColor: t });
|
|
13873
|
+
this.getCurrentVariant()?.getColor() && this.getCurrentVariant().getColor().toLowerCase() === "#custom" && this.getSharedSteps().forEach((a) => a.setCustomColor(t)), this.bundle.getGlobalPropertyStateManager().setAspectStorage(this.property.name, { customColor: t });
|
|
13866
13874
|
}
|
|
13867
13875
|
/**
|
|
13868
13876
|
* Gets the custom color used by the global state.
|
|
@@ -14882,7 +14890,9 @@ class Ze {
|
|
|
14882
14890
|
}
|
|
14883
14891
|
case U.ColorOption: {
|
|
14884
14892
|
const s = i, l = s.getAllVariants().find((c) => c.getId() === a.value);
|
|
14885
|
-
l && await s.selectVariant(l), a.storage && a.storage.customColor && s.setCustomColor(
|
|
14893
|
+
l && await s.selectVariant(l), a.storage && a.storage.customColor && s.setCustomColor(
|
|
14894
|
+
a.storage.customColor
|
|
14895
|
+
);
|
|
14886
14896
|
break;
|
|
14887
14897
|
}
|
|
14888
14898
|
case U.Option: {
|
|
@@ -15995,7 +16005,7 @@ class vd {
|
|
|
15995
16005
|
} catch (a) {
|
|
15996
16006
|
throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
|
|
15997
16007
|
}
|
|
15998
|
-
}, this.options = t, this.options.applicationKey && Wr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 32.2.4-beta.
|
|
16008
|
+
}, this.options = t, this.options.applicationKey && Wr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 32.2.4-beta.69c3a90e-c69d-5222-bce0-3d9f2163c2ae"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15999
16009
|
}
|
|
16000
16010
|
configure(t) {
|
|
16001
16011
|
gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.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);
|