@spiffcommerce/core 21.12.0 → 21.13.0-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 +7 -4
- package/dist/index.js +131 -95
- package/dist/index.umd.cjs +25 -25
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -211,8 +211,10 @@ declare class FrameService {
|
|
|
211
211
|
/**
|
|
212
212
|
* Sets the image currently contained by this frame.
|
|
213
213
|
* @param value The new image as an ImageData property
|
|
214
|
+
* @param [recalculateOffsets=true] Optional: Enable/disable re-calculating of frame offsets.
|
|
215
|
+
* Useful when you are replacing an image with the exact same dimensions (e.g. alterations to an image). Default: `true`.
|
|
214
216
|
*/
|
|
215
|
-
setPatternData(value: PatternImageData): void;
|
|
217
|
+
setPatternData(value: PatternImageData, recalculateOffsets?: boolean): void;
|
|
216
218
|
/**
|
|
217
219
|
* Modify the offsets of the frame.
|
|
218
220
|
* @param value The new FrameOffsets objects.
|
|
@@ -2755,10 +2757,10 @@ interface FrameCreateOpts {
|
|
|
2755
2757
|
declare class FrameStepService implements StepService<FrameStepData> {
|
|
2756
2758
|
init(stepData: Step<FrameStepData>, workflowManager: WorkflowManager, reducerState?: LayoutsState): Promise<CommandWithFollowup | null>;
|
|
2757
2759
|
private reload;
|
|
2758
|
-
selectImage(stepData: Step<FrameStepData>, asset: Asset, workflowManager: WorkflowManager): Promise<void>;
|
|
2760
|
+
selectImage(stepData: Step<FrameStepData>, asset: Asset, workflowManager: WorkflowManager, recalculateOffsets?: boolean): Promise<void>;
|
|
2759
2761
|
selectVariant(stepData: Step<FrameStepData>, variant: VariantResource | undefined, elements: RegionElement[], workflowManager: WorkflowManager, setFrameIsUpdating?: (status: boolean) => void): Promise<void>;
|
|
2760
2762
|
getCreateElementCommand(id: string, region: Region, layout: ILayout, options: FrameCreateOpts): CreateElementCommand<FrameElement>;
|
|
2761
|
-
loadPatternFromString(src: string, frameService: FrameService): Promise<void>;
|
|
2763
|
+
loadPatternFromString(src: string, frameService: FrameService, recalculateOffsets: boolean): Promise<void>;
|
|
2762
2764
|
private selectVariantCommand;
|
|
2763
2765
|
private frameSourceSvg;
|
|
2764
2766
|
/**
|
|
@@ -3205,8 +3207,9 @@ declare class FrameStepHandle extends StepHandle<FrameStepData> {
|
|
|
3205
3207
|
* Updates the image selection inside the frame.
|
|
3206
3208
|
* @param asset The asset to use.
|
|
3207
3209
|
* @param storeAsOriginal Optional: Store this asset as the original, unmodified version of the image. Default: `true`.
|
|
3210
|
+
* @param [recalculateOffsets=true] Optional: Recalculates the offsets of the image inside the frame. Default: `true`.
|
|
3208
3211
|
*/
|
|
3209
|
-
selectImage(asset: Asset, storeAsOriginal?: boolean): Promise<void>;
|
|
3212
|
+
selectImage(asset: Asset, storeAsOriginal?: boolean, recalculateOffsets?: boolean): Promise<void>;
|
|
3210
3213
|
canUseBackgroundRemover(): Promise<boolean>;
|
|
3211
3214
|
/**
|
|
3212
3215
|
* Removes the background from an image, stores it in the state, and returns the new asset.
|