@spiffcommerce/core 26.18.0 → 26.20.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/CHANGELOG.md CHANGED
@@ -14,6 +14,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
  - `Fixed` for any bug fixes.
15
15
  - `Security` in case of vulnerabilities.
16
16
 
17
+ ## [26.20.0] - 31-03-2025
18
+
19
+ ### Added
20
+
21
+ - Added new methods to the `FileUploadGlobalPropertyHandle` for overriding SVG colors:
22
+ - `getImageWithColors`: Returns a promise that resolves with the current image with the current color configuration, if applicable.
23
+ - `getAvailableColors`: Returns the colors from the configured color option.
24
+ - `getCurrentColors`: Returns the current color configuration.
25
+ - `isColorPickerEnabled` and `isPmsPickerEnabled`: Return whether the color picker and pms picker are enabled, respectively.
26
+ - `getOriginalColors`: Returns a promise that resolves with the original color configuration of the image asset.
27
+ - `changeColors`: Updates the current color configuration and propagates the changes to all connected workflow experiences.
28
+
29
+ ## [26.19.0] - 26-03-2025
30
+
31
+ ### Added
32
+
33
+ - The `generateQuoteId` method on bundles.
34
+
17
35
  ## [26.18.0] - 24-03-2025
18
36
 
19
37
  ### Added
package/dist/index.d.ts CHANGED
@@ -1372,7 +1372,11 @@ declare abstract class GlobalPropertyHandle {
1372
1372
  * A file upload global property allows for setting a frame image against all shared steps.
1373
1373
  */
1374
1374
  declare class FileUploadGlobalPropertyHandle extends GlobalPropertyHandle {
1375
+ private colorOption?;
1376
+ private imageData?;
1375
1377
  constructor(bundle: Bundle$1, property: GlobalPropertyConfigurationAspect);
1378
+ initialize(): Promise<FileUploadGlobalPropertyHandle>;
1379
+ private loadImageData;
1376
1380
  /**
1377
1381
  * Select an image to be used for all shared steps.
1378
1382
  * @param asset The asset to use.
@@ -1395,6 +1399,7 @@ declare class FileUploadGlobalPropertyHandle extends GlobalPropertyHandle {
1395
1399
  * @returns A promise that resolves with an `Asset` object if one is assigned to the state, otherwise `undefined`.
1396
1400
  */
1397
1401
  getImage(): Promise<Asset | undefined>;
1402
+ getImageWithColors(): Promise<string | undefined>;
1398
1403
  /**
1399
1404
  * Retrieves the original, unmodified image selection, if one exists.
1400
1405
  * @returns A promise that resolves with an `Asset` object if one is assigned to the state, otherwise `undefined`.
@@ -1408,6 +1413,18 @@ declare class FileUploadGlobalPropertyHandle extends GlobalPropertyHandle {
1408
1413
  getUseOriginalImage(): boolean;
1409
1414
  setUseOriginalImage(value: boolean): Promise<void>;
1410
1415
  applyGlobalState(targetExperiences?: WorkflowExperience[]): Promise<void>;
1416
+ getAvailableColors(): ColorOption[];
1417
+ getCurrentColors(): {
1418
+ [key: string]: ColorDefinition;
1419
+ } | undefined;
1420
+ isColorPickerEnabled(): boolean;
1421
+ isPmsPickerEnabled(): boolean;
1422
+ getOriginalColors(): Promise<{
1423
+ [key: string]: ColorDefinition;
1424
+ } | undefined>;
1425
+ changeColors(newFills: {
1426
+ [key: string]: ColorDefinition;
1427
+ }): Promise<void>;
1411
1428
  private applyImageSelection;
1412
1429
  private updateSharedStepStorage;
1413
1430
  }
@@ -1708,6 +1725,7 @@ interface Bundle$1 {
1708
1725
  * @returns The name of the bundle.
1709
1726
  */
1710
1727
  getName(): string;
1728
+ getQuoteId(): string | undefined;
1711
1729
  /**
1712
1730
  * Set the name of the bundle.
1713
1731
  * @param name The new name for the bundle.
@@ -1912,6 +1930,7 @@ interface Bundle$1 {
1912
1930
  reject(note?: string): Promise<void>;
1913
1931
  attachAddress(streetAddress?: string, apartment?: string, city?: string, country?: string, state?: string, postCode?: string): Promise<void>;
1914
1932
  attachOrganization(name: string): Promise<void>;
1933
+ generateQuoteId(): Promise<string>;
1915
1934
  }
1916
1935
  type BundleEventType = "conditional-global-properties-changed" | "workflow-experience-hover-enter" | "workflow-experience-hover-exit";
1917
1936
  type BundleEventData = ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceHoverEventData;
@@ -2716,6 +2735,15 @@ interface GlobalPropertyConfigurationAspect {
2716
2735
  description: string;
2717
2736
  entityId?: string;
2718
2737
  conditions?: GlobalPropertyConfigurationAspectCondition[];
2738
+ data?: GlobalPropertyConfigurationAspectData;
2739
+ }
2740
+ interface GlobalPropertyConfigurationAspectData {
2741
+ fileUpload: GlobalPropertyConfigurationAspectFileUploadData;
2742
+ }
2743
+ interface GlobalPropertyConfigurationAspectFileUploadData {
2744
+ colorPickerEnabled?: boolean;
2745
+ pmsPickerEnabled?: boolean;
2746
+ colorOptionId?: string;
2719
2747
  }
2720
2748
  interface GlobalPropertyConfigurationAspectCondition {
2721
2749
  targetAspectName?: string;
@@ -3949,6 +3977,7 @@ interface Bundle {
3949
3977
  workflowViewerLink: string;
3950
3978
  workflowViewerAmendLink: string;
3951
3979
  workflowViewerReadOnlyLink: string;
3980
+ quoteId?: string;
3952
3981
  }
3953
3982
  interface BundleStakeholder {
3954
3983
  id: string;
@@ -4001,6 +4030,12 @@ type GlobalPropertyStateFileUploadStorage = {
4001
4030
  originalAssetKey?: string;
4002
4031
  backgroundRemovedAssetKey?: string;
4003
4032
  useOriginalAsset?: boolean;
4033
+ colors?: GlobalPropertyStateIllustrationColor[];
4034
+ };
4035
+ type GlobalPropertyStateIllustrationColor = {
4036
+ key: string;
4037
+ browserValue: string;
4038
+ pmsValue?: string;
4004
4039
  };
4005
4040
  type GlobalPropertyStateColorOptionStorage = {
4006
4041
  customColor?: string;
@@ -4646,7 +4681,7 @@ declare class FrameStepService implements StepService<FrameStepData> {
4646
4681
  /**
4647
4682
  * Grab the source to be used for a frame from the variant or throw otherwise.
4648
4683
  */
4649
- private patternSource;
4684
+ static patternSource(asset: Asset): string;
4650
4685
  private loadPatternFromAsset;
4651
4686
  }
4652
4687
  declare const frameStepService: FrameStepService;
@@ -5137,7 +5172,7 @@ declare enum FrameStep {
5137
5172
  Position = "Position"
5138
5173
  }
5139
5174
  declare class FrameStepHandle extends StepHandle<FrameStepData> {
5140
- frameService: any;
5175
+ frameService: FrameService;
5141
5176
  constructor(manager: WorkflowManager, step: Step<FrameStepData>, tags: string[]);
5142
5177
  selectVariant(variant: Variant): Promise<void>;
5143
5178
  onFrameDataChanged(callback: (frameData: FrameData[]) => void): void;