@spiffcommerce/core 26.25.0 → 26.26.1
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 +5 -1
- package/dist/index.d.ts +24 -15
- package/dist/index.js +47 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +251 -218
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,7 +14,11 @@ 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.
|
|
17
|
+
## [26.26.0] - 27-05-2025
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- The event emitter on `Bundle` has been improved and made generic. Two new events will also now fire. One for a workflow being added and one for a workflow being removed.
|
|
18
22
|
|
|
19
23
|
### Added
|
|
20
24
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1715,6 +1715,28 @@ declare class Transform {
|
|
|
1715
1715
|
get(): BundleStateTransform;
|
|
1716
1716
|
}
|
|
1717
1717
|
|
|
1718
|
+
interface ConditionalGlobalPropertiesChangedEventData {
|
|
1719
|
+
globalProperties: GlobalPropertyHandle[];
|
|
1720
|
+
}
|
|
1721
|
+
interface WorkflowExperienceHoverEventData {
|
|
1722
|
+
workflowExperience: WorkflowExperience;
|
|
1723
|
+
}
|
|
1724
|
+
interface WorkflowExperienceAddedEventData {
|
|
1725
|
+
workflowExperiences: WorkflowExperience[];
|
|
1726
|
+
}
|
|
1727
|
+
interface WorkflowExperienceRemovedEventData extends WorkflowExperienceAddedEventData {
|
|
1728
|
+
}
|
|
1729
|
+
type BundleEventMap = {
|
|
1730
|
+
"conditional-global-properties-changed": ConditionalGlobalPropertiesChangedEventData;
|
|
1731
|
+
"workflow-experience-hover-enter": WorkflowExperienceHoverEventData;
|
|
1732
|
+
"workflow-experience-hover-exit": WorkflowExperienceHoverEventData;
|
|
1733
|
+
"workflow-experience-added": WorkflowExperienceAddedEventData;
|
|
1734
|
+
"workflow-experience-removed": WorkflowExperienceRemovedEventData;
|
|
1735
|
+
};
|
|
1736
|
+
type BundleEventType = keyof BundleEventMap;
|
|
1737
|
+
type BundleEventData = WorkflowExperienceHoverEventData | ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceAddedEventData;
|
|
1738
|
+
type BundleEvent<K extends BundleEventType = BundleEventType> = BundleEventMap[K];
|
|
1739
|
+
|
|
1718
1740
|
/**
|
|
1719
1741
|
* A bundle serves as a container for a set of workflow experience.
|
|
1720
1742
|
*/
|
|
@@ -1882,11 +1904,11 @@ interface Bundle$1 {
|
|
|
1882
1904
|
* @param event The event to listen for. Currently only "conditional-global-properties-changed" is supported.
|
|
1883
1905
|
* @param listener The listener to call when the event occurs.
|
|
1884
1906
|
*/
|
|
1885
|
-
addEventListener(event:
|
|
1907
|
+
addEventListener<K extends keyof BundleEventMap>(event: K, listener: (event: BundleEvent<K>) => void): void;
|
|
1886
1908
|
/**
|
|
1887
1909
|
* Remove a previously added event listener from this bundle.
|
|
1888
1910
|
*/
|
|
1889
|
-
removeEventListener(event:
|
|
1911
|
+
removeEventListener<K extends keyof BundleEventMap>(event: K, listener: (event: BundleEvent<K>) => void): void;
|
|
1890
1912
|
/**
|
|
1891
1913
|
* Retrieves the current preview service for this bundle, if one exists.
|
|
1892
1914
|
* If a preview service was specified when calling client.getExistingBundle, this will return that service.
|
|
@@ -1939,19 +1961,6 @@ interface Bundle$1 {
|
|
|
1939
1961
|
generateQuoteId(): Promise<string>;
|
|
1940
1962
|
getQuoteCompleteMessage(): CompleteQuoteMessage;
|
|
1941
1963
|
}
|
|
1942
|
-
type BundleEventType = "conditional-global-properties-changed" | "workflow-experience-hover-enter" | "workflow-experience-hover-exit";
|
|
1943
|
-
type BundleEventData = ConditionalGlobalPropertiesChangedEventData | WorkflowExperienceHoverEventData;
|
|
1944
|
-
type BundleEvent = {
|
|
1945
|
-
bundle: Bundle$1;
|
|
1946
|
-
data: BundleEventData;
|
|
1947
|
-
event: BundleEventType;
|
|
1948
|
-
};
|
|
1949
|
-
interface ConditionalGlobalPropertiesChangedEventData {
|
|
1950
|
-
globalProperties: GlobalPropertyHandle[];
|
|
1951
|
-
}
|
|
1952
|
-
interface WorkflowExperienceHoverEventData {
|
|
1953
|
-
workflowExperience: WorkflowExperience;
|
|
1954
|
-
}
|
|
1955
1964
|
|
|
1956
1965
|
/**
|
|
1957
1966
|
* A list of node types available in executions
|