@spiffcommerce/core 33.13.5-beta.bf9e6812-4b7d-59ec-92d3-64859ca497f4 → 34.0.0-beta.8c15a292-be1c-5189-8ed3-cbd0b34cfa6e

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.mjs CHANGED
@@ -11415,13 +11415,13 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
11415
11415
  return JSON.stringify(a, this.sortKeysReplacer, void 0);
11416
11416
  }
11417
11417
  async getStateHash() {
11418
- const e = this.getCommandContext().getAllLayouts().map((r) => r.layoutState.modificationID || "").sort().join(""), i = new TextEncoder().encode(e);
11418
+ const t = this.getCommandContext().getState(), a = Object.values(t?.transaction.layouts || {}).map((o) => o.modificationID ?? "").sort().join(""), r = new TextEncoder().encode(a);
11419
11419
  if (typeof window < "u" && window.crypto && window.crypto.subtle && window.crypto.subtle.digest) {
11420
- const r = await window.crypto.subtle.digest("SHA-256", i);
11421
- return Array.from(new Uint8Array(r)).map((l) => l.toString(16).padStart(2, "0")).join("");
11420
+ const o = await window.crypto.subtle.digest("SHA-256", r);
11421
+ return Array.from(new Uint8Array(o)).map((c) => c.toString(16).padStart(2, "0")).join("");
11422
11422
  }
11423
11423
  try {
11424
- return (await import("crypto")).createHash("sha256").update(e, "utf8").digest("hex");
11424
+ return (await import("crypto")).createHash("sha256").update(a, "utf8").digest("hex");
11425
11425
  } catch {
11426
11426
  throw new Error("Unable to compute SHA-256 hash: no suitable crypto implementation available.");
11427
11427
  }
@@ -12203,6 +12203,7 @@ class cl extends tt {
12203
12203
  * @param userInput Input from the user.
12204
12204
  */
12205
12205
  setText(t) {
12206
+ console.log(`LOG: setting text to ${t}`);
12206
12207
  const e = {
12207
12208
  input: t,
12208
12209
  helperData: {}
@@ -12215,10 +12216,10 @@ class cl extends tt {
12215
12216
  this.step.data,
12216
12217
  c?.customiseAllText ?? !1
12217
12218
  );
12218
- if (s)
12219
+ if (console.log("LOG: setText 2"), s)
12219
12220
  o || this.manager.updateMetadata(this.step.stepName, {
12220
12221
  text: d
12221
- });
12222
+ }), console.log("LOG: setText regionless");
12222
12223
  else {
12223
12224
  const { command: A, errorData: u, helperData: h } = H.updateInputText(
12224
12225
  i,
@@ -12228,9 +12229,9 @@ class cl extends tt {
12228
12229
  );
12229
12230
  A && this.manager.getCommandDispatcher()(A), e.helperData = h, e.errorData = u, !o && !u && this.manager.updateMetadata(this.step.stepName, {
12230
12231
  text: d
12231
- });
12232
+ }), console.log("LOG: setText 3");
12232
12233
  }
12233
- return e;
12234
+ return console.log("LOG: setText 4"), e;
12234
12235
  }
12235
12236
  /**
12236
12237
  * Gets the text currently applied to the elements of this step.
@@ -16122,7 +16123,7 @@ class Rd {
16122
16123
  } catch (a) {
16123
16124
  throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
16124
16125
  }
16125
- }, this.options = t, this.options.applicationKey && ar(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.13.5"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16126
+ }, this.options = t, this.options.applicationKey && ar(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16126
16127
  }
16127
16128
  configure(t) {
16128
16129
  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 && ir(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);