@spiffcommerce/core 30.0.1-beta.d8ca7f5f-c09f-5948-929d-d01551394c73 → 30.0.1-beta.f642ccf0-8088-52e4-bb5a-fc3bebd5c30d

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
@@ -7,12 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  #### Types of changes
9
9
 
10
- - `Added` for new features.
11
- - `Changed` for changes in existing functionality.
12
- - `Deprecated` for soon-to-be removed features.
13
- - `Removed` for now removed features.
14
- - `Fixed` for any bug fixes.
15
- - `Security` in case of vulnerabilities.
10
+ - `Added` for new features.
11
+ - `Changed` for changes in existing functionality.
12
+ - `Deprecated` for soon-to-be removed features.
13
+ - `Removed` for now removed features.
14
+ - `Fixed` for any bug fixes.
15
+ - `Security` in case of vulnerabilities.
16
+
17
+ ## [31.0.0] - 29-08-2025
18
+
19
+ ## Added
20
+
21
+ - Latest versions of internal build tools and libraries. EG. Vite and ESLint
16
22
 
17
23
  ## [30.0.0] - 27-08-2025
18
24
 
@@ -24,586 +30,586 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
30
 
25
31
  ## Added
26
32
 
27
- - Added new functionality regarding mandatory Global Property aspects:
28
- - New function `GlobalPropertyHandle.isMandatory(): boolean`: returns a boolean indicating whether the aspect has been marked as required to be completed before the user can continue.
29
- - New function `GlobalPropertyHandle.isMandatoryFulfilled(): boolean`: returns a boolean indicating whether the aspect has been marked as "completed" for mandatory checks. Note that this function always returns `true` if the aspect has not been marked as mandatory.
30
- - New event on Bundle `global-properties-mandatory-changed`: Fires whenever any global property's mandatory states have changed. Provides an object with the following shape: `{ changed: GlobalPropertyHandle[]; completed: GlobalPropertyHandle[]; remaining: GlobalPropertyHandle[]; }`
33
+ - Added new functionality regarding mandatory Global Property aspects:
34
+ - New function `GlobalPropertyHandle.isMandatory(): boolean`: returns a boolean indicating whether the aspect has been marked as required to be completed before the user can continue.
35
+ - New function `GlobalPropertyHandle.isMandatoryFulfilled(): boolean`: returns a boolean indicating whether the aspect has been marked as "completed" for mandatory checks. Note that this function always returns `true` if the aspect has not been marked as mandatory.
36
+ - New event on Bundle `global-properties-mandatory-changed`: Fires whenever any global property's mandatory states have changed. Provides an object with the following shape: `{ changed: GlobalPropertyHandle[]; completed: GlobalPropertyHandle[]; remaining: GlobalPropertyHandle[]; }`
31
37
 
32
38
  ## [29.2.0] - 25-08-2025
33
39
 
34
40
  ## Added
35
41
 
36
- - Added the function `TextGlobalPropertyHandle.isTemplatingEnabled(): boolean`. Use this to determine whether you should display any templating tools.
42
+ - Added the function `TextGlobalPropertyHandle.isTemplatingEnabled(): boolean`. Use this to determine whether you should display any templating tools.
37
43
 
38
44
  ## [29.1.2] - 25-08-2025
39
45
 
40
46
  ## Changed
41
47
 
42
- - Text steps now render any templated values prior to calculating the character limit
48
+ - Text steps now render any templated values prior to calculating the character limit
43
49
 
44
50
  ## [29.1.1] - 20-08-2025
45
51
 
46
52
  ## Fixed
47
53
 
48
- - Inputting an incorrect code when calling `verifyCode` will no longer prevent you from succeeding if you then input the correct code in a subsequent request.
54
+ - Inputting an incorrect code when calling `verifyCode` will no longer prevent you from succeeding if you then input the correct code in a subsequent request.
49
55
 
50
56
  ## [29.0.4] - 14-08-2025
51
57
 
52
58
  ## Fixed
53
59
 
54
- - Existing dispatchDate is now correctly applied when reloading a bundle
60
+ - Existing dispatchDate is now correctly applied when reloading a bundle
55
61
 
56
62
  ## [29.0.3] - 14-08-2025
57
63
 
58
64
  ## Added
59
65
 
60
- - `getDispatchStartDate` method to `ProductCollection`.
61
- - `getDispatchEndDate` method to `ProductCollection`.
66
+ - `getDispatchStartDate` method to `ProductCollection`.
67
+ - `getDispatchEndDate` method to `ProductCollection`.
62
68
 
63
69
  ## [29.0.2] - 08-08-2025
64
70
 
65
71
  ## Fixed
66
72
 
67
- - `getExportedStepData` now returns only steps with properties as per original behavior.
73
+ - `getExportedStepData` now returns only steps with properties as per original behavior.
68
74
 
69
75
  ## [29.0.1] - 07-08-2025
70
76
 
71
77
  ## Fixed
72
78
 
73
- - Missing `ExportedStepData` types.
79
+ - Missing `ExportedStepData` types.
74
80
 
75
81
  ## [29.0.0] - 06-08-2025
76
82
 
77
83
  ## Changed
78
84
 
79
- - The `getExportedData` method has been renamed `getExportedStepData` for clarity, it now returns a list of steps and their metadata chronological to the workflow. Localization has also been removed as this is a theme concern.
85
+ - The `getExportedData` method has been renamed `getExportedStepData` for clarity, it now returns a list of steps and their metadata chronological to the workflow. Localization has also been removed as this is a theme concern.
80
86
 
81
87
  ## [28.0.0] - 30-07-2025
82
88
 
83
89
  ## Changed
84
90
 
