@spiffcommerce/core 27.2.0 → 27.2.1-beta.9303d634-cb1d-5844-a597-a4e69b0192f5
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/CHANGELOG.md +10 -4
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12513,7 +12513,7 @@ class Oo {
|
|
|
12513
12513
|
}
|
|
12514
12514
|
async assignCustomerDetails(t) {
|
|
12515
12515
|
var n, i, s;
|
|
12516
|
-
const a = (s = (i = (n = (await
|
|
12516
|
+
const a = (s = (i = (n = (await this.graphQlClient().mutate({
|
|
12517
12517
|
mutation: To,
|
|
12518
12518
|
variables: {
|
|
12519
12519
|
id: this.getWorkflowManager().getTransaction().id,
|
|
@@ -14851,19 +14851,20 @@ class Je {
|
|
|
14851
14851
|
async applyGlobalPropertyState(t) {
|
|
14852
14852
|
var a;
|
|
14853
14853
|
const e = await this.getGlobalProperties();
|
|
14854
|
+
console.log(`STATE LOG: applying state for ${e.length} handles`);
|
|
14854
14855
|
for (const n of e) {
|
|
14855
14856
|
const i = n.getName(), s = t.aspects.find((o) => o.name === i);
|
|
14856
|
-
if (s)
|
|
14857
|
+
if (console.log(`STATE LOG: handle ${i}, type ${s == null ? void 0 : s.type}, aspect ${s}`), s)
|
|
14857
14858
|
switch (s.type) {
|
|
14858
14859
|
case z.FileUpload: {
|
|
14859
14860
|
const o = n, l = await ve([s.value]);
|
|
14860
|
-
l.length > 0 && await o.selectImage(l[0]);
|
|
14861
|
+
l.length > 0 && (await o.selectImage(l[0]), console.log("STATE LOG: upload image"));
|
|
14861
14862
|
const c = (a = s.storage) == null ? void 0 : a.colors;
|
|
14862
14863
|
if (c) {
|
|
14863
14864
|
const d = Object.fromEntries(
|
|
14864
14865
|
c.map((A) => [A.key, { browserValue: A.browserValue, pmsValue: A.pmsValue }]) ?? []
|
|
14865
14866
|
);
|
|
14866
|
-
await o.changeColors(d);
|
|
14867
|
+
await o.changeColors(d), console.log("STATE LOG: upload colors");
|
|
14867
14868
|
}
|
|
14868
14869
|
break;
|
|
14869
14870
|
}
|
|
@@ -14871,18 +14872,18 @@ class Je {
|
|
|
14871
14872
|
const o = n;
|
|
14872
14873
|
if (s.type === z.ColorOption) {
|
|
14873
14874
|
const c = o.getAllVariants().find((d) => d.getId() === s.value);
|
|
14874
|
-
c && await o.selectVariant(c);
|
|
14875
|
+
c && (await o.selectVariant(c), console.log("STATE LOG: color option"));
|
|
14875
14876
|
} else
|
|
14876
|
-
o.setCustomColor(s.value);
|
|
14877
|
+
o.setCustomColor(s.value), console.log("STATE LOG: colors");
|
|
14877
14878
|
break;
|
|
14878
14879
|
}
|
|
14879
14880
|
case z.Option: {
|
|
14880
14881
|
const o = n, c = o.getAllVariants().find((d) => d.getId() === s.value);
|
|
14881
|
-
c && await o.selectVariant(c);
|
|
14882
|
+
c && (await o.selectVariant(c), console.log("STATE LOG: option"));
|
|
14882
14883
|
break;
|
|
14883
14884
|
}
|
|
14884
14885
|
case z.Text: {
|
|
14885
|
-
await n.setText(s.value);
|
|
14886
|
+
await n.setText(s.value), console.log("STATE LOG: text");
|
|
14886
14887
|
break;
|
|
14887
14888
|
}
|
|
14888
14889
|
}
|
|
@@ -15900,7 +15901,7 @@ class rd {
|
|
|
15900
15901
|
} catch (a) {
|
|
15901
15902
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15902
15903
|
}
|
|
15903
|
-
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.2.
|
|
15904
|
+
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.2.1"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15904
15905
|
}
|
|
15905
15906
|
configure(t) {
|
|
15906
15907
|
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 && $r(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|