@spiffcommerce/core 29.1.2 → 29.2.0-beta.6bbdbda8-92eb-545b-8950-9c606957bf1b
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 +6 -0
- package/dist/index.d.ts +30 -4
- package/dist/index.js +119 -115
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +848 -785
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,12 @@ 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.2.0] - 25-08-2025
|
|
18
|
+
|
|
19
|
+
## Added
|
|
20
|
+
|
|
21
|
+
- Added the function `TextGlobalPropertyHandle.isTemplatingEnabled(): boolean`. Use this to determine whether you should display any templating tools.
|
|
22
|
+
|
|
17
23
|
## [29.1.2] - 25-08-2025
|
|
18
24
|
|
|
19
25
|
## Changed
|
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
|
|
1368
|
+
* @returns A human-friendly title.
|
|
1369
1369
|
*/
|
|
1370
1370
|
getTitle(): string;
|
|
1371
1371
|
/**
|
|
1372
|
-
* @returns A human
|
|
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.
|
|
@@ -1454,6 +1462,11 @@ declare class FileUploadGlobalPropertyHandle extends GlobalPropertyHandle {
|
|
|
1454
1462
|
}
|
|
1455
1463
|
declare class TextGlobalPropertyHandle extends GlobalPropertyHandle {
|
|
1456
1464
|
constructor(bundle: Bundle$1, property: GlobalPropertyConfigurationAspect);
|
|
1465
|
+
/**
|
|
1466
|
+
* If this returns false, you should not display any templating tools.
|
|
1467
|
+
* Note: Templates will currently still be rendered, regardless of what this function returns.
|
|
1468
|
+
*/
|
|
1469
|
+
isTemplatingEnabled(): boolean;
|
|
1457
1470
|
/**
|
|
1458
1471
|
* Gets the current text
|
|
1459
1472
|
*/
|
|
@@ -1526,12 +1539,14 @@ interface GlobalPropertyStateManager {
|
|
|
1526
1539
|
setGlobalPropertyState(state: GlobalPropertyState): Promise<void>;
|
|
1527
1540
|
getAspect(name: string, channel?: number): string | undefined;
|
|
1528
1541
|
getAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, channel?: number): S | undefined;
|
|
1542
|
+
getAspectMandatoryFulfilled(name: string): boolean | undefined;
|
|
1529
1543
|
/**
|
|
1530
1544
|
* Updates the value of a named aspect in the state.
|
|
1531
1545
|
* @param name The name (key) of the aspect. This must match the key in the associated Global Property Config
|
|
1532
1546
|
* @param value The value, represented as a string.
|
|
1533
1547
|
* @param storage Optional: Additional data storage for the aspect. Not specifying this parameter, or providing `undefined`, will not update the
|
|
1534
1548
|
* storage (if it already exists). Providing `null` will clear the existing storage.
|
|
1549
|
+
* @param channel Optional: Additional sub-identifier.
|
|
1535
1550
|
*/
|
|
1536
1551
|
setAspect(name: string, value: string, storage?: GlobalPropertyStateAspectStorage | null, channel?: number): Promise<void>;
|
|
1537
1552
|
setAspectStorage<S extends GlobalPropertyStateAspectStorage>(name: string, storage: S | null, channel?: number): Promise<void>;
|
|
@@ -1766,6 +1781,11 @@ declare const getProductCollections: (ids: string[]) => Promise<ProductCollectio
|
|
|
1766
1781
|
interface ConditionalGlobalPropertiesChangedEventData {
|
|
1767
1782
|
globalProperties: GlobalPropertyHandle[];
|
|
1768
1783
|
}
|
|
1784
|
+
interface GlobalPropertiesMandatoryChangedEventData {
|
|
1785
|
+
changed: GlobalPropertyHandle[];
|
|
1786
|
+
completed: GlobalPropertyHandle[];
|
|
1787
|
+
remaining: GlobalPropertyHandle[];
|
|
1788
|
+
}
|
|
1769
1789
|
interface WorkflowExperienceHoverEventData {
|
|
1770
1790
|
workflowExperience: WorkflowExperience;
|
|
1771
1791
|
}
|
|
@@ -1776,6 +1796,7 @@ interface WorkflowExperienceRemovedEventData extends WorkflowExperienceAddedEven
|
|
|
1776
1796
|
}
|
|
1777
1797
|
type BundleEventMap = {
|
|
1778
1798
|
"conditional-global-properties-changed": ConditionalGlobalPropertiesChangedEventData;
|
|
1799
|
+
"global-properties-mandatory-changed": GlobalPropertiesMandatoryChangedEventData;
|
|
1779
1800
|
"workflow-experience-hover-enter": WorkflowExperienceHoverEventData;
|
|
1780
1801
|
"workflow-experience-hover-exit": WorkflowExperienceHoverEventData;
|
|
1781
1802
|
"workflow-experience-added": WorkflowExperienceAddedEventData;
|
|
@@ -2895,15 +2916,20 @@ interface GlobalPropertyConfigurationAspect {
|
|
|
2895
2916
|
entityId?: string;
|
|
2896
2917
|
conditions?: GlobalPropertyConfigurationAspectCondition[];
|
|
2897
2918
|
data?: GlobalPropertyConfigurationAspectData;
|
|
2919
|
+
mandatory?: boolean;
|
|
2898
2920
|
}
|
|
2899
2921
|
interface GlobalPropertyConfigurationAspectData {
|
|
2900
|
-
fileUpload
|
|
2922
|
+
fileUpload?: GlobalPropertyConfigurationAspectFileUploadData;
|
|
2923
|
+
text?: GlobalPropertyConfigurationAspectTextData;
|
|
2901
2924
|
}
|
|
2902
2925
|
interface GlobalPropertyConfigurationAspectFileUploadData {
|
|
2903
2926
|
colorPickerEnabled?: boolean;
|
|
2904
2927
|
pmsPickerEnabled?: boolean;
|
|
2905
2928
|
colorOptionId?: string;
|
|
2906
2929
|
}
|
|
2930
|
+
interface GlobalPropertyConfigurationAspectTextData {
|
|
2931
|
+
templatingEnabled?: boolean;
|
|
2932
|
+
}
|
|
2907
2933
|
interface GlobalPropertyConfigurationAspectCondition {
|
|
2908
2934
|
targetAspectName?: string;
|
|
2909
2935
|
action: AspectConditionAction;
|
|
@@ -5925,4 +5951,4 @@ declare const validateWorkflowExperienceRecipients: (workflowExperiences: Workfl
|
|
|
5925
5951
|
*/
|
|
5926
5952
|
declare const getGlobalPropertyStateForBundle: (bundleId: string) => Promise<GlobalPropertyState | undefined>;
|
|
5927
5953
|
|
|
5928
|
-
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 };
|