@fonixtree/magic-design 2.0.97 → 2.0.99
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/.DS_Store +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +19 -3
- package/es/assets/fonts/magic-box-iconfont.js +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/banner-slide-layout1.png +0 -0
- package/es/assets/images/layout-icon/banner-slide-layout1.svg +6 -0
- package/es/assets/images/layout-icon/banner-slide-layout2.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
- package/es/common/Collapse/index.js +10 -8
- package/es/common/FontStyles/index.less +3 -1
- package/es/common/MonpayCountDown/index.js +160 -0
- package/es/common/PopUpModal/index.less +79 -0
- package/es/common/PopUpModal1/style.less +56 -0
- package/es/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
- package/es/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
- package/es/common/ProductFilterModal/index.less +72 -0
- package/es/common/RatingText/index.js +105 -0
- package/es/common/RatingText/index.less +12 -0
- package/es/common/Tag/index.less +16 -0
- package/es/common/index.js +24 -0
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +1 -0
- package/es/composite-comp/bol/components/Banner/mobile/index.js +2 -1
- package/es/composite-comp/bol/components/Banner/mobile/index.less +8 -4
- package/es/composite-comp/bol/components/Banner/pc/index.js +2 -1
- package/es/composite-comp/bol/components/Banner/pc/index.less +9 -3
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -11
- package/es/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +1 -1
- package/es/composite-comp/common/components/MonpayProductItem/index.js +283 -0
- package/es/composite-comp/common/components/MonpayProductItem/index.less +211 -0
- package/es/composite-comp/common/components/ProductItem/index.js +5 -11
- package/es/composite-comp/common/components/ProductItem/index.less +10 -0
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/es/composite-comp/{bol/config-panels/NewsletterConfig → common/config-panels}/InputField/index.js +18 -10
- package/es/composite-comp/dito/components/GroupBuy/defaultJSON.js +0 -4
- package/es/composite-comp/dito/components/GroupBuy/mobile/index.js +3 -3
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +14 -1
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +98 -33
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +11 -1
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +78 -6
- package/es/composite-comp/dito/components/SearchBar/pc/index.less +1 -0
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +4 -3
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +5 -9
- package/es/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +2 -0
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +36 -6
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.less +7 -0
- package/es/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
- package/es/composite-comp/monpay/components/Bundle/index.js +86 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
- package/es/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
- package/es/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
- package/es/composite-comp/monpay/components/InterestProducts/index.js +86 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
- package/es/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
- package/es/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
- package/es/composite-comp/monpay/components/MerchantSales/index.js +86 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
- package/es/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.js +212 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.less +21 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +322 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/index.js +90 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +462 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +104 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +582 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +389 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/index.js +90 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +822 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +81 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +817 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +129 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
- package/es/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +177 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.less +41 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +171 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.less +7 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +73 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +141 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.js +149 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.js +93 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.less +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/monpay/config-panels/MonpayRecommendConfig/index.js +150 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +435 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +258 -0
- package/es/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.less +15 -0
- package/es/constants/component-types.js +25 -3
- package/es/constants/index.js +42 -3
- package/es/constants/layout.js +43 -4
- package/es/core/Designer/ConfigPanel/index.js +1 -1
- package/es/core/Designer/index.js +5 -2
- package/es/locale/en/en.json +21 -0
- package/es/locale/es/es.json +21 -0
- package/es/locale/id/id.json +21 -0
- package/es/utils/dateUtil.js +13 -0
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +19 -3
- package/lib/assets/fonts/magic-box-iconfont.js +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/banner-slide-layout1.png +0 -0
- package/lib/assets/images/layout-icon/banner-slide-layout1.svg +6 -0
- package/lib/assets/images/layout-icon/banner-slide-layout2.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
- package/lib/common/Collapse/index.js +10 -8
- package/lib/common/FontStyles/index.less +3 -1
- package/lib/common/MonpayCountDown/index.js +160 -0
- package/lib/common/PopUpModal/index.less +79 -0
- package/lib/common/PopUpModal1/style.less +56 -0
- package/lib/common/ProductFilterModal/components/FilterSearchModal/imgs/notFound.png +0 -0
- package/lib/common/ProductFilterModal/components/FilterSearchModal/index.less +129 -0
- package/lib/common/ProductFilterModal/index.less +72 -0
- package/lib/common/RatingText/index.js +105 -0
- package/lib/common/RatingText/index.less +12 -0
- package/lib/common/Tag/index.less +16 -0
- package/lib/common/index.js +24 -0
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +1 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +2 -1
- package/lib/composite-comp/bol/components/Banner/mobile/index.less +8 -4
- package/lib/composite-comp/bol/components/Banner/pc/index.js +2 -1
- package/lib/composite-comp/bol/components/Banner/pc/index.less +9 -3
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigSetting/index.js +11 -11
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/NewsletterContentSetting/index.js +1 -1
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +283 -0
- package/lib/composite-comp/common/components/MonpayProductItem/index.less +211 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +5 -11
- package/lib/composite-comp/common/components/ProductItem/index.less +10 -0
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/lib/composite-comp/{bol/config-panels/NewsletterConfig → common/config-panels}/InputField/index.js +18 -10
- package/lib/composite-comp/dito/components/GroupBuy/defaultJSON.js +0 -4
- package/lib/composite-comp/dito/components/GroupBuy/mobile/index.js +3 -3
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +14 -1
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +98 -33
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +11 -1
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +78 -6
- package/lib/composite-comp/dito/components/SearchBar/pc/index.less +1 -0
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.js +5 -9
- package/lib/composite-comp/dito/config-panels/GroupBuyConfig/GroupBuyConfigContent/index.less +2 -0
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +36 -6
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.less +7 -0
- package/lib/composite-comp/monpay/components/Bundle/defaultJSON.js +77 -0
- package/lib/composite-comp/monpay/components/Bundle/index.js +86 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleItem/index.less +107 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/BundleProdItem/index.less +61 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/index.js +493 -0
- package/lib/composite-comp/monpay/components/Bundle/mobile/index.less +7 -0
- package/lib/composite-comp/monpay/components/InterestProducts/defaultJSON.js +80 -0
- package/lib/composite-comp/monpay/components/InterestProducts/index.js +86 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.js +192 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/ProductItem/index.less +159 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.js +348 -0
- package/lib/composite-comp/monpay/components/InterestProducts/mobile/index.less +21 -0
- package/lib/composite-comp/monpay/components/MerchantSales/defaultJSON.js +99 -0
- package/lib/composite-comp/monpay/components/MerchantSales/index.js +86 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.js +104 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/ProductItem/index.less +34 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/card.png +0 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/img/sale.png +0 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.js +302 -0
- package/lib/composite-comp/monpay/components/MerchantSales/mobile/index.less +14 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.js +212 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/MonpayCountDown/index.less +21 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/defaultJSON.js +322 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/index.js +90 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +462 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.less +104 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +582 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +389 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/index.js +90 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/SearchCondition/index.less +49 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/imgs/card.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +822 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +81 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +817 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +129 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.js +114 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.js +95 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/BundleConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.js +114 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.js +101 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/InterestProductsConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.js +109 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.js +95 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/ConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/imgs/layout.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MerchantSalesConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.js +177 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigContent/index.less +41 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.js +171 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/FlashDealConfigTitle/index.less +7 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayFlashDealConfig/index.js +73 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.js +141 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.js +149 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.js +93 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/RecommendConfigTitle/index.less +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/monpay/config-panels/MonpayRecommendConfig/index.js +150 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/AIRecommendation/index.js +435 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.js +258 -0
- package/lib/composite-comp/monpay/second-config-panels/MonpayRecommendSecondConfig/index.less +15 -0
- package/lib/constants/component-types.js +25 -3
- package/lib/constants/index.js +42 -3
- package/lib/constants/layout.js +43 -4
- package/lib/core/Designer/ConfigPanel/index.js +1 -1
- package/lib/core/Designer/index.js +5 -2
- package/lib/locale/en/en.json +21 -0
- package/lib/locale/es/es.json +21 -0
- package/lib/locale/id/id.json +21 -0
- package/lib/utils/dateUtil.js +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
.monpay-product-item-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
background: #FFFFFF;
|
|
5
|
+
border: 1px solid #D2D9E5;
|
|
6
|
+
width: 142px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
position: relative;
|
|
9
|
+
margin-right: 12px;
|
|
10
|
+
|
|
11
|
+
.img-wrap {
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
.product-img {
|
|
15
|
+
width: 140px;
|
|
16
|
+
height: 140px;
|
|
17
|
+
object-fit: cover;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.discount-tag {
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
color: #fff;
|
|
24
|
+
background-color: #ff8650;
|
|
25
|
+
padding: 5px;
|
|
26
|
+
border-radius: 0 5px 5px 0;
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 15px;
|
|
29
|
+
left: 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.content-wrap {
|
|
34
|
+
padding: 12px;
|
|
35
|
+
|
|
36
|
+
.promotions-wrap {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
|
|
40
|
+
.promotion-item {
|
|
41
|
+
margin-right: 5px;
|
|
42
|
+
margin-bottom: 5px;
|
|
43
|
+
|
|
44
|
+
&:last-child {
|
|
45
|
+
margin-right: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.group-num {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
|
|
53
|
+
.m-meta-button .btnContent img {
|
|
54
|
+
height: 14px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.product-name-wrap {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
display: -webkit-box;
|
|
62
|
+
-webkit-box-orient: vertical;
|
|
63
|
+
-webkit-line-clamp: 2;
|
|
64
|
+
line-height: 18px;
|
|
65
|
+
max-height: 40px;
|
|
66
|
+
white-space: wrap;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.price-wrap {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
flex-wrap: wrap;
|
|
73
|
+
margin-top: 6px;
|
|
74
|
+
margin-bottom: 4px;
|
|
75
|
+
|
|
76
|
+
.price {
|
|
77
|
+
width: auto !important;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
text-overflow: ellipsis;
|
|
81
|
+
margin-right: 6px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.price-sold-wrap {
|
|
86
|
+
display: flex;
|
|
87
|
+
margin-top: 0;
|
|
88
|
+
align-items: center;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
flex-wrap: wrap;
|
|
93
|
+
line-height: 15px;
|
|
94
|
+
|
|
95
|
+
.old-price-wrap {
|
|
96
|
+
display: flex;
|
|
97
|
+
line-height: 13px;
|
|
98
|
+
|
|
99
|
+
.discount {
|
|
100
|
+
margin-right: 3px;
|
|
101
|
+
font-family: 'Montserrat';
|
|
102
|
+
font-style: normal;
|
|
103
|
+
font-weight: 700;
|
|
104
|
+
font-size: 8px;
|
|
105
|
+
line-height: 15px;
|
|
106
|
+
color: #fff;
|
|
107
|
+
padding: 0 4px;
|
|
108
|
+
background-color: #CE1126;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.old-price {
|
|
112
|
+
text-decoration: line-through;
|
|
113
|
+
width: fit-content;
|
|
114
|
+
margin-left: 4px;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.sold-count {
|
|
119
|
+
color: #7b7b7b;
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
text-align: right;
|
|
122
|
+
flex-grow: 1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.rate-sold-wrap {
|
|
127
|
+
margin-top: 5px;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
|
|
131
|
+
.evaluation-score {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
|
|
135
|
+
.rate-text {
|
|
136
|
+
margin-left: 4px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.line {
|
|
141
|
+
display: inline-block;
|
|
142
|
+
width: 1px;
|
|
143
|
+
height: 16px;
|
|
144
|
+
background-color: #545454;
|
|
145
|
+
margin: 0 5px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.sold {
|
|
149
|
+
display: inline-block;
|
|
150
|
+
color: #545454;
|
|
151
|
+
font-size: 12px;
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.progress-wrap {
|
|
157
|
+
margin-top: 10px;
|
|
158
|
+
|
|
159
|
+
.text {
|
|
160
|
+
font-family: 'Montserrat';
|
|
161
|
+
font-style: normal;
|
|
162
|
+
font-weight: 400;
|
|
163
|
+
font-size: 12px;
|
|
164
|
+
line-height: 12px;
|
|
165
|
+
color: #848484;
|
|
166
|
+
margin-top: 6px;
|
|
167
|
+
text-align: left;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.progress-container {
|
|
171
|
+
width: 100%;
|
|
172
|
+
height: 3px;
|
|
173
|
+
background-color: #D9D9D9;
|
|
174
|
+
|
|
175
|
+
.progress {
|
|
176
|
+
background: #FF8650;
|
|
177
|
+
height: 100%;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&.fixHeight {
|
|
185
|
+
.promotions-wrap {
|
|
186
|
+
height: 30px;
|
|
187
|
+
flex-wrap: nowrap;
|
|
188
|
+
overflow: hidden;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.product-name-wrap {
|
|
192
|
+
height: 38px;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.horizontal {
|
|
197
|
+
flex-direction: row;
|
|
198
|
+
|
|
199
|
+
.product-img {
|
|
200
|
+
width: 100px;
|
|
201
|
+
height: 100%;
|
|
202
|
+
min-height: 100px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.content-wrap {
|
|
206
|
+
display: flex;
|
|
207
|
+
flex-direction: column;
|
|
208
|
+
justify-content: center;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -140,9 +140,6 @@ function (_super) {
|
|
|
140
140
|
var _price = pricePrefix + " " + integerPart + " " + (decimalPart ? '.' + decimalPart : '');
|
|
141
141
|
|
|
142
142
|
var oldPrice = data.marketPrice !== null ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.marketPrice) : null;
|
|
143
|
-
|
|
144
|
-
var _oldPrice = type === 'groupBuy' && data.sppMarketPrice ? (0, _currencyUtil.formatCurrencyWithSymbol)(data.sppMarketPrice) : oldPrice;
|
|
145
|
-
|
|
146
143
|
var discount = Number(data.discountPercent) || 0;
|
|
147
144
|
var salePercent = Number(data.salePercent) / 100 || 0;
|
|
148
145
|
var imgStyle = {};
|
|
@@ -157,9 +154,6 @@ function (_super) {
|
|
|
157
154
|
var priceLabels = ((_c = data.labels) === null || _c === void 0 ? void 0 : _c.filter(function (f) {
|
|
158
155
|
return f.position === '7';
|
|
159
156
|
})) || [];
|
|
160
|
-
var shareByNum = (0, _commonUtil.ensure)(function () {
|
|
161
|
-
return data.campaigns.cmpShareBuys[0].shareByNum;
|
|
162
|
-
}, 0);
|
|
163
157
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
164
158
|
className: (0, _classnames["default"])('m-product-item-wrap', {
|
|
165
159
|
fixHeight: fixHeight,
|
|
@@ -197,7 +191,7 @@ function (_super) {
|
|
|
197
191
|
})), type === 'groupBuy' && panelProps.label.open && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
198
192
|
className: "group-num",
|
|
199
193
|
data: __assign(__assign({}, panelProps.label), {
|
|
200
|
-
text: shareByNum
|
|
194
|
+
text: data.shareByNum
|
|
201
195
|
}),
|
|
202
196
|
readonly: true
|
|
203
197
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -228,17 +222,17 @@ function (_super) {
|
|
|
228
222
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
229
223
|
className: "old-price-wrap"
|
|
230
224
|
}, !!discount && /*#__PURE__*/_react["default"].createElement("span", {
|
|
231
|
-
className:
|
|
232
|
-
}, "-", discount, "%"),
|
|
225
|
+
className: type === 'groupBuy' ? 'discount2' : 'discount'
|
|
226
|
+
}, "-", discount, "%"), oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
233
227
|
className: "old-price",
|
|
234
228
|
data: __assign(__assign({}, panelProps.salesPrice), {
|
|
235
|
-
text:
|
|
229
|
+
text: oldPrice
|
|
236
230
|
}),
|
|
237
231
|
readonly: true,
|
|
238
232
|
style: {
|
|
239
233
|
color: panelProps.salesPrice.content.color
|
|
240
234
|
}
|
|
241
|
-
})), !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
235
|
+
})), type !== 'groupBuy' && !showProgress && data.salesCnt > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
236
|
className: "sold-count"
|
|
243
237
|
}, (0, _commonUtil.convertCount)(data.salesCnt), " sold")), showProgress && ((_d = panelProps.salesProgress) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
244
238
|
className: "progress-wrap"
|
|
@@ -94,6 +94,16 @@
|
|
|
94
94
|
background-color: #CE1126;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
.discount2 {
|
|
98
|
+
margin-right: 3px;
|
|
99
|
+
font-family: 'Montserrat';
|
|
100
|
+
font-style: normal;
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
line-height: 15px;
|
|
104
|
+
color: #2F3043;
|
|
105
|
+
}
|
|
106
|
+
|
|
97
107
|
.old-price {
|
|
98
108
|
text-decoration: line-through;
|
|
99
109
|
width: fit-content;
|
|
@@ -148,6 +148,19 @@ function (_super) {
|
|
|
148
148
|
showRowNum: true
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
+
} // monpayRecommend
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
if (component === 'monpayRecommend') {
|
|
155
|
+
if (v === 'layout2' || v === 'layout4') {
|
|
156
|
+
_this.setState({
|
|
157
|
+
showRowNum: false
|
|
158
|
+
});
|
|
159
|
+
} else {
|
|
160
|
+
_this.setState({
|
|
161
|
+
showRowNum: true
|
|
162
|
+
});
|
|
163
|
+
}
|
|
151
164
|
} // 移动端导航特殊处理
|
|
152
165
|
// 更改需求,两个布局都需 可选行数
|
|
153
166
|
// if (component == 'mobileNavigation') {
|
|
@@ -9,15 +9,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _antd = require("antd");
|
|
11
11
|
|
|
12
|
-
var _FontStyles = _interopRequireDefault(require("
|
|
12
|
+
var _FontStyles = _interopRequireDefault(require("../../../../common/FontStyles"));
|
|
13
13
|
|
|
14
|
-
var _common = require("
|
|
14
|
+
var _common = require("../../../../common");
|
|
15
15
|
|
|
16
|
-
var _businessUtil = require("
|
|
16
|
+
var _businessUtil = require("../../../../utils/businessUtil");
|
|
17
17
|
|
|
18
|
-
var _TextConfig = require("
|
|
18
|
+
var _TextConfig = require("../../../../meta-comp/config-panels/TextConfig");
|
|
19
19
|
|
|
20
|
-
var _locale = require("
|
|
20
|
+
var _locale = require("../../../../locale");
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
@@ -87,15 +87,18 @@ function (_super) {
|
|
|
87
87
|
TextConfig.prototype.render = function () {
|
|
88
88
|
var _this = this;
|
|
89
89
|
|
|
90
|
-
var
|
|
90
|
+
var _a = this.props,
|
|
91
|
+
data = _a.data,
|
|
92
|
+
inputLabel = _a.inputLabel;
|
|
91
93
|
var textData = data.content;
|
|
92
94
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
95
|
className: "m-text-config",
|
|
94
96
|
style: {
|
|
95
|
-
paddingTop:
|
|
97
|
+
paddingTop: 12,
|
|
98
|
+
borderRadius: 6
|
|
96
99
|
}
|
|
97
100
|
}, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
98
|
-
title: (0, _locale.i18n)('PLACEHOLDER')
|
|
101
|
+
title: inputLabel || (0, _locale.i18n)('PLACEHOLDER')
|
|
99
102
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
100
103
|
onChange: function onChange(e) {
|
|
101
104
|
data.placeholder = e.target.value;
|
|
@@ -158,13 +161,18 @@ function (_super) {
|
|
|
158
161
|
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
159
162
|
onChange: function onChange(_a) {
|
|
160
163
|
var count = _a.count;
|
|
161
|
-
|
|
164
|
+
|
|
165
|
+
if (window.magicDesign.device == 'pc') {
|
|
166
|
+
textData.pcFontSize = count;
|
|
167
|
+
} else {
|
|
168
|
+
textData.fontSize = count;
|
|
169
|
+
}
|
|
162
170
|
|
|
163
171
|
_this.selfRender();
|
|
164
172
|
},
|
|
165
173
|
unit: "px",
|
|
166
174
|
value: {
|
|
167
|
-
count: textData.fontSize
|
|
175
|
+
count: window.magicDesign.device == 'pc' ? textData.pcFontSize : textData.fontSize
|
|
168
176
|
}
|
|
169
177
|
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
170
178
|
title: ""
|
|
@@ -251,10 +251,9 @@ function (_super) {
|
|
|
251
251
|
case 0:
|
|
252
252
|
return [4
|
|
253
253
|
/*yield*/
|
|
254
|
-
, (0, _commonUtil.commonFetch)('/designer/v1/h5/
|
|
255
|
-
campaignType: '4',
|
|
254
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/sharebuy/offer/page', {
|
|
256
255
|
sortType: this.sortType
|
|
257
|
-
}, '
|
|
256
|
+
}, 'GET')];
|
|
258
257
|
|
|
259
258
|
case 1:
|
|
260
259
|
res = _a.sent();
|
|
@@ -326,6 +325,7 @@ function (_super) {
|
|
|
326
325
|
(0, _coreUtil.clickUrl)("proDetail-" + item.offerId + "-" + (item.sppProductId || ''));
|
|
327
326
|
},
|
|
328
327
|
panelProps: panelProps.content,
|
|
328
|
+
showProgress: false,
|
|
329
329
|
type: "groupBuy"
|
|
330
330
|
});
|
|
331
331
|
}))));
|
|
@@ -36,13 +36,26 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
36
36
|
open: true,
|
|
37
37
|
color: {
|
|
38
38
|
pc: '#D92929',
|
|
39
|
-
mobile: '#
|
|
39
|
+
mobile: '#D2D9E5'
|
|
40
40
|
},
|
|
41
41
|
backgroundColor: {
|
|
42
42
|
pc: '#fff',
|
|
43
43
|
mobile: '#fff'
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
+
keyword: {
|
|
47
|
+
open: true,
|
|
48
|
+
type: 'InputField',
|
|
49
|
+
placeholder: 'Tshirt Woman',
|
|
50
|
+
content: {
|
|
51
|
+
sizeType: 'Customize font styles',
|
|
52
|
+
fontFamily: 'Open Sans',
|
|
53
|
+
fontWeight: 600,
|
|
54
|
+
fontSize: 12,
|
|
55
|
+
pcFontSize: 14,
|
|
56
|
+
color: '#CE1126'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
46
59
|
icon: {
|
|
47
60
|
id: (0, _uuid.v4)(),
|
|
48
61
|
open: true,
|
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _antd = require("antd");
|
|
11
|
+
|
|
10
12
|
require("./index.less");
|
|
11
13
|
|
|
12
14
|
var _components = require("../../../../../meta-comp/components");
|
|
@@ -15,6 +17,8 @@ var _common = require("../../../../../common");
|
|
|
15
17
|
|
|
16
18
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
19
|
|
|
20
|
+
var _Text = require("../../../../../meta-comp/components/Text");
|
|
21
|
+
|
|
18
22
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -45,6 +49,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
45
49
|
};
|
|
46
50
|
}();
|
|
47
51
|
|
|
52
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
53
|
+
__assign = Object.assign || function (t) {
|
|
54
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
55
|
+
s = arguments[i];
|
|
56
|
+
|
|
57
|
+
for (var p in s) {
|
|
58
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return t;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return __assign.apply(this, arguments);
|
|
66
|
+
};
|
|
67
|
+
|
|
48
68
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
49
69
|
function adopt(value) {
|
|
50
70
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -198,7 +218,8 @@ function (_super) {
|
|
|
198
218
|
|
|
199
219
|
_this.state = {
|
|
200
220
|
messageNum: '',
|
|
201
|
-
cartNum: ''
|
|
221
|
+
cartNum: '',
|
|
222
|
+
editing: false
|
|
202
223
|
};
|
|
203
224
|
|
|
204
225
|
_this.getCartNum = function () {
|
|
@@ -265,60 +286,103 @@ function (_super) {
|
|
|
265
286
|
});
|
|
266
287
|
};
|
|
267
288
|
|
|
289
|
+
_this.onChange = function (e) {
|
|
290
|
+
_this.setState({
|
|
291
|
+
value: e.target.value,
|
|
292
|
+
editing: true
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
_this.onFocus = function () {
|
|
297
|
+
var _a;
|
|
298
|
+
|
|
299
|
+
var value = _this.state.value;
|
|
300
|
+
|
|
301
|
+
if (value === ((_a = _this.props.data.content.keyword) === null || _a === void 0 ? void 0 : _a.placeholder)) {
|
|
302
|
+
_this.setState({
|
|
303
|
+
value: '',
|
|
304
|
+
editing: true
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
_this.onBlur = function () {
|
|
310
|
+
var _a, _b, _c;
|
|
311
|
+
|
|
312
|
+
var value = _this.state.value;
|
|
313
|
+
|
|
314
|
+
if (!value) {
|
|
315
|
+
_this.setState({
|
|
316
|
+
value: (_c = (_b = (_a = _this.props.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder,
|
|
317
|
+
editing: false
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
268
322
|
return _this;
|
|
269
323
|
}
|
|
270
324
|
|
|
271
325
|
SearchMobile.prototype.componentDidMount = function () {
|
|
272
|
-
|
|
273
|
-
|
|
326
|
+
var _a, _b, _c;
|
|
327
|
+
|
|
274
328
|
this.getMessageNum();
|
|
275
329
|
this.getCartNum();
|
|
330
|
+
this.setState({
|
|
331
|
+
value: (_c = (_b = (_a = this.props.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
SearchMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
336
|
+
var _a, _b, _c;
|
|
337
|
+
|
|
338
|
+
if (!this.state.editing) {
|
|
339
|
+
this.setState({
|
|
340
|
+
value: (_c = (_b = (_a = nextProps.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.keyword) === null || _c === void 0 ? void 0 : _c.placeholder
|
|
341
|
+
});
|
|
342
|
+
}
|
|
276
343
|
};
|
|
277
344
|
|
|
278
345
|
SearchMobile.prototype.render = function () {
|
|
279
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
346
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
280
347
|
|
|
281
348
|
var data = this.props.data;
|
|
282
|
-
var
|
|
283
|
-
messageNum =
|
|
284
|
-
cartNum =
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
// opacity: data.content.background.opacity,
|
|
289
|
-
// };
|
|
290
|
-
// } else {
|
|
291
|
-
// styleWrap = {
|
|
292
|
-
// backgroundImage: `url(${data.content.background.image})`,
|
|
293
|
-
// backgroundPosition: 'center',
|
|
294
|
-
// backgroundRepeat: 'no-repeat',
|
|
295
|
-
// backgroundSize: '100%',
|
|
296
|
-
// };
|
|
297
|
-
// }
|
|
349
|
+
var _t = this.state,
|
|
350
|
+
messageNum = _t.messageNum,
|
|
351
|
+
cartNum = _t.cartNum,
|
|
352
|
+
value = _t.value;
|
|
353
|
+
|
|
354
|
+
var style = __assign({}, (0, _Text.contentStyle)((_a = data.content.keyword) === null || _a === void 0 ? void 0 : _a.content));
|
|
298
355
|
|
|
356
|
+
Reflect.deleteProperty(style, 'width');
|
|
299
357
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
300
358
|
className: "m-search-bar"
|
|
301
359
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
302
360
|
className: "right"
|
|
303
|
-
}, data.content && ((
|
|
361
|
+
}, data.content && ((_b = data.content.box) === null || _b === void 0 ? void 0 : _b.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
304
362
|
className: "search-input-wrap",
|
|
305
363
|
onClick: function onClick() {
|
|
306
364
|
return (0, _coreUtil.clickUrl)('/search-page');
|
|
307
365
|
},
|
|
308
366
|
style: {
|
|
309
|
-
borderColor: (
|
|
367
|
+
borderColor: (_d = (_c = data.content.box) === null || _c === void 0 ? void 0 : _c.color) === null || _d === void 0 ? void 0 : _d.mobile,
|
|
368
|
+
backgroundColor: (_f = (_e = data.content.box) === null || _e === void 0 ? void 0 : _e.backgroundColor) === null || _f === void 0 ? void 0 : _f.mobile
|
|
310
369
|
}
|
|
311
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
312
|
-
|
|
370
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
371
|
+
className: "search-input",
|
|
372
|
+
onBlur: this.onBlur,
|
|
373
|
+
onChange: this.onChange,
|
|
374
|
+
onFocus: this.onFocus,
|
|
375
|
+
style: (0, _commonUtil.pxToRem)(style),
|
|
376
|
+
type: "text",
|
|
377
|
+
value: value
|
|
378
|
+
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
379
|
+
color: (_h = (_g = data.content.box) === null || _g === void 0 ? void 0 : _g.color) === null || _h === void 0 ? void 0 : _h.mobile,
|
|
313
380
|
size: (0, _commonUtil.convertToRem)(24),
|
|
314
|
-
style: {
|
|
315
|
-
display: 'flex'
|
|
316
|
-
},
|
|
317
381
|
type: "icon-search2"
|
|
318
|
-
})), data.content && ((
|
|
382
|
+
})), data.content && ((_k = (_j = data.content.icon) === null || _j === void 0 ? void 0 : _j.cartIcon) === null || _k === void 0 ? void 0 : _k.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
319
383
|
className: "message-wrap"
|
|
320
384
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
321
|
-
color: (
|
|
385
|
+
color: (_m = (_l = data.content.icon) === null || _l === void 0 ? void 0 : _l.color) === null || _m === void 0 ? void 0 : _m.mobile,
|
|
322
386
|
onClick: function onClick() {
|
|
323
387
|
return (0, _coreUtil.clickUrl)('/main/cart');
|
|
324
388
|
},
|
|
@@ -329,10 +393,10 @@ function (_super) {
|
|
|
329
393
|
type: "icon-ShoppingCartSimple1"
|
|
330
394
|
}), !!cartNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
331
395
|
className: "num"
|
|
332
|
-
}, cartNum)), data.content && ((
|
|
396
|
+
}, cartNum)), data.content && ((_p = (_o = data.content.icon) === null || _o === void 0 ? void 0 : _o.messageIcon) === null || _p === void 0 ? void 0 : _p.mobile) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
333
397
|
className: "message-wrap"
|
|
334
398
|
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
335
|
-
color: (
|
|
399
|
+
color: (_r = (_q = data.content.icon) === null || _q === void 0 ? void 0 : _q.color) === null || _r === void 0 ? void 0 : _r.mobile,
|
|
336
400
|
onClick: function onClick() {
|
|
337
401
|
return (0, _coreUtil.clickUrl)('/message-center');
|
|
338
402
|
},
|
|
@@ -343,7 +407,7 @@ function (_super) {
|
|
|
343
407
|
type: "icon-message"
|
|
344
408
|
}), !!messageNum && /*#__PURE__*/_react["default"].createElement("span", {
|
|
345
409
|
className: "num"
|
|
346
|
-
}, messageNum))), data.content && ((
|
|
410
|
+
}, messageNum))), data.content && ((_s = data.content.logo) === null || _s === void 0 ? void 0 : _s.open) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
347
411
|
className: "logo",
|
|
348
412
|
onClick: function onClick() {
|
|
349
413
|
var _a, _b;
|
|
@@ -366,7 +430,8 @@ function (_super) {
|
|
|
366
430
|
};
|
|
367
431
|
|
|
368
432
|
SearchMobile.defaultProps = {
|
|
369
|
-
data: {}
|
|
433
|
+
data: {},
|
|
434
|
+
value: ''
|
|
370
435
|
};
|
|
371
436
|
return SearchMobile;
|
|
372
437
|
}(_react["default"].Component);
|
|
@@ -23,7 +23,17 @@
|
|
|
23
23
|
height: 0.64rem;
|
|
24
24
|
text-align: right;
|
|
25
25
|
display: flex;
|
|
26
|
-
justify-content:
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
}
|
|
28
|
+
.m-search-bar .right .search-input-wrap .search-input {
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
border: none;
|
|
31
|
+
height: 100%;
|
|
32
|
+
box-shadow: none;
|
|
33
|
+
font-family: 'Open Sans';
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
font-size: 0.28rem;
|
|
27
37
|
}
|
|
28
38
|
.m-search-bar .right .message-wrap {
|
|
29
39
|
position: relative;
|