85
- - The `duplicateBundle` method now returns a function that creates a bundle object, rather than creating the object automatically.
91
+ - The `duplicateBundle` method now returns a function that creates a bundle object, rather than creating the object automatically.
86
92
 
87
93
  ## Fixed
88
94
 
89
- - Fixed bugs around reloading state.
95
+ - Fixed bugs around reloading state.
90
96
 
91
97
  ## [27.3.0] - 28-07-2025
92
98
 
93
99
  ## Added
94
100
 
95
- - CurrencyService & CurrencyContext can now be used to correctly transform values for display. See `client.getCurrencyContext`
101
+ - CurrencyService & CurrencyContext can now be used to correctly transform values for display. See `client.getCurrencyContext`
96
102
 
97
103
  ## [27.2.1] - 28-07-2025
98
104
 
99
105
  ## Fixed
100
106
 
101
- - `WorkflowExperience.assignCustomerDetails` should no longer fail when you have ownership of the associated Transaction.
107
+ - `WorkflowExperience.assignCustomerDetails` should no longer fail when you have ownership of the associated Transaction.
102
108
 
103
109
  ## [27.2.0] - 24-07-2025
104
110
 
105
111
  ## Added
106
112
 
107
- - Bundles now have the `applyGlobalPropertyState` method for copying one global state onto another.
113
+ - Bundles now have the `applyGlobalPropertyState` method for copying one global state onto another.
108
114
 
109
115
  ## [27.1.1] - 23-07-2025
110
116
 
111
117
  ## Fixed
112
118
 
113
- - Correctly the case of handle multiple text steps that are conditional and share a text aspect.
119
+ - Correctly the case of handle multiple text steps that are conditional and share a text aspect.
114
120
 
115
121
  ## [27.1.0] - 16-07-2025
116
122
 
117
123
  ## Changed
118
124
 
119
- - Added support for Handlebars in text steps.
125
+ - Added support for Handlebars in text steps.
120
126
 
121
127
  ## [27.0.0] - 15-07-2025
122
128
 
123
129
  ## Changed
124
130
 
125
- - Modified the functions for logging in as a customer.
131
+ - Modified the functions for logging in as a customer.
126
132
 
127
133
  ## [26.40.0] - 10-07-2025
128
134
 
129
135
  ## Added
130
136
 
131
- - Added `setDispatchDate` and `setPurchaseOrder` to `Bundle`.
137
+ - Added `setDispatchDate` and `setPurchaseOrder` to `Bundle`.
132
138
 
133
139
  ## [26.39.0] - 08-07-2025
134
140
 
135
141
  ## Fixed
136
142
 
137
- - The function `fetchProductsFeed` on `ProductCollection` now correctly reads from the in-memory cache for repeated calls with the same inputs.
143
+ - The function `fetchProductsFeed` on `ProductCollection` now correctly reads from the in-memory cache for repeated calls with the same inputs.
138
144
 
139
145
  ## [26.38.0] - 07-07-2025
140
146
 
141
147
  ## Added
142
148
 
143
- - `WorkflowManager` now has the function `addRecipientCallback` to listen to changes to the attached Recipient.
149
+ - `WorkflowManager` now has the function `addRecipientCallback` to listen to changes to the attached Recipient.
144
150
 
145
151
  ## [26.35.0] - 03-07-2025
146
152
 
147
153
  ## Added
148
154
 
149
- - The `Bundle` type now has the `productsCount` property.
155
+ - The `Bundle` type now has the `productsCount` property.
150
156
 
151
157
  ## [26.33.0] - 02-07-2025
152
158
 
153
159
  ## Added
154
160
 
155
- - The method `getBundlesForCustomer` now has an "ordered" option.
161
+ - The method `getBundlesForCustomer` now has an "ordered" option.
156
162
 
157
163
  ## [26.31.0] - 24-06-2025
158
164
 
159
165
  ## Fixed
160
166
 
161
- - Fixed issues with authorizing certain requests affecting recipients.
167
+ - Fixed issues with authorizing certain requests affecting recipients.
162
168
 
163
169
  ## [26.30.0] - 23-06-2025
164
170
 
165
171
  ## Added
166
172
 
167
- - New global function `getProductCollections`, which fetches a list of Product Collections by their ids.
173
+ - New global function `getProductCollections`, which fetches a list of Product Collections by their ids.
168
174
 
169
175
  ## [26.29.3] - 19-06-2025
170
176
 
171
177
  ## Fixed
172
178
 
173
- - The method `updateRecipient` now saves its arguments correctly.
179
+ - The method `updateRecipient` now saves its arguments correctly.
174
180
 
175
181
  ## [26.29.1] - 18-06-2025
176
182
 
177
183
  ### Fixed
178
184
 
179
- - Fix issues with bleeding-edge endpoints.
185
+ - Fix issues with bleeding-edge endpoints.
180
186
 
181
187
  ## [26.29.0] - 18-06-2025
182
188
 
183
189
  ### Added
184
190
 
185
- - The method `updateRecipient` on `WorkflowManager`.
191
+ - The method `updateRecipient` on `WorkflowManager`.
186
192
 
187
193
  ## [26.28.0] - 18-06-2025
188
194
 
189
195
  ### Added
190
196
 
191
- - The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept the optional parameters `sortKey` and `sortDescending`. Sort key can be one of: Default, Name, Price.
197
+ - The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept the optional parameters `sortKey` and `sortDescending`. Sort key can be one of: Default, Name, Price.
192
198
 
193
199
  ## [26.27.0] - 11-06-2025
194
200
 
195
201
  ### Added
196
202
 
