@spiffcommerce/core 0.10.5 → 0.10.7

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
@@ -1103,11 +1103,63 @@ 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
  */
1109
1113
  getType(): _StepType1;
1110
1114
  }
1115
+ export class IllustrationStepHandle extends StepHandle<_IllustrationStepData1> {
1116
+ constructor(manager: WorkflowManager, step: _Step1<_IllustrationStepData1>);
1117
+ selectVariant(variant: _VariantResource1): Promise<void>;
1118
+ /**
1119
+ * Get colors for the illustration.
1120
+ * @returns A list of color definitions that are currently applied to the illustration.
1121
+ */
1122
+ getColors(): {
1123
+ [key: string]: import("@spiffcommerce/papyrus").ColorDefinition;
1124
+ };
1125
+ }
1126
+ interface TextChangeResult {
1127
+ input: string;
1128
+ helperText?: string;
1129
+ errorText?: string;
1130
+ }
1131
+ export class TextStepHandle extends StepHandle<_TextStepData1> {
1132
+ constructor(manager: WorkflowManager, step: _Step1<_TextStepData1>);
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[];
1138
+ /**
1139
+ * Changes the fill of text related to this step to the new fill value.
1140
+ * @param fill A new fill value to use.
1141
+ */
1142
+ setFill(fill: ColorOption): Promise<void>;
1143
+ /**
1144
+ * Gets the color currently applied to the element.
1145
+ */
1146
+ getFill(): string;
1147
+ /**
1148
+ * When true & the step has replaceable text configured the user will be
1149
+ * abled to edit the entire text string including the non-replaceable text.
1150
+ * @param shouldCustomizeAll When true the user can configure the entire text string.
1151
+ */
1152
+ setFullTextCustomization(shouldCustomizeAll: boolean): void;
1153
+ /**
1154
+ * Changes the text value of text related to this step to a new value.
1155
+ * @param userInput Input from the user.
1156
+ */
1157
+ setText(userInput: string): TextChangeResult;
1158
+ /**
1159
+ * Gets the text currently applied to the elements of this step.
1160
+ */
1161
+ getText(): string;
1162
+ }
1111
1163
  /**
1112
1164
  * A Workflow experience encapsulates the workflow manager and command context. It
1113
1165
  * provides a simplified interface for interacting with the workflow manager. You
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spiffcommerce/core",
3
- "version": "0.10.5",
3
+ "version": "0.10.7",
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",