@spiffcommerce/core 22.5.2 → 22.6.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 +33 -12
- package/dist/index.js +1716 -1642
- package/dist/index.umd.cjs +104 -82
- 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
|
*/
|
|
@@ -1151,11 +1158,14 @@ interface GlobalPropertyStateManager {
|
|
|
1151
1158
|
setAspect(name: string, value: string, storage?: GlobalPropertyStateAspectStorage | null): Promise<void>;
|
|
1152
1159
|
setAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, storage: S | null): Promise<void>;
|
|
1153
1160
|
setBundleOptions(bundleOptions?: BundleOptions): void;
|
|
1161
|
+
getBundleOptions(): BundleOptions | undefined;
|
|
1162
|
+
setConfiguration(configuration: GlobalPropertyConfiguration | undefined): void;
|
|
1154
1163
|
}
|
|
1155
1164
|
interface BundleOptions {
|
|
1156
1165
|
additionalHeaders?: {
|
|
1157
1166
|
[key: string]: string;
|
|
1158
1167
|
};
|
|
1168
|
+
eagerFetchProducts?: boolean;
|
|
1159
1169
|
}
|
|
1160
1170
|
|
|
1161
1171
|
/**
|
|
@@ -1508,6 +1518,11 @@ interface Bundle$1 {
|
|
|
1508
1518
|
*/
|
|
1509
1519
|
getGlobalPropertyConfiguration(): GlobalPropertyConfiguration | undefined;
|
|
1510
1520
|
setBundleOptions(bundleOptions?: BundleOptions): any;
|
|
1521
|
+
/**
|
|
1522
|
+
* Assigns a Product Collection to the Bundle. This will only succeed if the Bundle does not already have a Product Collection assigned to it.
|
|
1523
|
+
* @param productCollectionId The ID of the Product Collection to assign to this Bundle.
|
|
1524
|
+
*/
|
|
1525
|
+
assignProductCollection(productCollectionId: string): Promise<void>;
|
|
1511
1526
|
}
|
|
1512
1527
|
type BundleEventType = "conditional-global-properties-changed" | "workflow-experience-hover-enter" | "workflow-experience-hover-exit";
|
|
1513
1528
|
type BundleEventData = ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceHoverEventData;
|
|
@@ -1901,6 +1916,7 @@ declare class SpiffCommerceClient {
|
|
|
1901
1916
|
* @returns An array of bundle stakeholders.
|
|
1902
1917
|
*/
|
|
1903
1918
|
getBundleStakeholders(): Promise<BundleStakeholder[]>;
|
|
1919
|
+
private getStepTags;
|
|
1904
1920
|
/**
|
|
1905
1921
|
* Creates a new instance of WorkflowExperience. A high level wrapper for workflows.
|
|
1906
1922
|
* @param workflowId The id of the workflow to be run. Deprecated: Provide options instead.
|
|
@@ -2142,6 +2158,10 @@ interface WorkflowManager {
|
|
|
2142
2158
|
* The updated stakeholders and currentStakeholder overwrite the existing values on the Transaction object returned by `getTransaction()`.
|
|
2143
2159
|
*/
|
|
2144
2160
|
updateTransactionStakeholders(): Promise<void>;
|
|
2161
|
+
/**
|
|
2162
|
+
* Returns the tags for a step.
|
|
2163
|
+
*/
|
|
2164
|
+
getStepTags(stepId: string): string[];
|
|
2145
2165
|
}
|
|
2146
2166
|
|
|
2147
2167
|
interface StepService<T extends AnyStepData> {
|
|
@@ -3159,12 +3179,13 @@ declare class MockWorkflowManager implements WorkflowManager {
|
|
|
3159
3179
|
steps: Map<any, any>;
|
|
3160
3180
|
};
|
|
3161
3181
|
updateTransactionStakeholders(): Promise<void>;
|
|
3182
|
+
getStepTags(_stepId: string): string[];
|
|
3162
3183
|
}
|
|
3163
3184
|
|
|
3164
3185
|
declare const generateCommands: (designInputSteps: DesignInputStep[], workflow: Workflow, layouts: ILayout[], productOverlayImageUrl?: string) => Promise<CanvasCommand[]>;
|
|
3165
3186
|
|
|
3166
3187
|
declare class IllustrationStepHandle extends StepHandle<IllustrationStepData> {
|
|
3167
|
-
constructor(manager: WorkflowManager, step: Step<IllustrationStepData
|
|
3188
|
+
constructor(manager: WorkflowManager, step: Step<IllustrationStepData>, tags: string[]);
|
|
3168
3189
|
/**
|
|
3169
3190
|
* Allows for select a vector from the available vectors configured on this steps base option.
|
|
3170
3191
|
* @param variant The new vector variant to use for this step.
|
|
@@ -3197,7 +3218,7 @@ interface TextChangeResult {
|
|
|
3197
3218
|
errorText?: string;
|
|
3198
3219
|
}
|
|
3199
3220
|
declare class TextStepHandle extends StepHandle<TextStepData> implements CustomColorSupport {
|
|
3200
|
-
constructor(manager: WorkflowManager, step: Step<TextStepData
|
|
3221
|
+
constructor(manager: WorkflowManager, step: Step<TextStepData>, tags: string[]);
|
|
3201
3222
|
/**
|
|
3202
3223
|
* Allows for select a font from the available fonts configured on this steps base option.
|
|
3203
3224
|
* @param variant The font variant to use.
|
|
@@ -3260,7 +3281,7 @@ declare class TextStepHandle extends StepHandle<TextStepData> implements CustomC
|
|
|
3260
3281
|
}
|
|
3261
3282
|
|
|
3262
3283
|
declare class PictureStepHandle extends StepHandle<PictureStepData> {
|
|
3263
|
-
constructor(manager: WorkflowManager, step: Step<PictureStepData
|
|
3284
|
+
constructor(manager: WorkflowManager, step: Step<PictureStepData>, tags: string[]);
|
|
3264
3285
|
/**
|
|
3265
3286
|
* Allows the user to select an image variant from the available variants configured on this steps base option.
|
|
3266
3287
|
* @param variant The new image variant to use.
|
|
@@ -3344,7 +3365,7 @@ declare class ParseError extends ImplementationError {
|
|
|
3344
3365
|
}
|
|
3345
3366
|
|
|
3346
3367
|
declare class ModelStepHandle extends StepHandle<ModelStepData> {
|
|
3347
|
-
constructor(manager: WorkflowManager, step: Step<ModelStepData
|
|
3368
|
+
constructor(manager: WorkflowManager, step: Step<ModelStepData>, tags: string[]);
|
|
3348
3369
|
selectVariant(variant: Variant): Promise<void>;
|
|
3349
3370
|
}
|
|
3350
3371
|
|
|
@@ -3354,7 +3375,7 @@ declare enum FrameStep {
|
|
|
3354
3375
|
Position = "Position"
|
|
3355
3376
|
}
|
|
3356
3377
|
declare class FrameStepHandle extends StepHandle<FrameStepData> {
|
|
3357
|
-
constructor(manager: WorkflowManager, step: Step<FrameStepData
|
|
3378
|
+
constructor(manager: WorkflowManager, step: Step<FrameStepData>, tags: string[]);
|
|
3358
3379
|
private frameService;
|
|
3359
3380
|
selectVariant(variant: Variant): Promise<void>;
|
|
3360
3381
|
onFrameDataChanged(callback: (frameData: FrameData$1[]) => void): void;
|
|
@@ -3404,12 +3425,12 @@ declare class FrameStepHandle extends StepHandle<FrameStepData> {
|
|
|
3404
3425
|
}
|
|
3405
3426
|
|
|
3406
3427
|
declare class MaterialStepHandle extends StepHandle<MaterialStepData> {
|
|
3407
|
-
constructor(manager: WorkflowManager, step: Step<MaterialStepData
|
|
3428
|
+
constructor(manager: WorkflowManager, step: Step<MaterialStepData>, tags: string[]);
|
|
3408
3429
|
selectVariant(variant: Variant): Promise<void>;
|
|
3409
3430
|
}
|
|
3410
3431
|
|
|
3411
3432
|
declare class QuestionStepHandle extends StepHandle<QuestionStepData> {
|
|
3412
|
-
constructor(manager: WorkflowManager, step: Step<QuestionStepData
|
|
3433
|
+
constructor(manager: WorkflowManager, step: Step<QuestionStepData>, tags: string[]);
|
|
3413
3434
|
selectVariant(variant: Variant): Promise<void>;
|
|
3414
3435
|
/**
|
|
3415
3436
|
* The way that this step expects to be rendered.
|
|
@@ -3418,7 +3439,7 @@ declare class QuestionStepHandle extends StepHandle<QuestionStepData> {
|
|
|
3418
3439
|
}
|
|
3419
3440
|
|
|
3420
3441
|
declare class ShapeStepHandle extends StepHandle<ShapeStepData> implements CustomColorSupport {
|
|
3421
|
-
constructor(manager: WorkflowManager, step: Step<ShapeStepData
|
|
3442
|
+
constructor(manager: WorkflowManager, step: Step<ShapeStepData>, tags: string[]);
|
|
3422
3443
|
selectVariant(variant: Variant): Promise<void>;
|
|
3423
3444
|
/**
|
|
3424
3445
|
* Sets the color of the shape.
|
|
@@ -3447,7 +3468,7 @@ declare class ShapeStepHandle extends StepHandle<ShapeStepData> implements Custo
|
|
|
3447
3468
|
declare const shortenUrl: (longUrl: string) => Promise<string>;
|
|
3448
3469
|
|
|
3449
3470
|
declare class InformationStepHandle extends StepHandle<InformationStepData> {
|
|
3450
|
-
constructor(manager: WorkflowManager, step: Step<InformationStepData
|
|
3471
|
+
constructor(manager: WorkflowManager, step: Step<InformationStepData>, tags: string[]);
|
|
3451
3472
|
selectVariant(): Promise<void>;
|
|
3452
3473
|
/**
|
|
3453
3474
|
* The way that this step expects to be rendered.
|
|
@@ -3513,7 +3534,7 @@ declare function browserColorToHex(color: string): string;
|
|
|
3513
3534
|
* the hosted content by scanning the QR.
|
|
3514
3535
|
*/
|
|
3515
3536
|
declare class DigitalContentStepHandle extends StepHandle<DigitalContentStepData> {
|
|
3516
|
-
constructor(manager: WorkflowManager, step: Step<DigitalContentStepData
|
|
3537
|
+
constructor(manager: WorkflowManager, step: Step<DigitalContentStepData>, tags: string[]);
|
|
3517
3538
|
selectVariant(): Promise<void>;
|
|
3518
3539
|
/**
|
|
3519
3540
|
* Returns a preview URL used to show the generated QR code in your UI.
|
|
@@ -3528,7 +3549,7 @@ declare class DigitalContentStepHandle extends StepHandle<DigitalContentStepData
|
|
|
3528
3549
|
}
|
|
3529
3550
|
|
|
3530
3551
|
declare class ModuleStepHandle extends StepHandle<ModuleStepData> {
|
|
3531
|
-
constructor(manager: WorkflowManager, step: Step<ModuleStepData
|
|
3552
|
+
constructor(manager: WorkflowManager, step: Step<ModuleStepData>, tags: string[]);
|
|
3532
3553
|
selectVariant(): Promise<void>;
|
|
3533
3554
|
/**
|
|
3534
3555
|
* Return the remaining amount of characters that
|