@spiffcommerce/core 21.9.0-alpha.7 → 21.9.0-alpha.8
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 +1 -0
- package/dist/index.js +8 -2
- package/dist/index.umd.cjs +12 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3199,6 +3199,7 @@ declare class FrameStepHandle extends StepHandle<FrameStepData> {
|
|
|
3199
3199
|
hasOverlayImageUrl(): any;
|
|
3200
3200
|
getOriginalImageSelection(): Promise<Asset | undefined>;
|
|
3201
3201
|
getBackgroundRemovedImageSelection(): Promise<Asset | undefined>;
|
|
3202
|
+
hasBackgroundRemovedImageSelection(): boolean;
|
|
3202
3203
|
getUseOriginalImageSelection(): boolean;
|
|
3203
3204
|
setUseOriginalImageSelection(value: boolean): Promise<void>;
|
|
3204
3205
|
}
|
package/dist/index.js
CHANGED
|
@@ -8209,6 +8209,8 @@ class Xn extends gt {
|
|
|
8209
8209
|
if (!A)
|
|
8210
8210
|
return Promise.resolve();
|
|
8211
8211
|
await this.applyImageSelection(A, e);
|
|
8212
|
+
const a = this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);
|
|
8213
|
+
a && this.updateSharedStepStorage(a);
|
|
8212
8214
|
}
|
|
8213
8215
|
async applyImageSelection(e, t, A = !0) {
|
|
8214
8216
|
const n = this.getSharedSteps(t).map((i) => i.selectImage(e, A));
|
|
@@ -11198,6 +11200,10 @@ class Si extends W {
|
|
|
11198
11200
|
if (e)
|
|
11199
11201
|
return v.getLocalOrFromServer(e);
|
|
11200
11202
|
}
|
|
11203
|
+
hasBackgroundRemovedImageSelection() {
|
|
11204
|
+
var e, t;
|
|
11205
|
+
return !!((t = (e = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : e.framePatternData) != null && t.backgroundRemovedAssetKey);
|
|
11206
|
+
}
|
|
11201
11207
|
getUseOriginalImageSelection() {
|
|
11202
11208
|
var e, t;
|
|
11203
11209
|
return ((t = (e = this.manager.getStepStorage(this.step.stepName)) == null ? void 0 : e.framePatternData) == null ? void 0 : t.useOriginalAsset) ?? !1;
|
|
@@ -11211,14 +11217,14 @@ class Si extends W {
|
|
|
11211
11217
|
if (!A)
|
|
11212
11218
|
throw new Error("You must provide an image selection before calling setUseOriginalImageSelection");
|
|
11213
11219
|
if (e)
|
|
11214
|
-
this.selectImage(A, !1);
|
|
11220
|
+
await this.selectImage(A, !1);
|
|
11215
11221
|
else {
|
|
11216
11222
|
const n = await this.getBackgroundRemovedImageSelection();
|
|
11217
11223
|
if (!n)
|
|
11218
11224
|
throw new Error(
|
|
11219
11225
|
"You must call removeBackgroundFromImageSelection before attempting to apply the image."
|
|
11220
11226
|
);
|
|
11221
|
-
this.selectImage(n, !1);
|
|
11227
|
+
await this.selectImage(n, !1);
|
|
11222
11228
|
}
|
|
11223
11229
|
this.manager.updateStorage(this.step.stepName, {
|
|
11224
11230
|
framePatternData: { ...t, useOriginalAsset: e }
|