@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
package/es/common/Video/index.js
CHANGED
|
@@ -203,6 +203,8 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
207
|
+
|
|
206
208
|
|
|
207
209
|
/** 检查youtube依赖包 */
|
|
208
210
|
var checkYoutuVIdeo = function checkYoutuVIdeo() {
|
|
@@ -587,6 +589,7 @@ function (_super) {
|
|
|
587
589
|
/** YouTube播放器 */
|
|
588
590
|
|
|
589
591
|
_this.ytPlayer = null;
|
|
592
|
+
_this.timer = null;
|
|
590
593
|
/** 创建视频弹框显示 */
|
|
591
594
|
|
|
592
595
|
_this.createVideoModal = function (videoId) {
|
|
@@ -714,7 +717,11 @@ function (_super) {
|
|
|
714
717
|
}
|
|
715
718
|
|
|
716
719
|
Video.prototype.componentDidMount = function () {
|
|
717
|
-
this.getInit
|
|
720
|
+
this.timer = setTimeout(this.getInit, 1000);
|
|
721
|
+
};
|
|
722
|
+
|
|
723
|
+
Video.prototype.componentWillUnmount = function () {
|
|
724
|
+
this.timer && clearTimeout(this.timer);
|
|
718
725
|
};
|
|
719
726
|
|
|
720
727
|
Video.prototype.render = function () {
|
|
@@ -727,8 +734,9 @@ function (_super) {
|
|
|
727
734
|
}, opts.source ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
728
735
|
className: "video-wrap",
|
|
729
736
|
id: 'video' + videoId
|
|
730
|
-
}) : null, !play && /*#__PURE__*/_react["default"].createElement("
|
|
731
|
-
className: "cover-
|
|
737
|
+
}) : null, !play && opts.cover && /*#__PURE__*/_react["default"].createElement("img", {
|
|
738
|
+
className: "video-cover-img",
|
|
739
|
+
src: opts.cover
|
|
732
740
|
}));
|
|
733
741
|
};
|
|
734
742
|
|
|
@@ -3,17 +3,21 @@
|
|
|
3
3
|
height: 100%;
|
|
4
4
|
background-image: linear-gradient(0, rgba(0, 0, 0, .2), rgba(0, 0, 0, .1), rgba(0, 0, 0, .2));
|
|
5
5
|
|
|
6
|
-
.prism-player .prism-cover {
|
|
7
|
-
z-index: 0;
|
|
8
|
-
}
|
|
9
6
|
|
|
10
|
-
.cover-
|
|
7
|
+
.video-cover-img {
|
|
11
8
|
position: absolute;
|
|
12
|
-
|
|
9
|
+
top: 0;
|
|
13
10
|
right: 0;
|
|
11
|
+
left: 0;
|
|
14
12
|
bottom: 0;
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
object-fit: cover;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
z-index: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.prism-player .prism-cover {
|
|
20
|
+
z-index: 0;
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
.video-wrap {
|
|
@@ -208,6 +208,12 @@ function (_super) {
|
|
|
208
208
|
style: _this.getBackgroundStyle(item)
|
|
209
209
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
210
|
className: "carouselItem",
|
|
211
|
+
onClick: function onClick() {
|
|
212
|
+
/** PTO 定制GA */
|
|
213
|
+
if (window.magicDesign.pushGA) {
|
|
214
|
+
window.magicDesign.pushGA({}, 'select_promotion');
|
|
215
|
+
}
|
|
216
|
+
},
|
|
211
217
|
onMouseEnter: _this.mouseEnterWrap,
|
|
212
218
|
onMouseLeave: _this.mouseLeaveWrap,
|
|
213
219
|
style: _this.getItemStyle(item)
|
|
@@ -15,6 +15,8 @@ var _defaultJSON = require("./defaultJSON");
|
|
|
15
15
|
|
|
16
16
|
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
17
17
|
|
|
18
|
+
var _decorator = require("../../../../decorator");
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -65,21 +67,43 @@ function (_super) {
|
|
|
65
67
|
__extends(Carousel, _super);
|
|
66
68
|
|
|
67
69
|
function Carousel() {
|
|
68
|
-
|
|
70
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
+
|
|
72
|
+
_this.state = {
|
|
73
|
+
lazyShow: false
|
|
74
|
+
};
|
|
75
|
+
_this.carouselRef = /*#__PURE__*/_react["default"].createRef();
|
|
76
|
+
_this.intersectionObserver = null;
|
|
77
|
+
return _this;
|
|
69
78
|
}
|
|
70
79
|
|
|
80
|
+
Carousel.prototype.componentDidMount = function () {};
|
|
81
|
+
|
|
82
|
+
Carousel.prototype.componentWillUnmount = function () {};
|
|
83
|
+
|
|
71
84
|
Carousel.prototype.render = function () {
|
|
72
85
|
var nodeData = this.props.nodeData;
|
|
73
|
-
|
|
86
|
+
var lazyShow = this.state.lazyShow;
|
|
87
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
88
|
+
ref: this.carouselRef,
|
|
89
|
+
style: {
|
|
90
|
+
height: lazyShow ? 'auto' : 300
|
|
91
|
+
}
|
|
92
|
+
}, lazyShow && (window.magicDesign.device === 'pc' ? /*#__PURE__*/_react["default"].createElement(_pc["default"], {
|
|
74
93
|
data: nodeData
|
|
75
94
|
}) : /*#__PURE__*/_react["default"].createElement(_mobile["default"], {
|
|
76
95
|
data: nodeData
|
|
77
|
-
}));
|
|
96
|
+
})));
|
|
78
97
|
};
|
|
79
98
|
|
|
80
99
|
Carousel.defaultProps = {};
|
|
81
100
|
Carousel.type = 'CAROUSEL';
|
|
82
101
|
Carousel.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
102
|
+
|
|
103
|
+
__decorate([(0, _decorator.lazy)('carouselRef')], Carousel.prototype, "componentDidMount", null);
|
|
104
|
+
|
|
105
|
+
__decorate([_decorator.lazyDestroy], Carousel.prototype, "componentWillUnmount", null);
|
|
106
|
+
|
|
83
107
|
Carousel = __decorate([_compositeDecorator["default"]], Carousel);
|
|
84
108
|
return Carousel;
|
|
85
109
|
}(_react.Component);
|
|
@@ -73,24 +73,13 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
73
73
|
return __assign.apply(this, arguments);
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
3: {
|
|
84
|
-
maxH: 87
|
|
85
|
-
},
|
|
86
|
-
4: {
|
|
87
|
-
maxH: 66
|
|
88
|
-
},
|
|
89
|
-
5: {
|
|
90
|
-
maxH: 50
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
76
|
+
// const MOBILE_IMG_SIZE = {
|
|
77
|
+
// 1: { maxH: 282 },
|
|
78
|
+
// 2: { maxH: 137 },
|
|
79
|
+
// 3: { maxH: 87 },
|
|
80
|
+
// 4: { maxH: 66 },
|
|
81
|
+
// 5: { maxH: 50 },
|
|
82
|
+
// };
|
|
94
83
|
var CarouselMobile =
|
|
95
84
|
/** @class */
|
|
96
85
|
function (_super) {
|
|
@@ -247,7 +236,8 @@ function (_super) {
|
|
|
247
236
|
GAData: __assign(__assign({}, GAData), {
|
|
248
237
|
groupId: item.id,
|
|
249
238
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
250
|
-
})
|
|
239
|
+
}),
|
|
240
|
+
notNeedLazy: true
|
|
251
241
|
})), layout === 'layout2' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
252
242
|
className: "title"
|
|
253
243
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -272,7 +262,8 @@ function (_super) {
|
|
|
272
262
|
groupId: item.id,
|
|
273
263
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
274
264
|
}),
|
|
275
|
-
maxHeight: 20
|
|
265
|
+
maxHeight: 20,
|
|
266
|
+
notNeedLazy: true
|
|
276
267
|
}), item.buttonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
277
268
|
data: item.buttonTag,
|
|
278
269
|
GAData: __assign(__assign({}, GAData), {
|
|
@@ -280,7 +280,8 @@ function (_super) {
|
|
|
280
280
|
}),
|
|
281
281
|
maxHeight: item.image.content.pcImgSrc ? 'unset' : PC_IMG_SIZE[floorColNum].defH,
|
|
282
282
|
minHeight: PC_IMG_SIZE[floorColNum].minH,
|
|
283
|
-
minWidth: PC_IMG_SIZE[floorColNum].minW
|
|
283
|
+
minWidth: PC_IMG_SIZE[floorColNum].minW,
|
|
284
|
+
notNeedLazy: true
|
|
284
285
|
})), layout === 'layout2' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item.title.open && !((0, _coreUtil.isPc)() && item.title.pcText === '') && /*#__PURE__*/_react["default"].createElement("div", {
|
|
285
286
|
className: "title"
|
|
286
287
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -305,7 +306,8 @@ function (_super) {
|
|
|
305
306
|
groupId: item.id,
|
|
306
307
|
groupName: (0, _ConfigPanel.getSecondConfigName)(data, item.id)
|
|
307
308
|
}),
|
|
308
|
-
maxHeight: 30
|
|
309
|
+
maxHeight: 30,
|
|
310
|
+
notNeedLazy: true
|
|
309
311
|
}), item.buttonTag.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
310
312
|
data: item.buttonTag,
|
|
311
313
|
GAData: __assign(__assign({}, GAData), {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
11
|
+
return {
|
|
12
|
+
id: (0, _uuid.v4)(),
|
|
13
|
+
type: 'CUSTOM_CODE',
|
|
14
|
+
content: {
|
|
15
|
+
pcHtml: '',
|
|
16
|
+
h5Html: ''
|
|
17
|
+
},
|
|
18
|
+
spacing: {
|
|
19
|
+
pc: {
|
|
20
|
+
paddingTop: 10,
|
|
21
|
+
paddingBottom: 10,
|
|
22
|
+
marginBottom: 0
|
|
23
|
+
},
|
|
24
|
+
mobile: {
|
|
25
|
+
paddingTop: 10,
|
|
26
|
+
paddingBottom: 10,
|
|
27
|
+
marginBottom: 0
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
background: {
|
|
31
|
+
opacity: 100,
|
|
32
|
+
color: '#fff',
|
|
33
|
+
image: '',
|
|
34
|
+
bgType: 'color'
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.getDefaultJSON = getDefaultJSON;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _defaultJSON = require("./defaultJSON");
|
|
11
|
+
|
|
12
|
+
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
23
|
+
|
|
24
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
25
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
26
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
27
|
+
__proto__: []
|
|
28
|
+
} instanceof Array && function (d, b) {
|
|
29
|
+
d.__proto__ = b;
|
|
30
|
+
} || function (d, b) {
|
|
31
|
+
for (var p in b) {
|
|
32
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return _extendStatics(d, b);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return function (d, b) {
|
|
40
|
+
_extendStatics(d, b);
|
|
41
|
+
|
|
42
|
+
function __() {
|
|
43
|
+
this.constructor = d;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
47
|
+
};
|
|
48
|
+
}();
|
|
49
|
+
|
|
50
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
51
|
+
var c = arguments.length,
|
|
52
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
53
|
+
d;
|
|
54
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
55
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
56
|
+
}
|
|
57
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var CustomCode =
|
|
61
|
+
/** @class */
|
|
62
|
+
function (_super) {
|
|
63
|
+
__extends(CustomCode, _super);
|
|
64
|
+
|
|
65
|
+
function CustomCode() {
|
|
66
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
|
|
68
|
+
_this.htmlTemp = ''; // createHtml = () => {
|
|
69
|
+
// const { nodeData } = this.props;
|
|
70
|
+
// const htmlCode = window.magicDesign.device === 'pc' ? nodeData.content.pcHtml : nodeData.content.h5Html;
|
|
71
|
+
// this.htmlTemp = htmlCode;
|
|
72
|
+
// if (document.getElementById('custom-wrap')) {
|
|
73
|
+
// document.getElementById('custom-wrap').innerHTML = htmlCode;
|
|
74
|
+
// }
|
|
75
|
+
// }
|
|
76
|
+
|
|
77
|
+
_this.handleClick = function (e) {
|
|
78
|
+
console.log(e.target.getAttribute('href'));
|
|
79
|
+
(0, _coreUtil.clickUrl)(e.target.getAttribute('href'));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
return _this;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
CustomCode.prototype.componentDidMount = function () {
|
|
86
|
+
var _this = this;
|
|
87
|
+
|
|
88
|
+
var aElements = document.querySelectorAll('#custom-wrap a');
|
|
89
|
+
aElements.forEach(function (element) {
|
|
90
|
+
element.addEventListener('click', _this.handleClick);
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
CustomCode.prototype.componentWillUnmount = function () {
|
|
95
|
+
var _this = this;
|
|
96
|
+
|
|
97
|
+
var aElements = document.querySelectorAll('#custom-wrap a');
|
|
98
|
+
aElements.forEach(function (element) {
|
|
99
|
+
element.removeEventListener('click', _this.handleClick);
|
|
100
|
+
});
|
|
101
|
+
}; // componentWillReceiveProps(prevProps) {
|
|
102
|
+
// console.log('111111');
|
|
103
|
+
// if (window.magicDesign.device === 'pc') {
|
|
104
|
+
// console.log('22222222');
|
|
105
|
+
// if (prevProps.nodeData.content.pcHtml != this.props.nodeData.content.pcHtml) {
|
|
106
|
+
// console.log('4444444');
|
|
107
|
+
// this.createHtml();
|
|
108
|
+
// }
|
|
109
|
+
// } else {
|
|
110
|
+
// console.log('3333333333', this.htmlTemp, this.props.nodeData.content);
|
|
111
|
+
// if (this.htmlTemp != this.props.nodeData.content.h5Html) {
|
|
112
|
+
// console.log('5555555');
|
|
113
|
+
// this.createHtml();
|
|
114
|
+
// }
|
|
115
|
+
// }
|
|
116
|
+
// }
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
CustomCode.prototype.render = function () {
|
|
120
|
+
var nodeData = this.props.nodeData;
|
|
121
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
|
+
id: "custom-wrap"
|
|
123
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
|
+
dangerouslySetInnerHTML: {
|
|
125
|
+
__html: window.magicDesign.device === 'pc' ? nodeData.content.pcHtml : nodeData.content.h5Html
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
CustomCode.defaultProps = {};
|
|
131
|
+
CustomCode.type = 'CUSTOM_CODE';
|
|
132
|
+
CustomCode.getDefaultJSON = _defaultJSON.getDefaultJSON;
|
|
133
|
+
CustomCode = __decorate([_compositeDecorator["default"]], CustomCode);
|
|
134
|
+
return CustomCode;
|
|
135
|
+
}(_react.Component);
|
|
136
|
+
|
|
137
|
+
var _default = CustomCode;
|
|
138
|
+
exports["default"] = _default;
|
|
@@ -111,12 +111,24 @@ function (_super) {
|
|
|
111
111
|
_this.getCardStyle = function (source, i) {
|
|
112
112
|
var data = _this.props.data;
|
|
113
113
|
var cardStyle = {
|
|
114
|
-
width: _this.calcWidth(data.customize.pcRowNum),
|
|
115
|
-
marginRight: (1 + i) % data.customize.pcRowNum !== 0 ? '2%' : 0,
|
|
116
114
|
alignItems: _AlignSelector.alignItemMap[data.customize.align],
|
|
117
115
|
textAlign: data.customize.align
|
|
118
116
|
};
|
|
117
|
+
|
|
118
|
+
if (data.customize.layout.pcLayout === 'leftImage' || data.customize.layout.pcLayout === 'rightImage') {
|
|
119
|
+
if ((data === null || data === void 0 ? void 0 : data.groupSource.length) > 1 && i != (data === null || data === void 0 ? void 0 : data.groupSource.length) - 1) {
|
|
120
|
+
cardStyle.marginBottom = 48;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
cardStyle.alignItems = 'center';
|
|
124
|
+
} else {
|
|
125
|
+
cardStyle.marginRight = (1 + i) % data.customize.pcRowNum !== 0 ? '2%' : 0;
|
|
126
|
+
cardStyle.width = _this.calcWidth(data.customize.pcRowNum);
|
|
127
|
+
cardStyle.alignItems = _AlignSelector.alignItemMap[data.customize.align];
|
|
128
|
+
}
|
|
129
|
+
|
|
119
130
|
var wrapStyle = (0, _businessUtil.computeStyle)(source, window.magicDesign.device);
|
|
131
|
+
console.log('cc wrapStyle', source, wrapStyle);
|
|
120
132
|
var hoverIndex = _this.state.hoverIndex;
|
|
121
133
|
var hoverStyle = {};
|
|
122
134
|
|
|
@@ -127,6 +139,86 @@ function (_super) {
|
|
|
127
139
|
return __assign(__assign(__assign({}, cardStyle), wrapStyle), hoverStyle);
|
|
128
140
|
};
|
|
129
141
|
|
|
142
|
+
_this.getContentStyle = function () {
|
|
143
|
+
var data = _this.props.data;
|
|
144
|
+
return {
|
|
145
|
+
alignItems: _AlignSelector.alignItemMap[data.customize.align]
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
_this.getAnotherLayout = function () {
|
|
150
|
+
var data = _this.props.data;
|
|
151
|
+
var hoverIndex = _this.state.hoverIndex;
|
|
152
|
+
var GAData = (0, _commonUtil.getGAData)(data);
|
|
153
|
+
console.log('ff--image text', data);
|
|
154
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (data === null || data === void 0 ? void 0 : data.groupSource.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
155
|
+
className: "group-wrap"
|
|
156
|
+
}, data.groupSource.map(function (source, i) {
|
|
157
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
158
|
+
key: source.id,
|
|
159
|
+
className: "one-card",
|
|
160
|
+
onMouseEnter: function onMouseEnter() {
|
|
161
|
+
if (source.hover.open) {
|
|
162
|
+
_this.setState({
|
|
163
|
+
hoverIndex: i
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
onMouseLeave: function onMouseLeave() {
|
|
168
|
+
_this.setState({
|
|
169
|
+
hoverIndex: -1
|
|
170
|
+
});
|
|
171
|
+
},
|
|
172
|
+
style: _this.getCardStyle(source, i)
|
|
173
|
+
}, (source.image.open && hoverIndex != i || hoverIndex == i && source.hover.image.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
|
+
className: "card-image-wrap"
|
|
175
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
176
|
+
className: "card-image",
|
|
177
|
+
data: hoverIndex == i ? source.hover.image : source.image,
|
|
178
|
+
GAData: __assign(__assign({}, GAData), {
|
|
179
|
+
groupId: source.id,
|
|
180
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
|
|
181
|
+
}),
|
|
182
|
+
maxWidth: 654,
|
|
183
|
+
minWidth: 300,
|
|
184
|
+
scale: 0.5
|
|
185
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
186
|
+
className: "content-wrap",
|
|
187
|
+
style: _this.getContentStyle()
|
|
188
|
+
}, (source.title.open && hoverIndex != i || hoverIndex == i && source.hover.title.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
189
|
+
className: "card-title",
|
|
190
|
+
data: hoverIndex == i ? source.hover.title : source.title,
|
|
191
|
+
GAData: __assign(__assign({}, GAData), {
|
|
192
|
+
groupId: source.id,
|
|
193
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
|
|
194
|
+
})
|
|
195
|
+
}), (source.text.open && hoverIndex != i || hoverIndex == i && source.hover.text.open) && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
196
|
+
className: "card-text",
|
|
197
|
+
data: hoverIndex == i ? source.hover.text : source.text,
|
|
198
|
+
GAData: __assign(__assign({}, GAData), {
|
|
199
|
+
groupId: source.id,
|
|
200
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
|
|
201
|
+
})
|
|
202
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
203
|
+
className: "card-btn-wrap"
|
|
204
|
+
}, (source.button.open && hoverIndex != i || source.hover.button.open && hoverIndex == i) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
205
|
+
className: "card-first-btn",
|
|
206
|
+
data: hoverIndex == i ? source.hover.button : source.button,
|
|
207
|
+
GAData: __assign(__assign({}, GAData), {
|
|
208
|
+
groupId: source.id,
|
|
209
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
|
|
210
|
+
})
|
|
211
|
+
}), (source.secondButton.open && hoverIndex != i || source.hover.secondButton.open && hoverIndex == i) && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
212
|
+
className: "card-second-btn",
|
|
213
|
+
data: hoverIndex == i ? source.hover.secondButton : source.secondButton,
|
|
214
|
+
GAData: __assign(__assign({}, GAData), {
|
|
215
|
+
groupId: source.id,
|
|
216
|
+
groupName: (0, _ConfigPanel.getSecondConfigName)(data, source.id)
|
|
217
|
+
})
|
|
218
|
+
}))));
|
|
219
|
+
})));
|
|
220
|
+
};
|
|
221
|
+
|
|
130
222
|
return _this;
|
|
131
223
|
}
|
|
132
224
|
|
|
@@ -163,7 +255,7 @@ function (_super) {
|
|
|
163
255
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
164
256
|
className: (0, _classnames["default"])('image-text-pc', data.customize.layout.pcLayout),
|
|
165
257
|
style: wrapStyle
|
|
166
|
-
}, (data === null || data === void 0 ? void 0 : data.groupSource.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
258
|
+
}, data.customize.layout.pcLayout === 'leftImage' || data.customize.layout.pcLayout === 'rightImage' ? this.getAnotherLayout() : (data === null || data === void 0 ? void 0 : data.groupSource.length) > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
167
259
|
className: "group-wrap"
|
|
168
260
|
}, data.groupSource.map(function (source, i) {
|
|
169
261
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -116,3 +116,35 @@
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
.leftImage .group-wrap .one-card {
|
|
122
|
+
flex-direction: row;
|
|
123
|
+
.card-image-wrap .card-image {
|
|
124
|
+
margin: 0 32px 0 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
.rightImage .group-wrap .one-card {
|
|
128
|
+
flex-direction: row-reverse;
|
|
129
|
+
.card-image-wrap .card-image {
|
|
130
|
+
margin: 0 0 0 32px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.leftImage, .rightImage {
|
|
135
|
+
padding: 48px 108px;
|
|
136
|
+
.group-wrap {
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
.one-card {
|
|
139
|
+
// flex-direction: row;
|
|
140
|
+
.card-image-wrap {
|
|
141
|
+
width: fit-content;
|
|
142
|
+
}
|
|
143
|
+
.content-wrap {
|
|
144
|
+
flex: 1;
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultJSON = void 0;
|
|
7
|
+
|
|
8
|
+
var _uuid = require("uuid");
|
|
9
|
+
|
|
10
|
+
var getDefaultJSON = function getDefaultJSON() {
|
|
11
|
+
var groupId = (0, _uuid.v4)();
|
|
12
|
+
return {
|
|
13
|
+
id: groupId,
|
|
14
|
+
type: 'LOCATION',
|
|
15
|
+
logo: {
|
|
16
|
+
parentId: groupId,
|
|
17
|
+
id: (0, _uuid.v4)(),
|
|
18
|
+
open: true,
|
|
19
|
+
color: '#fff'
|
|
20
|
+
},
|
|
21
|
+
address: {
|
|
22
|
+
parentId: groupId,
|
|
23
|
+
id: (0, _uuid.v4)(),
|
|
24
|
+
open: true
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
parentId: groupId,
|
|
28
|
+
id: (0, _uuid.v4)(),
|
|
29
|
+
open: true,
|
|
30
|
+
color: '#fff'
|
|
31
|
+
},
|
|
32
|
+
spacing: {
|
|
33
|
+
pc: {
|
|
34
|
+
paddingTop: 10,
|
|
35
|
+
paddingBottom: 10,
|
|
36
|
+
marginBottom: 0
|
|
37
|
+
},
|
|
38
|
+
mobile: {
|
|
39
|
+
paddingTop: 12,
|
|
40
|
+
paddingBottom: 12,
|
|
41
|
+
paddingLeft: 12,
|
|
42
|
+
marginBottom: 0
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
customize: {
|
|
46
|
+
layout: {
|
|
47
|
+
pcLayout: 'top',
|
|
48
|
+
h5Layout: 'top'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
background: {
|
|
52
|
+
opacity: 100,
|
|
53
|
+
color: '#597EF7',
|
|
54
|
+
image: '',
|
|
55
|
+
bgType: 'color'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
exports.getDefaultJSON = getDefaultJSON;
|