zakeke-configurator-react 0.1.367 → 0.1.369
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/declarations/composer/Module/src/environment.d.ts +447 -446
- package/dist/declarations/composer/Module/src/state/providerValue.d.ts +281 -281
- package/dist/index.js +12031 -11971
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,281 +1,281 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Zakeke
|
|
3
|
-
*/
|
|
4
|
-
import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
|
|
5
|
-
import { EventMessage, FontFamily, Group, Item, NftForm, NftSettings, OnBeforeSendDataToParent, PrintingMethodsRestrictions, Product, SceneAnimationsConfig, Settings, Template, TemplateMacroCategory, TextSanitationResult, UIConfig, VisibleEventMessage } from '..';
|
|
6
|
-
import { Camera, ImageMacroCategory, ProductQuantityRule, SellerSettings, TemplateUploadRestrictions, ZakekeImage, AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult, AIVirtualModelRule } from '../models';
|
|
7
|
-
interface RestrictionColor {
|
|
8
|
-
colorCode: string;
|
|
9
|
-
isDefault: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface CustomPreviewSize {
|
|
12
|
-
customCartPreviewWidth: number;
|
|
13
|
-
customCartPreviewHeight: number;
|
|
14
|
-
}
|
|
15
|
-
interface ThemeCompositions {
|
|
16
|
-
name: string;
|
|
17
|
-
docID: string;
|
|
18
|
-
previewImageUrl: string;
|
|
19
|
-
tags: string[];
|
|
20
|
-
}
|
|
21
|
-
export type { AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult };
|
|
22
|
-
/**
|
|
23
|
-
* Contains all the data and methods to control a Zakeke configuration
|
|
24
|
-
*/
|
|
25
|
-
export interface Zakeke {
|
|
26
|
-
/**
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
internalProduct: MPlaza.Model | null;
|
|
30
|
-
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
internalScene: Zakeke.Scene | null;
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
internalCurrentTemplate: MPlaza.Design | null | undefined;
|
|
38
|
-
userSettings: Settings | null;
|
|
39
|
-
/**
|
|
40
|
-
* The current price of the configuration plus the product price
|
|
41
|
-
*/
|
|
42
|
-
price: number;
|
|
43
|
-
isOutOfStock: boolean;
|
|
44
|
-
culture: string;
|
|
45
|
-
currency: string;
|
|
46
|
-
isSceneLoading: boolean;
|
|
47
|
-
isAddToCartLoading: boolean;
|
|
48
|
-
isInfoPointContentVisible: boolean;
|
|
49
|
-
imagesMacroCategories: ImageMacroCategory[];
|
|
50
|
-
isViewerReady: boolean;
|
|
51
|
-
fonts: FontFamily[];
|
|
52
|
-
defaultFontID: number | null;
|
|
53
|
-
disableTextColors: boolean;
|
|
54
|
-
defaultColor: string;
|
|
55
|
-
textColors: RestrictionColor[];
|
|
56
|
-
groups: Group[];
|
|
57
|
-
templates: Template[];
|
|
58
|
-
loadedComposition: {
|
|
59
|
-
templateName: string;
|
|
60
|
-
attributesOptions: Map<number, number>;
|
|
61
|
-
selectedCategoryID: number | null;
|
|
62
|
-
} | null;
|
|
63
|
-
currentTemplate: Template | null;
|
|
64
|
-
items: Item[];
|
|
65
|
-
productName: string;
|
|
66
|
-
productCode: string;
|
|
67
|
-
product: Product | null;
|
|
68
|
-
isCompositionSaving: boolean;
|
|
69
|
-
cameras: Camera[];
|
|
70
|
-
sellerSettings: SellerSettings | null;
|
|
71
|
-
quantityRule: ProductQuantityRule | null;
|
|
72
|
-
eventMessages: EventMessage[] | null;
|
|
73
|
-
personalizedMessages: EventMessage[] | null;
|
|
74
|
-
visibleEventMessages: VisibleEventMessage[];
|
|
75
|
-
isAssetsLoading: boolean;
|
|
76
|
-
draftCompositions: ThemeCompositions[] | null;
|
|
77
|
-
additionalCustomProperties: {
|
|
78
|
-
name: string;
|
|
79
|
-
value: number;
|
|
80
|
-
label: string;
|
|
81
|
-
formatString: string;
|
|
82
|
-
}[] | null;
|
|
83
|
-
currentAttributesSelection: object | null;
|
|
84
|
-
currentCompositionInfo: {
|
|
85
|
-
compositionId: string | null;
|
|
86
|
-
compositionName: string | null;
|
|
87
|
-
compositionTags: string[] | null;
|
|
88
|
-
} | null;
|
|
89
|
-
nftSettings: NftSettings | null;
|
|
90
|
-
useLegacyScreenshot: boolean;
|
|
91
|
-
isAIEnabled: boolean;
|
|
92
|
-
uiConfig: UIConfig | null;
|
|
93
|
-
animationsConfig: SceneAnimationsConfig | null;
|
|
94
|
-
backgroundColor: string;
|
|
95
|
-
removeBackground: boolean;
|
|
96
|
-
deepARsceneGLBUrl: string | null;
|
|
97
|
-
shouldLoadDesign: boolean | null;
|
|
98
|
-
getDeepARDesktopIframeUrl: () => Promise<string>;
|
|
99
|
-
setMouseWheelZoomEnabled: (enabled: boolean) => void;
|
|
100
|
-
setCameraPinchingZoom: (toggle: boolean) => void;
|
|
101
|
-
selectOption: (optionId: number) => void;
|
|
102
|
-
/**
|
|
103
|
-
* @internal
|
|
104
|
-
*/
|
|
105
|
-
internalAppendViewer: (container: HTMLElement) => void;
|
|
106
|
-
getPrintingMethodsRestrictions: () => PrintingMethodsRestrictions;
|
|
107
|
-
designUpdate: () => void;
|
|
108
|
-
createQuote: (formData: any) => Promise<any>;
|
|
109
|
-
setTemplate: (templateId: number) => Promise<void>;
|
|
110
|
-
isAreaVisible: (areaId: number) => boolean;
|
|
111
|
-
quantity: number;
|
|
112
|
-
saveTemplate: (templateName: string, selectedCategoryID: number | null, attributesOptions: Map<number, number>, save2Ddesign?: boolean) => Promise<void>;
|
|
113
|
-
addToCart: (additionalProperties: Record<string, any>, OnBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any>>, legacyScreenshot?: boolean, nftForm?: NftForm, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
114
|
-
/**
|
|
115
|
-
* Create a PDF of the current configuration
|
|
116
|
-
* @returns The URL of the PDF
|
|
117
|
-
*/
|
|
118
|
-
getPDF: () => Promise<string>;
|
|
119
|
-
getOnlineScreenshot: (width: number, height: number, legacyScreenshot?: boolean, backgroundColor?: string, padding?: number) => Promise<{
|
|
120
|
-
originalUrl: string;
|
|
121
|
-
rewrittenUrl: string;
|
|
122
|
-
}>;
|
|
123
|
-
setCamera: (id: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
|
|
124
|
-
setCameraByName: (name: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
|
|
125
|
-
setCameraZoomEnabled: (enabled: boolean) => void;
|
|
126
|
-
resetCameraPivot: () => void;
|
|
127
|
-
setCameraPivot: (meshId: string) => void;
|
|
128
|
-
fullyLoadFont: (fontFamily: string | FontFamily) => Promise<FontFamily>;
|
|
129
|
-
sanitizeString: (family: FontFamily, text: string) => string;
|
|
130
|
-
getSanitationText: (family: FontFamily, text: string) => TextSanitationResult;
|
|
131
|
-
getImages: (categoryId: number) => Promise<ZakekeImage[]>;
|
|
132
|
-
getMacroCategories: () => Promise<ImageMacroCategory[]>;
|
|
133
|
-
previewOnly__setItemImageFromBase64: (guid: string, base64: string) => void;
|
|
134
|
-
setItemImageFromFile: (guid: string, file: File) => Promise<void>;
|
|
135
|
-
addItemImage: (id: number, areaId: number) => Promise<string | null | undefined>;
|
|
136
|
-
setItemSize: (guid: string, width: number, height: number) => Promise<void>;
|
|
137
|
-
setItemConstraints: (guid: string, constraints: {
|
|
138
|
-
canMove?: boolean;
|
|
139
|
-
canRotate?: boolean;
|
|
140
|
-
canResize?: boolean;
|
|
141
|
-
canDelete?: boolean;
|
|
142
|
-
}) => void;
|
|
143
|
-
/**
|
|
144
|
-
* Upload an image and get the uploaded image
|
|
145
|
-
* @param file The file to upload
|
|
146
|
-
* @param progress A callback to get the upload progress
|
|
147
|
-
* @returns The uploaded image
|
|
148
|
-
*/
|
|
149
|
-
createImage: (file: File, progress?: (percentage: number) => void) => Promise<ZakekeImage>;
|
|
150
|
-
createImageFromUrl: (url: string) => Promise<ZakekeImage>;
|
|
151
|
-
setItemImage: (guid: string, imageId: number) => Promise<void>;
|
|
152
|
-
setItemFontFamily: (guid: string, fontFamily: string) => void;
|
|
153
|
-
setItemColor: (guid: string, color: string) => void;
|
|
154
|
-
setItemBold: (guid: string, bold: boolean, fontFamily: FontFamily) => void;
|
|
155
|
-
setItemItalic: (guid: string, italic: boolean, fontFamily: FontFamily) => void;
|
|
156
|
-
setItemTextOnPath: (guid: string, areaId: number, value: boolean) => void;
|
|
157
|
-
setItemText: (guid: string, text: string) => string;
|
|
158
|
-
addItemText: (settings: {
|
|
159
|
-
text: string;
|
|
160
|
-
fontFamily: string;
|
|
161
|
-
}, areaId: number) => Promise<void>;
|
|
162
|
-
/**
|
|
163
|
-
* Remove an item from the customization
|
|
164
|
-
* @param guid The guid of the item to remove
|
|
165
|
-
*/
|
|
166
|
-
removeItem: (guid: string) => Promise<void>;
|
|
167
|
-
setQuantity: (quantity: number) => void;
|
|
168
|
-
getShareCompositionUrl: () => Promise<string>;
|
|
169
|
-
saveComposition: (customPreviewSize?: CustomPreviewSize, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
170
|
-
loadComposition: (id: string) => Promise<void>;
|
|
171
|
-
switchFullscreen: () => void;
|
|
172
|
-
openSecondScreen: () => void;
|
|
173
|
-
isFullscreenMode: boolean;
|
|
174
|
-
zoomIn: () => void;
|
|
175
|
-
zoomOut: () => void;
|
|
176
|
-
updateView: (adjustCamera?: boolean) => void;
|
|
177
|
-
stopAllAnimations: () => void;
|
|
178
|
-
hasAnimations: () => boolean;
|
|
179
|
-
playAnimations: () => void;
|
|
180
|
-
setHighlightSettings: (settings: {
|
|
181
|
-
color: string;
|
|
182
|
-
size: number;
|
|
183
|
-
}) => void;
|
|
184
|
-
hasExplodedMode: () => boolean;
|
|
185
|
-
isExplodedMode: boolean;
|
|
186
|
-
setExplodedMode: (exploded: boolean) => void;
|
|
187
|
-
getMeshIDbyName: (name: string) => string | undefined | null;
|
|
188
|
-
hideMeshAndSaveState: (meshId: string) => void;
|
|
189
|
-
restoreMeshVisibility: (meshId: string) => void;
|
|
190
|
-
setMeshDesignVisibility: (meshId: string, visible: boolean) => void;
|
|
191
|
-
clearListeners: () => void;
|
|
192
|
-
addFocusAttributesListener: (listenerFunction: FocusAttributesEventListener) => void;
|
|
193
|
-
focusAttribute: (attributeId: number) => void;
|
|
194
|
-
highlightGroup: (groupId: number) => void;
|
|
195
|
-
highlightAttribute: (attributeId: number) => void;
|
|
196
|
-
getQrCodeArUrl: (device: 'iOS' | 'Android') => Promise<string>;
|
|
197
|
-
getMobileArUrl: () => Promise<Blob | string | null>;
|
|
198
|
-
openArMobile: (url: string) => void;
|
|
199
|
-
isSceneArEnabled: () => boolean;
|
|
200
|
-
isArDeviceCompliant: () => boolean;
|
|
201
|
-
IS_ANDROID: boolean;
|
|
202
|
-
IS_IOS: boolean;
|
|
203
|
-
setBackgroundColor: (color: string, alpha: number) => void;
|
|
204
|
-
getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
|
|
205
|
-
isSceneTryOnEnabled: () => boolean;
|
|
206
|
-
setCameraLocked: (isBlocked: boolean) => void;
|
|
207
|
-
getTemplateUploadRestrictions: (areaId: number) => TemplateUploadRestrictions;
|
|
208
|
-
saveDraftsComposition: (name: string, tags: string[], isCopy?: boolean) => Promise<void>;
|
|
209
|
-
loadSavedComposition: (docID: string) => Promise<void>;
|
|
210
|
-
deleteSavedComposition: (docId: string) => Promise<void>;
|
|
211
|
-
exportSceneToGlb: () => Promise<string | Blob | null>;
|
|
212
|
-
reset: () => Promise<void>;
|
|
213
|
-
undo: () => Promise<void>;
|
|
214
|
-
redo: () => Promise<void>;
|
|
215
|
-
getCopyrightMessageAccepted: () => boolean;
|
|
216
|
-
setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
|
|
217
|
-
validationNFTEmail: (email: string) => boolean;
|
|
218
|
-
validationNFTWalletAddress: (walletAddress: string) => boolean;
|
|
219
|
-
templateMacroCategories: TemplateMacroCategory[] | null;
|
|
220
|
-
applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
|
|
221
|
-
configureByAI: (text: string) => Promise<void>;
|
|
222
|
-
isAIStudioShoppingPreviewEnabled: boolean;
|
|
223
|
-
isAIStudioEnabled: boolean;
|
|
224
|
-
isAiEditorEnabled: boolean;
|
|
225
|
-
isAiProductStagingEnabled: boolean;
|
|
226
|
-
isAiVtoEnabled: boolean;
|
|
227
|
-
startAIStudio: () => Promise<void>;
|
|
228
|
-
getAIPresetCategories: (presetType: string) => Promise<AIPresetCategory[]>;
|
|
229
|
-
getAIPresetPresets: (presetType: string) => Promise<AIPreset[]>;
|
|
230
|
-
getApplicableAIStagingRules: (options: {
|
|
231
|
-
productID?: number;
|
|
232
|
-
printTypeID?: number;
|
|
233
|
-
}) => Promise<AIProductStagingRule | null>;
|
|
234
|
-
getApplicableAIVirtualModelRules: (options: {
|
|
235
|
-
productID?: number;
|
|
236
|
-
printTypeID?: number;
|
|
237
|
-
}) => Promise<AIVirtualModelRule | null>;
|
|
238
|
-
generateAIProductStaging: (options: AIProductStagingOptions) => Promise<AIProductStagingResult>;
|
|
239
|
-
generateAIVirtualTryon: (options: AIVirtualTryOnOptions) => Promise<AIVirtualTryOnResult>;
|
|
240
|
-
hasVTryOnEnabled: boolean;
|
|
241
|
-
canUseTryOn: boolean;
|
|
242
|
-
canUsePD: boolean;
|
|
243
|
-
getTryOnSettings: () => Zakeke.TryOnSettings | undefined;
|
|
244
|
-
isTryOnMeshVisible: boolean;
|
|
245
|
-
isMandatoryPD: boolean;
|
|
246
|
-
isVisibleMeshShownForTryOn: boolean;
|
|
247
|
-
setPDDistance: (distance: number) => void;
|
|
248
|
-
pdDistance: () => number;
|
|
249
|
-
exportTryOnMeshToGlb: () => Promise<string | Blob | null>;
|
|
250
|
-
moveItemUp: (itemGuid: string) => void;
|
|
251
|
-
moveItemDown: (itemGuid: string) => void;
|
|
252
|
-
getPrintingMethods: () => Array<{
|
|
253
|
-
printMethodId: number;
|
|
254
|
-
name: string;
|
|
255
|
-
}>;
|
|
256
|
-
setPrintingMethod: (printingMethodId: number, areaId: number) => void;
|
|
257
|
-
getFontWeights: (font: FontFamily) => {
|
|
258
|
-
normal: boolean;
|
|
259
|
-
bold: boolean;
|
|
260
|
-
italic: boolean;
|
|
261
|
-
italicBold: boolean;
|
|
262
|
-
normalWeight: number;
|
|
263
|
-
boldWeight: number;
|
|
264
|
-
italicWeight: number;
|
|
265
|
-
italicBoldWeight: number;
|
|
266
|
-
};
|
|
267
|
-
checkFontSupports: (fontName: string, needsBold: boolean, needsItalic: boolean) => {
|
|
268
|
-
canKeepStyles: boolean;
|
|
269
|
-
supportsBold: boolean;
|
|
270
|
-
supportsItalic: boolean;
|
|
271
|
-
};
|
|
272
|
-
T_static: (str: string) => string;
|
|
273
|
-
T_dynamic: (str: string) => string;
|
|
274
|
-
areTranslationsLoaded: boolean;
|
|
275
|
-
/**
|
|
276
|
-
* Forces a resize of the 3D viewer canvas to match its container.
|
|
277
|
-
* Call this after all UI components have finished rendering to fix
|
|
278
|
-
* canvas buffer/display size mismatches caused by layout reflows.
|
|
279
|
-
*/
|
|
280
|
-
forceViewerResize: () => void;
|
|
281
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @module Zakeke
|
|
3
|
+
*/
|
|
4
|
+
import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
|
|
5
|
+
import { EventMessage, FontFamily, Group, Item, NftForm, NftSettings, OnBeforeSendDataToParent, PrintingMethodsRestrictions, Product, SceneAnimationsConfig, Settings, Template, TemplateMacroCategory, TextSanitationResult, UIConfig, VisibleEventMessage } from '..';
|
|
6
|
+
import { Camera, ImageMacroCategory, ProductQuantityRule, SellerSettings, TemplateUploadRestrictions, ZakekeImage, AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult, AIVirtualModelRule } from '../models';
|
|
7
|
+
interface RestrictionColor {
|
|
8
|
+
colorCode: string;
|
|
9
|
+
isDefault: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface CustomPreviewSize {
|
|
12
|
+
customCartPreviewWidth: number;
|
|
13
|
+
customCartPreviewHeight: number;
|
|
14
|
+
}
|
|
15
|
+
interface ThemeCompositions {
|
|
16
|
+
name: string;
|
|
17
|
+
docID: string;
|
|
18
|
+
previewImageUrl: string;
|
|
19
|
+
tags: string[];
|
|
20
|
+
}
|
|
21
|
+
export type { AIPresetCategory, AIPreset, AIProductStagingRule, AIProductStagingOptions, AIProductStagingResult, AIVirtualTryOnOptions, AIVirtualTryOnResult };
|
|
22
|
+
/**
|
|
23
|
+
* Contains all the data and methods to control a Zakeke configuration
|
|
24
|
+
*/
|
|
25
|
+
export interface Zakeke {
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
internalProduct: MPlaza.Model | null;
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
internalScene: Zakeke.Scene | null;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
internalCurrentTemplate: MPlaza.Design | null | undefined;
|
|
38
|
+
userSettings: Settings | null;
|
|
39
|
+
/**
|
|
40
|
+
* The current price of the configuration plus the product price
|
|
41
|
+
*/
|
|
42
|
+
price: number;
|
|
43
|
+
isOutOfStock: boolean;
|
|
44
|
+
culture: string;
|
|
45
|
+
currency: string;
|
|
46
|
+
isSceneLoading: boolean;
|
|
47
|
+
isAddToCartLoading: boolean;
|
|
48
|
+
isInfoPointContentVisible: boolean;
|
|
49
|
+
imagesMacroCategories: ImageMacroCategory[];
|
|
50
|
+
isViewerReady: boolean;
|
|
51
|
+
fonts: FontFamily[];
|
|
52
|
+
defaultFontID: number | null;
|
|
53
|
+
disableTextColors: boolean;
|
|
54
|
+
defaultColor: string;
|
|
55
|
+
textColors: RestrictionColor[];
|
|
56
|
+
groups: Group[];
|
|
57
|
+
templates: Template[];
|
|
58
|
+
loadedComposition: {
|
|
59
|
+
templateName: string;
|
|
60
|
+
attributesOptions: Map<number, number>;
|
|
61
|
+
selectedCategoryID: number | null;
|
|
62
|
+
} | null;
|
|
63
|
+
currentTemplate: Template | null;
|
|
64
|
+
items: Item[];
|
|
65
|
+
productName: string;
|
|
66
|
+
productCode: string;
|
|
67
|
+
product: Product | null;
|
|
68
|
+
isCompositionSaving: boolean;
|
|
69
|
+
cameras: Camera[];
|
|
70
|
+
sellerSettings: SellerSettings | null;
|
|
71
|
+
quantityRule: ProductQuantityRule | null;
|
|
72
|
+
eventMessages: EventMessage[] | null;
|
|
73
|
+
personalizedMessages: EventMessage[] | null;
|
|
74
|
+
visibleEventMessages: VisibleEventMessage[];
|
|
75
|
+
isAssetsLoading: boolean;
|
|
76
|
+
draftCompositions: ThemeCompositions[] | null;
|
|
77
|
+
additionalCustomProperties: {
|
|
78
|
+
name: string;
|
|
79
|
+
value: number;
|
|
80
|
+
label: string;
|
|
81
|
+
formatString: string;
|
|
82
|
+
}[] | null;
|
|
83
|
+
currentAttributesSelection: object | null;
|
|
84
|
+
currentCompositionInfo: {
|
|
85
|
+
compositionId: string | null;
|
|
86
|
+
compositionName: string | null;
|
|
87
|
+
compositionTags: string[] | null;
|
|
88
|
+
} | null;
|
|
89
|
+
nftSettings: NftSettings | null;
|
|
90
|
+
useLegacyScreenshot: boolean;
|
|
91
|
+
isAIEnabled: boolean;
|
|
92
|
+
uiConfig: UIConfig | null;
|
|
93
|
+
animationsConfig: SceneAnimationsConfig | null;
|
|
94
|
+
backgroundColor: string;
|
|
95
|
+
removeBackground: boolean;
|
|
96
|
+
deepARsceneGLBUrl: string | null;
|
|
97
|
+
shouldLoadDesign: boolean | null;
|
|
98
|
+
getDeepARDesktopIframeUrl: () => Promise<string>;
|
|
99
|
+
setMouseWheelZoomEnabled: (enabled: boolean) => void;
|
|
100
|
+
setCameraPinchingZoom: (toggle: boolean) => void;
|
|
101
|
+
selectOption: (optionId: number) => void;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
internalAppendViewer: (container: HTMLElement) => void;
|
|
106
|
+
getPrintingMethodsRestrictions: () => PrintingMethodsRestrictions;
|
|
107
|
+
designUpdate: () => void;
|
|
108
|
+
createQuote: (formData: any) => Promise<any>;
|
|
109
|
+
setTemplate: (templateId: number) => Promise<void>;
|
|
110
|
+
isAreaVisible: (areaId: number) => boolean;
|
|
111
|
+
quantity: number;
|
|
112
|
+
saveTemplate: (templateName: string, selectedCategoryID: number | null, attributesOptions: Map<number, number>, save2Ddesign?: boolean) => Promise<void>;
|
|
113
|
+
addToCart: (additionalProperties: Record<string, any>, OnBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any>>, legacyScreenshot?: boolean, nftForm?: NftForm, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Create a PDF of the current configuration
|
|
116
|
+
* @returns The URL of the PDF
|
|
117
|
+
*/
|
|
118
|
+
getPDF: () => Promise<string>;
|
|
119
|
+
getOnlineScreenshot: (width: number, height: number, legacyScreenshot?: boolean, backgroundColor?: string, padding?: number) => Promise<{
|
|
120
|
+
originalUrl: string;
|
|
121
|
+
rewrittenUrl: string;
|
|
122
|
+
}>;
|
|
123
|
+
setCamera: (id: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
|
|
124
|
+
setCameraByName: (name: string, onlyAngleOfView?: boolean, animate?: boolean) => void;
|
|
125
|
+
setCameraZoomEnabled: (enabled: boolean) => void;
|
|
126
|
+
resetCameraPivot: () => void;
|
|
127
|
+
setCameraPivot: (meshId: string) => void;
|
|
128
|
+
fullyLoadFont: (fontFamily: string | FontFamily) => Promise<FontFamily>;
|
|
129
|
+
sanitizeString: (family: FontFamily, text: string) => string;
|
|
130
|
+
getSanitationText: (family: FontFamily, text: string) => TextSanitationResult;
|
|
131
|
+
getImages: (categoryId: number) => Promise<ZakekeImage[]>;
|
|
132
|
+
getMacroCategories: () => Promise<ImageMacroCategory[]>;
|
|
133
|
+
previewOnly__setItemImageFromBase64: (guid: string, base64: string) => void;
|
|
134
|
+
setItemImageFromFile: (guid: string, file: File) => Promise<void>;
|
|
135
|
+
addItemImage: (id: number, areaId: number) => Promise<string | null | undefined>;
|
|
136
|
+
setItemSize: (guid: string, width: number, height: number) => Promise<void>;
|
|
137
|
+
setItemConstraints: (guid: string, constraints: {
|
|
138
|
+
canMove?: boolean;
|
|
139
|
+
canRotate?: boolean;
|
|
140
|
+
canResize?: boolean;
|
|
141
|
+
canDelete?: boolean;
|
|
142
|
+
}) => void;
|
|
143
|
+
/**
|
|
144
|
+
* Upload an image and get the uploaded image
|
|
145
|
+
* @param file The file to upload
|
|
146
|
+
* @param progress A callback to get the upload progress
|
|
147
|
+
* @returns The uploaded image
|
|
148
|
+
*/
|
|
149
|
+
createImage: (file: File, progress?: (percentage: number) => void) => Promise<ZakekeImage>;
|
|
150
|
+
createImageFromUrl: (url: string) => Promise<ZakekeImage>;
|
|
151
|
+
setItemImage: (guid: string, imageId: number) => Promise<void>;
|
|
152
|
+
setItemFontFamily: (guid: string, fontFamily: string) => void;
|
|
153
|
+
setItemColor: (guid: string, color: string) => void;
|
|
154
|
+
setItemBold: (guid: string, bold: boolean, fontFamily: FontFamily) => void;
|
|
155
|
+
setItemItalic: (guid: string, italic: boolean, fontFamily: FontFamily) => void;
|
|
156
|
+
setItemTextOnPath: (guid: string, areaId: number, value: boolean) => void;
|
|
157
|
+
setItemText: (guid: string, text: string) => string;
|
|
158
|
+
addItemText: (settings: {
|
|
159
|
+
text: string;
|
|
160
|
+
fontFamily: string;
|
|
161
|
+
}, areaId: number) => Promise<void>;
|
|
162
|
+
/**
|
|
163
|
+
* Remove an item from the customization
|
|
164
|
+
* @param guid The guid of the item to remove
|
|
165
|
+
*/
|
|
166
|
+
removeItem: (guid: string) => Promise<void>;
|
|
167
|
+
setQuantity: (quantity: number) => void;
|
|
168
|
+
getShareCompositionUrl: () => Promise<string>;
|
|
169
|
+
saveComposition: (customPreviewSize?: CustomPreviewSize, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
|
|
170
|
+
loadComposition: (id: string) => Promise<void>;
|
|
171
|
+
switchFullscreen: () => void;
|
|
172
|
+
openSecondScreen: () => void;
|
|
173
|
+
isFullscreenMode: boolean;
|
|
174
|
+
zoomIn: () => void;
|
|
175
|
+
zoomOut: () => void;
|
|
176
|
+
updateView: (adjustCamera?: boolean) => void;
|
|
177
|
+
stopAllAnimations: () => void;
|
|
178
|
+
hasAnimations: () => boolean;
|
|
179
|
+
playAnimations: () => void;
|
|
180
|
+
setHighlightSettings: (settings: {
|
|
181
|
+
color: string;
|
|
182
|
+
size: number;
|
|
183
|
+
}) => void;
|
|
184
|
+
hasExplodedMode: () => boolean;
|
|
185
|
+
isExplodedMode: boolean;
|
|
186
|
+
setExplodedMode: (exploded: boolean) => void;
|
|
187
|
+
getMeshIDbyName: (name: string) => string | undefined | null;
|
|
188
|
+
hideMeshAndSaveState: (meshId: string) => void;
|
|
189
|
+
restoreMeshVisibility: (meshId: string) => void;
|
|
190
|
+
setMeshDesignVisibility: (meshId: string, visible: boolean) => void;
|
|
191
|
+
clearListeners: () => void;
|
|
192
|
+
addFocusAttributesListener: (listenerFunction: FocusAttributesEventListener) => void;
|
|
193
|
+
focusAttribute: (attributeId: number) => void;
|
|
194
|
+
highlightGroup: (groupId: number) => void;
|
|
195
|
+
highlightAttribute: (attributeId: number) => void;
|
|
196
|
+
getQrCodeArUrl: (device: 'iOS' | 'Android') => Promise<string>;
|
|
197
|
+
getMobileArUrl: () => Promise<Blob | string | null>;
|
|
198
|
+
openArMobile: (url: string) => void;
|
|
199
|
+
isSceneArEnabled: () => boolean;
|
|
200
|
+
isArDeviceCompliant: () => boolean;
|
|
201
|
+
IS_ANDROID: boolean;
|
|
202
|
+
IS_IOS: boolean;
|
|
203
|
+
setBackgroundColor: (color: string, alpha: number) => void;
|
|
204
|
+
getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
|
|
205
|
+
isSceneTryOnEnabled: () => boolean;
|
|
206
|
+
setCameraLocked: (isBlocked: boolean) => void;
|
|
207
|
+
getTemplateUploadRestrictions: (areaId: number) => TemplateUploadRestrictions;
|
|
208
|
+
saveDraftsComposition: (name: string, tags: string[], isCopy?: boolean) => Promise<void>;
|
|
209
|
+
loadSavedComposition: (docID: string) => Promise<void>;
|
|
210
|
+
deleteSavedComposition: (docId: string) => Promise<void>;
|
|
211
|
+
exportSceneToGlb: () => Promise<string | Blob | null>;
|
|
212
|
+
reset: () => Promise<void>;
|
|
213
|
+
undo: () => Promise<void>;
|
|
214
|
+
redo: () => Promise<void>;
|
|
215
|
+
getCopyrightMessageAccepted: () => boolean;
|
|
216
|
+
setCopyrightMessageAccepted: (copyrightMandatoryCheckbox: boolean) => void;
|
|
217
|
+
validationNFTEmail: (email: string) => boolean;
|
|
218
|
+
validationNFTWalletAddress: (walletAddress: string) => boolean;
|
|
219
|
+
templateMacroCategories: TemplateMacroCategory[] | null;
|
|
220
|
+
applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
|
|
221
|
+
configureByAI: (text: string) => Promise<void>;
|
|
222
|
+
isAIStudioShoppingPreviewEnabled: boolean;
|
|
223
|
+
isAIStudioEnabled: boolean;
|
|
224
|
+
isAiEditorEnabled: boolean;
|
|
225
|
+
isAiProductStagingEnabled: boolean;
|
|
226
|
+
isAiVtoEnabled: boolean;
|
|
227
|
+
startAIStudio: () => Promise<void>;
|
|
228
|
+
getAIPresetCategories: (presetType: string) => Promise<AIPresetCategory[]>;
|
|
229
|
+
getAIPresetPresets: (presetType: string) => Promise<AIPreset[]>;
|
|
230
|
+
getApplicableAIStagingRules: (options: {
|
|
231
|
+
productID?: number;
|
|
232
|
+
printTypeID?: number;
|
|
233
|
+
}) => Promise<AIProductStagingRule | null>;
|
|
234
|
+
getApplicableAIVirtualModelRules: (options: {
|
|
235
|
+
productID?: number;
|
|
236
|
+
printTypeID?: number;
|
|
237
|
+
}) => Promise<AIVirtualModelRule | null>;
|
|
238
|
+
generateAIProductStaging: (options: AIProductStagingOptions) => Promise<AIProductStagingResult>;
|
|
239
|
+
generateAIVirtualTryon: (options: AIVirtualTryOnOptions) => Promise<AIVirtualTryOnResult>;
|
|
240
|
+
hasVTryOnEnabled: boolean;
|
|
241
|
+
canUseTryOn: boolean;
|
|
242
|
+
canUsePD: boolean;
|
|
243
|
+
getTryOnSettings: () => Zakeke.TryOnSettings | undefined;
|
|
244
|
+
isTryOnMeshVisible: boolean;
|
|
245
|
+
isMandatoryPD: boolean;
|
|
246
|
+
isVisibleMeshShownForTryOn: boolean;
|
|
247
|
+
setPDDistance: (distance: number) => void;
|
|
248
|
+
pdDistance: () => number;
|
|
249
|
+
exportTryOnMeshToGlb: () => Promise<string | Blob | null>;
|
|
250
|
+
moveItemUp: (itemGuid: string) => void;
|
|
251
|
+
moveItemDown: (itemGuid: string) => void;
|
|
252
|
+
getPrintingMethods: () => Array<{
|
|
253
|
+
printMethodId: number;
|
|
254
|
+
name: string;
|
|
255
|
+
}>;
|
|
256
|
+
setPrintingMethod: (printingMethodId: number, areaId: number) => void;
|
|
257
|
+
getFontWeights: (font: FontFamily) => {
|
|
258
|
+
normal: boolean;
|
|
259
|
+
bold: boolean;
|
|
260
|
+
italic: boolean;
|
|
261
|
+
italicBold: boolean;
|
|
262
|
+
normalWeight: number;
|
|
263
|
+
boldWeight: number;
|
|
264
|
+
italicWeight: number;
|
|
265
|
+
italicBoldWeight: number;
|
|
266
|
+
};
|
|
267
|
+
checkFontSupports: (fontName: string, needsBold: boolean, needsItalic: boolean) => {
|
|
268
|
+
canKeepStyles: boolean;
|
|
269
|
+
supportsBold: boolean;
|
|
270
|
+
supportsItalic: boolean;
|
|
271
|
+
};
|
|
272
|
+
T_static: (str: string) => string;
|
|
273
|
+
T_dynamic: (str: string) => string;
|
|
274
|
+
areTranslationsLoaded: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Forces a resize of the 3D viewer canvas to match its container.
|
|
277
|
+
* Call this after all UI components have finished rendering to fix
|
|
278
|
+
* canvas buffer/display size mismatches caused by layout reflows.
|
|
279
|
+
*/
|
|
280
|
+
forceViewerResize: () => void;
|
|
281
|
+
}
|