@spiffcommerce/core 0.10.79 → 0.10.80
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/main.js +9 -9
- package/dist/module.js +9 -9
- package/dist/types.d.ts +74 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Workflow as _Workflow1, StepAspect as _StepAspect1, Step as _Step1, AnyStepData as _AnyStepData1,
|
|
1
|
+
import { Workflow as _Workflow1, StepAspect as _StepAspect1, Step as _Step1, AnyStepData as _AnyStepData1, Asset as _Asset1, Region, VariantResource as _VariantResource1, FrameOffsets, PatternImageData, IServerModel, MaterialResource, AssetType as _AssetType1, ColorDefinition as _ColorDefinition1, IllustrationStepData as _IllustrationStepData1, 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, 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, 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 } from "react";
|
|
4
4
|
export const gatherVaryingStepAspects: (workflow: _Workflow1) => _StepAspect1[];
|
|
@@ -87,6 +87,79 @@ export class PromiseQueue<T extends QueueablePromise> {
|
|
|
87
87
|
*/
|
|
88
88
|
finalize(): Promise<void>;
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* A generic base class for custom errors that assigns the name
|
|
92
|
+
* of the error class automatically. All custom errors should extend this.
|
|
93
|
+
*/
|
|
94
|
+
declare abstract class CustomError extends Error {
|
|
95
|
+
constructor(message: any);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A custom class for categorising errors related to workflow configuration.
|
|
99
|
+
*/
|
|
100
|
+
declare abstract class ConfigurationError extends CustomError {
|
|
101
|
+
constructor(message: any);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Thrown when an option was expected but not found in the workflow configuration or
|
|
105
|
+
* the server returned a 404 for an option we expected.
|
|
106
|
+
*/
|
|
107
|
+
export class OptionNotFoundError extends ConfigurationError {
|
|
108
|
+
readonly optionId: string;
|
|
109
|
+
constructor(step: _Step1<_AnyStepData1>);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Thrown when a layout is not found for a given region entity. This
|
|
113
|
+
* can occur when panels are deleted from a workflow but steps are still relying
|
|
114
|
+
* on the layout being present.
|
|
115
|
+
*/
|
|
116
|
+
export class LayoutNotFoundError extends ConfigurationError {
|
|
117
|
+
readonly panelId: string;
|
|
118
|
+
constructor(region: Region);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Thrown when an asset is not found on a specific variant. This can occur when
|
|
122
|
+
* the asset wasn't configured in hub and the variant is loaded in a workflow.
|
|
123
|
+
*/
|
|
124
|
+
export class AssetNotFoundError extends ConfigurationError {
|
|
125
|
+
readonly variant: _VariantResource1;
|
|
126
|
+
constructor(variant: _VariantResource1);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Thrown when a resource is not found linked to a specific asset. This
|
|
130
|
+
* can occur when generation of a resource fails or hasn't completed. Or may be
|
|
131
|
+
* a sign of a misconfiguration.
|
|
132
|
+
*/
|
|
133
|
+
export class ResourceNotFoundError extends ConfigurationError {
|
|
134
|
+
readonly asset: _Asset1;
|
|
135
|
+
constructor(asset: _Asset1);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Thrown when configuration is missing when it was expected. More generic
|
|
139
|
+
* to cover remaining cases outside of the more specific ones such as options, variants & assets.
|
|
140
|
+
*/
|
|
141
|
+
export class MisconfigurationError extends ConfigurationError {
|
|
142
|
+
readonly step: _Step1<_AnyStepData1>;
|
|
143
|
+
constructor(step: _Step1<_AnyStepData1>, message: string);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* A custom class for categorising errors related to implementation of core.
|
|
147
|
+
*/
|
|
148
|
+
declare abstract class ImplementationError extends CustomError {
|
|
149
|
+
constructor(message: any);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Thrown when we hit a case that we didn't expect to happen
|
|
153
|
+
*/
|
|
154
|
+
export class UnhandledBehaviorError extends ImplementationError {
|
|
155
|
+
constructor(message: string);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Thrown when we fail to parse something that we expected to be valid
|
|
159
|
+
*/
|
|
160
|
+
export class ParseError extends ImplementationError {
|
|
161
|
+
constructor(message: string);
|
|
162
|
+
}
|
|
90
163
|
export class FrameService {
|
|
91
164
|
minZoomScale: number;
|
|
92
165
|
maxZoomScale: number;
|