197
- - The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept an optional parameter `tags`, which is an object with the shape `{ include: string[]; exclude: string[]; }`. Only products that have all tags in `include` and no tags in `exclude` will be returned. If either array is provided as empty they will have no effect on the query.
203
+ - The methods `filterProducts` and `fetchProductsFeed` on `ProductCollection` now accept an optional parameter `tags`, which is an object with the shape `{ include: string[]; exclude: string[]; }`. Only products that have all tags in `include` and no tags in `exclude` will be returned. If either array is provided as empty they will have no effect on the query.
198
204
 
199
205
  ## [26.26.0] - 27-05-2025
200
206
 
201
207
  ### Changed
202
208
 
203
- - 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.
209
+ - 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.
204
210
 
205
211
  ### Added
206
212
 
207
- - The `MetafieldManager` is now exposed for use. Certain functions such as CollectionProduct will now expose utility functions that allow pulling the metafields for the entity being called on.
213
+ - The `MetafieldManager` is now exposed for use. Certain functions such as CollectionProduct will now expose utility functions that allow pulling the metafields for the entity being called on.
208
214
 
209
215
  ## [26.24.0] - 12-05-2025
210
216
 
211
217
  ### Changed
212
218
 
213
- - The functions `getIntegrationProductById` and `getIntegrationProductFromExternalIds` now accept an additional boolean parameter that allows you to fetch all of the linked integration products on the product you have requested.
219
+ - The functions `getIntegrationProductById` and `getIntegrationProductFromExternalIds` now accept an additional boolean parameter that allows you to fetch all of the linked integration products on the product you have requested.
214
220
 
215
221
  ### Fixed
216
222
 
217
- - The `duplicateBundle` call no longer fails due to missing GraphQl fragments.
223
+ - The `duplicateBundle` call no longer fails due to missing GraphQl fragments.
218
224
 
219
225
  ## [26.23.2] - 16-04-2025
220
226
 
221
227
  ### Fixed
222
228
 
223
- - The `duplicateBundle` will now correctly duplicate the global property state.
229
+ - The `duplicateBundle` will now correctly duplicate the global property state.
224
230
 
225
231
  ## [26.22.0] - 07-04-2025
226
232
 
227
233
  ### Changed
228
234
 
229
- - The `approve` and `reject` functions on `Bundle` now accept a `stakeholderId?: string` to specify which stakeholder you are interacting as.
235
+ - The `approve` and `reject` functions on `Bundle` now accept a `stakeholderId?: string` to specify which stakeholder you are interacting as.
230
236
 
231
237
  ## [26.21.1] - 03-04-2025
232
238
 
233
239
  ### Fixed
234
240
 
235
- - Fixed a bug around illustrations in global configurations being initializd with the incorrect amount of channel aspects.
241
+ - Fixed a bug around illustrations in global configurations being initializd with the incorrect amount of channel aspects.
236
242
 
237
243
  ## [26.21.0] - 01-04-2025
238
244
 
239
245
  ### Added
240
246
 
241
- - The `getQuoteCompleteMessage` method on bundles. Pass the return value of this method to Theme Bridge's `SpiffThemeLoader.completeQuote` method.
247
+ - The `getQuoteCompleteMessage` method on bundles. Pass the return value of this method to Theme Bridge's `SpiffThemeLoader.completeQuote` method.
242
248
 
243
249
  ## [26.20.0] - 31-03-2025
244
250
 
245
251
  ### Added
246
252
 
247
- - Added new methods to the `FileUploadGlobalPropertyHandle` for overriding SVG colors:
248
- - `getImageWithColors`: Returns a promise that resolves with the current image with the current color configuration, if applicable.
249
- - `getAvailableColors`: Returns the colors from the configured color option.
250
- - `getCurrentColors`: Returns the current color configuration.
251
- - `isColorPickerEnabled` and `isPmsPickerEnabled`: Return whether the color picker and pms picker are enabled, respectively.
252
- - `getOriginalColors`: Returns a promise that resolves with the original color configuration of the image asset.
253
- - `changeColors`: Updates the current color configuration and propagates the changes to all connected workflow experiences.
253
+ - Added new methods to the `FileUploadGlobalPropertyHandle` for overriding SVG colors:
254
+ - `getImageWithColors`: Returns a promise that resolves with the current image with the current color configuration, if applicable.
255
+ - `getAvailableColors`: Returns the colors from the configured color option.
256
+ - `getCurrentColors`: Returns the current color configuration.
257
+ - `isColorPickerEnabled` and `isPmsPickerEnabled`: Return whether the color picker and pms picker are enabled, respectively.
258
+ - `getOriginalColors`: Returns a promise that resolves with the original color configuration of the image asset.
259
+ - `changeColors`: Updates the current color configuration and propagates the changes to all connected workflow experiences.
254
260
 
255
261
  ## [26.19.0] - 26-03-2025
256
262
 
257
263
  ### Added
258
264
 
259
- - The `generateQuoteId` method on bundles.
265
+ - The `generateQuoteId` method on bundles.
260
266
 
261
267
  ## [26.18.0] - 24-03-2025
262
268
 
263
269
  ### Added
264
270
 
265
- - Added `OneToOne` mode to `BundleDesignCreationCartAddMode`, which adds each Transaction of a Bundle to the cart as individual line items.
271
+ - Added `OneToOne` mode to `BundleDesignCreationCartAddMode`, which adds each Transaction of a Bundle to the cart as individual line items.
266
272
 
267
273
  ## [26.17.0] - 24-03-2025
268
274
 
269
275
  ### Added
270
276
 
271
- - The object returned by `Bundle.finish()`, `BundleDesignCreationMessage`, has a new field `cartAddMode?: BundleDesignCreationCartAddMode`. This controls the strategy for adding the items of a Bundle to an ecommerce cart.
277
+ - The object returned by `Bundle.finish()`, `BundleDesignCreationMessage`, has a new field `cartAddMode?: BundleDesignCreationCartAddMode`. This controls the strategy for adding the items of a Bundle to an ecommerce cart.
272
278
 
