@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
|
@@ -121,9 +121,11 @@ function PageCompList(_a) {
|
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
var onMenuClick = function onMenuClick(
|
|
124
|
+
var onMenuClick = function onMenuClick(activeComp, operType) {
|
|
125
125
|
var newComponents = __spreadArrays(components);
|
|
126
126
|
|
|
127
|
+
var index = newComponents.indexOf(activeComp);
|
|
128
|
+
|
|
127
129
|
if (operType === operTypeMap.MOVE_UP) {
|
|
128
130
|
var temp = newComponents[index - 1];
|
|
129
131
|
newComponents[index - 1] = newComponents[index];
|
|
@@ -178,7 +180,7 @@ function PageCompList(_a) {
|
|
|
178
180
|
var menu = /*#__PURE__*/_react["default"].createElement(_antd.Menu, {
|
|
179
181
|
onClick: function onClick(_a) {
|
|
180
182
|
var item = _a.item;
|
|
181
|
-
return onMenuClick(
|
|
183
|
+
return onMenuClick(comp, item.props.value);
|
|
182
184
|
}
|
|
183
185
|
}, index !== 0 && /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, {
|
|
184
186
|
className: "menu_item",
|
|
@@ -245,6 +247,14 @@ function PageCompList(_a) {
|
|
|
245
247
|
})));
|
|
246
248
|
};
|
|
247
249
|
|
|
250
|
+
var getActiveComponents = function getActiveComponents() {
|
|
251
|
+
var filter = components.filter(function (comp) {
|
|
252
|
+
return (0, _coreUtil.isActiveFloor)(comp.activeTerminal);
|
|
253
|
+
});
|
|
254
|
+
return filter;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
var activeComponents = getActiveComponents();
|
|
248
258
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
249
259
|
className: "page-comp-wrap"
|
|
250
260
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -262,7 +272,7 @@ function PageCompList(_a) {
|
|
|
262
272
|
className: "list mt16"
|
|
263
273
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
264
274
|
className: "inner-list"
|
|
265
|
-
}, /*#__PURE__*/_react["default"].createElement("div", null,
|
|
275
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, activeComponents.length > 0 && activeComponents.map(function (comp, i) {
|
|
266
276
|
return renderCard(comp, i);
|
|
267
277
|
}))))));
|
|
268
278
|
}
|
|
@@ -121,19 +121,19 @@
|
|
|
121
121
|
display: block;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
}
|
|
125
124
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
&.active {
|
|
126
|
+
background: #E9F0FF;
|
|
127
|
+
color: #2F54EB;
|
|
129
128
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
.left {
|
|
130
|
+
.card-title {
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
}
|
|
133
133
|
}
|
|
134
|
-
}
|
|
135
134
|
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
.more-btn {
|
|
136
|
+
display: block;
|
|
137
|
+
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -82,7 +82,7 @@ function (_super) {
|
|
|
82
82
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
83
83
|
|
|
84
84
|
_this.onBtnClick = function (event) {
|
|
85
|
-
var code = event.currentTarget.dataset.code;
|
|
85
|
+
var code = event.currentTarget.dataset.code; // 保存和发布时需要清空组件和元组件的选中状态,否则截图中会看到选中状态
|
|
86
86
|
|
|
87
87
|
if (code === _constants.quickMenuCode.SAVE || code === _constants.quickMenuCode.PUBLISH) {
|
|
88
88
|
_mobx.store.setState({
|
|
@@ -17,10 +17,12 @@ var _constants = require("../../../constants");
|
|
|
17
17
|
|
|
18
18
|
var _componentTypes = require("../../../constants/component-types");
|
|
19
19
|
|
|
20
|
-
require("./index.less");
|
|
21
|
-
|
|
22
20
|
var _mobx = require("../../../mobx");
|
|
23
21
|
|
|
22
|
+
var _coreUtil = require("../../../utils/coreUtil");
|
|
23
|
+
|
|
24
|
+
require("./index.less");
|
|
25
|
+
|
|
24
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
27
|
|
|
26
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -86,10 +88,22 @@ function (_super) {
|
|
|
86
88
|
_this.isPhoneEdit = function () {
|
|
87
89
|
var device = _this.props.device;
|
|
88
90
|
return device === _constants.deviceTypeMap.PHONE && !(0, _isEmpty["default"])(_this.state.clickedFloor);
|
|
89
|
-
};
|
|
91
|
+
}; // renderView = () => {
|
|
92
|
+
// this.setState({});
|
|
93
|
+
// }
|
|
94
|
+
// 根据楼层展示设备进行过滤
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
_this.filterCompFloor = function (dataSource) {
|
|
98
|
+
var source = [];
|
|
99
|
+
|
|
100
|
+
if (dataSource && dataSource.length) {
|
|
101
|
+
source = dataSource.filter(function (node) {
|
|
102
|
+
return (0, _coreUtil.isActiveFloor)(node.activeTerminal);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
90
105
|
|
|
91
|
-
|
|
92
|
-
_this.setState({});
|
|
106
|
+
return source;
|
|
93
107
|
};
|
|
94
108
|
|
|
95
109
|
return _this;
|
|
@@ -125,7 +139,7 @@ function (_super) {
|
|
|
125
139
|
style: {
|
|
126
140
|
background: window.magicDesign.pageBackground
|
|
127
141
|
}
|
|
128
|
-
}, pageData
|
|
142
|
+
}, this.filterCompFloor(pageData).map(function (nodeData) {
|
|
129
143
|
var Clazz = _componentTypes.componentMap[nodeData.type];
|
|
130
144
|
|
|
131
145
|
if (!Clazz) {
|
|
@@ -97,11 +97,14 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
97
97
|
return r;
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
+
window.magicDesign = {
|
|
101
|
+
mode: 'designer',
|
|
102
|
+
device: _constants.deviceTypeMap.PHONE
|
|
103
|
+
};
|
|
104
|
+
|
|
100
105
|
var setDesignConfig = function setDesignConfig(data) {
|
|
101
|
-
window.magicDesign = __assign(__assign({
|
|
102
|
-
|
|
103
|
-
device: _constants.deviceTypeMap.PHONE
|
|
104
|
-
}, data), {
|
|
106
|
+
window.magicDesign = __assign(__assign(__assign({}, window.magicDesign), data), {
|
|
107
|
+
compSpacing: Number(data.compSpacing),
|
|
105
108
|
MBaseUrl: data.MBaseUrl || ''
|
|
106
109
|
});
|
|
107
110
|
};
|
|
@@ -169,14 +172,16 @@ function (_super) {
|
|
|
169
172
|
_this.configRef.current.closeMobileConfig();
|
|
170
173
|
};
|
|
171
174
|
|
|
172
|
-
_this.reRenderViewArea = function () {
|
|
173
|
-
if (
|
|
174
|
-
|
|
175
|
+
_this.reRenderViewArea = function (e) {
|
|
176
|
+
if (e.changeHistory) {
|
|
177
|
+
_this.history.push(_this.state.MPageData);
|
|
175
178
|
}
|
|
176
179
|
|
|
177
|
-
|
|
180
|
+
_mobx.store.setState({
|
|
181
|
+
MPageData: _this.state.MPageData
|
|
182
|
+
});
|
|
178
183
|
|
|
179
|
-
_this.
|
|
184
|
+
_this.setState({});
|
|
180
185
|
};
|
|
181
186
|
|
|
182
187
|
_this.componentClick = function (event) {
|
|
@@ -186,12 +191,12 @@ function (_super) {
|
|
|
186
191
|
};
|
|
187
192
|
/**
|
|
188
193
|
* 楼层 的 新增、删除、拷贝、顺序调整、属性修改时调用
|
|
189
|
-
* @param {*}
|
|
194
|
+
* @param {*} newPageData 模版信息
|
|
190
195
|
*/
|
|
191
196
|
|
|
192
197
|
|
|
193
|
-
_this.setPageData = function (
|
|
194
|
-
var MPageData = _this.history.push(
|
|
198
|
+
_this.setPageData = function (newPageData) {
|
|
199
|
+
var MPageData = _this.history.push(newPageData);
|
|
195
200
|
|
|
196
201
|
_this.setState({
|
|
197
202
|
MPageData: MPageData
|
|
@@ -247,7 +252,8 @@ function (_super) {
|
|
|
247
252
|
};
|
|
248
253
|
|
|
249
254
|
_this.addComponent = function (_a) {
|
|
250
|
-
var type = _a.type
|
|
255
|
+
var type = _a.type,
|
|
256
|
+
terminalType = _a.terminalType;
|
|
251
257
|
var MPageData = _this.state.MPageData;
|
|
252
258
|
var compType = _componentTypes.componentMap[type];
|
|
253
259
|
|
|
@@ -258,7 +264,10 @@ function (_super) {
|
|
|
258
264
|
|
|
259
265
|
var compInst = compType.getDefaultJSON();
|
|
260
266
|
|
|
261
|
-
var newData = __spreadArrays(MPageData, [compInst
|
|
267
|
+
var newData = __spreadArrays(MPageData, [__assign(__assign({}, compInst), {
|
|
268
|
+
terminalType: terminalType,
|
|
269
|
+
activeTerminal: terminalType
|
|
270
|
+
})]);
|
|
262
271
|
|
|
263
272
|
_this.history.push(newData);
|
|
264
273
|
|
|
@@ -298,18 +307,24 @@ function (_super) {
|
|
|
298
307
|
device: device
|
|
299
308
|
};
|
|
300
309
|
|
|
310
|
+
var callback = function callback(newPageData) {
|
|
311
|
+
_mobx.store.setState({
|
|
312
|
+
MPageData: newPageData
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
_this.setState({
|
|
316
|
+
MPageData: newPageData
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
|
|
301
320
|
switch (code) {
|
|
302
321
|
case _constants.quickMenuCode.UNDO:
|
|
303
|
-
_this.
|
|
304
|
-
MPageData: _this.history.undo()
|
|
305
|
-
});
|
|
322
|
+
_this.history.undo(callback);
|
|
306
323
|
|
|
307
324
|
break;
|
|
308
325
|
|
|
309
326
|
case _constants.quickMenuCode.REDO:
|
|
310
|
-
_this.
|
|
311
|
-
MPageData: _this.history.redo()
|
|
312
|
-
});
|
|
327
|
+
_this.history.redo(callback);
|
|
313
328
|
|
|
314
329
|
break;
|
|
315
330
|
|
|
@@ -335,8 +350,6 @@ function (_super) {
|
|
|
335
350
|
|
|
336
351
|
break;
|
|
337
352
|
}
|
|
338
|
-
|
|
339
|
-
console.log(JSON.stringify(handleParams.pageData));
|
|
340
353
|
};
|
|
341
354
|
|
|
342
355
|
_this.renderHeader = function () {
|
|
@@ -353,27 +366,20 @@ function (_super) {
|
|
|
353
366
|
config = props.config,
|
|
354
367
|
locale = props.locale;
|
|
355
368
|
var MPageData = pageData.childNodes || [];
|
|
369
|
+
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
356
370
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
});
|
|
360
|
-
/** 使用默认国际化 */
|
|
361
|
-
// if (!store.locale) {
|
|
362
|
-
|
|
371
|
+
_this.compListRef = /*#__PURE__*/_react["default"].createRef();
|
|
372
|
+
_this.history = new _History["default"](MPageData);
|
|
363
373
|
|
|
364
374
|
_mobx.store.setState({
|
|
375
|
+
MPageData: MPageData,
|
|
365
376
|
locale: locale
|
|
366
|
-
});
|
|
367
|
-
|
|
377
|
+
});
|
|
368
378
|
|
|
369
|
-
_this.configRef = /*#__PURE__*/_react["default"].createRef();
|
|
370
|
-
_this.viewAreaRef = /*#__PURE__*/_react["default"].createRef();
|
|
371
|
-
_this.compListRef = /*#__PURE__*/_react["default"].createRef();
|
|
372
379
|
_this.state = {
|
|
373
380
|
MPageData: MPageData,
|
|
374
381
|
device: _constants.deviceTypeMap.PHONE
|
|
375
382
|
};
|
|
376
|
-
_this.history = new _History["default"](MPageData);
|
|
377
383
|
setDesignConfig(config);
|
|
378
384
|
return _this;
|
|
379
385
|
}
|
|
@@ -398,6 +404,7 @@ function (_super) {
|
|
|
398
404
|
var pageData = nextProps.pageData,
|
|
399
405
|
config = nextProps.config;
|
|
400
406
|
var MPageData = pageData.childNodes || [];
|
|
407
|
+
this.history = new _History["default"](MPageData);
|
|
401
408
|
this.setState({
|
|
402
409
|
MPageData: MPageData
|
|
403
410
|
});
|
|
@@ -406,7 +413,6 @@ function (_super) {
|
|
|
406
413
|
MPageData: MPageData
|
|
407
414
|
});
|
|
408
415
|
|
|
409
|
-
this.history = new _History["default"](MPageData);
|
|
410
416
|
setDesignConfig(config);
|
|
411
417
|
};
|
|
412
418
|
|
|
@@ -467,8 +473,8 @@ function (_super) {
|
|
|
467
473
|
device: device,
|
|
468
474
|
onClose: this.onPropsPanelClose,
|
|
469
475
|
pageData: MPageData
|
|
470
|
-
}), /*#__PURE__*/_react["default"].createElement(_ViewArea["default"]
|
|
471
|
-
|
|
476
|
+
}), /*#__PURE__*/_react["default"].createElement(_ViewArea["default"] // ref={this.viewAreaRef}
|
|
477
|
+
, {
|
|
472
478
|
device: device,
|
|
473
479
|
pageData: MPageData,
|
|
474
480
|
renderHeader: this.renderHeader
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _componentTypes = require("../../constants/component-types");
|
|
11
11
|
|
|
12
|
+
var _coreUtil = require("../../utils/coreUtil");
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
15
|
|
|
14
16
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
@@ -33,13 +35,14 @@ var setDesignConfig = function setDesignConfig(props) {
|
|
|
33
35
|
var config = props.config,
|
|
34
36
|
device = props.device,
|
|
35
37
|
isShop = props.isShop;
|
|
36
|
-
window.magicDesign = __assign({
|
|
38
|
+
window.magicDesign = __assign(__assign({
|
|
37
39
|
pageBackground: '#f2f2f2',
|
|
38
|
-
compSpacing: '16',
|
|
39
40
|
mode: 'renderer',
|
|
40
41
|
device: device,
|
|
41
42
|
isShop: isShop
|
|
42
|
-
}, config)
|
|
43
|
+
}, config), {
|
|
44
|
+
compSpacing: Number(config.compSpacing)
|
|
45
|
+
});
|
|
43
46
|
};
|
|
44
47
|
/**
|
|
45
48
|
* @class Renderer 页面预览器,外部工程使用此类来渲染出页面。
|
|
@@ -48,14 +51,27 @@ var setDesignConfig = function setDesignConfig(props) {
|
|
|
48
51
|
|
|
49
52
|
var Renderer = function Renderer(props) {
|
|
50
53
|
var pageData = props.pageData;
|
|
51
|
-
setDesignConfig(props);
|
|
54
|
+
setDesignConfig(props); // 根据楼层展示设备进行过滤
|
|
55
|
+
|
|
56
|
+
var filterCompFloor = function filterCompFloor() {
|
|
57
|
+
var source = [];
|
|
58
|
+
|
|
59
|
+
if (pageData && pageData.childNodes && pageData.childNodes.length) {
|
|
60
|
+
source = pageData.childNodes.filter(function (node) {
|
|
61
|
+
return (0, _coreUtil.isActiveFloor)(node.activeTerminal);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return source;
|
|
66
|
+
};
|
|
67
|
+
|
|
52
68
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
53
69
|
className: "render_wrap",
|
|
54
70
|
magic_design: "",
|
|
55
71
|
style: {
|
|
56
72
|
background: window.magicDesign.pageBackground
|
|
57
73
|
}
|
|
58
|
-
},
|
|
74
|
+
}, filterCompFloor().map(function (nodeData) {
|
|
59
75
|
var Clazz = _componentTypes.componentMap[nodeData.type];
|
|
60
76
|
|
|
61
77
|
if (!Clazz) {
|
|
@@ -41,6 +41,22 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
41
41
|
};
|
|
42
42
|
}();
|
|
43
43
|
|
|
44
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
45
|
+
__assign = Object.assign || function (t) {
|
|
46
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
47
|
+
s = arguments[i];
|
|
48
|
+
|
|
49
|
+
for (var p in s) {
|
|
50
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return __assign.apply(this, arguments);
|
|
58
|
+
};
|
|
59
|
+
|
|
44
60
|
function compositeDecorator(WrappedComponent) {
|
|
45
61
|
var Wrapper =
|
|
46
62
|
/** @class */
|
|
@@ -74,26 +90,43 @@ function compositeDecorator(WrappedComponent) {
|
|
|
74
90
|
};
|
|
75
91
|
|
|
76
92
|
_this.getStyle = function () {
|
|
77
|
-
var
|
|
93
|
+
var wrapStyle = {
|
|
78
94
|
border: 'none'
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
|
|
95
|
+
};
|
|
96
|
+
var _a = window.magicDesign,
|
|
97
|
+
device = _a.device,
|
|
98
|
+
mode = _a.mode;
|
|
99
|
+
var nodeData = _this.props.nodeData;
|
|
100
|
+
var spacing = nodeData.spacing,
|
|
101
|
+
background = nodeData.background; // 处理复合组件的选中状态
|
|
102
|
+
|
|
103
|
+
if (mode === 'designer') {
|
|
82
104
|
// style.border = '1px solid transparent';
|
|
83
|
-
|
|
105
|
+
wrapStyle.border = 'none';
|
|
84
106
|
|
|
85
|
-
if (
|
|
86
|
-
|
|
107
|
+
if (nodeData.id === _this.state.clickedFloor) {
|
|
108
|
+
wrapStyle.border = '1px dashed red';
|
|
87
109
|
}
|
|
88
|
-
} //
|
|
110
|
+
} // 边距
|
|
111
|
+
|
|
89
112
|
|
|
113
|
+
if (spacing && spacing[device]) {
|
|
114
|
+
wrapStyle = __assign(__assign({}, wrapStyle), spacing[device]);
|
|
115
|
+
} // 背景
|
|
90
116
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
117
|
+
|
|
118
|
+
if (background) {
|
|
119
|
+
if (background.bgType === 'color') {
|
|
120
|
+
wrapStyle.backgroundColor = background.color;
|
|
121
|
+
wrapStyle.opacity = background.opacity ? background.opacity : 1;
|
|
122
|
+
} else {
|
|
123
|
+
wrapStyle.backgroundImage = "url(" + background.image + ")";
|
|
124
|
+
wrapStyle.backgroundPosition = 'center';
|
|
125
|
+
wrapStyle.backgroundSize = 'cover';
|
|
126
|
+
}
|
|
94
127
|
}
|
|
95
128
|
|
|
96
|
-
return
|
|
129
|
+
return wrapStyle;
|
|
97
130
|
};
|
|
98
131
|
|
|
99
132
|
return _this;
|
package/lib/decorator/index.js
CHANGED
|
@@ -15,9 +15,17 @@ Object.defineProperty(exports, "metaDecorator", {
|
|
|
15
15
|
return _metaDecorator["default"];
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "updateConfigDecorator", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _updateConfigDecorator["default"];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
|
|
19
25
|
var _compositeDecorator = _interopRequireDefault(require("./compositeDecorator"));
|
|
20
26
|
|
|
21
27
|
var _metaDecorator = _interopRequireDefault(require("./metaDecorator"));
|
|
22
28
|
|
|
29
|
+
var _updateConfigDecorator = _interopRequireDefault(require("./updateConfigDecorator"));
|
|
30
|
+
|
|
23
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -69,7 +69,7 @@ function metaDecorator(WrappedComponent) {
|
|
|
69
69
|
}; // 元组件点击事件
|
|
70
70
|
|
|
71
71
|
_this.onMetaClick = function (event) {
|
|
72
|
-
var _a, _b
|
|
72
|
+
var _a, _b;
|
|
73
73
|
|
|
74
74
|
if (window.magicDesign.mode === 'renderer') {
|
|
75
75
|
return;
|
|
@@ -90,7 +90,7 @@ function metaDecorator(WrappedComponent) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
_mobx.store.setState({
|
|
93
|
-
clickedMeta:
|
|
93
|
+
clickedMeta: metaId,
|
|
94
94
|
clickedGroup: parentId,
|
|
95
95
|
clickedFloor: floorId
|
|
96
96
|
});
|
|
@@ -142,7 +142,8 @@ function metaDecorator(WrappedComponent) {
|
|
|
142
142
|
var isClick = (data === null || data === void 0 ? void 0 : data.id) === clickedMeta;
|
|
143
143
|
var style = {
|
|
144
144
|
boxSizing: 'border-box',
|
|
145
|
-
height: '100%'
|
|
145
|
+
height: '100%',
|
|
146
|
+
border: '1px solid transparent'
|
|
146
147
|
};
|
|
147
148
|
|
|
148
149
|
if (window.magicDesign.mode === 'renderer') {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = updateConfigDecorator;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
15
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
16
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
17
|
+
__proto__: []
|
|
18
|
+
} instanceof Array && function (d, b) {
|
|
19
|
+
d.__proto__ = b;
|
|
20
|
+
} || function (d, b) {
|
|
21
|
+
for (var p in b) {
|
|
22
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return _extendStatics(d, b);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return function (d, b) {
|
|
30
|
+
_extendStatics(d, b);
|
|
31
|
+
|
|
32
|
+
function __() {
|
|
33
|
+
this.constructor = d;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
37
|
+
};
|
|
38
|
+
}();
|
|
39
|
+
/**
|
|
40
|
+
* 更新组件一级配置面板的装修器
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
function updateConfigDecorator(WrappedComponent) {
|
|
45
|
+
var Wrapper =
|
|
46
|
+
/** @class */
|
|
47
|
+
function (_super) {
|
|
48
|
+
__extends(Wrapper, _super);
|
|
49
|
+
|
|
50
|
+
function Wrapper() {
|
|
51
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
+
|
|
53
|
+
_this.update = function () {
|
|
54
|
+
_this.setState({});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return _this;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
Wrapper.prototype.componentDidMount = function () {
|
|
61
|
+
window.document.addEventListener(_constants.eventType.UPDATE_FIRST_CONFIG, this.update);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
Wrapper.prototype.componentWillUnmount = function () {
|
|
65
|
+
window.document.removeEventListener(_constants.eventType.UPDATE_FIRST_CONFIG, this.update);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
Wrapper.prototype.render = function () {
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(WrappedComponent, this.props);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return Wrapper;
|
|
73
|
+
}(_react["default"].Component);
|
|
74
|
+
|
|
75
|
+
return Wrapper;
|
|
76
|
+
}
|
package/lib/locale/en/en.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SEARCH_BOX": "Search Box",
|
|
3
|
+
"PLEASE_INPUT_KEYWORDS": "Please input keywords",
|
|
4
|
+
"SHOPPING_CART": "Shopping Cart",
|
|
5
|
+
"ADD_BUTTON": "Add Button",
|
|
6
|
+
"BUTTON_TAG": "Button Tag",
|
|
7
|
+
"ADD_TAG": "Add Tag",
|
|
8
|
+
"LAST_CATEGORY": "Last Category",
|
|
9
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
10
|
+
"FIRST_CATEGORY": "First Category",
|
|
11
|
+
"ALL_CATEGORY": "All Category",
|
|
12
|
+
"HOME": "Home",
|
|
13
|
+
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
14
|
+
"ADD_AREA": "Add Area",
|
|
15
|
+
"CLICKABLE_AREA": "Clickable Area",
|
|
2
16
|
"VOUCHER_SUCCESS": "Voucher received successfully!",
|
|
3
17
|
"NAVIGATION_NAME": "Navigation Name",
|
|
4
18
|
"ADD_NAVIGATION": "Add Navigation",
|
|
@@ -85,7 +99,6 @@
|
|
|
85
99
|
"INPUT_FIELD": "Input Field",
|
|
86
100
|
"CONFIRMATION": "Confirmation",
|
|
87
101
|
"IMAGE_TAG": "Image Tag",
|
|
88
|
-
"BUTTON_TAG": "Button Tag",
|
|
89
102
|
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
90
103
|
"TITLE": "Title",
|
|
91
104
|
"HOVER": "Hover",
|
package/lib/locale/es/es.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SEARCH_BOX": "Search Box",
|
|
3
|
+
"PLEASE_INPUT_KEYWORDS": "Please input keywords",
|
|
4
|
+
"SHOPPING_CART": "Shopping Cart",
|
|
5
|
+
"ADD_BUTTON": "Add Button",
|
|
6
|
+
"BUTTON_TAG": "Etiqueta de botón",
|
|
7
|
+
"ADD_TAG": "Add Tag",
|
|
8
|
+
"LAST_CATEGORY": "Last Category",
|
|
9
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
10
|
+
"FIRST_CATEGORY": "First Category",
|
|
11
|
+
"ALL_CATEGORY": "All Category",
|
|
12
|
+
"HOME": "Home",
|
|
13
|
+
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
14
|
+
"ADD_AREA": "Add Area",
|
|
15
|
+
"CLICKABLE_AREA": "Clickable Area",
|
|
2
16
|
"VOUCHER_SUCCESS": "Voucher received successfully!",
|
|
3
17
|
"NAVIGATION_NAME": "Navigation Name",
|
|
4
18
|
"ADD_NAVIGATION": "Add Navigation",
|
|
@@ -85,7 +99,6 @@
|
|
|
85
99
|
"INPUT_FIELD": "Campo de entrada",
|
|
86
100
|
"CONFIRMATION": "Confirmación",
|
|
87
101
|
"IMAGE_TAG": "Etiqueta de imagen",
|
|
88
|
-
"BUTTON_TAG": "Etiqueta de botón",
|
|
89
102
|
"SECONDARY_BUTTON_TAG": "Etiqueta de botón secundario",
|
|
90
103
|
"TITLE": "Título",
|
|
91
104
|
"HOVER": "Hover",
|
package/lib/locale/id/id.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
+
"SEARCH_BOX": "Search Box",
|
|
3
|
+
"PLEASE_INPUT_KEYWORDS": "Please input keywords",
|
|
4
|
+
"SHOPPING_CART": "Shopping Cart",
|
|
5
|
+
"ADD_BUTTON": "Add Button",
|
|
6
|
+
"BUTTON_TAG": "Button Tag",
|
|
7
|
+
"ADD_TAG": "Add Tag",
|
|
8
|
+
"LAST_CATEGORY": "Last Category",
|
|
9
|
+
"SECONDARY_CATEGORY": "Secondary Category",
|
|
10
|
+
"FIRST_CATEGORY": "First Category",
|
|
11
|
+
"ALL_CATEGORY": "All Category",
|
|
12
|
+
"HOME": "Home",
|
|
13
|
+
"ADD_CLICKABLE_AREA": "Add Clickable Area",
|
|
14
|
+
"ADD_AREA": "Add Area",
|
|
15
|
+
"CLICKABLE_AREA": "Clickable Area",
|
|
2
16
|
"VOUCHER_SUCCESS": "Voucher received successfully!",
|
|
3
17
|
"NAVIGATION_NAME": "Navigation Name",
|
|
4
18
|
"ADD_NAVIGATION": "Add Navigation",
|
|
@@ -85,7 +99,6 @@
|
|
|
85
99
|
"INPUT_FIELD": "Input Field",
|
|
86
100
|
"CONFIRMATION": "Confirmation",
|
|
87
101
|
"IMAGE_TAG": "Image Tag",
|
|
88
|
-
"BUTTON_TAG": "Button Tag",
|
|
89
102
|
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
90
103
|
"TITLE": "Title",
|
|
91
104
|
"HOVER": "Hover",
|