@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,8 +15,6 @@ var _AlignSelector = require("../../../../../common/AlignSelector");
|
|
|
15
15
|
|
|
16
16
|
var _components = require("../../../../../meta-comp/components");
|
|
17
17
|
|
|
18
|
-
var _businessUtil = require("../../../../../utils/businessUtil");
|
|
19
|
-
|
|
20
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
19
|
|
|
22
20
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -104,10 +102,9 @@ function (_super) {
|
|
|
104
102
|
ImageTextMobile.prototype.render = function () {
|
|
105
103
|
var _this = this;
|
|
106
104
|
|
|
107
|
-
var data = this.props.data; //
|
|
108
|
-
// console.log('----imagetext mobile', data);
|
|
105
|
+
var data = this.props.data; // console.log('----imagetext mobile', data);
|
|
109
106
|
|
|
110
|
-
var wrapStyle =
|
|
107
|
+
var wrapStyle = {};
|
|
111
108
|
wrapStyle.textAlign = data.customize.align; // if (data.background.bgType === 'color') {
|
|
112
109
|
// wrapStyle.backgroundColor = data.background.color;
|
|
113
110
|
// wrapStyle.opacity = data.background.opacity ? data.background.opacity : 1;
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
}
|
|
60
60
|
.card-btn-wrap {
|
|
61
61
|
display: flex;
|
|
62
|
-
.card-
|
|
63
|
-
margin-
|
|
62
|
+
.card-second-btn {
|
|
63
|
+
margin-left: 12px;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
}
|
|
95
95
|
.card-btn-wrap {
|
|
96
96
|
display: flex;
|
|
97
|
-
.card-
|
|
98
|
-
margin-
|
|
97
|
+
.card-second-btn {
|
|
98
|
+
margin-left: 12px;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -135,8 +135,8 @@
|
|
|
135
135
|
flex-direction: column;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
.card-second-btn {
|
|
139
|
-
margin-
|
|
138
|
+
.card-first-btn, .card-second-btn {
|
|
139
|
+
margin-bottom: 8px;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
.card-margin-bottom {
|
|
@@ -170,8 +170,8 @@
|
|
|
170
170
|
}
|
|
171
171
|
.card-btn-wrap {
|
|
172
172
|
display: flex;
|
|
173
|
-
.card-
|
|
174
|
-
margin-
|
|
173
|
+
.card-second-btn {
|
|
174
|
+
margin-left: 12px;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -11,6 +11,8 @@ require("./index.less");
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var _lodash = require("lodash");
|
|
15
|
+
|
|
14
16
|
var _AlignSelector = require("../../../../../common/AlignSelector");
|
|
15
17
|
|
|
16
18
|
var _components = require("../../../../../meta-comp/components");
|
|
@@ -63,7 +65,7 @@ var __assign = void 0 && (void 0).__assign || function () {
|
|
|
63
65
|
|
|
64
66
|
var maxWidthAndHeight = {
|
|
65
67
|
normal: 410,
|
|
66
|
-
outside:
|
|
68
|
+
outside: 86,
|
|
67
69
|
center: 410
|
|
68
70
|
};
|
|
69
71
|
|
|
@@ -76,17 +78,26 @@ function (_super) {
|
|
|
76
78
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
77
79
|
|
|
78
80
|
_this.state = {
|
|
79
|
-
hoverIndex: -1
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
hoverIndex: -1,
|
|
82
|
+
currentMaxWidth: 410
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
_this.listenCardWidth = function () {
|
|
86
|
+
var _a;
|
|
87
|
+
|
|
88
|
+
var data = _this.props.data;
|
|
89
|
+
|
|
90
|
+
try {
|
|
91
|
+
var cardWidth = ((_a = document.querySelector('.group-wrap .one-card')) === null || _a === void 0 ? void 0 : _a.offsetWidth) - 48;
|
|
92
|
+
var maxLayoutWidth = maxWidthAndHeight[data.customize.layout.pcLayout];
|
|
93
|
+
|
|
94
|
+
_this.setState({
|
|
95
|
+
currentMaxWidth: Math.min(cardWidth, maxLayoutWidth)
|
|
96
|
+
});
|
|
97
|
+
} catch (error) {
|
|
98
|
+
console.log(error);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
90
101
|
|
|
91
102
|
_this.calcWidth = function (num) {
|
|
92
103
|
return (100 - (num - 1) * 2) / num + "%";
|
|
@@ -114,15 +125,32 @@ function (_super) {
|
|
|
114
125
|
return _this;
|
|
115
126
|
}
|
|
116
127
|
|
|
128
|
+
ImageTextPc.prototype.componentDidMount = function () {
|
|
129
|
+
var data = this.props.data;
|
|
130
|
+
this.layout = data.customize.layout.pcLayout;
|
|
131
|
+
this.listenCardWidth();
|
|
132
|
+
window.addEventListener('resize', (0, _lodash.debounce)(this.listenCardWidth));
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
ImageTextPc.prototype.componentWillUnmount = function () {
|
|
136
|
+
window.removeEventListener('resize', this.listenCardWidth);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
ImageTextPc.prototype.componentWillReceiveProps = function (nextProps) {
|
|
140
|
+
if (nextProps.data.customize.layout.pcLayout !== this.layout) {
|
|
141
|
+
this.layout = nextProps.data.customize.layout.pcLayout;
|
|
142
|
+
this.listenCardWidth();
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
117
146
|
ImageTextPc.prototype.render = function () {
|
|
118
147
|
var _this = this;
|
|
119
148
|
|
|
120
149
|
var data = this.props.data;
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
|
|
150
|
+
var _a = this.state,
|
|
151
|
+
hoverIndex = _a.hoverIndex,
|
|
152
|
+
currentMaxWidth = _a.currentMaxWidth;
|
|
153
|
+
var wrapStyle = {};
|
|
126
154
|
wrapStyle.alignItems = _AlignSelector.alignItemMap[data.customize.align];
|
|
127
155
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
128
156
|
className: (0, _classnames["default"])('image-text-pc', data.customize.layout.pcLayout),
|
|
@@ -156,7 +184,7 @@ function (_super) {
|
|
|
156
184
|
data: hoverIndex == i ? source.hover.image : source.image,
|
|
157
185
|
limitWidthHeight: true,
|
|
158
186
|
maxHeight: maxWidthAndHeight[data.customize.layout.pcLayout],
|
|
159
|
-
maxWidth:
|
|
187
|
+
maxWidth: currentMaxWidth,
|
|
160
188
|
scale: 0.5
|
|
161
189
|
})), (source.title.open && data.customize.layout.pcLayout !== 'center' && hoverIndex != i || hoverIndex == i && source.hover.title.open && data.customize.layout.pcLayout !== 'center') && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
162
190
|
className: "card-title",
|
|
@@ -111,12 +111,12 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
111
111
|
pc: {
|
|
112
112
|
paddingTop: 10,
|
|
113
113
|
paddingBottom: 10,
|
|
114
|
-
marginBottom:
|
|
114
|
+
marginBottom: window.magicDesign.compSpacing * 1.5
|
|
115
115
|
},
|
|
116
116
|
mobile: {
|
|
117
117
|
paddingTop: 10,
|
|
118
118
|
paddingBottom: 10,
|
|
119
|
-
marginBottom:
|
|
119
|
+
marginBottom: window.magicDesign.compSpacing
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
customize: {
|
|
@@ -19,8 +19,6 @@ var _Text = require("../../../../meta-comp/components/Text");
|
|
|
19
19
|
|
|
20
20
|
require("./index.less");
|
|
21
21
|
|
|
22
|
-
var _businessUtil = require("../../../../utils/businessUtil");
|
|
23
|
-
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
23
|
|
|
26
24
|
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); }
|
|
@@ -90,15 +88,12 @@ function (_super) {
|
|
|
90
88
|
// wrapStyle.backgroundPosition = 'center';
|
|
91
89
|
// }
|
|
92
90
|
|
|
93
|
-
var wrapStyle = (0, _businessUtil.computeStyle)(nodeData, window.magicDesign.device);
|
|
94
|
-
|
|
95
91
|
var style = __assign({}, (0, _Text.contentStyle)(nodeData.content.inputField.content));
|
|
96
92
|
|
|
97
93
|
Reflect.deleteProperty(style, 'width');
|
|
98
94
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
99
95
|
className: (0, _classnames["default"])('newsletter-wrap', (_a = {}, _a[nodeData.customize.layout] = true, _a[nodeData.customize.align] = true, _a[window.magicDesign.device] = true, _a)),
|
|
100
|
-
onClick: this.onComponentClick
|
|
101
|
-
style: wrapStyle
|
|
96
|
+
onClick: this.onComponentClick
|
|
102
97
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
98
|
className: "top-wrap"
|
|
104
99
|
}, nodeData.content.inputField.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -3,60 +3,51 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getDefaultJSON = void 0;
|
|
6
|
+
exports.tagGroupSourceJSON = exports.getDefaultJSON = void 0;
|
|
7
7
|
|
|
8
8
|
var _uuid = require("uuid");
|
|
9
9
|
|
|
10
|
-
var __assign = void 0 && (void 0).__assign || function () {
|
|
11
|
-
__assign = Object.assign || function (t) {
|
|
12
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
13
|
-
s = arguments[i];
|
|
14
|
-
|
|
15
|
-
for (var p in s) {
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return __assign.apply(this, arguments);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
10
|
/**
|
|
27
11
|
* 获取 text 元组件json
|
|
28
12
|
*/
|
|
29
|
-
var
|
|
13
|
+
var tagGroupSourceJSON = function tagGroupSourceJSON() {
|
|
14
|
+
var groupId = (0, _uuid.v4)();
|
|
30
15
|
return {
|
|
31
|
-
id:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
backgroundColor: '#e6eaf0'
|
|
36
|
-
},
|
|
37
|
-
buttonText: {
|
|
38
|
-
sizeType: 'Customize font styles',
|
|
39
|
-
fontFamily: 'Open Sans',
|
|
40
|
-
fontWeight: 600,
|
|
41
|
-
fontSize: 12,
|
|
42
|
-
fontStyle: 'normal',
|
|
43
|
-
color: '#8493AF',
|
|
44
|
-
padding: '2px 8px'
|
|
45
|
-
},
|
|
46
|
-
buttonBorder: {
|
|
16
|
+
id: groupId,
|
|
17
|
+
button: {
|
|
18
|
+
parentId: groupId,
|
|
19
|
+
id: (0, _uuid.v4)(),
|
|
47
20
|
open: true,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
21
|
+
content: {
|
|
22
|
+
url: '',
|
|
23
|
+
backgroundColor: '#e6eaf0'
|
|
24
|
+
},
|
|
25
|
+
buttonText: {
|
|
26
|
+
sizeType: 'Customize font styles',
|
|
27
|
+
fontFamily: 'Open Sans',
|
|
28
|
+
fontWeight: 600,
|
|
29
|
+
fontSize: 12,
|
|
30
|
+
fontStyle: 'normal',
|
|
31
|
+
color: '#8493AF',
|
|
32
|
+
padding: '2px 8px'
|
|
33
|
+
},
|
|
34
|
+
buttonBorder: {
|
|
35
|
+
open: true,
|
|
36
|
+
borderColor: '',
|
|
37
|
+
borderRadius: 4
|
|
38
|
+
},
|
|
39
|
+
buttonIcon: {
|
|
40
|
+
iconUrl: '',
|
|
41
|
+
layout: 'right'
|
|
42
|
+
},
|
|
43
|
+
text: 'Button Tag',
|
|
44
|
+
hover: null
|
|
45
|
+
}
|
|
57
46
|
};
|
|
58
47
|
};
|
|
59
48
|
|
|
49
|
+
exports.tagGroupSourceJSON = tagGroupSourceJSON;
|
|
50
|
+
|
|
60
51
|
var getDefaultJSON = function getDefaultJSON() {
|
|
61
52
|
return {
|
|
62
53
|
id: (0, _uuid.v4)(),
|
|
@@ -80,20 +71,19 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
80
71
|
pcImgHoverUrl: '',
|
|
81
72
|
h5ImgHoverUrl: ''
|
|
82
73
|
}
|
|
83
|
-
}
|
|
84
|
-
button: __assign({}, getDefaultMetaButtonJson()),
|
|
85
|
-
secondaryButton: __assign({}, getDefaultMetaButtonJson())
|
|
74
|
+
}
|
|
86
75
|
},
|
|
76
|
+
groupSource: [tagGroupSourceJSON()],
|
|
87
77
|
spacing: {
|
|
88
78
|
pc: {
|
|
89
79
|
paddingTop: 10,
|
|
90
80
|
paddingBottom: 10,
|
|
91
|
-
marginBottom:
|
|
81
|
+
marginBottom: window.magicDesign.compSpacing * 1.5
|
|
92
82
|
},
|
|
93
83
|
mobile: {
|
|
94
84
|
paddingTop: 10,
|
|
95
85
|
paddingBottom: 10,
|
|
96
|
-
marginBottom:
|
|
86
|
+
marginBottom: window.magicDesign.compSpacing
|
|
97
87
|
}
|
|
98
88
|
},
|
|
99
89
|
customize: {
|
|
@@ -15,8 +15,6 @@ var _components = require("../../../../meta-comp/components");
|
|
|
15
15
|
|
|
16
16
|
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
17
17
|
|
|
18
|
-
var _businessUtil = require("../../../../utils/businessUtil");
|
|
19
|
-
|
|
20
18
|
require("./index.less");
|
|
21
19
|
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -76,24 +74,20 @@ function (_super) {
|
|
|
76
74
|
var _a;
|
|
77
75
|
|
|
78
76
|
var nodeData = this.props.nodeData;
|
|
79
|
-
var wrapStyle = (0, _businessUtil.computeStyle)(nodeData, window.magicDesign.device);
|
|
80
77
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
78
|
className: (0, _classnames["default"])('tag-comp-wrap', (_a = {}, _a[nodeData.customize.layout] = true, _a[nodeData.customize.align] = true, _a)),
|
|
82
|
-
onClick: this.onComponentClick
|
|
83
|
-
style: wrapStyle
|
|
79
|
+
onClick: this.onComponentClick
|
|
84
80
|
}, nodeData.content.image.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
81
|
className: "tag-image"
|
|
86
82
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
87
83
|
data: nodeData.content.image
|
|
88
|
-
})), nodeData.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
data: nodeData.content.secondaryButton
|
|
96
|
-
})));
|
|
84
|
+
})), nodeData.groupSource && nodeData.groupSource.map(function (m) {
|
|
85
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
className: "first-button"
|
|
87
|
+
}, /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
88
|
+
data: m.button
|
|
89
|
+
}));
|
|
90
|
+
}));
|
|
97
91
|
};
|
|
98
92
|
|
|
99
93
|
Tag.defaultProps = {};
|
|
@@ -69,7 +69,6 @@ var textGroupSourceJSON = function textGroupSourceJSON(parentId) {
|
|
|
69
69
|
fontWeight: 600,
|
|
70
70
|
fontSize: 22,
|
|
71
71
|
pcFontSize: 22,
|
|
72
|
-
width: '100%',
|
|
73
72
|
color: '#232F46'
|
|
74
73
|
}
|
|
75
74
|
}),
|
|
@@ -84,7 +83,6 @@ var textGroupSourceJSON = function textGroupSourceJSON(parentId) {
|
|
|
84
83
|
fontWeight: 400,
|
|
85
84
|
fontSize: 18,
|
|
86
85
|
pcFontSize: 18,
|
|
87
|
-
width: '100%',
|
|
88
86
|
color: '#232F46'
|
|
89
87
|
}
|
|
90
88
|
})
|
|
@@ -103,7 +101,7 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
103
101
|
headline: __assign(__assign({}, getDefaultMetaTextJson()), {
|
|
104
102
|
text: 'Title use, click modify text.',
|
|
105
103
|
content: {
|
|
106
|
-
sizeType: '
|
|
104
|
+
sizeType: 'Customize font styles',
|
|
107
105
|
fontFamily: 'Montserrat',
|
|
108
106
|
fontWeight: 600,
|
|
109
107
|
fontSize: 28,
|
|
@@ -130,18 +128,18 @@ var getDefaultJSON = function getDefaultJSON() {
|
|
|
130
128
|
pc: {
|
|
131
129
|
paddingTop: 10,
|
|
132
130
|
paddingBottom: 10,
|
|
133
|
-
marginBottom:
|
|
131
|
+
marginBottom: window.magicDesign.compSpacing * 1.5
|
|
134
132
|
},
|
|
135
133
|
mobile: {
|
|
136
134
|
paddingTop: 10,
|
|
137
135
|
paddingBottom: 10,
|
|
138
|
-
marginBottom:
|
|
136
|
+
marginBottom: window.magicDesign.compSpacing
|
|
139
137
|
}
|
|
140
138
|
},
|
|
141
139
|
customize: {
|
|
142
140
|
layout: 'left',
|
|
143
141
|
align: 'left',
|
|
144
|
-
|
|
142
|
+
pcRowNum: 3
|
|
145
143
|
},
|
|
146
144
|
background: {
|
|
147
145
|
opacity: 100,
|
|
@@ -15,8 +15,6 @@ var _components = require("../../../../meta-comp/components");
|
|
|
15
15
|
|
|
16
16
|
var _compositeDecorator = _interopRequireDefault(require("../../../../decorator/compositeDecorator"));
|
|
17
17
|
|
|
18
|
-
var _businessUtil = require("../../../../utils/businessUtil");
|
|
19
|
-
|
|
20
18
|
require("./index.less");
|
|
21
19
|
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -76,11 +74,9 @@ function (_super) {
|
|
|
76
74
|
var _a;
|
|
77
75
|
|
|
78
76
|
var nodeData = this.props.nodeData;
|
|
79
|
-
var wrapStyle = (0, _businessUtil.computeStyle)(nodeData, window.magicDesign.device);
|
|
80
77
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
78
|
className: "m-text",
|
|
82
|
-
onClick: this.onComponentClick
|
|
83
|
-
style: wrapStyle
|
|
79
|
+
onClick: this.onComponentClick
|
|
84
80
|
}, nodeData.title.headline.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
81
|
className: "title-wrap"
|
|
86
82
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
@@ -90,7 +86,7 @@ function (_super) {
|
|
|
90
86
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
91
87
|
data: nodeData.title.subtitle
|
|
92
88
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
-
className: (0, _classnames["default"])('group-content-wrap', 'col-' + nodeData.customize.
|
|
89
|
+
className: (0, _classnames["default"])('group-content-wrap', 'col-' + nodeData.customize.pcRowNum, (_a = {}, _a[window.magicDesign.device] = true, _a))
|
|
94
90
|
}, nodeData.groupSource.map(function (group) {
|
|
95
91
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
92
|
className: "group-wrap-container"
|
|
@@ -100,11 +96,11 @@ function (_super) {
|
|
|
100
96
|
style: {
|
|
101
97
|
textAlign: nodeData.customize.align
|
|
102
98
|
}
|
|
103
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
99
|
+
}, group.content.title.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
104
100
|
className: "group-title"
|
|
105
101
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
106
102
|
data: group.content.title
|
|
107
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
+
})), group.content.text.open && /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
104
|
className: "group-content"
|
|
109
105
|
}, /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
110
106
|
data: group.content.text
|
|
@@ -21,6 +21,8 @@ require("./index.less");
|
|
|
21
21
|
|
|
22
22
|
var _locale = require("../../../../../locale");
|
|
23
23
|
|
|
24
|
+
var _decorator = require("../../../../../decorator");
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
26
28
|
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); }
|
|
@@ -120,7 +122,7 @@ function (_super) {
|
|
|
120
122
|
AComponent.defaultProps = {
|
|
121
123
|
source: []
|
|
122
124
|
};
|
|
123
|
-
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
125
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer, _decorator.updateConfigDecorator], AComponent);
|
|
124
126
|
return AComponent;
|
|
125
127
|
}(_react["default"].Component);
|
|
126
128
|
|
|
@@ -0,0 +1,141 @@
|
|
|
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 _mobxReact = require("mobx-react");
|
|
11
|
+
|
|
12
|
+
var _GroupList = _interopRequireDefault(require("../../../../../common/GroupList"));
|
|
13
|
+
|
|
14
|
+
var _defaultJSON = require("../../../components/Button/defaultJSON");
|
|
15
|
+
|
|
16
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
|
+
|
|
18
|
+
var _Button = _interopRequireDefault(require("../../../../../common/Button"));
|
|
19
|
+
|
|
20
|
+
require("./index.less");
|
|
21
|
+
|
|
22
|
+
var _locale = require("../../../../../locale");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
29
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
30
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
31
|
+
__proto__: []
|
|
32
|
+
} instanceof Array && function (d, b) {
|
|
33
|
+
d.__proto__ = b;
|
|
34
|
+
} || function (d, b) {
|
|
35
|
+
for (var p in b) {
|
|
36
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return _extendStatics(d, b);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return function (d, b) {
|
|
44
|
+
_extendStatics(d, b);
|
|
45
|
+
|
|
46
|
+
function __() {
|
|
47
|
+
this.constructor = d;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51
|
+
};
|
|
52
|
+
}();
|
|
53
|
+
|
|
54
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
55
|
+
var c = arguments.length,
|
|
56
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
57
|
+
d;
|
|
58
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
59
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
60
|
+
}
|
|
61
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var notice = '';
|
|
65
|
+
|
|
66
|
+
var AComponent =
|
|
67
|
+
/** @class */
|
|
68
|
+
function (_super) {
|
|
69
|
+
__extends(AComponent, _super);
|
|
70
|
+
|
|
71
|
+
function AComponent() {
|
|
72
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
|
|
74
|
+
_this.state = {};
|
|
75
|
+
|
|
76
|
+
_this.onClickItem = function (node) {
|
|
77
|
+
_this.props.store.setState({
|
|
78
|
+
clickedGroup: node.id
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.onAddClick = function () {
|
|
83
|
+
var json = (0, _defaultJSON.buttonGroupSourceJSON)();
|
|
84
|
+
|
|
85
|
+
_this.props.source.push(json);
|
|
86
|
+
|
|
87
|
+
_this.setState({});
|
|
88
|
+
|
|
89
|
+
(0, _coreUtil.renderPreview)();
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
_this.reRender = function () {
|
|
93
|
+
_this.setState({});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
_this.renderCard = function (src) {
|
|
97
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
98
|
+
className: "card_wrap"
|
|
99
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
+
className: "name"
|
|
101
|
+
}, "Button Name"));
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
return _this;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
AComponent.prototype.render = function () {
|
|
108
|
+
var _this = this;
|
|
109
|
+
|
|
110
|
+
var source = this.props.source;
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
112
|
+
className: "button_group"
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
+
className: "node_list"
|
|
115
|
+
}, source.length === 0 ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
116
|
+
className: "notice"
|
|
117
|
+
}, notice) : /*#__PURE__*/_react["default"].createElement(_GroupList["default"], {
|
|
118
|
+
onClickItem: this.onClickItem,
|
|
119
|
+
renderCard: function renderCard(v) {
|
|
120
|
+
return _this.renderCard(v);
|
|
121
|
+
},
|
|
122
|
+
reRender: this.reRender,
|
|
123
|
+
source: source
|
|
124
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
|
+
className: "btn_wrap"
|
|
126
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
127
|
+
icon: "icon-add",
|
|
128
|
+
onClick: this.onAddClick,
|
|
129
|
+
type: "primary"
|
|
130
|
+
}, (0, _locale.i18n)('ADD_BUTTON'))));
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
AComponent.defaultProps = {
|
|
134
|
+
source: []
|
|
135
|
+
};
|
|
136
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
137
|
+
return AComponent;
|
|
138
|
+
}(_react["default"].Component);
|
|
139
|
+
|
|
140
|
+
var _default = AComponent;
|
|
141
|
+
exports["default"] = _default;
|