273
279
  ## [26.16.1] - 18-03-2025
274
280
 
275
281
  ### Changed
276
282
 
277
- - If both the partner and workflow have terms and conditions, the workflow wins.
283
+ - If both the partner and workflow have terms and conditions, the workflow wins.
278
284
 
279
285
  ## [26.15.0] - 03-03-2025
280
286
 
281
287
  ### Added
282
288
 
283
- - Methods on experiences and bundles to attach addresses and organizations.
289
+ - Methods on experiences and bundles to attach addresses and organizations.
284
290
 
285
291
  ## [26.13.0] - 27-02-2025
286
292
 
287
293
  ### Changed
288
294
 
289
- - The selectVariant method of ColorOptionGlobalPropertyHandle objects now has an optional `channel` parameter for color channels.
295
+ - The selectVariant method of ColorOptionGlobalPropertyHandle objects now has an optional `channel` parameter for color channels.
290
296
 
291
297
  ## [26.12.0] - 26-02-2025
292
298
 
293
299
  ### Changed
294
300
 
295
- - The global function `getIntegration` now supports a second parameter, `themeConfigurationId`, which allows you to override the Theme Configuration that is returned on the object.
301
+ - The global function `getIntegration` now supports a second parameter, `themeConfigurationId`, which allows you to override the Theme Configuration that is returned on the object.
296
302
 
297
303
  ## [26.11.0] - 24-02-2025
298
304
 
299
305
  ### Changed
300
306
 
301
- - The `createPreviewImage` parameter in `Bundle.finish()` is now provided a second argument, `shouldRender3D: boolean`, which can be passed to `WorkflowExperience.createPreviewImage()`
307
+ - The `createPreviewImage` parameter in `Bundle.finish()` is now provided a second argument, `shouldRender3D: boolean`, which can be passed to `WorkflowExperience.createPreviewImage()`
302
308
 
303
309
  ## [26.10.0] - 24-02-2025
304
310
 
305
311
  ### Added
306
312
 
307
- - Ability to handle illustrations with asset configurations.
313
+ - Ability to handle illustrations with asset configurations.
308
314
 
309
315
  ## [26.9.1] - 20-02-2025
310
316
 
311
317
  ### Fixed
312
318
 
313
- - Resolved an issue allowing empty text to pass mandatory checks on the text step.
319
+ - Resolved an issue allowing empty text to pass mandatory checks on the text step.
314
320
 
315
321
  ## [26.8.0] - 06-02-2025
316
322
 
317
323
  ### Fixed
318
324
 
319
- - Resolved an issue causing clients using module steps not to handle errors correctly.
325
+ - Resolved an issue causing clients using module steps not to handle errors correctly.
320
326
 
321
327
  ## [26.7.9] - 21-01-2025
322
328
 
323
329
  ### Fixed
324
330
 
325
- - Resolved an issue when duplicating a bundle causing any copied workflow experiences to be missing in the javascript class returned.
331
+ - Resolved an issue when duplicating a bundle causing any copied workflow experiences to be missing in the javascript class returned.
326
332
 
327
333
  ## [26.7.6] - 10-01-2025
328
334
 
329
335
  ### Fixed
330
336
 
331
- - Reverted the previous due to issues with other areas of opentype.
337
+ - Reverted the previous due to issues with other areas of opentype.
332
338
 
333
339
  ## [26.7.5] - 10-01-2025
334
340
 
335
341
  ### Added
336
342
 
337
- - Updated opentype to access more functionality around font outlining.
343
+ - Updated opentype to access more functionality around font outlining.
338
344
 
339
345
  ## [26.7.4] - 19-12-2024
340
346
 
341
347
  ### Fixed
342
348
 
343
- - The version of Opentype we use now correctly includes the fill functionality of the font outlining tool. Fill will now be correctly applied to any text outlined by this tool.
349
+ - The version of Opentype we use now correctly includes the fill functionality of the font outlining tool. Fill will now be correctly applied to any text outlined by this tool.
344
350
 
345
351
  ## [26.7.3] - 18-12-2024
346
352
 
347
353
  ### Added
348
354
 
349
- - Added the `illustrationStep.isPMSPickerEnabled` function. This function returns a boolean indicating whether the PMS picker is enabled for the step.
355
+ - Added the `illustrationStep.isPMSPickerEnabled` function. This function returns a boolean indicating whether the PMS picker is enabled for the step.
350
356
 
351
357
  ## [26.7.2] - 02-12-2024
352
358
 
353
359
  ### Fixed
354
360
 
355
- - Corrected an issue with `TextStepService.availableFillColors` not returning the correct colors under certain conditions.
361
+ - Corrected an issue with `TextStepService.availableFillColors` not returning the correct colors under certain conditions.
356
362
 
357
363
  ## [26.7.0] - 27-11-2024
358
364
 
359
365
  ### Added
360
366
 
361
- - Text steps now support custom stroke. Similar to other color customisation features, this is accessible via the functions `getAvailableStrokeColors`, `getStrokeColor`, and `setStrokeColor` on `TextStepHandle`.
362
- The thickness of the stroke, the colors to select from, and other options, are configurable via the Spiff Hub in the Workflow editor.
367
+ - Text steps now support custom stroke. Similar to other color customisation features, this is accessible via the functions `getAvailableStrokeColors`, `getStrokeColor`, and `setStrokeColor` on `TextStepHandle`.
368
+ The thickness of the stroke, the colors to select from, and other options, are configurable via the Spiff Hub in the Workflow editor.
363
369
 
364
370
  ## [26.5.2] - 20-11-2024
