@spiffcommerce/core 22.5.1 → 22.5.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/index.d.ts +26 -13
- package/dist/index.js +1981 -1942
- package/dist/index.umd.cjs +118 -106
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -523,7 +523,11 @@ declare abstract class StepHandle<T extends AnyStepData> {
|
|
|
523
523
|
* The step metadata, useful for determining logic based on configuration.
|
|
524
524
|
*/
|
|
525
525
|
protected readonly step: Step<T>;
|
|
526
|
-
|
|
526
|
+
/**
|
|
527
|
+
* The tags set against this step.
|
|
528
|
+
*/
|
|
529
|
+
protected readonly tags: string[];
|
|
530
|
+
constructor(manager: WorkflowManager, step: Step<T>, tags: string[]);
|
|
527
531
|
/**
|
|
528
532
|
* Set the current update state of this step. All step handles pointing to this step will
|
|
529
533
|
* see this value.
|
|
@@ -706,6 +710,9 @@ interface ExperienceOptions {
|
|
|
706
710
|
product: Product;
|
|
707
711
|
transaction: Transaction;
|
|
708
712
|
workflow?: Workflow;
|
|
713
|
+
stepTags?: {
|
|
714
|
+
[stepId: string]: string[];
|
|
715
|
+
};
|
|
709
716
|
/**
|
|
710
717
|
* @deprecated favor inject / eject functions.
|
|
711
718
|
*/
|
|
@@ -1901,6 +1908,7 @@ declare class SpiffCommerceClient {
|
|
|
1901
1908
|
* @returns An array of bundle stakeholders.
|
|
1902
1909
|
*/
|
|
1903
1910
|
getBundleStakeholders(): Promise<BundleStakeholder[]>;
|
|
1911
|
+
private getStepTags;
|
|
1904
1912
|
/**
|
|
1905
1913
|
* Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
|
|
1906
1914
|
* @param workflowId The id of the workflow to be run. Deprecated: Provide options instead.
|
|
@@ -2142,6 +2150,10 @@ interface WorkflowManager {
|
|
|
2142
2150
|
* The updated stakeholders and currentStakeholder overwrite the existing values on the Transaction object returned by `getTransaction()`.
|
|
2143
2151
|
*/
|
|
2144
2152
|
updateTransactionStakeholders(): Promise<void>;
|
|
2153
|
+
/**
|
|
2154
|
+
* Returns the tags for a step.
|
|
2155
|
+
*/
|
|
2156
|
+
getStepTags(stepId: string): string[];
|
|
2145
2157
|
}
|
|
2146
2158
|
|
|
2147
2159
|
interface StepService<T extends AnyStepData> {
|
|
@@ -3159,12 +3171,13 @@ declare class MockWorkflowManager implements WorkflowManager {
|
|
|
3159
3171
|
steps: Map<any, any>;
|
|
3160
3172
|
};
|
|
3161
3173
|
updateTransactionStakeholders(): Promise<void>;
|
|
3174
|
+
getStepTags(_stepId: string): string[];
|
|
3162
3175
|
}
|
|
3163
3176
|
|
|
3164
3177
|
declare const generateCommands: (designInputSteps: DesignInputStep[], workflow: Workflow, layouts: ILayout[], productOverlayImageUrl?: string) => Promise<CanvasCommand[]>;
|
|
3165
3178
|
|
|
3166
3179
|
declare class IllustrationStepHandle extends StepHandle<IllustrationStepData> {
|
|
3167
|
-
constructor(manager: WorkflowManager, step: Step<IllustrationStepData
|
|
3180
|
+
constructor(manager: WorkflowManager, step: Step<IllustrationStepData>, tags: string[]);
|
|
3168
3181
|
/**
|
|
3169
3182
|
* Allows for select a vector from the available vectors configured on this steps base option.
|
|
3170
3183
|
* @param variant The new vector variant to use for this step.
|
|
@@ -3197,7 +3210,7 @@ interface TextChangeResult {
|
|
|
3197
3210
|
errorText?: string;
|
|
3198
3211
|
}
|
|
3199
3212
|
declare class TextStepHandle extends StepHandle<TextStepData> implements CustomColorSupport {
|
|
3200
|
-
constructor(manager: WorkflowManager, step: Step<TextStepData
|
|
3213
|
+
constructor(manager: WorkflowManager, step: Step<TextStepData>, tags: string[]);
|
|
3201
3214
|
/**
|
|
3202
3215
|
* Allows for select a font from the available fonts configured on this steps base option.
|
|
3203
3216
|
* @param variant The font variant to use.
|
|
@@ -3260,7 +3273,7 @@ declare class TextStepHandle extends StepHandle<TextStepData> implements CustomC
|
|
|
3260
3273
|
}
|
|
3261
3274
|
|
|
3262
3275
|
declare class PictureStepHandle extends StepHandle<PictureStepData> {
|
|
3263
|
-
constructor(manager: WorkflowManager, step: Step<PictureStepData
|
|
3276
|
+
constructor(manager: WorkflowManager, step: Step<PictureStepData>, tags: string[]);
|
|
3264
3277
|
/**
|
|
3265
3278
|
* Allows the user to select an image variant from the available variants configured on this steps base option.
|
|
3266
3279
|
* @param variant The new image variant to use.
|
|
@@ -3344,7 +3357,7 @@ declare class ParseError extends ImplementationError {
|
|
|
3344
3357
|
}
|
|
3345
3358
|
|
|
3346
3359
|
declare class ModelStepHandle extends StepHandle<ModelStepData> {
|
|
3347
|
-
constructor(manager: WorkflowManager, step: Step<ModelStepData
|
|
3360
|
+
constructor(manager: WorkflowManager, step: Step<ModelStepData>, tags: string[]);
|
|
3348
3361
|
selectVariant(variant: Variant): Promise<void>;
|
|
3349
3362
|
}
|
|
3350
3363
|
|
|
@@ -3354,7 +3367,7 @@ declare enum FrameStep {
|
|
|
3354
3367
|
Position = "Position"
|
|
3355
3368
|
}
|
|
3356
3369
|
declare class FrameStepHandle extends StepHandle<FrameStepData> {
|
|
3357
|
-
constructor(manager: WorkflowManager, step: Step<FrameStepData
|
|
3370
|
+
constructor(manager: WorkflowManager, step: Step<FrameStepData>, tags: string[]);
|
|
3358
3371
|
private frameService;
|
|
3359
3372
|
selectVariant(variant: Variant): Promise<void>;
|
|
3360
3373
|
onFrameDataChanged(callback: (frameData: FrameData$1[]) => void): void;
|
|
@@ -3404,12 +3417,12 @@ declare class FrameStepHandle extends StepHandle<FrameStepData> {
|
|
|
3404
3417
|
}
|
|
3405
3418
|
|
|
3406
3419
|
declare class MaterialStepHandle extends StepHandle<MaterialStepData> {
|
|
3407
|
-
constructor(manager: WorkflowManager, step: Step<MaterialStepData
|
|
3420
|
+
constructor(manager: WorkflowManager, step: Step<MaterialStepData>, tags: string[]);
|
|
3408
3421
|
selectVariant(variant: Variant): Promise<void>;
|
|
3409
3422
|
}
|
|
3410
3423
|
|
|
3411
3424
|
declare class QuestionStepHandle extends StepHandle<QuestionStepData> {
|
|
3412
|
-
constructor(manager: WorkflowManager, step: Step<QuestionStepData
|
|
3425
|
+
constructor(manager: WorkflowManager, step: Step<QuestionStepData>, tags: string[]);
|
|
3413
3426
|
selectVariant(variant: Variant): Promise<void>;
|
|
3414
3427
|
/**
|
|
3415
3428
|
* The way that this step expects to be rendered.
|
|
@@ -3418,7 +3431,7 @@ declare class QuestionStepHandle extends StepHandle<QuestionStepData> {
|
|
|
3418
3431
|
}
|
|
3419
3432
|
|
|
3420
3433
|
declare class ShapeStepHandle extends StepHandle<ShapeStepData> implements CustomColorSupport {
|
|
3421
|
-
constructor(manager: WorkflowManager, step: Step<ShapeStepData
|
|
3434
|
+
constructor(manager: WorkflowManager, step: Step<ShapeStepData>, tags: string[]);
|
|
3422
3435
|
selectVariant(variant: Variant): Promise<void>;
|
|
3423
3436
|
/**
|
|
3424
3437
|
* Sets the color of the shape.
|
|
@@ -3447,7 +3460,7 @@ declare class ShapeStepHandle extends StepHandle<ShapeStepData> implements Custo
|
|
|
3447
3460
|
declare const shortenUrl: (longUrl: string) => Promise<string>;
|
|
3448
3461
|
|
|
3449
3462
|
declare class InformationStepHandle extends StepHandle<InformationStepData> {
|
|
3450
|
-
constructor(manager: WorkflowManager, step: Step<InformationStepData
|
|
3463
|
+
constructor(manager: WorkflowManager, step: Step<InformationStepData>, tags: string[]);
|
|
3451
3464
|
selectVariant(): Promise<void>;
|
|
3452
3465
|
/**
|
|
3453
3466
|
* The way that this step expects to be rendered.
|
|
@@ -3513,7 +3526,7 @@ declare function browserColorToHex(color: string): string;
|
|
|
3513
3526
|
* the hosted content by scanning the QR.
|
|
3514
3527
|
*/
|
|
3515
3528
|
declare class DigitalContentStepHandle extends StepHandle<DigitalContentStepData> {
|
|
3516
|
-
constructor(manager: WorkflowManager, step: Step<DigitalContentStepData
|
|
3529
|
+
constructor(manager: WorkflowManager, step: Step<DigitalContentStepData>, tags: string[]);
|
|
3517
3530
|
selectVariant(): Promise<void>;
|
|
3518
3531
|
/**
|
|
3519
3532
|
* Returns a preview URL used to show the generated QR code in your UI.
|
|
@@ -3528,7 +3541,7 @@ declare class DigitalContentStepHandle extends StepHandle<DigitalContentStepData
|
|
|
3528
3541
|
}
|
|
3529
3542
|
|
|
3530
3543
|
declare class ModuleStepHandle extends StepHandle<ModuleStepData> {
|
|
3531
|
-
constructor(manager: WorkflowManager, step: Step<ModuleStepData
|
|
3544
|
+
constructor(manager: WorkflowManager, step: Step<ModuleStepData>, tags: string[]);
|
|
3532
3545
|
selectVariant(): Promise<void>;
|
|
3533
3546
|
/**
|
|
3534
3547
|
* Return the remaining amount of characters that
|
|
@@ -3544,4 +3557,4 @@ declare class ModuleStepHandle extends StepHandle<ModuleStepData> {
|
|
|
3544
3557
|
setText(value: string): void;
|
|
3545
3558
|
}
|
|
3546
3559
|
|
|
3547
|
-
export { AddonHandle, ArrayInput, AssetNotFoundError, Bundle$1 as Bundle, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, CollectionProduct, ColorOption, ColorOptionGlobalPropertyHandle, ConditionalGlobalPropertiesChangedEventData, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, DigitalContentStepHandle, EditedSteps, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, FrameThresholdSettings, GetNewWorkflowOptions, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, IntegrationProduct, IntegrationType, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, ModuleStepHandle, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, ParseError, PictureStepHandle, PmsSearchResult, Product, ProductCameraRig, ProductCollection, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextGlobalPropertyHandle, TextInput, TextStepHandle, TextStepStorage, ToastCallback, Transaction, TransactionShareAction, TransactionShareActionType, Transform, TransformCollection$1 as TransformCollection, UnhandledBehaviorError, Variant, Vector3, WorkflowExperience, WorkflowExperienceEventType, WorkflowExperienceHoverEventData, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, browserColorToHex, createDesign, designService, digitalContentStepService, findPmsColors, frameStepService, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, matchHexToPms, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, pmsToRgb, questionStepService, rgbToPms, setBearerAuthenticationToken, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
|
|
3560
|
+
export { AddonHandle, ArrayInput, AssetNotFoundError, Bundle$1 as Bundle, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, CollectionProduct, ColorOption, ColorOptionGlobalPropertyHandle, ConditionalGlobalPropertiesChangedEventData, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, DigitalContentStepHandle, EditedSteps, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, FrameThresholdSettings, GetNewWorkflowOptions, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, Integration, IntegrationProduct, IntegrationType, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, ModuleStepHandle, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, ParseError, PictureStepHandle, PmsSearchResult, Product, ProductCameraRig, ProductCollection, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextGlobalPropertyHandle, TextInput, TextStepHandle, TextStepStorage, ToastCallback, Transaction, TransactionShareAction, TransactionShareActionType, Transform, TransformCollection$1 as TransformCollection, UnhandledBehaviorError, Variant, Vector3, WorkflowExperience, WorkflowExperienceEventType, WorkflowExperienceHoverEventData, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, browserColorToHex, createDesign, designService, digitalContentStepService, findPmsColors, frameStepService, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, matchHexToPms, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, pmsToRgb, questionStepService, rgbToPms, setBearerAuthenticationToken, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
|