@spiffcommerce/core 14.9.0 → 14.11.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/main.js +71 -56
- package/dist/module.js +66 -51
- package/dist/types.d.ts +39 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -340,11 +340,13 @@ declare class QuestionStepService implements StepService<_QuestionStepData1> {
|
|
|
340
340
|
}
|
|
341
341
|
export const questionStepService: QuestionStepService;
|
|
342
342
|
declare class ShapeStepService implements StepService<_ShapeStepData1> {
|
|
343
|
+
readonly shapeFillId = "spiff-fill-shape";
|
|
343
344
|
availableColours(stepData: _Step1<_ShapeStepData1>): Promise<{
|
|
344
345
|
fill: string | undefined;
|
|
345
346
|
stroke: string | undefined;
|
|
346
347
|
variant: _VariantResource1;
|
|
347
348
|
}[]>;
|
|
349
|
+
setCustomColor(color: string, stepData: _Step1<_ShapeStepData1>, manager: WorkflowManager): void;
|
|
348
350
|
init(stepData: _Step1<_ShapeStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<CommandWithFollowup | null>;
|
|
349
351
|
selectVariant(stepData: _Step1<_ShapeStepData1>, colourOption: ColorOption, elements: RegionElement[], workflowManager: WorkflowManager): Promise<void>;
|
|
350
352
|
}
|
|
@@ -550,7 +552,7 @@ export interface WorkflowManager {
|
|
|
550
552
|
* @deprecated State updates are being pulled internally. This function will be removed in the future.
|
|
551
553
|
*/
|
|
552
554
|
updateStateWithServerImmediate: (getReducerState: () => _CommandState1) => Promise<void>;
|
|
553
|
-
updateStorage: (stepName: string, update: _StepStorage1) =>
|
|
555
|
+
updateStorage: (stepName: string, update: _StepStorage1) => void;
|
|
554
556
|
getModelContainer: () => any | undefined;
|
|
555
557
|
setModelContainer: (container: any) => void;
|
|
556
558
|
/**
|
|
@@ -1156,6 +1158,14 @@ declare class AssetService implements AssetManager {
|
|
|
1156
1158
|
* Allows for retrieving an asset, returns the option from a cache if possible.
|
|
1157
1159
|
*/
|
|
1158
1160
|
getLocalOrFromServer(assetKey: string): Promise<_Asset1>;
|
|
1161
|
+
/**
|
|
1162
|
+
* Caches an asset if it doesn't already exist.
|
|
1163
|
+
*/
|
|
1164
|
+
cacheAsset(asset: _Asset1): void;
|
|
1165
|
+
/**
|
|
1166
|
+
* Caches a material if it doesn't already exist.
|
|
1167
|
+
*/
|
|
1168
|
+
cacheMaterial(material: MaterialResource): void;
|
|
1159
1169
|
/**
|
|
1160
1170
|
* Allows for retrieving amaterial, returns the option from a cache if possible.
|
|
1161
1171
|
* @param id The option ID to be retrieved.
|
|
@@ -1644,6 +1654,12 @@ export class ShapeStepHandle extends StepHandle<_ShapeStepData1> {
|
|
|
1644
1654
|
stroke: string | undefined;
|
|
1645
1655
|
variant: import("@spiffcommerce/papyrus").VariantResource;
|
|
1646
1656
|
}[]>;
|
|
1657
|
+
/**
|
|
1658
|
+
* Allows for setting a custom color when the custom variant is selected. Will
|
|
1659
|
+
* throw when a non-custom variant is selected.
|
|
1660
|
+
*/
|
|
1661
|
+
setCustomColor(color: string): void;
|
|
1662
|
+
getCustomColor(): string;
|
|
1647
1663
|
}
|
|
1648
1664
|
interface TextChangeResult {
|
|
1649
1665
|
input: string;
|
|
@@ -2123,16 +2139,38 @@ export interface Bundle {
|
|
|
2123
2139
|
* @param experience The workflow experience to add to this bundle.
|
|
2124
2140
|
*/
|
|
2125
2141
|
addWorkflowExperience(experience: WorkflowExperience): Promise<void>;
|
|
2142
|
+
/**
|
|
2143
|
+
* Adds multiple workflow experiences to this bundle.
|
|
2144
|
+
* @param experiences The workflow experiences to add to this bundle.
|
|
2145
|
+
*/
|
|
2146
|
+
addWorkflowExperiences(experiences: WorkflowExperience[]): Promise<void>;
|
|
2126
2147
|
/**
|
|
2127
2148
|
* Remove a workflow experience from this bundle.
|
|
2128
2149
|
* @param experience The workflow experience to remove from this bundle.
|
|
2129
2150
|
*/
|
|
2130
2151
|
removeWorkflowExperience(experience: WorkflowExperience): Promise<void>;
|
|
2152
|
+
/**
|
|
2153
|
+
* Removes multiple workflow experiences from this bundle.
|
|
2154
|
+
* @param experiences The workflow experiences to remove from this bundle.
|
|
2155
|
+
*/
|
|
2156
|
+
removeWorkflowExperiences(experiences: WorkflowExperience[]): Promise<void>;
|
|
2131
2157
|
/**
|
|
2132
2158
|
* Remove a workflow experience from this bundle by transaction.
|
|
2133
2159
|
* @param transaction The transaction to remove from this bundle.
|
|
2134
2160
|
*/
|
|
2135
2161
|
removeWorkflowExperienceByTransaction(transaction: Transaction): Promise<void>;
|
|
2162
|
+
/**
|
|
2163
|
+
* Removes multiple workflow experiences from this bundle by their transactions.
|
|
2164
|
+
* @param transactions The transactions to remove from this bundle.
|
|
2165
|
+
*/
|
|
2166
|
+
removeWorkflowExperiencesByTransactions(transactions: Transaction[]): Promise<void>;
|
|
2167
|
+
/**
|
|
2168
|
+
* Inserts the given workflow experience into the bundle at the given index.
|
|
2169
|
+
* NOTE: If you intend to insert a workflow experience at the end of the bundle, use `addWorkflowExperience` instead as it is more efficient.
|
|
2170
|
+
* @param experience The workflow experience to insert.
|
|
2171
|
+
* @param index The index to insert the workflow experience at.
|
|
2172
|
+
*/
|
|
2173
|
+
insertWorkflowExperience(experience: WorkflowExperience, index: number): Promise<void>;
|
|
2136
2174
|
/**
|
|
2137
2175
|
* Returns all workflow experiences currently added to this bundle.
|
|
2138
2176
|
*/
|