@spiffcommerce/core 21.16.0-alpha.1 → 21.16.1-alpha.0
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.d.ts +17 -4
- package/dist/index.js +15 -10
- package/dist/index.umd.cjs +10 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -313,7 +313,6 @@ declare class LayoutPreviewBridge implements RenderableContext {
|
|
|
313
313
|
private staticCtxDirty;
|
|
314
314
|
private lastRequestedRenderArguments;
|
|
315
315
|
private lastCompletedStaticRender;
|
|
316
|
-
private lastModificationID;
|
|
317
316
|
private renderQueue;
|
|
318
317
|
constructor(id: string, name: string, service: LayoutPreviewService, panelSize: {
|
|
319
318
|
width: number;
|
|
@@ -340,7 +339,6 @@ declare class LayoutPreviewBridge implements RenderableContext {
|
|
|
340
339
|
* form of Date.now(). If this panel has never rendered undefined will be returned.
|
|
341
340
|
*/
|
|
342
341
|
getLastCompletedStaticRender(): number | undefined;
|
|
343
|
-
getLastModificationID(): string | undefined;
|
|
344
342
|
/**
|
|
345
343
|
* Actions to perform when a static render event is fired for this canvas.
|
|
346
344
|
*/
|
|
@@ -2119,6 +2117,7 @@ interface DesignCreationMessage {
|
|
|
2119
2117
|
additionalExternalProductId?: string;
|
|
2120
2118
|
additionalExternalVariantId?: string;
|
|
2121
2119
|
baseCost?: number;
|
|
2120
|
+
designExternalVariants?: DesignExternalVariant[];
|
|
2122
2121
|
designProductId?: string;
|
|
2123
2122
|
designProductVariantId?: string;
|
|
2124
2123
|
event: string;
|
|
@@ -2206,14 +2205,14 @@ interface Transaction {
|
|
|
2206
2205
|
* to this transaction, null unless the createDesignProduct flag was set
|
|
2207
2206
|
* and the design was finalized using createDesign operation.
|
|
2208
2207
|
*/
|
|
2209
|
-
/**@deprecated use externalCartProductVariantId instead of this moving forward */
|
|
2208
|
+
/**@deprecated use externalCartProductVariantId or designExternalVariants[x].externalProductVariantId instead of this moving forward */
|
|
2210
2209
|
externalDesignProductVariantId?: string;
|
|
2211
2210
|
/**
|
|
2212
2211
|
* The external product id representing the design product related
|
|
2213
2212
|
* to this transaction, null unless the createDesignProduct flag was set
|
|
2214
2213
|
* and the design was finalized using createDesign operation.
|
|
2215
2214
|
*/
|
|
2216
|
-
/**@deprecated use externalCartProductId instead of this moving forward. */
|
|
2215
|
+
/**@deprecated use externalCartProductId or designExternalVariants[x].externalProductId instead of this moving forward. */
|
|
2217
2216
|
externalDesignProductId?: string;
|
|
2218
2217
|
/**
|
|
2219
2218
|
* The external product id representing the product related to the transaction.
|
|
@@ -2251,6 +2250,20 @@ interface Transaction {
|
|
|
2251
2250
|
printFileName3?: string;
|
|
2252
2251
|
printFileName4?: string;
|
|
2253
2252
|
printFileName5?: string;
|
|
2253
|
+
/**
|
|
2254
|
+
* An array of objects containing information on additional products to add to the cart.
|
|
2255
|
+
* Typically only available when being passed to {@link DesignCreationMessage}
|
|
2256
|
+
*/
|
|
2257
|
+
designExternalVariants?: DesignExternalVariant[];
|
|
2258
|
+
}
|
|
2259
|
+
/**
|
|
2260
|
+
* An object containing ids for an external product/variant that should be added to the cart alongside the base product/variant.
|
|
2261
|
+
*/
|
|
2262
|
+
interface DesignExternalVariant {
|
|
2263
|
+
id?: string;
|
|
2264
|
+
externalProductId?: string;
|
|
2265
|
+
externalProductVariantId?: string;
|
|
2266
|
+
skuCode?: string;
|
|
2254
2267
|
}
|
|
2255
2268
|
/**
|
|
2256
2269
|
* An integration product represents the connection of a product in SpiffCommerce with
|
package/dist/index.js
CHANGED
|
@@ -471,7 +471,7 @@ class sa {
|
|
|
471
471
|
}, A, a);
|
|
472
472
|
}
|
|
473
473
|
async uploadFile(e, t) {
|
|
474
|
-
const A = !(e.type === "image/svg+xml" || e.type === "application/pdf"), a = A ? We.Image : We.Illustration;
|
|
474
|
+
const A = !(e.type === "image/svg+xml" || e.type === "application/pdf" || e.type === "application/postscript"), a = A ? We.Image : We.Illustration;
|
|
475
475
|
if (A) {
|
|
476
476
|
const n = await this.loadImageAsFileInfo(e);
|
|
477
477
|
return await this.uploadAssetWithProgress(n, a, t, !0);
|
|
@@ -2024,7 +2024,11 @@ class Ha {
|
|
|
2024
2024
|
selectImage(e, t, A, a = !0) {
|
|
2025
2025
|
var o;
|
|
2026
2026
|
const n = this.patternSource(t), i = (o = A.getStepStorage(e.stepName)) == null ? void 0 : o.framePatternSrc;
|
|
2027
|
-
|
|
2027
|
+
if (i && i === n)
|
|
2028
|
+
return Promise.resolve();
|
|
2029
|
+
A.setEditedStatus(e.stepName, !0);
|
|
2030
|
+
const s = t.fileLink || "";
|
|
2031
|
+
return s.endsWith(".pdf") || s.endsWith(".eps") || s.endsWith(".ai") ? new Promise((r) => {
|
|
2028
2032
|
A.addPoller(
|
|
2029
2033
|
new aA(
|
|
2030
2034
|
async () => {
|
|
@@ -2044,7 +2048,7 @@ class Ha {
|
|
|
2044
2048
|
}
|
|
2045
2049
|
)
|
|
2046
2050
|
);
|
|
2047
|
-
}) : this.loadPatternFromAsset(t, e, A, a)
|
|
2051
|
+
}) : this.loadPatternFromAsset(t, e, A, a);
|
|
2048
2052
|
}
|
|
2049
2053
|
async selectVariant(e, t, A, a, n) {
|
|
2050
2054
|
const i = await this.selectVariantCommand(
|
|
@@ -5144,11 +5148,9 @@ class nn {
|
|
|
5144
5148
|
if (!this.previewService)
|
|
5145
5149
|
return;
|
|
5146
5150
|
const C = this.getCommandContext().getAllLayouts(), u = (f = this.getLayoutPreviewService()) == null ? void 0 : f.getAll();
|
|
5147
|
-
if (u)
|
|
5148
|
-
console.log(u);
|
|
5151
|
+
if (u)
|
|
5149
5152
|
for (const [, Q] of u)
|
|
5150
5153
|
Q.render(C);
|
|
5151
|
-
}
|
|
5152
5154
|
}, this.client = e, this.updateTransaction = i, this.commandContext = n, this.reloadedState = B, this.transaction = s, this.readOnly = l, this.singleVariantsRenderable = E, this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.workflow = t, this.stepSpecificServices = {}, this.profanityFilter = A, this.pollers = [], this.allScenes = [], this.layouts = a, this.product = o, this.previewService = r, this.modelContainer = d, this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.confirmCallbacks = [], this.editedCallbacks = [], this.elementsCallbacks = [], this.informationResultCallbacks = [], this.initCallbacks = [], this.mandatoryCallbacks = [], this.makingAdjustmentsCallback = [], this.metadataCallbacks = [], this.selectionCallbacks = [], this.stepSpecificStorageCallbacks = {}, this.storageCallbacks = [], this.currentAdjustingStepId = "", this.renderableContextService = g, this.isReloadedTransaction = w, h && (this.workflowStatePromiseQueue.enabled = !1), this.initializationPromise = this.initializeDefaultWorkflowState(t), this.initializationPromise.then(() => {
|
|
5153
5155
|
this.initialized = !0;
|
|
5154
5156
|
}), this.initializationPromise.catch((C) => {
|
|
@@ -6326,6 +6328,11 @@ const wA = D`
|
|
|
6326
6328
|
additionalExternalProductId
|
|
6327
6329
|
additionalExternalVariantId
|
|
6328
6330
|
}
|
|
6331
|
+
designExternalVariants {
|
|
6332
|
+
id
|
|
6333
|
+
externalProductId
|
|
6334
|
+
externalProductVariantId
|
|
6335
|
+
}
|
|
6329
6336
|
}
|
|
6330
6337
|
`, wn = D`
|
|
6331
6338
|
${wA}
|
|
@@ -6497,6 +6504,7 @@ const En = async (c) => {
|
|
|
6497
6504
|
additionalExternalProductId: (w = c.integrationProduct) == null ? void 0 : w.additionalExternalProductId,
|
|
6498
6505
|
additionalExternalVariantId: (E = c.integrationProduct) == null ? void 0 : E.additionalExternalVariantId,
|
|
6499
6506
|
baseCost: o,
|
|
6507
|
+
designExternalVariants: c.designExternalVariants,
|
|
6500
6508
|
designProductId: c.externalDesignProductId,
|
|
6501
6509
|
designProductVariantId: c.externalDesignProductVariantId,
|
|
6502
6510
|
event: "onComplete",
|
|
@@ -7689,7 +7697,7 @@ const Un = () => new Promise((c, e) => {
|
|
|
7689
7697
|
}), vn = Un();
|
|
7690
7698
|
class Gn {
|
|
7691
7699
|
constructor(e, t, A, a) {
|
|
7692
|
-
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.
|
|
7700
|
+
this.hasSetStaticContext = !1, this.interactiveDirty = !1, this.staticCtxDirty = !1, this.lastRequestedRenderArguments = void 0, this.lastCompletedStaticRender = void 0, this.renderQueue = new AA(2), this.id = e, this.name = t, this.service = A, this.panelSize = a;
|
|
7693
7701
|
}
|
|
7694
7702
|
getID() {
|
|
7695
7703
|
return this.id;
|
|
@@ -7731,9 +7739,6 @@ class Gn {
|
|
|
7731
7739
|
getLastCompletedStaticRender() {
|
|
7732
7740
|
return this.lastCompletedStaticRender;
|
|
7733
7741
|
}
|
|
7734
|
-
getLastModificationID() {
|
|
7735
|
-
return this.lastModificationID;
|
|
7736
|
-
}
|
|
7737
7742
|
/**
|
|
7738
7743
|
* Actions to perform when a static render event is fired for this canvas.
|
|
7739
7744
|
*/
|