@spiffcommerce/core 26.19.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 +12 -1
- package/dist/index.d.ts +34 -2
- package/dist/index.js +125 -113
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +883 -773
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,12 +14,23 @@ 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.
|
|
17
28
|
|
|
18
29
|
## [26.19.0] - 26-03-2025
|
|
19
30
|
|
|
20
31
|
### Added
|
|
21
32
|
|
|
22
|
-
-
|
|
33
|
+
- The `generateQuoteId` method on bundles.
|
|
23
34
|
|
|
24
35
|
## [26.18.0] - 24-03-2025
|
|
25
36
|
|
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
|
}
|
|
@@ -2718,6 +2735,15 @@ interface GlobalPropertyConfigurationAspect {
|
|
|
2718
2735
|
description: string;
|
|
2719
2736
|
entityId?: string;
|
|
2720
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;
|
|
2721
2747
|
}
|
|
2722
2748
|
interface GlobalPropertyConfigurationAspectCondition {
|
|
2723
2749
|
targetAspectName?: string;
|
|
@@ -4004,6 +4030,12 @@ type GlobalPropertyStateFileUploadStorage = {
|
|
|
4004
4030
|
originalAssetKey?: string;
|
|
4005
4031
|
backgroundRemovedAssetKey?: string;
|
|
4006
4032
|
useOriginalAsset?: boolean;
|
|
4033
|
+
colors?: GlobalPropertyStateIllustrationColor[];
|
|
4034
|
+
};
|
|
4035
|
+
type GlobalPropertyStateIllustrationColor = {
|
|
4036
|
+
key: string;
|
|
4037
|
+
browserValue: string;
|
|
4038
|
+
pmsValue?: string;
|
|
4007
4039
|
};
|
|
4008
4040
|
type GlobalPropertyStateColorOptionStorage = {
|
|
4009
4041
|
customColor?: string;
|
|
@@ -4649,7 +4681,7 @@ declare class FrameStepService implements StepService<FrameStepData> {
|
|
|
4649
4681
|
/**
|
|
4650
4682
|
* Grab the source to be used for a frame from the variant or throw otherwise.
|
|
4651
4683
|
*/
|
|
4652
|
-
|
|
4684
|
+
static patternSource(asset: Asset): string;
|
|
4653
4685
|
private loadPatternFromAsset;
|
|
4654
4686
|
}
|
|
4655
4687
|
declare const frameStepService: FrameStepService;
|
|
@@ -5140,7 +5172,7 @@ declare enum FrameStep {
|
|
|
5140
5172
|
Position = "Position"
|
|
5141
5173
|
}
|
|
5142
5174
|
declare class FrameStepHandle extends StepHandle<FrameStepData> {
|
|
5143
|
-
frameService:
|
|
5175
|
+
frameService: FrameService;
|
|
5144
5176
|
constructor(manager: WorkflowManager, step: Step<FrameStepData>, tags: string[]);
|
|
5145
5177
|
selectVariant(variant: Variant): Promise<void>;
|
|
5146
5178
|
onFrameDataChanged(callback: (frameData: FrameData[]) => void): void;
|