@fonixtree/magic-design 0.0.71 → 0.0.72
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 +12 -24
- package/es/assets/fonts/magic-box-iconfont.css.bak +12 -24
- 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/less/modal.less +2 -7
- package/es/common/Button/index.js +1 -2
- package/es/common/Button/index.less +0 -5
- package/es/common/ButtonIconLayout/index.less +2 -4
- package/es/common/Collapse/index.js +4 -14
- package/es/common/GroupList/index.js +3 -2
- package/es/common/ImageModal/index.js +26 -31
- package/es/common/ImageModal/index.less +1 -6
- package/es/common/LinkModal/BundleCampaign/index.js +17 -17
- package/es/common/LinkModal/CustomTable/index.js +1 -2
- package/es/common/LinkModal/FilteredProductModal/index.js +2 -2
- package/es/common/LinkModal/FilteredProductModal/index.less +2 -6
- package/es/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/es/common/LinkModal/index.less +1 -1
- package/es/common/ProductModal/index.js +1 -1
- package/es/common/ProductModal/index.less +7 -12
- package/es/common/UrlPicker/index.js +2 -6
- package/es/common/UrlPicker/index.less +1 -12
- package/es/common/index.js +0 -8
- package/es/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
- package/es/composite-comp/bol/components/Banner/mobile/index.js +10 -4
- package/es/composite-comp/bol/components/Banner/pc/index.js +6 -3
- package/es/composite-comp/bol/components/Button/defaultJSON.js +70 -40
- package/es/composite-comp/bol/components/Button/index.js +14 -8
- package/es/composite-comp/bol/components/Button/index.less +0 -1
- package/es/composite-comp/bol/components/Carousel/defaultJSON.js +16 -12
- package/es/composite-comp/bol/components/Carousel/index.js +6 -1
- package/es/composite-comp/bol/components/Carousel/mobile/index.js +7 -4
- package/es/composite-comp/bol/components/Carousel/pc/index.js +7 -12
- package/es/composite-comp/bol/components/Carousel/pc/index.less +5 -13
- package/es/composite-comp/bol/components/ImageGallery/defaultJSON.js +2 -2
- package/es/composite-comp/bol/components/ImageText/defaultJSON.js +166 -26
- package/es/composite-comp/bol/components/ImageText/mobile/index.js +5 -2
- package/es/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
- package/es/composite-comp/bol/components/ImageText/pc/index.js +18 -46
- package/es/composite-comp/bol/components/Newsletter/defaultJSON.js +2 -2
- package/es/composite-comp/bol/components/Newsletter/index.js +6 -1
- package/es/composite-comp/bol/components/Tag/defaultJSON.js +48 -38
- package/es/composite-comp/bol/components/Tag/index.js +14 -8
- package/es/composite-comp/bol/components/Tag/index.less +0 -1
- package/es/composite-comp/bol/components/Text/defaultJSON.js +4 -4
- package/es/composite-comp/bol/components/Text/index.js +8 -4
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +1 -3
- package/{lib/composite-comp/bol/second-config-panels/TagSecondConfig → es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent}/index.js +38 -40
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +2 -4
- package/es/composite-comp/bol/config-panels/CarouselConfig/index.js +0 -1
- package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +1 -3
- package/es/composite-comp/bol/config-panels/ImageTextConfig/index.js +1 -2
- package/es/composite-comp/bol/config-panels/NewsletterConfig/index.js +4 -6
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +17 -9
- package/es/composite-comp/bol/config-panels/TagCompConfig/index.js +4 -7
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +1 -3
- package/es/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
- package/es/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +13 -8
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +5 -10
- package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/es/composite-comp/common/components/ImageLabel/index.less +2 -6
- package/es/composite-comp/common/components/ProductItem/index.less +10 -9
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -24
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
- package/es/composite-comp/dito/components/FlashDeal/defaultJSON.js +2 -62
- package/es/composite-comp/dito/components/FlashDeal/index.js +1 -5
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -0
- package/es/composite-comp/dito/components/MobileNavigation/defaultJSON.js +4 -5
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +3 -13
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +2 -3
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +12 -30
- package/es/composite-comp/dito/components/Recommend/index.js +6 -5
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +35 -40
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +3 -10
- package/es/composite-comp/dito/components/Recommend/pc/index.js +19 -123
- package/es/composite-comp/dito/components/Recommend/pc/index.less +12 -53
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -26
- package/es/composite-comp/dito/components/SearchBar/index.js +2 -7
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +23 -26
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +3 -13
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +6 -16
- package/es/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +0 -20
- package/es/composite-comp/dito/config-panels/FlashDealConfig/index.js +3 -21
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +3 -17
- package/es/composite-comp/dito/config-panels/SearchBarConfig/index.js +5 -42
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +29 -39
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +49 -80
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +1 -13
- package/es/constants/component-types.js +3 -13
- package/es/constants/index.js +2 -20
- package/es/constants/layout.js +8 -34
- package/es/core/Designer/CompListPanel/index.js +33 -8
- package/es/core/Designer/ConfigPanel/index.js +23 -72
- package/es/core/Designer/ConfigPanel/index.less +0 -4
- package/es/core/Designer/History/index.js +28 -34
- package/es/core/Designer/PageCompList/index.js +3 -13
- 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 +6 -20
- package/es/core/Designer/index.js +37 -42
- package/es/core/Renderer/index.js +2 -17
- package/es/decorator/compositeDecorator.js +12 -45
- package/es/decorator/index.js +0 -8
- package/es/decorator/metaDecorator.js +2 -2
- package/es/locale/en/en.json +1 -14
- package/es/locale/es/es.json +1 -14
- package/es/locale/id/id.json +1 -14
- package/es/meta-comp/components/Button/index.js +13 -32
- package/es/meta-comp/components/Button/index.less +2 -10
- package/es/meta-comp/components/Image/index.js +7 -38
- package/es/meta-comp/components/Image/index.less +0 -2
- package/es/meta-comp/components/Text/index.js +11 -27
- package/es/meta-comp/config-panels/BaseConfig.js +10 -8
- package/es/meta-comp/config-panels/ButtonConfig/index.js +2 -2
- package/es/meta-comp/config-panels/ImageConfig/index.js +4 -17
- package/es/meta-comp/config-panels/TextConfig/index.js +3 -10
- package/es/mobx/Store.js +10 -6
- package/es/utils/coreUtil.js +3 -17
- package/lib/assets/fonts/magic-box-iconfont.css +12 -24
- package/lib/assets/fonts/magic-box-iconfont.css.bak +12 -24
- 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/less/modal.less +2 -7
- package/lib/common/Button/index.js +1 -2
- package/lib/common/Button/index.less +0 -5
- package/lib/common/ButtonIconLayout/index.less +2 -4
- package/lib/common/Collapse/index.js +4 -14
- package/lib/common/GroupList/index.js +3 -2
- package/lib/common/ImageModal/index.js +26 -31
- package/lib/common/ImageModal/index.less +1 -6
- package/lib/common/LinkModal/BundleCampaign/index.js +17 -17
- package/lib/common/LinkModal/CustomTable/index.js +1 -2
- package/lib/common/LinkModal/FilteredProductModal/index.js +2 -2
- package/lib/common/LinkModal/FilteredProductModal/index.less +2 -6
- package/lib/common/LinkModal/ProductDetailPage/index.js +3 -3
- package/lib/common/LinkModal/index.less +1 -1
- package/lib/common/ProductModal/index.js +1 -1
- package/lib/common/ProductModal/index.less +7 -12
- package/lib/common/UrlPicker/index.js +2 -6
- package/lib/common/UrlPicker/index.less +1 -12
- package/lib/common/index.js +0 -8
- package/lib/composite-comp/bol/components/Banner/defaultJSON.js +10 -10
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +10 -4
- package/lib/composite-comp/bol/components/Banner/pc/index.js +6 -3
- package/lib/composite-comp/bol/components/Button/defaultJSON.js +70 -40
- package/lib/composite-comp/bol/components/Button/index.js +14 -8
- package/lib/composite-comp/bol/components/Button/index.less +0 -1
- package/lib/composite-comp/bol/components/Carousel/defaultJSON.js +16 -12
- package/lib/composite-comp/bol/components/Carousel/index.js +6 -1
- package/lib/composite-comp/bol/components/Carousel/mobile/index.js +7 -4
- package/lib/composite-comp/bol/components/Carousel/pc/index.js +7 -12
- package/lib/composite-comp/bol/components/Carousel/pc/index.less +5 -13
- package/lib/composite-comp/bol/components/ImageGallery/defaultJSON.js +2 -2
- package/lib/composite-comp/bol/components/ImageText/defaultJSON.js +166 -26
- package/lib/composite-comp/bol/components/ImageText/mobile/index.js +5 -2
- package/lib/composite-comp/bol/components/ImageText/mobile/index.less +8 -8
- package/lib/composite-comp/bol/components/ImageText/pc/index.js +18 -46
- package/lib/composite-comp/bol/components/Newsletter/defaultJSON.js +2 -2
- package/lib/composite-comp/bol/components/Newsletter/index.js +6 -1
- package/lib/composite-comp/bol/components/Tag/defaultJSON.js +48 -38
- package/lib/composite-comp/bol/components/Tag/index.js +14 -8
- package/lib/composite-comp/bol/components/Tag/index.less +0 -1
- package/lib/composite-comp/bol/components/Text/defaultJSON.js +4 -4
- package/lib/composite-comp/bol/components/Text/index.js +8 -4
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +1 -3
- package/{es/composite-comp/bol/second-config-panels/TagSecondConfig → lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigContent}/index.js +38 -40
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +2 -4
- package/lib/composite-comp/bol/config-panels/CarouselConfig/index.js +0 -1
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +1 -3
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/index.js +1 -2
- package/lib/composite-comp/bol/config-panels/NewsletterConfig/index.js +4 -6
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigContent/index.js +17 -9
- package/lib/composite-comp/bol/config-panels/TagCompConfig/index.js +4 -7
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +1 -3
- package/lib/composite-comp/bol/config-panels/TextCompConfig/imgs/layout1.png +0 -0
- package/lib/composite-comp/bol/second-config-panels/CarouselSecondConfig/index.js +13 -8
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +5 -10
- package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/lib/composite-comp/common/components/ImageLabel/index.less +2 -6
- package/lib/composite-comp/common/components/ProductItem/index.less +10 -9
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -24
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +8 -8
- package/lib/composite-comp/dito/components/FlashDeal/defaultJSON.js +2 -62
- package/lib/composite-comp/dito/components/FlashDeal/index.js +1 -5
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +1 -0
- package/lib/composite-comp/dito/components/MobileNavigation/defaultJSON.js +4 -5
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +3 -13
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +2 -3
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +12 -30
- package/lib/composite-comp/dito/components/Recommend/index.js +6 -5
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +35 -40
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +3 -10
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +19 -123
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +12 -53
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +2 -26
- package/lib/composite-comp/dito/components/SearchBar/index.js +2 -7
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +23 -26
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +3 -13
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.js +6 -16
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/FlashDealConfigContent/index.less +0 -20
- package/lib/composite-comp/dito/config-panels/FlashDealConfig/index.js +3 -21
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +3 -17
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/index.js +5 -42
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/AIRecommendation/index.js +29 -39
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +49 -80
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +1 -13
- package/lib/constants/component-types.js +3 -13
- package/lib/constants/index.js +2 -20
- package/lib/constants/layout.js +8 -34
- package/lib/core/Designer/CompListPanel/index.js +33 -8
- package/lib/core/Designer/ConfigPanel/index.js +23 -72
- package/lib/core/Designer/ConfigPanel/index.less +0 -4
- package/lib/core/Designer/History/index.js +28 -34
- package/lib/core/Designer/PageCompList/index.js +3 -13
- 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 +6 -20
- package/lib/core/Designer/index.js +37 -42
- package/lib/core/Renderer/index.js +2 -17
- package/lib/decorator/compositeDecorator.js +12 -45
- package/lib/decorator/index.js +0 -8
- package/lib/decorator/metaDecorator.js +2 -2
- package/lib/locale/en/en.json +1 -14
- package/lib/locale/es/es.json +1 -14
- package/lib/locale/id/id.json +1 -14
- package/lib/meta-comp/components/Button/index.js +13 -32
- package/lib/meta-comp/components/Button/index.less +2 -10
- package/lib/meta-comp/components/Image/index.js +7 -38
- package/lib/meta-comp/components/Image/index.less +0 -2
- package/lib/meta-comp/components/Text/index.js +11 -27
- package/lib/meta-comp/config-panels/BaseConfig.js +10 -8
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +2 -2
- package/lib/meta-comp/config-panels/ImageConfig/index.js +4 -17
- package/lib/meta-comp/config-panels/TextConfig/index.js +3 -10
- package/lib/mobx/Store.js +10 -6
- package/lib/utils/coreUtil.js +3 -17
- package/package.json +3 -5
- package/es/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/es/common/ImgArea/components/Crop.js +0 -267
- package/es/common/ImgArea/components/Icons.js +0 -44
- package/es/common/ImgArea/components/MultiCrops.js +0 -210
- package/es/common/ImgArea/index.js +0 -11
- package/es/common/MagicLink/index.js +0 -89
- package/es/common/MagicLink/index.less +0 -0
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +0 -141
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +0 -16
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +0 -141
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +0 -16
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +0 -103
- package/es/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +0 -3
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +0 -8
- package/es/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +0 -3
- 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 +0 -578
- package/es/composite-comp/dito/components/FlashDeal/pc/index.less +0 -121
- package/es/composite-comp/dito/components/PcNavigation/defaultJSON.js +0 -131
- package/es/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +0 -6
- package/es/composite-comp/dito/components/PcNavigation/index.js +0 -85
- package/es/composite-comp/dito/components/PcNavigation/pc/index.js +0 -478
- package/es/composite-comp/dito/components/PcNavigation/pc/index.less +0 -98
- package/es/composite-comp/dito/components/SearchBar/pc/index.js +0 -151
- package/es/composite-comp/dito/components/SearchBar/pc/index.less +0 -59
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +0 -130
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +0 -128
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +0 -222
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/index.js +0 -195
- package/es/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +0 -102
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +0 -73
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.less +0 -29
- package/es/decorator/updateConfigDecorator.js +0 -76
- package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +0 -164
- package/es/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +0 -26
- package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +0 -133
- package/es/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +0 -17
- package/lib/assets/images/layout-icon/layout-navigation-normal.png +0 -0
- package/lib/common/ImgArea/components/Crop.js +0 -267
- package/lib/common/ImgArea/components/Icons.js +0 -44
- package/lib/common/ImgArea/components/MultiCrops.js +0 -210
- package/lib/common/ImgArea/index.js +0 -11
- package/lib/common/MagicLink/index.js +0 -89
- package/lib/common/MagicLink/index.less +0 -0
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +0 -141
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.less +0 -16
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +0 -141
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.less +0 -16
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.js +0 -103
- package/lib/composite-comp/bol/second-config-panels/ButtonSecondConfig/index.less +0 -3
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.less +0 -8
- package/lib/composite-comp/bol/second-config-panels/TagSecondConfig/index.less +0 -3
- 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 +0 -578
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.less +0 -121
- package/lib/composite-comp/dito/components/PcNavigation/defaultJSON.js +0 -131
- package/lib/composite-comp/dito/components/PcNavigation/images/menu-icon.svg +0 -6
- package/lib/composite-comp/dito/components/PcNavigation/index.js +0 -85
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.js +0 -478
- package/lib/composite-comp/dito/components/PcNavigation/pc/index.less +0 -98
- package/lib/composite-comp/dito/components/SearchBar/pc/index.js +0 -151
- package/lib/composite-comp/dito/components/SearchBar/pc/index.less +0 -59
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavConfigCategory/index.js +0 -130
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +0 -128
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/TextOnlyFontConfig/index.js +0 -222
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/index.js +0 -195
- package/lib/composite-comp/dito/second-config-panels/PcNavigationSecondConfig/index.js +0 -102
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +0 -73
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.less +0 -29
- package/lib/decorator/updateConfigDecorator.js +0 -76
- package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.js +0 -164
- package/lib/meta-comp/config-panels/ImageConfig/AreaConfigModal/index.less +0 -26
- package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.js +0 -133
- package/lib/meta-comp/config-panels/ImageConfig/HotAreaConfig/index.less +0 -17
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _componentTypes = require("../../constants/component-types");
|
|
11
11
|
|
|
12
|
-
var _coreUtil = require("../../utils/coreUtil");
|
|
13
|
-
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
13
|
|
|
16
14
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
@@ -50,27 +48,14 @@ var setDesignConfig = function setDesignConfig(props) {
|
|
|
50
48
|
|
|
51
49
|
var Renderer = function Renderer(props) {
|
|
52
50
|
var pageData = props.pageData;
|
|
53
|
-
setDesignConfig(props);
|
|
54
|
-
|
|
55
|
-
var filterCompFloor = function filterCompFloor() {
|
|
56
|
-
var source = [];
|
|
57
|
-
|
|
58
|
-
if (pageData && pageData.childNodes && pageData.childNodes.length) {
|
|
59
|
-
source = pageData.childNodes.filter(function (node) {
|
|
60
|
-
return (0, _coreUtil.isActiveFloor)(node.activeTerminal);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return source;
|
|
65
|
-
};
|
|
66
|
-
|
|
51
|
+
setDesignConfig(props);
|
|
67
52
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
68
53
|
className: "render_wrap",
|
|
69
54
|
magic_design: "",
|
|
70
55
|
style: {
|
|
71
56
|
background: window.magicDesign.pageBackground
|
|
72
57
|
}
|
|
73
|
-
},
|
|
58
|
+
}, pageData && pageData.childNodes && pageData.childNodes.map(function (nodeData) {
|
|
74
59
|
var Clazz = _componentTypes.componentMap[nodeData.type];
|
|
75
60
|
|
|
76
61
|
if (!Clazz) {
|
|
@@ -41,22 +41,6 @@ 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
|
-
|
|
60
44
|
function compositeDecorator(WrappedComponent) {
|
|
61
45
|
var Wrapper =
|
|
62
46
|
/** @class */
|
|
@@ -90,43 +74,26 @@ function compositeDecorator(WrappedComponent) {
|
|
|
90
74
|
};
|
|
91
75
|
|
|
92
76
|
_this.getStyle = function () {
|
|
93
|
-
var
|
|
77
|
+
var style = {
|
|
94
78
|
border: 'none'
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
mode = _a.mode;
|
|
99
|
-
var nodeData = _this.props.nodeData;
|
|
100
|
-
var spacing = nodeData.spacing,
|
|
101
|
-
background = nodeData.background; // 处理复合组件的选中状态
|
|
102
|
-
|
|
103
|
-
if (mode === 'designer') {
|
|
79
|
+
}; // 处理复合组件的选中状态
|
|
80
|
+
|
|
81
|
+
if (window.magicDesign.mode === 'designer') {
|
|
104
82
|
// style.border = '1px solid transparent';
|
|
105
|
-
|
|
83
|
+
style.border = 'none';
|
|
106
84
|
|
|
107
|
-
if (nodeData.id === _this.state.clickedFloor) {
|
|
108
|
-
|
|
85
|
+
if (_this.props.nodeData.id === _this.state.clickedFloor) {
|
|
86
|
+
style.border = '1px dashed red';
|
|
109
87
|
}
|
|
110
|
-
} //
|
|
111
|
-
|
|
88
|
+
} // 处理复合组件的下边距
|
|
112
89
|
|
|
113
|
-
if (spacing && spacing[device]) {
|
|
114
|
-
wrapStyle = __assign(__assign({}, wrapStyle), spacing[device]);
|
|
115
|
-
} // 背景
|
|
116
90
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
}
|
|
91
|
+
if (Wrapper.type !== 'DIVIDER') {
|
|
92
|
+
var rate = window.magicDesign.device === 'pc' ? 1.5 : 1;
|
|
93
|
+
style.marginBottom = Number(window.magicDesign.compSpacing) * rate + "px";
|
|
127
94
|
}
|
|
128
95
|
|
|
129
|
-
return
|
|
96
|
+
return style;
|
|
130
97
|
};
|
|
131
98
|
|
|
132
99
|
return _this;
|
package/es/decorator/index.js
CHANGED
|
@@ -15,17 +15,9 @@ 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
|
-
});
|
|
24
18
|
|
|
25
19
|
var _compositeDecorator = _interopRequireDefault(require("./compositeDecorator"));
|
|
26
20
|
|
|
27
21
|
var _metaDecorator = _interopRequireDefault(require("./metaDecorator"));
|
|
28
22
|
|
|
29
|
-
var _updateConfigDecorator = _interopRequireDefault(require("./updateConfigDecorator"));
|
|
30
|
-
|
|
31
23
|
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, _c;
|
|
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: (_c = _this.props.data) === null || _c === void 0 ? void 0 : _c.id,
|
|
94
94
|
clickedGroup: parentId,
|
|
95
95
|
clickedFloor: floorId
|
|
96
96
|
});
|
package/es/locale/en/en.json
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
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",
|
|
16
2
|
"NAVIGATION_NAME": "Navigation Name",
|
|
17
3
|
"ADD_NAVIGATION": "Add Navigation",
|
|
18
4
|
"SAVE": "Save",
|
|
@@ -98,6 +84,7 @@
|
|
|
98
84
|
"INPUT_FIELD": "Input Field",
|
|
99
85
|
"CONFIRMATION": "Confirmation",
|
|
100
86
|
"IMAGE_TAG": "Image Tag",
|
|
87
|
+
"BUTTON_TAG": "Button Tag",
|
|
101
88
|
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
102
89
|
"TITLE": "Title",
|
|
103
90
|
"HOVER": "Hover",
|
package/es/locale/es/es.json
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
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",
|
|
16
2
|
"NAVIGATION_NAME": "Navigation Name",
|
|
17
3
|
"ADD_NAVIGATION": "Add Navigation",
|
|
18
4
|
"SAVE": "Guardar",
|
|
@@ -98,6 +84,7 @@
|
|
|
98
84
|
"INPUT_FIELD": "Campo de entrada",
|
|
99
85
|
"CONFIRMATION": "Confirmación",
|
|
100
86
|
"IMAGE_TAG": "Etiqueta de imagen",
|
|
87
|
+
"BUTTON_TAG": "Etiqueta de botón",
|
|
101
88
|
"SECONDARY_BUTTON_TAG": "Etiqueta de botón secundario",
|
|
102
89
|
"TITLE": "Título",
|
|
103
90
|
"HOVER": "Hover",
|
package/es/locale/id/id.json
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
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",
|
|
16
2
|
"NAVIGATION_NAME": "Navigation Name",
|
|
17
3
|
"ADD_NAVIGATION": "Add Navigation",
|
|
18
4
|
"SAVE": "Save",
|
|
@@ -98,6 +84,7 @@
|
|
|
98
84
|
"INPUT_FIELD": "Input Field",
|
|
99
85
|
"CONFIRMATION": "Confirmation",
|
|
100
86
|
"IMAGE_TAG": "Image Tag",
|
|
87
|
+
"BUTTON_TAG": "Button Tag",
|
|
101
88
|
"SECONDARY_BUTTON_TAG": "Secondary Button Tag",
|
|
102
89
|
"TITLE": "Title",
|
|
103
90
|
"HOVER": "Hover",
|
|
@@ -11,12 +11,12 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
+
var _businessUtil = require("../../../utils/businessUtil");
|
|
15
|
+
|
|
14
16
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
15
17
|
|
|
16
18
|
var _decorator = require("../../../decorator");
|
|
17
19
|
|
|
18
|
-
var _commonUtil = require("../../../utils/commonUtil");
|
|
19
|
-
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
21
|
|
|
22
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -92,14 +92,14 @@ function (_super) {
|
|
|
92
92
|
|
|
93
93
|
_this.preData = '';
|
|
94
94
|
return _this;
|
|
95
|
-
}
|
|
96
|
-
// shouldComponentUpdate(nextProps) {
|
|
97
|
-
// const should1 = JSON.stringify(nextProps.data) != this.preData;
|
|
98
|
-
// const should2 = window.magicDesign.device != this.preDevice;
|
|
99
|
-
// const result = should1 || should2;
|
|
100
|
-
// return result;
|
|
101
|
-
// }
|
|
95
|
+
}
|
|
102
96
|
|
|
97
|
+
Button.prototype.shouldComponentUpdate = function (nextProps) {
|
|
98
|
+
var should1 = JSON.stringify(nextProps.data) != this.preData;
|
|
99
|
+
var should2 = window.magicDesign.device != this.preDevice;
|
|
100
|
+
var result = should1 || should2;
|
|
101
|
+
return result;
|
|
102
|
+
};
|
|
103
103
|
|
|
104
104
|
Button.prototype.render = function () {
|
|
105
105
|
var _this = this;
|
|
@@ -119,27 +119,7 @@ function (_super) {
|
|
|
119
119
|
border: data.buttonBorder.open && data.buttonBorder.borderColor ? "1px solid " + data.buttonBorder.borderColor : '1px solid transparent',
|
|
120
120
|
borderRadius: data.buttonBorder.open ? data.buttonBorder.borderRadius : 0
|
|
121
121
|
}, data.buttonText), {
|
|
122
|
-
fontSize: window.magicDesign.device == 'pc' ? data.buttonText.pcFontSize : data.buttonText.fontSize
|
|
123
|
-
paddingTop: window.magicDesign.device == 'pc' ? (0, _commonUtil.ensure)(function () {
|
|
124
|
-
return data.spacing.pc.paddingTop;
|
|
125
|
-
}, 10) : (0, _commonUtil.ensure)(function () {
|
|
126
|
-
return data.spacing.mobile.paddingTop;
|
|
127
|
-
}, 10),
|
|
128
|
-
paddingBottom: window.magicDesign.device == 'pc' ? (0, _commonUtil.ensure)(function () {
|
|
129
|
-
return data.spacing.pc.paddingBottom;
|
|
130
|
-
}, 10) : (0, _commonUtil.ensure)(function () {
|
|
131
|
-
return data.spacing.mobile.paddingBottom;
|
|
132
|
-
}, 10),
|
|
133
|
-
paddingLeft: window.magicDesign.device == 'pc' ? (0, _commonUtil.ensure)(function () {
|
|
134
|
-
return data.spacing.pc.paddingLeft;
|
|
135
|
-
}, 10) : (0, _commonUtil.ensure)(function () {
|
|
136
|
-
return data.spacing.mobile.paddingLeft;
|
|
137
|
-
}, 10),
|
|
138
|
-
paddingRight: window.magicDesign.device == 'pc' ? (0, _commonUtil.ensure)(function () {
|
|
139
|
-
return data.spacing.pc.paddingRight;
|
|
140
|
-
}, 10) : (0, _commonUtil.ensure)(function () {
|
|
141
|
-
return data.spacing.mobile.paddingRight;
|
|
142
|
-
}, 10)
|
|
122
|
+
fontSize: window.magicDesign.device == 'pc' ? data.buttonText.pcFontSize : data.buttonText.fontSize
|
|
143
123
|
});
|
|
144
124
|
|
|
145
125
|
var iconUrl = data.buttonIcon.iconUrl;
|
|
@@ -172,6 +152,7 @@ function (_super) {
|
|
|
172
152
|
suppressContentEditableWarning: true
|
|
173
153
|
}, data.text);
|
|
174
154
|
|
|
155
|
+
var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
|
|
175
156
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
157
|
className: (0, _classnames["default"])('m-meta-button', className),
|
|
177
158
|
onClick: function onClick() {
|
|
@@ -187,14 +168,14 @@ function (_super) {
|
|
|
187
168
|
hover: false
|
|
188
169
|
});
|
|
189
170
|
},
|
|
190
|
-
style: __assign({}, style)
|
|
171
|
+
style: __assign(__assign({}, style), wrapStyle)
|
|
191
172
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
192
173
|
className: (0, _classnames["default"])('btnContent', {
|
|
193
174
|
horizontal: iconLayout === 'left' || iconLayout === 'right'
|
|
194
175
|
})
|
|
195
176
|
}, (iconLayout === 'right' || iconLayout === 'bottom') && btnText, iconUrl && /*#__PURE__*/_react["default"].createElement("img", {
|
|
196
177
|
alt: "",
|
|
197
|
-
className: "
|
|
178
|
+
className: "item",
|
|
198
179
|
src: iconUrl
|
|
199
180
|
}), (iconLayout === 'left' || iconLayout === 'top') && btnText));
|
|
200
181
|
};
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
transition: all 0.25s;
|
|
3
3
|
|
|
4
4
|
.btnContent {
|
|
5
|
-
width: 100%;
|
|
6
5
|
cursor: pointer;
|
|
7
|
-
display: flex;
|
|
6
|
+
display: inline-flex;
|
|
8
7
|
align-items: center;
|
|
9
8
|
justify-content: center;
|
|
10
9
|
flex-direction: column;
|
|
@@ -13,16 +12,9 @@
|
|
|
13
12
|
flex-direction: row;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
.item {
|
|
17
|
-
width: 100%;
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
15
|
img {
|
|
24
16
|
height: 20px;
|
|
25
|
-
margin:
|
|
17
|
+
margin-right: 5px;
|
|
26
18
|
}
|
|
27
19
|
}
|
|
28
20
|
}
|
|
@@ -11,8 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var _defaultImg = _interopRequireDefault(require("./image/default-img.png"));
|
|
15
|
-
|
|
16
14
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
17
15
|
|
|
18
16
|
var _decorator = require("../../../decorator");
|
|
@@ -65,11 +63,9 @@ function (_super) {
|
|
|
65
63
|
function Image() {
|
|
66
64
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
67
65
|
|
|
68
|
-
_this.imgRef = /*#__PURE__*/_react["default"].createRef();
|
|
69
66
|
_this.state = {
|
|
70
67
|
// 当仅作为一个图片时,鼠标移上去,hover状态
|
|
71
|
-
hoverImgSrc: false
|
|
72
|
-
scale: 1
|
|
68
|
+
hoverImgSrc: false
|
|
73
69
|
};
|
|
74
70
|
|
|
75
71
|
_this.getStyle = function () {
|
|
@@ -86,7 +82,7 @@ function (_super) {
|
|
|
86
82
|
|
|
87
83
|
if (data.hover.open && data.hover.backgroundType === 'enlarge' && (hoverState || hoverImgSrc)) {
|
|
88
84
|
// return { transform: `scale(${data.hover.magnification})` };
|
|
89
|
-
obj.transform = "scale(" + data.hover.magnification + ")";
|
|
85
|
+
obj.transform = "scale(" + data.hover.magnification / 2 + ")";
|
|
90
86
|
}
|
|
91
87
|
|
|
92
88
|
if (maxHeight) {
|
|
@@ -148,8 +144,6 @@ function (_super) {
|
|
|
148
144
|
}
|
|
149
145
|
|
|
150
146
|
Image.prototype.render = function () {
|
|
151
|
-
var _this = this;
|
|
152
|
-
|
|
153
147
|
var _a, _b;
|
|
154
148
|
|
|
155
149
|
var _c = this.props,
|
|
@@ -167,11 +161,10 @@ function (_super) {
|
|
|
167
161
|
|
|
168
162
|
if (window.magicDesign.isShop && (srcImg === null || srcImg === void 0 ? void 0 : srcImg.includes('ecommerce/static'))) {
|
|
169
163
|
srcImg = srcImg.replace('ecommerce/static', 'static');
|
|
170
|
-
}
|
|
164
|
+
} // if (!srcImg) {
|
|
165
|
+
// srcImg = defaultImg;
|
|
166
|
+
// }
|
|
171
167
|
|
|
172
|
-
if (!srcImg) {
|
|
173
|
-
srcImg = _defaultImg["default"];
|
|
174
|
-
}
|
|
175
168
|
|
|
176
169
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
170
|
className: (0, _classnames["default"])('m-meta-image', {
|
|
@@ -180,36 +173,12 @@ function (_super) {
|
|
|
180
173
|
onClick: function onClick() {
|
|
181
174
|
(0, _coreUtil.clickUrl)(data.content.clickUrl);
|
|
182
175
|
}
|
|
183
|
-
}, srcImg && /*#__PURE__*/_react["default"].createElement(
|
|
184
|
-
ref: this.imgRef,
|
|
185
|
-
onLoad: function onLoad() {
|
|
186
|
-
var scale = _this.imgRef.current.clientWidth / 600;
|
|
187
|
-
|
|
188
|
-
_this.setState({
|
|
189
|
-
scale: scale
|
|
190
|
-
});
|
|
191
|
-
},
|
|
176
|
+
}, srcImg && /*#__PURE__*/_react["default"].createElement("img", {
|
|
192
177
|
onMouseEnter: this.mouseEnterImg,
|
|
193
178
|
onMouseLeave: this.mouseLeaveImg,
|
|
194
179
|
src: srcImg,
|
|
195
180
|
style: this.getStyle()
|
|
196
|
-
})
|
|
197
|
-
var aStyle = {
|
|
198
|
-
position: 'absolute',
|
|
199
|
-
top: parseInt(v.y * _this.state.scale),
|
|
200
|
-
left: parseInt(v.x * _this.state.scale),
|
|
201
|
-
width: parseInt(v.width * _this.state.scale),
|
|
202
|
-
height: parseInt(v.height * _this.state.scale)
|
|
203
|
-
};
|
|
204
|
-
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
205
|
-
key: i,
|
|
206
|
-
onClick: function onClick(e) {
|
|
207
|
-
e.stopPropagation();
|
|
208
|
-
(0, _coreUtil.clickUrl)(v.inputVal);
|
|
209
|
-
},
|
|
210
|
-
style: aStyle
|
|
211
|
-
});
|
|
212
|
-
})));
|
|
181
|
+
}));
|
|
213
182
|
};
|
|
214
183
|
|
|
215
184
|
Image.defaultProps = {
|
|
@@ -17,6 +17,8 @@ var _Iconfont = require("../../../common/Iconfont");
|
|
|
17
17
|
|
|
18
18
|
var _decorator = require("../../../decorator");
|
|
19
19
|
|
|
20
|
+
var _businessUtil = require("../../../utils/businessUtil");
|
|
21
|
+
|
|
20
22
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
21
23
|
|
|
22
24
|
var _mobx = require("../../../mobx");
|
|
@@ -102,8 +104,7 @@ var contentStyle = function contentStyle(content) {
|
|
|
102
104
|
color: content.color,
|
|
103
105
|
backgroundColor: content.backgroundColor,
|
|
104
106
|
textAlign: content.textAlign,
|
|
105
|
-
|
|
106
|
-
width: (window.magicDesign.device == 'pc' ? content.pcWidth : content.width) || '100%'
|
|
107
|
+
width: window.magicDesign.device == 'mobile' ? '100%' : content.width || 'fit-content'
|
|
107
108
|
};
|
|
108
109
|
};
|
|
109
110
|
/** 从父级数组中 分离出 片段数组 */
|
|
@@ -257,8 +258,7 @@ var initSelectionEvent = function initSelectionEvent() {
|
|
|
257
258
|
}
|
|
258
259
|
|
|
259
260
|
findSelectionTarget.refresh();
|
|
260
|
-
}
|
|
261
|
-
|
|
261
|
+
}
|
|
262
262
|
|
|
263
263
|
triggerTextConfigRender();
|
|
264
264
|
}, 500);
|
|
@@ -431,30 +431,14 @@ function (_super) {
|
|
|
431
431
|
className = _a.className,
|
|
432
432
|
readonly = _a.readonly,
|
|
433
433
|
onTextInput = _a.onTextInput;
|
|
434
|
-
var style = contentStyle(data.content);
|
|
435
|
-
|
|
436
|
-
if (data.underline) {
|
|
437
|
-
style = __assign(__assign({}, style), {
|
|
438
|
-
textDecorationLine: data.underline.open ? 'underline' : 'none',
|
|
439
|
-
textDecorationColor: data.underline.textDecorationColor,
|
|
440
|
-
textDecorationStyle: data.underline.textDecorationStyle
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
if (data === null || data === void 0 ? void 0 : data.spacing) {
|
|
445
|
-
if ((0, _coreUtil.isPc)()) {
|
|
446
|
-
style = __assign(__assign({}, style), data.spacing.pc);
|
|
447
|
-
} else {
|
|
448
|
-
style = __assign(__assign({}, style), data.spacing.mobile);
|
|
449
|
-
}
|
|
450
|
-
} // const style: React.CSSProperties = {
|
|
451
|
-
// ...contentStyle(data.content),
|
|
452
|
-
// textDecorationLine: data?.underline.open ? 'underline' : 'none',
|
|
453
|
-
// textDecorationColor: data?.underline.textDecorationColor,
|
|
454
|
-
// textDecorationStyle: data?.underline.textDecorationStyle,
|
|
455
|
-
// };
|
|
456
434
|
|
|
435
|
+
var style = __assign(__assign({}, contentStyle(data.content)), {
|
|
436
|
+
textDecorationLine: data.underline.open ? 'underline' : 'none',
|
|
437
|
+
textDecorationColor: data.underline.textDecorationColor,
|
|
438
|
+
textDecorationStyle: data.underline.textDecorationStyle
|
|
439
|
+
});
|
|
457
440
|
|
|
441
|
+
var wrapStyle = (0, _businessUtil.computeStyle)(data, window.magicDesign.device);
|
|
458
442
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
459
443
|
ref: this.textRef,
|
|
460
444
|
className: (0, _classnames["default"])('m-meta-text', className),
|
|
@@ -477,7 +461,7 @@ function (_super) {
|
|
|
477
461
|
onKeyDown: function onKeyDown(e) {
|
|
478
462
|
e.stopPropagation();
|
|
479
463
|
},
|
|
480
|
-
style: __assign({}, style),
|
|
464
|
+
style: __assign(__assign({}, style), wrapStyle),
|
|
481
465
|
suppressContentEditableWarning: true
|
|
482
466
|
});
|
|
483
467
|
};
|
|
@@ -48,6 +48,14 @@ function (_super) {
|
|
|
48
48
|
|
|
49
49
|
function BaseConfig() {
|
|
50
50
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
+
/**
|
|
52
|
+
*重新渲染展示区域
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
_this.reRenderViewArea = function () {
|
|
57
|
+
(0, _coreUtil.renderPreview)();
|
|
58
|
+
};
|
|
51
59
|
/**
|
|
52
60
|
* 重新渲染一级配置面板
|
|
53
61
|
*/
|
|
@@ -59,16 +67,10 @@ function (_super) {
|
|
|
59
67
|
*/
|
|
60
68
|
|
|
61
69
|
|
|
62
|
-
_this.selfRender = function (
|
|
63
|
-
var changeHistory = true;
|
|
64
|
-
|
|
65
|
-
if (data && data.type === 'text-render') {
|
|
66
|
-
changeHistory = false;
|
|
67
|
-
}
|
|
68
|
-
|
|
70
|
+
_this.selfRender = function () {
|
|
69
71
|
_this.setState({});
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
_this.reRenderViewArea();
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
return _this;
|
|
@@ -157,7 +157,7 @@ function (_super) {
|
|
|
157
157
|
return /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
158
158
|
value: sizeType.key
|
|
159
159
|
}, sizeType.key);
|
|
160
|
-
}))),
|
|
160
|
+
}))), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
161
161
|
title: (0, _locale.i18n)('FONT_FAMILY')
|
|
162
162
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
163
163
|
onChange: function onChange(v) {
|
|
@@ -191,7 +191,7 @@ function (_super) {
|
|
|
191
191
|
value: {
|
|
192
192
|
count: data[fontSizeKey]
|
|
193
193
|
}
|
|
194
|
-
}))
|
|
194
|
+
})), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
195
195
|
title: ""
|
|
196
196
|
}, /*#__PURE__*/_react["default"].createElement(_common.FontStyles, {
|
|
197
197
|
onChange: function onChange(value) {
|
|
@@ -11,8 +11,6 @@ var _antd = require("antd");
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var _HotAreaConfig = _interopRequireDefault(require("./HotAreaConfig"));
|
|
15
|
-
|
|
16
14
|
var _commonUtil = require("../../../utils/commonUtil");
|
|
17
15
|
|
|
18
16
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
@@ -202,7 +200,8 @@ function (_super) {
|
|
|
202
200
|
function ImageConfig() {
|
|
203
201
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
204
202
|
|
|
205
|
-
_this.onClick = function (event) {
|
|
203
|
+
_this.onClick = function (event) {
|
|
204
|
+
console.log(event);
|
|
206
205
|
};
|
|
207
206
|
|
|
208
207
|
_this.getImg = function (v) {
|
|
@@ -292,10 +291,6 @@ function (_super) {
|
|
|
292
291
|
_this.selfRender();
|
|
293
292
|
};
|
|
294
293
|
|
|
295
|
-
_this.getSelectedImg = function (data) {
|
|
296
|
-
return (0, _coreUtil.isPc)() ? data.content.pcImgSrc : data.content.h5ImgSrc;
|
|
297
|
-
};
|
|
298
|
-
|
|
299
294
|
return _this;
|
|
300
295
|
}
|
|
301
296
|
|
|
@@ -304,24 +299,16 @@ function (_super) {
|
|
|
304
299
|
|
|
305
300
|
var _a = this.props,
|
|
306
301
|
data = _a.data,
|
|
307
|
-
needHover = _a.needHover;
|
|
308
|
-
var selectImg = this.getSelectedImg(data);
|
|
302
|
+
needHover = _a.needHover; // console.log('---image', this.props);
|
|
309
303
|
|
|
310
304
|
var ContentSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.ImagePicker, {
|
|
311
305
|
onChange: function onChange(v) {
|
|
312
306
|
_this.getImg(v);
|
|
313
307
|
},
|
|
314
|
-
value:
|
|
315
|
-
}), selectImg && /*#__PURE__*/_react["default"].createElement(_HotAreaConfig["default"], {
|
|
316
|
-
imgUrl: selectImg,
|
|
317
|
-
onChange: function onChange() {
|
|
318
|
-
return _this.setState({});
|
|
319
|
-
},
|
|
320
|
-
option: data.content
|
|
308
|
+
value: (0, _coreUtil.isPc)() ? data.content.pcImgSrc : data.content.h5ImgSrc
|
|
321
309
|
}), /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
322
310
|
title: "URL"
|
|
323
311
|
}, /*#__PURE__*/_react["default"].createElement(_common.UrlPicker, {
|
|
324
|
-
disabled: data.content.openHotArea,
|
|
325
312
|
onChange: function onChange(v) {
|
|
326
313
|
data.content.clickUrl = v;
|
|
327
314
|
|