@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
|
@@ -19,8 +19,6 @@ require("./index.less");
|
|
|
19
19
|
|
|
20
20
|
var _locale = require("../../../locale");
|
|
21
21
|
|
|
22
|
-
var _coreUtil = require("../../../utils/coreUtil");
|
|
23
|
-
|
|
24
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); }
|
|
25
23
|
|
|
26
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -116,12 +114,10 @@ function (_super) {
|
|
|
116
114
|
}, /*#__PURE__*/_react["default"].createElement("h5", {
|
|
117
115
|
className: "cat-name"
|
|
118
116
|
}, compCat, "(", "" + compSource[compCat].length, ")"), compSource[compCat].map(function (comp) {
|
|
119
|
-
return
|
|
117
|
+
return /*#__PURE__*/_react["default"].createElement(_CompCard["default"], _extends({}, comp, {
|
|
120
118
|
key: comp.moduleId,
|
|
121
|
-
onAdd:
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
})) : null;
|
|
119
|
+
onAdd: _this.onAddClick
|
|
120
|
+
}));
|
|
125
121
|
}));
|
|
126
122
|
})));
|
|
127
123
|
};
|
|
@@ -129,5 +125,34 @@ function (_super) {
|
|
|
129
125
|
return CompListPanel;
|
|
130
126
|
}(_react.Component);
|
|
131
127
|
|
|
132
|
-
var _default = CompListPanel;
|
|
128
|
+
var _default = CompListPanel; // export default function CompListPanel({ visible, onClose, compSource, onAdd }) {
|
|
129
|
+
// useEffect(() => {
|
|
130
|
+
// if (visible) {
|
|
131
|
+
// document.getElementsByClassName('component-list')[0].scrollTop = 0;
|
|
132
|
+
// }
|
|
133
|
+
// }, [visible]);
|
|
134
|
+
// return (
|
|
135
|
+
// <div className={classNames('compListPanel', { visible })}>
|
|
136
|
+
// <header className="header">
|
|
137
|
+
// <Button icon="icon-close" onClick={onClose} type="icon" />
|
|
138
|
+
// </header>
|
|
139
|
+
// <h2 className="title">{i18n('ADD_COMPONENT')}</h2>
|
|
140
|
+
// <div className="component-list">
|
|
141
|
+
// {
|
|
142
|
+
// Object.keys(compSource).map(compCat => (
|
|
143
|
+
// <div key={compCat} className="cat-list">
|
|
144
|
+
// <h5 className="cat-name">{compCat}({`${compSource[compCat].length}`})</h5>
|
|
145
|
+
// {
|
|
146
|
+
// compSource[compCat].map(comp => (
|
|
147
|
+
// <CompCard {...comp} key={comp.moduleId} onAdd={onAdd} />
|
|
148
|
+
// ))
|
|
149
|
+
// }
|
|
150
|
+
// </div>
|
|
151
|
+
// ))
|
|
152
|
+
// }
|
|
153
|
+
// </div>
|
|
154
|
+
// </div>
|
|
155
|
+
// );
|
|
156
|
+
// }
|
|
157
|
+
|
|
133
158
|
exports["default"] = _default;
|
|
@@ -9,8 +9,6 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _TerminalSelect = _interopRequireDefault(require("./TerminalSelect"));
|
|
13
|
-
|
|
14
12
|
var _coreUtil = require("../../../utils/coreUtil");
|
|
15
13
|
|
|
16
14
|
var _commonUtil = require("../../../utils/commonUtil");
|
|
@@ -74,34 +72,6 @@ function (_super) {
|
|
|
74
72
|
selectedNode: {}
|
|
75
73
|
};
|
|
76
74
|
|
|
77
|
-
_this.resetState = function (propsData, clickedFloor) {
|
|
78
|
-
var pageData = propsData.pageData;
|
|
79
|
-
var selectedNode = pageData.find(function (floor) {
|
|
80
|
-
return floor.id === clickedFloor;
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
_this.setState({
|
|
84
|
-
clickedGroup: _mobx.store.clickedGroup,
|
|
85
|
-
selectedNode: selectedNode
|
|
86
|
-
}); // 展开一级面板
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (selectedNode) {
|
|
90
|
-
_this.openConfig();
|
|
91
|
-
} else {
|
|
92
|
-
_this.closeConfig();
|
|
93
|
-
} // 展开二级面板
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (!_mobx.store.clickedGroup && _this.preClickedGroup) {
|
|
97
|
-
_this.closeSecConfig();
|
|
98
|
-
} else if (Boolean(_mobx.store.clickedGroup) != Boolean(_this.preClickedGroup)) {
|
|
99
|
-
_this.openSecConfig();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
_this.preClickedGroup = _mobx.store.clickedGroup;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
75
|
_this.animation = function (type) {
|
|
106
76
|
document.getElementsByClassName('config_wrap')[0].setAttribute('style', "animation-name:" + type + ";animation-duration: 0.3s;animation-fill-mode:both");
|
|
107
77
|
};
|
|
@@ -187,13 +157,6 @@ function (_super) {
|
|
|
187
157
|
device: device
|
|
188
158
|
};
|
|
189
159
|
var instance = Clazz ? /*#__PURE__*/_react["default"].createElement(Clazz, panelProps) : null;
|
|
190
|
-
|
|
191
|
-
if (!instance) {
|
|
192
|
-
_mobx.store.setState({
|
|
193
|
-
clickedFloor: null
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
|
|
197
160
|
return instance;
|
|
198
161
|
};
|
|
199
162
|
|
|
@@ -246,15 +209,11 @@ function (_super) {
|
|
|
246
209
|
break;
|
|
247
210
|
|
|
248
211
|
case 'MOBILE_NAVIGATION':
|
|
249
|
-
case 'PC_NAVIGATION':
|
|
250
212
|
groupName = ((_f = panelProps.groupName) === null || _f === void 0 ? void 0 : _f.title.text) || (0, _locale.i18n)('NAVIGATION_NAME');
|
|
251
213
|
break;
|
|
252
214
|
|
|
253
215
|
case 'RECOMMEND':
|
|
254
216
|
groupName = panelProps.groupName.text;
|
|
255
|
-
|
|
256
|
-
case 'TAG':
|
|
257
|
-
groupName = '';
|
|
258
217
|
}
|
|
259
218
|
|
|
260
219
|
return groupName || 'Group Name';
|
|
@@ -264,41 +223,40 @@ function (_super) {
|
|
|
264
223
|
_mobx.store.setState({
|
|
265
224
|
clickedGroup: null
|
|
266
225
|
});
|
|
267
|
-
|
|
268
|
-
window.document.dispatchEvent(new Event(_constants.eventType.UPDATE_FIRST_CONFIG, {
|
|
269
|
-
bubbles: false
|
|
270
|
-
}));
|
|
271
226
|
};
|
|
272
227
|
|
|
273
|
-
_this
|
|
274
|
-
|
|
275
|
-
|
|
228
|
+
return _this;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
ConfigPanel.prototype.componentDidMount = function () {
|
|
232
|
+
var _this = this;
|
|
233
|
+
|
|
234
|
+
this.distroy = (0, _mobx.autorun)(function () {
|
|
235
|
+
var selectedNode = _mobx.store.getFloorInfo();
|
|
276
236
|
|
|
277
237
|
_this.setState({
|
|
238
|
+
clickedGroup: _mobx.store.clickedGroup,
|
|
278
239
|
selectedNode: selectedNode
|
|
279
|
-
}); //
|
|
240
|
+
}); // 展开以及面板
|
|
280
241
|
|
|
281
242
|
|
|
282
|
-
|
|
283
|
-
|
|
243
|
+
if (selectedNode) {
|
|
244
|
+
_this.openConfig();
|
|
245
|
+
} else {
|
|
246
|
+
_this.closeConfig();
|
|
247
|
+
} // 展开首期二级面板
|
|
284
248
|
|
|
285
|
-
return _this;
|
|
286
|
-
}
|
|
287
249
|
|
|
288
|
-
|
|
289
|
-
|
|
250
|
+
if (!_mobx.store.clickedGroup) {
|
|
251
|
+
_this.closeSecConfig();
|
|
252
|
+
} else if (_mobx.store.clickedGroup !== _this.preClickedGroup) {
|
|
253
|
+
_this.openSecConfig();
|
|
254
|
+
}
|
|
290
255
|
|
|
291
|
-
|
|
292
|
-
_this.resetState(_this.props, _mobx.store.clickedFloor);
|
|
256
|
+
_this.preClickedGroup = _mobx.store.clickedGroup;
|
|
293
257
|
});
|
|
294
258
|
};
|
|
295
259
|
|
|
296
|
-
ConfigPanel.prototype.componentWillReceiveProps = function (nextProps) {
|
|
297
|
-
if (JSON.stringify(this.props) !== JSON.stringify(nextProps)) {
|
|
298
|
-
this.resetState(nextProps, _mobx.store.clickedFloor);
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
|
|
302
260
|
ConfigPanel.prototype.componentWillUnmount = function () {
|
|
303
261
|
this.distroy();
|
|
304
262
|
};
|
|
@@ -317,17 +275,10 @@ function (_super) {
|
|
|
317
275
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
318
276
|
className: "title",
|
|
319
277
|
title: (_a = _constants.compInfoMap[selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.type]) === null || _a === void 0 ? void 0 : _a.name
|
|
320
|
-
}, (_b = _constants.compInfoMap[selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.type]) === null || _b === void 0 ? void 0 : _b.name), /*#__PURE__*/_react["default"].createElement("
|
|
321
|
-
className: "right_wrap"
|
|
322
|
-
}, /*#__PURE__*/_react["default"].createElement(_TerminalSelect["default"], {
|
|
323
|
-
onChange: this.onTerminalChange,
|
|
324
|
-
terminalType: selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.terminalType,
|
|
325
|
-
value: selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.activeTerminal
|
|
326
|
-
}), device === _constants.deviceTypeMap.PC && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
278
|
+
}, (_b = _constants.compInfoMap[selectedNode === null || selectedNode === void 0 ? void 0 : selectedNode.type]) === null || _b === void 0 ? void 0 : _b.name), device === _constants.deviceTypeMap.PC && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
327
279
|
onClick: this.onDoneClick,
|
|
328
|
-
size: "small",
|
|
329
280
|
type: "light"
|
|
330
|
-
}, (0, _locale.i18n)('DONE')))
|
|
281
|
+
}, (0, _locale.i18n)('DONE'))), this.getConfigPanelInstance()), /*#__PURE__*/_react["default"].createElement("div", {
|
|
331
282
|
className: "sec_config_wrap"
|
|
332
283
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
333
284
|
className: "config_header"
|
|
@@ -7,8 +7,6 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
9
9
|
|
|
10
|
-
var _lodash = require("lodash");
|
|
11
|
-
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
11
|
|
|
14
12
|
/**
|
|
@@ -16,25 +14,24 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
16
14
|
* 有新的操作时存入数组的0位置,游标设置为0
|
|
17
15
|
*
|
|
18
16
|
*/
|
|
17
|
+
var debug = require('debug')('worker:History');
|
|
18
|
+
|
|
19
19
|
var History =
|
|
20
20
|
/** @class */
|
|
21
21
|
function () {
|
|
22
22
|
function History(hist) {
|
|
23
23
|
var _this = this;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* 游标位置
|
|
26
|
+
*/
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
this.cursor = 0;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
* 历史数据
|
|
32
|
+
*/
|
|
33
33
|
|
|
34
34
|
this.list = [];
|
|
35
|
-
/** 前进或者后退步数 */
|
|
36
|
-
|
|
37
|
-
this.step = 0;
|
|
38
35
|
|
|
39
36
|
this.redoAble = function () {
|
|
40
37
|
return _this.cursor !== 0;
|
|
@@ -44,50 +41,47 @@ function () {
|
|
|
44
41
|
return _this.cursor !== _this.list.length - 1;
|
|
45
42
|
};
|
|
46
43
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
* 清空0~cursor之间的数据,将data插入 位置0
|
|
45
|
+
*/
|
|
49
46
|
|
|
50
47
|
|
|
51
48
|
this.push = function (data) {
|
|
49
|
+
debug('push data', data);
|
|
52
50
|
var cloneData = (0, _cloneDeep["default"])(data);
|
|
53
51
|
|
|
54
52
|
_this.list.splice(0, _this.cursor, cloneData);
|
|
55
53
|
|
|
56
|
-
_this.cursor = 0;
|
|
57
54
|
return data;
|
|
58
55
|
};
|
|
59
56
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
* redu操作只修改当前游标-1
|
|
58
|
+
* 并且返回后一步的json对象
|
|
59
|
+
*/
|
|
64
60
|
|
|
65
|
-
this.redo = function (callback) {
|
|
66
|
-
_this.step -= 1;
|
|
67
61
|
|
|
68
|
-
|
|
62
|
+
this.redo = function () {
|
|
63
|
+
debug('redo click');
|
|
64
|
+
var newCursor = _this.cursor - 1;
|
|
65
|
+
_this.cursor = newCursor;
|
|
66
|
+
var newData = _this.list[newCursor];
|
|
67
|
+
return newData;
|
|
69
68
|
};
|
|
70
69
|
/**
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
* undo操作只修改当前的游标+1
|
|
71
|
+
* 并且返回前一步的json对象
|
|
72
|
+
*/
|
|
75
73
|
|
|
76
|
-
this.undo = function (callback) {
|
|
77
|
-
_this.step += 1;
|
|
78
74
|
|
|
79
|
-
|
|
75
|
+
this.undo = function () {
|
|
76
|
+
debug('undo click');
|
|
77
|
+
var newCursor = _this.cursor + 1;
|
|
78
|
+
_this.cursor = newCursor;
|
|
79
|
+
var newData = _this.list[newCursor];
|
|
80
|
+
return newData;
|
|
80
81
|
};
|
|
81
82
|
|
|
82
|
-
this.doAction = (0, _lodash.debounce)(function (callback) {
|
|
83
|
-
var newCursor = _this.cursor + _this.step;
|
|
84
|
-
_this.cursor = newCursor;
|
|
85
|
-
var newData = (0, _cloneDeep["default"])(_this.list[newCursor]);
|
|
86
|
-
_this.step = 0;
|
|
87
|
-
callback(newData);
|
|
88
|
-
}, 300);
|
|
89
83
|
this.cursor = 0;
|
|
90
|
-
this.list = [
|
|
84
|
+
this.list = [hist];
|
|
91
85
|
}
|
|
92
86
|
|
|
93
87
|
return History;
|
|
@@ -121,11 +121,9 @@ function PageCompList(_a) {
|
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
var onMenuClick = function onMenuClick(
|
|
124
|
+
var onMenuClick = function onMenuClick(index, operType) {
|
|
125
125
|
var newComponents = __spreadArrays(components);
|
|
126
126
|
|
|
127
|
-
var index = newComponents.indexOf(activeComp);
|
|
128
|
-
|
|
129
127
|
if (operType === operTypeMap.MOVE_UP) {
|
|
130
128
|
var temp = newComponents[index - 1];
|
|
131
129
|
newComponents[index - 1] = newComponents[index];
|
|
@@ -180,7 +178,7 @@ function PageCompList(_a) {
|
|
|
180
178
|
var menu = /*#__PURE__*/_react["default"].createElement(_antd.Menu, {
|
|
181
179
|
onClick: function onClick(_a) {
|
|
182
180
|
var item = _a.item;
|
|
183
|
-
return onMenuClick(
|
|
181
|
+
return onMenuClick(index, item.props.value);
|
|
184
182
|
}
|
|
185
183
|
}, index !== 0 && /*#__PURE__*/_react["default"].createElement(_antd.Menu.Item, {
|
|
186
184
|
className: "menu_item",
|
|
@@ -247,14 +245,6 @@ function PageCompList(_a) {
|
|
|
247
245
|
})));
|
|
248
246
|
};
|
|
249
247
|
|
|
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();
|
|
258
248
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
259
249
|
className: "page-comp-wrap"
|
|
260
250
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -272,7 +262,7 @@ function PageCompList(_a) {
|
|
|
272
262
|
className: "list mt16"
|
|
273
263
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
274
264
|
className: "inner-list"
|
|
275
|
-
}, /*#__PURE__*/_react["default"].createElement("div", null,
|
|
265
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, components.length > 0 && components.map(function (comp, i) {
|
|
276
266
|
return renderCard(comp, i);
|
|
277
267
|
}))))));
|
|
278
268
|
}
|
|
@@ -121,19 +121,19 @@
|
|
|
121
121
|
display: block;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
+
}
|
|
124
125
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
.active {
|
|
127
|
+
background: #E9F0FF;
|
|
128
|
+
color: #2F54EB;
|
|
128
129
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
130
|
+
.left {
|
|
131
|
+
.card-title {
|
|
132
|
+
font-weight: 600;
|
|
133
133
|
}
|
|
134
|
+
}
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
136
|
+
.more-btn {
|
|
137
|
+
display: block;
|
|
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,12 +17,10 @@ var _constants = require("../../../constants");
|
|
|
17
17
|
|
|
18
18
|
var _componentTypes = require("../../../constants/component-types");
|
|
19
19
|
|
|
20
|
-
var _mobx = require("../../../mobx");
|
|
21
|
-
|
|
22
|
-
var _coreUtil = require("../../../utils/coreUtil");
|
|
23
|
-
|
|
24
20
|
require("./index.less");
|
|
25
21
|
|
|
22
|
+
var _mobx = require("../../../mobx");
|
|
23
|
+
|
|
26
24
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
25
|
|
|
28
26
|
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; }
|
|
@@ -88,22 +86,10 @@ function (_super) {
|
|
|
88
86
|
_this.isPhoneEdit = function () {
|
|
89
87
|
var device = _this.props.device;
|
|
90
88
|
return device === _constants.deviceTypeMap.PHONE && !(0, _isEmpty["default"])(_this.state.clickedFloor);
|
|
91
|
-
};
|
|
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
|
-
}
|
|
89
|
+
};
|
|
105
90
|
|
|
106
|
-
|
|
91
|
+
_this.renderView = function () {
|
|
92
|
+
_this.setState({});
|
|
107
93
|
};
|
|
108
94
|
|
|
109
95
|
return _this;
|
|
@@ -139,7 +125,7 @@ function (_super) {
|
|
|
139
125
|
style: {
|
|
140
126
|
background: window.magicDesign.pageBackground
|
|
141
127
|
}
|
|
142
|
-
},
|
|
128
|
+
}, pageData && pageData.map(function (nodeData) {
|
|
143
129
|
var Clazz = _componentTypes.componentMap[nodeData.type];
|
|
144
130
|
|
|
145
131
|
if (!Clazz) {
|
|
@@ -97,13 +97,11 @@ 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
|
-
|
|
105
100
|
var setDesignConfig = function setDesignConfig(data) {
|
|
106
|
-
window.magicDesign = __assign(__assign(
|
|
101
|
+
window.magicDesign = __assign(__assign({
|
|
102
|
+
mode: 'designer',
|
|
103
|
+
device: _constants.deviceTypeMap.PHONE
|
|
104
|
+
}, data), {
|
|
107
105
|
MBaseUrl: data.MBaseUrl || ''
|
|
108
106
|
});
|
|
109
107
|
};
|
|
@@ -171,16 +169,14 @@ function (_super) {
|
|
|
171
169
|
_this.configRef.current.closeMobileConfig();
|
|
172
170
|
};
|
|
173
171
|
|
|
174
|
-
_this.reRenderViewArea = function (
|
|
175
|
-
if (
|
|
176
|
-
|
|
172
|
+
_this.reRenderViewArea = function () {
|
|
173
|
+
if (!_this.viewAreaRef || !_this.viewAreaRef.current) {
|
|
174
|
+
return;
|
|
177
175
|
}
|
|
178
176
|
|
|
179
|
-
|
|
180
|
-
MPageData: _this.state.MPageData
|
|
181
|
-
});
|
|
177
|
+
_this.history.push(_this.state.MPageData);
|
|
182
178
|
|
|
183
|
-
_this.
|
|
179
|
+
_this.viewAreaRef.current.renderView();
|
|
184
180
|
};
|
|
185
181
|
|
|
186
182
|
_this.componentClick = function (event) {
|
|
@@ -190,12 +186,12 @@ function (_super) {
|
|
|
190
186
|
};
|
|
191
187
|
/**
|
|
192
188
|
* 楼层 的 新增、删除、拷贝、顺序调整、属性修改时调用
|
|
193
|
-
* @param {*}
|
|
189
|
+
* @param {*} pageData 模版信息
|
|
194
190
|
*/
|
|
195
191
|
|
|
196
192
|
|
|
197
|
-
_this.setPageData = function (
|
|
198
|
-
var MPageData = _this.history.push(
|
|
193
|
+
_this.setPageData = function (pageData) {
|
|
194
|
+
var MPageData = _this.history.push(pageData);
|
|
199
195
|
|
|
200
196
|
_this.setState({
|
|
201
197
|
MPageData: MPageData
|
|
@@ -251,8 +247,7 @@ function (_super) {
|
|
|
251
247
|
};
|
|
252
248
|
|
|
253
249
|
_this.addComponent = function (_a) {
|
|
254
|
-
var type = _a.type
|
|
255
|
-
terminalType = _a.terminalType;
|
|
250
|
+
var type = _a.type;
|
|
256
251
|
var MPageData = _this.state.MPageData;
|
|
257
252
|
var compType = _componentTypes.componentMap[type];
|
|
258
253
|
|
|
@@ -263,10 +258,7 @@ function (_super) {
|
|
|
263
258
|
|
|
264
259
|
var compInst = compType.getDefaultJSON();
|
|
265
260
|
|
|
266
|
-
var newData = __spreadArrays(MPageData, [
|
|
267
|
-
terminalType: terminalType,
|
|
268
|
-
activeTerminal: terminalType
|
|
269
|
-
})]);
|
|
261
|
+
var newData = __spreadArrays(MPageData, [compInst]);
|
|
270
262
|
|
|
271
263
|
_this.history.push(newData);
|
|
272
264
|
|
|
@@ -306,24 +298,18 @@ function (_super) {
|
|
|
306
298
|
device: device
|
|
307
299
|
};
|
|
308
300
|
|
|
309
|
-
var callback = function callback(newPageData) {
|
|
310
|
-
_mobx.store.setState({
|
|
311
|
-
MPageData: newPageData
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
_this.setState({
|
|
315
|
-
MPageData: newPageData
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
|
|
319
301
|
switch (code) {
|
|
320
302
|
case _constants.quickMenuCode.UNDO:
|
|
321
|
-
_this.
|
|
303
|
+
_this.setState({
|
|
304
|
+
MPageData: _this.history.undo()
|
|
305
|
+
});
|
|
322
306
|
|
|
323
307
|
break;
|
|
324
308
|
|
|
325
309
|
case _constants.quickMenuCode.REDO:
|
|
326
|
-
_this.
|
|
310
|
+
_this.setState({
|
|
311
|
+
MPageData: _this.history.redo()
|
|
312
|
+
});
|
|
327
313
|
|
|
328
314
|
break;
|
|
329
315
|
|
|
@@ -349,6 +335,8 @@ function (_super) {
|
|
|
349
335
|
|
|
350
336
|
break;
|
|
351
337
|
}
|
|
338
|
+
|
|
339
|
+
console.log(JSON.stringify(handleParams.pageData));
|
|
352
340
|
};
|
|
353
341
|
|
|
354
342
|
_this.renderHeader = function () {
|
|
@@ -365,20 +353,27 @@ function (_super) {
|
|
|
365
353
|
config = props.config,
|
|
366
354
|
locale = props.locale;
|
|
367
355
|
var MPageData = pageData.childNodes || [];
|
|
368
|
-
_this.configRef = /*#__PURE__*/_react["default"].createRef(); // this.viewAreaRef = React.createRef();
|
|
369
356
|
|
|
370
|
-
|
|
371
|
-
|
|
357
|
+
_mobx.store.setState({
|
|
358
|
+
MPageData: MPageData
|
|
359
|
+
});
|
|
360
|
+
/** 使用默认国际化 */
|
|
361
|
+
// if (!store.locale) {
|
|
362
|
+
|
|
372
363
|
|
|
373
364
|
_mobx.store.setState({
|
|
374
|
-
MPageData: MPageData,
|
|
375
365
|
locale: locale
|
|
376
|
-
});
|
|
366
|
+
}); // }
|
|
367
|
+
|
|
377
368
|
|
|
369
|
+
_this.configRef = /*#__PURE__*/_react["default"].createRef();
|
|
370
|
+
_this.viewAreaRef = /*#__PURE__*/_react["default"].createRef();
|
|
371
|
+
_this.compListRef = /*#__PURE__*/_react["default"].createRef();
|
|
378
372
|
_this.state = {
|
|
379
373
|
MPageData: MPageData,
|
|
380
374
|
device: _constants.deviceTypeMap.PHONE
|
|
381
375
|
};
|
|
376
|
+
_this.history = new _History["default"](MPageData);
|
|
382
377
|
setDesignConfig(config);
|
|
383
378
|
return _this;
|
|
384
379
|
}
|
|
@@ -403,7 +398,6 @@ function (_super) {
|
|
|
403
398
|
var pageData = nextProps.pageData,
|
|
404
399
|
config = nextProps.config;
|
|
405
400
|
var MPageData = pageData.childNodes || [];
|
|
406
|
-
this.history = new _History["default"](MPageData);
|
|
407
401
|
this.setState({
|
|
408
402
|
MPageData: MPageData
|
|
409
403
|
});
|
|
@@ -412,6 +406,7 @@ function (_super) {
|
|
|
412
406
|
MPageData: MPageData
|
|
413
407
|
});
|
|
414
408
|
|
|
409
|
+
this.history = new _History["default"](MPageData);
|
|
415
410
|
setDesignConfig(config);
|
|
416
411
|
};
|
|
417
412
|
|
|
@@ -472,8 +467,8 @@ function (_super) {
|
|
|
472
467
|
device: device,
|
|
473
468
|
onClose: this.onPropsPanelClose,
|
|
474
469
|
pageData: MPageData
|
|
475
|
-
}), /*#__PURE__*/_react["default"].createElement(_ViewArea["default"]
|
|
476
|
-
|
|
470
|
+
}), /*#__PURE__*/_react["default"].createElement(_ViewArea["default"], {
|
|
471
|
+
ref: this.viewAreaRef,
|
|
477
472
|
device: device,
|
|
478
473
|
pageData: MPageData,
|
|
479
474
|
renderHeader: this.renderHeader
|