@spiffcommerce/core 34.3.0-beta.30ca33a3-7b27-57c0-87b4-33dd497ec9b8 → 34.3.0-beta.8007a072-fa1c-5c4f-ade0-f2b43e5b6ed0
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 +103 -103
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13331,20 +13331,17 @@ class Bl {
|
|
|
13331
13331
|
throw new Q("Product undefined! Cannot finish an experience without a product.");
|
|
13332
13332
|
if (!i)
|
|
13333
13333
|
throw new Q("Workflow undefined! Cannot finish an experience without a workflow.");
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
-
workflowViewerLink: "",
|
|
13346
|
-
workflowViewerReadOnlyLink: ""
|
|
13347
|
-
}) : (await hi(
|
|
13334
|
+
if (e.isOrdered)
|
|
13335
|
+
return {
|
|
13336
|
+
event: "",
|
|
13337
|
+
exportedData: {},
|
|
13338
|
+
lineItemImageUrl: "",
|
|
13339
|
+
optionsCost: 0,
|
|
13340
|
+
transactionId: e.id,
|
|
13341
|
+
workflowViewerLink: "",
|
|
13342
|
+
workflowViewerReadOnlyLink: ""
|
|
13343
|
+
};
|
|
13344
|
+
const r = await hi(
|
|
13348
13345
|
[
|
|
13349
13346
|
{
|
|
13350
13347
|
workflowManager: this.workflowManager,
|
|
@@ -13360,7 +13357,13 @@ class Bl {
|
|
|
13360
13357
|
}
|
|
13361
13358
|
],
|
|
13362
13359
|
(o) => t ? this.createPreviewImage(o, 1024) : Promise.resolve(void 0)
|
|
13363
|
-
)
|
|
13360
|
+
);
|
|
13361
|
+
return e.completed && await this.graphQlClient().mutate({
|
|
13362
|
+
mutation: Xr,
|
|
13363
|
+
variables: {
|
|
13364
|
+
transactionId: e.id
|
|
13365
|
+
}
|
|
13366
|
+
}), r[0];
|
|
13364
13367
|
}
|
|
13365
13368
|
/**
|
|
13366
13369
|
* @param step The step to test against.
|
|
@@ -15497,28 +15500,17 @@ class dn {
|
|
|
15497
15500
|
async loadExistingWorkflowExperiences(t, e, a) {
|
|
15498
15501
|
if (t.length === 0) return;
|
|
15499
15502
|
const i = await this.client.getWorkflowExperiences(
|
|
15500
|
-
t.map((
|
|
15503
|
+
t.map((r) => ({
|
|
15501
15504
|
type: "transaction",
|
|
15502
|
-
transactionId:
|
|
15505
|
+
transactionId: r
|
|
15503
15506
|
})),
|
|
15504
15507
|
e,
|
|
15505
15508
|
void 0,
|
|
15506
15509
|
a
|
|
15507
15510
|
);
|
|
15508
|
-
if (i.forEach((
|
|
15509
|
-
for (const
|
|
15510
|
-
await this.injectExperienceIntoPreviewService(
|
|
15511
|
-
const r = this.getIntegrationProductIds() || [], o = this.getProductCollection();
|
|
15512
|
-
if (o && r.length > 0) {
|
|
15513
|
-
await o.fetchProducts();
|
|
15514
|
-
const s = o.getProducts();
|
|
15515
|
-
for (const l of r)
|
|
15516
|
-
if (!s.find((d) => d.getCurrentIntegration().id === l)) {
|
|
15517
|
-
for (const d of i)
|
|
15518
|
-
d.getProduct()?.integrationProducts?.map((A) => A.id)?.includes(l) && await d.clearProduct();
|
|
15519
|
-
await this.removeIntegrationProductIds([l]);
|
|
15520
|
-
}
|
|
15521
|
-
}
|
|
15511
|
+
if (i.forEach((r) => r.setBundle(this)), i.forEach((r) => r.checkForPriceBreakChanges()), this.workflowExperiences = i, this.previewService)
|
|
15512
|
+
for (const r of i)
|
|
15513
|
+
await this.injectExperienceIntoPreviewService(r);
|
|
15522
15514
|
}
|
|
15523
15515
|
async updateBundle() {
|
|
15524
15516
|
if (!(await y.getShadowGraphqlClient().mutate({
|