@spiffcommerce/core 27.3.0-beta.496e85e9-64e7-50d6-b532-939e82cd6b86 → 27.3.0-beta.525d3b80-811f-54ad-924f-79a50e9b6e91
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 +84 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9117,7 +9117,7 @@ class xs {
|
|
|
9117
9117
|
return f.type === j.Text && ((C = t.globalPropertyAspectConfigurations) == null ? void 0 : C.map((w) => w.aspectName).includes(f.name));
|
|
9118
9118
|
});
|
|
9119
9119
|
if (p) {
|
|
9120
|
-
console.log(
|
|
9120
|
+
console.log(`LOG: text reload found aspect ${p.name}`);
|
|
9121
9121
|
const C = m.getGlobalPropertyStateManager().getAspect(p.name);
|
|
9122
9122
|
if (C)
|
|
9123
9123
|
if (console.log("LOG: text reload b found aspect text"), o.length === 0 && l) {
|
|
@@ -13776,7 +13776,7 @@ class sl extends Ia {
|
|
|
13776
13776
|
* Set the text.
|
|
13777
13777
|
*/
|
|
13778
13778
|
async setText(t) {
|
|
13779
|
-
|
|
13779
|
+
await Promise.all([
|
|
13780
13780
|
this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name, t),
|
|
13781
13781
|
this.applyTextSelection(t)
|
|
13782
13782
|
]);
|
|
@@ -13985,7 +13985,7 @@ class cl {
|
|
|
13985
13985
|
return (a = this.globalPropertyState.aspects.find((n) => n.name === t && n.channel === e)) == null ? void 0 : a.storage;
|
|
13986
13986
|
}
|
|
13987
13987
|
async setAspect(t, e, a, n) {
|
|
13988
|
-
if (!this.globalPropertyState)
|
|
13988
|
+
if (console.log(`LOG: setting aspect ${t} to ${e}`), !this.globalPropertyState)
|
|
13989
13989
|
throw new Error("Global property state not initialized");
|
|
13990
13990
|
if (!this.configuration)
|
|
13991
13991
|
throw new Error("Global property configuration not linked to the state manager.");
|
|
@@ -13994,7 +13994,7 @@ class cl {
|
|
|
13994
13994
|
throw new Error(`Failed to find configuration aspect with name: ${t}`);
|
|
13995
13995
|
const s = St(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
|
|
13996
13996
|
if (o.length > 0)
|
|
13997
|
-
if (n) {
|
|
13997
|
+
if (console.log("LOG: setting aspect if case"), n) {
|
|
13998
13998
|
const l = o.find((c) => c.channel === n);
|
|
13999
13999
|
if (l)
|
|
14000
14000
|
l.value = e, l.type = i.type, l.channel = n, a !== void 0 && (l.storage = a !== null ? a : void 0);
|
|
@@ -14012,18 +14012,19 @@ class cl {
|
|
|
14012
14012
|
});
|
|
14013
14013
|
}
|
|
14014
14014
|
} else {
|
|
14015
|
+
console.log("LOG: setting aspect if case no channel");
|
|
14015
14016
|
const l = o[0];
|
|
14016
|
-
l.value = e, l.type = i.type, a !== void 0 && (l.storage = a !== null ? a : void 0);
|
|
14017
|
+
l.value = e, l.type = i.type, a !== void 0 && (console.log("LOG: setting aspect if case no channel storage"), l.storage = a !== null ? a : void 0);
|
|
14017
14018
|
}
|
|
14018
14019
|
else
|
|
14019
|
-
this.globalPropertyState.aspects.push({
|
|
14020
|
+
console.log("LOG: setting aspect else case"), this.globalPropertyState.aspects.push({
|
|
14020
14021
|
name: t,
|
|
14021
14022
|
value: e,
|
|
14022
14023
|
type: i.type,
|
|
14023
14024
|
storage: a !== null ? a : void 0,
|
|
14024
14025
|
channel: n
|
|
14025
14026
|
});
|
|
14026
|
-
await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(s, this.globalPropertyState);
|
|
14027
|
+
await this.updateGlobalPropertyState(), await this.onGlobalPropertyStateChange(s, this.globalPropertyState), console.log("LOG: setting aspect end");
|
|
14027
14028
|
}
|
|
14028
14029
|
async setAspectStorage(t, e, a) {
|
|
14029
14030
|
if (!this.globalPropertyState)
|
|
@@ -14863,6 +14864,10 @@ class Je {
|
|
|
14863
14864
|
async applyGlobalPropertyState(t) {
|
|
14864
14865
|
var a;
|
|
14865
14866
|
const e = await this.globalPropertyHandleService.getHandles();
|
|
14867
|
+
for (const n of t.aspects) {
|
|
14868
|
+
const i = n == null ? void 0 : n.name;
|
|
14869
|
+
this.getGlobalPropertyStateManager().setAspect(i, n.value), console.log(`LOG: setting aspect ${i} to ${n.value}`);
|
|
14870
|
+
}
|
|
14866
14871
|
for (const n of t.aspects) {
|
|
14867
14872
|
const i = n == null ? void 0 : n.name, s = e.find((o) => o.getName() === i);
|
|
14868
14873
|
if (s)
|
|
@@ -15988,7 +15993,7 @@ class Ad {
|
|
|
15988
15993
|
} catch (a) {
|
|
15989
15994
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15990
15995
|
}
|
|
15991
|
-
}, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.3.0-beta.
|
|
15996
|
+
}, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.3.0-beta.77788c0a-992c-57e3-a34f-017b6df07c6c"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15992
15997
|
}
|
|
15993
15998
|
configure(t) {
|
|
15994
15999
|
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 && Vr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Ut.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|
|
@@ -16473,7 +16478,7 @@ class Ad {
|
|
|
16473
16478
|
* @returns An array of workflow experiences configured as requested.
|
|
16474
16479
|
*/
|
|
16475
16480
|
async getWorkflowExperiences(t, e) {
|
|
16476
|
-
if (t.length === 0)
|
|
16481
|
+
if (console.log("LOG: start of getWorkflowExperiences"), t.length === 0)
|
|
16477
16482
|
throw new ut("No options provided!");
|
|
16478
16483
|
const a = B.getShadowGraphqlClient(), n = async (y) => {
|
|
16479
16484
|
var D, x, k;
|
|
@@ -16563,6 +16568,7 @@ class Ad {
|
|
|
16563
16568
|
const q = JSON.parse(E.workflowState);
|
|
16564
16569
|
R.layouts = Object.values(q.layouts || {}).map((ft) => ft.layout), await za(q), R.reloadedState = q;
|
|
16565
16570
|
} else if (!I && k.workflowState) {
|
|
16571
|
+
console.log(`LOG: reloading with state ${k.workflowState}`);
|
|
16566
16572
|
const q = JSON.parse(k.workflowState);
|
|
16567
16573
|
R.layouts = Object.values(q.layouts || {}).map((ft) => ft.layout), await za(q), R.reloadedState = q;
|
|
16568
16574
|
} else
|