@fonixtree/magic-design 0.0.102 → 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 -1
- 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 +42 -4
- 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 -1
- 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 +42 -4
- 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
|
@@ -41,6 +41,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
41
41
|
};
|
|
42
42
|
}();
|
|
43
43
|
|
|
44
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
45
|
+
__assign = Object.assign || function (t) {
|
|
46
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
47
|
+
s = arguments[i];
|
|
48
|
+
|
|
49
|
+
for (var p in s) {
|
|
50
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return __assign.apply(this, arguments);
|
|
58
|
+
};
|
|
59
|
+
|
|
44
60
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
45
61
|
var t = {};
|
|
46
62
|
|
|
@@ -69,7 +85,7 @@ function metaDecorator(WrappedComponent) {
|
|
|
69
85
|
}; // 元组件点击事件
|
|
70
86
|
|
|
71
87
|
_this.onMetaClick = function (event) {
|
|
72
|
-
var _a, _b
|
|
88
|
+
var _a, _b;
|
|
73
89
|
|
|
74
90
|
if (window.magicDesign.mode === 'renderer') {
|
|
75
91
|
return;
|
|
@@ -90,7 +106,7 @@ function metaDecorator(WrappedComponent) {
|
|
|
90
106
|
}
|
|
91
107
|
|
|
92
108
|
_mobx.store.setState({
|
|
93
|
-
clickedMeta:
|
|
109
|
+
clickedMeta: metaId,
|
|
94
110
|
clickedGroup: parentId,
|
|
95
111
|
clickedFloor: floorId
|
|
96
112
|
});
|
|
@@ -133,7 +149,7 @@ function metaDecorator(WrappedComponent) {
|
|
|
133
149
|
return false;
|
|
134
150
|
};
|
|
135
151
|
|
|
136
|
-
_this.
|
|
152
|
+
_this.getInteractStyle = function () {
|
|
137
153
|
var _a = _this.state,
|
|
138
154
|
hoveredMeta = _a.hoveredMeta,
|
|
139
155
|
clickedMeta = _a.clickedMeta;
|
|
@@ -142,7 +158,8 @@ function metaDecorator(WrappedComponent) {
|
|
|
142
158
|
var isClick = (data === null || data === void 0 ? void 0 : data.id) === clickedMeta;
|
|
143
159
|
var style = {
|
|
144
160
|
boxSizing: 'border-box',
|
|
145
|
-
height: '100%'
|
|
161
|
+
height: '100%',
|
|
162
|
+
border: 'none'
|
|
146
163
|
};
|
|
147
164
|
|
|
148
165
|
if (window.magicDesign.mode === 'renderer') {
|
|
@@ -153,6 +170,22 @@ function metaDecorator(WrappedComponent) {
|
|
|
153
170
|
}
|
|
154
171
|
|
|
155
172
|
return style;
|
|
173
|
+
}; // text元组件在选中或悬浮时 需要实时展示其宽度
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
_this.getStyle = function () {
|
|
177
|
+
var _a = _this.props,
|
|
178
|
+
style = _a.style,
|
|
179
|
+
rest = __rest(_a, ["style"]);
|
|
180
|
+
|
|
181
|
+
var newStyle = __assign({}, style);
|
|
182
|
+
|
|
183
|
+
if (rest.data.type === 'TEXT') {
|
|
184
|
+
var width = window.magicDesign.device === 'pc' ? rest.data.content.pcWidth : rest.data.content.width;
|
|
185
|
+
newStyle.width = (Math.min(width, 100) || 100) + "%";
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return newStyle;
|
|
156
189
|
};
|
|
157
190
|
|
|
158
191
|
return _this;
|
|
@@ -176,13 +209,13 @@ function metaDecorator(WrappedComponent) {
|
|
|
176
209
|
Wrapper.prototype.render = function () {
|
|
177
210
|
var _a = this.props,
|
|
178
211
|
className = _a.className,
|
|
179
|
-
|
|
180
|
-
|
|
212
|
+
rest = __rest(_a, ["className"]);
|
|
213
|
+
|
|
214
|
+
var hoverStyle = this.getInteractStyle(); // console.log(rest);
|
|
181
215
|
|
|
182
|
-
var hoverStyle = this.getStyle();
|
|
183
216
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
184
217
|
className: className,
|
|
185
|
-
style:
|
|
218
|
+
style: this.getStyle()
|
|
186
219
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
220
|
className: "meta_wrap",
|
|
188
221
|
onClick: this.onMetaClick,
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = updateConfigDecorator;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
15
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
16
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
17
|
+
__proto__: []
|
|
18
|
+
} instanceof Array && function (d, b) {
|
|
19
|
+
d.__proto__ = b;
|
|
20
|
+
} || function (d, b) {
|
|
21
|
+
for (var p in b) {
|
|
22
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return _extendStatics(d, b);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return function (d, b) {
|
|
30
|
+
_extendStatics(d, b);
|
|
31
|
+
|
|
32
|
+
function __() {
|
|
33
|
+
this.constructor = d;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
37
|
+
};
|
|
38
|
+
}();
|
|
39
|
+
/**
|
|
40
|
+
* 更新组件一级配置面板的装修器
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
function updateConfigDecorator(WrappedComponent) {
|
|
45
|
+
var Wrapper =
|
|
46
|
+
/** @class */
|
|
47
|
+
function (_super) {
|
|
48
|
+
__extends(Wrapper, _super);
|
|
49
|
+
|
|
50
|
+
function Wrapper() {
|
|
51
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
+
|
|
53
|
+
_this.update = function () {
|
|
54
|
+
_this.setState({});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return _this;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
Wrapper.prototype.componentDidMount = function () {
|
|
61
|
+
window.document.addEventListener(_constants.eventType.UPDATE_FIRST_CONFIG, this.update);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
Wrapper.prototype.componentWillUnmount = function () {
|
|
65
|
+
window.document.removeEventListener(_constants.eventType.UPDATE_FIRST_CONFIG, this.update);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
Wrapper.prototype.render = function () {
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(WrappedComponent, this.props);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return Wrapper;
|
|
73
|
+
}(_react["default"].Component);
|
|
74
|
+
|
|
75
|
+
return Wrapper;
|
|
76
|
+
}
|
package/es/locale/en/en.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
+
"IMAGES": "Images",
|
|
3
|
+
"PUBLISH_TIME": "Publish Time",
|
|
4
|
+
"CONFIRM": "Confirm",
|
|
5
|
+
"PUBLISH_LATER": "Publish Later",
|
|
6
|
+
"PUBLISH_NOW": "Publish Now",
|
|
7
|
+
"SEARCH_BOX": "Search Box",
|
|
8
|
+
"PLEASE_INPUT_KEYWORDS": "Please input keywords",
|
|
9
|
+
"SHOPPING_CART": "Shopping Cart",
|
|
10
|
+
"ADD_BUTTON": "Add Button",
|
|
11
|
+
"BUTTON_TAG": "Button Tag",
|
|
12
|
+
"ADD_TAG": "Add Tag",
|
|
13
|
+
"LAST_CATEGORY": "Last Category",
|
|
14
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
15
|
+
"FIRST_CATEGORY": "First Category",
|
|
16
|
+
"ALL_CATEGORY": "All Category",
|
|
17
|
+
"HOME": "Home",
|
|
18
|
+
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
19
|
+
"ADD_AREA": "Add Area",
|
|
20
|
+
"CLICKABLE_AREA": "Clickable Area",
|
|
2
21
|
"VOUCHER_SUCCESS": "Voucher received successfully!",
|
|
3
22
|
"NAVIGATION_NAME": "Navigation Name",
|
|
4
23
|
"ADD_NAVIGATION": "Add Navigation",
|
|
@@ -18,8 +37,8 @@
|
|
|
18
37
|
"BACKGROUND": "Background",
|
|
19
38
|
"PLACEHOLDER": "Placeholder",
|
|
20
39
|
"FONT_STYLE": "Font Style",
|
|
21
|
-
"FONT_FAMILY": "
|
|
22
|
-
"FONT_WEIGHT": "
|
|
40
|
+
"FONT_FAMILY": "Font Family",
|
|
41
|
+
"FONT_WEIGHT": "Font Weight",
|
|
23
42
|
"FONT_SIZE": "Font Size",
|
|
24
43
|
"LINE_SPACING": "Line Spacing",
|
|
25
44
|
"LINE_COLOR": "Line Color",
|
|
@@ -85,7 +104,6 @@
|
|
|
85
104
|
"INPUT_FIELD": "Input Field",
|
|
86
105
|
"CONFIRMATION": "Confirmation",
|
|
87
106
|
"IMAGE_TAG": "Image Tag",
|
|
88
|
-
"BUTTON_TAG": "Button Tag",
|
|
89
107
|
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
90
108
|
"TITLE": "Title",
|
|
91
109
|
"HOVER": "Hover",
|
package/es/locale/es/es.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
+
"IMAGES": "Images",
|
|
3
|
+
"PUBLISH_TIME": "Publish Time",
|
|
4
|
+
"CONFIRM": "Confirm",
|
|
5
|
+
"PUBLISH_LATER": "Publish Later",
|
|
6
|
+
"PUBLISH_NOW": "Publish Now",
|
|
7
|
+
"SEARCH_BOX": "Search Box",
|
|
8
|
+
"PLEASE_INPUT_KEYWORDS": "Please input keywords",
|
|
9
|
+
"SHOPPING_CART": "Shopping Cart",
|
|
10
|
+
"ADD_BUTTON": "Add Button",
|
|
11
|
+
"BUTTON_TAG": "Etiqueta de botón",
|
|
12
|
+
"ADD_TAG": "Add Tag",
|
|
13
|
+
"LAST_CATEGORY": "Last Category",
|
|
14
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
15
|
+
"FIRST_CATEGORY": "First Category",
|
|
16
|
+
"ALL_CATEGORY": "All Category",
|
|
17
|
+
"HOME": "Home",
|
|
18
|
+
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
19
|
+
"ADD_AREA": "Add Area",
|
|
20
|
+
"CLICKABLE_AREA": "Clickable Area",
|
|
2
21
|
"VOUCHER_SUCCESS": "Voucher received successfully!",
|
|
3
22
|
"NAVIGATION_NAME": "Navigation Name",
|
|
4
23
|
"ADD_NAVIGATION": "Add Navigation",
|
|
@@ -85,7 +104,6 @@
|
|
|
85
104
|
"INPUT_FIELD": "Campo de entrada",
|
|
86
105
|
"CONFIRMATION": "Confirmación",
|
|
87
106
|
"IMAGE_TAG": "Etiqueta de imagen",
|
|
88
|
-
"BUTTON_TAG": "Etiqueta de botón",
|
|
89
107
|
"SECONDARY_BUTTON_TAG": "Etiqueta de botón secundario",
|
|
90
108
|
"TITLE": "Título",
|
|
91
109
|
"HOVER": "Hover",
|
package/es/locale/id/id.json
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
+
"IMAGES": "Images",
|
|
3
|
+
"PUBLISH_TIME": "Publish Time",
|
|
4
|
+
"CONFIRM": "Confirm",
|
|
5
|
+
"PUBLISH_LATER": "Publish Later",
|
|
6
|
+
"PUBLISH_NOW": "Publish Now",
|
|
7
|
+
"SEARCH_BOX": "Search Box",
|
|
8
|
+
"PLEASE_INPUT_KEYWORDS": "Please input keywords",
|
|
9
|
+
"SHOPPING_CART": "Shopping Cart",
|
|
10
|
+
"ADD_BUTTON": "Add Button",
|
|
11
|
+
"BUTTON_TAG": "Button Tag",
|
|
12
|
+
"ADD_TAG": "Add Tag",
|
|
13
|
+
"LAST_CATEGORY": "Last Category",
|
|
14
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
15
|
+
"FIRST_CATEGORY": "First Category",
|
|
16
|
+
"ALL_CATEGORY": "All Category",
|
|
17
|
+
"HOME": "Home",
|
|
18
|
+
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
19
|
+
"ADD_AREA": "Add Area",
|
|
20
|
+
"CLICKABLE_AREA": "Clickable Area",
|
|
2
21
|
"VOUCHER_SUCCESS": "Voucher received successfully!",
|
|
3
22
|
"NAVIGATION_NAME": "Navigation Name",
|
|
4
23
|
"ADD_NAVIGATION": "Add Navigation",
|
|
@@ -18,8 +37,8 @@
|
|
|
18
37
|
"BACKGROUND": "Background",
|
|
19
38
|
"PLACEHOLDER": "Placeholder",
|
|
20
39
|
"FONT_STYLE": "Font Style",
|
|
21
|
-
"FONT_FAMILY": "
|
|
22
|
-
"FONT_WEIGHT": "
|
|
40
|
+
"FONT_FAMILY": "Font Family",
|
|
41
|
+
"FONT_WEIGHT": "Font Weight",
|
|
23
42
|
"FONT_SIZE": "Font Size",
|
|
24
43
|
"LINE_SPACING": "Line Spacing",
|
|
25
44
|
"LINE_COLOR": "Line Color",
|
|
@@ -85,7 +104,6 @@
|
|
|
85
104
|
"INPUT_FIELD": "Input Field",
|
|
86
105
|
"CONFIRMATION": "Confirmation",
|
|
87
106
|
"IMAGE_TAG": "Image Tag",
|
|
88
|
-
"BUTTON_TAG": "Button Tag",
|
|
89
107
|
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
90
108
|
"TITLE": "Title",
|
|
91
109
|
"HOVER": "Hover",
|
|
@@ -0,0 +1,114 @@
|
|
|
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("./editable.less");
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
21
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
22
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
23
|
+
__proto__: []
|
|
24
|
+
} instanceof Array && function (d, b) {
|
|
25
|
+
d.__proto__ = b;
|
|
26
|
+
} || function (d, b) {
|
|
27
|
+
for (var p in b) {
|
|
28
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return _extendStatics(d, b);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return function (d, b) {
|
|
36
|
+
_extendStatics(d, b);
|
|
37
|
+
|
|
38
|
+
function __() {
|
|
39
|
+
this.constructor = d;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
43
|
+
};
|
|
44
|
+
}();
|
|
45
|
+
|
|
46
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
47
|
+
__assign = Object.assign || function (t) {
|
|
48
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
49
|
+
s = arguments[i];
|
|
50
|
+
|
|
51
|
+
for (var p in s) {
|
|
52
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return t;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return __assign.apply(this, arguments);
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* 编辑button名称,被动触发元组件的hover事件时会刷新组件,导致contenteditable的光标位置初始化
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
var editable =
|
|
67
|
+
/** @class */
|
|
68
|
+
function (_super) {
|
|
69
|
+
__extends(editable, _super);
|
|
70
|
+
|
|
71
|
+
function editable() {
|
|
72
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
|
|
74
|
+
_this.preData = '';
|
|
75
|
+
_this.preDevice = '';
|
|
76
|
+
return _this;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
editable.prototype.shouldComponentUpdate = function (nextProps) {
|
|
80
|
+
var should1 = JSON.stringify(nextProps.data) != this.preData;
|
|
81
|
+
var should2 = window.magicDesign.device != this.preDevice;
|
|
82
|
+
var result = should1 || should2;
|
|
83
|
+
return result;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
editable.prototype.render = function () {
|
|
87
|
+
var _this = this;
|
|
88
|
+
|
|
89
|
+
var _a = this.props,
|
|
90
|
+
data = _a.data,
|
|
91
|
+
readonly = _a.readonly;
|
|
92
|
+
this.preData = JSON.stringify(data);
|
|
93
|
+
this.preDevice = window.magicDesign.device;
|
|
94
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
95
|
+
className: "item",
|
|
96
|
+
contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
|
|
97
|
+
onInput: function onInput(e) {
|
|
98
|
+
var text = e.target.textContent;
|
|
99
|
+
data.text = text;
|
|
100
|
+
/** 主动更新历史数据避免render */
|
|
101
|
+
|
|
102
|
+
_this.preData = JSON.stringify(__assign(__assign({}, JSON.parse(_this.preData)), {
|
|
103
|
+
text: text
|
|
104
|
+
}));
|
|
105
|
+
},
|
|
106
|
+
suppressContentEditableWarning: true
|
|
107
|
+
}, data.text);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
return editable;
|
|
111
|
+
}(_react.Component);
|
|
112
|
+
|
|
113
|
+
var _default = editable;
|
|
114
|
+
exports["default"] = _default;
|
|
@@ -11,7 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _editable = _interopRequireDefault(require("./editable"));
|
|
15
15
|
|
|
16
16
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
17
17
|
|
|
@@ -88,19 +88,9 @@ function (_super) {
|
|
|
88
88
|
_this.state = {
|
|
89
89
|
hover: false
|
|
90
90
|
};
|
|
91
|
-
/** 备份历史数据 比对不一致时渲染 */
|
|
92
|
-
|
|
93
|
-
_this.preData = '';
|
|
94
91
|
return _this;
|
|
95
92
|
}
|
|
96
93
|
|
|
97
|
-
Button.prototype.shouldComponentUpdate = function (nextProps) {
|
|
98
|
-
var should1 = JSON.stringify(nextProps.data) != this.preData;
|
|
99
|
-
var should2 = window.magicDesign.device != this.preDevice;
|
|
100
|
-
var result = should1 || should2;
|
|
101
|
-
return result;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
94
|
Button.prototype.render = function () {
|
|
105
95
|
var _this = this;
|
|
106
96
|
|
|
@@ -108,8 +98,7 @@ function (_super) {
|
|
|
108
98
|
|
|
109
99
|
var _b = this.props,
|
|
110
100
|
data = _b.data,
|
|
111
|
-
className = _b.className
|
|
112
|
-
readonly = _b.readonly;
|
|
101
|
+
className = _b.className;
|
|
113
102
|
var hover = this.state.hover;
|
|
114
103
|
this.preData = JSON.stringify(data);
|
|
115
104
|
this.preDevice = window.magicDesign.device;
|
|
@@ -122,6 +111,14 @@ function (_super) {
|
|
|
122
111
|
fontSize: window.magicDesign.device == 'pc' ? data.buttonText.pcFontSize : data.buttonText.fontSize
|
|
123
112
|
});
|
|
124
113
|
|
|
114
|
+
if (data.spacing) {
|
|
115
|
+
if (window.magicDesign.device == 'pc') {
|
|
116
|
+
style = __assign(__assign({}, style), data.spacing.pc);
|
|
117
|
+
} else {
|
|
118
|
+
style = __assign(__assign({}, style), data.spacing.mobile);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
125
122
|
var iconUrl = data.buttonIcon.iconUrl;
|
|
126
123
|
var iconLayout = data.buttonIcon.layout;
|
|
127
124
|
|
|
@@ -137,22 +134,6 @@ function (_super) {
|
|
|
137
134
|
iconLayout = data.hover.buttonIcon.layout;
|
|
138
135
|
}
|
|
139
136
|
|
|
140
|
-
var btnText = /*#__PURE__*/_react["default"].createElement("span", {
|
|
141
|
-
className: "item",
|
|
142
|
-
contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
|
|
143
|
-
onInput: function onInput(e) {
|
|
144
|
-
var text = e.target.textContent;
|
|
145
|
-
data.text = text;
|
|
146
|
-
/** 主动更新历史数据避免render */
|
|
147
|
-
|
|
148
|
-
_this.preData = JSON.stringify(__assign(__assign({}, JSON.parse(_this.preData)), {
|
|
149
|
-
text: text
|
|
150
|
-
}));
|
|
151
|
-
},
|
|
152
|
-
suppressContentEditableWarning: true
|
|
153
|
-
}, data.text);
|
|
154
|
-
|
|
155
|
-
var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
|
|
156
137
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
138
|
className: (0, _classnames["default"])('m-meta-button', className),
|
|
158
139
|
onClick: function onClick() {
|
|
@@ -168,16 +149,16 @@ function (_super) {
|
|
|
168
149
|
hover: false
|
|
169
150
|
});
|
|
170
151
|
},
|
|
171
|
-
style: __assign(
|
|
152
|
+
style: __assign({}, style)
|
|
172
153
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
154
|
className: (0, _classnames["default"])('btnContent', {
|
|
174
155
|
horizontal: iconLayout === 'left' || iconLayout === 'right'
|
|
175
156
|
})
|
|
176
|
-
}, (iconLayout === 'right' || iconLayout === 'bottom') &&
|
|
157
|
+
}, (iconLayout === 'right' || iconLayout === 'bottom') && /*#__PURE__*/_react["default"].createElement(_editable["default"], this.props), iconUrl && /*#__PURE__*/_react["default"].createElement("img", {
|
|
177
158
|
alt: "",
|
|
178
|
-
className: "
|
|
159
|
+
className: "icon",
|
|
179
160
|
src: iconUrl
|
|
180
|
-
}), (iconLayout === 'left' || iconLayout === 'top') &&
|
|
161
|
+
}), (iconLayout === 'left' || iconLayout === 'top') && /*#__PURE__*/_react["default"].createElement(_editable["default"], this.props)));
|
|
181
162
|
};
|
|
182
163
|
|
|
183
164
|
Button.defaultProps = {
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
transition: all 0.25s;
|
|
3
3
|
|
|
4
4
|
.btnContent {
|
|
5
|
+
width: 100%;
|
|
5
6
|
cursor: pointer;
|
|
6
|
-
display:
|
|
7
|
+
display: flex;
|
|
7
8
|
align-items: center;
|
|
8
9
|
justify-content: center;
|
|
9
10
|
flex-direction: column;
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
|
|
15
16
|
img {
|
|
16
17
|
height: 20px;
|
|
17
|
-
margin
|
|
18
|
+
margin: 0 5px;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -11,6 +11,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
+
var _h5DefImg = _interopRequireDefault(require("./image/h5DefImg.png"));
|
|
15
|
+
|
|
16
|
+
var _pcDefImg = _interopRequireDefault(require("./image/pcDefImg.png"));
|
|
17
|
+
|
|
14
18
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
15
19
|
|
|
16
20
|
var _decorator = require("../../../decorator");
|
|
@@ -63,9 +67,11 @@ function (_super) {
|
|
|
63
67
|
function Image() {
|
|
64
68
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
65
69
|
|
|
70
|
+
_this.imgRef = /*#__PURE__*/_react["default"].createRef();
|
|
66
71
|
_this.state = {
|
|
67
72
|
// 当仅作为一个图片时,鼠标移上去,hover状态
|
|
68
|
-
hoverImgSrc: false
|
|
73
|
+
hoverImgSrc: false,
|
|
74
|
+
scale: 1
|
|
69
75
|
};
|
|
70
76
|
|
|
71
77
|
_this.getStyle = function () {
|
|
@@ -74,6 +80,7 @@ function (_super) {
|
|
|
74
80
|
hoverState = _a.hoverState,
|
|
75
81
|
maxHeight = _a.maxHeight,
|
|
76
82
|
maxWidth = _a.maxWidth,
|
|
83
|
+
minHeight = _a.minHeight,
|
|
77
84
|
minWidth = _a.minWidth,
|
|
78
85
|
limitWidthHeight = _a.limitWidthHeight,
|
|
79
86
|
scale = _a.scale;
|
|
@@ -82,17 +89,21 @@ function (_super) {
|
|
|
82
89
|
|
|
83
90
|
if (data.hover.open && data.hover.backgroundType === 'enlarge' && (hoverState || hoverImgSrc)) {
|
|
84
91
|
// return { transform: `scale(${data.hover.magnification})` };
|
|
85
|
-
obj.transform = "scale(" + data.hover.magnification
|
|
92
|
+
obj.transform = "scale(" + data.hover.magnification + ")";
|
|
86
93
|
}
|
|
87
94
|
|
|
88
95
|
if (maxHeight) {
|
|
89
96
|
obj.maxHeight = maxHeight;
|
|
90
97
|
}
|
|
91
98
|
|
|
92
|
-
if (maxWidth) {
|
|
99
|
+
if (maxWidth || maxWidth === 0) {
|
|
93
100
|
obj.maxWidth = maxWidth;
|
|
94
101
|
}
|
|
95
102
|
|
|
103
|
+
if (minHeight) {
|
|
104
|
+
obj.minHeight = minHeight;
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
if (minWidth) {
|
|
97
108
|
obj.minWidth = minWidth;
|
|
98
109
|
}
|
|
@@ -144,6 +155,8 @@ function (_super) {
|
|
|
144
155
|
}
|
|
145
156
|
|
|
146
157
|
Image.prototype.render = function () {
|
|
158
|
+
var _this = this;
|
|
159
|
+
|
|
147
160
|
var _a, _b;
|
|
148
161
|
|
|
149
162
|
var _c = this.props,
|
|
@@ -161,11 +174,13 @@ function (_super) {
|
|
|
161
174
|
|
|
162
175
|
if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
|
|
163
176
|
srcImg = srcImg.replace('ecommerce/static', 'static');
|
|
164
|
-
}
|
|
165
|
-
// srcImg = defaultImg;
|
|
166
|
-
// }
|
|
177
|
+
}
|
|
167
178
|
|
|
179
|
+
if (!srcImg) {
|
|
180
|
+
srcImg = (0, _coreUtil.isPc)() ? _pcDefImg["default"] : _h5DefImg["default"];
|
|
181
|
+
}
|
|
168
182
|
|
|
183
|
+
var areas = data.content.openHotArea && ((0, _coreUtil.isPc)() ? data.content.pcAreas : data.content.h5Areas);
|
|
169
184
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
170
185
|
className: (0, _classnames["default"])('m-meta-image', {
|
|
171
186
|
backgroundImg: isBackground
|
|
@@ -173,12 +188,36 @@ function (_super) {
|
|
|
173
188
|
onClick: function onClick() {
|
|
174
189
|
(0, _coreUtil.clickUrl)(data.content.clickUrl);
|
|
175
190
|
}
|
|
176
|
-
}, srcImg && /*#__PURE__*/_react["default"].createElement("img", {
|
|
191
|
+
}, srcImg && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("img", {
|
|
192
|
+
ref: this.imgRef,
|
|
193
|
+
onLoad: function onLoad() {
|
|
194
|
+
var scale = _this.imgRef.current.clientWidth / 600;
|
|
195
|
+
|
|
196
|
+
_this.setState({
|
|
197
|
+
scale: scale
|
|
198
|
+
});
|
|
199
|
+
},
|
|
177
200
|
onMouseEnter: this.mouseEnterImg,
|
|
178
201
|
onMouseLeave: this.mouseLeaveImg,
|
|
179
202
|
src: srcImg,
|
|
180
203
|
style: this.getStyle()
|
|
181
|
-
}))
|
|
204
|
+
}), areas && areas.length > 0 && areas.map(function (v, i) {
|
|
205
|
+
var aStyle = {
|
|
206
|
+
position: 'absolute',
|
|
207
|
+
top: parseInt(v.y * _this.state.scale),
|
|
208
|
+
left: parseInt(v.x * _this.state.scale),
|
|
209
|
+
width: parseInt(v.width * _this.state.scale),
|
|
210
|
+
height: parseInt(v.height * _this.state.scale)
|
|
211
|
+
};
|
|
212
|
+
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
213
|
+
key: i,
|
|
214
|
+
onClick: function onClick(e) {
|
|
215
|
+
e.stopPropagation();
|
|
216
|
+
(0, _coreUtil.clickUrl)(v.inputVal);
|
|
217
|
+
},
|
|
218
|
+
style: aStyle
|
|
219
|
+
});
|
|
220
|
+
})));
|
|
182
221
|
};
|
|
183
222
|
|
|
184
223
|
Image.defaultProps = {
|