zakeke-configurator-react 0.1.327 → 0.1.328

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.
@@ -1,3 +1,3 @@
1
- import { AxiosInstance } from 'axios';
2
- export declare let axiosApi: AxiosInstance;
3
- export declare function setupApi(culture: string, token: string): void;
1
+ import { AxiosInstance } from 'axios';
2
+ export declare let axiosApi: AxiosInstance;
3
+ export declare function setupApi(culture: string, token: string): void;
@@ -1,2 +1,2 @@
1
- import * as React from 'react';
2
- export declare const DebugPanel: React.FunctionComponent;
1
+ import * as React from 'react';
2
+ export declare const DebugPanel: React.FunctionComponent;
@@ -1,5 +1,5 @@
1
- import { FunctionComponent } from 'react';
2
- export declare const ZakekeViewer: FunctionComponent<{
3
- bgColor?: string;
4
- className?: string;
5
- }>;
1
+ import { FunctionComponent } from 'react';
2
+ export declare const ZakekeViewer: FunctionComponent<{
3
+ bgColor?: string;
4
+ className?: string;
5
+ }>;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- interface QRCodeGeneratorProps {
3
- url: string;
4
- }
5
- declare const DeepARQrCodeContentContainer: React.FC<QRCodeGeneratorProps>;
6
- export default DeepARQrCodeContentContainer;
1
+ import React from 'react';
2
+ interface QRCodeGeneratorProps {
3
+ url: string;
4
+ }
5
+ declare const DeepARQrCodeContentContainer: React.FC<QRCodeGeneratorProps>;
6
+ export default DeepARQrCodeContentContainer;
@@ -1,22 +1,22 @@
1
- import { FunctionComponent } from 'react';
2
- import { TryOnProviderProps, ValueOf } from '../tryOnModels';
3
- export declare const BanubaTryOnReceivedMessage: {
4
- readonly WaitingAuthentication: "WAITING_AUTH";
5
- readonly TryOnLoaded: "MODEL_LOADED";
6
- readonly ScreenShotTaken: "SCREENSHOT_TAKEN";
7
- readonly WebcamStopped: "WEBCAM_STOPPED";
8
- readonly Start: "";
9
- readonly AuthSuccessful: "AUTH_SUCCESS";
10
- readonly AuthError: "AUTH_ERROR";
11
- readonly WebcamError: "WEBCAM_ERROR";
12
- };
13
- export type BanubaTryOnReceivedMessageType = ValueOf<typeof BanubaTryOnReceivedMessage>;
14
- export declare const BanubaTryOnResponseMessage: {
15
- readonly StartAuthenticationTryOn: "AUTH";
16
- readonly LoadTryOn: "LOAD_MODEL";
17
- readonly LoadHands: "LOAD_HANDS";
18
- readonly TakeScreenshot: "TAKE_SCREENSHOT";
19
- readonly StopWebcam: "STOP_WEBCAM";
20
- };
21
- export type BanubaTryOnResponseMessageType = ValueOf<typeof BanubaTryOnResponseMessage>;
22
- export declare const BanubaTryOn: FunctionComponent<TryOnProviderProps>;
1
+ import { FunctionComponent } from 'react';
2
+ import { TryOnProviderProps, ValueOf } from '../tryOnModels';
3
+ export declare const BanubaTryOnReceivedMessage: {
4
+ readonly WaitingAuthentication: "WAITING_AUTH";
5
+ readonly TryOnLoaded: "MODEL_LOADED";
6
+ readonly ScreenShotTaken: "SCREENSHOT_TAKEN";
7
+ readonly WebcamStopped: "WEBCAM_STOPPED";
8
+ readonly Start: "";
9
+ readonly AuthSuccessful: "AUTH_SUCCESS";
10
+ readonly AuthError: "AUTH_ERROR";
11
+ readonly WebcamError: "WEBCAM_ERROR";
12
+ };
13
+ export type BanubaTryOnReceivedMessageType = ValueOf<typeof BanubaTryOnReceivedMessage>;
14
+ export declare const BanubaTryOnResponseMessage: {
15
+ readonly StartAuthenticationTryOn: "AUTH";
16
+ readonly LoadTryOn: "LOAD_MODEL";
17
+ readonly LoadHands: "LOAD_HANDS";
18
+ readonly TakeScreenshot: "TAKE_SCREENSHOT";
19
+ readonly StopWebcam: "STOP_WEBCAM";
20
+ };
21
+ export type BanubaTryOnResponseMessageType = ValueOf<typeof BanubaTryOnResponseMessage>;
22
+ export declare const BanubaTryOn: FunctionComponent<TryOnProviderProps>;
@@ -1,22 +1,22 @@
1
- import { FunctionComponent } from 'react';
2
- import { TryOnProviderProps, ValueOf } from '../tryOnModels';
3
- export declare const DeepARTryOnReceivedMessage: {
4
- readonly WaitingAuthentication: "WAITING_AUTH";
5
- readonly TryOnLoaded: "MODEL_LOADED";
6
- readonly ScreenShotTaken: "SCREENSHOT_TAKEN";
7
- readonly WebcamStopped: "WEBCAM_STOPPED";
8
- readonly Start: "";
9
- readonly AuthSuccessful: "AUTH_SUCCESS";
10
- readonly AuthError: "AUTH_ERROR";
11
- readonly WebcamError: "WEBCAM_ERROR";
12
- };
13
- export type DeepARTryOnReceivedMessageType = ValueOf<typeof DeepARTryOnReceivedMessage>;
14
- export declare const DeepARTryOnResponseMessage: {
15
- readonly StartAuthenticationTryOn: "AUTH";
16
- readonly LoadTryOn: "LOAD_MODEL";
17
- readonly LoadHands: "LOAD_HANDS";
18
- readonly TakeScreenshot: "TAKE_SCREENSHOT";
19
- readonly StopWebcam: "STOP_WEBCAM";
20
- };
21
- export type DeepARTryOnResponseMessageType = ValueOf<typeof DeepARTryOnResponseMessage>;
22
- export declare const DeepARTryOn: FunctionComponent<TryOnProviderProps>;
1
+ import { FunctionComponent } from 'react';
2
+ import { TryOnProviderProps, ValueOf } from '../tryOnModels';
3
+ export declare const DeepARTryOnReceivedMessage: {
4
+ readonly WaitingAuthentication: "WAITING_AUTH";
5
+ readonly TryOnLoaded: "MODEL_LOADED";
6
+ readonly ScreenShotTaken: "SCREENSHOT_TAKEN";
7
+ readonly WebcamStopped: "WEBCAM_STOPPED";
8
+ readonly Start: "";
9
+ readonly AuthSuccessful: "AUTH_SUCCESS";
10
+ readonly AuthError: "AUTH_ERROR";
11
+ readonly WebcamError: "WEBCAM_ERROR";
12
+ };
13
+ export type DeepARTryOnReceivedMessageType = ValueOf<typeof DeepARTryOnReceivedMessage>;
14
+ export declare const DeepARTryOnResponseMessage: {
15
+ readonly StartAuthenticationTryOn: "AUTH";
16
+ readonly LoadTryOn: "LOAD_MODEL";
17
+ readonly LoadHands: "LOAD_HANDS";
18
+ readonly TakeScreenshot: "TAKE_SCREENSHOT";
19
+ readonly StopWebcam: "STOP_WEBCAM";
20
+ };
21
+ export type DeepARTryOnResponseMessageType = ValueOf<typeof DeepARTryOnResponseMessage>;
22
+ export declare const DeepARTryOn: FunctionComponent<TryOnProviderProps>;
@@ -3,6 +3,7 @@ import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
3
3
  import { EventMessage, ExtensionFields, NftForm, NftSettings, OnBeforeSendDataToParent, SceneAnimationsConfig, TryOnMode, TryOnProvidersTypesMapping, VisibleEventMessage } from '.';
