@spiffcommerce/core 14.10.0 → 14.12.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/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) => Promise<void>;
555
+ updateStorage: (stepName: string, update: _StepStorage1) => void;
554
556
  getModelContainer: () => any | undefined;
555
557
  setModelContainer: (container: any) => void;
556
558
  /**
@@ -1652,6 +1654,12 @@ export class ShapeStepHandle extends StepHandle<_ShapeStepData1> {
1652
1654
  stroke: string | undefined;
1653
1655
  variant: import("@spiffcommerce/papyrus").VariantResource;
1654
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;
1655
1663
  }
1656
1664
  interface TextChangeResult {
1657
1665
  input: string;
@@ -2163,6 +2171,16 @@ export interface Bundle {
2163
2171
  * @param index The index to insert the workflow experience at.
2164
2172
  */
2165
2173
  insertWorkflowExperience(experience: WorkflowExperience, index: number): Promise<void>;
2174
+ /**
2175
+ * Replaces a workflow experience at the given index with the given workflow experience. This essentially removes the old one and inserts the new one.
2176
+ * @param index The index to replace the workflow experience at.
2177
+ * @param experience The workflow experience to replace the old one with.
2178
+ */
2179
+ replaceWorkflowExperience(index: number, experience: WorkflowExperience): Promise<void>;
2180
+ /**
2181
+ * Swaps the workflow experiences at the given indices.
2182
+ */
2183
+ swapWorkflowExperiences(a: number, b: number): Promise<void>;
2166
2184
  /**
2167
2185
  * Returns all workflow experiences currently added to this bundle.
2168
2186
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "14.10.0",
3
+ "version": "14.12.0",
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",