@spiffcommerce/core 34.4.1-beta.d6d7bd56-1aec-57cf-9351-1ccdcad29944 → 34.4.2
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 +6 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6990,7 +6990,7 @@ class ta extends O {
|
|
|
6990
6990
|
super(), this.id = t, this.strokeColor = e, this.strokeThickness = a;
|
|
6991
6991
|
}
|
|
6992
6992
|
apply(t) {
|
|
6993
|
-
|
|
6993
|
+
this.oldState = t;
|
|
6994
6994
|
const e = z(this.id, Object.values(t.layouts));
|
|
6995
6995
|
if (!e.id)
|
|
6996
6996
|
throw new W();
|
|
@@ -10984,7 +10984,7 @@ const nl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
10984
10984
|
throw console.error(g), this.initialized = !1, new Error("Workflow initialization failed due to an error. See console.");
|
|
10985
10985
|
}), this.initializationPromise.finally(
|
|
10986
10986
|
() => this.commandContext.registerStateCallback(() => {
|
|
10987
|
-
|
|
10987
|
+
this.updateStateWithServer(), this.renderLayouts();
|
|
10988
10988
|
})
|
|
10989
10989
|
), h && await this.injectIntoPreviewService(h, !0);
|
|
10990
10990
|
}, this.renderLayouts = () => {
|
|
@@ -11693,7 +11693,7 @@ const nl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11693
11693
|
this.editedCallbacks.forEach((t) => t(this.editedSteps));
|
|
11694
11694
|
}
|
|
11695
11695
|
onElementsChange() {
|
|
11696
|
-
|
|
11696
|
+
this.elementsCallbacks.forEach((t) => t(this.stepElements));
|
|
11697
11697
|
}
|
|
11698
11698
|
onInformationResultChange() {
|
|
11699
11699
|
this.informationResultCallbacks.forEach((t) => t(this.informationResults));
|
|
@@ -11715,7 +11715,6 @@ const nl = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11715
11715
|
});
|
|
11716
11716
|
}
|
|
11717
11717
|
async onSelectionChange() {
|
|
11718
|
-
console.log("log: onSelectionChange");
|
|
11719
11718
|
const t = await this.traversableScenes();
|
|
11720
11719
|
for (const e of this.selectionCallbacks)
|
|
11721
11720
|
e({
|
|
@@ -15497,17 +15496,28 @@ class cn {
|
|
|
15497
15496
|
async loadExistingWorkflowExperiences(t, e, a) {
|
|
15498
15497
|
if (t.length === 0) return;
|
|
15499
15498
|
const i = await this.client.getWorkflowExperiences(
|
|
15500
|
-
t.map((
|
|
15499
|
+
t.map((s) => ({
|
|
15501
15500
|
type: "transaction",
|
|
15502
|
-
transactionId:
|
|
15501
|
+
transactionId: s
|
|
15503
15502
|
})),
|
|
15504
15503
|
e,
|
|
15505
15504
|
void 0,
|
|
15506
15505
|
a
|
|
15507
15506
|
);
|
|
15508
|
-
if (i.forEach((
|
|
15509
|
-
for (const
|
|
15510
|
-
await this.injectExperienceIntoPreviewService(
|
|
15507
|
+
if (i.forEach((s) => s.setBundle(this)), i.forEach((s) => s.checkForPriceBreakChanges()), this.workflowExperiences = i, this.previewService)
|
|
15508
|
+
for (const s of i)
|
|
15509
|
+
await this.injectExperienceIntoPreviewService(s);
|
|
15510
|
+
const r = this.getIntegrationProductIds() || [], o = this.getProductCollection();
|
|
15511
|
+
if (o && r.length > 0) {
|
|
15512
|
+
await o.fetchProducts();
|
|
15513
|
+
const s = o.getProducts();
|
|
15514
|
+
for (const l of r)
|
|
15515
|
+
if (!s.find((d) => d.getCurrentIntegration().id === l)) {
|
|
15516
|
+
for (const d of i)
|
|
15517
|
+
d.getProduct()?.integrationProducts?.map((A) => A.id)?.includes(l) && await d.clearProduct();
|
|
15518
|
+
await this.removeIntegrationProductIds([l]);
|
|
15519
|
+
}
|
|
15520
|
+
}
|
|
15511
15521
|
}
|
|
15512
15522
|
async updateBundle() {
|
|
15513
15523
|
if (!(await y.getShadowGraphqlClient().mutate({
|
|
@@ -16167,7 +16177,7 @@ class Ud {
|
|
|
16167
16177
|
} catch (a) {
|
|
16168
16178
|
throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
|
|
16169
16179
|
}
|
|
16170
|
-
}, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.4.
|
|
16180
|
+
}, this.options = t, this.options.applicationKey && nr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.4.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16171
16181
|
}
|
|
16172
16182
|
configure(t) {
|
|
16173
16183
|
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 && rr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|