@spiffcommerce/core 40.3.3 → 40.3.5
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/README.md +3 -3
- package/dist/index.cjs +203 -203
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +26 -13
- package/dist/index.mjs +1707 -1743
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -39
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from '
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import * as _apollo_client_core from '@apollo/client/core';
|
|
3
3
|
import { OperationVariables, QueryOptions, ApolloQueryResult, DefaultContext, MutationOptions, FetchResult, ApolloClient } from '@apollo/client/core';
|
|
4
|
-
import { RenderableContextService, RenderableContext, ModelContainer, ThreeDPreviewService } from '@
|
|
4
|
+
import { RenderableContextService, RenderableContext, ModelContainer, ThreeDPreviewService } from '@repo/preview';
|
|
5
5
|
import * as lodash from 'lodash';
|
|
6
|
-
import { CompleteQuoteMessage, ThemeInstallConfigurationGraphQl, ConversionConfiguration } from '@
|
|
7
|
-
export { ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation } from '@spiffcommerce/theme-bridge';
|
|
6
|
+
import { CompleteQuoteMessage, ThemeInstallConfigurationGraphQl, ConversionConfiguration } from '@repo/types';
|
|
8
7
|
import { Currency } from 'dinero.js';
|
|
9
8
|
import { FuseResult } from 'fuse.js';
|
|
10
9
|
import { Font } from 'opentype.js';
|
|
@@ -613,7 +612,7 @@ declare const getSvgElement: (layout: ILayout, elements: LayoutElement[], config
|
|
|
613
612
|
interface LayoutData {
|
|
614
613
|
layoutState: LayoutState;
|
|
615
614
|
Component: PapyrusComponent<SVGLayoutProps>;
|
|
616
|
-
getComponentWithProps: (configuration: LayoutComponentConfiguration) =>
|
|
615
|
+
getComponentWithProps: (configuration: LayoutComponentConfiguration) => PapyrusNode;
|
|
617
616
|
}
|
|
618
617
|
|
|
619
618
|
declare class LayoutPreviewService implements RenderableContextService {
|
|
@@ -2265,7 +2264,7 @@ declare class CurrencyService {
|
|
|
2265
2264
|
* @param currency The currency to represent the amount in.
|
|
2266
2265
|
* @param amount The amount in minor units to format.
|
|
2267
2266
|
*/
|
|
2268
|
-
formatCurrencyForDisplay(currency: Currency, amount: number):
|
|
2267
|
+
formatCurrencyForDisplay(currency: Currency, amount: number): string;
|
|
2269
2268
|
/**
|
|
2270
2269
|
* Get the number of decimal places expected in a currency string.
|
|
2271
2270
|
* @param currency The currency to determine precision for.
|
|
@@ -4931,6 +4930,20 @@ interface OrderItem {
|
|
|
4931
4930
|
transactionId: string;
|
|
4932
4931
|
amountToOrder: number;
|
|
4933
4932
|
}
|
|
4933
|
+
declare enum ConversionDataType {
|
|
4934
|
+
Email = "Email",
|
|
4935
|
+
FirstName = "FirstName",
|
|
4936
|
+
LastName = "LastName",
|
|
4937
|
+
Phone = "Phone",
|
|
4938
|
+
Apartment = "Apartment",
|
|
4939
|
+
City = "City",
|
|
4940
|
+
Country = "Country",
|
|
4941
|
+
OrganizationName = "OrganizationName",
|
|
4942
|
+
PostCode = "PostCode",
|
|
4943
|
+
State = "State",
|
|
4944
|
+
StreetAddress = "StreetAddress",
|
|
4945
|
+
Custom = "Custom"
|
|
4946
|
+
}
|
|
4934
4947
|
|
|
4935
4948
|
declare class OptionService {
|
|
4936
4949
|
/**
|
|
@@ -5991,21 +6004,21 @@ declare const determineCorrectFontSizeAndLines: (curFontSize: number, fontData:
|
|
|
5991
6004
|
declare const loadFont: (url: string) => Promise<Font>;
|
|
5992
6005
|
declare const outlineFontsInSvg: (svg: string) => Promise<string>;
|
|
5993
6006
|
|
|
5994
|
-
declare const nameBundle: (id: string, name: string, context: any) => Promise<_apollo_client_core.
|
|
5995
|
-
declare const nameTransaction: (id: string, name: string) => Promise<_apollo_client_core.
|
|
5996
|
-
declare const duplicateBundle: (id: string, template: boolean) => Promise<_apollo_client_core.
|
|
6007
|
+
declare const nameBundle: (id: string, name: string, context: any) => Promise<_apollo_client_core.InteropMutateResult<object>>;
|
|
6008
|
+
declare const nameTransaction: (id: string, name: string) => Promise<_apollo_client_core.InteropMutateResult<object>>;
|
|
6009
|
+
declare const duplicateBundle: (id: string, template: boolean) => Promise<_apollo_client_core.InteropMutateResult<{
|
|
5997
6010
|
bundleDuplicate: Bundle;
|
|
5998
6011
|
}>>;
|
|
5999
|
-
declare const duplicateTransaction: (id: string, template: boolean) => Promise<_apollo_client_core.
|
|
6012
|
+
declare const duplicateTransaction: (id: string, template: boolean) => Promise<_apollo_client_core.InteropMutateResult<{
|
|
6000
6013
|
transactionDuplicate: Transaction;
|
|
6001
6014
|
}>>;
|
|
6002
6015
|
declare const getCustomer: (email: string) => Promise<{
|
|
6003
6016
|
id: string;
|
|
6004
6017
|
}>;
|
|
6005
|
-
declare const getCustomerBundles: (customerId: string, limit: number, offset: number) => Promise<_apollo_client_core.
|
|
6018
|
+
declare const getCustomerBundles: (customerId: string, limit: number, offset: number) => Promise<_apollo_client_core.InteropApolloQueryResult<{
|
|
6006
6019
|
customerBundlesFeed: BundlesFeed;
|
|
6007
6020
|
}>>;
|
|
6008
|
-
declare const getTransactionsForBundle: (id: string, context: any) => Promise<_apollo_client_core.
|
|
6021
|
+
declare const getTransactionsForBundle: (id: string, context: any) => Promise<_apollo_client_core.InteropApolloQueryResult<{
|
|
6009
6022
|
bundles: {
|
|
6010
6023
|
id: string;
|
|
6011
6024
|
transactions: Transaction[];
|
|
@@ -6176,4 +6189,4 @@ declare const getIntegrationProducts: (ids: string[]) => Promise<IntegrationProd
|
|
|
6176
6189
|
*/
|
|
6177
6190
|
declare const getTransformedAssetURL: (asset: Asset | string, resolution?: number, format?: "jpg" | "png" | "webp", quality?: number) => string | undefined;
|
|
6178
6191
|
|
|
6179
|
-
export { AddonHandle, type AddressComponent, type AddressValidationJob, AddressValidationJobStatus, type AddressValidationResult, AddressValidationResultConfirmationLevel, AddressValidationStatus, type Animatable, type AnyStepData, ArrayInput, AspectType, type Asset, type AssetConfiguration, AssetNotFoundError, type AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, type Bundle$1 as Bundle, BundleDesignCreationCartAddMode, type BundleDesignCreationMessage, type BundleEvent, type BundleEventData, type BundleEventType, type BundleProductsAddedEventData, type BundleProductsRemovedEventData, type Bundle as BundleRaw, type BundleStakeholder, CanvasCommand, CollectionProduct, type ColorDefinition, type ColorOption, ColorOptionGlobalPropertyHandle, type ColorProfileProps, CommandContext, type CommandState, type Condition, type ConditionalGlobalPropertiesChangedEventData, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, type Customer, type CustomerDetailsInput, DeleteElementCommand, type DesignCreationMessage, type DesignCreationProgressUpdate, type DesignInputStep, type DigitalContentStepData, DigitalContentStepHandle, type EditedSteps, type ExportedStepData, type ExportedStepDataProperty, type ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, type FrameElement, FrameService, FrameStep, type FrameStepData, FrameStepHandle, type FrameThresholdSettings, type GetNewWorkflowExperienceOptions as GetNewWorkflowOptions, type GetWorkflowOptions, type GlobalPropertiesMandatoryChangedEventData, type GlobalPropertyConfiguration, GlobalPropertyHandle, GroupCommand, type ILayout, type IllustrationElement, type IllustrationStepData, IllustrationStepHandle, type ImageElement, InformationMessageType, type InformationResult, type InformationStepData, InformationStepHandle, type Integration, type IntegrationOptionResource, IntegrationProduct, IntegrationType, type LayoutComponentConfiguration, type LayoutData, type LayoutElement, LayoutElementFactory, LayoutElementType, LayoutNotFoundError, LayoutRenderingPurpose, type LayoutState, type LayoutsState, type MandatorySteps, MaterialEffectMode, type MaterialStepData, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, type ModelStepData, ModelStepHandle, type ModuleStepData, ModuleStepHandle, MoveCommand, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, type OptionResource, type Order, type OrderItem, type PapyrusComponent, ParseError, type PictureStepData, PictureStepHandle, type Placeable, type PmsSearchResult, type Point, type Product, ProductCameraRig, ProductCollection, ProductCollectionProductSortKey, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, type QuestionStepData, QuestionStepHandle, QueueablePromise, type Recipient, type Region, type RegionElement, type RenderableScene, ResizeCommand, ResourceNotFoundError, RotateCommand, type SavedDesign, ScaleAxis, type SelectionStorage, SendBackwardsCommand, type ShapeStepData, ShapeStepHandle, type ShareAction, ShareActionType, type SilentIllustrationStepData, SpiffCommerceClient, type Stakeholder, StakeholderType, type StateMutationFunc, type Step, type StepAspect, StepAspectType, type StepElements, type StepGroup, StepHandle, type StepStorage, StepType, TextAlgorithm, TextChangeCommand, type TextChangeResult, TextGlobalPropertyHandle, TextInput, type TextStepData, TextStepHandle, type TextStepStorage, type TextboxElement, type Theme, type ToastCallback, type Transaction, UnhandledBehaviorError, UnitOfMeasurement, UpdateImageSourceCommand, Variant, type VariantResource, type Workflow, type WorkflowExperience, type WorkflowExperienceAddedEventData, WorkflowExperienceEventType, type WorkflowExperienceHoverEventData, WorkflowExperienceImpl, type WorkflowExperienceRemovedEventData, type WorkflowManager, type WorkflowMetadata, type WorkflowPanel, type WorkflowScene, type WorkflowSelections, type WorkflowStorage, amtChannelsForAspect, assetService, browserColorToHex, cmPerPixel, currentDirection, dataUrlFromExternalUrl, deleteBundle, designService, determineCorrectFontSizeAndLines, digitalContentStepService, domParser, duplicateBundle, duplicateTransaction, fetchAsString, findAngle, findElement, findPmsColors, frameDataCache, frameStepService, generate, generateCommands, generateSVGWithUnknownColors, generateStateFromDesignInputSteps, getAddressValidationJobs, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleIdForTransaction, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getGlobalPropertyStateForBundle, getIntegration, getIntegrationProducts, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getProductCollections, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTransformedAssetURL, getTrueCoordinates, getUnorderedTransactions, getValidationJobsForWorkflowExperiences, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, isCloseToValue, loadFont, matchHexToPms, materialStepService, metafieldManager, mmPerPixel, modelStepService, modifySVGColors, moduleStepService, nameBundle, nameTransaction, optionService, outlineFontsInSvg, overrideWorkflowExperienceRecipientAddress, 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 };
|
|
6192
|
+
export { AddonHandle, type AddressComponent, type AddressValidationJob, AddressValidationJobStatus, type AddressValidationResult, AddressValidationResultConfirmationLevel, AddressValidationStatus, type Animatable, type AnyStepData, ArrayInput, AspectType, type Asset, type AssetConfiguration, AssetNotFoundError, type AssetObjectVersion, AssetType, BringForwardCommand, BringToBackCommand, BringToFrontCommand, type Bundle$1 as Bundle, BundleDesignCreationCartAddMode, type BundleDesignCreationMessage, type BundleEvent, type BundleEventData, type BundleEventType, type BundleProductsAddedEventData, type BundleProductsRemovedEventData, type Bundle as BundleRaw, type BundleStakeholder, CanvasCommand, CollectionProduct, type ColorDefinition, type ColorOption, ColorOptionGlobalPropertyHandle, type ColorProfileProps, CommandContext, type CommandState, type Condition, type ConditionalGlobalPropertiesChangedEventData, ConversionDataType, CreateElementCommand, CreateLayoutCommand, CurrencyContext, CurrencyService, type Customer, type CustomerDetailsInput, DeleteElementCommand, type DesignCreationMessage, type DesignCreationProgressUpdate, type DesignInputStep, type DigitalContentStepData, DigitalContentStepHandle, type EditedSteps, type ExportedStepData, type ExportedStepDataProperty, type ExportedStepDataPropertyType, FileUploadGlobalPropertyHandle, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FontAlignmentCommand, FontColorCommand, FontSizeCommand, FontSourceCommand, type FrameElement, FrameService, FrameStep, type FrameStepData, FrameStepHandle, type FrameThresholdSettings, type GetNewWorkflowExperienceOptions as GetNewWorkflowOptions, type GetWorkflowOptions, type GlobalPropertiesMandatoryChangedEventData, type GlobalPropertyConfiguration, GlobalPropertyHandle, GroupCommand, type ILayout, type IllustrationElement, type IllustrationStepData, IllustrationStepHandle, type ImageElement, InformationMessageType, type InformationResult, type InformationStepData, InformationStepHandle, type Integration, type IntegrationOptionResource, IntegrationProduct, IntegrationType, type LayoutComponentConfiguration, type LayoutData, type LayoutElement, LayoutElementFactory, LayoutElementType, LayoutNotFoundError, LayoutRenderingPurpose, type LayoutState, type LayoutsState, type MandatorySteps, MaterialEffectMode, type MaterialStepData, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, type ModelStepData, ModelStepHandle, type ModuleStepData, ModuleStepHandle, MoveCommand, NodeType, ObjectInput, ObjectInputType, OptionGlobalPropertyHandle, OptionNotFoundError, type OptionResource, type Order, type OrderItem, type PapyrusComponent, ParseError, type PictureStepData, PictureStepHandle, type Placeable, type PmsSearchResult, type Point, type Product, ProductCameraRig, ProductCollection, ProductCollectionProductSortKey, ProductWorkflow$1 as ProductWorkflow, promiseCache as PromiseCache, PromiseQueue, type QuestionStepData, QuestionStepHandle, QueueablePromise, type Recipient, type Region, type RegionElement, type RenderableScene, ResizeCommand, ResourceNotFoundError, RotateCommand, type SavedDesign, ScaleAxis, type SelectionStorage, SendBackwardsCommand, type ShapeStepData, ShapeStepHandle, type ShareAction, ShareActionType, type SilentIllustrationStepData, SpiffCommerceClient, type Stakeholder, StakeholderType, type StateMutationFunc, type Step, type StepAspect, StepAspectType, type StepElements, type StepGroup, StepHandle, type StepStorage, StepType, TextAlgorithm, TextChangeCommand, type TextChangeResult, TextGlobalPropertyHandle, TextInput, type TextStepData, TextStepHandle, type TextStepStorage, type TextboxElement, type Theme, type ToastCallback, type Transaction, UnhandledBehaviorError, UnitOfMeasurement, UpdateImageSourceCommand, Variant, type VariantResource, type Workflow, type WorkflowExperience, type WorkflowExperienceAddedEventData, WorkflowExperienceEventType, type WorkflowExperienceHoverEventData, WorkflowExperienceImpl, type WorkflowExperienceRemovedEventData, type WorkflowManager, type WorkflowMetadata, type WorkflowPanel, type WorkflowScene, type WorkflowSelections, type WorkflowStorage, amtChannelsForAspect, assetService, browserColorToHex, cmPerPixel, currentDirection, dataUrlFromExternalUrl, deleteBundle, designService, determineCorrectFontSizeAndLines, digitalContentStepService, domParser, duplicateBundle, duplicateTransaction, fetchAsString, findAngle, findElement, findPmsColors, frameDataCache, frameStepService, generate, generateCommands, generateSVGWithUnknownColors, generateStateFromDesignInputSteps, getAddressValidationJobs, getAttributesFromArrayBuffer, getAxisAlignedBoundingBox, getBoundedOffsets, getBundleIdForTransaction, getBundleThemeConfiguration, getCustomer, getCustomerBundles, getElementVertices, getFrameData, getGlobalPropertyStateForBundle, getIntegration, getIntegrationProducts, getNEPoint, getNWPoint, getOrderedTransactions, getOverrideThemeConfiguration, getPointOfRotation, getProductCollections, getSEPoint, getSvgElement, getTemplateBundles, getTemplateTransactions, getTransaction, getTransactionThemeConfiguration, getTransactionsForBundle, getTransformedAssetURL, getTrueCoordinates, getUnorderedTransactions, getValidationJobsForWorkflowExperiences, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, isCloseToValue, loadFont, matchHexToPms, materialStepService, metafieldManager, mmPerPixel, modelStepService, modifySVGColors, moduleStepService, nameBundle, nameTransaction, optionService, outlineFontsInSvg, overrideWorkflowExperienceRecipientAddress, 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 };
|