@spiffcommerce/core 33.13.5-beta.bf9e6812-4b7d-59ec-92d3-64859ca497f4 → 34.0.0-beta.322fa505-3389-5c95-b10a-aa770e6ef11c
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 +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
|
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
|
|
11421
|
-
return Array.from(new Uint8Array(
|
|
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(
|
|
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
|
}
|
|
@@ -12208,29 +12208,21 @@ class cl extends tt {
|
|
|
12208
12208
|
helperData: {}
|
|
12209
12209
|
}, a = H.findLayoutElements(this.manager, this.step), i = H.filterUnsupportedCharacters(t, a[0]?.fontData), r = xt(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
|
|
12210
12210
|
o || (e.input = i);
|
|
12211
|
-
const
|
|
12211
|
+
const l = a.length <= 0 ? { inputText: i, text: i } : { inputText: i };
|
|
12212
12212
|
this.manager.updateStorage(this.step.stepName, l);
|
|
12213
12213
|
const c = this.manager.getStepStorage(this.step.stepName), d = H.getProcessedInput(
|
|
12214
12214
|
i,
|
|
12215
12215
|
this.step.data,
|
|
12216
12216
|
c?.customiseAllText ?? !1
|
|
12217
|
+
), { command: A, errorData: u, helperData: h } = H.updateInputText(
|
|
12218
|
+
i,
|
|
12219
|
+
a,
|
|
12220
|
+
this.step,
|
|
12221
|
+
this.manager
|
|
12217
12222
|
);
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
});
|
|
12222
|
-
else {
|
|
12223
|
-
const { command: A, errorData: u, helperData: h } = H.updateInputText(
|
|
12224
|
-
i,
|
|
12225
|
-
a,
|
|
12226
|
-
this.step,
|
|
12227
|
-
this.manager
|
|
12228
|
-
);
|
|
12229
|
-
A && this.manager.getCommandDispatcher()(A), e.helperData = h, e.errorData = u, !o && !u && this.manager.updateMetadata(this.step.stepName, {
|
|
12230
|
-
text: d
|
|
12231
|
-
});
|
|
12232
|
-
}
|
|
12233
|
-
return e;
|
|
12223
|
+
return A && this.manager.getCommandDispatcher()(A), e.helperData = h, e.errorData = u, !o && !u && this.manager.updateMetadata(this.step.stepName, {
|
|
12224
|
+
text: d
|
|
12225
|
+
}), e;
|
|
12234
12226
|
}
|
|
12235
12227
|
/**
|
|
12236
12228
|
* Gets the text currently applied to the elements of this step.
|
|
@@ -16122,7 +16114,7 @@ class Rd {
|
|
|
16122
16114
|
} catch (a) {
|
|
16123
16115
|
throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
|
|
16124
16116
|
}
|
|
16125
|
-
}, this.options = t, this.options.applicationKey && ar(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version:
|
|
16117
|
+
}, 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
16118
|
}
|
|
16127
16119
|
configure(t) {
|
|
16128
16120
|
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);
|