@spiffcommerce/core 29.2.0 → 29.3.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,15 @@ 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
+ ## [29.3.0] - 27-08-2025
18
+
19
+ ## Added
20
+
21
+ - Added new functionality regarding mandatory Global Property aspects:
22
+ - 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.
23
+ - 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.
24
+ - 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[]; }`
25
+
17
26
  ## [29.2.0] - 25-08-2025
18
27
 
19
28
  ## Added
package/dist/index.d.ts CHANGED
@@ -1365,11 +1365,11 @@ declare abstract class GlobalPropertyHandle {
1365
1365
  */
1366
1366
  getName(): string;
1367
1367
  /**
1368
- * @returns A human friendly title.
1368
+ * @returns A human-friendly title.
1369
1369
  */
1370
1370
  getTitle(): string;
1371
1371
  /**
1372
- * @returns A human friendly description.
1372
+ * @returns A human-friendly description.
1373
1373
  */
1374
1374
  getDescription(): string;
1375
1375
  /**
@@ -1380,6 +1380,14 @@ declare abstract class GlobalPropertyHandle {
1380
1380
  * @returns The underlying property data object.
1381
1381
  */
1382
1382
  getRawProperty(): GlobalPropertyConfigurationAspect;
1383
+ /**
1384
+ * @returns Whether this aspect has been marked as required to be completed before the user can continue.
1385
+ */
1386
+ isMandatory(): boolean;
1387
+ /**
1388
+ * @returns Whether this 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.
1389
+ */
1390
+ isMandatoryFulfilled(): boolean;
1383
1391
  /**
1384
1392
  * Applies the global state to all shared steps, if the state is set.
1385
1393
  * @param targetExperiences Optionally filter the workflow experiences it should be applied to.
@@ -1531,12 +1539,14 @@ interface GlobalPropertyStateManager {
1531
1539
  setGlobalPropertyState(state: GlobalPropertyState): Promise<void>;
1532
1540
  getAspect(name: string, channel?: number): string | undefined;
1533
1541
  getAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, channel?: number): S | undefined;
1542
+ getAspectMandatoryFulfilled(name: string): boolean | undefined;
1534
1543
  /**
1535
1544
  * Updates the value of a named aspect in the state.
1536
1545
  * @param name The name (key) of the aspect. This must match the key in the associated Global Property Config
1537
1546
  * @param value The value, represented as a string.
1538
1547
  * @param storage Optional: Additional data storage for the aspect. Not specifying this parameter, or providing `undefined`, will not update the
1539
1548
  * storage (if it already exists). Providing `null` will clear the existing storage.
1549
+ * @param channel Optional: Additional sub-identifier.
1540
1550
  */
1541
1551
  setAspect(name: string, value: string, storage?: GlobalPropertyStateAspectStorage | null, channel?: number): Promise<void>;
1542
1552
  setAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, storage: S | null, channel?: number): Promise<void>;
@@ -1771,6 +1781,11 @@ declare const getProductCollections: (ids: string[]) => Promise<ProductCollectio
1771
1781
  interface ConditionalGlobalPropertiesChangedEventData {
1772
1782
  globalProperties: GlobalPropertyHandle[];
1773
1783
  }
1784
+ interface GlobalPropertiesMandatoryChangedEventData {
1785
+ changed: GlobalPropertyHandle[];
1786
+ completed: GlobalPropertyHandle[];
1787
+ remaining: GlobalPropertyHandle[];
1788
+ }
1774
1789
  interface WorkflowExperienceHoverEventData {
1775
1790
  workflowExperience: WorkflowExperience;
1776
1791
  }
@@ -1781,6 +1796,7 @@ interface WorkflowExperienceRemovedEventData extends WorkflowExperienceAddedEven
1781
1796
  }
1782
1797
  type BundleEventMap = {
1783
1798
  "conditional-global-properties-changed": ConditionalGlobalPropertiesChangedEventData;
1799
+ "global-properties-mandatory-changed": GlobalPropertiesMandatoryChangedEventData;
1784
1800
  "workflow-experience-hover-enter": WorkflowExperienceHoverEventData;
1785
1801
  "workflow-experience-hover-exit": WorkflowExperienceHoverEventData;
1786
1802
  "workflow-experience-added": WorkflowExperienceAddedEventData;
@@ -2900,6 +2916,7 @@ interface GlobalPropertyConfigurationAspect {
2900
2916
  entityId?: string;
2901
2917
  conditions?: GlobalPropertyConfigurationAspectCondition[];
2902
2918
  data?: GlobalPropertyConfigurationAspectData;
2919
+ mandatory?: boolean;
2903
2920
  }
2904
2921
  interface GlobalPropertyConfigurationAspectData {
2905
2922
  fileUpload?: GlobalPropertyConfigurationAspectFileUploadData;
@@ -5934,4 +5951,4 @@ declare const validateWorkflowExperienceRecipients: (workflowExperiences: Workfl
5934
5951
  */
5935
5952
  declare const getGlobalPropertyStateForBundle: (bundleId: string) => Promise<GlobalPropertyState | undefined>;
5936
5953
 
5937
- export { AddonHandle, AddressComponent, AddressValidationJob, AddressValidationJobStatus, AddressValidationResult, AddressValidationResultConfirmationLevel, Animatable, AnyStepData, ArrayInput, AspectType, Asset, AssetConfiguration, AssetNotFoundError, AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, Bundle$1 as Bundle, BundleDesignCreationCartAddMode, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, Bundle as BundleRaw, BundleStakeholder, CanvasCommand, CollectionProduct, ColorDefinition, ColorOption, ColorOptionGlobalPropertyHandle, ColorProfileProps, CommandContext, CommandState, Condition, ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, Customer, CustomerDetailsInput, DeleteElementCommand, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, DigitalContentStepData, DigitalContentStepHandle, EditedSteps, ExportedStepData, ExportedStepDataProperty, ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, FrameElement, FrameService, FrameStep, FrameStepData, FrameStepHandle, FrameThresholdSettings, GetNewWorkflowOptions, GetWorkflowOptions, GlobalPropertyConfiguration, GlobalPropertyHandle, GroupCommand, ILayout, IllustrationElement, IllustrationStepData, IllustrationStepHandle, ImageElement, InformationMessageType, InformationResult, InformationStepData, InformationStepHandle, Integration, IntegrationOptionResource, IntegrationProduct, IntegrationType, LayoutComponentConfiguration, LayoutData, LayoutElement, LayoutElementFactory, LayoutElementType, LayoutNotFoundError, LayoutRenderingPurpose, LayoutState, LayoutsState, MandatorySteps, MaterialEffectMode, MaterialStepData, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepData, ModelStepHandle, ModuleStepData, ModuleStepHandle, MoveCommand, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, OptionResource, Order, OrderItem, PapyrusComponent, ParseError, PictureStepData, PictureStepHandle, Placeable, PmsSearchResult, Point, Product, ProductCameraRig, ProductCollection, ProductCollectionProductSortKey, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepData, QuestionStepHandle, QueueablePromise, Recipient, Region, RegionElement, RenderableScene, ResizeCommand, ResourceNotFoundError, RotateCommand, SavedDesign, ScaleAxis, SelectionStorage, SendBackwardsCommand, ShapeStepData, ShapeStepHandle, ShareAction, ShareActionType, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, Step, StepAspect, StepAspectType, StepElements, StepGroup, StepHandle, StepStorage, StepType, TextAlgorithm, TextChangeCommand, TextChangeResult, TextGlobalPropertyHandle, TextInput, TextStepData, TextStepHandle, TextStepStorage, TextboxElement, Theme, ToastCallback, Transaction, Transform, TransformCollection$1 as TransformCollection, UnhandledBehaviorError, UnitOfMeasurement, UpdateImageSourceCommand, Variant, VariantResource, Vector3, Workflow, WorkflowExperience, WorkflowExperienceEventType, WorkflowExperienceHoverEventData, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowPanel, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, browserColorToHex, cmPerPixel, createDesign, currentDirection, dataUrlFromExternalUrl, designService, determineCorrectFontSizeAndLines, digitalContentStepService, domParser, duplicateBundle, duplicateTransaction, fetchAsString, findAngle, findElement, findPmsColors, frameDataCache, frameStepService, generate, generateCommands, generateSVGWithUnknownColors, generateStateFromDesignInputSteps, getAddressValidationJobs, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getGlobalPropertyStateForBundle, getIntegration, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getProductCollections, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTrueCoordinates, getUnorderedTransactions, getValidationJobsForWorkflowExperiences, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, isCloseToValue, loadFont, matchHexToPms, materialStepService, metafieldManager, mmPerPixel, modelStepService, modifySVGColors, moduleStepService, nameBundle, nameTransaction, optionService, outlineFontsInSvg, patternImageDataCache, persistenceService, pictureStepService, pmsToRgb, questionStepService, registerFetchImplementation, registerWindowImplementation, rehydrateSerializedLayout, rgbToPms, rotateAroundPoint, sanitizeSvgTree, setBearerAuthenticationToken, setCanvasModule, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, svgColorValueToDefinition, svgStringDimensions, svgToDataUrl, textStepService, toast, validateWorkflowExperienceRecipient, validateWorkflowExperienceRecipients, xmlSerializer };
5954
+ export { AddonHandle, AddressComponent, AddressValidationJob, AddressValidationJobStatus, AddressValidationResult, AddressValidationResultConfirmationLevel, Animatable, AnyStepData, ArrayInput, AspectType, Asset, AssetConfiguration, AssetNotFoundError, AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, Bundle$1 as Bundle, BundleDesignCreationCartAddMode, BundleDesignCreationMessage, BundleEvent, BundleEventData, BundleEventType, Bundle as BundleRaw, BundleStakeholder, CanvasCommand, CollectionProduct, ColorDefinition, ColorOption, ColorOptionGlobalPropertyHandle, ColorProfileProps, CommandContext, CommandState, Condition, ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, Customer, CustomerDetailsInput, DeleteElementCommand, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, DigitalContentStepData, DigitalContentStepHandle, EditedSteps, ExportedStepData, ExportedStepDataProperty, ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, FrameElement, FrameService, FrameStep, FrameStepData, FrameStepHandle, FrameThresholdSettings, GetNewWorkflowOptions, GetWorkflowOptions, GlobalPropertiesMandatoryChangedEventData, GlobalPropertyConfiguration, GlobalPropertyHandle, GroupCommand, ILayout, IllustrationElement, IllustrationStepData, IllustrationStepHandle, ImageElement, InformationMessageType, InformationResult, InformationStepData, InformationStepHandle, Integration, IntegrationOptionResource, IntegrationProduct, IntegrationType, LayoutComponentConfiguration, LayoutData, LayoutElement, LayoutElementFactory, LayoutElementType, LayoutNotFoundError, LayoutRenderingPurpose, LayoutState, LayoutsState, MandatorySteps, MaterialEffectMode, MaterialStepData, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepData, ModelStepHandle, ModuleStepData, ModuleStepHandle, MoveCommand, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, OptionResource, Order, OrderItem, PapyrusComponent, ParseError, PictureStepData, PictureStepHandle, Placeable, PmsSearchResult, Point, Product, ProductCameraRig, ProductCollection, ProductCollectionProductSortKey, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, QuestionStepData, QuestionStepHandle, QueueablePromise, Recipient, Region, RegionElement, RenderableScene, ResizeCommand, ResourceNotFoundError, RotateCommand, SavedDesign, ScaleAxis, SelectionStorage, SendBackwardsCommand, ShapeStepData, ShapeStepHandle, ShareAction, ShareActionType, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, Step, StepAspect, StepAspectType, StepElements, StepGroup, StepHandle, StepStorage, StepType, TextAlgorithm, TextChangeCommand, TextChangeResult, TextGlobalPropertyHandle, TextInput, TextStepData, TextStepHandle, TextStepStorage, TextboxElement, Theme, ToastCallback, Transaction, Transform, TransformCollection$1 as TransformCollection, UnhandledBehaviorError, UnitOfMeasurement, UpdateImageSourceCommand, Variant, VariantResource, Vector3, Workflow, WorkflowExperience, WorkflowExperienceEventType, WorkflowExperienceHoverEventData, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowPanel, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, browserColorToHex, cmPerPixel, createDesign, currentDirection, dataUrlFromExternalUrl, designService, determineCorrectFontSizeAndLines, digitalContentStepService, domParser, duplicateBundle, duplicateTransaction, fetchAsString, findAngle, findElement, findPmsColors, frameDataCache, frameStepService, generate, generateCommands, generateSVGWithUnknownColors, generateStateFromDesignInputSteps, getAddressValidationJobs, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getGlobalPropertyStateForBundle, getIntegration, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getProductCollections, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTrueCoordinates, getUnorderedTransactions, getValidationJobsForWorkflowExperiences, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, isCloseToValue, loadFont, matchHexToPms, materialStepService, metafieldManager, mmPerPixel, modelStepService, modifySVGColors, moduleStepService, nameBundle, nameTransaction, optionService, outlineFontsInSvg, patternImageDataCache, persistenceService, pictureStepService, pmsToRgb, questionStepService, registerFetchImplementation, registerWindowImplementation, rehydrateSerializedLayout, rgbToPms, rotateAroundPoint, sanitizeSvgTree, setBearerAuthenticationToken, setCanvasModule, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, svgColorValueToDefinition, svgStringDimensions, svgToDataUrl, textStepService, toast, validateWorkflowExperienceRecipient, validateWorkflowExperienceRecipients, xmlSerializer };