@spiffcommerce/core 0.10.6 → 0.10.8

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
@@ -301,7 +301,7 @@ declare class PictureStepService implements StepService<_PictureStepData1> {
301
301
  export const pictureStepService: PictureStepService;
302
302
  declare class QuestionStepService implements StepService<_QuestionStepData1> {
303
303
  init(stepData: _Step1<_QuestionStepData1>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<null | (() => Promise<void>)>;
304
- selectVariant(stepData: _Step1<_QuestionStepData1>, variantId: string, workflowManager: WorkflowManager): void;
304
+ selectVariant(stepData: _Step1<_QuestionStepData1>, variantId: string, workflowManager: WorkflowManager): Promise<void>;
305
305
  }
306
306
  export const questionStepService: QuestionStepService;
307
307
  declare class ShapeStepService implements StepService<_ShapeStepData1> {
@@ -1103,6 +1103,10 @@ export abstract class StepHandle<T extends _AnyStepData1> {
1103
1103
  * that would be triggered will also be executed.
1104
1104
  */
1105
1105
  abstract selectVariant(variant: _VariantResource1): Promise<void>;
1106
+ /**
1107
+ * @returns The name of the step
1108
+ */
1109
+ getName(): string;
1106
1110
  /**
1107
1111
  * @returns The type of the step handle.
1108
1112
  */
@@ -1127,11 +1131,19 @@ interface TextChangeResult {
1127
1131
  export class TextStepHandle extends StepHandle<_TextStepData1> {
1128
1132
  constructor(manager: WorkflowManager, step: _Step1<_TextStepData1>);
1129
1133
  selectVariant(variant: _VariantResource1): Promise<void>;
1134
+ /**
1135
+ * @returns A list of colors that can be used to fill the text.
1136
+ */
1137
+ getAvailableColors(): ColorOption[];
1130
1138
  /**
1131
1139
  * Changes the fill of text related to this step to the new fill value.
1132
1140
  * @param fill A new fill value to use.
1133
1141
  */
1134
1142
  setFill(fill: ColorOption): Promise<void>;
1143
+ /**
1144
+ * Gets the color currently applied to the element.
1145
+ */
1146
+ getFill(): string;
1135
1147
  /**
1136
1148
  * When true & the step has replaceable text configured the user will be
1137
1149
  * abled to edit the entire text string including the non-replaceable text.
@@ -1143,6 +1155,10 @@ export class TextStepHandle extends StepHandle<_TextStepData1> {
1143
1155
  * @param userInput Input from the user.
1144
1156
  */
1145
1157
  setText(userInput: string): TextChangeResult;
1158
+ /**
1159
+ * Gets the text currently applied to the elements of this step.
1160
+ */
1161
+ getText(): string;
1146
1162
  }
1147
1163
  /**
1148
1164
  * A Workflow experience encapsulates the workflow manager and command context. It
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "0.10.6",
3
+ "version": "0.10.8",
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",