@fonixtree/magic-design 0.1.76 → 0.1.78
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/assets/fonts/magic-box-iconfont.css +23 -3
- package/es/assets/fonts/magic-box-iconfont.css.bak +23 -3
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/layout-icon/imageTextLeft.svg +6 -0
- package/es/assets/images/layout-icon/imageTextRight.svg +6 -0
- package/es/assets/images/layout-icon/locationLayout.png +0 -0
- package/es/assets/less/modal.less +1 -1
- package/es/common/ColorPicker/index.js +4 -1
- package/es/common/Field/index.js +20 -3
- package/es/common/ImageLazy/index.js +172 -0
- package/es/common/ImageLazy/index.less +0 -0
- package/es/common/ImagePicker/index.js +50 -5
- package/es/common/ImagePicker/index.less +1 -0
- package/es/common/LinkModal/BundleCampaign/index.js +2 -2
- package/es/common/LinkModal/CatgTable/index.js +1 -1
- package/es/common/LinkModal/CouponTable/index.js +10 -2
- package/es/common/LinkModal/FilteredProductModal/index.js +12 -9
- package/es/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/es/common/LinkModal/index.js +1 -1
- package/es/common/ProductModal/index.js +25 -32
- package/es/common/Video/index.js +11 -3
- package/es/common/Video/index.less +11 -7
- package/es/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/es/composite-comp/bol/components/Carousel/index.js +27 -3
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +11 -20
- package/es/composite-comp/bol/components/Carousel/pc/index.js +4 -2
- package/es/composite-comp/bol/components/CustomCode/defaultJSON.js +39 -0
- package/es/composite-comp/bol/components/CustomCode/index.js +138 -0
- package/es/composite-comp/bol/components/ImageText/pc/index.js +95 -3
- package/es/composite-comp/bol/components/ImageText/pc/index.less +32 -0
- package/es/composite-comp/bol/components/Location/defaultJSON.js +60 -0
- package/es/composite-comp/bol/components/Location/index.js +100 -0
- package/es/composite-comp/bol/components/Location/index.less +15 -0
- package/es/composite-comp/bol/components/Video/defaultJSON.js +24 -0
- package/es/composite-comp/bol/config-panels/CustomCodeConfig/MyEditor/index.js +42 -0
- package/es/composite-comp/bol/config-panels/CustomCodeConfig/index.js +111 -0
- package/es/composite-comp/bol/config-panels/LocationConfig/index.js +149 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +182 -2
- package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +114 -2
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +113 -2
- package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +53 -2
- package/es/composite-comp/common/components/ProductItem/index.js +8 -4
- package/es/composite-comp/common/components/ProductItem/index.less +30 -15
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +16 -3
- package/es/composite-comp/dito/components/Recommend/pc/index.js +2 -1
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +8 -0
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +67 -7
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
- package/es/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +46 -37
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
- package/es/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
- package/es/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
- package/es/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
- package/es/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +68 -1
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -4
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/es/constants/component-types.js +10 -2
- package/es/constants/index.js +10 -1
- package/es/constants/layout.js +21 -1
- package/es/core/Designer/AiImageGenerator/GenerateSize/index.js +6 -6
- package/es/core/Designer/AiImageGenerator/History/index.js +147 -0
- package/es/core/Designer/AiImageGenerator/History/index.less +75 -0
- package/es/core/Designer/AiImageGenerator/NumberSlider/index.js +31 -0
- package/es/core/Designer/AiImageGenerator/NumberSlider/index.less +8 -0
- package/es/core/Designer/AiImageGenerator/UploadReference/index.js +18 -8
- package/es/core/Designer/AiImageGenerator/UploadReference/index.less +6 -0
- package/es/core/Designer/AiImageGenerator/index.js +364 -63
- package/es/core/Designer/AiImageGenerator/index.less +70 -46
- package/es/core/Designer/ChatRobot/index.js +51 -14
- package/es/core/Designer/ChatRobot/index.less +11 -0
- package/es/core/Designer/ConfigPanel/index.js +2 -1
- package/es/core/Designer/FonixtreeGpt/index.js +32 -171
- package/es/core/Designer/LeftTitle/index.js +1 -1
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.js +96 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.js +101 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.less +60 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/CircleSVG.js +52 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/InitialSVG.js +51 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/SquareSVG.js +58 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +96 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +105 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.js +93 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.js +133 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.less +60 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/CJLDecimalSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/DecimalSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerAlphaSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerRomanSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperAlphaSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperRomanSVG.js +46 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +105 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/BackgroundSVG.js +29 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/BoldSVG.js +29 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/FontColorSVG.js +49 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/ItalicSVG.js +29 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/LinkSVG.js +26 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/OrderSVG.js +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/StrikeSVG.js +31 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/UnderlineSVG.js +36 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/UnorderSVG.js +41 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.js +151 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.less +25 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/type.js +1 -0
- package/es/core/Designer/ToolBarModal/index.js +366 -0
- package/es/core/Designer/ToolBarModal/index.less +32 -0
- package/es/core/Designer/index.js +33 -10
- package/es/core/Renderer/index.js +20 -21
- package/es/decorator/index.js +38 -1
- package/es/decorator/lazyLoadDecorator.js +75 -0
- package/es/locale/en/en.json +6 -1
- package/es/locale/es/es.json +6 -1
- package/es/locale/id/id.json +6 -1
- package/es/meta-comp/components/Button/index.js +7 -0
- package/es/meta-comp/components/Image/index.js +19 -3
- package/es/meta-comp/components/Text/formats/fontFamily.js +58 -0
- package/es/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/es/meta-comp/components/Text/formats/fontWeight.js +58 -0
- package/es/meta-comp/components/Text/formats/listStyleTypeStyle.js +58 -0
- package/es/meta-comp/components/Text/formats/textDecorationColor.js +58 -0
- package/es/meta-comp/components/Text/formats/textDecorationStyle.js +58 -0
- package/es/meta-comp/components/Text/index.js +110 -372
- package/es/meta-comp/components/Text/index.less +57 -0
- package/es/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/es/meta-comp/config-panels/ImageConfig/index.js +3 -1
- package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.js +100 -0
- package/es/meta-comp/config-panels/TextConfig/TextEditModal/index.less +25 -0
- package/es/meta-comp/config-panels/TextConfig/UnderlineSelect/index.js +108 -0
- package/es/meta-comp/config-panels/TextConfig/UnderlineSelect/index.less +26 -0
- package/es/meta-comp/config-panels/TextConfig/index.js +9 -30
- package/es/meta-comp/config-panels/TextConfig/index.less +12 -16
- package/es/mobx/Frame.js +7 -1
- package/es/utils/androidUtil.js +6 -0
- package/es/utils/commonUtil.js +35 -7
- package/es/utils/coreUtil.js +15 -0
- package/es/utils/currencyUtil.js +29 -10
- package/lib/assets/fonts/magic-box-iconfont.css +23 -3
- package/lib/assets/fonts/magic-box-iconfont.css.bak +23 -3
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/layout-icon/imageTextLeft.svg +6 -0
- package/lib/assets/images/layout-icon/imageTextRight.svg +6 -0
- package/lib/assets/images/layout-icon/locationLayout.png +0 -0
- package/lib/assets/less/modal.less +1 -1
- package/lib/common/ColorPicker/index.js +4 -1
- package/lib/common/Field/index.js +20 -3
- package/lib/common/ImageLazy/index.js +172 -0
- package/lib/common/ImageLazy/index.less +0 -0
- package/lib/common/ImagePicker/index.js +50 -5
- package/lib/common/ImagePicker/index.less +1 -0
- package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
- package/lib/common/LinkModal/CatgTable/index.js +1 -1
- package/lib/common/LinkModal/CouponTable/index.js +10 -2
- package/lib/common/LinkModal/FilteredProductModal/index.js +12 -9
- package/lib/common/LinkModal/FilteredProductModal/index.less +1 -1
- package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/lib/common/LinkModal/index.js +1 -1
- package/lib/common/ProductModal/index.js +25 -32
- package/lib/common/Video/index.js +11 -3
- package/lib/common/Video/index.less +11 -7
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +6 -0
- package/lib/composite-comp/bol/components/Carousel/index.js +27 -3
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +11 -20
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +4 -2
- package/lib/composite-comp/bol/components/CustomCode/defaultJSON.js +39 -0
- package/lib/composite-comp/bol/components/CustomCode/index.js +138 -0
- package/lib/composite-comp/bol/components/ImageText/pc/index.js +95 -3
- package/lib/composite-comp/bol/components/ImageText/pc/index.less +32 -0
- package/lib/composite-comp/bol/components/Location/defaultJSON.js +60 -0
- package/lib/composite-comp/bol/components/Location/index.js +100 -0
- package/lib/composite-comp/bol/components/Location/index.less +15 -0
- package/lib/composite-comp/bol/components/Video/defaultJSON.js +24 -0
- package/lib/composite-comp/bol/config-panels/CustomCodeConfig/MyEditor/index.js +42 -0
- package/lib/composite-comp/bol/config-panels/CustomCodeConfig/index.js +111 -0
- package/lib/composite-comp/bol/config-panels/LocationConfig/index.js +149 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +182 -2
- package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +114 -2
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +113 -2
- package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +53 -2
- package/lib/composite-comp/common/components/ProductItem/index.js +8 -4
- package/lib/composite-comp/common/components/ProductItem/index.less +30 -15
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +1 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +16 -3
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +2 -1
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +8 -0
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +67 -7
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +2 -2
- package/lib/composite-comp/dito/components/SignBoard/defaultJSON.js +41 -37
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +46 -37
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +0 -14
- package/lib/composite-comp/dito/components/SignBoard/pc/index.js +8 -11
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +39 -9
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/SignBoardConfigContent/index.js +9 -47
- package/lib/composite-comp/dito/config-panels/SignBoardConfig/index.js +9 -2
- package/lib/composite-comp/dito/second-config-panels/MobileNavigationSecondConfig/index.js +68 -1
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +4 -4
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +14 -2
- package/lib/constants/component-types.js +10 -2
- package/lib/constants/index.js +10 -1
- package/lib/constants/layout.js +21 -1
- package/lib/core/Designer/AiImageGenerator/GenerateSize/index.js +6 -6
- package/lib/core/Designer/AiImageGenerator/History/index.js +147 -0
- package/lib/core/Designer/AiImageGenerator/History/index.less +75 -0
- package/lib/core/Designer/AiImageGenerator/NumberSlider/index.js +31 -0
- package/lib/core/Designer/AiImageGenerator/NumberSlider/index.less +8 -0
- package/lib/core/Designer/AiImageGenerator/UploadReference/index.js +18 -8
- package/lib/core/Designer/AiImageGenerator/UploadReference/index.less +6 -0
- package/lib/core/Designer/AiImageGenerator/index.js +364 -63
- package/lib/core/Designer/AiImageGenerator/index.less +70 -46
- package/lib/core/Designer/ChatRobot/index.js +51 -14
- package/lib/core/Designer/ChatRobot/index.less +11 -0
- package/lib/core/Designer/ConfigPanel/index.js +2 -1
- package/lib/core/Designer/FonixtreeGpt/index.js +32 -171
- package/lib/core/Designer/LeftTitle/index.js +1 -1
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.js +99 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/AlignSelectPicker/index.less +54 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.js +96 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.js +101 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/IconSelectPicker/index.less +60 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/CircleSVG.js +52 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/InitialSVG.js +51 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/images/SquareSVG.js +58 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +96 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +105 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.js +99 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/LinkInputPicker/index.less +39 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.js +93 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/LinkBtn/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.js +133 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/IconSelectPicker/index.less +60 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/CJLDecimalSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/DecimalSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerAlphaSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/LowerRomanSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperAlphaSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/images/UpperRomanSVG.js +46 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +105 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/BackgroundSVG.js +29 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/BoldSVG.js +29 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/FontColorSVG.js +49 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/ItalicSVG.js +29 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/LinkSVG.js +26 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/OrderSVG.js +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/StrikeSVG.js +31 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/UnderlineSVG.js +36 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/UnorderSVG.js +41 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +151 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.less +25 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/type.js +1 -0
- package/lib/core/Designer/ToolBarModal/index.js +366 -0
- package/lib/core/Designer/ToolBarModal/index.less +32 -0
- package/lib/core/Designer/index.js +33 -10
- package/lib/core/Renderer/index.js +20 -21
- package/lib/decorator/index.js +38 -1
- package/lib/decorator/lazyLoadDecorator.js +75 -0
- package/lib/locale/en/en.json +6 -1
- package/lib/locale/es/es.json +6 -1
- package/lib/locale/id/id.json +6 -1
- package/lib/meta-comp/components/Button/index.js +7 -0
- package/lib/meta-comp/components/Image/index.js +19 -3
- package/lib/meta-comp/components/Text/formats/fontFamily.js +58 -0
- package/lib/meta-comp/components/Text/formats/fontStyle.js +58 -0
- package/lib/meta-comp/components/Text/formats/fontWeight.js +58 -0
- package/lib/meta-comp/components/Text/formats/listStyleTypeStyle.js +58 -0
- package/lib/meta-comp/components/Text/formats/textDecorationColor.js +58 -0
- package/lib/meta-comp/components/Text/formats/textDecorationStyle.js +58 -0
- package/lib/meta-comp/components/Text/index.js +110 -372
- package/lib/meta-comp/components/Text/index.less +57 -0
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +30 -28
- package/lib/meta-comp/config-panels/ImageConfig/index.js +3 -1
- package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.js +100 -0
- package/lib/meta-comp/config-panels/TextConfig/TextEditModal/index.less +25 -0
- package/lib/meta-comp/config-panels/TextConfig/UnderlineSelect/index.js +108 -0
- package/lib/meta-comp/config-panels/TextConfig/UnderlineSelect/index.less +26 -0
- package/lib/meta-comp/config-panels/TextConfig/index.js +9 -30
- package/lib/meta-comp/config-panels/TextConfig/index.less +12 -16
- package/lib/mobx/Frame.js +7 -1
- package/lib/utils/androidUtil.js +6 -0
- package/lib/utils/commonUtil.js +35 -7
- package/lib/utils/coreUtil.js +15 -0
- package/lib/utils/currencyUtil.js +29 -10
- package/package.json +5 -2
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
|
|
11
11
|
|
|
12
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
15
|
|
|
14
16
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -46,18 +48,128 @@ function (_super) {
|
|
|
46
48
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
47
49
|
|
|
48
50
|
_this.state = {};
|
|
51
|
+
|
|
52
|
+
_this.getImageRecommendSize = function (customize) {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
|
|
55
|
+
var obj = null;
|
|
56
|
+
|
|
57
|
+
if ((0, _coreUtil.isPc)()) {
|
|
58
|
+
switch ((_a = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _a === void 0 ? void 0 : _a.pcLayout) {
|
|
59
|
+
case 'layout1':
|
|
60
|
+
obj = {
|
|
61
|
+
width: 1440,
|
|
62
|
+
height: 912
|
|
63
|
+
};
|
|
64
|
+
break;
|
|
65
|
+
|
|
66
|
+
case 'layout2':
|
|
67
|
+
{
|
|
68
|
+
switch (customize === null || customize === void 0 ? void 0 : customize.pcRowNum) {
|
|
69
|
+
case 6:
|
|
70
|
+
obj = {
|
|
71
|
+
width: 220,
|
|
72
|
+
height: 166
|
|
73
|
+
};
|
|
74
|
+
break;
|
|
75
|
+
|
|
76
|
+
case 5:
|
|
77
|
+
obj = {
|
|
78
|
+
width: 268,
|
|
79
|
+
height: 202
|
|
80
|
+
};
|
|
81
|
+
break;
|
|
82
|
+
|
|
83
|
+
case 4:
|
|
84
|
+
obj = {
|
|
85
|
+
width: 342,
|
|
86
|
+
height: 256
|
|
87
|
+
};
|
|
88
|
+
break;
|
|
89
|
+
|
|
90
|
+
case 3:
|
|
91
|
+
obj = {
|
|
92
|
+
width: 464,
|
|
93
|
+
height: 348
|
|
94
|
+
};
|
|
95
|
+
break;
|
|
96
|
+
|
|
97
|
+
case 2:
|
|
98
|
+
obj = {
|
|
99
|
+
width: 708,
|
|
100
|
+
height: 531
|
|
101
|
+
};
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
switch ((_b = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _b === void 0 ? void 0 : _b.h5Layout) {
|
|
110
|
+
case 'layout1':
|
|
111
|
+
obj = {
|
|
112
|
+
width: 375,
|
|
113
|
+
height: 282
|
|
114
|
+
};
|
|
115
|
+
break;
|
|
116
|
+
|
|
117
|
+
case 'layout2':
|
|
118
|
+
{
|
|
119
|
+
switch (customize === null || customize === void 0 ? void 0 : customize.rowNum) {
|
|
120
|
+
case 5:
|
|
121
|
+
obj = {
|
|
122
|
+
width: 69,
|
|
123
|
+
height: 50
|
|
124
|
+
};
|
|
125
|
+
break;
|
|
126
|
+
|
|
127
|
+
case 4:
|
|
128
|
+
obj = {
|
|
129
|
+
width: 85,
|
|
130
|
+
height: 66
|
|
131
|
+
};
|
|
132
|
+
break;
|
|
133
|
+
|
|
134
|
+
case 3:
|
|
135
|
+
obj = {
|
|
136
|
+
width: 117,
|
|
137
|
+
height: 87
|
|
138
|
+
};
|
|
139
|
+
break;
|
|
140
|
+
|
|
141
|
+
case 2:
|
|
142
|
+
obj = {
|
|
143
|
+
width: 182,
|
|
144
|
+
height: 137
|
|
145
|
+
};
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return obj;
|
|
155
|
+
};
|
|
156
|
+
|
|
49
157
|
return _this;
|
|
50
158
|
}
|
|
51
159
|
|
|
52
160
|
ImageGallerySecondConfig.prototype.render = function () {
|
|
53
|
-
var
|
|
161
|
+
var _a = this.props,
|
|
162
|
+
panelProps = _a.panelProps,
|
|
163
|
+
parentNode = _a.parentNode;
|
|
164
|
+
var size = this.getImageRecommendSize(parentNode.customize);
|
|
54
165
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
55
166
|
className: "image_gallery_second_conf_wrap",
|
|
56
167
|
style: {
|
|
57
168
|
marginTop: '20px'
|
|
58
169
|
}
|
|
59
170
|
}, /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
60
|
-
data: panelProps.image
|
|
171
|
+
data: panelProps.image,
|
|
172
|
+
recommendImgSize: size
|
|
61
173
|
}));
|
|
62
174
|
};
|
|
63
175
|
|
|
@@ -81,13 +81,123 @@ function (_super) {
|
|
|
81
81
|
|
|
82
82
|
_this.state = {};
|
|
83
83
|
|
|
84
|
+
_this.getImageRecommendSize = function (customize) {
|
|
85
|
+
var _a, _b, _c;
|
|
86
|
+
|
|
87
|
+
var obj = null;
|
|
88
|
+
|
|
89
|
+
if ((0, _coreUtil.isPc)()) {
|
|
90
|
+
if (((_a = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _a === void 0 ? void 0 : _a.pcLayout) == 'normal' || ((_b = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _b === void 0 ? void 0 : _b.pcLayout) == 'center') {
|
|
91
|
+
switch (customize === null || customize === void 0 ? void 0 : customize.pcRowNum) {
|
|
92
|
+
case 5:
|
|
93
|
+
obj = {
|
|
94
|
+
width: 119,
|
|
95
|
+
height: 90
|
|
96
|
+
};
|
|
97
|
+
break;
|
|
98
|
+
|
|
99
|
+
case 4:
|
|
100
|
+
obj = {
|
|
101
|
+
width: 150,
|
|
102
|
+
height: 112
|
|
103
|
+
};
|
|
104
|
+
break;
|
|
105
|
+
|
|
106
|
+
case 3:
|
|
107
|
+
obj = {
|
|
108
|
+
width: 205,
|
|
109
|
+
height: 154
|
|
110
|
+
};
|
|
111
|
+
break;
|
|
112
|
+
|
|
113
|
+
case 2:
|
|
114
|
+
obj = {
|
|
115
|
+
width: 314,
|
|
116
|
+
height: 236
|
|
117
|
+
};
|
|
118
|
+
break;
|
|
119
|
+
|
|
120
|
+
case 1:
|
|
121
|
+
obj = {
|
|
122
|
+
width: 640,
|
|
123
|
+
height: 480
|
|
124
|
+
};
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
obj = {
|
|
129
|
+
width: 65,
|
|
130
|
+
height: 65
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
} else {
|
|
134
|
+
switch ((_c = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _c === void 0 ? void 0 : _c.h5Layout) {
|
|
135
|
+
case 'normal2':
|
|
136
|
+
obj = {
|
|
137
|
+
width: 190,
|
|
138
|
+
height: 142
|
|
139
|
+
};
|
|
140
|
+
break;
|
|
141
|
+
|
|
142
|
+
case 'normal3':
|
|
143
|
+
{
|
|
144
|
+
switch (customize === null || customize === void 0 ? void 0 : customize.rowNum) {
|
|
145
|
+
case 4:
|
|
146
|
+
obj = {
|
|
147
|
+
width: 61,
|
|
148
|
+
height: 61
|
|
149
|
+
};
|
|
150
|
+
break;
|
|
151
|
+
|
|
152
|
+
case 3:
|
|
153
|
+
obj = {
|
|
154
|
+
width: 91,
|
|
155
|
+
height: 91
|
|
156
|
+
};
|
|
157
|
+
break;
|
|
158
|
+
|
|
159
|
+
case 2:
|
|
160
|
+
obj = {
|
|
161
|
+
width: 150,
|
|
162
|
+
height: 150
|
|
163
|
+
};
|
|
164
|
+
break;
|
|
165
|
+
|
|
166
|
+
case 1:
|
|
167
|
+
obj = {
|
|
168
|
+
width: 327,
|
|
169
|
+
height: 327
|
|
170
|
+
};
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
default:
|
|
178
|
+
obj = {
|
|
179
|
+
width: 38,
|
|
180
|
+
height: 38
|
|
181
|
+
};
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return obj;
|
|
187
|
+
};
|
|
188
|
+
|
|
84
189
|
_this.getContentPanel = function (data, needHover) {
|
|
190
|
+
var parentNode = _this.props.parentNode;
|
|
191
|
+
|
|
192
|
+
var size = _this.getImageRecommendSize(parentNode.customize);
|
|
193
|
+
|
|
85
194
|
var source = [{
|
|
86
195
|
key: 'imageTextSecondContent1',
|
|
87
196
|
name: (0, _locale.i18n)('IMAGE'),
|
|
88
197
|
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
89
198
|
data: data.image,
|
|
90
|
-
needHover: needHover
|
|
199
|
+
needHover: needHover,
|
|
200
|
+
recommendImgSize: size
|
|
91
201
|
}),
|
|
92
202
|
metaOption: data.image
|
|
93
203
|
}, {
|
|
@@ -182,7 +292,8 @@ function (_super) {
|
|
|
182
292
|
};
|
|
183
293
|
|
|
184
294
|
ImageTextSecondConfig.defaultProps = {
|
|
185
|
-
panelProps: {}
|
|
295
|
+
panelProps: {},
|
|
296
|
+
parentNode: {}
|
|
186
297
|
};
|
|
187
298
|
return ImageTextSecondConfig;
|
|
188
299
|
}(_react["default"].Component);
|
|
@@ -75,8 +75,58 @@ function (_super) {
|
|
|
75
75
|
_this.setState({});
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
+
_this.getImageRecommendSize = function (customize) {
|
|
79
|
+
var _a;
|
|
80
|
+
|
|
81
|
+
var obj = null;
|
|
82
|
+
|
|
83
|
+
if ((0, _coreUtil.isPc)()) {
|
|
84
|
+
switch ((_a = customize === null || customize === void 0 ? void 0 : customize.layout) === null || _a === void 0 ? void 0 : _a.pcLayout) {
|
|
85
|
+
case 'layout1':
|
|
86
|
+
obj = {
|
|
87
|
+
width: 1280,
|
|
88
|
+
height: 600
|
|
89
|
+
};
|
|
90
|
+
break;
|
|
91
|
+
|
|
92
|
+
case 'layout2':
|
|
93
|
+
obj = {
|
|
94
|
+
width: 640,
|
|
95
|
+
height: 600
|
|
96
|
+
};
|
|
97
|
+
break;
|
|
98
|
+
|
|
99
|
+
case 'layout3':
|
|
100
|
+
obj = {
|
|
101
|
+
width: 410,
|
|
102
|
+
height: 300
|
|
103
|
+
};
|
|
104
|
+
break;
|
|
105
|
+
|
|
106
|
+
default:
|
|
107
|
+
obj = {
|
|
108
|
+
width: 440,
|
|
109
|
+
height: 272
|
|
110
|
+
};
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
obj = {
|
|
115
|
+
width: 343,
|
|
116
|
+
height: 212
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return obj;
|
|
121
|
+
};
|
|
122
|
+
|
|
78
123
|
_this.getContentPanel = function () {
|
|
79
|
-
var
|
|
124
|
+
var _a = _this.props,
|
|
125
|
+
panelProps = _a.panelProps,
|
|
126
|
+
parentNode = _a.parentNode;
|
|
127
|
+
|
|
128
|
+
var size = _this.getImageRecommendSize(parentNode.customize);
|
|
129
|
+
|
|
80
130
|
var source = [{
|
|
81
131
|
key: '1',
|
|
82
132
|
name: 'Overlay',
|
|
@@ -84,7 +134,8 @@ function (_super) {
|
|
|
84
134
|
data: panelProps.overilay,
|
|
85
135
|
needClickArea: false,
|
|
86
136
|
needHover: false,
|
|
87
|
-
needURL: false
|
|
137
|
+
needURL: false,
|
|
138
|
+
recommendImgSize: size
|
|
88
139
|
}),
|
|
89
140
|
metaOption: panelProps.overilay
|
|
90
141
|
}, {
|
|
@@ -133,7 +133,7 @@ function (_super) {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
var pricePrefix = (0, _commonUtil.ensure)(function () {
|
|
136
|
-
return window.
|
|
136
|
+
return window.systemParams.prefix;
|
|
137
137
|
}, 'Rp');
|
|
138
138
|
|
|
139
139
|
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
@@ -202,11 +202,13 @@ function (_super) {
|
|
|
202
202
|
text: _price
|
|
203
203
|
}),
|
|
204
204
|
readonly: true
|
|
205
|
-
}),
|
|
205
|
+
}), panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
206
|
+
className: "price-sold-wrap"
|
|
207
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
206
208
|
className: "old-price-wrap"
|
|
207
209
|
}, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
|
|
208
210
|
className: "discount"
|
|
209
|
-
}, "-", discount, "%"), /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
211
|
+
}, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
210
212
|
className: "old-price",
|
|
211
213
|
data: __assign(__assign({}, panelProps.salesPrice), {
|
|
212
214
|
text: oldPrice
|
|
@@ -215,7 +217,9 @@ function (_super) {
|
|
|
215
217
|
style: {
|
|
216
218
|
color: panelProps.salesPrice.content.color
|
|
217
219
|
}
|
|
218
|
-
})), showProgress &&
|
|
220
|
+
})), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
+
className: "sold-count"
|
|
222
|
+
}, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && panelProps.salesProgressVisible.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
219
223
|
className: "progress-wrap"
|
|
220
224
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
221
225
|
className: "text"
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
border: 1px solid #D2D9E5;
|
|
6
6
|
width: 142px;
|
|
7
7
|
cursor: pointer;
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
|
|
8
11
|
|
|
9
12
|
.img-wrap {
|
|
10
13
|
position: relative;
|
|
@@ -50,28 +53,40 @@
|
|
|
50
53
|
text-overflow: ellipsis;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
.
|
|
56
|
+
.price-sold-wrap {
|
|
54
57
|
display: flex;
|
|
55
58
|
margin-top: 0px;
|
|
56
|
-
align-items:
|
|
59
|
+
align-items: center;
|
|
57
60
|
white-space: nowrap;
|
|
58
61
|
overflow: hidden;
|
|
59
62
|
text-overflow: ellipsis;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
line-height: 15px;
|
|
65
|
+
.old-price-wrap {
|
|
66
|
+
display: flex;
|
|
67
|
+
line-height: 13px;
|
|
68
|
+
.discount {
|
|
69
|
+
margin-right: 3px;
|
|
70
|
+
font-family: 'Montserrat';
|
|
71
|
+
font-style: normal;
|
|
72
|
+
font-weight: 700;
|
|
73
|
+
font-size: 8px;
|
|
74
|
+
line-height: 15px;
|
|
75
|
+
color: #fff;
|
|
76
|
+
padding: 0 4px;
|
|
77
|
+
background-color: #CE1126;
|
|
78
|
+
}
|
|
79
|
+
.old-price {
|
|
80
|
+
text-decoration: line-through;
|
|
81
|
+
width: fit-content;
|
|
82
|
+
}
|
|
71
83
|
}
|
|
72
84
|
|
|
73
|
-
.
|
|
74
|
-
|
|
85
|
+
.sold-count {
|
|
86
|
+
color: #7b7b7b;
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
text-align: right ;
|
|
89
|
+
flex-grow: 1;
|
|
75
90
|
}
|
|
76
91
|
}
|
|
77
92
|
|
|
@@ -384,7 +384,8 @@ function (_super) {
|
|
|
384
384
|
sortType: '1',
|
|
385
385
|
intelligentType: intelligentType,
|
|
386
386
|
intelligentValue: intelligentValue.join(','),
|
|
387
|
-
aggregation: false
|
|
387
|
+
aggregation: false,
|
|
388
|
+
storeId: window.magicDesign.storeId || ''
|
|
388
389
|
}, 'POST')];
|
|
389
390
|
|
|
390
391
|
case 4:
|
|
@@ -634,7 +635,14 @@ function (_super) {
|
|
|
634
635
|
layout: layout === 'layout2' ? 'horizontal' : 'vertical' // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
635
636
|
,
|
|
636
637
|
onItemClick: function onItemClick() {
|
|
637
|
-
|
|
638
|
+
/** PTO 定制GA */
|
|
639
|
+
if (window.magicDesign.pushGA) {
|
|
640
|
+
window.magicDesign.pushGA(item, 'select_item', {
|
|
641
|
+
event_action: 'Select Item'
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
638
646
|
},
|
|
639
647
|
panelProps: panelProps.content,
|
|
640
648
|
showProgress: false
|
|
@@ -660,7 +668,12 @@ function (_super) {
|
|
|
660
668
|
imgWidth: imgWidth // onItemClick={() => clickUrl(`/product/detail/${item.offerId}?productId=${item.sppProductId || item.productId || ''}`)}
|
|
661
669
|
,
|
|
662
670
|
onItemClick: function onItemClick() {
|
|
663
|
-
|
|
671
|
+
/** PTO 定制GA */
|
|
672
|
+
if (window.magicDesign.pushGA) {
|
|
673
|
+
window.magicDesign.pushGA({}, 'select_item', item);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || item.productId || ''));
|
|
664
677
|
},
|
|
665
678
|
panelProps: panelProps.content,
|
|
666
679
|
showProgress: false
|
|
@@ -379,7 +379,8 @@ function (_super) {
|
|
|
379
379
|
sortType: '1',
|
|
380
380
|
intelligentType: intelligentType,
|
|
381
381
|
intelligentValue: intelligentValue.join(','),
|
|
382
|
-
aggregation: false
|
|
382
|
+
aggregation: false,
|
|
383
|
+
storeId: window.magicDesign.storeId || ''
|
|
383
384
|
}, 'POST')];
|
|
384
385
|
|
|
385
386
|
case 4:
|
|
@@ -197,7 +197,48 @@ function (_super) {
|
|
|
197
197
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
198
198
|
|
|
199
199
|
_this.state = {
|
|
200
|
-
messageNum: ''
|
|
200
|
+
messageNum: '',
|
|
201
|
+
cartNum: ''
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
_this.getCartNum = function () {
|
|
205
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
206
|
+
var num, cart;
|
|
207
|
+
return __generator(this, function (_a) {
|
|
208
|
+
switch (_a.label) {
|
|
209
|
+
case 0:
|
|
210
|
+
num = '';
|
|
211
|
+
if (!(localStorage.getItem('isLogin') === 'Y')) return [3
|
|
212
|
+
/*break*/
|
|
213
|
+
, 2];
|
|
214
|
+
return [4
|
|
215
|
+
/*yield*/
|
|
216
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/carts/num', {}, 'GET')];
|
|
217
|
+
|
|
218
|
+
case 1:
|
|
219
|
+
cart = _a.sent();
|
|
220
|
+
num = cart.num;
|
|
221
|
+
return [3
|
|
222
|
+
/*break*/
|
|
223
|
+
, 3];
|
|
224
|
+
|
|
225
|
+
case 2:
|
|
226
|
+
num = (localStorage.getItem('TEMP_CART') || []).length;
|
|
227
|
+
_a.label = 3;
|
|
228
|
+
|
|
229
|
+
case 3:
|
|
230
|
+
if (num > 0) {
|
|
231
|
+
this.setState({
|
|
232
|
+
cartNum: num
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return [2
|
|
237
|
+
/*return*/
|
|
238
|
+
];
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
});
|
|
201
242
|
};
|
|
202
243
|
|
|
203
244
|
_this.getMessageNum = function () {
|
|
@@ -228,14 +269,19 @@ function (_super) {
|
|
|
228
269
|
}
|
|
229
270
|
|
|
230
271
|
SearchMobile.prototype.componentDidMount = function () {
|
|
272
|
+
// const { data } = this.props;
|
|
273
|
+
// console.log('---mobile ', data);
|
|
231
274
|
this.getMessageNum();
|
|
275
|
+
this.getCartNum();
|
|
232
276
|
};
|
|
233
277
|
|
|
234
278
|
SearchMobile.prototype.render = function () {
|
|
235
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
279
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
236
280
|
|
|
237
281
|
var data = this.props.data;
|
|
238
|
-
var
|
|
282
|
+
var _q = this.state,
|
|
283
|
+
messageNum = _q.messageNum,
|
|
284
|
+
cartNum = _q.cartNum; // let styleWrap = {};
|
|
239
285
|
// if (data.content.background.bgType === 'color') {
|
|
240
286
|
// styleWrap = {
|
|
241
287
|
// backgroundColor: data.content.background.color,
|
|
@@ -269,10 +315,24 @@ function (_super) {
|
|
|
269
315
|
display: 'flex'
|
|
270
316
|
},
|
|
271
317
|
type: "icon-search2"
|
|
272
|
-
})), data.content && ((_f = data.content.icon) === null || _f === void 0 ? void 0 : _f.
|
|
318
|
+
})), data.content && ((_g = (_f = data.content.icon) === null || _f === void 0 ? void 0 : _f.cartIcon) === null || _g === void 0 ? void 0 : _g.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
319
|
+
className: "message-wrap"
|
|
320
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
321
|
+
color: (_j = (_h = data.content.icon) === null || _h === void 0 ? void 0 : _h.color) === null || _j === void 0 ? void 0 : _j.mobile,
|
|
322
|
+
onClick: function onClick() {
|
|
323
|
+
return (0, _coreUtil.clickUrl)('/main/cart');
|
|
324
|
+
},
|
|
325
|
+
size: (0, _commonUtil.convertToRem)(24),
|
|
326
|
+
style: {
|
|
327
|
+
display: 'flex'
|
|
328
|
+
},
|
|
329
|
+
type: "icon-ShoppingCartSimple1"
|
|
330
|
+
}), !!cartNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
331
|
+
className: "num"
|
|
332
|
+
}, cartNum)), data.content && ((_l = (_k = data.content.icon) === null || _k === void 0 ? void 0 : _k.messageIcon) === null || _l === void 0 ? void 0 : _l.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
273
333
|
className: "message-wrap"
|
|
274
334
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
275
|
-
color: (
|
|
335
|
+
color: (_o = (_m = data.content.icon) === null || _m === void 0 ? void 0 : _m.color) === null || _o === void 0 ? void 0 : _o.mobile,
|
|
276
336
|
onClick: function onClick() {
|
|
277
337
|
return (0, _coreUtil.clickUrl)('/message-center');
|
|
278
338
|
},
|
|
@@ -280,10 +340,10 @@ function (_super) {
|
|
|
280
340
|
style: {
|
|
281
341
|
display: 'flex'
|
|
282
342
|
},
|
|
283
|
-
type: "icon-
|
|
343
|
+
type: "icon-message"
|
|
284
344
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
285
345
|
className: "num"
|
|
286
|
-
}, messageNum))), data.content && ((
|
|
346
|
+
}, messageNum))), data.content && ((_p = data.content.logo) === null || _p === void 0 ? void 0 : _p.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
287
347
|
className: "logo"
|
|
288
348
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
289
349
|
data: data.content.logo,
|
|
@@ -117,7 +117,7 @@ function (_super) {
|
|
|
117
117
|
display: 'flex'
|
|
118
118
|
},
|
|
119
119
|
type: "icon-search2"
|
|
120
|
-
}))), data.content && data.content.icon.
|
|
120
|
+
}))), data.content && data.content.icon.cartIcon.pc && /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
121
|
className: "shopping-wrap",
|
|
122
122
|
onClick: function onClick() {
|
|
123
123
|
return (0, _coreUtil.clickUrl)('/main/cart');
|
|
@@ -129,7 +129,7 @@ function (_super) {
|
|
|
129
129
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
130
130
|
color: data.content.icon.color.pc,
|
|
131
131
|
size: 16,
|
|
132
|
-
type: "icon-
|
|
132
|
+
type: "icon-ShoppingCartSimple1"
|
|
133
133
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
134
134
|
className: "shopping-txt"
|
|
135
135
|
}, (0, _locale.i18n)('SHOPPING_CART')))), data.content && data.content.logo.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|