@spiffcommerce/core 22.13.2 → 22.13.3

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 CHANGED
@@ -9119,22 +9119,15 @@ class vn extends X {
9119
9119
  * throw when a non-custom variant is selected.
9120
9120
  */
9121
9121
  setCustomColor(e) {
9122
- var t;
9123
- if (((t = this.getCurrentVariant()) == null ? void 0 : t.getColor()) !== "#custom")
9124
- throw new Error(
9125
- "Custom colors can only be set on a non-custom variant. Please add a custom variant to the step."
9126
- );
9127
- return Ee.setCustomColor(e, this.step, this.manager);
9122
+ var t, A;
9123
+ return ((t = this.getCurrentVariant()) == null ? void 0 : t.getColor()) !== "#custom" && console.warn(`setting custom color for step ${this.step.stepName} but color is ${(A = this.getCurrentVariant()) == null ? void 0 : A.getColor()}`), Ee.setCustomColor(e, this.step, this.manager);
9128
9124
  }
9129
9125
  getCustomColor() {
9130
- var t, A;
9131
- const e = (t = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : t.colour;
9132
- if (((A = this.getCurrentVariant()) == null ? void 0 : A.getColor()) !== "#custom")
9133
- throw new Error(
9134
- "Custom colors can only be set on a non-custom variant. Please add a custom variant to the step."
9135
- );
9126
+ var t, A, a;
9127
+ ((t = this.getCurrentVariant()) == null ? void 0 : t.getColor()) !== "#custom" && console.warn(`setting custom color for step ${this.step.stepName} but color is ${(A = this.getCurrentVariant()) == null ? void 0 : A.getColor()}`);
9128
+ const e = (a = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : a.colour;
9136
9129
  if (!e)
9137
- throw new Error("Color not available on step. Set a default on the workflow to fix this.");
9130
+ throw new Error(`Color not available on step ${this.step.stepName}. Set a default on the workflow to fix this.`);
9138
9131
  return e;
9139
9132
  }
9140
9133
  }
@@ -11875,18 +11868,21 @@ class vi {
11875
11868
  variables: {
11876
11869
  id: this.globalPropertyState.id,
11877
11870
  aspects: this.globalPropertyState.aspects.map((a) => {
11878
- const n = a.type && a.storage ? {} : void 0;
11871
+ let n = a.type && a.storage ? {} : void 0;
11879
11872
  if (n)
11880
11873
  switch (a.type) {
11881
11874
  case $.FileUpload: {
11882
11875
  n.fileUpload = a.storage;
11883
11876
  break;
11884
11877
  }
11885
- case $.Option:
11886
- case $.ColorOption: {
11878
+ case $.Option: {
11887
11879
  n.option = a.storage;
11888
11880
  break;
11889
11881
  }
11882
+ case $.ColorOption: {
11883
+ n = a.storage;
11884
+ break;
11885
+ }
11890
11886
  }
11891
11887
  return {
11892
11888
  name: a.name,
@@ -13722,7 +13718,7 @@ class ss {
13722
13718
  } catch (A) {
13723
13719
  throw console.error(A), new H("Critical - Unable to synchronize workflow state with server.");
13724
13720
  }
13725
- }, this.initialized = !1, this.options = e, this.options.applicationKey && ca(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 22.13.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
13721
+ }, this.initialized = !1, this.options = e, this.options.applicationKey && ca(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 22.13.3"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
13726
13722
  }
13727
13723
  /** @deprecated Use `configure` instead */
13728
13724
  configureUrls(e, t, A) {