kitchen-simulator 5.0.0-test.7 → 5.0.0-test.71
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 +1 -1
- package/package.json +22 -63
- package/src/KitchenConfiguratorApp.jsx +5 -5
- package/src/_KitchenConfigurator.jsx +578 -0
- package/src/actions/export.js +2 -5
- package/src/assets/Window.hdr +2100 -0
- package/src/assets/brown_photostudio_02_1k.hdr +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
- package/src/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
- package/src/assets/fonts/style.css +177 -0
- package/src/assets/gltf/door_closet.bin +0 -0
- package/src/assets/gltf/door_closet.fbx +0 -0
- package/src/assets/gltf/door_closet.gltf +1 -0
- package/src/assets/gltf/door_exterior.bin +0 -0
- package/src/assets/gltf/door_exterior.fbx +0 -0
- package/src/assets/gltf/door_exterior.gltf +1 -0
- package/src/assets/gltf/door_interior.bin +0 -0
- package/src/assets/gltf/door_interior.fbx +0 -0
- package/src/assets/gltf/door_interior.gltf +1 -0
- package/src/assets/gltf/door_sliding.bin +0 -0
- package/src/assets/gltf/door_sliding.fbx +0 -0
- package/src/assets/gltf/door_sliding.gltf +1 -0
- package/src/assets/gltf/doorway_framed.bin +0 -0
- package/src/assets/gltf/doorway_framed.fbx +0 -0
- package/src/assets/gltf/doorway_framed.gltf +1 -0
- package/src/assets/gltf/window_clear.bin +0 -0
- package/src/assets/gltf/window_clear.fbx +0 -0
- package/src/assets/gltf/window_clear.gltf +1 -0
- package/src/assets/gltf/window_cross.bin +0 -0
- package/src/assets/gltf/window_cross.fbx +0 -0
- package/src/assets/gltf/window_cross.gltf +1 -0
- package/src/assets/gltf/window_double_hung.bin +0 -0
- package/src/assets/gltf/window_double_hung.fbx +0 -0
- package/src/assets/gltf/window_double_hung.gltf +1 -0
- package/src/assets/gltf/window_vertical.bin +0 -0
- package/src/assets/gltf/window_vertical.fbx +0 -0
- package/src/assets/gltf/window_vertical.gltf +1 -0
- package/src/assets/img/1.jpg +0 -0
- package/src/assets/img/TKC_thumbnail.png +0 -0
- package/src/assets/img/Toggle.png +0 -0
- package/src/assets/img/loading/loading.gif +0 -0
- package/src/assets/img/loading/loading_1.svg +11 -0
- package/src/assets/img/loading_large.gif +0 -0
- package/src/assets/img/png/door/closet.png +0 -0
- package/src/assets/img/png/door/doorwaysframed.png +0 -0
- package/src/assets/img/png/door/doorwaysframeles.png +0 -0
- package/src/assets/img/png/door/doorwaysframeless.png +0 -0
- package/src/assets/img/png/door/exterior.png +0 -0
- package/src/assets/img/png/door/interior.png +0 -0
- package/src/assets/img/png/door/sliding.png +0 -0
- package/src/assets/img/png/helper/outcome.png +0 -0
- package/src/assets/img/png/helper/video_preview_3d.png +0 -0
- package/src/assets/img/png/helper/video_preview_start.png +0 -0
- package/src/assets/img/project_img.png +0 -0
- package/src/assets/img/rta/rta_logo_box_blue.jpg +0 -0
- package/src/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
- package/src/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
- package/src/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
- package/src/assets/img/rta/rta_logo_box_lightblue.png +0 -0
- package/src/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
- package/src/assets/img/rta/rta_logo_box_maroon.png +0 -0
- package/src/assets/img/rta/rta_logo_box_white.png +0 -0
- package/src/assets/img/rta_menu.png +0 -0
- package/src/assets/img/step2.jpg +0 -0
- package/src/assets/img/step3.jpg +0 -0
- package/src/assets/img/step4.jpg +0 -0
- package/src/assets/img/step5.jpg +0 -0
- package/src/assets/img/step6.jpg +0 -0
- package/src/assets/img/step7.jpg +0 -0
- package/src/assets/img/step8.jpg +0 -0
- package/src/assets/img/svg/2d_delete_object.svg +33 -0
- package/src/assets/img/svg/2d_delete_object1.svg +33 -0
- package/src/assets/img/svg/2d_lock_object.svg +33 -0
- package/src/assets/img/svg/3d_item_move.svg +106 -0
- package/src/assets/img/svg/3d_item_rotation.svg +76 -0
- package/src/assets/img/svg/3d_item_warning_edit.svg +77 -0
- package/src/assets/img/svg/3d_item_warning_info.svg +81 -0
- package/src/assets/img/svg/accessories.svg +4 -0
- package/src/assets/img/svg/angle_icon.svg +39 -0
- package/src/assets/img/svg/blank_div.svg +14 -0
- package/src/assets/img/svg/bottombar/2d3d_button.svg +3 -0
- package/src/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
- package/src/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
- package/src/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
- package/src/assets/img/svg/bottombar/arrow-down.svg +3 -0
- package/src/assets/img/svg/bottombar/arrow-left.svg +3 -0
- package/src/assets/img/svg/bottombar/arrow-minus.svg +3 -0
- package/src/assets/img/svg/bottombar/arrow-plus.svg +11 -0
- package/src/assets/img/svg/bottombar/arrow-right.svg +3 -0
- package/src/assets/img/svg/bottombar/arrow-up.svg +3 -0
- package/src/assets/img/svg/bottombar/collapse.svg +3 -0
- package/src/assets/img/svg/bottombar/elevation-back.svg +6 -0
- package/src/assets/img/svg/bottombar/elevation-front.svg +6 -0
- package/src/assets/img/svg/bottombar/elevation-left.svg +6 -0
- package/src/assets/img/svg/bottombar/elevation-right.svg +7 -0
- package/src/assets/img/svg/bottombar/elevation.svg +6 -0
- package/src/assets/img/svg/bottombar/expand.svg +3 -0
- package/src/assets/img/svg/bottombar/help.svg +72 -0
- package/src/assets/img/svg/bottombar/incm_toggle.svg +39 -0
- package/src/assets/img/svg/bottombar/pan_1.svg +57 -0
- package/src/assets/img/svg/bottombar/pan_2.svg +27 -0
- package/src/assets/img/svg/bottombar/pan_3.svg +27 -0
- package/src/assets/img/svg/bottombar/pan_4.svg +27 -0
- package/src/assets/img/svg/bottombar/pan_5.svg +27 -0
- package/src/assets/img/svg/bottombar/settings.svg +23 -0
- package/src/assets/img/svg/bottombar/spin-down.svg +76 -0
- package/src/assets/img/svg/bottombar/spin-left.svg +75 -0
- package/src/assets/img/svg/bottombar/spin-right.svg +75 -0
- package/src/assets/img/svg/bottombar/spin-up.svg +76 -0
- package/src/assets/img/svg/bottombar/spin_1.svg +48 -0
- package/src/assets/img/svg/bottombar/spin_2.svg +31 -0
- package/src/assets/img/svg/bottombar/spin_3.svg +31 -0
- package/src/assets/img/svg/bottombar/spin_4.svg +31 -0
- package/src/assets/img/svg/bottombar/spin_5.svg +31 -0
- package/src/assets/img/svg/bottombar/zoomin.svg +29 -0
- package/src/assets/img/svg/bottombar/zoomout.svg +26 -0
- package/src/assets/img/svg/check.svg +10 -0
- package/src/assets/img/svg/close.svg +11 -0
- package/src/assets/img/svg/color/Black.svg +3 -0
- package/src/assets/img/svg/color/Blue.svg +3 -0
- package/src/assets/img/svg/color/Brown.svg +9 -0
- package/src/assets/img/svg/color/Cream.svg +3 -0
- package/src/assets/img/svg/color/Dark.svg +9 -0
- package/src/assets/img/svg/color/Gray.svg +3 -0
- package/src/assets/img/svg/color/Green.svg +3 -0
- package/src/assets/img/svg/color/Light.svg +9 -0
- package/src/assets/img/svg/color/Medium.svg +9 -0
- package/src/assets/img/svg/color/Unfinished.svg +9 -0
- package/src/assets/img/svg/color/White.svg +3 -0
- package/src/assets/img/svg/color/White.svg.bak +3 -0
- package/src/assets/img/svg/color/stone2.jpg +0 -0
- package/src/assets/img/svg/color/wood2.jpg +0 -0
- package/src/assets/img/svg/copy.svg +11 -0
- package/src/assets/img/svg/delete.svg +3 -0
- package/src/assets/img/svg/detail.svg +77 -0
- package/src/assets/img/svg/door/Closet.svg +11 -0
- package/src/assets/img/svg/door/Exterior.svg +5 -0
- package/src/assets/img/svg/door/Framed_dorway.svg +5 -0
- package/src/assets/img/svg/door/Frameless_dorway.svg +5 -0
- package/src/assets/img/svg/door/Interior.svg +7 -0
- package/src/assets/img/svg/door/Sliding.svg +5 -0
- package/src/assets/img/svg/doors_closet.svg +47 -0
- package/src/assets/img/svg/doors_exterior.svg +25 -0
- package/src/assets/img/svg/doors_interior.svg +29 -0
- package/src/assets/img/svg/doors_patio.svg +26 -0
- package/src/assets/img/svg/duplicate.svg +11 -0
- package/src/assets/img/svg/duplicate_object_left.svg +32 -0
- package/src/assets/img/svg/duplicate_object_right.svg +32 -0
- package/src/assets/img/svg/filtersActive.svg +19 -0
- package/src/assets/img/svg/firstsetting/L.svg +3 -0
- package/src/assets/img/svg/firstsetting/L2.svg +3 -0
- package/src/assets/img/svg/firstsetting/Open.svg +3 -0
- package/src/assets/img/svg/firstsetting/Square.svg +3 -0
- package/src/assets/img/svg/firstsetting/bar-active.svg +9 -0
- package/src/assets/img/svg/firstsetting/bar-normal.svg +3 -0
- package/src/assets/img/svg/firstsetting/bullet-current.svg +3 -0
- package/src/assets/img/svg/firstsetting/bullet-done.svg +3 -0
- package/src/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
- package/src/assets/img/svg/firstsetting/check-active.svg +3 -0
- package/src/assets/img/svg/firstsetting/check-normal.svg +3 -0
- package/src/assets/img/svg/firstsetting/pencil.svg +11 -0
- package/src/assets/img/svg/green_checkmark.svg +27 -0
- package/src/assets/img/svg/headerbar/assist.svg +3 -0
- package/src/assets/img/svg/headerbar/cart.svg +3 -0
- package/src/assets/img/svg/headerbar/check.svg +10 -0
- package/src/assets/img/svg/headerbar/consult_designer.svg +45 -0
- package/src/assets/img/svg/headerbar/edit_name.svg +26 -0
- package/src/assets/img/svg/headerbar/file-dollar.svg +13 -0
- package/src/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
- package/src/assets/img/svg/headerbar/plus.svg +11 -0
- package/src/assets/img/svg/headerbar/review_quote.svg +44 -0
- package/src/assets/img/svg/headerbar/ruler-measure.svg +11 -0
- package/src/assets/img/svg/headerbar/save.svg +3 -0
- package/src/assets/img/svg/headerbar/setting.svg +75 -0
- package/src/assets/img/svg/help/check.svg +10 -0
- package/src/assets/img/svg/help/search.svg +76 -0
- package/src/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
- package/src/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
- package/src/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
- package/src/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
- package/src/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
- package/src/assets/img/svg/intro/3-retrieve-project.svg +18 -0
- package/src/assets/img/svg/invert.svg +127 -0
- package/src/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
- package/src/assets/img/svg/lefttoolbar/appliance.svg +13 -0
- package/src/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
- package/src/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
- package/src/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
- package/src/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
- package/src/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
- package/src/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
- package/src/assets/img/svg/lefttoolbar/door-style.svg +20 -0
- package/src/assets/img/svg/lefttoolbar/door.svg +12 -0
- package/src/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
- package/src/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
- package/src/assets/img/svg/lefttoolbar/finishing.svg +13 -0
- package/src/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
- package/src/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
- package/src/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
- package/src/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
- package/src/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
- package/src/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
- package/src/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
- package/src/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
- package/src/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
- package/src/assets/img/svg/lefttoolbar/search.svg +76 -0
- package/src/assets/img/svg/lefttoolbar/view_more.svg +86 -0
- package/src/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
- package/src/assets/img/svg/lefttoolbar/window.svg +12 -0
- package/src/assets/img/svg/menubar/login.svg +84 -0
- package/src/assets/img/svg/menubar/my_projects.svg +85 -0
- package/src/assets/img/svg/menubar/new_project.svg +110 -0
- package/src/assets/img/svg/menubar/save_project.svg +84 -0
- package/src/assets/img/svg/options.svg +3 -0
- package/src/assets/img/svg/positioning.svg +3 -0
- package/src/assets/img/svg/rotate.png +0 -0
- package/src/assets/img/svg/rotate.svg +17 -0
- package/src/assets/img/svg/rotate_object_clockwise.svg +26 -0
- package/src/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
- package/src/assets/img/svg/toggleFilters.svg +19 -0
- package/src/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
- package/src/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
- package/src/assets/img/svg/toolbar/add_button.svg +36 -0
- package/src/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
- package/src/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
- package/src/assets/img/svg/toolbar/add_items_doors.svg +25 -0
- package/src/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
- package/src/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
- package/src/assets/img/svg/toolbar/add_items_windows.svg +28 -0
- package/src/assets/img/svg/toolbar/apply_button.svg +38 -0
- package/src/assets/img/svg/toolbar/arrow-plus.svg +11 -0
- package/src/assets/img/svg/toolbar/backsplash.svg +8 -0
- package/src/assets/img/svg/toolbar/cancel_button.svg +37 -0
- package/src/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
- package/src/assets/img/svg/toolbar/countertop.svg +7 -0
- package/src/assets/img/svg/toolbar/dcm.png +0 -0
- package/src/assets/img/svg/toolbar/dcm_off.svg +12 -0
- package/src/assets/img/svg/toolbar/dcm_on.svg +474 -0
- package/src/assets/img/svg/toolbar/delete_button.svg +37 -0
- package/src/assets/img/svg/toolbar/download.svg +77 -0
- package/src/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
- package/src/assets/img/svg/toolbar/edit_button.svg +75 -0
- package/src/assets/img/svg/toolbar/email_quote_button.svg +44 -0
- package/src/assets/img/svg/toolbar/fbm.png +0 -0
- package/src/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
- package/src/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
- package/src/assets/img/svg/toolbar/floorstyle.svg +9 -0
- package/src/assets/img/svg/toolbar/fmb.png +0 -0
- package/src/assets/img/svg/toolbar/fmb_off.svg +12 -0
- package/src/assets/img/svg/toolbar/fmb_on.svg +489 -0
- package/src/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
- package/src/assets/img/svg/toolbar/get_started_button.svg +41 -0
- package/src/assets/img/svg/toolbar/handles.svg +5 -0
- package/src/assets/img/svg/toolbar/lighting.svg +7 -0
- package/src/assets/img/svg/toolbar/lrm.png +0 -0
- package/src/assets/img/svg/toolbar/lrm_off.svg +12 -0
- package/src/assets/img/svg/toolbar/lrm_on.svg +470 -0
- package/src/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
- package/src/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
- package/src/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
- package/src/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
- package/src/assets/img/svg/toolbar/redo_button.svg +75 -0
- package/src/assets/img/svg/toolbar/redo_button1.svg +75 -0
- package/src/assets/img/svg/toolbar/review_quote_active.svg +14 -0
- package/src/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
- package/src/assets/img/svg/toolbar/save_project_button.svg +44 -0
- package/src/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
- package/src/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
- package/src/assets/img/svg/toolbar/shopping-cart.svg +13 -0
- package/src/assets/img/svg/toolbar/style_change_button.svg +47 -0
- package/src/assets/img/svg/toolbar/take_picture.svg +75 -0
- package/src/assets/img/svg/toolbar/undo_button.svg +76 -0
- package/src/assets/img/svg/toolbar/undo_button1.svg +76 -0
- package/src/assets/img/svg/toolbar/use_button.svg +37 -0
- package/src/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
- package/src/assets/img/svg/topbar/edit_active.svg +10 -0
- package/src/assets/img/svg/topbar/edit_inactive.svg +10 -0
- package/src/assets/img/svg/topbar/redo_active.svg +42 -0
- package/src/assets/img/svg/topbar/redo_inactive.svg +23 -0
- package/src/assets/img/svg/topbar/select_all_active.svg +50 -0
- package/src/assets/img/svg/topbar/select_all_inactive.svg +32 -0
- package/src/assets/img/svg/topbar/take_picture_active.svg +51 -0
- package/src/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
- package/src/assets/img/svg/topbar/undo_active.svg +42 -0
- package/src/assets/img/svg/topbar/undo_inactive.svg +23 -0
- package/src/assets/img/svg/warning_info_2d.svg +81 -0
- package/src/assets/img/svg/window/Clear.svg +3 -0
- package/src/assets/img/svg/window/Cross.svg +5 -0
- package/src/assets/img/svg/window/Double_hung.svg +4 -0
- package/src/assets/img/svg/window/Vertical.svg +4 -0
- package/src/assets/img/svg/windows_clear.svg +23 -0
- package/src/assets/img/svg/windows_cross.svg +28 -0
- package/src/assets/img/svg/windows_double_hung.svg +24 -0
- package/src/assets/img/svg/windows_vertical.svg +24 -0
- package/src/assets/img/svg/wizardstep/Custom.svg +3 -0
- package/src/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
- package/src/assets/img/svg/wizardstep/L.svg +3 -0
- package/src/assets/img/svg/wizardstep/L2.svg +3 -0
- package/src/assets/img/svg/wizardstep/Open.svg +3 -0
- package/src/assets/img/svg/wizardstep/Square.svg +3 -0
- package/src/assets/img/svg/wizardstep/bar-active.svg +9 -0
- package/src/assets/img/svg/wizardstep/bar-normal.svg +3 -0
- package/src/assets/img/svg/wizardstep/bullet-current.svg +3 -0
- package/src/assets/img/svg/wizardstep/bullet-done.svg +3 -0
- package/src/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
- package/src/assets/img/svg/wizardstep/check-active.svg +3 -0
- package/src/assets/img/svg/wizardstep/check-normal.svg +3 -0
- package/src/assets/img/svg/wizardstep/detail_view.svg +87 -0
- package/src/assets/img/svg/wizardstep/pencil.svg +11 -0
- package/src/assets/img/svg/wizardstep/tile_view.svg +95 -0
- package/src/assets/img/texture/glass.jpg +0 -0
- package/src/assets/img/texture/steel.jpg +0 -0
- package/src/assets/img/texture/white1px.jpg +0 -0
- package/src/assets/img/texture/wood.jpg +0 -0
- package/src/assets/model/DCM.bin +0 -0
- package/src/assets/model/DCM.fbx +0 -0
- package/src/assets/model/DCM.gltf +1 -0
- package/src/assets/model/FBM.bin +0 -0
- package/src/assets/model/FBM.fbx +0 -0
- package/src/assets/model/FBM.gltf +1 -0
- package/src/assets/model/LRM.bin +0 -0
- package/src/assets/model/LRM.fbx +0 -0
- package/src/assets/model/LRM.gltf +1 -0
- package/src/assets/rtastore_logo.png +0 -0
- package/src/catalog/areas/area/planner-element.jsx +1 -1
- package/src/catalog/factories/wall-factory-3d.js +11 -18
- package/src/catalog/holes/index.js +13 -0
- package/src/catalog/lines/wall/planner-element.jsx +1 -1
- package/src/catalog/mycatalog.js +26 -0
- package/src/catalog/properties/property-checkbox.jsx +64 -68
- package/src/catalog/properties/property-color.jsx +1 -1
- package/src/catalog/properties/property-enum.jsx +37 -40
- package/src/catalog/properties/property-hidden.jsx +1 -1
- package/src/catalog/properties/property-lenght-measure.jsx +2 -2
- package/src/catalog/properties/property-length-measure.jsx +37 -40
- package/src/catalog/properties/property-length-measure_hole.jsx +2 -2
- package/src/catalog/properties/property-number.jsx +1 -1
- package/src/catalog/properties/property-read-only.jsx +1 -1
- package/src/catalog/properties/property-string.jsx +1 -1
- package/src/catalog/properties/property-toggle.jsx +1 -1
- package/src/catalog/utils/exporter.js +1 -1
- package/src/catalog/utils/item-loader.jsx +1 -1
- package/src/class/item.js +1 -1
- package/src/components/content.jsx +1 -19
- package/src/components/export.js +2 -29
- package/src/components/style/button.jsx +1 -1
- package/src/components/style/export.js +24 -0
- package/src/components/style/form-number-input.jsx +3 -29
- package/src/components/style/form-select.jsx +2 -31
- package/src/components/style/form-text-input.jsx +20 -22
- package/src/components/viewer2d/area.jsx +2 -2
- package/src/components/viewer2d/grids/grid-horizontal-streak.jsx +2 -2
- package/src/components/viewer2d/grids/grid-streak.jsx +2 -2
- package/src/components/viewer2d/grids/grid-vertical-streak.jsx +2 -2
- package/src/components/viewer2d/grids/grids.jsx +1 -1
- package/src/components/viewer2d/group.jsx +1 -1
- package/src/components/viewer2d/item.jsx +3 -11
- package/src/components/viewer2d/layer.jsx +1 -1
- package/src/components/viewer2d/line.jsx +30 -33
- package/src/components/viewer2d/ruler.jsx +2 -3
- package/src/components/viewer2d/rulerDist.jsx +6 -6
- package/src/components/viewer2d/rulerX.jsx +1 -1
- package/src/components/viewer2d/rulerY.jsx +1 -1
- package/src/components/viewer2d/scene.jsx +1 -1
- package/src/components/viewer2d/snap.jsx +1 -1
- package/src/components/viewer2d/state.jsx +1 -1
- package/src/components/viewer2d/vertex.jsx +2 -2
- package/src/components/viewer2d/viewer2d.jsx +3 -3
- package/src/components/viewer3d/pointer-lock-navigation.js +1 -1
- package/src/components/viewer3d/ruler-utils/itemRect.jsx +91 -91
- package/src/components/viewer3d/ruler-utils/layer3D.jsx +528 -528
- package/src/components/viewer3d/ruler-utils/scene3D.jsx +85 -87
- package/src/components/viewer3d/scene-creator.js +1 -1
- package/src/components/viewer3d/viewer3d-first-person.js +2 -2
- package/src/components/viewer3d/{viewer3d.js → viewer3d.jsx} +3 -3
- package/src/constants.js +3 -0
- package/src/index.js +0 -2
- package/src/models.js +1 -1
- package/src/reducers/viewer2d-reducer.js +1 -1
- package/src/reducers/viewer3d-reducer.js +1 -1
- package/src/styles/export.js +7 -0
- package/src/styles/tabs.css +40 -0
- package/src/utils/geometry.js +2 -2
- package/src/utils/graph-inner-cycles.js +3 -3
- package/src/utils/helper.js +1 -1
- package/src/utils/history.js +1 -1
- package/src/utils/molding.js +973 -973
- package/src/utils/react-if.jsx +1 -1
- package/src/KitchenConfigurator.jsx +0 -1517
- package/src/actions/user-actions.js +0 -75
- package/src/components/atoms/Snackbar/index.jsx +0 -43
- package/src/components/atoms/radio-button/index.jsx +0 -20
- package/src/components/atoms/radio-button/styles.js +0 -56
- package/src/components/button/MainButton.jsx +0 -157
- package/src/components/button/ToggleMeasureButton.jsx +0 -65
- package/src/components/catalog-view/catalog-breadcrumb.jsx +0 -53
- package/src/components/catalog-view/catalog-item.jsx +0 -229
- package/src/components/catalog-view/catalog-list.jsx +0 -173
- package/src/components/catalog-view/catalog-page-item.jsx +0 -110
- package/src/components/catalog-view/catalog-turn-back-page-item.jsx +0 -80
- package/src/components/configurator/custom-configurator.jsx +0 -77
- package/src/components/configurator/project-configurator.jsx +0 -120
- package/src/components/firstsetting/button/styles.js +0 -223
- package/src/components/firstsetting/export.js +0 -9
- package/src/components/firstsetting/firstsetting-content-button.jsx +0 -198
- package/src/components/firstsetting/firstsetting-toggle-button.jsx +0 -101
- package/src/components/firstsetting/firstsetting.jsx +0 -814
- package/src/components/footerbar/button/ControlButton.jsx +0 -43
- package/src/components/footerbar/button/DirectionButton.jsx +0 -54
- package/src/components/footerbar/button/DirectionPanSpinButton.jsx +0 -36
- package/src/components/footerbar/button/ToggleButton.jsx +0 -58
- package/src/components/footerbar/button/ToggleConvertButton.jsx +0 -48
- package/src/components/footerbar/button/ToggleMeasureButton.jsx +0 -33
- package/src/components/footerbar/button/styles.js +0 -217
- package/src/components/footerbar/export.js +0 -9
- package/src/components/footerbar/footer-content-button.jsx +0 -198
- package/src/components/footerbar/footer-toggle-button.jsx +0 -101
- package/src/components/footerbar/footerbar.jsx +0 -1103
- package/src/components/footerbar/styles.js +0 -263
- package/src/components/header/button/MenuButton.jsx +0 -46
- package/src/components/header/button/SaveButton.jsx +0 -54
- package/src/components/header/button/styles.js +0 -181
- package/src/components/header/export.js +0 -5
- package/src/components/header/header.jsx +0 -631
- package/src/components/header/header.style.css +0 -47
- package/src/components/header/styles.js +0 -320
- package/src/components/login/Login.js +0 -77
- package/src/components/login/LoginForm/index.js +0 -108
- package/src/components/login/Register.js +0 -83
- package/src/components/login/RegisterForm/index.js +0 -171
- package/src/components/login/jwtService.js +0 -201
- package/src/components/login/style.css +0 -158
- package/src/components/login/style.scss +0 -260
- package/src/components/molecules/slider/index.jsx +0 -15
- package/src/components/molecules/slider/styles.js +0 -0
- package/src/components/molecules/slider/styles.scss +0 -3
- package/src/components/myprojects/export.js +0 -5
- package/src/components/myprojects/index.jsx +0 -445
- package/src/components/myprojects/styles.js +0 -241
- package/src/components/sidebar/custom-accordion.jsx +0 -48
- package/src/components/sidebar/export.js +0 -15
- package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +0 -73
- package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +0 -101
- package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +0 -149
- package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +0 -316
- package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +0 -108
- package/src/components/sidebar/panel-element-editor/element-editor.jsx +0 -1070
- package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
- package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +0 -104
- package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +0 -155
- package/src/components/sidebar/panel-group-editor.jsx +0 -272
- package/src/components/sidebar/panel-groups.jsx +0 -310
- package/src/components/sidebar/panel-guides.jsx +0 -192
- package/src/components/sidebar/panel-layer-elements.jsx +0 -298
- package/src/components/sidebar/panel-layers.jsx +0 -381
- package/src/components/sidebar/panel.jsx +0 -71
- package/src/components/sidebar/sidebar.jsx +0 -106
- package/src/components/sidebar/toolbar-panel.jsx +0 -139
- package/src/components/sign/export.js +0 -7
- package/src/components/sign/main/index.jsx +0 -523
- package/src/components/sign/main/styles.js +0 -163
- package/src/components/style/cancel-button.jsx +0 -20
- package/src/components/style/content-container.jsx +0 -29
- package/src/components/style/content-title.jsx +0 -20
- package/src/components/style/delete-button.jsx +0 -23
- package/src/components/style/export.jsx +0 -48
- package/src/components/style/form-block.jsx +0 -13
- package/src/components/style/form-number-input_2.jsx +0 -191
- package/src/components/style/form-slider.jsx +0 -36
- package/src/components/style/form-submit-button.jsx +0 -23
- package/src/components/toolbar/button/ControlButton.jsx +0 -41
- package/src/components/toolbar/button/DirectionButton.jsx +0 -34
- package/src/components/toolbar/button/RightButton.jsx +0 -103
- package/src/components/toolbar/button/ToggleButton.jsx +0 -41
- package/src/components/toolbar/button/index.jsx +0 -55
- package/src/components/toolbar/button/styles.js +0 -127
- package/src/components/toolbar/components/DoorStyleMenu.jsx +0 -103
- package/src/components/toolbar/components/Pricing.jsx +0 -126
- package/src/components/toolbar/components/ReviewForQuote.jsx +0 -635
- package/src/components/toolbar/export.js +0 -21
- package/src/components/toolbar/main/Alert.js +0 -122
- package/src/components/toolbar/main/TakePictureModal.jsx +0 -104
- package/src/components/toolbar/main/confirm-popup.jsx +0 -99
- package/src/components/toolbar/main/index.jsx +0 -5627
- package/src/components/toolbar/main/lShaped.json +0 -311
- package/src/components/toolbar/main/longNarrow.json +0 -238
- package/src/components/toolbar/main/myComponents.js +0 -123
- package/src/components/toolbar/main/oRectangle.json +0 -220
- package/src/components/toolbar/main/rectangle.json +0 -238
- package/src/components/toolbar/main/style.css +0 -107
- package/src/components/toolbar/main/styles.js +0 -696
- package/src/components/toolbar/plugin-item.jsx +0 -123
- package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +0 -73
- package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +0 -102
- package/src/components/toolbar/popup/appliance/index.jsx +0 -83
- package/src/components/toolbar/popup/autosaveprompt/index.jsx +0 -150
- package/src/components/toolbar/popup/autosaveprompt/styles.css +0 -64
- package/src/components/toolbar/popup/autosaveprompt/styles.js +0 -40
- package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +0 -73
- package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +0 -119
- package/src/components/toolbar/popup/cabinet/index.jsx +0 -85
- package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +0 -63
- package/src/components/toolbar/popup/doorStyle/index.jsx +0 -71
- package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +0 -139
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -2
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +0 -157
- package/src/components/toolbar/popup/downloadsummary/index.jsx +0 -643
- package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +0 -51
- package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +0 -175
- package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +0 -283
- package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +0 -2257
- package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -93
- package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +0 -132
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +0 -2198
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +0 -152
- package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +0 -149
- package/src/components/toolbar/popup/downloadsummary/styles.css +0 -177
- package/src/components/toolbar/popup/downloadsummary/styles.js +0 -453
- package/src/components/toolbar/popup/finishingtouch/category/index.jsx +0 -34
- package/src/components/toolbar/popup/finishingtouch/index.jsx +0 -58
- package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +0 -112
- package/src/components/toolbar/popup/finishingtouch/product/index.jsx +0 -116
- package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +0 -101
- package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +0 -254
- package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
- package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
- package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
- package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
- package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -86
- package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +0 -109
- package/src/components/toolbar/popup/floorplan/index.jsx +0 -60
- package/src/components/toolbar/popup/index.jsx +0 -241
- package/src/components/toolbar/popup/newproject/index.jsx +0 -59
- package/src/components/toolbar/popup/newproject/styles.css +0 -64
- package/src/components/toolbar/popup/newproject/styles.js +0 -41
- package/src/components/toolbar/popup/product/appliance.jsx +0 -54
- package/src/components/toolbar/popup/product/cabinetproduct.jsx +0 -15
- package/src/components/toolbar/popup/product/doorstyle.jsx +0 -58
- package/src/components/toolbar/popup/product/doorstyleproduct.jsx +0 -47
- package/src/components/toolbar/popup/product/floor.jsx +0 -36
- package/src/components/toolbar/popup/product/floorproduct.jsx +0 -42
- package/src/components/toolbar/popup/product/index.jsx +0 -36
- package/src/components/toolbar/popup/product/primary.jsx +0 -77
- package/src/components/toolbar/popup/product/productline.jsx +0 -93
- package/src/components/toolbar/popup/product/reviewItem.jsx +0 -427
- package/src/components/toolbar/popup/product/reviewMolding.jsx +0 -310
- package/src/components/toolbar/popup/product/style.css +0 -54
- package/src/components/toolbar/popup/product/styles.js +0 -260
- package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +0 -146
- package/src/components/toolbar/popup/savedesign/index.jsx +0 -495
- package/src/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
- package/src/components/toolbar/popup/savedesign/styles.js +0 -151
- package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +0 -87
- package/src/components/toolbar/popup/styles.js +0 -909
- package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +0 -192
- package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +0 -96
- package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +0 -54
- package/src/components/toolbar/popup/submitforquote/StepDots.jsx +0 -25
- package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +0 -116
- package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -38
- package/src/components/toolbar/popup/submitforquote/index.jsx +0 -698
- package/src/components/toolbar/popup/submitforquote/styles.css +0 -105
- package/src/components/toolbar/popup/submitforquote/styles.js +0 -294
- package/src/components/toolbar/popup/submitprompt/index.jsx +0 -89
- package/src/components/toolbar/popup/submitprompt/styles.css +0 -64
- package/src/components/toolbar/popup/submitprompt/styles.js +0 -42
- package/src/components/toolbar/toolbar-button.jsx +0 -90
- package/src/components/toolbar/toolbar-load-button.jsx +0 -36
- package/src/components/toolbar/toolbar-save-button.jsx +0 -32
- package/src/components/tutorial-view/Modal.jsx +0 -584
- package/src/components/tutorial-view/style.css +0 -111
- package/src/components/tutorial-view/styles.js +0 -65
- package/src/components/wizardstep/button/styles.js +0 -677
- package/src/components/wizardstep/export.js +0 -5
- package/src/components/wizardstep/index.jsx +0 -1372
- package/src/components/wizardstep/styles.js +0 -688
- package/src/components/wizardstep/wizardstep-content-button.jsx +0 -198
- package/src/components/wizardstep/wizardstep-toggle-button.jsx +0 -101
|
@@ -1,1517 +0,0 @@
|
|
|
1
|
-
import Dialog from '@material-ui/core/Dialog';
|
|
2
|
-
import axios from 'axios';
|
|
3
|
-
import convert from 'convert-units';
|
|
4
|
-
import { Plugins as PlannerPlugins } from './index';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import React, { Component } from 'react';
|
|
7
|
-
import ReactGA from 'react-ga4';
|
|
8
|
-
import { hotjar } from 'react-hotjar';
|
|
9
|
-
import { connect } from 'react-redux';
|
|
10
|
-
import { bindActionCreators } from 'redux';
|
|
11
|
-
import styled from 'styled-components';
|
|
12
|
-
import SnackBar from './components/atoms/Snackbar';
|
|
13
|
-
import * as constants from './constants';
|
|
14
|
-
import {
|
|
15
|
-
API_SERVER_URL,
|
|
16
|
-
BG_COLOR_HOVER,
|
|
17
|
-
CLIENTS_NAME,
|
|
18
|
-
DEFAULT_FONT_FAMILY,
|
|
19
|
-
LOCAL_STORAGE_CART_ACTION,
|
|
20
|
-
LOCAL_STORAGE_ORIGINAL_TOKEN,
|
|
21
|
-
LOCAL_STORAGE_TOKEN_NAME,
|
|
22
|
-
LOCAL_STORAGE_TOKEN_VALUE,
|
|
23
|
-
MODE,
|
|
24
|
-
PRIMARY_GREEN_COLOR,
|
|
25
|
-
SECONDARY_PURPLE_COLOR,
|
|
26
|
-
TEXT_COLOR_NEUTRAL_1
|
|
27
|
-
} from './constants';
|
|
28
|
-
import { base64Decode, getPath } from './utils/helper';
|
|
29
|
-
import { isEmpty } from './components/viewer2d/utils';
|
|
30
|
-
import actions from './actions/export';
|
|
31
|
-
import Catalog from './catalog/catalog';
|
|
32
|
-
import { Project } from './class/export';
|
|
33
|
-
import {
|
|
34
|
-
Content,
|
|
35
|
-
FooterBarComponents,
|
|
36
|
-
HeaderComponents,
|
|
37
|
-
MyProjectsComonents,
|
|
38
|
-
SignComponents,
|
|
39
|
-
ToolbarComponents,
|
|
40
|
-
WizardStepComponents
|
|
41
|
-
} from './components/export';
|
|
42
|
-
import jwtService from './components/login/jwtService';
|
|
43
|
-
import './styles/export';
|
|
44
|
-
import Translator from './translator/translator';
|
|
45
|
-
import { objectsMap } from './utils/objects-utils';
|
|
46
|
-
import { VERSION } from './version';
|
|
47
|
-
import ls from 'localstorage-slim';
|
|
48
|
-
|
|
49
|
-
const AWS = require('aws-sdk');
|
|
50
|
-
|
|
51
|
-
const StyledDialog = styled(Dialog)`
|
|
52
|
-
.MuiDialog-paperWidthSm {
|
|
53
|
-
border-radius: 10px;
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
export const StyledDialogContent = styled.span`
|
|
58
|
-
font-family: ${DEFAULT_FONT_FAMILY};
|
|
59
|
-
color: ${TEXT_COLOR_NEUTRAL_1};
|
|
60
|
-
padding: 10px 30px;
|
|
61
|
-
padding-top: 30px;
|
|
62
|
-
`;
|
|
63
|
-
|
|
64
|
-
export const StyledDialogAction = styled.div`
|
|
65
|
-
display: flex;
|
|
66
|
-
justify-content: flex-end;
|
|
67
|
-
padding: 15px 30px 25px;
|
|
68
|
-
`;
|
|
69
|
-
|
|
70
|
-
export const StyledButton = styled.div`
|
|
71
|
-
padding: 10px 20px;
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
margin-right: 10px;
|
|
74
|
-
color: ${SECONDARY_PURPLE_COLOR};
|
|
75
|
-
font-weight: bold;
|
|
76
|
-
font-family: ${DEFAULT_FONT_FAMILY};
|
|
77
|
-
font-size: 16px;
|
|
78
|
-
border-radius: 20px;
|
|
79
|
-
:hover {
|
|
80
|
-
background-color: ${BG_COLOR_HOVER};
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
83
|
-
|
|
84
|
-
const s3 = new AWS.S3({
|
|
85
|
-
accessKeyId: process.env.REACT_APP_AWS_ID,
|
|
86
|
-
secretAccessKey: process.env.REACT_APP_AWS_SECRET
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
const { Header } = HeaderComponents;
|
|
90
|
-
const { Toolbar } = ToolbarComponents;
|
|
91
|
-
const { FooterBar } = FooterBarComponents;
|
|
92
|
-
const { WizardStep } = WizardStepComponents;
|
|
93
|
-
const { Sign } = SignComponents;
|
|
94
|
-
const { MyProjects } = MyProjectsComonents;
|
|
95
|
-
|
|
96
|
-
const toolbarW = 0;
|
|
97
|
-
const sidebarW = 250;
|
|
98
|
-
const footerBarH = 20;
|
|
99
|
-
|
|
100
|
-
const wrapperStyle = {
|
|
101
|
-
display: 'flex',
|
|
102
|
-
flexFlow: 'row nowrap'
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const uploadFiles = (data, filePath) => {
|
|
106
|
-
var p1 = new Promise((resolve, reject) => {
|
|
107
|
-
const params = {
|
|
108
|
-
Bucket: process.env.REACT_APP_AWS_BUCKET_NAME,
|
|
109
|
-
Key: filePath,
|
|
110
|
-
Body: data,
|
|
111
|
-
ContentType: 'application/json',
|
|
112
|
-
ACL: 'public-read'
|
|
113
|
-
};
|
|
114
|
-
s3.putObject(params, function (err, data) {
|
|
115
|
-
if (err) {
|
|
116
|
-
reject(err);
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
console.log('success');
|
|
120
|
-
resolve([data.Location]);
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
return p1;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
let saveAlert = '';
|
|
127
|
-
let saveInterval = '';
|
|
128
|
-
|
|
129
|
-
class KitchenConfigurator extends Component {
|
|
130
|
-
constructor(props) {
|
|
131
|
-
super(props);
|
|
132
|
-
|
|
133
|
-
// utm tracking
|
|
134
|
-
const utmDetailParams = new URLSearchParams(
|
|
135
|
-
this.props.location && this.props.location.search
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
const utmStrEncoded = utmDetailParams.get('details');
|
|
139
|
-
let utmRequestData = null;
|
|
140
|
-
if (utmStrEncoded) {
|
|
141
|
-
try {
|
|
142
|
-
utmRequestData = JSON.parse(base64Decode(utmStrEncoded));
|
|
143
|
-
utmRequestData = JSON.parse(utmRequestData?.utm);
|
|
144
|
-
} catch (e) {
|
|
145
|
-
console.error('Cannot parse utm parameter: ', error);
|
|
146
|
-
utmRequestData = null;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
this.state = {
|
|
151
|
-
savePopupVisible: false,
|
|
152
|
-
quotePopupVisible: false,
|
|
153
|
-
assistPopupVisible: false,
|
|
154
|
-
newProjectPopupVisible: false,
|
|
155
|
-
isModalVisible: false,
|
|
156
|
-
submitPromptVisible: false,
|
|
157
|
-
stateSubmitType: constants.SUBMIT_REQUEST_ASSIST,
|
|
158
|
-
savePromptVisible: false,
|
|
159
|
-
isShowProperty: true,
|
|
160
|
-
submitTosave: false,
|
|
161
|
-
signOpen: false,
|
|
162
|
-
myProjectsOpen: false,
|
|
163
|
-
myProjectsToLogin: false,
|
|
164
|
-
downloadPopupVisible: false,
|
|
165
|
-
|
|
166
|
-
// For Toolbar Item
|
|
167
|
-
toolbar: '',
|
|
168
|
-
reviewQuotePopupOpened: false,
|
|
169
|
-
floorOpened: false,
|
|
170
|
-
cabinetOpened: false,
|
|
171
|
-
applianceOpened: false,
|
|
172
|
-
finishingOpened: false,
|
|
173
|
-
doorStyleOpen: false,
|
|
174
|
-
wizardStepOpend: false,
|
|
175
|
-
tutorialMouseEventsAdd: false,
|
|
176
|
-
replaceCabinetFlag: false,
|
|
177
|
-
isSnackBarOpen: false,
|
|
178
|
-
isSnackBar1Open: false,
|
|
179
|
-
redirectURL: '',
|
|
180
|
-
snackBarMessage: '',
|
|
181
|
-
isSaved: false,
|
|
182
|
-
isLeaving: false
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
// For UTM tracking
|
|
186
|
-
this.utm = {
|
|
187
|
-
utm_source: utmRequestData?.source || 'source',
|
|
188
|
-
utm_medium: utmRequestData?.medium || 'medium',
|
|
189
|
-
utm_campaign: utmRequestData?.campaign || 'campaign',
|
|
190
|
-
utm_term: utmRequestData?.term || 'term',
|
|
191
|
-
utm_content: utmRequestData?.content || 'content',
|
|
192
|
-
gclid: utmRequestData?.gclid || 'gclid',
|
|
193
|
-
msclkid: utmRequestData?.msclkid || 'msclkid',
|
|
194
|
-
fbclid: utmRequestData?.fbclid || 'fbclid',
|
|
195
|
-
ttclid: utmRequestData?.ttclid || 'ttclid'
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
this.jwtCheck();
|
|
199
|
-
|
|
200
|
-
this.openFloor = this.openFloor.bind(this);
|
|
201
|
-
this.openCabinet = this.openCabinet.bind(this);
|
|
202
|
-
this.openFinishing = this.openFinishing.bind(this);
|
|
203
|
-
this.openAppliance = this.openAppliance.bind(this);
|
|
204
|
-
this.toggleDoorStyle = this.toggleDoorStyle.bind(this);
|
|
205
|
-
this.onReviewQuoteClicked = this.onReviewQuoteClicked.bind(this);
|
|
206
|
-
this.closeFloorTB = this.closeFloorTB.bind(this);
|
|
207
|
-
this.closeCabinetTB = this.closeCabinetTB.bind(this);
|
|
208
|
-
this.closeFinishingTB = this.closeFinishingTB.bind(this);
|
|
209
|
-
this.closeApplianceTB = this.closeApplianceTB.bind(this);
|
|
210
|
-
this.setToolbar = this.setToolbar.bind(this);
|
|
211
|
-
this.replaceCabinet = this.replaceCabinet.bind(this);
|
|
212
|
-
this.setSubmitToSave = this.setSubmitToSave.bind(this);
|
|
213
|
-
this.setSignOpen = this.setSignOpen.bind(this);
|
|
214
|
-
this.setMyProjectsOpen = this.setMyProjectsOpen.bind(this);
|
|
215
|
-
this.setMyProjectsToLogin = this.setMyProjectsToLogin.bind(this);
|
|
216
|
-
this.setDownloadPopupVisible = this.setDownloadPopupVisible.bind(this);
|
|
217
|
-
this.neverShowInput = React.createRef(null);
|
|
218
|
-
this.setShowProperty = this.setShowProperty.bind(this);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// Toolbar control functions
|
|
222
|
-
|
|
223
|
-
setToolbar(toolBarKey) {
|
|
224
|
-
this.setState({ toolbar: toolBarKey });
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
setShowProperty(value) {
|
|
228
|
-
this.setState({ isShowProperty: value });
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
setMyProjectsOpen(value) {
|
|
232
|
-
this.setState({ myProjectsOpen: value });
|
|
233
|
-
this.setState({ signOpen: false });
|
|
234
|
-
this.setState({ wizardStepOpend: false });
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
setMyProjectsToLogin(value) {
|
|
238
|
-
this.setState({ myProjectsToLogin: value });
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
setDownloadPopupVisible(value) {
|
|
242
|
-
this.setState({ reviewQuotePopupOpened: false });
|
|
243
|
-
this.setState({ savePopupVisible: false });
|
|
244
|
-
this.setState({ quotePopupVisible: false });
|
|
245
|
-
this.setState({ submitTosave: false });
|
|
246
|
-
this.setState({ assistPopupVisible: false });
|
|
247
|
-
this.setState({ newProjectPopupVisible: false });
|
|
248
|
-
this.setState({ downloadPopupVisible: value });
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
setSubmitToSave(value) {
|
|
252
|
-
this.setState({ submitTosave: value });
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
setSignOpen(value) {
|
|
256
|
-
this.setState({ wizardStepOpend: false });
|
|
257
|
-
this.setState({ myProjectsOpen: false });
|
|
258
|
-
this.setState({ signOpen: value });
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
openFloor() {
|
|
262
|
-
this.setState({ floorOpened: true });
|
|
263
|
-
document.getElementById(
|
|
264
|
-
'make_floorplan_inactive'
|
|
265
|
-
).parentElement.parentElement.style.zIndex = 999;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
openCabinet() {
|
|
269
|
-
this.setState({ cabinetOpened: true });
|
|
270
|
-
document.getElementById(
|
|
271
|
-
'add_cabinets_inactive'
|
|
272
|
-
).parentElement.parentElement.style.zIndex = 999;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
toggleDoorStyle(visible) {
|
|
276
|
-
this.setState({ doorStyleOpen: visible });
|
|
277
|
-
document.getElementById(
|
|
278
|
-
'select_doorstyle_inactive'
|
|
279
|
-
).parentElement.parentElement.style.zIndex = visible ? 999 : 6;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
replaceCabinet(value) {
|
|
283
|
-
this.setState({ replaceCabinetFlag: value });
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
openAppliance() {
|
|
287
|
-
this.setState({ applianceOpened: true });
|
|
288
|
-
document.getElementById(
|
|
289
|
-
'add_appliances_inactive'
|
|
290
|
-
).parentElement.parentElement.style.zIndex = 999;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
openFinishing() {
|
|
294
|
-
this.setState({ finishingOpened: true });
|
|
295
|
-
document.getElementById(
|
|
296
|
-
'finishing_touches_inactive'
|
|
297
|
-
).parentElement.parentElement.style.zIndex = 999;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
onReviewQuoteClicked(visible) {
|
|
301
|
-
this.setState({ reviewQuotePopupOpened: visible });
|
|
302
|
-
document.getElementById(
|
|
303
|
-
'review_quote_inactive'
|
|
304
|
-
).parentElement.parentElement.style.zIndex = visible ? 999 : 6;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
closeFloorTB() {
|
|
308
|
-
this.setState({ floorOpened: false });
|
|
309
|
-
document.getElementById('make_floorplan_inactive') &&
|
|
310
|
-
(document.getElementById(
|
|
311
|
-
'make_floorplan_inactive'
|
|
312
|
-
).parentElement.parentElement.style.zIndex = 6);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
closeCabinetTB() {
|
|
316
|
-
this.setState({ cabinetOpened: false });
|
|
317
|
-
document.getElementById(
|
|
318
|
-
'add_cabinets_inactive'
|
|
319
|
-
).parentElement.parentElement.style.zIndex = 6;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
closeFinishingTB() {
|
|
323
|
-
this.setState({ finishingOpened: false });
|
|
324
|
-
document.getElementById(
|
|
325
|
-
'finishing_touches_inactive'
|
|
326
|
-
).parentElement.parentElement.style.zIndex = 6;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
closeApplianceTB() {
|
|
330
|
-
this.setState({ applianceOpened: false });
|
|
331
|
-
document.getElementById(
|
|
332
|
-
'add_appliances_inactive'
|
|
333
|
-
).parentElement.parentElement.style.zIndex = 6;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
closeDoorstyle() {
|
|
337
|
-
this.setState({});
|
|
338
|
-
document.getElementById(
|
|
339
|
-
'select_doorstyle_inactive'
|
|
340
|
-
).parentElement.parentElement.style.zIndex = 6;
|
|
341
|
-
}
|
|
342
|
-
closeReviewQuote() {
|
|
343
|
-
this.setState({});
|
|
344
|
-
document.getElementById(
|
|
345
|
-
'review_quote_inactive'
|
|
346
|
-
).parentElement.parentElement.style.zIndex = 6;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
jwtCheck() {
|
|
350
|
-
jwtService.on('onAutoLogin', () => {
|
|
351
|
-
// this.props.showMessage({message: 'Logging in with JWT'});
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* Sign in and retrieve user data from Api
|
|
355
|
-
*/
|
|
356
|
-
jwtService
|
|
357
|
-
.signInWithToken()
|
|
358
|
-
.then(user => {
|
|
359
|
-
//this.props.userActions.setUserData(user);
|
|
360
|
-
this.props.userActions.login(
|
|
361
|
-
user.id,
|
|
362
|
-
user.role,
|
|
363
|
-
jwtService.getAccessToken(),
|
|
364
|
-
this.utm
|
|
365
|
-
);
|
|
366
|
-
//this.props.showMessage(option)
|
|
367
|
-
//this.props.showMessage({message: 'Logged in with token data', variant: 'success'});
|
|
368
|
-
//alert('Logged in with token data');
|
|
369
|
-
})
|
|
370
|
-
.catch(error => {
|
|
371
|
-
//this.props.showMessage({message: error});
|
|
372
|
-
this.setState({
|
|
373
|
-
isSnackBarOpen: true,
|
|
374
|
-
snackBarMessage: error
|
|
375
|
-
});
|
|
376
|
-
});
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
jwtService.on('onAutoLogout', message => {
|
|
380
|
-
if (message) {
|
|
381
|
-
//this.props.showMessage({message, variant: 'error'});
|
|
382
|
-
}
|
|
383
|
-
this.props.userActions.logout();
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
jwtService.init();
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
getChildContext() {
|
|
390
|
-
return {
|
|
391
|
-
...objectsMap(actions, actionNamespace => this.props[actionNamespace]),
|
|
392
|
-
translator: this.props.translator,
|
|
393
|
-
catalog: this.props.catalog
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
saveProjectToStorage() {
|
|
398
|
-
let { state, stateExtractor } = this.props;
|
|
399
|
-
const extractedState = stateExtractor(state);
|
|
400
|
-
const projectData = JSON.stringify(extractedState.get('scene').toJS());
|
|
401
|
-
sessionStorage.setItem(window.location.href, projectData);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
// debouncedSetIsSaved = _.debounce(
|
|
405
|
-
// () => this.setState({ isSaved: false }),
|
|
406
|
-
// 200
|
|
407
|
-
// );
|
|
408
|
-
//
|
|
409
|
-
// componentDidUpdate(prevProps) {
|
|
410
|
-
// // Only strip properties if the object is not null/undefined
|
|
411
|
-
// function stripProperty(obj, properties) {
|
|
412
|
-
// if (!obj) return obj;
|
|
413
|
-
// let changed = false;
|
|
414
|
-
// const newObj = { ...obj };
|
|
415
|
-
// for (const prop of properties) {
|
|
416
|
-
// if (prop in newObj) {
|
|
417
|
-
// delete newObj[prop];
|
|
418
|
-
// changed = true;
|
|
419
|
-
// }
|
|
420
|
-
// }
|
|
421
|
-
// return changed ? newObj : obj;
|
|
422
|
-
// }
|
|
423
|
-
//
|
|
424
|
-
// const prevState = this.props.stateExtractor(prevProps.state);
|
|
425
|
-
// const currState = this.props.stateExtractor(this.props.state);
|
|
426
|
-
//
|
|
427
|
-
// // Only convert to JS once per items/areas/lines
|
|
428
|
-
// const prevLayer = prevState.scene.selectedLayer;
|
|
429
|
-
// const currLayer = currState.scene.selectedLayer;
|
|
430
|
-
//
|
|
431
|
-
// const prevItems = prevState
|
|
432
|
-
// .getIn(['scene', 'layers', prevLayer, 'items'])
|
|
433
|
-
// .toJS();
|
|
434
|
-
// const currItems = currState
|
|
435
|
-
// .getIn(['scene', 'layers', currLayer, 'items'])
|
|
436
|
-
// .toJS();
|
|
437
|
-
//
|
|
438
|
-
// const prevItemsProps = Object.values(prevItems).map(
|
|
439
|
-
// ({ x, y, rotation }) => ({ x, y, rotation })
|
|
440
|
-
// );
|
|
441
|
-
// const currItemsProps = Object.values(currItems).map(
|
|
442
|
-
// ({ x, y, rotation }) => ({ x, y, rotation })
|
|
443
|
-
// );
|
|
444
|
-
//
|
|
445
|
-
// const prevDoorStyleRaw = prevState.getIn([
|
|
446
|
-
// 'scene',
|
|
447
|
-
// 'layers',
|
|
448
|
-
// prevLayer,
|
|
449
|
-
// 'doorStyle'
|
|
450
|
-
// ]);
|
|
451
|
-
// const currDoorStyleRaw = currState.getIn([
|
|
452
|
-
// 'scene',
|
|
453
|
-
// 'layers',
|
|
454
|
-
// currLayer,
|
|
455
|
-
// 'doorStyle'
|
|
456
|
-
// ]);
|
|
457
|
-
// const prevDoorStyle = stripProperty(prevDoorStyleRaw, ['doorStyles']);
|
|
458
|
-
// const currDoorStyle = stripProperty(currDoorStyleRaw, ['doorStyles']);
|
|
459
|
-
//
|
|
460
|
-
// const prevAreasRaw = prevState
|
|
461
|
-
// .getIn(['scene', 'layers', prevLayer, 'areas'])
|
|
462
|
-
// .toJS();
|
|
463
|
-
// const currAreasRaw = currState
|
|
464
|
-
// .getIn(['scene', 'layers', currLayer, 'areas'])
|
|
465
|
-
// .toJS();
|
|
466
|
-
// const prevAreas = stripProperty(Object.values(prevAreasRaw)[0], [
|
|
467
|
-
// 'selected'
|
|
468
|
-
// ]);
|
|
469
|
-
// const currAreas = stripProperty(Object.values(currAreasRaw)[0], [
|
|
470
|
-
// 'selected'
|
|
471
|
-
// ]);
|
|
472
|
-
//
|
|
473
|
-
// const prevLinesRaw = prevState
|
|
474
|
-
// .getIn(['scene', 'layers', prevLayer, 'lines'])
|
|
475
|
-
// .toJS();
|
|
476
|
-
// const currLinesRaw = currState
|
|
477
|
-
// .getIn(['scene', 'layers', currLayer, 'lines'])
|
|
478
|
-
// .toJS();
|
|
479
|
-
// const prevLines = stripProperty(Object.values(prevLinesRaw)[0], [
|
|
480
|
-
// 'selected'
|
|
481
|
-
// ]);
|
|
482
|
-
// const currLines = stripProperty(Object.values(currLinesRaw)[0], [
|
|
483
|
-
// 'selected'
|
|
484
|
-
// ]);
|
|
485
|
-
//
|
|
486
|
-
// const prevCeilingHeight = prevState.getIn([
|
|
487
|
-
// 'scene',
|
|
488
|
-
// 'layers',
|
|
489
|
-
// prevLayer,
|
|
490
|
-
// 'ceilHeight'
|
|
491
|
-
// ]);
|
|
492
|
-
// const currCeilingHeight = currState.getIn([
|
|
493
|
-
// 'scene',
|
|
494
|
-
// 'layers',
|
|
495
|
-
// currLayer,
|
|
496
|
-
// 'ceilHeight'
|
|
497
|
-
// ]);
|
|
498
|
-
//
|
|
499
|
-
// let changed =
|
|
500
|
-
// !_.isEqual(prevItemsProps, currItemsProps) ||
|
|
501
|
-
// !_.isEqual(prevDoorStyle, currDoorStyle) ||
|
|
502
|
-
// !_.isEqual(prevAreas, currAreas) ||
|
|
503
|
-
// !_.isEqual(prevLines, currLines) ||
|
|
504
|
-
// prevCeilingHeight !== currCeilingHeight;
|
|
505
|
-
//
|
|
506
|
-
// if (changed) {
|
|
507
|
-
// this.debouncedSetIsSaved();
|
|
508
|
-
//
|
|
509
|
-
// const currentItemsLength = Object.keys(currItems).length;
|
|
510
|
-
// const prevItemsLength = Object.keys(prevItems).length;
|
|
511
|
-
// // make sure prompt appears only when adding cabinets
|
|
512
|
-
// const allowedItemLengths = [5, 10, 15];
|
|
513
|
-
//
|
|
514
|
-
// if (
|
|
515
|
-
// allowedItemLengths.includes(currentItemsLength) &&
|
|
516
|
-
// prevItemsLength === currentItemsLength - 1 &&
|
|
517
|
-
// !this.props.match.params.token
|
|
518
|
-
// ) {
|
|
519
|
-
// this.setState({ savePromptVisible: true });
|
|
520
|
-
// }
|
|
521
|
-
// }
|
|
522
|
-
// }
|
|
523
|
-
|
|
524
|
-
handleBeforeUnload = e => {
|
|
525
|
-
const areas = this.props
|
|
526
|
-
.stateExtractor(this.props.state)
|
|
527
|
-
.getIn([
|
|
528
|
-
'scene',
|
|
529
|
-
'layers',
|
|
530
|
-
this.props.stateExtractor(this.props.state).scene.selectedLayer,
|
|
531
|
-
'areas'
|
|
532
|
-
]);
|
|
533
|
-
|
|
534
|
-
if (!this.state.isSaved && areas.size > 0) {
|
|
535
|
-
setTimeout(() => {
|
|
536
|
-
this.setState({ savePromptVisible: true, isLeaving: true });
|
|
537
|
-
}, 500);
|
|
538
|
-
|
|
539
|
-
this.saveProjectToStorage();
|
|
540
|
-
|
|
541
|
-
// This line is required to trigger the browser confirmation dialog
|
|
542
|
-
e.preventDefault();
|
|
543
|
-
e.returnValue = '';
|
|
544
|
-
return '';
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
|
|
548
|
-
componentDidMount() {
|
|
549
|
-
ReactGA.send({ hitType: 'pageview', page: getPath() });
|
|
550
|
-
hotjar.event && hotjar.event(`pageview:${getPath()}`);
|
|
551
|
-
|
|
552
|
-
window.addEventListener('beforeunload', this.handleBeforeUnload);
|
|
553
|
-
|
|
554
|
-
console.log('context =>', this.context);
|
|
555
|
-
|
|
556
|
-
window.forRedo = [];
|
|
557
|
-
let { store } = this.context;
|
|
558
|
-
let { projectActions, catalog, stateExtractor, state, plugins } =
|
|
559
|
-
this.props;
|
|
560
|
-
|
|
561
|
-
projectActions.initCatalog(catalog);
|
|
562
|
-
|
|
563
|
-
let { match } = this.props;
|
|
564
|
-
|
|
565
|
-
if (sessionStorage.getItem(window.location.href)) {
|
|
566
|
-
const jsonData = sessionStorage.getItem(window.location.href);
|
|
567
|
-
projectActions.loadProject(JSON.parse(jsonData), this.props.categoryData);
|
|
568
|
-
sessionStorage.removeItem(window.location.href);
|
|
569
|
-
return;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
if (match && match.params.pid === undefined) {
|
|
573
|
-
let newplugins = [
|
|
574
|
-
...plugins,
|
|
575
|
-
PlannerPlugins.Autosave('KitchenConfigurator_v0', false)
|
|
576
|
-
];
|
|
577
|
-
newplugins.forEach(newplugin => newplugin(store, stateExtractor));
|
|
578
|
-
projectActions.newProject();
|
|
579
|
-
sessionStorage.setItem('projectTitle', 'Untitled');
|
|
580
|
-
projectActions.rename('Untitled');
|
|
581
|
-
sessionStorage.removeItem('projectId');
|
|
582
|
-
sessionStorage.removeItem('email');
|
|
583
|
-
sessionStorage.removeItem('firstName');
|
|
584
|
-
sessionStorage.removeItem('lastName');
|
|
585
|
-
sessionStorage.removeItem('usedObjects');
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
if (match && match.params.pid !== undefined) {
|
|
590
|
-
if (match.params.pid === 'new') {
|
|
591
|
-
projectActions.newProject();
|
|
592
|
-
sessionStorage.setItem('projectTitle', 'Untitled');
|
|
593
|
-
projectActions.rename('Untitled');
|
|
594
|
-
sessionStorage.removeItem('projectId');
|
|
595
|
-
sessionStorage.removeItem('email');
|
|
596
|
-
sessionStorage.removeItem('firstName');
|
|
597
|
-
sessionStorage.removeItem('lastName');
|
|
598
|
-
sessionStorage.removeItem('usedObjects');
|
|
599
|
-
} else {
|
|
600
|
-
axios
|
|
601
|
-
.post(`${constants.API_SERVER_URL}/api/project/loadPidProject`, {
|
|
602
|
-
pid: match.params.pid,
|
|
603
|
-
visualizerName: sessionStorage.getItem('visualizerName')
|
|
604
|
-
})
|
|
605
|
-
.then(async response => {
|
|
606
|
-
const { projectElement } = response.data;
|
|
607
|
-
if (projectElement.length === 0) return;
|
|
608
|
-
sessionStorage.setItem('projectTitle', projectElement[0].title);
|
|
609
|
-
projectActions.rename(projectElement[0].title);
|
|
610
|
-
sessionStorage.setItem('projectId', projectElement[0].id);
|
|
611
|
-
sessionStorage.setItem('email', projectElement[0].email);
|
|
612
|
-
sessionStorage.setItem('firstName', projectElement[0].firstName);
|
|
613
|
-
sessionStorage.setItem('lastName', projectElement[0].lastName);
|
|
614
|
-
sessionStorage.setItem('phone', projectElement[0].phone);
|
|
615
|
-
let jsonData;
|
|
616
|
-
if (projectElement[0].project_data) {
|
|
617
|
-
jsonData = JSON.parse(projectElement[0].project_data);
|
|
618
|
-
} else {
|
|
619
|
-
try {
|
|
620
|
-
jsonData = await axios.post(
|
|
621
|
-
`${constants.API_SERVER_URL}/api/project/loadPidData`,
|
|
622
|
-
{ pid: match.params.pid }
|
|
623
|
-
).data.data;
|
|
624
|
-
} catch (err) {
|
|
625
|
-
this.setState({
|
|
626
|
-
isSnackBarOpen: true,
|
|
627
|
-
snackBarMessage: err
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
jsonData.isLoadingCabinet = false;
|
|
632
|
-
projectActions.loadProject(jsonData, this.props.categoryData);
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
sessionStorage.removeItem('user_type');
|
|
637
|
-
sessionStorage.removeItem('project_type');
|
|
638
|
-
sessionStorage.removeItem('project_timeline');
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
componentWillUnmount() {
|
|
643
|
-
window.addEventListener('beforeunload', this.handleBeforeUnload);
|
|
644
|
-
window.onbeforeunload = null;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
componentWillMount() {}
|
|
648
|
-
|
|
649
|
-
componentWillReceiveProps(nextProps) {
|
|
650
|
-
let { stateExtractor, state, projectActions, catalog } = nextProps;
|
|
651
|
-
let plannerState = stateExtractor(state);
|
|
652
|
-
let catalogReady = plannerState.getIn(['catalog', 'ready']);
|
|
653
|
-
if (!catalogReady) {
|
|
654
|
-
projectActions.initCatalog(catalog);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
isProjectEmpty(scene) {
|
|
659
|
-
let { layers, selectedLayer } = scene;
|
|
660
|
-
let layer = layers.get(selectedLayer);
|
|
661
|
-
return (
|
|
662
|
-
layer.areas.size +
|
|
663
|
-
layer.lines.size +
|
|
664
|
-
layer.holes.size +
|
|
665
|
-
layer.items.size ===
|
|
666
|
-
0
|
|
667
|
-
);
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
handleSaveDesign(value) {
|
|
671
|
-
let { stateExtractor, state } = this.props;
|
|
672
|
-
let plannerState = stateExtractor(state);
|
|
673
|
-
let items = plannerState.getIn(['scene', 'layers', 'layer-1', 'items']);
|
|
674
|
-
let areas = plannerState.getIn(['scene', 'layers', 'layer-1', 'areas']);
|
|
675
|
-
if (areas.size === 0) {
|
|
676
|
-
this.setState({
|
|
677
|
-
isSnackBarOpen: true,
|
|
678
|
-
snackBarMessage: 'Your project is empty.'
|
|
679
|
-
});
|
|
680
|
-
return;
|
|
681
|
-
}
|
|
682
|
-
// if (items.size === 0) {
|
|
683
|
-
// saveAlert = <StyledAlert text={<span style={{fontSize: 16, fontFamily: DEFAULT_FONT_FAMILY}}>Add at least one item</span>} onClose={() => saveAlert = ""} />
|
|
684
|
-
// return;
|
|
685
|
-
// } else saveAlert = '';
|
|
686
|
-
this.setState({ reviewQuotePopupOpened: false });
|
|
687
|
-
this.setState({ savePopupVisible: value });
|
|
688
|
-
this.setState({ assistPopupVisible: false });
|
|
689
|
-
this.setState({ newProjectPopupVisible: false });
|
|
690
|
-
this.setState({ savePromptVisible: false });
|
|
691
|
-
this.setState({ submitPromptVisible: false });
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
handleNewProject(value) {
|
|
695
|
-
this.setState({ reviewQuotePopupOpened: false });
|
|
696
|
-
this.setState({ savePopupVisible: false });
|
|
697
|
-
this.setState({ quotePopupVisible: false });
|
|
698
|
-
this.setState({ assistPopupVisible: false });
|
|
699
|
-
this.setState({ newProjectPopupVisible: value });
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
handleSubmitForQuote(
|
|
703
|
-
isVisible,
|
|
704
|
-
submitType = constants.SUBMIT_REQUEST_ASSIST
|
|
705
|
-
) {
|
|
706
|
-
const items = this.props
|
|
707
|
-
.stateExtractor(this.props.state)
|
|
708
|
-
.getIn([
|
|
709
|
-
'scene',
|
|
710
|
-
'layers',
|
|
711
|
-
this.props.stateExtractor(this.props.state).scene.selectedLayer,
|
|
712
|
-
'items'
|
|
713
|
-
]);
|
|
714
|
-
|
|
715
|
-
if (submitType === constants.SUBMIT_ADD_CART) {
|
|
716
|
-
this.setToolbar('reviewforquote');
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
if (submitType === constants.SUBMIT_ADD_CART && !items.size) {
|
|
720
|
-
this.setState({
|
|
721
|
-
isSnackBarOpen: true,
|
|
722
|
-
snackBarMessage: 'Your project is empty. Please add at least one item.'
|
|
723
|
-
});
|
|
724
|
-
} else {
|
|
725
|
-
this.setState({ reviewQuotePopupOpened: false });
|
|
726
|
-
this.setState({ savePopupVisible: false });
|
|
727
|
-
this.setState({ quotePopupVisible: isVisible });
|
|
728
|
-
this.setState({ submitTosave: false });
|
|
729
|
-
this.setState({ assistPopupVisible: false });
|
|
730
|
-
this.setState({ newProjectPopupVisible: false });
|
|
731
|
-
this.setState({ stateSubmitType: submitType });
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
saveScreenshotToFile = event => {
|
|
736
|
-
event.preventDefault();
|
|
737
|
-
let canvas = document.getElementsByID('viewer3D')[1];
|
|
738
|
-
let canvas_crop_image = document.getElementById('canvas_crop_image');
|
|
739
|
-
let ctx = canvas_crop_image.getContext('2d');
|
|
740
|
-
|
|
741
|
-
// Set width and height for the new canvas
|
|
742
|
-
let heightAtt = document.createAttribute('height');
|
|
743
|
-
heightAtt.value = canvas.height;
|
|
744
|
-
canvas_crop_image.setAttributeNode(heightAtt);
|
|
745
|
-
|
|
746
|
-
let widthAtt = document.createAttribute('width');
|
|
747
|
-
widthAtt.value = canvas.width;
|
|
748
|
-
canvas_crop_image.setAttributeNode(widthAtt);
|
|
749
|
-
|
|
750
|
-
ctx.fillStyle = 'white';
|
|
751
|
-
ctx.fillRect(0, 0, canvas_crop_image.width, canvas_crop_image.height);
|
|
752
|
-
|
|
753
|
-
let img = new Image();
|
|
754
|
-
img.crossOrigin = 'anonymous';
|
|
755
|
-
img.src = canvas.toDataURL();
|
|
756
|
-
|
|
757
|
-
img.onload = () => {
|
|
758
|
-
ctx.globalAlpha = 0.3;
|
|
759
|
-
ctx.drawImage(
|
|
760
|
-
img,
|
|
761
|
-
0,
|
|
762
|
-
0,
|
|
763
|
-
canvas_crop_image.width,
|
|
764
|
-
canvas_crop_image.height
|
|
765
|
-
);
|
|
766
|
-
this.setState({
|
|
767
|
-
isModalVisible: true,
|
|
768
|
-
imageUri: canvas.toDataURL(),
|
|
769
|
-
image: img
|
|
770
|
-
});
|
|
771
|
-
canvas_crop_image.style.zIndex = 11;
|
|
772
|
-
document.addEventListener('keydown', this.onKeyDown, false);
|
|
773
|
-
document.addEventListener(
|
|
774
|
-
'mouseup',
|
|
775
|
-
this.onMouseUp_On_New_Save_SQ_DA,
|
|
776
|
-
false
|
|
777
|
-
);
|
|
778
|
-
canvas_crop_image.style.display = 'block';
|
|
779
|
-
};
|
|
780
|
-
};
|
|
781
|
-
|
|
782
|
-
findDelkeys(obj, deleteKeys, path) {
|
|
783
|
-
if (typeof obj === 'object') {
|
|
784
|
-
let allkeys = Object.keys(obj);
|
|
785
|
-
for (let i = 0; i < allkeys.length; i++) {
|
|
786
|
-
const value = obj[allkeys[i]];
|
|
787
|
-
if (isEmpty(value)) {
|
|
788
|
-
deleteKeys.push({
|
|
789
|
-
path: path,
|
|
790
|
-
key: allkeys[i]
|
|
791
|
-
});
|
|
792
|
-
} else if (typeof value === 'object') {
|
|
793
|
-
let newPath = path + allkeys[i] + ',';
|
|
794
|
-
this.findDelkeys(value, deleteKeys, newPath);
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
} else if (isEmpty(obj)) {
|
|
798
|
-
let tmpkey = path.split(',');
|
|
799
|
-
deleteKeys.push({
|
|
800
|
-
path: path,
|
|
801
|
-
key: tmpkey[tmpkey.length - 1]
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
render() {
|
|
807
|
-
let { width, height, state, stateExtractor, ...props } = this.props;
|
|
808
|
-
let {
|
|
809
|
-
savePopupVisible,
|
|
810
|
-
quotePopupVisible,
|
|
811
|
-
assistPopupVisible,
|
|
812
|
-
newProjectPopupVisible,
|
|
813
|
-
savePromptVisible,
|
|
814
|
-
isLeaving,
|
|
815
|
-
submitPromptVisible,
|
|
816
|
-
stateSubmitType,
|
|
817
|
-
submitTosave,
|
|
818
|
-
signOpen,
|
|
819
|
-
myProjectsOpen,
|
|
820
|
-
myProjectsToLogin,
|
|
821
|
-
downloadPopupVisible
|
|
822
|
-
} = this.state;
|
|
823
|
-
let contentW = width - toolbarW;
|
|
824
|
-
let categoryData = this.props.categoryData;
|
|
825
|
-
// console.log(categoryData);
|
|
826
|
-
// let contentW = width - toolbarW - sidebarW;
|
|
827
|
-
// let toolbarH = height - footerBarH;
|
|
828
|
-
// let contentH = height - footerBarH;
|
|
829
|
-
// let sidebarH = height - footerBarH;
|
|
830
|
-
let toolbarH = height;
|
|
831
|
-
let contentH = height;
|
|
832
|
-
let sidebarH = height;
|
|
833
|
-
let headerW = width;
|
|
834
|
-
let headerH = 60;
|
|
835
|
-
|
|
836
|
-
// const userInfo = this.props.match ? this.props.match.params : [];
|
|
837
|
-
const userInfo = [];
|
|
838
|
-
|
|
839
|
-
let extractedState = stateExtractor(state);
|
|
840
|
-
let doorStyle = extractedState.get('doorStyle');
|
|
841
|
-
if (
|
|
842
|
-
extractedState.getIn([
|
|
843
|
-
'scene',
|
|
844
|
-
'layers',
|
|
845
|
-
extractedState.scene.selectedLayer,
|
|
846
|
-
'doorStyle'
|
|
847
|
-
]) !== undefined &&
|
|
848
|
-
extractedState.getIn([
|
|
849
|
-
'scene',
|
|
850
|
-
'layers',
|
|
851
|
-
extractedState.scene.selectedLayer,
|
|
852
|
-
'doorStyle'
|
|
853
|
-
]) !== null
|
|
854
|
-
) {
|
|
855
|
-
const extractedStateData = extractedState.getIn([
|
|
856
|
-
'scene',
|
|
857
|
-
'layers',
|
|
858
|
-
extractedState.scene.selectedLayer,
|
|
859
|
-
'doorStyle'
|
|
860
|
-
]);
|
|
861
|
-
let doorIdAvailable = false;
|
|
862
|
-
if (
|
|
863
|
-
this.props.categoryData.doorStyles &&
|
|
864
|
-
this.props.categoryData.doorStyles.items
|
|
865
|
-
) {
|
|
866
|
-
this.props.categoryData.doorStyles.items.find(category => {
|
|
867
|
-
doorIdAvailable = category.items.find(style => {
|
|
868
|
-
let item = style.items.find(it => it.id === extractedStateData.id);
|
|
869
|
-
if (item) {
|
|
870
|
-
colorItem = item;
|
|
871
|
-
return true;
|
|
872
|
-
} else {
|
|
873
|
-
return false;
|
|
874
|
-
}
|
|
875
|
-
});
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
if (doorIdAvailable) doorStyle = extractedStateData;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
let firstVisit =
|
|
883
|
-
this.state.wizardStepOpend && this.isProjectEmpty(extractedState.scene);
|
|
884
|
-
let allVisible = firstVisit || signOpen || myProjectsOpen;
|
|
885
|
-
|
|
886
|
-
let _scene = extractedState.getIn(['scene']);
|
|
887
|
-
let len = convert(_scene.width).from(_scene.unit).to('cm');
|
|
888
|
-
let _viewer2D = extractedState.getIn(['viewer2D']);
|
|
889
|
-
if (_viewer2D.size > 0) {
|
|
890
|
-
let scaleX = (width / len) * 3;
|
|
891
|
-
let scaleY = (height / len) * 3;
|
|
892
|
-
let scale = scaleX > scaleY ? scaleY : scaleX;
|
|
893
|
-
let _e = width - len * scale,
|
|
894
|
-
_f = height - len * scale;
|
|
895
|
-
let viewer = _viewer2D.toJS();
|
|
896
|
-
if (viewer.e === 0 && viewer.f === 0) {
|
|
897
|
-
_viewer2D = _viewer2D.merge({
|
|
898
|
-
e: viewer.viewerWidth / 2 - viewer.SVGWidth / 2,
|
|
899
|
-
f: viewer.viewerHeight / 2 - viewer.SVGHeight / 2,
|
|
900
|
-
a: 0.99,
|
|
901
|
-
d: 0.99
|
|
902
|
-
});
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
extractedState = extractedState.merge({
|
|
906
|
-
viewer2D: _viewer2D
|
|
907
|
-
});
|
|
908
|
-
|
|
909
|
-
var history = this.props.history;
|
|
910
|
-
|
|
911
|
-
let handleContinueQuote = () => {
|
|
912
|
-
this.setToolbar('reviewforquote');
|
|
913
|
-
this.setState({ savePopupVisible: false, quotePopupVisible: true });
|
|
914
|
-
};
|
|
915
|
-
|
|
916
|
-
let newProject = () => {
|
|
917
|
-
this.props.projectActions.newProject();
|
|
918
|
-
sessionStorage.setItem('projectTitle', 'Untitled');
|
|
919
|
-
this.props.projectActions.rename('Untitled');
|
|
920
|
-
sessionStorage.removeItem('projectId');
|
|
921
|
-
sessionStorage.removeItem('usedObjects');
|
|
922
|
-
const visualizerName = sessionStorage.getItem('visualizerName');
|
|
923
|
-
const originalAccessToken = ls.get(LOCAL_STORAGE_ORIGINAL_TOKEN);
|
|
924
|
-
const tokenName = ls.get(LOCAL_STORAGE_TOKEN_NAME);
|
|
925
|
-
|
|
926
|
-
let pathname = `/${visualizerName}`;
|
|
927
|
-
if (tokenName && originalAccessToken) {
|
|
928
|
-
pathname += `?${tokenName}${originalAccessToken}`;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
history.push({ pathname });
|
|
932
|
-
this.setState({ wizardStepOpend: false });
|
|
933
|
-
};
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* @description Save Projects
|
|
937
|
-
* @param {{email,firstName,lastName,notes,projectName}} param Project information to save
|
|
938
|
-
*/
|
|
939
|
-
let saveProject = async param => {
|
|
940
|
-
let rlt = { success: false };
|
|
941
|
-
|
|
942
|
-
// Get storage info
|
|
943
|
-
let title = sessionStorage.getItem('projectTitle');
|
|
944
|
-
let projectId = sessionStorage.getItem('projectId');
|
|
945
|
-
|
|
946
|
-
let projectTitle =
|
|
947
|
-
(param && param.projectName) ||
|
|
948
|
-
title ||
|
|
949
|
-
`Project-${new Date().toLocaleString()}`;
|
|
950
|
-
let utm = this.utm;
|
|
951
|
-
|
|
952
|
-
// State
|
|
953
|
-
let state = Project.unselectAll(extractedState).updatedState;
|
|
954
|
-
let { scene } = state;
|
|
955
|
-
state = state.merge({ scene: scene.merge({ title: projectTitle }) });
|
|
956
|
-
|
|
957
|
-
// Set storage info
|
|
958
|
-
sessionStorage.setItem('projectTitle', projectTitle);
|
|
959
|
-
props.projectActions.rename(projectTitle);
|
|
960
|
-
|
|
961
|
-
// Filter cds
|
|
962
|
-
const itemData = state
|
|
963
|
-
.getIn([
|
|
964
|
-
'scene',
|
|
965
|
-
'layers',
|
|
966
|
-
state.get('scene').toJS().selectedLayer,
|
|
967
|
-
'items'
|
|
968
|
-
])
|
|
969
|
-
.toArray();
|
|
970
|
-
|
|
971
|
-
itemData.forEach(it => {
|
|
972
|
-
const item = it.toJS();
|
|
973
|
-
const doorStyles = item?.doorStyle?.doorStyles;
|
|
974
|
-
|
|
975
|
-
// Skip if no doorStyles data at all
|
|
976
|
-
if (!doorStyles) return;
|
|
977
|
-
|
|
978
|
-
const newCDSdata = Array.isArray(doorStyles.cds)
|
|
979
|
-
? doorStyles.cds.filter(
|
|
980
|
-
it1 =>
|
|
981
|
-
it1.cabinet_door_style_id === doorStyles.cabinet_door_style_id
|
|
982
|
-
)
|
|
983
|
-
: [];
|
|
984
|
-
|
|
985
|
-
const layerId = state.get('scene').toJS().selectedLayer;
|
|
986
|
-
const basePath = [
|
|
987
|
-
'scene',
|
|
988
|
-
'layers',
|
|
989
|
-
layerId,
|
|
990
|
-
'items',
|
|
991
|
-
it.id,
|
|
992
|
-
'doorStyle',
|
|
993
|
-
'doorStyles'
|
|
994
|
-
];
|
|
995
|
-
|
|
996
|
-
if (state.hasIn(basePath)) {
|
|
997
|
-
state = state.setIn([...basePath, 'cds'], newCDSdata);
|
|
998
|
-
}
|
|
999
|
-
});
|
|
1000
|
-
|
|
1001
|
-
// Delete null values
|
|
1002
|
-
|
|
1003
|
-
let newScene = state.getIn(['scene']);
|
|
1004
|
-
let deleteKeys = [];
|
|
1005
|
-
this.findDelkeys(newScene.toJS(), deleteKeys, '');
|
|
1006
|
-
for (let i = 0; i < deleteKeys.length; i++) {
|
|
1007
|
-
let tmp = newScene.toJS();
|
|
1008
|
-
let deletePath = deleteKeys[i].path.split(',');
|
|
1009
|
-
for (let j = 0; j < deletePath.length; j++) {
|
|
1010
|
-
if (!isEmpty(deletePath[j])) {
|
|
1011
|
-
tmp = tmp[deletePath[j]];
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
if (deletePath.length >= 2) {
|
|
1015
|
-
delete tmp[deleteKeys[i].key];
|
|
1016
|
-
deletePath.pop();
|
|
1017
|
-
if (!isEmpty(newScene.getIn(deletePath)))
|
|
1018
|
-
newScene = newScene.setIn(deletePath, tmp);
|
|
1019
|
-
} else {
|
|
1020
|
-
newScene = newScene.delete(deleteKeys[i].key);
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
state = state.setIn(['scene'], newScene);
|
|
1025
|
-
|
|
1026
|
-
// Data to save
|
|
1027
|
-
const projectData = JSON.stringify(state.get('scene').toJS());
|
|
1028
|
-
|
|
1029
|
-
const object_count = Object.keys(
|
|
1030
|
-
state?.scene?.layers?.get(state?.scene?.selectedLayer)?.items || {}
|
|
1031
|
-
).length;
|
|
1032
|
-
|
|
1033
|
-
try {
|
|
1034
|
-
const originalAccessToken = ls.get(LOCAL_STORAGE_ORIGINAL_TOKEN);
|
|
1035
|
-
const tokenName = ls.get(LOCAL_STORAGE_TOKEN_NAME);
|
|
1036
|
-
|
|
1037
|
-
const response = await axios.post('/api/project/saveProject', {
|
|
1038
|
-
pid: projectId,
|
|
1039
|
-
title: projectTitle,
|
|
1040
|
-
mode: MODE,
|
|
1041
|
-
access_token: userInfo.token ? userInfo.token : null,
|
|
1042
|
-
userrole: userInfo.role ? userInfo.role : null,
|
|
1043
|
-
saveData: { ...param, ...utm, projectData, object_count },
|
|
1044
|
-
url: window.location.hostname,
|
|
1045
|
-
visualizerName: sessionStorage.getItem('visualizerName'),
|
|
1046
|
-
...(originalAccessToken
|
|
1047
|
-
? { original_token: originalAccessToken }
|
|
1048
|
-
: undefined),
|
|
1049
|
-
...(tokenName ? { query_params_token_prefix: tokenName } : undefined)
|
|
1050
|
-
});
|
|
1051
|
-
|
|
1052
|
-
const { success, message, userData, access_token } = response.data;
|
|
1053
|
-
if (success === true) {
|
|
1054
|
-
rlt.success = true;
|
|
1055
|
-
|
|
1056
|
-
const { insertId } = response.data.execResult;
|
|
1057
|
-
const currentProjectID =
|
|
1058
|
-
insertId !== 0
|
|
1059
|
-
? insertId
|
|
1060
|
-
: state.getIn(['scene', 'currentProjectID']);
|
|
1061
|
-
|
|
1062
|
-
// Set storage data
|
|
1063
|
-
sessionStorage.setItem('projectId', currentProjectID);
|
|
1064
|
-
sessionStorage.setItem('email', param.email);
|
|
1065
|
-
sessionStorage.setItem('phone', param.phone);
|
|
1066
|
-
sessionStorage.setItem('firstName', param.firstName);
|
|
1067
|
-
sessionStorage.setItem('lastName', param.lastName);
|
|
1068
|
-
props.projectActions.setProjectID({ currentProjectID });
|
|
1069
|
-
actions.userActions.login(
|
|
1070
|
-
userData[0].id,
|
|
1071
|
-
userData[0].role,
|
|
1072
|
-
access_token,
|
|
1073
|
-
utm
|
|
1074
|
-
);
|
|
1075
|
-
this.setState({
|
|
1076
|
-
toolbar: this.state.toolbar,
|
|
1077
|
-
isSaved: true,
|
|
1078
|
-
isSnackBarOpen: true,
|
|
1079
|
-
snackBarMessage:
|
|
1080
|
-
'Your project has been saved. </br> You can now request <b>Designer Assistance</b> or <b>Add to Cart</b>'
|
|
1081
|
-
});
|
|
1082
|
-
if (this.state.submitTosave) {
|
|
1083
|
-
handleContinueQuote();
|
|
1084
|
-
}
|
|
1085
|
-
} else {
|
|
1086
|
-
rlt.success = false;
|
|
1087
|
-
rlt.message = message;
|
|
1088
|
-
|
|
1089
|
-
this.setState({
|
|
1090
|
-
isSnackBarOpen: true,
|
|
1091
|
-
snackBarMessage: `Failed to add project data: ${message}`
|
|
1092
|
-
});
|
|
1093
|
-
}
|
|
1094
|
-
} catch (err) {
|
|
1095
|
-
rlt.success = false;
|
|
1096
|
-
|
|
1097
|
-
console.error(err);
|
|
1098
|
-
this.setState({
|
|
1099
|
-
isSnackBarOpen: true,
|
|
1100
|
-
snackBarMessage: 'Failed to add project data.'
|
|
1101
|
-
});
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
return rlt;
|
|
1105
|
-
};
|
|
1106
|
-
|
|
1107
|
-
let pidSplit = userInfo.pid && userInfo.pid.indexOf('?');
|
|
1108
|
-
// If pidSplit is undefined pid is undefined
|
|
1109
|
-
let pid =
|
|
1110
|
-
pidSplit === undefined || pidSplit === -1
|
|
1111
|
-
? userInfo.pid
|
|
1112
|
-
: userInfo.pid.slice(0, pidSplit);
|
|
1113
|
-
|
|
1114
|
-
let submitForQuote = async param => {
|
|
1115
|
-
let rlt = { success: false };
|
|
1116
|
-
|
|
1117
|
-
if (!userInfo.token) {
|
|
1118
|
-
this.setState({
|
|
1119
|
-
isSnackBarOpen: true,
|
|
1120
|
-
snackBarMessage: 'You should save the project first.'
|
|
1121
|
-
});
|
|
1122
|
-
return;
|
|
1123
|
-
}
|
|
1124
|
-
let apiUrl = '';
|
|
1125
|
-
if (param.flag === constants.SUBMIT_REQUEST_ASSIST) {
|
|
1126
|
-
apiUrl = `${API_SERVER_URL}/api/project/submitProject`;
|
|
1127
|
-
} else if (param.flag === constants.SUBMIT_ADD_CART) {
|
|
1128
|
-
apiUrl = `${API_SERVER_URL}/api/project/addCart`;
|
|
1129
|
-
}
|
|
1130
|
-
try {
|
|
1131
|
-
const extraFormData = {
|
|
1132
|
-
userType: sessionStorage.getItem('user_type') || '',
|
|
1133
|
-
designType: sessionStorage.getItem('project_type') || '',
|
|
1134
|
-
startTime: sessionStorage.getItem('project_timeline') || ''
|
|
1135
|
-
};
|
|
1136
|
-
|
|
1137
|
-
const originalAccessToken = ls.get(LOCAL_STORAGE_ORIGINAL_TOKEN);
|
|
1138
|
-
const tokenName = ls.get(LOCAL_STORAGE_TOKEN_NAME);
|
|
1139
|
-
|
|
1140
|
-
const customerRequests = param.customer_requests;
|
|
1141
|
-
const notes = customerRequests.notes;
|
|
1142
|
-
const response = await axios.post(apiUrl, {
|
|
1143
|
-
access_token: userInfo.token,
|
|
1144
|
-
data: {
|
|
1145
|
-
...param,
|
|
1146
|
-
...(extraFormData.userType
|
|
1147
|
-
? { user_type: extraFormData.userType }
|
|
1148
|
-
: undefined),
|
|
1149
|
-
...(extraFormData.designType
|
|
1150
|
-
? { project_type: extraFormData.designType }
|
|
1151
|
-
: undefined),
|
|
1152
|
-
...(extraFormData.startTime
|
|
1153
|
-
? { project_timeline: extraFormData.startTime }
|
|
1154
|
-
: undefined),
|
|
1155
|
-
client_name: sessionStorage.getItem('visualizerName'),
|
|
1156
|
-
user_token: ls.get(LOCAL_STORAGE_TOKEN_VALUE),
|
|
1157
|
-
cart_action_type: ls.get(LOCAL_STORAGE_CART_ACTION),
|
|
1158
|
-
customer_requests: Object.values(customerRequests.reviewOptions)
|
|
1159
|
-
.filter(Boolean)
|
|
1160
|
-
.join(', '),
|
|
1161
|
-
...(param.flag === constants.SUBMIT_ADD_CART
|
|
1162
|
-
? {
|
|
1163
|
-
cart_notes: notes
|
|
1164
|
-
}
|
|
1165
|
-
: {
|
|
1166
|
-
designer_notes: notes
|
|
1167
|
-
}),
|
|
1168
|
-
question_add_to_cart: param.flag === constants.SUBMIT_ADD_CART,
|
|
1169
|
-
...(originalAccessToken
|
|
1170
|
-
? { original_token: originalAccessToken }
|
|
1171
|
-
: undefined),
|
|
1172
|
-
...(tokenName
|
|
1173
|
-
? { query_params_token_prefix: tokenName }
|
|
1174
|
-
: undefined)
|
|
1175
|
-
},
|
|
1176
|
-
num: true,
|
|
1177
|
-
projectid: pid,
|
|
1178
|
-
search: this.props.location.search,
|
|
1179
|
-
userrole: userInfo.role,
|
|
1180
|
-
url: window.location.hostname
|
|
1181
|
-
});
|
|
1182
|
-
|
|
1183
|
-
const { success, message, redirect_url } = response.data;
|
|
1184
|
-
if (success) {
|
|
1185
|
-
rlt.success = true;
|
|
1186
|
-
|
|
1187
|
-
param.email && sessionStorage.setItem('email', param.email);
|
|
1188
|
-
param.phone && sessionStorage.setItem('phone', param.phone);
|
|
1189
|
-
this.setState({
|
|
1190
|
-
redirectURL: redirect_url,
|
|
1191
|
-
isSnackBarOpen: true,
|
|
1192
|
-
snackBarMessage: `${
|
|
1193
|
-
param.flag === constants.SUBMIT_REQUEST_ASSIST
|
|
1194
|
-
? 'Project submitted'
|
|
1195
|
-
: 'Added to cart'
|
|
1196
|
-
} successfully.${
|
|
1197
|
-
customerRequests.reviewOptions.length > 0 ||
|
|
1198
|
-
customerRequests.notes
|
|
1199
|
-
? ' <br /> A confirmation has been emailed to you and a designer will be in contact shortly'
|
|
1200
|
-
: ''
|
|
1201
|
-
}`,
|
|
1202
|
-
isSnackBar1Open: param.flag === constants.SUBMIT_ADD_CART
|
|
1203
|
-
});
|
|
1204
|
-
} else {
|
|
1205
|
-
rlt.success = false;
|
|
1206
|
-
rlt.message = message;
|
|
1207
|
-
|
|
1208
|
-
this.setState({
|
|
1209
|
-
isSnackBarOpen: true,
|
|
1210
|
-
snackBarMessage: `${
|
|
1211
|
-
param.flag === constants.SUBMIT_REQUEST_ASSIST
|
|
1212
|
-
? 'Submitting project'
|
|
1213
|
-
: 'Adding to cart'
|
|
1214
|
-
} failed: ${message}`
|
|
1215
|
-
});
|
|
1216
|
-
}
|
|
1217
|
-
} catch (err) {
|
|
1218
|
-
rlt.success = false;
|
|
1219
|
-
|
|
1220
|
-
console.log('err', err);
|
|
1221
|
-
this.setState({
|
|
1222
|
-
isSnackBarOpen: true,
|
|
1223
|
-
snackBarMessage: `${
|
|
1224
|
-
param.flag === constants.SUBMIT_REQUEST_ASSIST
|
|
1225
|
-
? 'Submitting project'
|
|
1226
|
-
: 'Adding to cart'
|
|
1227
|
-
} failed.`
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
return rlt;
|
|
1232
|
-
};
|
|
1233
|
-
|
|
1234
|
-
return (
|
|
1235
|
-
<section>
|
|
1236
|
-
<SnackBar
|
|
1237
|
-
isOpen={this.state.isSnackBarOpen}
|
|
1238
|
-
message={this.state.snackBarMessage}
|
|
1239
|
-
handleClose={() =>
|
|
1240
|
-
this.setState({ isSnackBarOpen: false, snackBarMessage: '' })
|
|
1241
|
-
}
|
|
1242
|
-
autoHideDuration={10000}
|
|
1243
|
-
/>
|
|
1244
|
-
<SnackBar
|
|
1245
|
-
style={{ marginTop: this.state.isSnackBarOpen ? 75 : 'unset' }}
|
|
1246
|
-
isOpen={this.state.isSnackBar1Open}
|
|
1247
|
-
message={`The items in your design have been added to your shopping cart at ${CLIENTS_NAME[sessionStorage.getItem('visualizerName')]}. <br />Please log in with the same email address.`}
|
|
1248
|
-
autoHideDuration={20000}
|
|
1249
|
-
action={
|
|
1250
|
-
<div>
|
|
1251
|
-
<a
|
|
1252
|
-
href={this.state.redirectURL}
|
|
1253
|
-
target="_blank"
|
|
1254
|
-
style={{
|
|
1255
|
-
fontFamily: DEFAULT_FONT_FAMILY,
|
|
1256
|
-
color: PRIMARY_GREEN_COLOR,
|
|
1257
|
-
fontWeight: 700,
|
|
1258
|
-
marginRight: 10
|
|
1259
|
-
}}
|
|
1260
|
-
>
|
|
1261
|
-
View Cart
|
|
1262
|
-
</a>
|
|
1263
|
-
<img
|
|
1264
|
-
onClick={() => this.setState({ isSnackBar1Open: false })}
|
|
1265
|
-
style={{ float: 'right', height: 24, cursor: 'pointer' }}
|
|
1266
|
-
src="/assets/img/svg/close.svg"
|
|
1267
|
-
/>
|
|
1268
|
-
</div>
|
|
1269
|
-
}
|
|
1270
|
-
/>
|
|
1271
|
-
<div style={{ ...wrapperStyle, height }}>
|
|
1272
|
-
{/*<Header*/}
|
|
1273
|
-
{/* isTokenPresent={!!this.props.match.params.token}*/}
|
|
1274
|
-
{/* isSaved={this.state.isSaved}*/}
|
|
1275
|
-
{/* width={headerW}*/}
|
|
1276
|
-
{/* height={headerH}*/}
|
|
1277
|
-
{/* state={extractedState}*/}
|
|
1278
|
-
{/* reviewQuoteHandler={this.onReviewQuoteClicked.bind(this)}*/}
|
|
1279
|
-
{/* handleSaveDesign={this.handleSaveDesign.bind(this)}*/}
|
|
1280
|
-
{/* handleSubmitForQuote={this.handleSubmitForQuote.bind(this)}*/}
|
|
1281
|
-
{/* handleNewProject={this.handleNewProject.bind(this)}*/}
|
|
1282
|
-
{/* handleSubmitPrompt={submitType => {*/}
|
|
1283
|
-
{/* this.setState({ submitPromptVisible: true });*/}
|
|
1284
|
-
{/* this.setState({ stateSubmitType: submitType });*/}
|
|
1285
|
-
{/* }}*/}
|
|
1286
|
-
{/* logoImage={this.props.logoImage}*/}
|
|
1287
|
-
{/* companyURL={this.props.companyURL}*/}
|
|
1288
|
-
{/* setToolbar={this.setToolbar}*/}
|
|
1289
|
-
{/* saveProject={saveProject}*/}
|
|
1290
|
-
{/* newProject={newProject}*/}
|
|
1291
|
-
{/* isModalVisible={this.state.isModalVisible}*/}
|
|
1292
|
-
{/* allVisible={allVisible}*/}
|
|
1293
|
-
{/* wizardStepOpend={firstVisit}*/}
|
|
1294
|
-
{/* {...props}*/}
|
|
1295
|
-
{/*/>*/}
|
|
1296
|
-
{/*{signOpen && (*/}
|
|
1297
|
-
{/* <Sign*/}
|
|
1298
|
-
{/* setSignOpen={this.setSignOpen.bind(this)}*/}
|
|
1299
|
-
{/* setMyProjectsOpen={this.setMyProjectsOpen.bind(this)}*/}
|
|
1300
|
-
{/* setMyProjectsToLogin={this.setMyProjectsToLogin.bind(this)}*/}
|
|
1301
|
-
{/* myProjectsToLogin={myProjectsToLogin}*/}
|
|
1302
|
-
{/* />*/}
|
|
1303
|
-
{/*)}*/}
|
|
1304
|
-
{/*{!allVisible && (*/}
|
|
1305
|
-
{/* // left side bar & top tools bar*/}
|
|
1306
|
-
{/* <Toolbar*/}
|
|
1307
|
-
{/* width={toolbarW}*/}
|
|
1308
|
-
{/* content={contentW}*/}
|
|
1309
|
-
{/* height={toolbarH}*/}
|
|
1310
|
-
{/* headerH={headerH}*/}
|
|
1311
|
-
{/* state={extractedState}*/}
|
|
1312
|
-
{/* layers={extractedState.scene.layers}*/}
|
|
1313
|
-
{/* selectedLayer={extractedState.scene.selectedLayer}*/}
|
|
1314
|
-
{/* {...props}*/}
|
|
1315
|
-
{/* handleSaveDesign={this.handleSaveDesign.bind(this)}*/}
|
|
1316
|
-
{/* handleSubmitForQuote={this.handleSubmitForQuote.bind(this)}*/}
|
|
1317
|
-
{/* handleNewProject={this.handleNewProject.bind(this)}*/}
|
|
1318
|
-
{/* handleSubmitPrompt={submitType => {*/}
|
|
1319
|
-
{/* this.setState({ submitPromptVisible: true });*/}
|
|
1320
|
-
{/* this.setState({*/}
|
|
1321
|
-
{/* stateSubmitType: submitType*/}
|
|
1322
|
-
{/* });*/}
|
|
1323
|
-
{/* }}*/}
|
|
1324
|
-
{/* toolBar={this.state.toolbar}*/}
|
|
1325
|
-
{/* setToolbar={this.setToolbar}*/}
|
|
1326
|
-
{/* setDownloadPopupVisible={this.setDownloadPopupVisible.bind(this)}*/}
|
|
1327
|
-
{/* openFloor={this.openFloor}*/}
|
|
1328
|
-
{/* openCabinet={this.openCabinet}*/}
|
|
1329
|
-
{/* openAppliance={this.openAppliance}*/}
|
|
1330
|
-
{/* openFinishing={this.openFinishing}*/}
|
|
1331
|
-
{/* closeFloorTB={this.closeFloorTB}*/}
|
|
1332
|
-
{/* closeCabinetTB={this.closeCabinetTB}*/}
|
|
1333
|
-
{/* closeFinishingTB={this.closeFinishingTB}*/}
|
|
1334
|
-
{/* closeApplianceTB={this.closeApplianceTB}*/}
|
|
1335
|
-
{/* setShowProperty={this.setShowProperty}*/}
|
|
1336
|
-
{/* reviewQuotePopupOpened={this.state.reviewQuotePopupOpened}*/}
|
|
1337
|
-
{/* isShowProperty={this.state.isShowProperty}*/}
|
|
1338
|
-
{/* categoryData={this.props.categoryData}*/}
|
|
1339
|
-
{/* floorOpened={this.state.floorOpened}*/}
|
|
1340
|
-
{/* cabinetOpened={this.state.cabinetOpened}*/}
|
|
1341
|
-
{/* applianceOpened={this.state.applianceOpened}*/}
|
|
1342
|
-
{/* finishingOpened={this.state.finishingOpened}*/}
|
|
1343
|
-
{/* doorStyleOpen={this.state.doorStyleOpen}*/}
|
|
1344
|
-
{/* toggleDoorStyle={this.toggleDoorStyle}*/}
|
|
1345
|
-
{/* onReviewQuoteClicked={this.onReviewQuoteClicked}*/}
|
|
1346
|
-
{/* wizardStepOpend={firstVisit}*/}
|
|
1347
|
-
{/* replaceCabinetFlag={this.state.replaceCabinetFlag}*/}
|
|
1348
|
-
{/* replaceCabinet={this.replaceCabinet}*/}
|
|
1349
|
-
{/* />*/}
|
|
1350
|
-
{/*)}*/}
|
|
1351
|
-
<Content
|
|
1352
|
-
width={contentW}
|
|
1353
|
-
height={contentH}
|
|
1354
|
-
catalog={this.props.catalog}
|
|
1355
|
-
state={extractedState}
|
|
1356
|
-
toolBar={this.state.toolbar}
|
|
1357
|
-
setToolbar={this.setToolbar}
|
|
1358
|
-
replaceCabinet={this.replaceCabinet}
|
|
1359
|
-
keyDownEnable={
|
|
1360
|
-
!savePopupVisible && !quotePopupVisible && !assistPopupVisible
|
|
1361
|
-
}
|
|
1362
|
-
{...props}
|
|
1363
|
-
onWheel={event => event.preventDefault()}
|
|
1364
|
-
/>
|
|
1365
|
-
{/*{!allVisible && (*/}
|
|
1366
|
-
{/* <FooterBar*/}
|
|
1367
|
-
{/* content={contentW}*/}
|
|
1368
|
-
{/* setToolbar={this.setToolbar}*/}
|
|
1369
|
-
{/* layers={extractedState.scene.layers}*/}
|
|
1370
|
-
{/* setShowProperty={this.setShowProperty}*/}
|
|
1371
|
-
{/* state={extractedState}*/}
|
|
1372
|
-
{/* selectedLayer={extractedState.scene.selectedLayer}*/}
|
|
1373
|
-
{/* {...props}*/}
|
|
1374
|
-
{/* />*/}
|
|
1375
|
-
{/*)}*/}
|
|
1376
|
-
{/*{firstVisit && (*/}
|
|
1377
|
-
{/* <WizardStep*/}
|
|
1378
|
-
{/* key="first-setting"*/}
|
|
1379
|
-
{/* content={contentW}*/}
|
|
1380
|
-
{/* layers={extractedState.scene.layers}*/}
|
|
1381
|
-
{/* close={() => this.setState({ wizardStepOpend: false })}*/}
|
|
1382
|
-
{/* state={extractedState}*/}
|
|
1383
|
-
{/* setMyProjectsToLogin={this.setMyProjectsToLogin.bind(this)}*/}
|
|
1384
|
-
{/* setSignOpen={this.setSignOpen.bind(this)}*/}
|
|
1385
|
-
{/* selectedLayer={extractedState.scene.selectedLayer}*/}
|
|
1386
|
-
{/* setMyProjectsOpen={this.setMyProjectsOpen.bind(this)}*/}
|
|
1387
|
-
{/* {...props}*/}
|
|
1388
|
-
{/* />*/}
|
|
1389
|
-
{/*)}*/}
|
|
1390
|
-
{/*{myProjectsOpen && (*/}
|
|
1391
|
-
{/* <MyProjects*/}
|
|
1392
|
-
{/* setMyProjectsOpen={this.setMyProjectsOpen.bind(this)}*/}
|
|
1393
|
-
{/* {...props}*/}
|
|
1394
|
-
{/* />*/}
|
|
1395
|
-
{/*)}*/}
|
|
1396
|
-
{/*<SaveDesignPopup*/}
|
|
1397
|
-
{/* visible={savePopupVisible}*/}
|
|
1398
|
-
{/* submitTosave={submitTosave}*/}
|
|
1399
|
-
{/* handleSaveDesign={this.handleSaveDesign.bind(this)}*/}
|
|
1400
|
-
{/* saveProject={saveProject}*/}
|
|
1401
|
-
{/* state={extractedState}*/}
|
|
1402
|
-
{/* {...props}*/}
|
|
1403
|
-
{/*/>*/}
|
|
1404
|
-
{/*<SubmitForQuotePopup*/}
|
|
1405
|
-
{/* categoryData={categoryData}*/}
|
|
1406
|
-
{/* curDoorStyle={doorStyle}*/}
|
|
1407
|
-
{/* handleSubmitForQuote={this.handleSubmitForQuote.bind(this)}*/}
|
|
1408
|
-
{/* submitForQuote={submitForQuote}*/}
|
|
1409
|
-
{/* visible={quotePopupVisible}*/}
|
|
1410
|
-
{/* setDoorStyle={this.props.itemsActions.setDoorStyle}*/}
|
|
1411
|
-
{/* submitType={stateSubmitType}*/}
|
|
1412
|
-
{/* {...props}*/}
|
|
1413
|
-
{/*/>*/}
|
|
1414
|
-
{/*<NewProjectPopup*/}
|
|
1415
|
-
{/* isSaved={this.state.isSaved}*/}
|
|
1416
|
-
{/* visible={newProjectPopupVisible}*/}
|
|
1417
|
-
{/* handleNewProject={this.handleNewProject.bind(this)}*/}
|
|
1418
|
-
{/* newProject={newProject}*/}
|
|
1419
|
-
{/* areas={extractedState.getIn([*/}
|
|
1420
|
-
{/* 'scene',*/}
|
|
1421
|
-
{/* 'layers',*/}
|
|
1422
|
-
{/* extractedState.scene.selectedLayer,*/}
|
|
1423
|
-
{/* 'areas'*/}
|
|
1424
|
-
{/* ])}*/}
|
|
1425
|
-
{/*/>*/}
|
|
1426
|
-
{/*<SubmitPromptPopup*/}
|
|
1427
|
-
{/* visible={submitPromptVisible}*/}
|
|
1428
|
-
{/* submitType={stateSubmitType}*/}
|
|
1429
|
-
{/* handleOk={value =>*/}
|
|
1430
|
-
{/* this.handleSaveDesign(value) ||*/}
|
|
1431
|
-
{/* this.setState({ submitTosave: true })*/}
|
|
1432
|
-
{/* }*/}
|
|
1433
|
-
{/* handleClose={() => {*/}
|
|
1434
|
-
{/* this.setState({ submitPromptVisible: false });*/}
|
|
1435
|
-
{/* }}*/}
|
|
1436
|
-
{/*/>*/}
|
|
1437
|
-
{/*<AutosavePromptPopup*/}
|
|
1438
|
-
{/* isLeaving={isLeaving}*/}
|
|
1439
|
-
{/* visible={savePromptVisible}*/}
|
|
1440
|
-
{/* handleOk={this.handleSaveDesign.bind(this)}*/}
|
|
1441
|
-
{/* handleClose={() =>*/}
|
|
1442
|
-
{/* this.setState({ savePromptVisible: false, submitTosave: false })*/}
|
|
1443
|
-
{/* }*/}
|
|
1444
|
-
{/*/>*/}
|
|
1445
|
-
{/*<DownloadSummaryPopup*/}
|
|
1446
|
-
{/* visible={downloadPopupVisible}*/}
|
|
1447
|
-
{/* state={extractedState}*/}
|
|
1448
|
-
{/* catalog={this.props.catalog}*/}
|
|
1449
|
-
{/* setDownloadPopupVisible={this.setDownloadPopupVisible.bind(this)}*/}
|
|
1450
|
-
{/* {...props}*/}
|
|
1451
|
-
{/*/>*/}
|
|
1452
|
-
{/*{saveAlert}*/}
|
|
1453
|
-
</div>
|
|
1454
|
-
</section>
|
|
1455
|
-
);
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
KitchenConfigurator.propTypes = {
|
|
1460
|
-
translator: PropTypes.instanceOf(Translator),
|
|
1461
|
-
|
|
1462
|
-
catalog: PropTypes.instanceOf(Catalog),
|
|
1463
|
-
allowProjectFileSupport: PropTypes.bool,
|
|
1464
|
-
plugins: PropTypes.arrayOf(PropTypes.func),
|
|
1465
|
-
autosaveKey: PropTypes.string,
|
|
1466
|
-
autosaveDelay: PropTypes.number,
|
|
1467
|
-
width: PropTypes.number.isRequired,
|
|
1468
|
-
height: PropTypes.number.isRequired,
|
|
1469
|
-
stateExtractor: PropTypes.func.isRequired,
|
|
1470
|
-
toolbarButtons: PropTypes.array,
|
|
1471
|
-
sidebarComponents: PropTypes.array,
|
|
1472
|
-
footerbarComponents: PropTypes.array,
|
|
1473
|
-
customContents: PropTypes.object,
|
|
1474
|
-
softwareSignature: PropTypes.string,
|
|
1475
|
-
configData: PropTypes.object
|
|
1476
|
-
};
|
|
1477
|
-
|
|
1478
|
-
KitchenConfigurator.contextTypes = {
|
|
1479
|
-
store: PropTypes.object.isRequired
|
|
1480
|
-
};
|
|
1481
|
-
|
|
1482
|
-
KitchenConfigurator.childContextTypes = {
|
|
1483
|
-
...objectsMap(actions, () => PropTypes.object),
|
|
1484
|
-
translator: PropTypes.object,
|
|
1485
|
-
catalog: PropTypes.object
|
|
1486
|
-
};
|
|
1487
|
-
|
|
1488
|
-
KitchenConfigurator.defaultProps = {
|
|
1489
|
-
translator: new Translator(),
|
|
1490
|
-
catalog: new Catalog(),
|
|
1491
|
-
plugins: [],
|
|
1492
|
-
allowProjectFileSupport: true,
|
|
1493
|
-
softwareSignature: `KitchenConfigurator ${VERSION}`,
|
|
1494
|
-
toolbarButtons: [],
|
|
1495
|
-
sidebarComponents: [],
|
|
1496
|
-
footerbarComponents: [],
|
|
1497
|
-
customContents: {},
|
|
1498
|
-
configData: {}
|
|
1499
|
-
};
|
|
1500
|
-
|
|
1501
|
-
//redux connect
|
|
1502
|
-
function mapStateToProps(reduxState) {
|
|
1503
|
-
return {
|
|
1504
|
-
state: reduxState
|
|
1505
|
-
};
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
function mapDispatchToProps(dispatch) {
|
|
1509
|
-
return objectsMap(actions, actionNamespace =>
|
|
1510
|
-
bindActionCreators(actions[actionNamespace], dispatch)
|
|
1511
|
-
);
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
export default connect(
|
|
1515
|
-
mapStateToProps,
|
|
1516
|
-
mapDispatchToProps
|
|
1517
|
-
)(KitchenConfigurator);
|