@spiffcommerce/core 0.10.1 → 0.10.3

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/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Workflow as _Workflow1, StepAspect as _StepAspect1, Step as _Step1, AnyStepData as _AnyStepData1, FrameOffsets, PatternImageData, IServerModel, Asset as _Asset1, MaterialResource, AssetType as _AssetType1, VariantResource as _VariantResource1, ColorDefinition as _ColorDefinition1, IllustrationStepData as _IllustrationStepData1, Region, ILayout as _ILayout1, CreateElementCommand as _CreateElementCommand1, IllustrationElement as _IllustrationElement1, LayoutsState as _LayoutsState1, CanvasCommand as _CanvasCommand1, LayoutData as _LayoutData1, DigitalContentStepData as _DigitalContentStepData1, FrameStepData as _FrameStepData1, FrameElement as _FrameElement1, MaterialStepData as _MaterialStepData1, ModelStepData as _ModelStepData1, ModuleStepData as _ModuleStepData1, PatchworkStepData as _PatchworkStepData1, PatchworkOffsets as _PatchworkOffsets1, PictureStepData as _PictureStepData1, QuestionStepData as _QuestionStepData1, ShapeStepData as _ShapeStepData1, FontData, GroupCommand as _GroupCommand1, OptionResource as _OptionResource1, TextboxElement as _TextboxElement1, TextStepData as _TextStepData1, StepStorage as _StepStorage1, SerializableStep, CommandState as _CommandState1, CommandContext as _CommandContext1, LayoutState, Point, ScaleAxis, UnitOfMeasurement as _UnitOfMeasurement1, StepType as _StepType1, Animatable, AnyStepData, Asset, AssetType, BringForwardCommand, BulkStepData, CanvasCommand, ColorDefinition, CommandContext, CommandState, CreateElementCommand, DeleteElementCommand, DigitalContentStepData, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, FrameElement, FrameStepData, GroupCommand, ILayout, IllustrationElement, IllustrationStepData, ImageElement, LayoutData, LayoutElement, LayoutElementFactory, LayoutElementType, LayoutsState, MaterialStepData, ModelStepData, ModuleStepData, MoveCommand, OptionResource, PatchworkElement, PatchworkOffsets, PatchworkStepData, PictureStepData, QuestionStepData, ResizeCommand, RotateCommand, SendBackwardsCommand, ShapeStepData, Step, StepAspect, StepAspectType, StepStorage, StepType, TextChangeCommand, TextStepData, TextboxElement, UnitOfMeasurement, VariantResource, Workflow, dataUrlFromExternalUrl, findElement, frameDataCache, generate, generateSVGWithUnknownColors, getAttributesFromArrayBuffer, getFrameData, getSvgString, loadFontFromDataUrl, loadFontFromExternalUrl, patternImageDataCache, CreateLayoutCommand, rehydrateSerializedLayout, ColorProfileProps, WorkflowPanel, determineCorrectFontSizeAndLines, registerJSDOM } from "@spiffcommerce/papyrus";
1
+ import { Workflow as _Workflow1, StepAspect as _StepAspect1, Step as _Step1, AnyStepData as _AnyStepData1, FrameOffsets, PatternImageData, IServerModel, Asset as _Asset1, MaterialResource, AssetType as _AssetType1, VariantResource as _VariantResource1, ColorDefinition as _ColorDefinition1, IllustrationStepData as _IllustrationStepData1, Region, ILayout as _ILayout1, CreateElementCommand as _CreateElementCommand1, IllustrationElement as _IllustrationElement1, LayoutsState as _LayoutsState1, CanvasCommand as _CanvasCommand1, LayoutData as _LayoutData1, DigitalContentStepData as _DigitalContentStepData1, FrameStepData as _FrameStepData1, FrameElement as _FrameElement1, MaterialStepData as _MaterialStepData1, ModelStepData as _ModelStepData1, ModuleStepData as _ModuleStepData1, PatchworkStepData as _PatchworkStepData1, PatchworkOffsets as _PatchworkOffsets1, PictureStepData as _PictureStepData1, QuestionStepData as _QuestionStepData1, ShapeStepData as _ShapeStepData1, FontData, GroupCommand as _GroupCommand1, OptionResource as _OptionResource1, TextboxElement as _TextboxElement1, TextStepData as _TextStepData1, StepStorage as _StepStorage1, SerializableStep, CommandState as _CommandState1, CommandContext as _CommandContext1, LayoutState, Point, ScaleAxis, UnitOfMeasurement as _UnitOfMeasurement1, StepType as _StepType1, StepGroup, Animatable, AnyStepData, Asset, AssetType, BringForwardCommand, BulkStepData, CanvasCommand, ColorDefinition, CommandContext, CommandState, CreateElementCommand, DeleteElementCommand, DigitalContentStepData, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, FrameElement, FrameStepData, GroupCommand, ILayout, IllustrationElement, IllustrationStepData, ImageElement, LayoutData, LayoutElement, LayoutElementFactory, LayoutElementType, LayoutsState, MaterialStepData, ModelStepData, ModuleStepData, MoveCommand, OptionResource, PatchworkElement, PatchworkOffsets, PatchworkStepData, PictureStepData, QuestionStepData, ResizeCommand, RotateCommand, SendBackwardsCommand, ShapeStepData, Step, StepAspect, StepAspectType, StepStorage, StepType, TextChangeCommand, TextStepData, TextboxElement, UnitOfMeasurement, VariantResource, Workflow, dataUrlFromExternalUrl, findElement, frameDataCache, generate, generateSVGWithUnknownColors, getAttributesFromArrayBuffer, getFrameData, getSvgString, loadFontFromDataUrl, loadFontFromExternalUrl, patternImageDataCache, CreateLayoutCommand, rehydrateSerializedLayout, ColorProfileProps, WorkflowPanel, determineCorrectFontSizeAndLines, registerJSDOM } from "@spiffcommerce/papyrus";
2
2
  import { ApolloClient } from "@apollo/client";
3
3
  import { ReactNode, Dispatch, FunctionComponent, RefObject, PointerEvent, KeyboardEvent, MouseEvent } from "react";
4
4
  export const gatherVaryingStepAspects: (workflow: _Workflow1) => _StepAspect1[];
@@ -1103,6 +1103,10 @@ declare abstract class StepHandle<T extends _AnyStepData1> {
1103
1103
  * that would be triggered will also be executed.
1104
1104
  */
1105
1105
  abstract selectVariant(variant: _VariantResource1): Promise<void>;
1106
+ /**
1107
+ * @returns The type of the step handle.
1108
+ */
1109
+ getType(): _StepType1;
1106
1110
  }
1107
1111
  /**
1108
1112
  * A Workflow experience encapsulates the workflow manager and command context. It
@@ -1141,6 +1145,11 @@ export interface WorkflowExperience {
1141
1145
  * may be across multiple scenes and may or may not be active based on condition state.
1142
1146
  */
1143
1147
  getStepsByType(type: _StepType1): StepHandle<_AnyStepData1>[];
1148
+ /**
1149
+ * Returns all scenes that are children of a given scene.
1150
+ * @param scene The scene you want the steps for.
1151
+ */
1152
+ getStepsByScene(scene: StepGroup): StepHandle<_AnyStepData1>[];
1144
1153
  /**
1145
1154
  * Creates a data URL preview for the current design.
1146
1155
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
4
4
  "description": "Core client API for interacting with the Spiff Commerce backend.",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",