365
371
 
366
372
  ### Fixed
367
373
 
368
- - Fixed issues regarding EXIF orientation calculation throwing errors under specific conditions.
374
+ - Fixed issues regarding EXIF orientation calculation throwing errors under specific conditions.
369
375
 
370
376
  ## [26.5.1] - 20-11-2024
371
377
 
372
378
  ### Fixed
373
379
 
374
- - SVG Files uploaded to the platform will now have widths and heights specified in non-pixel values
375
- stripped. This shouldn't have any effect on user uploads but will prevent the system from breaking when
376
- encountering these values.
380
+ - SVG Files uploaded to the platform will now have widths and heights specified in non-pixel values
381
+ stripped. This shouldn't have any effect on user uploads but will prevent the system from breaking when
382
+ encountering these values.
377
383
 
378
384
  ## [26.5.0] - 18-11-2024
379
385
 
380
386
  ### Added
381
387
 
382
- - ProductCollection has a new function `fetchProductsFeed`, which fetches a paginated array of product collection products (entries in the product collection). Note that this does not edit the internal array of previously fetched products like `fetchProducts` does, so calls to `fetchProductsFeed` will not change the array that is returned by `getProducts`. If `fetchProducts` has already been called, or if the ProductCollection has been initialised with products, `fetchProductsFeed` will avoid making any network calls where it can.
388
+ - ProductCollection has a new function `fetchProductsFeed`, which fetches a paginated array of product collection products (entries in the product collection). Note that this does not edit the internal array of previously fetched products like `fetchProducts` does, so calls to `fetchProductsFeed` will not change the array that is returned by `getProducts`. If `fetchProducts` has already been called, or if the ProductCollection has been initialised with products, `fetchProductsFeed` will avoid making any network calls where it can.
383
389
 
384
390
  ## [26.4.0] - 07-11-2024
385
391
 
386
392
  ### Added
387
393
 
388
- - The client now has a `placeOrder` function. This allows ordering any combination of transactions. Remember that this may require additional permissions on the application key.
389
- - Bundle now has a `placeOrder` function that will place an order for the bundle. The will create an order containing all transactions in the bundle. Remember that this may require additional permissions on the application key.
390
- - Interface `Order` and `OrderItem` have been added to the package. These interfaces can be used with the new placeOrder functions.
394
+ - The client now has a `placeOrder` function. This allows ordering any combination of transactions. Remember that this may require additional permissions on the application key.
395
+ - Bundle now has a `placeOrder` function that will place an order for the bundle. The will create an order containing all transactions in the bundle. Remember that this may require additional permissions on the application key.
396
+ - Interface `Order` and `OrderItem` have been added to the package. These interfaces can be used with the new placeOrder functions.
391
397
 
392
398
  ## [26.3.0] - 04-11-2024
393
399
 
394
400
  ### Changed
395
401
 
396
- - IllustrationStepHandle now accepts providing PMS values when calling `setColor`
397
- - IllustrationStepHandle's `getAvailableColors` function now returns the names of the variants as PMS values.
402
+ - IllustrationStepHandle now accepts providing PMS values when calling `setColor`
403
+ - IllustrationStepHandle's `getAvailableColors` function now returns the names of the variants as PMS values.
398
404
 
399
405
  ## [26.1.2] - 30-10-2024
400
406
 
401
407
  ### Fixed
402
408
 
403
- - The ProductCollection class will no longer request the products it contains if they are already present in the cache.
409
+ - The ProductCollection class will no longer request the products it contains if they are already present in the cache.
404
410
 
405
411
  ## [26.1.1] - 30-10-2024
406
412
 
407
413
  ### Changed
408
414
 
409
- - Merged some GraphQL calls to reduce the number of requests made when loading a bundle.
415
+ - Merged some GraphQL calls to reduce the number of requests made when loading a bundle.
410
416
 
411
417
  ## [26.1.0] - 30-10-2024
412
418
 
413
419
  ### Changed
414
420
 
415
- - Several internal functions have been changed, been merged or removed. This should not affect any public API.
416
- - `rehydrateSerializedLayout` is no longer exported from the package. No functionality is intended to take its place. The function was always intended for internal use only.
421
+ - Several internal functions have been changed, been merged or removed. This should not affect any public API.
422
+ - `rehydrateSerializedLayout` is no longer exported from the package. No functionality is intended to take its place. The function was always intended for internal use only.
417
423
 
418
424
  ## [26.0.0] - 30-10-2024
419
425
 
420
426
  ### Changed
421
427
 
422
- - `getWorkflowExperience` has removed 3 deprecated parameters in favor of the options object. The options object is no longer optional.
423
- - `configureUrls` has been removed in favor of the `configure` function. Please use `configure` moving forwards.
424
- - The client constructor should know be called with an application in most use cases. We'll continue locking down functionality to require this in the future.
428
+ - `getWorkflowExperience` has removed 3 deprecated parameters in favor of the options object. The options object is no longer optional.
429
+ - `configureUrls` has been removed in favor of the `configure` function. Please use `configure` moving forwards.
430
+ - The client constructor should know be called with an application in most use cases. We'll continue locking down functionality to require this in the future.
425
431
 
426
432
  ## [22.0.0] - 10-07-2024
427
433
 
428
434
  ### Changed
429
435
 
430
- - `matchHexToPms` now returns a list of objects of `{ pms: string; hex: string; }` rather than strings.
436
+ - `matchHexToPms` now returns a list of objects of `{ pms: string; hex: string; }` rather than strings.
431
437
 
432
438
  ### Added
433
439
 
434
- - `findPmsColors(input: string, limit?: number): PmsSearchResult[]`: A function to find PMS colors by name using fuzzy search.
440
+ - `findPmsColors(input: string, limit?: number): PmsSearchResult[]`: A function to find PMS colors by name using fuzzy search.
435
441
 
