@spiffcommerce/core 27.2.0 → 27.2.1-beta.0e36ff9d-5cc0-5085-abc6-bbccac541a12
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 +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8437,14 +8437,17 @@ class ws {
|
|
|
8437
8437
|
const jn = new ws();
|
|
8438
8438
|
class ys {
|
|
8439
8439
|
async init(t, e, a) {
|
|
8440
|
+
console.log("LOG: q init");
|
|
8440
8441
|
const n = t.option;
|
|
8441
8442
|
if (!n)
|
|
8442
|
-
return null;
|
|
8443
|
+
return console.log("LOG: q no option"), null;
|
|
8443
8444
|
if (a)
|
|
8444
|
-
await this.reload(t, e, a);
|
|
8445
|
+
console.log("LOG: q reload"), await this.reload(t, e, a);
|
|
8445
8446
|
else {
|
|
8447
|
+
console.log("LOG: q no reload");
|
|
8446
8448
|
const i = n.variants;
|
|
8447
8449
|
if (Y.getDefaultVariant(n)) {
|
|
8450
|
+
console.log("LOG: q default");
|
|
8448
8451
|
const o = i == null ? void 0 : i.find((l) => {
|
|
8449
8452
|
var c;
|
|
8450
8453
|
return l.id === ((c = n.defaultVariant) == null ? void 0 : c.id);
|
|
@@ -8452,7 +8455,7 @@ class ys {
|
|
|
8452
8455
|
return this.selectVariantLambda(t, (o == null ? void 0 : o.id) || "", e);
|
|
8453
8456
|
}
|
|
8454
8457
|
}
|
|
8455
|
-
return null;
|
|
8458
|
+
return console.log("LOG: q end"), null;
|
|
8456
8459
|
}
|
|
8457
8460
|
async reload(t, e, a) {
|
|
8458
8461
|
var s;
|
|
@@ -12513,7 +12516,7 @@ class Oo {
|
|
|
12513
12516
|
}
|
|
12514
12517
|
async assignCustomerDetails(t) {
|
|
12515
12518
|
var n, i, s;
|
|
12516
|
-
const a = (s = (i = (n = (await
|
|
12519
|
+
const a = (s = (i = (n = (await this.graphQlClient().mutate({
|
|
12517
12520
|
mutation: To,
|
|
12518
12521
|
variables: {
|
|
12519
12522
|
id: this.getWorkflowManager().getTransaction().id,
|
|
@@ -14850,15 +14853,16 @@ class Je {
|
|
|
14850
14853
|
}
|
|
14851
14854
|
async applyGlobalPropertyState(t) {
|
|
14852
14855
|
var a;
|
|
14853
|
-
const e = await this.
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
14857
|
-
|
|
14856
|
+
const e = await this.globalPropertyHandleService.getHandles();
|
|
14857
|
+
console.log(`LOG: ${e.length} handles`);
|
|
14858
|
+
for (const n of t.aspects) {
|
|
14859
|
+
const i = n == null ? void 0 : n.name, s = e.find((o) => o.getName() === i);
|
|
14860
|
+
if (console.log(`LOG: handle for ${i}? ${s}`), s)
|
|
14861
|
+
switch (n.type) {
|
|
14858
14862
|
case z.FileUpload: {
|
|
14859
|
-
const o =
|
|
14863
|
+
const o = s, l = await ve([n.value]);
|
|
14860
14864
|
l.length > 0 && await o.selectImage(l[0]);
|
|
14861
|
-
const c = (a =
|
|
14865
|
+
const c = (a = n.storage) == null ? void 0 : a.colors;
|
|
14862
14866
|
if (c) {
|
|
14863
14867
|
const d = Object.fromEntries(
|
|
14864
14868
|
c.map((A) => [A.key, { browserValue: A.browserValue, pmsValue: A.pmsValue }]) ?? []
|
|
@@ -14868,21 +14872,21 @@ class Je {
|
|
|
14868
14872
|
break;
|
|
14869
14873
|
}
|
|
14870
14874
|
case z.ColorOption: {
|
|
14871
|
-
const o =
|
|
14872
|
-
if (
|
|
14873
|
-
const c = o.getAllVariants().find((d) => d.getId() ===
|
|
14875
|
+
const o = s;
|
|
14876
|
+
if (n.type === z.ColorOption) {
|
|
14877
|
+
const c = o.getAllVariants().find((d) => d.getId() === n.value);
|
|
14874
14878
|
c && await o.selectVariant(c);
|
|
14875
14879
|
} else
|
|
14876
|
-
o.setCustomColor(
|
|
14880
|
+
o.setCustomColor(n.value);
|
|
14877
14881
|
break;
|
|
14878
14882
|
}
|
|
14879
14883
|
case z.Option: {
|
|
14880
|
-
const o =
|
|
14881
|
-
c && await o.selectVariant(c);
|
|
14884
|
+
const o = s, c = o.getAllVariants().find((d) => d.getId() === n.value);
|
|
14885
|
+
console.log(`LOG: variant for ${n.value}: ${c}`), c && await o.selectVariant(c);
|
|
14882
14886
|
break;
|
|
14883
14887
|
}
|
|
14884
14888
|
case z.Text: {
|
|
14885
|
-
await
|
|
14889
|
+
await s.setText(n.value);
|
|
14886
14890
|
break;
|
|
14887
14891
|
}
|
|
14888
14892
|
}
|
|
@@ -15900,7 +15904,7 @@ class rd {
|
|
|
15900
15904
|
} catch (a) {
|
|
15901
15905
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15902
15906
|
}
|
|
15903
|
-
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.2.
|
|
15907
|
+
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.2.1-beta.f00f15a6-0222-5820-93a8-912f98bdbdfe"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15904
15908
|
}
|
|
15905
15909
|
configure(t) {
|
|
15906
15910
|
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);
|