@fonixtree/magic-design 0.0.78 → 0.0.80
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 +24 -12
- package/es/assets/fonts/magic-box-iconfont.css.bak +24 -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/layout-navigation-normal.png +0 -0
- package/es/assets/less/common.less +2 -2
- 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 +1 -0
- package/es/common/LinkModal/FilteredProductModal/index.js +3 -3
- 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/UrlPicker/index.js +6 -2
- package/es/common/UrlPicker/index.less +12 -1
- package/es/common/index.js +8 -0
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
- package/es/composite-comp/bol/components/Banner/mobile/index.js +4 -10
- package/es/composite-comp/bol/components/Banner/pc/index.js +3 -6
- 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 +1 -0
- package/es/composite-comp/bol/components/Carousel/defaultJSON.js +12 -16
- package/es/composite-comp/bol/components/Carousel/index.js +1 -6
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +4 -8
- package/es/composite-comp/bol/components/Carousel/pc/index.js +15 -7
- package/es/composite-comp/bol/components/Carousel/pc/index.less +13 -5
- package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +2 -2
- package/es/composite-comp/bol/components/ImageText/defaultJSON.js +27 -167
- package/es/composite-comp/bol/components/ImageText/mobile/index.js +2 -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/Newsletter/defaultJSON.js +2 -2
- package/es/composite-comp/bol/components/Newsletter/index.js +1 -6
- 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 +4 -6
- 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 +141 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -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 -0
- 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 +141 -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/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.js +2 -2
- package/es/composite-comp/common/components/ImageLabel/index.less +6 -2
- package/es/composite-comp/common/components/ProductItem/index.js +1 -1
- package/es/composite-comp/common/components/ProductItem/index.less +9 -9
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +24 -13
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +25 -25
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +62 -2
- package/es/composite-comp/dito/components/FlashDeal/index.js +5 -1
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -1
- 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 +578 -0
- package/es/composite-comp/dito/components/FlashDeal/pc/index.less +121 -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 +131 -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 +478 -0
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +98 -0
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +30 -12
- package/es/composite-comp/dito/components/Recommend/index.js +5 -6
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +45 -37
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +10 -2
- package/es/composite-comp/dito/components/Recommend/pc/index.js +134 -22
- package/es/composite-comp/dito/components/Recommend/pc/index.less +54 -12
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +45 -19
- package/es/composite-comp/dito/components/SearchBar/index.js +7 -2
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +29 -26
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +13 -3
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +151 -0
- package/es/composite-comp/dito/components/SearchBar/pc/index.less +59 -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 +12 -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/index.js +16 -3
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +140 -0
- package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +15 -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 +13 -3
- package/es/constants/index.js +20 -2
- package/es/constants/layout.js +34 -8
- package/es/core/Designer/CompListPanel/index.js +8 -33
- 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 +72 -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 +13 -3
- package/es/core/Designer/PageCompList/index.less +10 -10
- package/es/core/Designer/QuickMenuBar/index.js +1 -1
- package/es/core/Designer/ViewArea/index.js +20 -6
- package/es/core/Designer/index.js +43 -37
- package/es/core/Renderer/index.js +21 -5
- package/es/decorator/compositeDecorator.js +45 -12
- package/es/decorator/index.js +8 -0
- package/es/decorator/metaDecorator.js +4 -3
- package/es/decorator/updateConfigDecorator.js +76 -0
- package/es/locale/en/en.json +14 -1
- package/es/locale/es/es.json +14 -1
- package/es/locale/id/id.json +14 -1
- 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/index.js +39 -8
- package/es/meta-comp/components/Image/index.less +7 -4
- package/es/meta-comp/components/Text/index.js +28 -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 +15 -6
- package/es/mobx/Store.js +6 -10
- package/es/utils/coreUtil.js +15 -2
- package/lib/assets/fonts/magic-box-iconfont.css +24 -12
- package/lib/assets/fonts/magic-box-iconfont.css.bak +24 -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/layout-navigation-normal.png +0 -0
- package/lib/assets/less/common.less +2 -2
- 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 +1 -0
- package/lib/common/LinkModal/FilteredProductModal/index.js +3 -3
- 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/UrlPicker/index.js +6 -2
- package/lib/common/UrlPicker/index.less +12 -1
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +4 -10
- package/lib/composite-comp/bol/components/Banner/pc/index.js +3 -6
- 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 +1 -0
- package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +12 -16
- package/lib/composite-comp/bol/components/Carousel/index.js +1 -6
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +4 -8
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +15 -7
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +13 -5
- package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +2 -2
- package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +27 -167
- package/lib/composite-comp/bol/components/ImageText/mobile/index.js +2 -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/Newsletter/defaultJSON.js +2 -2
- package/lib/composite-comp/bol/components/Newsletter/index.js +1 -6
- 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 +4 -6
- 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 +141 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +16 -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 -0
- 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 +141 -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/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.js +2 -2
- package/lib/composite-comp/common/components/ImageLabel/index.less +6 -2
- package/lib/composite-comp/common/components/ProductItem/index.js +1 -1
- package/lib/composite-comp/common/components/ProductItem/index.less +9 -9
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +24 -13
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +25 -25
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +62 -2
- package/lib/composite-comp/dito/components/FlashDeal/index.js +5 -1
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +0 -1
- 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 +578 -0
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.less +121 -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 +131 -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 +478 -0
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +98 -0
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +30 -12
- package/lib/composite-comp/dito/components/Recommend/index.js +5 -6
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +45 -37
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +10 -2
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +134 -22
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +54 -12
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +45 -19
- package/lib/composite-comp/dito/components/SearchBar/index.js +7 -2
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +29 -26
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +13 -3
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +151 -0
- package/lib/composite-comp/dito/components/SearchBar/pc/index.less +59 -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 +12 -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/index.js +16 -3
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +140 -0
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +15 -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 +13 -3
- package/lib/constants/index.js +20 -2
- package/lib/constants/layout.js +34 -8
- package/lib/core/Designer/CompListPanel/index.js +8 -33
- 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 +72 -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 +13 -3
- package/lib/core/Designer/PageCompList/index.less +10 -10
- package/lib/core/Designer/QuickMenuBar/index.js +1 -1
- package/lib/core/Designer/ViewArea/index.js +20 -6
- package/lib/core/Designer/index.js +43 -37
- package/lib/core/Renderer/index.js +21 -5
- package/lib/decorator/compositeDecorator.js +45 -12
- package/lib/decorator/index.js +8 -0
- package/lib/decorator/metaDecorator.js +4 -3
- package/lib/decorator/updateConfigDecorator.js +76 -0
- package/lib/locale/en/en.json +14 -1
- package/lib/locale/es/es.json +14 -1
- package/lib/locale/id/id.json +14 -1
- 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/index.js +39 -8
- package/lib/meta-comp/components/Image/index.less +7 -4
- package/lib/meta-comp/components/Text/index.js +28 -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 +15 -6
- package/lib/mobx/Store.js +6 -10
- package/lib/utils/coreUtil.js +15 -2
- package/package.json +5 -3
|
@@ -15,6 +15,8 @@ var _coreUtil = require("../../../../utils/coreUtil");
|
|
|
15
15
|
|
|
16
16
|
var _layout = require("../../../../constants/layout");
|
|
17
17
|
|
|
18
|
+
var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
|
|
19
|
+
|
|
18
20
|
var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
|
|
19
21
|
|
|
20
22
|
var _CustomizeConfig = _interopRequireDefault(require("../../../common/config-panels/CustomizeConfig"));
|
|
@@ -81,6 +83,8 @@ function (_super) {
|
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
RecommendConfig.prototype.render = function () {
|
|
86
|
+
var _this = this;
|
|
87
|
+
|
|
84
88
|
var data = this.props.data;
|
|
85
89
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
86
90
|
divider: "bold",
|
|
@@ -97,14 +101,23 @@ function (_super) {
|
|
|
97
101
|
value: /*#__PURE__*/_react["default"].createElement(_RecommendConfigContent["default"], {
|
|
98
102
|
panelProps: data.content
|
|
99
103
|
})
|
|
100
|
-
},
|
|
101
|
-
|
|
104
|
+
}, {
|
|
105
|
+
key: '3',
|
|
106
|
+
name: (0, _locale.i18n)('SPACING'),
|
|
107
|
+
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
108
|
+
configCompSpace: true,
|
|
109
|
+
data: data.spacing
|
|
110
|
+
})
|
|
111
|
+
}, {
|
|
102
112
|
key: '4',
|
|
103
113
|
name: (0, _locale.i18n)('CUSTOMIZE'),
|
|
104
114
|
value: /*#__PURE__*/_react["default"].createElement(_CustomizeConfig["default"], {
|
|
105
115
|
data: data.customize,
|
|
106
116
|
isHideAlign: true,
|
|
107
|
-
layoutSource: (0, _coreUtil.isPc)() ? _layout.recommendLayoutPc : _layout.recommendLayoutMobile
|
|
117
|
+
layoutSource: (0, _coreUtil.isPc)() ? _layout.recommendLayoutPc : _layout.recommendLayoutMobile,
|
|
118
|
+
selectedLayoutFun: function selectedLayoutFun(v) {
|
|
119
|
+
_this.getLayout(v);
|
|
120
|
+
}
|
|
108
121
|
})
|
|
109
122
|
}, {
|
|
110
123
|
key: '5',
|
|
@@ -0,0 +1,140 @@
|
|
|
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 _common = require("../../../../../common");
|
|
13
|
+
|
|
14
|
+
var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
|
|
15
|
+
|
|
16
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
|
+
|
|
18
|
+
var _locale = require("../../../../../locale");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
27
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
28
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
29
|
+
__proto__: []
|
|
30
|
+
} instanceof Array && function (d, b) {
|
|
31
|
+
d.__proto__ = b;
|
|
32
|
+
} || function (d, b) {
|
|
33
|
+
for (var p in b) {
|
|
34
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return _extendStatics(d, b);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return function (d, b) {
|
|
42
|
+
_extendStatics(d, b);
|
|
43
|
+
|
|
44
|
+
function __() {
|
|
45
|
+
this.constructor = d;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
49
|
+
};
|
|
50
|
+
}();
|
|
51
|
+
|
|
52
|
+
var SearchBarConfigContent =
|
|
53
|
+
/** @class */
|
|
54
|
+
function (_super) {
|
|
55
|
+
__extends(SearchBarConfigContent, _super);
|
|
56
|
+
|
|
57
|
+
function SearchBarConfigContent() {
|
|
58
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
+
|
|
60
|
+
_this.selfRender = function () {
|
|
61
|
+
(0, _coreUtil.renderPreview)();
|
|
62
|
+
|
|
63
|
+
_this.setState({});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return _this;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
SearchBarConfigContent.prototype.render = function () {
|
|
70
|
+
var _this = this;
|
|
71
|
+
|
|
72
|
+
var panelProps = this.props.panelProps;
|
|
73
|
+
var source = [{
|
|
74
|
+
key: 'search1',
|
|
75
|
+
name: (0, _locale.i18n)('LOGO'),
|
|
76
|
+
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
77
|
+
data: panelProps.logo
|
|
78
|
+
}),
|
|
79
|
+
metaOption: panelProps.logo,
|
|
80
|
+
toggleType: 'switch'
|
|
81
|
+
}, {
|
|
82
|
+
key: 'search2',
|
|
83
|
+
name: (0, _locale.i18n)('SEARCH_BOX'),
|
|
84
|
+
value: /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
85
|
+
style: {
|
|
86
|
+
marginTop: 20
|
|
87
|
+
},
|
|
88
|
+
title: (0, _locale.i18n)('COLOR')
|
|
89
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
90
|
+
onChange: function onChange(v) {
|
|
91
|
+
if ((0, _coreUtil.isPc)()) {
|
|
92
|
+
panelProps.box.color.pc = v;
|
|
93
|
+
} else {
|
|
94
|
+
panelProps.box.color.mobile = v;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
_this.selfRender();
|
|
98
|
+
},
|
|
99
|
+
value: (0, _coreUtil.isPc)() ? panelProps.box.color.pc : panelProps.box.color.mobile
|
|
100
|
+
})),
|
|
101
|
+
metaOption: panelProps.box,
|
|
102
|
+
toggleType: 'switch'
|
|
103
|
+
}, {
|
|
104
|
+
key: 'search3',
|
|
105
|
+
name: (0, _locale.i18n)('ICON'),
|
|
106
|
+
value: /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
107
|
+
style: {
|
|
108
|
+
marginTop: 20
|
|
109
|
+
},
|
|
110
|
+
title: (0, _locale.i18n)('COLOR')
|
|
111
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
112
|
+
onChange: function onChange(v) {
|
|
113
|
+
if ((0, _coreUtil.isPc)()) {
|
|
114
|
+
panelProps.icon.color.pc = v;
|
|
115
|
+
} else {
|
|
116
|
+
panelProps.icon.color.mobile = v;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
_this.selfRender();
|
|
120
|
+
},
|
|
121
|
+
value: (0, _coreUtil.isPc)() ? panelProps.icon.color.pc : panelProps.icon.color.mobile
|
|
122
|
+
})),
|
|
123
|
+
metaOption: panelProps.icon,
|
|
124
|
+
toggleType: 'switch'
|
|
125
|
+
}];
|
|
126
|
+
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
127
|
+
headerSize: "middle",
|
|
128
|
+
noChange: true,
|
|
129
|
+
onRefresh: this.selfRender,
|
|
130
|
+
showActiveColor: true,
|
|
131
|
+
source: source,
|
|
132
|
+
type: "switch"
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
return SearchBarConfigContent;
|
|
137
|
+
}(_react.Component);
|
|
138
|
+
|
|
139
|
+
var _default = SearchBarConfigContent;
|
|
140
|
+
exports["default"] = _default;
|
|
@@ -7,20 +7,20 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _SearchBarConfigContent = _interopRequireDefault(require("./SearchBarConfigContent"));
|
|
11
|
+
|
|
10
12
|
var _locale = require("../../../../locale");
|
|
11
13
|
|
|
12
14
|
var _layout = require("../../../../constants/layout");
|
|
13
15
|
|
|
14
|
-
var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
|
|
15
|
-
|
|
16
16
|
var _common = require("../../../../common");
|
|
17
17
|
|
|
18
|
+
var _SpacingConfig = _interopRequireDefault(require("../../../common/config-panels/SpacingConfig"));
|
|
19
|
+
|
|
18
20
|
var _BackgroundConfig = _interopRequireDefault(require("../../../common/config-panels/BackgroundConfig"));
|
|
19
21
|
|
|
20
22
|
var _CustomizeConfig = _interopRequireDefault(require("../../../common/config-panels/CustomizeConfig"));
|
|
21
23
|
|
|
22
|
-
var _coreUtil = require("../../../../utils/coreUtil");
|
|
23
|
-
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
26
26
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -55,52 +55,7 @@ function (_super) {
|
|
|
55
55
|
__extends(SearchBarConfig, _super);
|
|
56
56
|
|
|
57
57
|
function SearchBarConfig() {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_this.selfRender = function () {
|
|
61
|
-
(0, _coreUtil.renderPreview)();
|
|
62
|
-
|
|
63
|
-
_this.setState({});
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
_this.getContentPanel = function () {
|
|
67
|
-
var data = _this.props.data;
|
|
68
|
-
var source = [{
|
|
69
|
-
key: 'search1',
|
|
70
|
-
name: (0, _locale.i18n)('LOGO'),
|
|
71
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
72
|
-
data: data.logo
|
|
73
|
-
}),
|
|
74
|
-
metaOption: data.logo,
|
|
75
|
-
toggleType: 'switch'
|
|
76
|
-
}, {
|
|
77
|
-
key: 'search2',
|
|
78
|
-
name: (0, _locale.i18n)('ICON'),
|
|
79
|
-
value: /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
80
|
-
title: (0, _locale.i18n)('COLOR')
|
|
81
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.ColorPickerInput, {
|
|
82
|
-
onChange: function onChange(v) {
|
|
83
|
-
data.icon.color = v;
|
|
84
|
-
|
|
85
|
-
_this.selfRender();
|
|
86
|
-
},
|
|
87
|
-
value: data.icon.color
|
|
88
|
-
})),
|
|
89
|
-
metaOption: data.icon,
|
|
90
|
-
toggleType: 'switch'
|
|
91
|
-
}];
|
|
92
|
-
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
93
|
-
headerSize: "middle",
|
|
94
|
-
onRefresh: function onRefresh() {
|
|
95
|
-
return (0, _coreUtil.renderPreview)();
|
|
96
|
-
},
|
|
97
|
-
showActiveColor: true,
|
|
98
|
-
source: source,
|
|
99
|
-
type: "switch"
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
return _this;
|
|
58
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
104
59
|
}
|
|
105
60
|
|
|
106
61
|
SearchBarConfig.prototype.render = function () {
|
|
@@ -111,7 +66,16 @@ function (_super) {
|
|
|
111
66
|
source: [{
|
|
112
67
|
key: 'searchBar1',
|
|
113
68
|
name: (0, _locale.i18n)('CONTENT'),
|
|
114
|
-
value:
|
|
69
|
+
value: /*#__PURE__*/_react["default"].createElement(_SearchBarConfigContent["default"], {
|
|
70
|
+
panelProps: data.content
|
|
71
|
+
})
|
|
72
|
+
}, {
|
|
73
|
+
key: 'searchBar4',
|
|
74
|
+
name: (0, _locale.i18n)('SPACING'),
|
|
75
|
+
value: /*#__PURE__*/_react["default"].createElement(_SpacingConfig["default"], {
|
|
76
|
+
configCompSpace: true,
|
|
77
|
+
data: data.spacing
|
|
78
|
+
})
|
|
115
79
|
}, {
|
|
116
80
|
key: 'searchBar2',
|
|
117
81
|
name: (0, _locale.i18n)('CUSTOMIZE'),
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Collapse = _interopRequireDefault(require("../../../../common/Collapse"));
|
|
11
|
+
|
|
12
|
+
var _TextConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/TextConfig"));
|
|
13
|
+
|
|
14
|
+
var _coreUtil = require("../../../../utils/coreUtil");
|
|
15
|
+
|
|
16
|
+
var _locale = require("../../../../locale");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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 PcNavigationSecondConfig =
|
|
47
|
+
/** @class */
|
|
48
|
+
function (_super) {
|
|
49
|
+
__extends(PcNavigationSecondConfig, _super);
|
|
50
|
+
|
|
51
|
+
function PcNavigationSecondConfig() {
|
|
52
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53
|
+
|
|
54
|
+
_this.state = {};
|
|
55
|
+
|
|
56
|
+
_this.getContentPanel = function (data) {
|
|
57
|
+
var source = [// { key: 'pcNavSecondContent1', name: i18n('IMAGE'), value: <ImageConfig data={data.image} needHover={needHover} />, metaOption: data.image },
|
|
58
|
+
{
|
|
59
|
+
key: 'pcNavSecondContent2',
|
|
60
|
+
name: (0, _locale.i18n)('NAVIGATION_NAME'),
|
|
61
|
+
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
62
|
+
data: data.title
|
|
63
|
+
}),
|
|
64
|
+
metaOption: data.title
|
|
65
|
+
}];
|
|
66
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
67
|
+
headerSize: "middle",
|
|
68
|
+
onRefresh: function onRefresh() {
|
|
69
|
+
return (0, _coreUtil.renderPreview)();
|
|
70
|
+
},
|
|
71
|
+
showActiveColor: true,
|
|
72
|
+
source: source,
|
|
73
|
+
type: "switch"
|
|
74
|
+
}));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
return _this;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
PcNavigationSecondConfig.prototype.render = function () {
|
|
81
|
+
var panelProps = this.props.panelProps;
|
|
82
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
|
+
className: "banner_second_conf_wrap"
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement(_Collapse["default"], {
|
|
85
|
+
divider: "bold",
|
|
86
|
+
headerSize: "large",
|
|
87
|
+
source: [{
|
|
88
|
+
key: 'mobileNavSecondConfig1',
|
|
89
|
+
name: (0, _locale.i18n)('CONTENT'),
|
|
90
|
+
value: this.getContentPanel(panelProps)
|
|
91
|
+
}]
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
PcNavigationSecondConfig.defaultProps = {
|
|
96
|
+
panelProps: {}
|
|
97
|
+
};
|
|
98
|
+
return PcNavigationSecondConfig;
|
|
99
|
+
}(_react["default"].Component);
|
|
100
|
+
|
|
101
|
+
var _default = PcNavigationSecondConfig;
|
|
102
|
+
exports["default"] = _default;
|
package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js
CHANGED
|
@@ -215,17 +215,32 @@ function (_super) {
|
|
|
215
215
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
216
216
|
|
|
217
217
|
_this.state = {
|
|
218
|
-
intelligentType:
|
|
219
|
-
|
|
220
|
-
}, 'ALL'),
|
|
221
|
-
intelligentValue: (0, _commonUtil.ensure)(function () {
|
|
222
|
-
return _this.props.value.intelligentValue;
|
|
223
|
-
}, []),
|
|
218
|
+
intelligentType: 'ALL',
|
|
219
|
+
intelligentValue: [],
|
|
224
220
|
categoryData: [],
|
|
225
221
|
brandData: [],
|
|
226
222
|
labelData: []
|
|
227
223
|
};
|
|
228
224
|
|
|
225
|
+
_this.onChangeIntelligentType = function (type) {
|
|
226
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
227
|
+
return __generator(this, function (_a) {
|
|
228
|
+
this.setState({
|
|
229
|
+
intelligentType: type,
|
|
230
|
+
intelligentValue: []
|
|
231
|
+
});
|
|
232
|
+
this.getTypeData(type);
|
|
233
|
+
this.props.onChange({
|
|
234
|
+
intelligentType: type,
|
|
235
|
+
intelligentValue: []
|
|
236
|
+
});
|
|
237
|
+
return [2
|
|
238
|
+
/*return*/
|
|
239
|
+
];
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
|
|
229
244
|
_this.getTypeData = function (type) {
|
|
230
245
|
return __awaiter(_this, void 0, void 0, function () {
|
|
231
246
|
var res, res, res;
|
|
@@ -298,34 +313,29 @@ function (_super) {
|
|
|
298
313
|
});
|
|
299
314
|
};
|
|
300
315
|
|
|
301
|
-
_this.onChangeIntelligentType = function (type) {
|
|
302
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
303
|
-
return __generator(this, function (_a) {
|
|
304
|
-
this.setState({
|
|
305
|
-
intelligentType: type,
|
|
306
|
-
intelligentValue: []
|
|
307
|
-
});
|
|
308
|
-
this.props.onChange({
|
|
309
|
-
intelligentType: type,
|
|
310
|
-
intelligentValue: []
|
|
311
|
-
});
|
|
312
|
-
this.getTypeData(type);
|
|
313
|
-
return [2
|
|
314
|
-
/*return*/
|
|
315
|
-
];
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
};
|
|
319
|
-
|
|
320
316
|
return _this;
|
|
321
317
|
}
|
|
322
318
|
|
|
323
319
|
AIRecommendation.prototype.componentDidMount = function () {
|
|
324
|
-
this.props.
|
|
325
|
-
|
|
326
|
-
|
|
320
|
+
var _a = this.props.value,
|
|
321
|
+
intelligentType = _a.intelligentType,
|
|
322
|
+
intelligentValue = _a.intelligentValue;
|
|
323
|
+
this.getTypeData(intelligentType);
|
|
324
|
+
this.setState({
|
|
325
|
+
intelligentType: intelligentType,
|
|
326
|
+
intelligentValue: intelligentValue
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
AIRecommendation.prototype.componentWillReceiveProps = function (nextProps) {
|
|
331
|
+
var _a = nextProps.value,
|
|
332
|
+
intelligentType = _a.intelligentType,
|
|
333
|
+
intelligentValue = _a.intelligentValue;
|
|
334
|
+
this.getTypeData(intelligentType);
|
|
335
|
+
this.setState({
|
|
336
|
+
intelligentType: intelligentType,
|
|
337
|
+
intelligentValue: intelligentValue
|
|
327
338
|
});
|
|
328
|
-
this.getTypeData(this.state.intelligentType);
|
|
329
339
|
};
|
|
330
340
|
|
|
331
341
|
AIRecommendation.prototype.render = function () {
|
|
@@ -17,12 +17,16 @@ var _common = require("../../../../common");
|
|
|
17
17
|
|
|
18
18
|
var _ImageConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ImageConfig"));
|
|
19
19
|
|
|
20
|
+
var _ButtonConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/ButtonConfig"));
|
|
21
|
+
|
|
20
22
|
var _TextConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/TextConfig"));
|
|
21
23
|
|
|
22
24
|
var _BaseConfig = _interopRequireDefault(require("../../../../meta-comp/config-panels/BaseConfig"));
|
|
23
25
|
|
|
24
26
|
var _coreUtil = require("../../../../utils/coreUtil");
|
|
25
27
|
|
|
28
|
+
require("./index.less");
|
|
29
|
+
|
|
26
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
31
|
|
|
28
32
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -51,6 +55,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
51
55
|
};
|
|
52
56
|
}();
|
|
53
57
|
|
|
58
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
59
|
+
__assign = Object.assign || function (t) {
|
|
60
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
61
|
+
s = arguments[i];
|
|
62
|
+
|
|
63
|
+
for (var p in s) {
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return t;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return __assign.apply(this, arguments);
|
|
72
|
+
};
|
|
73
|
+
|
|
54
74
|
var RecommendSecondConfig =
|
|
55
75
|
/** @class */
|
|
56
76
|
function (_super) {
|
|
@@ -64,16 +84,9 @@ function (_super) {
|
|
|
64
84
|
_this.getContentPanel = function () {
|
|
65
85
|
var panelProps = _this.props.panelProps;
|
|
66
86
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
image: JSON.parse(JSON.stringify(panelProps.image)),
|
|
71
|
-
groupName: JSON.parse(JSON.stringify(panelProps.groupName))
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
var productSource = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
76
|
-
split: "dashed",
|
|
87
|
+
var productSource = /*#__PURE__*/_react["default"].createElement("div", {
|
|
88
|
+
className: "sourceOfProduct"
|
|
89
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
77
90
|
title: (0, _locale.i18n)('SOURCE_OF_PRODUCT')
|
|
78
91
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
79
92
|
onChange: function onChange(v) {
|
|
@@ -86,7 +99,9 @@ function (_super) {
|
|
|
86
99
|
value: "select"
|
|
87
100
|
}, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
88
101
|
value: "recommend"
|
|
89
|
-
}, (0, _locale.i18n)('AI_RECOMMENDATION')))),
|
|
102
|
+
}, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
+
className: "greyBg"
|
|
104
|
+
}, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
|
|
90
105
|
onChange: function onChange(v) {
|
|
91
106
|
panelProps.prodIds = v;
|
|
92
107
|
|
|
@@ -105,7 +120,6 @@ function (_super) {
|
|
|
105
120
|
intelligentValue: panelProps.intelligentValue
|
|
106
121
|
}
|
|
107
122
|
}), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
108
|
-
split: "dashed",
|
|
109
123
|
title: (0, _locale.i18n)('PRODUCT_QUANTITY')
|
|
110
124
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
111
125
|
onChange: function onChange(e) {
|
|
@@ -122,27 +136,7 @@ function (_super) {
|
|
|
122
136
|
value: 50
|
|
123
137
|
}, "\u226450"), /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
|
|
124
138
|
value: 100
|
|
125
|
-
}, "\u2264100"))));
|
|
126
|
-
|
|
127
|
-
var hoverSetting = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
128
|
-
divider: "dashed",
|
|
129
|
-
source: [{
|
|
130
|
-
key: 'hoverSetting_1',
|
|
131
|
-
name: (0, _locale.i18n)('IMAGE'),
|
|
132
|
-
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
133
|
-
data: panelProps.hover.image
|
|
134
|
-
}),
|
|
135
|
-
metaOption: panelProps.hover.image
|
|
136
|
-
}, {
|
|
137
|
-
key: 'hoverSetting_2',
|
|
138
|
-
name: (0, _locale.i18n)('GROUP_NAME'),
|
|
139
|
-
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
140
|
-
data: panelProps.hover.groupName
|
|
141
|
-
}),
|
|
142
|
-
metaOption: panelProps.hover.groupName
|
|
143
|
-
}],
|
|
144
|
-
type: "switch"
|
|
145
|
-
});
|
|
139
|
+
}, "\u2264100")))));
|
|
146
140
|
|
|
147
141
|
var defaultSource = [{
|
|
148
142
|
key: 'defaultSource_1',
|
|
@@ -158,22 +152,13 @@ function (_super) {
|
|
|
158
152
|
data: panelProps.groupName
|
|
159
153
|
}),
|
|
160
154
|
metaOption: panelProps.groupName
|
|
161
|
-
}, // { key: 'defaultSource_3', name: i18n('SEE_ALL'), value: <ButtonConfig data={panelProps.seeAll} />, metaOption: panelProps.seeAll },
|
|
162
|
-
{
|
|
163
|
-
key: 'defaultSource_4',
|
|
164
|
-
name: (0, _locale.i18n)('SECOND_CATEGORY'),
|
|
165
|
-
value: productSource,
|
|
166
|
-
toggleType: 'arrow',
|
|
167
|
-
metaOption: {
|
|
168
|
-
id: 'productSource',
|
|
169
|
-
open: true
|
|
170
|
-
}
|
|
171
155
|
}, {
|
|
172
|
-
key: '
|
|
173
|
-
name: (0, _locale.i18n)('
|
|
174
|
-
value:
|
|
175
|
-
|
|
176
|
-
|
|
156
|
+
key: 'defaultSource_3',
|
|
157
|
+
name: (0, _locale.i18n)('SEE_ALL'),
|
|
158
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
159
|
+
data: panelProps.seeAll
|
|
160
|
+
}),
|
|
161
|
+
metaOption: panelProps.seeAll
|
|
177
162
|
}];
|
|
178
163
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
179
164
|
headerSize: "middle",
|
|
@@ -183,22 +168,68 @@ function (_super) {
|
|
|
183
168
|
showActiveColor: true,
|
|
184
169
|
source: defaultSource,
|
|
185
170
|
type: "switch"
|
|
186
|
-
}));
|
|
171
|
+
}), productSource);
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
_this.resetHover = function () {
|
|
175
|
+
var panelProps = _this.props.panelProps;
|
|
176
|
+
|
|
177
|
+
if (panelProps.hover.open) {
|
|
178
|
+
panelProps.hover.image = __assign(__assign({}, panelProps.hover.image), JSON.parse(JSON.stringify(panelProps.image)));
|
|
179
|
+
panelProps.hover.groupName = __assign(__assign({}, panelProps.hover.groupName), JSON.parse(JSON.stringify(panelProps.groupName)));
|
|
180
|
+
}
|
|
187
181
|
};
|
|
188
182
|
|
|
189
183
|
return _this;
|
|
190
184
|
}
|
|
191
185
|
|
|
192
186
|
RecommendSecondConfig.prototype.render = function () {
|
|
187
|
+
var _this = this;
|
|
188
|
+
|
|
189
|
+
var panelProps = this.props.panelProps;
|
|
190
|
+
|
|
191
|
+
var hoverPanel = /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
192
|
+
divider: "dashed",
|
|
193
|
+
noChange: true,
|
|
194
|
+
onRefresh: function onRefresh() {
|
|
195
|
+
return (0, _coreUtil.renderPreview)();
|
|
196
|
+
},
|
|
197
|
+
source: [{
|
|
198
|
+
key: 'hoverSetting_1',
|
|
199
|
+
name: (0, _locale.i18n)('IMAGE'),
|
|
200
|
+
value: /*#__PURE__*/_react["default"].createElement(_ImageConfig["default"], {
|
|
201
|
+
data: panelProps.hover.image
|
|
202
|
+
}),
|
|
203
|
+
metaOption: panelProps.hover.image
|
|
204
|
+
}, {
|
|
205
|
+
key: 'hoverSetting_2',
|
|
206
|
+
name: (0, _locale.i18n)('GROUP_NAME'),
|
|
207
|
+
value: /*#__PURE__*/_react["default"].createElement(_TextConfig["default"], {
|
|
208
|
+
data: panelProps.hover.groupName
|
|
209
|
+
}),
|
|
210
|
+
metaOption: panelProps.hover.groupName
|
|
211
|
+
}],
|
|
212
|
+
type: "switch"
|
|
213
|
+
});
|
|
214
|
+
|
|
193
215
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
194
216
|
className: "recommend_second_conf_wrap"
|
|
195
217
|
}, /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
196
218
|
divider: "bold",
|
|
197
219
|
headerSize: "large",
|
|
220
|
+
onRefresh: function onRefresh() {
|
|
221
|
+
return _this.resetHover();
|
|
222
|
+
},
|
|
198
223
|
source: [{
|
|
199
224
|
key: '1',
|
|
200
225
|
name: (0, _locale.i18n)('CONTENT'),
|
|
201
226
|
value: this.getContentPanel()
|
|
227
|
+
}, {
|
|
228
|
+
key: '2',
|
|
229
|
+
name: (0, _locale.i18n)('HOVER'),
|
|
230
|
+
value: hoverPanel,
|
|
231
|
+
metaOption: panelProps.hover,
|
|
232
|
+
toggleType: 'checkbox'
|
|
202
233
|
}]
|
|
203
234
|
}));
|
|
204
235
|
};
|