436
442
  ## [21.8.1] - 27-03-2024
437
443
 
438
444
  ### Fixed
439
445
 
440
- - `WorkflowExperience.getTotalPriceSubunits` no longer always returns the discounted price.
446
+ - `WorkflowExperience.getTotalPriceSubunits` no longer always returns the discounted price.
441
447
 
442
448
  ## [21.8.0] - 26-03-2024
443
449
 
444
450
  ### Added
445
451
 
446
- - `Bundle.removeStakeholder(email: string): Promise<void>`: Removes a single stakeholder from the Bundle, via email address.
452
+ - `Bundle.removeStakeholder(email: string): Promise<void>`: Removes a single stakeholder from the Bundle, via email address.
447
453
 
448
454
  ## [21.7.1] - 25-03-2024
449
455
 
450
456
  ### Fixed
451
457
 
452
- - `Bundle.getAllStakeholders()` now returns correct results on subsequent calls.
458
+ - `Bundle.getAllStakeholders()` now returns correct results on subsequent calls.
453
459
 
454
460
  ## [21.7.0] - 25-03-2024
455
461
 
456
462
  ### Added
457
463
 
458
- - `CollectionProduct.getAllWorkflows(): ProductWorkflow[]`: Returns all workflows associated with this product.
464
+ - `CollectionProduct.getAllWorkflows(): ProductWorkflow[]`: Returns all workflows associated with this product.
459
465
 
460
466
  ## [21.6.0] - 22-03-2024
461
467
 
462
468
  ### Added
463
469
 
464
- - `WorkflowExperienceEventType.PriceBreakChanged`: The relevant event fires whenever the price break to be used in a WorkflowExperience changes. This even will fire when the quantity changes, and will also fire when in a Bundle when other WorkflowExperiences using the same Product have quantity changes (or are added & removed from the Bundle).
470
+ - `WorkflowExperienceEventType.PriceBreakChanged`: The relevant event fires whenever the price break to be used in a WorkflowExperience changes. This even will fire when the quantity changes, and will also fire when in a Bundle when other WorkflowExperiences using the same Product have quantity changes (or are added & removed from the Bundle).
465
471
 
466
472
  ## [21.5.0] - 22-03-2024
467
473
 
468
474
  ### Changed
469
475
 
470
- - `StepHandle`: The override global property state setting now has a different value for each Global Property Aspect type. The get/set functions have been renamed and have an extra parameter to determine the Aspect Type.
471
- - `getOverrideGlobalPreviewConfiguration` -> `getOverrideGlobalPropertyConfiguration(type: AspectType): boolean`.
472
- - `setOverrideGlobalPreviewConfiguration` -> `setOverrideGlobalPropertyConfiguration(type: AspectType, value: boolean): void`
476
+ - `StepHandle`: The override global property state setting now has a different value for each Global Property Aspect type. The get/set functions have been renamed and have an extra parameter to determine the Aspect Type.
477
+ - `getOverrideGlobalPreviewConfiguration` -> `getOverrideGlobalPropertyConfiguration(type: AspectType): boolean`.
478
+ - `setOverrideGlobalPreviewConfiguration` -> `setOverrideGlobalPropertyConfiguration(type: AspectType, value: boolean): void`
473
479
 
474
480
  ## [21.4.1] - 21-03-2024
475
481
 
476
482
  ### Changed
477
483
 
478
- - `readTransactionsQuery` now fetches `printFileUrl1` to `printFileUrl5` for each transaction.
484
+ - `readTransactionsQuery` now fetches `printFileUrl1` to `printFileUrl5` for each transaction.
479
485
 
480
486
  ## [21.4.0] - 20-03-2024
481
487
 
482
488
  ### Added
483
489
 
484
- - `StepHandle`:
485
- - `getOverrideGlobalPreviewConfiguration(): boolean`: Returns a boolean that indicates whether this step should override (ignore) Global Property state.
486
- - `setOverrideGlobalPreviewConfiguration(value: boolean): void`: Modifies whether this step should override (ignore) Global Property state.
487
- - `getGlobalPropertyAspects(configurationId: string): string[]`: Returns all Aspect names in the supplied Global Property Configuration that this step is configured to use.
488
- - `Bundle.getGlobalPropertyConfiguration(): GlobalPropertyConfiguration | undefined`: Returns the Global Property Configuration object associated with the Bundle, if it exists.
490
+ - `StepHandle`:
491
+ - `getOverrideGlobalPreviewConfiguration(): boolean`: Returns a boolean that indicates whether this step should override (ignore) Global Property state.
492
+ - `setOverrideGlobalPreviewConfiguration(value: boolean): void`: Modifies whether this step should override (ignore) Global Property state.
493
+ - `getGlobalPropertyAspects(configurationId: string): string[]`: Returns all Aspect names in the supplied Global Property Configuration that this step is configured to use.
494
+ - `Bundle.getGlobalPropertyConfiguration(): GlobalPropertyConfiguration | undefined`: Returns the Global Property Configuration object associated with the Bundle, if it exists.
489
495
 
490
496
  ## [21.3.1] - 20-03-2024
491
497
 
492
498
  ### Fixed
493
499
 
494
- - When a `Bundle` is loaded by ID, the `WorkflowExperience` objects it loads will not correctly be linked internally. This resolves issues regarding price breaks not calculating correctly on bundle reload when multiple transactions share a product.
500
+ - When a `Bundle` is loaded by ID, the `WorkflowExperience` objects it loads will not correctly be linked internally. This resolves issues regarding price breaks not calculating correctly on bundle reload when multiple transactions share a product.
495
501
 
