@spiffcommerce/core 0.3.6 → 0.3.8
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/dist/main.js +3 -3
- package/dist/module.js +9 -9
- package/dist/types.d.ts +74 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StepAspect, Workflow, AnyStepData, Step, Asset, AssetType, IServerModel, MaterialResource, IllustrationStepData, VariantResource, FrameStepData, MaterialStepData, ModelStepData, ModuleStepData, PatchworkStepData, PictureStepData, QuestionStepData, ShapeStepData, TextStepData as _TextStepData1, CameraAnimation, ModelAnimation, OptionResource, StepType, TextStepData } from "papyrus/build/main/generation/Workflow";
|
|
1
|
+
import { StepAspect, Workflow, AnyStepData, Step, Asset, AssetType, IServerModel, MaterialResource, IllustrationStepData, VariantResource, DigitalContentStepData, FrameStepData, MaterialStepData, ModelStepData, ModuleStepData, PatchworkStepData, PictureStepData, QuestionStepData, ShapeStepData, TextStepData as _TextStepData1, CameraAnimation, ModelAnimation, OptionResource, StepType, TextStepData } from "papyrus/build/main/generation/Workflow";
|
|
2
2
|
import { PatternImageData, FrameData as _FrameData1, Point, ScaleAxis, UnitOfMeasurement } from "papyrus/build/main/types";
|
|
3
3
|
import { FrameOffsets, ColorDefinition, ILayout, IllustrationElement as _IllustrationElement1, LayoutsState as _LayoutsState1, Region, FrameElement as _FrameElement1, PatchworkOffsets, TextboxElement as _TextboxElement1, FontData, SerializableStep, StepStorage, FrameElement, IllustrationElement, LayoutElement, LayoutsState, PatchworkElement, TextboxElement, ImageElement } from "papyrus/build/main/LayoutsState/types";
|
|
4
4
|
import { ApolloClient } from "@apollo/client";
|
|
@@ -208,6 +208,11 @@ declare class IllustrationStepService implements StepService<IllustrationStepDat
|
|
|
208
208
|
}
|
|
209
209
|
export const svgObjectURL: (svg: string) => Promise<string>;
|
|
210
210
|
export const illustrationStepService: IllustrationStepService;
|
|
211
|
+
declare class DigitalContentStepService implements StepService<DigitalContentStepData> {
|
|
212
|
+
init(stepData: Step<DigitalContentStepData>, workflowManager: WorkflowManager, reducerState?: _LayoutsState1): Promise<CommandWithFollowup | null>;
|
|
213
|
+
regenerateQRCode(elements: RegionElement[], uploading: boolean, assetKey: string, url: string, workflowManager: WorkflowManager, stepData: Step<DigitalContentStepData>, setUrl: (finalUrl: string) => void, commandDispatcher: (command: CanvasCommand) => void, setIsRegenerating: (state: boolean) => void): Promise<void>;
|
|
214
|
+
}
|
|
215
|
+
export const digitalContentStepService: DigitalContentStepService;
|
|
211
216
|
interface FrameCreateOpts {
|
|
212
217
|
stepName?: string;
|
|
213
218
|
frameData: _FrameData1;
|
|
@@ -1439,6 +1444,74 @@ export class Client {
|
|
|
1439
1444
|
*/
|
|
1440
1445
|
getTransaction(): Transaction;
|
|
1441
1446
|
}
|
|
1447
|
+
export class MockWorkflowManager implements WorkflowManager {
|
|
1448
|
+
getVariationRecords(): VariationRecord[];
|
|
1449
|
+
reset(): Promise<void>;
|
|
1450
|
+
updateStateWithServer(_getReducerState: () => CommandState): void;
|
|
1451
|
+
addVariationRecord(_variationRecord: Omit<VariationRecord, "recordNumber">): {
|
|
1452
|
+
recordNumber: number;
|
|
1453
|
+
transactionId: string;
|
|
1454
|
+
values: any[];
|
|
1455
|
+
};
|
|
1456
|
+
getCurrentVariationRecord(): any;
|
|
1457
|
+
removeVariationRecord(_recordNumber: number): any[];
|
|
1458
|
+
outstandingRequestsPromise(): Promise<void>;
|
|
1459
|
+
updateStateWithServerImmediate(_getReducerState: () => CommandState): Promise<void>;
|
|
1460
|
+
addPoller(_poller: Poller): void;
|
|
1461
|
+
addConfirmCallback(_callback: ConfirmCallback): void;
|
|
1462
|
+
addCurrentVariationCallback(_callback: CurrentVariationRecordCallback): void;
|
|
1463
|
+
addEditedCallback(_callback: EditedCallback): void;
|
|
1464
|
+
addElementsCallback(_callback: ElementsCallback): void;
|
|
1465
|
+
addInformationResultCallback(_callback: InformationResultCallback): void;
|
|
1466
|
+
addInitCallback(_callback: InitCallback): void;
|
|
1467
|
+
addMakingAdjustmentsCallback(_callback: MakingAdjustmentsCallback): void;
|
|
1468
|
+
addMandatoryCallback(_callback: MandatoryCallback): void;
|
|
1469
|
+
addMetadataCallback(_callback: MetadataCallback): void;
|
|
1470
|
+
addSelectionCallback(_callback: SelectionCallback): void;
|
|
1471
|
+
addStepSpecificStorageCallback(_callback: StepSpecificStorageCallback, _stepName: string): void;
|
|
1472
|
+
addStorageCallback(_callback: StorageCallback): void;
|
|
1473
|
+
addUpdateCallback(_callback: UpdateCallback): void;
|
|
1474
|
+
addVariationRecordsCallback(_callback: VariationRecordsCallback): void;
|
|
1475
|
+
getCommandDispatcher(): (_command: CanvasCommand) => void;
|
|
1476
|
+
getLayouts(): any[];
|
|
1477
|
+
getLayoutPreviewService(): {
|
|
1478
|
+
getAll: () => Map<any, any>;
|
|
1479
|
+
};
|
|
1480
|
+
getPreviewService(): any;
|
|
1481
|
+
getProductName(): string;
|
|
1482
|
+
getProfanities(): any[];
|
|
1483
|
+
getRegionElements(_stepName: string): any[];
|
|
1484
|
+
getSerializedStep(_stepName: string, _serializedSteps: SerializableStep[]): any;
|
|
1485
|
+
getStepSpecificServices(_stepName: string): any;
|
|
1486
|
+
getTransaction(): {
|
|
1487
|
+
id: string;
|
|
1488
|
+
};
|
|
1489
|
+
getWorkflow(): {
|
|
1490
|
+
id: string;
|
|
1491
|
+
name: string;
|
|
1492
|
+
panels: any[];
|
|
1493
|
+
steps: any[];
|
|
1494
|
+
showModelOnFinishStep: boolean;
|
|
1495
|
+
allowProofDownload: boolean;
|
|
1496
|
+
introduction: string;
|
|
1497
|
+
stepGroups: any[];
|
|
1498
|
+
};
|
|
1499
|
+
markStepsAsInitialised(_stepNames: string[]): void;
|
|
1500
|
+
markUpdateCompleted(_update: string): void;
|
|
1501
|
+
markUpdatePending(_update: string): void;
|
|
1502
|
+
getWorkflowSelections(): {};
|
|
1503
|
+
setCurrentAdjustingStepId(_stepId: string): void;
|
|
1504
|
+
setAllScenes(_config: WorkflowScenesConfiguration): void;
|
|
1505
|
+
setCurrentVariationRecord(_variationRecord: VariationRecord | null): void;
|
|
1506
|
+
setEditedStatus(_stepName: string, _status: boolean): void;
|
|
1507
|
+
setInformationResults(_results: InformationResult[]): void;
|
|
1508
|
+
setMandatoryFulfilled(_stepName: string, _status: boolean): void;
|
|
1509
|
+
setSelectionsAndElements(_stepName: string, _variants: VariantResource[], _elements: RegionElement[]): Promise<void>;
|
|
1510
|
+
setVariationRecords(_variationRecords: VariationRecord[]): void;
|
|
1511
|
+
toggleDesignConfirmed(): void;
|
|
1512
|
+
updateMetadata(_stepName: string, _update: any): void;
|
|
1513
|
+
updateStorage(_stepName: string, _update: StepStorage): Promise<void>;
|
|
1514
|
+
}
|
|
1442
1515
|
export { CommandContext };
|
|
1443
1516
|
export { CreateElementCommand, TextChangeCommand, FontAlignmentCommand, FontColorCommand, LayoutElementFactory };
|
|
1444
1517
|
export { LayoutElement, ImageElement, TextboxElement, TextStepData, FrameElement, PatchworkElement, IllustrationElement, LayoutData, LayoutsState };
|