/**
* @typedef {(FULL_SCREEN | FILL_PARENT | CUSTOM_SIZE)} Layout
* @see {@link WizartDeploymentKit.LAYOUTS} for options descriptions.
*/
/**
* Layout types supported by Visualizer.
* @readonly
* @memberof WizartDeploymentKit
* @enum {Layout}
*/
const LAYOUTS = {
/** Attach the button before the target element. */
FULL_SCREEN: 'wizart-full-screen',
/** Attach the button after the target element. */
FILL_PARENT: 'wizart-fill-parrent',
/** Replace the target element with the button. */
CUSTOM_SIZE: 'wizart-custom'
};
/**
* @typedef {(BEFORE | AFTER | REPLACE)} Position
* @see {@link WizartDeploymentKit.POSITIONS} for options descriptions.
*/
/**
* Defines possible placement options for attaching a Visualizer to a target DOM element.
* @readonly
* @memberof WizartDeploymentKit
* @enum {Position}
*/
const POSITIONS = {
/** Attach the Visualizer before the target element. */
BEFORE: 1,
/** Attach the Visualizer after the target element. */
AFTER: 2,
/** Replace the child elements with the Visualizer. */
REPLACE: 3
};
/**
* @typedef {(WALLPAPER | WALL_PANEL | WALL_MURAL)} ProductType
* @see {@link WizartDeploymentKit.PRODUCT_TYPES} for options descriptions.
*/
/**
* Define product types supported by Visualizer for custom products.
* @readonly
* @memberof WizartDeploymentKit
* @enum {ProductType}
*/
const PRODUCT_TYPES = {
/** Wallpaper product. */
WALLPAPER: 'wallpaper',
/** Wall panel product */
WALL_PANEL: 'wall_panels',
/** Wall mural */
WALL_MURAL: 'wall_mural'
};
/**
* @typedef {(IMAGE_JPEG | IMAGE_PNG)} MimeType
* @see {@link WizartDeploymentKit.MIME_TYPE} for options descriptions.
*/
/**
* Define supported MIME types for custom product textures.
* @readonly
* @memberof WizartDeploymentKit
* @enum {MimeType}
*/
const MIME_TYPES = {
/** image jpeg format */
IMAGE_JPEG: 'image/jpeg',
/** image png format */
IMAGE_PNG: 'image/png'
};
/**
* @typedef {(BEFORE | AFTER | REPLACE | FIRST | LAST)} Placement
* @see {@link WizartDeploymentKit.PLACEMENTS} for options descriptions.
*/
/**
* Defines possible placement options for attaching a button to a target element in the DOM.
* @readonly
* @memberof WizartDeploymentKit
* @enum {Placement}
*/
const PLACEMENTS = {
/** Attach the button before the target element. */
BEFORE: 'before',
/** Attach the button after the target element. */
AFTER: 'after',
/** Replace the child elements with the button. */
REPLACE: 'replace',
/** Replace the child elements with the button. */
FIRST: 'first',
/** Attach the button as the last child of the target element. */
LAST: 'last'
};
/**
* @typedef {(TOP | BOTTOM)} TooltipDirection
* @see {@link WizartDeploymentKit.TOOLTIP_DIRECTIONS} for options descriptions.
*/
/**
* Tooltip direction.
* @readonly
* @memberof WizartDeploymentKit
* @enum {TooltipDirection}
*/
const TOOLTIP_DIRECTIONS = {
/** Tooltip appears above of button.*/
TOP: 'TOP',
/** Tooltip appears below of button.*/
BOTTOM: 'BOTTOM'
};
/**
* @ignore
*/
const BRAND_MAIN_COLOR = '#FA5961';
/**
* @ignore
*/
const BRAND_SECOND_COLOR = '#FFF';
/**
* Events produced by Visualizer.
* @typedef {(BACK_BUTTON_CLICKED | GALLERY_OPENED | GALLERY_CLOSE | PREDEFINED_INTERIOR_SELECT | USER_SESSION_START | USER_SESSION_END | PRODUCT_SELECT | PRODUCT_APPLY | SURFACE_SELECT | PRODUCT_DETAIL_OPEN | PRODUCT_DETAIL_CLOSE | ADD_TO_CART | CART_PRODUCT_COUNT_INCREASE | CART_PRODUCT_CART_DECREASE | REMOVE_FROM_CART | ADD_TO_FAVORITES | REMOVE_FROM_FAVORITES | BRAND_SELECT | COLLECTION_SELECT | HISTORY_OPEN | HISTORY_CLOSE | FAVORITES_OPEN | FAVORITES_CLOSE | SHOPPING_CART_OPEN | SHOPPING_CART_CLOSE | DOWNLOAD_MENU_OPEN | DOWNLOAD_RESULT | CLEAR_SURFACE | ZOOM_IMAGE | CUSTOM_INTERIOR_SELECTION_START | CUSTOM_INTERIOR_UPLOAD | CUSTOM_INTERIOR_DELETE | CUSTOM_INTERIOR_SELECT | GALLERY_FILTER_APPLY | USER_INIT | CHECKOUT_OPTIONS_OPEN | CHECKOUT_OPTIONS_CLOSE | CART_REMINDER_OPEN | FAVORITES_STATE_CHANGE | SHOPPING_CART_STATE_CHANGE)} VisualizerEvent
* @see {@link WizartDeploymentKit.VISUALIZER_EVENTS} for options descriptions.
*/
/**
* Events produced by Visualizer.
* @readonly
* @memberof WizartDeploymentKit
* @enum {VisualizerEvent}
*/
const VISUALIZER_EVENTS = {
/** Triggered when the back button is clicked. */
BACK_BUTTON_CLICK: 'back_button_clicked',
/** Triggered when the gallery is opened. */
GALLERY_OPEN: 'gallery_open',
/** Triggered when the gallery is closed by the user. */
GALLERY_CLOSE: 'gallery_closed_by_user',
/** Triggered when a predefined interior is selected. */
PREDEFINED_INTERIOR_SELECT: 'predefined_interior_selected',
/** Triggered when a user session starts. */
USER_SESSION_START: 'wizart_session_start',
/** Triggered when a user session ends. */
USER_SESSION_END: 'wizart_session_finish',
/** Triggered when porduct selected in the catalog. */
PRODUCT_SELECT: 'article_selection',
/** Triggered when a product is applied to the surface. */
PRODUCT_APPLY: 'apply',
/** Triggered when a surface is selected. */
SURFACE_SELECT: 'surface_select',
/** Triggered when a product detail page is opened. */
PRODUCT_DETAIL_OPEN: 'pdp_clicked',
/** Triggered when a product detail page is closed. */
PRODUCT_DETAIL_CLOSE: 'pdp_closed',
/** Triggered when a product is added to the shopping cart. */
ADD_TO_CART: 'add_to_shopping_cart',
/** Triggered when a cart product count increased */
CART_PRODUCT_COUNT_INCREASE: '+1_item',
/** Triggered when a cart product count decreased */
CART_PRODUCT_CART_DECREASE:'-1_item',
/** Triggered when a product is removed from the shopping cart. */
REMOVE_FROM_CART: 'remove_from_shopping_cart',
/** Triggered when a product is added to favorites. */
ADD_TO_FAVORITES: 'add_to_favorite',
/** Triggered when a product is removed from favorites. */
REMOVE_FROM_FAVORITES: 'remove_from_favorite',
/** Triggered when a brand is selected. */
BRAND_SELECT: 'brand_selected',
/** Triggered when a collection is selected. */
COLLECTION_SELECT: 'collection_selected',
/** Triggered when the user opens their history section. */
HISTORY_OPEN: 'my_room_open',
/** Triggered when the user closes their history section. */
HISTORY_CLOSE: 'my_room_close',
/** Triggered when the favorites section is opened. */
FAVORITES_OPEN: 'favorite_open',
/** Triggered when the favorites section is closed. */
FAVORITES_CLOSE: 'favorite_close',
/** Triggered when the shopping cart is opened. */
SHOPPING_CART_OPEN: 'shopping_cart_open',
/** Triggered when the shopping cart is closed. */
SHOPPING_CART_CLOSE: 'shopping_cart_close',
/** Triggered when proceed to checkout is clicked.*/
CHECKOUT_OPTIONS_OPEN: 'checkout_options_opened',
/** Triggered when checkout options is closed.*/
CHECKOUT_OPTIONS_CLOSE: 'checkout_options_closed',
/** Triggered when cart reminder is opened. */
CART_REMINDER_OPEN: 'cart_reminder_opened',
/** Triggered when the download menu is opened. */
DOWNLOAD_MENU_OPEN: 'download_menu',
/** Triggered when the result is downloaded. */
DOWNLOAD_RESULT: 'download_result',
/** Triggered when the clear surface button is clicked. */
CLEAR_SURFACE: 'clear',
/** Triggered when an image is zoomed in. */
ZOOM_IMAGE: 'zoom_image',
/** Triggered when the selection of a custom interior begins. */
CUSTOM_INTERIOR_SELECTION_START: 'custom_interior_selection_started',
/** Triggered when a custom interior is uploaded. */
CUSTOM_INTERIOR_UPLOAD: 'photo_uploaded',
/** Triggered when a custom interior is deleted. */
CUSTOM_INTERIOR_DELETE: 'custom_interior_deleted',
/** Triggered when a custom interior is selected. */
CUSTOM_INTERIOR_SELECT: 'custom_interior_selected',
/** Triggered when filters are applied in the gallery. */
GALLERY_FILTER_APPLY: 'gallery_filters_applied',
/** Triggered during user initialization. */
USER_INIT: 'user_init',
/** Triggered when favorites state changed. */
FAVORITES_STATE_CHANGE: 'favorites_state_changed',
/** Triggered when shoping cart state changed. */
SHOPPING_CART_STATE_CHANGE: 'shopping_cart_state_changed',
/** Triggered when DeploymentKit ask Visualizer about shopping cart state. */
SHOPPING_CART_STATE: 'getShoppingCartStore',
};
/**
* @ignore
*/
const PRIVATE_EVENTS = {
GET_SHOPPING_CART_STATE: 'getShoppingCartStore',
SET_SHOPPING_CART_STATE: 'setShoppingCartStore',
GET_FAVORITES_STATE: 'getFavoritesStore',
SET_FAVORITES_STATE: 'setFavoritesStore',
EXTERNAL_CALLBACK: 'setExternalCallback',
DOWNLOAD_RENDER: 'download-render',
DOWNLOAD_QR: 'download-qr-code',
SET_CUSTOM_PRODUCT: 'setCustomProduct'
}
/**
* @typedef {FILTER_DETAILS_PAGE_PROPS} ExternalCallback
* @see {@link WizartDeploymentKit.EXTERANL_CALLBACKS} for options descriptions.
**/
/**
* External callbacks supported by Visualizer.
* @readonly
* @memberof WizartDeploymentKit
* @enum {ExternalCallback}
*/
const EXTERANL_CALLBACKS = {
FILTER_DETAILS_PAGE_PROPS: 'filterProductDetailsProps'
};
export {
LAYOUTS,
POSITIONS,
PRODUCT_TYPES,
MIME_TYPES,
PLACEMENTS,
TOOLTIP_DIRECTIONS,
BRAND_MAIN_COLOR,
BRAND_SECOND_COLOR,
VISUALIZER_EVENTS,
PRIVATE_EVENTS,
EXTERANL_CALLBACKS
};