496
502
  ## [21.3.0] - 20-03-2024
497
503
 
498
504
  ### Added
499
505
 
500
- - `WorkflowExperience.priceBreakToBeApplied()` returns the percentage that will be used in `WorkflowExperience.getTotalPriceSubunits()` and related methods.
506
+ - `WorkflowExperience.priceBreakToBeApplied()` returns the percentage that will be used in `WorkflowExperience.getTotalPriceSubunits()` and related methods.
501
507
 
502
508
  ### Changed
503
509
 
504
- - `WorkflowExperience.getTotalPriceSubunits()` and related methods now consider price breaks in their calculations, but also now have a `disablePriceBreaks` argument.
510
+ - `WorkflowExperience.getTotalPriceSubunits()` and related methods now consider price breaks in their calculations, but also now have a `disablePriceBreaks` argument.
505
511
 
506
512
  ## [21.2.1] - 15-03-2024
507
513
 
508
514
  ### Fixed
509
515
 
510
- - Fixed Global Property Handles not updating values when WorkflowExperiences in the Bundle share the same Workflow.
516
+ - Fixed Global Property Handles not updating values when WorkflowExperiences in the Bundle share the same Workflow.
511
517
 
512
518
  ## [21.2.0] - 15-03-2024
513
519
 
514
520
  ### Added
515
521
 
516
- - `FileUploadGlobalPropertyHandle`:
517
- - `hasImage(): boolean`: Returns a boolean value indicating if the associated state has an image.
518
- - `getImage(): Promise<Asset | undefined>`: Retrieves the current image from the server.
522
+ - `FileUploadGlobalPropertyHandle`:
523
+ - `hasImage(): boolean`: Returns a boolean value indicating if the associated state has an image.
524
+ - `getImage(): Promise<Asset | undefined>`: Retrieves the current image from the server.
519
525
 
520
526
  ## [21.1.1] - 15-03-2024
521
527
 
522
528
  ### Fixed
523
529
 
524
- - Exported missing `AspectType` for global property handles.
530
+ - Exported missing `AspectType` for global property handles.
525
531
 
526
532
  ## [21.1.0] - 14-03-2024
527
533
 
528
534
  ### Added
529
535
 
530
- - `Bundle.hasGlobalProperties(): boolean`: Returns true when the bundle is linked to a Global Property Configuration.
536
+ - `Bundle.hasGlobalProperties(): boolean`: Returns true when the bundle is linked to a Global Property Configuration.
531
537
 
532
538
  ## [21.0.1] - 13-03-2024
533
539
 
534
540
  ### Fixed
535
541
 
536
- - Package now supplies this `CHANGELOG.md` in published releases.
542
+ - Package now supplies this `CHANGELOG.md` in published releases.
537
543
 
538
544
  ## [21.0.0] - 13-03-2024
539
545
 
540
546
  ### Added
541
547
 
542
- - `DesignCreationMessage` now has `quantity: number | undefined`.
548
+ - `DesignCreationMessage` now has `quantity: number | undefined`.
543
549
 
544
550
  ### Changed
545
551
 
546
- - `Bundle.finish()` no longer returns an array of `DesignCreationMessage` objects, but instead returns a `BundleDesignCreationMessage` object which wraps the array of `DesignCreationMessage` entries.
552
+ - `Bundle.finish()` no longer returns an array of `DesignCreationMessage` objects, but instead returns a `BundleDesignCreationMessage` object which wraps the array of `DesignCreationMessage` entries.
547
553
 
548
554
  ## [20.5.1] - 12-03-2024
549
555
 
550
556
  ### Fixed
551
557
 
552
- - `WorkflowExperience.getSelectionPriceSubunits()` (and consequently `getTotalPriceSubunits()`) can no longer return `NaN`.
558
+ - `WorkflowExperience.getSelectionPriceSubunits()` (and consequently `getTotalPriceSubunits()`) can no longer return `NaN`.
553
559
 
554
560
  ## [20.5.0] - 12-03-2024
555
561
 
556
562
  ### Added
557
563
 
558
- - `WorkflowManager.injectIntoPreviewService()` now has a second argument `refocusCamera`, a boolean which allows you to disable the automatic refocusing of the camera when the model is loaded. This requires `@spiffcommerce/preview@^5.7.0`.
564
+ - `WorkflowManager.injectIntoPreviewService()` now has a second argument `refocusCamera`, a boolean which allows you to disable the automatic refocusing of the camera when the model is loaded. This requires `@spiffcommerce/preview@^5.7.0`.
559
565
 
560
566
  ## [20.4.5] - 08-03-2024
561
567
 
562
568
  ### Added
563
569
 
564
- - `RenderableScene` objects will now contain a `workflowScene: WorkflowScene` field. This is only provided for backwards compatibility and is considered deprecated functionality.
570
+ - `RenderableScene` objects will now contain a `workflowScene: WorkflowScene` field. This is only provided for backwards compatibility and is considered deprecated functionality.
565
571
 
566
572
  ## [20.4.4] - 08-03-2024
567
573
 
568
574
  ### Fixed
569
575
 
570
- - Updating quantity via `WorkflowExperience.setQuantity()` will now correctly update on the server.
576
+ - Updating quantity via `WorkflowExperience.setQuantity()` will now correctly update on the server.
571
577
 
572
578
  ## [20.4.3] - 08-03-2024
573
579
 
574
580
  ### Changed
575
581
 
576
- - `WorkflowExperience.setQuantity()` now returns a promise that resolves once the quantity has been updated on the server.
582
+ - `WorkflowExperience.setQuantity()` now returns a promise that resolves once the quantity has been updated on the server.
577
583
 
578
584
  ## [20.4.0] - 08-03-2024
579
585
 