4
4
  import { PlatformAttributeSelection } from './integrations/Integration';
5
5
  import { BootParameters, Camera, Composition, FontFamily, Group, ImageMacroCategory, Item, Product, ProductQuantityRule, SellerSettings, Settings, Template, TemplateMacroCategory, Translations, TryOnGenericFineTuningSettings, TryOnProduct, TryOnSeller } from './models';
6
+ import { AxiosResponse } from 'axios';
6
7
  import { DAMViewerAnalyticsEventType, PrintingMethodsRestrictions, TextSanitationResult, UIConfig, ZakekeImage } from './models';
7
8
  declare global {
8
9
  interface Window {
@@ -65,7 +66,8 @@ export declare class ZakekeEnvironment {
65
66
  private isDraftEditor;
66
67
  private isViewerMode;
67
68
  private isDAMViewer;
68
- private isTemplateEditor;
69
+ private isPresetConfigurationEditor;
70
+ shouldLoadDesign: boolean | null;
69
71
  private debugMode;
70
72
  private draftCompositionDocId;
71
73
  private initialSelection;
@@ -118,7 +120,6 @@ export declare class ZakekeEnvironment {
118
120
  tryOnSellerSettings: TryOnSeller | null;
119
121
  pdSettings: number;
120
122
  isInfoPointContentVisible: boolean;
121
- animationsConfig: SceneAnimationsConfig | null;
122
123
  private internalTranslations;
123
124
  private integrationVersion;
124
125
  translations: Translations | null;
@@ -129,12 +130,13 @@ export declare class ZakekeEnvironment {
129
130
  get isViewerReady(): boolean;
130
131
  get isShoppingPreview(): boolean;
131
132
  uiConfig: UIConfig | null;
133
+ animationsConfig: SceneAnimationsConfig | null;
132
134
  backgroundColor: string | null;
133
135
  removeBackground: boolean;
134
136
  constructor();
135
137
  private fetchVisitorToken;
136
138
  private parseParameters;
137
- makeDAMAnalyticsView(type: DAMViewerAnalyticsEventType): Promise<import("axios").AxiosResponse<any, any>>;
139
+ makeDAMAnalyticsView(type: DAMViewerAnalyticsEventType): Promise<AxiosResponse<any, any>>;
138
140
  private getProduct;
139
141
  private getScene;
140
142
  private getComposerModels;
@@ -213,7 +215,7 @@ export declare class ZakekeEnvironment {
213
215
  on: (event: string, callback: any) => void;
214
216
  off: (event: string, callback: any) => void;
215
217
  setTemplate: (templateId: number) => Promise<void>;
216
- getTemplateUploadRestrictictions: (templateId: number, areaId: number) => {
218
+ getTemplateUploadRestrictions: (areaId: number) => {
217
219
  isUserImageAllowed: boolean;
218
220
  isJpgAllowed: boolean;
219
221
  isPngAllowed: boolean;
@@ -234,8 +236,8 @@ export declare class ZakekeEnvironment {
234
236
  getCameraByName(name: string): Zakeke.SceneCameraLocation | undefined;
235
237
  setCameraLocation(name: string, animate?: boolean): void;
236
238
  private base64StringToFile;
237
- saveTemplate: (templateName: string, selectedCategoryID: number | null, attributeOptions: Map<number, number>) => Promise<void>;
238
- addToCart: (additionalProperties: Record<string, any>, onBeforeSendDataToParent?: ((data: OnBeforeSendDataToParent) => Promise<Record<string, any>>) | undefined, legacyScreenshot?: boolean, nftForm?: NftForm) => Promise<void>;
239
+ saveTemplate: (templateName: string, selectedCategoryID: number | null, attributeOptions: Map<number, number>, save2dDesign?: boolean) => Promise<void>;
240
+ addToCart: (additionalProperties: Record<string, any>, onBeforeSendDataToParent?: ((data: OnBeforeSendDataToParent) => Promise<Record<string, any>>) | undefined, legacyScreenshot?: boolean, nftForm?: NftForm, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
239
241
  zoomIn: () => void;
240
242
  zoomOut: () => void;
241
243
  isFullscreenEnabled: () => boolean;
@@ -331,7 +333,7 @@ export declare class ZakekeEnvironment {
331
333
  setCameraLocked: (isBlocked?: boolean) => void;
332
334
  isSceneTryOnEnabled: () => boolean;
333
335
  getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
334
- saveComposition: (customPreviewSize?: CustomPreviewSize, legacyScreenshot?: boolean, isSharing?: boolean) => Promise<void>;
336
+ saveComposition: (customPreviewSize?: CustomPreviewSize, legacyScreenshot?: boolean, isSharing?: boolean, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
335
337
  private bootstrapComposition;
336
338
  loadSavedComposition: (docID: string) => Promise<void>;
337
339
  private updateSavedCompositions;
@@ -345,10 +347,10 @@ export declare class ZakekeEnvironment {
345
347
  deleteSavedComposition: (docId: string) => Promise<void>;
346
348
  applyTemplate: (templateGroupCompositionId: number) => Promise<void>;
347
349
  configureByAI: (text: string) => Promise<void>;
348
- getTryOnProvidersList: () => Promise<TryOnProvidersTypesMapping>;
350
+ getTryOnProvidersList: () => Promise<TryOnProvidersTypesMapping | null>;
349
351
  getTryOnProductInfo: () => Promise<TryOnProduct | null>;
350
- private getMessagesByProductCode;
351
352
  getTryOnSellerInfo: (typeID: number, providerID: number) => Promise<TryOnSeller | null>;
353
+ private getMessagesByProductCode;
352
354
  get hasVTryOnEnabled(): boolean;
353
355
  get canUseTryOn(): boolean;
354
356
  get canUsePD(): boolean;
@@ -1,75 +1,75 @@
1
- import { FontFamily, FontFamilyFace, TextSanitationResult } from '.';
2
- /**
3
- * Download a list of font families so that are available for the browser
4
- *
5
- * @param fontFamilies List of font families to download
6
- * @returns A promise that resolves when all fonts are downloaded
7
- */
8
- export declare function loadFonts(fontFamilies: FontFamily[]): Promise<void>;
9
- /**
10
- * Downlod all fonts used in a design
11
- *
12
- * @param design Design to load fonts for
13
- * @param downloadedFonts A list of downloaded fonts
14
- */
15
- export declare function downloadFontsOfDesign(design: MPlaza.Design, downloadedFonts: FontFamily[]): Promise<void>;
16
- /**
17
- * Remove invalid characters from the text.
18
- * Invalid characters include backspace (\x08) and null (\u0000) characters.
19
- *
20
- * @param text The text to remove invalid characters from
21
- * @returns The text without invalid characters
22
- */
23
- export declare function removeInvalidCharactersFromText(text: string): string;
24
- /**
25
- * Remove unsupported characters from the text.
26
- * Unsupported characters include characters that cannot be displayed or processed correctly.
27
- * @param face The font to check character support
28
- * @param text The text to remove unsupported characters from
29
- * @returns The text without unsupported characters
30
- */
31
- export declare function sanitizeString(face: FontFamilyFace, string: string): string;
32
- /**
33
- * Remove unsupported characters from the text and return a list of removed characters.
34
- * Unsupported characters include characters that cannot be displayed or processed correctly.
35
- * @param face The font to check character support
36
- * @param text The text to remove unsupported characters from
37
- * @returns The text without unsupported characters and a list of removed characters
38
- */
39
- export declare function sanitizeText(face: FontFamilyFace, text: string): TextSanitationResult;
40
- /**
41
- * Remove invalid characters from the text based on the font file.
42
- * Invalid characters include whitespace or characters that are not supported by the font.
43
- *
44
- * @param text The text to remove invalid characters from
45
- * @param fontFile The font file used to check character support
46
- * @returns The text without invalid characters
47
- */
48
- export declare function removeInvalidCharacters(text: string, fontFile: any): string;
49
- /**
50
- * Get the parsed file from a font
51
- *
52
- * @param face The font to get the parsed file from
53
- * @returns The parsed file
54
- */
55
- export declare function getParsedFileFromFont(face: FontFamilyFace): import("./models").FontFamilyFaceFiles | undefined;
56
- /**
57
- * Remove unsupported characters from the text.
58
- * Unsupported characters include characters that cannot be displayed or processed correctly.
59
- * @param text The text to remove unsupported characters from
60
- * @returns The text without unsupported characters
61
- */
62
- export declare function removeUnsupportedCharacters(text: string, currentFont: FontFamilyFace): string;
63
- /**
64
- * Remove textual emojis from the text.
65
- * Textual emojis include emojis that are made up of multiple characters.
66
- * @param text The text to remove textual emojis from
67
- * @returns The text without textual emojis
68
- */
69
- export declare function removeTextualEmojisFromText(text: string): string;
70
- /**
71
- * Remove emojis from the text.
72
- * @param text The text to remove emojis from
73
- * @returns The text without emojis
74
- */
75
- export declare function removeEmojisFromText(text: string): string;
1
+ import { FontFamily, FontFamilyFace, TextSanitationResult } from '.';
2
+ /**
3
+ * Download a list of font families so that are available for the browser
4
+ *
5
+ * @param fontFamilies List of font families to download
6
+ * @returns A promise that resolves when all fonts are downloaded
7
+ */
8
+ export declare function loadFonts(fontFamilies: FontFamily[]): Promise<void>;
9
+ /**
10
+ * Downlod all fonts used in a design
11
+ *
12
+ * @param design Design to load fonts for
13
+ * @param downloadedFonts A list of downloaded fonts
14
+ */
15
+ export declare function downloadFontsOfDesign(design: MPlaza.Design, downloadedFonts: FontFamily[]): Promise<void>;
16
+ /**
17
+ * Remove invalid characters from the text.
18
+ * Invalid characters include backspace (\x08) and null (\u0000) characters.
19
+ *
20
+ * @param text The text to remove invalid characters from
21
+ * @returns The text without invalid characters
22
+ */
23
+ export declare function removeInvalidCharactersFromText(text: string): string;
24
+ /**
25
+ * Remove unsupported characters from the text.
26
+ * Unsupported characters include characters that cannot be displayed or processed correctly.
27
+ * @param face The font to check character support
28
+ * @param text The text to remove unsupported characters from
29
+ * @returns The text without unsupported characters
30
+ */
31
+ export declare function sanitizeString(face: FontFamilyFace, string: string): string;
32
+ /**
33
+ * Remove unsupported characters from the text and return a list of removed characters.
34
+ * Unsupported characters include characters that cannot be displayed or processed correctly.
35
+ * @param face The font to check character support
36
+ * @param text The text to remove unsupported characters from
37
+ * @returns The text without unsupported characters and a list of removed characters
38
+ */
39
+ export declare function sanitizeText(face: FontFamilyFace, text: string): TextSanitationResult;
40
+ /**
41
+ * Remove invalid characters from the text based on the font file.
42
+ * Invalid characters include whitespace or characters that are not supported by the font.
43
+ *
44
+ * @param text The text to remove invalid characters from
45
+ * @param fontFile The font file used to check character support
46
+ * @returns The text without invalid characters
47
+ */
48
+ export declare function removeInvalidCharacters(text: string, fontFile: any): string;
49
+ /**
50
+ * Get the parsed file from a font
51
+ *
52
+ * @param face The font to get the parsed file from
53
+ * @returns The parsed file
54
+ */
55
+ export declare function getParsedFileFromFont(face: FontFamilyFace): import("./models").FontFamilyFaceFiles | undefined;
56
+ /**
57
+ * Remove unsupported characters from the text.
58
+ * Unsupported characters include characters that cannot be displayed or processed correctly.
59
+ * @param text The text to remove unsupported characters from
60
+ * @returns The text without unsupported characters
61
+ */
62
+ export declare function removeUnsupportedCharacters(text: string, currentFont: FontFamilyFace): string;
63
+ /**
64
+ * Remove textual emojis from the text.
65
+ * Textual emojis include emojis that are made up of multiple characters.
66
+ * @param text The text to remove textual emojis from
67
+ * @returns The text without textual emojis
68
+ */
69
+ export declare function removeTextualEmojisFromText(text: string): string;
70
+ /**
71
+ * Remove emojis from the text.
72
+ * @param text The text to remove emojis from
73
+ * @returns The text without emojis
74
+ */
75
+ export declare function removeEmojisFromText(text: string): string;
@@ -1,58 +1,58 @@
1
- import { FontFamily, PlatformSettings, TextItem } from './models';
2
- export interface PublicTranslations {
3
- statics: Map<string, string>;
4
- dynamics: Map<string, string>;
5
- }
6
- export declare class T {
7
- static translations: PublicTranslations | null;
8
- static _(str: string, domain: string): any;
9
- static _d(str: string): string;
10
- }
11
- export declare function dataURLtoFile(dataurl: any, filename: any): File;
12
- export declare class StringHelper {
13
- static padLeft(str: string | number, width: number, char: string): string;
14
- static padRight(str: string | number, width: number, char: string): string;
15
- static format(str: string, ...args: string[]): string;
16
- static camelToSnake(o: any): any[] | {
17
- [key: string]: {
18
- val: any;
19
- };
20
- };
21
- static pascalToCamel(o: any): any[] | {
22
- [key: string]: {
23
- val: any;
24
- };
25
- };
26
- }
27
- export declare class Browser {
28
- static openWindow(url: string, width: number, height: number): Window | null;
29
- }
30
- export declare class Pagination {
31
- static nextPage(headerLink: string): string | null;
32
- }
33
- export declare function hex2rgb(c: string): {
34
- r: number;
35
- g: number;
36
- b: number;
37
- };
38
- export declare function rgb2hex(r: any, g: any, b: any): string;
39
- export declare function rgbToHsl(r: any, g: any, b: any): any[];
40
- export declare function hslToRgb(h: any, s: any, l: any): number[];
41
- export declare function hue2rgb(p: any, q: any, t: any): any;
42
- export declare function rgbToHsv(r: any, g: any, b: any): any[];
43
- export declare function hsvToRgb(h: any, s: any, v: any): number[];
44
- export declare const iOS: boolean;
45
- export declare function copy(obj: any): any;
46
- export declare function compare(_obj1: any, _obj2: any): any;
47
- export declare function isValidJSON(code: string): boolean;
48
- export declare function isPlatformCode(code: string): any;
49
- export declare function matchCodes(code1: string, code2: string): any;
50
- export declare function getPlatformSettings(): PlatformSettings;
51
- export declare const IS_ANDROID: boolean;
52
- export declare const IS_IOS: boolean;
53
- export declare const IS_AR_DEVICE_COMPLIANT: boolean;
54
- export declare function uuid(): string;
55
- export declare function sleep(ms: number): Promise<unknown>;
56
- export declare function ascComparator(getProp: (item: any) => string): (a: any, b: any) => 0 | 1 | -1;
57
- export declare function getNavigatorQueryParams(): URLSearchParams;
58
- export declare const sanitizeTextFromUnsupportedAndEmojiCharacters: (item: TextItem, text: string, fonts: FontFamily[]) => string;
1
+ import { FontFamily, PlatformSettings, TextItem } from './models';
2
+ export interface PublicTranslations {
3
+ statics: Map<string, string>;
4
+ dynamics: Map<string, string>;
5
+ }
6
+ export declare class T {
7
+ static translations: PublicTranslations | null;
8
+ static _(str: string, domain: string): any;
9
+ static _d(str: string): string;
10
+ }
11
+ export declare function dataURLtoFile(dataurl: any, filename: any): File;
12
+ export declare class StringHelper {
13
+ static padLeft(str: string | number, width: number, char: string): string;
14
+ static padRight(str: string | number, width: number, char: string): string;
15
+ static format(str: string, ...args: string[]): string;
16
+ static camelToSnake(o: any): any[] | {
17
+ [key: string]: {
18
+ val: any;
19
+ };
20
+ };
21
+ static pascalToCamel(o: any): any[] | {
22
+ [key: string]: {
23
+ val: any;
24
+ };
25
+ };
26
+ }
27
+ export declare class Browser {
28
+ static openWindow(url: string, width: number, height: number): Window | null;
29
+ }
30
+ export declare class Pagination {
31
+ static nextPage(headerLink: string): string | null;
32
+ }
33
+ export declare function hex2rgb(c: string): {
34
+ r: number;
35
+ g: number;
36
+ b: number;
37
+ };
38
+ export declare function rgb2hex(r: any, g: any, b: any): string;
39
+ export declare function rgbToHsl(r: any, g: any, b: any): any[];
40
+ export declare function hslToRgb(h: any, s: any, l: any): number[];
41
+ export declare function hue2rgb(p: any, q: any, t: any): any;
42
+ export declare function rgbToHsv(r: any, g: any, b: any): any[];
43
+ export declare function hsvToRgb(h: any, s: any, v: any): number[];
44
+ export declare const iOS: boolean;
45
+ export declare function copy(obj: any): any;
46
+ export declare function compare(_obj1: any, _obj2: any): any;
47
+ export declare function isValidJSON(code: string): boolean;
48
+ export declare function isPlatformCode(code: string): any;
49
+ export declare function matchCodes(code1: string, code2: string): any;
50
+ export declare function getPlatformSettings(): PlatformSettings;
51
+ export declare const IS_ANDROID: boolean;
52
+ export declare const IS_IOS: boolean;
53
+ export declare const IS_AR_DEVICE_COMPLIANT: boolean;
54
+ export declare function uuid(): string;
55
+ export declare function sleep(ms: number): Promise<unknown>;
56
+ export declare function ascComparator(getProp: (item: any) => string): (a: any, b: any) => 0 | 1 | -1;
57
+ export declare function getNavigatorQueryParams(): URLSearchParams;
58
+ export declare const sanitizeTextFromUnsupportedAndEmojiCharacters: (item: TextItem, text: string, fonts: FontFamily[]) => string;
@@ -1,11 +1,11 @@
1
- import { TryOnMode, ZakekeTryOnExposedMethods } from "../components/tryon/tryOnModels";
2
- export interface ZakekeTryOnContext {
3
- tryon: ZakekeTryOnExposedMethods;
4
- setTryon: (tryon: ZakekeTryOnExposedMethods) => void;
5
- tryOnPickedMode: TryOnMode;
6
- setTryOnPickedMode: (mode: TryOnMode) => void;
7
- tryOnVisibility: boolean;
8
- setTryOnVisibility: (visibility: boolean) => void;
9
- }
10
- export declare const TryOnContext: import("react").Context<ZakekeTryOnContext>;
11
- export declare const useZakekeTryOn: () => ZakekeTryOnContext;
1
+ import { TryOnMode, ZakekeTryOnExposedMethods } from "../components/tryon/tryOnModels";
2
+ export interface ZakekeTryOnContext {
3
+ tryon: ZakekeTryOnExposedMethods;
4
+ setTryon: (tryon: ZakekeTryOnExposedMethods) => void;
5
+ tryOnPickedMode: TryOnMode;
6
+ setTryOnPickedMode: (mode: TryOnMode) => void;
7
+ tryOnVisibility: boolean;
8
+ setTryOnVisibility: (visibility: boolean) => void;
9
+ }
10
+ export declare const TryOnContext: import("react").Context<ZakekeTryOnContext>;
11
+ export declare const useZakekeTryOn: () => ZakekeTryOnContext;
@@ -1,20 +1,20 @@
1
- declare const MPlaza: any;
2
- interface ImageTaskOptions {
3
- convertEpsToSvg: boolean;
4
- convertPdfToSvg: boolean;
5
- convertAiToSvg: boolean;
6
- IsPdfWithRasterAllowed: boolean;
7
- }
8
- export default class ImageUploadTask {
9
- culture: string;
10
- token: string;
11
- options: ImageTaskOptions;
12
- constructor(culture: string, token: string, options?: ImageTaskOptions);
13
- upload: (file: File, onProgress?: ((progress: number) => void) | undefined) => Promise<any[] | null | undefined>;
14
- addPrintingOptions: (printingOptions: MPlaza.PrintTypes | undefined) => void;
15
- private uploadFileChunked;
16
- private resumableUpload;
17
- private createImageTask;
18
- private getImageFromTask;
19
- }
20
- export {};
1
+ declare const MPlaza: any;
2
+ interface ImageTaskOptions {
3
+ convertEpsToSvg: boolean;
4
+ convertPdfToSvg: boolean;
5
+ convertAiToSvg: boolean;
6
+ IsPdfWithRasterAllowed: boolean;
7
+ }
8
+ export default class ImageUploadTask {
9
+ culture: string;
10
+ token: string;
11
+ options: ImageTaskOptions;
12
+ constructor(culture: string, token: string, options?: ImageTaskOptions);
13
+ upload: (file: File, onProgress?: ((progress: number) => void) | undefined) => Promise<any[] | null | undefined>;
14
+ addPrintingOptions: (printingOptions: MPlaza.PrintTypes | undefined) => void;
15
+ private uploadFileChunked;
16
+ private resumableUpload;
17
+ private createImageTask;
18
+ private getImageFromTask;
19
+ }
20
+ export {};
@@ -599,7 +599,7 @@ export interface OnBeforeSendDataToParent {
599
599
  previewFiles: PreviewFile[];
600
600
  additionalProperties: any;
601
601
  }
602
- export interface TemplateUploadRestrictictions {
602
+ export interface TemplateUploadRestrictions {
603
603
  isUserImageAllowed: boolean;
604
604
  isJpgAllowed: boolean;
605
605
  isPngAllowed: boolean;
@@ -1016,4 +1016,35 @@ export declare enum DAMViewerAnalyticsEventType {
1016
1016
  ViewProduct = "VIEW_PRODUCT",
1017
1017
  ViewArProdutc = "VIEW_AR_PRODUCT"
1018
1018
  }
1019
+ export interface GraphQLWelcomeMessageResponse {
1020
+ data: {
1021
+ messagesByProduct: null | GraphQLWelcomeMessageData[];
1022
+ };
1023
+ }
1024
+ export interface GraphQLWelcomeMessageData {
1025
+ id: string;
1026
+ eventGlobalID: string;
1027
+ messageId: number;
1028
+ messageText: string;
1029
+ eventName: string;
1030
+ eventId: number;
1031
+ closeable: boolean;
1032
+ visible: boolean;
1033
+ addToCartDisabledValue: boolean;
1034
+ enableCheckForSellerImagesValue: boolean;
1035
+ enableAdditionalMessage: boolean;
1036
+ additionalMessage: string | null;
1037
+ eventMessageId: number;
1038
+ title: string | null;
1039
+ titleSingleMessage: string | null;
1040
+ infoLink: string | null;
1041
+ defaultMessage: string | null;
1042
+ visibleOnlyOnApi: boolean | null;
1043
+ addToCartLabel: string | null;
1044
+ visibleLowQualityInfoText: boolean | null;
1045
+ defaultAdditionalMessageText: string | null;
1046
+ warningText: string | null;
1047
+ onDeleteWarningText: string | null;
1048
+ isDefault?: boolean | null;
1049
+ }
1019
1050
  export {};
@@ -1,3 +1,3 @@
1
- import { Zakeke } from './providerValue';
2
- import { AppState } from './state';
3
- export declare const createProviderValue: (state: AppState, dispatch: React.Dispatch<any>) => Zakeke;
1
+ import { Zakeke } from './providerValue';
2
+ import { AppState } from './state';
3
+ export declare const createProviderValue: (state: AppState, dispatch: React.Dispatch<any>) => Zakeke;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { FocusAttributesEventListener } from '@zakeke/zakeke-3d-core';
5
5
  import { EventMessage, FontFamily, Group, Item, NftForm, NftSettings, OnBeforeSendDataToParent, PrintingMethodsRestrictions, Product, SceneAnimationsConfig, Settings, Template, TemplateMacroCategory, TextSanitationResult, Translations, UIConfig, VisibleEventMessage } from '..';
6
- import { Camera, ImageMacroCategory, ProductQuantityRule, SellerSettings, TemplateUploadRestrictictions, ZakekeImage } from '../models';
6
+ import { Camera, ImageMacroCategory, ProductQuantityRule, SellerSettings, TemplateUploadRestrictions, ZakekeImage } from '../models';
7
7
  interface RestrictionColor {
8
8
  colorCode: string;
9
9
  isDefault: boolean;
@@ -91,6 +91,7 @@ export interface Zakeke {
91
91
  backgroundColor: string;
92
92
  removeBackground: boolean;
93
93
  deepARsceneGLBUrl: string | null;
94
+ shouldLoadDesign: boolean | null;
94
95
  getDeepARDesktopIframeUrl: () => Promise<string>;
95
96
  setMouseWheelZoomEnabled: (enabled: boolean) => void;
96
97
  setCameraPinchingZoom: (toggle: boolean) => void;
@@ -105,8 +106,8 @@ export interface Zakeke {
105
106
  setTemplate: (templateId: number) => Promise<void>;
106
107
  isAreaVisible: (areaId: number) => boolean;
107
108
  quantity: number;
108
- saveTemplate: (templateName: string, selectedCategoryID: number | null, attributesOptions: Map<number, number>) => Promise<void>;
109
- addToCart: (additionalProperties: Record<string, any>, OnBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any>>, legacyScreenshot?: boolean, nftForm?: NftForm) => Promise<void>;
109
+ saveTemplate: (templateName: string, selectedCategoryID: number | null, attributesOptions: Map<number, number>, save2Ddesign?: boolean) => Promise<void>;
110
+ addToCart: (additionalProperties: Record<string, any>, OnBeforeSendDataToParent?: (data: OnBeforeSendDataToParent) => Promise<Record<string, any>>, legacyScreenshot?: boolean, nftForm?: NftForm, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
110
111
  /**
111
112
  * Create a PDF of the current configuration
112
113
  * @returns The URL of the PDF
@@ -162,7 +163,7 @@ export interface Zakeke {
162
163
  removeItem: (guid: string) => Promise<void>;
163
164
  setQuantity: (quantity: number) => void;
164
165
  getShareCompositionUrl: () => Promise<string>;
165
- saveComposition: (customPreviewSize?: CustomPreviewSize) => Promise<void>;
166
+ saveComposition: (customPreviewSize?: CustomPreviewSize, saveDesignFromTemplateEditor?: boolean) => Promise<void>;
166
167
  loadComposition: (id: string) => Promise<void>;
167
168
  switchFullscreen: () => void;
168
169
  openSecondScreen: () => void;
@@ -200,7 +201,7 @@ export interface Zakeke {
200
201
  getTryOnUrl: (tryOnUrl?: string) => Promise<string>;
201
202
  isSceneTryOnEnabled: () => boolean;
202
203
  setCameraLocked: (isBlocked: boolean) => void;
203
- getTemplateUploadRestrictictions: (templateId: number, areaId: number) => TemplateUploadRestrictictions;
204
+ getTemplateUploadRestrictions: (areaId: number) => TemplateUploadRestrictions;
204
205
  saveDraftsComposition: (name: string, tags: string[], isCopy?: boolean) => Promise<void>;
205
206
  loadSavedComposition: (docID: string) => Promise<void>;
206
207
  deleteSavedComposition: (docId: string) => Promise<void>;