kitchen-simulator 5.10.2-react.18 → 5.10.3-react.18
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/es/@history.js +2 -0
- package/es/AppContext.js +6 -0
- package/es/LiteKitchenConfigurator.js +474 -0
- package/es/LiteRenderer.js +363 -0
- package/es/WorkSpace.js +851 -0
- package/es/actions/area-actions.js +14 -0
- package/es/actions/export.js +23 -0
- package/es/actions/groups-actions.js +89 -0
- package/es/actions/holes-actions.js +119 -0
- package/es/actions/items-actions.js +316 -0
- package/es/actions/lines-actions.js +83 -0
- package/es/actions/project-actions.js +298 -0
- package/es/actions/scene-actions.js +33 -0
- package/es/actions/vertices-actions.js +27 -0
- package/es/actions/viewer2d-actions.js +58 -0
- package/es/actions/viewer3d-actions.js +23 -0
- package/es/assets/brown_photostudio_02_1k.hdr +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Black Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Black.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Bold Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Bold.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Book Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Book.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard ExtraBold Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard ExtraBold.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard ExtraLight Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard ExtraLight.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Hairline Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Hairline.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Heavy Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Heavy.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Light Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Light.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Medium Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Medium.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard SemiBold Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard SemiBold.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Thin Italic.woff +0 -0
- package/es/assets/fonts/Rene Bieder Milliard Thin.woff +0 -0
- package/es/assets/fonts/style.css +177 -0
- package/es/assets/gltf/door_closet.bin +0 -0
- package/es/assets/gltf/door_closet.fbx +0 -0
- package/es/assets/gltf/door_closet.gltf +1 -0
- package/es/assets/gltf/door_exterior.bin +0 -0
- package/es/assets/gltf/door_exterior.fbx +0 -0
- package/es/assets/gltf/door_exterior.gltf +1 -0
- package/es/assets/gltf/door_interior.bin +0 -0
- package/es/assets/gltf/door_interior.fbx +0 -0
- package/es/assets/gltf/door_interior.gltf +1 -0
- package/es/assets/gltf/door_sliding.bin +0 -0
- package/es/assets/gltf/door_sliding.fbx +0 -0
- package/es/assets/gltf/door_sliding.gltf +1 -0
- package/es/assets/gltf/doorway_framed.bin +0 -0
- package/es/assets/gltf/doorway_framed.fbx +0 -0
- package/es/assets/gltf/doorway_framed.gltf +1 -0
- package/es/assets/gltf/window_clear.bin +0 -0
- package/es/assets/gltf/window_clear.fbx +0 -0
- package/es/assets/gltf/window_clear.gltf +1 -0
- package/es/assets/gltf/window_cross.bin +0 -0
- package/es/assets/gltf/window_cross.fbx +0 -0
- package/es/assets/gltf/window_cross.gltf +1 -0
- package/es/assets/gltf/window_double_hung.bin +0 -0
- package/es/assets/gltf/window_double_hung.fbx +0 -0
- package/es/assets/gltf/window_double_hung.gltf +1 -0
- package/es/assets/gltf/window_vertical.bin +0 -0
- package/es/assets/gltf/window_vertical.fbx +0 -0
- package/es/assets/gltf/window_vertical.gltf +1 -0
- package/es/assets/img/TKC_thumbnail.png +0 -0
- package/es/assets/img/Toggle.png +0 -0
- package/es/assets/img/loading/loading.gif +0 -0
- package/es/assets/img/loading/loading_1.svg +11 -0
- package/es/assets/img/loading_large.gif +0 -0
- package/es/assets/img/png/door/closet.png +0 -0
- package/es/assets/img/png/door/doorwaysframed.png +0 -0
- package/es/assets/img/png/door/doorwaysframeles.png +0 -0
- package/es/assets/img/png/door/doorwaysframeless.png +0 -0
- package/es/assets/img/png/door/exterior.png +0 -0
- package/es/assets/img/png/door/interior.png +0 -0
- package/es/assets/img/png/door/sliding.png +0 -0
- package/es/assets/img/png/helper/outcome.png +0 -0
- package/es/assets/img/png/helper/video_preview_3d.png +0 -0
- package/es/assets/img/png/helper/video_preview_start.png +0 -0
- package/es/assets/img/project_img.png +0 -0
- package/es/assets/img/rta/rta_logo_box_blue.jpg +0 -0
- package/es/assets/img/rta/rta_logo_box_blue_ico.jpg +0 -0
- package/es/assets/img/rta/rta_logo_box_blue_ico.svg +55 -0
- package/es/assets/img/rta/rta_logo_box_darkGray.jpg +0 -0
- package/es/assets/img/rta/rta_logo_box_lightblue.png +0 -0
- package/es/assets/img/rta/rta_logo_box_lightmaroon.png +0 -0
- package/es/assets/img/rta/rta_logo_box_maroon.png +0 -0
- package/es/assets/img/rta/rta_logo_box_white.png +0 -0
- package/es/assets/img/rta_menu.png +0 -0
- package/es/assets/img/step2.jpg +0 -0
- package/es/assets/img/step3.jpg +0 -0
- package/es/assets/img/step4.jpg +0 -0
- package/es/assets/img/step5.jpg +0 -0
- package/es/assets/img/step6.jpg +0 -0
- package/es/assets/img/step7.jpg +0 -0
- package/es/assets/img/step8.jpg +0 -0
- package/es/assets/img/svg/2d_delete_object.svg +33 -0
- package/es/assets/img/svg/2d_delete_object1.svg +33 -0
- package/es/assets/img/svg/2d_lock_object.svg +33 -0
- package/es/assets/img/svg/3d_item_move.svg +106 -0
- package/es/assets/img/svg/3d_item_rotation.svg +76 -0
- package/es/assets/img/svg/3d_item_warning_edit.svg +77 -0
- package/es/assets/img/svg/3d_item_warning_info.svg +81 -0
- package/es/assets/img/svg/accessories.svg +4 -0
- package/es/assets/img/svg/angle_icon.svg +39 -0
- package/es/assets/img/svg/blank_div.svg +14 -0
- package/es/assets/img/svg/bottombar/2d3d_button.svg +3 -0
- package/es/assets/img/svg/bottombar/2d3d_button_active.svg +3 -0
- package/es/assets/img/svg/bottombar/2d3d_toggle.svg +4 -0
- package/es/assets/img/svg/bottombar/2d3d_toggle_active.svg +4 -0
- package/es/assets/img/svg/bottombar/arrow-down.svg +3 -0
- package/es/assets/img/svg/bottombar/arrow-left.svg +3 -0
- package/es/assets/img/svg/bottombar/arrow-minus.svg +3 -0
- package/es/assets/img/svg/bottombar/arrow-plus.svg +11 -0
- package/es/assets/img/svg/bottombar/arrow-right.svg +3 -0
- package/es/assets/img/svg/bottombar/arrow-up.svg +3 -0
- package/es/assets/img/svg/bottombar/collapse.svg +3 -0
- package/es/assets/img/svg/bottombar/elevation-back.svg +6 -0
- package/es/assets/img/svg/bottombar/elevation-front.svg +6 -0
- package/es/assets/img/svg/bottombar/elevation-left.svg +6 -0
- package/es/assets/img/svg/bottombar/elevation-right.svg +7 -0
- package/es/assets/img/svg/bottombar/elevation.svg +13 -0
- package/es/assets/img/svg/bottombar/expand.svg +3 -0
- package/es/assets/img/svg/bottombar/help.svg +72 -0
- package/es/assets/img/svg/bottombar/incm_toggle.svg +39 -0
- package/es/assets/img/svg/bottombar/pan_1.svg +57 -0
- package/es/assets/img/svg/bottombar/pan_2.svg +27 -0
- package/es/assets/img/svg/bottombar/pan_3.svg +27 -0
- package/es/assets/img/svg/bottombar/pan_4.svg +27 -0
- package/es/assets/img/svg/bottombar/pan_5.svg +27 -0
- package/es/assets/img/svg/bottombar/settings.svg +23 -0
- package/es/assets/img/svg/bottombar/spin-down.svg +76 -0
- package/es/assets/img/svg/bottombar/spin-left.svg +75 -0
- package/es/assets/img/svg/bottombar/spin-right.svg +75 -0
- package/es/assets/img/svg/bottombar/spin-up.svg +76 -0
- package/es/assets/img/svg/bottombar/spin_1.svg +48 -0
- package/es/assets/img/svg/bottombar/spin_2.svg +31 -0
- package/es/assets/img/svg/bottombar/spin_3.svg +31 -0
- package/es/assets/img/svg/bottombar/spin_4.svg +31 -0
- package/es/assets/img/svg/bottombar/spin_5.svg +31 -0
- package/es/assets/img/svg/bottombar/zoomin.svg +29 -0
- package/es/assets/img/svg/bottombar/zoomout.svg +26 -0
- package/es/assets/img/svg/check.svg +10 -0
- package/es/assets/img/svg/close.svg +11 -0
- package/es/assets/img/svg/color/Black.svg +3 -0
- package/es/assets/img/svg/color/Blue.svg +3 -0
- package/es/assets/img/svg/color/Brown.svg +9 -0
- package/es/assets/img/svg/color/Cream.svg +3 -0
- package/es/assets/img/svg/color/Dark.svg +9 -0
- package/es/assets/img/svg/color/Gray.svg +3 -0
- package/es/assets/img/svg/color/Green.svg +3 -0
- package/es/assets/img/svg/color/Light.svg +9 -0
- package/es/assets/img/svg/color/Medium.svg +9 -0
- package/es/assets/img/svg/color/Unfinished.svg +9 -0
- package/es/assets/img/svg/color/White.svg +3 -0
- package/es/assets/img/svg/color/White.svg.bak +3 -0
- package/es/assets/img/svg/color/stone2.jpg +0 -0
- package/es/assets/img/svg/color/wood2.jpg +0 -0
- package/es/assets/img/svg/copy.svg +11 -0
- package/es/assets/img/svg/delete.svg +3 -0
- package/es/assets/img/svg/detail.svg +77 -0
- package/es/assets/img/svg/disclaimer/background.svg +758 -0
- package/es/assets/img/svg/disclaimer/logo-dots.svg +11 -0
- package/es/assets/img/svg/door/Closet.svg +11 -0
- package/es/assets/img/svg/door/Exterior.svg +5 -0
- package/es/assets/img/svg/door/Framed_dorway.svg +5 -0
- package/es/assets/img/svg/door/Frameless_dorway.svg +5 -0
- package/es/assets/img/svg/door/Interior.svg +7 -0
- package/es/assets/img/svg/door/Sliding.svg +5 -0
- package/es/assets/img/svg/doors_closet.svg +47 -0
- package/es/assets/img/svg/doors_exterior.svg +25 -0
- package/es/assets/img/svg/doors_interior.svg +29 -0
- package/es/assets/img/svg/doors_patio.svg +26 -0
- package/es/assets/img/svg/duplicate.svg +11 -0
- package/es/assets/img/svg/duplicate_object_left.svg +32 -0
- package/es/assets/img/svg/duplicate_object_right.svg +32 -0
- package/es/assets/img/svg/filtersActive.svg +19 -0
- package/es/assets/img/svg/firstsetting/L.svg +3 -0
- package/es/assets/img/svg/firstsetting/L2.svg +3 -0
- package/es/assets/img/svg/firstsetting/Open.svg +3 -0
- package/es/assets/img/svg/firstsetting/Square.svg +3 -0
- package/es/assets/img/svg/firstsetting/bar-active.svg +9 -0
- package/es/assets/img/svg/firstsetting/bar-normal.svg +3 -0
- package/es/assets/img/svg/firstsetting/bullet-current.svg +3 -0
- package/es/assets/img/svg/firstsetting/bullet-done.svg +3 -0
- package/es/assets/img/svg/firstsetting/bullet-not-done.svg +3 -0
- package/es/assets/img/svg/firstsetting/check-active.svg +3 -0
- package/es/assets/img/svg/firstsetting/check-normal.svg +3 -0
- package/es/assets/img/svg/firstsetting/pencil.svg +11 -0
- package/es/assets/img/svg/green_checkmark.svg +27 -0
- package/es/assets/img/svg/headerbar/assist.svg +3 -0
- package/es/assets/img/svg/headerbar/cart.svg +3 -0
- package/es/assets/img/svg/headerbar/check.svg +10 -0
- package/es/assets/img/svg/headerbar/consult_designer.svg +45 -0
- package/es/assets/img/svg/headerbar/edit_name.svg +26 -0
- package/es/assets/img/svg/headerbar/file-dollar.svg +13 -0
- package/es/assets/img/svg/headerbar/hamburger_menu.svg +32 -0
- package/es/assets/img/svg/headerbar/plus.svg +11 -0
- package/es/assets/img/svg/headerbar/review_quote.svg +44 -0
- package/es/assets/img/svg/headerbar/ruler-measure.svg +11 -0
- package/es/assets/img/svg/headerbar/save.svg +3 -0
- package/es/assets/img/svg/headerbar/setting.svg +75 -0
- package/es/assets/img/svg/help/check.svg +10 -0
- package/es/assets/img/svg/help/search.svg +76 -0
- package/es/assets/img/svg/intro/1-start-with-floorplan-whole.svg +27 -0
- package/es/assets/img/svg/intro/1-start-with-floorplan.svg +26 -0
- package/es/assets/img/svg/intro/2-start-from-scratch-whole.svg +28 -0
- package/es/assets/img/svg/intro/2-start-from-scratch.svg +27 -0
- package/es/assets/img/svg/intro/3-retrieve-project-whole.svg +19 -0
- package/es/assets/img/svg/intro/3-retrieve-project.svg +18 -0
- package/es/assets/img/svg/invert.svg +127 -0
- package/es/assets/img/svg/lefttoolbar/appliance-active.svg +13 -0
- package/es/assets/img/svg/lefttoolbar/appliance.svg +13 -0
- package/es/assets/img/svg/lefttoolbar/cabinet-active.svg +10 -0
- package/es/assets/img/svg/lefttoolbar/cabinet-category.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/cabinet-one.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/cabinet.svg +10 -0
- package/es/assets/img/svg/lefttoolbar/disigner_assistance.svg +89 -0
- package/es/assets/img/svg/lefttoolbar/door-style-active.svg +20 -0
- package/es/assets/img/svg/lefttoolbar/door-style.svg +20 -0
- package/es/assets/img/svg/lefttoolbar/door.svg +12 -0
- package/es/assets/img/svg/lefttoolbar/error_icon.svg +81 -0
- package/es/assets/img/svg/lefttoolbar/finishing-active.svg +13 -0
- package/es/assets/img/svg/lefttoolbar/finishing.svg +13 -0
- package/es/assets/img/svg/lefttoolbar/reviewforquote-active.svg +86 -0
- package/es/assets/img/svg/lefttoolbar/reviewforquote.svg +12 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-L.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-active.svg +18 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-custom.svg +12 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-irregular.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-open.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/room-shape-square.svg +3 -0
- package/es/assets/img/svg/lefttoolbar/room-shape.svg +18 -0
- package/es/assets/img/svg/lefttoolbar/search.svg +76 -0
- package/es/assets/img/svg/lefttoolbar/view_more.svg +86 -0
- package/es/assets/img/svg/lefttoolbar/warning_icon.svg +81 -0
- package/es/assets/img/svg/lefttoolbar/window.svg +12 -0
- package/es/assets/img/svg/logo.svg +11 -0
- package/es/assets/img/svg/logo_with_text.svg +25 -0
- package/es/assets/img/svg/menubar/login.svg +84 -0
- package/es/assets/img/svg/menubar/my_projects.svg +85 -0
- package/es/assets/img/svg/menubar/new_project.svg +110 -0
- package/es/assets/img/svg/menubar/save_project.svg +84 -0
- package/es/assets/img/svg/options.svg +3 -0
- package/es/assets/img/svg/positioning.svg +3 -0
- package/es/assets/img/svg/rotate.png +0 -0
- package/es/assets/img/svg/rotate.svg +17 -0
- package/es/assets/img/svg/rotate_object_clockwise.svg +26 -0
- package/es/assets/img/svg/rotate_object_counterclockwise.svg +26 -0
- package/es/assets/img/svg/toggleFilters.svg +19 -0
- package/es/assets/img/svg/toolbar/add_appliances_active.svg +64 -0
- package/es/assets/img/svg/toolbar/add_appliances_inactive.svg +52 -0
- package/es/assets/img/svg/toolbar/add_button.svg +36 -0
- package/es/assets/img/svg/toolbar/add_cabinets_active.svg +59 -0
- package/es/assets/img/svg/toolbar/add_cabinets_inactive.svg +49 -0
- package/es/assets/img/svg/toolbar/add_items_doors.svg +25 -0
- package/es/assets/img/svg/toolbar/add_items_doorways.svg +24 -0
- package/es/assets/img/svg/toolbar/add_items_refrigerator.svg +32 -0
- package/es/assets/img/svg/toolbar/add_items_windows.svg +28 -0
- package/es/assets/img/svg/toolbar/apply_button.svg +38 -0
- package/es/assets/img/svg/toolbar/arrow-plus.svg +11 -0
- package/es/assets/img/svg/toolbar/backsplash.svg +8 -0
- package/es/assets/img/svg/toolbar/cancel_button.svg +37 -0
- package/es/assets/img/svg/toolbar/consult_a_designer_button.svg +47 -0
- package/es/assets/img/svg/toolbar/countertop.svg +7 -0
- package/es/assets/img/svg/toolbar/dcm.png +0 -0
- package/es/assets/img/svg/toolbar/dcm_off.svg +12 -0
- package/es/assets/img/svg/toolbar/dcm_on.svg +474 -0
- package/es/assets/img/svg/toolbar/delete_button.svg +37 -0
- package/es/assets/img/svg/toolbar/download.svg +77 -0
- package/es/assets/img/svg/toolbar/draw_custom_floor.svg +31 -0
- package/es/assets/img/svg/toolbar/edit_button.svg +75 -0
- package/es/assets/img/svg/toolbar/email_quote_button.svg +44 -0
- package/es/assets/img/svg/toolbar/fbm.png +0 -0
- package/es/assets/img/svg/toolbar/finishing_touches_active.svg +54 -0
- package/es/assets/img/svg/toolbar/finishing_touches_inactive.svg +42 -0
- package/es/assets/img/svg/toolbar/floorstyle.svg +9 -0
- package/es/assets/img/svg/toolbar/fmb.png +0 -0
- package/es/assets/img/svg/toolbar/fmb_off.svg +12 -0
- package/es/assets/img/svg/toolbar/fmb_on.svg +489 -0
- package/es/assets/img/svg/toolbar/furnishings_icon.svg +6 -0
- package/es/assets/img/svg/toolbar/get_started_button.svg +41 -0
- package/es/assets/img/svg/toolbar/handles.svg +5 -0
- package/es/assets/img/svg/toolbar/lighting.svg +7 -0
- package/es/assets/img/svg/toolbar/lrm.png +0 -0
- package/es/assets/img/svg/toolbar/lrm_off.svg +12 -0
- package/es/assets/img/svg/toolbar/lrm_on.svg +470 -0
- package/es/assets/img/svg/toolbar/make_floorplan_active.svg +66 -0
- package/es/assets/img/svg/toolbar/make_floorplan_inactive.svg +52 -0
- package/es/assets/img/svg/toolbar/predefined_room_l_shaped.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_layout.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_long_narrow.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_open_l_shape.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_open_pentagon.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_open_rectangle.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_open_rectangle_2.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_pentagon.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_rectangle.svg +20 -0
- package/es/assets/img/svg/toolbar/predefined_room_rectangle_with_alcove.svg +20 -0
- package/es/assets/img/svg/toolbar/redo_button.svg +75 -0
- package/es/assets/img/svg/toolbar/redo_button1.svg +75 -0
- package/es/assets/img/svg/toolbar/review_quote_active.svg +14 -0
- package/es/assets/img/svg/toolbar/review_quote_inactive.svg +44 -0
- package/es/assets/img/svg/toolbar/save_project_button.svg +44 -0
- package/es/assets/img/svg/toolbar/select_doorstyle_active.svg +67 -0
- package/es/assets/img/svg/toolbar/select_doorstyle_inactive.svg +57 -0
- package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -0
- package/es/assets/img/svg/toolbar/style_change_button.svg +47 -0
- package/es/assets/img/svg/toolbar/take_picture.svg +75 -0
- package/es/assets/img/svg/toolbar/undo_button.svg +76 -0
- package/es/assets/img/svg/toolbar/undo_button1.svg +76 -0
- package/es/assets/img/svg/toolbar/use_button.svg +37 -0
- package/es/assets/img/svg/toolbar/wall_color_icon.svg +6 -0
- package/es/assets/img/svg/topbar/edit_active.svg +10 -0
- package/es/assets/img/svg/topbar/edit_inactive.svg +10 -0
- package/es/assets/img/svg/topbar/redo_active.svg +42 -0
- package/es/assets/img/svg/topbar/redo_inactive.svg +23 -0
- package/es/assets/img/svg/topbar/select_all_active.svg +50 -0
- package/es/assets/img/svg/topbar/select_all_inactive.svg +32 -0
- package/es/assets/img/svg/topbar/take_picture_active.svg +51 -0
- package/es/assets/img/svg/topbar/take_picture_inactive.svg +26 -0
- package/es/assets/img/svg/topbar/undo_active.svg +42 -0
- package/es/assets/img/svg/topbar/undo_inactive.svg +23 -0
- package/es/assets/img/svg/warning_info_2d.svg +81 -0
- package/es/assets/img/svg/window/Clear.svg +3 -0
- package/es/assets/img/svg/window/Cross.svg +5 -0
- package/es/assets/img/svg/window/Double_hung.svg +4 -0
- package/es/assets/img/svg/window/Vertical.svg +4 -0
- package/es/assets/img/svg/windows_clear.svg +23 -0
- package/es/assets/img/svg/windows_cross.svg +28 -0
- package/es/assets/img/svg/windows_double_hung.svg +24 -0
- package/es/assets/img/svg/windows_vertical.svg +24 -0
- package/es/assets/img/svg/wizardstep/Custom.svg +3 -0
- package/es/assets/img/svg/wizardstep/Dashed_line.svg +3 -0
- package/es/assets/img/svg/wizardstep/L.svg +3 -0
- package/es/assets/img/svg/wizardstep/L2.svg +3 -0
- package/es/assets/img/svg/wizardstep/Open.svg +3 -0
- package/es/assets/img/svg/wizardstep/Square.svg +3 -0
- package/es/assets/img/svg/wizardstep/bar-active.svg +9 -0
- package/es/assets/img/svg/wizardstep/bar-normal.svg +3 -0
- package/es/assets/img/svg/wizardstep/bullet-current.svg +3 -0
- package/es/assets/img/svg/wizardstep/bullet-done.svg +3 -0
- package/es/assets/img/svg/wizardstep/bullet-not-done.svg +3 -0
- package/es/assets/img/svg/wizardstep/check-active.svg +3 -0
- package/es/assets/img/svg/wizardstep/check-normal.svg +3 -0
- package/es/assets/img/svg/wizardstep/detail_view.svg +87 -0
- package/es/assets/img/svg/wizardstep/pencil.svg +11 -0
- package/es/assets/img/svg/wizardstep/tile_view.svg +95 -0
- package/es/assets/img/texture/glass.jpg +0 -0
- package/es/assets/img/texture/steel.jpg +0 -0
- package/es/assets/img/texture/white1px.jpg +0 -0
- package/es/assets/img/texture/wood.jpg +0 -0
- package/es/assets/model/DCM.bin +0 -0
- package/es/assets/model/DCM.fbx +0 -0
- package/es/assets/model/DCM.gltf +1 -0
- package/es/assets/model/FBM.bin +0 -0
- package/es/assets/model/FBM.fbx +0 -0
- package/es/assets/model/FBM.gltf +1 -0
- package/es/assets/model/LRM.bin +0 -0
- package/es/assets/model/LRM.fbx +0 -0
- package/es/assets/model/LRM.gltf +1 -0
- package/es/assets/rtastore_logo.png +0 -0
- package/es/catalog/areas/area/planner-element.js +45 -0
- package/es/catalog/back.png +0 -0
- package/es/catalog/catalog.js +265 -0
- package/es/catalog/doors.png +0 -0
- package/es/catalog/doorways.png +0 -0
- package/es/catalog/envMap/nx.hdr +0 -0
- package/es/catalog/envMap/ny.hdr +0 -0
- package/es/catalog/envMap/nz.hdr +0 -0
- package/es/catalog/envMap/px.hdr +0 -0
- package/es/catalog/envMap/py.hdr +0 -0
- package/es/catalog/envMap/pz.hdr +0 -0
- package/es/catalog/export.js +0 -0
- package/es/catalog/factories/area-factory-3d.js +182 -0
- package/es/catalog/factories/area-factory.js +78 -0
- package/es/catalog/factories/export.js +7 -0
- package/es/catalog/factories/wall-factory-3d.js +202 -0
- package/es/catalog/factories/wall-factory.js +267 -0
- package/es/catalog/holes/door-closet/planner-element.js +222 -0
- package/es/catalog/holes/door-double/door_double.png +0 -0
- package/es/catalog/holes/door-double/planner-element.js +315 -0
- package/es/catalog/holes/door-exterior/planner-element.js +215 -0
- package/es/catalog/holes/door-interior/planner-element.js +227 -0
- package/es/catalog/holes/door-panic/panicDoor.png +0 -0
- package/es/catalog/holes/door-panic/planner-element.js +503 -0
- package/es/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/es/catalog/holes/door-panic-double/planner-element.js +463 -0
- package/es/catalog/holes/door-sliding/planner-element.js +225 -0
- package/es/catalog/holes/doorway-framed/planner-element.js +145 -0
- package/es/catalog/holes/doorway-frameless/planner-element.js +104 -0
- package/es/catalog/holes/export.js +13 -0
- package/es/catalog/holes/gate/gate.jpg +0 -0
- package/es/catalog/holes/window-clear/planner-element.js +166 -0
- package/es/catalog/holes/window-clear/texture.png +0 -0
- package/es/catalog/holes/window-cross/planner-element.js +165 -0
- package/es/catalog/holes/window-cross/texture.png +0 -0
- package/es/catalog/holes/window-double-hung/planner-element.js +303 -0
- package/es/catalog/holes/window-double-hung/texture.png +0 -0
- package/es/catalog/holes/window-vertical/planner-element.js +276 -0
- package/es/catalog/holes/window-vertical/texture.png +0 -0
- package/es/catalog/lines/wall/planner-element.js +79 -0
- package/es/catalog/lines/wall/textures/bricks2.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
- package/es/catalog/lines/wall/textures/painted-normal.jpg +0 -0
- package/es/catalog/molding/molding-dcm/planner-element.js +26 -0
- package/es/catalog/molding/molding-dcm/texture.png +0 -0
- package/es/catalog/molding/molding-fbm/planner-element.js +26 -0
- package/es/catalog/molding/molding-fbm/texture.png +0 -0
- package/es/catalog/molding/molding-lrm/planner-element.js +26 -0
- package/es/catalog/molding/molding-lrm/texture.png +0 -0
- package/es/catalog/properties/export.js +21 -0
- package/es/catalog/properties/property-checkbox.js +68 -0
- package/es/catalog/properties/property-color.js +39 -0
- package/es/catalog/properties/property-enum.js +50 -0
- package/es/catalog/properties/property-hidden.js +19 -0
- package/es/catalog/properties/property-lenght-measure.js +96 -0
- package/es/catalog/properties/property-length-measure.js +80 -0
- package/es/catalog/properties/property-length-measure_hole.js +96 -0
- package/es/catalog/properties/property-number.js +48 -0
- package/es/catalog/properties/property-read-only.js +26 -0
- package/es/catalog/properties/property-string.js +48 -0
- package/es/catalog/properties/property-toggle.js +39 -0
- package/es/catalog/properties/shared-property-style.js +14 -0
- package/es/catalog/utils/FuseUtils.js +79 -0
- package/es/catalog/utils/exporter.js +161 -0
- package/es/catalog/utils/geom-utils.js +189 -0
- package/es/catalog/utils/item-loader.js +1602 -0
- package/es/catalog/utils/load-obj.js +91 -0
- package/es/catalog/utils/mtl-loader.js +357 -0
- package/es/catalog/utils/obj-loader.js +476 -0
- package/es/catalog/windows.png +0 -0
- package/es/class/FuseUtils.js +79 -0
- package/es/class/area.js +141 -0
- package/es/class/export.js +24 -0
- package/es/class/group.js +431 -0
- package/es/class/guide.js +58 -0
- package/es/class/hole.js +924 -0
- package/es/class/item.js +1884 -0
- package/es/class/layer.js +663 -0
- package/es/class/line.js +1229 -0
- package/es/class/project.js +937 -0
- package/es/class/vertex.js +198 -0
- package/es/components/content.js +135 -0
- package/es/components/export.js +9 -0
- package/es/components/style/button.js +106 -0
- package/es/components/style/cancel-button.js +21 -0
- package/es/components/style/content-container.js +30 -0
- package/es/components/style/content-title.js +25 -0
- package/es/components/style/delete-button.js +24 -0
- package/es/components/style/export.js +31 -0
- package/es/components/style/form-block.js +20 -0
- package/es/components/style/form-color-input.js +26 -0
- package/es/components/style/form-label.js +22 -0
- package/es/components/style/form-number-input.js +192 -0
- package/es/components/style/form-number-input_2.js +238 -0
- package/es/components/style/form-select.js +19 -0
- package/es/components/style/form-slider.js +60 -0
- package/es/components/style/form-submit-button.js +25 -0
- package/es/components/style/form-text-input.js +69 -0
- package/es/components/viewer2d/area.js +81 -0
- package/es/components/viewer2d/export.js +31 -0
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +36 -0
- package/es/components/viewer2d/grids/grid-streak.js +36 -0
- package/es/components/viewer2d/grids/grid-vertical-streak.js +36 -0
- package/es/components/viewer2d/grids/grids.js +30 -0
- package/es/components/viewer2d/group.js +48 -0
- package/es/components/viewer2d/item.js +243 -0
- package/es/components/viewer2d/layer.js +164 -0
- package/es/components/viewer2d/line.js +997 -0
- package/es/components/viewer2d/ruler.js +84 -0
- package/es/components/viewer2d/rulerDist.js +102 -0
- package/es/components/viewer2d/rulerX.js +142 -0
- package/es/components/viewer2d/rulerY.js +144 -0
- package/es/components/viewer2d/scene.js +108 -0
- package/es/components/viewer2d/snap.js +74 -0
- package/es/components/viewer2d/state.js +73 -0
- package/es/components/viewer2d/utils.js +193 -0
- package/es/components/viewer2d/vertex.js +66 -0
- package/es/components/viewer2d/viewer2d.js +1405 -0
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +2585 -0
- package/es/components/viewer3d/dcm.js +401 -0
- package/es/components/viewer3d/fbm.js +414 -0
- package/es/components/viewer3d/front3D.js +62 -0
- package/es/components/viewer3d/grid-creator.js +25 -0
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +36 -0
- package/es/components/viewer3d/grids/grid-streak.js +27 -0
- package/es/components/viewer3d/grids/grid-vertical-streak.js +36 -0
- package/es/components/viewer3d/libs/first-person-controls.js +67 -0
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1281 -0
- package/es/components/viewer3d/libs/mtl-loader.js +357 -0
- package/es/components/viewer3d/libs/obj-loader.js +462 -0
- package/es/components/viewer3d/libs/orbit-controls.js +697 -0
- package/es/components/viewer3d/libs/pointer-lock-controls.js +44 -0
- package/es/components/viewer3d/lrm.js +305 -0
- package/es/components/viewer3d/model.js +708 -0
- package/es/components/viewer3d/pointer-lock-navigation.js +115 -0
- package/es/components/viewer3d/ruler-utils/itemRect.js +61 -0
- package/es/components/viewer3d/ruler-utils/layer3D.js +495 -0
- package/es/components/viewer3d/ruler-utils/ruler3D.js +224 -0
- package/es/components/viewer3d/ruler-utils/scene3D.js +59 -0
- package/es/components/viewer3d/ruler-utils/state3D.js +18 -0
- package/es/components/viewer3d/scene-creator.js +3818 -0
- package/es/components/viewer3d/three-memory-cleaner.js +51 -0
- package/es/components/viewer3d/viewer3d-first-person.js +311 -0
- package/es/components/viewer3d/viewer3d.js +2654 -0
- package/es/constants.js +769 -0
- package/es/index.html.ejs +264 -0
- package/es/index.js +627 -3
- package/es/models.js +512 -0
- package/es/plugins/SVGLoader.js +1414 -0
- package/es/plugins/console-debugger.js +34 -0
- package/es/plugins/export.js +7 -0
- package/es/plugins/keyboard.js +110 -0
- package/es/reducers/areas-reducer.js +12 -0
- package/es/reducers/export.js +25 -0
- package/es/reducers/groups-reducer.js +38 -0
- package/es/reducers/holes-reducer.js +62 -0
- package/es/reducers/items-reducer.js +143 -0
- package/es/reducers/lines-reducer.js +45 -0
- package/es/reducers/project-reducer.js +136 -0
- package/es/reducers/reducer.js +19 -0
- package/es/reducers/scene-reducer.js +28 -0
- package/es/reducers/user-reducer.js +41 -0
- package/es/reducers/vertices-reducer.js +19 -0
- package/es/reducers/viewer2d-reducer.js +77 -0
- package/es/reducers/viewer3d-reducer.js +58 -0
- package/es/shared-style.js +66 -0
- package/es/translator/en.js +104 -0
- package/es/translator/it.js +79 -0
- package/es/translator/ru.js +79 -0
- package/es/translator/translator.js +80 -0
- package/es/utils/browser.js +33 -0
- package/es/utils/convert-units-lite.js +29 -0
- package/es/utils/email-validator.js +4 -0
- package/es/utils/export.js +25 -0
- package/es/utils/geometry.js +2609 -0
- package/es/utils/get-edges-of-subgraphs.js +26 -0
- package/es/utils/graph-cycles.js +238 -0
- package/es/utils/graph-inner-cycles.js +46 -0
- package/es/utils/graph.js +145 -0
- package/es/utils/helper.js +436 -0
- package/es/utils/history.js +29 -0
- package/es/utils/id-broker.js +15 -0
- package/es/utils/isolate-event-handler.js +1622 -0
- package/es/utils/logger.js +8 -0
- package/es/utils/math.js +50 -0
- package/es/utils/molding.js +1347 -0
- package/es/utils/name-generator.js +17 -0
- package/es/utils/objects-utils.js +50 -0
- package/es/utils/phone-validator.js +4 -0
- package/es/utils/process-black-list.js +15 -0
- package/es/utils/react-if.js +18 -0
- package/es/utils/ruler.js +58 -0
- package/es/utils/snap-scene.js +94 -0
- package/es/utils/snap.js +231 -0
- package/es/utils/summarizeCart.js +24 -0
- package/es/utils/threeCSG.es6.js +494 -0
- package/es/version.js +1 -0
- package/package.json +2 -2
- package/es/index.js.LICENSE.txt +0 -45
- package/es/index.js.map +0 -1
- /package/es/{e8e5de0892f5375460bd.jpg → catalog/areas/area/textures/ceramic-tile.jpg} +0 -0
- /package/es/{e470a2ce76062955fa98.jpg → catalog/areas/area/textures/grass.jpg} +0 -0
- /package/es/{e5ae13166775e7d071e4.jpg → catalog/areas/area/textures/parquet.jpg} +0 -0
- /package/es/{c232d250fd899392b1b7.jpg → catalog/areas/area/textures/strand-porcelain.jpg} +0 -0
- /package/es/{c7ae6f4de09134ebe588.jpg → catalog/areas/area/textures/tile1.jpg} +0 -0
- /package/es/{81e7a7e6edf162e88b44.jpg → catalog/lines/wall/textures/bricks-normal.jpg} +0 -0
- /package/es/{340a84d3930143a53545.jpg → catalog/lines/wall/textures/bricks-normal2.jpg} +0 -0
- /package/es/{a07d30a04bda8ee03491.jpg → catalog/lines/wall/textures/bricks.jpg} +0 -0
- /package/es/{5c8d36b3e7223934f447.jpg → catalog/lines/wall/textures/morden-normal.jpg} +0 -0
- /package/es/{8fe0f1210d8ba435a790.jpg → catalog/lines/wall/textures/morden.jpg} +0 -0
- /package/es/{bee3f62687a97bcc3d9f.jpg → catalog/lines/wall/textures/painted.jpg} +0 -0
- /package/es/{1fc74a85baa030dbc913.jpg → catalog/lines/wall/textures/plaster-normal.jpg} +0 -0
- /package/es/{dad5ee758630256ee702.jpg → catalog/lines/wall/textures/plaster.jpg} +0 -0
- /package/es/{30a49a74d9bd10068b65.png → catalog/lines/wall/wall.png} +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
8
|
+
var _templateObject;
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
import React, { Component } from 'react';
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
13
|
+
import { KEYBOARD_BUTTON_CODE, TEXT_COLOR_NEUTRAL_0, SECONDARY_PURPLE_COLOR, DEFAULT_FONT_FAMILY } from "../../constants";
|
|
14
|
+
import styled from 'styled-components';
|
|
15
|
+
import { isValidNumber } from "../../utils/helper";
|
|
16
|
+
import AppContext from "../../AppContext";
|
|
17
|
+
var StyledInput = styled.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n padding: 15px 25px 12px 0px;\n width: 120px;\n color: ", ";\n background-color: rgb(255, 255, 255);\n border: 2px solid;\n text-align: right;\n float: right;\n font-family: ", ";\n font-size: 16px;\n font-weight: 600;\n line-height: 17px;\n border-radius: 5px;\n outline: 0;\n :focus {\n border-color: ", ";\n }\n"])), TEXT_COLOR_NEUTRAL_0, DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR);
|
|
18
|
+
var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
19
|
+
function FormNumberInput(props) {
|
|
20
|
+
var _this;
|
|
21
|
+
_classCallCheck(this, FormNumberInput);
|
|
22
|
+
_this = _callSuper(this, FormNumberInput, [props]);
|
|
23
|
+
_this.state = {
|
|
24
|
+
focus: false,
|
|
25
|
+
valid: true,
|
|
26
|
+
showedValue: props.value,
|
|
27
|
+
focusOn: false,
|
|
28
|
+
flag: true
|
|
29
|
+
};
|
|
30
|
+
_this.input = /*#__PURE__*/React.createRef(null);
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
_inherits(FormNumberInput, _Component);
|
|
34
|
+
return _createClass(FormNumberInput, [{
|
|
35
|
+
key: "componentDidMount",
|
|
36
|
+
value: function componentDidMount() {
|
|
37
|
+
if (this.input.current && ['width', 'length'].includes((this.props.labelName || '').toLowerCase())) {
|
|
38
|
+
this.input.current.focus();
|
|
39
|
+
this.input.current.select();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
key: "componentDidUpdate",
|
|
44
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
45
|
+
if (prevProps.value !== this.props.value || prevProps.focus !== this.props.focus) {
|
|
46
|
+
// avoid setState loop
|
|
47
|
+
if (this.state.showedValue !== this.props.value || this.state.focusOn !== this.props.focus) {
|
|
48
|
+
// eslint-disable-next-line react/no-did-update-set-state
|
|
49
|
+
this.setState({
|
|
50
|
+
showedValue: this.props.value,
|
|
51
|
+
focusOn: this.props.focus
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// keep your existing behavior
|
|
57
|
+
if (this.props.value !== prevProps.value && prevProps.labelName !== 'Ceiling Height') {
|
|
58
|
+
var _this$input$current, _this$input$current2;
|
|
59
|
+
(_this$input$current = this.input.current) === null || _this$input$current === void 0 || _this$input$current.focus();
|
|
60
|
+
(_this$input$current2 = this.input.current) === null || _this$input$current2 === void 0 || _this$input$current2.select();
|
|
61
|
+
}
|
|
62
|
+
var showedValue = this.state.showedValue;
|
|
63
|
+
var _this$props = this.props,
|
|
64
|
+
min = _this$props.min,
|
|
65
|
+
max = _this$props.max,
|
|
66
|
+
isCeiling = _this$props.isCeiling;
|
|
67
|
+
if (!isCeiling) {
|
|
68
|
+
if (isValidNumber(min) && showedValue < min) {
|
|
69
|
+
// eslint-disable-next-line react/no-did-update-set-state
|
|
70
|
+
this.setState({
|
|
71
|
+
showedValue: min
|
|
72
|
+
});
|
|
73
|
+
} else if (isValidNumber(max) && showedValue > max) {
|
|
74
|
+
// eslint-disable-next-line react/no-did-update-set-state
|
|
75
|
+
this.setState({
|
|
76
|
+
showedValue: max
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
82
|
+
key: "render",
|
|
83
|
+
value: function render() {
|
|
84
|
+
var _this2 = this;
|
|
85
|
+
var _this$props2 = this.props,
|
|
86
|
+
value = _this$props2.value,
|
|
87
|
+
min = _this$props2.min,
|
|
88
|
+
max = _this$props2.max,
|
|
89
|
+
precision = _this$props2.precision,
|
|
90
|
+
onChange = _this$props2.onChange,
|
|
91
|
+
onValid = _this$props2.onValid,
|
|
92
|
+
onInvalid = _this$props2.onInvalid,
|
|
93
|
+
style = _this$props2.style,
|
|
94
|
+
placeholder = _this$props2.placeholder,
|
|
95
|
+
isCeiling = _this$props2.isCeiling;
|
|
96
|
+
var regexp = new RegExp("^-?([0-9]+)?\\.?([0-9]{0,".concat(precision, "})?$"));
|
|
97
|
+
var currValue = regexp.test(this.state.showedValue) ? this.state.showedValue : parseFloat(this.state.showedValue).toFixed(precision);
|
|
98
|
+
var saveFn = function saveFn(e) {
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
if (_this2.state.valid) {
|
|
101
|
+
var savedValue = _this2.state.showedValue !== '' && _this2.state.showedValue !== '-' ? parseFloat(_this2.state.showedValue) : 0;
|
|
102
|
+
_this2.setState({
|
|
103
|
+
showedValue: savedValue
|
|
104
|
+
});
|
|
105
|
+
onChange({
|
|
106
|
+
target: {
|
|
107
|
+
value: savedValue
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
return /*#__PURE__*/React.createElement(StyledInput, {
|
|
113
|
+
id: "form_number_input",
|
|
114
|
+
autoFocus: this.state.focusOn,
|
|
115
|
+
readOnly: !!this.props.disabled,
|
|
116
|
+
type: "text",
|
|
117
|
+
value: currValue,
|
|
118
|
+
style: style,
|
|
119
|
+
onChange: function onChange(evt) {
|
|
120
|
+
var _this2$context, _projectActions$copyP;
|
|
121
|
+
var projectActions = (_this2$context = _this2.context) === null || _this2$context === void 0 ? void 0 : _this2$context.projectActions;
|
|
122
|
+
projectActions === null || projectActions === void 0 || (_projectActions$copyP = projectActions.copyProperties) === null || _projectActions$copyP === void 0 || _projectActions$copyP.call(projectActions, 'ddddd');
|
|
123
|
+
var valid = regexp.test(evt.nativeEvent.target.value);
|
|
124
|
+
if (valid) {
|
|
125
|
+
_this2.setState({
|
|
126
|
+
showedValue: evt.nativeEvent.target.value,
|
|
127
|
+
flag: false
|
|
128
|
+
});
|
|
129
|
+
onValid === null || onValid === void 0 || onValid(evt.nativeEvent);
|
|
130
|
+
} else {
|
|
131
|
+
onInvalid === null || onInvalid === void 0 || onInvalid(evt.nativeEvent);
|
|
132
|
+
}
|
|
133
|
+
_this2.setState({
|
|
134
|
+
valid: valid
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
onFocus: function onFocus() {
|
|
138
|
+
return _this2.setState({
|
|
139
|
+
focusOn: true
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
onBlur: function onBlur() {
|
|
143
|
+
return _this2.setState({
|
|
144
|
+
focusOn: false
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
ref: this.input,
|
|
148
|
+
onKeyDown: function onKeyDown(e) {
|
|
149
|
+
var keyCode = e.keyCode || e.which;
|
|
150
|
+
if (keyCode === KEYBOARD_BUTTON_CODE.ENTER || keyCode === KEYBOARD_BUTTON_CODE.TAB) {
|
|
151
|
+
var _this2$input$current;
|
|
152
|
+
saveFn(e);
|
|
153
|
+
(_this2$input$current = _this2.input.current) === null || _this2$input$current === void 0 || _this2$input$current.blur();
|
|
154
|
+
}
|
|
155
|
+
if (keyCode === KEYBOARD_BUTTON_CODE.ESC) {
|
|
156
|
+
var _this2$context2, _projectActions$rollb;
|
|
157
|
+
var projectActions = (_this2$context2 = _this2.context) === null || _this2$context2 === void 0 ? void 0 : _this2$context2.projectActions;
|
|
158
|
+
projectActions === null || projectActions === void 0 || (_projectActions$rollb = projectActions.rollback) === null || _projectActions$rollb === void 0 || _projectActions$rollb.call(projectActions);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
placeholder: placeholder
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}]);
|
|
165
|
+
}(Component);
|
|
166
|
+
_defineProperty(FormNumberInput, "contextType", AppContext);
|
|
167
|
+
export { FormNumberInput as default };
|
|
168
|
+
FormNumberInput.propTypes = {
|
|
169
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
170
|
+
style: PropTypes.object,
|
|
171
|
+
onChange: PropTypes.func.isRequired,
|
|
172
|
+
onValid: PropTypes.func,
|
|
173
|
+
onInvalid: PropTypes.func,
|
|
174
|
+
min: PropTypes.number,
|
|
175
|
+
max: PropTypes.number,
|
|
176
|
+
precision: PropTypes.number,
|
|
177
|
+
placeholder: PropTypes.string,
|
|
178
|
+
labelName: PropTypes.string,
|
|
179
|
+
isCeiling: PropTypes.string,
|
|
180
|
+
disabled: PropTypes.bool,
|
|
181
|
+
focus: PropTypes.bool
|
|
182
|
+
};
|
|
183
|
+
FormNumberInput.defaultProps = {
|
|
184
|
+
value: 0,
|
|
185
|
+
style: {},
|
|
186
|
+
min: Number.MIN_SAFE_INTEGER,
|
|
187
|
+
max: Number.MAX_SAFE_INTEGER,
|
|
188
|
+
precision: 2,
|
|
189
|
+
disabled: false,
|
|
190
|
+
labelName: 'default',
|
|
191
|
+
focus: false
|
|
192
|
+
};
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
import React, { Component } from 'react';
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
13
|
+
import * as SharedStyle from "../../shared-style";
|
|
14
|
+
import { MdUpdate } from 'react-icons/md';
|
|
15
|
+
import { KEYBOARD_BUTTON_CODE } from "../../constants";
|
|
16
|
+
import AppContext from "../../AppContext"; // <-- adjust path
|
|
17
|
+
|
|
18
|
+
var STYLE_INPUT = {
|
|
19
|
+
display: 'block',
|
|
20
|
+
width: '100%',
|
|
21
|
+
padding: '0 2px',
|
|
22
|
+
fontSize: '13px',
|
|
23
|
+
lineHeight: '1.25',
|
|
24
|
+
color: SharedStyle.PRIMARY_COLOR.input,
|
|
25
|
+
backgroundColor: SharedStyle.COLORS.white,
|
|
26
|
+
backgroundImage: 'none',
|
|
27
|
+
border: '1px solid rgba(0,0,0,.15)',
|
|
28
|
+
outline: 'none',
|
|
29
|
+
height: '30px'
|
|
30
|
+
};
|
|
31
|
+
var confirmStyle = {
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
cursor: 'pointer',
|
|
34
|
+
width: '20px',
|
|
35
|
+
height: '20px',
|
|
36
|
+
right: '5px',
|
|
37
|
+
top: '5px',
|
|
38
|
+
backgroundColor: SharedStyle.SECONDARY_COLOR.main,
|
|
39
|
+
color: '#FFF',
|
|
40
|
+
transition: 'all 0.1s linear'
|
|
41
|
+
};
|
|
42
|
+
function clampNumber(val, min, max) {
|
|
43
|
+
var n = typeof val === 'string' ? parseFloat(val) : Number(val);
|
|
44
|
+
if (Number.isNaN(n)) return val; // keep original (e.g. '' or '-')
|
|
45
|
+
if (Number.isFinite(min) && n < min) return min;
|
|
46
|
+
if (Number.isFinite(max) && n > max) return max;
|
|
47
|
+
return val;
|
|
48
|
+
}
|
|
49
|
+
var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
50
|
+
// <-- modern context
|
|
51
|
+
|
|
52
|
+
function FormNumberInput(props) {
|
|
53
|
+
var _this;
|
|
54
|
+
_classCallCheck(this, FormNumberInput);
|
|
55
|
+
_this = _callSuper(this, FormNumberInput, [props]);
|
|
56
|
+
_this.state = {
|
|
57
|
+
valid: true,
|
|
58
|
+
showedValue: props.value,
|
|
59
|
+
disabled: props.disabled === true,
|
|
60
|
+
focusOn: !!props.focus
|
|
61
|
+
};
|
|
62
|
+
_this.inputRef = /*#__PURE__*/React.createRef();
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
_inherits(FormNumberInput, _Component);
|
|
66
|
+
return _createClass(FormNumberInput, [{
|
|
67
|
+
key: "componentDidMount",
|
|
68
|
+
value: function componentDidMount() {
|
|
69
|
+
if (this.state.focusOn) {
|
|
70
|
+
var _this$inputRef$curren, _this$inputRef$curren2, _this$inputRef$curren3, _this$inputRef$curren4;
|
|
71
|
+
(_this$inputRef$curren = this.inputRef.current) === null || _this$inputRef$curren === void 0 || (_this$inputRef$curren2 = _this$inputRef$curren.focus) === null || _this$inputRef$curren2 === void 0 || _this$inputRef$curren2.call(_this$inputRef$curren);
|
|
72
|
+
(_this$inputRef$curren3 = this.inputRef.current) === null || _this$inputRef$curren3 === void 0 || (_this$inputRef$curren4 = _this$inputRef$curren3.select) === null || _this$inputRef$curren4 === void 0 || _this$inputRef$curren4.call(_this$inputRef$curren3);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
key: "componentDidUpdate",
|
|
77
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
78
|
+
var _this2 = this;
|
|
79
|
+
var _this$props = this.props,
|
|
80
|
+
value = _this$props.value,
|
|
81
|
+
focus = _this$props.focus,
|
|
82
|
+
min = _this$props.min,
|
|
83
|
+
max = _this$props.max;
|
|
84
|
+
if (prevProps.value !== value || prevProps.focus !== focus) {
|
|
85
|
+
this.setState({
|
|
86
|
+
showedValue: value,
|
|
87
|
+
focusOn: !!focus
|
|
88
|
+
}, function () {
|
|
89
|
+
if (prevProps.focus !== focus && focus) {
|
|
90
|
+
var _this2$inputRef$curre, _this2$inputRef$curre2, _this2$inputRef$curre3, _this2$inputRef$curre4;
|
|
91
|
+
(_this2$inputRef$curre = _this2.inputRef.current) === null || _this2$inputRef$curre === void 0 || (_this2$inputRef$curre2 = _this2$inputRef$curre.focus) === null || _this2$inputRef$curre2 === void 0 || _this2$inputRef$curre2.call(_this2$inputRef$curre);
|
|
92
|
+
(_this2$inputRef$curre3 = _this2.inputRef.current) === null || _this2$inputRef$curre3 === void 0 || (_this2$inputRef$curre4 = _this2$inputRef$curre3.select) === null || _this2$inputRef$curre4 === void 0 || _this2$inputRef$curre4.call(_this2$inputRef$curre3);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// clamp showedValue when it changes (instead of doing setState in render)
|
|
99
|
+
if (prevState.showedValue !== this.state.showedValue) {
|
|
100
|
+
var clamped = clampNumber(this.state.showedValue, min, max);
|
|
101
|
+
if (clamped !== this.state.showedValue) {
|
|
102
|
+
this.setState({
|
|
103
|
+
showedValue: clamped
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
key: "render",
|
|
110
|
+
value: function render() {
|
|
111
|
+
var _this3 = this,
|
|
112
|
+
_this$context,
|
|
113
|
+
_this$context2;
|
|
114
|
+
var _this$props2 = this.props,
|
|
115
|
+
precision = _this$props2.precision,
|
|
116
|
+
onChange = _this$props2.onChange,
|
|
117
|
+
onValid = _this$props2.onValid,
|
|
118
|
+
onInvalid = _this$props2.onInvalid,
|
|
119
|
+
style = _this$props2.style,
|
|
120
|
+
placeholder = _this$props2.placeholder;
|
|
121
|
+
var numericInputStyle = _objectSpread(_objectSpread({}, STYLE_INPUT), style);
|
|
122
|
+
if (this.state.focusOn) {
|
|
123
|
+
numericInputStyle.border = "1px solid ".concat(SharedStyle.SECONDARY_COLOR.main);
|
|
124
|
+
}
|
|
125
|
+
var regexp = new RegExp("^-?([0-9]+)?\\.?([0-9]{0,".concat(precision, "})?$"));
|
|
126
|
+
var currValue = regexp.test(this.state.showedValue) ? this.state.showedValue : function () {
|
|
127
|
+
var n = parseFloat(_this3.state.showedValue);
|
|
128
|
+
return Number.isFinite(n) ? n.toFixed(precision) : _this3.state.showedValue;
|
|
129
|
+
}();
|
|
130
|
+
var different = parseFloat(this.props.value).toFixed(precision) !== parseFloat(this.state.showedValue).toFixed(precision);
|
|
131
|
+
var saveFn = function saveFn(e) {
|
|
132
|
+
e.stopPropagation();
|
|
133
|
+
if (!_this3.state.valid) return;
|
|
134
|
+
var savedValue = _this3.state.showedValue !== '' && _this3.state.showedValue !== '-' ? parseFloat(_this3.state.showedValue) : 0;
|
|
135
|
+
_this3.setState({
|
|
136
|
+
showedValue: savedValue
|
|
137
|
+
});
|
|
138
|
+
onChange({
|
|
139
|
+
target: {
|
|
140
|
+
value: savedValue
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
var translator = (_this$context = this.context) === null || _this$context === void 0 ? void 0 : _this$context.translator;
|
|
145
|
+
var projectActions = (_this$context2 = this.context) === null || _this$context2 === void 0 ? void 0 : _this$context2.projectActions;
|
|
146
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
style: {
|
|
148
|
+
position: 'relative'
|
|
149
|
+
}
|
|
150
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
151
|
+
autoFocus: this.state.focusOn,
|
|
152
|
+
readOnly: this.state.disabled,
|
|
153
|
+
type: "text",
|
|
154
|
+
value: currValue,
|
|
155
|
+
style: numericInputStyle,
|
|
156
|
+
onChange: function onChange(evt) {
|
|
157
|
+
var next = evt.nativeEvent.target.value;
|
|
158
|
+
var valid = regexp.test(next);
|
|
159
|
+
if (valid) {
|
|
160
|
+
_this3.setState({
|
|
161
|
+
showedValue: next
|
|
162
|
+
});
|
|
163
|
+
onValid === null || onValid === void 0 || onValid(evt.nativeEvent);
|
|
164
|
+
} else {
|
|
165
|
+
onInvalid === null || onInvalid === void 0 || onInvalid(evt.nativeEvent);
|
|
166
|
+
}
|
|
167
|
+
_this3.setState({
|
|
168
|
+
valid: valid
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
onFocus: function onFocus() {
|
|
172
|
+
return _this3.setState({
|
|
173
|
+
focusOn: true
|
|
174
|
+
});
|
|
175
|
+
},
|
|
176
|
+
onBlur: function onBlur() {
|
|
177
|
+
return _this3.setState({
|
|
178
|
+
focusOn: false
|
|
179
|
+
});
|
|
180
|
+
},
|
|
181
|
+
ref: this.inputRef,
|
|
182
|
+
onKeyDown: function onKeyDown(e) {
|
|
183
|
+
var keyCode = e.keyCode || e.which;
|
|
184
|
+
if (keyCode === KEYBOARD_BUTTON_CODE.ENTER || keyCode === KEYBOARD_BUTTON_CODE.TAB) {
|
|
185
|
+
var _this3$inputRef$curre, _this3$inputRef$curre2;
|
|
186
|
+
saveFn(e);
|
|
187
|
+
(_this3$inputRef$curre = _this3.inputRef.current) === null || _this3$inputRef$curre === void 0 || (_this3$inputRef$curre2 = _this3$inputRef$curre.blur) === null || _this3$inputRef$curre2 === void 0 || _this3$inputRef$curre2.call(_this3$inputRef$curre);
|
|
188
|
+
}
|
|
189
|
+
if (keyCode === KEYBOARD_BUTTON_CODE.ESC) {
|
|
190
|
+
var _projectActions$rollb;
|
|
191
|
+
projectActions === null || projectActions === void 0 || (_projectActions$rollb = projectActions.rollback) === null || _projectActions$rollb === void 0 || _projectActions$rollb.call(projectActions);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
placeholder: placeholder
|
|
195
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
196
|
+
onClick: function onClick(e) {
|
|
197
|
+
if (different) saveFn(e);
|
|
198
|
+
},
|
|
199
|
+
title: translator !== null && translator !== void 0 && translator.t ? translator.t('Confirm') : 'Confirm',
|
|
200
|
+
style: _objectSpread(_objectSpread({}, confirmStyle), {}, {
|
|
201
|
+
visibility: different ? 'visible' : 'hidden',
|
|
202
|
+
opacity: different ? '1' : '0'
|
|
203
|
+
})
|
|
204
|
+
}, /*#__PURE__*/React.createElement(MdUpdate, {
|
|
205
|
+
style: {
|
|
206
|
+
width: '100%',
|
|
207
|
+
height: '100%',
|
|
208
|
+
padding: '0.2em',
|
|
209
|
+
color: '#FFF'
|
|
210
|
+
}
|
|
211
|
+
})));
|
|
212
|
+
}
|
|
213
|
+
}]);
|
|
214
|
+
}(Component);
|
|
215
|
+
_defineProperty(FormNumberInput, "contextType", AppContext);
|
|
216
|
+
export { FormNumberInput as default };
|
|
217
|
+
FormNumberInput.propTypes = {
|
|
218
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
219
|
+
style: PropTypes.object,
|
|
220
|
+
onChange: PropTypes.func.isRequired,
|
|
221
|
+
onValid: PropTypes.func,
|
|
222
|
+
onInvalid: PropTypes.func,
|
|
223
|
+
min: PropTypes.number,
|
|
224
|
+
max: PropTypes.number,
|
|
225
|
+
precision: PropTypes.number,
|
|
226
|
+
placeholder: PropTypes.string,
|
|
227
|
+
disabled: PropTypes.bool,
|
|
228
|
+
focus: PropTypes.bool
|
|
229
|
+
};
|
|
230
|
+
FormNumberInput.defaultProps = {
|
|
231
|
+
value: 0,
|
|
232
|
+
style: {},
|
|
233
|
+
min: Number.MIN_SAFE_INTEGER,
|
|
234
|
+
max: Number.MAX_SAFE_INTEGER,
|
|
235
|
+
precision: 2,
|
|
236
|
+
disabled: false,
|
|
237
|
+
focus: false
|
|
238
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
4
|
+
var _excluded = ["children", "style"];
|
|
5
|
+
var _templateObject;
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import * as SharedStyle from "../../shared-style";
|
|
8
|
+
import styled from 'styled-components';
|
|
9
|
+
import { TEXT_COLOR_NEUTRAL_3, DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR } from "../../constants";
|
|
10
|
+
var StyledSelect = styled.select(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n width: 120px;\n float: right;\n padding: 15px 10px 12px 0px;\n color: ", ";\n border: 2px solid;\n font-family: ", ";\n font-size: 12px;\n font-weight: 600;\n line-height: 17px;\n text-align: right;\n outline: none;\n border-radius: 5px;\n :hover {\n border-color: ", ";\n }\n :focus {\n border-color: ", ";\n }\n"])), TEXT_COLOR_NEUTRAL_3, DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR, SECONDARY_PURPLE_COLOR);
|
|
11
|
+
export default function FormSelect(_ref) {
|
|
12
|
+
var children = _ref.children,
|
|
13
|
+
style = _ref.style,
|
|
14
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/React.createElement(StyledSelect, _extends({
|
|
16
|
+
type: "text",
|
|
17
|
+
style: style
|
|
18
|
+
}, rest), children);
|
|
19
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["value", "onChange", "min", "max", "step"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import FormTextInput from "./form-text-input";
|
|
6
|
+
var sliderContainerStyle = {
|
|
7
|
+
display: 'inline-block',
|
|
8
|
+
width: '80%',
|
|
9
|
+
marginRight: '5%'
|
|
10
|
+
};
|
|
11
|
+
var sliderStyle = {
|
|
12
|
+
display: 'block',
|
|
13
|
+
width: '100%',
|
|
14
|
+
height: '30px'
|
|
15
|
+
};
|
|
16
|
+
var textContainerStyle = {
|
|
17
|
+
display: 'inline-block',
|
|
18
|
+
width: '15%',
|
|
19
|
+
"float": 'right'
|
|
20
|
+
};
|
|
21
|
+
var textStyle = {
|
|
22
|
+
height: '34px',
|
|
23
|
+
textAlign: 'center'
|
|
24
|
+
};
|
|
25
|
+
export default function FormNumberInput(_ref) {
|
|
26
|
+
var value = _ref.value,
|
|
27
|
+
onChange = _ref.onChange,
|
|
28
|
+
_ref$min = _ref.min,
|
|
29
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
30
|
+
_ref$max = _ref.max,
|
|
31
|
+
max = _ref$max === void 0 ? 100 : _ref$max,
|
|
32
|
+
_ref$step = _ref.step,
|
|
33
|
+
step = _ref$step === void 0 ? 1 : _ref$step,
|
|
34
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
+
// Handle both slider and text input changes
|
|
36
|
+
var handleSliderChange = function handleSliderChange(e) {
|
|
37
|
+
onChange(Number(e.target.value));
|
|
38
|
+
};
|
|
39
|
+
var handleTextChange = function handleTextChange(e) {
|
|
40
|
+
var val = e.target.value === '' ? '' : Number(e.target.value);
|
|
41
|
+
onChange(val);
|
|
42
|
+
};
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
style: sliderContainerStyle
|
|
45
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
46
|
+
type: "range",
|
|
47
|
+
style: sliderStyle,
|
|
48
|
+
min: min,
|
|
49
|
+
max: max,
|
|
50
|
+
step: step,
|
|
51
|
+
value: value,
|
|
52
|
+
onChange: handleSliderChange
|
|
53
|
+
}, rest))), /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
style: textContainerStyle
|
|
55
|
+
}, /*#__PURE__*/React.createElement(FormTextInput, {
|
|
56
|
+
value: value,
|
|
57
|
+
onChange: handleTextChange,
|
|
58
|
+
style: textStyle
|
|
59
|
+
})));
|
|
60
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Button from "./button";
|
|
6
|
+
import * as SharedStyle from "../../shared-style";
|
|
7
|
+
var STYLE = {
|
|
8
|
+
borderColor: '#415375',
|
|
9
|
+
backgroundColor: '#415375',
|
|
10
|
+
color: SharedStyle.COLORS.white
|
|
11
|
+
};
|
|
12
|
+
var STYLE_HOVER = {
|
|
13
|
+
borderColor: '#1f3149',
|
|
14
|
+
backgroundColor: '#1f3149',
|
|
15
|
+
color: SharedStyle.COLORS.white
|
|
16
|
+
};
|
|
17
|
+
export default function FormSubmitButton(_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
21
|
+
type: "submit",
|
|
22
|
+
style: STYLE,
|
|
23
|
+
styleHover: STYLE_HOVER
|
|
24
|
+
}, rest), children);
|
|
25
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
9
|
+
var _excluded = ["style"];
|
|
10
|
+
var _templateObject;
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
|
+
import React, { Component } from 'react';
|
|
14
|
+
import * as SharedStyle from "../../shared-style";
|
|
15
|
+
import { PROJECT_NAME_LENGTH_LIMIT, TEXT_COLOR_NEUTRAL_3, BG_COLOR_0, DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR } from "../../constants";
|
|
16
|
+
import styled from 'styled-components';
|
|
17
|
+
var StyledInput = styled.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n padding: 15px 10px 12px 0px;\n width: 120px;\n font-family: ", ";\n font-size: 12px;\n font-weight: 600;\n line-height: 17px;\n color: ", ";\n background-color: ", ";\n border: 2px solid;\n text-align: right;\n float: right;\n border-radius: 5px;\n outline: 0;\n :focus {\n border-color: ", ";\n }\n"])), DEFAULT_FONT_FAMILY, TEXT_COLOR_NEUTRAL_3, BG_COLOR_0, SECONDARY_PURPLE_COLOR);
|
|
18
|
+
var FormTextInput = /*#__PURE__*/function (_Component) {
|
|
19
|
+
function FormTextInput(props) {
|
|
20
|
+
var _this;
|
|
21
|
+
_classCallCheck(this, FormTextInput);
|
|
22
|
+
_this = _callSuper(this, FormTextInput, [props]);
|
|
23
|
+
_this.state = {
|
|
24
|
+
focus: false
|
|
25
|
+
};
|
|
26
|
+
_this.input = /*#__PURE__*/React.createRef(null);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
_inherits(FormTextInput, _Component);
|
|
30
|
+
return _createClass(FormTextInput, [{
|
|
31
|
+
key: "componentDidMount",
|
|
32
|
+
value: function componentDidMount() {
|
|
33
|
+
if (this.input.current) {
|
|
34
|
+
this.input.current.select();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
key: "render",
|
|
39
|
+
value: function render() {
|
|
40
|
+
var _this2 = this;
|
|
41
|
+
var _this$props = this.props,
|
|
42
|
+
style = _this$props.style,
|
|
43
|
+
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
44
|
+
return /*#__PURE__*/React.createElement(StyledInput, _extends({
|
|
45
|
+
ref: this.input,
|
|
46
|
+
onFocus: function onFocus(e) {
|
|
47
|
+
return _this2.setState({
|
|
48
|
+
focus: true
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
onBlur: function onBlur(e) {
|
|
52
|
+
return _this2.setState({
|
|
53
|
+
focus: false
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
style: style
|
|
57
|
+
// autoFocus
|
|
58
|
+
,
|
|
59
|
+
type: "text"
|
|
60
|
+
}, rest, {
|
|
61
|
+
maxLength: PROJECT_NAME_LENGTH_LIMIT
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
}]);
|
|
65
|
+
}(Component);
|
|
66
|
+
export { FormTextInput as default };
|
|
67
|
+
FormTextInput.defaultProps = {
|
|
68
|
+
style: {}
|
|
69
|
+
};
|