580
586
  ### Added
581
587
 
582
- - `Transaction` entities now have `quantity: number | undefined`.
583
- - New functions on `WorkflowExperience` for managing quantity:
584
- - `getQuantity()`: The amount that was, or will be, ordered of the underlying `Transaction`. This will default to `1` if the value is undefined. If you want to read the raw value, use `getWorkflowManager().getTransaction().quantity`.
585
- - `setQuantity(<number>)`: Updates the quantity value on the underlying `Transaction` entity. Must be >= 1.
586
- - New events functionality on `WorkflowExperience`. Currently the only event is `QuantityChanged`.
587
- - `addEventListener(<type>, <callback>)`: Registers a callback function to be called when the specified event is raised. The associated `WorkflowExperience` is passed as a parameter to the callback function.
588
- - `removeEventListener(<type>, <callback>)`: Removes a previously registered callback.
588
+ - `Transaction` entities now have `quantity: number | undefined`.
589
+ - New functions on `WorkflowExperience` for managing quantity:
590
+ - `getQuantity()`: The amount that was, or will be, ordered of the underlying `Transaction`. This will default to `1` if the value is undefined. If you want to read the raw value, use `getWorkflowManager().getTransaction().quantity`.
591
+ - `setQuantity(<number>)`: Updates the quantity value on the underlying `Transaction` entity. Must be >= 1.
592
+ - New events functionality on `WorkflowExperience`. Currently the only event is `QuantityChanged`.
593
+ - `addEventListener(<type>, <callback>)`: Registers a callback function to be called when the specified event is raised. The associated `WorkflowExperience` is passed as a parameter to the callback function.
594
+ - `removeEventListener(<type>, <callback>)`: Removes a previously registered callback.
589
595
 
590
596
  ## [20.3.0] - 07-03-2024
591
597
 
592
598
  ### Added
593
599
 
594
- - `CollectionProduct.getCurrentIntegration()`: returns the `IntegrationProductResource` associated with the product that is linked to the current Integration (resolved via the application key).
600
+ - `CollectionProduct.getCurrentIntegration()`: returns the `IntegrationProductResource` associated with the product that is linked to the current Integration (resolved via the application key).
595
601
 
596
602
  ## [20.2.2] - 05-03-2024
597
603
 
598
604
  ### Changed
599
605
 
600
- - `WorkflowExperience.getStepById(<string>)` now internally caches the `StepHandle` objects that it creates. This resolves an issue with functional rendering systems that re-render when the object reference changes, where they would re-renderer whenever this function was called even if the object was identical.
606
+ - `WorkflowExperience.getStepById(<string>)` now internally caches the `StepHandle` objects that it creates. This resolves an issue with functional rendering systems that re-render when the object reference changes, where they would re-renderer whenever this function was called even if the object was identical.
601
607
 
602
608
  ## [20.2.1] - 29-02-2024
603
609
 
604
610
  ### Changed
605
611
 
606
- - The union type `GetWorkflowOptions` has some of its entries wrapped in another union. The types that will create a brand new `Transaction` are now nested under `GetNewWorkflowOptions`:
612
+ - The union type `GetWorkflowOptions` has some of its entries wrapped in another union. The types that will create a brand new `Transaction` are now nested under `GetNewWorkflowOptions`:
607
613
 
608
614
  ```ts
609
615
  // Before
@@ -624,7 +630,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
624
630
 
625
631
  ### Added
626
632
 
627
- - `SpiffCommerceClient.getIntegrationProduct(<options>)`: Fetches an `IntegrationProduct` object. Essentially a wrapper for the functions `getIntegrationProductById` and `getIntegrationProductFromExternalIds`. The options object type is as follows:
633
+ - `SpiffCommerceClient.getIntegrationProduct(<options>)`: Fetches an `IntegrationProduct` object. Essentially a wrapper for the functions `getIntegrationProductById` and `getIntegrationProductFromExternalIds`. The options object type is as follows:
628
634
  ```ts
629
635
  {
630
636
  type: "integration";
@@ -640,27 +646,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
640
646
 
641
647
  ### Added
642
648
 
643
- - `IntegrationProduct.getAllWorkflows()`: Returns an array of `ProductWorkflow`, ordered by their internal `index` value (matches the order seen on the SpiffCommerce Hub).
649
+ - `IntegrationProduct.getAllWorkflows()`: Returns an array of `ProductWorkflow`, ordered by their internal `index` value (matches the order seen on the SpiffCommerce Hub).
644
650
 
645
651
  ## [20.0.1] - 23-02-2024
646
652
 
647
653
  ### Changed
648
654
 
649
- - `StepHandle.executeAnimations()` now logs a warning to the console when the associated `WorkflowManager` is not associated with a `ThreeDPreviewService`.
655
+ - `StepHandle.executeAnimations()` now logs a warning to the console when the associated `WorkflowManager` is not associated with a `ThreeDPreviewService`.
650
656
 
651
657
  ## [20.0.0] - 15-02-2024
652
658
 
653
659
  ### Added
654
660
 
655
- - Additional configuration options for GraphQL on bundles.
656
- - A separate fetchProducts function on the ProductCollection interface.
661
+ - Additional configuration options for GraphQL on bundles.
662
+ - A separate fetchProducts function on the ProductCollection interface.
657
663
 
658
664
  ### Changed
659
665
 
660
- - Removed async on getProducts call.
666
+ - Removed async on getProducts call.
661
667
 
662
668
  ### Removed
663
669
 
664
- - Unused normalize.css file.
665
- - Identical links assigned in each translation file.
666
- - Duplicate index file for the english version.
670
+ - Unused normalize.css file.
671
+ - Identical links assigned in each translation file.
672
+ - Duplicate index file for the english version.