@fonixtree/magic-design 0.0.103 → 0.0.104
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 +28 -12
- package/es/assets/fonts/magic-box-iconfont.css.bak +28 -12
- 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/imageGalleryLayout1.png +0 -0
- package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/es/assets/less/button.less +23 -0
- package/es/assets/less/common.less +2 -2
- package/es/assets/less/datepicker.less +11 -0
- package/es/assets/less/index.less +2 -1
- package/es/assets/less/modal.less +7 -2
- package/es/common/Button/index.js +2 -1
- package/es/common/Button/index.less +5 -0
- package/es/common/ButtonIconLayout/index.less +4 -2
- package/es/common/Collapse/index.js +14 -4
- package/es/common/FontStyles/index.less +1 -1
- package/es/common/GroupList/index.js +4 -3
- package/es/common/ImageModal/index.js +31 -26
- package/es/common/ImageModal/index.less +6 -1
- package/es/common/ImgArea/components/Crop.js +267 -0
- package/es/common/ImgArea/components/Icons.js +44 -0
- package/es/common/ImgArea/components/MultiCrops.js +210 -0
- package/es/common/ImgArea/index.js +11 -0
- package/es/common/LinkModal/BundleCampaign/index.js +17 -17
- package/es/common/LinkModal/CustomTable/index.js +3 -2
- package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
- package/es/common/LinkModal/FilteredProductModal/index.less +2 -3
- package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/es/common/LinkModal/index.less +1 -1
- package/es/common/MagicLink/index.js +89 -0
- package/es/common/MagicLink/index.less +0 -0
- package/es/common/ProductModal/index.js +1 -1
- package/es/common/ProductModal/index.less +12 -7
- package/es/common/SystemNotification/Confirm/index.js +263 -0
- package/es/common/SystemNotification/Confirm/index.less +33 -0
- package/es/common/SystemNotification/index.js +115 -0
- package/es/common/UrlPicker/index.js +6 -2
- package/es/common/UrlPicker/index.less +12 -1
- package/es/common/index.js +16 -0
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
- package/es/composite-comp/bol/components/Banner/mobile/index.js +48 -11
- package/es/composite-comp/bol/components/Banner/pc/index.js +50 -20
- package/es/composite-comp/bol/components/Button/defaultJSON.js +40 -70
- package/es/composite-comp/bol/components/Button/index.js +8 -14
- package/es/composite-comp/bol/components/Button/index.less +9 -9
- package/es/composite-comp/bol/components/Carousel/defaultJSON.js +16 -20
- package/es/composite-comp/bol/components/Carousel/imgs/pcDefImg1.png +0 -0
- package/es/composite-comp/bol/components/Carousel/index.js +1 -6
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +58 -38
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +22 -9
- package/es/composite-comp/bol/components/Carousel/pc/index.js +67 -34
- package/es/composite-comp/bol/components/Carousel/pc/index.less +29 -16
- package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +19 -10
- package/es/composite-comp/bol/components/ImageGallery/imgs/defImg1.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/defImg2.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/defImg3.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/defImg4.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/defImg5.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg1.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg2.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg3.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg4.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg5.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/imgs/pcDefImg6.png +0 -0
- package/es/composite-comp/bol/components/ImageGallery/index.js +5 -1
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.js +77 -15
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -66
- package/es/composite-comp/bol/components/ImageGallery/pc/index.js +166 -0
- package/es/composite-comp/bol/components/ImageGallery/pc/index.less +23 -0
- package/es/composite-comp/bol/components/ImageText/defaultJSON.js +57 -179
- package/es/composite-comp/bol/components/ImageText/mobile/index.js +3 -5
- package/es/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
- package/es/composite-comp/bol/components/ImageText/pc/index.js +46 -18
- package/es/composite-comp/bol/components/ImageText/pc/index.less +2 -0
- package/es/composite-comp/bol/components/Newsletter/defaultJSON.js +3 -3
- package/es/composite-comp/bol/components/Newsletter/index.js +16 -8
- package/es/composite-comp/bol/components/Newsletter/index.less +1 -1
- package/es/composite-comp/bol/components/Tag/defaultJSON.js +38 -48
- package/es/composite-comp/bol/components/Tag/index.js +8 -14
- package/es/composite-comp/bol/components/Tag/index.less +1 -0
- package/es/composite-comp/bol/components/Text/defaultJSON.js +5 -7
- package/es/composite-comp/bol/components/Text/index.js +4 -8
- package/es/composite-comp/bol/components/Text/index.less +3 -3
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +143 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png +0 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +4 -2
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -1
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -2
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +20 -4
- package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/ImageTextConfig/index.js +2 -1
- package/es/composite-comp/bol/config-panels/NewsletterConfig/index.js +6 -4
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +9 -17
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +143 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
- package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +7 -4
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
- package/es/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
- package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +8 -13
- package/es/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +6 -17
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +10 -5
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +8 -0
- package/es/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
- package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
- package/es/composite-comp/common/components/ImageLabel/index.less +1 -0
- package/es/composite-comp/common/components/ProductItem/index.js +26 -6
- package/es/composite-comp/common/components/ProductItem/index.less +11 -10
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +52 -25
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +40 -29
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +67 -8
- package/es/composite-comp/dito/components/FlashDeal/index.js +5 -1
- package/es/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg.png +0 -0
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +24 -38
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -1
- package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg.png +0 -0
- package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg1.png +0 -0
- package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg2.png +0 -0
- package/es/composite-comp/dito/components/FlashDeal/pc/imgs/defImg3.png +0 -0
- package/es/composite-comp/dito/components/FlashDeal/pc/index.js +567 -0
- package/es/composite-comp/dito/components/FlashDeal/pc/index.less +122 -0
- package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +5 -4
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
- package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +136 -0
- package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
- package/es/composite-comp/dito/components/PcNavigation/index.js +85 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +482 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +107 -0
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +33 -15
- package/es/composite-comp/dito/components/Recommend/index.js +5 -6
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +93 -72
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +11 -2
- package/es/composite-comp/dito/components/Recommend/pc/index.js +184 -53
- package/es/composite-comp/dito/components/Recommend/pc/index.less +56 -12
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +49 -20
- package/es/composite-comp/dito/components/SearchBar/imgs/xt-logo.png +0 -0
- package/es/composite-comp/dito/components/SearchBar/index.js +7 -2
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +31 -26
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +15 -3
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +149 -0
- package/es/composite-comp/dito/components/SearchBar/pc/index.less +60 -0
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +16 -6
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +20 -0
- package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -2
- package/es/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +3 -1
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +129 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +128 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +194 -0
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +1 -1
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +18 -3
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +140 -0
- package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +16 -51
- package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +80 -49
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +13 -1
- package/es/constants/component-types.js +15 -3
- package/es/constants/index.js +21 -2
- package/es/constants/layout.js +35 -14
- package/es/core/Designer/AppointmentModal/index.js +87 -0
- package/es/core/Designer/AppointmentModal/index.less +23 -0
- package/es/core/Designer/CompListPanel/CompCard/index.js +3 -1
- package/es/core/Designer/CompListPanel/index.js +11 -36
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
- package/es/core/Designer/ConfigPanel/index.js +73 -23
- package/es/core/Designer/ConfigPanel/index.less +4 -0
- package/es/core/Designer/History/index.js +34 -28
- package/es/core/Designer/PageCompList/index.js +44 -8
- package/es/core/Designer/PageCompList/index.less +10 -10
- package/es/core/Designer/QuickMenuBar/index.js +38 -4
- package/es/core/Designer/QuickMenuBar/index.less +34 -0
- package/es/core/Designer/ViewArea/index.js +48 -8
- package/es/core/Designer/ViewArea/index.less +40 -4
- package/es/core/Designer/index.js +93 -41
- package/es/core/Renderer/index.js +23 -5
- package/es/decorator/compositeDecorator.js +147 -17
- package/es/decorator/index.js +8 -0
- package/es/decorator/metaDecorator.js +41 -8
- package/es/decorator/updateConfigDecorator.js +76 -0
- package/es/locale/en/en.json +21 -3
- package/es/locale/es/es.json +19 -1
- package/es/locale/id/id.json +21 -3
- package/es/meta-comp/components/Button/editable.js +114 -0
- package/es/meta-comp/components/Button/editable.less +6 -0
- package/es/meta-comp/components/Button/index.js +14 -33
- package/es/meta-comp/components/Button/index.less +3 -2
- package/es/meta-comp/components/Image/image/h5DefImg.png +0 -0
- package/es/meta-comp/components/Image/image/h5Img.png +0 -0
- package/es/meta-comp/components/Image/image/pcDefImg.png +0 -0
- package/es/meta-comp/components/Image/image/pcImg.png +0 -0
- package/es/meta-comp/components/Image/index.js +47 -8
- package/es/meta-comp/components/Image/index.less +7 -3
- package/es/meta-comp/components/Text/index.js +38 -11
- package/es/meta-comp/config-panels/BaseConfig.js +8 -10
- package/es/meta-comp/config-panels/ButtonConfig/index.js +2 -3
- package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +164 -0
- package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +26 -0
- package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +133 -0
- package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +17 -0
- package/es/meta-comp/config-panels/ImageConfig/index.js +17 -4
- package/es/meta-comp/config-panels/TextConfig/index.js +16 -7
- package/es/mobx/Frame.js +64 -0
- package/es/mobx/Store.js +9 -10
- package/es/mobx/index.js +9 -3
- package/es/utils/businessUtil.js +3 -3
- package/es/utils/coreUtil.js +15 -2
- package/lib/assets/fonts/magic-box-iconfont.css +28 -12
- package/lib/assets/fonts/magic-box-iconfont.css.bak +28 -12
- 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/imageGalleryLayout1.png +0 -0
- package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/lib/assets/less/button.less +23 -0
- package/lib/assets/less/common.less +2 -2
- package/lib/assets/less/datepicker.less +11 -0
- package/lib/assets/less/index.less +2 -1
- package/lib/assets/less/modal.less +7 -2
- package/lib/common/Button/index.js +2 -1
- package/lib/common/Button/index.less +5 -0
- package/lib/common/ButtonIconLayout/index.less +4 -2
- package/lib/common/Collapse/index.js +14 -4
- package/lib/common/FontStyles/index.less +1 -1
- package/lib/common/GroupList/index.js +4 -3
- package/lib/common/ImageModal/index.js +31 -26
- package/lib/common/ImageModal/index.less +6 -1
- package/lib/common/ImgArea/components/Crop.js +267 -0
- package/lib/common/ImgArea/components/Icons.js +44 -0
- package/lib/common/ImgArea/components/MultiCrops.js +210 -0
- package/lib/common/ImgArea/index.js +11 -0
- package/lib/common/LinkModal/BundleCampaign/index.js +17 -17
- package/lib/common/LinkModal/CustomTable/index.js +3 -2
- package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
- package/lib/common/LinkModal/FilteredProductModal/index.less +2 -3
- package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/lib/common/LinkModal/index.less +1 -1
- package/lib/common/MagicLink/index.js +89 -0
- package/lib/common/MagicLink/index.less +0 -0
- package/lib/common/ProductModal/index.js +1 -1
- package/lib/common/ProductModal/index.less +12 -7
- package/lib/common/SystemNotification/Confirm/index.js +263 -0
- package/lib/common/SystemNotification/Confirm/index.less +33 -0
- package/lib/common/SystemNotification/index.js +115 -0
- package/lib/common/UrlPicker/index.js +6 -2
- package/lib/common/UrlPicker/index.less +12 -1
- package/lib/common/index.js +16 -0
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +48 -11
- package/lib/composite-comp/bol/components/Banner/pc/index.js +50 -20
- package/lib/composite-comp/bol/components/Button/defaultJSON.js +40 -70
- package/lib/composite-comp/bol/components/Button/index.js +8 -14
- package/lib/composite-comp/bol/components/Button/index.less +9 -9
- package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +16 -20
- package/lib/composite-comp/bol/components/Carousel/imgs/pcDefImg1.png +0 -0
- package/lib/composite-comp/bol/components/Carousel/index.js +1 -6
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +58 -38
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +22 -9
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +67 -34
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +29 -16
- package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +19 -10
- package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg1.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg2.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg3.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg4.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/defImg5.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg1.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg2.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg3.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg4.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg5.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/imgs/pcDefImg6.png +0 -0
- package/lib/composite-comp/bol/components/ImageGallery/index.js +5 -1
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.js +77 -15
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -66
- package/lib/composite-comp/bol/components/ImageGallery/pc/index.js +166 -0
- package/lib/composite-comp/bol/components/ImageGallery/pc/index.less +23 -0
- package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +57 -179
- package/lib/composite-comp/bol/components/ImageText/mobile/index.js +3 -5
- package/lib/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
- package/lib/composite-comp/bol/components/ImageText/pc/index.js +46 -18
- package/lib/composite-comp/bol/components/ImageText/pc/index.less +2 -0
- package/lib/composite-comp/bol/components/Newsletter/defaultJSON.js +3 -3
- package/lib/composite-comp/bol/components/Newsletter/index.js +16 -8
- package/lib/composite-comp/bol/components/Newsletter/index.less +1 -1
- package/lib/composite-comp/bol/components/Tag/defaultJSON.js +38 -48
- package/lib/composite-comp/bol/components/Tag/index.js +8 -14
- package/lib/composite-comp/bol/components/Tag/index.less +1 -0
- package/lib/composite-comp/bol/components/Text/defaultJSON.js +5 -7
- package/lib/composite-comp/bol/components/Text/index.js +4 -8
- package/lib/composite-comp/bol/components/Text/index.less +3 -3
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +143 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/imgs/layout2.png +0 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +4 -2
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +1 -1
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -2
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/index.js +20 -4
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/index.js +2 -1
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/index.js +6 -4
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +9 -17
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +143 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +16 -0
- package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +7 -4
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +3 -1
- package/lib/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +103 -0
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +3 -0
- package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +8 -13
- package/lib/composite-comp/bol/second-config-panels/ImageGallerySecondConfig/index.js +6 -17
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +10 -5
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +8 -0
- package/lib/composite-comp/bol/{config-panels/ButtonCompConfig/ButtonConfigContent → second-config-panels/TagSecondConfig}/index.js +40 -38
- package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +3 -0
- package/lib/composite-comp/common/components/ImageLabel/index.less +1 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +26 -6
- package/lib/composite-comp/common/components/ProductItem/index.less +11 -10
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +52 -25
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +40 -29
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +67 -8
- package/lib/composite-comp/dito/components/FlashDeal/index.js +5 -1
- package/lib/composite-comp/dito/components/FlashDeal/mobile/imgs/defImg.png +0 -0
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +24 -38
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -1
- package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg.png +0 -0
- package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg1.png +0 -0
- package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg2.png +0 -0
- package/lib/composite-comp/dito/components/FlashDeal/pc/imgs/defImg3.png +0 -0
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +567 -0
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.less +122 -0
- package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +5 -4
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +13 -3
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +3 -2
- package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +136 -0
- package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +6 -0
- package/lib/composite-comp/dito/components/PcNavigation/index.js +85 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +482 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +107 -0
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +33 -15
- package/lib/composite-comp/dito/components/Recommend/index.js +5 -6
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +93 -72
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +11 -2
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +184 -53
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +56 -12
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +49 -20
- package/lib/composite-comp/dito/components/SearchBar/imgs/xt-logo.png +0 -0
- package/lib/composite-comp/dito/components/SearchBar/index.js +7 -2
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +31 -26
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +15 -3
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +149 -0
- package/lib/composite-comp/dito/components/SearchBar/pc/index.less +60 -0
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +16 -6
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +20 -0
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +11 -2
- package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +3 -1
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +129 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +128 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +222 -0
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +194 -0
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +1 -1
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +18 -3
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +140 -0
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +16 -51
- package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +102 -0
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +39 -29
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +80 -49
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +13 -1
- package/lib/constants/component-types.js +15 -3
- package/lib/constants/index.js +21 -2
- package/lib/constants/layout.js +35 -14
- package/lib/core/Designer/AppointmentModal/index.js +87 -0
- package/lib/core/Designer/AppointmentModal/index.less +23 -0
- package/lib/core/Designer/CompListPanel/CompCard/index.js +3 -1
- package/lib/core/Designer/CompListPanel/index.js +11 -36
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +73 -0
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.less +29 -0
- package/lib/core/Designer/ConfigPanel/index.js +73 -23
- package/lib/core/Designer/ConfigPanel/index.less +4 -0
- package/lib/core/Designer/History/index.js +34 -28
- package/lib/core/Designer/PageCompList/index.js +44 -8
- package/lib/core/Designer/PageCompList/index.less +10 -10
- package/lib/core/Designer/QuickMenuBar/index.js +38 -4
- package/lib/core/Designer/QuickMenuBar/index.less +34 -0
- package/lib/core/Designer/ViewArea/index.js +48 -8
- package/lib/core/Designer/ViewArea/index.less +40 -4
- package/lib/core/Designer/index.js +93 -41
- package/lib/core/Renderer/index.js +23 -5
- package/lib/decorator/compositeDecorator.js +147 -17
- package/lib/decorator/index.js +8 -0
- package/lib/decorator/metaDecorator.js +41 -8
- package/lib/decorator/updateConfigDecorator.js +76 -0
- package/lib/locale/en/en.json +21 -3
- package/lib/locale/es/es.json +19 -1
- package/lib/locale/id/id.json +21 -3
- package/lib/meta-comp/components/Button/editable.js +114 -0
- package/lib/meta-comp/components/Button/editable.less +6 -0
- package/lib/meta-comp/components/Button/index.js +14 -33
- package/lib/meta-comp/components/Button/index.less +3 -2
- package/lib/meta-comp/components/Image/image/h5DefImg.png +0 -0
- package/lib/meta-comp/components/Image/image/h5Img.png +0 -0
- package/lib/meta-comp/components/Image/image/pcDefImg.png +0 -0
- package/lib/meta-comp/components/Image/image/pcImg.png +0 -0
- package/lib/meta-comp/components/Image/index.js +47 -8
- package/lib/meta-comp/components/Image/index.less +7 -3
- package/lib/meta-comp/components/Text/index.js +38 -11
- package/lib/meta-comp/config-panels/BaseConfig.js +8 -10
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +2 -3
- package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +164 -0
- package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +26 -0
- package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +133 -0
- package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +17 -0
- package/lib/meta-comp/config-panels/ImageConfig/index.js +17 -4
- package/lib/meta-comp/config-panels/TextConfig/index.js +16 -7
- package/lib/mobx/Frame.js +64 -0
- package/lib/mobx/Store.js +9 -10
- package/lib/mobx/index.js +9 -3
- package/lib/utils/businessUtil.js +3 -3
- package/lib/utils/coreUtil.js +15 -2
- package/package.json +5 -3
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
.m-meta-image {
|
|
2
|
+
position: relative;
|
|
2
3
|
width: 100%;
|
|
3
4
|
height: 100%;
|
|
4
5
|
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
6
|
justify-content: center;
|
|
7
|
-
|
|
7
|
+
// overflow: hidden;
|
|
8
8
|
&>img {
|
|
9
9
|
width: 100%;
|
|
10
10
|
height: 100%;
|
|
11
|
-
object-fit: contain;
|
|
11
|
+
// object-fit: contain;
|
|
12
12
|
transition: all .2s linear;
|
|
13
13
|
vertical-align: initial;
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
object-fit: contain;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
&.backgroundImg {
|
|
17
19
|
&>img {
|
|
18
20
|
object-fit: cover;
|
|
21
|
+
// width: auto;
|
|
22
|
+
max-width: none;
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
25
|
}
|
|
@@ -17,8 +17,6 @@ var _Iconfont = require("../../../common/Iconfont");
|
|
|
17
17
|
|
|
18
18
|
var _decorator = require("../../../decorator");
|
|
19
19
|
|
|
20
|
-
var _businessUtil = require("../../../utils/businessUtil");
|
|
21
|
-
|
|
22
20
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
23
21
|
|
|
24
22
|
var _mobx = require("../../../mobx");
|
|
@@ -104,7 +102,7 @@ var contentStyle = function contentStyle(content) {
|
|
|
104
102
|
color: content.color,
|
|
105
103
|
backgroundColor: content.backgroundColor,
|
|
106
104
|
textAlign: content.textAlign,
|
|
107
|
-
width:
|
|
105
|
+
width: '100%'
|
|
108
106
|
};
|
|
109
107
|
};
|
|
110
108
|
/** 从父级数组中 分离出 片段数组 */
|
|
@@ -258,7 +256,8 @@ var initSelectionEvent = function initSelectionEvent() {
|
|
|
258
256
|
}
|
|
259
257
|
|
|
260
258
|
findSelectionTarget.refresh();
|
|
261
|
-
}
|
|
259
|
+
} // todo 不知道干什么用的
|
|
260
|
+
|
|
262
261
|
|
|
263
262
|
triggerTextConfigRender();
|
|
264
263
|
}, 500);
|
|
@@ -342,6 +341,15 @@ function (_super) {
|
|
|
342
341
|
var node = document.createElement('span');
|
|
343
342
|
node.style = (0, _commonUtil.styleStringify)(contentStyle(c.content));
|
|
344
343
|
node.innerText = (_a = data.text).slice.apply(_a, c.range);
|
|
344
|
+
|
|
345
|
+
node.onclick = function (e) {
|
|
346
|
+
if (c.content.clickUrl) {
|
|
347
|
+
e.stopPropagation();
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
(0, _coreUtil.clickUrl)(c.content.clickUrl);
|
|
351
|
+
};
|
|
352
|
+
|
|
345
353
|
_this.selectionRefMap[JSON.stringify(c.range)] = node;
|
|
346
354
|
|
|
347
355
|
_this.textRef.current.appendChild(node);
|
|
@@ -431,18 +439,37 @@ function (_super) {
|
|
|
431
439
|
className = _a.className,
|
|
432
440
|
readonly = _a.readonly,
|
|
433
441
|
onTextInput = _a.onTextInput;
|
|
442
|
+
var style = contentStyle(data.content);
|
|
443
|
+
|
|
444
|
+
if (data.underline) {
|
|
445
|
+
style = __assign(__assign({}, style), {
|
|
446
|
+
textDecorationLine: data.underline.open ? 'underline' : 'none',
|
|
447
|
+
textDecorationColor: data.underline.textDecorationColor,
|
|
448
|
+
textDecorationStyle: data.underline.textDecorationStyle
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
if (data === null || data === void 0 ? void 0 : data.spacing) {
|
|
453
|
+
if ((0, _coreUtil.isPc)()) {
|
|
454
|
+
style = __assign(__assign({}, style), data.spacing.pc);
|
|
455
|
+
} else {
|
|
456
|
+
style = __assign(__assign({}, style), data.spacing.mobile);
|
|
457
|
+
}
|
|
458
|
+
} // const style: React.CSSProperties = {
|
|
459
|
+
// ...contentStyle(data.content),
|
|
460
|
+
// textDecorationLine: data?.underline.open ? 'underline' : 'none',
|
|
461
|
+
// textDecorationColor: data?.underline.textDecorationColor,
|
|
462
|
+
// textDecorationStyle: data?.underline.textDecorationStyle,
|
|
463
|
+
// };
|
|
434
464
|
|
|
435
|
-
var style = __assign(__assign({}, contentStyle(data.content)), {
|
|
436
|
-
textDecorationLine: data.underline.open ? 'underline' : 'none',
|
|
437
|
-
textDecorationColor: data.underline.textDecorationColor,
|
|
438
|
-
textDecorationStyle: data.underline.textDecorationStyle
|
|
439
|
-
});
|
|
440
465
|
|
|
441
|
-
var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
|
|
442
466
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
443
467
|
ref: this.textRef,
|
|
444
468
|
className: (0, _classnames["default"])('m-meta-text', className),
|
|
445
469
|
contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
|
|
470
|
+
onClick: function onClick() {
|
|
471
|
+
(0, _coreUtil.clickUrl)(data.content.clickUrl);
|
|
472
|
+
},
|
|
446
473
|
onInput: function onInput(e) {
|
|
447
474
|
var text = e.target.textContent;
|
|
448
475
|
data.text = text;
|
|
@@ -461,7 +488,7 @@ function (_super) {
|
|
|
461
488
|
onKeyDown: function onKeyDown(e) {
|
|
462
489
|
e.stopPropagation();
|
|
463
490
|
},
|
|
464
|
-
style: __assign(
|
|
491
|
+
style: __assign({}, style),
|
|
465
492
|
suppressContentEditableWarning: true
|
|
466
493
|
});
|
|
467
494
|
};
|
|
@@ -48,14 +48,6 @@ function (_super) {
|
|
|
48
48
|
|
|
49
49
|
function BaseConfig() {
|
|
50
50
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
-
/**
|
|
52
|
-
*重新渲染展示区域
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
_this.reRenderViewArea = function () {
|
|
57
|
-
(0, _coreUtil.renderPreview)();
|
|
58
|
-
};
|
|
59
51
|
/**
|
|
60
52
|
* 重新渲染一级配置面板
|
|
61
53
|
*/
|
|
@@ -67,10 +59,16 @@ function (_super) {
|
|
|
67
59
|
*/
|
|
68
60
|
|
|
69
61
|
|
|
70
|
-
_this.selfRender = function () {
|
|
62
|
+
_this.selfRender = function (data) {
|
|
63
|
+
var changeHistory = true;
|
|
64
|
+
|
|
65
|
+
if (data && data.type === 'text-render') {
|
|
66
|
+
changeHistory = false;
|
|
67
|
+
}
|
|
68
|
+
|
|
71
69
|
_this.setState({});
|
|
72
70
|
|
|
73
|
-
|
|
71
|
+
(0, _coreUtil.renderPreview)(changeHistory);
|
|
74
72
|
};
|
|
75
73
|
|
|
76
74
|
return _this;
|
|
@@ -157,7 +157,7 @@ function (_super) {
|
|
|
157
157
|
return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
158
158
|
value: sizeType.key
|
|
159
159
|
}, sizeType.key);
|
|
160
|
-
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
160
|
+
}))), data.sizeType == 'Customize font styles' && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
161
161
|
title: (0, _locale.i18n)('FONT_FAMILY')
|
|
162
162
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
163
163
|
onChange: function onChange(v) {
|
|
@@ -191,7 +191,7 @@ function (_super) {
|
|
|
191
191
|
value: {
|
|
192
192
|
count: data[fontSizeKey]
|
|
193
193
|
}
|
|
194
|
-
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
194
|
+
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
195
195
|
title: ""
|
|
196
196
|
}, /*#__PURE__*/_react["default"].createElement(_common.FontStyles, {
|
|
197
197
|
onChange: function onChange(value) {
|
|
@@ -301,7 +301,6 @@ function (_super) {
|
|
|
301
301
|
name: (0, _locale.i18n)('SPACING'),
|
|
302
302
|
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
303
303
|
configCompSpace: false,
|
|
304
|
-
configPaddingLR: true,
|
|
305
304
|
data: data.spacing
|
|
306
305
|
})
|
|
307
306
|
}];
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
14
|
+
var _common = require("../../../../common");
|
|
15
|
+
|
|
16
|
+
require("./index.less");
|
|
17
|
+
|
|
18
|
+
var _locale = require("../../../../locale");
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
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 __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
51
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
|
|
52
|
+
s += arguments[i].length;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++) {
|
|
56
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
|
|
57
|
+
r[k] = a[j];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return r;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var AreaConfigModal =
|
|
65
|
+
/** @class */
|
|
66
|
+
function (_super) {
|
|
67
|
+
__extends(AreaConfigModal, _super);
|
|
68
|
+
|
|
69
|
+
function AreaConfigModal() {
|
|
70
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
71
|
+
|
|
72
|
+
_this.state = {
|
|
73
|
+
drawCoordinates: _this.props.value || []
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
_this.setCoordinate = function (coordinate, index, coordinates) {
|
|
77
|
+
_this.setState({
|
|
78
|
+
drawCoordinates: coordinates
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.addArea = function () {
|
|
83
|
+
var drawCoordinates = _this.state.drawCoordinates;
|
|
84
|
+
|
|
85
|
+
var newCoordinates = __spreadArrays(drawCoordinates, [{
|
|
86
|
+
height: 50,
|
|
87
|
+
id: "Hyp_dBIiD" + drawCoordinates.length,
|
|
88
|
+
inputVal: '',
|
|
89
|
+
width: 100,
|
|
90
|
+
x: 54 + drawCoordinates.length * 10,
|
|
91
|
+
y: 38 + drawCoordinates.length * 10
|
|
92
|
+
}]);
|
|
93
|
+
|
|
94
|
+
_this.setState({
|
|
95
|
+
drawCoordinates: newCoordinates
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
_this.onOkClick = function () {
|
|
100
|
+
var onOk = _this.props.onOk;
|
|
101
|
+
var drawCoordinates = _this.state.drawCoordinates;
|
|
102
|
+
onOk(drawCoordinates);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
return _this;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
AreaConfigModal.prototype.render = function () {
|
|
109
|
+
var _this = this;
|
|
110
|
+
|
|
111
|
+
var _a = this.props,
|
|
112
|
+
visible = _a.visible,
|
|
113
|
+
onCancel = _a.onCancel;
|
|
114
|
+
var drawCoordinates = this.state.drawCoordinates;
|
|
115
|
+
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
|
|
116
|
+
centered: true,
|
|
117
|
+
draggable: false,
|
|
118
|
+
onCancel: onCancel,
|
|
119
|
+
onOk: this.onOkClick,
|
|
120
|
+
title: "clickable Area",
|
|
121
|
+
visible: visible,
|
|
122
|
+
width: "auto"
|
|
123
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
124
|
+
className: "body_wrap"
|
|
125
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.ImgArea, {
|
|
126
|
+
coordinates: drawCoordinates,
|
|
127
|
+
onChange: this.setCoordinate,
|
|
128
|
+
onDelete: this.setCoordinate,
|
|
129
|
+
onSave: this.setCoordinate,
|
|
130
|
+
src: this.props.imgUrl,
|
|
131
|
+
width: "100%"
|
|
132
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
|
+
className: "area_config_wrap"
|
|
134
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
135
|
+
className: "btn_wrap",
|
|
136
|
+
onClick: this.addArea
|
|
137
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
138
|
+
size: 20,
|
|
139
|
+
type: "icon-add"
|
|
140
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('ADD_CLICKABLE_AREA'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
141
|
+
className: "list_wrap"
|
|
142
|
+
}, drawCoordinates.map(function (v, i) {
|
|
143
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
144
|
+
className: "add_item"
|
|
145
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
146
|
+
className: "title"
|
|
147
|
+
}, "Clickable Area ", i + 1), /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
|
|
148
|
+
onChange: function onChange(data) {
|
|
149
|
+
v.inputVal = data;
|
|
150
|
+
|
|
151
|
+
_this.setState({
|
|
152
|
+
drawCoordinates: __spreadArrays(drawCoordinates)
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
value: v.inputVal
|
|
156
|
+
}));
|
|
157
|
+
})))));
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
return AreaConfigModal;
|
|
161
|
+
}(_react.Component);
|
|
162
|
+
|
|
163
|
+
var _default = AreaConfigModal;
|
|
164
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
.body_wrap {
|
|
3
|
+
display: flex;
|
|
4
|
+
|
|
5
|
+
.area_config_wrap {
|
|
6
|
+
margin-left: 23px;
|
|
7
|
+
width: 259px;
|
|
8
|
+
max-height: 480px;
|
|
9
|
+
padding-right: 10px;
|
|
10
|
+
.list_wrap {
|
|
11
|
+
height: calc(100% - 30px);
|
|
12
|
+
overflow: auto;
|
|
13
|
+
.add_item {
|
|
14
|
+
margin-top: 18px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.btn_wrap {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
color: #2F54EB;
|
|
23
|
+
margin-top: 10px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
require("./index.less");
|
|
13
|
+
|
|
14
|
+
var _antd = require("antd");
|
|
15
|
+
|
|
16
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
17
|
+
|
|
18
|
+
var _locale = require("../../../../locale");
|
|
19
|
+
|
|
20
|
+
var _common = require("../../../../common");
|
|
21
|
+
|
|
22
|
+
var _AreaConfigModal = _interopRequireDefault(require("../AreaConfigModal"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
31
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
32
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
33
|
+
__proto__: []
|
|
34
|
+
} instanceof Array && function (d, b) {
|
|
35
|
+
d.__proto__ = b;
|
|
36
|
+
} || function (d, b) {
|
|
37
|
+
for (var p in b) {
|
|
38
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return _extendStatics(d, b);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return function (d, b) {
|
|
46
|
+
_extendStatics(d, b);
|
|
47
|
+
|
|
48
|
+
function __() {
|
|
49
|
+
this.constructor = d;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
53
|
+
};
|
|
54
|
+
}();
|
|
55
|
+
|
|
56
|
+
var HotAreaConfig =
|
|
57
|
+
/** @class */
|
|
58
|
+
function (_super) {
|
|
59
|
+
__extends(HotAreaConfig, _super);
|
|
60
|
+
|
|
61
|
+
function HotAreaConfig() {
|
|
62
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63
|
+
|
|
64
|
+
_this.state = {
|
|
65
|
+
visible: false
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
_this.onCheckboxChange = function (e) {
|
|
69
|
+
var _a = _this.props,
|
|
70
|
+
option = _a.option,
|
|
71
|
+
onChange = _a.onChange;
|
|
72
|
+
console.log(e.target.checked);
|
|
73
|
+
option.clickUrl = '';
|
|
74
|
+
option.openHotArea = e.target.checked; // this.setState({});
|
|
75
|
+
|
|
76
|
+
onChange();
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
_this.onAddArea = function () {
|
|
80
|
+
_this.setState({
|
|
81
|
+
visible: true
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
_this.onOk = function (data) {
|
|
86
|
+
if ((0, _coreUtil.isPc)()) {
|
|
87
|
+
_this.props.option.pcAreas = data;
|
|
88
|
+
} else {
|
|
89
|
+
_this.props.option.h5Areas = data;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
_this.setState({
|
|
93
|
+
visible: false
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
_this.onCancel = function () {
|
|
98
|
+
_this.setState({
|
|
99
|
+
visible: false
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
return _this;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
HotAreaConfig.prototype.render = function () {
|
|
107
|
+
var option = this.props.option;
|
|
108
|
+
var visible = this.state.visible;
|
|
109
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
|
+
className: "hot_area_wrap"
|
|
111
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: "area_wrap mb14"
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _locale.i18n)('CLICKABLE_AREA')), /*#__PURE__*/_react["default"].createElement(_antd.Checkbox, {
|
|
114
|
+
checked: option.openHotArea,
|
|
115
|
+
onChange: this.onCheckboxChange
|
|
116
|
+
})), option.openHotArea && /*#__PURE__*/_react["default"].createElement(_common.Button, {
|
|
117
|
+
icon: "icon-add",
|
|
118
|
+
onClick: this.onAddArea,
|
|
119
|
+
type: "primary"
|
|
120
|
+
}, (0, _locale.i18n)('ADD_AREA')), /*#__PURE__*/_react["default"].createElement(_AreaConfigModal["default"], {
|
|
121
|
+
imgUrl: this.props.imgUrl,
|
|
122
|
+
onCancel: this.onCancel,
|
|
123
|
+
onOk: this.onOk,
|
|
124
|
+
value: (0, _coreUtil.isPc)() ? option.pcAreas : option.h5Areas,
|
|
125
|
+
visible: visible
|
|
126
|
+
}));
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
return HotAreaConfig;
|
|
130
|
+
}(_react.Component);
|
|
131
|
+
|
|
132
|
+
var _default = HotAreaConfig;
|
|
133
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
.hot_area_wrap {
|
|
3
|
+
border-bottom: 1px dashed #D2D9E5;
|
|
4
|
+
margin-bottom: 16px;
|
|
5
|
+
padding-bottom: 12px;
|
|
6
|
+
.area_wrap {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
font-family: 'Open Sans';
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
color: #232F46;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
@@ -11,6 +11,8 @@ var _antd = require("antd");
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
+
var _HotAreaConfig = _interopRequireDefault(require("./HotAreaConfig"));
|
|
15
|
+
|
|
14
16
|
var _commonUtil = require("../../../utils/commonUtil");
|
|
15
17
|
|
|
16
18
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
@@ -200,8 +202,7 @@ function (_super) {
|
|
|
200
202
|
function ImageConfig() {
|
|
201
203
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
202
204
|
|
|
203
|
-
_this.onClick = function (event) {
|
|
204
|
-
console.log(event);
|
|
205
|
+
_this.onClick = function (event) {// console.log(event);
|
|
205
206
|
};
|
|
206
207
|
|
|
207
208
|
_this.getImg = function (v) {
|
|
@@ -291,6 +292,10 @@ function (_super) {
|
|
|
291
292
|
_this.selfRender();
|
|
292
293
|
};
|
|
293
294
|
|
|
295
|
+
_this.getSelectedImg = function (data) {
|
|
296
|
+
return (0, _coreUtil.isPc)() ? data.content.pcImgSrc : data.content.h5ImgSrc;
|
|
297
|
+
};
|
|
298
|
+
|
|
294
299
|
return _this;
|
|
295
300
|
}
|
|
296
301
|
|
|
@@ -299,16 +304,24 @@ function (_super) {
|
|
|
299
304
|
|
|
300
305
|
var _a = this.props,
|
|
301
306
|
data = _a.data,
|
|
302
|
-
needHover = _a.needHover;
|
|
307
|
+
needHover = _a.needHover;
|
|
308
|
+
var selectImg = this.getSelectedImg(data);
|
|
303
309
|
|
|
304
310
|
var ContentSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.ImagePicker, {
|
|
305
311
|
onChange: function onChange(v) {
|
|
306
312
|
_this.getImg(v);
|
|
307
313
|
},
|
|
308
|
-
value:
|
|
314
|
+
value: selectImg
|
|
315
|
+
}), selectImg && /*#__PURE__*/_react["default"].createElement(_HotAreaConfig["default"], {
|
|
316
|
+
imgUrl: selectImg,
|
|
317
|
+
onChange: function onChange() {
|
|
318
|
+
return _this.setState({});
|
|
319
|
+
},
|
|
320
|
+
option: data.content
|
|
309
321
|
}), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
310
322
|
title: "URL"
|
|
311
323
|
}, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
|
|
324
|
+
disabled: data.content.openHotArea,
|
|
312
325
|
onChange: function onChange(v) {
|
|
313
326
|
data.content.clickUrl = v;
|
|
314
327
|
|
|
@@ -147,6 +147,11 @@ function (_super) {
|
|
|
147
147
|
_extends(obj, sizeTypeMap[v]);
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
+
_this.getContentWidth = function (textData) {
|
|
151
|
+
var baseWidth = (window.magicDesign.device == 'pc' ? textData.pcWidth : textData.width) || 100;
|
|
152
|
+
return Math.min(baseWidth, 100);
|
|
153
|
+
};
|
|
154
|
+
|
|
150
155
|
return _this;
|
|
151
156
|
}
|
|
152
157
|
|
|
@@ -269,21 +274,26 @@ function (_super) {
|
|
|
269
274
|
|
|
270
275
|
_this.selfRender();
|
|
271
276
|
},
|
|
272
|
-
value:
|
|
277
|
+
value: textData.clickUrl
|
|
273
278
|
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
274
279
|
title: (0, _locale.i18n)('CONTENT_WIDTH')
|
|
275
280
|
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
276
|
-
maxVal:
|
|
277
|
-
minVal:
|
|
281
|
+
maxVal: 100,
|
|
282
|
+
minVal: 1,
|
|
278
283
|
onChange: function onChange(_a) {
|
|
279
284
|
var count = _a.count;
|
|
280
|
-
|
|
285
|
+
|
|
286
|
+
if (window.magicDesign.device == 'pc') {
|
|
287
|
+
textData.pcWidth = count;
|
|
288
|
+
} else {
|
|
289
|
+
textData.width = count;
|
|
290
|
+
}
|
|
281
291
|
|
|
282
292
|
_this.selfRender();
|
|
283
293
|
},
|
|
284
|
-
unit: "
|
|
294
|
+
unit: "%",
|
|
285
295
|
value: {
|
|
286
|
-
count: textData
|
|
296
|
+
count: this.getContentWidth(textData)
|
|
287
297
|
}
|
|
288
298
|
})))
|
|
289
299
|
}, {
|
|
@@ -291,7 +301,6 @@ function (_super) {
|
|
|
291
301
|
name: (0, _locale.i18n)('SPACING'),
|
|
292
302
|
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
293
303
|
configCompSpace: false,
|
|
294
|
-
configPaddingLR: true,
|
|
295
304
|
data: data.spacing
|
|
296
305
|
})
|
|
297
306
|
}, {
|